neko-harness 0.4.2 → 0.4.4
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.
- package/README.md +3 -1
- package/dist/client/assets/index-BjLs6qQU.css +2 -0
- package/dist/client/assets/index-BqLuRtzq.js +391 -0
- package/dist/client/index.html +2 -2
- package/dist/gateway.js +1880 -1082
- package/dist/neko.js +1925 -551
- package/package.json +6 -6
- package/dist/client/assets/index-C4UO2YJF.js +0 -391
- package/dist/client/assets/index-DPSmVlrG.css +0 -2
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,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},ee=Object.prototype.hasOwnProperty;function te(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function ne(e,t){return te(e.type,t,e.props)}function re(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function E(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ie=/\/+/g;function ae(e,t){return typeof e==`object`&&e&&e.key!=null?E(``+e.key):t.toString(36)}function oe(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 se(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,se(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ae(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(ie,`$&/`)+`/`),se(o,r,i,``,function(e){return e})):o!=null&&(re(o)&&(o=ne(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ie,`$&/`)+`/`)+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+ae(a,u),c+=se(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+ae(a,u++),c+=se(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return se(oe(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 ce(e,t,n){if(e==null)return e;var r=[],i=0;return se(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function le(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 ue=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 de(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,ue)}catch(e){ue(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function fe(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 de(fe.bind(null,e))}var pe={map:ce,forEach:function(e,t,n){ce(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ce(e,function(){t++}),t},toArray:function(e){return ce(e,function(e){return e})||[]},only:function(e){if(!re(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=pe,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=fe,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)!ee.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 te(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)ee.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 te(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=re,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:le}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=de,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.0`})),d=o(((e,t)=>{t.exports=u()})),f=l(d(),1),p=f.useLayoutEffect;function m(e){return e[e.length-1]}function h(e,t){return typeof e==`function`?e(t):e}var g=Object.prototype.hasOwnProperty;function _(e){for(let t in e)if(g.call(e,t))return!0;return!1}var v=()=>Object.create(null),y=(e,t)=>b(e,t,!0);function b(e,t,n,r=0){if(e===t)return e;if(r++>500)return t;let i=Array.isArray(e)&&Array.isArray(t);if(!i&&!(x(e)&&x(t)))return t;let a=Object.keys(e),o=a.length,s=Object.keys(t),c=s.length;if(i?o!==e.length||c!==t.length||o&&m(a)!==`${o-1}`||c&&m(s)!==`${c-1}`:o!==Object.getOwnPropertyNames(e).length||c!==Object.getOwnPropertyNames(t).length||Object.getOwnPropertySymbols(t).length)return t;let l=0,u,d,f;if(i){for(;l<c&&(f=l,d=e[f],u=t[f],u=d===u?d:typeof d==`object`?b(d,u,n,r):u,u===d);l++);if(l===c&&o===c)return e}else{let i=o===c,p=!0;for(;l<c;l++){f=s[l],d=e[f];let o=t[f];u=d===o?d:typeof d==`object`?b(d,o,n,r):o,i&&=u===d&&(a[l]===f||g.call(e,f)),p&&=Object.is(u,o),a[l]=u}if(i)return Object.getOwnPropertySymbols(e).length?t:e;if(p)return t}let p=i?s.fill(0):n?v():{};for(let o=0;o<c;o++)f=i?o:s[o],i?(d=e[f],o>l&&(u=t[f],u=d===u?d:typeof d==`object`?b(d,u,n,r):u),p[f]=o<l?d:u):p[f]=a[o];return p}function x(e){return!e||typeof e!=`object`?!1:(Object.getPrototypeOf(e)?.constructor??Object)===Object}function S(e,t,n,r){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let i=0,a=e.length;i<a;i++){let a=e[i],o=t[i];if(a!==o&&!S(a,o,n,r))return!1}return!0}if(x(e)&&x(t)){if(n){for(let i in t)if((r||t[i]!==void 0)&&!S(e[i],t[i],n,r))return!1;return!0}let i=0;if(r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;for(let a in t)if((r||t[a]!==void 0)&&(i--===0||!S(e[a],t[a],n,r)))return!1;return i===0}return!1}var C=/[\x00-\x1f\x7f"<>`{}]/g;function w(e){return e.replace(C,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function T(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return w(t)}var ee=[`http:`,`https:`,`mailto:`,`tel:`];function te(e){if(e[0]!==`/`&&e.includes(`:`))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(e)?.[1]?.replace(/[\t\n\r]/g,``).toLowerCase()}var ne=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function re(e,t){if(!e)return!1;if(ne.test(e))return!0;let n=te(e);return n?!t.has(n):!1}function E(e){if(!e)return e;let t=e;if(/[%\\\x00-\x1f\x7f]/.test(e)){let n=/%25|%5C/gi,r=0,i;for(t=``;(i=n.exec(e))!==null;)t+=T(e.slice(r,i.index))+i[0],r=n.lastIndex;t+=T(r?e.slice(r):e)}return t}function ie(e){return/[\s\u0080-\uFFFF]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function ae(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function oe(){throw Error(`Invariant failed`)}function se(e){return e.replace(/\/{2,}/g,`/`)}function ce(e){return e===`/`?e:e.replace(/^\/+/,``)}function le(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/+$/,``):e}function ue(e){return le(ce(e))}function de(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function fe(e,t,n=`never`,r){if(t.includes(`//`)&&(t=se(t)),t.startsWith(`/`))return t.length===1||n===`preserve`?t:n===`always`?t.endsWith(`/`)?t:`${t}/`:t.endsWith(`/`)?t.slice(0,-1):t;let i=t===`.`,a;if(r){a=i?e:e+`\0`+t;let n=r.get(a);if(n)return n}let o;if(i)o=e.split(`/`);else{for(e.includes(`//`)&&(e=se(e)),o=e.split(`/`);o.length>1&&m(o)===``;)o.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&o.push(r):o=[r]:r===`..`?o.length>1?o.pop():o=[``]:r===`.`||o.push(r)}}o.length>1&&(m(o)===``?n===`never`&&o.pop():n===`always`&&o.push(``));let s=o.join(`/`),c=(i?se(s):s)||`/`;return a&&r&&r.set(a,c),c}function pe(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=new RegExp([...t.keys()].join(`|`).replace(/[.*()]/g,`\\$&`),`g`);return e=>e.replace(n,e=>t.get(e)??e)}function me(e){return e==null||e===``}function he(e,t,n){if(typeof t!=`string`)return``+(t??void 0);let r=e===`_splat`;if(r&&(!t||/^[a-zA-Z0-9\-._~!/]*$/.test(t)))return t;let i=encodeURIComponent(t);return r&&(i=i.replaceAll(`%2F`,`/`)),n?n(i):i}function ge(e,t,n,r,i){let a=e.endsWith(`/`)?`/`:``,o=``;for(let e of t){if(typeof e==`string`){o+=e;continue}let[t,s,c,l]=e,u=t===2,d=u&&l!==void 0?l+a:l,f=n[s];if(t!==3||f!=null){if(i&&(i[s]=f,u&&(i[`*`]=f)),u&&me(f)){if(c===`/`&&!d)continue;f=``}o+=c+he(s,f,r)+(d||``)}}return o+a||`/`}function _e(e){return e?.isNotFound===!0}function ve(){try{return sessionStorage}catch{return}}var ye=`tsr-scroll-restoration-v1_3`,be=ve();function xe(){try{return JSON.parse(be?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}var D=xe(),O=`data-scroll-restoration-id`,Se=e=>e.state.__TSR_key||e.href;function Ce(e){let t=e.getAttribute(O);if(t)return`[${O}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var we=!1,Te=`window`;function Ee(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function De(e){let t=new Set;for(let n of e){if(n===Te)continue;let e=Ee(n);e&&t.add(e)}return t}function Oe(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.e=!0);let i=e.options.getScrollRestorationKey||Se,a=new Set,o=e=>{let t=D[e]||={};for(let e of a)e===document?t[Te]={scrollX,scrollY}:e.isConnected&&(t[Ce(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.s&&(r.s=!0,we=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{we||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{history.scrollRestoration=`auto`,o(i(e.stores.resolvedLocation.get()??e.stores.location.get()));try{be?.setItem(ye,JSON.stringify(D))}catch{}}),addEventListener(`pageshow`,e=>{e.persisted&&(history.scrollRestoration=`manual`)})),!r.r&&(r.r=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.n,c=r.h,l;if(a.clear(),r.n=!0,r.h=!1,typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let u=i(t.toLocation),d=t.fromLocation&&i(t.fromLocation);if(r.e&&d&&d!==u){let e=D[d];if(e){let t=D[u];for(let n in e){if(n===Te){if(s)continue}else{let e=Ee(n);if(!e||s&&o&&(l??=De(o),l.has(e)))continue}t||=D[u]={},t[n]??=e[n]}}}we=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=De(o));let t=e&&i&&c,s=r.e?D[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===Te){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=Ee(e);t&&(t.scrollLeft=r,t.scrollTop=i,l?.delete(t))}}if(!e){let e={top:0,left:0,behavior:n};if(a||scrollTo(e),l)for(let t of l)t.scrollTo(e)}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{we=!1}}))}function ke(e,t=String){let n;for(let r in e){let i=e[r];i!==void 0&&(n||=new URLSearchParams).set(r,t(i))}return n?n.toString():``}function Ae(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function je(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=Ae(r):Array.isArray(t)?t.push(Ae(r)):n[e]=[t,Ae(r)]}return n}var Me=/^(?:\s|["[{\d-]|fa|nu|tr)/,Ne=Fe(JSON.parse),Pe=Ie(JSON.stringify,JSON.parse);function Fe(e){let t=e===JSON.parse;return n=>{n[0]===`?`&&(n=n.slice(1));let r=je(n);for(let n in r){let i=r[n];if(typeof i==`string`){if(t&&!Me.test(i))continue;try{r[n]=e(i)}catch{}}}return r}}function Ie(e,t){let n=t===JSON.parse;function r(r){if(r&&typeof r==`object`)try{return e(r)}catch{}else if(t&&typeof r==`string`){if(n&&!Me.test(r))return r;try{return t(r),e(r)}catch{}}return r}return e=>{let t=ke(e,r);return t?`?${t}`:``}}var Le=`__root__`;function Re(e){e.statusCode=e.statusCode||e.code||307;let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function ze(e){return e instanceof Response&&!!e.options}function Be(e){let t=new Map,n,r;return{get(e){let n=t.get(e);if(n)return n.visited=!0,n.value},set(i,a){let o=t.get(i);if(o){o.value=a;return}if(t.size>=e){let e=n?.next().value;for(;!e||e.visited;)e?e.visited=!1:n=t.values(),e=n.next().value;e===r&&(n=void 0),t.delete(e.key)}let s={key:i,value:a,visited:!1};r=s,t.set(i,s)},clear(){t.clear(),n=void 0,r=void 0}}}var Ve=4,He=5;function Ue(e){let t=e.names;if(t)return t;let n=[];for(let t of e)typeof t!=`string`&&n.push(t[1]);return e.names=n}function We(e,t,n){let r=e.slice(t,n);if(r.charCodeAt(0)===36)return r.length===1?[2,`_splat`,``,void 0]:[1,r.slice(1),``,``];let i=r.indexOf(`{`);if(i>=0){let a=r.indexOf(`}`,i),o=r.charCodeAt(i+1)===45,s=i+(o?3:2);if(a>=0&&r.charCodeAt(s-1)===36&&(!o||s<a)){let c=r.slice(s,a);return[o?3:c?1:2,c||`_splat`,r.slice(0,i),e.slice(t+a+1,c?n:e.length)]}}return r}function Ge(e,t,n,r,i,a){let o=n,s=t.fullPath??t.from,c=t.options,l=s.length,u=s.endsWith(`/`)?l-1:l,d=c?.caseSensitive??e,f=c?.params?.parse??c?.parseParams,p,h=a?n-1:0;if(!r||s.includes(`$`)){p=a?.slice()??[];let e=m(p);e&&typeof e!=`string`&&e[0]===2&&(p[p.length-1]=[e[0],e[1],e[2],e[3]===void 0?void 0:e[3]+s.substring(n-(s[n-2]===`/`?2:1),u)],h=l)}for(;o<l;){let e=o,t=s.indexOf(`/`,e),n=t===-1?l:t,a=We(s,e,n);o=n+1;let c;if(typeof a==`string`){if(!r)continue;let e=a,t;d?t=r.static??=new Map:(e=a.toLowerCase(),t=r.staticInsensitive??=new Map);let n=t.get(e);if(n)c=n;else{let n=qe(r);c=n,t.set(e,n)}}else{let t=a[0],m=a[2],g=a[3]??``;if(t===2&&(n=l,o=n+1),p&&h<n&&(h<e-1&&p.push(s.slice(h,e-1)),a[2]=`/`+m,t===2&&a[3]!==void 0&&u<l&&(a[3]=g.slice(0,-1)),p.push(a),h=n),!r)continue;let _=d&&!!(m||g);d||(m=m.toLowerCase(),g=g.toLowerCase());let v=t===1?r.dynamic??=[]:t===3?r.optional??=[]:r.wildcard??=[],y=t!==2&&!f&&v.find(e=>!e.parse&&e.caseSensitive===_&&e.prefix===m&&e.suffix===g);if(y)c=y;else{let e=qe(r,t,_,m,g);c=e,v.push(e),v.length===2&&i?.push(v)}}r=c}p&&h<u&&p.push(s.slice(h,u));let g=p?.slice();if(!r)return g;if(f&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf(`/`)+1)===95){let e=qe(r,He);(r.pathless??=[]).push(e),r=e}let _=(t.path||!t.children)&&!t.isRoot;if(_&&u<l){let e=qe(r,Ve);r.index=e,r=e}return r.parse=f??null,r.priority=c?.params?.priority??0,r.route||(r.data=g,_&&(r.route=t)),[r,o,g]}function Ke(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function qe(e,t=0,n,r,i){return{kind:t,depth:e?e.depth+1:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,data:void 0,parent:e,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function Je(e,t){let n=qe(),r=[];function i(e,t,n,a){let[o,s,c]=Ge(!1,e,t,n,r,a);if(e.children)for(let t of e.children)i(t,s,o,c)}for(let t of e)i(t,1,n);for(let e of r)e.sort(Ke);t.masksTree=n,t.flatCache=Be(1e3)}function Ye(e,t){e||=`/`;let n=t.flatCache.get(e);if(n!==void 0)return n;let r=$e(e,t.masksTree);return t.flatCache.set(e,r),r}function Xe(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=qe(),Ge(t,{from:e},1,o),i.singleCache.set(a,o)),$e(r,o,n)}function Ze(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=$e(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=tt(a.route)),t.matchCache.set(r,a),a}function Qe(e,t=!1){let n=qe(),r=[],i={},a={},o=0;function s(e,n,c,l){if(e.init(o),e.id in i&&oe(),i[e.id]=e,o!==0&&e.path){let t=le(e.fullPath);(!a[t]||e.fullPath.endsWith(`/`))&&(a[t]=e)}o++;let[u,d,f]=Ge(t,e,n,c,r,l);if(e._interpolation=f,e.children)for(let t of e.children)s(t,d,u,f)}s(e,1,n);for(let e of r)e.sort(Ke);return{processedTree:{segmentTree:n,singleCache:Be(1e3),matchCache:Be(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:a}}function $e(e,t,n=!1){let r=e.split(`/`),i=rt(e,r,t,n);if(!i)return null;let[a]=et(e,r,i);return{route:i.node.route,rawParams:a}}function et(e,t,n){let r=nt(n.node),i=n.node.data&&Ue(n.node.data),a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.param??0;for(;s<r.length;o++,s++,c++){let u=r[s];if(u.kind===Ve)break;if(u.kind===He){o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1||u.kind===3){let e=i[l++];if(u.kind===3&&n.skipped&1<<s){o--,c=f-1;continue}let t=u.suffix||u.prefix?d.substring(u.prefix.length,d.length-u.suffix.length):d;(t||u.kind===1)&&(a[e]=decodeURIComponent(t))}else if(u.kind===2){let t=u,n=e.substring(f+t.prefix.length,e.length-t.suffix.length),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,param:l}]}function tt(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function nt(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function rt(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!m(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],c=null,l=null;for(;s.length;){let n=s.pop(),{node:i,index:u,skipped:d,statics:f,dynamics:p,optionals:m}=n,{extract:h,rawParams:g}=n;if(i.kind===2&&i.route&&!st(l,n))continue;if(i.parse){if(!ot(e,t,n))continue;g=n.rawParams,h=n.extract}r&&i.route&&i.kind!==Ve&&st(c,n)&&(c=n);let _=u===o;if(_&&(i.route&&(!a||i.kind===Ve||i.kind===2)&&st(l,n)&&(l=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let v=_?void 0:t[u],y;if(_&&i.index){let n={node:i.index,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g},r=!0;if(i.index.parse&&(ot(e,t,n)||(r=!1)),r){if(!p&&!m&&!d&&at(f,o))return n;st(l,n)&&(l=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!r||!_&&(n.caseSensitive?v:y??=v.toLowerCase()).startsWith(r)){if(a){if(_)continue;let e=t.slice(u).join(`/`),i=e.slice(-a.length);if((n.caseSensitive?i:i.toLowerCase())!==a||e.length-a.length<r.length)continue}s.push({node:n,index:o,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(i.optional){let e=d|1<<i.depth+1;for(let t=i.optional.length-1;t>=0;t--){let n=i.optional[t];s.push({node:n,index:u,skipped:e,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_)for(let e=i.optional.length-1;e>=0;e--){let t=i.optional[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p,optionals:m+it(o,u),extract:h,rawParams:g})}}if(!_&&i.dynamic&&v)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p+it(o,u),optionals:m,extract:h,rawParams:g})}if(!_&&i.staticInsensitive){let e=i.staticInsensitive.get(y??=v.toLowerCase());e&&s.push({node:e,index:u+1,skipped:d,statics:f+it(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_&&i.static){let e=i.static.get(v);e&&s.push({node:e,index:u+1,skipped:d,statics:f+it(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(i.pathless)for(let e=i.pathless.length-1;e>=0;e--){let t=i.pathless[e];s.push({node:t,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(l)return l;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function it(e,t){return 2**(e-t-1)}function at(e,t){return e===2**(t-1)-1}function ot(e,t,n){let r,i;try{[r,i]=et(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function st(e,t){return!e||t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Ve)>(e.node.kind===Ve)||t.node.kind===Ve==(e.node.kind===Ve)&&t.node.depth>e.node.depth)))}function ct(e,t,n){let r=ue(e),i=`/${r}`,a=t?i:i.toLowerCase(),o=`${a}/`,s={input:({url:e})=>{let n=t?e.pathname:e.pathname.toLowerCase();return n===a?e.pathname=`/`:n.startsWith(o)&&(e.pathname=e.pathname.slice(i.length)),e},output:({url:e})=>(e.pathname=se(`/${r}${e.pathname}`),e)};return n?{input:({url:e})=>lt(n,s.input({url:e})),output:({url:e})=>s.output({url:ut(n,e)})}:s}function lt(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function ut(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function dt(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i}=t,a=new Map,o=n(`idle`),s=n(e),c=n(void 0),l=n([]),u=r(()=>l.get().map(e=>a.get(e).get())),d=r(()=>({status:o.get(),isLoading:o.get()===`pending`,matches:u.get(),location:s.get(),resolvedLocation:c.get()}));function f(e){let t=a.get(e);return t||(t=n(void 0),a.set(e,t)),t}let p={status:o,location:s,resolvedLocation:c,ids:l,matches:u,byRoute:a,__store:d,getMatchStore:f,setMatches:m};function m(e){let t=l.get(),n=e.map(e=>e.routeId);i(()=>{ae(t,n)||l.set(n);for(let e of t)n.includes(e)||a.get(e).set(()=>void 0);for(let t of e){let e=f(t.routeId);e.get()!==t&&e.set(t)}})}return p}var ft=`__TSR_index`,pt=`popstate`,mt=`beforeunload`,ht=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function gt(e){let t=ht.exec(e);return t?`/`+e.slice(t[0].length):e}function _t(e){return/[\x00-\x1f\x7f]/.test(e)&&(e=e.replace(/[\x00-\x1f\x7f]/g,e=>`
|
|
2
|
+
\r`.includes(e)?``:encodeURIComponent(e))),gt(e)}function vt(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async n=>{let r=n.navigateOpts?.ignoreBlocker?void 0:e.getBlockers?.();if(typeof document<`u`&&r?.length&&(n.type===`PUSH`||n.type===`REPLACE`))for(let i of r){let r=xt(n.path,n.state);if(await i.blockerFn({currentLocation:t,nextLocation:r,action:n.type})){e.onBlocked?.();return}}n.task()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[ft];i=yt(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[ft];i=yt(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t,n?.ignoreBlocker??!1),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[ft]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r,_getBlockers:()=>e.getBlockers?.()??[]}}function yt(e,t){let n=St();return{...t,key:n,__TSR_key:n,[ft]:e}}function bt(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=t=>_t(e?.createHref?e.createHref(t):t),c=e?.parseLocation??(()=>xt(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=St();t.history.replaceState({[ft]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_=()=>{g&&(S._ignoreSubscribers=!0,(g[2]?t.history.pushState:t.history.replaceState)(g[1],``,g[0]),S._ignoreSubscribers=!1,g=void 0,u=void 0)},v=(t,n,r)=>{let i=e?.createHref?s(n):void 0,a=!!g;a||(u=l),l=xt(n,r),g=[i??l.href,r,g?.[2]||t],a||queueMicrotask(()=>_())},y=e=>{l=c(),S.notify({type:e})},b=async()=>{if(m=!1,f){f=!1;return}let e=c(),n=e.state[ft]-l.state[ft],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let r=a();if(typeof document<`u`&&r.length){for(let i of r)if(await i.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(-n),S.notify(u);return}}}l=c(),S.notify(u)},x=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0||typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},S=vt({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>v(!0,e,t),replaceState:(e,t)=>v(!1,e,t),back:e=>(e&&(p=!0,m=!0),t.history.back()),forward:e=>{e&&(p=!0,m=!0),t.history.forward()},go:(e,n)=>{d=!0,n&&(p=!0,m=!0),t.history.go(e)},createHref:s,flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(mt,x,{capture:!0}),t.removeEventListener(pt,b)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return S._ignoreNextBeforeUnload=e=>{m=!1;try{e=new URL(e,t.document.baseURI).href,m=/^https?:/.test(e)&&(!e.includes(`#`)||e.split(`#`)[0]!==t.location.href.split(`#`)[0])}catch{}},t.addEventListener(mt,x,{capture:!0}),t.addEventListener(pt,b),t.history.pushState=function(...e){let r=n.apply(t.history,e);return S._ignoreSubscribers||y(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return S._ignoreSubscribers||y(`REPLACE`),n},S}function xt(e,t){let n=_t(e),r=n.indexOf(`#`),i=n.indexOf(`?`);if(!t){let e=St();t={[ft]:0,key:e,__TSR_key:e}}return{href:n,pathname:n.slice(0,r>-1?i>-1?Math.min(r,i):r:i>-1?i:n.length),hash:r>-1?n.slice(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t}}function St(){return(Math.random()+1).toString(36).slice(7)}function Ct(e,t){return e.protocol!==`http:`&&e.protocol!==`https:`||e.origin!==t||!!e.username||!!e.password}function wt(e){return e.pathname+e.search+e.hash}function Tt(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function Et(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function Dt({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function Ot(e){return e.findIndex(e=>e.status===`error`||e.status===`notFound`||e._notFound)+1}function kt(e,t,n,r,i,a){r&&(t=t.slice(0,r)),i&&(n=n.slice(0,i));for(let r of t){if(a&&e._tx!==a)return;n.some(e=>e.routeId===r.routeId)||e.routesById[r.routeId].options.onLeave?.(r)}for(let r of n){if(a&&e._tx!==a)return;e.routesById[r.routeId].options[t.some(e=>e.routeId===r.routeId)?`onStay`:`onEnter`]?.(r)}}var At=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={n:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async e=>(e(),!1),this.update=e=>{let t=this.options;this.options={...t,...e},this.isServer=this.options.isServer??!1??typeof document>`u`,this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history?this.options.history:bt()),this.origin=this.options.origin,this.origin||=window?.origin&&window.origin!==`null`?window.origin:`http://localhost`;let n=this.options.basepath??`/`,r=this.options.rewrite,i=this.basepath!==n||t?.rewrite!==r||t?.caseSensitive!==this.options.caseSensitive;if(i&&(this.basepath=n,this.rewrite=n!==`/`&&ue(n)?ct(n,this.options.caseSensitive,r):r),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;e=this.buildRouteTree(),this.setRoutes(e)}if(this.stores)i&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=dt(this.latestLocation,e),Oe(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=Qe(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&Je(this.options.routeMasks,e.processedTree),{...e,resolvePathCache:Be(1e3)}},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{for(let t of this.subscribers)if(t.eventType===e.type)try{t.fn(e)}catch(e){console.error(e)}},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i},a)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:E(e),external:!1,searchStr:o,search:y(t?.search,i),hash:E(r.slice(1)),state:b(t?.state,a)}}let o=lt(this.rewrite,new URL(i,this.origin)),s=this.options.parseSearch(o.search),c=this.options.stringifySearch(s);return o.search=c,{href:o.href.replace(o.origin,``),publicHref:i,pathname:E(gt(o.pathname)),external:!!this.rewrite&&Ct(o,this.origin),searchStr:c,search:y(t?.search,s),hash:E(o.hash.slice(1)),state:b(t?.state,a)}},r=n(e,e.state),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i,{...i.state,__tempLocation:void 0,key:r.state.key,__TSR_key:r.state.__TSR_key});return e.maskedLocation=r,e}return r},this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>{let t=Object.create(null),n=Ze(le(e),this.processedTree,!0);return n&&Object.assign(t,n.rawParams),[n?.branch||[this.routesById.__root__],t,n?.route]},this.buildLocation=e=>{{let t=this.staticLocations.get(e);if(t)return t}let t=!1,n=(n={})=>{if(n.href){let e=xt(n.href,{});n={...n,to:lt(this.rewrite,new URL(e.pathname,this.origin)).pathname,search:this.options.parseSearch(e.search),hash:e.hash.slice(1)}}let r=e._fromLocation||this._pendingLocation||this.latestLocation,i,a=()=>(t=!0,r),o=()=>i??=this.matchRoutesLightweight(a()),s=n.to?`${n.to}`:`.`,c=fe(s[0]===`/`?``:n.unsafeRelative===`path`?a().pathname:n.from??o()[1],s,this.options.trailingSlash,this.resolvePathCache),l=this.routesByPath[le(c)],u=c.includes(`$`),d;if(l)d=l._branch??=tt(l);else if(u)d=[];else{let[e,t,n]=this.getMatchedRoutes(c);d=e,this.options.notFoundRoute&&(!n||n.path!==`/`&&t[`**`])&&(d=[...d,this.options.notFoundRoute])}let f=u?l?._interpolation??Ge(!1,{fullPath:c},0):void 0,p;for(let e of d){let t=e.options.params?.stringify??e.options.stringifyParams;if(t){let e=o()[3];if(p??=Ft(n.params,e),!_(p))break;p===e&&(p=Object.assign(v(),p));try{Object.assign(p,t(p))}catch{}}}p??=Ft(n.params,It(n.params,f)?o()[3]:Lt);let m=e.leaveParams?c:gt(E(f?ge(c,f,p,this.pathParamsDecoder):c)),h=Rt(d,e._includeValidateSearch),g=()=>{let t=o()[2];if(e._includeValidateSearch&&this.options.search?.strict){let e={};d.forEach(n=>{if(n.options.validateSearch)try{Object.assign(e,Pt(n.options.validateSearch,{...e,...t}))}catch{}}),t=e}return t},y=h.length?zt(h,g(),n):n.search===!0?g():typeof n.search==`function`?n.search(g()):n.search||Lt,b=this.options.stringifySearch(y),x=n.hash===!0?a().hash:typeof n.hash==`function`?n.hash(a().hash):n.hash||void 0,S=x?`#${x}`:``,C=n.state?n.state===!0?a().state:typeof n.state==`function`?n.state(a().state):n.state:Lt,w=`${m}${b}${S}`,T,ee,te=!1;if(this.rewrite){let e=new URL(w,this.origin),t=e.origin,n=ut(this.rewrite,e);T=wt(e),Ct(n,t)?(ee=n.href,te=!0):ee=gt(wt(n))}else T=ie(w),ee=T;return{publicHref:ee,href:T,pathname:m,search:y,searchStr:b,state:C,hash:x??``,external:te,unmaskOnReload:n.unmaskOnReload}},r=n(e);if(e.mask)r.maskedLocation=n({from:e.from,...e.mask});else if(this.options.routeMasks){let t=Ye(r.pathname,this.processedTree);if(t){let i=Object.assign(v(),t.rawParams),{from:a,params:o,...s}=t.route,c=Ft(o,i);r.maskedLocation=n({from:e.from,...s,params:c})}}return!t&&e._fromLocation&&this.staticLocations.set(e,r),r},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r=n.maskedLocation??n;if(r.external)return jt(this,r.publicHref,{replace:n.replace,ignoreBlocker:t});let i,a=le(this.latestLocation.href)===le(n.href)&&S(Dt(n.state),Dt(this.latestLocation.state)),o=this._commitPromise,s,c=new Promise(e=>{s=e});if(c.resolve=()=>{s(),o?.resolve()},this._commitPromise=c,a)this.load();else{let{maskedLocation:r,hashScrollIntoView:a,...o}=n;r&&(o={...r,state:{...r.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state={...o.state,__hashScrollIntoViewOptions:a??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=e,i=n.replace?`REPLACE`:`PUSH`,this.history[i===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t}),this.history.subscribers.size||this.load({action:{type:i}})}return this._scroll.n=n.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,...a}={})=>{let o=this.buildLocation({...a,_includeValidateSearch:!0});this._pendingLocation=o;let s=this.commitLocation({...o,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return queueMicrotask(()=>{this._pendingLocation===o&&(this._pendingLocation=void 0)}),s},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=n?te(n):void 0;if(a||t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i}),a=t.maskedLocation??t;n??=a.publicHref,r??=a.publicHref}let t=!a&&r?r:n;return jt(this,t,i)}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.load=async e=>{this.updateLatestLocation(),e?.action&&(this._scroll.h=e.action.type===`PUSH`||e.action.type===`REPLACE`),await Nn(this,e)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&window.CSS?.supports?.(`selector(:active-view-transition-type(a))`)){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(Et(r,i)):t.types;if(a===!1)return e();n={update:e,types:a}}else n=e;return document.startViewTransition(n).updateCallbackDone}return e()},this.invalidate=e=>{let t=this._committed,n=e?.filter,r=this._preloads,i=new Set,a=e=>{(!n||n(e))&&i.add(e.id)};t.forEach(a),this._cache.forEach(a),r?.forEach(e=>e.forEach(a)),this._tx?.[3].forEach(a);let o=[];for(let[e,t]of r??[])t.some(e=>i.has(e.id))&&(r.delete(e),o.push(e));let s=t=>{if(i.has(t.id)){let n=this.routesById[t.routeId],r={...t,invalid:!0,...(e?.forcePending||t.status===`error`||t.status===`notFound`)&&Tt(n)?{status:`pending`,error:void 0}:void 0};return t._flight=void 0,r}return t};this._committed=t.map(s);for(let[t,n]of this._cache)i.has(t)&&(n.invalid=!0,e?.forcePending&&(n.status=`pending`));for(let e of i){let t=this._flights?.get(e);this._flights?.delete(e),t&&!t[2]&&o.push(t[1])}for(let e of o)e.abort();return this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{let t=e.options,n=e.headers.get(`Location`)||t.href;if(!n){let e=this.buildLocation(t);n=(e.maskedLocation??e).publicHref||`/`}let r;if(ne.test(n)||(r=te(n))&&!this.protocolAllowlist.has(r))throw Error(`Redirect blocked: unsafe protocol`);if(r===`http:`||r===`https:`){let e=new URL(n);e.pathname.startsWith(`//`)?n=e.href:Ct(e,this.origin)||(n=wt(e),r=void 0)}return r&&(t.reloadDocument=!0),t.href=n,e.headers.set(`Location`,n),e},this.clearCache=e=>{let t=this._cache,n=this._preloads,r=e?.filter,i=[],a=[];for(let[e,n]of t)(!r||r(n))&&(a.push(e),i.push(n));let o=[];for(let[e,t]of n??[])(!r||t.some(r))&&(o.push(e),i.push(...t));for(let e of a)t.delete(e);for(let e of o)n.delete(e);for(let e of i){let t=e._flight;e._flight=void 0,t&&!--t[2]&&(this._flights?.get(e.id)===t&&this._flights.delete(e.id),o.push(t[1]))}for(let e of o)e.abort()},this.loadRouteChunk=Wt,this.preloadRoute=e=>Pn(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?fe(e.from||``,e.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n),i=this.stores.status.get()===`pending`;if(t?.pending&&!i)return!1;let a=t?.pending??!i?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=Xe(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!S(o.rawParams,e.params,!0)?!1:t?.includeSearch??!0?S(a.search,r.search,!0)?o.rawParams:!1:o.rawParams},this.getStoreConfig=t,e.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=pe(e.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??Pe,parseSearch:e.parseSearch??Ne,protocolAllowlist:e.protocolAllowlist??ee}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(e){Object.assign(this,e),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;let t=this.options.notFoundRoute;t&&(t.init(99999999999),this.routesById[t.id]!==t&&(t._interpolation=Ge(!1,t,0)),this.routesById[t.id]=t)}matchRoutesInternal(e,t){let[n,r,i]=this.getMatchedRoutes(e.pathname),a=n,o=!1;(i?i.path!==`/`&&r[`**`]:le(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?Bt(this.options.notFoundMode,a):void 0,c=Array(a.length),l=this._committed,u=(e,t)=>{let n=l[t];return n?.routeId===e.id?n:e===this.options.notFoundRoute?l.find(t=>t.routeId===e.id):void 0},d;for(let n=0;n<a.length;n++){let i=a[n],o=c[n-1],l,f,p;{let n=o?.search??e.search,r=o?._strictSearch??void 0;try{let e=Pt(i.options.validateSearch,{...n})??void 0;l={...n,...e},f={...r,...e}}catch(e){let r=e;if(e instanceof Mt||(r=new Mt(e.message,{cause:e})),t?.throwOnError)throw r;l=n,f={},p=r}}let m=``,h=``;try{m=i.options.loaderDeps?.({search:l})??``,h=m&&JSON.stringify(m)||``}catch(e){if(t?.throwOnError)throw e;p??=e}let g=v(),_=i._interpolation?ge(i.fullPath,i._interpolation,r,this.pathParamsDecoder,g):i.fullPath,x=i.id+_+h,S=u(i,n),C=this._cache.get(x)??(S?.id===x?S:void 0);d=C?._strictParams??Object.assign(g,d);let w;if(!C)try{Vt(i,d)}catch(e){if(w=_e(e)||ze(e)?e:new Nt(e.message,{cause:e}),t?.throwOnError)throw w}let T=S?`stay`:`enter`,ee;if(C)ee={...C,cause:T,search:y(S?S.search:C.search,l),_strictSearch:f,searchError:p};else{let e=Tt(i)?`pending`:`success`;ee={id:x,ssr:i.options.ssr,index:n,routeId:i.id,params:S?.params??d,_strictParams:d,pathname:_,updatedAt:Date.now(),search:S?y(S.search,l):l,_strictSearch:f,searchError:p,status:e,isFetching:!1,error:void 0,paramsError:w,context:{},abortController:t?._controller??new AbortController,cause:T,loaderDeps:S?b(S.loaderDeps,m):m,invalid:!1,preload:!1,staticData:i.options.staticData||{},fullPath:i.fullPath}}let te=s===i.id;ee._notFound&&!te&&(ee.error=void 0),ee._notFound=te,c[n]=ee}for(let e=0;e<c.length;e++){let n=c[e];n.params=n.cause===`stay`?y(n.params,d):d,t?._controller&&(n.context={})}return c}matchRoutesLightweight(e){let t=m(this.stores.ids.get()),n=t?this.stores.byRoute.get(t).get():void 0,r=n?.id,i=this.lightweightCache.get(e);if(i&&i[0]===r)return i[1];let[a,o]=this.getMatchedRoutes(e.pathname),s=m(a),c={...e.search};for(let e of a)try{Object.assign(c,Pt(e.options.validateSearch,c))}catch{}let l=n&&n.routeId===s.id&&n.pathname===e.pathname,u;if(l)u=n.params;else{let e=o;for(let t of a)try{Vt(t,e)}catch{}u=e}let d=[a,s.fullPath,c,u];return this.lightweightCache.set(e,[r,d]),d}};async function jt(e,t,{replace:n,ignoreBlocker:r}){if(!re(t,e.protocolAllowlist)){if(!r){let t=e.history._getBlockers();for(let r of t)if(r?.blockerFn&&await r.blockerFn({currentLocation:e.history.location,nextLocation:e.history.location,action:n?`REPLACE`:`PUSH`}))return}e.history._ignoreNextBeforeUnload?.(t),n?window.location.replace(t):window.location.href=t}}var Mt=class extends Error{},Nt=class extends Error{};function Pt(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new Mt(`Async validation not supported`);if(n.issues)throw new Mt(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function Ft(e,t){if(e===void 0||e===!0)return t;let n=Object.create(null);return e===!1||e===null?n:typeof e==`function`?(Object.assign(n,t),Object.assign(n,e(n))):Object.assign(n,t,e)}function It(e,t){return typeof e==`function`?!0:!t||e===!1||e===null?!1:e===void 0||e===!0||t.some(t=>typeof t!=`string`&&!g.call(e,t[1]))}var Lt=Object.freeze({});function Rt(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r].options;`search`in i?i.search?.middlewares&&n.push(...i.search.middlewares):(i.preSearchFilters||i.postSearchFilters)&&n.push(({search:e,next:t})=>{let n=t(i.preSearchFilters?i.preSearchFilters.reduce((e,t)=>t(e),e):e);return i.postSearchFilters?i.postSearchFilters.reduce((e,t)=>t(e),n):n});let a=i.validateSearch;t&&a&&n.push(({search:e,next:t,meta:n})=>{let r=t(e);try{let e=Pt(a,r);if(n&&e)for(let t in e)t in r||(n.defaulted||=new Map).set(t,e[t]);return{...r,...e}}catch{}return r})}return n}function zt(e,t,n){let r=(t,i,a)=>{if(t>=e.length){if(!n.search)return{};if(n.search===!0)return i;let e=h(n.search,i);return a&&(a.explicit=e),e}return e[t]({search:i,next:(e,n)=>{if(n){let n=a||{};return{search:r(t+1,e,n),meta:n}}return r(t+1,e,a)},meta:a})};return r(0,t)}function Bt(e,t){if(e!==`root`){let e;for(let n=t.length-1;n>=0;n--){let r=t[n];if(r.options.notFoundComponent)return r.id;e||=r.children&&r.id}if(e)return e}return Le}function Vt(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function Ht(e,t){return e.options[t]?.preload?.()}function Ut(e,t){let n=Ht(e,`component`),r=Ht(e,`pendingComponent`);return t&&(r?r=r.then(t):t()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}function Wt(e,t,n){let r=()=>t===!1?void 0:t?Ht(e,t):Ut(e,n),i=e._lazy;if(i)return i===!0?r():i.then(r);if(!e.lazyFn)return r();let a=e.lazyFn().then(t=>{{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazy=!0}},t=>{throw e._lazy=void 0,t});return e._lazy=a,a.then(r)}function Gt(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&t<e.length?e.slice(0,t):e}function Kt(e,t,n){let r=e._tx;return t&&r?.[2]===n&&!r[3].some(e=>e.routeId===t)}var qt=0,Jt=1,Yt=2,Xt=3,Zt=[4];function Qt(e){return typeof e[0]==`number`}function $t(e,t){return t.aborted?Promise.race([Promise.reject(t),e]):new Promise((n,r)=>{let i=()=>r(t);t.addEventListener(`abort`,i,{once:!0}),Promise.resolve(e).then(n,r).then(()=>t.removeEventListener(`abort`,i))})}function en(e,t){return e.routesById[t.routeId]}function tn(e,t,n){return ze(e)?[Xt,e]:_e(e)?(e.routeId||=n,[Yt,e]):t?(typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),[Jt,e]):[qt,e]}function nn(e,t){let n=tn(t,!0,e.id);if(n[0]!==Jt)return n;try{e.options.onError?.(n[1])}catch(t){n=tn(t,!0,e.id)}return n}function rn(e,t,n,r,i){return i[0].signal.aborted?Zt:bn(e,t,n,nn(n,r),i)}async function an(e,t,n,r,i,a){let[o,s]=t,c=n[0].signal,l=!!n[3];for(let i=n[6]??0;i<r;i++){let r=s[i],u=en(e,r);r.abortController=n[0];let d=s[i-1]?.context??e.options.context??{},f={params:r.params,location:o,navigate:t=>e.navigate({...t,_fromLocation:o}),buildLocation:e.buildLocation,cause:l?`preload`:r.cause,abortController:n[0],preload:l,matches:s,routeId:u.id};try{let e=r._ctx||=u.options.context?u.options.context({...f,deps:r.loaderDeps,context:d})||{}:void 0;r.context={...d,...e}}catch(a){return sn(e,r),[i,rn(e,t,u,a,n)]}if(c.aborted)return[i,Zt];let p=r.paramsError??r.searchError;if(p!==void 0)return sn(e,r),[i,rn(e,t,u,p,n)];let m=u.options.beforeLoad;if(!m)continue;let h=r.status;i>=a&&(r.status=`pending`,n[7]?.());try{un(e,r,`beforeLoad`,n[0]);let a=m({...f,search:r.search,context:r.context,...e.options.additionalContext}),o=await(typeof a?.then==`function`?$t(a,c):a);if(c.aborted)return[i,Zt];let s=bn(e,t,u,tn(o,!1,u.id),n);if(s[0]!==qt)return sn(e,r),[i,s];r.context={...r.context,...o}}catch(a){return sn(e,r),[i,rn(e,t,u,a,n)]}finally{r.status=h,un(e,r,!1,n[0])}}i()}function on(e,t,n){if(!(!n||--n[2])){if(e._flights?.get(t.id)===n){let n=e._tx;if(n&&!n[0].signal.aborted&&!n[3].includes(t)&&n[3].some(e=>e.id===t.id)&&n[3].some(e=>e.isFetching===`beforeLoad`))return;e._flights.delete(t.id)}return n[1]}}function sn(e,t){let n=t._flight;t._flight=void 0,on(e,t,n)?.abort()}function cn(e,t,n,r){let i=[];for(let a of t)if(!n?.includes(a)){let t=a._flight;if(a._flight=void 0,r&&t?.[2]===1&&e._flights?.get(a.id)===t&&n?.some(e=>e.id===a.id))t[2]=0;else{let n=on(e,a,t);n&&i.push(n)}}for(let e of i)e.abort()}function ln(e){for(let t of e){let e=t._flight;e&&e[2]++}}function un(e,t,n,r){if(t.isFetching=n,r&&e._tx?.[0]!==r)return;let i=e.stores.byRoute.get(t.routeId),a=i?.get();a?.id===t.id&&i.set({...a,isFetching:n})}function dn(e,t,n,r,i,a,o){let s=t[0];return{params:n.params,location:s,navigate:t=>e.navigate({...t,_fromLocation:s}),cause:o?`preload`:n.cause,abortController:i,preload:o,deps:n.loaderDeps,parentMatchPromise:a,context:n.context,route:r,...e.options.additionalContext}}async function fn(e,t,n,r,i,a,o){let s=o[0],c=s.signal;if(c.aborted)return Zt;if(!i)return[qt,void 0];let l=n._flight;un(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(dn(e,t,n,r,s,a,!!o[3]))).then(e=>tn(e,!1,r.id),e=>tn(e,!0,r.id)).then(t=>(t[0]!==qt&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===Jt&&l[2]?nn(r,t[1]):t)),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],bn(e,t,r,await $t(l[0],c),o)}catch(t){if(t!==c||!c.aborted)throw t;return sn(e,n),Zt}finally{un(e,n,!1,s)}}function pn(e,t,n){t[0]!==Xt&&(e.status=`success`,e.error=void 0,t[0]===qt?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function mn(e,t,n){let r=e._cache.get(t.id);if(r!==n||e._committed.some(e=>e.id===t.id&&e._flight===t._flight))return;let i={...t,_notFound:void 0,context:{}};i._flight&&i._flight[2]++,e._cache.set(t.id,i),r&&sn(e,r)}function hn(e,t){return t[0]===Jt||t[0]===Yt?{...e,status:t[0]===Jt?`error`:`notFound`,error:t[1],_flight:void 0}:e}function gn(e,t,n,r,i,a,o){let s=t[1][n],c=en(e,s),l=!!a[3],u=e._cache.get(s.id),d,f=!1,p;try{if(s.status===`success`&&(d=c.options.shouldReload,typeof d==`function`&&(d=d(dn(e,t,s,c,a[0],i,l))),a[0].signal.aborted&&(p=Zt)),!p){if(s.status!==`success`)f=!0;else{let t=l||s.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;f=!!(s.invalid||d||d===void 0&&Date.now()-s.updatedAt>=t&&(a[5]||s.cause===`enter`||a[2].some(e=>e.routeId===s.routeId&&e.id!==s.id)))}}}catch(n){s.invalid=!0,sn(e,s),p=rn(e,t,c,n,a)}let m=c.options.loader,h=typeof m==`function`,g=h?m:m?.handler,_=!l||c.options.preload!==!1,v=_&&m?e._flights?.get(s.id):void 0;v===s._flight||p?v=void 0:v&&!f&&!l&&d===void 0?f=!0:f||(v=void 0);let y=!(!m||!f||s.status!==`success`||l||a[4]||((h?void 0:m.staleReloadMode)??e.options.defaultStaleReloadMode)===`blocking`),b=f&&_,x=b&&!y&&(s.status!==`success`||!!m),S=n>=o?a[7]:void 0,C=c.lazyFn&&c._lazy!==!0?S:void 0;if(b&&!m&&(s.invalid=!1,s.updatedAt=Date.now()),v&&v[2]++,x){let t=s._flight;s._flight=v,on(e,s,t)?.abort(),n>=o&&(s.status=`pending`),S?.()}b||(s.isFetching=!1);let w=!p&&x?fn(e,t,s,c,g,i,a).then(t=>(pn(s,t,l),t[0]===qt&&(m&&!a[0].signal.aborted&&mn(e,s,u),n>=o&&(s.status=`pending`)),t)):Promise.resolve(p??[qt,s.loaderData]),T=(async()=>{try{let e=Wt(c,void 0,C);e&&await $t(e,a[0].signal)}catch(r){if(!t[1].some((e,t)=>t<=n&&(e.status===`error`||e.status===`notFound`||e._notFound)))return[n,rn(e,t,c,r,a)]}let r=await w;x&&r[0]===qt&&s.status===`pending`&&!a[0].signal.aborted&&(s.status=`success`,S?.())})();if(r.push([n,w,T]),!y)return w.then(e=>hn(s,e));let ee={...s,status:`pending`,preload:!1,_flight:v};s.invalid=!1,s.isFetching=`loader`;let te=fn(e,t,ee,c,g,i,a).then(e=>(s.isFetching=!1,pn(ee,e,!1),e));return(t[2]??=[]).push([n,te,T,ee]),te.then(e=>hn(ee,e))}async function _n(e,t,n,r,i=0){let a=n?.[1][1],o=a?.routeId?t.findIndex(e=>e.routeId===a.routeId):n?.[0]??t.length-1;o<0&&(o=0);for(let n=o;n>=0;n--){let i=en(e,t[n]);try{let e=Wt(i,!1);e&&await $t(e,r)}catch(e){if(e===r&&r.aborted)throw e}if(i.options.notFoundComponent)return n}return a?.routeId?o:i}function vn(e,t){t[2]&&=(cn(e,t[2].map(e=>e[3])),void 0)}async function yn(e,t,n,r){let i;try{await Promise.all(e.map(e=>e[1].then(async t=>{let a=e[0];if(!(r&&a>=await r)){if(t[0]>=Xt)throw[a,t];!i&&t[0]!==qt&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===Xt)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}function bn(e,t,n,r,i,a){for(;r[0]===Xt;){let o=r[1],s=o.options;try{if((s.href||o.headers.has(`Location`))&&(e.resolveRedirect(o),s.reloadDocument)||(s.reloadDocument?i[3]:i[1]>=20))return r;let n=e.buildLocation({...s,_fromLocation:t[0],_includeValidateSearch:!0}),a=n.maskedLocation??n;if(a.external){let t=o.clone();return t.options={...s},t.headers.set(`Location`,a.publicHref),e.resolveRedirect(t),i[3]?[Xt,t]:[Xt,t,a]}return[Xt,o,n]}catch(e){r=a?[Jt,e]:nn(n,e),a=!0}}return r}async function xn(e,t,n,r,i,a){let o=t[1],s=await i,c=!1,l=o.findIndex(e=>e._notFound),u=t=>t[1][0]===Yt?_n(e,o,t,r.signal):t[0],d=l<0?o.length:l;if((s?.[1][0]??0)>=Xt)d=0;else if(s){d=s[2]??=await u(s);for(let e of n){if(e[0]>=d)break;let t=await e[1];if(t[0]!==qt&&t[0]<Xt&&!(`loaderData`in o[e[0]])){s=[e[0],t],d=s[2]=await u(s);break}}}for(let e of n){if(e[0]>=d)break;let t=await e[2];if(t){s=t;break}}if((s?.[1][0]??0)>=Xt){let n=s[1];if(n[0]!==Xt||n[1].options.reloadDocument||n[2])return vn(e,t),n;c=!0,s=[0,[Jt,Error(`Too many redirects`)]]}let f=s?s[2]??await u(s):l;if(f>=0){let i=s?.[1],l=i?.[0],u=o[f],d=i?.[1],p=()=>{i&&(u._notFound=void 0,l===Jt?u.status=`error`:(d.routeId=u.routeId,u.routeId===e.routeTree.id?(u.status=`success`,u._notFound=!0):u.status=`notFound`),u.error=d,u.isFetching=!1)};p(),i||a?.();let m=en(e,u);try{await $t(i?Promise.resolve().then(()=>Wt(m,l===Jt?`errorComponent`:`notFoundComponent`)):Promise.all([Wt(m),Wt(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal&&r.signal.aborted)return vn(e,t),Zt}i?c&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),vn(e,t),cn(e,o),p()):u.status=`success`}return t}async function Sn(e,t,n,r=0,i=t[1].length){let a=t[1];for(let t=r;t<i;t++){let r=a[t],i=en(e,r).options;if(i.head||i.scripts)try{let t={ssr:e.options.ssr,matches:a,match:r,params:r.params,loaderData:r.loaderData},[o,s]=await $t(Promise.all([i.head?.(t),i.scripts?.(t)]),n);r.meta=o?.meta,r.links=o?.links,r.headScripts=o?.scripts,r.styles=o?.styles,r.scripts=s}catch(e){if(e===n&&n.aborted)break;console.error(e)}if(r.status!==`success`||r._notFound)break}return t}async function Cn(e,t,n,r){let i=[t,n],a=r[0].signal,o;try{let t=e.stores.matches.get(),s=n.findIndex(e=>e._notFound);if(e.options.notFoundMode!==`root`&&s>=0){let t=await _n(e,n,void 0,a,s);n[s]._notFound=void 0,n[t]._notFound=!0,s=t}let c=s<0?n.length:s+1,l=0;for(;l<c&&l!==s;){let e=n[l],i=r[2][l],a=t[l];if(i?.id!==e.id||i.status!==`success`||e.preload||a?.id!==e.id||a.status!==`success`||(l++,i._notFound||a._notFound))break}let u=[],d=r[6]??0,f=d?Promise.resolve(n[d-1]):void 0,p=()=>{for(let t=d;t<c&&!a.aborted;t++)f=gn(e,i,t,u,f,r,l)},m=await an(e,i,r,c,p,l);if(m){if(r[4]=!0,c=m[0],m[1][0]===Yt){let t=await _n(e,n,m,a);m[2]=t,c=Math.min(c,t+1)}else m[1][0]>=Xt&&(c=0);p()}if(!a.aborted&&!r[3]){let t=[];for(let[n,r]of e._flights??[])r[2]||(e._flights.delete(n),t.push(r[1]));for(let e of t)e.abort()}let h=xn(e,i,u,r[0],yn(u,m,i[2]),r[7]);i[2]?.length&&(i[3]=yn(i[2],void 0,void 0,h.then(e=>Qt(e)?0:Gt(n).length,()=>0))),o=await h}catch(t){if(vn(e,i),t===a&&a.aborted)return Zt;throw t}return Qt(o)?o:Sn(e,o,a,r[6]===n.length?r[6]:0)}function wn(e,t){if(e._tx!==t)return;let n=t[3],r=e.stores.matches.get(),i=e._pending;for(let a=0;a<n.length;a++){let o=n[a],s=o.status===`success`&&!o._notFound,c=r[a]?.id===o.id&&r[a]?.status===`pending`;if(s&&!c)continue;let l=en(e,o),u=s||o.invalid?0:l.options.pendingMs??e.options.defaultPendingMs,d=l.options.pendingComponent??e.options.defaultPendingComponent;if(!d||typeof u!=`number`||u===1/0){i&&(i[0]=t,i[2]=0,i[4]=!0);return}let f=l.options.pendingMinMs??e.options.defaultPendingMinMs??0,p=!1;if(i?.[1]===o.id?(p=i[0]!==t,i[0]=t):(clearTimeout(i?.[3]),e._pending=i=void 0),i||(e._pending=i=[t,o.id,c?Date.now()+f:t[4]+u,void 0,c||void 0,d]),i[4]&&!p&&i[5]===d)return;if(i[5]=d,!i[4]){clearTimeout(i[3]);let n=i[2]-Date.now();if(n>0){i[3]=setTimeout(()=>wn(e,t),n);return}i[2]=0}let m=n.map(e=>({...e,_flight:void 0}));m[a].status=`pending`;let h=i[4]=e.startTransition(()=>e.stores.setMatches(m),m).then(t=>(t&&e._pending===i&&i[4]===h&&!i[2]&&(i[2]=Date.now()+f),t));return}}function Tn(e,t){let n=e._pending;(e._tx===t||!e._tx?.[3].some(e=>e.id===n?.[1]))&&(clearTimeout(n?.[3]),e._pending=void 0)}async function En(e,t){let n=e._pending;if(!n)return;clearTimeout(n[3]);let r=n[2]-Date.now();if(!n[4]||r<=0||!Gt(t[3]).some(e=>e.id===n[1]))return;let i;try{await $t(new Promise(e=>{i=setTimeout(e,r)}),t[0].signal)}catch{}clearTimeout(i)}function Dn(e,t){e._committed=t,e.stores.setMatches(t)}function On(e,t,n,r){let i=e._committed,a=e._lifecycleEnd,o=e._cache;for(let e of n)e.preload=!1,r&&(e._assetEnd=void 0);let s=Gt(n).length,c=new Map;{let t=Date.now(),r=new Set;for(let e=0;e<n.length;e++){let t=n[e];(e<s||t.status===`success`)&&r.add(t.id)}for(let n of[...i,...o.values()]){if(n.status!==`success`||r.has(n.id))continue;let i=en(e,n);!i.options.loader||t-n.updatedAt>=(n.preload?i.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:i.options.gcTime??e.options.defaultGcTime??3e5)||c.set(n.id,o.get(n.id)===n?n:{...n,_flight:void 0,isFetching:!1,context:{}})}}t[3]=[],e._cache=c;let l=e._lifecycleEnd=Ot(n);Dn(e,n),cn(e,[...o.values(),...i].filter(e=>e._flight&&c.get(e.id)!==e),n),kt(e,i,n,a,l,t)}async function kn(e,t){let n=e._tx;for(;n&&n!==t;)t=n,await n[5],n=e._tx}function An(e,t,n){let r=n[1].options,i=n[2];if(!i)return e.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return e.navigate({href:(i.maskedLocation??i).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});i._redirects=t[1]+1,e._pendingLocation=i;let a=e.commitLocation({...i,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===i&&(e._pendingLocation=void 0)}),a}async function jn(e,t,n,r,i){let a=n.map(e=>({...e}));ln(a);for(let t of r)sn(e,a[t[0]]),a[t[0]]=t[3];let o=[t[2],a],s;try{s=await xn(e,o,r,t[0],i)}catch(t){throw cn(e,a),t}if(Qt(s))cn(e,a),s[0]===Xt&&e._tx===t&&e._committed===n&&await An(e,t,s);else if(await Sn(e,s,t[0].signal),e._tx!==t||e._committed!==n)cn(e,a);else{for(let t of a){let n=e._cache.get(t.id);n?._flight&&n._flight===t._flight&&(e._cache.delete(t.id),sn(e,n))}Dn(e,a),cn(e,n,a)}}async function Mn(e,t,n,r,i,a){let o=await Cn(e,t[2],t[3],[t[0],t[1],e._committed,void 0,i,n,a,r]);if(Qt(o)){let n=o[0]===Xt&&e._tx===t;if((!n||o[1].options.reloadDocument)&&Tn(e,t),cn(e,t[3]),t[3]=[],!n)return;if(e._tx!==t){Tn(e,t);return}await An(e,t,o);return}let s=o[1];if(e._tx===t&&await En(e,t),e._tx!==t){Tn(e,t),cn(e,s),vn(e,o);return}let c=t[2],l=Et(c,e.stores.resolvedLocation.get()),u=o[2];await e.startViewTransition(async()=>{if(e._tx===t&&await En(e,t),e._tx!==t){Tn(e,t),cn(e,s),vn(e,o);return}let n=await e.startTransition(()=>{Tn(e,t),On(e,t,s,a),e._tx===t&&(e.emit({type:`onLoad`,...l}),e._tx===t&&e.emit({type:`onBeforeRouteMount`,...l}))},s);e._tx===t?(u?.length&&jn(e,t,s,u,o[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),e.stores.status.set(`idle`),e._tx===t&&e.emit({type:`onResolved`,...l}),n&&e._tx===t&&e.emit({type:`onRendered`,...l})}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0)):vn(e,o)})}async function Nn(e,t){let n=e._tx,r=e.stores.resolvedLocation.get(),i=r??e.stores.location.get(),a=e.latestLocation,o=e._pendingLocation,s=o?.href===a.href?o._redirects??0:0,c=e._handoff,l=c?.[0](),u=new AbortController,d=e._preflight;if(e._preflight=u,l||c?.[1](),d?.abort(),!u.signal.aborted){let t=Et(a,r);e.emit({type:`onBeforeNavigate`,...t}),u.signal.aborted||e.emit({type:`onBeforeLoad`,...t})}if(u.signal.aborted){await kn(e,n);return}let f=i.href===a.href,p=u,m=e.matchRoutes(a,{_controller:u});ln(m);let h=l?c[1](m):void 0;if(h?p=l:l?.abort(),u.signal.aborted){cn(e,m),await kn(e,n);return}e._preflight=void 0;let g,_=()=>Mn(e,y,f,()=>wn(e,y),t?.sync,h),v=t?.sync?new Promise(e=>g=e):Promise.resolve().then(_),y=[p,s,a,m,Date.now(),v.then(()=>kn(e,y))];if(e._tx=y,n){for(let t of e.stores.matches.get()){if(e._tx!==y)break;t.isFetching&&un(e,t,!1)}n[0].abort(),cn(e,n[3],y[3],!0)}e._tx===y?(e.batch(()=>{e.stores.status.set(`pending`),e.stores.location.set(a)}),(h||!e._committed.length&&m[0]?.status!==`success`&&!m.some(e=>e._notFound))&&wn(e,y),g?.(_()),await y[5]):(cn(e,y[3]),y[3]=[],g?.(),await kn(e,y))}async function Pn(e,t){let n=e.buildLocation(t);for(let t=0;;t++){let r=e._committed,i=new AbortController,a,o,s;try{try{a=e.matchRoutes(n,{_controller:i}),ln(a),o=(e._preloads??=new Map).set(i,a),s=await Cn(e,n,a,[i,t,r,!0])}finally{o&&(o=o.delete(i),cn(e,a)),i.abort()}if(!Qt(s))return s[1];if(!o||s.length<3)return;n=s[2]}catch(e){_e(e)||console.error(e);return}}}var Fn=`Error preloading route! ☝️`,In=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e,this._branch=void 0;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=Le:this.parentRoute||oe();let r=n?Le:t?.path;r&&r!==`/`&&(r=ce(r));let i=t?.id||r,a=n?Le:se((this.parentRoute.id===`__root__`?``:this.parentRoute.id)+`/`+(i??``));r===`__root__`&&(r=`/`);let o=a===`__root__`?`/`:r===void 0?this.parentRoute.fullPath:se(this.parentRoute.fullPath+`/`+r);this._path=r,this._id=a,this._fullPath=o,this._to=le(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>Re({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},Ln=class extends In{constructor(e){super(e)}},Rn=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})),k=o(((e,t)=>{t.exports=Rn()}))(),zn=class extends f.Component{constructor(...e){super(...e),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:0}:{resetKey:n}}static getDerivedStateFromError(e){return{error:[e]}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){let e=this.state.error;return e?f.createElement(this.props.errorComponent??Bn,{error:e[0],reset:this.reset}):this.props.children}};function Bn({error:e}){let[t,n]=f.useState(!1);return(0,k.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,k.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,k.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,k.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,k.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,k.jsx)(`div`,{children:(0,k.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e?.message?(0,k.jsx)(`code`,{children:e.message}):null})}):null]})}var Vn=()=>!0,Hn=()=>!1;function Un({children:e,fallback:t=null}){return(0,k.jsx)(f.Fragment,{children:Wn()?e:t})}function Wn(e=!0){return f.useSyncExternalStore(Gn,Vn,e?Hn:Vn)}function Gn(){return()=>{}}var Kn=f.createContext(null);function qn(e){return f.useContext(Kn)}function Jn(e,t){let n=e.stores.location,r=new Set,i,a,o=n=>{Kt(e,t,n)||(i=n,r.forEach(e=>e()))};return[()=>i??n.get(),e=>(r.size||(i=n.get(),a=n.subscribe(o).unsubscribe),r.add(e),()=>{r.delete(e),r.size||(a(),i=void 0)})]}var Yn=f.createContext(void 0),Xn=f.createContext(void 0);function Zn({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0)n=e.nextSub;else{for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}}while(1)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(1)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function Qn(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var $n=[],er=0,{link:tr,unlink:nr,propagate:rr,checkDirty:ir,shallowPropagate:ar}=Zn({update(e){return e._update()},notify(e){$n[sr++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,dr(e))}}),or=0,sr=0,cr,lr=0;function ur(e){try{++lr,e()}finally{--lr||fr()}}function dr(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=nr(n,e)}function fr(){if(!(lr>0)){for(;or<sr;){let e=$n[or];$n[or++]=void 0,e.notify()}or=0,sr=0}}function pr(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:+!n,get(){return cr!==void 0&&tr(i,cr,er),i._snapshot},subscribe(e){let t=Qn(e),n={current:!1},r=mr(()=>{i.get(),n.current?(cr=void 0,t.next?.(i._snapshot)):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=cr,o=t?.compare??Object.is;if(n)cr=i,++er,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=5);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{cr=a,n&&(i.flags&=-5),dr(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&ir(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&ar(e)}}else e&32&&(i.flags=e&-33);return cr!==void 0&&tr(i,cr,er),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(rr(e),ar(e),fr())}},i}function mr(e){let t=()=>{let t=cr;cr=n,++er,n.depsTail=void 0,n.flags=6;try{return e()}finally{cr=t,n.flags&=-5,dr(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let e=this.flags;e&16||e&32&&ir(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,dr(this)}};return t(),n}var hr=o((e=>{var t=d();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),gr=o(((e,t)=>{t.exports=hr()})),_r=o((e=>{var t=d(),n=gr();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),vr=o(((e,t)=>{t.exports=_r()}))();function yr(e,t){return e===t}function br(e,t=e=>e,n){let r=n?.compare??yr,i=(0,f.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,f.useCallback)(()=>e.get(),[e]);return(0,vr.useSyncExternalStoreWithSelector)(i,a,a,t,r)}var xr={};function Sr(e,t){let n=f.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=b(n.current,i):i}}function Cr(e){let t=qn(),n=f.useContext(e.from?Xn:Yn),r=e.from??n,i=t.stores.getMatchStore(r),a=Sr(e,t),o=br(i,e=>e?a(e):xr);if(o!==xr)return o;(e.shouldThrow??!0)&&oe()}function wr(e){return Cr({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Tr(e){let{select:t,...n}=e;return Cr({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function Er(e){return Cr({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function Dr(e){return Cr({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Or(e){let t=qn();return f.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function kr(e){return Cr({...e,select:t=>e.select?e.select(t.context):t.context})}function Ar(...e){let t=f.useRef(e),n=t.current;return e.forEach((e,t)=>{S(n[t],e,!1,!0)||(n[t]=e)}),t.current}function jr(e,t){e.preloadRoute(t).catch(e=>{console.warn(e),console.warn(Fn)})}function Mr(e,t){let n=typeof e==`string`&&te(e);if(n)return t.has(n)?e:null}function Nr(e,t,n,r){let i=de(e.pathname,r),a=de(t.pathname,r);return(n?.exact?i!==a:!i.startsWith(a)||i.length!==a.length&&i[a.length]!==`/`)||(n?.includeSearch??!0)&&!S(e.search,t.search,!n?.exact,n?.explicitUndefined)?!1:!n?.includeHash||e.hash===t.hash}function Pr(e,t,n){let r=qn(),i=f.useRef(null),a=f.useCallback(e=>{if(i.current=e,typeof t==`function`)return t(e);t&&(t.current=e)},[t]),{activeOptions:o,to:s,preload:c,preloadDelay:l,disabled:u,target:d,onClick:p,onBlur:m,onFocus:h,onMouseEnter:g,onMouseLeave:_,onTouchStart:v}=e,[y,b,x]=Ar(e.search,e.params,o),S=f.useContext(Yn),C=(r.stores._linkScopes??={})[S]??=Jn(r,S),[w,T,ee]=f.useMemo(()=>{let t=Mr(s,r.protocolAllowlist);if(t!==void 0){let n=[t??void 0];return[e,()=>n]}let n={...e},i,a,o,c=()=>{let e=C[0]();if(e!==i){n._fromLocation=e;let t=r.buildLocation(n),o=Hr(t,r,u),s=u||o&&!te(o)?Nr(e,t,x,r.basepath):void 0;(!a||a[0]!==o||a[1]!==s)&&(a=[o,s]),i=e}return a};return[n,c,x?.includeHash&&(()=>{let e=c();return e[1]?o??=[e[0],!1]:e})]},[r,C,e.from,e.hash,e.href,s,y,b,e.state,e.mask,e.unsafeRelative,x,u]),[ne,re]=f.useSyncExternalStore(C[1],T,ee||T),E=re===void 0&&ne,ie=u||ne===void 0,ae=f.useRef(!1),oe=e.reloadDocument||E||ie?!1:c??r.options.defaultPreload,se=l??r.options.defaultPreloadDelay??0,ce=f.useCallback(e=>{let t=e?.isIntersecting;t??oe===`intent`?se?i.t??=setTimeout(()=>{i.t=void 0,jr(r,w)},se):jr(r,w):t===!1&&Br(i)},[r,w,i,oe,se]);f.useEffect(()=>{if(!oe)return;oe===`render`&&!ae.current&&(ae.current=!0,jr(r,w));let e=!0,t;return oe===`viewport`&&i.current&&typeof IntersectionObserver==`function`&&(t=new IntersectionObserver(t=>{e&&ce(t.pop())},{rootMargin:`100px`}),t.observe(i.current)),()=>{e=!1,t?.disconnect(),Br(i)}},[r,w,oe,ce,i]);let le=Rr(e,n);if(le.ref=t?a:i,E)return le.href=E,le;let ue=t=>{let n=d??t.currentTarget.getAttribute(`target`);!ie&&!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&(!n||n===`_self`)&&t.button===0&&(t.preventDefault(),Br(i),r.navigate({...e,_fromLocation:w._fromLocation}))},de=()=>{oe===`intent`&&jr(r,w)},fe=()=>{oe===`intent`&&Br(i)};return le.onClick=Vr(p,ue),le.onBlur=Vr(m,fe),le.onFocus=Vr(h,ce),le.onMouseEnter=Vr(g,ce),le.onMouseLeave=Vr(_,fe),le.onTouchStart=Vr(v,de),zr(le,e,re,ne,ie,n)}var Fr={},Ir={className:`active`},Lr=new Set([`to`,`params`,`search`,`hash`,`state`,`mask`,`from`,`unsafeRelative`,`reloadDocument`,`preload`,`preloadDelay`,`preloadIntentProximity`,`hashScrollIntoView`,`replace`,`startTransition`,`resetScroll`,`viewTransition`,`ignoreBlocker`,`activeProps`,`inactiveProps`,`activeOptions`,`_asChild`]);function Rr(e,t){let n={};for(let r in e)Lr.has(r)||r===`type`&&t!==void 0||r===`disabled`&&t===`a`||(n[r]=e[r]);return n}function zr(e,t,n,r,i,a){let{activeProps:o,inactiveProps:s,className:c,style:l,target:u}=t,d=h(n?o:s,{})??(n?Ir:Fr);Object.assign(e,d),e.href=r,a!==`a`&&(e.disabled=i),e.target=u;let f=d.style;(l||f)&&(e.style=l&&f?{...l,...f}:l||f);let p=d.className;return(c||p)&&(e.className=c?p?`${c} ${p}`:c:p),i&&(e.role=`link`,e[`aria-disabled`]=!0),n&&(e[`data-status`]=`active`,e[`aria-current`]=`page`),e}var Br=e=>{clearTimeout(e.t),e.t=void 0},Vr=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function Hr(e,t,n){if(n)return;let r=e.maskedLocation??e,i=r.external?r.publicHref:t.history.createHref(r.publicHref)||`/`;if(!r.external&&i===r.publicHref||!re(i,t.protocolAllowlist))return i}var Ur=f.memo(f.forwardRef((e,t)=>{let n=e._asChild||`a`,r=Pr(e,t,n),i=typeof e.children==`function`?e.children({isActive:r[`data-status`]===`active`}):e.children;return f.createElement(n,r,i)}),Wr);function Wr(e,t){let n=0;for(let r in t)if(n++,e[r]!==t[r]&&(!Lr.has(r)||!S(e[r],t[r],!1,!0)))return!1;for(let t in e)n--;return n===0}var Gr=class extends In{constructor(e){super(e),this.useMatch=e=>Cr({...e,from:this.id}),this.useRouteContext=e=>kr({...e,from:this.id}),this.useSearch=e=>Dr({...e,from:this.id}),this.useParams=e=>Er({...e,from:this.id}),this.useLoaderDeps=e=>Tr({...e,from:this.id}),this.useLoaderData=e=>wr({...e,from:this.id}),this.useNavigate=()=>Or({from:this.fullPath}),this.Link=f.forwardRef((e,t)=>(0,k.jsx)(Ur,{ref:t,from:this.fullPath,...e}))}};function Kr(e){return new Gr(e)}var qr=class extends Ln{constructor(e){super(e),this.useMatch=e=>Cr({...e,from:this.id}),this.useRouteContext=e=>kr({...e,from:this.id}),this.useSearch=e=>Dr({...e,from:this.id}),this.useParams=e=>Er({...e,from:this.id}),this.useLoaderDeps=e=>Tr({...e,from:this.id}),this.useLoaderData=e=>wr({...e,from:this.id}),this.useNavigate=()=>Or({from:this.fullPath}),this.Link=f.forwardRef((e,t)=>(0,k.jsx)(Ur,{ref:t,from:this.fullPath,...e}))}};function Jr(e){return new qr(e)}function Yr(e){let t=qn(),n=`not-found-${br(t.stores.location,e=>e.pathname)}-${br(t.stores.status)}`;return(0,k.jsx)(zn,{getResetKey:()=>n,onCatch:(t,n)=>{if(_e(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(_e(t))return e.fallback?.(t);throw t},children:e.children})}function Xr(){return(0,k.jsx)(`p`,{children:`Not Found`})}function Zr(e,t,n){return t.options.notFoundComponent?(0,k.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,k.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,k.jsx)(Xr,{})}function Qr(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,k.jsx)(n,{}):null}var $r=(e,t)=>e[0]===t[0]&&e[1]===t[1],ei=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,ti=f.memo(function({routeId:e}){let t=qn();return ni(t,br(t.stores.getMatchStore(e)))});function ni(e,t){let n=e.routesById[t.routeId],r=Qr(e,n),i=n.options.errorComponent??e.options.defaultErrorComponent,a=n.options.onCatch??e.options.defaultOnCatch,o=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,s=t.ssr===!1||t.ssr===`data-only`,c=ei(e,n,t.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||s)),l=(0,k.jsx)(ri,{match:t});s&&(l=(0,k.jsx)(Un,{fallback:r,children:l})),o&&(l=(0,k.jsx)(Yr,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return f.createElement(o,e)},children:l})),i&&(l=(0,k.jsx)(zn,{getResetKey:()=>t,errorComponent:i,onCatch:(e,n)=>{if(_e(e))throw e.routeId??=t.routeId,e;a?.(e,n)},children:l})),c&&(l=(0,k.jsx)(f.Suspense,{fallback:r,children:l}));let u=n.isRoot&&n.options.shellComponent;return u?(0,k.jsx)(Yn.Provider,{value:t.routeId,children:(0,k.jsxs)(u,{children:[l,null]})}):(0,k.jsxs)(Yn.Provider,{value:t.routeId,children:[l,null]})}var ri=f.memo(function({match:e}){let t=qn(),n=e.routeId,r=t.routesById[n],i=f.useMemo(()=>{let i=(r.options.remountDeps??t.options.defaultRemountDeps)?.({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return i?JSON.stringify(i):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,r.options.remountDeps,t.options.defaultRemountDeps]),a=f.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?(0,k.jsx)(e,{},i):(0,k.jsx)(ii,{})},[i,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!ei(t,r,e.ssr))return a;if(t._tx)throw t._tx[5];return Qr(t,r)}if(e.status===`notFound`)return Zr(t,r,e.error);if(e.status===`error`)throw e.error;return a}),ii=f.memo(function(){let e=qn(),t=f.useContext(Yn),n,r,i;{let a=e.stores.getMatchStore(t);[n,r]=br(a,e=>[!!e._notFound,e.error],{compare:$r}),i=br(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return Zr(e,e.routesById[t],r);if(!i)return null;let a=(0,k.jsx)(ti,{routeId:i});return t===`__root__`?(0,k.jsx)(f.Suspense,{fallback:Qr(e),children:a}):a});function ai(e,t){let n=e[1];e.length=0,n?.(t)}function oi({t:e}){let t=qn(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise(a=>{ai(n,!1),n.push(i,a),e(t),f.startTransition(r)}),p(()=>{let e=t.history.subscribe(t.load);t.updateLatestLocation();let r=t.latestLocation,i=t.buildLocation({to:r.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(le(r.publicHref)!==le(i.publicHref))return t.commitLocation({...i,replace:!0,ignoreBlocker:!0}),e;let a=t.stores.resolvedLocation.get();return a?.href===r.href&&a.state.__TSR_key===r.state.__TSR_key?n.push(t.stores.matches.get(),e=>{e&&t.emit({type:`onRendered`,...Et(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}function si(){let e=qn(),t=e.routesById[Le],n=Qr(e,t),r=(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(oi,{t:f.useState()[1]}),e.ssr?(0,k.jsx)(ci,{}):(0,k.jsx)(f.Suspense,{fallback:n,children:(0,k.jsx)(ci,{})})]});return e.options.InnerWrap?(0,k.jsx)(e.options.InnerWrap,{children:r}):r}function ci(){let e=qn(),t=e._rendered,n=br(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;p(()=>{t[0]===n&&ai(t,!0)},[t,n]);let a=i?(0,k.jsx)(ti,{routeId:i}):null;return e.options.disableGlobalCatchBoundary?a:(0,k.jsx)(zn,{getResetKey:()=>r,onCatch:void 0,children:a})}var li=e=>({createMutableStore:pr,createReadonlyStore:pr,batch:ur}),ui=e=>new di(e),di=class extends At{constructor(e){super(e,li)}};function fi({router:e,children:t,...n}){_(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,k.jsx)(Kn.Provider,{value:e,children:t});return e.options.Wrap?(0,k.jsx)(e.options.Wrap,{children:r}):r}function pi({router:e,...t}){return(0,k.jsx)(fi,{router:e,...t,children:(0,k.jsx)(si,{})})}var mi=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,ne());else{var t=n(l);t!==null&&ie(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function ee(){return g?!0:!(e.unstable_now()-T<w)}function te(){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&&ee());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ie(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?ne():S=!1}}}var ne;if(typeof y==`function`)ne=function(){y(te)};else if(typeof MessageChannel<`u`){var re=new MessageChannel,E=re.port2;re.port1.onmessage=te,ne=function(){E.postMessage(null)}}else ne=function(){_(te,0)};function ie(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,ie(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,ne()))),r},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),hi=o(((e,t)=>{t.exports=mi()})),gi=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.0`})),_i=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=gi()})),vi=o((e=>{var t=hi(),n=d(),r=_i();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 p(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)&&p(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function m(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 h(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 g(e){var t=[null,null],n=m(e);return n===null||_(t,e,n.child,{foundSelf:!1}),t}function _(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)&&_(e,t,n.child,r))return!0;n=n.sibling}return!1}function v(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 y=null,b=null;function x(e,t,n){return e===n||e===t&&(y=e,!0)}function S(e,t,n){return e===n?(b=e,!1):e===t&&(b!==null&&(y=e),!0)}function C(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 w(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 T=Object.assign,ee=Symbol.for(`react.element`),te=Symbol.for(`react.transitional.element`),ne=Symbol.for(`react.portal`),re=Symbol.for(`react.fragment`),E=Symbol.for(`react.strict_mode`),ie=Symbol.for(`react.profiler`),ae=Symbol.for(`react.consumer`),oe=Symbol.for(`react.context`),se=Symbol.for(`react.forward_ref`),ce=Symbol.for(`react.suspense`),le=Symbol.for(`react.suspense_list`),ue=Symbol.for(`react.memo`),de=Symbol.for(`react.lazy`),fe=Symbol.for(`react.activity`),pe=Symbol.for(`react.legacy_hidden`),me=Symbol.for(`react.memo_cache_sentinel`),he=Symbol.for(`react.view_transition`),ge=Symbol.for(`react.recoverable`),_e=Symbol.iterator;function ve(e){return typeof e!=`object`||!e?null:(e=_e&&e[_e]||e[`@@iterator`],typeof e==`function`?e:null)}var ye=Symbol.for(`react.client.reference`);function be(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ye?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case re:return`Fragment`;case ie:return`Profiler`;case E:return`StrictMode`;case ce:return`Suspense`;case le:return`SuspenseList`;case fe:return`Activity`;case he:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case ne:return`Portal`;case oe:return e.displayName||`Context`;case ae:return(e._context.displayName||`Context`)+`.Consumer`;case se:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ue:return t=e.displayName||null,t===null?be(e.type)||`Memo`:t;case de:t=e._payload,e=e._init;try{return be(e(t))}catch{}}return null}var xe=Array.isArray,D=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Se={pending:!1,data:null,method:null,action:null},Ce=[],we=-1;function Te(e){return{current:e}}function Ee(e){0>we||(e.current=Ce[we],Ce[we]=null,we--)}function De(e,t){we++,Ce[we]=e.current,e.current=t}var Oe=Te(null),ke=Te(null),Ae=Te(null),je=Te(null);function Me(e,t){switch(De(Ae,t),De(ke,e),De(Oe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Op(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Op(t),e=kp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}Ee(Oe),De(Oe,e)}function Ne(){Ee(Oe),Ee(ke),Ee(Ae)}function Pe(e){var t=e.memoizedState;t!==null&&(Th._currentValue=t.memoizedState,De(je,e)),t=Oe.current;var n=kp(t,e.type);t!==n&&(De(ke,e),De(Oe,n))}function Fe(e){ke.current===e&&(Ee(Oe),Ee(ke)),je.current===e&&(Ee(je),Th._currentValue=Se)}var Ie,Le;function Re(e){if(Ie===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Ie=t&&t[1]||``,Le=-1<e.stack.indexOf(`
|
|
3
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
|
+
`+Ie+e+Le}var ze=!1;function Be(e,t){if(!e||ze)return``;ze=!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{ze=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Re(n):``}function Ve(e,t){switch(e.tag){case 26:case 27:case 5:return Re(e.type);case 16:return Re(`Lazy`);case 13:return e.child!==t&&t!==null?Re(`Suspense Fallback`):Re(`Suspense`);case 19:return Re(`SuspenseList`);case 0:case 15:return Be(e.type,!1);case 11:return Be(e.type.render,!1);case 1:return Be(e.type,!0);case 31:return Re(`Activity`);case 30:return Re(`ViewTransition`);default:return``}}function He(e){try{var t=``,n=null;do t+=Ve(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
8
|
+
Error generating stack: `+e.message+`
|
|
9
|
+
`+e.stack}}var Ue=Object.prototype.hasOwnProperty,We=t.unstable_scheduleCallback,Ge=t.unstable_cancelCallback,Ke=t.unstable_shouldYield,qe=t.unstable_requestPaint,Je=t.unstable_now,Ye=t.unstable_getCurrentPriorityLevel,Xe=t.unstable_ImmediatePriority,Ze=t.unstable_UserBlockingPriority,Qe=t.unstable_NormalPriority,$e=t.unstable_LowPriority,et=t.unstable_IdlePriority,tt=t.log,nt=t.unstable_setDisableYieldValue,rt=null,it=null;function at(e){if(typeof tt==`function`&&nt(e),it&&typeof it.setStrictMode==`function`)try{it.setStrictMode(rt,e)}catch{}}var ot=Math.clz32?Math.clz32:lt,st=Math.log,ct=Math.LN2;function lt(e){return e>>>=0,e===0?32:31-(st(e)/ct|0)|0}var ut=256,dt=262144,ft=4194304;function pt(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 mt(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=pt(n))):i=pt(o):i=pt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=pt(n))):i=pt(o)):i=pt(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 ht(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function gt(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-ot(n),i=1<<r;t|=e[r],n&=~i}return t}function _t(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 vt(){var e=ft;return ft<<=1,!(ft&62914560)&&(ft=4194304),e}function yt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function bt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function xt(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-ot(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&&St(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function St(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-ot(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ct(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ot(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function wt(e,t){var n=t&-t;return n=n&42?1:Tt(n),(n&(e.suspendedLanes|t))===0?n:0}function Tt(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 Et(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Dt(){var e=O.p;return e===0?(e=window.event,e===void 0?32:Vh(e.type)):e}function Ot(e,t){var n=O.p;try{return O.p=e,t()}finally{O.p=n}}var kt=Math.random().toString(36).slice(2),At=`__reactFiber$`+kt,jt=`__reactProps$`+kt,Mt=`__reactContainer$`+kt,Nt=`__reactEvents$`+kt,Pt=`__reactListeners$`+kt,Ft=`__reactHandles$`+kt,It=`__reactResources$`+kt,Lt=`__reactMarker$`+kt,Rt=`__reactLoad$`+kt;function zt(e){delete e[At],delete e[jt],delete e[Pt],delete e[Ft]}function Bt(e){var t;if(t=e[At])return t;for(var n=e.parentNode;n;){if(t=n[Mt]||n[At]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Am(e);e!==null;){if(n=e[At])return n;e=Am(e)}return t}e=n,n=e.parentNode}return null}function Vt(e){if(e=e[At]||e[Mt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ht(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Ut(e){var t=e[It];return t||=e[It]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Wt(e){e[Lt]=!0}function Gt(e){e[Rt]=void 0}var Kt=new Set,qt={};function Jt(e,t){Yt(e,t),Yt(e+`Capture`,t)}function Yt(e,t){for(qt[e]=t,e=0;e<t.length;e++)Kt.add(t[e])}var Xt=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]*$`),Zt={},Qt={};function $t(e){return Ue.call(Qt,e)?!0:Ue.call(Zt,e)?!1:Xt.test(e)?Qt[e]=!0:(Zt[e]=!0,!1)}var en=!1;function tn(){var e=en;return en=!1,e}function nn(e,t,n){if($t(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 rn(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 an(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 on(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function sn(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function cn(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 ln(e){if(!e._valueTracker){var t=sn(e)?`checked`:`value`;e._valueTracker=cn(e,t,``+e[t])}}function un(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=sn(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var dn=/[\n"\\]/g;function fn(e){return e.replace(dn,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function pn(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=``+on(t)):e.value!==``+on(t)&&(e.value=``+on(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):hn(e,on(n)):o===`number`&&e.value==t?hn(e,on(e.value)):hn(e,on(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=``+on(s):e.removeAttribute(`name`)}function mn(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)){ln(e);return}n=n==null?``:``+on(n),t=t==null?n:``+on(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),ln(e)}function hn(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function gn(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=``+on(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 _n(e,t,n){t!=null&&(t=``+on(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+on(n)}function vn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(xe(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=on(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),ln(e)}function yn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var bn=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 xn(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||bn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Sn(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]=``,en=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(xn(e,a,r),en=!0)}else for(var o in t)t.hasOwnProperty(o)&&xn(e,o,t[o])}function Cn(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 wn=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`]]),Tn=/^[\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 En(e){return Tn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Dn(){}var On=null;function kn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var An=null,jn=null;function Mn(e){var t=Vt(e);if(t&&(e=t.stateNode)){var n=e[jt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(pn(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="`+fn(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[jt]||null;if(!a)throw Error(i(90));pn(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&&un(r)}break a;case`textarea`:_n(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&gn(e,!!n.multiple,t,!1)}}}var Nn=!1;function Pn(e,t,n){if(Nn)return e(t,n);Nn=!0;try{return e(t)}finally{if(Nn=!1,(An!==null||jn!==null)&&(ef(),An&&(t=An,e=jn,jn=An=null,Mn(t),e)))for(t=0;t<e.length;t++)Mn(e[t])}}function Fn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[jt]||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 In=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,Ln=!1;if(In)try{var Rn={};Object.defineProperty(Rn,"passive",{get:function(){Ln=!0}}),window.addEventListener(`test`,Rn,Rn),window.removeEventListener(`test`,Rn,Rn)}catch{Ln=!1}var k=null,zn=null,Bn=null;function Vn(){if(Bn)return Bn;var e,t=zn,n=t.length,r,i=`value`in k?k.value:k.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 Bn=i.slice(e,1<r?1-r:void 0)}function Hn(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 Un(){return!0}function Wn(){return!1}function Gn(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)?Un:Wn,this.isPropagationStopped=Wn,this}return T(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=Un)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Un)},persist:function(){},isPersistent:Un}),t}var Kn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qn=Gn(Kn),Jn=T({},Kn,{view:0,detail:0}),Yn=Gn(Jn),Xn,Zn,Qn,$n=T({},Jn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ur,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!==Qn&&(Qn&&e.type===`mousemove`?(Xn=e.screenX-Qn.screenX,Zn=e.screenY-Qn.screenY):Zn=Xn=0,Qn=e),Xn)},movementY:function(e){return`movementY`in e?e.movementY:Zn}}),er=Gn($n),tr=Gn(T({},$n,{dataTransfer:0})),nr=Gn(T({},Jn,{relatedTarget:0})),rr=Gn(T({},Kn,{animationName:0,elapsedTime:0,pseudoElement:0})),ir=Gn(T({},Kn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),ar=Gn(T({},Kn,{data:0})),or={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},sr={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`},cr={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function lr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=cr[e])?!!t[e]:!1}function ur(){return lr}var dr=Gn(T({},Jn,{key:function(e){if(e.key){var t=or[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Hn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?sr[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ur,charCode:function(e){return e.type===`keypress`?Hn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Hn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),fr=Gn(T({},$n,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),pr=Gn(T({},Kn,{submitter:0})),mr=Gn(T({},Jn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ur})),hr=Gn(T({},Kn,{propertyName:0,elapsedTime:0,pseudoElement:0})),gr=Gn(T({},$n,{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})),_r=Gn(T({},Kn,{newState:0,oldState:0,source:0})),vr=[9,13,27,32],yr=In&&`CompositionEvent`in window,br=null;In&&`documentMode`in document&&(br=document.documentMode);var xr=In&&`TextEvent`in window&&!br,Sr=In&&(!yr||br&&8<br&&11>=br),Cr=` `,wr=!1;function Tr(e,t){switch(e){case`keyup`:return vr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Er(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Dr=!1;function Or(e,t){switch(e){case`compositionend`:return Er(t);case`keypress`:return t.which===32?(wr=!0,Cr):null;case`textInput`:return e=t.data,e===Cr&&wr?null:e;default:return null}}function kr(e,t){if(Dr)return e===`compositionend`||!yr&&Tr(e,t)?(e=Vn(),Bn=zn=k=null,Dr=!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 Sr&&t.locale!==`ko`?null:t.data;default:return null}}var Ar={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 jr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Ar[e.type]:t===`textarea`}function Mr(e,t,n,r){An?jn?jn.push(r):jn=[r]:An=r,t=dp(t,`onChange`),0<t.length&&(n=new qn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Nr=null,Pr=null;function Fr(e){rp(e,0)}function Ir(e){if(un(Ht(e)))return e}function Lr(e,t){if(e===`change`)return t}var Rr=!1;if(In){var zr;if(In){var Br=`oninput`in document;if(!Br){var Vr=document.createElement(`div`);Vr.setAttribute(`oninput`,`return;`),Br=typeof Vr.oninput==`function`}zr=Br}else zr=!1;Rr=zr&&(!document.documentMode||9<document.documentMode)}function Hr(){Nr&&(Nr.detachEvent(`onpropertychange`,Ur),Pr=Nr=null)}function Ur(e){if(e.propertyName===`value`&&Ir(Pr)){var t=[];Mr(t,Pr,e,kn(e)),Pn(Fr,t)}}function Wr(e,t,n){e===`focusin`?(Hr(),Nr=t,Pr=n,Nr.attachEvent(`onpropertychange`,Ur)):e===`focusout`&&Hr()}function Gr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Ir(Pr)}function Kr(e,t){if(e===`click`)return Ir(t)}function qr(e,t){if(e===`input`||e===`change`)return Ir(t)}function Jr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Yr=typeof Object.is==`function`?Object.is:Jr;function Xr(e,t){if(Yr(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(!Ue.call(t,i)||!Yr(e[i],t[i]))return!1}return!0}function Zr(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 Qr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function $r(e,t){var n=Qr(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=Qr(n)}}function ei(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ei(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ti(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Zr(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=Zr(e.document)}return t}function ni(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 ri=In&&`documentMode`in document&&11>=document.documentMode,ii=null,ai=null,oi=null,si=!1;function ci(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;si||ii==null||ii!==Zr(r)||(r=ii,`selectionStart`in r&&ni(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}),oi&&Xr(oi,r)||(oi=r,r=dp(ai,`onSelect`),0<r.length&&(t=new qn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=ii)))}function li(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ui={animationend:li(`Animation`,`AnimationEnd`),animationiteration:li(`Animation`,`AnimationIteration`),animationstart:li(`Animation`,`AnimationStart`),transitionrun:li(`Transition`,`TransitionRun`),transitionstart:li(`Transition`,`TransitionStart`),transitioncancel:li(`Transition`,`TransitionCancel`),transitionend:li(`Transition`,`TransitionEnd`)},di={},fi={};In&&(fi=document.createElement(`div`).style,`AnimationEvent`in window||(delete ui.animationend.animation,delete ui.animationiteration.animation,delete ui.animationstart.animation),`TransitionEvent`in window||delete ui.transitionend.transition);function pi(e){if(di[e])return di[e];if(!ui[e])return e;var t=ui[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in fi)return di[e]=t[n];return e}var mi=pi(`animationend`),gi=pi(`animationiteration`),vi=pi(`animationstart`),yi=pi(`transitionrun`),bi=pi(`transitionstart`),xi=pi(`transitioncancel`),Si=pi(`transitionend`),Ci=new Map,wi=`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(` `);wi.push(`scrollEnd`);function Ti(e,t){Ci.set(e,t),Jt(t,[e])}var Ei=0;function Di(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=Fd.identifierPrefix;var n=Ei++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function Oi(e){if(e==null||typeof e==`string`)return e;var t=null,n=Ud;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 ki(e,t){return e=Oi(e),t=Oi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var Ai=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)},ji=[],Mi=0,Ni=0;function Pi(){for(var e=Mi,t=Ni=Mi=0;t<e;){var n=ji[t];ji[t++]=null;var r=ji[t];ji[t++]=null;var i=ji[t];ji[t++]=null;var a=ji[t];if(ji[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Ri(n,i,a)}}function Fi(e,t,n,r){ji[Mi++]=e,ji[Mi++]=t,ji[Mi++]=n,ji[Mi++]=r,Ni|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Ii(e,t,n,r){return Fi(e,t,n,r),zi(e)}function Li(e,t){return Fi(e,null,null,t),zi(e)}function Ri(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-ot(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function zi(e){if(50<Wd)throw Wd=0,Gd=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Bi={};function Vi(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 Hi(e,t,n,r){return new Vi(e,t,n,r)}function Ui(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Wi(e,t){var n=e.alternate;return n===null?(n=Hi(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 Gi(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 Ki(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Ui(r)&&(s=1);else if(typeof r==`string`)s=dh(e,n,Oe.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case fe:return e=Hi(31,n,t,a),e.elementType=fe,e.lanes=o,e;case re:return qi(n.children,a,o,t);case E:s=8,a|=24;break;case ie:return e=Hi(12,n,t,a|2),e.elementType=ie,e.lanes=o,e;case ce:return e=Hi(13,n,t,a),e.elementType=ce,e.lanes=o,e;case le:return e=Hi(19,n,t,a),e.elementType=le,e.lanes=o,e;case pe:case he:return e=a|32,e=Hi(30,n,t,e),e.elementType=he,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case oe:s=10;break a;case ae:s=9;break a;case se:s=11;break a;case ue:s=14;break a;case de:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Hi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function qi(e,t,n,r){return e=Hi(7,e,r,t),e.lanes=n,e}function Ji(e,t,n){return e=Hi(6,e,null,t),e.lanes=n,e}function Yi(e){var t=Hi(18,null,null,0);return t.stateNode=e,t}function Xi(e,t,n){return t=Hi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Zi=new WeakMap;function Qi(e,t){if(typeof e==`object`&&e){var n=Zi.get(e);return n===void 0?(t={value:e,source:t,stack:He(t)},Zi.set(e,t),t):n}return{value:e,source:t,stack:He(t)}}var $i=[],ea=0,ta=null,na=0,ra=[],ia=0,aa=null,oa=1,sa=``;function ca(e,t){$i[ea++]=na,$i[ea++]=ta,ta=e,na=t}function la(e,t,n){ra[ia++]=oa,ra[ia++]=sa,ra[ia++]=aa,aa=e;var r=oa;e=sa;var i=32-ot(r)-1;r&=~(1<<i),n+=1;var a=32-ot(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,oa=1<<32-ot(t)+i|n<<i|r,sa=a+e}else oa=1<<a|n<<i|r,sa=e}function ua(e){e.return!==null&&(ca(e,1),la(e,1,0))}function da(e){for(;e===ta;)ta=$i[--ea],$i[ea]=null,na=$i[--ea],$i[ea]=null;for(;e===aa;)aa=ra[--ia],ra[ia]=null,sa=ra[--ia],ra[ia]=null,oa=ra[--ia],ra[ia]=null}function A(e,t){ra[ia++]=oa,ra[ia++]=sa,ra[ia++]=aa,oa=t.id,sa=t.overflow,aa=e}var fa=null,pa=null,ma=!1,ha=null,ga=!1,_a=Error(i(519));function va(e){throw wa(Qi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),_a}function ya(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[At]=e,t[jt]=r,n){case`dialog`:ip(`cancel`,t),ip(`close`,t);break;case`iframe`:case`object`:case`embed`:ip(`load`,t);break;case`video`:case`audio`:for(n=0;n<tp.length;n++)ip(tp[n],t);break;case`source`:ip(`error`,t);break;case`img`:case`image`:case`link`:ip(`error`,t),ip(`load`,t);break;case`details`:ip(`toggle`,t);break;case`input`:ip(`invalid`,t),mn(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:ip(`invalid`,t);break;case`textarea`:ip(`invalid`,t),vn(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||_p(t.textContent,n)?(r.popover!=null&&(ip(`beforetoggle`,t),ip(`toggle`,t)),r.onScroll!=null&&ip(`scroll`,t),r.onScrollEnd!=null&&ip(`scrollend`,t),r.onClick!=null&&(t.onclick=Dn),t=!0):t=!1,t||va(e,!0)}function ba(e){for(fa=e.return;fa;)switch(fa.tag){case 5:case 31:case 13:ga=!1;return;case 27:case 3:ga=!0;return;default:fa=fa.return}}function xa(e){if(e!==fa)return!1;if(!ma)return ba(e),ma=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||jp(e.type,e.memoizedProps)),n=!n),n&&pa&&va(e),ba(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));pa=km(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));pa=km(e)}else t===27?(t=pa,Bp(e.type)?(e=Om,Om=null,pa=e):pa=t):pa=fa?Dm(e.stateNode.nextSibling):null;return!0}function Sa(){pa=fa=null,ma=!1}function Ca(){var e=ha;return e!==null&&(Dd===null?Dd=e:Dd.push.apply(Dd,e),ha=null),e}function wa(e){ha===null?ha=[e]:ha.push(e)}var Ta=Te(null),Ea=null,Da=null;function Oa(e,t,n){De(Ta,t._currentValue),t._currentValue=n}function j(e){e._currentValue=Ta.current,Ee(Ta)}function ka(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 Aa(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),ka(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),ka(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),ka(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 M(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;Yr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===je.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Th]:e.push(Th))}a=a.return}return e!==null&&Aa(t,e,n,r),t.flags|=262144,e!==null}function ja(e){for(e=e.firstContext;e!==null;){if(!Yr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ma(e){Ea=e,Da=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Na(e){return Fa(Ea,e)}function Pa(e,t){return Ea===null&&Ma(e),Fa(e,t)}function Fa(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 Ia=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()})}},La=t.unstable_scheduleCallback,Ra=t.unstable_NormalPriority,za={$$typeof:oe,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ba(){return{controller:new Ia,data:new Map,refCount:0}}function Va(e){e.refCount--,e.refCount===0&&La(Ra,function(){e.controller.abort()})}function Ha(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 Ua=null;function Wa(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Ga=null,Ka=0,qa=0,Ja=null;function Ya(e,t){if(Ga===null){var n=Ga=[];Ka=0,qa=Xf(),Ja={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Ka++,t.then(Xa,Xa),t}function Xa(){if(--Ka===0&&(Ua=null,Ga!==null)){Ja!==null&&(Ja.status=`fulfilled`);var e=Ga;Ga=null,qa=0,Ja=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Za(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 Qa=D.S;D.S=function(e,t){if(Ad=Je(),typeof t==`object`&&t&&typeof t.then==`function`&&Ya(e,t),Ua!==null)for(var n=If;n!==null;)Ha(n,Ua),n=n.next;if(n=e.types,n!==null){for(var r=If;r!==null;)Ha(r,n),r=r.next;if(qa!==0){r=Ua,r===null&&(r=Ua=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Qa!==null&&Qa(e,t)};var $a=Te(null);function eo(){var e=$a.current;return e===null?dd.pooledCache:e}function to(e,t){t===null?De($a,$a.current):De($a,t.pool)}function no(){var e=eo();return e===null?null:{parent:za._currentValue,pool:e}}var ro=Error(i(460)),io=Error(i(474)),ao=Error(i(542)),oo={then:function(){}};function so(e){return e=e.status,e===`fulfilled`||e===`rejected`}function co(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Dn,Dn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,po(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(Dn,Dn);else{if(e=dd,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,po(e),e}throw uo=t,ro}}function lo(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(uo=e,ro):e}}var uo=null;function fo(){if(uo===null)throw Error(i(459));var e=uo;return uo=null,e}function po(e){if(e===ro||e===ao)throw Error(i(483))}var mo=null,ho=0;function go(e){var t=ho;return ho+=1,mo===null&&(mo=[]),co(mo,e,t)}function _o(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function vo(e,t){throw t.$$typeof===ee?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function yo(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=Wi(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=Ji(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===re?(e=d(e,t,n.props.children,r,n.key),_o(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===de&&lo(i)===t.type)?(t=a(t,n.props),_o(t,n),t.return=e,t):(t=Ki(n.type,n.key,n.props,null,e.mode,r),_o(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=Xi(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=qi(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=Ji(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case te:return n=Ki(t.type,t.key,t.props,null,e.mode,n),_o(n,t),n.return=e,n;case ne:return t=Xi(t,e.mode,n),t.return=e,t;case de:return t=lo(t),f(e,t,n)}if(xe(t)||ve(t))return t=qi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,go(t),n);if(t.$$typeof===oe)return f(e,Pa(e,t),n);vo(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 te:return n.key===i?l(e,t,n,r):null;case ne:return n.key===i?u(e,t,n,r):null;case de:return n=lo(n),p(e,t,n,r)}if(xe(n)||ve(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,go(n),r);if(n.$$typeof===oe)return p(e,t,Pa(e,n),r);vo(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 te:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case ne:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case de:return r=lo(r),m(e,t,n,r,i)}if(xe(r)||ve(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,go(r),i);if(r.$$typeof===oe)return m(e,t,n,Pa(t,r),i);vo(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),ma&&ca(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 ma&&ca(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)}),ma&&ca(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),ma&&ca(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 ma&&ca(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)}),ma&&ca(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===re&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case te:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===re){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),_o(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===de&&lo(l)===r.type){n(e,r.sibling),c=a(r,o.props),_o(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===re?(c=qi(o.props.children,e.mode,c,o.key),_o(c,o),c.return=e,e=c):(c=Ki(o.type,o.key,o.props,null,e.mode,c),_o(c,o),c.return=e,e=c)}return s(e);case ne: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=Xi(o,e.mode,c),c.return=e,e=c}return s(e);case de:return o=lo(o),_(e,r,o,c)}if(xe(o))return h(e,r,o,c);if(ve(o)){if(l=ve(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,go(o),c);if(o.$$typeof===oe)return _(e,r,Pa(e,o),c);vo(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=Ji(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{ho=0;var i=_(e,t,n,r);return mo=null,i}catch(t){if(t===ro||t===ao)throw t;var a=Hi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var bo=yo(!0),xo=yo(!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 wo(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 To(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Eo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ud&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=zi(e),Ri(e,null,n),t}return Fi(e,r,t,n),zi(e)}function Do(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,Ct(e,n)}}function Oo(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 ko=!1;function Ao(){if(ko){var e=Ja;if(e!==null)throw e}}function jo(e,t,n,r){ko=!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?(pd&f)===f:(r&f)===f){f!==0&&f===qa&&(ko=!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=T({},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),xd|=o,e.lanes=o,e.memoizedState=d}}function Mo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function No(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Mo(n[e],t)}var Po=Te(null),Fo=Te(0);function Io(e,t){e=yd,De(Fo,e),De(Po,t),yd=e|t.baseLanes}function Lo(){De(Fo,yd),De(Po,Po.current)}function Ro(){yd=Fo.current,Ee(Po),Ee(Fo)}var zo=Te(null),Bo=null;function Vo(e){var t=e.alternate;De(Go,Go.current&1),De(zo,e),Bo===null&&(t===null||Po.current!==null||t.memoizedState!==null)&&(Bo=e)}function N(e){De(Go,Go.current),De(zo,e),Bo===null&&(Bo=e)}function Ho(e){e.tag===22?(De(Go,Go.current),De(zo,e),Bo===null&&(Bo=e)):Uo()}function Uo(){De(Go,Go.current),De(zo,zo.current)}function Wo(e){Ee(zo),Bo===e&&(Bo=null),Ee(Go)}var Go=Te(0);function P(e,t){De(zo,zo.current),De(Go,t)}function Ko(e){Ee(Go),Ee(zo),Bo===e&&(Bo=null)}function qo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||wm(n)||Tm(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 Jo=0,Yo=null,Xo=null,Zo=null,Qo=!1,$o=!1,es=!1,ts=0,ns=0,rs=null,is=0;function as(){throw Error(i(321))}function os(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Yr(e[n],t[n]))return!1;return!0}function ss(e,t,n,r,i,a){return Jo=a,Yo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?Cc:wc,es=!1,a=n(r,i),es=!1,$o&&(a=ls(t,n,r,i)),cs(e),a}function cs(e){D.H=Sc;var t=Xo!==null&&Xo.next!==null;if(Jo=0,Zo=Xo=Yo=null,Qo=!1,ns=0,rs=null,t)throw Error(i(300));e===null||Vc||(e=e.dependencies,e!==null&&ja(e)&&(Vc=!0))}function ls(e,t,n,r){Yo=e;var a=0;do{if($o&&(rs=null),ns=0,$o=!1,25<=a)throw Error(i(301));if(a+=1,Zo=Xo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}D.H=Tc,o=t(n,r)}while($o);return o}function us(){var e=D.H,t=e.useState()[0];return t=typeof t.then==`function`?_s(t):t,e=e.useState()[0],(Xo===null?null:Xo.memoizedState)!==e&&(Yo.flags|=1024),t}function ds(){var e=ts!==0;return ts=0,e}function fs(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ps(e){if(Qo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Qo=!1}Jo=0,Zo=Xo=Yo=null,$o=!1,ns=ts=0,rs=null}function ms(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Zo===null?Yo.memoizedState=Zo=e:Zo=Zo.next=e,Zo}function hs(){if(Xo===null){var e=Yo.alternate;e=e===null?null:e.memoizedState}else e=Xo.next;var t=Zo===null?Yo.memoizedState:Zo.next;if(t!==null)Zo=t,Xo=e;else{if(e===null)throw Yo.alternate===null?Error(i(467)):Error(i(310));Xo=e,e={memoizedState:Xo.memoizedState,baseState:Xo.baseState,baseQueue:Xo.baseQueue,queue:Xo.queue,next:null},Zo===null?Yo.memoizedState=Zo=e:Zo=Zo.next=e}return Zo}function gs(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function _s(e){var t=ns;return ns+=1,rs===null&&(rs=[]),e=co(rs,e,t),t=Yo,(Zo===null?t.memoizedState:Zo.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?Cc:wc),e}function vs(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return _s(e);if(e.$$typeof===ge)return;if(e.$$typeof===oe)return Na(e)}throw Error(i(438,String(e)))}function ys(e){var t=null,n=Yo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=Yo.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=gs(),Yo.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]=me;return t.index++,n}function bs(e,t){return typeof t==`function`?t(e):t}function xs(e){return Ss(hs(),Xo,e)}function Ss(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?(Jo&f)===f:(pd&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===qa&&(d=!0);else if((Jo&p)===p){u=u.next,p===qa&&(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,Yo.lanes|=p,xd|=p;f=u.action,es&&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,Yo.lanes|=f,xd|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Yr(o,e.memoizedState)&&(Vc=!0,d&&(n=Ja,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 Cs(e){var t=hs(),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);Yr(o,t.memoizedState)||(Vc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ws(e,t,n){var r=Yo,a=hs(),o=ma;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Yr((Xo||a).memoizedState,n);if(s&&(a.memoizedState=n,Vc=!0),a=a.queue,Ys(Ds.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Zo!==null&&!!(Zo.memoizedState.tag&1),Ws(e?9:8,{destroy:void 0},Es.bind(null,r,a,n,t),null),e){if(r.flags|=2048,dd===null)throw Error(i(349));o||Jo&127||Ts(r,t,n)}return n}function Ts(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Yo.updateQueue,t===null?(t=gs(),Yo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Es(e,t,n,r){t.value=n,t.getSnapshot=r,Os(t)&&ks(e)}function Ds(e,t,n){return n(function(){Os(t)&&ks(e)})}function Os(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Yr(e,n)}catch{return!0}}function ks(e){var t=Li(e,2);t!==null&&Yd(t,e,2)}function As(e){var t=ms();if(typeof e==`function`){var n=e;if(e=n(),es){at(!0);try{n()}finally{at(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bs,lastRenderedState:e},t}function js(e,t,n,r){return e.baseState=n,Ss(e,Xo,typeof r==`function`?r:bs)}function Ms(e,t,n,r,a){if(yc(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};D.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Ns(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ns(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=D.T,o={};o.types=a===null?null:a.types,D.T=o;try{var s=n(i,r),c=D.S;c!==null&&c(o,s),Ps(e,t,s)}catch(n){Is(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),D.T=a}}else try{a=n(i,r),Ps(e,t,a)}catch(n){Is(e,t,n)}}function Ps(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Fs(e,t,n)},function(n){return Is(e,t,n)}):Fs(e,t,n)}function Fs(e,t,n){t.status=`fulfilled`,t.value=n,Ls(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ns(e,n)))}function Is(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Ls(t),t=t.next;while(t!==r)}e.action=null}function Ls(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Rs(e,t){return t}function zs(e,t){if(ma){var n=dd.formState;if(n!==null){a:{var r=Yo;if(ma){if(pa){b:{for(var i=pa,a=ga;i.nodeType!==8;)if(!a||(i=Dm(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){pa=Dm(i.nextSibling),r=i.data===`F!`;break a}}va(r)}r=!1}r&&(t=n[0])}}return n=ms(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Rs,lastRenderedState:t},n.queue=r,n=gc.bind(null,Yo,r),r.dispatch=n,r=As(!1),a=vc.bind(null,Yo,!1,r.queue),r=ms(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Ms.bind(null,Yo,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Bs(e){return Vs(hs(),Xo,e)}function Vs(e,t,n){if(t=Ss(e,t,Rs)[0],e=xs(bs)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=_s(t)}catch(e){throw e===ro?ao:e}else r=t;t=hs();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(Yo.flags|=2048,Ws(9,{destroy:void 0},Hs.bind(null,i,n),null)),[r,a,e]}function Hs(e,t){e.action=t}function Us(e){var t=hs(),n=Xo;if(n!==null)return Vs(t,n,e);hs(),t=t.memoizedState,n=hs();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ws(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=Yo.updateQueue,t===null&&(t=gs(),Yo.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 Gs(){return hs().memoizedState}function Ks(e,t,n,r){var i=ms();Yo.flags|=e,i.memoizedState=Ws(1|t,{destroy:void 0},n,r===void 0?null:r)}function qs(e,t,n,r){var i=hs();r=r===void 0?null:r;var a=i.memoizedState.inst;Xo!==null&&r!==null&&os(r,Xo.memoizedState.deps)?i.memoizedState=Ws(t,a,n,r):(Yo.flags|=e,i.memoizedState=Ws(1|t,a,n,r))}function Js(e,t){Ks(8390656,8,e,t)}function Ys(e,t){qs(2048,8,e,t)}function Xs(e){Yo.flags|=4;var t=Yo.updateQueue;if(t===null)t=gs(),Yo.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Zs(e){var t=hs().memoizedState;return Xs({ref:t,nextImpl:e}),function(){if(ud&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Qs(e,t){return qs(4,2,e,t)}function $s(e,t){return qs(4,4,e,t)}function ec(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 tc(e,t,n){n=n==null?null:n.concat([e]),qs(4,4,ec.bind(null,t,e),n)}function nc(){}function rc(e,t){var n=hs();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&os(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ic(e,t){var n=hs();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&os(t,r[1]))return r[0];if(r=e(),es){at(!0);try{e()}finally{at(!1)}}return n.memoizedState=[r,t],r}function F(e,t,n){return n===void 0||Jo&1073741824&&!(pd&261930)?e.memoizedState=t:(e.memoizedState=n,e=qd(),Yo.lanes|=e,xd|=e,n)}function ac(e,t,n,r){return Yr(n,t)?n:Po.current===null?!(Jo&106)||Jo&1073741824&&!(pd&261930)?(Vc=!0,e.memoizedState=n):(e=qd(),Yo.lanes|=e,xd|=e,t):(e=F(e,n,r),Yr(e,t)||(Vc=!0),e)}function oc(e,t,n,r,i){var a=O.p;O.p=a!==0&&8>a?a:8;var o=D.T,s={};s.types=o===null?null:o.types,D.T=s,vc(e,!1,t,n);try{var c=i(),l=D.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?_c(e,t,Za(c,r),Kd(e)):_c(e,t,r,Kd(e))}catch(n){_c(e,t,{then:function(){},status:`rejected`,reason:n},Kd())}finally{O.p=a,o!==null&&s.types!==null&&(o.types=s.types),D.T=o}}function sc(){}function cc(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=lc(e).queue;oc(e,a,t,Se,n===null?sc:function(){return uc(e),n(r)})}function lc(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Se,baseState:Se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:bs,lastRenderedState:Se},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:bs,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function uc(e){var t=lc(e);t.next===null&&(t=e.alternate.memoizedState),_c(e,t.next.queue,{},Kd())}function dc(){return Na(Th)}function fc(){return hs().memoizedState}function pc(){return hs().memoizedState}function mc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Kd();e=To(n);var r=Eo(t,e,n);r!==null&&(Yd(r,t,n),Do(r,t,n)),t={cache:Ba()},e.payload=t;return}t=t.return}}function hc(e,t,n){var r=Kd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},yc(e)?bc(t,n):(n=Ii(e,t,n,r),n!==null&&(Yd(n,e,r),xc(n,t,r)))}function gc(e,t,n){_c(e,t,n,Kd())}function _c(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(yc(e))bc(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,Yr(s,o))return Fi(e,t,i,0),dd===null&&Pi(),!1}catch{}if(n=Ii(e,t,i,r),n!==null)return Yd(n,e,r),xc(n,t,r),!0}return!1}function vc(e,t,n,r){if(r={lane:2,revertLane:Xf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},yc(e)){if(t)throw Error(i(479))}else t=Ii(e,n,r,2),t!==null&&Yd(t,e,2)}function yc(e){var t=e.alternate;return e===Yo||t!==null&&t===Yo}function bc(e,t){$o=Qo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function xc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ct(e,n)}}var Sc={readContext:Na,use:vs,useCallback:as,useContext:as,useEffect:as,useImperativeHandle:as,useLayoutEffect:as,useInsertionEffect:as,useMemo:as,useReducer:as,useRef:as,useState:as,useDebugValue:as,useDeferredValue:as,useTransition:as,useSyncExternalStore:as,useId:as,useHostTransitionStatus:as,useFormState:as,useActionState:as,useOptimistic:as,useMemoCache:as,useCacheRefresh:as,useEffectEvent:as},Cc={readContext:Na,use:vs,useCallback:function(e,t){return ms().memoizedState=[e,t===void 0?null:t],e},useContext:Na,useEffect:Js,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Ks(4194308,4,ec.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ks(4194308,4,e,t)},useInsertionEffect:function(e,t){Ks(4,2,e,t)},useMemo:function(e,t){var n=ms();t=t===void 0?null:t;var r=e();if(es){at(!0);try{e()}finally{at(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ms();if(n!==void 0){var i=n(t);if(es){at(!0);try{n(t)}finally{at(!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=hc.bind(null,Yo,e),[r.memoizedState,e]},useRef:function(e){var t=ms();return e={current:e},t.memoizedState=e},useState:function(e){e=As(e);var t=e.queue,n=gc.bind(null,Yo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:nc,useDeferredValue:function(e,t){return F(ms(),e,t)},useTransition:function(){var e=As(!1);return e=oc.bind(null,Yo,e.queue,!0,!1),ms().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Yo,a=ms();if(ma){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),dd===null)throw Error(i(349));pd&127||Ts(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Js(Ds.bind(null,r,o,e),[e]),r.flags|=2048,Ws(9,{destroy:void 0},Es.bind(null,r,o,n,t),null),n},useId:function(){var e=ms(),t=dd.identifierPrefix;if(ma){var n=sa,r=oa;n=(r&~(1<<32-ot(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=ts++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=is++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:dc,useFormState:zs,useActionState:zs,useOptimistic:function(e){var t=ms();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=vc.bind(null,Yo,!0,n),n.dispatch=t,[e,t]},useMemoCache:ys,useCacheRefresh:function(){return ms().memoizedState=mc.bind(null,Yo)},useEffectEvent:function(e){var t=ms(),n={impl:e};return t.memoizedState=n,function(){if(ud&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},wc={readContext:Na,use:vs,useCallback:rc,useContext:Na,useEffect:Ys,useImperativeHandle:tc,useInsertionEffect:Qs,useLayoutEffect:$s,useMemo:ic,useReducer:xs,useRef:Gs,useState:function(){return xs(bs)},useDebugValue:nc,useDeferredValue:function(e,t){return ac(hs(),Xo.memoizedState,e,t)},useTransition:function(){var e=xs(bs)[0],t=hs().memoizedState;return[typeof e==`boolean`?e:_s(e),t]},useSyncExternalStore:ws,useId:fc,useHostTransitionStatus:dc,useFormState:Bs,useActionState:Bs,useOptimistic:function(e,t){return js(hs(),Xo,e,t)},useMemoCache:ys,useCacheRefresh:pc,useEffectEvent:Zs},Tc={readContext:Na,use:vs,useCallback:rc,useContext:Na,useEffect:Ys,useImperativeHandle:tc,useInsertionEffect:Qs,useLayoutEffect:$s,useMemo:ic,useReducer:Cs,useRef:Gs,useState:function(){return Cs(bs)},useDebugValue:nc,useDeferredValue:function(e,t){var n=hs();return Xo===null?F(n,e,t):ac(n,Xo.memoizedState,e,t)},useTransition:function(){var e=Cs(bs)[0],t=hs().memoizedState;return[typeof e==`boolean`?e:_s(e),t]},useSyncExternalStore:ws,useId:fc,useHostTransitionStatus:dc,useFormState:Us,useActionState:Us,useOptimistic:function(e,t){var n=hs();return Xo===null?(n.baseState=e,[e,n.queue.dispatch]):js(n,Xo,e,t)},useMemoCache:ys,useCacheRefresh:pc,useEffectEvent:Zs};function Ec(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:T({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Dc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Kd(),i=To(r);i.payload=t,n!=null&&(i.callback=n),t=Eo(e,i,r),t!==null&&(Yd(t,e,r),Do(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Kd(),i=To(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Eo(e,i,r),t!==null&&(Yd(t,e,r),Do(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Kd(),r=To(n);r.tag=2,t!=null&&(r.callback=t),t=Eo(e,r,n),t!==null&&(Yd(t,e,n),Do(t,e,n))}};function Oc(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?!Xr(n,r)||!Xr(i,a):!0}function kc(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&&Dc.enqueueReplaceState(t,t.state,null)}function Ac(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=T({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function jc(e){Ai(e)}function Mc(e){console.error(e)}function Nc(e){Ai(e)}function Pc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Fc(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 Ic(e,t,n){return n=To(n),n.tag=3,n.payload={element:null},n.callback=function(){Pc(e,t)},n}function Lc(e){return e=To(e),e.tag=3,e}function Rc(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(){Fc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Fc(t,n,r),typeof i!=`function`&&(Nd===null?Nd=new Set([this]):Nd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function zc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&M(t,n,a,!0),n=zo.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Bo===null?cf():n.alternate===null&&bd===0&&(bd=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===oo?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Af(e,r,a)),!1;case 22:return n.flags|=65536,r===oo?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)),Af(e,r,a)),!1}throw Error(i(435,n.tag))}return Af(e,r,a),cf(),!1}if(ma)return t=zo.current,t===null?(r!==_a&&(t=Error(i(423),{cause:r}),wa(Qi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Qi(r,n),a=Ic(e.stateNode,r,a),Oo(e,a),bd!==4&&(bd=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==_a&&(e=Error(i(422),{cause:r}),wa(Qi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Qi(o,n),Ed===null?Ed=[o]:Ed.push(o),bd!==4&&(bd=2),t===null)return!0;r=Qi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Ic(n.stateNode,r,e),Oo(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`&&(Nd===null||!Nd.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Lc(a),Rc(a,e,n,r),Oo(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Bc=Error(i(461)),Vc=!1;function Hc(e,t,n,r){t.child=e===null?xo(t,null,n,r):bo(t,e.child,n,r)}function Uc(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 Ma(t),r=ss(e,t,n,o,a,i),s=ds(),e!==null&&!Vc?(fs(e,t,i),_l(e,t,i)):(ma&&s&&ua(t),t.flags|=1,Hc(e,t,r,i),t.child)}function Wc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Ui(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Gc(e,t,a,r,i)):(e=Ki(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!vl(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Xr:n,n(o,r)&&e.ref===t.ref)return _l(e,t,i)}return t.flags|=1,e=Wi(a,r),e.ref=t.ref,e.return=t,t.child=e}function Gc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Xr(a,r)&&e.ref===t.ref){if(Vc=!1,t.pendingProps=r=a,vl(e,i))e.flags&131072&&(Vc=!0);else return t.lanes=e.lanes,_l(e,t,i)}}return $c(e,t,n,r,i)}function Kc(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 Jc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&to(t,a===null?null:a.cachePool),a===null?Lo():Io(t,a),Ho(t);else return r=t.lanes=536870912,Jc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&to(t,null),Lo(),Uo()):(to(t,a.cachePool),Io(t,a),Uo(),t.memoizedState=null);return Hc(e,t,i,n),t.child}function qc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Jc(e,t,n,r,i){var a=eo();return a=a===null?null:{parent:za._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&to(t,null),Lo(),Ho(t),e!==null&&M(e,t,r,!0),t.childLanes=i,null}function Yc(e,t){return t=cl({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Xc(e,t,n){return bo(t,e.child,null,n),e=Yc(t,t.pendingProps),e.flags|=2,Wo(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(ma){if(r.mode===`hidden`)return e=Yc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},qc(null,e);if(N(t),(e=pa)?(e=Cm(e,ga),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:aa===null?null:{id:oa,overflow:sa},retryLane:536870912,hydrationErrors:null},n=Yi(e),n.return=t,t.child=n,fa=t,pa=null)):e=null,e===null)throw va(t);return t.lanes=536870912,null}return Yc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(N(t),a){if(t.flags&256)t.flags&=-257,t=Xc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Vc||M(e,t,n,!1),a=(n&e.childLanes)!==0,Vc||a){if(Po.current===null){if(r=dd,r!==null&&(s=wt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Li(e,s),Yd(r,e,s),Bc;cf()}t=Xc(e,t,n)}else e=o.treeContext,pa=Dm(s.nextSibling),fa=t,ma=!0,ha=null,ga=!1,e!==null&&A(t,e),t=Yc(t,r),t.flags|=134221824;return t}return e=Wi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Qc(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 $c(e,t,n,r,i){return Ma(t),n=ss(e,t,n,r,void 0,i),r=ds(),e!==null&&!Vc?(fs(e,t,i),_l(e,t,i)):(ma&&r&&ua(t),t.flags|=1,Hc(e,t,n,i),t.child)}function el(e,t,n,r,i,a){return Ma(t),t.updateQueue=null,n=ls(t,r,n,i),cs(e),r=ds(),e!==null&&!Vc?(fs(e,t,a),_l(e,t,a)):(ma&&r&&ua(t),t.flags|=1,Hc(e,t,n,a),t.child)}function tl(e,t,n,r,i){if(Ma(t),t.stateNode===null){var a=Bi,o=n.contextType;typeof o==`object`&&o&&(a=Na(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Dc,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?Na(o):Bi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Ec(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&&Dc.enqueueReplaceState(a,a.state,null),jo(t,r,a,i),Ao(),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=Ac(n,s);a.props=c;var l=a.context,u=n.contextType;o=Bi,typeof u==`object`&&u&&(o=Na(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)&&kc(t,a,r,o),So=!1;var f=t.memoizedState;a.state=f,jo(t,r,a,i),Ao(),l=t.memoizedState,s||f!==l||So?(typeof d==`function`&&(Ec(t,n,d,r),l=t.memoizedState),(c=So||Oc(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,wo(e,t),o=t.memoizedProps,u=Ac(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Bi,typeof l==`object`&&l&&(c=Na(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)&&kc(t,a,r,c),So=!1,f=t.memoizedState,a.state=f,jo(t,r,a,i),Ao();var p=t.memoizedState;o!==d||f!==p||So||e!==null&&e.dependencies!==null&&ja(e.dependencies)?(typeof s==`function`&&(Ec(t,n,s,r),p=t.memoizedState),(u=So||Oc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ja(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,Qc(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=bo(t,e.child,null,i),t.child=bo(t,null,n,i)):Hc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=_l(e,t,i),e}function nl(e,t,n,r){return Sa(),t.flags|=256,Hc(e,t,n,r),t.child}var rl={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function il(e){return{baseLanes:e,cachePool:no()}}function al(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=wd),e}function ol(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Go.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(ma){if(i?Vo(t):Uo(),(e=pa)?(e=Cm(e,ga),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:aa===null?null:{id:oa,overflow:sa},retryLane:536870912,hydrationErrors:null},n=Yi(e),n.return=t,t.child=n,fa=t,pa=null)):e=null,e===null)throw va(t);return t.lanes=Tm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Uo(),i=t.mode,a=cl({mode:`hidden`,children:a},i),r=qi(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=il(n),r.childLanes=al(e,o,n),t.memoizedState=rl,qc(null,r)):(Vo(t),sl(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return ul(e,t,a,o,r,c,s,n)}return i?(Uo(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Wi(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=qi(i,a,n,null),i.flags|=2):i=Wi(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,qc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=il(n):(a=i.cachePool,a===null?a=no():(s=za._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=al(e,o,n),t.memoizedState=rl,qc(e.child,r)):(Vo(t),n=e.child,e=n.sibling,n=Wi(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 sl(e,t){return t=cl({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function cl(e,t){return e=Hi(22,e,null,t),e.lanes=0,e}function ll(e,t,n){return bo(t,e.child,null,n),e=sl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ul(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(Vo(t),t.flags&=-257,ll(e,t,c)):t.memoizedState===null?(Uo(),o=a.fallback,s=t.mode,a=cl({mode:`visible`,children:a.children},s),o=qi(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,bo(t,e.child,null,c),a=t.child,a.memoizedState=il(c),a.childLanes=al(e,r,c),t.memoizedState=rl,qc(null,a)):(Uo(),t.child=e.child,t.flags|=128,null);if(Vo(t),Tm(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,wa({value:a,source:null,stack:null})),ll(e,t,c)}if(Vc||M(e,t,c,!1),r=(c&e.childLanes)!==0,Vc||r){if(Po.current!==null)return ll(e,t,c);if(r=dd,r!==null&&(a=wt(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,Li(e,a),Yd(r,e,a),Bc;return wm(o)||cf(),ll(e,t,c)}return wm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,pa=Dm(o.nextSibling),fa=t,ma=!0,ha=null,ga=!1,e!==null&&A(t,e),t=sl(t,a.children),t.flags|=134221824,t)}function dl(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ka(e.return,t,n)}function fl(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&qo(n)===null&&(t=e),e=e.sibling}return t}function pl(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 ml(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 hl(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Go.current;if(t.flags&128)return P(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,P(t,o),i===`backwards`&&e!==null?(ml(e),Hc(e,t,r,n),ml(e)):Hc(e,t,r,n),r=ma?na:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&dl(e,n,t);else if(e.tag===19)dl(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=fl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,ml(t)),pl(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&&qo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}pl(t,!0,n,null,a,r);break;case`together`:pl(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=fl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),pl(t,!1,i,n,a,r)}return t.child}function gl(e,t,n){var r=t.pendingProps;return Oa(t,t.type,r.value),Hc(e,t,r.children,n),t.child}function _l(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),xd|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(M(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=Wi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Wi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function vl(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&ja(e)))}function yl(e,t,n){switch(t.tag){case 3:Me(t,t.stateNode.containerInfo),Oa(t,za,e.memoizedState.cache),Sa();break;case 27:case 5:Pe(t);break;case 4:Me(t,t.stateNode.containerInfo);break;case 10:Oa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,N(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Vo(t),t.flags|=128,null;r=M(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?ol(e,t,n):(Vo(t),e=_l(e,t,n),e===null?null:e.sibling)}Vo(t);break;case 19:if(t.flags&128)return hl(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(M(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return hl(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),P(t,Go.current),r)break;return null;case 22:return t.lanes=0,Kc(e,t,n,t.pendingProps);case 24:Oa(t,za,e.memoizedState.cache)}return _l(e,t,n)}function bl(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Vc=!0;else{if(!vl(e,n)&&!(t.flags&128))return Vc=!1,yl(e,t,n);Vc=!!(e.flags&131072)}}else Vc=!1,ma&&t.flags&1048576&&la(t,na,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=lo(t.elementType),t.type=e,typeof e==`function`)Ui(e)?(r=Ac(e,r),t.tag=1,t=tl(null,t,e,r,n)):(t.tag=0,t=$c(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===se){t.tag=11,t=Uc(null,t,e,r,n);break a}if(a===ue){t.tag=14,t=Wc(null,t,e,r,n);break a}if(a===oe){t.tag=10,t.type=e,t=gl(null,t,n);break a}}throw t=be(e)||e,Error(i(306,t,``))}}return t;case 0:return $c(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Ac(r,t.pendingProps),tl(e,t,r,a,n);case 3:a:{if(Me(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,wo(e,t),jo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Oa(t,za,r),r!==o.cache&&Aa(t,[za],n,!0),Ao(),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=nl(e,t,r,n);break a}if(r!==a){a=Qi(Error(i(424)),t),wa(a),t=nl(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(pa=Dm(e.firstChild),fa=t,ma=!0,ha=null,ga=!0,n=xo(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(Sa(),r===a){t=_l(e,t,n);break a}Hc(e,t,r,n)}t=t.child}return t;case 26:return Qc(e,t),e===null?(n=Zm(t.type,null,t.pendingProps,null))?t.memoizedState=n:ma||(t.stateNode=Ap(t.type,t.pendingProps,Ae.current,t)):t.memoizedState=Zm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Pe(t),e===null&&ma&&(r=t.stateNode=Nm(t.type,t.pendingProps,Ae.current),fa=t,ga=!0,a=pa,Bp(t.type)?(Om=a,pa=Dm(r.firstChild)):pa=a),Hc(e,t,t.pendingProps.children,n),Qc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ma&&((a=r=pa)&&(r=xm(r,t.type,t.pendingProps,ga),r===null?a=!1:(t.stateNode=r,fa=t,pa=Dm(r.firstChild),ga=!1,a=!0)),a||va(t)),Pe(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,jp(a,o)?r=null:s!==null&&jp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=ss(e,t,us,null,null,n),Th._currentValue=a),Qc(e,t),Hc(e,t,r,n),t.child;case 6:return e===null&&ma&&((e=n=pa)&&(n=Sm(n,t.pendingProps,ga),n===null?e=!1:(t.stateNode=n,fa=t,pa=null,e=!0)),e||va(t)),null;case 13:return ol(e,t,n);case 4:return Me(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=bo(t,null,r,n):Hc(e,t,r,n),t.child;case 11:return Uc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Qc(e,t),Hc(e,t,r,n),t.child;case 8:return Hc(e,t,t.pendingProps.children,n),t.child;case 12:return Hc(e,t,t.pendingProps.children,n),t.child;case 10:return gl(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,Ma(t),a=Na(a),r=r(a),t.flags|=1,Hc(e,t,r,n),t.child;case 14:return Wc(e,t,t.type,t.pendingProps,n);case 15:return Gc(e,t,t.type,t.pendingProps,n);case 19:return hl(e,t,n);case 31:return Zc(e,t,n);case 22:return Kc(e,t,n,t.pendingProps);case 24:return Ma(t),r=Na(za),e===null?(a=eo(),a===null&&(a=dd,o=Ba(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Co(t),Oa(t,za,a)):((e.lanes&n)!==0&&(wo(e,t),jo(t,null,null,n),Ao()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Oa(t,za,r),r!==a.cache&&Aa(t,[za],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Oa(t,za,r))),Hc(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:ma&&ua(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Qc(e,t),Hc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function xl(e){e.flags|=4}function Sl(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?fh(t,r):fh(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(af())e.flags|=8192;else throw uo=oo,io}}else e.flags&=-16777217}function Cl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!ph(t)){if(af())e.flags|=8192;else throw uo=oo,io}}function wl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:vt(),e.lanes|=t,Td|=t)}function Tl(e,t){if(!ma)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 El(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 Dl(e,t,n){var r=t.pendingProps;switch(da(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return El(t),null;case 1:return El(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),j(za),Ne(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(xa(t)?xl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ca())),El(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(xl(t),o===null?(El(t),Sl(t,a,null,r,n)):(El(t),Cl(t,o))):o?o===e.memoizedState?(El(t),t.flags&=-16777217):(xl(t),El(t),Cl(t,o)):(e=e.memoizedProps,e!==r&&xl(t),El(t),Sl(t,a,e,r,n)),null;case 27:if(Fe(t),n=Ae.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&xl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return El(t),t.subtreeFlags&=-33554433,null}e=Oe.current,xa(t)?ya(t,e):(e=Nm(a,r,n),t.stateNode=e,xl(t))}return El(t),t.subtreeFlags&=-33554433,null;case 5:if(Fe(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&xl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return El(t),t.subtreeFlags&=-33554433,null}if(o=Oe.current,xa(t))ya(t,o);else{var s=Dp(Ae.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[At]=t,o[jt]=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(bp(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&&xl(t)}}return El(t),t.subtreeFlags&=-33554433,Sl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&xl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=Ae.current,xa(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=fa,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[At]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||_p(e.nodeValue,n)),e||va(t,!0)}else e=Dp(e).createTextNode(r),e[At]=t,t.stateNode=e}return El(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=xa(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[At]=t}else Sa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;El(t),e=!1}else n=Ca(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Wo(t),t):(Wo(t),null);if(t.flags&128)throw Error(i(558))}return El(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=xa(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[At]=t}else Sa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;El(t),a=!1}else a=Ca(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Wo(t),t):(Wo(t),null)}return Wo(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),wl(t,t.updateQueue),El(t),null);case 4:return Ne(),e===null&&sp(t.stateNode.containerInfo),t.flags|=67108864,El(t),null;case 10:return j(t.type),El(t),null;case 19:if(Ko(t),r=t.memoizedState,r===null)return El(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)Tl(r,!1);else{if(bd!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=qo(e),o!==null){for(t.flags|=128,Tl(r,!1),e=o.updateQueue,t.updateQueue=e,wl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Gi(n,e),n=n.sibling;return P(t,Go.current&1|2),ma&&ca(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Je()>jd&&(t.flags|=128,a=!0,Tl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=qo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,wl(t,e),Tl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!ma)return El(t),null}else 2*Je()-r.renderingStartTime>jd&&n!==536870912&&(t.flags|=128,a=!0,Tl(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=Je(),e.sibling=null,o=Go.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||ma?P(t,o):(n=o,De(zo,t),De(Go,n),Bo===null&&(Bo=t)),ma&&ca(t,r.treeForkCount),e}return El(t),null;case 22:case 23:return Wo(t),Ro(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(El(t),t.subtreeFlags&6&&(t.flags|=8192)):El(t),n=t.updateQueue,n!==null&&wl(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&&Ee($a),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),j(za),El(t),null;case 25:return null;case 30:return t.flags|=33554432,El(t),null}throw Error(i(156,t.tag))}function Ol(e,t){switch(da(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return j(za),Ne(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Fe(t),null;case 31:if(t.memoizedState!==null){if(Wo(t),t.alternate===null)throw Error(i(340));Sa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Wo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Sa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ko(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 Ne(),null;case 10:return j(t.type),null;case 22:case 23:return Wo(t),Ro(),e!==null&&Ee($a),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return j(za),null;case 25:return null;default:return null}}function kl(e,t){switch(da(t),t.tag){case 3:j(za),Ne();break;case 26:case 27:case 5:Fe(t);break;case 4:Ne();break;case 31:t.memoizedState!==null&&Wo(t);break;case 13:Wo(t);break;case 19:Ko(t);break;case 10:j(t.type);break;case 22:case 23:Wo(t),Ro(),e!==null&&Ee($a);break;case 24:j(za)}}function Al(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){kf(t,t.return,e)}}function jl(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){kf(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){kf(t,t.return,e)}}function Ml(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{No(t,n)}catch(t){kf(e,e.return,t)}}}function Nl(e,t,n){n.props=Ac(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){kf(e,t,n)}}function Pl(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=Qp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new $p(e);p(e.child,!1,gm,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){kf(e,t,n)}}function Fl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){kf(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){kf(e,t,n)}else n.current=null}}function Il(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++)vm(e.stateNode,t[n])}function Ll(e){for(var t=e.return;t!==null&&(Bl(t)&&vm(e.stateNode,t.stateNode),!zl(t));)t=t.return}function Rl(e){for(var t=e.return;t!==null&&(Bl(t)&&ym(e.stateNode,t.stateNode),!zl(t));)t=t.return}function zl(e){return e.tag===5||e.tag===3||e.tag===27}function Bl(e){return e&&e.tag===7&&e.stateNode!==null}function Vl(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){kf(e,e.return,t)}}function Hl(e,t,n){try{var r=e.stateNode;Sp(r,e.type,n,t),r[jt]=t}catch(t){kf(e,e.return,t)}}function Ul(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Bp(e.type)||e.tag===4}function Wl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Ul(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&&Bp(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 Gl(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=Dn)),Il(e,r),en=!0;else if(i!==4&&(i===27&&(Il(e,r),r=null,Bp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Gl(e,t,n,r),e=e.sibling;e!==null;)Gl(e,t,n,r),e=e.sibling}function Kl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),Il(e,r),en=!0;else if(i!==4&&(i===27&&(Il(e,r),r=null,Bp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Kl(e,t,n,r),e=e.sibling;e!==null;)Kl(e,t,n,r),e=e.sibling}function ql(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);bp(t,r,n),t[At]=e,t[jt]=n}catch(t){kf(e,e.return,t)}}var Jl=!1,Yl=null;function Xl(e){(e.tag===30||e.subtreeFlags&33554432)&&(Jl=!0)}var Zl=null;function Ql(){var e=Zl;return Zl=null,e}var $l=0;function eu(e,t,n,r,i){return $l=0,tu(e.child,t,n,r,i)}function tu(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Kp(o);r.push(s),s.view&&(a=!0)}else a||Kp(o).view&&(a=!0);Jl=!0,Up(o,$l===0?t:t+`_`+$l,n),$l++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&i||tu(e.child,t,n,r,i)&&(a=!0));e=e.sibling}return a}function nu(e,t){for(;e!==null;)e.tag===5?Wp(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||nu(e.child,t)),e=e.sibling}function ru(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(ru(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=ki(t.default,t.share),t!==`none`&&(eu(e,n,t,null,!1)||nu(e.child,!1))}e=e.sibling}}function iu(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=Di(r,n),a=ki(r.default,n.paired?r.share:r.enter);a===`none`?ru(e):eu(e,i,a,null,!1)?(ru(e),n.paired||t||Jd(e,r.onEnter)):nu(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)iu(e,t),e=e.sibling;else ru(e)}function au(e){if(Yl!==null&&Yl.size!==0){var t=Yl;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=ki(n.default,n.share);if(a!==`none`&&(eu(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Jd(e,n.onShare)):nu(e.child,!1)),t.delete(r),t.size===0)break}}}au(e)}e=e.sibling}}}function ou(e){if(e.tag===30){var t=e.memoizedProps,n=Di(t,e.stateNode),r=Yl===null?void 0:Yl.get(n),i=ki(t.default,r===void 0?t.exit:t.share);i!==`none`&&(eu(e,n,i,null,!1)?r===void 0?Jd(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Yl.delete(n),Jd(e,t.onShare)):nu(e.child,!1)),Yl!==null&&au(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)ou(e),e=e.sibling;else Yl!==null&&au(e)}function su(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=Di(t,e.stateNode);t=ki(t.default,t.update),e.flags&=-5,t!==`none`&&eu(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&su(e);e=e.sibling}}function cu(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,nu(e.child,!1))}cu(e)}e=e.sibling}}function lu(e){if(e.tag===30)e.stateNode.paired=null,nu(e.child,!1),cu(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)lu(e),e=e.sibling;else cu(e)}function uu(e){for(e=e.child;e!==null;)e.tag===30?nu(e.child,!1):e.subtreeFlags&33554432&&uu(e),e=e.sibling}function du(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&$l<a.length){var l=a[$l],u=Kp(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&&Up(c,$l===0?n:n+`_`+$l,i),s&&e.flags&4||(Zl===null&&(Zl=[]),Zl.push(c,$l===0?r:r+`_`+$l,t.memoizedProps)),$l++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:du(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function fu(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=Di(n,r),a=ki(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(qp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;$l=0,i=du(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Jd(e,n.onUpdate))}else e.subtreeFlags&33554432&&fu(e,t);e=e.sibling}}var pu=!1,mu=!1,hu=!1,gu=!1,_u=typeof WeakSet==`function`?WeakSet:Set,vu=null,yu=!1,bu=!1,xu=!1,Su=!1;function Cu(e,t,n){if(e=e.containerInfo,Tp=Ph,e=ti(e),ni(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(Ep={focusedElem:e,selectionRange:r},Ph=!1,n=(n&335544064)===n,vu=t,t=n?9270:1024;vu!==null;){if(e=vu,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&ou(r[a]);if(e.alternate===null&&e.flags&2)n&&Xl(e),wu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&ou(r),wu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Xl(e),wu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,vu=r):(n&&su(e),wu(n))}}Yl=null}function wu(e){for(;vu!==null;){var t=vu,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=Ac(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){kf(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)bm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:bm(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=ki(a.default,a.update),a!==`none`&&eu(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,vu=r;break}vu=t.return}}function Tu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Gu(e,n),r&4&&Al(5,n);break;case 1:if(Gu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){kf(n,n.return,e)}else{var i=Ac(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){kf(n,n.return,e)}}}r&64&&Ml(n),r&512&&Pl(n,n.return);break;case 3:if(Gu(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{No(e,t)}catch(e){kf(n,n.return,e)}}break;case 27:t===null&&r&4&&ql(n);case 26:case 5:Gu(e,n),t===null&&r&4&&Vl(n),r&512&&Pl(n,n.return);break;case 12:Gu(e,n);break;case 31:Gu(e,n),r&4&&Pu(e,n);break;case 13:Gu(e,n),r&4&&Fu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Nf.bind(null,n),Em(e,n))));break;case 22:if(r=n.memoizedState!==null||pu,!r){var a=t!==null&&t.memoizedState!==null||mu;t=pu,i=mu,pu=r,(mu=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),qu(e,n,r)):Gu(e,n),pu=t,mu=i}break;case 30:Gu(e,n),r&512&&Pl(n,n.return);break;case 7:r&512&&Pl(n,n.return);default:Gu(e,n)}}function Eu(e,t){for(e=e.child;e!==null;)Du(e,t),e=e.sibling}function Du(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){kf(e,e.return,t)}Ou(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,en=!0}catch(t){kf(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Hp(s,!0):Hp(e.stateNode,!1)}catch(t){kf(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&Eu(e,t);break;default:Eu(e,t)}}function Ou(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:Du(n,r);break a;case 22:n.memoizedState===null&&Ou(n,r);break a;default:Ou(n,r)}}e=e.sibling}}function ku(e){var t=e.alternate;t!==null&&(e.alternate=null,ku(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&zt(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 Au=null,ju=!1;function Mu(e,t,n){for(n=n.child;n!==null;)Nu(e,t,n),n=n.sibling}function Nu(e,t,n){if(it&&typeof it.onCommitFiberUnmount==`function`)try{it.onCommitFiberUnmount(rt,n)}catch{}switch(n.tag){case 26:mu||Fl(n,t),Mu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!mu&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:mu||Fl(n,t),Rl(n);var r=Au,i=ju;Bp(n.type)&&(Au=n.stateNode,ju=!1),Mu(e,t,n),Pm(n.stateNode,n.type,n.memoizedProps),Au=r,ju=i;break;case 5:mu||Fl(n,t),Rl(n);case 6:if(n.tag===6&&Rl(n),r=Au,i=ju,Au=null,Mu(e,t,n),Au=r,ju=i,Au!==null){if(ju)try{(Au.nodeType===9?Au.body:Au.nodeName===`HTML`?Au.ownerDocument.body:Au).removeChild(n.stateNode),en=!0}catch(e){kf(n,t,e)}else try{Au.removeChild(n.stateNode),en=!0}catch(e){kf(n,t,e)}}break;case 18:Au!==null&&(ju?(e=Au,Vp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),og(e)):Vp(Au,n.stateNode));break;case 4:r=Au,i=ju,Au=n.stateNode.containerInfo,ju=!0,Mu(e,t,n),Au=r,ju=i;break;case 0:case 11:case 14:case 15:jl(2,n,t),mu||jl(4,n,t),Mu(e,t,n);break;case 1:mu||(Fl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Nl(n,t,r)),Mu(e,t,n);break;case 21:Mu(e,t,n);break;case 22:mu=(r=mu)||n.memoizedState!==null,Mu(e,t,n),mu=r;break;case 30:Fl(n,t),Mu(e,t,n);break;case 7:mu||Fl(n,t),Mu(e,t,n);break;default:Mu(e,t,n)}}function Pu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{og(e)}catch(e){kf(t,t.return,e)}}}function Fu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{og(e)}catch(e){kf(t,t.return,e)}}function Iu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new _u),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new _u),t;default:throw Error(i(435,e.tag))}}function Lu(e,t){var n=Iu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Pf.bind(null,e,t);t.then(r,r)}})}function Ru(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(Bp(l.type)){Au=l.stateNode,ju=!1;break a}break;case 5:Au=l.stateNode,ju=!1;break a;case 3:case 4:Au=l.stateNode.containerInfo,ju=!0;break a}l=l.return}if(Au===null)throw Error(i(160));Nu(s,c,o),Au=null,ju=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Bu(t,e,n),t=t.sibling}var zu=null;function Bu(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}Ru(t,e,n),Vu(e),a&4&&(jl(3,e,e.return),Al(3,e),jl(5,e,e.return));break;case 1:Ru(t,e,n),Vu(e),a&512&&(mu||r===null||Fl(r,r.return)),a&64&&pu&&(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=zu,Ru(t,e,n),Vu(e),a&512&&(mu||r===null||Fl(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(pu)e.stateNode=Ap(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[Lt]||r[At]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),bp(r,t,n),r[At]=e,Wt(r),t=r;break a;case`link`:if(o=lh(`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),bp(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=lh(`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),bp(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[At]=e,Wt(r),t=r}e.stateNode=t}}else pu||uh(o,e.type,e.stateNode)}else e.stateNode=ih(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Hl(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||mu||t.parentNode.removeChild(t)):a.count--,n===null?pu||uh(o,e.type,e.stateNode):ih(o,n,e.memoizedProps))}break;case 27:Ru(t,e,n),Vu(e),a&512&&(mu||r===null||Fl(r,r.return)),r!==null&&a&4&&Hl(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=hu,hu=!1,Ru(t,e,n),hu=o,Vu(e),a&512&&(mu||r===null||Fl(r,r.return)),e.flags&32){t=e.stateNode;try{yn(t,``),en=!0}catch(t){kf(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Hl(e,t,r===null?t:r.memoizedProps)),a&1024&&(gu=!0);break;case 6:if(Ru(t,e,n),Vu(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,en=!0}catch(t){kf(e,e.return,t)}}break;case 3:if(en=!1,ch=null,o=zu,zu=Rm(t.containerInfo),Ru(t,e,n),zu=o,Vu(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{og(t.containerInfo)}catch(t){kf(e,e.return,t)}gu&&(gu=!1,Hu(e)),en=!1;break;case 4:a=hu,hu=pu,r=tn(),o=zu,zu=Rm(e.stateNode.containerInfo),Ru(t,e,n),Vu(e),zu=o,en&&bu&&(xu=!0),en=r,hu=a;break;case 12:Ru(t,e,n),Vu(e);break;case 31:Ru(t,e,n),Vu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Lu(e,t)));break;case 13:Ru(t,e,n),Vu(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(kd=Je()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Lu(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=pu,l=mu,u=hu;pu=c||o,hu=u||o,mu=l||s,Ru(t,e,n),mu=l,hu=u,pu=c,Vu(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||pu||mu||(t=s||mu,n=pu,r=mu,pu=o||pu,mu=t,Ku(e,2),pu=n,mu=r),!o&&hu||Eu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Lu(e,n))));break;case 19:Ru(t,e,n),Vu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Lu(e,t)));break;case 30:a&512&&(mu||r===null||Fl(r,r.return)),a=tn(),o=bu,s=(n&335544064)===n,c=e.memoizedProps,bu=s&&ki(c.default,c.update)!==`none`,Ru(t,e,n),Vu(e),s&&r!==null&&en&&(e.flags|=4),bu=o,en=a;break;case 21:break;case 7:a&512&&(mu||r===null||Fl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Ru(t,e,n),Vu(e)}}function Vu(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Ul(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Bl(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(zl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Kl(e,Wl(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(yn(l,``),n.flags&=-33),Kl(e,Wl(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Gl(e,Wl(e),u,s);break;default:throw Error(i(161))}}catch(t){kf(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Hu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Hu(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,Ph=!0,t.reset(),Ph=!1),e=e.sibling}}function Uu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Wu(t,e),t=t.sibling;else fu(t,!1)}function Wu(e,t){var n=e.alternate;if(n===null)iu(e,!1);else switch(e.tag){case 3:if(Su=yu=!1,Ql(),Uu(t,e),!yu&&!xu){if(e=Zl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Wp(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`})),Su=!0}Zl=null;break;case 5:Uu(t,e);break;case 4:r=yu,yu=!1,Uu(t,e),yu&&(xu=!0),yu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Uu(t,e):iu(e,!1));break;case 30:r=yu,i=Ql(),yu=!1,Uu(t,e),yu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=Di(a,o),o=Di(n.memoizedProps,o);var s=ki(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,$l=0,t=du(e,n,t,o,s,a,!0),$l!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Jd(e,e.memoizedProps.onUpdate),Zl=i):i!==null&&(i.push.apply(i,Zl),Zl=i),yu=e.flags&32?!0:r;break;default:Uu(t,e)}}function Gu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Tu(e,t.alternate,t),t=t.sibling}function Ku(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:jl(4,n,n.return),Ku(n,r);break;case 1:Fl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&Nl(n,n.return,i),Ku(n,r);break;case 27:r&2&&Pm(n.stateNode,n.type,n.memoizedProps);case 5:Fl(n,n.return),n.tag!==5&&n.tag!==27||Rl(n),Ku(n,r);break;case 6:Rl(n);break;case 26:Fl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||mu||i.parentNode.removeChild(i),Ku(n,r);break;case 22:n.memoizedState===null&&Ku(n,r);break;case 30:Fl(n,n.return),Ku(n,r);break;case 7:Fl(n,n.return);default:Ku(n,r)}e=e.sibling}}function qu(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:qu(i,a,n),Al(4,a);break;case 1:if(qu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){kf(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++)Mo(l[i],c)}catch(e){kf(r,r.return,e)}}s&&o&64&&Ml(a),Pl(a,a.return);break;case 27:n&2&&ql(a);case 5:a.tag!==5&&a.tag!==27||Ll(a),qu(i,a,n),s&&r===null&&o&4&&Vl(a),Pl(a,a.return);break;case 6:Ll(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||pu||uh(Rm(c.ownerDocument),a.type,c),qu(i,a,n),s&&r===null&&o&4&&Vl(a),Pl(a,a.return);break;case 12:qu(i,a,n);break;case 31:qu(i,a,n),s&&o&4&&Pu(i,a);break;case 13:qu(i,a,n),s&&o&4&&Fu(i,a);break;case 22:a.memoizedState===null&&qu(i,a,n),Pl(a,a.return);break;case 30:qu(i,a,n),Pl(a,a.return);break;case 7:Pl(a,a.return);default:qu(i,a,n)}t=t.sibling}}function Ju(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&&Va(n))}function Yu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Va(e))}function Xu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Zu(e,t,n,r),t=t.sibling;else i&&uu(t)}function Zu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&lu(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Xu(e,t,n,r),a&2048&&Al(9,t);break;case 1:Xu(e,t,n,r);break;case 3:Xu(e,t,n,r),i&&Su&&(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&&Va(a)));break;case 12:if(a&2048){Xu(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){kf(t,t.return,e)}}else Xu(e,t,n,r);break;case 31:Xu(e,t,n,r);break;case 13:Xu(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&&lu(t),o._visibility&2?Xu(e,t,n,r):(o._visibility|=2,Qu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&lu(s),o._visibility&2?Xu(e,t,n,r):$u(e,t)),a&2048&&Ju(s,t);break;case 24:Xu(e,t,n,r),a&2048&&Yu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(nu(a.child,!0),nu(t.child,!0))),Xu(e,t,n,r);break;default:Xu(e,t,n,r)}}function Qu(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:Qu(a,o,s,c,i),Al(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Qu(a,o,s,c,i)):u._visibility&2?Qu(a,o,s,c,i):$u(a,o),i&&l&2048&&Ju(o.alternate,o);break;case 24:Qu(a,o,s,c,i),i&&l&2048&&Yu(o.alternate,o);break;default:Qu(a,o,s,c,i)}t=t.sibling}}function $u(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:$u(n,r),i&2048&&Ju(r.alternate,r);break;case 24:$u(n,r),i&2048&&Yu(r.alternate,r);break;default:$u(n,r)}t=t.sibling}}var ed=8192;function td(e,t,n){if(e.subtreeFlags&ed)for(e=e.child;e!==null;)nd(e,t,n),e=e.sibling}function nd(e,t,n){switch(e.tag){case 26:td(e,t,n),e.flags&ed&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&hh(n,e)):gh(n,zu,e.memoizedState,e.memoizedProps));break;case 5:td(e,t,n),e.flags&ed&&(e=e.stateNode,(t&335544128)===t&&hh(n,e));break;case 3:case 4:var r=zu;zu=Rm(e.stateNode.containerInfo),td(e,t,n),zu=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=ed,ed=16777216,td(e,t,n),ed=r):td(e,t,n));break;case 30:if((e.flags&ed)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Yl===null&&(Yl=new Map),Yl.set(r,i)}td(e,t,n);break;default:td(e,t,n)}}function rd(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 id(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];vu=r,sd(r,e)}rd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ad(e),e=e.sibling}function ad(e){switch(e.tag){case 0:case 11:case 15:id(e),e.flags&2048&&jl(9,e,e.return);break;case 3:id(e);break;case 12:id(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,od(e)):id(e);break;default:id(e)}}function od(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];vu=r,sd(r,e)}rd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:jl(8,t,t.return),od(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,od(t));break;default:od(t)}e=e.sibling}}function sd(e,t){for(;vu!==null;){var n=vu;switch(n.tag){case 0:case 11:case 15:jl(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:Va(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,vu=r;else a:for(n=e;vu!==null;){r=vu;var i=r.sibling,a=r.return;if(ku(r),r===n){vu=null;break a}if(i!==null){i.return=a,vu=i;break a}vu=a}}}var cd={getCacheForType:function(e){var t=Na(za),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Na(za).controller.signal}},ld=typeof WeakMap==`function`?WeakMap:Map,ud=0,dd=null,fd=null,pd=0,md=0,hd=null,gd=!1,_d=!1,vd=!1,yd=0,bd=0,xd=0,Sd=0,Cd=0,wd=0,Td=0,Ed=null,Dd=null,Od=!1,kd=0,Ad=0,jd=1/0,Md=null,Nd=null,Pd=0,Fd=null,Id=null,Ld=0,Rd=0,zd=null,Bd=null,Vd=null,Hd=null,Ud=null,Wd=0,Gd=null;function Kd(){return ud&2&&pd!==0?pd&-pd:D.T===null?Dt():Xf()}function qd(){if(wd===0){if(!(pd&536870912)||ma){var e=dt;dt<<=1,!(dt&3932160)&&(dt=262144),wd=e}else wd=536870912}return e=zo.current,e!==null&&(e.flags|=32),wd}function Jd(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Qp(Di(e.memoizedProps,n))),Hd===null&&(Hd=[]),Hd.push(t.bind(null,r))}}function Yd(e,t,n){(e===dd&&(md===2||md===9)||e.cancelPendingCommit!==null)&&(nf(e,0),$d(e,pd,wd,!1)),bt(e,n),(!(ud&2)||e!==dd)&&(e===dd&&(!(ud&2)&&(Sd|=n),bd===4&&$d(e,pd,wd,!1)),Hf(e))}function Xd(e,t,n){if(ud&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||ht(e,t),a=r?df(e,t):lf(e,t,!0),o=r;do{if(a===0){_d&&!r&&$d(e,t,0,!1);break}if(n=e.current.alternate,o&&!Qd(n))a=lf(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=Ed;var l=c.current.memoizedState.isDehydrated;if(l&&(nf(c,s).flags|=256),s=lf(c,s,!1),s!==2&&s!==6){if(vd&&!l){c.errorRecoveryDisabledLanes|=o,Sd|=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){nf(e,0),$d(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:$d(r,t,wd,!gd);break a;case 2:Dd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=kd+300-Je(),10<a)){if($d(r,t,wd,!gd),mt(r,0,!0)!==0)break a;Ld=t,r.timeoutHandle=Pp(Zd.bind(null,r,n,Dd,Md,Od,t,wd,Sd,Td,gd,o,`Throttled`,-0,0),a);break a}Zd(r,n,Dd,Md,Od,t,wd,Sd,Td,gd,o,null,-0,0)}break}}while(1);Hf(e)}function Zd(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:Dn},Yl=null,nd(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=bh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?kd-Je():(a&4194048)===a?Ad-Je():0,m=vh(d,m),m!==null)?(Ld=a,e.cancelPendingCommit=m(vf.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),$d(e,a,o,!l)):vf(e,t,a,n,r,i,o,s,c,l,u,d)}function Qd(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(!Yr(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 $d(e,t,n,r){t=gt(e,t),t&=~Cd,t&=~Sd,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-ot(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&St(e,n,t)}function ef(){return ud&6?!0:(Uf(0,!1),!1)}function tf(){if(fd!==null){if(md===0)var e=fd.return;else e=fd,Da=Ea=null,ps(e),mo=null,ho=0,e=fd;for(;e!==null;)kl(e.alternate,e),e=e.return;fd=null}}function nf(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,Fp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Ld=0,tf(),dd=e,fd=n=Wi(e.current,null),pd=t,md=0,hd=null,gd=!1,_d=ht(e,t),vd=!1,Td=wd=Cd=Sd=xd=bd=0,Dd=Ed=null,Od=!1,yd=gt(e,t),Pi(),n}function rf(e,t){Yo=null,D.H=Sc,t===ro||t===ao?(t=fo(),md=3):t===io?(t=fo(),md=4):md=t===Bc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,hd=t,fd===null&&(bd=1,Pc(e,Qi(t,e.current)))}function af(){var e=zo.current;return e===null?!0:(pd&4194048)===pd?Bo===null:(pd&62914560)===pd||pd&536870912?e===Bo:!1}function of(){var e=D.H;return D.H=Sc,e===null?Sc:e}function sf(){var e=D.A;return D.A=cd,e}function cf(){bd=4,gd||(pd&4194048)!==pd&&zo.current!==null||(_d=!0),!(xd&134217727)&&!(Sd&134217727)||dd===null||$d(dd,pd,wd,!1)}function lf(e,t,n){var r=ud;ud|=2;var i=of(),a=sf();(dd!==e||pd!==t)&&(Md=null,nf(e,t)),t=!1;var o=bd;a:do try{if(md!==0&&fd!==null){var s=fd,c=hd;switch(md){case 8:tf(),o=6;break a;case 3:case 2:case 9:case 6:zo.current===null&&(t=!0);var l=md;if(md=0,hd=null,hf(e,s,c,l),n&&_d){o=0;break a}break;default:l=md,md=0,hd=null,hf(e,s,c,l)}}uf(),o=bd;break}catch(t){rf(e,t)}while(1);return t&&e.shellSuspendCounter++,Da=Ea=null,ud=r,D.H=i,D.A=a,fd===null&&(dd=null,pd=0,Pi()),o}function uf(){for(;fd!==null;)pf(fd)}function df(e,t){var n=ud;ud|=2;var r=of(),a=sf();dd!==e||pd!==t?(Md=null,jd=Je()+500,nf(e,t)):_d=ht(e,t);a:do try{if(md!==0&&fd!==null){t=fd;var o=hd;b:switch(md){case 1:md=0,hd=null,hf(e,t,o,1);break;case 2:case 9:if(so(o)){md=0,hd=null,mf(t);break}t=function(){md!==2&&md!==9||dd!==e||(md=7),Hf(e)},o.then(t,t);break a;case 3:md=7;break a;case 4:md=5;break a;case 7:so(o)?(md=0,hd=null,mf(t)):(md=0,hd=null,hf(e,t,o,7));break;case 5:var s=null;switch(fd.tag){case 26:s=fd.memoizedState;case 5:case 27:var c=fd;if(s?ph(s):c.stateNode.complete){md=0,hd=null;var l=c.sibling;if(l!==null)fd=l;else{var u=c.return;u===null?fd=null:(fd=u,gf(u))}break b}}md=0,hd=null,hf(e,t,o,5);break;case 6:md=0,hd=null,hf(e,t,o,6);break;case 8:tf(),bd=6;break a;default:throw Error(i(462))}}ff();break}catch(t){rf(e,t)}while(1);return Da=Ea=null,D.H=r,D.A=a,ud=n,fd===null?(dd=null,pd=0,Pi(),bd):0}function ff(){for(;fd!==null&&!Ke();)pf(fd)}function pf(e){var t=bl(e.alternate,e,yd);e.memoizedProps=e.pendingProps,t===null?gf(e):fd=t}function mf(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=el(n,t,t.pendingProps,t.type,void 0,pd);break;case 11:t=el(n,t,t.pendingProps,t.type.render,t.ref,pd);break;case 5:ps(t);var r=t;r===fa&&(ma?(ba(r),r.tag===5&&r.stateNode!=null&&(pa=r.stateNode)):(ba(r),ma=!0));default:kl(n,t),t=fd=Gi(t,yd),t=bl(n,t,yd)}e.memoizedProps=e.pendingProps,t===null?gf(e):fd=t}function hf(e,t,n,r){Da=Ea=null,ps(t),mo=null,ho=0;var i=t.return;try{if(zc(e,i,t,n,pd)){bd=1,Pc(e,Qi(n,e.current)),fd=null;return}}catch(t){if(i!==null)throw fd=i,t;bd=1,Pc(e,Qi(n,e.current)),fd=null;return}t.flags&32768?(ma||r===1?e=!0:_d||pd&536870912?e=!1:(gd=e=!0,(r===2||r===9||r===3||r===6)&&(r=zo.current,r!==null&&r.tag===13&&(r.flags|=16384))),_f(t,e)):gf(t)}function gf(e){var t=e;do{if(t.flags&32768){_f(t,gd);return}e=t.return;var n=Dl(t.alternate,t,yd);if(n!==null){fd=n;return}if(t=t.sibling,t!==null){fd=t;return}fd=t=e}while(t!==null);bd===0&&(bd=5)}function _f(e,t){do{var n=Ol(e.alternate,e);if(n!==null){n.flags&=32767,fd=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){fd=e;return}fd=e=n}while(e!==null);bd=6,fd=null}function vf(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do Ef();while(Pd!==0);if(ud&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===dd&&(fd=dd=null,pd=0),Id=t,Fd=e,Ld=n,zd=a,Bd=r,yf(e,t,n,s,c,l,f)}}function yf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Rd=s,s|=Ni,xt(e,n,s,r,i,a),Hd=null,(n&335544064)===n?(Ud=Wa(e),r=10262):(Ud=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,Ff(Qe,function(){return Df(),null})):(e.callbackNode=null,e.callbackPriority=0),Jl=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=D.T,D.T=null,i=O.p,O.p=2,a=ud,ud|=4;try{Cu(e,t,n)}finally{ud=a,O.p=i,D.T=r}}Pd=1,Jl?Vd=Xp(o,e.containerInfo,Ud,Sf,Cf,xf,wf,Df,bf,null,null):(Sf(),Cf(),wf())}function bf(e){if(Pd!==0){var t=Fd.onRecoverableError;t(e,{componentStack:null})}}function xf(){Pd===3&&(Pd=0,Wu(Id,Fd),Pd=4)}function Sf(){if(Pd===1){Pd=0;var e=Fd,t=Id,n=Ld,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=D.T,D.T=null;var i=O.p;O.p=2;var a=ud;ud|=4;try{bu=xu=!1,Bu(t,e,n),n=Ep;var o=ti(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&ei(s.ownerDocument.documentElement,s)){if(c!==null&&ni(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 _=$r(s,h),v=$r(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}}Ph=!!Tp,Ep=Tp=null}finally{ud=a,O.p=i,D.T=r}}e.current=t,Pd=2}}function Cf(){if(Pd===2){Pd=0;var e=Fd,t=Id,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=D.T,D.T=null;var r=O.p;O.p=2;var i=ud;ud|=4;try{Tu(e,t.alternate,t)}finally{ud=i,O.p=r,D.T=n}}Pd=3}}function wf(){if(Pd===4||Pd===3){Pd=0;var e=Vd;Vd=null,qe();var t=Fd,n=Id,r=Ld,i=Bd,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?Pd=5:(Pd=0,Id=Fd=null,Tf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(Nd=null),Et(r),n=n.stateNode,it&&typeof it.onCommitFiberRoot==`function`)try{it.onCommitFiberRoot(rt,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=D.T,a=O.p,O.p=2,D.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{D.T=n,O.p=a}}if(i=Hd,o=Ud,Ud=null,i!==null&&(Hd=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);Ld&3&&Ef(),Hf(t),a=t.pendingLanes,r&261930&&a&42?t===Gd?Wd++:(Wd=0,Gd=t):(Wd=0,Gd=null),Uf(0,!1)}}function Tf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Va(t)))}function Ef(){return Vd!==null&&(Vd.skipTransition(),Vd=null),Sf(),Cf(),wf(),Df()}function Df(){if(Pd!==5)return!1;var e=Fd,t=Rd;Rd=0;var n=Et(Ld),r=D.T,a=O.p;try{O.p=32>n?32:n,D.T=null,n=zd,zd=null;var o=Fd,s=Ld;if(Pd=0,Id=Fd=null,Ld=0,ud&6)throw Error(i(331));var c=ud;if(ud|=4,ad(o.current),Zu(o,o.current,s,n),ud=c,Uf(0,!1),it&&typeof it.onPostCommitFiberRoot==`function`)try{it.onPostCommitFiberRoot(rt,o)}catch{}return!0}finally{O.p=a,D.T=r,Tf(e,t)}}function Of(e,t,n){t=Qi(n,t),t=Ic(e.stateNode,t,2),e=Eo(e,t,2),e!==null&&(bt(e,2),Hf(e))}function kf(e,t,n){if(e.tag===3)Of(e,e,n);else for(;t!==null;){if(t.tag===3){Of(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(Nd===null||!Nd.has(r))){e=Qi(n,e),n=Lc(2),r=Eo(t,n,2),r!==null&&(Rc(n,r,t,e),bt(r,2),Hf(r));break}}t=t.return}}function Af(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new ld;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)||(vd=!0,i.add(n),e=jf.bind(null,e,t,n),t.then(e,e))}function jf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,dd===e&&(pd&n)===n&&(bd===4||bd===3&&(pd&62914560)===pd&&300>Je()-kd?ud&2?Cd|=n:nf(e,0):Cd|=n,Td===pd&&(Td=0)),Hf(e)}function Mf(e,t){t===0&&(t=vt()),e=Li(e,t),e!==null&&(bt(e,t),Hf(e))}function Nf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Mf(e,n)}function Pf(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),Mf(e,n)}function Ff(e,t){return We(e,t)}var If=null,Lf=null,Rf=!1,zf=!1,Bf=!1,Vf=0;function Hf(e){e!==Lf&&e.next===null&&(Lf===null?If=Lf=e:Lf=Lf.next=e),zf=!0,Rf||(Rf=!0,Yf())}function Uf(e,t){if(!Bf&&zf){Bf=!0;do for(var n=!1,r=If;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-ot(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=pd,a=mt(r,r===dd?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ht(r,a)||(n=!0,Jf(r,a))}r=r.next}while(n);Bf=!1}}function Wf(){Gf()}function Gf(){zf=Rf=!1;var e=0;Vf!==0&&Np()&&(e=Vf);for(var t=Je(),n=null,r=If;r!==null;){var i=r.next,a=Kf(r,t);a===0?(r.next=null,n===null?If=i:n.next=i,i===null&&(Lf=n)):(n=r,(e!==0||a&3)&&(zf=!0)),r=i}Pd!==0&&Pd!==5||Uf(e,!1),Vf!==0&&(Vf=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-ot(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=_t(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=dd,n=pd,n=mt(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(md===2||md===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ge(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||ht(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ge(r),Et(n)){case 2:case 8:n=Ze;break;case 32:n=Qe;break;case 268435456:n=et;break;default:n=Qe}return r=qf.bind(null,e),n=We(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ge(r),e.callbackPriority=2,e.callbackNode=null,2}function qf(e,t){if(Pd!==0&&Pd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Ef()&&e.callbackNode!==n)return null;var r=pd;return r=mt(e,e===dd?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Xd(e,r,t),Kf(e,Je()),e.callbackNode!=null&&e.callbackNode===n?qf.bind(null,e):null)}function Jf(e,t){if(Ef())return null;Xd(e,t,!0)}function Yf(){Rp(function(){ud&6?We(Xe,Wf):Gf()})}function Xf(){if(Vf===0){var e=qa;e===0&&(e=ut,ut<<=1,!(ut&261888)&&(ut=256)),Vf=e}return Vf}function Zf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:En(e)}function Qf(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Zf((i[jt]||null).action),o=r.submitter;o&&(t=(t=o[jt]||null)?Zf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new qn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Vf!==0){var e=new FormData(i,o);cc(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),cc(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var $f=0;$f<wi.length;$f++){var ep=wi[$f];Ti(ep.toLowerCase(),`on`+(ep[0].toUpperCase()+ep.slice(1)))}Ti(mi,`onAnimationEnd`),Ti(gi,`onAnimationIteration`),Ti(vi,`onAnimationStart`),Ti(`dblclick`,`onDoubleClick`),Ti(`focusin`,`onFocus`),Ti(`focusout`,`onBlur`),Ti(yi,`onTransitionRun`),Ti(bi,`onTransitionStart`),Ti(xi,`onTransitionCancel`),Ti(Si,`onTransitionEnd`),Yt(`onMouseEnter`,[`mouseout`,`mouseover`]),Yt(`onMouseLeave`,[`mouseout`,`mouseover`]),Yt(`onPointerEnter`,[`pointerout`,`pointerover`]),Yt(`onPointerLeave`,[`pointerout`,`pointerover`]),Jt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Jt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Jt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Jt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Jt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Jt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var tp=`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(` `),np=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(tp));function rp(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){Ai(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){Ai(e)}i.currentTarget=null,a=c}}}}function ip(e,t){var n=t[Nt];n===void 0&&(n=t[Nt]=new Set);var r=e+`__bubble`;n.has(r)||(cp(t,e,2,!1),n.add(r))}function ap(e,t,n){var r=0;t&&(r|=4),cp(n,e,r,t)}var op=`_reactListening`+Math.random().toString(36).slice(2);function sp(e){if(!e[op]){e[op]=!0,Kt.forEach(function(t){t!==`selectionchange`&&(np.has(t)||ap(t,!1,e),ap(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[op]||(t[op]=!0,ap(`selectionchange`,!1,t))}}function cp(e,t,n,r){switch(Vh(t)){case 2:var i=Fh;break;case 8:i=Ih;break;default:i=Lh}n=i.bind(null,t,n,e),i=void 0,!Ln||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 lp(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=Bt(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}Pn(function(){var r=a,i=kn(n),s=[];a:{var c=Ci.get(e);if(c!==void 0){var l=qn,u=e;switch(e){case`keypress`:if(Hn(n)===0)break a;case`keydown`:case`keyup`:l=dr;break;case`focusin`:u=`focus`,l=nr;break;case`focusout`:u=`blur`,l=nr;break;case`beforeblur`:case`afterblur`:l=nr;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=er;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=tr;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=mr;break;case mi:case gi:case vi:l=rr;break;case Si:l=hr;break;case`scroll`:case`scrollend`:l=Yn;break;case`wheel`:l=gr;break;case`copy`:case`cut`:case`paste`:l=ir;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=fr;break;case`submit`:l=pr;break;case`toggle`:case`beforetoggle`:l=_r}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=Fn(m,p),g!=null&&d.push(up(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!==On&&(u=n.relatedTarget||n.fromElement)&&(Bt(u)||u[Mt]))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?Bt(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=er,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=fr,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:Ht(c),h=l==null?u:Ht(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,Bt(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?w(c,l,fp):null,c!==null&&pp(s,u,c,d,!1),l!==null&&f!==null&&pp(s,f,l,d,!0)))}a:{if(c=r?Ht(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=Lr;else if(jr(c)){if(Rr)_=qr;else{_=Gr;var v=Wr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Cn(r.elementType)&&(_=Lr):_=Kr;if(_&&=_(e,r)){Mr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Ht(r):window,e){case`focusin`:(jr(v)||v.contentEditable===`true`)&&(ii=v,ai=r,oi=null);break;case`focusout`:oi=ai=ii=null;break;case`mousedown`:si=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:si=!1,ci(s,n,i);break;case`selectionchange`:if(ri)break;case`keydown`:case`keyup`:ci(s,n,i)}var y;if(yr)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 Dr?Tr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(Sr&&n.locale!==`ko`&&(Dr||b!==`onCompositionStart`?b===`onCompositionEnd`&&Dr&&(y=Vn()):(k=i,zn=`value`in k?k.value:k.textContent,Dr=!0)),v=dp(r,b),0<v.length&&(b=new ar(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=Er(n),y!==null&&(b.data=y)))),(y=xr?Or(e,n):kr(e,n))&&(b=dp(r,`onBeforeInput`),0<b.length&&(v=new ar(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),Qf(s,e,r,n,i)}rp(s,t)})}function up(e,t,n){return{instance:e,listener:t,currentTarget:n}}function dp(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=Fn(e,n),i!=null&&r.unshift(up(e,i,a)),i=Fn(e,t),i!=null&&r.push(up(e,i,a))),e.tag===3)return r;e=e.return}return[]}function fp(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function pp(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=Fn(n,a),l!=null&&o.unshift(up(n,l,c))):i||(l=Fn(n,a),l!=null&&o.push(up(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var mp=/\r\n?/g,hp=/\u0000|\uFFFD/g;function gp(e){return(typeof e==`string`?e:``+e).replace(mp,`
|
|
10
|
+
`).replace(hp,``)}function _p(e,t){return t=gp(t),gp(e)===t}function vp(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||yn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&yn(e,``+r);else return;break;case`className`:rn(e,`class`,r);break;case`tabIndex`:rn(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:rn(e,n,r);break;case`style`:Sn(e,r,o);return;case`data`:if(t!==`object`){rn(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=En(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`&&vp(e,t,`name`,a.name,a,null),vp(e,t,`formEncType`,a.formEncType,a,null),vp(e,t,`formMethod`,a.formMethod,a,null),vp(e,t,`formTarget`,a.formTarget,a,null)):(vp(e,t,`encType`,a.encType,a,null),vp(e,t,`method`,a.method,a,null),vp(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=En(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Dn);return;case`onScroll`:r!=null&&ip(`scroll`,e);return;case`onScrollEnd`:r!=null&&ip(`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=En(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`:ip(`beforetoggle`,e),ip(`toggle`,e),nn(e,`popover`,r);break;case`xlinkActuate`:an(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:an(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:an(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:an(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:an(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:an(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:an(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:an(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:an(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:nn(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=wn.get(n)||n,nn(e,n,r);else return}en=!0}function yp(e,t,n,r,a,o){switch(n){case`style`:Sn(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`)yn(e,r);else if(typeof r==`number`||typeof r==`bigint`)yn(e,``+r);else return;break;case`onScroll`:r!=null&&ip(`scroll`,e);return;case`onScrollEnd`:r!=null&&ip(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=Dn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!qt.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[jt]||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}en=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):nn(e,n,r)}return}en=!0}function bp(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:ip(`error`,e),ip(`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:vp(e,t,o,s,n,null)}}a&&vp(e,t,`srcSet`,n.srcSet,n,null),r&&vp(e,t,`src`,n.src,n,null);return;case`input`:ip(`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:vp(e,t,r,d,n,null)}}mn(e,o,c,l,u,s,a,!1);return;case`select`:for(a in ip(`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:vp(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&gn(e,!!r,n,!0):gn(e,!!r,t,!1);return;case`textarea`:for(s in ip(`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:vp(e,t,s,c,n,null)}vn(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:vp(e,t,l,r,n,null)}return;case`dialog`:ip(`beforetoggle`,e),ip(`toggle`,e),ip(`cancel`,e),ip(`close`,e);break;case`iframe`:case`object`:ip(`load`,e);break;case`video`:case`audio`:for(r=0;r<tp.length;r++)ip(tp[r],e);break;case`image`:ip(`error`,e),ip(`load`,e);break;case`details`:ip(`toggle`,e);break;case`embed`:case`source`:case`link`:ip(`error`,e),ip(`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:vp(e,t,u,r,n,null)}return;default:if(Cn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&yp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&vp(e,t,c,r,n,null))}var xp={};function Sp(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)||vp(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&&(en=!0),o=m;break;case`name`:m!==f&&(en=!0),a=m;break;case`checked`:m!==f&&(en=!0),u=m;break;case`defaultChecked`:m!==f&&(en=!0),d=m;break;case`value`:m!==f&&(en=!0),s=m;break;case`defaultValue`:m!==f&&(en=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&vp(e,t,p,m,r,f)}}pn(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)||vp(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&&(en=!0),p=o;break;case`defaultValue`:o!==l&&(en=!0),c=o;break;case`multiple`:o!==l&&(en=!0),s=o;default:o!==l&&vp(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?gn(e,!!n,n?[]:``,!1):gn(e,!!n,t,!0)):gn(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:vp(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&&(en=!0),p=a;break;case`defaultValue`:a!==o&&(en=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&vp(e,t,s,a,r,o)}_n(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:vp(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&&(en=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:vp(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)&&vp(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:vp(e,t,u,p,r,m)}return;default:if(Cn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&yp(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||yp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&vp(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||vp(e,t,f,p,r,m)}function Cp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function wp(){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&&Cp(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&&Cp(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 Tp=null,Ep=null;function Dp(e){return e.nodeType===9?e:e.ownerDocument}function Op(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 kp(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 Ap(e,t,n,r){return n=Dp(n).createElement(e),n[At]=r,n[jt]=t,bp(n,e,t),Wt(n),n}function jp(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 Np(){var e=window.event;return e&&e.type===`popstate`?e!==Mp&&(Mp=e,!0):(Mp=null,!1)}var Pp=typeof setTimeout==`function`?setTimeout:void 0,Fp=typeof clearTimeout==`function`?clearTimeout:void 0,Ip=typeof Promise==`function`?Promise:void 0,Lp=typeof requestAnimationFrame==`function`?requestAnimationFrame:Pp,Rp=typeof queueMicrotask==`function`?queueMicrotask:Ip===void 0?Pp:function(e){return Ip.resolve(null).then(e).catch(zp)};function zp(e){setTimeout(function(){throw e})}function Bp(e){return e===`head`}function Vp(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),og(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Fm(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Fm(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Lt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Fm(e.ownerDocument.body)}n=i}while(n);og(t)}function Hp(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 Up(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 Wp(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 Gp(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 Kp(e){return Gp(e.getBoundingClientRect(),getComputedStyle(e),e)}function qp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Gp(t,n,e)}function Jp(e){return e.documentElement.clientHeight}function Yp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Xp(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`&&(Jp(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+=mh(f),u>_h){s.length=o;break}f=new Promise(Yp.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 Zp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Zp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:T({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Zp.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},Zp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Qp(e){return{name:e,group:new Zp(`group`,e),imagePair:new Zp(`image-pair`,e),old:new Zp(`old`,e),new:new Zp(`new`,e)}}function $p(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}$p.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(im(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=nm(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),p(this._fragmentFiber.child,!1,em,e,s,r)}this._eventListeners=a}};function em(e,t,n,r){return v(e).addEventListener(t,n,r),!1}$p.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=im(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=nm(i.optionsOrUseCapture),p(this._fragmentFiber.child,!1,tm,e,n,i),r.splice(t,1),a!==null&&a()}};function tm(e,t,n,r){return v(e).removeEventListener(t,n,r),!1}function nm(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function rm(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function im(e,t,n,r){if(e.length===0)return-1;r=rm(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&rm(a.optionsOrUseCapture)===r)return i}return-1}$p.prototype.dispatchEvent=function(e){var t=m(this._fragmentFiber);if(t===null)return!0;t=v(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,nm(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,nm(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},$p.prototype.focus=function(e){p(this._fragmentFiber.child,!0,am,e,void 0,void 0)};function am(e,t){return e.tag!==6&&(e=v(e),jm(e,t))}$p.prototype.focusLast=function(e){var t=[];p(this._fragmentFiber.child,!0,om,t,void 0,void 0);for(var n=t.length-1;0<=n&&!am(t[n],e);n--);};function om(e,t){return t.push(e),!1}$p.prototype.blur=function(){var e=m(this._fragmentFiber);e!==null&&(e=v(e),e=Dp(e).activeElement,e!==null&&p(this._fragmentFiber.child,!1,sm,e,void 0,void 0))};function sm(e,t){return e.tag!==6&&(e=v(e),e===t||e.contains(t)?(t.blur(),!0):!1)}$p.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),p(this._fragmentFiber.child,!1,cm,e,void 0,void 0)};function cm(e,t){return e.tag===6||(e=v(e),t.observe(e)),!1}$p.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),p(this._fragmentFiber.child,!1,lm,e,void 0,void 0);for(var n=t=0;n<um.length;n++){var r=um[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):um[t++]=r}um.length=t}};function lm(e,t){return e.tag===6||(e=v(e),t.unobserve(e)),!1}var um=[],dm=!1;function fm(e,t,n){um.push({fragmentInstance:e,observer:t,instance:n}),dm||(dm=!0,Mm(function(){dm=!1;var e=um;um=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}$p.prototype.getClientRects=function(){var e=[];return p(this._fragmentFiber.child,!1,pm,e,void 0,void 0),e};function pm(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=v(e),t.push.apply(t,e.getClientRects());return!1}$p.prototype.getRootNode=function(e){var t=m(this._fragmentFiber);return t===null?this:v(t).getRootNode(e)},$p.prototype.compareDocumentPosition=function(e){var t=m(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];p(this._fragmentFiber.child,!1,om,n,void 0,void 0);var r=v(t);if(n.length===0){if(n=r,h(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=g(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=v(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=v(n[0]),i=v(n[n.length-1]);var a=h(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||mm(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function mm(e,t,n,r,i){var a=Bt(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=m(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=w(n,a,C),t===null?t=!1:(p(t,!0,x,a,n),a=y,y=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=w(r,a,C),t===null?t=!1:(p(t,!0,S,a,r),a=y,b=y=null,t=a!==null)),t):!1}function hm(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)}$p.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];p(this._fragmentFiber.child,!1,om,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=g(this._fragmentFiber);if(r=n?r[1]||r[0]||m(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=v(r),hm(e,n);return}if(r=v(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=v(a),hm(a,n)):v(a).scrollIntoView(e),r+=n?-1:1}};function gm(e,t){return e=v(e),_m(e,t),!1}function _m(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function vm(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,nm(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<um.length;i++){var a=um[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(um[r++]=a)}um.length=r,n.observe(e)}),_m(e,t))}function ym(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,nm(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?fm(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function bm(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`:bm(n),zt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function xm(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[Lt])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=Dm(e.nextSibling),e===null)break}return null}function Sm(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=Dm(e.nextSibling),e===null))return null;return e}function Cm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=Dm(e.nextSibling),e===null))return null;return e}function wm(e){return e.data===`$?`||e.data===`$~`}function Tm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function Em(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 Dm(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 Om=null;function km(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return Dm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function Am(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 jm(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){Lp(function(){Lp(function(t){return e(t)})})}function Nm(e,t,n){switch(t=Dp(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 Pm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&vp(e,t,r,null,xp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===Dn&&(e.onclick=null),zt(e)}function Fm(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);zt(e)}var Im=new Map,Lm=new Set;function Rm(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 zm=O.d;O.d={f:Bm,r:Vm,D:Wm,C:Gm,L:Km,m:qm,X:Ym,S:Jm,M:Xm};function Bm(){var e=zm.f(),t=ef();return e||t}function Vm(e){var t=Vt(e);t!==null&&t.tag===5&&t.type===`form`?uc(t):zm.r(e)}var Hm=typeof document>`u`?null:document;function Um(e,t,n){var r=Hm;if(r&&typeof t==`string`&&t){var i=fn(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Lm.has(i)||(Lm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),bp(t,`link`,e),Wt(t),r.head.appendChild(t)))}}function Wm(e){zm.D(e),Um(`dns-prefetch`,e,null)}function Gm(e,t){zm.C(e,t),Um(`preconnect`,e,t)}function Km(e,t,n){zm.L(e,t,n);var r=Hm;if(r&&e&&t){var i=`link[rel="preload"][as="`+fn(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+fn(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+fn(n.imageSizes)+`"]`)):i+=`[href="`+fn(e)+`"]`;var a=i;switch(t){case`style`:a=Qm(e);break;case`script`:a=nh(e)}if(!(Im.has(a)||(e=T({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Im.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector($m(a))||t===`script`&&r.querySelector(rh(a))))){var o=r.createElement(`link`);bp(o,`link`,e),t===`style`&&(o[Rt]=!0,o.onload=o.onerror=function(){Gt(o)}),Wt(o),r.head.appendChild(o)}}}function qm(e,t){zm.m(e,t);var n=Hm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+fn(r)+`"][href="`+fn(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=nh(e)}if(!Im.has(a)&&(e=T({rel:`modulepreload`,href:e},t),Im.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(rh(a)))return}r=n.createElement(`link`),bp(r,`link`,e),Wt(r),n.head.appendChild(r)}}}function Jm(e,t,n){zm.S(e,t,n);var r=Hm;if(r&&e){var i=Ut(r).hoistableStyles,a=Qm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector($m(a)))s.loading=5;else{e=T({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Im.get(a))&&oh(e,n);var c=o=r.createElement(`link`);Wt(c),bp(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,ah(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Ym(e,t){zm.X(e,t);var n=Hm;if(n&&e){var r=Ut(n).hoistableScripts,i=nh(e),a=r.get(i);a||(a=n.querySelector(rh(i)),a||(e=T({src:e,async:!0},t),(t=Im.get(i))&&sh(e,t),a=n.createElement(`script`),Wt(a),bp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Xm(e,t){zm.M(e,t);var n=Hm;if(n&&e){var r=Ut(n).hoistableScripts,i=nh(e),a=r.get(i);a||(a=n.querySelector(rh(i)),a||(e=T({src:e,async:!0,type:`module`},t),(t=Im.get(i))&&sh(e,t),a=n.createElement(`script`),Wt(a),bp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Zm(e,t,n,r){var a=(a=Ae.current)?Rm(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=Qm(n.href),t=Ut(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=Qm(n.href);var o=Ut(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($m(e)))?o._p||(s.instance=o,s.state.loading=5):(o=Im.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},Im.set(e,o)),th(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=nh(n),t=Ut(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 Qm(e){return`href="`+fn(e)+`"`}function $m(e){return`link[rel="stylesheet"][`+e+`]`}function eh(e){return T({},e,{"data-precedence":e.precedence,precedence:null})}function th(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Rt]){r.loading=1;return}}else t=e.createElement(`link`),t[Rt]=!0,t.onload=t.onerror=Gt.bind(null,t),bp(t,`link`,n),Wt(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 nh(e){return`[src="`+fn(e)+`"]`}function rh(e){return`script[async]`+e}function ih(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+fn(n.href)+`"]`);if(r)return t.instance=r,Wt(r),r;var a=T({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Wt(r),bp(r,`style`,a),ah(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Qm(n.href);var o=e.querySelector($m(a));if(o)return t.state.loading|=4,t.instance=o,Wt(o),o;r=eh(n),(a=Im.get(a))&&oh(r,a),o=(e.ownerDocument||e).createElement(`link`),Wt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),bp(o,`link`,r),t.state.loading|=4,ah(o,n.precedence,e),t.instance=o;case`script`:return o=nh(n.src),(a=e.querySelector(rh(o)))?(t.instance=a,Wt(a),a):(r=n,(a=Im.get(o))&&(r=T({},n),sh(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Wt(a),bp(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,ah(r,n.precedence,e));return t.instance}function ah(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 oh(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function sh(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var ch=null;function lh(e,t,n){if(ch===null){var r=new Map,i=ch=new Map;i.set(n,r)}else i=ch,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[Lt]||a[At]||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 uh(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function dh(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 fh(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function ph(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function mh(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function hh(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=mh(t),e.suspenseyImages.push(t)),e=xh.bind(e),t.decode().then(e,e))}function gh(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=Qm(r.href),a=t.querySelector($m(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=bh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Wt(a);return}a=t.ownerDocument||t,r=eh(r),(i=Im.get(i))&&oh(r,i),a=a.createElement(`link`),Wt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),bp(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=bh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var _h=0;function vh(e,t){return e.stylesheets&&e.count===0&&Ch(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Ch(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&_h===0&&(_h=62500*wp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ch(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>_h?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function yh(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)Ch(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function bh(){this.count--,yh(this)}function xh(){this.imgCount--,yh(this)}var Sh=null;function Ch(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Sh=new Map,t.forEach(wh,e),Sh=null,bh.call(e))}function wh(e,t){if(!(t.state.loading&4)){var n=Sh.get(e);if(n)var r=n.get(null);else{n=new Map,Sh.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=bh.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 Th={$$typeof:oe,Provider:null,Consumer:null,_currentValue:Se,_currentValue2:Se,_threadCount:0};function Eh(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=yt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=yt(0),this.hiddenUpdates=yt(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 Dh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new Eh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Hi(3,null,null,t),e.current=a,a.stateNode=e,t=Ba(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Co(a),e}function Oh(e){return e?(e=Bi,e):Bi}function kh(e,t,n,r,i,a){i=Oh(i),r.context===null?r.context=i:r.pendingContext=i,r=To(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Eo(e,r,t),n!==null&&(Yd(n,e,t),Do(n,e,t))}function Ah(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function jh(e,t){Ah(e,t),(e=e.alternate)&&Ah(e,t)}function Mh(e){if(e.tag===13||e.tag===31){var t=Li(e,67108864);t!==null&&Yd(t,e,67108864),jh(e,67108864)}}function Nh(e){if(e.tag===13||e.tag===31){var t=Kd();t=Tt(t);var n=Li(e,t);n!==null&&Yd(n,e,t),jh(e,t)}}var Ph=!0;function Fh(e,t,n,r){var i=D.T;D.T=null;var a=O.p;try{O.p=2,Lh(e,t,n,r)}finally{O.p=a,D.T=i}}function Ih(e,t,n,r){var i=D.T;D.T=null;var a=O.p;try{O.p=8,Lh(e,t,n,r)}finally{O.p=a,D.T=i}}function Lh(e,t,n,r){if(Ph){var i=Rh(r);if(i===null)lp(e,t,r,zh,n),Xh(e,r);else if(Qh(i,e,t,n,r))r.stopPropagation();else if(Xh(e,r),t&4&&-1<Yh.indexOf(e)){for(;i!==null;){var a=Vt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=pt(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-ot(o);s.entanglements[1]|=c,o&=~c}Hf(a),!(ud&6)&&(jd=Je()+500,Uf(0,!1))}}break;case 31:case 13:s=Li(a,2),s!==null&&Yd(s,a,2),ef(),jh(a,2)}if(a=Rh(r),a===null&&lp(e,t,r,zh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else lp(e,t,r,null,n)}}function Rh(e){return e=kn(e),Bh(e)}var zh=null;function Bh(e){if(zh=null,e=Bt(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 zh=e,null}function Vh(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(Ye()){case Xe:return 2;case Ze:return 8;case Qe:case $e:return 32;case et:return 268435456;default:return 32}default:return 32}}var Hh=!1,Uh=null,Wh=null,Gh=null,Kh=new Map,qh=new Map,Jh=[],Yh=`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 Xh(e,t){switch(e){case`focusin`:case`focusout`:Uh=null;break;case`dragenter`:case`dragleave`:Wh=null;break;case`mouseover`:case`mouseout`:Gh=null;break;case`pointerover`:case`pointerout`:Kh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:qh.delete(t.pointerId)}}function Zh(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=Vt(t),t!==null&&Mh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Qh(e,t,n,r,i){switch(t){case`focusin`:return Uh=Zh(Uh,e,t,n,r,i),!0;case`dragenter`:return Wh=Zh(Wh,e,t,n,r,i),!0;case`mouseover`:return Gh=Zh(Gh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Kh.set(a,Zh(Kh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,qh.set(a,Zh(qh.get(a)||null,e,t,n,r,i)),!0}return!1}function $h(e){var t=Bt(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,Ot(e.priority,function(){Nh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,Ot(e.priority,function(){Nh(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 eg(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Rh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);On=r,n.target.dispatchEvent(r),On=null}else return t=Vt(n),t!==null&&Mh(t),e.blockedOn=n,!1;t.shift()}return!0}function tg(e,t,n){eg(e)&&n.delete(t)}function ng(){Hh=!1,Uh!==null&&eg(Uh)&&(Uh=null),Wh!==null&&eg(Wh)&&(Wh=null),Gh!==null&&eg(Gh)&&(Gh=null),Kh.forEach(tg),qh.forEach(tg)}function rg(e,n){e.blockedOn===n&&(e.blockedOn=null,Hh||(Hh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,ng)))}var ig=null;function ag(e){ig!==e&&(ig=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){ig===e&&(ig=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(Bh(r||n)===null)continue;break}var a=Vt(n);a!==null&&(e.splice(t,3),t-=3,cc(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function og(e){function t(t){return rg(t,e)}Uh!==null&&rg(Uh,e),Wh!==null&&rg(Wh,e),Gh!==null&&rg(Gh,e),Kh.forEach(t),qh.forEach(t);for(var n=0;n<Jh.length;n++){var r=Jh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Jh.length&&(n=Jh[0],n.blockedOn===null);)$h(n),n.blockedOn===null&&Jh.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[jt]||null;if(typeof a==`function`)o||ag(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[jt]||null)s=o.formAction;else if(Bh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),ag(n)}}}function sg(){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 cg(e){this._internalRoot=e}lg.prototype.render=cg.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;kh(n,Kd(),e,t,null,null)},lg.prototype.unmount=cg.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;kh(e.current,2,null,e,null,null),ef(),t[Mt]=null}};function lg(e){this._internalRoot=e}lg.prototype.unstable_scheduleHydration=function(e){if(e){var t=Dt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Jh.length&&t!==0&&t<Jh[n].priority;n++);Jh.splice(n,0,e),n===0&&$h(e)}};var ug=n.version;if(ug!==`19.3.0`)throw Error(i(527,ug,`19.3.0`));O.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var dg={bundleType:0,version:`19.3.0`,rendererPackageName:`react-dom`,currentDispatcherRef:D,reconcilerVersion:`19.3.0`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var fg=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fg.isDisabled&&fg.supportsFiber)try{rt=fg.inject(dg),it=fg}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=jc,s=Mc,c=Nc;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=Dh(e,1,!1,null,null,n,r,null,o,s,c,sg),e[Mt]=t.current,sp(e),new cg(t)}})),yi=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=vi()}))(),bi=`0.4.4`;function xi(e){return typeof e==`string`&&/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/.test(e)&&e.split(`.`).every(e=>Number.isSafeInteger(Number(e)))}function Si(e,t){if(!xi(e)||!xi(t))return!1;let n=e.split(`.`).map(Number),r=t.split(`.`).map(Number);for(let e=0;e<3;e++)if(n[e]!==r[e])return n[e]>r[e];return!1}function Ci(e){let{gateway:t,frontend:n,installed:r,web:i}=e;if(t&&t.protocolVersion!==6)return`incompatible`;if(t&&(Si(t.installedVersion,t.runningVersion)||Si(r,t.runningVersion)||Si(n,t.runningVersion))||i&&(Si(i.installedVersion,i.runningVersion)||Si(t?.runningVersion,i.runningVersion)||Si(n,i.runningVersion)))return`restart-service`;if(i){if(Si(i.runningVersion,n))return`refresh-page`}else if(Si(r,n)||Si(t?.runningVersion,n))return`restart-tui`;return t?.checkState===`ok`&&Si(t.latestVersion,r)?`install`:`none`}var wi=class extends Error{constructor(){super(`Application protocol incompatible. Update neko, then restart its TUI/Web or serve.`),this.name=`ApplicationProtocolError`}};function Ti(e){let t=``;for(let n of e)t+=String.fromCharCode(n);return btoa(t)}function Ei(e){return Uint8Array.from(atob(e),e=>e.charCodeAt(0))}async function Di(e,t){let n=await t.begin({name:e.name,mimeType:e.mimeType,size:e.bytes.length});try{for(let r=0;r<e.bytes.length;r+=262144)await t.append({id:n,offset:r,data:Ti(e.bytes.subarray(r,r+262144))});return await t.finish(n),n}catch(e){throw await t.release(n).catch(()=>{}),e}}async function Oi(e){let t=[],n=0,r=0,i=``;do{let a=await e(n);if(!Number.isSafeInteger(a.total)||a.total<=0||a.total>20971520||n>0&&(a.total!==r||a.mimeType!==i))throw Error(`Invalid image size or format`);if(r=a.total,i=a.mimeType,a.data.length>349528)throw Error(`Image chunk is too large`);let o=Ei(a.data);if(o.length>262144||n+o.length>r||!o.length&&n<r)throw Error(`Incomplete image`);t.push(o),n+=o.length}while(n<r);let a=new Uint8Array(n),o=0;for(let e of t)a.set(e,o),o+=e.length;return{name:`Image`,mimeType:i,bytes:a}}function ki(e){let t=/^\/compact(?:\s+([\s\S]*))?$/.exec(e.trim());return t?t[1]?.trim()??``:null}var Ai=(e,t=`New session`)=>e.title||e.firstPromptPreview||t,ji=e=>e.lastMessageAt??e.createdAt,Mi=(e,t)=>ji(t)-ji(e)||Number(t.id)-Number(e.id),Ni=(e,t)=>t.lastUsedAt-e.lastUsedAt||Number(t.id)-Number(e.id),Pi=(e,t)=>`${e.title} ${e.firstPromptPreview} ${e.id}`.toLocaleLowerCase().includes(t.trim().toLocaleLowerCase());function Fi(e,t,n=`en`){let r=Math.floor(Math.max(0,t-e)/6e4);if(r<1)return n===`zh`?`刚刚`:`now`;let i=Math.floor(r/60),a=Math.floor(i/24);if(a>=30)return new Date(e).toLocaleDateString(n===`zh`?`zh-CN`:`en-GB`);let o=a||i||r,s=a?[`天`,`d`]:i?[`小时`,`h`]:[`分钟`,`m`];return n===`zh`?`${o} ${s[0]}前`:`${o}${s[1]}`}var Ii={assign:0,create:0,clone:0,discard:0,update:0};function Li(e,t,n){return e>=t&&e<=n}function Ri(e){return e===8205}function zi(e){return Li(e,55296,56319)}function Bi(e){return Li(e,127462,127487)}function Vi(e){return Li(e,65024,65039)}function Hi(e){return Li(e,768,879)||Li(e,6832,6911)||Li(e,7616,7679)||Li(e,65056,65071)}function Ui(e){return e>65535?2:1}function Wi(e,t){for(;t<e.length;){let n=e.codePointAt(t);if(Hi(n)||Vi(n))t+=Ui(n);else break}return t}function Gi(e,t){let n=e.codePointAt(t),r=t+Ui(n);for(r=Wi(e,r);r<e.length-1&&Ri(e.codePointAt(r));){let t=e.codePointAt(r+1);r+=1+Ui(t),r=Wi(e,r)}return Bi(n)&&r<e.length&&Bi(e.codePointAt(r))&&(r+=Ui(e.codePointAt(r))),r}function Ki(e){return e>=768&&(zi(e)||Hi(e)||Vi(e)||Ri(e))}function qi(e){let t=0,n=0;for(;n<e.length;)n=Gi(e,n),t++;return t}function Ji(e,t){let n=0,r=0;for(;r<e.length;)if(r=Gi(e,r),++n>=t)return!0;return!1}function Yi(e,t){let n=0,r=0;for(;r<e.length;)if(r=Gi(e,r),++n>t)return!1;return!0}function Xi(e,t){if(t===0)return!0;if(e.length<t)return!1;let n=0;for(;;){if(Ki(e.charCodeAt(n)))return Ji(e,t);if(++n>=t)return!0}}function Zi(e,t){if(e.length<=t)return!0;let n=0;for(;;){if(Ki(e.charCodeAt(n)))return Yi(e,t);if(++n>t)return!1}}var Qi=s({Counted:()=>Ea,Entries:()=>Aa,EntriesRegExp:()=>ka,Every:()=>Sa,EveryAll:()=>Ca,GraphemeCount:()=>ya,HasPropertyKey:()=>j,IsArray:()=>$i,IsBigInt:()=>ea,IsBoolean:()=>ta,IsClassInstance:()=>_a,IsConstructor:()=>na,IsDeepEqual:()=>Fa,IsEqual:()=>A,IsFunction:()=>ra,IsGreaterEqualThan:()=>ha,IsGreaterThan:()=>fa,IsInteger:()=>ia,IsLessEqualThan:()=>ma,IsLessThan:()=>pa,IsMaxLength:()=>ba,IsMinLength:()=>xa,IsMultipleOf:()=>ga,IsNull:()=>aa,IsNumber:()=>oa,IsObject:()=>ca,IsObjectNotArray:()=>sa,IsString:()=>la,IsSymbol:()=>ua,IsUndefined:()=>da,IsUnsafePropertyKey:()=>Oa,IsValueLike:()=>va,Keys:()=>M,ShiftLeft:()=>Da,Some:()=>wa,SomeAll:()=>Ta,Symbols:()=>ja,Values:()=>Ma});function $i(e){return Array.isArray(e)}function ea(e){return A(typeof e,`bigint`)}function ta(e){return A(typeof e,`boolean`)}function na(e){if(da(e)||!ra(e))return!1;let t=Function.prototype.toString.call(e);return!!(/^class\s/.test(t)||/\[native code\]/.test(t))}function ra(e){return A(typeof e,`function`)}function ia(e){return Number.isInteger(e)}function aa(e){return A(e,null)}function oa(e){return Number.isFinite(e)}function sa(e){return ca(e)&&!$i(e)}function ca(e){return A(typeof e,`object`)&&!aa(e)}function la(e){return A(typeof e,`string`)}function ua(e){return A(typeof e,`symbol`)}function da(e){return A(e,void 0)}function A(e,t){return e===t}function fa(e,t){return e>t}function pa(e,t){return e<t}function ma(e,t){return e<=t}function ha(e,t){return e>=t}function ga(e,t){if(ea(e)||ea(t))return BigInt(e)%BigInt(t)===0n;if(!oa(e)||ia(e)&&1/t%1==0)return!0;let n=e%t;return Math.min(Math.abs(n),Math.abs(n-t),Math.abs(n+t))<1e-10}function _a(e){if(!ca(e))return!1;let t=globalThis.Object.getPrototypeOf(e);return!aa(t)&&A(typeof t.constructor,`function`)&&!(A(t.constructor,globalThis.Object)||A(t.constructor.name,`Object`))}function va(e){return ea(e)||ta(e)||aa(e)||oa(e)||la(e)||da(e)}function ya(e){return qi(e)}function ba(e,t){return Zi(e,t)}function xa(e,t){return Xi(e,t)}function Sa(e,t,n){return e.every((e,r)=>r<t||n(e,r))}function Ca(e,t,n){let r=!0;return e.forEach((e,i)=>{i>=t&&!n(e,i)&&(r=!1)}),r}function wa(e,t){return e.some((e,n)=>t(e,n))}function Ta(e,t){let n=!1;return e.forEach((e,r)=>{t(e,r)&&(n=!0)}),n}function Ea(e,t){return e.reduce((e,n,r)=>t(n,r)?++e:e,0)}function Da(e,t,n){return A(e.length,0)?n():t(e[0],e.slice(1))}function Oa(e){return A(e,`__proto__`)||A(e,`constructor`)||A(e,`prototype`)}function j(e,t){return Oa(t)?Object.prototype.hasOwnProperty.call(e,t):t in e}function ka(e){return M(e).map(t=>[RegExp(`^${t}$`),e[t]])}function Aa(e){return Object.entries(e)}function M(e){return Object.getOwnPropertyNames(e)}function ja(e){return Object.getOwnPropertySymbols(e)}function Ma(e){return Object.values(e)}function Na(e,t){if(!ca(t))return!1;let n=M(e);return A(n.length,M(t).length)&&n.every(n=>Fa(e[n],t[n]))}function Pa(e,t){return $i(t)&&A(e.length,t.length)&&e.every((n,r)=>Fa(e[r],t[r]))}function Fa(e,t){return $i(e)?Pa(e,t):ca(e)?Na(e,t):A(e,t)}function Ia(e){return e instanceof Boolean}function La(e){return e instanceof Number}function Ra(e){return e instanceof String}function za(e){return globalThis.ArrayBuffer.isView(e)}function Ba(e){return e instanceof globalThis.RegExp}function Va(e){return e instanceof globalThis.Date}function Ha(e){return e instanceof globalThis.Set}function Ua(e){return e instanceof globalThis.Map}var Wa=Qi,Ga={immutableTypes:!1,maxErrors:8,maxInstantiationCount:128,useAcceleration:!0,exactOptionalPropertyTypes:!1,enumerableKind:!1,correctiveParse:!1,unionPrioritySort:!0};function Ka(){return Ga}function qa(e){return Ka().immutableTypes?Object.freeze(e):e}function Ja(e,t){return Ii.assign+=1,qa({...e,...t})}function Ya(e){return e}function Xa(e){return j(e,`~kind`)||j(e,`~unsafe`)}function Za(e){let t={};for(let n of M(e)){if(Oa(n))continue;let r=Object.getOwnPropertyDescriptor(e,n);r.value=ao(r.value),A(r.enumerable,!0)?t[n]=r.value:Object.defineProperty(t,n,r)}return t}function Qa(e){let t={};for(let n of M(e))Oa(n)||(t[n]=ao(e[n]));for(let n of ja(e))t[n]=ao(e[n]);return t}function $a(e){return _a(e)?Ya(e):Xa(e)?Za(e):Qa(e)}function eo(e){return e.map(e=>ao(e))}function to(e){return e.slice()}function no(e){return new RegExp(e.source,e.flags)}function ro(e){return new Map(ao([...e.entries()]))}function io(e){return new Set(ao([...e.values()]))}function ao(e){return za(e)?to(e):Ba(e)?no(e):Ua(e)?ro(e):Ha(e)?io(e):$i(e)?eo(e):ca(e)?$a(e):e}function oo(e){return Ii.clone+=1,ao(e)}function so(e,t){for(let n of Object.keys(t))Object.defineProperty(e,n,{configurable:!0,writable:!0,enumerable:!1,value:t[n]});return e}function co(e,t){return{...e,...t}}function lo(e,t,n={}){Ii.create+=1;let r=co(t,n);return qa(Ka().enumerableKind?co(r,e):so(r,e))}function uo(e,t){Ii.discard+=1;let n={};for(let r of M(e)){if(t.includes(r))continue;let i=Object.getOwnPropertyDescriptor(e,r);i.value=oo(i.value),Object.defineProperty(n,r,i)}return qa(n)}function fo(e,t,n){Ii.update+=1;let r=Ka(),i=oo(e);for(let e of Object.keys(t))Object.defineProperty(i,e,{configurable:!0,writable:!0,enumerable:r.enumerableKind,value:t[e]});for(let e of Object.keys(n))Object.defineProperty(i,e,{configurable:!0,enumerable:!0,writable:!0,value:n[e]});return qa(i)}function po(e,t){return ca(e)&&j(e,`~kind`)&&A(e[`~kind`],t)}function mo(e){return ca(e)}function ho(e,t,n){return lo({"~kind":`Deferred`},{type:`deferred`,action:e,parameters:t,options:n},{})}function go(e){return po(e,`Deferred`)}function _o(e){return fo(e,{"~readonly":!0},{})}function vo(e,t){return fo(_o(e),{},t)}function yo(e,t,n,r){return vo(I(e,t,n),r)}function bo(e){return fo(e,{"~optional":!0},{})}function xo(e,t){return fo(bo(e),{},t)}function So(e,t,n,r){return xo(I(e,t,n),r)}function Co(e,t){return lo({"~kind":`Array`},{type:`array`,items:e},t)}function wo(e){return po(e,`Array`)}function To(e){return uo(e,[`~kind`,`type`,`items`])}function Eo(e,t,n={}){return lo({"~kind":`Constructor`},{type:`constructor`,parameters:e,instanceType:t},n)}function Do(e){return po(e,`Constructor`)}function Oo(e){return uo(e,[`~kind`,`type`,`parameters`,`instanceType`])}function ko(e,t,n={}){return lo({"~kind":`Function`},{type:`function`,parameters:e,returnType:t},n)}function Ao(e){return po(e,`Function`)}function jo(e){return uo(e,[`~kind`,`type`,`parameters`,`returnType`])}function Mo(e,t){return lo({"~kind":`Ref`},{$ref:e},t)}function No(e){return po(e,`Ref`)}function Po(e,t){return lo({"~kind":`Generic`},{type:`generic`,parameters:e,expression:t})}function Fo(e){return po(e,`Generic`)}function Io(e){return lo({"~kind":`Any`},{},e)}function Lo(e){return po(e,`Any`)}var Ro=`(?!)`;function zo(e){return lo({"~kind":`Never`},{not:{}},e)}function Bo(e){return po(e,`Never`)}function Vo(e,t={}){return xo(e,t)}function N(e){return Vo(e)}function Ho(e){return mo(e)&&j(e,`~optional`)}function Uo(e){return M(e).filter(t=>!Ho(e[t]))}function Wo(e){return M(e)}function Go(e){return Ma(e)}function P(e,t={}){let n=Uo(e);return lo({"~kind":`Object`},{type:`object`,...n.length>0?{required:n}:{},properties:e},t)}function Ko(e){return po(e,`Object`)}function qo(e){return uo(e,[`~kind`,`type`,`properties`,`required`])}function Jo(e){return lo({"~kind":`Unknown`},{},e)}function Yo(e){return po(e,`Unknown`)}function Xo(e,t,n){return lo({"~kind":`Cyclic`},{$defs:M(e).reduce((t,n)=>({...t,[n]:fo(e[n],{},{$id:n})}),{}),$ref:t},n)}function Zo(e){return po(e,`Cyclic`)}function Qo(e){return fo(e,{"~unsafe":null},{})}function $o(e){return sa(e)&&j(e,`~unsafe`)&&aa(e[`~unsafe`])}function es(e,t){return t[e.length]?.(...e)??(()=>{throw Error(`Invalid Arguments`)})()}function ts(e){return po(e,`Infer`)}function ns(e,t,n,r={}){return lo({"~kind":`Dependent`},{if:e,then:t,else:n},r)}function rs(e){return po(e,`Dependent`)}function is(e){return uo(e,[`~kind`,`if`,`then`,`else`])}function as(e){return sa(e)}function os(e){return M(e).filter(e=>isNaN(e)).reduce((t,n)=>[...t,e[n]],[])}function ss(e,t){return lo({"~kind":`Enum`},{enum:as(e)?os(e):e},t)}function cs(e){return po(e,`Enum`)}function ls(e,t={}){return lo({"~kind":`Intersect`},{allOf:e},t)}function us(e){return po(e,`Intersect`)}function ds(e){return uo(e,[`~kind`,`allOf`])}function fs(){throw Error(`Unreachable`)}function ps(e){let t=new Set,n=e;for(;n&&n!==Object.prototype;){for(let e of Reflect.ownKeys(n))e!==`constructor`&&typeof e!=`symbol`&&t.add(e);n=Object.getPrototypeOf(n)}return[...t]}function ms(e){return typeof e==`number`}var hs;(function(e){e[e.Array=0]=`Array`,e[e.BigInt=1]=`BigInt`,e[e.Boolean=2]=`Boolean`,e[e.Date=3]=`Date`,e[e.Constructor=4]=`Constructor`,e[e.Function=5]=`Function`,e[e.Null=6]=`Null`,e[e.Number=7]=`Number`,e[e.Object=8]=`Object`,e[e.RegExp=9]=`RegExp`,e[e.String=10]=`String`,e[e.Symbol=11]=`Symbol`,e[e.TypeArray=12]=`TypeArray`,e[e.Undefined=13]=`Undefined`})(hs||={});var gs=BigInt(`14695981039346656037`),[_s,vs]=[BigInt(`1099511628211`),BigInt(`18446744073709551616`)],ys=Array.from({length:256}).map((e,t)=>BigInt(t)),bs=new Float64Array(1),xs=new DataView(bs.buffer),Ss=new Uint8Array(bs.buffer);function Cs(e){gs^=ys[e],gs=gs*_s%vs}function ws(e){Cs(hs.Array);for(let t of e)zs(t)}function Ts(e){Cs(hs.BigInt),xs.setBigInt64(0,e);for(let e of Ss)Cs(e)}function Es(e){Cs(hs.Boolean),Cs(+!!e)}function Ds(e){Cs(hs.Constructor),zs(e.toString())}function Os(e){Cs(hs.Date),zs(e.getTime())}function ks(e){Cs(hs.Function),zs(e.toString())}function As(e){Cs(hs.Null)}function js(e){Cs(hs.Number),xs.setFloat64(0,e,!0);for(let e of Ss)Cs(e)}function Ms(e){Cs(hs.Object);for(let t of ps(e).sort())zs(t),zs(e[t])}function Ns(e){Cs(hs.RegExp),Fs(e.toString())}var Ps=new TextEncoder;function Fs(e){Cs(hs.String);for(let t of Ps.encode(e))Cs(t)}function Is(e){Cs(hs.Symbol),zs(e.toString())}function Ls(e){Cs(hs.TypeArray);let t=new Uint8Array(e.buffer);for(let e=0;e<t.length;e++)Cs(t[e])}function Rs(e){return Cs(hs.Undefined)}function zs(e){return za(e)?Ls(e):Va(e)?Os(e):Ba(e)?Ns(e):Ia(e)?Es(e.valueOf()):Ra(e)?Fs(e.valueOf()):La(e)?js(e.valueOf()):ms(e)?js(e):$i(e)?ws(e):ta(e)?Es(e):ea(e)?Ts(e):na(e)?Ds(e):aa(e)?As(e):ca(e)?Ms(e):la(e)?Fs(e):ua(e)?Is(e):da(e)?Rs(e):ra(e)?ks(e):fs()}function Bs(e){return gs=BigInt(`14695981039346656037`),zs(e),gs}function Vs(e){return Bs(e).toString(16).padStart(16,`0`)}function Hs(e){switch(e.keyword){case`additionalProperties`:return`must not have additional properties`;case`anyOf`:return`must match a schema in anyOf`;case`boolean`:return`schema is false`;case`const`:return`must be equal to constant`;case`contains`:return`must contain at least 1 valid item`;case`dependencies`:return`must have properties ${e.params.dependencies.join(`, `)} when property ${e.params.property} is present`;case`dependentRequired`:return`must have properties ${e.params.dependencies.join(`, `)} when property ${e.params.property} is present`;case`enum`:return`must be equal to one of the allowed values`;case`exclusiveMaximum`:return`must be ${e.params.comparison} ${e.params.limit}`;case`exclusiveMinimum`:return`must be ${e.params.comparison} ${e.params.limit}`;case`format`:return`must match format "${e.params.format}"`;case`if`:return`must match "${e.params.failingKeyword}" schema`;case`maxItems`:return`must not have more than ${e.params.limit} items`;case`maxLength`:return`must not have more than ${e.params.limit} characters`;case`maxProperties`:return`must not have more than ${e.params.limit} properties`;case`maximum`:return`must be ${e.params.comparison} ${e.params.limit}`;case`minItems`:return`must not have fewer than ${e.params.limit} items`;case`minLength`:return`must not have fewer than ${e.params.limit} characters`;case`minProperties`:return`must not have fewer than ${e.params.limit} properties`;case`minimum`:return`must be ${e.params.comparison} ${e.params.limit}`;case`multipleOf`:return`must be multiple of ${e.params.multipleOf}`;case`not`:return`must not be valid`;case`oneOf`:return`must match exactly one schema in oneOf`;case`pattern`:return`must match pattern "${e.params.pattern}"`;case`propertyNames`:return`property names ${e.params.propertyNames.join(`, `)} are invalid`;case`required`:return`must have required properties ${e.params.requiredProperties.join(`, `)}`;case`type`:return typeof e.params.type==`string`?`must be ${e.params.type}`:`must be either ${e.params.type.join(` or `)}`;case`unevaluatedItems`:return`must not have unevaluated items`;case`unevaluatedProperties`:return`must not have unevaluated properties`;case`uniqueItems`:return`must not have duplicate items`;case`~refine`:return e.params.message;default:return`an unknown validation error occurred`}}var Us=Hs;function Ws(){return Us}function Gs(e){return B_(e)}function Ks(e){return mo(e)&&j(e,`~immutable`)}function qs(e,t={}){return vo(e,t)}function Js(e){return mo(e)&&j(e,`~readonly`)}var Ys=`-?(?:0|[1-9][0-9]*)n`;function Xs(e){return lo({"~kind":`BigInt`},{type:`bigint`},e)}function Zs(e){return po(e,`BigInt`)}function Qs(e){return lo({"~kind":`Boolean`},{type:`boolean`},e)}function $s(e){return po(e,`Boolean`)}var ec=`-?(?:0|[1-9][0-9]*)`;function tc(e){return lo({"~kind":`Integer`},{type:`integer`},e)}function nc(e){return po(e,`Integer`)}var rc=class extends Error{constructor(e){super(`Invalid Literal value`),Object.defineProperty(this,"cause",{value:{value:e},writable:!1,configurable:!1,enumerable:!1})}};function ic(e){return ea(e)?`bigint`:ta(e)?`boolean`:oa(e)?`number`:la(e)?`string`:(()=>{throw new rc(e)})()}function F(e,t){return lo({"~kind":`Literal`},{type:ic(e),const:e},t)}function ac(e){return ea(e)||ta(e)||oa(e)||la(e)}function oc(e){return cc(e)&&oa(e.const)}function sc(e){return cc(e)&&la(e.const)}function cc(e){return po(e,`Literal`)}function lc(e){return lo({"~kind":`Null`},{type:`null`},e)}function uc(e){return po(e,`Null`)}var dc=`-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?`;function fc(e){return lo({"~kind":`Number`},{type:`number`},e)}function pc(e){return po(e,`Number`)}function mc(e){return lo({"~kind":`Symbol`},{type:`symbol`},e)}function hc(e){return po(e,`Symbol`)}function gc(e){return lo({"~kind":`String`},{type:`string`},e)}function _c(e){return po(e,`String`)}function vc(e,t={}){return lo({"~kind":`Union`},{anyOf:e},t)}function yc(e){return po(e,`Union`)}function bc(e){return uo(e,[`~kind`,`anyOf`])}function xc(e){let t=Zu(e);return A(t.length,2)?t[0]:[]}function Sc(e){return!0}function Cc(e){return Da(e,(e,t)=>Tc(e)?Cc(t):!1,()=>!0)}function wc(e){return!A(e.length,0)&&Cc(e)}function Tc(e){return yc(e)?wc(e.anyOf):cc(e)?Sc(e.const):!1}function Ec(e){return wc(e)}function Dc(e){return lo({"~kind":`TemplateLiteral`},{type:`string`,pattern:e},{})}function Oc(e,t,n=[]){return Da(e,(e,r)=>Oc(r,t,[...n,`${e}${t}`]),()=>n)}function kc(e,t){return A(e.length,0)?[`${t}`]:Oc(e,t)}function Ac(e,t,n=[]){return Da(t,(t,r)=>Ac(e,r,[...n,...jc(e,t)]),()=>n)}function jc(e,t){return yc(t)?Ac(e,t.anyOf):cc(t)?kc(e,t.const):fs()}function Mc(e,t){return Da(t,(t,n)=>Mc(jc(e,t),n),()=>e)}function Nc(e){return e.map(e=>F(e))}function Pc(e){return vc(Nc(Mc([],e)))}function Fc(e){return A(e.length,0)?fs():A(e.length,1)&&cc(e[0])?e[0]:Pc(e)}function Ic(e){let t=xc(e);return A(t.length,0)?gc():Ec(t)?Fc(t):Dc(e)}function Lc(e){let t=Ic(e);return vd(t)?gc():t}function Rc(e,t){return lo({"~kind":`Record`},{type:`object`,patternProperties:{[e]:t}})}function zc(e){return Rc(Gl,e)}function Bc(e){return P({true:e,false:e})}function Vc(e,t={}){let[n,r,i]=[e,e.length,!1];return lo({"~kind":`Tuple`},{type:`array`,additionalItems:i,items:n,minItems:r},t)}function Hc(e){return po(e,`Tuple`)}function Uc(e){return uo(e,[`~kind`,`type`,`items`,`minItems`,`additionalItems`])}function Wc(e){return uo(e,[`~readonly`])}function Gc(e,t){return fo(Wc(e),{},t)}function Kc(e,t,n,r){return Gc(I(e,t,n),r)}function qc(e,t={}){return Gc(e,t)}function Jc(e){return uo(e,[`~optional`])}function Yc(e,t){return fo(Jc(e),{},t)}function Xc(e,t,n,r){return Yc(I(e,t,n),r)}function Zc(e,t={}){return Yc(e,t)}function Qc(e){return e.reduceRight((e,t,n)=>({[n]:t,...e}),{})}function $c(e){return P(Qc(e.items))}function el(e){return Ko(e)||Hc(e)}function tl(e,t){return Js(e)?!!Js(t):!1}function nl(e,t){return Ho(e)?!!Ho(t):!1}function rl(e,t){let n=tl(e,t),r=nl(e,t),i=qc(Zc(xl([e,t])));return n&&r?qs(Vo(i)):n&&!r?qs(i):!n&&r?Vo(i):i}function il(e,t,n){return n in e?n in t?rl(e[n],t[n]):e[n]:n in t?t[n]:zo()}function al(e,t){return[...new Set([...M(e),...M(t)])].reduce((n,r)=>({...n,[r]:il(e,t,r)}),{})}function ol(e){return Ko(e)?e.properties:Hc(e)?Qc(e.items):{}}function sl(e,t){return P(al(ol(e),ol(t)))}function cl(e,t){let n=Cp(e,t);return A(n,2)?e:A(n,3)||A(n,0)?t:zo()}function ll(e,t){let n=el(e),r=el(t);return n&&r?sl(e,t):n&&!r?e:!n&&r?t:cl(e,t)}function ul(e,t){return Bo(e)||Lo(e)?e:Yo(e)||Bo(t)||Lo(t)?t:Yo(t)?e:ll(e,t)}function dl(e,t){return yc(e)||yc(t)}function fl(e,t){let n=wl(e),r=wl(t);return dl(n,r)?xl([n,r]):ul(n,r)}function pl(e,t,n=[]){return Da(t,(t,r)=>pl(e,r,[...n,fl(t,e)]),()=>A(n.length,0)?[e]:n)}function ml(e,t,n=[]){return Da(e,(e,r)=>ml(r,t,[...n,...hl([e],t)]),()=>n)}function hl(e,t=[]){return Da(e,(e,n)=>yc(e)?hl(n,ml(e.anyOf,t)):hl(n,pl(e,t)),()=>t)}function gl(e,t){return Td(Sp({},e,t))?[]:[e]}function _l(e,t,n=[]){return Da(e,(e,r)=>_l(r,t,[...n,...gl(e,t)]),()=>n)}function vl(e,t){let n=wl(e);return Cl(_l(yc(n)?n.anyOf:[n],t))}function yl(e,t,n){return Cl([xl([e,t]),vl(n,e)])}function bl(e,t=[]){return Da(e,(e,n)=>bl(n,[...t,F(e)]),()=>Cl(t))}function xl(e){return Cl(Dp(hl(e)))}function Sl(e){return wl(Lc(e))}function Cl(e){return Tl(Dp(e))}function wl(e){return rs(e)?yl(e.if,e.then,e.else):cs(e)?bl(e.enum):us(e)?xl(e.allOf):vd(e)?Sl(e.pattern):yc(e)?Cl(e.anyOf):e}function Tl(e){return A(e.length,1)?e[0]:A(e.length,0)?zo():vc(e)}function El(e,t){return Bl(bl(e),t)}function Dl(e,t){return Rc(Ul,t)}function Ol(e,t){return Bl(xl(e),t)}function kl(e,t){return la(e)||oa(e)?P({[e]:t}):A(e,!1)?P({false:t}):A(e,!0)?P({true:t}):P({})}function Al(e,t){return Rc(Wl,t)}function jl(e,t){return j(e,`pattern`)&&(la(e.pattern)||e.pattern instanceof RegExp)?Rc(e.pattern.toString(),t):Rc(Gl,t)}function Ml(e,t){return Ec(xc(e))?Bl(Sl(e),t):Rc(e,t)}function Nl(e){return yc(e)?Pl(e.anyOf):[e]}function Pl(e,t=[]){return Da(e,(e,n)=>Pl(n,[...t,...Nl(e)]),()=>t)}function Fl(e){return e.some(e=>_c(e)||pc(e)||nc(e))}function Il(e,t){return A(Fl(e),!0)?Rc(Gl,t):void 0}function Ll(e,t){return e.reduce((e,n)=>cc(n)&&(la(n.const)||oa(n.const))?{...e,[n.const]:t}:e,{})}function Rl(e,t){return P(Ll(e,t))}function zl(e,t){let n=Pl(e),r=Il(n,t);return mo(r)?r:Rl(n,t)}function Bl(e,t){return Lo(e)?zc(t):$s(e)?Bc(t):cs(e)?El(e.enum,t):nc(e)?Dl(e,t):us(e)?Ol(e.allOf,t):cc(e)?kl(e.const,t):pc(e)?Al(e,t):yc(e)?zl(e.anyOf,t):_c(e)?jl(e,t):vd(e)?Ml(e.pattern,t):P({})}function Vl(e,t,n){return k_([e])?fo(Bl(e,t),{},n):Kl(e,t,n)}function Hl(e,t,n,r,i){return Vl(I(e,t,n),I(e,t,r),i)}var Ul=`^${ec}$`,Wl=`^${dc}$`,Gl=`^.*$`;function Kl(e,t,n={}){return ho(`Record`,[e,t],n)}function ql(e,t,n={}){return Vl(e,t,n)}function Jl(e,t){return Rc(e,t)}function Yl(e){return A(e,Gl)?gc():A(e,Ul)?tc():A(e,Wl)?fc():Ic(e)}function Xl(e){return M(e.patternProperties)[0]}function Zl(e){return Yl(Xl(e))}function Ql(e){return e.patternProperties[Xl(e)]}function $l(e){return po(e,`Record`)}function eu(e){return lo({"~kind":`Rest`},{type:`rest`,items:e},{})}function tu(e){return po(e,`Rest`)}function nu(e){return po(e,`This`)}function ru(e){return lo({"~kind":`Undefined`},{type:`undefined`},e)}function iu(e){return po(e,`Undefined`)}function au(e){return po(e,`Void`)}function ou(e){return Xs()}function su(e){return gc()}function cu(e){return fc()}function lu(e){return tc()}function uu(e){return zo()}function du(e){return F(e)}function fu(e){return e}function pu(e){return vc(e[1])}function mu(e){return e.length===3?[...e[0],...e[2]]:e.length===1?[...e[0]]:[]}function hu(e){return[e[0],...e[1]]}function gu(e){return e}function _u(e){return e[1]}function vu(e){return A(e.length,2)}function yu(e,t,n){return vu(e)?t(e[0],e[1]):n()}function bu(e,t){return A(t.indexOf(e),0)?[e,t.slice(e.length)]:[]}function xu(e,t){for(let n=0;n<e.length;n++){let r=bu(e[n],t);if(vu(r))return r}return[]}function Su(e,t){return Array.from({length:t-e+1},(t,n)=>String.fromCharCode(e+n))}var Cu=[...Su(97,122),...Su(65,90)],wu=[`0`,...Su(49,57)],Tu=`//`,Eu=`/*`,Du=`*/`;function Ou(e){let t=e.indexOf(Du);return A(t,-1)?``:e.slice(t+2)}function ku(e){let t=e.indexOf(`
|
|
11
|
+
`);return A(t,-1)?``:e.slice(t)}function Au(e){return e.replace(/^[ \t\r\f\v]+/,``)}function ju(e){let t=Au(e);return t.startsWith(Eu)?ju(Ou(t.slice(2))):t.startsWith(Tu)?ju(ku(t.slice(2))):t}function Mu(e){let t=e.trimStart();return t.startsWith(Eu)?Mu(Ou(t.slice(2))):t.startsWith(Tu)?Mu(ku(t.slice(2))):t}[...wu];function Nu(e,t){return xu([e],t)}function Pu(e,t){return A(e,``)?[``,t]:e.startsWith(`
|
|
12
|
+
`)?Nu(e,ju(t)):e.startsWith(` `)?Nu(e,t):Nu(e,Mu(t))}[...Cu,...wu],[...wu];function Fu(e){return A(e,``)?[]:[e.slice(0,1),e.slice(1)]}function Iu(e,t){return Da(e,(e,n)=>t.startsWith(e)?!0:Iu(n,t),()=>!1)}function Lu(e,t,n=``){return yu(Fu(t),(r,i)=>Iu(e,t)?[n,t]:Lu(e,i,`${n}${r}`),()=>[])}function Ru(e,t){return yu(Lu(e,t),(e,t)=>A(e,``)?[]:[e,t],()=>[])}var zu=(e,t,n=()=>[])=>e.length===2?t(e):n(),Bu=e=>zu(Pu(`-?(?:0|[1-9][0-9]*)n`,e),([e,t])=>[ou(e),t]),Vu=e=>zu(Pu(`.*`,e),([e,t])=>[su(e),t]),Hu=e=>zu(Pu(`-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?`,e),([e,t])=>[cu(e),t]),Uu=e=>zu(Pu(`-?(?:0|[1-9][0-9]*)`,e),([e,t])=>[lu(e),t]),Wu=e=>zu(Pu(`(?!)`,e),([e,t])=>[uu(e),t]),Gu=e=>zu(Ru([`-?(?:0|[1-9][0-9]*)n`,`.*`,`-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?`,`-?(?:0|[1-9][0-9]*)`,`(?!)`,`(`,`)`,`$`,`|`],e),([e,t])=>[du(e),t]),Ku=e=>zu(zu(Bu(e),([e,t])=>[e,t],()=>zu(Vu(e),([e,t])=>[e,t],()=>zu(Hu(e),([e,t])=>[e,t],()=>zu(Uu(e),([e,t])=>[e,t],()=>zu(Wu(e),([e,t])=>[e,t],()=>zu(qu(e),([e,t])=>[e,t],()=>zu(Gu(e),([e,t])=>[e,t],()=>[]))))))),([e,t])=>[fu(e),t]),qu=e=>zu(zu(Pu(`(`,e),([e,t])=>zu(Xu(t),([t,n])=>zu(Pu(`)`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[pu(e),t]),Ju=e=>zu(zu(zu(Yu(e),([e,t])=>zu(Pu(`|`,t),([t,n])=>zu(Ju(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>zu(zu(Yu(e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>zu([[],e],([e,t])=>[e,t],()=>[]))),([e,t])=>[mu(e),t]),Yu=e=>zu(zu(Ku(e),([e,t])=>zu(Xu(t),([t,n])=>[[e,t],n])),([e,t])=>[hu(e),t]),Xu=e=>zu(zu(Ju(e),([e,t])=>[e,t],()=>zu(Yu(e),([e,t])=>[e,t],()=>[])),([e,t])=>[gu(e),t]),Zu=e=>zu(zu(Pu(`^`,e),([e,t])=>zu(Xu(t),([t,n])=>zu(Pu(`$`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[_u(e),t]);function Qu(e){return e.join(`|`)}function $u(e){return e.slice(1,e.length-1)}function ed(e,t,n){return dd(t,`${n}${e}`)}function td(e,t){return dd(e,`${t}${Ys}`)}function nd(e,t){return dd(e,`${t}${ec}`)}function rd(e,t){return dd(e,`${t}${dc}`)}function id(e,t){return ud(vc([F(`false`),F(`true`)]),e,t)}function ad(e,t){return dd(e,`${t}.*`)}function od(e,t,n){return dd(t,`${n}${$u(e)}`)}function sd(e,t,n){return ud(md(e,{}),t,n)}function cd(e,t,n){return ud(bl(e),t,n)}function ld(e,t,n,r=[]){return Da(e,(e,i)=>ld(i,t,n,[...r,ud(e,[],``)]),()=>dd(t,`${n}(${Qu(r)})`))}function ud(e,t,n){return cs(e)?cd(e.enum,t,n):nc(e)?nd(t,n):cc(e)?ed(e.const,t,n):Zs(e)?td(t,n):$s(e)?id(t,n):pc(e)?rd(t,n):_c(e)?ad(t,n):vd(e)?od(e.pattern,t,n):_d(e)?sd(e.parameters[0],t,n):yc(e)?ld(e.anyOf,t,n):Ro}function dd(e,t){return Da(e,(e,n)=>ud(e,n,t),()=>t)}function fd(e){return`^${dd(e,``)}$`}function pd(e){return Dc(fd(e))}function md(e,t){return k_(e)?fo(pd(e),{},t):gd(e,t)}function hd(e,t,n,r){return md(M_(e,t,n),r)}function gd(e,t={}){return ho(`TemplateLiteral`,[e],t)}function _d(e){return mo(e)&&j(e,`action`)&&A(e.action,`TemplateLiteral`)}function vd(e){return po(e,`TemplateLiteral`)}function yd(e){return lo({"~kind":`ExtendsUnion`},{inferred:e})}function bd(e){return ca(e)&&j(e,`~kind`)&&j(e,`inferred`)&&A(e[`~kind`],`ExtendsUnion`)&&ca(e.inferred)}function xd(e){return lo({"~kind":`ExtendsTrue`},{inferred:e})}function Sd(e){return ca(e)&&j(e,`~kind`)&&j(e,`inferred`)&&A(e[`~kind`],`ExtendsTrue`)&&ca(e.inferred)}function Cd(){return lo({"~kind":`ExtendsFalse`},{})}function wd(e){return ca(e)&&j(e,`~kind`)&&A(e[`~kind`],`ExtendsFalse`)}function Td(e){return bd(e)||Sd(e)}function Ed(e,t,n){return Td(e)?t(e.inferred):n()}function Dd(e,t,n,r){return Ed(Kf(e,n,r),r=>xd(Ja(Ja(e,r),{[t]:n})),()=>Cd())}function Od(e,t){return xd(e)}function kd(e,t,n,r,i){return Ed(Kf(e,t,n),e=>Ed(Kf(e,t,r),e=>xd(e),()=>Cd()),()=>Ed(Kf(e,t,i),e=>xd(e),()=>Cd()))}function Ad(e,t,n){return Kf(e,t,bl(n))}function jd(e,t,n){return Da(n,(n,r)=>Ed(Kf(e,t,n),e=>jd(e,t,r),()=>Cd()),()=>xd(e))}function Md(e,t,n){return Kf(e,t,Sl(n))}function Nd(e,t,n){return Da(n,(n,r)=>Ed(Kf(e,t,n),e=>xd(e),()=>Nd(e,t,r)),()=>Cd())}function Pd(e,t,n){return Lo(n)?Od(e,t):rs(n)?kd(e,t,n.if,n.then,n.else):cs(n)?Ad(e,t,n.enum):ts(n)?Dd(e,n.name,t,n.extends):us(n)?jd(e,t,n.allOf):vd(n)?Md(e,t,n.pattern):yc(n)?Nd(e,t,n.anyOf):Yo(n)?xd(e):Cd()}function Fd(e,t,n){return ts(n)?Pd(e,t,n):Lo(n)||Yo(n)?xd(e):yd(e)}function Id(e,t){let n=Ks(e),r=Ks(t);return n&&r||!n&&r?!0:!(n&&!r)}function Ld(e,t,n,r){return wo(r)?Id(t,r)?Kf(e,n,r.items):Cd():Pd(e,t,r)}function Rd(e,t,n){return Zs(n)?xd(e):Pd(e,t,n)}function zd(e,t,n){return $s(n)?xd(e):Pd(e,t,n)}function Bd(e,t,n,r,i){let a=ts(r)?t:r,o=ts(r)?r:t,s=Ho(t),c=Ho(r);return!s&&c?Cd():Ed(Kf(e,a,o),e=>Ud(e,n,i),()=>Cd())}function Vd(e,t,n,r){return Da(r,(r,i)=>Bd(e,t,n,r,i),()=>Ho(t)?xd(e):Cd())}function Hd(e,t,n){return Da(t,(t,r)=>Vd(e,t,r,n),()=>xd(e))}function Ud(e,t,n){return Hd(e,t,n)}function Wd(e,t,n){return au(n)?xd(e):Kf(e,t,n)}function Gd(e,t,n,r){return Lo(r)||Yo(r)?xd(e):Do(r)?Ed(Ud(e,t,r.parameters),e=>Wd(e,n,r.instanceType),()=>Cd()):Cd()}function Kd(e,t,n,r,i){return Ed(Kf(e,t,i),()=>Kf(e,n,i),()=>Kf(e,r,i))}function qd(e,t,n){return Kf(e,bl(t),n)}function Jd(e,t,n,r){return Lo(r)||Yo(r)?xd(e):Ao(r)?Ed(Ud(e,t,r.parameters),e=>Wd(e,n,r.returnType),()=>Cd()):Cd()}function Yd(e,t,n){return nc(n)||pc(n)?xd(e):Pd(e,t,n)}function Xd(e,t,n){return Kf(e,xl(t),n)}function Zd(e,t,n){return t===n?xd(e):Cd()}function Qd(e,t,n){return cc(n)?Zd(e,t,n.const):Zs(n)?xd(e):Pd(e,F(t),n)}function $d(e,t,n){return cc(n)?Zd(e,t,n.const):$s(n)?xd(e):Pd(e,F(t),n)}function ef(e,t,n){return cc(n)?Zd(e,t,n.const):pc(n)?xd(e):Pd(e,F(t),n)}function tf(e,t,n){return cc(n)?Zd(e,t,n.const):_c(n)?xd(e):Pd(e,F(t),n)}function nf(e,t,n){return ea(t.const)?Qd(e,t.const,n):ta(t.const)?$d(e,t.const,n):oa(t.const)?ef(e,t.const,n):la(t.const)?tf(e,t.const,n):fs()}function rf(e,t,n){return ts(n)?Pd(e,t,n):xd(e)}function af(e,t,n){return uc(n)?xd(e):Pd(e,t,n)}function of(e,t,n){return pc(n)?xd(e):Pd(e,t,n)}function sf(e,t,n){return Ho(t)?Ho(n)?xd(e):Cd():xd(e)}function cf(e,t,n){return ts(n)&&Bo(n.extends)?Cd():Ed(Kf(e,t,n),e=>sf(e,t,n),()=>Cd())}function lf(e,t){return e.reduce((e,n)=>n in t&&Td(t[n])?{...e,...t[n].inferred}:fs(),{})}function uf(e,t,n){let r={};for(let i of M(n))r[i]=i in t?cf({},t[i],n[i]):Ho(n[i])?ts(n[i])?xd(Ja(e,{[n[i].name]:n[i].extends})):xd(e):Cd();let i=Ma(r).every(e=>Td(e)),a=i?lf(M(r),r):{};return i?xd(a):Cd()}function df(e,t,n){let r=uf(e,t,n);return Td(r)?xd(Ja(e,r.inferred)):Cd()}function ff(e,t,n){return df(e,t,n)}function pf(e,t){return M(t).reduce((n,r)=>({...n,[r]:j(e,r)?yc(n[r])?vc([...n[r].anyOf,t[r]]):vc([e[r],t[r]]):t[r]}),e)}function mf(e,t,n,r){return Da(t,(t,i)=>Ed(Kf({},e[t],n),t=>mf(e,i,n,pf(r,t)),()=>Cd()),()=>xd(r))}function hf(e,t,n,r){return mf(t,M(t),r,e)}function gf(e,t,n){return $l(n)?hf(e,t,Xl(n),Ql(n)):Ko(n)?ff(e,t,n.properties):Pd(e,P(t),n)}function _f(e,t){return A(M(t).length,0)?xd(e):Cd()}function vf(e,t,n,r,i){return Kf(e,n,i)}function yf(e,t,n,r){return $l(r)?vf(e,Yl(t),n,Yl(Xl(r)),Ql(r)):Ko(r)?_f(e,r.properties):Lo(r)||Yo(r)?xd(e):Cd()}function bf(e,t,n){return _c(n)?xd(e):Pd(e,t,n)}function xf(e,t,n){return hc(n)?xd(e):Pd(e,t,n)}function Sf(e,t,n){return Kf(e,Sl(t),n)}function Cf(e,t){return lo({"~kind":`Inferrable`},{name:e,type:t},{})}function wf(e){return ca(e)&&j(e,`~kind`)&&j(e,`name`)&&j(e,`type`)&&A(e[`~kind`],`Inferrable`)&&la(e.name)&&ca(e.type)}function Tf(e){return tu(e)?ts(e.items)?wo(e.items.extends)?Cf(e.items.name,e.items.extends.items):Yo(e.items.extends)?Cf(e.items.name,e.items.extends):void 0:fs():void 0}function Ef(e){return ts(e)?Cf(e.name,e.extends):void 0}function Df(e,t,n=[]){return Da(e,(e,r)=>Ed(Kf({},e,t),()=>Df(r,t,[...n,e]),()=>void 0),()=>n)}function Of(e,t,n,r){let i=Df(n,r);return $i(i)?xd(Ja(e,{[t]:Vc(i)})):Cd()}function kf(e,t,n,r){let i=Df(n,r);return $i(i)?xd(Ja(e,{[t]:vc(i)})):Cd()}function Af(e){return[...e].reverse()}function jf(e,t){return t?Af(e):e}function Mf(e){let t=e.length>0?e[0]:void 0;return mo(mo(t)?Tf(t):void 0)}function Nf(e,t,n,r,i,a){return Ed(Kf(e,n,i),e=>If(e,t,r,a),()=>Cd())}function Pf(e,t,n,r,i){let a=Tf(r);return wf(a)?Of(e,a.name,jf(n,t),a.type):Da(n,(n,a)=>Nf(e,t,n,a,r,i),()=>Cd())}function Ff(e,t,n,r){return Da(r,(r,i)=>Pf(e,t,n,r,i),()=>A(n.length,0)?xd(e):Cd())}function If(e,t,n,r){return Ff(e,t,n,r)}function Lf(e,t,n){let r=j_(e,O_([],[]),n),i=Mf(r);return If(e,i,jf(t,i),jf(r,i))}function Rf(e,t,n){let r=Ef(n);return wf(r)?kf(e,r.name,t,r.type):Da(t,(t,r)=>Ed(Kf(e,t,n),e=>Rf(e,r,n),()=>Cd()),()=>xd(e))}function zf(e,t,n){let r=j_(e,O_([],[]),t);return Hc(n)?Lf(e,r,n.items):wo(n)?Rf(e,r,n.items):Pd(e,Vc(r),n)}function Bf(e,t,n){return au(n)||iu(n)?xd(e):Pd(e,t,n)}function Vf(e,t,n){return Da(n,(n,r)=>Ed(Kf(e,t,n),e=>xd(e),()=>Vf(e,t,r)),()=>Cd())}function Hf(e,t,n){return Da(t,(t,r)=>Ed(Vf(e,t,n),e=>Hf(e,r,n),()=>Cd()),()=>xd(e))}function Uf(e,t,n){let r=Ef(n);return wf(r)?kf(e,r.name,t,r.type):yc(n)?Hf(e,t,n.anyOf):Hf(e,t,[n])}function Wf(e,t,n){return ts(n)?Pd(e,t,n):Lo(n)||Yo(n)?xd(e):Cd()}function Gf(e,t,n){return au(n)?xd(e):Pd(e,t,n)}function Kf(e,t,n){return Lo(t)?Fd(e,t,n):wo(t)?Ld(e,t,t.items,n):Zs(t)?Rd(e,t,n):$s(t)?zd(e,t,n):Do(t)?Gd(e,t.parameters,t.instanceType,n):rs(t)?Kd(e,t.if,t.then,t.else,n):cs(t)?qd(e,t.enum,n):Ao(t)?Jd(e,t.parameters,t.returnType,n):nc(t)?Yd(e,t,n):us(t)?Xd(e,t.allOf,n):cc(t)?nf(e,t,n):Bo(t)?rf(e,t,n):uc(t)?af(e,t,n):pc(t)?of(e,t,n):Ko(t)?gf(e,t.properties,n):$l(t)?yf(e,Xl(t),Ql(t),n):_c(t)?bf(e,t,n):hc(t)?xf(e,t,n):vd(t)?Sf(e,t.pattern,n):Hc(t)?zf(e,t.items,n):iu(t)?Bf(e,t,n):yc(t)?Uf(e,t.anyOf,n):Yo(t)?Wf(e,t,n):au(t)?Gf(e,t,n):Cd()}function qf(e,t){return xl([...e,P(t)])}function Jf(e,t,n){return k_(e)?fo(qf(e,t),{},n):Xf(e,t,n)}function Yf(e,t,n,r,i){return Jf(M_(e,t,n),A_(e,t,r),i)}function Xf(e,t,n={}){return ho(`Interface`,[e,t],n)}function Zf(e){return mo(e)&&j(e,`action`)&&A(e.action,`Interface`)}function Qf(e,t,n){return e.includes(n)?!0:tp([...e,n],t,t[n])}function $f(e,t,n){return ep(e,t,Go(n))}function ep(e,t,n){return Da(n,(n,r)=>tp(e,t,n)?!0:ep(e,t,r),()=>!1)}function tp(e,t,n){return No(n)?Qf(e,t,n.$ref):wo(n)?tp(e,t,n.items):Do(n)?ep(e,t,[...n.parameters,n.instanceType]):Ao(n)?ep(e,t,[...n.parameters,n.returnType]):Zf(n)?$f(e,t,n.parameters[1]):us(n)?ep(e,t,n.allOf):Ko(n)?$f(e,t,n.properties):yc(n)?ep(e,t,n.anyOf):Hc(n)?ep(e,t,n.items):$l(n)?tp(e,t,Ql(n)):!1}function np(e,t,n){return tp(e,t,n)}function rp(e,t){return t.reduce((t,n)=>np([n],e,e[n])?[...t,n]:t,[])}function ip(e){return rp(e,Wo(e))}function ap(e,t,n){return n.includes(t)?n:t in e?cp(e,e[t],[...n,t]):fs()}function op(e,t,n){return sp(e,Go(t),n)}function sp(e,t,n){return t.reduce((t,n)=>cp(e,n,t),n)}function cp(e,t,n){return No(t)?ap(e,t.$ref,n):wo(t)?cp(e,t.items,n):Do(t)?sp(e,[...t.parameters,t.instanceType],n):Ao(t)?sp(e,[...t.parameters,t.returnType],n):Zf(t)?op(e,t.parameters[1],n):us(t)?sp(e,t.allOf,n):Ko(t)?op(e,t.properties,n):yc(t)?sp(e,t.anyOf,n):Hc(t)?sp(e,t.items,n):$l(t)?cp(e,Ql(t),n):n}function lp(e,t,n){return cp(e,n,[t])}function up(e){return Io()}function dp(e){return M(e).reduce((t,n)=>({...t,[n]:pp(e[n])}),{})}function fp(e){return e.reduce((e,t)=>[...e,pp(t)],[])}function pp(e){return No(e)?up(e.$ref):wo(e)?Co(pp(e.items),To(e)):Do(e)?Eo(fp(e.parameters),pp(e.instanceType)):Ao(e)?ko(fp(e.parameters),pp(e.returnType)):us(e)?ls(fp(e.allOf)):Ko(e)?P(dp(e.properties)):$l(e)?ql(Zl(e),pp(Ql(e))):yc(e)?vc(fp(e.anyOf)):Hc(e)?Vc(fp(e.items)):e}function mp(e,t){return t in e?pp(e[t]):Jo()}function hp(e){return mp(e.$defs,e.$ref)}function gp(e,t,n){let r=M_(e,O_([],[]),t),i=A_({},O_([],[]),n);return xl([...r,P(i)])}function _p(e,t){return M(e).filter(e=>t.includes(e)).reduce((t,n)=>{let r=e[n],i=Zf(r)?gp(e,r.parameters[0],r.parameters[1]):r;return{...t,[n]:i}},{})}function vp(e,t,n){return Xo(_p(e,lp(e,t,n)),t)}function yp(e,t){return t in e?No(e[t])?yp(e,e[t].$ref):e[t]:zo()}function bp(e,t){return yp(e,t)}function xp(e){return Zo(e)?hp(e):$o(e)?Jo():e}function Sp(e,t,n){return Kf(e,xp(t),xp(n))}function Cp(e,t){let n=[Sp({},e,t),Sp({},t,e)];return Td(n[0])&&Td(n[1])?0:Td(n[0])&&wd(n[1])?2:wd(n[0])&&Td(n[1])?3:1}function wp(e,t,n=[],r=t){return Da(t,(t,i)=>{let a=Cp(e,t);return A(a,2)||A(a,0)?r:A(a,1)?wp(e,i,[...n,t],r):wp(e,i,n,r)},()=>[...n,e])}function Tp(e,t,n){let r=wl(e);return Lo(r)||Yo(r)?[r]:Bo(r)?Ep(t,n):Ko(r)?Ep(t,[...n,r]):Ep(t,wp(r,n))}function Ep(e,t=[]){return Da(e,(e,n)=>Tp(e,n,t),()=>t)}function Dp(e){return Pl(Ep(e))}function Op(e,t){return fo(wl(e),{},t)}function kp(e,t,n,r){return Op(I(e,t,n),r)}function Ap(e,t=[]){return go(e)&&A(e.action,`Conditional`)?No(e.parameters[0])?Ap(e.parameters[2],Ap(e.parameters[3],[...t,e.parameters[0].$ref])):Ap(e.parameters[2],Ap(e.parameters[3],t)):go(e)&&A(e.action,`Mapped`)&&go(e.parameters[1])&&A(e.parameters[1].action,`KeyOf`)&&No(e.parameters[1].parameters[0])?[...t,e.parameters[1].parameters[0].$ref]:t}function jp(e,t){return e.reduce((e,n)=>[...e,t.includes(n.name)],[])}function Mp(e,t,n=[]){return Da(e,(e,r)=>Da(t,(t,i)=>Mp(r,i,[...n,[t,e]]),()=>n),()=>n)}function Np(e){return vd(e)?Sl(e.pattern):cs(e)?bl(e.enum):e}function Pp(e){let t=Np(e);return yc(t)?[...t.anyOf]:[t]}function Fp(e,t){return e.reduce((e,n)=>[...e,[...n,t]],[])}function Ip(e,t){return t.reduce((t,n)=>[...t,...Fp(e,n)],[])}function Lp(e){return e.reduce((e,t)=>A(t[0],!0)?Ip(e,Pp(t[1])):Ip(e,[t[1]]),[[]])}function Rp(e,t,n){let r=Mp(t,jp(e,Ap(n)));return go(n)&&A(n.action,`Conditional`)||go(n)&&A(n.action,`Mapped`)?Lp(r):[t]}function zp(){return[`(not-resolvable)`,zo()]}function Bp(){return[`(not-generic)`,zo()]}function Vp(e,t,n){return[e,Po(t,n)]}function Hp(e,t,n){return t in e?Up(e,t,e[t],n):zp()}function Up(e,t,n,r){return Fo(n)?Vp(t,n.parameters,n.expression):No(n)?Hp(e,n.$ref,r):Bp()}function Wp(e,t,n){return Up(e,`(anonymous)`,t,n)}function Gp(e,t,n){if(ts(t)||cm(t)||Td(Sp({},t,n)))return;let r={parameter:e,expect:n,actual:t};throw Error(`Argument for parameter ${e} does not satisfy constraint`,{cause:r})}function Kp(e,t,n,r,i){let a=I(e,t,i);return Gp(n,a,r),Ja(e,{[n]:a})}function qp(e,t,n,r,i){let a=I(e,t,n.extends),o=I(e,t,n.equals);return Da(i,(i,o)=>Jp(Kp(e,t,n.name,a,i),t,r,o),()=>Jp(Kp(e,t,n.name,a,o),t,r,[]))}function Jp(e,t,n,r){return Da(n,(n,i)=>qp(e,t,n,i,r),()=>e)}function Yp(e,t,n,r){return Jp(e,t,n,r)}var Xp=0,Zp=0;function Qp(){if(!pa(Zp,Ka().maxInstantiationCount))throw Error(`Type instantiation is excessively deep and possibly infinite`)}function $p(){Qp(),Zp++,Xp++}function em(){Xp--,A(Xp,0)&&(Zp=0)}function tm(e){return fa(e.callstack.length,0)?e.callstack[e.callstack.length-1]:``}function nm(e,t){return A(tm(e),t)}function rm(e,t,n,r,i,a){$p();try{let o=Yp(e,t,r,a),s=I(o,O_([...t.callstack,n.$ref],t.visited),i);return I(o,O_([],[]),s)}finally{em()}}function im(e,t,n,r,i,a){return a.reduce((a,o)=>{let s=rm(e,t,n,r,i,o);return[...a,s]},[])}function am(e,t,n,r,i,a){let o=im(e,t,n,r,i,Rp(r,a,i));return A(o.length,1)?o[0]:Cl(o)}function om(e,t,n,r){let i=M_(e,t,r),a=Wp(e,n,r),o=a[0],s=a[1];return Fo(s)?nm(t,o)?sm(Mo(o),i):am(e,t,Mo(o),s.parameters,s.expression,i):sm(n,i)}function sm(e,t){return lo({"~kind":`Call`},{type:`call`,target:e,arguments:t},{})}function cm(e){return po(e,`Call`)}function lm(e){return uo(e,[`~immutable`])}function um(e,t){return fo(lm(e),{},t)}function dm(e,t,n,r){return um(I(e,t,n),r)}function fm(e,t){return e(t)}function pm(e,t){return la(t)?F(fm(e,t)):F(t)}function mm(e,t){return gm(e,Sl(t))}function hm(e,t){return vc(t.map(t=>gm(e,t)))}function gm(e,t){return cc(t)?pm(e,t.const):vd(t)?mm(e,t.pattern):yc(t)?hm(e,t.anyOf):t}function _m(e,t={}){return ho(`Capitalize`,[e],t)}function vm(e,t={}){return ho(`Lowercase`,[e],t)}function ym(e,t={}){return ho(`Uncapitalize`,[e],t)}function bm(e,t={}){return ho(`Uppercase`,[e],t)}var xm=e=>e[0].toUpperCase()+e.slice(1),Sm=e=>e.toLowerCase(),Cm=e=>e[0].toLowerCase()+e.slice(1),wm=e=>e.toUpperCase();function Tm(e,t){return k_([e])?fo(gm(xm,e),{},t):_m(e,t)}function Em(e,t){return k_([e])?fo(gm(Sm,e),{},t):vm(e,t)}function Dm(e,t){return k_([e])?fo(gm(Cm,e),{},t):ym(e,t)}function Om(e,t){return k_([e])?fo(gm(wm,e),{},t):bm(e,t)}function km(e,t,n,r){return Tm(I(e,t,n),r)}function Am(e,t,n,r){return Em(I(e,t,n),r)}function jm(e,t,n,r){return Dm(I(e,t,n),r)}function Mm(e,t,n,r){return Om(I(e,t,n),r)}function Nm(e,t,n,r,i={}){return ho(`Conditional`,[e,t,n,r],i)}function Pm(e,t,n,r,i,a){let o=Sp(e,n,r);return bd(o)?vc([I(o.inferred,t,i),I(e,t,a)]):Sd(o)?I(o.inferred,t,i):I(e,t,a)}function Fm(e,t,n,r,i,a,o){return k_([n,r])?fo(Pm(e,t,n,r,i,a),{},o):Nm(n,r,i,a,o)}function Im(e,t,n,r,i,a,o){return Fm(e,t,I(e,t,n),I(e,t,r),i,a,o)}function Lm(e,t={}){return ho(`ConstructorParameters`,[e],t)}function Rm(e){let t=Do(e)?e.parameters:[];return Vc(j_({},O_([],[]),t))}function zm(e,t){return k_([e])?fo(Rm(e),{},t):Lm(e,t)}function Bm(e,t,n,r){return zm(I(e,t,n),r)}function Vm(e,t,n={}){return ho(`Exclude`,[e,t],n)}function Hm(e,t,n){return k_([e,t])?fo(vl(e,t),{},n):Vm(e,t,n)}function Um(e,t,n,r,i){return Hm(I(e,t,n),I(e,t,r),i)}function Wm(e,t,n={}){return ho(`Extract`,[e,t],n)}function Gm(e,t){return Td(Sp({},e,t))?[e]:[]}function Km(e,t,n=[]){return Da(e,(e,r)=>Km(r,t,[...n,...Gm(e,t)]),()=>n)}function qm(e,t){let n=wl(e);return Cl(Km(yc(n)?n.anyOf:[n],t))}function Jm(e,t,n){return k_([e,t])?fo(qm(e,t),{},n):Wm(e,t,n)}function Ym(e,t,n,r,i){return Jm(I(e,t,n),I(e,t,r),i)}function Xm(e,t,n={}){return ho(`Index`,[e,t],n)}function Zm(e,t){return oh(bp(e,t))}function Qm(e,t,n){return oh(yl(e,t,n))}function $m(e,t){let n=M(e).filter(e=>!j(t,e)),r=M(t).filter(t=>!j(e,t)),i=M(e).filter(e=>j(t,e)),a=n.reduce((t,n)=>({...t,[n]:e[n]}),{}),o=r.reduce((e,n)=>({...e,[n]:t[n]}),{}),s=i.reduce((n,r)=>({...n,[r]:xl([e[r],t[r]])}),{});return Ja(Ja(a,o),s)}function eh(e){return e.reduce((e,t)=>$m(e,oh(t)),{})}function th(e){return e}function nh(e){return oh($c(Vc(e)))}function rh(e,t){return M(e).filter(e=>e in t).reduce((n,r)=>({...n,[r]:Cl([e[r],t[r]])}),{})}function ih(e,t){return Da(e,(e,n)=>ih(n,rh(t,oh(e))),()=>t)}function ah(e){return Da(e,(e,t)=>ih(t,oh(e)),()=>fs())}function oh(e){return Zo(e)?Zm(e.$defs,e.$ref):rs(e)?Qm(e.if,e.then,e.else):us(e)?eh(e.allOf):yc(e)?ah(e.anyOf):Hc(e)?nh(e.items):Ko(e)?th(e.properties):{}}function sh(e){return P(oh(e))}var ch=RegExp(`^(?:0|[1-9][0-9]*)$`);function lh(e){let t=`${e}`;return ch.test(t)?parseInt(t):e}function uh(e){return F(lh(e))}function dh(e){return e.map(e=>fh(e))}function fh(e){return us(e)?ls(dh(e.allOf)):yc(e)?vc(dh(e.anyOf)):cc(e)?uh(e.const):e}function ph(e,t){return Td(Sp({},fh(t),fc()))?e:cc(t)&&A(t.const,`length`)?fc():zo()}function mh(e,t){return xh(bp(e,t))}function hh(e,t,n){return xh(yl(e,t,n))}function gh(e){return xh(bl(e))}function _h(e){return xh(xl(e))}function vh(e){return[`${e}`]}function yh(e){return xh(Sl(e))}function bh(e){return e.reduce((e,t)=>[...e,...xh(t)],[])}function xh(e){return Zo(e)?mh(e.$defs,e.$ref):rs(e)?hh(e.if,e.then,e.else):cs(e)?gh(e.enum):us(e)?_h(e.allOf):cc(e)?vh(e.const):vd(e)?yh(e.pattern):yc(e)?bh(e.anyOf):[]}function Sh(e){return xh(e)}function Ch(e,t){return t.map(t=>wh(e,t))}function wh(e,t){return wo(t)?Co(wh(e,t.items)):Do(t)?Eo(Ch(e,t.parameters),wh(e,t.instanceType)):Ao(t)?ko(Ch(e,t.parameters),wh(e,t.returnType)):Hc(t)?Vc(Ch(e,t.items)):yc(t)?vc(Ch(e,t.anyOf)):us(t)?ls(Ch(e,t.allOf)):nu(t)?P(e):t}function Th(e,t){return wh(e,t)}function Eh(e,t){return Th(e,t in e?e[t]:zo())}function Dh(e,t){return t.reduce((t,n)=>[...t,Eh(e,n)],[])}function Oh(e,t){return Cl(Dh(e,Sh(t)))}var kh=new RegExp(Ul);function Ah(e){return e.filter(e=>kh.test(e))}function jh(e){return Cl(Dh(e,Ah(Wo(e))))}function Mh(e,t){return pc(t)?jh(e):Oh(e,t)}function Nh(e){return F(lh(e))}function Ph(e){return e.map(e=>Fh(e))}function Fh(e){return us(e)?ls(Ph(e.allOf)):yc(e)?vc(Ph(e.anyOf)):cc(e)?Nh(e.const):e}function Ih(e,t){return e.reduceRight((e,n,r)=>Td(Sp({},F(r),t))?[n,...e]:e,[])}function Lh(e,t){return Tl(Ih(e,Fh(t)))}function Rh(e){return Tl(e)}function zh(e,t){return cc(t)&&A(t.const,`length`)?F(e.length):pc(t)||nc(t)?Rh(e):Lh(e,t)}function Bh(e,t){return wo(e)?ph(e.items,t):Ko(e)?Mh(e.properties,t):Hc(e)?zh(e.items,t):zo()}function Vh(e){return Zo(e)||rs(e)||us(e)||yc(e)?sh(e):e}function Hh(e,t,n){return k_([e,t])?fo(Bh(Vh(e),t),{},n):Xm(e,t,n)}function Uh(e,t,n,r,i){return Hh(I(e,t,n),I(e,t,r),i)}function Wh(e,t={}){return ho(`InstanceType`,[e],t)}function Gh(e){return Do(e)?e.instanceType:zo()}function Kh(e,t){return k_([e])?fo(Gh(e),{},t):Wh(e,t)}function qh(e,t,n,r={}){return Kh(I(e,t,n),r)}function Jh(e,t={}){return ho(`KeyOf`,[e],t)}function Yh(){return vc([fc(),gc(),mc()])}function Xh(e){return fc()}function Zh(e){return e.reduce((e,t)=>ac(t)?[...e,F(lh(t))]:fs(),[])}function Qh(e){return Tl(Zh(M(e)))}function $h(e){return Zl(e)}function eg(e){return Tl(e.map((e,t)=>F(t)))}function tg(e){return Lo(e)?Yh():wo(e)?Xh(e.items):Ko(e)?Qh(e.properties):$l(e)?$h(e):Hc(e)?eg(e.items):zo()}function ng(e){return Zo(e)||rs(e)||us(e)||yc(e)?sh(e):e}function rg(e,t){return k_([e])?fo(tg(ng(e)),{},t):Jh(e,t)}function ig(e,t,n,r){return rg(I(e,t,n),r)}function ag(e,t,n,r,i={}){return ho(`Mapped`,[e,t,n,r],i)}function og(e){return ug(Sl(e))}function sg(e){return e.reduce((e,t)=>[...e,...ug(t)],[])}function cg(e){return ug(bl(e))}function lg(e){return oa(e)?[F(`${e}`)]:[F(e)]}function ug(e){return cs(e)?cg(e.enum):cc(e)?lg(e.const):vd(e)?og(e.pattern):yc(e)?sg(e.anyOf):[e]}function dg(e){return ug(e)}function fg(e){return vd(e)?Sl(e.pattern):e}function pg(e,t,n,r,i,a){let o=Ja(e,{[n.name]:r}),s=fg(I(o,t,i)),c=I(o,t,a);return oc(s)||sc(s)?{[s.const]:c}:{}}function mg(e,t,n,r,i,a){return r.reduce((r,o)=>[...r,pg(e,t,n,o,i,a)],[])}function hg(e){return e.reduce((e,t)=>[...e,P(t)],[])}function gg(e,t,n,r,i,a){return xl(hg(mg(e,t,n,dg(r),i,a)))}function _g(e,t,n,r,i,a,o){return k_([r])?fo(gg(e,t,n,r,i,a),{},o):ag(n,r,i,a,o)}function vg(e,t,n,r,i,a,o){return _g(e,t,n,I(e,t,r),i,a,o)}function yg(e,t,n){let r=Ja(e,t);return M(t).filter(e=>n.includes(e)).reduce((e,n)=>({...e,[n]:vp(r,n,t[n])}),{})}function bg(e,t,n){let r=Ja(e,t);return M(t).filter(e=>!n.includes(e)).reduce((e,n)=>({...e,[n]:I(r,O_([],[]),t[n])}),{})}function xg(e,t,n){let r=ip(t),i=yg(e,t,r),a=bg(e,t,r);return fo({...i,...a},{},n)}function Sg(e,t,n,r){return xg(e,n,r)}function Cg(e,t={}){return ho(`NonNullable`,[e],t)}function wg(e){return Hm(e,vc([lc(),ru()]),{})}function Tg(e,t){return k_([e])?fo(wg(e),{},t):Cg(e,t)}function Eg(e,t,n,r){return Tg(I(e,t,n),r)}function Dg(e,t,n={}){return ho(`Omit`,[e,t],n)}function Og(e){let t=sh(e);return Ko(t)?t.properties:fs()}function kg(e,t){return M(e).reduce((n,r)=>t.includes(r)?n:{...n,[r]:e[r]},{})}function Ag(e,t){return P(kg(Og(e),Sh(t)))}function jg(e,t,n){return k_([e,t])?fo(Ag(e,t),{},n):Dg(e,t,n)}function Mg(e,t,n,r,i){return jg(I(e,t,n),I(e,t,r),i)}function Ng(e,t={}){return ho(`Parameters`,[e],t)}function Pg(e){let t=Ao(e)?e.parameters:[];return Vc(j_({},O_([],[]),t))}function Fg(e,t){return k_([e])?fo(Pg(e),{},t):Ng(e,t)}function Ig(e,t,n,r){return Fg(I(e,t,n),r)}function Lg(e,t={}){return ho(`Partial`,[e],t)}function Rg(e,t){let n=Ug(bp(e,t));return Xo(Ja(e,{[t]:n}),t)}function zg(e,t,n){return Ug(yl(e,t,n))}function Bg(e){return Ug(xl(e))}function Vg(e){return vc(e.map(e=>Ug(e)))}function Hg(e){return P(M(e).reduce((t,n)=>({...t,[n]:Vo(e[n])}),{}))}function Ug(e){return Zo(e)?Rg(e.$defs,e.$ref):rs(e)?zg(e.if,e.then,e.else):us(e)?Bg(e.allOf):yc(e)?Vg(e.anyOf):Ko(e)?Hg(e.properties):P({})}function Wg(e,t){return k_([e])?fo(Ug(e),{},t):Lg(e,t)}function Gg(e,t,n,r){return Wg(I(e,t,n),r)}function Kg(e,t,n={}){return ho(`Pick`,[e,t],n)}function qg(e,t){return M(e).reduce((n,r)=>t.includes(r)?Ja(n,{[r]:e[r]}):n,{})}function Jg(e,t){return P(qg(Og(e),Sh(t)))}function Yg(e,t,n){return k_([e,t])?fo(Jg(e,t),{},n):Kg(e,t,n)}function Xg(e,t,n,r,i){return Yg(I(e,t,n),I(e,t,r),i)}function Zg(e,t={}){return ho(`ReadonlyObject`,[e],t)}function Qg(e){return B_(Co(e))}function $g(e,t){let n=a_(bp(e,t));return Xo(Ja(e,{[t]:n}),t)}function e_(e,t,n){return a_(yl(e,t,n))}function t_(e){return a_(xl(e))}function n_(e){return P(M(e).reduce((t,n)=>({...t,[n]:qs(e[n])}),{}))}function r_(e){return B_(Vc(e))}function i_(e){return vc(e.map(e=>a_(e)))}function a_(e){return wo(e)?Qg(e.items):Zo(e)?$g(e.$defs,e.$ref):rs(e)?e_(e.if,e.then,e.else):us(e)?t_(e.allOf):Ko(e)?n_(e.properties):Hc(e)?r_(e.items):yc(e)?i_(e.anyOf):e}function o_(e,t){return k_([e])?fo(a_(e),{},t):Zg(e)}function s_(e,t,n,r){return o_(I(e,t,n),r)}function c_(e,t,n,r){return t.visited.includes(r)?n:r in e?I(e,O_(t.callstack,[...t.visited,r]),e[r]):n}function l_(e,t){let n=m_(bp(e,t));return Xo(Ja(e,{[t]:n}),t)}function u_(e,t,n){return m_(yl(e,t,n))}function d_(e){return m_(xl(e))}function f_(e){return vc(e.map(e=>m_(e)))}function p_(e){return P(M(e).reduce((t,n)=>({...t,[n]:Zc(e[n])}),{}))}function m_(e){return Zo(e)?l_(e.$defs,e.$ref):rs(e)?u_(e.if,e.then,e.else):us(e)?d_(e.allOf):yc(e)?f_(e.anyOf):Ko(e)?p_(e.properties):P({})}function h_(e,t={}){return ho(`Required`,[e],t)}function g_(e,t){return k_([e])?fo(m_(e),{},t):h_(e,t)}function __(e,t,n,r){return g_(I(e,t,n),r)}function v_(e,t={}){return ho(`ReturnType`,[e],t)}function y_(e){return Ao(e)?e.returnType:zo()}function b_(e,t){return k_([e])?fo(y_(e),{},t):v_(e,t)}function x_(e,t,n,r={}){return b_(I(e,t,n),r)}function S_(e,t){return ho(`With`,[e,t],{})}function C_(e,t){return w_(e,t)}function w_(e,t){return k_([e])?fo(e,{},t):S_(e,t)}function T_(e,t,n,r){return w_(I(e,t,n),r)}function E_(e){return tu(e)?Hc(e.items)?D_(e.items.items):ts(e.items)||No(e.items)?[e]:[zo()]:[e]}function D_(e){return e.reduce((e,t)=>[...e,...E_(t)],[])}function O_(e,t){return{callstack:e,visited:t}}function k_(e){return Da(e,(e,t)=>!No(e)&&k_(t),()=>!0)}function A_(e,t,n){return M(n).reduce((r,i)=>({...r,[i]:I(e,t,n[i])}),{})}function j_(e,t,n){return D_(M_(e,t,n))}function M_(e,t,n){return n.map(n=>I(e,t,n))}function N_(e,t){let n=Ho(e)?xo(t,{}):t,r=Js(e)?vo(n,{}):n;return Ks(e)?R_(r,{}):r}function P_(e,t,n,r,i){return A(n,`AddImmutable`)?z_(e,t,r[0],i):A(n,`RemoveImmutable`)?dm(e,t,r[0],i):A(n,`AddReadonly`)?yo(e,t,r[0],i):A(n,`RemoveReadonly`)?Kc(e,t,r[0],i):A(n,`AddOptional`)?So(e,t,r[0],i):A(n,`RemoveOptional`)?Xc(e,t,r[0],i):A(n,`Capitalize`)?km(e,t,r[0],i):A(n,`Conditional`)?Im(e,t,r[0],r[1],r[2],r[3],i):A(n,`ConstructorParameters`)?Bm(e,t,r[0],i):A(n,`Evaluate`)?kp(e,t,r[0],i):A(n,`Exclude`)?Um(e,t,r[0],r[1],i):A(n,`Extract`)?Ym(e,t,r[0],r[1],i):A(n,`Index`)?Uh(e,t,r[0],r[1],i):A(n,`InstanceType`)?qh(e,t,r[0],i):A(n,`Interface`)?Yf(e,t,r[0],r[1],i):A(n,`KeyOf`)?ig(e,t,r[0],i):A(n,`Lowercase`)?Am(e,t,r[0],i):A(n,`Mapped`)?vg(e,t,r[0],r[1],r[2],r[3],i):A(n,`Module`)?Sg(e,t,r[0],i):A(n,`NonNullable`)?Eg(e,t,r[0],i):A(n,`Pick`)?Xg(e,t,r[0],r[1],i):A(n,`Parameters`)?Ig(e,t,r[0],i):A(n,`Partial`)?Gg(e,t,r[0],i):A(n,`Omit`)?Mg(e,t,r[0],r[1],i):A(n,`ReadonlyObject`)?s_(e,t,r[0],i):A(n,`Record`)?Hl(e,t,r[0],r[1],i):A(n,`Required`)?__(e,t,r[0],i):A(n,`ReturnType`)?x_(e,t,r[0],i):A(n,`TemplateLiteral`)?hd(e,t,r[0],i):A(n,`Uncapitalize`)?jm(e,t,r[0],i):A(n,`Uppercase`)?Mm(e,t,r[0],i):A(n,`With`)?T_(e,t,r[0],r[1]):ho(n,r,i)}function F_(e,t,n){return N_(n,No(n)?c_(e,t,n,n.$ref):wo(n)?Co(I(e,t,n.items),To(n)):cm(n)?om(e,t,n.target,n.arguments):Do(n)?Eo(M_(e,t,n.parameters),I(e,t,n.instanceType),Oo(n)):Ao(n)?ko(M_(e,t,n.parameters),I(e,t,n.returnType),jo(n)):rs(n)?ns(I(e,t,n.if),I(e,t,n.then),I(e,t,n.else),is(n)):us(n)?ls(M_(e,t,n.allOf),ds(n)):Ko(n)?P(A_(e,t,n.properties),qo(n)):$l(n)?Jl(Xl(n),I(e,t,Ql(n))):tu(n)?eu(I(e,t,n.items)):Hc(n)?Vc(j_(e,t,n.items),Uc(n)):yc(n)?vc(M_(e,t,n.anyOf),bc(n)):n)}function I(e,t,n){return go(n)?P_(e,t,n.action,n.parameters,n.options):F_(e,t,n)}function I_(e,t){return I(e,O_([],[]),t)}function L_(e){return fo(e,{"~immutable":!0},{})}function R_(e,t){return fo(L_(e),{},t)}function z_(e,t,n,r){return R_(I(e,t,n),r)}function B_(e,t={}){return R_(e,t)}function V_(e,t={}){return Op(e,t)}function H_(e,t){let n=Cp(e,t);return A(n,3)?1:+!!A(n,1)}function U_(e,t,n=[]){return Da(t,(r,i)=>A(H_(e,r),1)?U_(e,i,[...n,r]):[...n,e,...t],()=>[...n,e])}function W_(e,t=[]){return Da(e,(e,n)=>W_(n,U_(e,t)),()=>t)}function G_(e){return W_(e)}function K_(e){return j(e,`~refine`)&&$i(e[`~refine`])&&Sa(e[`~refine`],0,e=>ca(e)&&j(e,`check`)&&j(e,`error`)&&ra(e.check)&&ra(e.error))}function q_(e){return ca(e)&&!$i(e)}function J_(e){return ta(e)}function Y_(e){return q_(e)||J_(e)}function X_(e){return j(e,`additionalItems`)&&Y_(e.additionalItems)}function Z_(e){return j(e,`additionalProperties`)&&Y_(e.additionalProperties)}function Q_(e){return j(e,`allOf`)&&$i(e.allOf)&&e.allOf.every(e=>Y_(e))}function $_(e){return j(e,`$anchor`)&&la(e.$anchor)}function ev(e){return j(e,`anyOf`)&&$i(e.anyOf)&&e.anyOf.every(e=>Y_(e))}function tv(e){return j(e,`const`)}function nv(e){return j(e,`contains`)&&Y_(e.contains)}function rv(e){return j(e,`default`)}function iv(e){return j(e,`dependencies`)&&ca(e.dependencies)&&Object.values(e.dependencies).every(e=>Y_(e)||$i(e)&&e.every(e=>la(e)))}function av(e){return j(e,`dependentRequired`)&&ca(e.dependentRequired)&&Object.values(e.dependentRequired).every(e=>$i(e)&&e.every(e=>la(e)))}function ov(e){return j(e,`dependentSchemas`)&&ca(e.dependentSchemas)&&Object.values(e.dependentSchemas).every(e=>Y_(e))}function sv(e){return j(e,`$dynamicAnchor`)&&la(e.$dynamicAnchor)}function cv(e){return j(e,`$dynamicRef`)&&la(e.$dynamicRef)}function lv(e){return j(e,`else`)&&Y_(e.else)}function uv(e){return j(e,`enum`)&&$i(e.enum)}function dv(e){return j(e,`exclusiveMaximum`)&&(oa(e.exclusiveMaximum)||ea(e.exclusiveMaximum))}function fv(e){return j(e,`exclusiveMinimum`)&&(oa(e.exclusiveMinimum)||ea(e.exclusiveMinimum))}function pv(e){return j(e,`format`)&&la(e.format)}function mv(e){return j(e,`$id`)&&la(e.$id)}function hv(e){return j(e,`if`)&&Y_(e.if)}function gv(e){return j(e,`items`)&&(Y_(e.items)||$i(e.items)&&e.items.every(e=>Y_(e)))}function _v(e){return gv(e)&&$i(e.items)}function vv(e){return j(e,`maximum`)&&(oa(e.maximum)||ea(e.maximum))}function yv(e){return j(e,`maxContains`)&&oa(e.maxContains)}function bv(e){return j(e,`maxItems`)&&oa(e.maxItems)}function xv(e){return j(e,`maxLength`)&&oa(e.maxLength)}function Sv(e){return j(e,`maxProperties`)&&oa(e.maxProperties)}function Cv(e){return j(e,`minimum`)&&(oa(e.minimum)||ea(e.minimum))}function wv(e){return j(e,`minContains`)&&oa(e.minContains)}function Tv(e){return j(e,`minItems`)&&oa(e.minItems)}function Ev(e){return j(e,`minLength`)&&oa(e.minLength)}function Dv(e){return j(e,`minProperties`)&&oa(e.minProperties)}function Ov(e){return j(e,`multipleOf`)&&(oa(e.multipleOf)||ea(e.multipleOf))}function kv(e){return j(e,`not`)&&Y_(e.not)}function Av(e){return j(e,`oneOf`)&&$i(e.oneOf)&&e.oneOf.every(e=>Y_(e))}function jv(e){return j(e,`pattern`)&&(la(e.pattern)||e.pattern instanceof RegExp)}function Mv(e){return j(e,`patternProperties`)&&ca(e.patternProperties)&&Object.values(e.patternProperties).every(e=>Y_(e))}function Nv(e){return j(e,`prefixItems`)&&$i(e.prefixItems)&&e.prefixItems.every(e=>Y_(e))}function Pv(e){return j(e,`properties`)&&ca(e.properties)&&Object.values(e.properties).every(e=>Y_(e))}function Fv(e){return j(e,`propertyNames`)&&(ca(e.propertyNames)||Y_(e.propertyNames))}function Iv(e){return j(e,`$recursiveAnchor`)&&ta(e.$recursiveAnchor)}function Lv(e){return Iv(e)&&A(e.$recursiveAnchor,!0)}function Rv(e){return j(e,`$recursiveRef`)&&la(e.$recursiveRef)}function zv(e){return j(e,`$ref`)&&la(e.$ref)}function Bv(e){return j(e,`required`)&&$i(e.required)&&e.required.every(e=>la(e))}function Vv(e){return j(e,`then`)&&Y_(e.then)}function Hv(e){return j(e,`type`)&&(la(e.type)||$i(e.type)&&e.type.every(e=>la(e)))}function Uv(e){return j(e,`uniqueItems`)&&ta(e.uniqueItems)}function Wv(e){return j(e,`unevaluatedItems`)&&Y_(e.unevaluatedItems)}function Gv(e){return j(e,`unevaluatedProperties`)&&Y_(e.unevaluatedProperties)}var Kv=class{constructor(){let e=new Set,t=new Set;this.stack=[{indices:e,keys:t}]}Push(){let e=new Set,t=new Set;return this.stack.push({indices:e,keys:t}),!0}Pop(){return this.stack.pop(),!0}AddIndex(e){return this.GetIndices().add(e),!0}AddKey(e){return this.GetKeys().add(e),!0}GetIndices(){return this.stack[this.stack.length-1].indices}GetKeys(){return this.stack[this.stack.length-1].keys}Merge(e){for(let t of e)t.GetIndices().forEach(e=>this.GetIndices().add(e)),t.GetKeys().forEach(e=>this.GetKeys().add(e));return!0}},qv=class extends Kv{constructor(){super(),this.errors=[]}AtCapacity(){return this.errors.length>=Ka().maxErrors}AddError(e){return this.AtCapacity()||this.errors.push(e),!1}GetErrors(){return this.errors}};function Jv(e,t,n,r){return Sa(n[`~refine`],0,(e,t)=>e.check(r))}function Yv(e,t,n,r,i,a){return Ca(i[`~refine`],0,(e,i)=>e.check(a)||t.AddError({keyword:`~refine`,schemaPath:n,instancePath:r,params:{index:i,message:e.error(a)}}))}function Xv(e){return gv(e)&&$i(e.items)}function Zv(e,t,n,r){return!Xv(n)||Sa(r,0,(r,i)=>pa(i,n.items.length)||zS(e,t,n.additionalItems,r)&&t.AddIndex(i))}function Qv(e,t,n,r,i,a){return!Xv(i)||Sa(a,0,(a,o)=>{let s=`${n}/additionalItems`,c=`${r}/${o}`;return pa(o,i.items.length)||VS(e,t,s,c,i.additionalItems,a)&&t.AddIndex(o)})}function $v(e){return new RegExp(e,`u`)}function ey(e){return`^${e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}$`}function ty(e){let t=[];return Mv(e)&&t.push(...M(e.patternProperties)),Pv(e)&&t.push(...M(e.properties).map(ey)),A(t.length,0)?`(?!)`:`(${t.join(`|`)})`}function ny(e,t,n,r){let i=$v(ty(n));return Sa(M(r),0,(a,o)=>i.test(a)||zS(e,t,n.additionalProperties,r[a])&&t.AddKey(a))}function ry(e,t,n,r,i,a){let o=$v(ty(i)),s=[];return Ca(M(a),0,(c,l)=>{let u=`${n}/additionalProperties`,d=`${r}/${c}`,f=o.test(c)||VS(e,t,u,d,i.additionalProperties,a[c])&&t.AddKey(c);return f||s.push(c),f})||t.AddError({keyword:`additionalProperties`,schemaPath:n,instancePath:r,params:{additionalProperties:s}})}function iy(e,t,n,r){let i=n.allOf.reduce((t,n)=>{let i=new Kv;return BS(e,i,n,r)?[...t,i]:t},[]);return A(i.length,n.allOf.length)&&t.Merge(i)}function ay(e,t,n,r,i,a){let o=[],s=i.allOf.reduce((t,i,s)=>{let c=`${n}/allOf/${s}`,l=new qv,u=HS(e,l,c,r,i,a);return u||o.push(l),u?[...t,l]:t},[]),c=A(s.length,i.allOf.length)&&t.Merge(s);return c||o.forEach(e=>e.GetErrors().forEach(e=>t.AddError(e))),c}function oy(e,t,n,r){let i=n.anyOf.reduce((t,n)=>{let i=new Kv;return BS(e,i,n,r)?[...t,i]:t},[]);return fa(i.length,0)&&t.Merge(i)}function sy(e,t,n,r,i,a){let o=[],s=i.anyOf.reduce((t,i,s)=>{let c=new qv,l=HS(e,c,`${n}/anyOf/${s}`,r,i,a);return l||o.push(c),l?[...t,c]:t},[]),c=fa(s.length,0)&&t.Merge(s);return c||o.forEach(e=>e.GetErrors().forEach(e=>t.AddError(e))),c||t.AddError({keyword:`anyOf`,schemaPath:n,instancePath:r,params:{}})}function cy(e,t,n,r){return n}function ly(e,t,n,r,i,a){return cy(e,t,i,a)||t.AddError({keyword:`boolean`,schemaPath:n,instancePath:r,params:{}})}function uy(e,t,n,r){return va(n.const)?A(r,n.const):Fa(r,n.const)}function dy(e,t,n,r,i,a){return uy(e,t,i,a)||t.AddError({keyword:`const`,schemaPath:n,instancePath:r,params:{allowedValue:i.const}})}function fy(e){return!(wv(e)&&A(e.minContains,0))}function py(e,t,n,r){return!fy(n)||!A(r.length,0)&&Ta(r,(r,i)=>BS(e,t,n.contains,r)&&t.AddIndex(i))}function my(e,t,n,r,i,a){return py(e,t,i,a)||t.AddError({keyword:`contains`,schemaPath:n,instancePath:r,params:{minContains:1}})}function hy(e,t,n,r){let i=A(M(r).length,0),a=Sa(Aa(n.dependencies),0,([n,i])=>!j(r,n)||($i(i)?i.every(e=>j(r,e)):BS(e,t,i,r)));return i||a}function gy(e,t,n,r,i,a){let o=A(M(a).length,0),s=Ca(Aa(i.dependencies),0,([i,o])=>{let s=`${n}/dependencies/${i}`;return!j(a,i)||($i(o)?o.every(e=>j(a,e)||t.AddError({keyword:`dependencies`,schemaPath:n,instancePath:r,params:{property:i,dependencies:o}})):HS(e,t,s,r,o,a))});return o||s}function _y(e,t,n,r){let i=A(M(r).length,0),a=Sa(Aa(n.dependentRequired),0,([e,t])=>!j(r,e)||t.every(e=>j(r,e)));return i||a}function vy(e,t,n,r,i,a){let o=A(M(a).length,0),s=Ca(Aa(i.dependentRequired),0,([e,i])=>!j(a,e)||Ca(i,0,o=>j(a,o)||t.AddError({keyword:`dependentRequired`,schemaPath:n,instancePath:r,params:{property:e,dependencies:i}})));return o||s}function yy(e,t,n,r){let i=A(M(r).length,0),a=Sa(Aa(n.dependentSchemas),0,([n,i])=>!j(r,n)||BS(e,t,i,r));return i||a}function by(e,t,n,r,i,a){let o=A(M(a).length,0),s=Ca(Aa(i.dependentSchemas),0,([i,o])=>{let s=`${n}/dependentSchemas/${i}`;return!j(a,i)||HS(e,t,s,r,o,a)});return o||s}function xy(e,t,n,r){let i=e.DynamicRef(n)??!1;return Y_(i)&&BS(e,t,i,r)}function Sy(e,t,n,r,i,a){let o=e.DynamicRef(i)??!1;return Y_(o)&&HS(e,t,`#`,r,o,a)}function Cy(e,t,n,r){return wa(n.enum,e=>va(e)?A(r,e):Fa(r,e))}function wy(e,t,n,r,i,a){return Cy(e,t,i,a)||t.AddError({keyword:`enum`,schemaPath:n,instancePath:r,params:{allowedValues:i.enum}})}function Ty(e,t,n,r){return pa(r,n.exclusiveMaximum)}function Ey(e,t,n,r,i,a){return Ty(e,t,i,a)||t.AddError({keyword:`exclusiveMaximum`,schemaPath:n,instancePath:r,params:{comparison:`<`,limit:i.exclusiveMaximum}})}function Dy(e,t,n,r){return fa(r,n.exclusiveMinimum)}function Oy(e,t,n,r,i,a){return Dy(e,t,i,a)||t.AddError({keyword:`exclusiveMinimum`,schemaPath:n,instancePath:r,params:{comparison:`>`,limit:i.exclusiveMinimum}})}var ky=[0,31,28,31,30,31,30,31,31,30,31,30,31],Ay=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;function jy(e){return e%4==0&&(e%100!=0||e%400==0)}function My(e){let t=Ay.exec(e);if(!t)return!1;let n=+t[1],r=+t[2],i=+t[3];return r>=1&&r<=12&&i>=1&&i<=(r===2&&jy(n)?29:ky[r])}var Ny=/^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:([Zz])|([+-])(\d\d):(\d\d))?$/;function Py(e,t=!0){let n=Ny.exec(e);if(!n||t&&!n[4]&&!n[5])return!1;let r=+n[1],i=+n[2],a=+n[3];if(r>23||i>59||a>60)return!1;if(n[5]){let e=+n[6],t=+n[7];if(e>23||t>59)return!1}if(a<60)return!0;let o=n[5]===`-`?-1:1,s=+(n[6]||0),c=+(n[7]||0);return((r*60+i-o*(s*60+c))%1440+1440)%1440==1439}function Fy(e){let t=e.split(/T/i);return t.length===2&&My(t[0])&&Py(t[1])}var Iy=/^P((\d+Y(\d+M(\d+D)?)?|\d+M(\d+D)?|\d+D)(T(\d+H(\d+M(\d+S)?)?|\d+M(\d+S)?|\d+S))?|T(\d+H(\d+M(\d+S)?)?|\d+M(\d+S)?|\d+S)|\d+W)$/;function Ly(e){return Iy.test(e)}var Ry=/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[^"\\]|\\[\x20-\x7e])*")@(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*|\[(?:IPv6:[a-f0-9:]+|(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])(?:\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3})\])$/i;function zy(e){return Ry.test(e)}var By=/^(?!-).*(?<!-)$/,Vy=/^(?!..--)/,Hy=/^[a-zA-Z0-9-]*$/,Uy=/[^\p{ASCII}]/u,Wy=/[0-9]/,Gy=/[\u{0660}-\u{0669}]/u,Ky=/[\u{06f0}-\u{06f9}]/u,qy=/[\u{002e}\u{002c}\u{003a}\u{002f}]/u,Jy=/[\u{002d}\u{002b}]/u,Yy=/\p{Mn}/u,Xy=/\p{Mc}/u,Zy=/[\p{Mn}\p{Mc}\p{Me}]/u,Qy=/\p{L}/u,$y=/\p{Nd}/u,eb=/\p{Script=Greek}/u,tb=/\p{Script=Hebrew}/u,nb=/[\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Han}]/u,rb=/[\p{Script=Arabic}\p{Script=Syriac}\p{Script=Thaana}\p{Script=Mandaic}]/u,ib=/[\u{094d}\u{09cd}\u{0a4d}\u{0acd}\u{0b4d}\u{0bcd}\u{0c4d}\u{0ccd}\u{0d3b}\u{0d3c}\u{0d4d}\u{0dca}\u{1b44}\u{1baa}\u{1bab}\u{a9c0}\u{11046}\u{1107f}\u{110b9}\u{11133}\u{11134}\u{111c0}\u{11235}\u{1134d}\u{11442}\u{114c2}\u{115bf}\u{1163f}\u{116b6}\u{11c3f}\u{11d44}\u{11d45}]/u,ab=/[\u{0640}\u{07fa}\u{302e}\u{302f}\u{3031}\u{3032}\u{3033}\u{3034}\u{3035}\u{303b}]/u,ob=/[\u{00b7}\u{0375}\u{05f3}\u{05f4}\u{200c}\u{200d}\u{30fb}]/u,sb=/[\u{00df}\u{03c2}\u{06fd}\u{06fe}\u{0f0b}\u{3007}]/u,cb=new RegExp([Wy,Ky].map(e=>e.source).join(`|`),`u`),lb=new RegExp([Qy,Jy,qy,$y,Yy,Xy,ob,sb].map(e=>e.source).join(`|`),`u`);function ub(e){return By.test(e)&&Vy.test(e)&&Hy.test(e)}var db=36,fb=1,pb=26,mb=38,hb=700,gb=72,_b=128;function vb(){throw null}function yb(e){return e.toLowerCase().startsWith(`xn--`)}function bb(e,t,n){e=n?Math.floor(e/hb):e>>1,e+=Math.floor(e/t);let r=0;for(;e>455;)e=Math.floor(e/35),r+=db;return r+Math.floor(36*e/(e+mb))}function xb(e){let t=[],n=_b,r=0,i=gb,a=e.lastIndexOf(`-`);if(a>0)for(let n=0;n<a;n++){let r=e.charCodeAt(n);r>=128&&vb(),t.push(r)}let o=a<0?0:a+1;for(;o<e.length;){let a=r,s=1,c=db;for(;;){o>=e.length&&vb();let t=e.charCodeAt(o++),n;t>=97&&t<=122?n=t-97:t>=48&&t<=57?n=t-48+26:vb(),r+=n*s;let a=c<=i?fb:c>=i+pb?pb:c-i;if(n<a)break;s*=db-a,c+=db}let l=t.length+1;i=bb(r-a,l,a===0),n+=Math.floor(r/l),r%=l,t.splice(r,0,n),r++}return String.fromCodePoint(...t)}function Sb(e){return e<26?String.fromCharCode(e+97):String.fromCharCode(e-26+48)}var Cb=new RegExp(Uy.source,`gu`);function wb(e){let t=e.replace(Cb,``),n=t.length,r=n>0?[t,`-`]:[],i=Array.from(e,e=>e.codePointAt(0)),a=_b,o=0,s=gb,c=n;for(;c<i.length;){let e=1/0;for(let t of i)t>=a&&t<e&&(e=t);o+=(e-a)*(c+1),a=e;for(let e of i)if(e<a&&o++,e===a){let e=o;for(let t=db;;t+=db){let n=t<=s?fb:t>=s+pb?pb:t-s;if(e<n)break;let i=n+(e-n)%(db-n);r.push(Sb(i)),e=Math.floor((e-n)/(db-n))}r.push(Sb(e)),s=bb(o,c+1,c===n),o=0,c++}o++,a++}return r.join(``)}var Tb=/^(?:R|AL|AN|EN|ES|CS|ET|ON|BN|NSM)$/,Eb=/^(?:L|EN|ES|CS|ET|ON|BN|NSM)$/,Db=/^(?:R|AL|AN)$/;function Ob(e){if(yb(e))try{return Ab(xb(e.slice(4).toLowerCase()))}catch{return!1}return Ab(e)}function kb(e){let t=String.fromCodePoint(e);return cb.test(t)?`EN`:Gy.test(t)?`AN`:Yy.test(t)?`NSM`:tb.test(t)?`R`:rb.test(t)?`AL`:Qy.test(t)?`L`:`ON`}function Ab(e){for(let t of e)if(Db.test(kb(t.codePointAt(0))))return!0;return!1}function jb(e){let t=!1,n=Eb,r=!1,i=!1,a=!0;for(let o of e){let e=kb(o.codePointAt(0));if(a){if(e!==`L`&&e!==`R`&&e!==`AL`)return!1;t=e===`R`||e===`AL`,n=t?Tb:Eb,a=!1}if(!n.test(e))return!1;e===`EN`?r=!0:e===`AN`&&(i=!0)}return!(t&&r&&i)}function Mb(e){return Uy.test(e)&&wb(e).length+4>63}function Nb(e){return e[0]===`-`||e[e.length-1]===`-`||e.slice(2).join(``).startsWith(`--`)}function Pb(e){if(Mb(e)||Ab(e)&&!jb(e))return!1;let t=[...e],n=t.map(e=>e.codePointAt(0)),r=n.length;if(Nb(t)||Zy.test(t[0]))return!1;let i=!1;for(let e=0;e<r;e++){let r=n[e],a=t[e];if(ab.test(a)||!lb.test(a))return!1;nb.test(a)&&(i=!0);let o=n[e-1],s=n[e+1];switch(r){case 183:if(o!==108||s!==108)return!1;break;case 885:if(!s||!eb.test(t[e+1]))return!1;break;case 1523:case 1524:if(!o||!tb.test(t[e-1]))return!1;break;case 8204:if(!o||o<128&&!ib.test(t[e-1]))return!1;break;case 8205:if(!o||!ib.test(t[e-1]))return!1}}return!(e.includes(`・`)&&!i)}function Fb(e){if(!yb(e))return!1;try{let t=e.slice(4).toLowerCase();if(t.lastIndexOf(`-`)===0)return!1;let n=xb(t);return Uy.test(n)?Pb(n):!1}catch{return!1}}function Ib(e){return e.length>0&&e.length<=63}function Lb(e){return Ib(e)&&(Fb(e)||ub(e))}function Rb(e){return e.length===0||e.length>253||e.charCodeAt(e.length-1)===46?!1:e.split(`.`).every(e=>Lb(e))}function zb(e){return e.length>0&&e.length<=63}function Bb(e){return zb(e)&&(Fb(e)||Pb(e))}function Vb(e){return e.replace(/[\uff01-\uff5e]/g,e=>String.fromCharCode(e.charCodeAt(0)-65248)).normalize(`NFC`).replace(/[\u00ad\u034f\u180b-\u180d\u200b\ufe00-\ufe0f\u{e0100}-\u{e01ef}]/gu,``).replace(/[\u002E\u3002\uFF0E\uFF61]/g,`.`)}function Hb(e){if(e.length===0||e.includes(` `))return!1;let t=Vb(e);if(t.length>253)return!1;let n=t.split(`.`),r=n.some(e=>Ob(e));return n.every(e=>Bb(e)&&(!r||jb(e)))}function Ub(e){return Rb(e)}var Wb=/^(?:[A-Za-z0-9!#$%&'*+\/=?^_`{|}~\u{0080}-\u{10FFFF}-]+(?:\.[A-Za-z0-9!#$%&'*+\/=?^_`{|}~\u{0080}-\u{10FFFF}-]+)*|"(?:[^"\\]|\\.)*")@[\p{L}\p{N}](?:[\p{L}\p{N}-]{0,62})(?<!-)(?:\.[\p{L}\p{N}](?:[\p{L}\p{N}-]{0,62})(?<!-))*$/iu;function Gb(e){return Wb.test(e.normalize(`NFC`))}function Kb(e){return Hb(e)}var qb=/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/;function Jb(e){return qb.test(e)}var Yb=/^(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:)?[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)$/i;function Xb(e){return Yb.test(e)}var Zb=/[\x00-\x20\x7F\\]|%(?![0-9a-fA-F]{2})/,Qb=/^[a-zA-Z][a-zA-Z0-9+\-.]*\/\//;function $b(e){return!Zb.test(e)&&!Qb.test(e)&&URL.canParse(e,`http://example.com`)}var ex=2048,tx=/\[[vV][0-9a-fA-F]+\.[^\]]+\]/,nx=/[\x00-\x20<>\^`{|}\\]/,rx=/%(?![0-9a-fA-F]{2})/;function ix(e){return e.length<ex?e.replace(tx,`[::1]`):e}function ax(e){return nx.test(e)||rx.test(e)?!1:URL.canParse(ix(e))}var ox=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;function sx(e){return ox.test(e)}var cx=/^(?:\/(?:[^~/]|~0|~1)*)*$/;function lx(e){return cx.test(e)}function ux(e){try{return new RegExp(e,`u`),!0}catch{return!1}}var dx=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function fx(e){return dx.test(e)}var px=/^(?:[a-z][a-z0-9+\-.]*:(?:\/\/(?:(?:[-a-z0-9._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:[\da-f]{1,4}:){6}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|::(?:[\da-f]{1,4}:){5}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:[\da-f]{1,4})?::(?:[\da-f]{1,4}:){4}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,1}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){3}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,2}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){2}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,3}[\da-f]{1,4})?::[\da-f]{1,4}:(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,4}[\da-f]{1,4})?::(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,5}[\da-f]{1,4})?::[\da-f]{1,4}|(?:(?:[\da-f]{1,4}:){0,6}[\da-f]{1,4})?::)|v[0-9a-f]+\.[-a-z0-9._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)|(?:[-a-z0-9._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:\/\/(?:(?:[-a-z0-9._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:[\da-f]{1,4}:){6}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|::(?:[\da-f]{1,4}:){5}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:[\da-f]{1,4})?::(?:[\da-f]{1,4}:){4}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,1}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){3}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,2}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){2}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,3}[\da-f]{1,4})?::[\da-f]{1,4}:(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,4}[\da-f]{1,4})?::(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,5}[\da-f]{1,4})?::[\da-f]{1,4}|(?:(?:[\da-f]{1,4}:){0,6}[\da-f]{1,4})?::)|v[0-9a-f]+\.[-a-z0-9._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)|(?:[-a-z0-9._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[-a-z0-9._~!$&'()*+,;=@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?)(?:\?(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function mx(e){return px.test(e)}var hx=/^(?:(?:[^\x00-\x20"<>%\\^`{|}\x7f]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?:\.(?:[a-z0-9_]|%[0-9a-f]{2})+)*(?::[1-9]\d{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?:\.(?:[a-z0-9_]|%[0-9a-f]{2})+)*(?::[1-9]\d{0,3}|\*)?)*\})*$/i;function gx(e){return hx.test(e)}var _x=/^[a-z][a-z0-9+\-.]*:(?:\/\/(?:(?:[-a-z0-9._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:[\da-f]{1,4}:){6}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|::(?:[\da-f]{1,4}:){5}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:[\da-f]{1,4})?::(?:[\da-f]{1,4}:){4}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,1}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){3}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,2}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){2}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,3}[\da-f]{1,4})?::[\da-f]{1,4}:(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,4}[\da-f]{1,4})?::(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,5}[\da-f]{1,4})?::[\da-f]{1,4}|(?:(?:[\da-f]{1,4}:){0,6}[\da-f]{1,4})?::)|v[0-9a-f]+\.[-a-z0-9._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)|(?:[-a-z0-9._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function vx(e){return _x.test(e)}function yx(e){return URL.canParse(e)}var bx=/^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;function xx(e){return bx.test(e)}var Sx=new Map;function Cx(){Sx.clear()}function wx(e,t){return Sx.get(e)?.(t)??!0}function Tx(){Cx(),Sx.set(`date-time`,Fy),Sx.set(`date`,My),Sx.set(`duration`,Ly),Sx.set(`email`,zy),Sx.set(`hostname`,Ub),Sx.set(`idn-email`,Gb),Sx.set(`idn-hostname`,Kb),Sx.set(`ipv4`,Jb),Sx.set(`ipv6`,Xb),Sx.set(`iri-reference`,$b),Sx.set(`iri`,ax),Sx.set(`json-pointer-uri-fragment`,sx),Sx.set(`json-pointer`,lx),Sx.set(`regex`,ux),Sx.set(`relative-json-pointer`,fx),Sx.set(`time`,Py),Sx.set(`uri-reference`,mx),Sx.set(`uri-template`,gx),Sx.set(`uri`,vx),Sx.set(`url`,yx),Sx.set(`uuid`,xx)}Tx();function Ex(e,t,n,r){return wx(n.format,r)}function Dx(e,t,n,r,i,a){return Ex(e,t,i,a)||t.AddError({keyword:`format`,schemaPath:n,instancePath:r,params:{format:i.format}})}function Ox(e,t,n,r){let i=!Vv(n)||n.then,a=!lv(n)||n.else;return BS(e,t,n.if,r)?BS(e,t,i,r):BS(e,t,a,r)}function kx(e,t,n,r,i,a){let o=!Vv(i)||i.then,s=!lv(i)||i.else,c=new qv,l=HS(e,c,`${n}/if`,r,i.if,a)?HS(e,c,`${n}/then`,r,o,a)||t.AddError({keyword:`if`,schemaPath:n,instancePath:r,params:{failingKeyword:`then`}}):HS(e,t,`${n}/else`,r,s,a)||t.AddError({keyword:`if`,schemaPath:n,instancePath:r,params:{failingKeyword:`else`}});return l&&t.Merge([c]),l}function Ax(e,t,n,r){return Sa(n.items,0,(n,i)=>ma(r.length,i)||zS(e,t,n,r[i])&&t.AddIndex(i))}function jx(e,t,n,r,i,a){return Ca(i.items,0,(i,o)=>{let s=`${n}/items/${o}`,c=`${r}/${o}`;return ma(a.length,o)||VS(e,t,s,c,i,a[o])&&t.AddIndex(o)})}function Mx(e,t,n,r){return Sa(r,Nv(n)?n.prefixItems.length:0,(r,i)=>zS(e,t,n.items,r)&&t.AddIndex(i))}function Nx(e,t,n,r,i,a){return Ca(a,Nv(i)?i.prefixItems.length:0,(a,o)=>VS(e,t,`${n}/items`,`${r}/${o}`,i.items,a)&&t.AddIndex(o))}function Px(e,t,n,r){return _v(n)?Ax(e,t,n,r):Mx(e,t,n,r)}function Fx(e,t,n,r,i,a){return _v(i)?jx(e,t,n,r,i,a):Nx(e,t,n,r,i,a)}function Ix(e){return nv(e)}function Lx(e,t,n,r){return!Ix(n)||ma(Ea(r,r=>BS(e,t,n.contains,r)),n.maxContains)}function Rx(e,t,n,r,i,a){let o=wv(i)?i.minContains:1;return Lx(e,t,i,a)||t.AddError({keyword:`contains`,schemaPath:n,instancePath:r,params:{minContains:o,maxContains:i.maxContains}})}function zx(e,t,n,r){return ma(r,n.maximum)}function Bx(e,t,n,r,i,a){return zx(e,t,i,a)||t.AddError({keyword:`maximum`,schemaPath:n,instancePath:r,params:{comparison:`<=`,limit:i.maximum}})}function Vx(e,t,n,r){return ma(r.length,n.maxItems)}function Hx(e,t,n,r,i,a){return Vx(e,t,i,a)||t.AddError({keyword:`maxItems`,schemaPath:n,instancePath:r,params:{limit:i.maxItems}})}function Ux(e,t,n,r){return ba(r,n.maxLength)}function Wx(e,t,n,r,i,a){return Ux(e,t,i,a)||t.AddError({keyword:`maxLength`,schemaPath:n,instancePath:r,params:{limit:i.maxLength}})}function Gx(e,t,n,r){return ma(M(r).length,n.maxProperties)}function Kx(e,t,n,r,i,a){return Gx(e,t,i,a)||t.AddError({keyword:`maxProperties`,schemaPath:n,instancePath:r,params:{limit:i.maxProperties}})}function qx(e){return nv(e)}function Jx(e,t,n,r){return!qx(n)||ha(Ea(r,(r,i)=>BS(e,t,n.contains,r)&&t.AddIndex(i)),n.minContains)}function Yx(e,t,n,r,i,a){return Jx(e,t,i,a)||t.AddError({keyword:`contains`,schemaPath:n,instancePath:r,params:{minContains:i.minContains}})}function Xx(e,t,n,r){return ha(r,n.minimum)}function Zx(e,t,n,r,i,a){return Xx(e,t,i,a)||t.AddError({keyword:`minimum`,schemaPath:n,instancePath:r,params:{comparison:`>=`,limit:i.minimum}})}function Qx(e,t,n,r){return ha(r.length,n.minItems)}function $x(e,t,n,r,i,a){return Qx(e,t,i,a)||t.AddError({keyword:`minItems`,schemaPath:n,instancePath:r,params:{limit:i.minItems}})}function eS(e,t,n,r){return xa(r,n.minLength)}function tS(e,t,n,r,i,a){return eS(e,t,i,a)||t.AddError({keyword:`minLength`,schemaPath:n,instancePath:r,params:{limit:i.minLength}})}function nS(e,t,n,r){return ha(M(r).length,n.minProperties)}function rS(e,t,n,r,i,a){return nS(e,t,i,a)||t.AddError({keyword:`minProperties`,schemaPath:n,instancePath:r,params:{limit:i.minProperties}})}function iS(e,t,n,r){return ga(r,n.multipleOf)}function aS(e,t,n,r,i,a){return iS(e,t,i,a)||t.AddError({keyword:`multipleOf`,schemaPath:n,instancePath:r,params:{multipleOf:i.multipleOf}})}function oS(e,t,n,r){let i=new Kv;return!BS(e,i,n.not,r)&&t.Merge([i])}function sS(e,t,n,r,i,a){return oS(e,t,i,a)||t.AddError({keyword:`not`,schemaPath:n,instancePath:r,params:{}})}function cS(e,t,n,r){let i=n.oneOf.reduce((t,n)=>{let i=new Kv;return BS(e,i,n,r)?[...t,i]:t},[]);return A(i.length,1)&&t.Merge(i)}function lS(e,t,n,r,i,a){let o=[],s=[],c=i.oneOf.reduce((t,i,c)=>{let l=new qv,u=HS(e,l,`${n}/oneOf/${c}`,r,i,a);return u&&s.push(c),u||o.push(l),u?[...t,l]:t},[]),l=A(c.length,1)&&t.Merge(c);return!l&&A(s.length,0)&&o.forEach(e=>e.GetErrors().forEach(e=>t.AddError(e))),l||t.AddError({keyword:`oneOf`,schemaPath:n,instancePath:r,params:{passingSchemas:s}})}function uS(e,t,n,r){return(la(n.pattern)?$v(n.pattern):n.pattern).test(r)}function dS(e,t,n,r,i,a){return uS(e,t,i,a)||t.AddError({keyword:`pattern`,schemaPath:n,instancePath:r,params:{pattern:i.pattern}})}function fS(e,t,n,r){return Sa(Aa(n.patternProperties),0,([n,i])=>{let a=$v(n);return Sa(Aa(r),0,([n,r])=>!a.test(n)||zS(e,t,i,r)&&t.AddKey(n))})}function pS(e,t,n,r,i,a){return Ca(Aa(i.patternProperties),0,([i,o])=>{let s=`${n}/patternProperties/${i}`,c=$v(i);return Ca(Aa(a),0,([n,i])=>{let a=`${r}/${n}`;return!c.test(n)||VS(e,t,s,a,o,i)&&t.AddKey(n)})})}function mS(e,t,n,r){return A(r.length,0)||Sa(n.prefixItems,0,(n,i)=>ma(r.length,i)||zS(e,t,n,r[i])&&t.AddIndex(i))}function hS(e,t,n,r,i,a){return A(a.length,0)||Ca(i.prefixItems,0,(i,o)=>{let s=`${n}/prefixItems/${o}`,c=`${r}/${o}`;return ma(a.length,o)||VS(e,t,s,c,i,a[o])&&t.AddIndex(o)})}function gS(e,t){return e.includes(t)||Ka().exactOptionalPropertyTypes}function _S(e,t){return da(e[t])}function vS(e,t,n,r){let i=Bv(n)?n.required:[];return Sa(Aa(n.properties),0,([n,a])=>{let o=!j(r,n)||zS(e,t,a,r[n])&&t.AddKey(n);return gS(i,n)?o:_S(r,n)||o})}function yS(e,t,n,r,i,a){let o=Bv(i)?i.required:[];return Ca(Aa(i.properties),0,([i,s])=>{let c=`${n}/properties/${i}`,l=`${r}/${i}`,u=()=>!j(a,i)||VS(e,t,c,l,s,a[i])&&t.AddKey(i);return gS(o,i)?u():_S(a,i)||u()})}function bS(e,t,n,r){return Sa(M(r),0,(r,i)=>BS(e,t,n.propertyNames,r))}function xS(e,t,n,r,i,a){let o=[];return Ca(M(a),0,(a,s)=>{let c=`${r}/${a}`,l=HS(e,t,`${n}/propertyNames`,c,i.propertyNames,a);return l||o.push(a),l})||t.AddError({keyword:`propertyNames`,schemaPath:n,instancePath:r,params:{propertyNames:o}})}function SS(e,t,n,r){let i=e.RecursiveRef(n)??!1;return Y_(i)&&BS(e,t,i,r)}function CS(e,t,n,r,i,a){let o=e.RecursiveRef(i)??!1;return Y_(o)&&HS(e,t,`#`,r,o,a)}function wS(e,t,n,r){let i=e.Ref(n)??!1,a=new Kv,o=Y_(i)&&BS(e,a,i,r);return o&&t.Merge([a]),o}function TS(e,t,n,r,i,a){let o=e.Ref(i)??!1,s=new qv,c=Y_(o)&&HS(e,s,`#`,r,o,a);return c&&t.Merge([s]),c||s.GetErrors().forEach(e=>t.AddError(e)),c}function ES(e,t,n,r){return Sa(n.required,0,e=>j(r,e))}function DS(e,t,n,r,i,a){let o=[];return Ca(i.required,0,e=>{let t=j(a,e);return t||o.push(e),t})||t.AddError({keyword:`required`,schemaPath:n,instancePath:r,params:{requiredProperties:o}})}function OS(e,t,n,r,i){return A(n,`object`)?sa(i):A(n,`array`)?$i(i):A(n,`boolean`)?ta(i):A(n,`integer`)?ia(i):A(n,`number`)?oa(i):A(n,`null`)?aa(i):A(n,`string`)?la(i):A(n,`bigint`)?ea(i):A(n,`constructor`)?na(i):A(n,`function`)?ra(i):A(n,`symbol`)?ua(i):A(n,`undefined`)?da(i):!A(n,`void`)||da(i)}function kS(e,t,n,r,i){return wa(n,n=>OS(e,t,n,r,i))}function AS(e,t,n,r){return $i(n.type)?kS(e,t,n.type,n,r):OS(e,t,n.type,n,r)}function jS(e,t,n,r,i,a){return($i(i.type)?kS(e,t,i.type,i,a):OS(e,t,i.type,i,a))||t.AddError({keyword:`type`,schemaPath:n,instancePath:r,params:{type:i.type}})}function MS(e,t,n,r){let i=t.GetIndices();return Sa(r,0,(r,a)=>(i.has(a)||BS(e,t,n.unevaluatedItems,r))&&t.AddIndex(a))}function NS(e,t,n,r,i,a){let o=t.GetIndices(),s=[];return Ca(a,0,(a,c)=>{let l=new qv,u=(o.has(c)||HS(e,l,n,r,i.unevaluatedItems,a))&&t.AddIndex(c);return u||s.push(c),u})||t.AddError({keyword:`unevaluatedItems`,schemaPath:n,instancePath:r,params:{unevaluatedItems:s}})}function PS(e,t,n,r){let i=t.GetKeys();return Sa(Aa(r),0,([r,a])=>i.has(r)||BS(e,t,n.unevaluatedProperties,a)&&t.AddKey(r))}function FS(e,t,n,r,i,a){let o=t.GetKeys(),s=[];return Ca(Aa(a),0,([a,c])=>{let l=new qv,u=o.has(a)||HS(e,l,n,r,i.unevaluatedProperties,c)&&t.AddKey(a);return u||s.push(a),u})||t.AddError({keyword:`unevaluatedProperties`,schemaPath:n,instancePath:r,params:{unevaluatedProperties:s}})}function IS(e){return!A(e.uniqueItems,!1)}function LS(e,t,n,r){if(!IS(n))return!0;let i=new Set(r.map(Vs)).size,a=r.length;return A(i,a)}function RS(e,t,n,r,i,a){if(!IS(i))return!0;let o=new Set,s=a.reduce((e,t,n)=>{let r=Vs(t);return o.has(r)?[...e,n]:(o.add(r),e)},[]);return A(s.length,0)||t.AddError({keyword:`uniqueItems`,schemaPath:n,instancePath:r,params:{duplicateItems:s}})}function zS(e,t,n,r){return t.Push()&&BS(e,t,n,r)&&t.Pop()}function BS(e,t,n,r){e.Push(n);let i=J_(n)?cy(e,t,n,r):(!Hv(n)||AS(e,t,n,r))&&(!(ca(r)&&!$i(r))||(!Bv(n)||ES(e,t,n,r))&&(!Z_(n)||ny(e,t,n,r))&&(!iv(n)||hy(e,t,n,r))&&(!av(n)||_y(e,t,n,r))&&(!ov(n)||yy(e,t,n,r))&&(!Mv(n)||fS(e,t,n,r))&&(!Pv(n)||vS(e,t,n,r))&&(!Fv(n)||bS(e,t,n,r))&&(!Dv(n)||nS(e,t,n,r))&&(!Sv(n)||Gx(e,t,n,r)))&&(!$i(r)||(!X_(n)||Zv(e,t,n,r))&&(!nv(n)||py(e,t,n,r))&&(!gv(n)||Px(e,t,n,r))&&(!yv(n)||Lx(e,t,n,r))&&(!bv(n)||Vx(e,t,n,r))&&(!wv(n)||Jx(e,t,n,r))&&(!Tv(n)||Qx(e,t,n,r))&&(!Nv(n)||mS(e,t,n,r))&&(!Uv(n)||LS(e,t,n,r)))&&(!la(r)||(!xv(n)||Ux(e,t,n,r))&&(!Ev(n)||eS(e,t,n,r))&&(!pv(n)||Ex(e,t,n,r))&&(!jv(n)||uS(e,t,n,r)))&&(!(oa(r)||ea(r))||(!dv(n)||Ty(e,t,n,r))&&(!fv(n)||Dy(e,t,n,r))&&(!vv(n)||zx(e,t,n,r))&&(!Cv(n)||Xx(e,t,n,r))&&(!Ov(n)||iS(e,t,n,r)))&&(!zv(n)||wS(e,t,n,r))&&(!Rv(n)||SS(e,t,n,r))&&(!cv(n)||xy(e,t,n,r))&&(!tv(n)||uy(e,t,n,r))&&(!uv(n)||Cy(e,t,n,r))&&(!hv(n)||Ox(e,t,n,r))&&(!kv(n)||oS(e,t,n,r))&&(!Q_(n)||iy(e,t,n,r))&&(!ev(n)||oy(e,t,n,r))&&(!Av(n)||cS(e,t,n,r))&&(!Wv(n)||!$i(r)||MS(e,t,n,r))&&(!Gv(n)||!ca(r)||PS(e,t,n,r))&&(!K_(n)||Jv(e,t,n,r));return e.Pop(n),i}function VS(e,t,n,r,i,a){return t.Push()&&HS(e,t,n,r,i,a)&&t.Pop()}function HS(e,t,n,r,i,a){if(t.AtCapacity())return!1;e.Push(i);let o=J_(i)?ly(e,t,n,r,i,a):!!(+(!Hv(i)||jS(e,t,n,r,i,a))&(!(ca(a)&&!$i(a))||!!(+(!Bv(i)||DS(e,t,n,r,i,a))&(!Z_(i)||ry(e,t,n,r,i,a))&(!iv(i)||gy(e,t,n,r,i,a))&(!av(i)||vy(e,t,n,r,i,a))&(!ov(i)||by(e,t,n,r,i,a))&(!Mv(i)||pS(e,t,n,r,i,a))&(!Pv(i)||yS(e,t,n,r,i,a))&(!Fv(i)||xS(e,t,n,r,i,a))&(!Dv(i)||rS(e,t,n,r,i,a))&(!Sv(i)||Kx(e,t,n,r,i,a))))&(!$i(a)||!!(+(!X_(i)||Qv(e,t,n,r,i,a))&(!nv(i)||my(e,t,n,r,i,a))&(!gv(i)||Fx(e,t,n,r,i,a))&(!yv(i)||Rx(e,t,n,r,i,a))&(!bv(i)||Hx(e,t,n,r,i,a))&(!wv(i)||Yx(e,t,n,r,i,a))&(!Tv(i)||$x(e,t,n,r,i,a))&(!Nv(i)||hS(e,t,n,r,i,a))&(!Uv(i)||RS(e,t,n,r,i,a))))&(!la(a)||!!(+(!xv(i)||Wx(e,t,n,r,i,a))&(!Ev(i)||tS(e,t,n,r,i,a))&(!pv(i)||Dx(e,t,n,r,i,a))&(!jv(i)||dS(e,t,n,r,i,a))))&(!(oa(a)||ea(a))||!!(+(!dv(i)||Ey(e,t,n,r,i,a))&(!fv(i)||Oy(e,t,n,r,i,a))&(!vv(i)||Bx(e,t,n,r,i,a))&(!Cv(i)||Zx(e,t,n,r,i,a))&(!Ov(i)||aS(e,t,n,r,i,a))))&(!zv(i)||TS(e,t,n,r,i,a))&(!Rv(i)||CS(e,t,n,r,i,a))&(!cv(i)||Sy(e,t,n,r,i,a))&(!tv(i)||dy(e,t,n,r,i,a))&(!uv(i)||wy(e,t,n,r,i,a))&(!hv(i)||kx(e,t,n,r,i,a))&(!kv(i)||sS(e,t,n,r,i,a))&(!Q_(i)||ay(e,t,n,r,i,a))&(!ev(i)||sy(e,t,n,r,i,a))&(!Av(i)||lS(e,t,n,r,i,a))&(!Wv(i)||!$i(a)||NS(e,t,n,r,i,a))&(!Gv(i)||!ca(a)||FS(e,t,n,r,i,a)))&&(!K_(i)||Yv(e,t,n,r,i,a));return e.Pop(i),o}function US(e,t){return ca(t)&&!Oa(e)?t[e]:void 0}function WS(e,t){return e.reduce((e,t)=>US(t,e),t)}function GS(e){if(A(e.length,0))return[];let t=e.split(`/`).map(e=>e.replace(/~1/g,`/`).replace(/~0/g,`~`));return t.length>0&&t[0]===``?t.slice(1):t}function KS(e,t){return WS(GS(t),e)}var qS=`https://json-schema.org`;function JS(e,t){if(ca(e)&&sv(e)&&A(e.$dynamicAnchor,t))return e;if(ca(e))for(let n of M(e)){let r=JS(e[n],t);if(r)return r}}function YS(e,t,n){if(A(e,n))return t.href;let r=q_(e)&&mv(e)?new URL(e.$id,t.href):t;if($i(e))for(let t of e){let e=YS(t,r,n);if(!da(e))return e}else if(ca(e))for(let t of M(e)){let i=YS(e[t],r,n);if(!da(i))return i}}function XS(e,t,n){if(A(e.$id,n.hash))return e;let r=new URL(n.href,t.href);if(A(t.pathname,r.pathname))return n.hash.startsWith(`#`)?$S(e,n):e}function ZS(e,t,n){let r=new URL(`#${e.$anchor}`,t.href),i=new URL(n.href,t.href);return A(r.href,i.href)?e:void 0}function QS(e,t,n){let r=new URL(`#${e.$dynamicAnchor}`,t.href),i=new URL(n.href,t.href);return A(r.href,i.href)?e:void 0}function $S(e,t){if(t.href.endsWith(`#`))return e;if(!t.hash.startsWith(`#`))return;let n=decodeURIComponent(t.hash.slice(1));if(n.startsWith(`/`))return KS(e,n)}function eC(e,t,n){if(mv(e)){let r=XS(e,t,n);if(!da(r))return r}if($_(e)){let r=ZS(e,t,n);if(!da(r))return r}if(sv(e)){let r=QS(e,t,n);if(!da(r))return r}return $S(e,n)}function tC(e,t,n){return e.reduce((e,r)=>{let i=iC(r,t,n);return da(i)?e:i},void 0)}function nC(e){return A(e,`const`)||A(e,`enum`)}function rC(e,t,n){return M(e).reduce((r,i)=>{if(nC(i))return r;let a=iC(e[i],t,n);return da(a)?r:a},void 0)}function iC(e,t,n){let r=q_(e)&&mv(e)?new URL(e.$id,t.href):t;if(q_(e)){let t=eC(e,r,n);if(!da(t))return t}if($i(e))return tC(e,r,n);if(ca(e))return rC(e,r,n)}function aC(e,t,n){return YS(e,new URL(t||`.`,qS),n)}function oC(e,t,n,r){let i=hC(e,t,n,r,!1);return q_(i)&&mv(i)?i:void 0}function sC(e){return e.href.split(`#`)[0]}function cC(e,t){return j(e,t)?e[t]:void 0}function lC(e,t,n){return iC(e,t,n)}function uC(e,t,n){let r=sC(n);if(A(r,sC(t))||!j(e,r))return;let i=e[r],a=q_(i)&&mv(i)?new URL(i.$id,r):new URL(r);return A(n.hash,``)?i:iC(i,a,n)}function dC(e,t,n,r,i){if(!r.$ref.startsWith(`#`)||j(e,`$schema`))return;let a=aC(t,n,i);if(!(da(a)||A(a,n)))return{target:i,base:a,root:t}}function fC(e,t,n){let r=e[t];if(q_(r))return{target:n,base:t,root:r}}function pC(e,t,n,r,i){let a=i?fC(e.context,r,n):void 0;return da(a)?dC(e.root,e.lexicalSchema,e.referenceBase,t,n):a}function mC(e,t,n,r,i,a){if(mv(i))return;let o=oC(e,t,n,r);if(o&&!a.includes(o))return{target:i,resource:o}}function hC(e,t,n,r,i=!0){let a=new URL(n||`.`,qS),o=i&&mv(t)?new URL(t.$id,a):a,s=new URL(r,o.href);return cC(e,r)??lC(t,o,s)??uC(e,o,s)}function gC(e,t,n,r,i,a){let o=new URL(n||`.`,qS),s=hC(e,i.$dynamicRef.startsWith(`#`)?r:t,n,i.$dynamicRef,!1);if(da(s)){let e=new URL(i.$dynamicRef,o).hash;if(!e.startsWith(`#/`)&&e.startsWith(`#`)){let n=decodeURIComponent(e.slice(1));return a.find(e=>A(e.$dynamicAnchor,n))??JS(t,n)}}else return!q_(s)||!sv(s)||new URL(i.$dynamicRef,o).hash.startsWith(`#/`)?s:a.find(e=>A(e.$dynamicAnchor,s.$dynamicAnchor))??s}function _C(e,t){let n=e.inRetrievedFrame?e.lexicalSchema:e.root,r=t.$ref.startsWith(`#`)?e.lexicalSchema:n,i=hC(e.context,r,e.referenceBase,t.$ref,!1);if(!i||!q_(i))return{schema:i};let a=new URL(t.$ref,e.referenceBase).href.split(`#`)[0],o=!A(a,e.resourceBase);return{schema:i,retrievedResource:pC(e,t,i,a,o),resolvedResource:o?mC(e.context,e.root,e.referenceBase,a,i,e.ids):void 0}}function vC(e,t){let n=Lv(e.lexicalSchema)?e.recursiveAnchors[0]:e.lexicalSchema;return hC(e.context,n,e.lexicalBase,t.$recursiveRef,!1)}function yC(e,t){return gC(e.context,e.root,e.lexicalBase,e.lexicalSchema,t,e.dynamicAnchors)}var bC=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},xC,SC,CC,wC,TC,EC,DC,OC,kC,AC,jC,MC,NC,PC,FC,IC=class{constructor(e,t){xC.add(this),this.context=e,this.schema=t,this.ids=[],this.resourceIds=[],this.anchors=[],this.recursiveAnchors=[],this.dynamicAnchors=[],this.retrievedResources=new Map,this.retrievedFrames=[],this.resolvedResources=new Map,this.pendingResource=!0}LexicalBaseURL(){return bC(this,xC,`m`,wC).call(this,this.ids)}Push(e){if(!q_(e))return;mv(e)&&bC(this,xC,`m`,MC).call(this,e),$_(e)&&this.anchors.push(e),Lv(e)&&this.recursiveAnchors.push(e),sv(e)&&this.dynamicAnchors.push(e);let t=this.retrievedResources.get(e);t&&this.retrievedFrames.push({schema:t.root,base:t.base,idDepth:this.ids.length,resourceDepth:this.resourceIds.length})}Pop(e){q_(e)&&(mv(e)&&bC(this,xC,`m`,NC).call(this,e),$_(e)&&this.anchors.pop(),Lv(e)&&this.recursiveAnchors.pop(),sv(e)&&this.dynamicAnchors.pop(),this.retrievedResources.has(e)&&this.retrievedFrames.pop(),bC(this,xC,`m`,FC).call(this,e))}Ref(e){let t=_C(bC(this,xC,`m`,SC).call(this),e);return bC(this,xC,`m`,CC).call(this,t),t.schema}RecursiveRef(e){let t=vC(bC(this,xC,`m`,SC).call(this),e);return t&&(this.pendingResource=!0),t}DynamicRef(e){let t=yC(bC(this,xC,`m`,SC).call(this),e);return t&&(this.pendingResource=!0),t}};xC=new WeakSet,SC=function(){return{context:this.context,root:this.schema,ids:this.ids,lexicalSchema:bC(this,xC,`m`,DC).call(this),lexicalBase:this.LexicalBaseURL(),referenceBase:bC(this,xC,`m`,EC).call(this),resourceBase:bC(this,xC,`m`,TC).call(this),recursiveAnchors:this.recursiveAnchors,dynamicAnchors:this.dynamicAnchors,inRetrievedFrame:this.retrievedFrames.length>0}},CC=function(e){da(e.schema)||(this.pendingResource=!0),da(e.resolvedResource)||bC(this,xC,`m`,PC).call(this,e.resolvedResource.target,e.resolvedResource.resource),da(e.retrievedResource)||this.retrievedResources.set(e.retrievedResource.target,{base:e.retrievedResource.base,root:e.retrievedResource.root})},wC=function(e){let t=this.retrievedFrames[this.retrievedFrames.length-1],n=t?new URL(t.base):new URL(qS);return(t?e.slice(t.idDepth):e).reduce((e,t)=>new URL(t.$id,e),n).href},TC=function(){let e=this.retrievedFrames[this.retrievedFrames.length-1];return e?this.resourceIds.slice(e.resourceDepth).reduce((e,t)=>new URL(t.$id,e),new URL(e.base)).href:bC(this,xC,`m`,wC).call(this,this.resourceIds)},EC=function(){if(this.retrievedFrames.length>0)return bC(this,xC,`m`,TC).call(this);let e=this.ids[this.ids.length-1];return e&&!/^[A-Za-z][A-Za-z0-9+.-]*:/.test(e.$id)?this.LexicalBaseURL():bC(this,xC,`m`,TC).call(this)},DC=function(){let e=this.retrievedFrames[this.retrievedFrames.length-1];return e?this.ids.length>e.idDepth?this.ids[this.ids.length-1]:e.schema:this.ids.length>0?this.ids[this.ids.length-1]:this.schema},OC=function(e){e.forEach(e=>bC(this,xC,`m`,AC).call(this,e,!1))},kC=function(e){e.forEach(e=>bC(this,xC,`m`,jC).call(this,e,!1))},AC=function e(t,n=!0){if(J_(t))return;if($i(t))return bC(this,xC,`m`,OC).call(this,t);if(!q_(t))return;let r=t;if(n||!mv(r)){!n&&sv(r)&&this.dynamicAnchors.push(r);for(let t of M(r))bC(this,xC,`m`,e).call(this,r[t],!1)}},jC=function e(t,n=!0){if(J_(t))return;if($i(t))return bC(this,xC,`m`,kC).call(this,t);if(!q_(t))return;let r=t;if(n||!mv(r)){!n&&sv(r)&&this.dynamicAnchors.pop();for(let t of M(r))bC(this,xC,`m`,e).call(this,r[t],!1)}},MC=function(e){this.ids.push(e);let t=this.pendingResource;this.pendingResource=!1,t&&this.resourceIds.push(e),bC(this,xC,`m`,AC).call(this,e,!0)},NC=function(e){this.ids.pop(),this.resourceIds.length>0&&A(this.resourceIds[this.resourceIds.length-1],e)&&this.resourceIds.pop(),bC(this,xC,`m`,jC).call(this,e,!0)},PC=function(e,t){bC(this,xC,`m`,MC).call(this,t),this.resolvedResources.set(e,t)},FC=function(e){if(!this.resolvedResources.has(e))return;let t=this.resolvedResources.get(e);bC(this,xC,`m`,NC).call(this,t),this.resolvedResources.delete(e)};function LC(...e){let[t,n,r]=es(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]}),i=new IC(t,n),a=new qv,o=HS(i,a,`#`,``,n,r),s=a.GetErrors(),c=Ws();return[o,s.map(e=>({...e,message:c(e)}))]}function RC(...e){let[t,n,r]=es(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]});return BS(new IC(t,n),new Kv,n,r)}function zC(...e){let[t,n,r]=es(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]});return RC(t,n,r)}function BC(...e){let[t,n,r]=es(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]}),[i,a]=LC(t,n,r);return a}function VC(e,t,n){return $i(n)?n.map(n=>QC(e,t.items,n)):n}function HC(e,t,n){return QC({...e,...t.$defs},Mo(t.$ref),n)}function UC(e,t){let n=j(t,`unevaluatedProperties`)?{additionalProperties:t.unevaluatedProperties}:{},r=V_(I_(e,t));return Ko(r)?C_(r,n):r}function WC(e,t,n){return QC(e,UC(e,t),n)}function GC(e){return j(e,`additionalProperties`)?e.additionalProperties:void 0}function KC(e,t,n){if(!ca(n)||$i(n))return n;let r=GC(t);for(let i of M(n))j(t.properties,i)?n[i]=QC(e,t.properties[i],n[i]):ta(r)&&A(r,!0)||mo(r)&&zC(e,r,n[i])?n[i]=QC(e,r,n[i]):delete n[i];return n}function qC(e,t,n){if(!ca(n))return n;let r=GC(t),[i,a]=[new RegExp(Xl(t)),Ql(t)];for(let t of M(n))i.test(t)?n[t]=QC(e,a,n[t]):ta(r)&&A(r,!0)||mo(r)&&zC(e,r,n[t])?n[t]=QC(e,r,n[t]):delete n[t];return n}function JC(e,t,n){return j(e,t.$ref)?QC(e,e[t.$ref],n):n}function YC(e,t,n){if(!$i(n))return n;let r=Math.min(n.length,t.items.length);for(let i=0;i<r;i++)n[i]=QC(e,t.items[i],n[i]);return fa(n.length,r)?n.slice(0,r):n}function XC(e){return oo(e)}function ZC(e,t,n){for(let r of t.anyOf){let t=QC(e,r,XC(n));if(zC(e,r,t))return t}return n}function QC(e,t,n){return wo(t)?VC(e,t,n):Zo(t)?HC(e,t,n):us(t)?WC(e,t,n):Ko(t)?KC(e,t,n):$l(t)?qC(e,t,n):No(t)?JC(e,t,n):Hc(t)?YC(e,t,n):yc(t)?ZC(e,t,n):n}function $C(e,t){for(let n of Wa.Keys(e))Wa.HasPropertyKey(t,n)||(t[n]=e[n]);return t}function ew(e){let t={};for(let n of Wa.Keys(e))t[n]=rw(e[n]);return t}function tw(e){return nw(G_(e))}function nw(e){return e.map(e=>rw(e))}function rw(e){return $C(e,wo(e)?Co(rw(e.items),To(e)):us(e)?ls(nw(e.allOf)):yc(e)?vc(tw(e.anyOf)):Ko(e)?P(ew(e.properties)):$l(e)?ql(Zl(e),rw(Ql(e))):Hc(e)?Vc(nw(e.items)):e)}function iw(e){return rw(e)}function aw(...e){let[t,n,r]=es(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]});return QC(t,Ka().unionPrioritySort?iw(n):n,r)}BigInt(2**53-1),BigInt(-(2**53-1));function ow(e,t,n){if(!$i(n))return n;for(let r=0;r<n.length;r++)n[r]=hw(e,t.items,n[r]);return n}function sw(e,t,n){return hw({...e,...t.$defs},Mo(t.$ref),n)}function cw(e,t){return da(t)?ra(e.default)?e.default():XC(e.default):t}function lw(e,t,n){return hw(e,V_(I_(e,t)),n)}function uw(e,t,n){if(!ca(n))return n;let r=M(t.properties);for(let i of r){let r=hw(e,t.properties[i],n[i]);(!da(r)||!Ho(t.properties[i])&&j(t.properties[i],`default`))&&(n[i]=r)}if(!Z_(t)||ta(t.additionalProperties))return n;for(let i of M(n))r.includes(i)||(n[i]=hw(e,t.additionalProperties,n[i]));return n}function dw(e,t,n){if(!ca(n))return n;let[r,i]=[new RegExp(Xl(t)),Ql(t)];for(let t of M(n))r.test(t)&&rv(i)&&(n[t]=hw(e,i,n[t]));if(!Z_(t))return n;for(let i of M(n))r.test(i)||(n[i]=hw(e,t.additionalProperties,n[i]));return n}function fw(e,t,n){return j(e,t.$ref)?hw(e,e[t.$ref],n):n}function pw(e,t,n){if(!$i(n))return n;let[r,i]=[t.items,Math.max(t.items.length,n.length)];for(let t=0;t<i;t++)t<r.length&&(n[t]=hw(e,r[t],n[t]));return n}function mw(e,t,n){for(let r of t.anyOf){let t=hw(e,r,XC(n));if(zC(e,r,t))return t}return n}function hw(e,t,n){let r=rv(t)?cw(t,n):n;return wo(t)?ow(e,t,r):Zo(t)?sw(e,t,r):us(t)?lw(e,t,r):Ko(t)?uw(e,t,r):$l(t)?dw(e,t,r):No(t)?fw(e,t,r):Hc(t)?pw(e,t,r):yc(t)?mw(e,t,r):r}function gw(...e){let[t,n,r]=es(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]});return hw(t,n,r)}vc([P({type:F(`insert`),path:gc(),value:Jo()}),Object({type:F(`update`),path:gc(),value:Jo()}),P({type:F(`delete`),path:gc()})]);var _w=[`aborted`,`contract_mismatch`,`forbidden`,`gone`,`invalid`,`not_in_variant`,`not_ready`,`released`,`superseded`,`unavailable`,`upgrade_conflict`,`upgrade_required`],vw=new Set([`superseded`,`upgrade_conflict`]),L=class extends Error{code;reason;retryable;details;constructor(e,t,n){super(`${e}${n?.reason?`/${n.reason}`:``}: ${t}`,{cause:n?.cause}),this.name=`ChordError`,this.code=e,this.reason=n?.reason,this.retryable=vw.has(e),this.details=n?.details}},yw=(e,t)=>e instanceof L&&(t===void 0||e.code===t),bw=(e,t,n)=>new L(`invalid`,t,{reason:e,details:n}),xw=(e,t)=>e instanceof L?e:new L(`unavailable`,`${t}: ${e instanceof Error?e.message:String(e)}`,{cause:e});async function Sw(e,t){let n=[];for(let t of e)try{await t()}catch(e){n.push(e)}if(n.length===1)throw n[0];if(n.length>1)throw AggregateError(n,t)}var Cw=e=>typeof e==`object`&&e?e:e===!1?{not:{}}:{};function ww(e){return typeof e!=`object`||!e?JSON.stringify(e)??`null`:Array.isArray(e)?`[${e.map(e=>ww(e)).join(`,`)}]`:`{${Object.keys(e).filter(t=>e[t]!==void 0).sort().map(t=>`${JSON.stringify(t)}:${ww(e[t])}`).join(`,`)}}`}function Tw(e){let t=2166136261,n=1523705862;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);t=Math.imul(t^i,16777619),n=Math.imul(n^i,1540483477)^n>>>13}return(t>>>0).toString(16).padStart(8,`0`)+(n>>>0).toString(16).padStart(8,`0`)}function Ew(e,t){return e===t||ww(e)===ww(t)}function Dw(e,t,n,r){if(zC(n,r))return;let i=[...BC(n,r)].slice(0,3);throw bw(e,`${t}: ${i.map(e=>`${e.instancePath||`/`} ${e.message}`).join(`; `)}`,i)}function Ow(e,t,n){let r=aw(e,gw(e,XC(t??{})));return Dw(`input`,n,e,r),r}function kw(e,t){return ww(Aw(Cw(e),t))}function Aw(e,t){if(Array.isArray(t)){let n=e.items;return Array.isArray(n)?t.map((e,t)=>Aw(Cw(n[t]),e)):t.map(e=>Aw(Cw(n),e))}if(typeof t!=`object`||!t)return t;let n=Cw(e.properties),r={};for(let[e,i]of Object.entries(t)){let t=Cw(n[e]);`default`in t&&Ew(t.default,i)||(r[e]=Aw(t,i))}return r}var jw=[`minLength`,`maxLength`,`pattern`,`format`,`minimum`,`maximum`,`exclusiveMinimum`,`exclusiveMaximum`,`multipleOf`,`minItems`,`maxItems`,`uniqueItems`,`minProperties`,`maxProperties`],Mw=e=>typeof e.type==`string`?[e.type]:Array.isArray(e.type)?e.type:void 0,Nw=new Set([...jw,`type`,`properties`,`required`,`additionalProperties`,`patternProperties`,`items`,`additionalItems`,`const`,`enum`,`anyOf`,`parameters`,`returnType`]),Pw=new Set([`title`,`description`,`default`,`examples`,`$id`,`$schema`,`$comment`,`readOnly`,`writeOnly`,`deprecated`]),Fw=e=>Object.fromEntries(Object.entries(e).filter(([e])=>!Pw.has(e)));function Iw(e,t){let n=Fw(Cw(e)),r=Fw(Cw(t));if(Object.keys(r).length===0||Ew(n,r))return!0;if(Object.keys(r).some(e=>!Nw.has(e))||r.additionalProperties!==void 0&&typeof r.additionalProperties!=`boolean`)return!1;if(Array.isArray(n.anyOf))return n.anyOf.every(e=>Iw(e,r));if(Array.isArray(r.anyOf))return r.anyOf.some(e=>Iw(n,e));if(`const`in r)return`const`in n&&Ew(n.const,r.const);if(Array.isArray(r.enum))return(`const`in n?[n.const]:Array.isArray(n.enum)?n.enum:void 0)?.every(e=>r.enum.some(t=>Ew(t,e)))??!1;for(let e of jw)if(e in r&&!Ew(n[e],r[e]))return!1;let i=Mw(r),a=Mw(n);return i===void 0||a===void 0||!a.every(e=>i.includes(e)||e===`integer`&&i.includes(`number`))?!1:`const`in n||Array.isArray(n.enum)?!0:a.includes(`object`)&&!Lw(n,r)||a.includes(`array`)&&!Rw(n,r)?!1:!a.includes(`function`)||zw(n,r)}function Lw(e,t){let n=Cw(e.properties),r=Cw(t.properties),i=new Set(e.required??[]);for(let e of t.required??[])if(!i.has(e))return!1;for(let[t,i]of Object.entries(r))if(t in n){if(!Iw(n[t],i))return!1}else if(typeof e.additionalProperties==`object`&&!Iw(e.additionalProperties,i))return!1;if(t.additionalProperties===!1&&(e.additionalProperties!==!1||Object.keys(n).some(e=>!(e in r))))return!1;let a=Cw(t.patternProperties);if(Object.keys(a).length>0){let t=Cw(e.patternProperties);if(e.additionalProperties!==!1&&Object.keys(t).length===0)return!1;for(let[e,i]of Object.entries(a)){let a=new RegExp(e,`u`);for(let[e,t]of Object.entries(n))if(!(e in r)&&a.test(e)&&!Iw(t,i))return!1;if(Object.keys(t).length>0&&(!(e in t)||!Iw(t[e],i)))return!1}for(let e of Object.keys(t))if(!(e in a))return!1}return!0}function Rw(e,t){return Array.isArray(t.items)?!Array.isArray(e.items)||e.items.length!==t.items.length?!1:e.items.every((e,n)=>Iw(e,t.items[n])):Array.isArray(e.items)?e.items.every(e=>Iw(e,t.items)):Iw(e.items,t.items)}function zw(e,t){let n=e.parameters??[],r=t.parameters??[];return n.length>r.length||!n.every((e,t)=>Iw(r[t],e))?!1:Iw(e.returnType,t.returnType)}var Bw=Symbol(`chord.member`);function Vw(e,t){return{[Bw]:`method`,args:e,result:t}}function Hw(e){if(typeof e!=`string`||e===``)throw TypeError(`hostNamed needs a host name`);return{name:e}}function Uw(e,t,n){if(`name`in t)return t.name;let r=typeof n==`object`&&n?n[t.key]:void 0;if(typeof r!=`string`||r===``)throw bw(`placement`,`${e}: input field ${t.key} names no host`);return t.prefix+r}var Ww=(e,t)=>`name`in e?e.name===t:t.startsWith(e.prefix)&&t.length>e.prefix.length,Gw=e=>`name`in e?e.name:`${e.prefix}<${e.key}>`,Kw=Qo(P({})),qw=vc([P({kind:F(`method`),args:N(Kw),result:N(Kw)}),P({kind:F(`state`),schema:Kw}),P({kind:F(`opaque`),id:gc()})]),Jw=vc([P({name:gc({minLength:1})},{additionalProperties:!1}),P({prefix:gc({minLength:1}),key:gc({minLength:1})},{additionalProperties:!1})]),Yw=P({name:gc({minLength:1}),scope:vc([F(`remote`),F(`local`)]),version:tc(),input:Kw,host:N(Jw),variants:ql(gc(),ql(gc(),qw))}),Xw=new Set([`variant`,`status`,`ready`,`shape`,`error`,`onShape`,`onStatus`,`release`,`then`,`contract`]);function Zw(e,t,n){if(Xw.has(e))throw TypeError(`member name is reserved: ${e}`);let r=t[Bw];if(r===`method`){let e=t;return{kind:`method`,...e.args===void 0?{}:{args:e.args},...e.result===void 0?{}:{result:e.result}}}if(r===`opaque`){if(n===`remote`)throw TypeError(`remote contracts cannot expose opaque members: ${e}`);return{kind:`opaque`,id:t.id}}return{kind:`state`,schema:t}}function Qw(e){return{...e,fingerprint:Tw(ww(e.description))}}function $w(e,t){if(!e)throw TypeError(`contract name is empty`);if(!Number.isInteger(t)||t<1)throw TypeError(`contract version must be a positive integer`)}function eT(e,t){$w(e,t.version);let n=t.host;if(n===void 0||!zC(Jw,n))throw TypeError(`remote contract ${e} needs \`host\`: hostNamed(…) or hostFamily(…)`);let r=`name`in n?{name:n.name}:{prefix:n.prefix,key:n.key},i={};if(Object.keys(t.variants).length===0)throw TypeError(`remote contract ${e} has no variants`);for(let[n,r]of Object.entries(t.variants)){let t={};for(let[e,n]of Object.entries(r.state??{}))t[e]=Zw(e,n,`remote`);for(let[i,a]of Object.entries(r.methods??{})){if(i in t)throw TypeError(`member ${i} is both state and method in ${e}.${n}`);if(t[i]=Zw(i,a,`remote`),t[i].kind!==`method`)throw TypeError(`methods.${i} is not a method()`)}i[n]=t}let a={name:e,scope:`remote`,version:t.version,input:t.input,host:r,variants:i};return Qw({scope:`remote`,name:e,version:t.version,input:t.input,def:t,description:a})}function tT(e){let{name:t,scope:n,version:r,input:i,host:a}=e;if(typeof t!=`string`||n!==`remote`&&n!==`local`||!Number.isInteger(r)||n===`remote`!=(a!==void 0))throw new L(`invalid`,`malformed contract token`,{reason:`token`});let o={name:t,version:r,input:i,description:e,fingerprint:Tw(ww(e))};return n===`remote`?{...o,scope:n,def:{version:r,input:i,host:a,variants:{}}}:{...o,scope:n,def:{version:r,input:i}}}function nT(e,t){if(e.name!==t.name||e.scope!==t.scope)return`different type`;if(!rT(e,t))return`host`;if(!Iw(t.input,e.input))return`input`;for(let[n,r]of Object.entries(t.variants)){let t=e.variants[n];if(t===void 0)return`variant ${n} missing`;for(let[e,i]of Object.entries(r)){let r=t[e];if(r===void 0||r.kind!==i.kind)return`${n}.${e} missing or of another kind`;if(r.kind===`method`&&i.kind===`method`){if(i.args===void 0!=(r.args===void 0)||i.args!==void 0&&r.args!==void 0&&!Iw(i.args,r.args))return`${n}.${e} arguments`;if(i.result!==void 0&&(r.result===void 0||!Iw(r.result,i.result)))return`${n}.${e} result`}else if(r.kind===`state`&&i.kind===`state`){if(!Iw(r.schema,i.schema))return`${n}.${e} state`}else if(r.kind===`opaque`&&i.kind===`opaque`&&r.id!==i.id)return`${n}.${e} opaque ${r.id} != ${i.id}`}}}var rT=(e,t)=>ww(e.host??null)===ww(t.host??null),iT=e=>e.host===void 0?`(local)`:Gw(e.host);function aT(e,t,n){if(e.fingerprint===n.fingerprint)return;if(!rT(e.description,n.description))throw new L(`contract_mismatch`,`${e.name} lives on ${iT(e.description)}, the consumer expects ${iT(n.description)}`);if(e.version===n.version){let t=nT(e.description,n.description);if(t===void 0)return;throw new L(`contract_mismatch`,`${e.name}@${e.version} does not cover the consumer's description (${t}); forgotten version bump?`)}let r=t?.[n.version];if(r===void 0)throw new L(`contract_mismatch`,`${e.name}: provider version ${e.version}, consumer version ${n.version}, no accepts adapter`);return r}function oT(e,t){for(let n of Object.values(e.description.variants)){let e=n[t];if(e?.kind===`method`)return e.args===void 0}return!1}var sT=65536,cT=4096,lT=new WeakSet,uT=(e,t)=>{lT.has(e)||(e.length>=cT?lT.add(e):e.push(t))},dT=e=>typeof e==`object`&&!!e,fT=(e,t,n)=>{e.length===0?uT(n,[`r`,t]):uT(n,[`s`,e,t])},pT=(e,t)=>{if(e===t)return!0;if(!dT(e)||!dT(t)||Array.isArray(e)!==Array.isArray(t))return!1;if(Array.isArray(e)){let n=t;if(e.length!==n.length)return!1;for(let t=0;t<e.length;t++)if(!pT(e[t],n[t]))return!1;return!0}let n=t,r=Object.keys(e);if(r.length!==Object.keys(n).length)return!1;for(let t of r)if(!Object.hasOwn(n,t)||!pT(e[t],n[t]))return!1;return!0},mT=(e,t)=>{if(e.length!==t.length)return;let n=new Map;for(let t=0;t<e.length;t++){let r=e[t],i=n.get(r);i===void 0?n.set(r,{indices:[t],used:0}):i.indices.push(t)}let r=Array(t.length);for(let e=0;e<t.length;e++){let i=n.get(t[e]);if(i===void 0||i.used===i.indices.length)return;r[e]=i.indices[i.used++]}return r},hT=(e,t,n,r)=>{if(e===t)return;if(t.length>e.length&&t.slice(0,e.length)===e){uT(r,[`a`,n,t.slice(e.length)]);return}let i=fO(e,t,sT);i===0?uT(r,[`s`,n,t]):(uT(r,[`t`,n,e.length-i]),t.length>i&&uT(r,[`a`,n,t.slice(i)]))},gT=2e5,_T=65536,vT=(e,t)=>e===t||pT(e,t),yT=(e,t,n,r)=>{if(e.length===0||t.length===0)return[];if(e.length*t.length>r)return;let i=t.length+1,a=new Uint32Array((e.length+1)*i);for(let r=e.length-1;r>=0;r--)for(let o=t.length-1;o>=0;o--){let s=r*i+o;a[s]=n(e[r],t[o])?a[(r+1)*i+o+1]+1:Math.max(a[(r+1)*i+o],a[r*i+o+1])}let o=[],s=0,c=0;for(;s<e.length&&c<t.length;)n(e[s],t[c])&&a[s*i+c]===a[(s+1)*i+c+1]+1?o.push([s++,c++]):a[(s+1)*i+c]>=a[s*i+c+1]?s+=1:c+=1;return o},bT=(e,t)=>{if(vT(e,t))return!0;if(!dT(e)||!dT(t)||Array.isArray(e)!==Array.isArray(t))return!1;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.some((e,n)=>dT(e)&&e===t[n]);let n=e,r=t;for(let e of Object.keys(n)){let t=n[e];if(dT(t)&&Object.hasOwn(r,e)&&t===r[e])return!0}return!1},xT=(e,t)=>{let n=0,r=e.length;for(;n<r;){let i=n+r>>>1;e[i]<t?n=i+1:r=i}return n},ST=(e,t,n,r,i,a)=>{let o=n-t,s=a-i,c=[];if(s<o){let o=t;for(let t=i;t<a;t++){for(;o<n&&e[o]!==r[t];)o+=1;if(o===n)return;c.push([o++,t])}return c}if(o<s){let o=i;for(let i=t;i<n;i++){for(;o<a&&e[i]!==r[o];)o+=1;if(o===a)return;c.push([i,o++])}return c}},CT=(e,t,n,r)=>{let i=[],a=-1;for(let o=n;o<r;o++){let n=e.get(t[o]);if(n===void 0)continue;let r=n[xT(n,a+1)];r!==void 0&&(i.push([r,o]),a=r)}return i},wT=(e,t,n,r,i,a)=>{let o=new Map;for(let r=t;r<n;r++){let t=e[r],n=o.get(t);n===void 0?o.set(t,[r]):n.push(r)}let s=0;for(let e=i;e<a;e++)if(s+=o.get(r[e])?.length??0,s>gT)return CT(o,r,i,a);if(s===0)return[];let c=[],l=[],u=[];for(let e=i;e<a;e++){let t=o.get(r[e]);if(t!==void 0)for(let n=t.length-1;n>=0;n--){let r=t[n],i=xT(u,r),a=c.length;c.push({before:r,after:e,previous:i===0?-1:l[i-1]}),l[i]=a,u[i]=r}}let d=[],f=l[l.length-1]??-1;for(;f>=0;){let e=c[f];d.push([e.before,e.after]),f=e.previous}return d.reverse(),d},TT=(e,t,n,r,i,a,o,s,c,l)=>{let u=i,d=o,f=c;for(let[i,a]of l){if(lT.has(r))return;ET(e,t,n,r,u,i,d,a,f),f+=a-d,vT(e[i],t[a])||kT(e[i],t[a],[...n,f],r),f+=1,u=i+1,d=a+1}lT.has(r)||ET(e,t,n,r,u,a,d,s,f)};function ET(e,t,n,r,i,a,o,s,c){if(lT.has(r))return;for(;i<a&&o<s&&vT(e[i],t[o]);)i+=1,o+=1,c+=1;for(;i<a&&o<s&&vT(e[a-1],t[s-1]);)--a,--s;let l=a-i,u=s-o;if(l===0&&u===0)return;if(l===0||u===0){uT(r,[`p`,n,c,l,t.slice(o,s)]);return}if(l===u){let u=[];for(let n=0;n<l;n++)vT(e[i+n],t[o+n])&&u.push([i+n,o+n]);if(u.length>0){TT(e,t,n,r,i,a,o,s,c,u);return}}let d=ST(e,i,a,t,o,s);if(d!==void 0&&d.length>0){TT(e,t,n,r,i,a,o,s,c,d);return}let f=wT(e,i,a,t,o,s);if(f.length>0){TT(e,t,n,r,i,a,o,s,c,f);return}let p=yT(e.slice(i,a),t.slice(o,s),bT,_T);if(p!==void 0&&p.length>0){let l=p.map(([e,t])=>[i+e,o+t]);TT(e,t,n,r,i,a,o,s,c,l)}else l===1&&u===1?kT(e[i],t[o],[...n,c],r):uT(r,[`p`,n,c,l,t.slice(o,s)])}var DT=(e,t,n,r)=>{if(!(e===t||pT(e,t))){if(e.length===t.length&&e.length>1&&!vT(e[0],t[0])&&!vT(e[e.length-1],t[t.length-1])){let i=mT(e,t);if(i!==void 0){uT(r,[`m`,n,i]);return}}ET(e,t,n,r,0,e.length,0,t.length,0)}},OT=(e,t,n,r)=>{let i=Object.keys(e),a=Object.keys(t);if([...i,...a].some(e=>pO.has(e)))pT(e,t)||fT(n,t,r);else{for(let i of a){if(lT.has(r))return;Object.hasOwn(e,i)?kT(e[i],t[i],[...n,i],r):fT([...n,i],t[i],r)}for(let e of i){if(lT.has(r))return;Object.hasOwn(t,e)||uT(r,[`d`,[...n,e]])}}},kT=(e,t,n,r)=>{e===t||lT.has(r)||(typeof e==`string`&&typeof t==`string`&&n.length>0?hT(e,t,n,r):Array.isArray(e)&&Array.isArray(t)?DT(e,t,n,r):dT(e)&&dT(t)&&!Array.isArray(e)&&!Array.isArray(t)?OT(e,t,n,r):fT(n,t,r))},AT=e=>{if(e===null)return 4;if(typeof e==`string`)return e.length+2;if(typeof e==`number`)return String(e).length;if(typeof e==`boolean`)return e?4:5;if(Array.isArray(e)){let t=2;for(let n=0;n<e.length;n++)t+=AT(e[n])+(n===0?0:1);return t}let t=2,n=0;for(let r of Object.keys(e))t+=r.length+3+AT(e[r])+(n++===0?0:1);return t},jT=e=>{let t=2;for(let n=0;n<e.length;n++){let r=e[n];t+=(typeof r==`string`?r.length+2:String(r).length)+(n===0?0:1)}return t},MT=e=>{switch(e[0]){case`r`:return 6+AT(e[1]);case`s`:return 7+jT(e[1])+AT(e[2]);case`d`:return 6+jT(e[1]);case`a`:return 7+jT(e[1])+e[2].length+2;case`t`:return 7+jT(e[1])+String(e[2]).length;case`p`:return 10+jT(e[1])+String(e[2]).length+String(e[3]).length+AT(e[4]);case`m`:return 7+jT(e[1])+AT(e[2])}};function NT(e,t){let n=[];if(kT(e,t,[],n),lT.has(n))return[[`r`,t]];if(n.length===0||n[0]?.[0]===`r`)return n;let r=2;for(let e of n)r+=MT(e)+1;if(r<65536)return n;let i=AT(t)+6;return r>=i?[[`r`,t]]:n}var PT={value:void 0,writable:!0,enumerable:!0,configurable:!0};function FT(e,t){return IT(e,void 0,t?.omitUndefinedProperties===!0)}function IT(e,t,n){if(e===null||typeof e==`string`||typeof e==`boolean`)return e;if(typeof e==`number`){if(Number.isFinite(e))return e;throw TypeError(`Value contains a non-finite number and is not strict JSON`)}if(typeof e!=`object`)throw TypeError(`Value contains a non-JSON ${typeof e}; expected strict JSON`);let r=t??new Set;if(r.has(e))throw TypeError(`Value contains cycles and is not strict JSON`);r.add(e);try{if(Array.isArray(e)){if(Object.getPrototypeOf(e)!==Array.prototype||Reflect.ownKeys(e).length!==e.length+1)throw TypeError(`Value must contain strict JSON dense plain arrays`);let t=Array(e.length);for(let i=0;i<e.length;i++){let a=Object.getOwnPropertyDescriptor(e,i);if(a===void 0||!a.enumerable||!(`value`in a))throw TypeError(`Value must contain strict JSON enumerable indexed data properties`);LT(t,String(i),IT(a.value,r,n))}return t}let t=Object.getPrototypeOf(e);if(t!==Object.prototype&&t!==null)throw TypeError(`Value must contain strict JSON plain objects or arrays`);let i=Object.create(t);for(let t of Reflect.ownKeys(e)){if(typeof t==`symbol`)throw TypeError(`Value contains a symbol key and is not strict JSON`);let a=Object.getOwnPropertyDescriptor(e,t);if(!a.enumerable||!(`value`in a))throw TypeError(`Value must contain strict JSON enumerable data properties`);a.value===void 0&&n||LT(i,t,IT(a.value,r,n))}return i}finally{r.delete(e)}}function LT(e,t,n){PT.value=n,Object.defineProperty(e,t,PT),PT.value=void 0}var RT={value:void 0,writable:!0,enumerable:!0,configurable:!0};function zT(e,t){let n=e,r=new WeakSet;for(let e of t){if(e[0]===`r`){n=e[1];continue}if(e[0]===`p`||e[0]===`m`){let t=BT(n,e[1],e[1].length,r);if(n=t.root,!Array.isArray(t.target))throw TypeError(`Trusted array operation target is not an array`);e[0]===`p`?WT(t.target,e[2],e[3],e[4]):GT(t.target,e[2]);continue}let t=e[1],i=BT(n,t,t.length-1,r);n=i.root;let a=t[t.length-1];switch(e[0]){case`s`:UT(i.target,a,e[2]);break;case`d`:if(Array.isArray(i.target)){if(typeof a!=`number`)throw TypeError(`Trusted array deletion key is not numeric`);WT(i.target,a,1,[])}else Reflect.deleteProperty(i.target,a);break;case`a`:{let t=HT(i.target,a);if(typeof t!=`string`)throw TypeError(`Trusted append target is not a string`);UT(i.target,a,`${t}${e[2]}`);break}case`t`:{let t=HT(i.target,a);if(typeof t!=`string`)throw TypeError(`Trusted truncate target is not a string`);UT(i.target,a,t.slice(e[2]));break}}}return n}function BT(e,t,n,r){if(!KT(e))throw TypeError(`Trusted operation root is not a container`);let i=e;r.has(e)||(i=VT(e),r.add(i));let a=i;for(let e=0;e<n;e++){let n=t[e],i=HT(a,n);if(!KT(i))throw TypeError(`Trusted operation path is not a container`);if(r.has(i)){a=i;continue}let o=VT(i);UT(a,n,o),r.add(o),a=o}return{root:i,target:a}}function VT(e){if(Array.isArray(e))return Array.from(e);let t=Object.create(Object.getPrototypeOf(e)===null?null:Object.prototype);for(let n of Object.keys(e))UT(t,n,e[n]);return t}function HT(e,t){return e[t]}function UT(e,t,n){RT.value=n,Object.defineProperty(e,t,RT),RT.value=void 0}function WT(e,t,n,r){let i=e.length,a=r.length-n;a>0?(e.length=i+a,e.copyWithin(t+r.length,t+n,i)):a<0&&(e.copyWithin(t+r.length,t+n,i),e.length=i+a);for(let n=0;n<r.length;n++)UT(e,t+n,r[n])}function GT(e,t){if(e.length!==t.length)throw TypeError(`Trusted permutation length mismatch`);let n=e.slice();for(let r=0;r<t.length;r++)e[r]=n[t[r]]}function KT(e){return typeof e==`object`&&!!e}var qT=Symbol(`chord.delta.overlay.node`),JT=new WeakMap,YT={},XT=new Set([`push`,`pop`,`shift`,`unshift`,`splice`,`reverse`,`sort`,`fill`,`copyWithin`]),ZT=4096,QT=128,$T={value:void 0,writable:!0,enumerable:!0,configurable:!0},eE=class{#e;value;base;ops;constructor(e,t,n){this.#e=e,this.value=t,this.base=e.baseValue,this.ops=n,JT.set(this,e)}get baseRevision(){return this.#e.baseRevision}abort(){sO(this.#e)}},tE=class{#e;#t;#n=!1;constructor(e){this.#e=e}get state(){let e=this.#e?.root?.proxy;if(e===void 0)throw TypeError(`Cannot use a settled overlay`);return e}prepare(){if(this.#n)throw Error(`Change has already been settled`);let e=this.#e;yE(e),e.status.value=`prepared`;try{e.replacement||(e.ops=e.dirty.length===0?[]:MD(e));let t=iE(e);return this.#t=e.status,this.#n=!0,t}catch(t){throw e.status.value=`aborted`,lO(e),this.#n=!0,t}finally{this.#e=void 0}}abort(){this.#n?(this.#t?.value===`prepared`&&(this.#t.value=`aborted`),this.#t=void 0):(this.#n=!0,sO(this.#e),this.#e=void 0)}},nE=class{#e={};#t=new Set;#n;#r;#i=0;#a=256;constructor(e){this.#r=e,this.#n=new WeakRef(this)}get value(){return this.#r}get revision(){return this.#i}beginChange(){let e=oE(this.#n,this.#e,this.#i,this.#r,!1,this.#r);return this.#o(e),new tE(e)}prepareReplace(e){let t=oE(this.#n,this.#e,this.#i,e,!0,this.#r);t.status.value=`prepared`,this.#o(t);try{return iE(t)}catch(e){throw t.status.value=`aborted`,lO(t),e}}adopt(e){let t=JT.get(e);if(t?.owner!==this.#e)throw Error(`Prepared change belongs to a different tracker`);if(t.status.value===`consumed`)throw Error(`Prepared change has already been used`);if(t.status.value===`aborted`)throw Error(`Prepared change has been aborted`);if(t.status.value===`stale`)throw Error(`Prepared change is stale`);if(t.status.value!==`prepared`)throw Error(`Prepared change is not ready`);if(t.baseRevision!==this.#i)throw t.status.value=`stale`,lO(t),Error(`Prepared change is stale`);if(this.#r!==e.base)throw t.status.value=`stale`,Error(`Prepared change is stale`);this.#r=e.value,t.status.value=`consumed`,this.#i+=1,this.#c(t)}releaseContext(e){e.registryRef!==void 0&&this.#t.delete(e.registryRef),e.registryRef=void 0}#o(e){let t=new WeakRef(e);e.registryRef=t,this.#t.add(t),--this.#a,this.#a===0&&(this.#s(),this.#a=Math.max(256,this.#t.size))}#s(){for(let e of this.#t)e.deref()===void 0&&this.#t.delete(e)}#c(e){for(let t of this.#t){let n=t.deref();n!==void 0&&n!==e&&((n.status.value===`open`||n.status.value===`prepared`)&&(n.status.value=`stale`),cO(n))}this.#t.clear(),this.#a=256}replacementBase(e){return e.baseRevision===this.#i?this.#r:void 0}};function rE(e){return new nE(e)}function iE(e){let t=aO(e),n=e.baseValue,r=new eE(e,t.length===0?n:e.simpleObjectMaterialization?DD(e.root):aE(n,t),t);return e.nodes.length>4096?cO(e):lO(e),r}function aE(e,t){for(let n of t)if(n[0]===`p`||n[0]===`m`)return CO(e,t);return zT(e,t)}function oE(e,t,n,r,i,a){let o={owner:t,tracker:e,baseRevision:n,status:{value:`open`},root:void 0,bases:[],stored:[],dirty:[],nodes:[],rawNodes:new WeakMap,ops:void 0,replacement:i,replacementNoop:!1,baseValue:a,overlayReleased:!1,simpleObjectMaterialization:!1,registryRef:void 0};return o.root=lE(o,r,void 0),o}var sE={deleteProperty(e,t){return CE(gE(e),t)},defineProperty(e){throw yE(gE(e).context),TypeError(`Defining overlay properties is not supported`)},get(e,t){if(t===`then`){let t=e[qT];if(t===void 0||_E(t.context))return}let n=gE(e);return t===qT?n:bE(n,t)},getOwnPropertyDescriptor(e,t){return EE(gE(e),t)},getPrototypeOf(e){let t=gE(e);return vE(t.context),Object.getPrototypeOf(uE(t))},has(e,t){return wE(gE(e),t)},isExtensible(e){return vE(gE(e).context),!0},ownKeys(e){return TE(gE(e))},preventExtensions(e){throw yE(gE(e).context),TypeError(`Overlays cannot be made non-extensible`)},set(e,t,n){return SE(gE(e),t,n)},setPrototypeOf(e){throw yE(gE(e).context),TypeError(`Changing an overlay prototype is not supported`)}},cE=sE;function lE(e,t,n,r=0,i=``,a=void 0,o=!1){let s=e.rawNodes.get(t);if(s!==void 0)return s;let c=Array.isArray(t)?[]:{},l=e.bases.length,u=n?.baseIndex??-1;e.bases.push(t);let d={context:e,baseIndex:l,parentIndex:u,parentKind:r,parentKey:i,parentPlacement:o,target:c,proxy:c};return a!==void 0&&(d.parentSource=a),c[qT]=d,d.proxy=new Proxy(c,Array.isArray(t)?cE:sE),e.rawNodes.set(t,d),e.nodes.push(d),d}function uE(e){return e.context.bases[e.baseIndex]}function dE(e){return e.parentIndex<0?void 0:e.context.nodes[e.parentIndex]}function fE(e,t){if(!uO(t))return t;let n=e.stored.length;return e.stored.push(t),{index:n}}function pE(e,t){return typeof t==`object`&&t?e.stored[t.index]:t}function mE(e,t,n){return uO(n)?typeof t==`object`&&t?(e.stored[t.index]=n,t):fE(e,n):(typeof t==`object`&&t&&(e.stored[t.index]=YT),n)}function hE(e,t){typeof t==`object`&&t&&(e.stored[t.index]=YT)}function gE(e){let t=e[qT];if(t===void 0)throw TypeError(`Cannot use a settled overlay`);return t}function _E(e){return e.overlayReleased||e.status.value===`consumed`||e.status.value===`aborted`||e.status.value===`stale`}function vE(e){if(_E(e))throw TypeError(`Cannot use a settled overlay`)}function yE(e){if(vE(e),e.status.value!==`open`)throw TypeError(`Prepared overlays are read-only`)}function bE(e,t){if(vE(e.context),Array.isArray(uE(e))){let n=IE(e);if(t===`length`)return $E(n);if(XT.has(t))return gD[t];let r=tD(t);return r===void 0?Reflect.get(Array.prototype,t,e.proxy):xE(e,r)}if(typeof t==`symbol`)return Reflect.get(uE(e),t,e.proxy);let n=String(t);if(!NE(e,n))return AE(e,n)||Object.hasOwn(uE(e),n)?void 0:Reflect.get(uE(e),t,e.proxy);let r=PE(e,n);return uO(r)?lE(e.context,r,e,0,n,void 0,DE(e,n)).proxy:r}function xE(e,t){let n=IE(e);if(t>=$E(n))return;let r=eD(n,t),i=r.start+r.step*n.locatedOffset,a=nD(e,r,i);return uO(a)?lE(e.context,a,e,r.kind===`base`?1:2,i,r.kind===`insert`?r.source:void 0,r.kind===`insert`||rD(n,r,i)).proxy:a}function SE(e,t,n){if(yE(e.context),typeof t==`symbol`)throw TypeError(`Symbol writes are not supported`);if(Array.isArray(uE(e))){if(t===`length`)return dD(e,fD(n)),!0;let r=tD(t);if(r===void 0)throw TypeError(`Only array indices and length can be written`);if(r>$E(IE(e)))throw TypeError(`Overlay arrays cannot contain holes`);return uD(e,r,ED(n)),!0}let r=String(t);if(n===void 0)return CE(e,r);let i=ED(n),a=PE(e,r),o=AE(e,r);return!o&&!uO(i)&&a===i||(OE(e,r,i),o&&Object.hasOwn(uE(e),r)&&(e.readded===void 0&&(e.readded=new Set),e.readded.add(r)),ME(e,r),FE(e)),!0}function CE(e,t){if(yE(e.context),typeof t==`symbol`)throw TypeError(`Symbol writes are not supported`);if(Array.isArray(uE(e)))throw TypeError(`Overlay arrays cannot contain holes`);let n=String(t);return NE(e,n)&&(kE(e,n),e.readded?.delete(n),jE(e,n),FE(e)),!0}function wE(e,t){if(vE(e.context),Array.isArray(uE(e))){if(t===`length`)return!0;let n=tD(t);return n===void 0?t in Array.prototype:n<$E(IE(e))}return typeof t==`symbol`?t in uE(e):NE(e,String(t))}function TE(e){if(vE(e.context),Array.isArray(uE(e))){let t=$E(IE(e)),n=Array(t+1);for(let e=0;e<t;e++)n[e]=String(e);return n[t]=`length`,n}let t=e.deleteKey===void 0&&e.deletes===void 0&&e.readded===void 0&&(e.writeKey===void 0||Object.hasOwn(uE(e),e.writeKey));if(t&&e.writes!==void 0){for(let n of e.writes.keys())if(!Object.hasOwn(uE(e),n)){t=!1;break}}if(t)return Object.keys(uE(e));let n=Object.keys(uE(e)).filter(t=>!AE(e,t)&&!e.readded?.has(t)),r=new Set(n);if(e.writeKey!==void 0&&!r.has(e.writeKey)&&(n.push(e.writeKey),r.add(e.writeKey)),e.writes!==void 0)for(let t of e.writes.keys())r.has(t)||(n.push(t),r.add(t));let i=[],a=[];for(let e of n){let t=tD(e);t===void 0?a.push(e):i.push(t)}return i.sort((e,t)=>e-t),[...i.map(String),...a]}function EE(e,t){if(vE(e.context),Array.isArray(uE(e))){if(t===`length`){let t=$E(IE(e));return e.target.length=t,Reflect.getOwnPropertyDescriptor(e.target,`length`)}let n=tD(t);if(n===void 0||n>=$E(IE(e)))return}else if(typeof t==`symbol`||!NE(e,String(t)))return;return{configurable:!0,enumerable:!0,writable:e.context.status.value===`open`,value:bE(e,t)}}function DE(e,t){return e.writeKey===t||(e.writes?.has(t)??!1)}function OE(e,t,n){if(e.writes!==void 0){let r=e.writes.get(t);e.writes.set(t,r===void 0?fE(e.context,n):mE(e.context,r,n))}else e.writeKey===void 0||e.writeKey===t?(e.writeKey=t,e.writeValue=e.writeValue===void 0?fE(e.context,n):mE(e.context,e.writeValue,n)):(e.writes=new Map,e.writes.set(e.writeKey,e.writeValue),e.writes.set(t,fE(e.context,n)),e.writeKey=void 0,e.writeValue=void 0)}function kE(e,t){if(e.writeKey===t)e.writeKey=void 0,hE(e.context,e.writeValue),e.writeValue=void 0;else{let n=e.writes?.get(t);n!==void 0&&hE(e.context,n),e.writes?.delete(t)}}function AE(e,t){return e.deleteKey===t||(e.deletes?.has(t)??!1)}function jE(e,t){e.deletes===void 0?e.deleteKey===void 0||e.deleteKey===t?e.deleteKey=t:(e.deletes=new Set,e.deletes.add(e.deleteKey),e.deletes.add(t),e.deleteKey=void 0):e.deletes.add(t)}function ME(e,t){e.deleteKey===t?e.deleteKey=void 0:e.deletes?.delete(t)}function NE(e,t){return AE(e,t)?!1:DE(e,t)||Object.hasOwn(uE(e),t)}function PE(e,t){if(e.writeKey===t)return pE(e.context,e.writeValue);let n=e.writes?.get(t);return n===void 0?uE(e)[t]:pE(e.context,n)}function FE(e){if(!e.dirty){e.dirty=!0,e.context.dirty.push(e);for(let t=dE(e);t!==void 0;t=dE(t))t.subtreeDirty=!0}}function IE(e){if(e.array!==void 0)return e.array;let t=uE(e),n={root:void 0,pieces:void 0,baseOverrides:void 0,insertOverrides:void 0,structural:!1,generation:0,plan:void 0,seed:2654435769,locatedOffset:0,baseLocations:void 0,insertLocations:void 0};return t.length>0&&(n.root=HE(n,{kind:`base`,start:0,length:t.length,step:1})),e.array=n,n}function LE(e){return e.baseOverrides===void 0&&(e.baseOverrides=new Map),e.baseOverrides}function RE(e){return e.insertOverrides===void 0&&(e.insertOverrides=new Map),e.insertOverrides}function zE(e){let t=e.seed;return t^=t<<13,t^=t>>>17,t^=t<<5,e.seed=t>>>0,e.seed}function BE(e){return e?.elements??0}function VE(e){e.elements=BE(e.left)+e.piece.length+BE(e.right)}function HE(e,t){return{piece:t,left:void 0,right:void 0,priority:zE(e),elements:t.length}}function UE(e,t){return e===void 0?t:t===void 0?e:e.priority>=t.priority?(e.right=UE(e.right,t),VE(e),e):(t.left=UE(e,t.left),VE(t),t)}function WE(e,t,n){if(t===void 0)return[void 0,void 0];let r=BE(t.left);if(n<r){let[r,i]=WE(e,t.left,n);return t.left=i,VE(t),[r,t]}let i=r+t.piece.length;if(n>i){let[r,a]=WE(e,t.right,n-i);return t.right=r,VE(t),[t,a]}if(n===r){let e=t.left;return t.left=void 0,VE(t),[e,t]}if(n===i){let e=t.right;return t.right=void 0,VE(t),[t,e]}let a=n-r,o={...t.piece,length:a},s={...t.piece,start:t.piece.start+t.piece.step*a,length:t.piece.length-a};return[UE(t.left,HE(e,o)),UE(HE(e,s),t.right)]}function GE(e){for(;e.left!==void 0;)e=e.left;return e}function KE(e){for(;e.right!==void 0;)e=e.right;return e}function qE(e,t){return e.kind!==t.kind||e.kind===`insert`&&e.source!==t.source?!1:e.length===1&&t.length===1?Math.abs(t.start-e.start)===1:e.step===t.step&&e.start+e.step*e.length===t.start}function JE(e,t,n){if(t===void 0)return n;if(n===void 0)return t;let r=KE(t).piece,i=GE(n).piece;if(!qE(r,i))return UE(t,n);let[a]=WE(e,t,BE(t)-r.length),[,o]=WE(e,n,i.length),s=r.length===1?i.start-r.start:r.step;return JE(e,JE(e,a,HE(e,r.kind===`base`?{kind:`base`,start:r.start,length:r.length+i.length,step:s}:{kind:`insert`,source:r.source,start:r.start,length:r.length+i.length,step:s})),o)}function YE(e,t){e!==void 0&&(YE(e.left,t),t.push(e.piece),YE(e.right,t))}function XE(e){return e.pieces===void 0&&(e.pieces=[],YE(e.root,e.pieces)),e.pieces}function ZE(e,t){sD(t);let n;for(let r of t)n=UE(n,HE(e,r));return n}function QE(e,t){e.root=ZE(e,t),e.pieces=void 0,e.baseLocations=void 0,e.insertLocations=void 0}function $E(e){return BE(e.root)}function eD(e,t){let n=e.root;for(;n!==void 0;){let r=BE(n.left);if(t<r)n=n.left;else if(t>=r+n.piece.length)t-=r+n.piece.length,n=n.right;else return e.locatedOffset=t-r,n.piece}throw RangeError(`Array overlay index is out of range`)}function tD(e){if(typeof e!=`string`||e.length===0||e.length>10)return;if(e===`0`)return 0;let t=e.charCodeAt(0);if(t<49||t>57)return;let n=t-48;for(let t=1;t<e.length;t++){let r=e.charCodeAt(t)-48;if(r<0||r>9||(n=n*10+r,n>=4294967295))return}return n}function nD(e,t,n){let r=IE(e);if(t.kind===`base`){let t=r.baseOverrides?.get(n);return t===void 0?uE(e)[n]:pE(e.context,t)}let i=r.insertOverrides?.get(t.source),a=i?.has(n)?i.get(n):t.source.refs[n];return pE(e.context,a)}function rD(e,t,n){return t.kind===`base`?e.baseOverrides?.has(n)??!1:e.insertOverrides?.get(t.source)?.has(n)??!1}function iD(e,t){e.right===void 0?e.piece.length+=t:iD(e.right,t),VE(e)}function aD(e){e.pieces=void 0,e.baseLocations=void 0,e.insertLocations=void 0,e.plan=void 0}function oD(e,t,n,r){if(n===0&&r.length===0)return;let i=IE(e);if(n===0&&t===$E(i)&&r.length===1&&i.root!==void 0){let t=r[0],n=KE(i.root).piece;if(t.kind===`insert`&&n.kind===`insert`&&n.step===1&&n.start+n.length===n.source.refs.length){for(let e=0;e<t.length;e++)n.source.refs.push(t.source.refs[t.start+e]);iD(i.root,t.length),aD(i),i.structural=!0,i.generation+=1,FE(e);return}}let[a,o]=WE(i,i.root,t),[,s]=WE(i,o,n);i.root=JE(i,JE(i,a,ZE(i,r)),s),aD(i),i.structural=!0,i.generation+=1,FE(e)}function sD(e){for(let t=1;t<e.length;){let n=e[t-1],r=e[t],i=n.kind===r.kind&&(n.kind===`base`||n.source===r.source);i&&n.length===1&&r.length===1&&Math.abs(r.start-n.start)===1?(n.step=r.start-n.start,n.length=2,e.splice(t,1)):i&&n.step===r.step&&n.start+n.step*n.length===r.start?(n.length+=r.length,e.splice(t,1)):t+=1}}function cD(e,t,n=0){if(t.length===n)return[];let r=[];for(let i=n;i<t.length;i++)r.push(fE(e.context,t[i]));return[{kind:`insert`,source:{refs:r},start:0,length:r.length,step:1}]}function lD(e,t,n=0){if(t.length===n)return[];let r=e.context.stored.length;try{for(let r=n;r<t.length;r++)t[r]=fE(e.context,ED(t[r]))}catch(t){throw e.context.stored.length=r,t}return[{kind:`insert`,source:{refs:t},start:n,length:t.length-n,step:1}]}function uD(e,t,n){let r=IE(e),i=$E(r);if(t===i){oD(e,i,0,cD(e,[n]));return}let a=eD(r,t),o=a.start+a.step*r.locatedOffset,s=nD(e,a,o);if(uO(n)||s!==n){if(a.kind===`base`){let t=r.baseOverrides?.get(o);!uO(n)&&n===uE(e)[o]?(t!==void 0&&hE(e.context,t),r.baseOverrides?.delete(o)):t===void 0?LE(r).set(o,fE(e.context,n)):r.baseOverrides.set(o,mE(e.context,t,n))}else{let t=r.insertOverrides?.get(a.source),i=t?.get(o);!uO(n)&&n===pE(e.context,a.source.refs[o])?(i!==void 0&&hE(e.context,i),t?.delete(o),t?.size===0&&r.insertOverrides?.delete(a.source)):(t===void 0&&(t=new Map,RE(r).set(a.source,t)),i===void 0?t.set(o,fE(e.context,n)):t.set(o,mE(e.context,i,n)))}FE(e)}}function dD(e,t){let n=$E(IE(e));t!==n&&(t<n?oD(e,t,n-t,[]):oD(e,n,0,cD(e,Array.from({length:t-n},()=>null))))}function fD(e){let t=Number(e);if(!Number.isInteger(t)||t<0||t>=4294967296)throw RangeError(`Invalid array length`);return t}function pD(e){let t=Number(e);return Number.isNaN(t)||t===0?0:Number.isFinite(t)?Math.trunc(t):t}function mD(e,t){return e===-1/0?0:e<0?Math.max(t+e,0):Math.min(e,t)}function hD(e){if(!uO(e))return;let t=Reflect.get(e,qT);if(t!==void 0){if(!Array.isArray(uE(t)))throw TypeError(`Array mutator called on incompatible receiver`);return yE(t.context),t}}var gD={push(...e){let t=hD(this);if(t===void 0)return Reflect.apply(Array.prototype.push,this,e);let n=$E(IE(t));return oD(t,n,0,lD(t,e)),n+e.length},pop(){let e=hD(this);if(e===void 0)return Reflect.apply(Array.prototype.pop,this,[]);let t=$E(IE(e));if(t===0)return;let n=xE(e,t-1);return oD(e,t-1,1,[]),n},shift(){let e=hD(this);if(e===void 0)return Reflect.apply(Array.prototype.shift,this,[]);if($E(IE(e))===0)return;let t=xE(e,0);return oD(e,0,1,[]),t},unshift(...e){let t=hD(this);return t===void 0?Reflect.apply(Array.prototype.unshift,this,e):(oD(t,0,0,lD(t,e)),$E(IE(t)))},splice(...e){let t=hD(this);if(t===void 0)return Reflect.apply(Array.prototype.splice,this,e);let n=$E(IE(t)),r=e.length===0?0:mD(pD(e[0]),n),i=e.length===0?0:e.length===1?n-r:Math.min(Math.max(pD(e[1]),0),n-r),a=Array.from({length:i},(e,n)=>xE(t,r+n)),o=Math.min(2,e.length),s=Math.max(e.length-2,0);return oD(t,r,i,lD(t,e,o)),dD(t,n-i+s),a},reverse(){let e=hD(this);if(e===void 0)return Reflect.apply(Array.prototype.reverse,this,[]);let t=IE(e);if($E(t)<2)return e.proxy;let n=[...XE(t)].reverse();for(let e of n)e.start+=e.step*(e.length-1),e.step=e.step===1?-1:1;return QE(t,n),t.structural=!0,t.generation+=1,t.plan=void 0,FE(e),e.proxy},sort(e){let t=hD(this);if(t===void 0)return Reflect.apply(Array.prototype.sort,this,[e]);if(e!==void 0&&typeof e!=`function`)throw TypeError(`Comparator must be a function`);let n=IE(t),r=[],i=[],a=[],o=Array(uE(t).length),s=[];for(let e of XE(n))for(let n=0;n<e.length;n++){let c=e.start+e.step*n;if(e.kind===`base`)s.push(c),o[c]=yD(t,c,r,i);else{r.push(e.source),i.push(c);let n=-r.length;s.push(n),a.push(yD(t,n,r,i))}}let c=new Map;for(let[e,r]of n.baseOverrides??[])c.set(e,pE(t.context,r));let l=new Map;for(let[e,r]of n.insertOverrides??[]){let n=new Map;for(let[e,i]of r)n.set(e,pE(t.context,i));l.set(e,n)}let u=n.generation;if(s.sort((t,n)=>{let r=t<0?a[-t-1]:o[t],i=n<0?a[-n-1]:o[n];if(typeof e==`function`)return Number(e(r,i));let s=String(r),c=String(i);return s<c?-1:+(s>c)}),c.size>0||l.size>0||(n.baseOverrides?.size??0)>0||(n.insertOverrides?.size??0)>0)for(let e of s)bD(t,e,r,i,c,l);let d=n.generation!==u,f=$E(n);return f>=s.length&&s.every((e,t)=>xD(n,t,e,r,i))||oD(t,0,Math.min(s.length,f),CD(s,r,i)),d&&SD(t),t.proxy},fill(e,t,n){let r=hD(this);if(r===void 0)return Reflect.apply(Array.prototype.fill,this,[e,t,n]);let i=$E(IE(r)),a=t===void 0?0:mD(pD(t),i),o=n===void 0?i:mD(pD(n),i);if(o<=a)return r.proxy;let s=Array.from({length:o-a},()=>ED(e));return oD(r,a,o-a,cD(r,s)),r.proxy},copyWithin(e,t,n){let r=hD(this);if(r===void 0)return Reflect.apply(Array.prototype.copyWithin,this,[e,t,n]);let i=$E(IE(r)),a=mD(pD(e),i),o=mD(pD(t),i),s=n===void 0?i:mD(pD(n),i),c=Math.min(Math.max(s-o,0),i-a);return oD(r,a,c,cD(r,Array.from({length:c},(e,t)=>ED(xE(r,o+t))))),r.proxy}};function _D(e,t){return e<0?t[-e-1]:void 0}function vD(e,t){return e<0?t[-e-1]:e}function yD(e,t,n,r){let i=IE(e),a=_D(t,n),o=vD(t,r),s=a===void 0?i.baseOverrides?.get(o):i.insertOverrides?.get(a)?.get(o),c=s===void 0?a===void 0?uE(e)[o]:pE(e.context,a.refs[o]):pE(e.context,s);return uO(c)?lE(e.context,c,e,a===void 0?1:2,o,a,a!==void 0||(i.baseOverrides?.has(o)??!1)).proxy:c}function bD(e,t,n,r,i,a){let o=IE(e),s=_D(t,n),c=vD(t,r);if(s===void 0){let t=o.baseOverrides?.get(c),n=i.get(c);n===void 0?(t!==void 0&&hE(e.context,t),o.baseOverrides?.delete(c)):t===void 0?LE(o).set(c,fE(e.context,n)):o.baseOverrides.set(c,mE(e.context,t,n));return}let l=o.insertOverrides?.get(s),u=l?.get(c),d=a.get(s)?.get(c);d===void 0?(u!==void 0&&hE(e.context,u),l?.delete(c),l?.size===0&&o.insertOverrides?.delete(s)):(l===void 0&&(l=new Map,RE(o).set(s,l)),u===void 0?l.set(c,fE(e.context,d)):l.set(c,mE(e.context,u,d)))}function xD(e,t,n,r,i){let a=eD(e,t),o=a.start+a.step*e.locatedOffset,s=_D(n,r);return o===vD(n,i)&&(a.kind===`base`&&s===void 0||a.kind===`insert`&&a.source===s)}function SD(e){let t=IE(e),n=new Set,r=new Map,i=[],a=!1;for(let o of XE(t))for(let t=0;t<o.length;t++){let s=o.start+o.step*t,c;if(o.kind===`base`)c=n.has(s),n.add(s);else{let e=r.get(o.source);e===void 0&&(e=new Set,r.set(o.source,e)),c=e.has(s),e.add(s)}c?(a=!0,wD(i,cD(e,[AD(nD(e,o,s),e.context)])[0])):wD(i,TD(o,s))}a&&(QE(t,i),t.structural=!0,t.generation+=1,t.plan=void 0,FE(e))}function CD(e,t,n){let r=[];for(let i of e){let e=i<0?t[-i-1]:void 0,a=i<0?n[-i-1]:i,o=r.at(-1),s=o!==void 0&&(e===void 0&&o.kind===`base`||e!==void 0&&o.kind===`insert`&&o.source===e);if(o!==void 0&&s){if(o.length===1){let e=a-o.start;if(e===1||e===-1){o.step=e,o.length=2;continue}}else if(o.start+o.step*o.length===a){o.length+=1;continue}}r.push(e===void 0?{kind:`base`,start:a,length:1,step:1}:{kind:`insert`,source:e,start:a,length:1,step:1})}return r}function wD(e,t){let n=e.at(-1),r=n!==void 0&&n.kind===t.kind&&(n.kind===`base`||n.source===t.source);if(n!==void 0&&r&&n.length===1&&t.length===1){let e=t.start-n.start;if(e===1||e===-1){n.step=e,n.length=2;return}}n!==void 0&&r&&n.step===t.step&&n.start+n.step*n.length===t.start?n.length+=t.length:e.push(t)}function TD(e,t){return e.kind===`base`?{kind:`base`,start:t,length:1,step:1}:{kind:`insert`,source:e.source,start:t,length:1,step:1}}function ED(e){let t=uO(e)?Reflect.get(e,qT):void 0;return t===void 0?FT(e):kD(t)}function DD(e){if(vE(e.context),Array.isArray(uE(e))){let t=IE(e),n=[];for(let r of XE(t))for(let t=0;t<r.length;t++){let i=r.start+r.step*t;n.push(OD(nD(e,r,i),e.context))}return n}let t=Object.create(Object.getPrototypeOf(uE(e)));for(let n of TE(e))jD(t,n,OD(PE(e,n),e.context));return t}function OD(e,t){if(!uO(e))return e;let n=t.rawNodes.get(e);return n===void 0||!n.dirty&&!n.subtreeDirty?e:DD(n)}function kD(e){if(vE(e.context),Array.isArray(uE(e))){let t=IE(e),n=[];for(let r of XE(t))for(let t=0;t<r.length;t++){let i=r.start+r.step*t;n.push(AD(nD(e,r,i),e.context))}return n}let t=Object.create(Object.getPrototypeOf(uE(e)));for(let n of TE(e))jD(t,n,AD(PE(e,n),e.context));return t}function AD(e,t){if(!uO(e))return FT(e);let n=t.rawNodes.get(e);return n===void 0?FT(e):kD(n)}function jD(e,t,n){$T.value=n,Object.defineProperty(e,t,$T),$T.value=void 0}function MD(e){let t=ND(e);if(t!==void 0)return t;let n=[],r=new Map,i=new Map,a=new Map;for(let t of e.dirty)if(zD(t,a),Array.isArray(uE(t))){let e=IE(t);if(!e.structural&&(e.baseOverrides?.size??0)>0){let n=a.get(t);n===void 0&&(n={indices:[],bits:void 0,length:uE(t).length},a.set(t,n));for(let t of e.baseOverrides.keys())RD(n,t)}}let o=new Map;for(let[e,t]of a){let n=nO(e);if(n===void 0||n.some(e=>typeof e==`string`&&pO.has(e)))continue;let r=BD(t);r.length>0&&o.set(e,r)}for(let t of e.dirty){let e=nO(t);if(e===void 0||LD(t,e,o))continue;i.set(t,e),!Array.isArray(uE(t))&&HD(t)&&r.set(t,e);let n=e.findIndex(e=>typeof e==`string`&&pO.has(e));if(n>=0){let i=t;for(let t=e.length;t>n;t--)i=dE(i);r.set(i,e.slice(0,n))}}for(let[e,t]of r)i.set(e,t);for(let e of o.keys()){let t=nO(e);t!==void 0&&!LD(e,t,o)&&i.set(e,t)}let s=0;for(let e of i.values())s=Math.max(s,e.length);let c=Array.from({length:s+1},()=>[]);for(let[e,t]of i)c[t.length].push(e);let l=new Set;for(let t of c)for(let a of t){let t=i.get(a);if(!(WD(a)||UD(a,l))){if(r.has(a))tO(n,t,DD(a)),l.add(a);else if(Array.isArray(uE(a))?QD(a,t,n,o.get(a)):KD(a,t,n),n.length>ZT)return PD=void 0,[[`r`,DD(e.root)]]}}return PD=void 0,n}function ND(e){let t=[];for(let n of e.dirty){if(Array.isArray(uE(n))||HD(n)||WD(n))return;for(let e=dE(n);e!==void 0;e=dE(e))if(Array.isArray(uE(e)))return;let e=nO(n);if(e!==void 0){for(let t of e)if(typeof t==`string`&&pO.has(t))return;if(t.push(n),t.length>QT)return}}for(let e=1;e<t.length;e++){let n=t[e],r=n.preparedPath.length,i=e;for(;i>0&&t[i-1].preparedPath.length>r;)t[i]=t[i-1],--i;t[i]=n}let n=[],r=!0;for(let i of t)if(KD(i,i.preparedPath,n)&&(r=!1),n.length>ZT)return[[`r`,DD(e.root)]];return e.simpleObjectMaterialization=r,n}var PD,FD=0;function ID(e){let t=e;for(let e=dE(t);e!==void 0;e=dE(t)){if(Array.isArray(uE(e))){let n=IE(e);if(t.parentKind!==1||n.structural)return!1;let r=t.parentKey,i=n.baseOverrides?.get(r);return(i===void 0?uE(e)[r]:pE(e.context,i))===uE(t)&&(PD=e,FD=r,!0)}t=e}return!1}function LD(e,t,n){for(let r=dE(e);r!==void 0;r=dE(r)){let e=n.get(r);if(e===void 0)continue;let i=nO(r);if(i===void 0||t.length<=i.length)continue;let a=!0;for(let e=0;e<i.length;e++)if(t[e]!==i[e]){a=!1;break}if(!a)continue;let o=t[i.length];if(typeof o==`number`&&VD(e,o))return!0}return!1}function RD(e,t){if(e.bits!==void 0)e.bits[t]=1;else if(e.indices.push(t),!(e.indices.length<256)){e.bits=new Uint8Array(e.length);for(let t of e.indices)e.bits[t]=1;e.indices.length=0}}function zD(e,t){if(!ID(e))return;let n=t.get(PD);n===void 0&&(n={indices:[],bits:void 0,length:uE(PD).length},t.set(PD,n)),RD(n,FD)}function BD(e){if(e.bits===void 0)return[];let t=[],n=e.bits;for(let e=0;e<n.length;){for(;e<n.length&&n[e]===0;)e+=1;if(e===n.length)break;let r=e,i=e,a=0,o=0;for(;e<n.length;){if(n[e]!==0)a+=1,i=e,o=0;else if(++o>1)break;e+=1}let s=i-r+1;a>=256&&a*2>=s&&t.push({start:r,length:s})}return t}function VD(e,t){for(let n of e)if(t>=n.start&&t<n.start+n.length)return!0;return!1}function HD(e){if(e.writeKey!==void 0&&pO.has(e.writeKey)||e.deleteKey!==void 0&&pO.has(e.deleteKey))return!0;if(e.writes!==void 0){for(let t of e.writes.keys())if(pO.has(t))return!0}if(e.deletes!==void 0){for(let t of e.deletes)if(pO.has(t))return!0}return!1}function UD(e,t){for(let n=dE(e);n!==void 0;n=dE(n))if(t.has(n))return!0;return!1}function WD(e){for(let t=e;t!==void 0;t=dE(t))if(dE(t)!==void 0&&t.parentPlacement)return!0;return!1}function GD(e,t,n,r,i){let a=[...t,r],o=e.readded?.has(r)||!Object.hasOwn(uE(e),r)?void 0:uE(e)[r],s=OD(i,e.context),c=eO(n,a,o,s);return uO(o)&&uO(s)&&!c}function KD(e,t,n){if(e.readded!==void 0)for(let r of e.readded)Object.hasOwn(uE(e),r)&&n.push([`d`,[...t,r]]);let r=!1;if(e.writeKey!==void 0&&(r=GD(e,t,n,e.writeKey,PE(e,e.writeKey))),e.writes!==void 0)for(let[i,a]of e.writes){if(n.length>ZT)return r;GD(e,t,n,i,pE(e.context,a))&&(r=!0)}if(e.deleteKey!==void 0&&Object.hasOwn(uE(e),e.deleteKey)&&n.push([`d`,[...t,e.deleteKey]]),e.deletes!==void 0)for(let i of e.deletes){if(n.length>ZT)return r;Object.hasOwn(uE(e),i)&&n.push([`d`,[...t,i]])}return r}function qD(e){let t=IE(e);if(t.plan!==void 0)return t.plan;let n=uE(e),r=XE(t);return t.plan=JD(n.length,r)??YD(n.length,r),t.plan}function JD(e,t){let n=[];for(let e of t)if(e.kind===`base`&&e.length!==0){if(e.step!==1&&e.length>1||n.length>0&&e.start<=n[n.length-1])return;n.push(e.start,e.start+e.length-1)}let r=[],i=e;for(let e=n.length-2;e>=-2;e-=2){let t=e>=0?n[e+1]+1:0;i>t&&r.push(t,i-t),e>=0&&(i=n[e])}return{removeRuns:r,permutation:void 0,insertRuns:XD(t)}}function YD(e,t){let n=new Uint8Array(e),r=[];for(let e of t)if(e.kind===`base`)for(let t=0;t<e.length;t++){let i=e.start+e.step*t;n[i]=1,r.push(i)}let i=[];for(let t=e;t>0;){if(n[t-1]!==0){--t;continue}let e=t-1;for(;e>0&&n[e-1]===0;)--e;i.push(e,t-e),t=e}let a=[];for(let e=0;e<n.length;e++)n[e]!==0&&a.push(e);let o;if(r.some((e,t)=>e!==a[t])){let e=new Map(a.map((e,t)=>[e,t]));o=r.map(t=>e.get(t))}return{removeRuns:i,permutation:o,insertRuns:XD(t)}}function XD(e){let t=[],n=0;for(let r=0;r<e.length;){let i=e[r];if(i.kind===`base`){n+=i.length,r+=1;continue}let a=r;for(;r<e.length&&e[r].kind===`insert`;)n+=e[r].length,r+=1;t.push(n-ZD(e,a,r),a,r)}return t}function ZD(e,t,n){let r=0;for(let i=t;i<n;i++)r+=e[i].length;return r}function QD(e,t,n,r){let i=IE(e),a=uE(e);if(r!==void 0)for(let i of r){if(n.length>ZT)return;n.push([`p`,t,i.start,i.length,$D(e,i)])}if(i.structural){let r=qD(e);for(let e=0;e<r.removeRuns.length;e+=2){if(n.length>ZT)return;n.push([`p`,t,r.removeRuns[e],r.removeRuns[e+1],[]])}r.permutation!==void 0&&n.push([`m`,t,r.permutation]);let a=XE(i);for(let i=0;i<r.insertRuns.length;i+=3){if(n.length>ZT)return;let o=r.insertRuns[i],s=[];for(let t=r.insertRuns[i+1];t<r.insertRuns[i+2];t++){let n=a[t];for(let t=0;t<n.length;t++){let r=n.start+n.step*t;s.push(OD(nD(e,n,r),e.context))}}n.push([`p`,t,o,0,s])}}for(let[o,s]of i.baseOverrides??[]){if(n.length>ZT)return;let c=iO(i,1,o,void 0);c===void 0||r!==void 0&&VD(r,c)||eO(n,[...t,c],a[o],OD(pE(e.context,s),e.context))}}function $D(e,t){let n=IE(e),r=[];for(let i=t.start;i<t.start+t.length;i++){let t=eD(n,i),a=t.start+t.step*n.locatedOffset;r.push(OD(nD(e,t,a),e.context))}return r}function eO(e,t,n,r){if(!uO(r)&&n===r||uO(n)&&uO(r)&&oO(n,r))return!1;if(typeof n==`string`&&typeof r==`string`){if(r.length>n.length&&r.slice(0,n.length)===n)return e.push([`a`,t,r.slice(n.length)]),!0;let i=fO(n,r,65536);if(i>0)return e.push([`t`,t,n.length-i]),r.length>i&&e.push([`a`,t,r.slice(i)]),!0}return e.push([`s`,t,r]),!0}function tO(e,t,n){t.length===0?e.push([`r`,n]):e.push([`s`,t,n])}function nO(e){if(e.preparedPath!==void 0)return e.preparedPath;let t=dE(e);if(t===void 0)return e.preparedPath=[],e.preparedPath;let n=nO(t);if(n===void 0)return;if(e.parentKind===0){let r=e.parentKey;return!NE(t,r)||PE(t,r)!==uE(e)?void 0:(e.preparedPath=[...n,r],e.preparedPath)}let r=IE(t),i=iO(r,e.parentKind,e.parentKey,e.parentSource);if(i!==void 0&&nD(t,eD(r,i),e.parentKey)===uE(e))return e.preparedPath=[...n,i],e.preparedPath}function rO(e){if(e.baseLocations!==void 0)return;e.baseLocations=[],e.insertLocations=new Map;let t=0;for(let n of XE(e)){let r=n.start+n.step*(n.length-1),i={piece:n,logicalStart:t,minimum:Math.min(n.start,r),maximum:Math.max(n.start,r)};if(n.kind===`base`)e.baseLocations.push(i);else{let t=e.insertLocations.get(n.source);t===void 0&&(t=[],e.insertLocations.set(n.source,t)),t.push(i)}t+=n.length}let n=(e,t)=>e.minimum-t.minimum;e.baseLocations.sort(n);for(let t of e.insertLocations.values())t.sort(n)}function iO(e,t,n,r){if(t===1&&!e.structural)return n;rO(e);let i=t===1?e.baseLocations:e.insertLocations.get(r);if(i===void 0)return;let a=0,o=i.length;for(;a<o;){let e=a+o>>>1;i[e].minimum<=n?a=e+1:o=e}let s=i[a-1];if(s===void 0||n>s.maximum)return;let c=(n-s.piece.start)/s.piece.step;return c>=0&&c<s.piece.length?s.logicalStart+c:void 0}function aO(e){if(e.ops!==void 0)return e.ops;if(vE(e),e.replacement){let t=e.tracker.deref()?.replacementBase(e);e.replacementNoop=t!==void 0&&oO(t,uE(e.root)),e.ops=e.replacementNoop?[]:[[`r`,uE(e.root)]]}else e.ops=MD(e);return e.ops}function oO(e,t){if(e===t)return!0;if(!uO(e)||!uO(t)||Array.isArray(e)!==Array.isArray(t))return!1;if(Array.isArray(e)){let n=t;if(e.length!==n.length)return!1;for(let t=0;t<e.length;t++)if(!oO(e[t],n[t]))return!1;return!0}let n=t,r=Object.keys(e);if(r.length!==Object.keys(n).length)return!1;for(let t of r)if(!Object.hasOwn(n,t)||!oO(e[t],n[t]))return!1;return!0}function sO(e){e.status.value!==`aborted`&&e.status.value!==`consumed`&&e.status.value!==`stale`&&(e.status.value=`aborted`,lO(e))}function cO(e){e.tracker.deref()?.releaseContext(e),PD?.context===e&&(PD=void 0),e.overlayReleased=!0,e.dirty.length=0,e.nodes.length=0,e.rawNodes=void 0,e.ops=void 0,e.root=void 0,e.bases=void 0,e.stored=void 0,e.baseValue=void 0}function lO(e){e.tracker.deref()?.releaseContext(e),PD?.context===e&&(PD=void 0);for(let t of e.nodes)Array.isArray(t.target)&&(t.target.length=0),Reflect.deleteProperty(t.target,qT),t.writes?.clear(),t.deletes?.clear(),t.readded?.clear(),t.array?.pieces!==void 0&&(t.array.pieces.length=0),t.array!==void 0&&(t.array.root=void 0,t.array.baseLocations=void 0,t.array.insertLocations=void 0),t.array?.baseOverrides?.clear(),t.array?.insertOverrides?.clear(),t.parentSource=void 0,t.target=YT,t.proxy=YT,t.writeKey=void 0,t.writeValue=void 0,t.writes=void 0,t.deleteKey=void 0,t.deletes=void 0,t.readded=void 0,t.array=void 0,t.subtreeDirty=void 0,t.preparedPath=void 0;e.dirty.length=0,e.nodes.length=0,e.rawNodes=void 0,e.ops=void 0,e.root=void 0,e.bases=void 0,e.stored=void 0,e.baseValue=void 0,e.overlayReleased=!0}function uO(e){return typeof e==`object`&&!!e}var dO=e=>typeof e==`object`&&!!e;function fO(e,t,n,r=64,i=8){if(e.length===0||t.length===0||n===0)return 0;let a=e.length>n?e.slice(e.length-n):e;for(let e of[Math.min(r,t.length),1]){let n=t.slice(0,e),r=0;for(let e=a.indexOf(n);e!==-1&&!(++r>i);e=a.indexOf(n,e+1)){let n=a.length-e;if(n<=t.length&&a.slice(e)===t.slice(0,n))return n}if(e===1)break}return 0}var pO=new Set([`__proto__`,`constructor`,`prototype`]),mO=class extends Error{segment;constructor(e){super(`unsafe path segment: ${String(e)}`),this.segment=e,this.name=`UnsafePathError`}};function hO(e){if(!Array.isArray(e)||e.length===0)throw TypeError(`op is not a tuple`);switch(e[0]){case`r`:if(e.length!==2)throw TypeError(`r arity`);return;case`s`:if(e.length!==3)throw TypeError(`s arity`);gO(e[1],!0);return;case`d`:if(e.length!==2)throw TypeError(`d arity`);gO(e[1],!0);return;case`a`:if(e.length!==3||typeof e[2]!=`string`)throw TypeError(`a shape`);gO(e[1],!0);return;case`t`:if(e.length!==3||!Number.isInteger(e[2])||e[2]<0)throw TypeError(`t shape`);gO(e[1],!0);return;case`p`:if(e.length!==5)throw TypeError(`p arity`);if(gO(e[1]),!Number.isInteger(e[2])||e[2]<0)throw TypeError(`p index`);if(!Number.isInteger(e[3])||e[3]<0)throw TypeError(`p remove`);if(!Array.isArray(e[4]))throw TypeError(`p items`);return;case`m`:if(e.length!==3)throw TypeError(`m arity`);gO(e[1]),_O(e[2]);return;default:throw TypeError(`unknown op verb: ${String(e[0])}`)}}function gO(e,t=!1){if(!Array.isArray(e))throw TypeError(`path is not an array`);if(t&&e.length===0)throw TypeError(`path is empty`);yO(e)}function _O(e){if(!Array.isArray(e))throw TypeError(`m permutation is not an array`);let t=new Uint8Array(e.length);for(let n of e){if(!Number.isInteger(n)||n<0||n>=e.length||t[n]!==0)throw TypeError(`m permutation is not a bijection`);t[n]=1}}function vO(e){if(!Array.isArray(e)||e.length===0)throw TypeError(`op is not a tuple`);let[t]=e,n=e=>{if(typeof e==`number`){if(!Number.isInteger(e)||e<0)throw TypeError(`bad path id`)}else{if(!Array.isArray(e))throw TypeError(`path is not an array`);yO(e)}};switch(t){case`r`:if(e.length!==2)throw TypeError(`r arity`);return;case`s`:if(e.length===3)n(e[1]);else if(e.length!==2)throw TypeError(`s arity`);return;case`d`:if(e.length===2)n(e[1]);else if(e.length!==1)throw TypeError(`d arity`);return;case`a`:if(e.length===3){if(n(e[1]),typeof e[2]!=`string`)throw TypeError(`a value`)}else if(e.length===2){if(typeof e[1]!=`string`)throw TypeError(`a value`)}else throw TypeError(`a arity`);return;case`t`:if(e.length===3){if(n(e[1]),!Number.isInteger(e[2])||e[2]<0)throw TypeError(`t count`)}else if(e.length===2){if(!Number.isInteger(e[1])||e[1]<0)throw TypeError(`t count`)}else throw TypeError(`t arity`);return;case`p`:{let[t,r,i]=e.length===5?[e[2],e[3],e[4]]:e.length===4?[e[1],e[2],e[3]]:[];if(i===void 0)throw TypeError(`p arity`);if(e.length===5&&n(e[1]),!Number.isInteger(t)||t<0)throw TypeError(`p index`);if(!Number.isInteger(r)||r<0)throw TypeError(`p remove`);if(!Array.isArray(i))throw TypeError(`p items`);return}case`m`:if(e.length===3)n(e[1]);else if(e.length!==2)throw TypeError(`m arity`);_O(e[e.length-1]);return;case`#`:if(e.length!==3||!Number.isInteger(e[1])||e[1]<0||!Array.isArray(e[2]))throw TypeError(`# shape`);yO(e[2]);return;default:throw TypeError(`unknown op verb: ${String(t)}`)}}function yO(e){for(let t of e)if(typeof t==`string`){if(pO.has(t))throw new mO(t)}else if(!Number.isInteger(t)||t<0)throw new mO(t)}function bO(e,t){if(t>e.length)throw new mO(t)}var xO=class extends Error{path;constructor(e){super(`unresolvable path: ${JSON.stringify(e)}`),this.path=e,this.name=`PathError`}};function SO(e,t){let n=e;for(let e of t){if(hO(e),e[0]===`r`){n=e[1];continue}let t=e[1];if(yO(t),e[0]===`p`){let r=t.length===0?n:OO(n,t);if(!Array.isArray(r))throw new xO(t);r.splice(e[2],e[3]);let i=1e4;for(let t=0;t<e[4].length;t+=i)r.splice(e[2]+t,0,...e[4].slice(t,t+i));continue}if(e[0]===`m`){let r=t.length===0?n:OO(n,t);if(!Array.isArray(r)||r.length!==e[2].length)throw new xO(t);let i=r.slice();for(let t=0;t<e[2].length;t++)r[t]=i[e[2][t]];continue}let r=OO(n,t.slice(0,-1)),i=t[t.length-1];if(Array.isArray(r)){if(typeof i!=`number`)throw new mO(i);bO(r,i)}let a=e=>{Object.defineProperty(r,i,{value:e,writable:!0,enumerable:!0,configurable:!0})},o=()=>Object.hasOwn(r,i)?r[i]:void 0;switch(e[0]){case`s`:a(e[2]);break;case`d`:if(Array.isArray(r)){if(typeof i!=`number`||i>=r.length)throw new xO(t);r.splice(i,1)}else delete r[i];break;case`a`:{let n=o();if(typeof n!=`string`)throw new xO(t);a(`${n}${e[2]}`);break}case`t`:{let n=o();if(typeof n!=`string`)throw new xO(t);a(n.slice(e[2]));break}}}return n}function CO(e,t){return wO(e,[t])}function wO(e,t){let n=e,r=new WeakSet;for(let e of t)for(let t of e)if(hO(t),t[0]===`r`)n=t[1];else{if(t[0]===`p`){let e=TO(n,t,r);if(e!==void 0){n=e;continue}}n=EO(n,t[0]===`p`||t[0]===`m`?t[1]:t[1].slice(0,-1),r),n=SO(n,[t])}return n}function TO(e,t,n){let[,r,i,a,o]=t;if(a!==0)return;let s=e;for(let e of r){if(!(typeof e==`string`?!pO.has(e)&&dO(s)&&!Array.isArray(s):Number.isInteger(e)&&e>=0&&Array.isArray(s))||!Object.hasOwn(s,e))return;s=s[e]}if(!Array.isArray(s)||n.has(s)||i!==s.length)return;let c=s.concat(o);if(n.add(c),r.length===0)return c;let l=r.slice(0,-1),u=EO(e,l,n);return Object.defineProperty(OO(u,l),r[r.length-1],{value:c,writable:!0,enumerable:!0,configurable:!0}),u}function EO(e,t,n){let r=e=>{if(Array.isArray(e))return e.slice();if(!dO(e))throw new xO(t);let n=Object.create(Object.getPrototypeOf(e)===null?null:Object.prototype);for(let t of Object.keys(e))Object.defineProperty(n,t,{value:e[t],writable:!0,enumerable:!0,configurable:!0});return n};if(!dO(e))throw new xO(t);let i;n.has(e)?i=e:(i=r(e),n.add(i));let a=i;for(let e of t){if(!Object.hasOwn(a,e))throw new xO(t);if(Array.isArray(a)&&typeof e!=`number`)throw new mO(e);let i=a[e];if(!dO(i))throw new xO(t);if(n.has(i)){a=i;continue}let o=r(i);Object.defineProperty(a,e,{value:o,writable:!0,enumerable:!0,configurable:!0}),n.add(o),a=o}return i}function DO(e,t){let n=e;for(let e of t){if(!dO(n))throw new xO(t);if(Array.isArray(n)&&typeof e!=`number`)throw new mO(e);if(!Object.hasOwn(n,e))throw new xO(t);n=n[e]}return n}function OO(e,t){let n=DO(e,t);if(!dO(n))throw new xO(t);return n}var kO=e=>JSON.stringify(e);function AO(){let e=new Set,t=new Map,n=0,r;return{encode(i){r=void 0;let a=[];for(let o of i){if(o[0]===`r`){a.push(o),e.clear(),t.clear(),n=0,r=void 0;continue}let i=o[1],s=kO(i);if(s===r){switch(o[0]){case`s`:a.push([`s`,o[2]]);break;case`d`:a.push([`d`]);break;case`a`:a.push([`a`,o[2]]);break;case`t`:a.push([`t`,o[2]]);break;case`p`:a.push([`p`,o[2],o[3],o[4]]);break;case`m`:a.push([`m`,o[2]])}continue}let c=i,l=t.get(s);if(l!==void 0)c=l;else if(e.has(s)){let e=n++;t.set(s,e),a.push([`#`,e,i]),c=e}else e.add(s);switch(o[0]){case`s`:a.push([`s`,c,o[2]]);break;case`d`:a.push([`d`,c]);break;case`a`:a.push([`a`,c,o[2]]);break;case`t`:a.push([`t`,c,o[2]]);break;case`p`:a.push([`p`,c,o[2],o[3],o[4]]);break;case`m`:a.push([`m`,c,o[2]])}r=s}return a}}}function jO(){let e=new Map;return{decode(t){let n,r=[];for(let i of t){if(vO(i),i[0]===`#`){yO(i[2]),e.set(i[1],i[2]);continue}if(i[0]===`r`){r.push(i),e.clear(),n=void 0;continue}let t=i[0]===`d`&&i.length===1||i[0]!==`d`&&i[0]!==`p`&&i.length===2||i[0]===`p`&&i.length===4,a;if(t){if(n===void 0)throw new xO([]);a=n}else{let t=i[1];if(typeof t==`number`){let n=e.get(t);if(n===void 0)throw new xO(t);a=n}else a=t;n=a}if(i[0]!==`p`&&i[0]!==`m`&&a.length===0)throw new xO(a);switch(i[0]){case`s`:r.push([`s`,a,t?i[1]:i[2]]);break;case`d`:r.push([`d`,a]);break;case`a`:r.push([`a`,a,t?i[1]:i[2]]);break;case`t`:r.push([`t`,a,t?i[1]:i[2]]);break;case`p`:{let[e,n,o]=t?[i[1],i[2],i[3]]:[i[2],i[3],i[4]];r.push([`p`,a,e,n,o]);break}case`m`:r.push([`m`,a,t?i[1]:i[2]])}}return r}}}var MO=[],NO=0,PO=!1;function FO(e){MO.push(e),LO()}function IO(e){NO++;try{return e()}finally{NO--,LO()}}function LO(){if(!(PO||NO>0)){PO=!0;try{for(let e=MO.shift();e!==void 0;e=MO.shift())e()}finally{PO=!1}}}var RO=0,zO=class{#e=new Set;#t=new Set;#n;constructor(e){this.#n=e}subscribe(e,t){return this.#e.add(e),this.#r(e,t),()=>this.#e.delete(e)}events(e,t){return this.#t.add(e),this.#r(e,{type:`snap`,value:t}),()=>this.#t.delete(e)}emit(e){let t=[...this.#t],n=[...this.#e];FO(()=>{for(let n of t)this.#t.has(n)&&this.#r(n,e);for(let t of n)this.#e.has(t)&&this.#r(t,e.value)})}#r(e,t){try{e(t)}catch(e){this.#n(e)}}},BO=Symbol(`chord.hydration`);function VO(e){if(typeof e==`object`&&e)return e[BO]}var HO=e=>[...e].map(VO).filter(e=>e?.hydrated===!1),UO=class{key;seq=++RO;dependents=new Set;schemas=[];options;fanout;constructor(e,t){this.key=e,this.options=t,this.fanout=new zO(t.report)}subscribe(e){return this.fanout.subscribe(e,this.value)}events(e){return this.fanout.events(e,this.value)}validate(e){if(this.options.dev){for(let t of this.ownSchemas())Dw(`state`,`state ${this.key}`,t,e);for(let t of this.schemas)Dw(`state`,`state ${this.key}`,t,e)}}ownSchemas(){return[]}};function WO(e,t){let n=[];for(let r of e){if(r[0]===`r`||r[1].length===0)return[[`r`,t]];let e=r[1].slice(1);switch(r[0]){case`p`:n.push([`p`,e,r[2],r[3],r[4]]);break;case`m`:n.push([`m`,e,r[2]]);break;default:if(e.length===0)return[[`r`,t]];r[0]===`d`?n.push([`d`,e]):n.push([r[0],e,r[2]])}}return n}var GO=class extends UO{schema;#e;#t;#n;constructor(e,t,n,r,i){super(e,i),n!==void 0&&Dw(`state`,`initial value of state ${e}`,t,n.value),this.schema=t,this.#e=rE({v:n?.value??null}),this.#t=r,this.#n=n!==void 0}initialize(e){if(this.#n)throw Error(`state ${this.key} is already initialized`);Dw(`state`,`initial value of state ${this.key}`,this.schema,e),this.#e=rE({v:e}),this.#n=!0}ownSchemas(){return[this.schema]}get value(){if(!this.#n)throw ZO(`state ${this.key} (its init has not run)`);return this.#e.value.v}change(e,t){if(this.#t(e),!this.#n)throw ZO(`state ${this.key} (its init has not run)`);let n=this.#e.beginChange(),r;try{let e=n.state,i=t(e.v);if(i instanceof Promise)throw TypeError(`cell.change callbacks must be synchronous`);i!==void 0&&(i!==e.v&&Dw(`state`,`state ${this.key}`,this.schema,i),e.v=i),r=n.prepare()}catch(e){throw n.abort(),e}this.#r(r,`ops`)}replace(e,t,n={}){if(this.#t(e),!this.#n)throw ZO(`state ${this.key} (its init has not run)`);let r=this.value,i=n.diff??KO(r,t)?NT(r,t):void 0;this.#r(this.#e.prepareReplace({v:t}),`ops`,!0,i)}reset(e,t){this.schema=t,this.#r(this.#e.prepareReplace({v:e}),`reset`,!1)}#r(e,t,n=!0,r){if(e.ops.length===0&&t===`ops`){this.#e.adopt(e);return}let i=e.value.v,a;try{n&&this.validate(i),a=qO(this,i,n)}catch(t){throw e.abort(),t}IO(()=>{this.#e.adopt(e);let n=r!==void 0&&r.length>0?r:WO(e.ops,i);this.fanout.emit(t===`reset`?{type:t,value:i}:{type:t,ops:n,value:i});for(let[e,t]of a)e.install(t)})}};function KO(e,t){if(e===null||t===null||typeof e!=`object`||typeof t!=`object`||e===t||Array.isArray(e)!==Array.isArray(t))return!1;for(let[n,r]of Object.entries(t))if(typeof r==`object`&&r&&e[n]===r)return!0;return!1}function qO(e,t,n=!0){let r=new Set,i=e=>{for(let t of e.dependents)r.has(t)||(r.add(t),i(t))};i(e);let a=new Map([[e,t]]),o=new Map;for(let e of[...r].sort((e,t)=>e.seq-t.seq)){let t=e.compute(e=>a.has(e)?a.get(e):e.value);n&&e.validate(t),a.set(e,t),o.set(e,t)}return o}var JO=e=>typeof e==`object`&&!!e&&typeof e.subscribe==`function`&&`value`in e,YO=class extends UO{sources;#e;#t;#n=[];constructor(e,t,n,r){super(e,r),this.sources=t.map(t=>{if(!JO(t))throw TypeError(`derive ${e}: sources must be readables`);return t}),this.#e=n,this.#t=void 0}get value(){return this.#t}get[BO](){let e=HO(this.sources);if(e.length!==0)return{hydrated:!1,whenHydrated:()=>Promise.all(e.map(e=>e.whenHydrated())).then(()=>{})}}attach(e){this.#t=e?.has(this)?e.get(this):this.compute(e=>e.value);for(let e of this.sources)e instanceof UO?e.dependents.add(this):this.#n.push(e.subscribe(()=>this.refresh()))}detach(){for(let e of this.sources)e instanceof UO&&e.dependents.delete(this);for(let e of this.#n.splice(0))e()}compute(e){let t=this.#e(...this.sources.map(e));if(t instanceof Promise)throw TypeError(`derive ${this.key}: fn must be synchronous`);return t}refresh(){try{let e=this.compute(e=>e.value),t=qO(this,e);IO(()=>{this.install(e);for(let[e,n]of t)e.install(n)})}catch(e){this.options.report(e)}}install(e){let t=this.#t;this.#t=e;let n=t===void 0||e===void 0?[[`r`,e??null]]:NT(t,e);n.length>0&&this.fanout.emit({type:`ops`,ops:n,value:e})}},XO=e=>e instanceof UO,ZO=e=>new L(`not_ready`,`${e} is not ready`),QO=()=>{},$O=(e,t,n,r)=>(tk(e,n),{contract:e,factory:t,options:n,facet:r}),ek=e=>e.options.lifetime===`host`;function tk(e,t){let n=t.lifetime??`referenced`;if(n!==`referenced`&&n!==`host`)throw TypeError(`${e.name}: unknown lifetime ${String(n)}`);if(n===`host`){if(e.scope!==`local`)throw TypeError(`${e.name}: lifetime "host" needs a local type (remote types are referenced)`);if(t.linger!==void 0)throw TypeError(`${e.name}: an object of lifetime "host" does not linger (it lives as long as the host)`);try{Ow(e.input,{},`${e.name} input`)}catch{throw TypeError(`${e.name}: lifetime "host" needs an input that accepts {} (the object's one address)`)}}}var nk=class{resource;constructor(e){this.resource=e}},rk=class{key;spec;deps;state=`closed`;#e;constructor(e,t,n){this.key=e,this.spec=t,this.deps=n}get value(){if(this.state===`unavailable`)throw new L(`unavailable`,`resource ${this.key} could not be restored`);if(this.state!==`open`)throw ZO(`resource ${this.key}`);return this.#e}get exclusive(){return this.spec.exclusive===!0}async open(e,t){if(this.state!==`closed`)return;this.state=`opening`;let n;try{n=await this.spec.open({signal:e})}catch(e){throw this.state=`closed`,e}if(e.aborted)throw this.state=`closed`,await this.spec.close?.(n),new L(`aborted`,`resource ${this.key} opened after abort`);this.#e=n,this.state=`open`,t.push(this)}async close(e){if(this.state!==`open`)return;this.state=`closed`;let t=e.indexOf(this);t!==-1&&e.splice(t,1);let n=this.#e;this.#e=void 0,await this.spec.close?.(n)}markUnavailable(){this.state=`unavailable`,this.#e=void 0}adopt(e){this.spec=e}},ik=class{#e;#t;constructor(e,t){this.#e=e,this.#t=t,ak.set(this,e)}get key(){return this.#e.key}get value(){if(this.#t.inFactory>0)throw ZO(`resource ${this.key} (inside a factory)`);return this.#e.value}},ak=new WeakMap,ok=e=>e instanceof rk?e:typeof e==`object`&&e?ak.get(e):void 0,sk=class{cells=new Map;cellSchemas=new Map;cellVersions=new Map;cellMigrations=new Map;refs=new Map;resources=new Map;adopted=new Map;listeners=new Map;tasks=new Map;derives=new Map;registrations=new Map},ck=e=>typeof e==`object`&&!!e&&typeof e.init==`function`,lk=class e{host;signal;rootId;codeVersion;principal;holder;#e=[];#t;#n=new AbortController;#r=!1;get closed(){return this.#r}check(e){if(this.host!==e)throw bw(`foreign_ctx`,`ctx belongs to another host`);if(this.#r)throw new L(`aborted`,`ctx expired: its call already settled`,{reason:`expired`});if(this.signal.aborted){let e=this.signal.reason;throw e instanceof L&&e.code===`superseded`?new L(`superseded`,e.message,{cause:e}):new L(`aborted`,`ctx aborted`,{cause:e})}}constructor(e,t){this.host=e;let n=uk(t.signals);this.signal=n.signal,this.#t=n.release,this.rootId=t.rootId,this.codeVersion=t.codeVersion,this.principal=t.principal,this.holder=t.holder??!1}async get(e,t,n){this.check(this.host);let r=this.host.acquire(e,t,{principal:this.principal,...n},`call`);return this.#e.push(r),await dk(r,[this.signal,this.#n.signal],this.host.readyTimeout),r.proxy}child(t){return new e(this.host,{signals:[this.signal,t.callAbort.signal],rootId:this.rootId,codeVersion:this.codeVersion,principal:this.host.principal})}close(){this.#r=!0,this.#n.abort(new L(`aborted`,`ctx expired: its call already settled`,{reason:`expired`})),this.#t();for(let e of this.#e.splice(0))e.release()}};function uk(e){let t=new AbortController,n=[],r=()=>{for(let e of n.splice(0))e()};for(let i of e){if(i.aborted){r(),t.abort(i.reason);break}let e=()=>{r(),t.abort(i.reason)};i.addEventListener(`abort`,e,{once:!0}),n.push(()=>i.removeEventListener(`abort`,e))}return{signal:t.signal,release:r}}async function dk(e,t,n){let r=new AbortController,i=Number.isFinite(n)?setTimeout(()=>r.abort(new L(`unavailable`,`${e.address} was not ready after ${n} ms`,{reason:`ready_timeout`})),n):void 0;i?.unref?.();let a=uk([...t,r.signal]);try{await fk(e.ready,a.signal)}catch(t){e.release();let n=a.signal.reason;throw n instanceof L&&n.reason===`ready_timeout`?n:t}finally{clearTimeout(i),a.release()}}async function fk(e,t){if(t.aborted)throw new L(`aborted`,`call aborted`,{cause:t.reason});let n=QO,r=new Promise((e,r)=>{n=()=>r(new L(`aborted`,`call aborted`,{cause:t.reason})),t.addEventListener(`abort`,n,{once:!0})});try{return await Promise.race([e,r])}finally{t.removeEventListener(`abort`,n)}}var pk=new Set([`contract`,`status`,`ready`,`variant`,`shape`,`error`,`onShape`,`onStatus`,`release`]);function mk(e,t,n,r){if(e.size===0)return;let i=[...e];FO(()=>{for(let e of i)try{e(t,n)}catch(e){r(e)}})}var hk=new WeakMap,gk=e=>typeof e==`object`&&e?hk.get(e):void 0,_k=class{#e;#t;#n=new Set;#r=new Set;#i=new Set;#a;#o=QO;#s;constructor(e,t){this.#e=e,this.#t=t}get value(){let e=this.#e;if(e.status===`released`||e.status===`gone`)throw e.terminalError();if(e.status!==`live`)throw ZO(`${e.address}.${this.#t}`);let t=e.currentView();if(t===void 0)throw ZO(`${e.address}.${this.#t}`);let n=this.#c();if(n===void 0)throw new L(`not_in_variant`,`${e.address}: ${this.#t} is not a state member of variant ${yk(t)??`(local)`}`);return n.value}get[BO](){let e=this.#e;return e.status===`live`?VO(this.#c()):{hydrated:!1,whenHydrated:async()=>{await e.ready,await VO(this.#c())?.whenHydrated()}}}subscribe(e){this.#n.add(e);let t=this.#l();return t!==void 0&&(this.#s={value:t.value},this.#d(()=>e(t.value))),this.bind(),()=>this.#u(this.#n,e)}events(e){this.#r.add(e);let t=this.#l();if(t!==void 0){let n=t.value;this.#s={value:n},this.#d(()=>e({type:`snap`,value:n}))}else this.#i.add(e);return this.bind(),()=>{this.#i.delete(e),this.#u(this.#r,e)}}bind(){let e=this.#n.size+this.#r.size>0?this.#c():void 0;if(e===this.#a||(this.#o(),this.#o=QO,this.#a=e,e===void 0))return;let t=!0;this.#o=e.events(e=>{let n=t;if(t=!1,n&&this.#i.size===0&&this.#s!==void 0&&e.value===this.#s.value)return;this.#s={value:e.value};let r=n?{type:`reset`,value:e.value}:e,i=[...this.#r],a=[...this.#n],o=new Set(this.#i);this.#i.clear(),FO(()=>{for(let t of i){if(!this.#r.has(t))continue;let n=o.has(t)?{type:`snap`,value:e.value}:r;this.#d(()=>t(n))}for(let t of a)this.#n.has(t)&&this.#d(()=>t(e.value))})})}stop(){this.#n.clear(),this.#r.clear(),this.#i.clear(),this.bind()}#c(){let e=this.#e.currentView();if(e===void 0||!this.#e.inVariant(e,this.#t))return;let t=e[this.#t];return XO(t)||Sk(t)?t:void 0}#l(){let e=this.#c();return e===void 0||VO(e)?.hydrated===!1?void 0:e}#u(e,t){e.delete(t),this.bind()}#d(e){try{e()}catch(e){this.#e.object.host.report(e)}}},vk=class{object;contract;owner;address;proxy;ready;status;error;shapeListeners=new Set;goneListeners=new Set;readables=new Map;bindings=new WeakMap;views=new WeakMap;callers=new Map;constructor(e,t,n){this.object=e,this.contract=t,this.owner=n,this.address=e.address,this.status=e.status===`live`?`live`:`loading`,this.ready=e.ready.then(()=>{if(this.status===`gone`)throw this.error;if(this.status===`released`)throw new L(`released`,`reference ${this.address} released`)}),this.ready.catch(QO),this.proxy=new Proxy(this,{get:(e,t)=>{if(pk.has(t)){let n=Reflect.get(e,t,e);return typeof n==`function`?n.bind(e):n}if(typeof t==`string`&&t!==`then`)return e.member(t)},has:(e,t)=>pk.has(t)||e.member(String(t))!==void 0}),hk.set(this.proxy,this)}get variant(){let e=this.currentView();return e===void 0?void 0:yk(e)}get shape(){let e=this.status===`live`?this.object.currentInstalled():void 0,t=e===void 0?void 0:this.#n(e);if(e!==void 0&&t!==void 0)return{variant:yk(t),members:Object.keys(t).filter(e=>e!==`variant`),contract:e.service.contract.fingerprint}}onShape(e){return this.shapeListeners.add(e),()=>this.shapeListeners.delete(e)}onStatus(e){return this.#e.add(e),()=>this.#e.delete(e)}#e=new Set;#t(){mk(this.#e,this.status,this.error,e=>this.object.host.report(e))}release(){this.status!==`released`&&this.status!==`gone`&&(this.status=`released`,this.#r(),this.#t(),this.object.release(this))}live(){this.status===`loading`&&(this.status=`live`,this.#t(),this.shapeChanged())}gone(e){if(this.status!==`released`&&this.status!==`gone`){this.status=`gone`,this.error=e,this.#r(),this.#t();for(let t of[...this.goneListeners])t(e)}}shapeChanged(){for(let e of this.readables.values())e.bind();let e=this.shape;if(e===void 0)return;let t=[...this.shapeListeners];FO(()=>{for(let n of t)try{n(e)}catch(e){this.object.host.report(e)}})}terminalError(){return this.status===`gone`?this.error:new L(`released`,`reference ${this.address} released`)}viewOf(e){let t=this.bindings.get(e.service);if(this.bindings.has(e.service)||(t=aT(e.service.contract,e.service.options.accepts,this.contract),this.bindings.set(e.service,t)),t===void 0)return e.implementation;let n=this.views.get(e.implementation);return n===void 0&&(n=t(e.implementation),this.views.set(e.implementation,n)),n}currentView(){if(this.status!==`live`)return;let e=this.object.currentInstalled();return e===void 0?void 0:this.#n(e)}#n(e){try{return this.viewOf(e)}catch(e){this.object.host.report(e);return}}describe(e,t){let n=this.contract.description.variants;if(e!==void 0)return n[e]?.[t];for(let e of Object.values(n))if(e[t]!==void 0)return e[t]}inVariant(e,t){return this.contract.scope!==`remote`||this.describe(yk(e),t)!==void 0}member(e){let t=this.describe(void 0,e),n=this.currentView(),r=n?.[e];if(t?.kind===`method`||t===void 0&&typeof r==`function`)return this.caller(e);if(t?.kind===`state`||t===void 0&&(XO(r)||Sk(r))){let t=this.readables.get(e);return t===void 0&&(t=new _k(this,e),this.readables.set(e,t)),t}if(n!==void 0&&this.inVariant(n,e))return r instanceof nk?r.resource.value:r}caller(e){let t=this.callers.get(e);if(t===void 0){let n=oT(this.contract,e);t=(...t)=>{let[r,i]=n?[void 0,t[0]]:t;if(this.object.host.inFactory>0)throw new L(`not_ready`,`${this.address}.${e} called inside a factory`);if(i!==void 0&&!(i instanceof lk))return Promise.reject(bw(`foreign_ctx`,`ctx must come from a Chord host`));if(i===void 0||i.holder){try{i?.check(this.object.host)}catch(e){return Promise.reject(e)}return this.object.host.root(t=>this.object.call(this,e,r,t),{signal:i?.signal})}return this.object.call(this,e,r,i)},this.callers.set(e,t)}return t}#r(){for(let e of this.readables.values())e.stop()}},yk=e=>typeof e.variant==`string`?e.variant:void 0,bk=(e,t)=>e===t||e!==void 0&&t!==void 0&&String(e)===String(t),xk=class{host;address;typeName;input;principal;hostLifetime;status=`activating`;ready=Promise.resolve();service;minCodeVersion=0;decls=new sk;pending=new Set;implementations=new Map;refs=new Set;leases=new Map;openOrder=[];callAbort=new AbortController;activationAbort=new AbortController;gate;deferredRuntime=!1;#e=new Map;#t=new Set;#n=new Map;#r=new Set;#i=0;#a;#o;constructor(e,t){this.host=e,this.address=t.address,this.typeName=t.typeName,this.input=t.input,this.principal=t.principal,this.hostLifetime=t.hostLifetime}start(e){this.ready=this.#s(e).then(()=>{for(let e of this.refs)e.live();this.#p()},e=>{this.status===`activating`&&(this.status=`failed`),this.host.forget(this);let t=xw(e,`activating ${this.address}`);for(let e of this.refs)e.gone(t);throw t}),this.ready.catch(QO)}async#s(e){await e?.catch(QO);let t=this.activationAbort.signal,n=()=>new L(`aborted`,`${this.address} abandoned`);if(t.aborted)throw n();let r=this.host.service(this.typeName);if(r===void 0)throw new L(`unavailable`,`${this.typeName} is not served`,{reason:`unknown_type`});this.service=r;let i=this.run(r,void 0);try{if(await this.open(i.created.resources,i.created.refs,t),t.aborted||(await this.waitHydrated(i),t.aborted)||(await this.initCells(i,t),t.aborted))throw n();this.host.checkRegistrations(this,i.decls),this.decls=i.decls;for(let[e,t]of this.host.retainedCodeVersions())t.get(this.typeName)===r&&this.implementations.set(e,{codeVersion:e,service:r,implementation:i.implementation,decls:i.decls});let e=this.host.pendingCodeVersion();if(!this.implementations.has(this.host.currentCodeVersion())&&(e===void 0||!this.implementations.has(e)))throw new L(`superseded`,`${this.address}: code changed during activation`);for(let e of i.created.derives)e.attach();if(this.refreshSchemas(),this.deferredRuntime=!this.implementations.has(this.host.currentCodeVersion()),this.deferredRuntime||(i.decls.registrations.size>0&&this.host.registriesChanged(this),this.startRuntime()),t.aborted)throw n();this.status=`live`}catch(e){this.callAbort.abort(e),this.stopListeners(),this.stopTasks();let t=this.decls.registrations.size>0&&!this.deferredRuntime;throw this.implementations.clear(),this.decls=new sk,t&&this.host.registriesChanged(),await Promise.allSettled([...this.#t,...this.#r]),await this.unwind(i).catch(e=>this.host.report(e)),e}finally{this.pending.delete(i.decls)}}run(e,t){let n=new Tk(this,t),r=e=>{this.pending.delete(e.decls),this.unwind(e).catch(e=>this.host.report(e))};this.pending.add(n.run(void 0).decls),this.host.inFactory++;let i;try{i=e.factory(this.input,this.principal,n)}catch(e){throw this.host.inFactory--,r(n.run(void 0)),e}this.host.inFactory--;let a=n.run(i);try{if(i instanceof Promise)throw bw(`implementation`,`${this.typeName}: factories must be synchronous`);wk(e,a.implementation)}catch(e){throw r(a),e}return a}async open(e,t,n){let r=new Map,i=t=>{let a=r.get(t);return a===void 0&&(a=(async()=>{await Promise.all(t.deps.map(t=>t instanceof rk?e.includes(t)?i(t):void 0:t.ready)),await t.open(n,this.openOrder)})(),r.set(t,a)),a},a=this.withinReadyTimeout(Promise.all(t.map(e=>e.ready)),()=>t.filter(e=>e.status===`loading`).map(e=>e.address)),o=(await Promise.allSettled([...e.map(i),a])).find(e=>e.status===`rejected`);if(o!==void 0)throw o.reason}async waitHydrated(e){let t=Object.entries(e.implementation??{}),n=HO([...e.created.derives,...t.map(([,e])=>e)]);n.length!==0&&await this.withinReadyTimeout(Promise.all(n.map(e=>e.whenHydrated())),()=>[...t.filter(([,e])=>VO(e)?.hydrated===!1).map(([e])=>`${this.address}.${e}`),...e.created.derives.filter(e=>VO(e)!==void 0).map(e=>`derive ${e.key}`)])}async withinReadyTimeout(e,t){let n=this.host.readyTimeout;if(!Number.isFinite(n))return e;let r,i=new Promise((e,i)=>{r=setTimeout(()=>{let e=t();i(new L(`unavailable`,`${this.address} was not ready after ${n} ms${e.length===0?``:`, waiting on ${e.join(`, `)}`} (a reference cycle across hosts?)`,{reason:`ready_timeout`}))},n),r.unref?.()});i.catch(QO);try{return await Promise.race([e,i])}finally{clearTimeout(r)}}async initCells(e,t){if(e.created.inits.length===0)return;let n=(await Promise.allSettled(e.created.inits.map(async([e,n])=>{let r=await this.host.root(e=>n(e),{signal:t});t.aborted||e.initialize(r)}))).find(e=>e.status===`rejected`);if(n!==void 0)throw n.reason}async unwind(e){for(let t of e.created.derives)t.detach();await Sw([...[...e.created.resources].sort((e,t)=>this.openOrder.indexOf(t)-this.openOrder.indexOf(e)).map(e=>()=>e.close(this.openOrder)),...e.created.refs.map(e=>()=>e.release())],`${this.address}: cleanup failed`)}currentInstalled(){return this.implementations.get(this.host.currentCodeVersion())??[...this.implementations.values()].at(-1)}refreshSchemas(){let e=new Map;for(let t of this.implementations.values())for(let[n,r]of Ck(t.service,t.implementation))e.set(n,[...e.get(n)??[],...r]);for(let t of this.allDecls())for(let n of[...t.cells.values(),...t.derives.values()])n.schemas=e.get(n)??[]}allDecls(){let e=new Set([this.decls,...this.pending]);for(let t of this.implementations.values())e.add(t.decls);return e}#c(e){return ok(e.source)??e.source}#l(e,t){let n=ok(t.source),r=n===void 0?t.source:n.value,i=t.select===void 0?r:t.select(r);if(typeof i?.subscribe!=`function`)throw bw(`implementation`,`listener ${e}: source has no subscribe()`);return i}stageListeners(e){let t=new Map,n=new Set;try{for(let[r,i]of e.listeners){let e=this.#c(i),a=this.#e.get(r);if(a!==void 0&&a.origin===e&&bk(a.select,i.select)){n.add(r);continue}let o=this.#l(r,i),s={origin:e,select:i.select,unsubscribe:QO,buffer:[]};t.set(r,s),XO(o)||Sk(o)?(s.buffer=void 0,s.subscribe=()=>{s.unsubscribe=o.subscribe(e=>this.#d(r,e))}):s.unsubscribe=o.subscribe(e=>{s.buffer===void 0?this.#d(r,e):s.buffer.push(e)})}}catch(e){for(let e of t.values())e.unsubscribe();throw e}return{activate:()=>{for(let[e,t]of this.#e)n.has(e)||(t.unsubscribe(),this.#e.delete(e));for(let[e,n]of t){this.#e.set(e,n),n.subscribe?.();let t=n.buffer??[];n.buffer=void 0;for(let n of t)this.#d(e,n)}},discard:()=>{for(let e of t.values())e.unsubscribe()}}}startRuntime(){this.stageListeners(this.decls).activate(),this.startTasks()}startTasks(){let e=++this.#i,t=()=>{for(let e of this.decls.tasks.keys())this.#u(e,this.host.currentCodeVersion())};if(this.#r.size===0){t();return}let n=this.host.taskStopDeadline,r,i=new Promise(e=>{r=setTimeout(()=>e(!0),n)}),a=Promise.allSettled([...this.#r]).then(()=>!1);Promise.race([a,i]).then(i=>{clearTimeout(r),e===this.#i&&this.status===`live`&&(i&&this.host.report(new L(`aborted`,`${this.address}: aborted tasks still running after ${n} ms; starting their replacements anyway`)),t())})}stopListeners(){for(let e of this.#e.values())e.unsubscribe();this.#e.clear()}#u(e,t){let n=this.decls.tasks.get(e);if(n===void 0)return;let r=new AbortController,i=new lk(this.host,{signals:[r.signal,this.callAbort.signal],rootId:`task:${this.address}:${e}`,codeVersion:t,principal:this.host.principal,holder:!0}),a=(async()=>{try{await n(i)}catch(e){i.signal.aborted||this.host.report(e)}finally{i.close(),this.#n.get(e)?.controller===r&&this.#n.delete(e)}})();this.#n.set(e,{controller:r,done:a})}stopTasks(){this.#i++;for(let e of this.#n.values()){e.controller.abort(new L(`aborted`,`task stopped`));let t=e.done;this.#r.add(t),t.finally(()=>this.#r.delete(t))}this.#n.clear()}#d(e,t){FO(()=>{if(this.gate!==void 0){this.gate.queue.push({key:e,event:t});return}let n=this.decls.listeners.get(e);n===void 0||this.status!==`live`&&this.status!==`activating`||this.host.root(e=>{this.lease(e);let r=e.child(this);return this.#f(async()=>{try{await n.fn(t,r)}finally{r.close()}})}).catch(e=>this.host.report(e))})}openGate(){let e=this.gate;this.gate=void 0;for(let{key:t,event:n}of e?.queue??[])this.#d(t,n)}admit(e){if(this.host.failed!==void 0)throw new L(`unavailable`,`${this.host.name} failed and admits no work`,{reason:`host_failed`});if(!this.host.hasCodeVersion(e.codeVersion))throw new L(`superseded`,`code version ${e.codeVersion} is retired`);if(e.codeVersion<this.minCodeVersion)throw new L(`upgrade_conflict`,`${this.address} was upgraded in code version ${this.minCodeVersion}`);if(this.gate!==void 0&&!this.gate.grandfathered.has(e.rootId))throw new L(`upgrade_conflict`,`${this.address} is being upgraded`)}lease(e){this.leases.has(e.rootId)||(this.leases.set(e.rootId,e.codeVersion),this.host.touch(e.rootId,this))}guard=e=>{if(this.host.inFactory>0)throw bw(`read_only`,`cells cannot be written while a factory runs`);if(e instanceof lk&&e.check(this.host),e.signal.aborted)throw new L(`aborted`,`write with an aborted ctx`);if(this.status===`disposed`)throw new L(`gone`,`${this.address} is disposed`);e.rootId.startsWith(`task:`)||this.admit(e)};async call(e,t,n,r){if(r.check(this.host),e.status===`released`||e.status===`gone`)throw e.terminalError();if(e.status===`loading`&&await fk(e.ready,r.signal),e.status!==`live`||this.status!==`live`)throw e.status===`live`?new L(`gone`,`${this.address} is ${this.status}`):e.terminalError();this.admit(r);let i=this.implementations.get(r.codeVersion);if(i===void 0)throw new L(`superseded`,`${this.address} has no implementation for code version ${r.codeVersion}`);let a=e.viewOf(i),o=yk(a),s=e.describe(e.contract.scope===`remote`?o:``,t),c=a[t];if(typeof c!=`function`||e.contract.scope===`remote`&&s?.kind!==`method`)throw new L(`not_in_variant`,`${this.address}: ${t} is not a method of variant ${o??`(local)`}`);let l=a===i.implementation?i.service.contract.description.variants[o??``]?.[t]:s,u=l?.kind===`method`?l:void 0,d=e.contract.scope===`remote`?u:void 0,f=u===void 0||u.args!==void 0,p=u===void 0||u.result!==void 0,m;if(f){let r=e.contract.scope===`remote`&&s?.kind===`method`?s.args:void 0,i=r===void 0?n:aw(r,XC(n));m=d?.args?aw(d.args,XC(i)):i,d?.args&&Dw(`args`,`${this.address}.${t} args`,d.args,m)}this.lease(r);let h=r.child(this),g;try{g=await this.#f(()=>f?c(m,h):c(h))}finally{h.close()}if(p)return d?.result&&Dw(`result`,`${this.address}.${t} result`,d.result,g),g}#f(e){let t=(async()=>e())();this.#t.add(t);let n=()=>{this.#t.delete(t),this.#t.size===0&&this.#p()};return t.then(n,n),t}rootEnded(e){this.leases.delete(e);let t=this.gate;t?.grandfathered.delete(e)&&t.grandfathered.size===0&&t.drained()}addRef(e){this.refs.add(e),this.#a!==void 0&&clearTimeout(this.#a),this.#a=void 0}release(e){this.refs.delete(e)&&this.#p()}#p(){if(this.refs.size>0||this.#t.size>0||this.#a!==void 0)return;if(this.status===`activating`){this.#m(this.dispose(!1));return}if(this.status!==`live`)return;let e=this.service?.options.linger??0;e<=0?this.#m(this.dispose(!1)):(this.#a=setTimeout(()=>{this.#a=void 0,this.refs.size===0&&this.#t.size===0&&this.status===`live`&&this.#m(this.dispose(!1))},e),this.#a.unref?.())}#m(e){e.catch(e=>this.host.report(e))}dispose(e,t){return this.#o??=this.#h(e,t),this.#o}async#h(e,t){let n=this.status===`activating`;this.status=`disposing`,this.host.forget(this),this.#a!==void 0&&clearTimeout(this.#a),this.#a=void 0;let r=t??new L(`gone`,`${this.address} was disposed`);if(e){for(let e of this.refs)e.gone(r);this.callAbort.abort(r)}this.activationAbort.abort(r),n&&await this.ready.catch(QO);for(let e of this.refs)e.gone(r);let i=this.allDecls();this.stopTasks(),this.stopListeners(),await Promise.allSettled([...this.#t]);let a=[...i].some(e=>e.registrations.size>0)&&!this.deferredRuntime;this.implementations.clear(),this.decls=new sk,a&&this.host.registriesChanged();let o=new Set;for(let e of i){for(let t of e.derives.values())t.detach();for(let t of e.refs.values())o.add(t)}try{await Sw([()=>Promise.allSettled([...this.#r]),...[...this.openOrder].reverse().map(e=>()=>e.close(this.openOrder)),...[...o].map(e=>()=>e.release())],`${this.address}: disposal failed`)}finally{this.status=`disposed`,this.host.disposed(this)}}},Sk=e=>typeof e==`object`&&!!e&&typeof e.events==`function`&&typeof e.subscribe==`function`;function Ck(e,t){let n=new Map,r=e.contract;if(r.scope!==`remote`)return n;let i=r.description.variants[yk(t)??``]??{};for(let[e,r]of Object.entries(i)){let i=t[e];r.kind===`state`&&XO(i)&&n.set(i,[...n.get(i)??[],r.schema])}return n}function wk(e,t){let n=e.contract,r=e=>{throw bw(`implementation`,`${n.name}: ${e}`)};(typeof t!=`object`||!t)&&r(`factory must return an object`);let i;if(n.scope===`remote`){let e=t.variant;(typeof e!=`string`||n.description.variants[e]===void 0)&&r(`unknown variant ${String(e)}`),i=n.description.variants[e];for(let n of Object.keys(t))n!==`variant`&&i[n]===void 0&&r(`${n} is not in variant ${String(e)}`)}else i=n.description.variants[``]??{};for(let[e,n]of Object.entries(i)){let i=t[e];n.kind===`method`&&typeof i!=`function`&&r(`${e} must be a method`),n.kind===`state`&&!XO(i)&&!Sk(i)&&r(`${e} must be a cell, a derivation or a held object's state member`),n.kind===`opaque`&&i===void 0&&r(`${e} is missing`)}}var Tk=class{#e;#t;#n=new sk;#r={refs:[],resources:[],derives:[],inits:[]};constructor(e,t){this.#e=e,this.#t=t}run(e){return{implementation:e,decls:this.#n,created:this.#r}}#i(e,t,n){if(typeof n!=`string`||n===``)throw TypeError(`${t} needs a name`);if(e.has(n))throw bw(`duplicate`,`${this.#e.typeName}: duplicate ${t} name ${n}`)}state(e,t,n,r={}){this.#i(this.#n.cells,`state`,e);let i=r.version??1;if(!Number.isInteger(i)||i<1)throw TypeError(`state ${e}: version must be a positive integer`);let a=this.#e.host,o=ck(n)?n.init:void 0,s=this.#t?.cells.get(e);return s===void 0&&(s=new GO(e,t,o===void 0?{value:n}:void 0,this.#e.guard,{dev:a.dev,report:e=>a.report(e)}),o!==void 0&&this.#r.inits.push([s,o])),this.#n.cells.set(e,s),this.#n.cellSchemas.set(e,t),this.#n.cellVersions.set(e,i),r.migrate!==void 0&&this.#n.cellMigrations.set(e,r.migrate),s}get(e,t,n){let r=this.#e.host,i=this.#t!==void 0,a=r.addressOf(e,t,n?.principal??r.principal,i),o=this.#n.refs.get(a);if(o!==void 0){if(o.contract.fingerprint!==e.fingerprint)throw bw(`duplicate`,`${this.#e.typeName}: ${e.name} held twice with different contracts`);return o.proxy}let s=this.#t?.refs.get(a);if(s!==void 0&&s.contract.fingerprint===e.fingerprint&&s.status!==`gone`&&s.status!==`released`)return this.#n.refs.set(a,s),s.proxy;let c=r.acquire(e,t,n,`object`,this.#e,i);return this.#n.refs.set(a,c),this.#r.refs.push(c),c.proxy}resource(e,t){if(this.#i(this.#n.resources,`resource`,e),!Number.isInteger(t.version))throw TypeError(`resource ${e}: version must be an integer`);let n=(t.deps??[]).map(t=>{let n=gk(t)??ok(t);if(n===void 0)throw TypeError(`resource ${e}: deps must be references or resources of this object`);return n}),r=this.#t?.resources.get(e),i=r!==void 0&&r.spec.version===t.version&&r.exclusive===(t.exclusive===!0)&&r.deps.length===n.length&&r.deps.every((e,t)=>e===n[t]),a=i?r:new rk(e,t,n);return i?this.#n.adopted.set(r,t):this.#r.resources.push(a),this.#n.resources.set(e,a),new ik(a,this.#e.host)}on(e,t,...n){this.#i(this.#n.listeners,`listener`,e);let[r,i]=n.length===1?[void 0,n[0]]:[n[0],n[1]];if(typeof i!=`function`)throw TypeError(`listener ${e}: the handler must be a function`);if(r!==void 0&&typeof r!=`function`)throw TypeError(`listener ${e}: select must be a function`);this.#n.listeners.set(e,{source:t,select:r,fn:i})}task(e){if(typeof e!=`function`)throw TypeError(`a task must be a function`);this.#n.tasks.set(`#${this.#n.tasks.size}`,e)}derive(e,t){if(typeof t!=`function`)throw TypeError(`a derivation needs a function`);let n=this.#e.host,r=`#${this.#n.derives.size}`,i=new YO(r,e,t,{dev:n.dev,report:e=>n.report(e)});return this.#r.derives.push(i),this.#n.derives.set(r,i),i}expose(e){let t=ok(e);if(t===void 0||![...this.#n.resources.values()].includes(t))throw TypeError(`expose takes a resource declared by this object`);return new nk(t)}register(e,t){if(!this.#e.hostLifetime)throw bw(`not_host_lifetime`,`${this.#e.typeName}: only objects of lifetime "host" may register`);for(let[n,r]of Object.entries(t)){let t=`${e.name}\u0000${n}`;this.#i(this.#n.registrations,`register`,t),this.#n.registrations.set(t,{registry:e,key:n,value:r})}}};function Ek(e){let{run:t,migrated:n,service:r,object:i}=e,a=Ck(r,t.implementation);for(let[e,t]of n)for(let n of a.get(e)??[])Dw(`state`,`${i.address}: migrated state ${e.key}`,n,t);let o=new Map(n),s=[...t.decls.derives].sort(([,e],[,t])=>e.seq-t.seq);for(let[e,t]of s){let n=t.compute(e=>o.has(e)?o.get(e):Dk(e));for(let r of a.get(t)??[])Dw(`state`,`${i.address}: derivation ${e}`,r,n);o.set(t,n)}e.derived=o}function Dk(e){try{return e.value}catch(e){if(yw(e,`not_ready`)||yw(e,`not_in_variant`))return;throw e}}function Ok(e){let t=xw(e,`reload`);return/^reload aborted/.test(t.message.replace(/^[^:]*: /,``))?t:new L(t.code,`reload aborted: ${t.message}`,{cause:t,reason:t.reason,details:t.details})}async function kk(e,t,n){let r=await Ak(e,t,n);try{return await r.prepare(),r.commit()}finally{jk(e)}}async function Ak(e,t,n,r){if(e.reloading)throw new L(`unavailable`,`a reload is already running`,{reason:`reload_running`});e.reloading=!0;try{return new Pk(e,await e.resolve(t),n,r)}catch(t){throw e.reloadEnded(),Ok(t)}}function jk(e){e.reloadEnded()}var Mk=1e3;function Nk(e,t,n){return t()?Promise.resolve(!0):new Promise(r=>{let i=setTimeout(()=>{a(),r(!1)},n),a=e.watchRetirement(()=>{t()&&(clearTimeout(i),a(),r(!0))})})}var Pk=class{host;facets;options;codeVersion;candidates=new Map;abort=new AbortController;closed=[];services=new Map;changed=new Set;removed=new Set;tables=new Map;gated=[];rolledBack=!1;deferred=new Map;facetRuns=new Map;constructor(e,t,n,r){this.host=e,this.facets=t,this.options=n,this.codeVersion=r}async prepare(){try{await this.waitForRetirement(),this.load(),this.checkProviders(),await this.prepareAll(),this.host.gating=this.changed,await this.withDeadline(this.prepareAll(),`activations in flight did not finish`),this.checkRefs(),this.tables=this.host.buildTables(this.entries()),await this.gate(),this.#e(),this.#t()}catch(e){throw await this.rollback(),Ok(e)}}summary(){let e=[...this.candidates.values()].filter(({object:e})=>e.status===`live`);return{codeVersion:this.host.pending?.id??this.host.current.id,previous:this.host.current.id,changed:[...this.changed],removed:[...this.removed],prepared:e.map(({object:e})=>e.address),gated:this.gated.map(({object:e})=>e.address)}}#e(){if(this.rolledBack)throw new L(`aborted`,`reload aborted while preparing`,{reason:`aborted`})}#t(){for(let e of this.candidates.values())e.object.status===`live`&&(e.staged=e.object.stageListeners(e.run.decls));for(let e of this.host.objects.values())e.status===`live`&&e.deferredRuntime&&this.deferred.set(e,e.stageListeners(e.decls))}async waitForRetirement(){let e=this.host,t=e.previous;if(t===void 0)return;let n=this.options.retireDeadline??5e3,r=()=>e.previous!==t;!await Nk(e,()=>r()||e.retirable(),n)&&!r()&&(t.abort.abort(new L(`superseded`,`code version ${t.id} was retired`)),await Nk(e,()=>r()||t.roots.size===0,Math.min(n,Mk))),r()||e.retire()}load(){let e=new Set([...this.facets.map(e=>e.name),...this.options.remove??[]]),t=this.host.current.services;this.services=new Map([...t].filter(([,t])=>!e.has(t.facet)));for(let e of this.facets){let t=new AbortController;this.facetRuns.set(e.name,t),e.setup(this.host.facetApi(((t,n,r={})=>this.host.serveInto(this.services,$O(t,n,r,e.name))),t.signal))}for(let[e,n]of this.services)t.get(e)!==n&&this.changed.add(e);for(let e of t.keys())this.services.has(e)||this.removed.add(e);this.host.pending={id:this.host.nextCodeVersionId(this.codeVersion),services:this.services,tables:new Map,roots:new Map,abort:new AbortController}}async withDeadline(e,t){let n=this.options.gateDeadline??5e3,r,i=new Promise((e,i)=>{r=setTimeout(()=>i(new L(`aborted`,`${t} within ${n} ms`,{reason:`deadline`})),n)});try{return await Promise.race([e,i])}finally{clearTimeout(r)}}checkProviders(){for(let e of this.changed){let t=this.services.get(e).contract,n=this.host.current.services.get(e)?.contract;if(n===void 0||n.version!==t.version)continue;let r=nT(t.description,n.description);if(r!==void 0)throw new L(`contract_mismatch`,`${e}@${t.version} changed incompatibly without a version bump (${r})`)}let e=new Map(this.host.facets);for(let t of this.facets)e.set(t.name,t);for(let t of this.options.remove??[])e.delete(t);for(let t of e.values())for(let e of t.uses??[]){let t=this.services.get(e.name);t!==void 0&&this.changed.has(e.name)&&aT(t.contract,t.options.accepts,e)}}async prepareAll(){for(;;){let e=[...this.host.objects.values()].filter(e=>this.changed.has(e.typeName)&&!this.candidates.has(e)&&e.service!==this.services.get(e.typeName)&&(e.status===`live`||e.status===`activating`));if(e.length===0)return;await Promise.allSettled(e.map(e=>e.ready)),this.#e();for(let t of e)t.status===`live`&&t.service!==this.services.get(t.typeName)&&(await this.prepareObject(t),this.#e())}}async prepareObject(e){let t=this.services.get(e.typeName),n=e.run(t,e.decls),r={object:e,service:t,run:n,reasons:[],atGate:[],replaced:[],migrated:new Map,derived:new Map,staged:void 0};this.candidates.set(e,r);for(let[t,i]of n.decls.cells){if(e.decls.cells.get(t)!==i)continue;let a=e.decls.cellVersions.get(t)??1,o=n.decls.cellVersions.get(t)??1;if(o<a)throw bw(`state`,`${e.address}: version of state ${t} lowered from ${a} to ${o}`);if(o>a)r.reasons.push(`state ${t} version ${a} -> ${o}`);else if(!Ew(i.schema,n.decls.cellSchemas.get(t)))throw bw(`state`,`${e.address}: schema of state ${t} changed without a version bump`)}let i=new Set;for(let e of n.created.resources)(e.exclusive||e.deps.some(e=>i.has(e)))&&i.add(e);for(let t of i){r.atGate.push(t);let n=e.decls.resources.get(t.key);t.exclusive&&n?.exclusive&&n.state===`open`&&r.replaced.push(n)}i.size>0&&r.reasons.push(`exclusive resource replaced`),await e.open(n.created.resources.filter(e=>!i.has(e)),n.created.refs,this.abort.signal),await e.waitHydrated(n),r.reasons.length===0&&(await e.initCells(n,this.abort.signal),Ek(r))}checkRefs(){let e=new Set;for(let{object:t,run:n}of this.candidates.values())for(let r of t.decls.refs.values())[...n.decls.refs.values()].includes(r)||e.add(r);for(let t of this.host.objects.values()){let n=this.services.get(t.typeName);if(n!==void 0&&this.changed.has(t.typeName))for(let r of t.refs)r!==this.host.hostObjects.get(t.typeName)&&!e.has(r)&&r.owner!==`client`&&aT(n.contract,n.options.accepts,r.contract)}}entries(){return this.host.liveDecls(!0).filter(([e])=>!this.removed.has(e.typeName)).map(([e,t])=>[e,this.candidates.get(e)?.run.decls??t])}async gate(){this.gated=[...this.candidates.values()].filter(e=>e.reasons.length>0&&e.object.status===`live`);let e=this.gated.map(({object:e})=>{let t=new Set(e.leases.keys());return new Promise(n=>{e.gate={grandfathered:t,queue:[],drained:n},e.stopTasks(),t.size===0&&n()})}),t=this.options.gateDeadline??5e3,n,r=await Promise.race([Promise.all(e).then(()=>!1),new Promise(e=>{n=setTimeout(()=>e(!0),t)})]);if(clearTimeout(n),r){let e=this.gated.flatMap(({object:e})=>[...e.gate?.grandfathered??[]]);throw new L(`aborted`,`gate deadline (${t} ms) missed; blocking roots: ${e.join(`, `)}`,{reason:`gate_deadline`,details:{blocking:e}})}this.#e();for(let e of this.gated){let{object:t}=e;for(let n of e.replaced)this.closed.push([t,n]),await n.close(t.openOrder);await t.open(e.atGate,[],this.abort.signal),this.#e(),await t.initCells(e.run,this.abort.signal),this.#e()}for(let e of this.gated)this.migrate(e)}migrate(e){let{object:t,run:n}=e;for(let[r,i]of n.decls.cells){if(t.decls.cells.get(r)!==i)continue;let a=n.decls.cellSchemas.get(r),o=t.decls.cellVersions.get(r)??1,s=n.decls.cellMigrations.get(r),c;if((n.decls.cellVersions.get(r)??1)>o&&s!==void 0)c=s(structuredClone(i.value),o);else if(!Ew(i.schema,a))c=i.value;else continue;Dw(`state`,`${t.address}: migrated state ${r}`,a,c),e.migrated.set(i,c)}Ek(e)}async rollback(){if(this.rolledBack)return;this.rolledBack=!0,this.abort.abort(new L(`aborted`,`reload aborted`));for(let e of this.facetRuns.values())e.abort(new L(`aborted`,`reload aborted`));let e=e=>this.host.report(e);for(let e of this.candidates.values())e.staged?.discard();for(let e of this.deferred.values())e.discard();for(let{object:t,run:n}of this.candidates.values())t.pending.delete(n.decls),await t.unwind(n).catch(e);for(let[t,n]of this.closed)n.state===`closed`&&await n.open(new AbortController().signal,t.openOrder).catch(r=>{n.markUnavailable(),e(new L(`unavailable`,`${t.address}: resource ${n.key} could not be restored`,{cause:r}))});for(let{object:e}of this.gated)e.gate!==void 0&&(e.openGate(),e.startTasks());let t=new L(`gone`,`reload aborted; type not served`);for(let n of[...this.host.objects.values()])this.host.current.services.has(n.typeName)||await n.dispose(!0,t).catch(e);this.host.pending=void 0,this.host.gating=void 0}commit(e){try{return IO(()=>{let t=this.#r();e?.();for(let e of this.#n.splice(0))e();return t})}catch(e){throw this.host.fail(e),Ok(e)}}#n=[];#r(){let e=this.host,t=e.current,n=e.pending;e.pending=void 0,e.codeVersions.set(n.id,n),e.previous=t,e.current=n;let r=[];for(let i of[...e.objects.values()]){if(this.removed.has(i.typeName))continue;let e=this.candidates.get(i);if(e===void 0){let e=i.implementations.get(t.id);e!==void 0&&i.implementations.set(n.id,{...e,codeVersion:n.id})}else i.status===`live`&&(this.install(e,n.id),r.push(i.address))}for(let{object:t,run:n,staged:r}of this.candidates.values())t.status!==`live`&&(r?.discard(),t.pending.delete(n.decls),t.unwind(n).catch(t=>e.report(t)));for(let[e,t]of this.deferred)e.status===`live`?(e.deferredRuntime=!1,t.activate(),this.#n.push(()=>e.startTasks())):t.discard();e.installTables(n,this.tables,!0);let i=new L(`gone`,`type no longer served`);for(let t of[...e.objects.values()])this.removed.has(t.typeName)&&t.dispose(!0,i).catch(t=>e.report(t));for(let t of this.removed)e.hostObjects.delete(t);for(let t of this.facets)e.facets.set(t.name,t);for(let t of this.options.remove??[])e.facets.delete(t);for(let[t,n]of this.facetRuns)this.#n.push(()=>e.facetRunChanged(t,n));for(let t of this.options.remove??[])this.#n.push(()=>e.facetRunChanged(t,void 0));e.gating=void 0;for(let[t,n]of this.services){ek(n)&&this.changed.has(t)&&e.hostObjects.get(t)?.object?.status!==`live`&&this.#n.push(()=>e.startHostObject(n));let r=e.hostObjects.get(t);!ek(n)&&r!==void 0&&(e.hostObjects.delete(t),this.#n.push(()=>r.release()))}return{codeVersion:n.id,previous:t.id,changed:[...this.changed],removed:[...this.removed],prepared:r,gated:this.gated.map(({object:e})=>e.address)}}install(e,t){let{object:n,run:r,service:i}=e,a=e.reasons.length>0;if(n.pending.delete(r.decls),n.stopTasks(),a){let e=new Set(r.decls.derives.values());for(let t of n.decls.derives.values())e.has(t)||t.detach()}n.decls=r.decls,n.service=i;for(let[e,t]of r.decls.adopted)e.adopt(t);if(n.implementations.set(t,{codeVersion:t,service:i,implementation:r.implementation,decls:r.decls}),a){n.minCodeVersion=t;for(let e of[...n.implementations.keys()])e!==t&&this.host.retireImplementation(n,e)}n.refreshSchemas();for(let[t,n]of r.decls.cells){let i=r.decls.cellSchemas.get(t);e.migrated.has(n)?n.reset(e.migrated.get(n),i):n.schema=i}let o=new Set(r.created.derives);for(let t of r.created.derives)t.attach(e.derived);for(let e of r.decls.derives.values())o.has(e)||e.refresh();e.staged?.activate(),this.#n.push(()=>n.startTasks()),n.openGate();let s=this.host.hostObjects.get(n.typeName);if(s?.object===n&&s.contract.fingerprint!==i.contract.fingerprint){let e=new vk(n,i.contract,`host`);n.addRef(e),this.host.hostObjects.set(n.typeName,e),s.release()}for(let e of[...n.refs]){if(e.owner===`client`)try{aT(i.contract,i.options.accepts,e.contract)}catch(t){e.gone(new L(`upgrade_required`,`${n.typeName} changed; reload the web facets`,{cause:t})),n.release(e);continue}e.shapeChanged()}}},Fk=tc({minimum:1}),Ik=gc({minLength:1}),Lk=tc({minimum:1}),Rk=e=>Gs(Co(e)),zk=P({rootId:Ik,codeVersion:tc({minimum:1})}),Bk=P({code:ss(_w),message:gc(),reason:N(gc())}),Vk=P({remove:N(Rk(gc())),gateDeadline:N(fc()),retireDeadline:N(fc())}),Hk=P({codeVersion:tc(),previous:tc(),changed:Rk(gc()),removed:Rk(gc()),prepared:Rk(gc()),gated:Rk(gc())}),Uk=vc([P({t:F(`hello`),protocol:N(tc({minimum:1})),name:Ik,kind:vc([F(`host`),F(`client`)]),codeVersion:tc({minimum:0}),acks:N(Qs())}),P({t:F(`ack`),n:tc({minimum:1})}),P({t:F(`hold`),id:Fk,at:Ik,token:Yw,input:Jo(),principal:N(Jo()),origin:N(Ik),state:N(F(!1)),again:N(F(!0))}),P({t:F(`release`),id:Fk}),P({t:F(`shape`),id:Fk,variant:N(gc()),members:Rk(gc()),contract:gc(),state:Rk(Ik)}),P({t:F(`gone`),id:Fk,error:Bk}),P({t:F(`call`),id:Fk,hold:Fk,member:Ik,args:N(Jo()),root:N(zk)}),P({t:F(`result`),id:Fk,value:N(Jo()),error:N(Bk)}),P({t:F(`cancel`),id:Fk}),P({t:F(`sub`),hold:Fk}),P({t:F(`unsub`),hold:Fk}),P({t:F(`resync`),hold:Fk,m:Ik}),P({t:F(`state`),hold:Fk,m:Ik,as:vc([F(`snap`),F(`reset`),F(`ops`),F(`error`)]),value:N(Jo()),ops:N(Rk(Rk(Jo()))),error:N(Bk)}),P({t:F(`ping`),n:tc()}),P({t:F(`pong`),n:tc()}),P({t:F(`bye`),reason:N(gc())}),P({t:F(`root_end`),rootId:Ik}),P({t:F(`invalidate`),pattern:ql(gc(),Jo())}),P({t:F(`prepare`),reload:Lk,codeVersion:tc({minimum:1}),plugins:Rk(gc()),options:Vk}),P({t:F(`vote`),reload:Lk,error:N(Bk),report:N(Hk)}),P({t:F(`commit`),reload:Lk}),P({t:F(`retire`),codeVersion:tc({minimum:1})}),P({t:F(`abort`),reload:Lk})]),Wk=e=>zC(Uk,e);function Gk(e){return e instanceof L?e.reason===void 0?{code:e.code,message:e.message}:{code:e.code,message:e.message,reason:e.reason}:{code:`unavailable`,message:e instanceof Error?e.message:String(e)}}var Kk=e=>new L(e.code,e.message.replace(/^[a-z_]+(\/[a-z_]+)?: /,``),{reason:e.reason}),qk=0,Jk=(e,t)=>{let n;for(let r of Object.entries(e??{}))t?.startsWith(r[0])&&(n===void 0||r[0].length>n[0].length)&&(n=r);return[...n?.[1]??[]]};function Yk(e,t,n){let r;return new Promise((i,a)=>{e.votes.set(t,{resolve:i,reject:a}),r=setTimeout(()=>{e.votes.delete(t),a(new L(`aborted`,`votes missing after ${n} ms`,{reason:`vote_deadline`}))},n)}).finally(()=>clearTimeout(r))}async function Xk(e,t,n){let r=[...e.connections].filter(e=>e.role===`downstream`&&e.peer.kind===`host`&&e.open&&e.synced),i=e.peekNextCodeVersion(),a=await Ak(e,t,n,i);try{await a.waitForRetirement();let t=r.filter(e=>e.open),o=++qk,s=n.voteDeadline??(n.gateDeadline??5e3)+(n.retireDeadline??5e3)+5e3,c=t.map(e=>{let t=e.name??`child`,r=Yk(e,o,s);return e.send({t:`prepare`,reload:o,codeVersion:i,plugins:Jk(n.remote,t),options:{remove:Jk(n.remoteRemove,t),gateDeadline:n.gateDeadline,retireDeadline:n.retireDeadline}}),r.then(e=>[t,e],e=>{let n=Ok(e);throw new L(n.code,`${t}: ${n.message}`,{cause:n,reason:n.reason})})}),l=!1,u=await Promise.allSettled([a.prepare().then(()=>{l=!0}),...c]),d=u.find(e=>e.status===`rejected`);if(d!==void 0){for(let e of t)e.votes.delete(o),e.send({t:`abort`,reload:o});throw l&&await a.rollback(),d.reason}let f=a.commit(()=>{for(let e of t)e.send({t:`commit`,reload:o}),e.peerCodeVersion=i});e.rememberRemoteModules(n.remote,n.remoteRemove);let p={};for(let e of u.slice(1)){if(e.status!==`fulfilled`)continue;let[t,n]=e.value;n!==void 0&&(p[t]=n)}return{...f,children:p}}finally{jk(e)}}async function Zk(e,t){for(;;){if(!t.open)return;if(e.reloading){await e.whenReloadEnded();continue}let n=e.current.id;if(t.peerCodeVersion===n){t.markSynced(n),e.announceRetired(t);return}e.announceRetired(t);let r=++qk,i=Yk(t,r,3e4);t.send({t:`prepare`,reload:r,codeVersion:n,plugins:Jk(e.remoteModules,t.name),options:{remove:Jk(e.remoteRemoved,t.name)}}),await i,e.current.id===n?(t.send({t:`commit`,reload:r}),t.peerCodeVersion=n):t.send({t:`abort`,reload:r})}}var Qk=class{#e;#t;constructor(e){this.#e=e}handle(e,t){if(t.t===`prepare`){if(this.#t!==void 0){let n=new L(`unavailable`,`a reload is already running`,{reason:`reload_running`});e.send({t:`vote`,reload:t.reload,error:Gk(n)});return}let n={id:t.reload,reload:void 0,state:`loading`,cancelled:!1};this.#t=n,this.#r(n,e,t).catch(e=>this.#e.report(e));return}let n=this.#t;if(n!==void 0&&n.id===t.reload){if(t.t===`abort`)this.#n(n);else if(n.state===`prepared`){this.#t=void 0;try{n.reload?.commit()}finally{jk(this.#e)}}}}parentLost(){this.#t!==void 0&&this.#n(this.#t)}#n(e){e.cancelled=!0,e.state===`prepared`?(this.#t=void 0,e.reload?.rollback().catch(e=>this.#e.report(e)).finally(()=>jk(this.#e))):e.reload?.rollback().catch(e=>this.#e.report(e))}async#r(e,t,n){let r=()=>new L(`aborted`,`reload aborted by the server`,{reason:`aborted`});try{if(e.reload=await Ak(this.#e,n.plugins,n.options,n.codeVersion),e.cancelled||(e.state=`preparing`,await e.reload.prepare(),e.cancelled))throw r();e.state=`prepared`,t.send({t:`vote`,reload:n.reload,report:e.reload.summary()})}catch(r){e.reload!==void 0&&(await e.reload.rollback().catch(e=>this.#e.report(e)),jk(this.#e)),this.#t===e&&(this.#t=void 0),e.cancelled||t.send({t:`vote`,reload:n.reload,error:Gk(r)})}}},$k=class{#e;#t=[];#n=new Set;#r=!1;#i;get closed(){return this.#r}send(e){if(!this.#r)return this.transmit(e)}receive(e){this.#e=e;for(let t of this.#t.splice(0))e(t)}onClose(e){this.#r?e(`closed`):this.#n.add(e)}close(e=`closed`){if(!this.#r){try{this.transmit({t:`bye`,reason:e})}catch{}this.ended(e)}}deliver(e){this.#i===void 0?this.#a(e):this.deliverLater(Promise.resolve(e))}deliverLater(e){let t=(this.#i??Promise.resolve()).then(()=>e).then(e=>this.#a(e),()=>this.close(`protocol error`)).finally(()=>{this.#i===t&&(this.#i=void 0)});this.#i=t}#a(e){this.#r||(e.t===`bye`?this.ended(e.reason??`peer closed`):this.#e===void 0?this.#t.push(e):this.#e(e))}ended(e){if(!this.#r){this.#r=!0,this.#t=[];try{this.shutdown()}finally{for(let t of this.#n)t(e);this.#n.clear()}}}},eA=globalThis.process?.getBuiltinModule?.(`node:zlib`),tA=class{bytes;constructor(e){this.bytes=e}};function nA(e){if(!(e instanceof tA))return e;if(eA===void 0)throw TypeError(`packed payload without zlib`);return JSON.parse(eA.inflateRawSync(e.bytes).toString(`utf8`))}var rA=new Set([`args`,`value`]);function iA(e){if(e.t===`call`)return e.args===void 0?void 0:`args`;if(e.t===`result`||e.t===`state`)return e.value===void 0?void 0:`value`}function aA(e,t){let n={...e};return delete n[t],n}function oA(e,t,n){if(e instanceof tA)return e.bytes;if(!(!t||eA===void 0||n===void 0||n.length<=65536))return eA.deflateRawSync(n,{level:1})}function sA(e){if(typeof e!=`object`||!e||!(`z`in e))return e;let{z:t,...n}=e;if(!Array.isArray(t)||!rA.has(t[0])||typeof t[1]!=`string`)throw TypeError(`bad packed payload`);return{...n,[t[0]]:new tA(Buffer.from(t[1],`base64`))}}var cA=new TextEncoder,lA=new TextDecoder;function uA(e,t){let n=iA(e);if(n===void 0)return JSON.stringify(e);let r=e[n],i=r instanceof tA?void 0:JSON.stringify(r),a=oA(r,t,i),o=aA(e,n);if(a===void 0)return`${JSON.stringify(o).slice(0,-1)},${JSON.stringify(n)}:${i}}`;let s=cA.encode(JSON.stringify({...o,z:n})),c=new Uint8Array(4+s.byteLength+a.byteLength);return new DataView(c.buffer).setUint32(0,s.byteLength),c.set(s,4),c.set(a,4+s.byteLength),c}function dA(e){let t=new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(0),n=JSON.parse(lA.decode(e.subarray(4,4+t)));if(typeof n!=`object`||!n)throw TypeError(`bad envelope`);let{z:r,...i}=n;if(typeof r!=`string`||!rA.has(r))throw TypeError(`bad packed payload`);return{envelope:i,field:r,bytes:e.slice(4+t)}}async function fA(e){let t=new Blob([e]).stream().pipeThrough(new DecompressionStream(`deflate-raw`));return JSON.parse(await new Response(t).text())}function pA(e){let t=sA(JSON.parse(e));if(typeof t!=`object`||!t||typeof t.t!=`string`)throw TypeError(`not a frame`);return t}var mA=1,hA=class extends $k{#e;#t;#n=[];constructor(e,t={}){super(),this.#e=e,this.#t=t.compress??!1;let n=t.acceptPacked??!0;`binaryType`in e&&(e.binaryType=`arraybuffer`),e.addEventListener(`open`,()=>{for(let t of this.#n.splice(0))e.send(t)}),e.addEventListener(`message`,e=>{try{let t=e.data;if(typeof t==`string`){this.deliver(pA(t));return}if(!n)throw TypeError(`packed frames are not accepted`);let r=t instanceof ArrayBuffer?new Uint8Array(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):void 0;if(r===void 0)throw TypeError(`unknown message type`);let{envelope:i,field:a,bytes:o}=dA(r);eA===void 0?this.deliverLater(fA(o).then(e=>({...i,[a]:e}))):this.deliver({...i,[a]:new tA(o)})}catch{this.close(`protocol error`)}}),e.addEventListener(`close`,()=>this.ended(`socket closed`))}transmit(e){let t=uA(e,this.#t);return this.#e.readyState===mA?this.#e.send(t):this.#n.push(t),typeof t==`string`?t.length:t.byteLength}shutdown(){this.#n=[],this.#e.readyState<=mA&&this.#e.close(1e3)}},gA=(e,t)=>new hA(e,t),_A=262144,vA=4,yA=e=>new L(`unavailable`,e),bA=class{origin;frame;principal;originTag;generation;down;downId=0;closed=!1;stateWanted;urgent;#e=!1;awaiting=new Set;calls=new Map;#t=new Set;constructor(e,t,n,r){this.origin=e,this.frame=t,this.principal=n,this.originTag=r,this.stateWanted=t.state!==!1,this.generation=e.generation}get originId(){return this.frame.id}get client(){return this.originTag!==void 0}get current(){return!this.closed&&this.origin.open&&this.origin.generation===this.generation}ready(){return this.closed?Promise.reject(new L(`gone`,`relayed hold closed`)):this.down===void 0?new Promise((e,t)=>{this.#t.add({resolve:e,reject:t})}):Promise.resolve(this.down)}open(e){if(this.closed)return;this.down=e,this.downId=e.nextId(),e.relayedRefs.set(this.downId,this);let{at:t,token:n,input:r}=this.frame;e.send({t:`hold`,id:this.downId,at:t,token:n,input:r,principal:this.principal,...this.originTag===void 0?{}:{origin:this.originTag},...this.stateWanted?{}:{state:!1},...this.frame.again===!0?{again:!0}:{}});for(let t of this.#t)t.resolve(e);this.#t.clear()}wantState(e){this.closed||e===this.stateWanted||(this.stateWanted=e,e||(this.origin.dropHoldState(this.originId),this.awaiting.clear()),this.down?.send({t:e?`sub`:`unsub`,hold:this.downId}))}resync(e){this.closed||(this.awaiting.add(e),this.down?.send({t:`resync`,hold:this.downId,m:e}))}shape(e){this.closed||(this.#e||(this.#e=!0,this.frame.again!==!0&&(this.urgent=new Set(e.state))),this.origin.send({...e,id:this.originId}))}state(e){if(this.closed)return;let t=e.m;if(this.awaiting.has(t)){if(e.as===`ops`)return;this.awaiting.delete(t)}let n={...e,hold:this.originId};this.urgent?.delete(t)===!0?this.origin.send(n):this.origin.sendState(n,{resync:()=>this.resync(t)})}close(e,t){if(!this.closed){this.closed=!0;for(let n of[...this.calls.values()])n.cancel(e,t.releaseDown);this.origin.dropHoldState(this.originId),this.origin.served.get(this.originId)?.kind===`relay`&&this.origin.served.delete(this.originId),this.down!==void 0&&(this.down.relayedRefs.delete(this.downId),t.releaseDown&&this.down.send({t:`release`,id:this.downId}));for(let t of this.#t)t.reject(e);this.#t.clear(),t.notify&&this.origin.send({t:`gone`,id:this.originId,error:Gk(e)})}}},xA=class{relay;originId;downId;#e;#t=!1;constructor(e,t,n,r){this.relay=e,this.originId=t,this.downId=n,this.#e=r,e.calls.set(t,this),e.down?.relayedCalls.set(n,this)}finish(e,t){this.#t||(this.#t=!0,this.relay.calls.delete(this.originId),this.relay.down?.relayedCalls.delete(this.downId),e===void 0?this.#e.resolve(t):this.#e.reject(e))}cancel(e,t){this.#t||(t&&this.relay.down?.send({t:`cancel`,id:this.downId}),this.finish(e))}},SA=class{host;link;role;peer;originId;principal;restamp;generation=0;peerCodeVersion;synced;fencedCodeVersions=new Set;#e=new Map;#t;#n=new Set;#r=1;#i=Date.now();#a;#o;#s;#c;#l;#u=0;#d=0;#f=[];#p=0;#m=new Map;#h=0;#g=0;#_;#v;#y=!1;remotes=new Map;calls=new Map;served=new Map;incoming=new Map;relayedRefs=new Map;relayedCalls=new Map;votes=new Map;constructor(e,t,n){this.host=e,this.link=t,this.role=n.role,this.peer=n.peer,this.originId=n.originId,this.principal=n.principal,this.restamp=n.restamp,this.synced=this.role!==`downstream`||this.peer.kind!==`host`,this.#s=n.window??_A,this.#c=n.pendingCap??this.#s*vA,this.#o=n.maxCalls??1/0,this.#v=n.onProtocolMismatch,t.onClose(e=>this.#Q(e)),t.receive(e=>this.#A(e)),this.send({t:`hello`,protocol:4,name:e.name,kind:e.kind,codeVersion:e.current.id,acks:!0});let r=n.pingInterval??15e3,i=n.pingTimeout??45e3;if(t.closed)return;let a=0;this.#a=setInterval(()=>{Date.now()-this.#i>i?t.close(`ping timeout`):this.send({t:`ping`,n:++a})},r),this.#a.unref?.()}get open(){return!this.link.closed}get name(){return this.role===`upstream`?this.#t:this.peer.name}send(e){let t=this.link.send(e)??0;this.#l!==!1&&(this.#u++,this.#f.push(t),this.#p+=t)}sendState(e,t){let n=CA(e.hold,e.m),r=this.#m.get(n);if(r===void 0&&!this.#w){this.send(e);return}if(r?.kind===`unit`)return;if(r===void 0&&(r={kind:`state`,hold:e.hold,m:e.m,base:void 0,ops:[],size:0,lazy:!1,overflow:t},this.#m.set(n,r)),e.as!==`ops`){this.#h-=r.size,r.base=e,r.ops=[],r.size=0,r.lazy=!1;return}if(r.lazy)return;let i=JSON.stringify(e.ops).length;if(this.#h+i>this.#c&&this.#b(i,r),!(r.lazy||this.#m.get(n)!==r)){for(let t of e.ops??[])r.ops.push(t);r.size+=i,this.#h+=i}}#b(e,t){for(let n of[...this.#m.values()]){if(this.#h+e<=this.#c)return;n.kind===`state`&&n!==t&&n.size>0&&this.#x(n)}this.#h+e>this.#c&&this.#x(t)}#x(e){this.#h-=e.size,e.base=void 0,e.ops=[],e.size=0,`resend`in e.overflow?e.lazy=!0:(this.#m.delete(CA(e.hold,e.m)),e.overflow.resync())}#S(e,t,n){let r=CA(e,t),i=this.#m.get(r);i?.kind!==`unit`&&(i===void 0?(i={kind:`state`,hold:e,m:t,base:void 0,ops:[],size:0,lazy:!0,overflow:{resend:n}},this.#m.set(r,i)):(this.#h-=i.size,i.base=void 0,i.ops=[],i.size=0,i.lazy=!0),this.#E())}#C(e,t){let n=wA(e);this.#m.has(n)||this.#m.set(n,{kind:`unit`,hold:e,flush:t}),this.#E()}dropState(e,t){let n=this.#m.get(CA(e,t));n?.kind===`state`&&(this.#h-=n.size,this.#m.delete(CA(e,t)))}dropHoldState(e){for(let[t,n]of this.#m)n.hold===e&&(n.kind===`state`&&(this.#h-=n.size),this.#m.delete(t))}get waiting(){return{slots:this.#m.size,bytes:this.#h}}get#w(){return this.#l===!0&&this.#p>=this.#s}#T(e){if(this.#l!==!0||e<this.#d||e>this.#u)this.#k(`ack ${e} outside ${this.#d}..${this.#u}`);else{for(let t of this.#f.splice(0,e-this.#d))this.#p-=t;this.#d=e,this.#E()}}#E(){for(let[e,t]of this.#m){if(this.#w)return;this.#m.delete(e),t.kind===`unit`?t.flush():(this.#h-=t.size,t.lazy?`resend`in t.overflow&&t.overflow.resend():(t.base!==void 0&&this.send(t.base),t.ops.length>0&&this.send({t:`state`,hold:t.hold,m:t.m,as:`ops`,ops:t.ops})))}}#D(){this.#l===!0&&this.#_===void 0&&this.open&&(this.#_=setTimeout(()=>{this.#_=void 0,this.link.send({t:`ack`,n:this.#g})},0),this.#_.unref?.())}nextId(){return this.#r++}whenSynced(){return this.open?this.synced?Promise.resolve():new Promise((e,t)=>this.#n.add({resolve:e,reject:t})):Promise.reject(yA(`link to ${this.name??`peer`} closed`))}markSynced(e){this.peerCodeVersion=e,this.synced=!0;for(let e of this.#n)e.resolve(void 0);this.#n.clear()}revoke(e){this.generation++;let t=new L(`gone`,`principal invalidated`);for(let e of[...this.served.values()])e.kind===`relay`&&e.relay.close(t,{releaseDown:!0,notify:!0});e===void 0?this.link.close(`principal invalidated`):this.principal=e}#O(e,t=!0){if(!this.#y){this.#y=!0;try{this.#v?.({local:4,peer:e})}catch(e){this.host.report(e)}t&&this.link.close(`protocol-version 4`)}}#k(e){this.host.report(new L(`invalid`,`link to ${this.name??`peer`}: ${e}`,{reason:`protocol`})),this.link.close(`protocol error: ${e}`)}hold(e,t){let n=this.nextId();this.remotes.set(n,e),e.bound(this,n);let r=e.principal;return this.send({t:`hold`,id:n,at:e.at,token:e.contract.description,input:e.input,...r===void 0?{}:{principal:r},...e.stateOn?{}:{state:!1},...t?{again:!0}:{}}),n}release(e){this.remotes.delete(e),this.send({t:`release`,id:e})}wantState(e,t){this.remotes.has(e)&&this.send({t:t?`sub`:`unsub`,hold:e})}call(e,t,n,r,i){let a=this.nextId();return new Promise((o,s)=>{if(i.aborted){s(new L(`aborted`,`call aborted`));return}let c=()=>{this.calls.delete(a),this.send({t:`cancel`,id:a}),s(new L(`aborted`,`call aborted`,{cause:i.reason}))};i.addEventListener(`abort`,c,{once:!0});let l=()=>i.removeEventListener(`abort`,c);this.calls.set(a,{resolve:e=>{l(),o(e)},reject:e=>{l(),s(e)}});let u=r!==void 0&&this.host.kind===`host`;u&&this.host.rootSent(r.rootId,this),this.send({t:`call`,id:a,hold:e,member:t,args:n,...u?{root:r}:{}})})}#A(e){if(!this.#y){if(this.#i=Date.now(),!Wk(e))this.#k(`malformed frame`);else if(e.t===`ack`)this.#T(e.n);else{this.#g++;try{this.#j(e)}catch(e){this.host.report(e)}this.#D()}}}#j(e){switch(e.t){case`hello`:this.#M(e);return;case`ping`:this.send({t:`pong`,n:e.n});return;case`pong`:case`bye`:case`ack`:return;case`hold`:this.#F(e);return;case`release`:this.#K(e.id,!0);return;case`call`:this.#q(e);return;case`cancel`:this.incoming.get(e.id)?.abort(new L(`aborted`,`cancelled by caller`));return;case`sub`:case`unsub`:this.#W(e.hold,e.t===`sub`);return;case`resync`:this.#G(e.hold,e.m);return;case`shape`:case`gone`:this.#Y(e);return;case`result`:this.#X(e);return;case`state`:this.#Z(e);return;case`root_end`:this.#e.delete(e.rootId),this.host.foreignRootEnded(e.rootId,this);return;case`invalidate`:case`prepare`:case`commit`:case`abort`:case`retire`:if(this.role!==`upstream`){this.#k(`${e.t} from a child`);return}e.t===`invalidate`?this.host.invalidatePrincipal(e.pattern).catch(e=>this.host.report(e)):e.t===`retire`?this.host.allowRetire(e.codeVersion):this.host.onReloadFrame(this,e);return;case`vote`:{if(this.role!==`downstream`||this.peer.kind!==`host`){this.#k(`vote from a non-participant`);return}let t=this.votes.get(e.reload);this.votes.delete(e.reload),e.error===void 0?t?.resolve(e.report):t?.reject(Kk(e.error));return}}}#M(e){if((e.protocol??1)!==4)this.#O(e.protocol??1);else if(this.#l===void 0&&(this.#l=e.acks===!0,this.#l||(this.#f=[],this.#p=0)),this.role===`upstream`){if(e.kind!==`host`){this.#k(`parent is not a host`);return}this.#t??=e.name}else e.kind!==this.peer.kind||this.peer.name!==void 0&&e.name!==this.peer.name?this.#k(`hello ${e.kind} ${e.name} does not match the accepted ${this.peer.kind} ${this.peer.name??``}`):this.peer.kind===`host`&&this.host.peerHello(this,e.codeVersion)}#N(e){return this.role===`downstream`?this.principal:e.principal??this.principal}#P(e){return this.role===`downstream`?this.originId:e.origin}#F(e){if(this.served.has(e.id)){this.#k(`duplicate hold id ${e.id}`);return}let t=this.#N(e),n=this.#P(e),r=n!==void 0;if(e.at!==this.host.name){if(this.role===`upstream`){this.send({t:`gone`,id:e.id,error:Gk(yA(`${this.host.name} does not relay`))});return}let r=new bA(this,e,t,n);this.served.set(e.id,{kind:`relay`,relay:r}),this.host.relay(r).catch(e=>r.close(e,{releaseDown:!0,notify:!0}));return}let i;try{let n=tT(e.token);if(n.scope!==`remote`)throw bw(`token`,`${n.name} is local; only remote types cross links`);if(Uw(n.name,n.description.host,e.input)!==this.host.name)throw bw(`placement`,`${n.name} with this input does not live on ${this.host.name}`);let a=this.host.acquire(n,e.input,{principal:t},r?`client`:`connection`);if(!(a instanceof vk))throw yA(`not a local reference`);i=a}catch(t){this.send({t:`gone`,id:e.id,error:Gk(r?DA(t):t)});return}let a={kind:`local`,id:e.id,ref:i,principal:t,origin:n,wantsState:e.state!==!1,again:e.again===!0,unitSent:!1,feeds:new Map};this.served.set(e.id,a),i.onShape(()=>this.#L(a)),i.goneListeners.add(t=>{this.served.get(e.id)===a&&(this.#K(e.id,!1),this.send({t:`gone`,id:e.id,error:Gk(t)}))}),i.status===`live`&&this.#L(a)}#I(e,t){return t.members.filter(n=>e.describe(t.variant,n)?.kind===`state`)}#L(e){if(this.served.get(e.id)!==e)return;let t=e.ref.shape;if(t===void 0)return;let n=new Set(e.wantsState?this.#I(e.ref,t):[]);for(let[t,r]of e.feeds)n.has(t)||(r.unsubscribe(),e.feeds.delete(t),this.dropState(e.id,t));e.feeds.size===0&&(!e.again||e.unitSent)?this.#R(e):this.#C(e.id,()=>this.#R(e))}#R(e){if(this.#m.delete(wA(e.id)),this.served.get(e.id)!==e)return;let t=e.ref.shape;if(t===void 0)return;e.unitSent=!0;let n=(e.wantsState?this.#I(e.ref,t):[]).filter(t=>!e.feeds.has(t)),r=[],i=[];for(let t of n){let n=this.#z(e,t);n!==void 0&&(r.push(n.frame),i.push([t,n.feed]))}this.send({t:`shape`,id:e.id,...t.variant===void 0?{}:{variant:t.variant},members:t.members,contract:t.contract,state:r.map(e=>e.m)});for(let e of r)this.send(e);for(let[t,n]of i)this.#B(e,t,n)}#z(e,t,n=`snap`){let r=e.ref.member(t);if(r===void 0||typeof r.events!=`function`)return;let i={unsubscribe:()=>{},encoder:AO(),buffer:[]},a;return i.unsubscribe=r.events(n=>{a===void 0?a=n:i.buffer===void 0?this.#H(e,t,i,n):i.buffer.push(n)}),e.feeds.set(t,i),{frame:this.#V(e,t,n,a?.value),feed:i}}#B(e,t,n){let r=n.buffer??[];n.buffer=void 0;for(let i of r)this.#H(e,t,n,i)}#V(e,t,n,r){try{EA(e.ref,t,r)}catch(n){return{t:`state`,hold:e.id,m:t,as:`error`,error:Gk(n)}}return{t:`state`,hold:e.id,m:t,as:n,...r===void 0?{}:{value:r}}}#H(e,t,n,r){if(e.feeds.get(t)!==n)return;let i={resend:()=>this.#U(e,t)};r.type===`ops`?this.sendState({t:`state`,hold:e.id,m:t,as:`ops`,ops:n.encoder.encode(r.ops)},i):(n.encoder=AO(),this.sendState(this.#V(e,t,`reset`,r.value),i))}#U(e,t){let n=e.feeds.get(t);if(n===void 0||this.served.get(e.id)!==e)return;n.unsubscribe(),e.feeds.delete(t);let r=this.#z(e,t,`reset`);r!==void 0&&(this.send(r.frame),this.#B(e,t,r.feed))}#W(e,t){let n=this.served.get(e);if(n!==void 0){if(n.kind===`relay`)n.relay.wantState(t);else if(n.wantsState!==t){if(n.wantsState=t,t)this.#L(n);else{for(let e of n.feeds.values())e.unsubscribe();n.feeds.clear(),this.dropHoldState(e)}}}}#G(e,t){let n=this.served.get(e);n!==void 0&&(n.kind===`relay`?n.relay.resync(t):n.feeds.has(t)&&this.#S(e,t,()=>this.#U(n,t)))}#K(e,t){let n=this.served.get(e);if(n!==void 0){if(this.served.delete(e),n.kind===`relay`)n.relay.close(new L(`released`,`relayed hold released`),{releaseDown:t,notify:!1});else{for(let e of n.feeds.values())e.unsubscribe();n.feeds.clear(),this.dropHoldState(e),t&&n.ref.release()}}}#q(e){if(this.incoming.has(e.id)){this.#k(`duplicate call id ${e.id}`);return}if(this.incoming.size>=this.#o){let t=new L(`unavailable`,`Too many calls in progress on this connection (${this.#o}); wait for earlier ones to finish`,{reason:`too_many_calls`});this.send({t:`result`,id:e.id,error:Gk(t)});return}let t=this.served.get(e.hold);if(t===void 0){this.send({t:`result`,id:e.id,error:Gk(new L(`gone`,`unknown hold`))});return}let n=new AbortController;this.incoming.set(e.id,n);let r=this.peer.kind===`host`?this.#J(e.root):void 0,i={principal:t.kind===`local`?t.principal:t.relay.principal,signal:n.signal},a=t.kind===`local`?n=>t.ref.object.call(t.ref,e.member,nA(e.args),n):n=>TA(t.relay,e,{rootId:n.rootId,codeVersion:n.codeVersion},n.signal,this.host);(r===void 0?this.host.root(a,i):this.host.joinRoot(r.rootId,r.codeVersion,a,{...i,from:this})).then(t=>this.send({t:`result`,id:e.id,value:t}),t=>this.send({t:`result`,id:e.id,error:Gk(t)})).finally(()=>this.incoming.delete(e.id))}#J(e){if(e===void 0||this.role!==`downstream`||!this.fencedCodeVersions.has(e.codeVersion)||this.host.hasCodeVersion(e.codeVersion))return e;let t=this.#e.get(e.rootId);return t===void 0&&(t=this.host.current.id,this.#e.set(e.rootId,t)),{rootId:e.rootId,codeVersion:t}}#Y(e){let t=this.relayedRefs.get(e.id);if(t!==void 0){e.t===`gone`?t.close(Kk(e.error),{releaseDown:!1,notify:!0}):t.shape(e);return}let n=this.remotes.get(e.id);n!==void 0&&(e.t===`gone`?(this.remotes.delete(e.id),n.gone(Kk(e.error))):n.shaped({variant:e.variant,members:e.members,contract:e.contract},e.state))}#X(e){let t=this.relayedCalls.get(e.id);if(t!==void 0){t.finish(e.error===void 0?void 0:Kk(e.error),e.value);return}let n=this.calls.get(e.id);if(this.calls.delete(e.id),e.error!==void 0){n?.reject(Kk(e.error));return}let r;try{r=nA(e.value)}catch(e){n?.reject(e);return}n?.resolve(r)}#Z(e){let t=this.relayedRefs.get(e.hold);if(t!==void 0){t.state(e);return}let n=this.remotes.get(e.hold);if(n===void 0)return;if(!(e.value instanceof tA)){n.state(e.m,e);return}let r;try{r=nA(e.value)}catch(t){n.state(e.m,{as:`error`,error:Gk(t)});return}n.state(e.m,{...e,value:r})}#Q(e){let t=/^protocol-version (\d+)$/.exec(e);t!==null&&Number(t[1])!==4&&this.#O(Number(t[1]),!1),this.#a!==void 0&&clearInterval(this.#a),this.#_!==void 0&&clearTimeout(this.#_),this.#m.clear(),this.#h=0;let n=yA(`link to ${this.name??`peer`} closed: ${e}`);for(let e of[...this.served.keys()])this.#K(e,!0);for(let e of this.incoming.values())e.abort(n);this.incoming.clear();for(let e of this.calls.values())e.reject(n);this.calls.clear();for(let e of this.votes.values())e.reject(n);this.votes.clear();for(let e of this.#n)e.reject(n);this.#n.clear();for(let e of[...this.relayedRefs.values()])e.close(n,{releaseDown:!1,notify:!0});this.relayedRefs.clear(),this.relayedCalls.clear();let r=[...this.remotes.values()];this.remotes.clear();for(let e of r)this.role===`upstream`?e.detached():e.gone(n);this.host.connectionClosed(this)}},CA=(e,t)=>`s${e}\u0000${t}`,wA=e=>`u${e}`;async function TA(e,t,n,r,i){let a=()=>new L(`aborted`,`call cancelled`,{cause:r.reason});if(r.aborted)throw a();let o=()=>{},s=()=>{},c=new Promise((e,t)=>{o=()=>t(a()),r.addEventListener(`abort`,o,{once:!0})});c.catch(()=>{});try{let o=await Promise.race([e.ready(),c]);if(e.closed)throw new L(`gone`,`relayed hold closed`);return await new Promise((c,l)=>{let u=new xA(e,t.id,o.nextId(),{resolve:c,reject:l});s=()=>u.cancel(a(),!0),r.addEventListener(`abort`,s,{once:!0}),i.rootSent(n.rootId,o),o.send({t:`call`,id:u.downId,hold:e.downId,member:t.member,args:t.args,root:n})})}finally{r.removeEventListener(`abort`,o),r.removeEventListener(`abort`,s)}}function EA(e,t,n){if(n===void 0)return;let r=e.object.currentInstalled();if(r===void 0)return;let i=e.currentView(),a=yk(i===void 0?r.implementation:i),o=i!==void 0&&i!==r.implementation?e.contract.description.variants[a??``]?.[t]:r.service.contract.description.variants[yk(r.implementation)??``]?.[t];o?.kind===`state`&&Dw(`state`,`${e.address}.${t}`,o.schema,n)}function DA(e){return e instanceof L&&e.code===`contract_mismatch`?new L(`upgrade_required`,e.message,{cause:e}):e}var OA=()=>{};function kA(){let e=OA,t=OA,n=new Promise((n,r)=>{e=n,t=r});return n.catch(OA),{promise:n,resolve:e,reject:t}}var AA=class{host;key;contract;at;input;principal;status=`loading`;error;shape;hydrated=!1;hold;stateOn=!1;views=new Set;members=new Map;lingerTimer;#e=new Map;#t;#n=kA();#r=!1;#i=new Set;constructor(e,t){this.host=e,this.key=t.key,this.contract=t.contract,this.at=t.at,this.input=t.input,this.principal=t.principal}get ended(){return this.status===`ended`}get stateViews(){let e=0;for(let t of this.views)t.wantsState&&e++;return e}get wantsState(){return this.views.size===0?this.stateOn:this.stateViews>0}get applied(){return this.#r}addView(e){this.views.add(e),this.lingerTimer!==void 0&&(clearTimeout(this.lingerTimer),this.lingerTimer=void 0),this.#a(),e.update()}removeView(e){if(this.views.delete(e)){for(let t of this.#e.values())for(let n of t)n.view===e&&t.delete(n);this.views.size===0?this.host.bindingIdle(this):this.#a()}}#a(){if(this.ended||this.views.size===0)return;let e=this.stateViews>0;if(e!==this.stateOn){this.stateOn=e,e||(this.hydrated=!1,this.members.clear(),this.#t!==void 0&&this.#t.missing.clear()),this.hold!==void 0&&this.hold.channel.wantState(this.hold.id,e);for(let e of this.views)e.update()}}listen(e,t){let n=this.#e.get(e);n===void 0&&(n=new Set,this.#e.set(e,n)),n.add(t)}unlisten(e,t){this.#e.get(e)?.delete(t)}inVariant(e){let t=this.shape?.variant;return t!==void 0&&this.contract.description.variants[t]?.[e]?.kind===`state`}read(e){if(this.status===`ended`)throw this.terminalError();if(!this.hydrated)throw new L(`not_ready`,`${this.key}.${e} is not hydrated yet`);if(!this.inVariant(e))throw new L(`not_in_variant`,`${this.key}: ${e} is not a state member of variant ${this.shape?.variant}`);return this.members.get(e)?.value}whenHydrated(){return this.hydrated?Promise.resolve():this.ended?Promise.reject(this.terminalError()):new Promise((e,t)=>this.#i.add({resolve:e,reject:t}))}#o(e){let t=[...this.#i];this.#i.clear();for(let n of t)e===void 0?n.resolve():n.reject(e)}readable(e){return this.status!==`ended`&&this.hydrated&&this.inVariant(e)}terminalError(){return this.error??new L(`released`,`reference ${this.key} released`)}bound(e,t){this.hold={channel:e,id:t},this.stateOn=this.wantsState}shaped(e,t){if(this.ended)return;let n=this.#t,r=new Set(t);if(n!==void 0)for(let e of n.missing)r.add(e);let i=new Set(this.#s(e));for(let e of[...r])(!i.has(e)||!this.stateOn)&&r.delete(e);this.#t={shape:e,missing:r,values:n?.values??new Map},r.size===0&&this.#c()}state(e,t){if(this.ended)return;if(t.as===`error`){let e=Kk(t.error);!this.hydrated&&this.stateOn?(this.gone(e),this.close()):this.host.report(e);return}let n=this.#t;if(t.as===`ops`){let r=n?.values.get(e)??this.members.get(e);if(r===void 0)return;let i=r.decoder.decode(t.ops??[]);r.value=CO(r.value,i),r===this.members.get(e)&&this.#l(e,{type:`ops`,ops:i,value:r.value});return}let r={value:t.value,decoder:jO()};n!==void 0&&(n.missing.has(e)||n.values.has(e))?(n.values.set(e,r),n.missing.delete(e),n.missing.size===0&&this.#c()):this.inVariant(e)&&(this.members.set(e,r),this.#l(e,{type:`reset`,value:r.value}))}gone(e){if(!this.ended){this.status=`ended`,this.error=e,this.hold=void 0,this.#t=void 0,this.#n.reject(e),this.#o(e);for(let t of[...this.views])t.end(e);this.#e.clear(),this.host.forgetBinding(this)}}detached(){if(!this.ended){this.hold=void 0,this.#t=void 0,this.status===`live`&&(this.status=`loading`,this.#n=kA());for(let e of this.views)e.update()}}close(){if(this.lingerTimer!==void 0&&clearTimeout(this.lingerTimer),this.lingerTimer=void 0,this.hold!==void 0&&this.hold.channel.release(this.hold.id),this.hold=void 0,this.status!==`ended`){this.status=`ended`;let e=new L(`released`,`reference ${this.key} released`);this.#n.reject(e),this.#o(e);for(let t of[...this.views])t.end(e)}this.#t=void 0,this.#e.clear(),this.host.forgetBinding(this)}async call(e,t,n){for(;;){if(this.ended)throw this.terminalError();(this.status!==`live`||this.hold===void 0)&&await fk(this.#n.promise,n.signal);let r=this.hold;if(r===void 0||this.status!==`live`)continue;let i=this.shape?.variant,a=i===void 0?void 0:this.contract.description.variants[i]?.[e];if(a?.kind!==`method`)throw new L(`not_in_variant`,`${this.key}: ${e} is not a method of variant ${i}`);let o=a.args===void 0?void 0:aw(a.args,XC(t));return r.channel.call(r.id,e,o,{rootId:n.rootId,codeVersion:n.codeVersion},n.signal)}}#s(e){let t=e.variant===void 0?void 0:this.contract.description.variants[e.variant];return t===void 0?[]:e.members.filter(e=>t[e]?.kind===`state`)}#c(){let e=this.#t;if(e===void 0)return;this.#t=void 0,this.shape=e.shape;let t=new Set(this.#s(e.shape));for(let e of[...this.members.keys()])t.has(e)||this.members.delete(e);for(let[n,r]of e.values)t.has(n)&&this.members.set(n,r);this.hydrated=this.stateOn&&[...t].every(e=>this.members.has(e)),this.hydrated&&this.#o(),this.status=`live`,this.#r=!0,this.#n.resolve();for(let e of this.views)e.update();for(let[n,r]of e.values)t.has(n)&&this.#l(n,{type:`reset`,value:r.value});for(let e of[...this.views])e.shapeChanged()}#l(e,t){let n=this.#e.get(e);if(n!==void 0)for(let e of[...n])e.deliver(t)}},jA=class{view;#e;#t=new Set;#n=new Set;#r=new Set;constructor(e,t){this.view=e,this.#e=t}get value(){if(this.view.ended)throw this.view.terminalError();return this.view.binding.read(this.#e)}get[BO](){let e=this.view.binding;if(!e.hydrated)return{hydrated:!1,whenHydrated:()=>e.whenHydrated()}}subscribe(e){return this.#t.add(e),this.#a(),this.#i()&&this.#s(()=>e(this.view.binding.members.get(this.#e)?.value)),()=>this.#o(this.#t,e)}events(e){if(this.#n.add(e),this.#a(),this.#i()){let t=this.view.binding.members.get(this.#e)?.value;this.#s(()=>e({type:`snap`,value:t}))}else this.#r.add(e);return()=>{this.#r.delete(e),this.#o(this.#n,e)}}deliver(e){for(let t of[...this.#n])this.#r.delete(t)?e.type!==`ops`&&this.#s(()=>t({type:`snap`,value:e.value})):this.#s(()=>t(e));for(let t of[...this.#t])this.#s(()=>t(e.value))}stop(){this.#t.clear(),this.#n.clear(),this.#r.clear(),this.view.binding.unlisten(this.#e,this)}#i(){return!this.view.ended&&this.view.binding.readable(this.#e)}#a(){this.view.ended||this.view.binding.listen(this.#e,this)}#o(e,t){e.delete(t),this.#t.size+this.#n.size===0&&this.view.binding.unlisten(this.#e,this)}#s(e){try{e()}catch(e){this.view.binding.host.report(e)}}},MA=class{object=void 0;binding;owner;wantsState;proxy;ready;status=`loading`;error;shapeListeners=new Set;#e=new Set;#t=new Map;#n=new Map;#r;constructor(e,t,n){this.binding=e,this.owner=t,this.wantsState=n;let r=kA();this.ready=r.promise,this.#r=r,this.proxy=new Proxy(this,{get:(e,t)=>{if(pk.has(t)){let n=Reflect.get(e,t,e);return typeof n==`function`?n.bind(e):n}if(typeof t==`string`&&t!==`then`)return e.member(t)}}),hk.set(this.proxy,this)}get contract(){return this.binding.contract}get address(){return this.binding.key}get ended(){return this.status===`released`||this.status===`gone`}get variant(){return this.binding.shape?.variant}get shape(){return this.binding.shape}onShape(e){return this.shapeListeners.add(e),()=>this.shapeListeners.delete(e)}onStatus(e){return this.#e.add(e),()=>this.#e.delete(e)}terminalError(){return this.status===`gone`?this.error:new L(`released`,`reference ${this.address} released`)}release(){if(!this.ended){this.status=`released`,this.#i(),this.#r?.reject(new L(`released`,`reference ${this.address} released`)),this.#r=void 0;for(let e of this.#t.values())e.stop();this.binding.removeView(this)}}update(){if(this.ended)return;let e=this.binding,t=e.status===`live`&&e.hold!==void 0&&(!this.wantsState||e.hydrated),n=t?`live`:`loading`;n!==this.status&&(this.status=n,this.#i(),t&&(this.#r?.resolve(),this.#r=void 0))}end(e){if(this.ended)return;let t=e instanceof L&&e.code===`released`;this.status=t?`released`:`gone`,t||(this.error=e),this.#i(),this.#r?.reject(e),this.#r=void 0;for(let e of this.#t.values())e.stop()}shapeChanged(){let e=this.binding.shape;if(!(e===void 0||this.ended))for(let t of[...this.shapeListeners])try{t(e)}catch(e){this.binding.host.report(e)}}#i(){mk(this.#e,this.status,this.error,e=>this.binding.host.report(e))}member(e){let t=Object.values(this.contract.description.variants).map(t=>t[e]).find(e=>e!==void 0);if(t?.kind===`method`)return this.#a(e);if(t?.kind===`state`){let t=this.#t.get(e);return t===void 0&&(t=new jA(this,e),this.#t.set(e,t)),t}}#a(e){let t=this.#n.get(e);if(t===void 0){let n=oT(this.contract,e);t=(...t)=>{let[r,i]=n?[void 0,t[0]]:t,a=this.binding.host;if(a.inFactory>0)throw new L(`not_ready`,`${this.address}.${e} called inside a factory`);if(i!==void 0&&!(i instanceof lk))return Promise.reject(bw(`foreign_ctx`,`ctx must come from a Chord host`));try{i?.check(a)}catch(e){return Promise.reject(e)}return i===void 0||i.holder?a.root(t=>this.#o(e,r,t),{signal:i?.signal}):this.#o(e,r,i)},this.#n.set(e,t)}return t}#o(e,t,n){return this.ended?Promise.reject(this.terminalError()):this.binding.call(e,t,n)}},NA=e=>typeof e==`object`&&!(e instanceof URL),PA=new Map;function FA(e){return new IA(e)}var IA=class{name;dev;principal;inFactory=0;failed;objects=new Map;codeVersions=new Map;facets=new Map;hostObjects=new Map;kind;connections=new Set;upstream;bindings=new Map;#e=new Map;#t;#n;#r=0;#i=new Map;#a=new Qk(this);remoteModules={};remoteRemoved={};#o=0;#s=new Map;#c=new Set;#l=Math.random().toString(36).slice(2,8);#u=new Map;current;previous;pending;gating;reloading=!1;taskStopDeadline;readyTimeout;#d;#f;#p=new Set;#m=new Map;#h=[];#g=new Map;#_;#v;#y=new Map;#b=new Map;#x=new Map;#S=new Map;#C=1;#w=0;constructor(e){if(this.name=e.name??`host`,this.dev=e.dev??!1,!(`self`in e))throw TypeError("createHost needs `self`: the principal of the host's own code");this.principal=e.self,this.#d=e.principalKey??ww,this.#f=this.#d(e.self),this.#_=e.onError??(e=>console.error(`chord:`,e)),this.#v=e.loader,this.taskStopDeadline=e.taskStopDeadline??5e3,this.readyTimeout=e.readyTimeout??6e4,this.#t=e.linger?.types??{},this.#n=e.linger?.cap??4,this.current={id:this.#C,services:new Map,tables:new Map,roots:new Map,abort:new AbortController},this.codeVersions.set(this.current.id,this.current),this.kind=e.kind??`host`,e.upstream!==void 0&&this.connect(e.upstream.link,e.upstream)}isSelf(e){return e===this.principal||this.#d(e)===this.#f}get codeVersion(){return this.current.id}get previousCodeVersion(){return this.previous?.id}nextCodeVersionId(e){if(e!==void 0&&e<=this.current.id)throw Error(`code version ${e} is not newer than ${this.current.id}`);return this.#C=e??this.#C+1,this.#C}report(e){this.#_(e)}serve=((e,t,n={})=>{if(this.reloading)throw Error(`host.serve during a reload; serve from a facet passed to reload()`);this.serveInto(this.current.services,$O(e,t,n,``)),n.lifetime===`host`&&this.startHostObject(this.current.services.get(e.name))});install(e,t={}){if(this.reloading)throw Error(`host.install during a reload`);if(this.facets.has(e.name))throw Error(`facet ${e.name} is already installed; use reload()`);let n=[],r=new AbortController;try{e.setup(this.facetApi(((t,r,i={})=>{let a=$O(t,r,i,e.name);this.serveInto(this.current.services,a),n.push(a)}),r.signal))}catch(e){throw r.abort(e),e}this.facets.set(e.name,e),this.facetRunChanged(e.name,r);let i=n.filter(ek).map(e=>this.startHostObject(e));return t.awaitHostObjects===!1?Promise.resolve():this.#T(i)}async load(e,t={}){let n=await this.resolve(e);await Promise.all(n.map(e=>this.install(e,t)))}ready(){return this.#T(this.hostObjects.values())}#T(e){let t=Promise.all([...e].map(e=>e.ready)).then(()=>{});return t.catch(()=>{}),t}async resolve(e){let t=e.filter(e=>!NA(e));if(t.length>0&&this.#v===void 0)throw Error(`loading modules needs createHost({ loader }), e.g. nodeLoader from @earendil-works/chord/node`);let n=t.length>0&&this.#v!==void 0?await this.#v(t):[];return e.map(e=>NA(e)?e:n.shift())}facetApi(e,t){return{serve:e,name:this.name,root:(e,t)=>this.root(e,t),registry:e=>this.registry(e),signal:t}}facetRunChanged(e,t){let n=this.#g.get(e);t===void 0?this.#g.delete(e):this.#g.set(e,t),n!==t&&n?.abort(new L(`gone`,`facet ${e} was replaced or removed`))}serveInto(e,t){if(e.has(t.contract.name))throw Error(`${t.contract.name} is already served`);let n=t.contract.description.host;if(n!==void 0&&!Ww(n,this.name))throw TypeError(`${t.contract.name} is declared for ${Gw(n)}, but ${this.name} serves it`);e.set(t.contract.name,t)}startHostObject(e){let t=this.acquire(e.contract,{},void 0,`host`);return this.hostObjects.set(e.contract.name,t),t.ready.catch(e=>this.report(e)),t}currentCodeVersion(){return this.current.id}hasCodeVersion(e){return this.codeVersions.has(e)}*retainedCodeVersions(){for(let[e,t]of this.codeVersions)yield[e,t.services];this.pending!==void 0&&(yield[this.pending.id,this.pending.services])}pendingCodeVersion(){return this.pending?.id}service(e){return this.current.services.get(e)??this.pending?.services.get(e)}addressOf(e,t,n,r=!1){let i=this.#E(e,t);if(i!==void 0)return this.#k(e,i.input,n);let a=this.#j(e.name,r);if(a===void 0)throw BA(e.name,this.name);return this.#D(a,t,n).address}#E(e,t){let n=e.description.host;if(e.scope!==`remote`||n===void 0)return;let r=Ow(e.input,t,`${e.name} input`),i=Uw(e.name,n,r);return i===this.name?void 0:{at:i,input:r}}#D(e,t,n){let{name:r,input:i}=e.contract,a=Ow(i,t,`${r} input`),o=kw(i,a);if(ek(e)){if(o!==kw(i,Ow(i,{},`${r} input`)))throw bw(`input`,`${r} has lifetime "host": its one object has the empty input`);n=this.principal}return{address:`${r}\u0000${o}\u0000${this.#O(n)}`,normalized:a,principal:n}}#O(e){return this.isSelf(e)?`host`:`p:${this.#d(e)}`}#k(e,t,n){let r=kw(e.input,t);return`@${e.name}\u0000${r}\u0000${this.#O(n)}\u0000${e.fingerprint}`}acquire(e,t,n,r,i,a=!1){let o=this.#E(e,t);if(o!==void 0)return this.#P(e,o.at,o.input,n,r);let s=this.#j(e.name,a);if(s===void 0)throw BA(e.name,this.name);aT(s.contract,s.options.accepts,e);let{address:c,normalized:l,principal:u}=this.#D(s,t,n?.principal??this.principal),d=s.contract.description.host;if(d!==void 0&&Uw(e.name,d,l)!==this.name)throw bw(`placement`,`${e.name} with this input lives on ${Uw(e.name,d,l)}, not ${this.name}`);let f=this.objects.get(c);if(i!==void 0&&f!==void 0&&(f===i||VA(f,i)))throw bw(`cycle`,`${i.address} -> ${c} would create a ref cycle`);if(f===void 0){if(this.gating?.has(e.name))throw new L(`upgrade_conflict`,`${e.name} is being upgraded; retry`,{reason:`gate`});let t=this.#y.get(c);t?.status===`disposed`&&this.#y.delete(c),f=new xk(this,{address:c,typeName:e.name,input:l,principal:u,hostLifetime:ek(s)}),this.objects.set(c,f),f.start(t?.status===`disposing`?t.dispose(!1):void 0)}let p=new vk(f,e,r);return f.addRef(p),p}forget(e){this.objects.get(e.address)===e&&this.objects.delete(e.address),e.status===`disposing`&&this.#y.set(e.address,e)}disposed(e){this.#y.get(e.address)===e&&this.#y.delete(e.address)}touch(e,t){let n=this.#b.get(e);n===void 0&&(n=new Set,this.#b.set(e,n)),n.add(t)}async root(e,t={}){let n=`${this.name}#${this.#l}:${++this.#w}`;return this.#c.add(n),this.joinRoot(n,t.codeVersion??this.current.id,e,t)}async joinRoot(e,t,n,r={}){let i=this.codeVersions.get(t);if(i===void 0)throw this.#c.delete(e),new L(`superseded`,`code version ${t} is not retained by ${this.name}`);if(r.from!==void 0&&!this.#c.has(e)){let t=this.#s.get(e);t===void 0&&(t=new Set,this.#s.set(e,t)),t.add(r.from)}i.roots.set(e,(i.roots.get(e)??0)+1);let a=new lk(this,{signals:r.signal===void 0?[i.abort.signal]:[r.signal,i.abort.signal],rootId:e,codeVersion:i.id,principal:r.principal??this.principal});try{return await n(a)}finally{a.close();let t=(i.roots.get(e)??1)-1;t>0?i.roots.set(e,t):(i.roots.delete(e),this.#s.has(e)||this.endRoot(e),this.maybeRetire(),this.#A())}}rootSent(e,t){let n=this.#u.get(e);n===void 0&&(n=new Set,this.#u.set(e,n)),n.add(t)}endRoot(e){this.#c.delete(e),this.#s.delete(e);for(let t of this.#b.get(e)??[])t.rootEnded(e);this.#b.delete(e);for(let t of this.#u.get(e)??[])t.send({t:`root_end`,rootId:e});this.#u.delete(e)}foreignRootEnded(e,t){let n=this.#s.get(e);n===void 0||!n.delete(t)||n.size>0||([...this.codeVersions.values()].some(t=>t.roots.has(e))?this.#s.delete(e):this.endRoot(e))}maybeRetire(){this.retirable()&&this.retire()}retirable(){let e=this.previous;return e===void 0||e.roots.size>0?!1:this.kind===`client`||this.upstream===void 0||e.id<=this.#o}allowRetire(e){this.#o=Math.max(this.#o,e),this.maybeRetire(),this.#A()}watchRetirement(e){return this.#p.add(e),()=>this.#p.delete(e)}#A(){for(let e of[...this.#p])e()}announceRetired(e){let t=(this.previous??this.current).id-1;t>0&&e.send({t:`retire`,codeVersion:t})}retire(){let e=this.previous;if(e!==void 0){this.previous=void 0,this.codeVersions.delete(e.id);for(let t of[...this.objects.values()])this.retireImplementation(t,e.id);for(let t of this.connections)t.role===`downstream`&&t.peer?.kind===`host`&&t.send({t:`retire`,codeVersion:e.id});this.#A()}}retireImplementation(e,t){let n=e.implementations.get(t);if(e.implementations.delete(t),n===void 0||n.decls===e.decls)return;let r=e.allDecls(),i=e=>new Set([...r].flatMap(t=>[...e(t)])),a=i(e=>e.refs.values()),o=i(e=>e.resources.values()),s=i(e=>e.derives.values());for(let e of n.decls.derives.values())s.has(e)||e.detach();let c=[...n.decls.resources.values()].filter(e=>!o.has(e)).sort((t,n)=>e.openOrder.indexOf(n)-e.openOrder.indexOf(t)),l=[...n.decls.refs.values()].filter(e=>!a.has(e));e.refreshSchemas(),Sw([...c.map(t=>()=>t.close(e.openOrder)),...l.map(e=>()=>e.release())],`${e.address}: retiring code version ${t} failed`).catch(e=>this.report(e))}registry(e){let t=t=>{let n=t===void 0?this.current:this.codeVersions.get(t.codeVersion);if(n===void 0)throw new L(`superseded`,`code version ${t?.codeVersion} is retired`);return n.tables.get(e.name)??PA};return{table:t,get:(e,n)=>t(n).get(e),subscribe:n=>{let r=this.#S.get(e.name);r===void 0&&(r=new Set,this.#S.set(e.name,r));let i=n;return r.add(i),i(t(),this.current.id),()=>r.delete(i)}}}buildTables(e){let t=new Map;for(let[n,r]of e)for(let{registry:e,key:i,value:a}of r.registrations.values()){let r=t.get(e.name);r===void 0&&(r=new Map,t.set(e.name,r));let o=r.get(i);if(o!==void 0&&o.object!==n&&e.conflict===`error`)throw bw(`registry_conflict`,`${e.name}: ${i} registered by ${o.object.address} and ${n.address}`);r.set(i,{value:a,object:n});let s=this.#x.get(e.name);s===void 0&&(s=new Map,this.#x.set(e.name,s)),s.has(i)||s.set(i,s.size)}let n=new Map;for(let[e,r]of t){let t=this.#x.get(e),i=[...r].sort(([e],[n])=>t.get(e)-t.get(n));n.set(e,new Map(i.map(([e,t])=>[e,t.value])))}return n}#j(e,t){return(t?this.pending?.services.get(e):void 0)??this.service(e)}liveDecls(e=!1){return[...this.objects.values()].filter(t=>t.status===`live`&&(e||!t.deferredRuntime)).map(e=>[e,e.decls])}checkRegistrations(e,t){t.registrations.size!==0&&this.buildTables([...this.liveDecls().filter(([t])=>t!==e),[e,t]])}registriesChanged(e){let t=this.liveDecls().filter(([t])=>t!==e);e!==void 0&&t.push([e,e.decls]),this.installTables(this.current,this.buildTables(t))}fail(e){this.failed??=e,this.report(e)}installTables(e,t,n=!1){let r=e.tables;if(e.tables=t,e===this.current)for(let[i,a]of this.#S){let o=t.get(i)??PA;if(!n&&RA(r.get(i)??PA,o))continue;let s=[...a];FO(()=>{for(let t of s)try{t(o,e.id)}catch(e){this.report(e)}})}}async get(e,t,n){let r=this.acquire(e,t,n,`external`);return await dk(r,n?.signal===void 0?[]:[n.signal],this.readyTimeout),r.proxy}hold(e,t,n){return this.acquire(e,t,n,`external`).proxy}async invalidatePrincipal(e){let t=typeof e==`function`?e:t=>zA(e,t),n=new L(`gone`,`principal invalidated`);for(let e of[...this.connections])e.role===`downstream`&&t(e.principal)&&e.revoke(e.restamp?.(e.principal));if(typeof e!=`function`)for(let t of this.connections)t.role===`downstream`&&t.peer.kind===`host`&&t.send({t:`invalidate`,pattern:e});await LA([...this.objects.values()].filter(e=>!this.isSelf(e.principal)&&t(e.principal)),n,`invalidatePrincipal: disposal failed`)}accept(e,t){let n=t.kind??`client`;if(n===`host`&&t.name===void 0)throw TypeError(`accepting a host link needs its name`);this.#M(e,{...t,role:`downstream`,principal:t.principal,peer:{kind:n,name:n===`host`?t.name:void 0},...n===`client`?{originId:`${this.#l}:${++this.#r}`}:{}})}connect(e,t){if(!(`principal`in t))throw TypeError("connect needs `principal`: what the parent's own requests act as");this.upstream?.open&&this.upstream.link.close(`replaced`);let n=this.#M(e,{...t,role:`upstream`,principal:t.principal,peer:{kind:`host`,name:void 0}});this.upstream=n;for(let e of this.bindings.values())e.hold===void 0&&!e.ended&&n.hold(e,e.applied)}#M(e,t){let n=new SA(this,e,t);return n.open&&this.connections.add(n),n}route(e,t){if(typeof t.principal!=`function`)throw TypeError(`route ${e} needs \`principal\`: what the routed hosts act as when they call back`);this.#i.set(e,t)}peerHello(e,t){t>this.current.id?(this.report(new L(`invalid`,`${e.name} runs code version ${t}, ahead of ${this.current.id}`)),e.link.close(`code version ahead of parent`)):this.reloading?(e.peerCodeVersion=t,t<this.current.id&&e.fencedCodeVersions.add(t),this.#m.set(e,t)):t===this.current.id?(e.markSynced(t),this.announceRetired(e)):(e.peerCodeVersion=t,e.fencedCodeVersions.add(t),Zk(this,e).catch(t=>{this.report(t),e.link.close(`reconciliation failed`)}))}reloadEnded(){this.reloading=!1;let e=[...this.#m];this.#m.clear();for(let[t,n]of e)t.open&&this.peerHello(t,n);for(let e of this.#h.splice(0))e();this.maybeRetire()}whenReloadEnded(){return this.reloading?new Promise(e=>this.#h.push(e)):Promise.resolve()}connectionClosed(e){this.connections.delete(e),this.#m.delete(e);for(let[t,n]of[...this.#s])n.has(e)&&this.foreignRootEnded(t,e);for(let t of this.#u.values())t.delete(e);this.upstream===e&&(this.upstream=void 0,this.#a.parentLost())}bindingIdle(e){let t=Object.hasOwn(this.#t,e.contract.name)?this.#t[e.contract.name]:0;if(t<=0||e.ended||!e.applied||this.#n<=0)e.close();else{e.lingerTimer=setTimeout(()=>e.close(),t),e.lingerTimer.unref?.(),this.#e.set(e.key,e);for(let e of this.#e.values()){if(this.#e.size<=this.#n)break;e.close()}}}forgetBinding(e){this.bindings.get(e.key)===e&&this.bindings.delete(e.key),this.#e.get(e.key)===e&&this.#e.delete(e.key)}#N(e){return[...this.connections].find(t=>t.open&&t.role===`downstream`&&t.peer.kind===`host`&&t.peer.name===e)}#P(e,t,n,r,i){let a=r?.principal===void 0||this.isSelf(r.principal)?void 0:r.principal,o=this.#k(e,n,a??this.principal),s=this.bindings.get(o),c=s===void 0||s.ended;(s===void 0||s.ended)&&(s=new AA(this,{key:o,contract:e,at:t,input:n,principal:a}),this.bindings.set(o,s));let l=new MA(s,i,r?.state!==!1);return this.#e.delete(o),s.addView(l),c&&this.#F(s),l}#F(e){let t=t=>{t.then(t=>{!e.ended&&e.hold===void 0&&t.hold(e,!1)},t=>e.gone(t))},n=this.#N(e.at);if(this.upstream!==void 0)this.upstream.hold(e,!1);else if(n!==void 0)t(n.whenSynced().then(()=>n));else{let n=this.#I(e.at);n===void 0?e.gone(new L(`unavailable`,`no route to ${e.at}`)):t(this.#L(n,e.at,e.principal??this.principal))}}#I(e){let t;for(let n of this.#i)e.startsWith(n[0])&&(t===void 0||n[0].length>t[0].length)&&(t=n);return t?.[1]}async#L(e,t,n,r=()=>!0){let i=()=>new L(`forbidden`,`${t} refused for this principal`),a=()=>new L(`gone`,`principal invalidated while resolving`);if(!await e.authorize(n,t))throw i();if(!r())throw a();let o=await e.resolve(t);if(!r())throw a();if(!await e.authorize(n,t))throw i();if(!r())throw a();let s=[...this.connections].find(e=>e.link===o);if(s??=this.#M(o,{role:`downstream`,principal:e.principal(t),peer:{kind:`host`,name:t}}),await s.whenSynced(),!r())throw a();return s}async relay(e){let t=e.frame.at,n=tT(e.frame.token).description.host;if(n===void 0||Uw(e.frame.token.name,n,e.frame.input)!==t)throw bw(`placement`,`${e.frame.token.name} with this input does not live on ${t}`);let r=this.#I(t);if(r===void 0)throw this.#N(t)===void 0?new L(`unavailable`,`no route to ${t}`):new L(`forbidden`,`no route authorizes ${t}`);let i=await this.#L(r,t,e.principal,()=>e.current);e.current&&e.open(i)}reload(e,t={}){return this.kind!==`client`&&this.upstream!==void 0?Promise.reject(new L(`unavailable`,`reloads are coordinated by the server`,{reason:`not_coordinator`})):[...this.connections].some(e=>e.role===`downstream`&&e.peer.kind===`host`)||t.remote!==void 0||t.remoteRemove!==void 0?Xk(this,e,t):kk(this,e,t)}onReloadFrame(e,t){this.#a.handle(e,t)}rememberRemoteModules(e,t){for(let n of new Set([...Object.keys(e??{}),...Object.keys(t??{})])){let r=e?.[n]??[],i=t?.[n]??[];this.remoteModules[n]=[...new Set([...this.remoteModules[n]??[],...r])].filter(e=>!i.includes(e)),this.remoteRemoved[n]=[...new Set([...this.remoteRemoved[n]??[],...i])].filter(e=>!r.includes(e))}}peekNextCodeVersion(){return this.#C+1}async close(){for(let e of[...this.#e.values()])e.close();this.hostObjects.clear();for(let e of[...this.#g.keys()])this.facetRunChanged(e,void 0);let e=new L(`gone`,`host ${this.name} closed`);try{await LA([...this.objects.values()],e,`host close: disposal failed`)}finally{for(let e of[...this.connections])e.link.close(`host closed`)}}};async function LA(e,t,n){let r=new Set(e),i=e=>{let t=new Set;for(let n of e.allDecls())for(let e of n.refs.values())e.object!==void 0&&t.add(e.object);return t},a=new Map(e.map(e=>[e,i(e)])),o=[];for(;r.size>0;){let e=new Set;for(let t of r)for(let n of a.get(t)??[])e.add(n);let n=[...r].filter(t=>!e.has(t));n.length===0&&(n=[...r]);for(let e of n)r.delete(e);let i=await Promise.allSettled(n.map(e=>e.dispose(!0,t)));for(let e of i)e.status===`rejected`&&o.push(e.reason)}if(o.length===1)throw o[0];if(o.length>1)throw AggregateError(o,n)}function RA(e,t){if(e.size!==t.size)return!1;let n=[...e.keys()];return[...t].every(([t,r],i)=>n[i]===t&&e.get(t)===r)}var zA=(e,t)=>typeof t==`object`&&!!t&&Object.entries(e).every(([e,n])=>Ew(t[e],n)),BA=(e,t)=>new L(`unavailable`,`${e} is not served by ${t}`,{reason:`unknown_type`});function VA(e,t){let n=new Set,r=[e];for(;r.length>0;){let e=r.pop();if(e===t)return!0;if(!n.has(e)){n.add(e);for(let t of e.allDecls())for(let e of t.refs.values())e.object!==void 0&&r.push(e.object)}}return!1}var HA=`neko`,UA=(e,t)=>[e,t];function WA(e,t){let n=Object.fromEntries(Object.entries(t.variants).map(([e,t])=>[e,{...t,methods:Object.fromEntries(Object.entries(t.methods??{}).map(([e,[t,n]])=>[e,Vw(t,n)]))}]));return eT(e,{...t,host:Hw(HA),variants:n})}var R=gc(),GA=fc(),KA=Qs(),qA=lc(),z=tc({minimum:0,maximum:2**53-1}),JA=vc([R,qA]),YA=ss([`pending`,`running`,`done`]),XA=ss([`project`,`user`,`builtin`]),ZA=ss([`off`,`minimal`,`low`,`medium`,`high`,`xhigh`,`max`]),QA=P({provider:R,modelId:R}),$A=P({model:N(QA),thinkingLevel:N(ZA)},{additionalProperties:!1}),ej=P({input:GA,output:GA,cacheRead:GA,cacheWrite:GA,cost:GA}),tj=P({name:R,mimeType:R,width:z,height:z,bytes:z,entryId:z,contentIndex:z}),nj=P({name:R,location:R,body:R,args:R}),rj=P({callId:R,name:R,summary:R,detail:JA,phase:YA,output:JA,diff:JA,diffAdded:vc([GA,qA]),diffRemoved:vc([GA,qA]),diffTruncated:N(KA)}),ij=P({parentId:z,agentId:N(R),round:N(z),runnerId:N(z),inputEntryId:N(z),answerEntryId:N(z),roundUsage:N(vc([ej,qA])),taskId:z,callId:R,childId:z,role:ss([`explore`,`plan`,`coder`]),title:R,createdAt:GA,startedAt:vc([GA,qA]),endedAt:vc([GA,qA]),status:ss([`queued`,`running`,`completed`,`failed`,`cancelled`]),report:JA,approvalCount:N(z),historyThrough:N(z),historyUsage:N(ej)}),aj=P({agentId:R,parentId:z,childId:z,role:ss([`explore`,`plan`,`coder`]),title:R,status:ss([`idle`,`queued`,`running`]),activeRoundId:vc([z,qA]),lastRoundId:z,lastReport:N(JA),roundCount:z,taskTitle:R,approvalCount:z,createdAt:GA,historyThrough:N(z),historyUsage:N(ej)}),oj=P({jobId:R,title:R,command:R,cwd:R,status:ss([`running`,`exited`,`failed`,`stopped`,`lost`]),startedAt:GA,endedAt:vc([GA,qA]),exitCode:vc([GA,qA]),reason:N(ss([`timeout`,`spawn-error`,`restart`,`aborted`])),timeoutSeconds:N(GA),outputBytes:z}),sj=P({job:oj,text:R,offset:z,truncated:KA,dropped:z}),cj=P({id:z,mode:ss([`steer`,`followUp`]),preview:R,images:z,skill:N(P({name:R,args:R}))}),lj=P({result:ss([`withdrawn`,`placed`,`settled`,`unknown`]),text:N(R),images:N(z)}),uj=P({result:ss([`steered`,`withdrawn`,`placed`,`settled`,`unknown`]),id:N(z),text:N(R),images:N(z)}),dj=P({historyBefore:N(vc([z,qA])),agents:N(Co(aj)),jobs:N(Co(oj)),queued:N(Co(cj)),rounds:N(Co(ij)),subagents:N(Co(ij)),taskUsage:N(ej),model:R,agent:P({model:vc([QA,qA]),thinkingLevel:vc([ZA,qA])}),cwd:R,busy:KA,status:JA,usage:ej,contextUsage:N(P({tokens:vc([GA,qA]),window:GA,percent:vc([GA,qA])})),compaction:N(P({failure:N(P({taskId:z,reason:ss([`manual`,`threshold`,`overflow`]),error:R})),active:Co(P({taskId:z,reason:ss([`manual`,`threshold`,`overflow`]),blocking:KA,attempt:z,retry:N(P({at:GA,error:R}))})),latest:vc([qA,P({taskId:z,phase:ss([`summarizing`,`waiting-to-apply`,`applied`,`nothing`,`skipped`,`cancelled`,`failed`]),at:GA})])})),items:Co(vc([P({type:F(`user`),order:N(GA),key:R,id:z,text:R,images:N(Co(tj)),skill:N(nj),defaultImagePrompt:N(P({version:tc({minimum:1}),text:R}))}),P({type:F(`assistant`),order:N(GA),key:R,id:z,thinking:R,text:R,stopReason:JA,errorMessage:JA,note:JA}),P({type:F(`tool`),order:N(GA),key:R,images:N(Co(tj)),callId:R,name:R,summary:R,detail:JA,phase:YA,isError:KA,output:JA,result:JA,durationMs:vc([GA,qA]),note:JA,diff:JA,diffAdded:vc([GA,qA]),diffRemoved:vc([GA,qA]),diffTruncated:N(KA)}),P({type:F(`system`),order:N(GA),key:R,id:z,text:R,jobId:N(R)})])),streaming:vc([qA,P({thinking:R,text:R,toolCalls:Co(rj)})])}),fj=P({workspaceRoot:R,lastUsedAt:GA,title:R,firstPromptPreview:R,createdAt:GA,lastMessageAt:vc([GA,qA]),model:vc([QA,qA]),status:ss([`idle`,`running`,`error`]),id:R}),pj=P({revision:z,sessions:Co(fj)}),mj=P({path:R,createdAt:GA}),hj=P({revision:z,workspaces:Co(mj)}),gj=P({savedConfigured:KA,environmentConfigured:KA,source:ss([`saved`,`environment`,`runtime`,`keyless`,`none`])}),_j=P({revision:z,statuses:P({deepseek:gj,tavily:gj})}),vj=P({sessionId:R,attachmentId:R}),yj=P({sessionId:R,attachmentId:R},{additionalProperties:!1}),bj=WA(`neko.session-directory`,{version:1,input:P({},{additionalProperties:!1}),variants:{ready:{state:{state:pj}}}}),xj=WA(`neko.session-management`,{version:1,input:P({},{additionalProperties:!1}),variants:{ready:{methods:{create:UA(P({...$A.properties,cwd:N(R)},{additionalProperties:!1}),fj),archive:UA(R,qA),attach:UA(R,vj),detach:UA(qA,qA),fork:UA(R,fj)}}}}),Sj=P({maxWidth:N(z),maxHeight:N(z),maxBytes:N(z),jpegQuality:N(z)}),Cj=P({maxRequestBytes:N(z),images:N(P({resize:N(Sj),maxPerMessage:N(z),maxPerRequest:N(z)}))}),wj=P({provider:R,modelId:R,name:R,contextWindow:GA,input:Co(R),inputLimits:N(Cj),reasoning:KA,supportedThinkingLevels:Co(ZA),thinkingLevelAdjustments:P({off:ZA,minimal:ZA,low:ZA,medium:ZA,high:ZA,xhigh:ZA,max:ZA})}),Tj=WA(`neko.models`,{version:1,input:P({},{additionalProperties:!1}),variants:{ready:{methods:{list:UA(qA,Co(wj))}}}}),Ej=P({data:R,total:z,mimeType:R}),Dj=WA(`neko.subagent`,{version:1,input:P({sessionId:R,attachmentId:R,taskId:N(z),agentId:N(R)}),variants:{ready:{state:{revision:z},methods:{chunk:UA(P({kind:ss([`view`,`history`]),before:N(z),token:N(z),offset:z}),P({token:z,data:R,next:vc([z,qA])})),getImage:UA(P({entryId:z,contentIndex:z,offset:z}),Ej),decideApproval:UA(P({id:z,version:R,decision:ss([`allowed`,`denied`])}),ss([`pending`,`allowed`,`denied`,`cancelled`])),stop:UA(vc([qA,P({taskId:z})]),qA)}}}}),Oj=WA(`neko.chat`,{version:1,input:yj,variants:{ready:{state:{view:dj},methods:{submit:UA(P({content:R,images:N(Co(R,{maxItems:4})),requestId:N(R),whenBusy:N(ss([`steer`,`followUp`]))},{additionalProperties:!1}),qA),abort:UA(qA,qA),withdraw:UA(P({id:z},{additionalProperties:!1}),lj),steer:UA(P({id:z},{additionalProperties:!1}),uj),usage:UA(qA,ej),skills:UA(qA,Co(P({name:R,description:R,location:R,level:XA}))),jobOutput:UA(P({jobId:R,since:N(z)},{additionalProperties:!1}),sj),jobStop:UA(P({jobId:R},{additionalProperties:!1}),oj),configure:UA($A,qA),compact:UA(P({instructions:N(R)},{additionalProperties:!1}),qA),importImage:UA(R,P({id:R,name:R})),draftImage:UA(P({id:R,offset:z},{additionalProperties:!1}),Ej),beginImage:UA(P({name:R,mimeType:R,size:tc({minimum:1,maximum:20971520})},{additionalProperties:!1}),R),appendImage:UA(P({id:R,offset:z,data:gc({maxLength:35e4})},{additionalProperties:!1}),qA),finishImage:UA(R,qA),releaseImage:UA(R,qA),getImage:UA(P({entryId:z,contentIndex:z,offset:z},{additionalProperties:!1}),Ej)}}}}),kj=P({path:R,query:N(R),showHidden:N(KA),cursor:N(R)},{additionalProperties:!1}),Aj=P({path:R,parent:JA,entries:Co(P({name:R,path:R,error:N(R)})),next:JA}),jj=WA(`neko.workspaces`,{version:1,input:P({},{additionalProperties:!1}),variants:{ready:{state:{state:hj},methods:{add:UA(P({path:R},{additionalProperties:!1}),mj),browse:UA(kj,Aj)}}}}),Mj=ss([`deepseek`,`tavily`]),Nj=WA(`neko.credentials`,{version:1,input:P({},{additionalProperties:!1}),variants:{ready:{state:{state:_j},methods:{save:UA(P({provider:Mj,key:gc({minLength:1,maxLength:8192})},{additionalProperties:!1}),qA),remove:UA(P({provider:Mj},{additionalProperties:!1}),qA)}}}}),Pj=P({revision:z,selected:ss([`tavily`,`deepseek`])}),Fj=WA(`neko.search-settings`,{version:1,input:P({},{additionalProperties:!1}),variants:{ready:{state:{state:Pj},methods:{set:UA(P({provider:ss([`tavily`,`deepseek`])},{additionalProperties:!1}),qA)}}}}),Ij=ss([`default`,`config`,`saved`]),Lj=P({revision:z,effective:P({compaction:P({enabled:KA,triggerPercent:vc([z,qA]),keepRecentTokens:z}),pruning:P({enabled:KA,triggerPercent:z,keepRecent:z,minChars:z,minSavePercent:z})}),sources:P({compaction:P({enabled:Ij,triggerPercent:Ij,keepRecentTokens:Ij}),pruning:P({enabled:Ij,triggerPercent:Ij,keepRecent:Ij,minChars:Ij,minSavePercent:Ij})})}),Rj=e=>vc([e,qA]),zj=P({compaction:N(P({enabled:N(Rj(KA)),triggerPercent:N(Rj(z)),keepRecentTokens:N(Rj(z))},{additionalProperties:!1})),pruning:N(P({enabled:N(Rj(KA)),triggerPercent:N(Rj(z)),keepRecent:N(Rj(z)),minChars:N(Rj(z)),minSavePercent:N(Rj(z))},{additionalProperties:!1}))},{additionalProperties:!1}),Bj=WA(`neko.context-settings`,{version:1,input:P({},{additionalProperties:!1}),variants:{ready:{state:{state:Lj},methods:{set:UA(zj,qA),reset:UA(P({},{additionalProperties:!1}),qA)}}}}),Vj=P({entries:Co(P({name:R,path:R,kind:ss([`file`,`directory`])}),{maxItems:100}),limited:KA,incomplete:KA}),Hj=WA(`neko.workspace-files`,{version:1,input:P({},{additionalProperties:!1}),variants:{ready:{methods:{search:UA(P({workspaceRoot:R,query:R},{additionalProperties:!1}),Vj)}}}}),Uj=P({name:R,description:R,category:R,source:R,license:R,version:R,sha256:R,sizeBytes:z,uploadedAt:R,installed:P({project:KA,user:KA,builtin:KA}),activeLevel:vc([XA,qA])}),Wj=P({body:R,files:Co(R)}),Gj=ss([`user`,`project`]),Kj=P({name:R,scope:Gj,path:R,shadowedBy:N(Gj)}),qj=WA(`neko.skill-market`,{version:1,input:P({},{additionalProperties:!1}),variants:{ready:{methods:{list:UA(P({query:N(R),workspaceRoot:N(R)},{additionalProperties:!1}),Co(Uj)),detail:UA(P({name:R,workspaceRoot:N(R)},{additionalProperties:!1}),Uj),preview:UA(P({name:R},{additionalProperties:!1}),Wj),install:UA(P({name:R,scope:Gj,workspaceRoot:N(R),overwrite:N(KA)},{additionalProperties:!1}),Kj),uninstall:UA(P({name:R,scope:Gj,workspaceRoot:N(R)},{additionalProperties:!1}),qA)}}}}),Jj=P({runningVersion:R,installedVersion:JA,protocolVersion:tc({minimum:1}),latestVersion:JA,checkedAt:vc([z,qA]),checkState:ss([`unknown`,`checking`,`ok`,`failed`,`development`]),serverId:R}),Yj=WA(`neko.application-info`,{version:1,input:P({}),variants:{ready:{state:{info:Jj},methods:{check:UA(qA,Jj)}}}}),Xj=16777216,Zj=e=>e instanceof Uint8Array?e:new Uint8Array(e),Qj=e=>typeof e==`string`?new TextEncoder().encode(e).byteLength:e.byteLength;function $j(e,t=Xj,n){let r=0,i=0,a=!1,o;return o=gA({get readyState(){return e.readyState},send(n){if(Qj(n)+e.bufferedAmount>t)throw e.close(1009,`byte limit`),Error(`Link pending byte limit exceeded`);e.send(n)},close:(t,n)=>e.close(t,n),addEventListener(n,s){if(n===`message`){let n=e=>{let n=Qj(e);a||(i+=n),n>t||i>t?o.close(`frame limit exceeded`):s({data:e})};e.on?e.on(`message`,(e,t)=>n(t?Zj(e):new TextDecoder().decode(Zj(e)))):e.addEventListener(`message`,e=>n(typeof e.data==`string`||e.data instanceof Uint8Array?e.data:String(e.data)))}else e.addEventListener(n,()=>{n===`open`&&(r=0);try{s()}catch{o.close(`socket error`)}})}},n),e.addEventListener(`error`,()=>o.close(`socket error`)),{get closed(){return o.closed},send(n){if(o.closed)return;if(e.readyState>1){o.close(`socket closed`);return}let i=Qj(JSON.stringify(n));if(i>t||i+e.bufferedAmount+r>t)throw o.close(`pending byte limit exceeded`),Error(`Link byte limit exceeded`);return e.readyState===0&&(r+=i),o.send(n)},receive(e){a=!0,i=0,o.receive(e)},onClose:e=>o.onClose(e),close:e=>o.close(e)}}function eM(e,t={}){return FA({kind:`client`,self:{kind:`client`},upstream:{link:e,principal:{kind:`server`},...t.onProtocolMismatch?{onProtocolMismatch:t.onProtocolMismatch}:{}},onError:()=>{}})}function tM(e){let t,n,r,i,a=()=>(n||(n=e(),i=n.onStatus((e,n)=>{if(e===`gone`){r=String(n??`Subagent unavailable`);for(let e of s)e(t)}})),n),o=()=>{i?.(),i=void 0,n?.release(),n=void 0},s=new Set,c,l=0,u=0,d=!1;async function f(e,t,n=()=>!0){let r,i=0,o=[];for(;;){if(!n())throw Error(`Transcript subscription closed`);let s=await a().chunk({kind:e,before:t,token:r,offset:i});if(!n())throw Error(`Transcript subscription closed`);if(o.push(s.data),r=s.token,s.next===null)return JSON.parse(o.join(``));i=s.next}}let p=async()=>{if(d||!s.size||!u)return;d=!0;let e=l,n=0;try{do{n=u;try{let n=await f(`view`,void 0,()=>l===e&&s.size>0);if(l!==e)return;r=void 0,t=n;for(let e of s)e(t)}catch(i){if(l!==e)return;if(u===n){r=String(i);for(let e of s)e(t)}}}while(u!==n)}finally{d=!1,l!==e&&s.size&&p()}};return{get error(){return r},view:{get value(){return t},subscribe(e){return s.add(e),e(t),c||=a().revision.subscribe(e=>{u=e??0,p()}),()=>{s.delete(e),s.size||(l++,c?.(),c=void 0,o())}}},history:async e=>{let t=l;try{return await f(`history`,e.before,()=>t===l)}finally{s.size||o()}},getImage:async(e,t)=>{try{return await a().getImage(e,t)}finally{s.size||o()}},decideApproval:async(e,t)=>{try{return await a().decideApproval(e,t)}finally{s.size||o()}},stop:async(e,t)=>{try{return await a().stop(e,t)}finally{s.size||o()}}}}var nM=class{#e=new Map;#t;#n;constructor(e,t){this.#t=e,this.#n=t}get pending(){return[...this.#e.values()].flatMap(({service:e,title:t})=>(e.view.value?.approvals??[]).filter(e=>e.status===`pending`).map(n=>({item:n,title:t,service:e}))).sort((e,t)=>e.item.createdAt-t.item.createdAt||e.item.id-t.item.id)}get error(){return[...this.#e.values()].find(({service:e})=>e.error)?.service.error}update(e){let t=e.filter(e=>e.approvalCount&&e.historyThrough===void 0);for(let[e,n]of this.#e)t.some(t=>(t.agentId??t.taskId)===e)||(this.#e.delete(e),n.stop());for(let e of t){let t=e.agentId??e.taskId;if(this.#e.has(t))continue;let n=this.#t(t),r={service:n,title:e.title,stop:()=>{}};this.#e.set(t,r),r.stop=n.view.subscribe(()=>this.#n())}this.#n()}close(){for(let e of this.#e.values())e.stop();this.#e.clear(),this.#n()}},rM=class extends Error{constructor(){super(`Gateway identity mismatch`),this.name=`GatewayIdentityError`}},iM=`This gateway does not support background jobs. Restart the gateway to enable them.`;function aM(e){let t=()=>e.view.value?.jobs!==void 0,n=()=>{if(!t())throw Error(iM)};return{get supported(){return t()},list:()=>e.view.value?.jobs??[],async output(t,r){return n(),e.jobOutput({jobId:t,...r===void 0?{}:{since:r}})},async stop(t){return n(),e.jobStop({jobId:t})}}}var oM=`This gateway does not support queued message controls. Restart the gateway to enable them.`;function sM(e){let t=()=>e.view.value?.queued!==void 0;return{get supported(){return t()},list:()=>e.view.value?.queued??[],async steer(n){if(!t())throw Error(oM);return e.steer({id:n})},async withdraw(n){if(!t())throw Error(oM);return e.withdraw({id:n})}}}function cM(e,t){let n=!1,r=new AbortController,i=``;e.onClose(e=>{i=e,r.abort(Error(`Gateway connection closed: ${e}`))});let a=eM(e,{onProtocolMismatch:()=>{n=!0}}),o=e=>a.hold(e,{}),s=o(Yj),c=[s.info.subscribe(()=>{})],l,u=!1;function d(){let e=o(bj),t=o(xj),n=o(Tj),r=o(jj),i=o(Hj),a=o(Nj),s=o(Fj),l=o(Bj),u=o(qj);return c.push(e.state.subscribe(()=>{}),r.state.subscribe(()=>{}),a.state.subscribe(()=>{}),s.state.subscribe(()=>{}),l.state.subscribe(()=>{})),{directory:e,management:t,models:n,workspaces:r,workspaceFiles:i,credentials:a,searchSettings:s,contextSettings:l,skillMarket:u}}let f=()=>{if(!u)throw Error(`Gateway protocol not checked`);return l||=d(),l},p=async e=>{await lM(s.ready,e);let n=s.info.value;if(n.serverId!==t)throw new rM;if(n.protocolVersion!==6)throw new wi;u=!0;let{directory:r,management:i,models:a,workspaces:o,credentials:c,searchSettings:l,contextSettings:d,workspaceFiles:p,skillMarket:m}=f();await lM(Promise.all([r.ready,i.ready,a.ready,o.ready,c.ready,l.ready,d.ready,p.ready,m.ready]),e)},m,h,g,_=!1,v,y={application:s,subagent(e){if(!h)throw Error(`No active session`);let t={...h,...typeof e==`string`?{agentId:e}:{taskId:e}};return tM(()=>a.hold(Dj,t))},host:a,link:e,get directory(){return f().directory},get management(){return f().management},get models(){return f().models},get workspaces(){return f().workspaces},get workspaceFiles(){return f().workspaceFiles},get credentials(){return f().credentials},get searchSettings(){return f().searchSettings},get contextSettings(){return f().contextSettings},get skillMarket(){return f().skillMarket},get attachment(){return h},async ready(e){try{await p(e?AbortSignal.any([e,r.signal]):r.signal)}catch(e){throw n||i.startsWith(`protocol`)?new wi:e}},async attach(e,t){let n=await y.management.attach(e,t);if(m?.status===`live`&&m.view.value!==void 0&&h?.attachmentId===n.attachmentId)return m;g?.(),m?.release(),h=n;let r=a.hold(Oj,n);m=r,g=r.view.subscribe(()=>{});try{if(await lM(r.ready,t?.signal),r!==m)throw Error(`Attachment changed`);return r}catch(e){throw r.release(),r===m&&(g?.(),g=void 0,m=void 0,h=void 0),e}},async detach(){g?.(),g=void 0,m?.release(),m=void 0,h=void 0,_||await y.management.detach(null)},async close(){return v||(_=!0,v=(async()=>{g?.(),m?.release();for(let e of c)e();await a.close()})(),v)}};return e.onClose(()=>{y.close().catch(()=>{})}),y}function lM(e,t){let n,r=()=>{};return Promise.race([e,new Promise((e,i)=>{n=setTimeout(()=>i(Error(`Gateway readiness timed out`)),5e3),r=()=>i(t?.reason??Error(`Cancelled`)),t?.addEventListener(`abort`,r,{once:!0}),t?.aborted&&r()})]).finally(()=>{clearTimeout(n),t?.removeEventListener(`abort`,r)})}function uM(e,t){return e.filter(e=>e.workspaceRoot===t).sort(Mi)}var dM=class{subagent(e){if(!this.ready||!this.#t)throw Error(`会话未就绪`);return this.#t.subagent(e)}#e;#t;#n;#r;#i;#a;#o;#s;#c;#l;#u;#d=[];#f;#p;#m=[];#h;#g;#_=0;#v=0;#y=0;#b=!1;#x=!1;#S=!1;#C=!1;#w=!1;constructor(e){this.#e=e,this.#f=e.workspaceRoot,this.#p=e.preferredSession}get currentSessionId(){return this.#p}get workspaceRoot(){return this.#f}get ready(){return this.#x&&!this.#C&&this.#u!==void 0}get managementReady(){return this.#x&&!this.#C}async saveCredential(e,t){if(!this.#x||!this.#o)throw Error(`网关未连接`);await this.#o.save({provider:e,key:t})}async removeCredential(e){if(!this.#x||!this.#o)throw Error(`网关未连接`);await this.#o.remove({provider:e})}async setSearchProvider(e){if(!this.#x||!this.#s)throw Error(`网关未连接`);await this.#s.set({provider:e})}async setContextSettings(e){if(!this.#x||!this.#c)throw Error(`网关未连接`);await this.#c.set(e)}async resetContextSettings(){if(!this.#x||!this.#c)throw Error(`网关未连接`);await this.#c.reset({})}async start(){this.#e.events.onPhase(`connecting`),this.#e.events.onWorkspace(this.#f);try{await this.#N()}catch(e){this.#T(e),e instanceof wi?(this.#S=!0,this.#e.events.onPhase(`error`),await this.#I()):this.#P()}}#T(e){this.#e.events.onError(e instanceof wi?`版本不兼容,请运行 neko update 后重新启动本地 neko。`:e instanceof Error?e.message:String(e))}#E(e){if(this.#b||e!==this.#v)throw Error(`连接已变化,请重试`)}async#D(e){if(!this.managementReady)throw Error(`操作进行中或网关未连接,请稍后重试`);this.#C=!0,this.#e.events.onOperation(!0);let t=this.#v;try{await e(t)}finally{this.#C=!1,this.#e.events.onOperation(!1),t===this.#v&&this.#j()}}async selectWorkspace(e){await this.#D(async t=>{if(!this.#r?.state.value.workspaces.some(t=>t.path===e))throw Error(`工作区不存在`);await this.#O(e,void 0,t)})}async addWorkspace(e){await this.#D(async t=>{let n=await this.#r.add({path:e});this.#E(t),await this.#O(n.path,void 0,t)})}async browse(e){if(!this.#x||!this.#r)throw Error(`网关未连接`);return this.#r.browse(e)}async attachTo(e){await this.#D(async t=>{if(!this.#d.find(t=>t.id===e&&t.workspaceRoot===this.#f))throw Error(`会话不属于当前工作区或已归档`);await this.#k(e,t)})}async createSession(){await this.#D(async e=>{let t=await this.#n.create({cwd:this.#f});this.#E(e),await this.#k(t.id,e)})}async archiveSession(e){await this.#D(async t=>{await this.#n.archive(e),this.#E(t),this.#d=this.#d.filter(t=>t.id!==e),this.#p===e&&await this.#O(this.#f,void 0,t)})}async#O(e,t,n){let r=uM(this.#d,e).sort(Ni),i=r.find(e=>e.id===t)??r[0];try{i?await this.#k(i.id,n):await this.#A(n),this.#E(n),this.#f=e,this.#e.events.onWorkspace(e)}catch(e){throw n===this.#v&&(this.#F(),this.#p=void 0,this.#e.events.onSessionChange(null)),e}}async#k(e,t){if(this.#p===e&&this.#u)return;let n=this.#t;this.#F();let r=this.#y;this.#p=void 0,this.#e.events.onSessionChange(null);let i=await n.attach(e);this.#E(t),this.#u=i,this.#p=e,this.#e.events.onSessionChange(e);let a=e=>{e&&t===this.#v&&r===this.#y&&this.#e.events.onView(e)};i.view.value&&a(i.view.value),this.#h=i.view.subscribe(a)}async#A(e){this.#F(),this.#p=void 0,this.#e.events.onSessionChange(null),await this.#t.detach(),this.#E(e)}#j(){this.managementReady&&this.#p&&!this.#d.some(e=>e.id===this.#p)&&this.#D(e=>this.#O(this.#f,void 0,e)).catch(e=>this.#T(e))}async configure(e){if(!this.ready)throw Error(`会话未就绪`);await this.#u.configure(e)}async submit(e,t=[],n=crypto.randomUUID(),r){if(r!==void 0&&r!==this.#p)throw Error(`会话已切换,草稿已保留`);if(!this.ready)throw Error(`会话未就绪`);let i=this.#u,a=[];try{for(let e of t)a.push(await Di(e,{begin:e=>i.beginImage(e),append:e=>i.appendImage(e),finish:e=>i.finishImage(e),release:e=>i.releaseImage(e)}));await i.submit({content:e,requestId:n,images:a})}finally{for(let e of a)await i.releaseImage(e).catch(()=>{})}}async searchFiles(e,t,n){if(!this.managementReady||!this.#i||t!==this.#f)throw Error(`工作区未就绪`);return this.#t.host.root(n=>this.#i.search({workspaceRoot:t,query:e},n),{signal:n})}async workspaceImage(e,t,n){if(!this.ready||t!==this.#p)throw Error(`会话已切换,草稿已保留`);let r=this.#u;return this.#t.host.root(async t=>{let n=await r.importImage(e,t);try{return{...await Oi(e=>r.draftImage({id:n.id,offset:e},t)),name:n.name}}finally{await r.releaseImage(n.id).catch(()=>{})}},{signal:n})}async compact(e,t){if(t!==void 0&&t!==this.#p)throw Error(`会话已切换,草稿已保留`);if(!this.ready)throw Error(`会话未就绪`);await this.#u.compact({instructions:e})}#M(e){if(!this.ready||e!==this.#p)throw Error(`会话已切换`);return aM(this.#u)}async steer(e,t){if(!this.ready||e!==this.#p)throw Error(`会话已切换`);return sM(this.#u).steer(t)}async withdraw(e,t){if(!this.ready||e!==this.#p)throw Error(`会话已切换`);return sM(this.#u).withdraw(t)}async jobOutput(e,t,n){return this.#M(e).output(t,n)}async jobStop(e,t){return this.#M(e).stop(t)}async image(e,t,n){if(n!==void 0&&n!==this.#p)throw Error(`会话已切换,草稿已保留`);if(!this.ready)throw Error(`会话未就绪`);let r=this.#u;return Oi(n=>r.getImage({entryId:e,contentIndex:t,offset:n}))}abort(){this.ready&&this.#u.abort(null).catch(e=>this.#T(e))}async listSkills(e,t){if(!this.ready||e!==this.#p)throw Error(`会话未就绪`);return this.#t.host.root(e=>this.#u.skills(null,e),{signal:t})}async listModels(){return this.#a?.list(null)??[]}marketList(e){return this.#l?this.#l.list({...e?{query:e}:{},workspaceRoot:this.#f}):Promise.reject(Error(`网关未连接`))}marketDetail(e){return this.#l?this.#l.detail({name:e,workspaceRoot:this.#f}):Promise.reject(Error(`网关未连接`))}marketPreview(e){return this.#l?this.#l.preview({name:e}):Promise.reject(Error(`网关未连接`))}marketInstall(e,t,n){return this.#l?this.#l.install({name:e,scope:t,workspaceRoot:this.#f,...n?{overwrite:n}:{}}):Promise.reject(Error(`网关未连接`))}async marketUninstall(e,t){if(!this.#l)return Promise.reject(Error(`网关未连接`));await this.#l.uninstall({name:e,scope:t,workspaceRoot:this.#f})}async#N(){let e=++this.#v,t=this.#e.discover?await this.#e.discover():{gatewayWs:this.#e.url,serverId:this.#e.serverId};this.#E(e);let n=cM($j(new WebSocket(t.gatewayWs)),t.serverId);this.#t=n,n.link.onClose(()=>{n===this.#t&&this.#P()});try{await n.ready()}catch(e){throw e instanceof wi&&(this.#S=!0,this.#g&&=(clearTimeout(this.#g),void 0),this.#e.events.onPhase(`error`)),e}this.#E(e),this.#m.push(n.application.info.subscribe(t=>{e===this.#v&&this.#e.events.onUpdates?.(t)})),this.#e.events.onUpdates?.(n.application.info.value),this.#n=n.management,this.#r=n.workspaces,this.#i=n.workspaceFiles,this.#a=n.models,this.#o=n.credentials,this.#s=n.searchSettings,this.#c=n.contextSettings,this.#l=n.skillMarket,this.#m.push(this.#o.state.subscribe(t=>{e===this.#v&&this.#e.events.onCredentials?.(t)})),this.#e.events.onCredentials?.(this.#o.state.value),this.#m.push(this.#s.state.subscribe(t=>{e===this.#v&&this.#e.events.onSearchSettings?.(t)})),this.#e.events.onSearchSettings?.(this.#s.state.value);let r=this.#c;this.#m.push(r.state.subscribe(t=>{e===this.#v&&this.#e.events.onContextSettings?.(t)})),this.#e.events.onContextSettings?.(r.state.value);let i=n.directory,a=t=>{e===this.#v&&(this.#d=t.sessions,this.#e.events.onDirectory(t),this.#j())};this.#m.push(i.state.subscribe(a)),this.#m.push(this.#r.state.subscribe(t=>{e===this.#v&&this.#e.events.onWorkspaces(t)})),this.#w||=(await this.#r.add({path:this.#f}),this.#E(e),!0),a(i.state.value),this.#e.events.onWorkspaces(this.#r.state.value),await this.#O(this.#f,this.#p,e),this.#E(e),this.#x=!0,this.#_=0,this.#e.events.onPhase(`ready`),this.#a.list(null).then(t=>{e===this.#v&&this.#e.events.onModels(t)}).catch(()=>{})}async checkUpdates(){if(!this.#t)throw Error(`网关未连接`);return this.#t.application.check(null)}#P(){if(this.#b||this.#S||this.#g)return;++this.#v,this.#x=!1,this.#F(),this.#e.events.onPhase(`reconnecting`),this.#e.events.onUpdates?.(null);let e=Math.min((this.#e.retryBaseMs??800)*++this.#_,this.#e.retryMaxMs??8e3);this.#g=setTimeout(()=>{this.#g=void 0,this.#I().then(()=>{if(!this.#b)return this.#N()}).catch(e=>{this.#T(e),e instanceof wi?(this.#e.events.onPhase(`error`),this.#I()):this.#P()})},e)}#F(){++this.#y,this.#h?.(),this.#h=void 0,this.#u?.release(),this.#u=void 0,this.#e.events.onView(null)}async#I(){for(let e of this.#m.splice(0))e();this.#F(),this.#n=void 0,this.#r=void 0,this.#i=void 0,this.#o=void 0,this.#e.events.onCredentials?.(null),this.#s=void 0,this.#e.events.onSearchSettings?.(null),this.#c=void 0,this.#e.events.onContextSettings?.(null),this.#a=void 0;let e=this.#t;this.#t=void 0,await e?.close().catch(()=>{})}dispose(){this.#b=!0,++this.#v,this.#x=!1,clearTimeout(this.#g),this.#I()}},fM={phase:`connecting`,updates:null,webInfo:null,credentials:null,searchSettings:null,contextSettings:null,workspaceRoot:``,workspaces:[],operating:!1,sessions:[],models:[],currentSessionId:null,view:null,notice:null},pM=new Set;function mM(e){fM=e;for(let e of pM)e()}function hM(e){return pM.add(e),()=>{pM.delete(e)}}function gM(){return(0,f.useSyncExternalStore)(hM,()=>fM)}function _M(){return fM}var vM={setUpdates(e){mM({...fM,updates:e})},setWebInfo(e){mM({...fM,webInfo:e})},setCredentials(e){e&&fM.credentials&&e.revision<fM.credentials.revision||mM({...fM,credentials:e})},setSearchSettings(e){e&&fM.searchSettings&&e.revision<fM.searchSettings.revision||mM({...fM,searchSettings:e})},setContextSettings(e){e&&fM.contextSettings&&e.revision<fM.contextSettings.revision||mM({...fM,contextSettings:e})},setWorkspace(e){mM({...fM,workspaceRoot:e})},setWorkspaces(e){mM({...fM,workspaces:e})},setOperation(e){mM({...fM,operating:e})},setPhase(e){mM({...fM,phase:e})},setDirectory(e){mM({...fM,sessions:e})},setModels(e){mM({...fM,models:e})},setSession(e){mM({...fM,currentSessionId:e})},setView(e){mM({...fM,view:e})},notice(e){mM({...fM,notice:e})},clearNotice(){fM.notice!==null&&mM({...fM,notice:null})}},yM=`neko.upgrade-draft.v1`;function bM(e=sessionStorage){try{let t=JSON.parse(e.getItem(yM)??`null`);if(t?.version===1&&typeof t.serverId==`string`&&typeof t.workspace==`string`&&(typeof t.session==`string`||t.session===null)&&typeof t.text==`string`&&typeof t.requestId==`string`)return t}catch{}return null}function xM(e,t=sessionStorage){if(t.setItem(yM,JSON.stringify(e)),t.getItem(yM)!==JSON.stringify(e))throw Error(`Draft not saved`)}function SM(){sessionStorage.removeItem(yM)}var CM=0;async function wM(){let e=++CM,t=await fetch(`/api/info`,{cache:`no-store`,signal:AbortSignal.timeout(5e3)});if(!t.ok)throw Error(`GET /api/info 失败(${t.status})`);let n=await t.json();if(n.protocolCompatible===!1)throw new wi;if(typeof n.gatewayWs!=`string`||typeof n.serverId!=`string`||typeof n.webVersion!=`string`||typeof n.workspaceRoot!=`string`||n.installedVersion!==null&&typeof n.installedVersion!=`string`)throw Error(`无效的网关信息`);return e===CM&&vM.setWebInfo({serverId:n.serverId,webVersion:n.webVersion,installedVersion:n.installedVersion,gatewaySpawned:n.gatewaySpawned===!0}),n}var TM;function EM(){(async()=>{let e;try{e=await wM()}catch(e){vM.setPhase(`error`),vM.notice({level:`error`,text:e instanceof wi?`版本不兼容,请运行 neko update 后重新启动本地 neko。`:`获取网关信息失败:${e instanceof Error?e.message:String(e)}`});return}let t=bM(),n=t?.serverId===e.serverId?t:null;TM=new dM({url:e.gatewayWs,serverId:e.serverId,workspaceRoot:n?.workspace??e.workspaceRoot,preferredSession:n?.session??void 0,discover:wM,events:{onPhase:vM.setPhase,onUpdates:vM.setUpdates,onCredentials:vM.setCredentials,onSearchSettings:vM.setSearchSettings,onContextSettings:vM.setContextSettings,onWorkspaces:e=>vM.setWorkspaces(e.workspaces),onWorkspace:vM.setWorkspace,onOperation:vM.setOperation,onError:e=>vM.notice({level:`error`,text:e}),onDirectory:e=>vM.setDirectory(e.sessions),onModels:vM.setModels,onSessionChange:vM.setSession,onView:vM.setView}}),await TM.start();let r=()=>{document.visibilityState===`visible`&&wM().catch(()=>{})},i=setInterval(r,3e4);document.addEventListener(`visibilitychange`,r),window.addEventListener(`pagehide`,()=>{clearInterval(i),document.removeEventListener(`visibilitychange`,r)},{once:!0}),n?.text&&TM.currentSessionId!==n.session&&vM.notice({level:`info`,text:`原会话不可用,升级草稿保留在关于与更新中`})})()}function DM(){vM.notice({level:`error`,text:`网关连接未就绪,请稍候或刷新页面。`})}var OM={subagent(e){return kM().subagent(e)},jobOutput(e,t,n){return kM().jobOutput(e,t,n)},jobStop(e,t){return kM().jobStop(e,t)},checkUpdates(){return kM().checkUpdates()},saveCredential(e,t){return kM().saveCredential(e,t)},removeCredential(e){return kM().removeCredential(e)},setContextSettings(e){return kM().setContextSettings(e)},resetContextSettings(){return kM().resetContextSettings()},setSearchProvider(e){return kM().setSearchProvider(e)},configure(e,t){let n=kM();return n.currentSessionId!==t||!n.ready?Promise.reject(Error(`会话已变化,请重试`)):n.configure(e)},submit(e,t=[],n,r){return kM().submit(e,t,n,r)},steer(e,t){return kM().steer(e,t)},withdraw(e,t){return kM().withdraw(e,t)},searchFiles(e,t,n){return kM().searchFiles(e,t,n)},workspaceImage(e,t,n){return kM().workspaceImage(e,t,n)},compact(e,t){return kM().compact(e,t)},listSkills(e,t){return kM().listSkills(e,t)},marketList(e){return kM().marketList(e)},marketDetail(e){return kM().marketDetail(e)},marketPreview(e){return kM().marketPreview(e)},marketInstall(e,t,n){return kM().marketInstall(e,t,n)},marketUninstall(e,t){return kM().marketUninstall(e,t)},image(e,t,n){return kM().image(e,t,n)},abort(){TM?.ready===!0?TM.abort():DM()},selectSession(e){return kM().attachTo(e)},selectWorkspace(e){return kM().selectWorkspace(e)},addWorkspace(e){return kM().addWorkspace(e)},browse(e){return kM().browse(e)},createSession(){return kM().createSession()},configureModel(e){TM===void 0?DM():TM.configure({model:e}).catch(e=>{vM.notice({level:`error`,text:e instanceof Error?e.message:String(e)})})},archiveSession(e){return kM().archiveSession(e)}};function kM(){if(!TM)throw Error(`网关尚未连接`);return TM}function AM(e){vM.notice({level:`error`,text:e instanceof Error?e.message:String(e)})}function jM(e,t){let n=e.slice(0,t),r=/(?:^|\s|[([{])(@(?:"[^"\n]*"?|[^\s"@]*))$/.exec(n);if(!r?.[1])return null;let i=r[1];return{start:t-i.length,end:t,query:i.slice(1).replace(/^"|"$/g,``)}}function MM(e,t=!1){let n=t&&!e.endsWith(`/`)?`${e}/`:e;return`@${/\s/.test(n)?`"${n}"`:n}`}function NM(e,t,n,r){let i=MM(n,r),a=r?``:` `;return{text:e.slice(0,t.start)+i+a+e.slice(t.end),cursor:t.start+i.length+a.length-(r&&i.endsWith(`"`)?1:0)}}function PM(e){return e.skill===void 0?e.text:e.skill.args===``?`/skill:${e.skill.name}`:`/skill:${e.skill.name} ${e.skill.args}`}function FM(e){return e.phase===`done`?e.isError?`error`:`ok`:e.phase}function IM(e){return(e.phase===`done`?e.result:e.output)??``}function LM(e){let t=e.width>0&&e.height>0?` · ${e.width}×${e.height}`:``;return`${e.name} · ${e.mimeType}${t}`}function RM(e){return e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(1)}s`}function zM(e){return e.replace(/\s+/g,` `).trim()}function BM(e){let t=[];for(let n of e){if(n.type!==`user`||n.subagentRoundId!==void 0)continue;let e=PM(n).trim();e!==``&&t.at(-1)!==e&&t.push(e)}return t.reverse().slice(0,100)}var VM=e=>/^\/[^\s]*$/.test(e);function HM(e,t){let n=VM(e)?e:`/`;return[{key:`compact`,label:`/compact`,description:`压缩上下文(可附加要求)`},...t.map(e=>({key:`skill:${e.name}`,label:`/skill:${e.name}`,description:e.description,...e.level===`builtin`?{badge:`内置`}:{}}))].filter(e=>e.label.startsWith(n))}function UM(e,t=160){e.style.height=`auto`,e.style.height=`${Math.min(e.scrollHeight,t)}px`}function WM(e,t,n,r,i){if(n.shiftKey||n.altKey||n.ctrlKey||n.metaKey||n.key!==`ArrowUp`&&n.key!==`ArrowDown`||i.start!==i.end)return null;let a=e!==null&&e.entries[e.index]===r?e:null;if(n.key===`ArrowUp`){if(i.start!==0)return null;let e=a?.entries??t,n=(a?.index??-1)+1,o=e[n];return o===void 0?null:{browse:{index:n,draft:a?.draft??r,entries:e},text:o,caret:`start`}}if(a===null||i.start!==r.length)return null;let o=a.index-1;return o<0?{browse:null,text:a.draft,caret:`end`}:{browse:{...a,index:o},text:a.entries[o]??``,caret:`end`}}function GM(){return typeof window<`u`}function KM(e){return YM(e)?(e.nodeName||``).toLowerCase():`#document`}function qM(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function JM(e){return((YM(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function YM(e){return GM()?e instanceof Node||e instanceof qM(e).Node:!1}function XM(e){return GM()?e instanceof Element||e instanceof qM(e).Element:!1}function ZM(e){return GM()?e instanceof HTMLElement||e instanceof qM(e).HTMLElement:!1}function QM(e){return!GM()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof qM(e).ShadowRoot}function $M(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=uN(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function eN(e){return/^(table|td|th)$/.test(KM(e))}function tN(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var nN=/transform|translate|scale|rotate|perspective|filter/,rN=/paint|layout|strict|content/,iN=e=>!!e&&e!==`none`,aN;function oN(e){let t=XM(e)?uN(e):e;return iN(t.transform)||iN(t.translate)||iN(t.scale)||iN(t.rotate)||iN(t.perspective)||!cN()&&(iN(t.backdropFilter)||iN(t.filter))||nN.test(t.willChange||``)||rN.test(t.contain||``)}function sN(e){let t=fN(e);for(;ZM(t)&&!lN(t);){if(oN(t))return t;if(tN(t))return null;t=fN(t)}return null}function cN(){return aN??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),aN}function lN(e){return/^(html|body|#document)$/.test(KM(e))}function uN(e){return qM(e).getComputedStyle(e)}function dN(e){return XM(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function fN(e){if(KM(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||QM(e)&&e.host||JM(e);return QM(t)?t.host:t}function pN(e){let t=fN(e);return lN(t)?(e.ownerDocument||e).body:ZM(t)&&$M(t)?t:pN(t)}function mN(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=pN(e),i=r===e.ownerDocument?.body,a=qM(r);if(i){let e=hN(a);return t.concat(a,a.visualViewport||[],$M(r)?r:[],e&&n?mN(e):[])}return t.concat(r,mN(r,[],n))}function hN(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var gN=Math.min,_N=Math.max,vN=Math.round,yN=Math.floor,bN=e=>({x:e,y:e}),xN={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function SN(e,t,n){return _N(e,gN(t,n))}function CN(e,t){return typeof e==`function`?e(t):e}function wN(e){return e.split(`-`)[0]}function TN(e){return e.split(`-`)[1]}function EN(e){return e===`x`?`y`:`x`}function DN(e){return e===`y`?`height`:`width`}function ON(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function kN(e){return EN(ON(e))}function AN(e,t,n){n===void 0&&(n=!1);let r=TN(e),i=kN(e),a=DN(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=zN(o)),[o,zN(o)]}function jN(e){let t=zN(e);return[MN(e),t,MN(t)]}function MN(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var NN=[`left`,`right`],PN=[`right`,`left`],FN=[`top`,`bottom`],IN=[`bottom`,`top`];function LN(e,t,n){switch(e){case`top`:case`bottom`:return n?t?PN:NN:t?NN:PN;case`left`:case`right`:return t?FN:IN;default:return[]}}function RN(e,t,n,r){let i=TN(e),a=LN(wN(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(MN)))),a}function zN(e){let t=wN(e);return xN[t]+e.slice(t.length)}function BN(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function VN(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:BN(e)}function HN(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}var UN=[`input:not([inert]):not([inert] *)`,`select:not([inert]):not([inert] *)`,`textarea:not([inert]):not([inert] *)`,`a[href]:not([inert]):not([inert] *)`,`area[href]:not([inert]):not([inert] *)`,`button:not([inert]):not([inert] *)`,`[tabindex]:not(slot):not([inert]):not([inert] *)`,`audio[controls]:not([inert]):not([inert] *)`,`video[controls]:not([inert]):not([inert] *)`,`[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)`,`details>summary:first-of-type:not([inert]):not([inert] *)`,`details:not([inert]):not([inert] *)`].join(`,`),WN=typeof Element>`u`,GN=WN?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,KN=!WN&&Element.prototype.getRootNode?function(e){return e?.getRootNode?.call(e)}:function(e){return e?.ownerDocument},qN=function(e,t){t===void 0&&(t=!0);var n=e?.getAttribute?.call(e,`inert`);return n===``||n===`true`||t&&e&&(typeof e.closest==`function`?e.closest(`[inert]`):qN(e.parentNode))},JN=function(e){var t=e?.getAttribute?.call(e,`contenteditable`);return t===``||t===`true`},YN=function(e,t,n){if(qN(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(UN));return t&&GN.call(e,UN)&&r.unshift(e),r=r.filter(n),r},XN=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!qN(a,!1)){if(a.tagName===`SLOT`){var o=a.assignedElements(),s=XN(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{GN.call(a,UN)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!qN(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=XN(c===!0?a.children:c.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}}return r},ZN=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},QN=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||JN(e))&&!ZN(e)?0:e.tabIndex},$N=function(e,t){var n=QN(e);return n<0&&t&&!ZN(e)?0:n},eP=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},tP=function(e){return e.tagName===`INPUT`},nP=function(e){return tP(e)&&e.type===`hidden`},rP=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},iP=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},aP=function(e){if(!e.name)return!0;var t=e.form||KN(e),n=function(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&window.CSS!==void 0&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(e){return console.error(`Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s`,e.message),!1}var i=iP(r,e.form);return!i||i===e},oP=function(e){return tP(e)&&e.type===`radio`},sP=function(e){return oP(e)&&!aP(e)},cP=function(e){var t=e&&KN(e),n=t?.host,r=!1;if(t&&t!==e){var i,a,o;for(r=!!((i=n)!=null&&(a=i.ownerDocument)!=null&&a.contains(n)||e!=null&&(o=e.ownerDocument)!=null&&o.contains(e));!r&&n;){var s,c;t=KN(n),n=t?.host,r=!!((s=n)!=null&&(c=s.ownerDocument)!=null&&c.contains(n))}}return r},lP=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},uP=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n===`full-native`&&`checkVisibility`in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});var i=getComputedStyle(e).visibility;if(i===`hidden`||i===`collapse`)return!0;var a=GN.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(GN.call(a,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`full-native`||n===`legacy-full`){if(typeof r==`function`){for(var o=e;e;){var s=e.parentElement,c=KN(e);if(s&&!s.shadowRoot&&r(s)===!0)return lP(e);e=e.assignedSlot?e.assignedSlot:!s&&c!==e.ownerDocument?c.host:s}e=o}if(cP(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return lP(e);return!1},dP=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName===`LEGEND`)return GN.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},fP=function(e,t){return!(t.disabled||nP(t)||uP(t,e)||rP(t)||dP(t))},pP=function(e,t){return!(sP(t)||QN(t)<0||!fP(e,t))},mP=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},hP=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=$N(a,i),s=i?hP(e.candidates):a;o===0?i?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:o,item:e,isScope:i,content:s})}),n.sort(eP).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},gP=function(e,t){return t||={},hP(t.getShadowRoot?XN([e],t.includeContainer,{filter:pP.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:mP}):YN(e,t.includeContainer,pP.bind(null,t)))};function _P(){return/apple/i.test(navigator.vendor)}function vP(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function yP(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&QM(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function bP(e){return e?.ownerDocument||document}var xP=typeof document<`u`?f.useLayoutEffect:function(){},SP={...f}.useInsertionEffect||(e=>e());function CP(e){let t=f.useRef(()=>{});return SP(()=>{t.current=e}),f.useCallback(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}var wP=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver==`function`&&ResizeObserver.toString().includes(`[native code]`)?`full`:`none`});function TP(e,t){let n=gP(e,wP()),r=n.length;if(r===0)return;let i=vP(bP(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function EP(e){return TP(bP(e).body,1)||e}function DP(e){return TP(bP(e).body,-1)||e}function OP(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!yP(n,r)}function kP(e){gP(e,wP()).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function AP(e){e.querySelectorAll(`[data-tabindex]`).forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}var jP=l(_i(),1);function MP(e,t,n){let{reference:r,floating:i}=e,a=ON(t),o=kN(t),s=DN(o),c=wN(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=TN(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function NP(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=CN(t,e),p=VN(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=HN(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=HN(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var PP=50,FP=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:NP},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=MP(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<PP&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=MP(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},IP=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=CN(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=wN(r),_=ON(o),v=wN(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[zN(o)]:jN(o)),x=p!==`none`;!d&&x&&b.push(...RN(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=AN(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===ON(t)||T.every(e=>ON(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=ON(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}},LP=new Set([`left`,`top`]);async function RP(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=wN(n),s=TN(n),c=ON(n)===`y`,l=LP.has(o)?-1:1,u=a&&c?-1:1,d=CN(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var zP=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await RP(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},BP=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=CN(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=ON(i),p=EN(f),m=u[p],h=u[f],g=(e,t)=>SN(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},VP=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=CN(e,t),c=await i.detectOverflow(t,s),l=wN(n),u=TN(n),d=ON(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=gN(p-c[m],g),y=gN(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*_N(c.left,c.right):S=p-2*_N(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function HP(e){let t=uN(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=ZM(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=vN(n)!==a||vN(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function UP(e){return XM(e)?e:e.contextElement}function WP(e){let t=UP(e);if(!ZM(t))return bN(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=HP(t),o=(a?vN(n.width):n.width)/r,s=(a?vN(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var GP=bN(0);function KP(e){let t=qM(e);return!cN()||!t.visualViewport?GP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function qP(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===qM(e)}function JP(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=UP(e),o=bN(1);t&&(r?XM(r)&&(o=WP(r)):o=WP(e));let s=qP(a,n,r)?KP(a):bN(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=qM(a),t=XM(r)?qM(r):r,n=e,i=hN(n);for(;i&&t!==n;){let e=WP(i),t=i.getBoundingClientRect(),r=uN(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=qM(i),i=hN(n)}}return HN({width:u,height:d,x:c,y:l})}function YP(e,t){let n=dN(e).scrollLeft;return t?t.left+n:JP(JM(e)).left+n}function XP(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-YP(e,n),y:n.top+t.scrollTop}}function ZP(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=JM(r),s=t?tN(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=bN(1),u=bN(0),d=ZM(r);if((d||!a)&&((KM(r)!==`body`||$M(o))&&(c=dN(r)),d)){let e=JP(r);l=WP(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?XP(o,c):bN(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function QP(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function $P(e){let t=dN(e),n=e.ownerDocument.body,r=_N(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=_N(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+YP(e),o=-t.scrollTop;return uN(n).direction===`rtl`&&(a+=_N(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var eF=25;function tF(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=qM(e),a=JM(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!cN()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(YP(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=eF&&(s-=o)}return{width:s,height:c,x:l,y:u}}function nF(e,t){let n=JP(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=WP(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function rF(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=tF(e,n,t);else if(t===`document`)r=$P(JM(e));else if(XM(t))r=nF(t,n);else{let n=KP(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return HN(r)}function iF(e,t){let n=t.get(e);if(n)return n;let r=mN(e,[],!1).filter(e=>XM(e)&&KM(e)!==`body`),i=null,a=uN(e).position===`fixed`,o=a?fN(e):e;for(;XM(o)&&!lN(o);){let e=uN(o),t=oN(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=fN(o)}return t.set(e,r),r}function aF(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?tN(t)?[]:iF(t,this._c):[].concat(n),r],o=rF(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=rF(t,a[e],i);s=_N(n.top,s),c=gN(n.right,c),l=gN(n.bottom,l),u=_N(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function oF(e){let{width:t,height:n}=HP(e);return{width:t,height:n}}function sF(e,t,n){let r=ZM(t),i=JM(t),a=n===`fixed`,o=JP(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=bN(0);if((r||!a)&&((KM(t)!==`body`||$M(i))&&(s=dN(t)),r)){let e=JP(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=YP(i));let l=i&&!r&&!a?XP(i,s):bN(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function cF(e){return uN(e).position===`static`}function lF(e,t){if(!ZM(e)||uN(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return JM(e)===n&&(n=n.ownerDocument.body),n}function uF(e,t){let n=qM(e);if(tN(e))return n;if(!ZM(e)){let t=fN(e);for(;t&&!lN(t);){if(XM(t)&&!cF(t))return t;t=fN(t)}return n}let r=lF(e,t);for(;r&&eN(r)&&cF(r);)r=lF(r,t);return r&&lN(r)&&cF(r)&&!oN(r)?n:r||sN(e)||n}var dF=async function(e){let t=this.getOffsetParent||uF,n=this.getDimensions,r=await n(e.floating);return{reference:sF(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function fF(e){return uN(e).direction===`rtl`}var pF={convertOffsetParentRelativeRectToViewportRelativeRect:ZP,getDocumentElement:JM,getClippingRect:aF,getOffsetParent:uF,getElementRects:dF,getClientRects:QP,getDimensions:oF,getScale:WP,isElement:XM,isRTL:fF};function mF(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function hF(e,t,n){let r=null,i,a=JM(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=yN(d),h=yN(a.clientWidth-(u+f)),g=yN(a.clientHeight-(d+p)),_=yN(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:_N(0,gN(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!mF(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=qM(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function gF(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=UP(e),u=i||a?[...l?mN(l):[],...t?mN(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?hF(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?JP(e):null;c&&g();function g(){let t=JP(e);h&&!mF(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var _F=zP,vF=BP,yF=IP,bF=VP,xF=(e,t,n)=>{let r=new Map,i=n??{},a={...pF,...i.platform,_c:r};return FP(e,t,{...i,platform:a})},SF=typeof document<`u`?f.useLayoutEffect:function(){};function CF(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!CF(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!CF(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function wF(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function TF(e,t){let n=wF(e);return Math.round(t*n)/n}function EF(e){let t=f.useRef(e);return SF(()=>{t.current=e}),t}function DF(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=f.useState(r);CF(p,r)||m(r);let[h,g]=f.useState(null),[_,v]=f.useState(null),y=f.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),b=f.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||h,S=o||_,C=f.useRef(null),w=f.useRef(null),T=f.useRef(u),ee=c!=null,te=EF(c),ne=EF(i),re=EF(l),E=f.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:p};ne.current&&(e.platform=ne.current),xF(C.current,w.current,e).then(e=>{let t={...e,isPositioned:re.current!==!1};ie.current&&!CF(T.current,t)&&(T.current=t,jP.flushSync(()=>{d(t)}))})},[p,t,n,ne,re]);SF(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let ie=f.useRef(!1);SF(()=>(ie.current=!0,()=>{ie.current=!1}),[]),SF(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(te.current)return te.current(x,S,E);E()}},[x,S,E,te,ee]);let ae=f.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),oe=f.useMemo(()=>({reference:x,floating:S}),[x,S]),se=f.useMemo(()=>{let e={position:n,left:0,top:0};if(!oe.floating)return e;let t=TF(oe.floating,u.x),r=TF(oe.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...wF(oe.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,oe.floating,u.x,u.y]);return f.useMemo(()=>({...u,update:E,refs:ae,elements:oe,floatingStyles:se}),[u,E,ae,oe,se])}var OF=(e,t)=>{let n=_F(e);return{name:n.name,fn:n.fn,options:[e,t]}},kF=(e,t)=>{let n=vF(e);return{name:n.name,fn:n.fn,options:[e,t]}},AF=(e,t)=>{let n=yF(e);return{name:n.name,fn:n.fn,options:[e,t]}},jF=(e,t)=>{let n=bF(e);return{name:n.name,fn:n.fn,options:[e,t]}},MF=`ArrowLeft`,NF=`ArrowRight`,PF=`ArrowUp`,FF=`ArrowDown`,IF=[MF,NF],LF=[PF,FF];[...IF,...LF];var RF={...f},zF=!1,BF=0,VF=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+BF++;function HF(){let[e,t]=f.useState(()=>zF?VF():void 0);return xP(()=>{e??t(VF())},[]),f.useEffect(()=>{zF=!0},[]),e}var UF=RF.useId||HF;function WF(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}var GF=f.createContext(null),KF=f.createContext(null),qF=()=>f.useContext(GF)?.id||null,JF=()=>f.useContext(KF);function YF(e){return`data-floating-ui-`+e}var XF={border:0,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`fixed`,whiteSpace:`nowrap`,width:`1px`,top:0,left:0},ZF=f.forwardRef(function(e,t){let[n,r]=f.useState();xP(()=>{_P()&&r(`button`)},[]);let i={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[YF(`focus-guard`)]:``,style:XF};return(0,k.jsx)(`span`,{...e,...i})}),QF={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},$F=f.createContext(null),eI=YF(`portal`);function tI(e){e===void 0&&(e={});let{id:t,root:n}=e,r=UF(),i=rI(),[a,o]=f.useState(null),s=f.useRef(null);return xP(()=>()=>{a?.remove(),queueMicrotask(()=>{s.current=null})},[a]),xP(()=>{if(!r||s.current)return;let e=t?document.getElementById(t):null;if(!e)return;let n=document.createElement(`div`);n.id=r,n.setAttribute(eI,``),e.appendChild(n),s.current=n,o(n)},[t,r]),xP(()=>{if(n===null||!r||s.current)return;let e=n||i?.portalNode;e&&!YM(e)&&(e=e.current),e||=document.body;let a=null;t&&(a=document.createElement(`div`),a.id=t,e.appendChild(a));let c=document.createElement(`div`);c.id=r,c.setAttribute(eI,``),e=a||e,e.appendChild(c),s.current=c,o(c)},[t,n,r,i]),a}function nI(e){let{children:t,id:n,root:r,preserveTabOrder:i=!0}=e,a=tI({id:n,root:r}),[o,s]=f.useState(null),c=f.useRef(null),l=f.useRef(null),u=f.useRef(null),d=f.useRef(null),p=o?.modal,m=o?.open,h=!!o&&!o.modal&&o.open&&i&&!!(r||a);return f.useEffect(()=>{if(!a||!i||p)return;function e(e){a&&OP(e)&&(e.type===`focusin`?AP:kP)(a)}return a.addEventListener(`focusin`,e,!0),a.addEventListener(`focusout`,e,!0),()=>{a.removeEventListener(`focusin`,e,!0),a.removeEventListener(`focusout`,e,!0)}},[a,i,p]),f.useEffect(()=>{a&&(m||AP(a))},[m,a]),(0,k.jsxs)($F.Provider,{value:f.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:c,afterOutsideRef:l,beforeInsideRef:u,afterInsideRef:d,portalNode:a,setFocusManagerState:s}),[i,a]),children:[h&&a&&(0,k.jsx)(ZF,{"data-type":`outside`,ref:c,onFocus:e=>{if(OP(e,a)){var t;(t=u.current)==null||t.focus()}else DP(o?o.domReference:null)?.focus()}}),h&&a&&(0,k.jsx)(`span`,{"aria-owns":a.id,style:QF}),a&&jP.createPortal(t,a),h&&a&&(0,k.jsx)(ZF,{"data-type":`outside`,ref:l,onFocus:e=>{if(OP(e,a)){var t;(t=d.current)==null||t.focus()}else EP(o?o.domReference:null)?.focus(),o!=null&&o.closeOnFocusOut&&o?.onOpenChange(!1,e.nativeEvent,`focus-out`)}})]})}var rI=()=>f.useContext($F);function iI(e){let{open:t=!1,onOpenChange:n,elements:r}=e,i=UF(),a=f.useRef({}),[o]=f.useState(()=>WF()),s=qF()!=null,[c,l]=f.useState(r.reference),u=CP((e,t,r)=>{a.current.openEvent=e?t:void 0,o.emit(`openchange`,{open:e,event:t,reason:r,nested:s}),n?.(e,t,r)}),d=f.useMemo(()=>({setPositionReference:l}),[]),p=f.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return f.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:p,events:o,floatingId:i,refs:d}),[t,u,p,o,i,d])}function aI(e){let{elements:t,...n}=e===void 0?{}:e,{nodeId:r}=n,i=iI({...n,elements:{reference:t?.reference??null,floating:t?.floating??null}}),a=n.rootContext||i,o=a.elements,[s,c]=f.useState(null),[l,u]=f.useState(null),d=o?.domReference||s,p=f.useRef(null),m=JF();xP(()=>{d&&(p.current=d)},[d]);let h=DF({...n,elements:{...o,...l&&{reference:l}}}),g=f.useCallback(e=>{let t=XM(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),h.refs.setReference(t)},[h.refs]),_=f.useCallback(e=>{(XM(e)||e===null)&&(p.current=e,c(e)),(XM(h.refs.reference.current)||h.refs.reference.current===null||e!==null&&!XM(e))&&h.refs.setReference(e)},[h.refs]),v=f.useMemo(()=>({...h.refs,setReference:_,setPositionReference:g,domReference:p}),[h.refs,_,g]),y=f.useMemo(()=>({...h.elements,domReference:d}),[h.elements,d]),b=f.useMemo(()=>({...h,...a,refs:v,elements:y,nodeId:r}),[h,v,y,r,a]);return xP(()=>{a.dataRef.current.floatingContext=b;let e=m?.nodesRef.current.find(e=>e.id===r);e&&(e.context=b)}),f.useMemo(()=>({...h,context:b,refs:v,elements:y}),[h,v,y,b])}function oI({anchor:e,id:t,title:n,items:r,selected:i,onSelect:a,onAccept:o,message:s,onRetry:c}){let{refs:l,floatingStyles:u,isPositioned:d}=aI({elements:{reference:e.current},placement:`top-start`,whileElementsMounted:gF,middleware:[OF(8),AF(),kF({padding:12}),jF({padding:12,apply({availableHeight:e,availableWidth:t,rects:n,elements:r}){Object.assign(r.floating.style,{maxHeight:`${Math.max(0,Math.min(320,e))}px`,width:`${Math.min(n.reference.width,t)}px`})}})]});return(0,f.useEffect)(()=>{document.getElementById(`${t}-${i}`)?.scrollIntoView({block:`nearest`})},[t,i]),(0,k.jsx)(nI,{children:(0,k.jsxs)(`div`,{ref:l.setFloating,style:{...u,visibility:d?`visible`:`hidden`},className:`z-50 overflow-y-auto rounded-xl border border-sakura-200 bg-base p-1.5 shadow-soft`,children:[(0,k.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-x-3 gap-y-1 px-3 py-2 text-xs text-ink-500`,children:[(0,k.jsx)(`span`,{children:n}),(0,k.jsx)(`span`,{children:`↑↓ 选择 · Enter / Tab 确认 · Esc 关闭`})]}),(0,k.jsx)(`div`,{id:t,role:`listbox`,tabIndex:-1,"aria-label":n,children:r.map((e,n)=>(0,k.jsxs)(`button`,{type:`button`,role:`option`,id:`${t}-${n}`,"aria-selected":n===i,tabIndex:-1,title:e.description,onMouseDown:e=>e.preventDefault(),onPointerMove:e=>{e.pointerType===`mouse`&&(e.movementX!==0||e.movementY!==0)&&a(n)},onClick:()=>o(n),className:`block w-full rounded-lg px-3 py-2 text-left ${n===i?`bg-sakura-100`:``}`,children:[(0,k.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,k.jsx)(`span`,{className:`truncate text-sm text-ink-900`,children:e.label}),e.badge&&(0,k.jsx)(`span`,{className:`shrink-0 rounded-md bg-ink-100 px-1.5 py-0.5 text-xs text-ink-600`,children:e.badge})]}),(0,k.jsx)(`span`,{className:`block truncate text-xs text-ink-500`,children:e.description})]},e.key))}),s&&(0,k.jsx)(`output`,{className:`block break-words px-3 py-2 text-sm text-ink-500`,children:s}),c&&(0,k.jsx)(`button`,{type:`button`,className:`px-3 py-2 text-sm text-ink-900 underline`,onMouseDown:e=>e.preventDefault(),onClick:c,children:`重试文件查询`})]})})}function sI(e,t,n,r,i){let[a,o]=(0,f.useState)(null),[s,c]=(0,f.useState)({entries:[],limited:!1,incomplete:!1}),[l,u]=(0,f.useState)(``),[d,p]=(0,f.useState)(0),[m,h]=(0,f.useState)(!1),g=(0,f.useRef)(0),_=(0,f.useId)(),v=()=>{g.current++,o(null),c({entries:[],limited:!1,incomplete:!1}),p(0)},y=()=>{let t=e.current;if(!t||!r)return v();let n=jM(t.value,t.selectionStart);if(!n)return v();a&&n.start===a.start&&n.end===a.end&&n.query===a.query||(g.current++,c({entries:[],limited:!1,incomplete:!1}),u(`正在查找文件…`),h(!1),o(n),p(0))};(0,f.useEffect)(()=>{if(!a||!r){o(null);return}let e=new AbortController,t=++g.current,i=setTimeout(()=>{OM.searchFiles(a.query,n,e.signal).then(n=>{e.signal.aborted||t!==g.current||(c(n),u(n.incomplete?`文件索引未完整,请输入子目录缩小范围`:n.entries.length?n.limited?`结果较多,请继续输入路径缩小范围`:``:`没有匹配的文件或目录`))}).catch(n=>{!e.signal.aborted&&t===g.current&&(h(!0),u(n instanceof Error?`查询失败:${n.message}`:`查询失败,请重试`))})},120);return()=>{clearTimeout(i),e.abort()}},[a,n,r]);let b=e=>{a&&(i(e,a),v())};return{refresh:y,close:v,keyDown:e=>{if(!a||e.nativeEvent.isComposing)return!1;if(e.key===`Escape`||e.key===`Tab`&&(e.shiftKey||!s.entries.length))return v(),e.key===`Escape`&&e.preventDefault(),e.key===`Escape`;if(e.key===`ArrowDown`||e.key===`ArrowUp`)return e.preventDefault(),p(t=>Math.max(0,Math.min(s.entries.length-1,t+(e.key===`ArrowDown`?1:-1)))),!0;if((e.key===`Enter`||e.key===`Tab`)&&!e.shiftKey){e.preventDefault();let t=s.entries[d];return t&&b(t),!0}return!1},panel:a&&r?(0,k.jsx)(oI,{anchor:t,id:_,title:`工作区文件`,selected:d,onSelect:p,onAccept:e=>{let t=s.entries[e];t&&b(t)},items:s.entries.map(e=>({key:e.path,label:`${e.kind===`directory`?`▸`:`▤`} ${e.name}${e.kind===`directory`?`/`:``}`,description:e.path})),message:l,onRetry:m?()=>{g.current++,h(!1),u(`正在查找文件…`),o(e=>e?{...e}:null)}:void 0}):null,open:!!a,controls:a?_:void 0,active:a&&s.entries[d]?`${_}-${d}`:void 0}}var cI=`(max-width: 768px)`;function lI({name:e,size:t=18,className:n}){return(0,k.jsx)(`svg`,{width:t,height:t,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:e===`more`?3:1.6,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,className:n,children:(0,k.jsx)(`path`,{d:{folder:`M3 6h6l2 2h10v11H3z`,plus:`M12 5v14M5 12h14`,chevron:`m8 10 4 4 4-4`,panel:`M3 4h18v16H3zM9 4v16`,search:`M20 20l-5-5M17 10a7 7 0 1 1-14 0 7 7 0 0 1 14 0`,more:`M5 12h.01M12 12h.01M19 12h.01`,chat:`M4 4h16v12H9l-5 4z`,close:`m6 6 12 12M6 18 18 6`,settings:`M12 3v3M12 18v3M3 12h3M18 12h3M5.6 5.6l2.1 2.1M16.3 16.3l2.1 2.1M5.6 18.4l2.1-2.1M16.3 7.7l2.1-2.1M17 12a5 5 0 1 1-10 0 5 5 0 0 1 10 0`,archive:`M3 4h18v4H3zM5 8v12h14V8M10 12h4`,up:`m5 12 7-7 7 7M12 5v14`,bolt:`M13 2 4 14h6l-1 8 9-12h-6l1-8z`,check:`M5 12.5l4.5 4.5L19 7.5`,clock:`M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18ZM12 7v5l3 2`,spinner:`M21 12a9 9 0 1 1-9-9`,store:`M4 9.5 5.6 4.5h12.8L20 9.5M4 9.5V20h16V9.5M4 9.5h16M9.5 20v-5.5h5V20`,info:`M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18ZM12 12v4M12 8h.01`,key:`M12.7 11.3 21 3m-4.2 1.8 3 3M8 19a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z`,download:`M12 4v10m0 0-4-4m4 4 4-4M5 20h14`,copy:`M9 9h11v11H9zM5 15H4V4h11v1`,trash:`M4.5 7h15M9.5 7V4.5h5V7m-7.5 0 .8 13h8.4l.8-13`,eye:`M2.5 12S6 6 12 6s9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Zm9.5 2.4a2.4 2.4 0 1 0 0-4.8 2.4 2.4 0 0 0 0 4.8Z`,phone:`M8 3h8a1.5 1.5 0 0 1 1.5 1.5v15A1.5 1.5 0 0 1 16 21H8a1.5 1.5 0 0 1-1.5-1.5v-15A1.5 1.5 0 0 1 8 3Zm2.5 14.5h3`,layers:`M12 3 3 8l9 5 9-5-9-5ZM3 12.5l9 5 9-5M3 17l9 5 9-5`,sparkles:`M12 4l1.8 4.7L18.5 10.5l-4.7 1.8L12 17l-1.8-4.7L5.5 10.5l4.7-1.8zM18.5 3l.8 2 2 .8-2 .8-.8 2-.8-2-2-.8 2-.8zM5 16l.7 1.8 1.8.7-1.8.7L5 21l-.7-1.8-1.8-.7 1.8-.7z`}[e]})})}function uI(){let[e,t]=(0,f.useState)(()=>window.matchMedia(cI).matches);return(0,f.useEffect)(()=>{let e=window.matchMedia(cI),n=()=>t(e.matches);return e.addEventListener(`change`,n),()=>e.removeEventListener(`change`,n)},[]),e}var dI=0,fI=``;function pI(e){let t=(0,f.useRef)(null),n=(0,f.useId)();return(0,f.useEffect)(()=>{let e=document.activeElement,n=t.current;return dI===0&&(fI=document.body.style.overflow),dI+=1,document.body.style.overflow=`hidden`,n.showModal(),()=>{n.close(),--dI,dI===0&&(document.body.style.overflow=fI),e?.isConnected&&e.focus()}},[]),(0,jP.createPortal)((0,k.jsxs)(`dialog`,{ref:t,className:`chrome dialog ${e.drawer?`drawer`:``}`,"aria-labelledby":n,onCancel:t=>{t.preventDefault(),e.locked||e.onClose()},onKeyDown:e=>{if(e.key!==`Tab`)return;let t=[...e.currentTarget.querySelectorAll(`button:not(:disabled), input:not(:disabled), a[href], [tabindex='0']`)].filter(e=>e.getClientRects().length>0),n=t[0],r=t.at(-1);e.shiftKey&&document.activeElement===n?(e.preventDefault(),r?.focus()):!e.shiftKey&&document.activeElement===r&&(e.preventDefault(),n?.focus())},children:[(0,k.jsxs)(`div`,{className:`dialog-heading`,children:[(0,k.jsx)(`h2`,{id:n,children:e.title}),(0,k.jsx)(`button`,{type:`button`,className:`icon-btn`,"aria-label":`关闭`,title:`关闭`,disabled:e.locked,onClick:e.onClose,children:(0,k.jsx)(lI,{name:`close`})})]}),e.children]}),document.body)}function mI(e){let t=(0,f.useRef)(null),n=(0,f.useRef)(e.onClose);n.current=e.onClose;let[r,i]=(0,f.useState)({left:8,top:8});return(0,f.useLayoutEffect)(()=>{let r=t.current,a=()=>{let t=e.anchor.getBoundingClientRect(),n=t.bottom+4+r.offsetHeight>window.innerHeight?Math.max(8,t.top-r.offsetHeight-4):t.bottom+4;i({left:Math.max(8,Math.min(t.left,window.innerWidth-r.offsetWidth-8)),top:n})};a(),r.querySelector(`button:not(:disabled), input, a`)?.focus();let o=t=>{!r.contains(t.target)&&!e.anchor.contains(t.target)&&n.current()};return document.addEventListener(`pointerdown`,o),window.addEventListener(`resize`,a),()=>{document.removeEventListener(`pointerdown`,o),window.removeEventListener(`resize`,a),e.anchor.isConnected&&e.anchor.focus()}},[e.anchor]),(0,jP.createPortal)((0,k.jsx)(`div`,{ref:t,className:`chrome popover`,role:`dialog`,"aria-label":e.label,style:r,onKeyDown:t=>{if(t.key===`Escape`&&(t.preventDefault(),t.stopPropagation(),e.onClose()),t.key===`Tab`){e.onClose();return}if(t.key!==`ArrowDown`&&t.key!==`ArrowUp`)return;t.preventDefault();let n=[...t.currentTarget.querySelectorAll(`button:not(:disabled), a`)];n[(n.indexOf(document.activeElement)+(t.key===`ArrowDown`?1:-1)+n.length)%n.length]?.focus()},children:e.children}),e.anchor.closest(`dialog`)??document.body)}var hI=e=>e.split(/[\\/]/).filter(Boolean).at(-1)??e;function gI(e){return(0,k.jsx)(`button`,{type:`button`,className:`icon-btn focus-neko rounded hover:bg-black/5`,"aria-label":e.label,title:e.label,onClick:e.onClick,children:(0,k.jsx)(lI,{name:`close`,size:14})})}function _I(e){let{models:t,currentSessionId:n,view:r,phase:i,operating:a}=gM(),[o,s]=(0,f.useState)(null),c=t.find(t=>t.provider===e.current?.provider&&t.modelId===e.current?.modelId);o&&o.id!==n&&s(null);let l=c?.name??e.fallbackLabel;return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(`button`,{type:`button`,disabled:!c||i!==`ready`||a,onClick:()=>n&&s({id:n}),className:`focus-neko min-w-0 truncate rounded-full px-2 py-1 text-left text-xs text-ink-500 hover:bg-sakura-50`,"aria-label":`模型与思考强度:${l} ${r?.agent.thinkingLevel??``}`,children:[l,` · `,r?.agent.thinkingLevel??`off`,` ▾`]}),o&&o.id===n&&c&&(0,k.jsx)(vI,{session:o.id,current:c,level:r?.agent.thinkingLevel??`off`,onClose:()=>s(e=>e===o?null:e)},o.id)]})}function vI(e){let{models:t}=gM(),[n,r]=(0,f.useState)(e.current),[i,a]=(0,f.useState)(e.level),[o,s]=(0,f.useState)(!1),c=(0,f.useRef)(!1),[l,u]=(0,f.useState)(``);async function d(){if(!c.current){c.current=!0,s(!0),u(``);try{await OM.configure({model:{provider:n.provider,modelId:n.modelId},thinkingLevel:i},e.session),e.onClose()}catch{u(`配置失败,请重试。`)}finally{c.current=!1,s(!1)}}}return(0,k.jsx)(pI,{title:`模型与思考强度`,onClose:e.onClose,children:(0,k.jsxs)(`div`,{className:`space-y-5 p-5`,children:[(0,k.jsx)(`fieldset`,{className:`space-y-2`,"aria-label":`模型`,children:t.map(e=>(0,k.jsxs)(`button`,{type:`button`,disabled:o,"aria-pressed":e===n,onClick:()=>{r(e),a(e.thinkingLevelAdjustments[i])},className:`focus-neko block w-full rounded-xl border px-4 py-3 text-left text-sm ${e===n?`border-sakura-300 bg-sakura-50 text-sakura-800`:`border-sakura-200 bg-surface text-ink-700`}`,children:[e.name,e===n?` ✓`:``,(0,k.jsx)(`span`,{className:`mt-1 block text-xs text-ink-500`,children:e.input.includes(`image`)?`支持图片`:`仅文本`})]},`${e.provider}/${e.modelId}`))}),(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`p`,{className:`mb-2 text-sm text-ink-600`,children:`思考强度`}),(0,k.jsx)(`fieldset`,{className:`flex flex-wrap gap-2`,"aria-label":`思考强度`,children:n.supportedThinkingLevels.map(e=>(0,k.jsx)(`button`,{type:`button`,disabled:o,"aria-pressed":i===e,onClick:()=>a(e),className:`focus-neko rounded-full border px-4 py-2 text-sm ${e===i?`border-tianyi-300 bg-tianyi-50 text-tianyi-800`:`border-sakura-200`}`,children:e},e))})]}),(0,k.jsx)(`p`,{className:`text-xs text-ink-500`,children:`仅当前会话,从下一次请求生效。`}),l&&(0,k.jsx)(`p`,{role:`alert`,className:`text-sm text-sakura-800`,children:l}),(0,k.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,k.jsx)(`button`,{type:`button`,onClick:e.onClose,className:`btn-outline rounded-full px-4 py-2 text-sm`,children:`取消`}),(0,k.jsx)(`button`,{type:`button`,disabled:o,onClick:()=>void d(),className:`btn-primary rounded-full px-5 py-2 text-sm`,children:o?`应用中…`:`应用`})]})]})})}var yI={steer:`引导`,followUp:`排队`};function bI({queued:e,busy:t,onSteer:n,onWithdraw:r}){return e.length?(0,k.jsx)(`section`,{"aria-label":`排队消息`,className:`mb-2 rounded-2xl border border-sakura-200 bg-base/90 px-2 py-1.5`,children:(0,k.jsx)(`ul`,{className:`flex max-h-32 flex-col gap-1 overflow-y-auto`,children:e.map(e=>{let i=e.preview||(e.images?`图片`:``);return(0,k.jsxs)(`li`,{className:`flex min-w-0 items-center gap-1 text-sm`,children:[(0,k.jsx)(`span`,{className:`shrink-0 rounded-full px-2 py-0.5 text-xs ${e.mode===`steer`?`bg-sakura-100 text-sakura-700`:`bg-tianyi-50 text-ink-600`}`,children:yI[e.mode]}),(0,k.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-ink-700`,title:e.preview,children:e.preview||(e.images?`(仅图片)`:``)}),e.images>0&&e.preview&&(0,k.jsxs)(`span`,{className:`shrink-0 text-xs text-ink-500`,children:[e.images,` 图`]}),e.mode===`followUp`&&(0,k.jsx)(`button`,{type:`button`,disabled:t,"aria-label":`引导消息:${i}`,title:`改为引导:在当前工具轮结束后加入进行中的工作`,onClick:()=>n(e),className:`focus-neko h-8 shrink-0 rounded-full px-2 text-xs text-sakura-700 hover:bg-sakura-50 disabled:opacity-50`,children:`引导`}),(0,k.jsx)(`button`,{type:`button`,disabled:t,"aria-label":`撤回${yI[e.mode]}消息:${i}`,onClick:()=>r(e),className:`focus-neko h-8 shrink-0 rounded-full px-2 text-xs text-ink-600 hover:bg-sakura-50 disabled:opacity-50`,children:`撤回`})]},e.id)})})}):null}var xI=new Map,SI=new Set,CI=new Set;function wI(){let e=_M(),t=e.currentSessionId,n=t??`none:${e.workspaceRoot}`,r=xI.get(n);if(CI.size||e.operating)vM.notice({level:`info`,text:`发送中,请稍后刷新`});else if([...xI.values()].some(e=>e.files.length))vM.notice({level:`info`,text:`先发送或移除附件,再刷新`});else if(!e.webInfo)vM.notice({level:`error`,text:`连接未就绪,请稍后重试`});else if([...xI.entries()].some(([e,t])=>e!==n&&t.text.trim()))vM.notice({level:`info`,text:`其他会话有草稿,请先发送或清空`});else{try{xM({version:1,serverId:e.webInfo.serverId,workspace:e.workspaceRoot,session:t,text:r?.text??``,requestId:r?.requestId??crypto.randomUUID()})}catch{vM.notice({level:`error`,text:`草稿保存失败,请先复制文字`});return}window.location.reload()}}var TI=e=>(SI.add(e),()=>{SI.delete(e)});function EI(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function DI(e){return`$${e.toFixed(e>=1?2:4)}`}function OI(e){let{currentSessionId:t,workspaceRoot:n}=gM();return(0,k.jsx)(AI,{sessionId:t??`none:${n}`,...e},t??`none:${n}`)}function kI({file:e}){let[t,n]=(0,f.useState)(``);return(0,f.useEffect)(()=>{let t=URL.createObjectURL(e);return n(t),()=>URL.revokeObjectURL(t)},[e]),(0,k.jsx)(`img`,{src:t||void 0,alt:e.name,className:`h-16 w-20 rounded-lg object-cover`})}function AI(e){let{credentials:t,view:n,models:r,workspaceRoot:i,phase:a,operating:o}=gM(),s=n?.compaction?.active??[];xI.has(e.sessionId)||xI.set(e.sessionId,{text:``,files:[],requestId:crypto.randomUUID()}),(0,f.useEffect)(()=>{let t=bM(),n=_M();if(t&&t.serverId===n.webInfo?.serverId&&t.workspace===i&&(t.session??`none:${i}`)===e.sessionId){xI.set(e.sessionId,{text:t.text,files:[],requestId:t.requestId}),SM();for(let e of SI)e()}},[e.sessionId,i]);let c=(0,f.useSyncExternalStore)(TI,()=>xI.get(e.sessionId)),[l,u]=(0,f.useState)(!1),[d,p]=(0,f.useState)(``),[m,h]=(0,f.useState)(``),[g,_]=(0,f.useState)(null),[v,y]=(0,f.useState)(!1),[b,x]=(0,f.useState)([]),[S,C]=(0,f.useState)(0),[w,T]=(0,f.useState)(``),ee=(0,f.useId)(),[te,ne]=(0,f.useState)(!1),re=(0,f.useRef)(null),E=(0,f.useRef)(null),ie=(0,f.useRef)(null),ae=(0,f.useRef)(c);ae.current=c;let oe=(0,f.useRef)(!1),se=(0,f.useMemo)(()=>BM(n?.items??[]),[n?.items]),ce=(0,f.useRef)(null),le=(0,f.useRef)(null);(0,f.useLayoutEffect)(()=>{let e=re.current;if(!le.current||!e)return;let t=le.current===`start`?0:e.value.length;le.current=null,e.setSelectionRange(t,t)}),(0,f.useLayoutEffect)(()=>{let e=re.current;e&&UM(e)},[c.text,e.sessionId]),(0,f.useEffect)(()=>{let e=re.current;if(!e||typeof ResizeObserver>`u`)return;let t=e.clientWidth,n=new ResizeObserver(()=>{e.clientWidth!==t&&(t=e.clientWidth,UM(e))});return n.observe(e),()=>n.disconnect()},[]);let ue=e=>{let t=e.currentTarget,n=WM(ce.current,se,e,t.value,{start:t.selectionStart,end:t.selectionEnd});return n?(ce.current=n.browse,le.current=n.caret,y(!1),fe({text:n.text}),!0):!1},de=t=>{ae.current=t,xI.set(e.sessionId,t);for(let e of SI)e()},fe=e=>de({...ae.current,...e,requestId:crypto.randomUUID()}),pe=n?.agent.model?.provider===`deepseek`&&t?.statuses.deepseek.source===`none`,me=r.find(e=>e.provider===n?.agent.model?.provider&&e.modelId===n?.agent.model?.modelId),he=c.files.length>0&&me!==void 0&&!me.input.includes(`image`),ge=e=>{let t=e.map(e=>({id:crypto.randomUUID(),file:e,processing:!0,error:[`image/png`,`image/jpeg`,`image/webp`].includes(e.type)?e.size>20971520?`单图不能超过 20 MiB`:void 0:`仅支持 PNG、JPEG、WebP`}));fe({files:[...ae.current.files,...t]});for(let e of t)_e(e)},_e=async t=>{let n=t.error;if(!n)try{(await createImageBitmap(t.file)).close()}catch{n=`无法解码图片,请重新选择`}let r=xI.get(e.sessionId);if(!r?.files.some(e=>e.id===t.id))return;let i={...r,files:r.files.map(e=>e.id===t.id?{...e,error:n,processing:!1}:e)};de(i)},ve=(0,f.useRef)(null),ye=(0,f.useRef)(!1);(0,f.useEffect)(()=>()=>{ye.current||ve.current?.abort()},[]),(0,f.useEffect)(()=>{if(x([]),C(0),!v)return;if(e.sessionId.startsWith(`none:`)){T(`新建会话后可选择工作区技能`);return}if(a!==`ready`||o){T(`等待会话连接…`);return}let t=new AbortController;return T(`正在加载技能…`),OM.listSkills(e.sessionId,t.signal).then(e=>{t.signal.aborted||(x(e),T(e.length?``:`当前工作区暂无可用技能`))}).catch(()=>{t.signal.aborted||T(`技能加载失败,请关闭菜单后重试`)}),()=>t.abort()},[e.sessionId,a,o,v]);let be=sI(re,E,i,a===`ready`&&!o,(t,n)=>{let r=ae.current;if(t.kind===`file`&&/\.(png|jpe?g|webp)$/i.test(t.path)){if(ve.current)return;let a=new AbortController;ve.current=a,p(`正在读取图片…`),(async()=>{let o=e.sessionId;if(o.startsWith(`none:`)){ye.current=!0,await OM.createSession();let e=_M();if(e.workspaceRoot!==i||!e.currentSessionId)throw Error(`工作区已切换`);o=e.currentSessionId,xI.set(o,r);for(let e of SI)e()}let s=await OM.workspaceImage(t.path,o,a.signal);if(a.signal.aborted||_M().currentSessionId!==o||_M().workspaceRoot!==i)return;let c=xI.get(o)??r,l={id:crypto.randomUUID(),file:new File([new Uint8Array(s.bytes)],s.name,{type:s.mimeType})},u=c.text===r.text?r.text.slice(0,n.start)+r.text.slice(n.end):c.text;xI.set(o,{...c,text:u,files:[...c.files,l],requestId:crypto.randomUUID()});for(let e of SI)e();p(``)})().catch(e=>{if(!a.signal.aborted){let t=e instanceof Error?e.message:`图片读取失败,请重试`;p(t),ye.current&&vM.notice({level:`error`,text:t})}}).finally(()=>{ve.current===a&&(ve.current=null)});return}let a=NM(r.text,n,t.path,t.kind===`directory`),o=re.current;if(o){o.focus(),o.setSelectionRange(n.start,n.end);let e=a.text.slice(n.start,a.text.length-(r.text.length-n.end));document.execCommand(`insertText`,!1,e)?fe({text:o.value}):fe({text:a.text}),requestAnimationFrame(()=>{o.setSelectionRange(a.cursor,a.cursor),t.kind===`directory`&&be.refresh()})}}),xe=n?.contextUsage,D=n?.compaction?.latest,O=D&&![`summarizing`,`waiting-to-apply`].includes(D.phase)?D.at+(D.phase===`failed`?1e4:5e3):null,[Se,Ce]=(0,f.useState)(O!==null&&O<=Date.now());(0,f.useEffect)(()=>{if(Ce(O!==null&&O<=Date.now()),O===null||O<=Date.now())return;let e=setTimeout(()=>Ce(!0),O-Date.now());return()=>clearTimeout(e)},[O]);let we=s.length?s.some(e=>e.retry)?`压缩重试中`:s.some(e=>e.blocking)?`等待上下文压缩`:`正在压缩上下文`:n?.compaction?.failure?`压缩失败:${n.compaction.failure.error}`:D&&!Se?{applied:`上下文已压缩`,nothing:`当前无需压缩`,skipped:`已跳过过期摘要`,cancelled:`压缩已取消`,failed:`压缩失败,可重试`,summarizing:`正在压缩上下文`,"waiting-to-apply":`等待应用压缩摘要`}[D.phase]:null,Te=!s.length&&(!!n?.compaction?.failure||D?.phase===`failed`),Ee=n?.taskUsage??n?.usage??null,De=async t=>{if(oe.current||e.disabled)return;oe.current=!0,u(!0),CI.add(e.sessionId),p(``);let n=ae.current;xI.set(e.sessionId,n);try{await OM.compact(t,e.sessionId),ae.current===n&&xI.get(e.sessionId)===n&&ki(n.text)!==null&&de({...n,text:``,requestId:crypto.randomUUID()}),y(!1)}catch(e){p(e instanceof Error?e.message:`压缩失败,请重试`)}finally{oe.current=!1,u(!1),CI.delete(e.sessionId)}},Oe=async()=>{let t=ki(ae.current.text);if(t!==null){await De(t);return}let n=ae.current;if(xI.set(e.sessionId,n),!(oe.current||e.disabled||pe||he||!n.text.trim()&&!n.files.length)){if(n.files.length>4||n.files.reduce((e,t)=>e+t.file.size,0)>41943040)p(`每条消息最多 4 张图片,总大小不超过 40 MiB`);else if(!n.files.some(e=>e.processing)){if(n.files.some(e=>e.error))p(`请先移除不支持的附件`);else{oe.current=!0,u(!0),CI.add(e.sessionId),p(``),h(``);try{let t=[];for(let e of n.files)t.push({name:e.file.name,mimeType:e.file.type,bytes:new Uint8Array(await e.file.arrayBuffer())});let r=e.sessionId;if(r.startsWith(`none:`)){await OM.createSession();let e=_M();if(e.workspaceRoot!==i||!e.currentSessionId)throw Error(`工作区已切换,草稿已保留`);r=e.currentSessionId,xI.set(r,n);for(let e of SI)e()}if(await OM.submit(n.text.trim(),t,n.requestId,r),r!==e.sessionId){xI.set(r,{text:``,files:[],requestId:crypto.randomUUID()});for(let e of SI)e()}let a=xI.get(e.sessionId);a&&de({text:a.text===n.text?``:a.text,files:a.files.filter(e=>!n.files.some(t=>t.id===e.id)),requestId:crypto.randomUUID()})}catch(t){let n=t instanceof Error?t.message:`发送失败,请重试`;p(n),_M().currentSessionId!==e.sessionId&&vM.notice({level:`error`,text:n})}finally{oe.current=!1,u(!1),CI.delete(e.sessionId)}}}}},ke=HM(c.text,b),Ae=Math.min(S,Math.max(0,ke.length-1)),je=(e=Ae)=>{let t=ke[e];t&&(fe({text:`${t.label} `}),y(!1),re.current?.focus())},Me=n?.queued??[],Ne=async t=>{if(g===null){_(t.id),p(``),h(``);try{let n=await OM.steer(e.sessionId,t.id);if(n.result===`withdrawn`){let e=ae.current.text,r=n.text??t.preview;fe({text:e.trim()?`${e}\n${r}`:r}),h(`无法改为引导,消息已撤回到输入框`)}else n.result===`unknown`?h(`该消息已不在队列中`):n.result!==`steered`&&h(`该消息已发送,无法引导`)}catch(e){p(e instanceof Error?e.message:`引导失败,请重试`)}finally{_(null)}}},Pe=async t=>{if(g===null){_(t.id),p(``),h(``);try{let n=await OM.withdraw(e.sessionId,t.id);if(n.result===`withdrawn`){let e=ae.current.text,r=n.text??t.preview;fe({text:e.trim()?`${e}\n${r}`:r}),n.images&&h(`图片未恢复,请重新添加`),re.current?.focus()}else n.result===`unknown`?h(`该消息已不在队列中`):h(`该消息已发送,无法撤回`)}catch(e){p(e instanceof Error?e.message:`撤回失败,请重试`)}finally{_(null)}}},Fe=e.busy||s.some(e=>e.reason===`manual`||e.blocking);return(0,k.jsx)(`section`,{"aria-label":`消息输入`,className:`relative shrink-0 px-3 pt-1 pb-3 sm:px-4 sm:pb-4`,onDragOver:e=>{e.dataTransfer.types.includes(`Files`)&&(e.preventDefault(),ne(!0))},onDragLeave:e=>{e.currentTarget.contains(e.relatedTarget)||ne(!1)},onDrop:e=>{e.preventDefault(),ne(!1),ge(Array.from(e.dataTransfer.files))},children:(0,k.jsxs)(`div`,{className:`chat-column`,children:[(0,k.jsx)(bI,{queued:Me,busy:g!==null,onSteer:e=>void Ne(e),onWithdraw:e=>void Pe(e)}),(0,k.jsxs)(`div`,{ref:E,className:`composer-card ${Fe?`is-busy`:``} ${te?`ring-2 ring-sakura-300`:``}`,children:[(0,k.jsxs)(`div`,{className:`flex flex-col gap-1 px-4 pt-2.5 empty:pt-0`,children:[te&&(0,k.jsx)(`p`,{className:`text-sm text-sakura-700`,children:`松开以添加图片,不会自动发送`}),pe&&(0,k.jsxs)(`p`,{className:`text-sm text-sakura-700`,children:[`尚未配置 DeepSeek Key。`,(0,k.jsx)(Ur,{to:`/settings`,className:`focus-neko underline`,children:`前往设置`})]}),he&&(0,k.jsx)(`p`,{className:`text-sm text-sakura-700`,children:`当前模型不支持图片,请切换模型或移除附件。`}),!me?.input.includes(`image`)&&n?.items.some(e=>e.type===`user`&&e.images?.length)&&(0,k.jsx)(`p`,{className:`text-xs text-ink-500`,children:`当前模型无法查看历史原图,仍可使用已有文字分析。`}),m&&(0,k.jsx)(`output`,{className:`block break-words text-sm text-ink-600`,children:m}),d&&(0,k.jsx)(`p`,{role:`alert`,className:`break-words text-sm text-sakura-700`,children:d})]}),!!c.files.length&&(0,k.jsx)(`ul`,{className:`flex max-h-40 flex-wrap gap-2 overflow-y-auto px-4 pt-2.5`,children:c.files.map(e=>(0,k.jsxs)(`li`,{className:`relative w-28 rounded-xl border border-sakura-200 bg-base p-2`,children:[(0,k.jsx)(kI,{file:e.file}),(0,k.jsx)(`span`,{className:`block truncate text-xs`,title:e.file.name,children:e.file.name}),e.processing&&(0,k.jsx)(`span`,{className:`text-xs text-ink-500`,children:`检查图片…`}),e.error&&(0,k.jsx)(`span`,{className:`text-xs text-sakura-700`,children:e.error}),(0,k.jsx)(`button`,{type:`button`,"aria-label":`移除 ${e.file.name}`,className:`focus-neko absolute right-0 top-0 rounded-full bg-base px-1`,onClick:()=>fe({files:ae.current.files.filter(t=>t.id!==e.id)}),children:`×`})]},e.id))}),(0,k.jsx)(`textarea`,{ref:re,disabled:e.disabled,value:c.text,rows:1,placeholder:e.busy?`运行中:消息将在回答结束后排队,可在排队条中引导或撤回`:`输入消息,@ 引用文件,/ 命令`,"aria-label":`消息输入`,"aria-autocomplete":`list`,"aria-controls":be.controls??(v?ee:void 0),"aria-activedescendant":be.active??(v&&ke.length?`${ee}-${Ae}`:void 0),onClick:e=>{be.refresh(),y(VM(e.currentTarget.value))},onBlur:()=>{be.close(),y(!1)},onCompositionStart:()=>{be.close(),y(!1)},onCompositionEnd:e=>{be.refresh(),y(VM(e.currentTarget.value))},className:`max-h-40 min-h-10 min-w-0 w-full resize-none bg-transparent px-4 py-2 text-base text-ink-900 focus:outline-none`,onChange:e=>{ce.current=null,fe({text:e.target.value}),C(0),y(!e.nativeEvent.isComposing&&VM(e.target.value)),e.nativeEvent.isComposing||be.refresh()},onPaste:e=>{let t=Array.from(e.clipboardData.files);t.length&&(e.preventDefault(),ge(t))},onKeyDown:e=>{e.nativeEvent.isComposing||be.keyDown(e)||(e.key===`Escape`&&v?(e.preventDefault(),y(!1)):v&&(e.key===`ArrowDown`||e.key===`ArrowUp`)?(e.preventDefault(),C(Math.max(0,Math.min(ke.length-1,Ae+(e.key===`ArrowDown`?1:-1))))):v&&e.key===`Tab`?!e.shiftKey&&ke.length?(e.preventDefault(),je()):y(!1):(e.key===`ArrowUp`||e.key===`ArrowDown`)&&!v&&ue(e)?e.preventDefault():e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),v&&ke.length?je():(y(!1),Oe())))}}),(0,k.jsxs)(`div`,{className:`composer-toolbar flex flex-wrap items-center gap-x-1 gap-y-1 border-t border-sakura-100 px-2 py-1.5`,children:[(0,k.jsx)(`input`,{ref:ie,type:`file`,accept:`image/png,image/jpeg,image/webp`,multiple:!0,hidden:!0,onChange:e=>{ge(Array.from(e.target.files??[])),e.target.value=``}}),(0,k.jsx)(`button`,{type:`button`,"aria-label":`添加图片`,title:`添加图片(最多 4 张)`,disabled:e.disabled,onClick:()=>ie.current?.click(),className:`focus-neko inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-full text-ink-600 hover:bg-sakura-50`,children:(0,k.jsx)(lI,{name:`plus`})}),(0,k.jsx)(`button`,{type:`button`,"aria-label":`输入操作菜单`,"aria-expanded":v,className:`focus-neko inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-full text-ink-500 hover:bg-sakura-50`,onClick:()=>{be.close(),y(!v),re.current?.focus()},children:(0,k.jsx)(lI,{name:`more`})}),(0,k.jsx)(`div`,{className:`min-w-0 max-w-64 [&>button]:max-w-full`,children:(0,k.jsx)(_I,{current:n?.agent.model??null,fallbackLabel:n?.model??`…`})}),xe&&xe.window>0&&(0,k.jsxs)(`span`,{className:`shrink-0 rounded-full bg-tianyi-50 px-2 py-1 font-mono text-xs ${xe.percent!==null&&xe.percent>90?`text-sakura-700 font-semibold`:`text-ink-600`}`,title:xe.tokens===null?`暂无有效用量;首次回答或压缩后的新回答完成后更新`:`最近一次成功回答的上下文用量:${xe.tokens} / ${xe.window} tokens;非会话累计用量`,children:[`Ctx `,xe.percent===null?`?`:`${xe.percent.toFixed(1)}%`,`/`,EI(xe.window)]}),(0,k.jsx)(`output`,{"aria-live":`polite`,"aria-atomic":`true`,className:`contents`,children:we&&(0,k.jsx)(`span`,{className:`max-w-full whitespace-nowrap rounded-full border px-2 py-1 text-xs ${Te?`border-sakura-300 bg-sakura-50 text-sakura-700`:`border-tianyi-200 bg-tianyi-50 text-ink-600`}`,title:D?.phase===`nothing`&&!s.length?`保留近期上下文,暂无可压缩的旧内容;默认保留最近约 20,000 tokens`:void 0,children:we})}),(0,k.jsxs)(`div`,{className:`ml-auto flex items-center gap-1`,children:[e.busy&&e.status!==null&&(0,k.jsxs)(`span`,{className:`inline-flex min-w-0 max-w-64 items-center gap-1.5 text-xs font-medium text-sakura-700`,title:e.status,children:[(0,k.jsxs)(`span`,{className:`dots shrink-0`,"aria-hidden":!0,children:[(0,k.jsx)(`span`,{}),(0,k.jsx)(`span`,{}),(0,k.jsx)(`span`,{})]}),(0,k.jsx)(`span`,{className:`truncate`,children:e.status.replace(/\.\.\.$/,``)})]}),Ee!==null&&(0,k.jsxs)(`button`,{type:`button`,className:`telemetry focus-neko shrink-0 rounded-full px-1.5 py-1 font-mono text-xs text-ink-500`,"aria-label":`任务总用量:输入 ${Ee.input},输出 ${Ee.output},缓存读 ${Ee.cacheRead},成本 ${DI(Ee.cost)}`,children:[`↑`,EI(Ee.input),` ↓`,EI(Ee.output),(0,k.jsxs)(`span`,{className:`telemetry-detail`,"aria-hidden":!0,children:[`输入 `,Ee.input,` · 输出 `,Ee.output,` · 缓存读 `,Ee.cacheRead,` · `,DI(Ee.cost)]})]}),(0,k.jsx)(`button`,{type:`button`,disabled:l||e.disabled||!c.text.trim()&&!c.files.length||ki(c.text)===null&&(pe||he||c.files.some(e=>!!e.error||e.processing)),onClick:()=>void Oe(),className:`btn-primary focus-neko h-10 shrink-0 rounded-full px-3 text-sm disabled:opacity-50`,children:l?`处理中`:e.busy?`排队`:`发送`}),Fe&&(0,k.jsx)(`button`,{type:`button`,onClick:()=>OM.abort(),className:`btn-stop focus-neko h-10 rounded-full px-2 text-sm`,title:`中止当前会话运行及可中止任务`,children:`停止`})]})]})]}),be.panel,v&&!be.open&&(0,k.jsx)(oI,{anchor:E,id:ee,title:`输入命令`,items:ke,selected:Ae,onSelect:C,message:w||(ke.length?void 0:`没有匹配的命令或技能`),onAccept:je})]})})}var jI=[{key:`credentials`,label:`密钥`,icon:`key`,to:`/settings`},{key:`context`,label:`上下文`,icon:`layers`,to:`/settings/context`},{key:`mobile`,label:`手机配对`,icon:`phone`,to:`/settings/mobile`},{key:`about`,label:`关于与更新`,icon:`info`,to:`/about`}];function MI({active:e,children:t}){return(0,k.jsxs)(`div`,{className:`flex min-h-dvh flex-col bg-base sm:flex-row`,children:[(0,k.jsxs)(`nav`,{"aria-label":`设置菜单`,className:`flex shrink-0 items-center gap-1 overflow-x-auto border-b border-sakura-100 px-4 py-2.5 sm:w-48 sm:flex-col sm:items-stretch sm:gap-1 sm:border-r sm:border-b-0 sm:px-3 sm:py-5`,children:[(0,k.jsx)(Ur,{to:`/`,className:`focus-neko mr-2 inline-flex shrink-0 items-center rounded-lg px-2 py-1.5 text-sm text-sakura-700 sm:mr-0 sm:mb-3`,children:`← 返回聊天`}),(0,k.jsx)(`span`,{className:`hidden px-2 pb-1 text-xs font-medium text-ink-400 sm:block`,children:`设置`}),jI.map(t=>(0,k.jsxs)(Ur,{to:t.to,"aria-current":e===t.key?`page`:void 0,className:`focus-neko inline-flex shrink-0 items-center gap-2 rounded-xl px-3 py-2 text-sm ${e===t.key?`bg-sakura-100 font-semibold text-sakura-800`:`text-ink-600 hover:bg-ink-100`}`,children:[(0,k.jsx)(lI,{name:t.icon,size:15}),t.label]},t.key))]}),(0,k.jsx)(`div`,{className:`min-w-0 flex-1`,children:t})]})}async function NI(){let e;try{await navigator.clipboard.writeText(`neko update`),e=`已复制 neko update,在运行 neko 的电脑上执行`}catch{e=`请复制命令:neko update`}return vM.notice({level:`info`,text:e}),e}function PI(){let{updates:e,webInfo:t}=gM();return Ci({gateway:e,frontend:bi,installed:t?.installedVersion??null,web:t?{runningVersion:t.webVersion,installedVersion:t.installedVersion}:void 0})}function FI(){let e=PI(),[t,n]=(0,f.useState)(null);return e===`none`||t===e?null:(0,k.jsxs)(`output`,{className:`flex min-w-0 flex-wrap items-center justify-end gap-x-3 gap-y-1 border-b border-sakura-100 bg-sakura-50 px-4 py-1.5 text-xs text-ink-700`,children:[(0,k.jsx)(`span`,{children:e===`install`?`发现新版本 · 运行 neko update`:e===`refresh-page`?`页面已更新`:e===`incompatible`?`版本不兼容 · 更新并重启 neko`:`已升级 · 请重新启动本地 neko`}),e===`install`?(0,k.jsx)(`button`,{type:`button`,className:`focus-neko rounded px-2 py-1 text-sakura-700`,onClick:()=>void NI(),children:`复制命令`}):e===`refresh-page`?(0,k.jsx)(`button`,{type:`button`,className:`focus-neko rounded px-2 py-1 text-sakura-700`,onClick:wI,children:`刷新`}):(0,k.jsx)(Ur,{to:`/about`,className:`focus-neko rounded px-2 py-1 text-sakura-700`,children:`查看步骤`}),(0,k.jsx)(gI,{label:`关闭更新提示`,onClick:()=>n(e)})]})}function II(){let{updates:e,webInfo:t,phase:n}=gM(),r=PI(),[i,a]=(0,f.useState)(!1),[o,s]=(0,f.useState)(``),c=bM();async function l(){if(!i){a(!0),s(``);try{let e=await OM.checkUpdates();s(e.checkState===`ok`?`检查完成`:e.checkState===`development`?`开发版本不检查发布更新`:`检查失败,请重试`)}catch{s(`检查失败,请重试`)}finally{a(!1)}}}return(0,k.jsxs)(MI,{active:`about`,children:[(0,k.jsxs)(`div`,{className:`mx-auto w-full max-w-4xl px-5 pt-6 pb-3`,children:[(0,k.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-2`,children:[(0,k.jsx)(`h1`,{className:`text-xl font-bold text-ink-900`,children:`关于与更新`}),(0,k.jsx)(`span`,{className:`ml-auto text-xs text-ink-500`,children:n===`ready`?`已连接`:`连接中…`})]}),(0,k.jsx)(`p`,{className:`mt-1 text-sm text-ink-500`,children:`查看 neko 系统版本状态及软件更新。`})]}),(0,k.jsxs)(`main`,{className:`mx-auto flex w-full max-w-4xl flex-col gap-5 px-5 pb-8`,children:[(0,k.jsxs)(`section`,{className:`rounded-2xl border border-sakura-200 bg-surface p-5 shadow-soft`,children:[(0,k.jsx)(`h2`,{className:`mb-4 text-base font-bold text-ink-900`,children:`版本状态`}),(0,k.jsxs)(`div`,{className:`flex flex-col divide-y divide-sakura-100`,children:[(0,k.jsxs)(`div`,{className:`flex items-center justify-between py-3`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`span`,{className:`text-sm font-medium text-ink-800`,children:`当前版本`}),(0,k.jsx)(`span`,{className:`ml-3 font-mono text-sm text-ink-600`,children:bi})]}),(0,k.jsx)(`div`,{children:i?(0,k.jsx)(`span`,{className:`rounded-full bg-ink-100 px-2.5 py-0.5 text-xs text-ink-600`,children:`检查中…`}):r===`incompatible`?(0,k.jsx)(`span`,{className:`rounded-full bg-sakura-100 px-2.5 py-0.5 text-xs font-semibold text-sakura-800`,children:`协议不兼容`}):r===`install`?(0,k.jsx)(`span`,{className:`rounded-full bg-sakura-100 px-2.5 py-0.5 text-xs font-semibold text-sakura-800`,children:`发现新版本`}):r===`restart-service`?(0,k.jsx)(`span`,{className:`rounded-full bg-tianyi-100 px-2.5 py-0.5 text-xs font-semibold text-tianyi-800`,children:`已就绪 · 待重启`}):r===`refresh-page`?(0,k.jsx)(`span`,{className:`rounded-full bg-tianyi-100 px-2.5 py-0.5 text-xs font-semibold text-tianyi-800`,children:`页面待更新`}):e?.checkState===`development`?(0,k.jsx)(`span`,{className:`rounded-full bg-ink-100 px-2.5 py-0.5 text-xs text-ink-600`,children:`开发版本`}):e?.checkState===`failed`?(0,k.jsx)(`span`,{className:`rounded-full bg-sakura-100 px-2.5 py-0.5 text-xs text-sakura-800`,children:`检查失败`}):(0,k.jsx)(`span`,{className:`rounded-full bg-tianyi-50 px-2.5 py-0.5 text-xs font-medium text-tianyi-800`,children:`已是最新`})})]}),r===`install`&&e?.latestVersion&&(0,k.jsxs)(`div`,{className:`mt-1 flex items-center justify-between rounded-xl bg-sakura-50/60 px-3 py-3`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`span`,{className:`text-sm font-semibold text-sakura-800`,children:`最新稳定版`}),(0,k.jsx)(`span`,{className:`ml-3 font-mono text-sm text-sakura-900`,children:e.latestVersion})]}),(0,k.jsx)(`span`,{className:`text-xs text-sakura-700`,children:`可运行 neko update 升级`})]}),r===`restart-service`&&(0,k.jsxs)(`div`,{className:`mt-1 flex items-center justify-between rounded-xl bg-tianyi-50/60 px-3 py-3`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`span`,{className:`text-sm font-semibold text-tianyi-800`,children:`已安装新版本`}),(0,k.jsx)(`span`,{className:`ml-3 font-mono text-sm text-tianyi-900`,children:e?.installedVersion??t?.installedVersion??`新版本`})]}),(0,k.jsx)(`span`,{className:`text-xs text-tianyi-700`,children:`重启 neko 进程后生效`})]}),r===`refresh-page`&&(0,k.jsxs)(`div`,{className:`mt-1 flex items-center justify-between rounded-xl bg-tianyi-50/60 px-3 py-3`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`span`,{className:`text-sm font-semibold text-tianyi-800`,children:`静态服务已更新`}),(0,k.jsx)(`span`,{className:`ml-3 font-mono text-sm text-tianyi-900`,children:t?.webVersion??`新版本`})]}),(0,k.jsx)(`span`,{className:`text-xs text-tianyi-700`,children:`刷新页面后生效`})]})]}),(0,k.jsxs)(`div`,{className:`mt-4 flex flex-wrap items-center gap-3`,children:[(0,k.jsx)(`button`,{type:`button`,className:`focus-neko rounded-full bg-sakura-100 px-4 py-1.5 text-sm font-semibold text-sakura-800 disabled:opacity-50`,disabled:i,onClick:()=>void l(),children:i?`检查中…`:`检查更新`}),r===`install`?(0,k.jsx)(`button`,{type:`button`,className:`focus-neko rounded-full bg-sakura-100 px-4 py-1.5 text-sm font-semibold text-sakura-800`,onClick:()=>void NI().then(s),children:`复制 neko update`}):(0,k.jsx)(`button`,{type:`button`,className:`focus-neko rounded-full border border-sakura-200 bg-surface px-4 py-1.5 text-sm text-ink-600 hover:bg-sakura-50`,onClick:()=>void NI().then(s),children:`复制 neko update`}),r===`refresh-page`&&(0,k.jsx)(`button`,{type:`button`,className:`focus-neko rounded-full bg-tianyi-100 px-4 py-1.5 text-sm font-semibold text-tianyi-800`,onClick:wI,children:`刷新页面`})]}),o&&(0,k.jsx)(`output`,{className:`mt-3 block text-xs text-tianyi-800`,children:o})]}),(0,k.jsxs)(`section`,{className:`rounded-2xl border border-sakura-200 bg-surface p-5 shadow-soft`,children:[(0,k.jsx)(`h2`,{className:`mb-2 text-base font-bold text-ink-900`,children:`升级说明`}),(0,k.jsxs)(`p`,{className:`text-sm text-ink-600`,children:[`在终端运行`,` `,(0,k.jsx)(`code`,{className:`select-all rounded bg-ink-100 px-1.5 py-0.5 font-mono text-xs text-ink-800`,children:`neko update`}),`,完成后重启 neko 即可生效。`]}),c?.text&&(0,k.jsxs)(`details`,{className:`mt-4 border-t border-sakura-100 pt-3 text-sm`,children:[(0,k.jsx)(`summary`,{className:`focus-neko cursor-pointer font-medium text-ink-700`,children:`升级前保留的草稿`}),(0,k.jsx)(`p`,{className:`mt-2 max-h-48 overflow-y-auto whitespace-pre-wrap break-words rounded-xl bg-ink-50 p-3 font-mono text-xs text-ink-600 select-text`,children:c.text})]})]})]})]})}var LI={pending:`等待审批`,allowed:`已允许本次`,denied:`已拒绝`,cancelled:`已取消`},RI=e=>[...e].map(e=>{let t=e.charCodeAt(0);return t<32&&t!==9&&t!==10||t>=127&&t<=159||t>=8234&&t<=8238||t>=8294&&t<=8297?`\\u${t.toString(16).padStart(4,`0`)}`:e}).join(``);function zI({item:e,title:t,decide:n}){let[r,i]=(0,f.useState)(!1),[a,o]=(0,f.useState)(``),s=(0,f.useRef)(!1),c=async t=>{if(!(s.current||e.status!==`pending`)){s.current=!0,i(!0),o(``);try{await n(t)}catch(e){o(String(e))}finally{s.current=!1,i(!1)}}};return(0,k.jsxs)(`section`,{"aria-label":`Bash 审批`,className:`min-w-0 rounded-xl border border-sakura-200 bg-surface p-3 text-sm`,children:[(0,k.jsxs)(`output`,{className:`block font-medium text-sakura-800`,children:[t,` · Bash · `,LI[e.status]]}),(0,k.jsxs)(`p`,{className:`break-all text-xs text-ink-500`,children:[RI(e.cwd),` · 超时:`,e.timeout??`默认`]}),(0,k.jsx)(`textarea`,{readOnly:!0,rows:Math.min(6,Math.max(1,e.command.split(`
|
|
13
|
+
`).length)),"aria-label":`完整命令`,value:RI(e.command),className:`focus-neko my-2 w-full resize-y whitespace-pre-wrap break-all rounded-lg bg-base p-2 font-mono text-xs`}),e.status===`pending`&&(0,k.jsxs)(`div`,{className:`flex gap-2`,children:[(0,k.jsx)(`button`,{type:`button`,disabled:r,className:`focus-neko rounded-lg bg-tianyi-100 px-3 py-1 text-tianyi-800 disabled:opacity-50`,onClick:()=>void c(`allowed`),children:`允许本次`}),(0,k.jsx)(`button`,{type:`button`,disabled:r,className:`focus-neko rounded-lg border border-sakura-300 px-3 py-1 disabled:opacity-50`,onClick:()=>void c(`denied`),children:`拒绝`})]}),a&&(0,k.jsx)(`p`,{role:`alert`,className:`break-all text-xs text-sakura-800`,children:a})]})}function BI(){let{phase:e,operating:t,currentSessionId:n,view:r}=gM(),[,i]=(0,f.useState)(0),a=(0,f.useRef)(null),[o,s]=(0,f.useState)(null),c=e===`ready`&&!t&&r!==null;if((0,f.useEffect)(()=>{if(!c||!n)return;let e=!0,t=new nM(e=>OM.subagent(e),()=>{e&&i(e=>e+1)});return a.current=t,s(t),()=>{e=!1,a.current=null,t.close(),s(null)}},[c,n]),(0,f.useEffect)(()=>{c&&o===a.current&&o?.update(r?.subagents??[])},[o,c,r?.subagents]),!c||!o)return null;let l=o.pending;return!l.length&&!o.error?null:(0,k.jsxs)(`section`,{"aria-label":`待审批命令`,className:`max-h-[40dvh] shrink-0 space-y-2 overflow-auto px-3 py-2`,children:[l.map(({item:e,title:t,service:n})=>(0,k.jsx)(zI,{item:e,title:t,decide:t=>n.decideApproval({id:e.id,version:e.version,decision:t})},`${e.id}:${e.version}`)),o.error&&(0,k.jsx)(`p`,{role:`alert`,className:`text-sm text-sakura-800`,children:o.error})]})}function VI(e){let t=Math.max(0,Math.floor(e/1e3));if(t<60)return`${t}s`;let n=Math.floor(t/60);if(t<3600)return`${n}m ${t%60}s`;let r=Math.floor(t/3600);return t<86400?`${r}h ${n%60}m`:`${Math.floor(t/86400)}d ${r%24}h`}var HI=e=>e.split(`
|
|
14
|
+
`).map(e=>e.trim()).find(Boolean)??``;function UI(e){return e.title.trim()||HI(e.command)||`(empty command)`}function WI(e,t){return e.status===`running`?VI(t-e.startedAt):e.reason===`timeout`?`timeout`:e.exitCode===null?e.reason===`restart`?`restart`:VI((e.endedAt??t)-e.startedAt):`exit ${e.exitCode}`}var GI=e=>Number.parseInt(e.replace(/^\D+/,``),10)||0;function KI(e,t){let n=[...e].sort((e,t)=>t.startedAt-e.startedAt||GI(t.jobId)-GI(e.jobId)).map(e=>{let n=e.status===`running`;return{job:e,label:UI(e),running:n,statusText:e.status,meta:WI(e,t),durationMs:Math.max(0,(e.endedAt??t)-e.startedAt)}});return{rows:n,running:n.filter(e=>e.running).length}}function qI(e){let t=e.split(`
|
|
15
|
+
`),n=t[0]??``,r=t[1]?.startsWith(`Command: `)?t[1].slice(9):void 0,i=t.findIndex((e,t)=>t>0&&e.startsWith(`Last output (`)),a=i<0?void 0:t.slice(i+1).join(`
|
|
16
|
+
`);return{head:n,command:r,output:a===``?void 0:a}}var JI=262144,YI=class{#e=``;#t=0;#n;#r;constructor(e=JI){this.#r=e}get text(){return this.#e}get dropped(){return this.#t}get offset(){return this.#n}apply(e,t=e=>e){if(this.#n===void 0?this.#t=e.dropped:e.truncated&&(this.#t+=e.dropped),this.#n=e.offset,this.#e+=t(e.text),this.#e.length>this.#r){let e=this.#e.length-this.#r;this.#e=this.#e.slice(e),this.#t+=e}}},XI={running:`运行中`,exited:`已退出`,failed:`失败`,stopped:`已停止`,lost:`已丢失`};function ZI(e,t){let n=XI[e.status];return e.status===`running`?`${n} · ${VI(t-e.startedAt)}`:e.reason===`timeout`?`${n} · 超时`:e.reason===`spawn-error`?`${n} · 无法启动`:e.exitCode===null?e.reason===`restart`?`${n} · 网关重启`:`${n} · ${VI((e.endedAt??t)-e.startedAt)}`:`${n} · 退出码 ${e.exitCode}`}var QI=/\u001b(?:\[[0-?]*[ -/]*[@-~]|\][^\u0007\u001b]*(?:\u0007|\u001b\\)|[@-Z\\-_])/g,$I=/[\u0000-\u0008\u000b-\u001f\u007f]/g;function eL(e){return e.replace(QI,``).replace(/\r\n?/g,`
|
|
17
|
+
`).replace($I,``)}function tL(e,t=24){return e.scrollHeight-e.scrollTop-e.clientHeight<=t}var nL=1e3,rL=e=>e instanceof Error?e.message:String(e);function iL({sessionId:e,job:t}){let n=t.jobId,r=(0,f.useRef)(new YI),[,i]=(0,f.useState)(0),[a,o]=(0,f.useState)(``),[s,c]=(0,f.useState)(!0),[l,u]=(0,f.useState)(!1),d=(0,f.useRef)(!0),p=(0,f.useRef)(null),m=t.status===`running`,h=(0,f.useRef)(m);h.current=m;let[g,_]=(0,f.useState)(Date.now);(0,f.useEffect)(()=>{if(!m)return;let e=setInterval(()=>_(Date.now()),nL);return()=>clearInterval(e)},[m]),(0,f.useEffect)(()=>{let t=!1,a,s=async()=>{let c=h.current;try{let l=await OM.jobOutput(e,n,r.current.offset);if(t)return;r.current.apply(l,eL),o(``),i(e=>e+1),c&&(a=setTimeout(()=>void s(),nL))}catch(e){t||o(rL(e))}};return s(),()=>{t=!0,clearTimeout(a)}},[e,n]),(0,f.useLayoutEffect)(()=>{let e=p.current;e&&d.current&&(e.scrollTop=e.scrollHeight)});let v=(0,f.useCallback)(()=>{let e=p.current;e&&(d.current=!0,c(!0),e.scrollTop=e.scrollHeight)},[]),y=()=>{l||(u(!0),OM.jobStop(e,n).catch(e=>o(rL(e))).finally(()=>u(!1)))},b=r.current.text;return(0,k.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,k.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-1 border-b border-sakura-100 p-3 text-xs`,children:[(0,k.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,k.jsx)(`span`,{className:`font-medium text-ink-800`,children:ZI(t,g)}),m&&(0,k.jsx)(`button`,{type:`button`,disabled:l,className:`focus-neko rounded-lg border border-sakura-300 px-2 py-0.5 disabled:opacity-50`,onClick:y,children:l?`正在停止…`:`停止任务`})]}),(0,k.jsx)(`code`,{className:`max-h-20 overflow-auto whitespace-pre-wrap break-all text-ink-700`,children:t.command}),(0,k.jsx)(`span`,{className:`break-all text-ink-500`,children:t.cwd})]}),a&&(0,k.jsx)(`p`,{role:`alert`,className:`shrink-0 p-3 text-sm text-sakura-800`,children:a}),(0,k.jsxs)(`div`,{className:`relative min-h-0 flex-1`,children:[(0,k.jsxs)(`div`,{ref:p,"data-testid":`job-output`,className:`h-full overflow-y-auto overflow-x-hidden p-3`,onScroll:e=>{let t=tL(e.currentTarget);d.current=t,c(t)},children:[r.current.dropped>0&&(0,k.jsxs)(`p`,{className:`mb-2 text-xs text-sakura-800`,children:[`… 已省略更早的 `,r.current.dropped,` 字节输出`]}),b===``?(0,k.jsx)(`p`,{className:`text-xs text-ink-500`,children:r.current.offset===void 0?`读取中…`:`暂无输出`}):(0,k.jsx)(`pre`,{className:`whitespace-pre-wrap break-words font-mono text-xs text-ink-800`,children:b})]}),!s&&(0,k.jsx)(`button`,{type:`button`,onClick:v,className:`focus-neko discrete-in absolute right-3 bottom-3 rounded-full border border-sakura-300 bg-surface px-3.5 py-1 text-xs font-medium text-sakura-800 hover:bg-sakura-50`,children:`回到底部 ↓`})]})]})}function aL({sessionId:e,jobs:t,open:n,onClose:r}){let[i,a]=(0,f.useState)(null),[o,s]=(0,f.useState)(Date.now),c=(0,f.useRef)(null),l=(0,f.useRef)(null),[u,d]=(0,f.useState)(()=>window.matchMedia(`(max-width: 1023px)`).matches);(0,f.useEffect)(()=>{let e=window.matchMedia(`(max-width: 1023px)`),t=()=>d(e.matches);return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]);let p=KI(t,o);(0,f.useEffect)(()=>{if(!n||p.running===0)return;let e=setInterval(()=>s(Date.now()),nL);return()=>clearInterval(e)},[n,p.running]),(0,f.useEffect)(()=>{if(!n)return;let e=document.activeElement,t=u&&l.current?.parentElement?[...l.current.parentElement.children].filter(e=>e instanceof HTMLElement&&e!==l.current):[],r=t.map(e=>e.inert);return t.forEach(e=>{e.inert=!0}),c.current?.focus(),()=>{t.forEach((e,t)=>{e.inert=r[t]}),e?.isConnected&&e.focus()}},[n,u]);let m=p.rows.find(e=>e.job.jobId===i)??p.rows[0];return(0,k.jsxs)(`aside`,{ref:l,role:u?`dialog`:`complementary`,"aria-modal":u&&n?!0:void 0,"aria-label":`后台任务`,className:`${n?`flex`:`hidden`} fixed inset-0 z-30 min-w-0 flex-col border-l border-sakura-200 bg-base lg:static lg:z-auto lg:w-[min(42vw,40rem)] lg:shrink-0`,onKeyDown:e=>{if(e.currentTarget.contains(e.target)){if(e.key===`Tab`&&window.innerWidth<1024){let t=[...e.currentTarget.querySelectorAll(`button:not([disabled]),a[href],summary,[tabindex='0']`)].filter(e=>e.getClientRects().length>0),n=t[0],r=t.at(-1);e.shiftKey&&document.activeElement===n?(e.preventDefault(),r?.focus()):!e.shiftKey&&document.activeElement===r&&(e.preventDefault(),n?.focus())}e.key===`Escape`&&(e.stopPropagation(),r())}},children:[(0,k.jsxs)(`div`,{className:`flex items-center justify-between border-b border-sakura-200 px-4 py-1.5`,children:[(0,k.jsx)(`strong`,{className:`text-sm text-ink-800`,children:`后台任务`}),(0,k.jsx)(`button`,{ref:c,type:`button`,className:`focus-neko rounded-lg px-2 py-1 text-sm text-ink-600 hover:bg-sakura-50`,onClick:r,children:`关闭`})]}),p.rows.length===0?(0,k.jsx)(`p`,{className:`p-4 text-sm text-ink-500`,children:`这个会话还没有后台任务。`}):(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`div`,{className:`max-h-44 shrink-0 overflow-auto border-b border-sakura-100 p-2`,children:p.rows.map(e=>(0,k.jsxs)(`button`,{type:`button`,"aria-pressed":m?.job.jobId===e.job.jobId,className:`focus-neko flex w-full min-w-0 items-center gap-2 rounded-lg px-2 py-1.5 text-left text-sm ${m?.job.jobId===e.job.jobId?`bg-tianyi-100`:`hover:bg-sakura-50`}`,onClick:()=>a(e.job.jobId),children:[(0,k.jsxs)(`span`,{className:`min-w-0 flex-1 truncate`,children:[(0,k.jsx)(`span`,{className:`text-tianyi-700`,children:e.job.jobId}),` · `,e.label]}),(0,k.jsx)(`span`,{className:`shrink-0 text-xs text-ink-500`,children:ZI(e.job,o)})]},e.job.jobId))}),n&&m&&(0,k.jsx)(iL,{sessionId:e,job:m.job},`${e}:${m.job.jobId}`)]})]})}function oL(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var sL=oL();function cL(e){sL=e}var lL={exec:()=>null};function uL(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function dL(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(pL.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var fL=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),pL={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:uL(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:uL(e=>RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:uL(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:uL(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:uL(e=>RegExp(`^ {0,${e}}(?:</?(?:${OL})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,`i`)),blockquoteBeginRegex:uL(e=>RegExp(`^ {0,${e}}>`))},mL=/^(?:[ \t]*(?:\n|$))+/,hL=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,gL=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,_L=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,vL=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,yL=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,bL=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,xL=dL(bL).replace(/bull/g,yL).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),SL=dL(bL).replace(/bull/g,yL).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),CL=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,wL=/^[^\n]+/,TL=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,EL=dL(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,TL).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),DL=dL(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,yL).getRegex(),OL=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,kL=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,AL=dL(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,kL).replace(`tag`,OL).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),jL=e=>dL(CL).replace(`hr`,_L).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,e).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,OL).getRegex(),ML=jL(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),NL=jL(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),PL={blockquote:dL(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,NL).getRegex(),code:hL,def:EL,fences:gL,heading:vL,hr:_L,html:AL,lheading:xL,list:DL,newline:mL,paragraph:ML,table:lL,text:wL},FL=dL(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,_L).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,OL).getRegex(),IL={...PL,lheading:SL,table:FL,paragraph:dL(CL).replace(`hr`,_L).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,FL).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,OL).getRegex()},LL={...PL,html:dL(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,kL).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:lL,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:dL(CL).replace(`hr`,_L).replace(`heading`,` *#{1,6} *[^
|
|
18
|
+
]`).replace(`lheading`,xL).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},RL=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,zL=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,BL=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,VL=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,HL=/[\p{P}\p{S}]/u,UL=/[\s\p{P}\p{S}]/u,WL=/[^\s\p{P}\p{S}]/u,GL=dL(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,UL).getRegex(),KL=/[\p{Pi}\p{Ps}"']/u,qL=/(?!~)[\p{P}\p{S}]/u,JL=/(?!~)[\s\p{P}\p{S}]/u,YL=/(?:[^\s\p{P}\p{S}]|~)/u,XL=dL(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,fL?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),ZL=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,QL=dL(ZL,`u`).replace(/punct/g,HL).getRegex(),$L=dL(ZL,`u`).replace(/punct/g,qL).getRegex(),eR=dL(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,`u`).replace(/openQuote/g,KL).replace(/punct/g,HL).getRegex(),tR=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,nR=dL(tR,`gu`).replace(/notPunctSpace/g,WL).replace(/punctSpace/g,UL).replace(/punct/g,HL).getRegex(),rR=dL(tR,`gu`).replace(/notPunctSpace/g,YL).replace(/punctSpace/g,JL).replace(/punct/g,qL).getRegex(),iR=dL(`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,WL).replace(/punctSpace/g,UL).replace(/punct/g,HL).getRegex(),aR=dL(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,WL).replace(/punctSpace/g,UL).replace(/punct/g,HL).getRegex(),oR=dL(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,WL).replace(/punctSpace/g,UL).replace(/punct/g,HL).getRegex(),sR=dL(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,HL).getRegex(),cR=dL(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,WL).replace(/punctSpace/g,UL).replace(/punct/g,HL).getRegex(),lR=dL(/\\(punct)/,`gu`).replace(/punct/g,HL).getRegex(),uR=dL(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),dR=dL(kL).replace(`(?:-->|$)`,`-->`).getRegex(),fR=dL(`^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,dR).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),pR=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,mR=dL(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace(`brackets`,pR).getRegex(),hR=dL(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace(`label`,mR).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),gR=dL(/^!?\[(label)\]\[(ref)\]/).replace(`label`,mR).replace(`ref`,TL).getRegex(),_R=dL(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,TL).getRegex(),vR=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,yR=dL(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace(`brackets`,pR).getRegex(),bR=dL(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,dL(/^!?\[(label)\]\[(ref)\]/).replace(`label`,yR).replace(`ref`,vR).getRegex()).replace(`nolink`,dL(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,vR).getRegex()).getRegex(),xR=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,SR=dL(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),CR={_backpedal:lL,anyPunctuation:lR,autolink:uR,blockSkip:XL,br:BL,code:zL,del:lL,delLDelim:lL,delRDelim:lL,emStrongLDelim:QL,emStrongRDelimAst:nR,emStrongRDelimUnd:aR,escape:RL,link:hR,nolink:_R,punctuation:GL,reflink:gR,reflinkSearch:bR,tag:fR,text:VL,url:lL},wR={...CR,emStrongLDelim:eR,emStrongRDelimAst:iR,emStrongRDelimUnd:oR,link:dL(/^!?\[(label)\]\((.*?)\)/).replace(`label`,mR).getRegex(),reflink:dL(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,mR).getRegex()},TR={...CR,emStrongRDelimAst:rR,emStrongLDelim:$L,delLDelim:sR,delRDelim:cR,url:dL(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`emailProtocol`,SR).replace(`protocol`,xR).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:dL(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace(`protocol`,xR).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},ER={...TR,br:dL(BL).replace(`{2,}`,`*`).getRegex(),text:dL(TR.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},DR={normal:PL,gfm:IL,pedantic:LL},OR={normal:CR,gfm:TR,breaks:ER,pedantic:wR},kR={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},AR=e=>kR[e];function jR(e,t){if(t){if(pL.escapeTest.test(e))return e.replace(pL.escapeReplace,AR)}else if(pL.escapeTestNoEncode.test(e))return e.replace(pL.escapeReplaceNoEncode,AR);return e}function MR(e){return e.replace(pL.numericCharacterReference,(e,t,n)=>{let r=t===void 0?Number.parseInt(n,16):Number.parseInt(t,10);return r===0||r>1114111||r>=55296&&r<=57343?`�`:String.fromCodePoint(r)})}function NR(e){try{e=encodeURI(e).replace(pL.percentDecode,`%`)}catch{return null}return e}function PR(e,t){let n=e.replace(pL.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(pL.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t){if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``)}for(;r<n.length;r++)n[r]=n[r].trim().replace(pL.slashPipe,`|`);return n}function FR(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function IR(e){let t=e.split(`
|
|
19
|
+
`),n=t.length-1;for(;n>=0&&pL.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
|
|
20
|
+
`)}function LR(e){return e.trim().toLowerCase().toUpperCase().toLowerCase()}function RR(e,t){if(e.indexOf(t[0])===-1&&e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function zR(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function BR(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`),c=e[0].charAt(0)===`!`;r.state.inLink=!0;let l=r.state.linkEmitted,u=r.state.inRawBlock;r.state.linkEmitted=!1;let d=r.inlineTokens(s),f=r.state.linkEmitted;if(r.state.linkEmitted=l,r.state.inLink=!1,!c){if(f){r.state.inRawBlock=u;return}r.state.linkEmitted=!0}return{type:c?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:d}}function VR(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
21
|
+
`).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return e.slice(Math.min(r.length,i.length))}).join(`
|
|
22
|
+
`)}function HR(e,t,n,r){if(!t.includes(`<`))return!1;for(let i=0;i<t.length;i++){if(t[i]===`\\`){i++;continue}if(t[i]==="`"){let e=r.inline.code.exec(t.slice(i));if(e){i+=e[0].length-1;continue}}if(t[i]!==`<`)continue;let a=e.slice(n+i),o=r.inline.tag.exec(a)||r.inline.autolink.exec(a);if(o){if(o[0].length>t.length-i)return!0;i+=o[0].length-1}}return!1}var UR=class{options;rules;lexer;constructor(e){this.options=e||sL}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=this.options.pedantic?t[0]:IR(t[0]);return{type:`code`,raw:e,codeBlockStyle:`indented`,text:e.replace(this.rules.other.codeRemoveIndent,``)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=VR(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=FR(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceTabChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:FR(t[0],`
|
|
23
|
+
`),depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:FR(t[0],`
|
|
24
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=FR(t[0],`
|
|
25
|
+
`).split(`
|
|
26
|
+
`),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o=0;for(;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(`
|
|
27
|
+
`),c=s.replace(this.rules.other.blockquoteSetextReplace,`
|
|
28
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,``);n=n?`${n}
|
|
29
|
+
${s}`:s,r=r?`${r}
|
|
30
|
+
${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=l,e.length===0)break;let u=i.at(-1);if(u?.type===`code`)break;if(u?.type===`blockquote`){let t=u,a=e.join(`
|
|
31
|
+
`),o=t.raw+`
|
|
32
|
+
`+a.replace(this.rules.other.blockquoteSetextReplace2,``),s=this.blockquote(o);i[i.length-1]=s;let c=o.substring(s.raw.length).replace(/^\n/,``),l=c?c.split(`
|
|
33
|
+
`).length:0,d=l?e.slice(0,-l):e;d.length>0&&(n=`${n}
|
|
34
|
+
${d.join(`
|
|
35
|
+
`)}`),r=r.substring(0,r.length-t.text.length)+s.text;break}if(u?.type===`list`){let t=u,a=t.raw+`
|
|
36
|
+
`+e.join(`
|
|
37
|
+
`),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(i.at(-1).raw.length).split(`
|
|
38
|
+
`)}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=t[2].split(`
|
|
39
|
+
`,1)[0],l=t[1].length,u=this.options.pedantic?zR(c,l):c.replace(this.rules.other.leadingSpaceTab,e=>zR(e,l)),d=e.split(`
|
|
40
|
+
`,1)[0],f=!u.trim(),p=0;if(this.options.pedantic?(p=2,s=u.trimStart()):f?p=l+1:(p=u.search(this.rules.other.nonSpaceChar),p=p>4?1:p,s=u.slice(p),p+=l),f&&this.rules.other.blankLine.test(d)&&(r+=d+`
|
|
41
|
+
`,e=e.substring(d.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(p),n=this.rules.other.hrRegex(p),i=this.rules.other.fencesBeginRegex(p),a=this.rules.other.headingBeginRegex(p),o=this.rules.other.htmlBeginRegex(p),c=this.rules.other.blockquoteBeginRegex(p);for(;e;){let l=e.split(`
|
|
42
|
+
`,1)[0],m;if(d=l,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting,` `),m=d):m=d.replace(this.rules.other.leadingSpaceTab,e=>e.replace(this.rules.other.tabCharGlobal,` `)),i.test(d)||a.test(d)||o.test(d)||c.test(d)||t.test(d)||n.test(d))break;if(m.search(this.rules.other.nonSpaceChar)>=p||!d.trim())s+=`
|
|
43
|
+
`+m.slice(p);else{if(f||u.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(u)||a.test(u)||n.test(u))break;s+=`
|
|
44
|
+
`+d}f=!d.trim(),r+=l+`
|
|
45
|
+
`,e=e.substring(l.length+1),u=m.slice(p)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0)),i.items.push({type:`list_item`,raw:r,task:!!this.options.gfm&&this.rules.other.listIsTask.test(s),loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e of i.items)if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),!i.loose){let t=e.tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}for(let e of i.items){let t=e.tokens[0];if(e.task&&(t?.type===`text`||t?.type===`paragraph`)){e.text=e.text.replace(this.rules.other.listReplaceTask,``),t.raw=t.raw.replace(this.rules.other.listReplaceTask,``),t.text=t.text.replace(this.rules.other.listReplaceTask,``);for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,``);break}let n=this.rules.other.listTaskCheckbox.exec(e.raw);if(n){let t={type:`checkbox`,raw:n[0]+` `,checked:n[0]!==`[ ]`};e.checked=t.checked,i.loose?e.tokens[0]&&[`paragraph`,`text`].includes(e.tokens[0].type)&&`tokens`in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=t.raw+e.tokens[0].raw,e.tokens[0].text=t.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(t)):e.tokens.unshift({type:`paragraph`,raw:t.raw,text:t.raw,tokens:[t]}):e.tokens.unshift(t)}}else e.task&&=!1}if(i.loose)for(let e of i.items){e.loose=!0;for(let t of e.tokens)t.type===`text`&&(t.type=`paragraph`)}return i}}html(e){let t=this.rules.block.html.exec(e);if(t){let e=IR(t[0]);return{type:`html`,block:!0,raw:e,pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:e}}}def(e){let t=this.rules.block.def.exec(e);if(t){if(!this.rules.other.startAngleBracket.test(t[2])&&RR(t[2],`()`)!==-1)return;let e=LR(t[1]).replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:FR(t[0],`
|
|
46
|
+
`),href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=PR(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
|
|
47
|
+
`):[],a={type:`table`,raw:FR(t[0],`
|
|
48
|
+
`),header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(PR(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:`heading`,raw:FR(t[0],`
|
|
49
|
+
`),depth:t[2].charAt(0)===`=`?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
|
|
50
|
+
`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){if(this.lexer.state.linkParenPossible===!1)return;let t=this.rules.inline.link.exec(e);if(t){let n=t[0].charAt(0)===`!`?2:1;if(!this.options.pedantic&&HR(e,t[1],n,this.rules))return;let r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let e=FR(r.slice(0,-1),`\\`);if((r.length-e.length)%2==0)return}else{let e=RR(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let i=t[2],a=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(i);e&&(i=e[1],a=e[3])}else a=t[3]?t[3].slice(1,-1):``;return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(i=this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?i.slice(1):i.slice(1,-1)),BR(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,`$1`),title:a&&a.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=n[0].charAt(0)===`!`?2:1;if(!this.options.pedantic&&HR(e,n[1],r,this.rules))return;let i=t[LR((n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `))];if(!i){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return BR(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,a,o,s=i,c=0,l=r[0][0],u=n===l,d=l===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+i);(r=d.exec(t))!==null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(o=[...a].length,r[3]||r[4]){s+=o;continue}if(r[5]||r[6]){if(i%3&&!((i+o)%3)){c+=o;continue}if(u)break}if(s-=o,s>0)continue;o=Math.min(o,o+s+c);let t=[...r[0]][0].length,n=e.slice(0,i+r.index+t+o);if(Math.min(i,o)%2){let e=n.slice(1,-1);return{type:`em`,raw:n,text:e,tokens:this.lexer.inlineTokens(e)}}let l=n.slice(2,-2);return{type:`strong`,raw:n,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e,t,n=``){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim;for(s.lastIndex=0,t=t.slice(-1*e.length+n);(r=s.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,autolink:!0,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,autolink:!0,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:e?t[0]:MR(t[0]),escaped:e}}}},WR=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||sL,this.options.tokenizer=this.options.tokenizer||new UR,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,linkParenPossible:!0,top:!0};let t={other:pL,block:DR.normal,inline:OR.normal};this.options.pedantic?(t.block=DR.pedantic,t.inline=OR.pedantic):this.options.gfm&&(t.block=DR.gfm,t.inline=this.options.breaks?OR.breaks:OR.gfm),this.tokenizer.rules=t}static get rules(){return{block:DR,inline:OR}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(pL.carriageReturn,`
|
|
51
|
+
`),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(pL.tabCharGlobal,` `).replace(pL.spaceLine,``));let r=1/0;for(;e;){if(e.length<r)r=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let i;if(this.options.extensions?.block?.some(n=>(i=n.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let n=t.at(-1);i.raw.length===1&&n!==void 0?n.raw+=`
|
|
52
|
+
`:t.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
53
|
+
`)?``:`
|
|
54
|
+
`)+i.raw,n.text+=`
|
|
55
|
+
`+i.text,this.inlineQueue.at(-1).src=n.text):t.push(i);continue}if((i=this.tokenizer.fences(e))||(i=this.tokenizer.heading(e))||(i=this.tokenizer.hr(e))||(i=this.tokenizer.blockquote(e))||(i=this.tokenizer.list(e))||(i=this.tokenizer.html(e))){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
56
|
+
`)?``:`
|
|
57
|
+
`)+i.raw,n.text+=`
|
|
58
|
+
`+i.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},t.push(i));continue}if((i=this.tokenizer.table(e))||(i=this.tokenizer.lheading(e))){e=e.substring(i.raw.length),t.push(i);continue}let a=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(a=e.substring(0,t+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){let r=t.at(-1);n&&r?.type===`paragraph`?(r.raw+=(r.raw.endsWith(`
|
|
59
|
+
`)?``:`
|
|
60
|
+
`)+i.raw,r.text+=`
|
|
61
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(i),n=a.length!==e.length,e=e.substring(i.raw.length)}else if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
62
|
+
`)?``:`
|
|
63
|
+
`)+i.raw,n.text+=`
|
|
64
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(i)}else if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}linkInText(e){if(!e.includes(`[`))return!1;let t=this.tokenizer.rules.inline.link;for(let n of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(t.test(n[0])&&e.charAt(n.index-1)!==`!`)return!0;for(let t of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let e=t[0],n=e.lastIndexOf(`[`);if(e.charAt(0)!==`!`&&Object.hasOwn(this.tokens.links,LR(e.slice(n+1,-1)))&&!(n>1&&this.linkInText(e.slice(1,n-1))))return!0}return!1}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=this.state.linkParenPossible;this.state.linkParenPossible=n&&e.includes(`)`);try{return this.#e(e,t)}finally{this.state.linkParenPossible=n}}#e(e,t){let n=e;if(this.tokens.links&&e.includes(`[`)){let e=this.tokenizer.rules.inline.reflinkSearch,t=n=>{let r=n.lastIndexOf(`[`);if(!Object.hasOwn(this.tokens.links,LR(n.slice(r+1,-1))))return n;if(r>1&&n.charAt(0)!==`!`){let i=n.slice(1,r-1);if(this.linkInText(i))return`[`+i.replace(e,t)+`][`+`a`.repeat(n.length-r-2)+`]`}return`[`+`a`.repeat(n.length-2)+`]`};n=n.replace(e,t)}n=n.replace(this.tokenizer.rules.inline.anyPunctuation,e=>`+`.repeat(e.length)),n=n.replace(this.tokenizer.rules.inline.blockSkip,(e,t,n)=>{let r=n?n.length:0;return e.slice(0,r)+`[`+`a`.repeat(e.length-r-2)+`]`}),n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let r=!1,i=``,a=1/0;for(;e;){if(e.length<a)a=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}r||(i=``),r=!1;let o;if(this.options.extensions?.inline?.some(n=>(o=n.call({lexer:this},e,t))?(e=e.substring(o.raw.length),t.push(o),!0):!1))continue;if((o=this.tokenizer.escape(e))||(o=this.tokenizer.tag(e))||(o=this.tokenizer.link(e))){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let n=t.at(-1);o.type===`text`&&n?.type===`text`?(n.raw+=o.raw,n.text+=o.text):t.push(o);continue}if((o=this.tokenizer.emStrong(e,n,i))||(o=this.tokenizer.codespan(e))||(o=this.tokenizer.br(e))||(o=this.tokenizer.del(e,n,i))||(o=this.tokenizer.autolink(e))||!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),t.push(o);continue}let s=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(o=this.tokenizer.inlineText(s)){e=e.substring(o.raw.length),o.raw.slice(-1)!==`_`&&(i=o.raw.slice(-1)),r=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=o.raw,n.text+=o.text):t.push(o)}else if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t=`Infinite loop on byte: `+e;if(this.options.silent)console.error(t);else throw Error(t)}},GR=class{options;parser;constructor(e){this.options=e||sL}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(pL.notSpaceStart)?.[0],i=e?e.replace(pL.endingNewline,``)+`
|
|
65
|
+
`:``;return r?`<pre><code class="language-`+jR(r)+`">`+(n?i:jR(i,!0))+`</code></pre>
|
|
66
|
+
`:`<pre><code>`+(n?i:jR(i,!0))+`</code></pre>
|
|
67
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
68
|
+
${this.parser.parse(e)}</blockquote>
|
|
69
|
+
`}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
70
|
+
`}hr(e){return`<hr>
|
|
71
|
+
`}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let i=t?`ol`:`ul`,a=t&&n!==1?` start="`+n+`"`:``;return`<`+i+a+`>
|
|
72
|
+
`+r+`</`+i+`>
|
|
73
|
+
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
|
74
|
+
`}checkbox({checked:e}){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox"> `}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
75
|
+
`}table(e){let t=``,n=``;for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r=``;for(let t=0;t<e.rows.length;t++){let i=e.rows[t];n=``;for(let e=0;e<i.length;e++)n+=this.tablecell(i[e]);r+=this.tablerow({text:n})}return r&&=`<tbody>${r}</tbody>`,`<table>
|
|
76
|
+
<thead>
|
|
77
|
+
`+t+`</thead>
|
|
78
|
+
`+r+`</table>
|
|
79
|
+
`}tablerow({text:e}){return`<tr>
|
|
80
|
+
${e}</tr>
|
|
81
|
+
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
82
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${jR(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:n,tokens:r,autolink:i}){let a=i?jR(n,!0):this.parser.parseInline(r),o=NR(e);if(o===null)return a;e=jR(o,i);let s=`<a href="`+e+`"`;return t&&(s+=` title="`+jR(t)+`"`),s+=`>`+a+`</a>`,s}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=NR(e);if(i===null)return jR(n);e=i;let a=`<img src="${jR(e)}" alt="${jR(n)}"`;return t&&(a+=` title="${jR(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:jR(e.text)}},KR=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},qR=class e{options;renderer;textRenderer;constructor(e){this.options=e||sL,this.options.renderer=this.options.renderer||new GR,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new KR}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`checkbox`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`checkbox`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},JR=class{options;block;constructor(e){this.options=e||sL}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?WR.lex:WR.lexInline}provideParser(e=this.block){return e?qR.parse:qR.parseInline}},YR=class{defaults=oL();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=qR;Renderer=GR;TextRenderer=KR;Lexer=WR;Tokenizer=UR;Hooks=JR;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new GR(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new UR(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new JR;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];t[r]=JR.passThroughHooks.has(n)?e=>{if(this.defaults.async&&JR.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return WR.lex(e,t??this.defaults)}parser(e,t){return qR.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer(e):e?WR.lex:WR.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser(e):e?qR.parse:qR.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer(e):e?WR.lex:WR.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser(e):e?qR.parse:qR.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
|
|
83
|
+
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+jR(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}},XR=new YR;function ZR(e,t){return XR.parse(e,t)}ZR.options=ZR.setOptions=function(e){return XR.setOptions(e),ZR.defaults=XR.defaults,cL(ZR.defaults),ZR},ZR.getDefaults=oL,ZR.defaults=sL;function QR(...e){return XR.use(...e),ZR.defaults=XR.defaults,cL(ZR.defaults),ZR}ZR.use=QR,ZR.walkTokens=function(e,t){return XR.walkTokens(e,t)},ZR.parseInline=XR.parseInline,ZR.Parser=qR,ZR.parser=qR.parse,ZR.Renderer=GR,ZR.TextRenderer=KR,ZR.Lexer=WR,ZR.lexer=WR.lex,ZR.Tokenizer=UR,ZR.Hooks=JR,ZR.parse=ZR,ZR.options,ZR.setOptions,ZR.walkTokens,ZR.parseInline,qR.parse,WR.lex;var $R=/^image\/(png|jpeg|webp|gif)$/i,ez=/^(https?:|mailto:)/i,tz=49152,nz=`default-src 'none'; img-src data:; style-src 'unsafe-inline'`,rz=`
|
|
84
|
+
:root{color-scheme:light dark;--bg:#fff;--fg:#1f2328;--muted:#656d76;--border:#d0d7de;--user:#eef4ff;--code:#f6f8fa}
|
|
85
|
+
@media(prefers-color-scheme:dark){:root{--bg:#0d1117;--fg:#e6edf3;--muted:#8b949e;--border:#30363d;--user:#16243a;--code:#161b22}}
|
|
86
|
+
body{margin:0;background:var(--bg);color:var(--fg);font:15px/1.6 system-ui,-apple-system,"Segoe UI",sans-serif}
|
|
87
|
+
main{max-width:860px;margin:0 auto;padding:24px 16px 64px}
|
|
88
|
+
h1{font-size:1.5rem;margin:0 0 4px}
|
|
89
|
+
.meta{color:var(--muted);font-size:.85rem;margin:0 0 24px}
|
|
90
|
+
.msg{margin:16px 0;padding:12px 16px;border:1px solid var(--border);border-radius:12px}
|
|
91
|
+
.msg.user{background:var(--user)}
|
|
92
|
+
.role{font-size:.75rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);margin-bottom:6px}
|
|
93
|
+
.text{white-space:pre-wrap;overflow-wrap:anywhere}
|
|
94
|
+
.system{text-align:center;color:var(--muted);font-size:.85rem;margin:16px 0}
|
|
95
|
+
.md>:first-child{margin-top:0}.md>:last-child{margin-bottom:0}
|
|
96
|
+
.md pre,pre{background:var(--code);border-radius:8px;padding:10px 12px;overflow:auto;font-size:.85rem;white-space:pre-wrap;overflow-wrap:anywhere}
|
|
97
|
+
.md code{background:var(--code);border-radius:4px;padding:1px 4px}.md pre code{background:none;padding:0}
|
|
98
|
+
.md table{border-collapse:collapse}.md th,.md td{border:1px solid var(--border);padding:4px 8px}
|
|
99
|
+
.md blockquote{margin:0;padding-left:12px;border-left:3px solid var(--border);color:var(--muted)}
|
|
100
|
+
details{margin:8px 0}summary{cursor:pointer;color:var(--muted)}
|
|
101
|
+
details.tool{border:1px solid var(--border);border-radius:8px;padding:6px 12px;margin:12px 0}
|
|
102
|
+
details.tool.error>summary .status{color:#cf222e}
|
|
103
|
+
.label{font-size:.75rem;color:var(--muted);margin-top:8px}
|
|
104
|
+
.note{color:var(--muted);font-style:italic;margin-top:6px}
|
|
105
|
+
figure{margin:8px 0}img{max-width:100%;height:auto;border-radius:8px}figcaption,.placeholder{color:var(--muted);font-size:.8rem}
|
|
106
|
+
`,iz=e=>e.replaceAll(`&`,`&`).replaceAll(`<`,`<`).replaceAll(`>`,`>`).replaceAll(`"`,`"`).replaceAll(`'`,`'`),az=new YR({gfm:!0,breaks:!0,renderer:{html:({text:e})=>iz(e),link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n);if(!ez.test(e.trim()))return r;let i=t?` title="${iz(t)}"`:``;return`<a href="${iz(e)}"${i} rel="noopener noreferrer" target="_blank">${r}</a>`},image({href:e,text:t}){let n=`[image: ${iz(t||e)}]`;return ez.test(e.trim())?`<a href="${iz(e)}" rel="noopener noreferrer" target="_blank">${n}</a>`:n}}});async function oz(e,t){let n=new Map,r=0,i=0;for(let a of e)if(a.type===`user`||a.type===`tool`)for(let e of a.images??[]){let a=null;if(t===void 0)a=`not embedded`;else if(r+e.bytes>33554432)a=`over the embedding size limit`;else try{let i=await t(e);if(!$R.test(i.mimeType))a=`unsupported image type`;else if(r+i.bytes.length>33554432)a=`over the embedding size limit`;else{r+=i.bytes.length;let t=[];for(let e=0;e<i.bytes.length;e+=tz)t.push(Ti(i.bytes.subarray(e,e+tz)));n.set(`${e.entryId}:${e.contentIndex}`,{src:`data:${i.mimeType.toLowerCase()};base64,${t.join(``)}`})}}catch{a=`image unavailable`}a!==null&&(n.set(`${e.entryId}:${e.contentIndex}`,{reason:a}),i++)}return{embedded:n,skipped:i}}function sz(e,t){return(e??[]).map(e=>{let n=t.get(`${e.entryId}:${e.contentIndex}`),r=iz(LM(e));return n!==void 0&&`src`in n?`<figure><img src="${n.src}" alt="${iz(e.name)}"><figcaption>${r}</figcaption></figure>`:`<p class="placeholder">[image: ${r}${n!==void 0&&`reason`in n?` — ${n.reason}`:``}]</p>`}).join(``)}async function cz(e,t){let{embedded:n,skipped:r}=await oz(e.items,t.loadImage),i=iz(zM(e.title)||`neko-session`),a=[];for(let r of e.items)if(r.type===`system`)a.push(`<div class="system">${iz(zM(r.text))}</div>`);else if(r.type===`user`){let e=PM(r);a.push(`<section class="msg user"><div class="role">User</div>${e===``?``:`<div class="text">${iz(e)}</div>`}${sz(r.images,n)}</section>`)}else if(r.type===`assistant`){let e=t.includeThinking&&r.thinking.trim()!==``?`<details class="thinking"><summary>Thinking</summary><div class="text">${iz(r.thinking.trim())}</div></details>`:``,n=r.text.trim()===``?``:`<div class="md">${az.parse(r.text.trim(),{async:!1})}</div>`,i=r.note===null?``:`<div class="note">${iz(zM(r.note))}</div>`;a.push(`<section class="msg assistant"><div class="role">Assistant</div>${e}${n}${i}</section>`)}else{let e=FM(r),t=IM(r),i=[`<b>Tool</b> ${iz(r.name)}`,r.summary===``?``:`<span class="args">${iz(zM(r.summary))}</span>`,e===`ok`?``:`<span class="status">[${e}]</span>`,r.durationMs===null?``:`<span class="duration">(${RM(r.durationMs)})</span>`].filter(Boolean).join(` `);a.push(`<details class="tool ${e}"><summary>${i}</summary>${r.detail===null||r.detail===``?``:`<pre>${iz(r.detail)}</pre>`}${t===``?``:`<div class="label">${e===`running`?`Output so far`:`Result`}</div><pre>${iz(t)}</pre>`}${r.note===null?``:`<div class="note">${iz(zM(r.note))}</div>`}${sz(r.images,n)}</details>`)}return{content:`<!doctype html>
|
|
107
|
+
<html lang="en">
|
|
108
|
+
<head>
|
|
109
|
+
<meta charset="utf-8">
|
|
110
|
+
<meta http-equiv="Content-Security-Policy" content="${nz}">
|
|
111
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
112
|
+
<title>${i}</title>
|
|
113
|
+
<style>${rz}</style>
|
|
114
|
+
</head>
|
|
115
|
+
<body>
|
|
116
|
+
<main>
|
|
117
|
+
<h1>${i}</h1>
|
|
118
|
+
<p class="meta">${iz(zM(e.model))} · ${iz(zM(e.cwd))} · ${iz(e.exportedAt.toISOString())}</p>
|
|
119
|
+
${a.join(`
|
|
120
|
+
`)}
|
|
121
|
+
</main>
|
|
122
|
+
</body>
|
|
123
|
+
</html>
|
|
124
|
+
`,skippedImages:r}}var lz={markdown:`md`,html:`html`,json:`json`},uz={markdown:`text/markdown;charset=utf-8`,html:`text/html;charset=utf-8`,json:`application/json;charset=utf-8`},dz=60;function fz(e){return e.type===`user`?PM(e):e.type===`assistant`?e.text.trim():``}function pz(e,t,n){let r=e.replace(/[\\/:*?"<>|\u0000-\u001f\u007f]/g,`-`).replace(/\s+/g,` `).replace(/-{2,}/g,`-`),i=Array.from(r).slice(0,dz).join(``).replace(/^[\s.-]+|[\s.-]+$/g,``)||`neko-session`,a=(e,t=2)=>String(e).padStart(t,`0`);return`${i}-${`${a(n.getFullYear(),4)}${a(n.getMonth()+1)}${a(n.getDate())}-${a(n.getHours())}${a(n.getMinutes())}${a(n.getSeconds())}`}.${lz[t]}`}async function mz(e,t,n){if(t.items.length===0)throw Error(`Nothing to export yet - start a conversation first`);let r=lz[e],i=uz[e];if(e===`html`){let{content:e,skippedImages:a}=await cz(t,n);return{content:e,mimeType:i,extension:r,skippedImages:a}}return{content:e===`markdown`?_z(t,n):yz(t,n),mimeType:i,extension:r,skippedImages:0}}function hz(e){let t=0;for(let n of e.matchAll(/`+/g))t=Math.max(t,n[0].length);let n="`".repeat(Math.max(3,t+1));return`${n}\n${e}\n${n}`}var gz=e=>e.replaceAll(`&`,`&`).replaceAll(`<`,`<`).replaceAll(`>`,`>`);function _z(e,t){let n=[`# ${zM(e.title)||`neko-session`}`,``,`- **Model:** ${zM(e.model)}`,`- **Workspace:** ${zM(e.cwd)}`,`- **Exported:** ${e.exportedAt.toISOString()}`,``],r=null,i=e=>{r!==e&&(r=e,n.push(`---`,``,e===`user`?`## User`:`## Assistant`,``))};for(let a of e.items)if(a.type===`system`)r=null,n.push(`---`,``,`*${gz(zM(a.text))}*`,``);else if(a.type===`user`){i(`user`);let e=PM(a);e!==``&&n.push(e,``);for(let e of a.images??[])n.push(`> [image] ${gz(LM(e))}`,``)}else a.type===`assistant`?(i(`assistant`),t.includeThinking&&a.thinking.trim()!==``&&n.push(`<details>`,`<summary>Thinking</summary>`,``,a.thinking.trim(),``,`</details>`,``),a.text.trim()!==``&&n.push(a.text.trim(),``),a.note!==null&&n.push(`> ${gz(zM(a.note))}`,``)):(i(`assistant`),n.push(...vz(a)));return`${n.join(`
|
|
125
|
+
`).trimEnd()}\n`}function vz(e){let t=FM(e),n=[`<details>`,`<summary>${gz([`Tool: ${e.name}`,e.summary===``?``:`· ${zM(e.summary)}`,t===`ok`?``:`[${t}]`,e.durationMs===null?``:`(${RM(e.durationMs)})`].filter(Boolean).join(` `))}</summary>`,``];e.detail!==null&&e.detail!==``&&n.push(hz(e.detail),``);let r=IM(e);r!==``&&n.push(t===`running`?`Output so far:`:`Result:`,``,hz(r),``),e.note!==null&&n.push(`> ${gz(zM(e.note))}`,``);for(let t of e.images??[])n.push(`> [image] ${gz(LM(t))}`,``);return n.push(`</details>`,``),n}function yz(e,t){let n=e.items.map(e=>{switch(e.type){case`user`:return{type:`user`,text:PM(e),images:(e.images??[]).map(({name:e,mimeType:t,width:n,height:r,bytes:i})=>({name:e,mimeType:t,width:n,height:r,bytes:i}))};case`assistant`:return{type:`assistant`,text:e.text,...t.includeThinking&&e.thinking.trim()!==``?{thinking:e.thinking}:{},stopReason:e.stopReason,note:e.note};case`tool`:return{type:`tool`,name:e.name,summary:e.summary,detail:e.detail,status:e.phase,isError:e.isError,result:IM(e),durationMs:e.durationMs,note:e.note,images:(e.images??[]).map(({name:e,mimeType:t,width:n,height:r,bytes:i})=>({name:e,mimeType:t,width:n,height:r,bytes:i}))};default:return{type:`system`,text:e.text}}});return`${JSON.stringify({format:`neko-conversation`,version:1,session:{id:e.sessionId,title:e.title,model:e.model,cwd:e.cwd,exportedAt:e.exportedAt.toISOString()},items:n},null,2)}\n`}async function bz(e){if(navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch{}let t=document.activeElement,n=document.getSelection(),r=n?Array.from({length:n.rangeCount},(e,t)=>n.getRangeAt(t)):[],i=document.createElement(`textarea`);i.value=e,i.setAttribute(`readonly`,``),i.style.cssText=`position:fixed;top:0;left:-9999px;opacity:0`,document.body.append(i),i.select();let a=!1;try{a=document.execCommand(`copy`)}finally{if(i.remove(),n){n.removeAllRanges();for(let e of r)n.addRange(e)}t?.focus?.()}if(!a)throw Error(`Clipboard unavailable`)}var xz=1500,Sz={idle:``,copied:`已复制`,failed:`复制失败`};function Cz({text:e,label:t=`复制`}){let[n,r]=(0,f.useState)(`idle`),i=(0,f.useRef)(void 0);if((0,f.useEffect)(()=>()=>clearTimeout(i.current),[]),e===``)return null;let a=e=>{r(e),clearTimeout(i.current),i.current=setTimeout(()=>r(`idle`),xz)};return(0,k.jsxs)(`span`,{className:`copy-row`,"data-state":n,children:[(0,k.jsx)(`button`,{type:`button`,className:`copy-btn focus-neko`,"aria-label":t,title:t,onClick:()=>{bz(e).then(()=>a(`copied`),()=>a(`failed`))},children:(0,k.jsx)(lI,{name:n===`copied`?`check`:`copy`,size:15})}),(0,k.jsx)(`output`,{className:`copy-status`,"aria-live":`polite`,children:Sz[n]})]})}var wz=(0,f.createContext)(null);function Tz({image:e}){let{currentSessionId:t,phase:n}=gM(),r=(0,f.useContext)(wz),[i,a]=(0,f.useState)(``),[o,s]=(0,f.useState)(``),[c,l]=(0,f.useState)(!1),[u,d]=(0,f.useState)(0),p=(0,f.useRef)(null);return(0,f.useEffect)(()=>{if(!t)return;a(``);let i=!1,o=``,c=!1,l=new IntersectionObserver(l=>{!c&&l.some(e=>e.isIntersecting)&&n===`ready`&&(c=!0,(r?r(e.entryId,e.contentIndex):OM.image(e.entryId,e.contentIndex,t)).then(e=>{i||(o=URL.createObjectURL(new Blob([e.bytes],{type:e.mimeType})),a(o),s(``))}).catch(()=>{i||s(`图片加载失败,点击重试`)}))});return p.current&&l.observe(p.current),()=>{i=!0,l.disconnect(),o&&URL.revokeObjectURL(o)}},[t,n,e.entryId,e.contentIndex,u,r]),(0,k.jsxs)(`div`,{ref:p,className:`max-w-full`,children:[(0,k.jsx)(`button`,{type:`button`,"aria-label":`查看图片 ${e.name}`,className:`focus-neko max-w-full rounded-xl border border-sakura-200 p-1`,onClick:()=>{o?(s(``),d(u+1)):i&&l(!0)},children:i?(0,k.jsx)(`img`,{src:i,alt:e.name,className:`max-h-40 max-w-full rounded-lg object-contain`}):(0,k.jsx)(`span`,{className:`text-sm`,children:o||`加载图片…`})}),c&&i&&(0,k.jsxs)(pI,{title:e.name,onClose:()=>l(!1),children:[(0,k.jsx)(`div`,{className:`min-h-0 overflow-auto bg-surface p-3 sm:p-4`,children:(0,k.jsx)(`img`,{src:i,alt:e.name,className:`max-h-[65dvh] w-full rounded-lg object-contain`})}),(0,k.jsx)(`div`,{className:`flex shrink-0 justify-end border-t border-sakura-200 bg-surface px-4 py-3`,children:(0,k.jsxs)(`a`,{href:i,download:e.name,className:`btn-primary focus-neko inline-flex min-h-10 items-center gap-2 rounded-full px-5 py-2 text-sm font-medium no-underline`,children:[(0,k.jsx)(`svg`,{"aria-hidden":`true`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,children:(0,k.jsx)(`path`,{d:`M12 3v12m-5-5 5 5 5-5M4 16v4h16v-4`})}),`保存图片`]})})]})]})}function Ez({images:e}){return(0,k.jsx)(`div`,{className:`my-2 flex flex-wrap gap-2`,children:e.map(e=>(0,k.jsx)(Tz,{image:e},`${e.entryId}:${e.contentIndex}`))})}function Dz({text:e,jobId:t,job:n}){let{head:r,command:i,output:a}=qI(e),o=a===void 0?void 0:eL(a),s=(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(`span`,{className:`font-medium text-tianyi-700`,children:[`后台任务 `,t]}),(0,k.jsx)(`span`,{className:`min-w-0 break-words text-ink-700`,children:r.replace(/^\[|\]$/g,``)}),n&&(0,k.jsxs)(`span`,{className:`rounded-full bg-ink-100 px-2 text-ink-600`,children:[`当前:`,ZI(n,Date.now())]})]});return(0,k.jsx)(`div`,{className:`chat-row anim-other`,"data-job-report":t,children:(0,k.jsx)(`div`,{className:`min-w-0 rounded-xl border border-sakura-200 bg-surface px-3 py-2 text-xs`,children:o===void 0?(0,k.jsx)(`div`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1`,children:s}):(0,k.jsxs)(`details`,{children:[(0,k.jsx)(`summary`,{className:`focus-neko flex cursor-pointer flex-wrap items-center gap-x-2 gap-y-1`,children:s}),i!==void 0&&(0,k.jsxs)(`code`,{className:`mt-2 block whitespace-pre-wrap break-all text-ink-600`,children:[`$ `,i]}),(0,k.jsx)(`pre`,{className:`mt-1 max-h-72 overflow-auto whitespace-pre-wrap break-words font-mono text-ink-800`,children:o})]})})})}function Oz(e,t){this.v=e,this.k=t}function kz(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Az(e){if(Array.isArray(e))return e}function jz(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Mz(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
126
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nz(e,t){return Az(e)||jz(e,t)||Pz(e,t)||Mz()}function Pz(e,t){if(e){if(typeof e==`string`)return kz(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kz(e,t):void 0}}function Fz(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof Oz;Promise.resolve(s?o.v:o).then(function(n){if(s){var c=t===`return`&&o.k?t:`next`;if(!o.k||n.done)return r(c,n);n=e[c](n).value}i(!!a.done,n)},function(e){r(`throw`,e)})}catch(e){i(2,e)}}function i(e,i){e===2?t.reject(i):t.resolve({value:i,done:e}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}Fz.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},Fz.prototype.next=function(e){return this._invoke(`next`,e)},Fz.prototype.throw=function(e){return this._invoke(`throw`,e)},Fz.prototype.return=function(e){return this._invoke(`return`,e)};var Iz=Object.entries,Lz=Object.setPrototypeOf,Rz=Object.isFrozen,zz=Object.getPrototypeOf,Bz=Object.getOwnPropertyDescriptor,Vz=Object.freeze,Hz=Object.seal,Uz=Object.create,Wz=typeof Reflect<`u`&&Reflect,Gz=Wz.apply,Kz=Wz.construct;Vz||=function(e){return e},Hz||=function(e){return e},Gz||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},Kz||=function(e){return new e(...[...arguments].slice(1))};var qz=pB(Array.prototype.forEach);Array.prototype.indexOf;var Jz=pB(Array.prototype.lastIndexOf),Yz=pB(Array.prototype.pop),Xz=pB(Array.prototype.push);Array.prototype.slice;var Zz=pB(Array.prototype.splice),Qz=Array.isArray,$z=pB(String.prototype.toLowerCase),eB=pB(String.prototype.toString),tB=pB(String.prototype.match),nB=pB(String.prototype.replace),rB=pB(String.prototype.indexOf),iB=pB(String.prototype.trim),aB=pB(Number.prototype.toString),oB=pB(Boolean.prototype.toString),sB=typeof BigInt>`u`?null:pB(BigInt.prototype.toString),cB=typeof Symbol>`u`?null:pB(Symbol.prototype.toString),lB=pB(Object.prototype.hasOwnProperty),uB=pB(Object.prototype.toString),dB=pB(RegExp.prototype.test),fB=mB(TypeError);function pB(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return Gz(e,t,n)}}function mB(e){return function(){return Kz(e,[...arguments])}}function hB(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$z;if(Lz&&Lz(e,null),!Qz(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(Rz(t)||(t[r]=e),i=e)}e[i]=!0}return e}function gB(e){for(let t=0;t<e.length;t++)lB(e,t)||(e[t]=null);return e}function _B(e){let t=Uz(null);for(let r of Iz(e)){var n=Nz(r,2);let i=n[0],a=n[1];lB(e,i)&&(t[i]=Qz(a)?gB(a):a&&typeof a==`object`&&a.constructor===Object?_B(a):a)}return t}function vB(e){switch(typeof e){case`string`:return e;case`number`:return aB(e);case`boolean`:return oB(e);case`bigint`:return sB?sB(e):`0`;case`symbol`:return cB?cB(e):`Symbol()`;case`undefined`:return uB(e);case`function`:case`object`:{if(e===null)return uB(e);let t=e,n=yB(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:uB(e)}return uB(e)}default:return uB(e)}}function yB(e,t){for(;e!==null;){let n=Bz(e,t);if(n){if(n.get)return pB(n.get);if(typeof n.value==`function`)return pB(n.value)}e=zz(e)}function n(){return null}return n}function bB(e){try{return dB(e,``),!0}catch{return!1}}var xB=Vz(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),SB=Vz(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),CB=Vz([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),wB=Vz([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),TB=Vz(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),EB=Vz([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),DB=Vz([`#text`]),OB=Vz(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),kB=Vz(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),AB=Vz(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),jB=Vz([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),MB=Hz(/{{[\w\W]*|^[\w\W]*}}/g),NB=Hz(/<%[\w\W]*|^[\w\W]*%>/g),PB=Hz(/\${[\w\W]*/g),FB=Hz(/^data-[\-\w.\u00B7-\uFFFF]+$/),IB=Hz(/^aria-[\-\w]+$/),LB=Hz(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),RB=Hz(/^(?:\w+script|data):/i),zB=Hz(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),BB=Hz(/^html$/i),VB=Hz(/^[a-z][.\w]*(-[.\w]+)+$/i),HB=Hz(/<[/\w!]/g),UB=Hz(/<[/\w]/g),WB=Hz(/<\/no(script|embed|frames)/i),GB=Hz(/\/>/i),KB={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},qB=[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`],JB=Vz(hB({},qB)),YB=function(){let e={};return qz(qB,t=>{e[t]=Hz(RegExp(`</`+t+`(?=[\\t\\n\\f\\r />])`,`i`))}),Vz(e)}(),XB=function(){return typeof window>`u`?null:window},ZB=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},QB=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},$B=function(e,t,n,r){return lB(e,t)&&Qz(e[t])?hB(r.base?_B(r.base):{},e[t],r.transform):n},eV=function(e,t,n){let r=lB(e,t)?e[t]:void 0;return r&&typeof r==`object`?_B(r):n()};function tV(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:XB(),t=e=>tV(e);if(t.version=`3.4.16`,t.removed=[],!e||!e.document||e.document.nodeType!==KB.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=yB(d,`cloneNode`),p=yB(d,`remove`),m=yB(d,`removeAttributeNode`),h=yB(d,`nextSibling`),g=yB(d,`childNodes`),_=yB(d,`parentNode`),v=yB(d,`shadowRoot`),y=yB(d,`attributes`),b=o&&o.prototype?yB(o.prototype,`nodeType`):null,x=o&&o.prototype?yB(o.prototype,`nodeName`):null,S=o&&o.prototype?yB(o.prototype,`ownerDocument`):null,C=function(e){return b?b(e):e.nodeType},w=function(e){return x?x(e):e.nodeName};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let T,ee=``,te,ne=!1,re=0,E=function(){if(re>0)throw fB(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},ie=function(e){E(),re++;try{return T.createHTML(e)}finally{re--}},ae=function(e){E(),re++;try{return T.createScriptURL(e)}finally{re--}},oe=function(){return ne||=(te=ZB(u,i),!0),te},se=n,ce=se.implementation,le=se.createNodeIterator,ue=se.createDocumentFragment,de=se.getElementsByTagName,fe=r.importNode,pe=QB();t.isSupported=typeof Iz==`function`&&typeof _==`function`&&ce&&ce.createHTMLDocument!==void 0;let me=MB,he=NB,ge=PB,_e=FB,ve=IB,ye=RB,be=zB,xe=VB,D=LB,O=null,Se=hB({},[...xB,...SB,...CB,...TB,...DB]),Ce=null,we=hB({},[...OB,...kB,...AB,...jB]),Te=Object.seal(Uz(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ee=null,De=null,Oe=Object.seal(Uz(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),ke=!0,Ae=!0,je=!1,Me=!0,Ne=!1,Pe=!0,Fe=!1,Ie=!1,Le=null,Re=null,ze=!1,Be=!1,Ve=!1,He=!1,Ue=!0,We=!1,Ge=`user-content-`,Ke=!0,qe=!1,Je={},Ye=null,Xe=hB({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),Ze=null,Qe=hB({},[`audio`,`video`,`img`,`source`,`image`,`track`]),$e=null,et=hB({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),tt=`http://www.w3.org/1998/Math/MathML`,nt=`http://www.w3.org/2000/svg`,rt=`http://www.w3.org/1999/xhtml`,it=rt,at=!1,ot=null,st=hB({},[tt,nt,rt],eB),ct=Vz([`mi`,`mo`,`mn`,`ms`,`mtext`]),lt=hB({},ct),ut=Vz([`annotation-xml`]),dt=hB({},ut),ft=hB({},[`title`,`style`,`font`,`a`,`script`]),pt=null,mt=[`application/xhtml+xml`,`text/html`],ht=null,gt=null,_t=n.createElement(`form`),vt=function(e){return e instanceof RegExp||e instanceof Function},yt=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(gt&>===e)return;(!e||typeof e!=`object`)&&(e={}),e=_B(e),pt=mt.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,ht=pt===`application/xhtml+xml`?eB:$z,O=$B(e,`ALLOWED_TAGS`,Se,{transform:ht}),Ce=$B(e,`ALLOWED_ATTR`,we,{transform:ht}),ot=$B(e,`ALLOWED_NAMESPACES`,st,{transform:eB}),$e=$B(e,`ADD_URI_SAFE_ATTR`,et,{transform:ht,base:et}),Ze=$B(e,`ADD_DATA_URI_TAGS`,Qe,{transform:ht,base:Qe}),Ye=$B(e,`FORBID_CONTENTS`,Xe,{transform:ht}),Ee=$B(e,`FORBID_TAGS`,_B({}),{transform:ht}),De=$B(e,`FORBID_ATTR`,_B({}),{transform:ht}),Je=lB(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?_B(e.USE_PROFILES):e.USE_PROFILES:!1,ke=e.ALLOW_ARIA_ATTR!==!1,Ae=e.ALLOW_DATA_ATTR!==!1,je=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Me=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ne=e.SAFE_FOR_TEMPLATES||!1,Pe=e.SAFE_FOR_XML!==!1,Fe=e.WHOLE_DOCUMENT||!1,Be=e.RETURN_DOM||!1,Ve=e.RETURN_DOM_FRAGMENT||!1,He=e.RETURN_TRUSTED_TYPE||!1,ze=e.FORCE_BODY||!1,Ue=e.SANITIZE_DOM!==!1,We=e.SANITIZE_NAMED_PROPS||!1,Ke=e.KEEP_CONTENT!==!1,qe=e.IN_PLACE||!1,D=bB(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:LB,it=typeof e.NAMESPACE==`string`?e.NAMESPACE:rt,lt=eV(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>hB({},ct)),dt=eV(e,`HTML_INTEGRATION_POINTS`,()=>hB({},ut));let t=eV(e,`CUSTOM_ELEMENT_HANDLING`,()=>Uz(null));if(Te=Uz(null),lB(t,`tagNameCheck`)&&vt(t.tagNameCheck)&&(Te.tagNameCheck=t.tagNameCheck),lB(t,`attributeNameCheck`)&&vt(t.attributeNameCheck)&&(Te.attributeNameCheck=t.attributeNameCheck),lB(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(Te.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),Hz(Te),Ne&&(Ae=!1),Ve&&(Be=!0),Je&&(O=hB({},DB),Ce=Uz(null),Je.html===!0&&(hB(O,xB),hB(Ce,OB)),Je.svg===!0&&(hB(O,SB),hB(Ce,kB),hB(Ce,jB)),Je.svgFilters===!0&&(hB(O,CB),hB(Ce,kB),hB(Ce,jB)),Je.mathMl===!0&&(hB(O,TB),hB(Ce,AB),hB(Ce,jB))),Oe.tagCheck=null,Oe.attributeCheck=null,lB(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?Oe.tagCheck=e.ADD_TAGS:Qz(e.ADD_TAGS)&&(O===Se&&(O=_B(O)),hB(O,e.ADD_TAGS,ht))),lB(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?Oe.attributeCheck=e.ADD_ATTR:Qz(e.ADD_ATTR)&&(Ce===we&&(Ce=_B(Ce)),hB(Ce,e.ADD_ATTR,ht))),lB(e,`ADD_FORBID_CONTENTS`)&&Qz(e.ADD_FORBID_CONTENTS)&&(Ye===Xe&&(Ye=_B(Ye)),hB(Ye,e.ADD_FORBID_CONTENTS,ht)),Ke&&(O[`#text`]=!0),Fe&&hB(O,[`html`,`head`,`body`]),O.table&&(hB(O,[`tbody`]),delete Ee.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw fB(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw fB(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=T;T=e.TRUSTED_TYPES_POLICY;try{ee=ie(``)}catch(e){throw T=t,e}}else e.TRUSTED_TYPES_POLICY===null?(T=void 0,ee=``):(T===void 0&&(T=oe()),T&&typeof ee==`string`&&(ee=ie(``)));Vz&&Vz(e),gt=e},bt=hB({},[...SB,...CB,...wB]),xt=hB({},[...TB,...EB]),St=function(e,t,n){return t.namespaceURI===rt?e===`svg`:t.namespaceURI===tt?e===`svg`&&(n===`annotation-xml`||lt[n]):!!bt[e]},Ct=function(e,t,n){return t.namespaceURI===rt?e===`math`:t.namespaceURI===nt?e===`math`&&dt[n]:!!xt[e]},wt=function(e,t,n){return t.namespaceURI===nt&&!dt[n]||t.namespaceURI===tt&&!lt[n]?!1:!xt[e]&&(ft[e]||!bt[e])},Tt=function(e){let t=_(e);(!t||!t.tagName)&&(t={namespaceURI:it,tagName:`template`});let n=$z(e.tagName),r=$z(t.tagName);return ot[e.namespaceURI]?e.namespaceURI===nt?St(n,t,r):e.namespaceURI===tt?Ct(n,t,r):e.namespaceURI===rt?wt(n,t,r):!!(pt===`application/xhtml+xml`&&ot[e.namespaceURI]):!1},Et=function(e){Xz(t.removed,{element:e});try{_(e).removeChild(e)}catch{if(p(e),!_(e))throw fB(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},Dt=function(e,t,n){try{m(e,t)}catch{try{e.removeAttribute(n)}catch{}}},Ot=function(e){jt(e);let t=g(e);if(t){let e=[];qz(t,t=>{Xz(e,t)}),qz(e,e=>{try{p(e)}catch{}})}let n=y(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&Dt(e,r,i)}},kt=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}Xz(t.removed,{attribute:r||null,from:n});try{r?m(n,r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`){if(Be||Ve)try{Et(n)}catch{}else try{n.setAttribute(e,``)}catch{}}},At=function(e){let t=y(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||Ce[ht(i)]||Dt(e,r,i)}},jt=function(e){let t=[e];for(;t.length>0;){let e=t.pop();C(e)===KB.element&&At(e);let n=g(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},Mt=function(e,t){return Pe?e===`patchsrc`||e===`for`&&t!==`label`&&t!==`output`:!1},Nt=function(e){if(!Pe)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=C(e);if(n===KB.processingInstruction||n===KB.comment&&dB(UB,e.data)){try{p(e)}catch{}continue}if(n===KB.element){let t=e,n=ht(w(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&Mt(`for`,n)&&t.removeAttribute(`for`)}catch{}}let r=g(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},Pt=function(e){let t=null,r=null;if(ze)e=`<remove></remove>`+e;else{let t=tB(e,/^[\r\n\t ]+/);r=t&&t[0]}pt===`application/xhtml+xml`&&it===rt&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=T?ie(e):e;if(it===rt)try{t=new l().parseFromString(i,pt)}catch{}if(!t||!t.documentElement){t=ce.createDocument(it,`template`,null);try{t.documentElement.innerHTML=at?ee:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),it===rt?de.call(t,Fe?`html`:`body`)[0]:Fe?t.documentElement:a},Ft=function(e){let t=S?S(e):e.ownerDocument;return le.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},It=function(e){return e=nB(e,me,` `),e=nB(e,he,` `),e=nB(e,ge,` `),e},Lt=function(e){e.normalize();let t=S?S(e):e.ownerDocument,n=le.call(t||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=It(r.data),r=n.nextNode();let i=e.querySelectorAll?.call(e,`template`);i&&qz(i,e=>{zt(e.content)&&Lt(e.content)})},Rt=function(e){let t=x?x(e):null;return typeof t!=`string`||ht(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==y(e)||typeof e.removeAttribute!=`function`||typeof e.removeAttributeNode!=`function`||typeof e.getAttributeNode!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==b(e)||e.childNodes!==g(e)},zt=function(e){if(!b||typeof e!=`object`||!e)return!1;try{return b(e)===KB.documentFragment}catch{return!1}},Bt=function(e){if(!b||typeof e!=`object`||!e)return!1;try{return typeof b(e)==`number`}catch{return!1}};function Vt(e,n,r){e.length!==0&&qz(e,e=>{e.call(t,n,r,gt)})}let Ht=function(e,t){return!!(Pe&&e.hasChildNodes()&&!Bt(e.firstElementChild)&&dB(HB,e.textContent)&&dB(HB,e.innerHTML)||Pe&&e.namespaceURI===rt&&JB[t]&&(Bt(e.firstElementChild)||typeof e.textContent==`string`&&dB(YB[t],e.textContent))||e.nodeType===KB.processingInstruction||Pe&&e.nodeType===KB.comment&&dB(UB,e.data))},Ut=function(e,t){return e instanceof RegExp?dB(e,t):e instanceof Function&&!!e(t,...[...arguments].slice(2))},Wt=function(e,t,n){if(!Ee[t]&&Xt(t)&&Ut(Te.tagNameCheck,t))return!1;if(Ke&&!Ye[t]){let t=_(e),r=g(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,h(e))}}}return Et(e),!0},Gt=function(e,t,n,r){return e.length===0?t:t===n||t===r?_B(t):t},Kt=function(e,t){return e===t||_(e)!==null?!1:(qe&&jt(e),!0)},qt=function(e,n){if(Vt(pe.beforeSanitizeElements,e,null),Kt(e,n))return!0;if(Rt(e))return Et(e),!0;let r=ht(w(e));if(O=Gt(pe.uponSanitizeElement,O,Se,Le),Vt(pe.uponSanitizeElement,e,{tagName:r,allowedTags:O}),Kt(e,n))return!0;if(Ht(e,r))return Et(e),!0;if(Ee[r]||!(Oe.tagCheck instanceof Function&&Oe.tagCheck(r))&&!O[r]){let t=Wt(e,r,n);return t===!1&&(Vt(pe.afterSanitizeElements,e,null),Kt(e,n))?!0:t}if(C(e)===KB.element&&!Tt(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&dB(WB,e.innerHTML))return Et(e),!0;if(Ne&&e.nodeType===KB.text){let n=It(e.textContent);e.textContent!==n&&(Xz(t.removed,{element:e.cloneNode()}),e.textContent=n)}return Vt(pe.afterSanitizeElements,e,null),Kt(e,n)},Jt=function(e,t,r){if(De[t]||Mt(t,e)||Ue&&(t===`id`||t===`name`)&&(r in n||r in _t))return!1;let i=Ce[t]||Oe.attributeCheck instanceof Function&&Oe.attributeCheck(t,e);return Ae&&dB(_e,t)||ke&&dB(ve,t)?!0:i?$e[t]||dB(D,nB(r,be,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&rB(r,`data:`)===0&&Ze[e]||je&&!dB(ye,nB(r,be,``))?!0:!r:Xt(e)&&Ut(Te.tagNameCheck,e)&&Ut(Te.attributeNameCheck,t,e)||t===`is`&&Te.allowCustomizedBuiltInElements&&Ut(Te.tagNameCheck,r)},Yt=hB({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Xt=function(e){return!Yt[$z(e)]&&dB(xe,e)},Zt=function(e,t,n,r){if(T&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return ie(r);case`TrustedScriptURL`:return ae(r)}return r},Qt=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),!Rt(e)||(Et(e),!1)}catch{return kt(t,e),!1}},$t=function(e,n){if(Vt(pe.beforeSanitizeAttributes,e,null),Kt(e,n))return;let r=e.attributes;if(!r||Rt(e))return;Ce=Gt(pe.uponSanitizeAttribute,Ce,we,Re);let i={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:Ce,forceKeepAttr:void 0},a=r.length,o=ht(e.nodeName);for(;a--;){let n=r[a],s=n.name,c=n.namespaceURI,l=n.value,u=ht(s),d=l,f=s===`value`?d:iB(d),p=!1;i.attrName=u,i.attrValue=f,i.keepAttr=!0,i.forceKeepAttr=void 0,Vt(pe.uponSanitizeAttribute,e,i),f=i.attrValue,We&&(u===`id`||u===`name`)&&rB(f,Ge)!==0&&(kt(s,e,n),f=Ge+f,p=!0),Pe&&dB(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)||u===`attributename`&&tB(f,`href`)?kt(s,e,n):i.forceKeepAttr||(i.keepAttr?!Me&&dB(GB,f)?kt(s,e,n):(Ne&&(f=It(f)),Jt(o,u,f)?(f=Zt(o,u,c,f),f!==d&&Qt(e,s,c,f)&&p&&Yz(t.removed)):kt(s,e,n)):kt(s,e,n))}Vt(pe.afterSanitizeAttributes,e,null),Kt(e,n)},en=function(e){let t=null,n=Ft(e);for(Vt(pe.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(Vt(pe.uponSanitizeShadowNode,t,null),qt(t,e),$t(t,e),zt(t.content)&&en(t.content),C(t)===KB.element){let e=v(t);zt(e)&&(tn(e),en(e))}Vt(pe.afterSanitizeShadowDOM,e,null)},tn=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){en(e.shadow);continue}let n=e.node,r=C(n)===KB.element,i=g(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=x?x(n):null;if(typeof e==`string`&&ht(e)===`template`){let e=n.content;zt(e)&&t.push({node:e,shadow:null})}}if(r){let e=v(n);zt(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(at=!e,at&&(e=`<!-->`),typeof e!=`string`&&!Bt(e)&&(e=vB(e),typeof e!=`string`))throw fB(`dirty is not a string, aborting`);if(!t.isSupported)return e;Ie?(O=Le,Ce=Re):yt(n),(pe.uponSanitizeElement.length>0||pe.uponSanitizeAttribute.length>0)&&(O=_B(O)),pe.uponSanitizeAttribute.length>0&&(Ce=_B(Ce)),t.removed=[];let c=qe&&typeof e!=`string`&&Bt(e);if(c){Nt(e);let t=w(e);if(typeof t==`string`){let n=ht(t);if(!O[n]||Ee[n])throw Ot(e),fB(`root node is forbidden and cannot be sanitized in-place`)}if(Rt(e))throw Ot(e),fB(`root node is clobbered and cannot be sanitized in-place`);try{tn(e)}catch(t){throw Ot(e),t}}else if(Bt(e))i=Pt(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===KB.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),tn(i);else{if(!Be&&!Ne&&!Fe&&e.indexOf(`<`)===-1)return T&&He?ie(e):e;if(i=Pt(e),!i)return Be?null:He?ee:``}i&&ze&&Et(i.firstChild);let l=c?e:i;try{let e=Ft(l);for(;o=e.nextNode();)qt(o,l),$t(o,l),zt(o.content)&&en(o.content)}catch(n){throw c&&(Ot(e),qz(t.removed,e=>{e.element&&jt(e.element)})),n}if(c){let n=!1;if(qz(t.removed,t=>{t.element&&(t.element===e&&(n=!0),jt(t.element))}),n)throw fB(`a node selected for removal could not be safely returned; refusing to sanitize in place`);return Ne&&Lt(e),e}if(Be){if(Ne&&Lt(i),Ve)for(s=ue.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(Ce.shadowroot||Ce.shadowrootmode)&&(s=fe.call(r,s,!0)),s}let u=Fe?i.outerHTML:i.innerHTML;return Fe&&O[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&dB(BB,i.ownerDocument.doctype.name)&&(u=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
127
|
+
`+u),Ne&&(u=It(u)),T&&He?ie(u):u},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};yt(e),Ie=!0,Le=O,Re=Ce},t.clearConfig=function(){gt=null,Ie=!1,Le=null,Re=null,T=te,ee=``},t.isValidAttribute=function(e,t,n){gt||yt({});let r=ht(e),i=ht(t);return Jt(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&lB(pe,e)&&Xz(pe[e],t)},t.removeHook=function(e,t){if(lB(pe,e)){if(t!==void 0){let n=Jz(pe[e],t);return n===-1?void 0:Zz(pe[e],n,1)[0]}return Yz(pe[e])}},t.removeHooks=function(e){lB(pe,e)&&(pe[e]=[])},t.removeAllHooks=function(){pe=QB()},t}var nV=tV(),rV=l(o(((e,t)=>{function n(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw Error(`map is read-only`)}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw Error(`set is read-only`)}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{let r=e[t],i=typeof r;(i===`object`||i===`function`)&&!Object.isFrozen(r)&&n(r)}),e}var r=class{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function i(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}function a(e,...t){let n=Object.create(null);for(let t in e)n[t]=e[t];return t.forEach(function(e){for(let t in e)n[t]=e[t]}),n}var o=`</span>`,s=e=>!!e.scope,c=(e,{prefix:t})=>{if(e.startsWith(`language:`))return e.replace(`language:`,`language-`);if(e.includes(`.`)){let n=e.split(`.`);return[`${t}${n.shift()}`,...n.map((e,t)=>`${e}${`_`.repeat(t+1)}`)].join(` `)}return`${t}${e}`},l=class{constructor(e,t){this.buffer=``,this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=i(e)}openNode(e){if(!s(e))return;let t=c(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){s(e)&&(this.buffer+=o)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}},u=(e={})=>{let t={children:[]};return Object.assign(t,e),t},d=class e{constructor(){this.rootNode=u(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){let t=u({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return typeof t==`string`?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(t=>this._walk(e,t)),e.closeNode(t)),e}static _collapse(t){typeof t!=`string`&&t.children&&(t.children.every(e=>typeof e==`string`)?t.children=[t.children.join(``)]:t.children.forEach(t=>{e._collapse(t)}))}},f=class extends d{constructor(e){super(),this.options=e}addText(e){e!==``&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){let n=e.root;t&&(n.scope=`language:${t}`),this.add(n)}toHTML(){return new l(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function p(e){return e?typeof e==`string`?e:e.source:null}function m(e){return _(`(?=`,e,`)`)}function h(e){return _(`(?:`,e,`)*`)}function g(e){return _(`(?:`,e,`)?`)}function _(...e){return e.map(e=>p(e)).join(``)}function v(e){let t=e[e.length-1];return typeof t==`object`&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function y(...e){return`(`+(v(e).capture?``:`?:`)+e.map(e=>p(e)).join(`|`)+`)`}function b(e){return RegExp(e.toString()+`|`).exec(``).length-1}function x(e,t){let n=e&&e.exec(t);return n&&n.index===0}var S=new RegExp(y(/\[(?:[^\\\]]|\\.)*\]/,/\(\?<(?![=!])[^>]+>/,/\(\?'[^']+'/,/\(\??/,/\\([1-9][0-9]*)/,/\\./));function C(e,{joinWith:t}){let n=0;return e.map(e=>{n+=1;let t=n,r=p(e),i=``;for(;r.length>0;){let e=S.exec(r);if(!e){i+=r;break}i+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),e[0][0]===`\\`&&e[1]?i+=`\\`+String(Number(e[1])+t):(i+=e[0],(e[0]===`(`||/^\(\?[<']/.test(e[0]))&&n++)}return i}).map(e=>`(${e})`).join(t)}var w=/\b\B/,T=`[a-zA-Z]\\w*`,ee=`[a-zA-Z_]\\w*`,te=`\\b\\d+(\\.\\d+)?`,ne=`(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)`,re=`\\b(0b[01]+)`,E=`!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~`,ie=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=_(t,/.*\b/,e.binary,/\b.*/)),a({scope:`meta`,begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{e.index!==0&&t.ignoreMatch()}},e)},ae={begin:`\\\\[\\s\\S]`,relevance:0},oe={scope:`string`,begin:`'`,end:`'`,illegal:`\\n`,contains:[ae]},se={scope:`string`,begin:`"`,end:`"`,illegal:`\\n`,contains:[ae]},ce={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},le=function(e,t,n={}){let r=a({scope:`comment`,begin:e,end:t,contains:[]},n);r.contains.push({scope:`doctag`,begin:`[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)`,end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let i=y(`I`,`a`,`is`,`so`,`us`,`to`,`at`,`if`,`in`,`it`,`on`,/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:_(/[ ]+/,`(`,i,/[.]?[:]?([.][ ]|[ ])/,`){3}`)}),r},ue=le(`//`,`$`),de=le(`/\\*`,`\\*/`),fe=le(`#`,`$`),pe=Object.freeze({__proto__:null,APOS_STRING_MODE:oe,BACKSLASH_ESCAPE:ae,BINARY_NUMBER_MODE:{scope:`number`,begin:re,relevance:0},BINARY_NUMBER_RE:re,COMMENT:le,C_BLOCK_COMMENT_MODE:de,C_LINE_COMMENT_MODE:ue,C_NUMBER_MODE:{scope:`number`,begin:ne,relevance:0},C_NUMBER_RE:ne,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})},HASH_COMMENT_MODE:fe,IDENT_RE:T,MATCH_NOTHING_RE:w,METHOD_GUARD:{begin:`\\.\\s*[a-zA-Z_]\\w*`,relevance:0},NUMBER_MODE:{scope:`number`,begin:te,relevance:0},NUMBER_RE:te,PHRASAL_WORDS_MODE:ce,QUOTE_STRING_MODE:se,REGEXP_MODE:{scope:`regexp`,begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[ae,{begin:/\[/,end:/\]/,relevance:0,contains:[ae]}]},RE_STARTERS_RE:E,SHEBANG:ie,TITLE_MODE:{scope:`title`,begin:T,relevance:0},UNDERSCORE_IDENT_RE:ee,UNDERSCORE_TITLE_MODE:{scope:`title`,begin:ee,relevance:0}});function me(e,t){e.input[e.index-1]===`.`&&t.ignoreMatch()}function he(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function ge(e,t){t&&e.beginKeywords&&(e.begin=`\\b(`+e.beginKeywords.split(` `).join(`|`)+`)(?!\\.)(?=\\b|\\s)`,e.__beforeBegin=me,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function _e(e,t){Array.isArray(e.illegal)&&(e.illegal=y(...e.illegal))}function ve(e,t){if(e.match){if(e.begin||e.end)throw Error(`begin & end are not supported with match`);e.begin=e.match,delete e.match}}function ye(e,t){e.relevance===void 0&&(e.relevance=1)}var be=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw Error(`beforeMatch cannot be used with starts`);let n=Object.assign({},e);Object.keys(e).forEach(t=>{delete e[t]}),e.keywords=n.keywords,e.begin=_(n.beforeMatch,m(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},xe=[`of`,`and`,`for`,`in`,`not`,`or`,`if`,`then`,`parent`,`list`,`value`],D=`keyword`;function O(e,t,n=D){let r=Object.create(null);return typeof e==`string`?i(n,e.split(` `)):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(n){Object.assign(r,O(e[n],t,n))}),r;function i(e,n){t&&(n=n.map(e=>e.toLowerCase())),n.forEach(function(t){let n=t.split(`|`);r[n[0]]=[e,Se(n[0],n[1])]})}}function Se(e,t){return t?Number(t):+!Ce(e)}function Ce(e){return xe.includes(e.toLowerCase())}var we={},Te=e=>{console.error(e)},Ee=(e,...t)=>{console.log(`WARN: ${e}`,...t)},De=(e,t)=>{we[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),we[`${e}/${t}`]=!0)},Oe=Error();function ke(e,t,{key:n}){let r=0,i=e[n],a={},o={};for(let e=1;e<=t.length;e++)o[e+r]=i[e],a[e+r]=!0,r+=b(t[e-1]);e[n]=o,e[n]._emit=a,e[n]._multi=!0}function Ae(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Te(`skip, excludeBegin, returnBegin not compatible with beginScope: {}`),Oe;if(typeof e.beginScope!=`object`||e.beginScope===null)throw Te(`beginScope must be object`),Oe;ke(e,e.begin,{key:`beginScope`}),e.begin=C(e.begin,{joinWith:``})}}function je(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Te(`skip, excludeEnd, returnEnd not compatible with endScope: {}`),Oe;if(typeof e.endScope!=`object`||e.endScope===null)throw Te(`endScope must be object`),Oe;ke(e,e.end,{key:`endScope`}),e.end=C(e.end,{joinWith:``})}}function Me(e){e.scope&&typeof e.scope==`object`&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function Ne(e){Me(e),typeof e.beginScope==`string`&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope==`string`&&(e.endScope={_wrap:e.endScope}),Ae(e),je(e)}function Pe(e){function t(t,n){return new RegExp(p(t),`m`+(e.case_insensitive?`i`:``)+(e.unicodeRegex?`u`:``)+(n?`g`:``))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=b(e)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let e=this.regexes.map(e=>e[1]);this.matcherRe=t(C(e,{joinWith:`|`}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;let t=this.matcherRe.exec(e);if(!t)return null;let n=t.findIndex((e,t)=>t>0&&e!==void 0),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];let t=new n;return this.rules.slice(e).forEach(([e,n])=>t.addRule(e,n)),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),t.type===`begin`&&this.count++}exec(e){let t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition()&&!(n&&n.index===this.lastIndex)){let t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}function i(e){let t=new r;return e.contains.forEach(e=>t.addRule(e.begin,{rule:e,type:`begin`})),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:`end`}),e.illegal&&t.addRule(e.illegal,{type:`illegal`}),t}function o(n,r){let a=n;if(n.isCompiled)return a;[he,ve,Ne,be].forEach(e=>e(n,r)),e.compilerExtensions.forEach(e=>e(n,r)),n.__beforeBegin=null,[ge,_e,ye].forEach(e=>e(n,r)),n.isCompiled=!0;let s=null;return typeof n.keywords==`object`&&n.keywords.$pattern&&(n.keywords=Object.assign({},n.keywords),s=n.keywords.$pattern,delete n.keywords.$pattern),s||=/\w+/,n.keywords&&=O(n.keywords,e.case_insensitive),a.keywordPatternRe=t(s,!0),r&&(n.begin||=/\B|\b/,a.beginRe=t(a.begin),!n.end&&!n.endsWithParent&&(n.end=/\B|\b/),n.end&&(a.endRe=t(a.end)),a.terminatorEnd=p(a.end)||``,n.endsWithParent&&r.terminatorEnd&&(a.terminatorEnd+=(n.end?`|`:``)+r.terminatorEnd)),n.illegal&&(a.illegalRe=t(n.illegal)),n.contains||=[],n.contains=[].concat(...n.contains.map(function(e){return Ie(e===`self`?n:e)})),n.contains.forEach(function(e){o(e,a)}),n.starts&&o(n.starts,r),a.matcher=i(a),a}if(e.compilerExtensions||=[],e.contains&&e.contains.includes(`self`))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=a(e.classNameAliases||{}),o(e)}function Fe(e){return e?e.endsWithParent||Fe(e.starts):!1}function Ie(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return a(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:Fe(e)?a(e,{starts:e.starts?a(e.starts):null}):Object.isFrozen(e)?a(e):e}var Le=`11.12.0`,Re=class extends Error{constructor(e,t){super(e),this.name=`HTMLInjectionError`,this.html=t}},ze=i,Be=a,Ve=Symbol(`nomatch`),He=7,Ue=function(e){let t=Object.create(null),i=Object.create(null),a=[],o=!0,s=`Could not find the language '{}', did you forget to load/include a language module?`,c={disableAutodetect:!0,name:`Plain text`,contains:[]},l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:`hljs-`,cssSelector:`pre code`,languages:null,__emitter:f};function u(e){return l.noHighlightRe.test(e)}function d(e){let t=e.className+` `;t+=e.parentNode?e.parentNode.className:``;let n=l.languageDetectRe.exec(t);if(n){let t=oe(n[1]);return t||(Ee(s.replace(`{}`,n[1])),Ee(`Falling back to no-highlight mode for this block.`,e)),t?n[1]:`no-highlight`}return t.split(/\s+/).find(e=>u(e)||oe(e))}function p(e,t,n){let r=``,i=``;typeof t==`object`?(r=e,n=t.ignoreIllegals,i=t.language):(De(`10.7.0`,`highlight(lang, code, ...args) has been deprecated.`),De(`10.7.0`,`Please use highlight(code, options) instead.
|
|
128
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),i=e,r=t),n===void 0&&(n=!0);let a={code:r,language:i};fe(`before:highlight`,a);let o=a.result?a.result:v(a.language,a.code,n);return o.code=a.code,fe(`after:highlight`,o),o}function v(e,n,i,a){let c=Object.create(null);function u(e,t){return e.keywords[t]}function d(){if(!E.keywords){ae.addText(se);return}let e=0;E.keywordPatternRe.lastIndex=0;let t=E.keywordPatternRe.exec(se),n=``;for(;t;){n+=se.substring(e,t.index);let r=te.case_insensitive?t[0].toLowerCase():t[0],i=u(E,r);if(i){let[e,a]=i;if(ae.addText(n),n=``,c[r]=(c[r]||0)+1,c[r]<=He&&(ce+=a),e.startsWith(`_`))n+=t[0];else{let n=te.classNameAliases[e]||e;m(t[0],n)}}else n+=t[0];e=E.keywordPatternRe.lastIndex,t=E.keywordPatternRe.exec(se)}n+=se.substring(e),ae.addText(n)}function f(){if(se===``)return;let e=null;if(typeof E.subLanguage==`string`){if(!t[E.subLanguage]){ae.addText(se);return}e=v(E.subLanguage,se,!0,ie[E.subLanguage]),ie[E.subLanguage]=e._top}else e=S(se,E.subLanguage.length?E.subLanguage:null);E.relevance>0&&(ce+=e.relevance),ae.__addSublanguage(e._emitter,e.language)}function p(){E.subLanguage==null?d():f(),se=``}function m(e,t){e!==``&&(ae.startScope(t),ae.addText(e),ae.endScope())}function h(e,t){let n=1,r=t.length-1;for(;n<=r;){if(!e._emit[n]){n++;continue}let r=te.classNameAliases[e[n]]||e[n],i=t[n];r?m(i,r):(se=i,d(),se=``),n++}}function g(e,t){return e.scope&&typeof e.scope==`string`&&ae.openNode(te.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(m(se,te.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),se=``):e.beginScope._multi&&(h(e.beginScope,t),se=``)),E=Object.create(e,{parent:{value:E}}),E}function _(e,t,n){let i=x(e.endRe,n);if(i){if(e[`on:end`]){let n=new r(e);e[`on:end`](t,n),n.isMatchIgnored&&(i=!1)}if(i){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return _(e.parent,t,n)}function y(e){return E.matcher.regexIndex===0?(se+=e[0],1):(de=!0,0)}function b(e){let t=e[0],n=e.rule,i=new r(n),a=[n.__beforeBegin,n[`on:begin`]];for(let n of a)if(n&&(n(e,i),i.isMatchIgnored))return y(t);return n.skip?se+=t:(n.excludeBegin&&(se+=t),p(),!n.returnBegin&&!n.excludeBegin&&(se=t)),g(n,e),n.returnBegin?0:t.length}function C(e){let t=e[0],r=n.substring(e.index),i=_(E,e,r);if(!i)return Ve;let a=E;E.endScope&&E.endScope._wrap?(p(),m(t,E.endScope._wrap)):E.endScope&&E.endScope._multi?(p(),h(E.endScope,e)):a.skip?se+=t:(a.returnEnd||a.excludeEnd||(se+=t),p(),a.excludeEnd&&(se=t));do E.scope&&ae.closeNode(),!E.skip&&!E.subLanguage&&(ce+=E.relevance),E=E.parent;while(E!==i.parent);return i.starts&&g(i.starts,e),a.returnEnd?0:t.length}function w(){let e=[];for(let t=E;t!==te;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach(e=>ae.openNode(e))}let T={};function ee(t,r){let a=r&&r[0];if(se+=t,a==null)return p(),0;if(T.type===`begin`&&r.type===`end`&&T.index===r.index&&a===``){if(se+=n.slice(r.index,r.index+1),!o){let t=Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=T.rule,t}return 1}if(T=r,r.type===`begin`)return b(r);if(r.type===`illegal`&&!i){let e=Error(`Illegal lexeme "`+a+`" for mode "`+(E.scope||`<unnamed>`)+`"`);throw e.mode=E,e}if(r.type===`end`){let e=C(r);if(e!==Ve)return e}if(r.type===`illegal`&&a===``)return r.index===n.length||(se+=`
|
|
129
|
+
`),1;if(ue>1e5&&ue>r.index*3)throw Error(`potential infinite loop, way more iterations than matches`);return se+=a,a.length}let te=oe(e);if(!te)throw Te(s.replace(`{}`,e)),Error(`Unknown language: "`+e+`"`);let ne=Pe(te),re=``,E=a||ne,ie={},ae=new l.__emitter(l);w();let se=``,ce=0,le=0,ue=0,de=!1;try{if(te.__emitTokens)te.__emitTokens(n,ae);else{for(E.matcher.considerAll();;){ue++,de?de=!1:E.matcher.considerAll(),E.matcher.lastIndex=le;let e=E.matcher.exec(n);if(!e)break;let t=ee(n.substring(le,e.index),e);le=e.index+t}ee(n.substring(le))}return ae.finalize(),re=ae.toHTML(),{language:e,value:re,relevance:ce,illegal:!1,_emitter:ae,_top:E}}catch(t){if(t.message&&t.message.includes(`Illegal`))return{language:e,value:ze(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:le,context:n.slice(le-100,le+100),mode:t.mode,resultSoFar:re},_emitter:ae};if(o)return{language:e,value:ze(n),illegal:!1,relevance:0,errorRaised:t,_emitter:ae,_top:E};throw t}}function b(e){let t={value:ze(e),illegal:!1,relevance:0,_top:c,_emitter:new l.__emitter(l)};return t._emitter.addText(e),t}function S(e,n){n=n||l.languages||Object.keys(t);let r=b(e),i=n.filter(oe).filter(ce).map(t=>v(t,e,!1));i.unshift(r);let[a,o]=i.sort((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(oe(e.language).supersetOf===t.language)return 1;if(oe(t.language).supersetOf===e.language)return-1}return 0}),s=a;return s.secondBest=o,s}function C(e,t,n){let r=t&&i[t]||n;e.classList.add(`hljs`),e.classList.add(`language-${r}`)}function w(e){let t=null,n=d(e);if(u(n))return;if(fe(`before:highlightElement`,{el:e,language:n}),e.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",e);return}if(e.children.length>0&&(l.ignoreUnescapedHTML||(console.warn(`One of your code blocks includes unescaped HTML. This is a potentially serious security risk.`),console.warn(`https://github.com/highlightjs/highlight.js/wiki/security`),console.warn(`The element with unescaped HTML:`),console.warn(e)),l.throwUnescapedHTML))throw new Re(`One of your code blocks includes unescaped HTML.`,e.innerHTML);t=e;let r=t.textContent,i=n?p(r,{language:n,ignoreIllegals:!0}):S(r);e.innerHTML=i.value,e.dataset.highlighted=`yes`,C(e,n,i.language),e.result={language:i.language,re:i.relevance,relevance:i.relevance},i.secondBest&&(e.secondBest={language:i.secondBest.language,relevance:i.secondBest.relevance}),fe(`after:highlightElement`,{el:e,result:i,text:r})}function T(e){l=Be(l,e)}let ee=()=>{re(),De(`10.6.0`,`initHighlighting() deprecated. Use highlightAll() now.`)};function te(){re(),De(`10.6.0`,`initHighlightingOnLoad() deprecated. Use highlightAll() now.`)}let ne=!1;function re(){function e(){re()}document.readyState===`loading`?(ne||window.addEventListener(`DOMContentLoaded`,e,!1),ne=!0):document.querySelectorAll(l.cssSelector).forEach(w)}function E(n,r){let i=null;try{i=r(e)}catch(e){if(Te(`Language definition for '{}' could not be registered.`.replace(`{}`,n)),o)Te(e);else throw e;i=c}i.name||(i.name=n),t[n]=i,i.rawDefinition=r.bind(null,e),i.aliases&&se(i.aliases,{languageName:n})}function ie(e){delete t[e];for(let t of Object.keys(i))i[t]===e&&delete i[t]}function ae(){return Object.keys(t)}function oe(e){return e=(e||``).toLowerCase(),t[e]||t[i[e]]}function se(e,{languageName:t}){typeof e==`string`&&(e=[e]),e.forEach(e=>{i[e.toLowerCase()]=t})}function ce(e){let t=oe(e);return t&&!t.disableAutodetect}function le(e){e[`before:highlightBlock`]&&!e[`before:highlightElement`]&&(e[`before:highlightElement`]=t=>{e[`before:highlightBlock`](Object.assign({block:t.el},t))}),e[`after:highlightBlock`]&&!e[`after:highlightElement`]&&(e[`after:highlightElement`]=t=>{e[`after:highlightBlock`](Object.assign({block:t.el},t))})}function ue(e){le(e),a.push(e)}function de(e){let t=a.indexOf(e);t!==-1&&a.splice(t,1)}function fe(e,t){let n=e;a.forEach(function(e){e[n]&&e[n](t)})}function me(e){return De(`10.7.0`,`highlightBlock will be removed entirely in v12.0`),De(`10.7.0`,`Please use highlightElement now.`),w(e)}Object.assign(e,{highlight:p,highlightAuto:S,highlightAll:re,highlightElement:w,highlightBlock:me,configure:T,initHighlighting:ee,initHighlightingOnLoad:te,registerLanguage:E,unregisterLanguage:ie,listLanguages:ae,getLanguage:oe,registerAliases:se,autoDetection:ce,inherit:Be,addPlugin:ue,removePlugin:de}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=Le,e.regex={concat:_,lookahead:m,either:y,optional:g,anyNumberOfTimes:h};for(let e in pe)typeof pe[e]==`object`&&n(pe[e]);return Object.assign(e,pe),e},We=Ue({});We.newInstance=()=>Ue({}),t.exports=We,We.HighlightJS=We,We.default=We}))()).default;function iV(e){let t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:[`self`,{begin:/:-/,contains:[n]}]};Object.assign(n,{className:`variable`,variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,`(?![\\w\\d])(?![$])`)},r]});let i={className:`subst`,begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},a=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:`comment`}}),o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:`string`})]}},s={className:`string`,begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,i]};i.contains.push(s);let c={match:/\\"/},l={className:`string`,begin:/'/,end:/'/},u={match:/\\'/},d={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:`number`},e.NUMBER_MODE,n]},f=e.SHEBANG({binary:`(${[`fish`,`bash`,`zsh`,`sh`,`csh`,`ksh`,`tcsh`,`dash`,`scsh`].join(`|`)})`,relevance:10}),p={className:`function`,begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},m=[`if`,`then`,`else`,`elif`,`fi`,`time`,`for`,`while`,`until`,`in`,`do`,`done`,`case`,`esac`,`coproc`,`function`,`select`],h=[`true`,`false`],g={match:/(\/[a-z._-]+)+/},_=[`break`,`cd`,`continue`,`eval`,`exec`,`exit`,`export`,`getopts`,`hash`,`pwd`,`readonly`,`return`,`shift`,`test`,`times`,`trap`,`umask`,`unset`],v=[`alias`,`bind`,`builtin`,`caller`,`command`,`declare`,`echo`,`enable`,`help`,`let`,`local`,`logout`,`mapfile`,`printf`,`read`,`readarray`,`source`,`sudo`,`type`,`typeset`,`ulimit`,`unalias`],y=`autoload.bg.bindkey.bye.cap.chdir.clone.comparguments.compcall.compctl.compdescribe.compfiles.compgroups.compquote.comptags.comptry.compvalues.dirs.disable.disown.echotc.echoti.emulate.fc.fg.float.functions.getcap.getln.history.integer.jobs.kill.limit.log.noglob.popd.print.pushd.pushln.rehash.sched.setcap.setopt.stat.suspend.ttyctl.unfunction.unhash.unlimit.unsetopt.vared.wait.whence.where.which.zcompile.zformat.zftp.zle.zmodload.zparseopts.zprof.zpty.zregexparse.zsocket.zstyle.ztcp`.split(`.`),b=`chcon.chgrp.chown.chmod.cp.dd.df.dir.dircolors.ln.ls.mkdir.mkfifo.mknod.mktemp.mv.realpath.rm.rmdir.shred.sync.touch.truncate.vdir.b2sum.base32.base64.cat.cksum.comm.csplit.cut.expand.fmt.fold.head.join.md5sum.nl.numfmt.od.paste.ptx.pr.sha1sum.sha224sum.sha256sum.sha384sum.sha512sum.shuf.sort.split.sum.tac.tail.tr.tsort.unexpand.uniq.wc.arch.basename.chroot.date.dirname.du.echo.env.expr.factor.groups.hostid.id.link.logname.nice.nohup.nproc.pathchk.pinky.printenv.printf.pwd.readlink.runcon.seq.sleep.stat.stdbuf.stty.tee.test.timeout.tty.uname.unlink.uptime.users.who.whoami.yes`.split(`.`);return{name:`Bash`,aliases:[`sh`,`zsh`],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:m,literal:h,built_in:[..._,...v,`set`,`shopt`,...y,...b]},contains:[f,e.SHEBANG(),p,d,a,o,g,s,c,l,u,n]}}function aV(e){let t=e.regex;return{name:`Diff`,aliases:[`patch`],contains:[{className:`meta`,relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^@@ +-\d+ +\+\d+,\d+ +@@/,/^@@ +-\d+,\d+ +\+\d+ +@@/,/^@@ +-\d+ +\+\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:`comment`,variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:`addition`,begin:/^\+/,end:/$/},{className:`deletion`,begin:/^-/,end:/$/},{className:`addition`,begin:/^!/,end:/$/}]}}var oV=`[A-Za-z$_][0-9A-Za-z$_]*`,sV=`as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using`.split(`.`),cV=[`true`,`false`,`null`,`undefined`,`NaN`,`Infinity`],lV=`Object.Function.Boolean.Symbol.Math.Date.Number.BigInt.String.RegExp.Array.Float32Array.Float64Array.Int8Array.Uint8Array.Uint8ClampedArray.Int16Array.Int32Array.Uint16Array.Uint32Array.BigInt64Array.BigUint64Array.Set.Map.WeakSet.WeakMap.ArrayBuffer.SharedArrayBuffer.Atomics.DataView.JSON.Promise.Generator.GeneratorFunction.AsyncFunction.Reflect.Proxy.Intl.WebAssembly`.split(`.`),uV=[`Error`,`EvalError`,`InternalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],dV=[`setInterval`,`setTimeout`,`clearInterval`,`clearTimeout`,`require`,`exports`,`eval`,`isFinite`,`isNaN`,`parseFloat`,`parseInt`,`decodeURI`,`decodeURIComponent`,`encodeURI`,`encodeURIComponent`,`escape`,`unescape`],fV=[`arguments`,`this`,`super`,`console`,`window`,`document`,`localStorage`,`sessionStorage`,`module`,`self`,`global`],pV=[].concat(dV,lV,uV);function mV(e){let t=e.regex,n=(e,{after:t})=>{let n=`</`+e[0].slice(1);return e.input.indexOf(n,t)!==-1},r=oV,i={begin:`<>`,end:`</>`},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{let r=e[0].length+e.index,i=e.input[r];if(i===`<`||i===`,`){t.ignoreMatch();return}i===`>`&&(n(e,{after:r})||t.ignoreMatch());let a,o=e.input.substring(r);((a=o.match(/^\s*=/))||(a=o.match(/^\s+extends\s+/))&&a.index===0)&&t.ignoreMatch()}},s={$pattern:oV,keyword:sV,literal:cV,built_in:pV,"variable.language":fV},c=`[0-9](_?[0-9])*`,l=`\\.(${c})`,u=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,d={className:`number`,variants:[{begin:`(\\b(${u})((${l})|\\.)?|(${l}))[eE][+-]?(${c})\\b`},{begin:`\\b(${u})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:`\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b`},{begin:`\\b0[bB][0-1](_?[0-1])*n?\\b`},{begin:`\\b0[oO][0-7](_?[0-7])*n?\\b`},{begin:`\\b0[0-7]+n?\\b`}],relevance:0},f={className:`subst`,begin:`\\$\\{`,end:`\\}`,keywords:s,contains:[]},p={begin:".?html`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`xml`}},m={begin:".?css`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`css`}},h={begin:".?gql`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`graphql`}},g={className:`string`,begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},_={className:`comment`,variants:[e.COMMENT(/\/\*\*(?!\/)/,`\\*/`,{relevance:0,contains:[{begin:`(?=@[A-Za-z]+)`,relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`},{className:`type`,begin:`\\{`,end:`\\}`,excludeEnd:!0,excludeBegin:!0,relevance:0},{className:`variable`,begin:r+`(?=\\s*(-)|$)`,endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:s,contains:[`self`].concat(v)});let y=[].concat(_,f.contains),b=y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:[`self`].concat(y)}]),x={className:`params`,begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b},S={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,`(`,t.concat(/\./,r),`)*`)],scope:{1:`keyword`,3:`title.class`,5:`keyword`,7:`title.class.inherited`}},{match:[/class/,/\s+/,r],scope:{1:`keyword`,3:`title.class`}}]},C={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:`title.class`,keywords:{_:[...lV,...uV]}},w={label:`use_strict`,className:`meta`,relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},T={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:`keyword`,3:`title.function`},label:`func.def`,contains:[x],illegal:/%/},ee={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:`variable.constant`};function te(e){return t.concat(`(?!`,e.join(`|`),`)`)}let ne={match:t.concat(/\b/,te([...dV,`super`,`import`,`await`].map(e=>`${e}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:`title.function`,relevance:0},re={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:`prototype`,className:`property`,relevance:0},E={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:`keyword`,3:`title.function`},contains:[{begin:/\(\)/},x]},ie=`(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|`+e.UNDERSCORE_IDENT_RE+`)\\s*=>`,ae={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(ie)],keywords:`async`,className:{1:`keyword`,3:`title.function`},contains:[x]};return{name:`JavaScript`,aliases:[`js`,`jsx`,`mjs`,`cjs`],keywords:s,exports:{PARAMS_CONTAINS:b,CLASS_REFERENCE:C},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:`shebang`,binary:`node`,relevance:5}),w,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,_,{match:/\$\d+/},d,C,{scope:`attr`,match:r+t.lookahead(`:`),relevance:0},ae,{begin:`(`+e.RE_STARTERS_RE+`|\\b(case|return|throw)\\b)\\s*`,keywords:`return throw case`,relevance:0,contains:[_,e.REGEXP_MODE,{className:`function`,begin:ie,returnBegin:!0,end:`\\s*=>`,contains:[{className:`params`,variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:`xml`,contains:[{begin:o.begin,end:o.end,skip:!0,contains:[`self`]}]}]},T,{beginKeywords:`while if switch catch for`},{begin:`\\b(?!function)`+e.UNDERSCORE_IDENT_RE+`\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{`,returnBegin:!0,label:`func.def`,contains:[x,e.inherit(e.TITLE_MODE,{begin:r,className:`title.function`})]},{match:/\.\.\./,relevance:0},re,{match:`\\$`+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:`title.function`},contains:[x]},ne,ee,S,E,{match:/\$[(.]/}]}}var hV={scope:`number`,match:`([-+]?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)|NaN|[-+]?Infinity`,relevance:0};function gV(e){let t={className:`attr`,begin:/(("(\\.|[^\\"\r\n])*")|('(\\.|[^\\'\r\n])*'))(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:`punctuation`,relevance:0},r=[`true`,`false`,`null`],i={scope:`literal`,beginKeywords:r.join(` `)};return{name:`JSON`,aliases:[`jsonc`,`json5`],keywords:{literal:r},contains:[t,n,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,hV,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:`\\S`}}function _V(e){let t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:`>`,subLanguage:`xml`,relevance:0},r={match:/^ {0,3}([-*_])[ \t]*(?:\1[ \t]*){2,}$/},i={className:`code`,variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:`(~{3,})[^~](.|\\n)*?\\1~*[ ]*`},{begin:"```",end:"```+[ ]*$"},{begin:`~~~`,end:`~~~+[ ]*$`},{begin:"`.+?`"},{begin:`(?=^( {4}|\\t))`,contains:[{begin:`^( {4}|\\t)`,end:`(\\n)$`}],relevance:0}]},a={className:`bullet`,begin:`^[ ]*([*+-]|(\\d+\\.))(?=\\s+)`,end:`\\s+`,excludeEnd:!0},o={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:`symbol`,begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:`link`,begin:/:\s*/,end:/$/,excludeBegin:!0}]},s={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:`string`,relevance:0,begin:`\\[`,end:`\\]`,excludeBegin:!0,returnEnd:!0},{className:`link`,relevance:0,begin:`\\]\\(`,end:`\\)`,excludeBegin:!0,excludeEnd:!0},{className:`symbol`,relevance:0,begin:`\\]\\[`,end:`\\]`,excludeBegin:!0,excludeEnd:!0}]},c={className:`strong`,contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},l={className:`emphasis`,contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},u=e.inherit(c,{contains:[]}),d=e.inherit(l,{contains:[]});c.contains.push(d),l.contains.push(u);let f=[n,s];return[c,l,u,d].forEach(e=>{e.contains=e.contains.concat(f)}),f=f.concat(c,l),{name:`Markdown`,aliases:[`md`,`mkdown`,`mkd`],contains:[{className:`section`,variants:[{begin:`^#{1,6}`,end:`$`,contains:f},{begin:`(?=^.+?\\n[=-]{2,}$)`,contains:[{begin:`^[=-]*$`},{begin:`^`,end:`\\n`,contains:f}]}]},n,a,r,c,l,{className:`quote`,begin:`^>\\s+`,contains:f,end:`$`},i,s,o,{scope:`literal`,match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function vV(e){let t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=`and.as.assert.async.await.break.case.class.continue.def.del.elif.else.except.finally.for.from.global.if.import.in.is.lambda.lazy.match.nonlocal|10.not.or.pass.raise.return.try.while.with.yield`.split(`.`),i={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:`__import__.abs.aiter.all.anext.any.ascii.bin.bool.breakpoint.bytearray.bytes.callable.chr.classmethod.compile.complex.delattr.dict.dir.divmod.enumerate.eval.exec.filter.float.format.frozendict.frozenset.getattr.globals.hasattr.hash.help.hex.id.input.int.isinstance.issubclass.iter.len.list.locals.map.max.memoryview.min.next.object.oct.open.ord.pow.print.property.range.repr.reversed.round.sentinel.set.setattr.slice.sorted.staticmethod.str.sum.super.tuple.type.vars.zip`.split(`.`),literal:[`__debug__`,`Ellipsis`,`False`,`None`,`NotImplemented`,`True`],type:[`Any`,`Callable`,`Coroutine`,`Dict`,`List`,`Literal`,`Generic`,`Optional`,`Sequence`,`Set`,`Tuple`,`Type`,`Union`]},a={className:`meta`,begin:/^(>>>|\.\.\.) /},o={className:`subst`,begin:/\{/,end:/\}/,keywords:i,illegal:/#/},s={begin:/\{\{/,relevance:0},c={className:`string`,contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a,s,o]},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a,s,o]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,s,o]},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s,o]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},l=`[0-9](_?[0-9])*`,u=`(\\b(${l}))?\\.(${l})|\\b(${l})\\.`,d=`\\b|${r.join(`|`)}`,f={className:`number`,relevance:0,variants:[{begin:`(\\b(${l})|(${u}))[eE][+-]?(${l})[jJ]?(?=${d})`},{begin:`(${u})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${d})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${d})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${d})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${d})`},{begin:`\\b(${l})[jJ](?=${d})`}]},p={className:`comment`,begin:t.lookahead(/# type:/),end:/$/,keywords:i,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},m={className:`params`,variants:[{className:``,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,contains:[`self`,a,f,c,e.HASH_COMMENT_MODE]}]};return o.contains=[c,f,a],{name:`Python`,aliases:[`py`,`gyp`,`ipython`],unicodeRegex:!0,keywords:i,illegal:/(<\/|\?)|=>/,contains:[a,f,{scope:`variable.language`,match:/\bself\b/},{beginKeywords:`if`,relevance:0},{match:/\bor\b/,scope:`keyword`},c,p,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:`keyword`,3:`title.function`},contains:[m]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:`keyword`,3:`title.class`,6:`title.class.inherited`}},{className:`meta`,begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[f,m,c]}]}}var yV=`[A-Za-z$_][0-9A-Za-z$_]*`,bV=`as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using`.split(`.`),xV=[`true`,`false`,`null`,`undefined`,`NaN`,`Infinity`],SV=`Object.Function.Boolean.Symbol.Math.Date.Number.BigInt.String.RegExp.Array.Float32Array.Float64Array.Int8Array.Uint8Array.Uint8ClampedArray.Int16Array.Int32Array.Uint16Array.Uint32Array.BigInt64Array.BigUint64Array.Set.Map.WeakSet.WeakMap.ArrayBuffer.SharedArrayBuffer.Atomics.DataView.JSON.Promise.Generator.GeneratorFunction.AsyncFunction.Reflect.Proxy.Intl.WebAssembly`.split(`.`),CV=[`Error`,`EvalError`,`InternalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],wV=[`setInterval`,`setTimeout`,`clearInterval`,`clearTimeout`,`require`,`exports`,`eval`,`isFinite`,`isNaN`,`parseFloat`,`parseInt`,`decodeURI`,`decodeURIComponent`,`encodeURI`,`encodeURIComponent`,`escape`,`unescape`],TV=[`arguments`,`this`,`super`,`console`,`window`,`document`,`localStorage`,`sessionStorage`,`module`,`self`,`global`],EV=[].concat(wV,SV,CV);function DV(e){let t=e.regex,n=(e,{after:t})=>{let n=`</`+e[0].slice(1);return e.input.indexOf(n,t)!==-1},r=yV,i={begin:`<>`,end:`</>`},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{let r=e[0].length+e.index,i=e.input[r];if(i===`<`||i===`,`){t.ignoreMatch();return}i===`>`&&(n(e,{after:r})||t.ignoreMatch());let a,o=e.input.substring(r);((a=o.match(/^\s*=/))||(a=o.match(/^\s+extends\s+/))&&a.index===0)&&t.ignoreMatch()}},s={$pattern:yV,keyword:bV,literal:xV,built_in:EV,"variable.language":TV},c=`[0-9](_?[0-9])*`,l=`\\.(${c})`,u=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,d={className:`number`,variants:[{begin:`(\\b(${u})((${l})|\\.)?|(${l}))[eE][+-]?(${c})\\b`},{begin:`\\b(${u})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:`\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b`},{begin:`\\b0[bB][0-1](_?[0-1])*n?\\b`},{begin:`\\b0[oO][0-7](_?[0-7])*n?\\b`},{begin:`\\b0[0-7]+n?\\b`}],relevance:0},f={className:`subst`,begin:`\\$\\{`,end:`\\}`,keywords:s,contains:[]},p={begin:".?html`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`xml`}},m={begin:".?css`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`css`}},h={begin:".?gql`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`graphql`}},g={className:`string`,begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},_={className:`comment`,variants:[e.COMMENT(/\/\*\*(?!\/)/,`\\*/`,{relevance:0,contains:[{begin:`(?=@[A-Za-z]+)`,relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`},{className:`type`,begin:`\\{`,end:`\\}`,excludeEnd:!0,excludeBegin:!0,relevance:0},{className:`variable`,begin:r+`(?=\\s*(-)|$)`,endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:s,contains:[`self`].concat(v)});let y=[].concat(_,f.contains),b=y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:[`self`].concat(y)}]),x={className:`params`,begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b},S={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,`(`,t.concat(/\./,r),`)*`)],scope:{1:`keyword`,3:`title.class`,5:`keyword`,7:`title.class.inherited`}},{match:[/class/,/\s+/,r],scope:{1:`keyword`,3:`title.class`}}]},C={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:`title.class`,keywords:{_:[...SV,...CV]}},w={label:`use_strict`,className:`meta`,relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},T={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:`keyword`,3:`title.function`},label:`func.def`,contains:[x],illegal:/%/},ee={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:`variable.constant`};function te(e){return t.concat(`(?!`,e.join(`|`),`)`)}let ne={match:t.concat(/\b/,te([...wV,`super`,`import`,`await`].map(e=>`${e}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:`title.function`,relevance:0},re={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:`prototype`,className:`property`,relevance:0},E={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:`keyword`,3:`title.function`},contains:[{begin:/\(\)/},x]},ie=`(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|`+e.UNDERSCORE_IDENT_RE+`)\\s*=>`,ae={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(ie)],keywords:`async`,className:{1:`keyword`,3:`title.function`},contains:[x]};return{name:`JavaScript`,aliases:[`js`,`jsx`,`mjs`,`cjs`],keywords:s,exports:{PARAMS_CONTAINS:b,CLASS_REFERENCE:C},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:`shebang`,binary:`node`,relevance:5}),w,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,_,{match:/\$\d+/},d,C,{scope:`attr`,match:r+t.lookahead(`:`),relevance:0},ae,{begin:`(`+e.RE_STARTERS_RE+`|\\b(case|return|throw)\\b)\\s*`,keywords:`return throw case`,relevance:0,contains:[_,e.REGEXP_MODE,{className:`function`,begin:ie,returnBegin:!0,end:`\\s*=>`,contains:[{className:`params`,variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:`xml`,contains:[{begin:o.begin,end:o.end,skip:!0,contains:[`self`]}]}]},T,{beginKeywords:`while if switch catch for`},{begin:`\\b(?!function)`+e.UNDERSCORE_IDENT_RE+`\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{`,returnBegin:!0,label:`func.def`,contains:[x,e.inherit(e.TITLE_MODE,{begin:r,className:`title.function`})]},{match:/\.\.\./,relevance:0},re,{match:`\\$`+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:`title.function`},contains:[x]},ne,ee,S,E,{match:/\$[(.]/}]}}function OV(e){let t=e.regex,n=DV(e),r=yV,i=[`any`,`void`,`number`,`boolean`,`string`,`object`,`never`,`symbol`,`bigint`,`unknown`],a={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:`keyword`,3:`title.class`}},o={beginKeywords:`interface`,end:/\{/,excludeEnd:!0,keywords:{keyword:`interface extends`,built_in:i},contains:[n.exports.CLASS_REFERENCE]},s={className:`meta`,relevance:10,begin:/^\s*['"]use strict['"]/},c={$pattern:yV,keyword:bV.concat([`type`,`interface`,`public`,`private`,`protected`,`implements`,`declare`,`abstract`,`readonly`,`enum`,`override`,`satisfies`]),literal:xV,built_in:EV.concat(i),"variable.language":TV},l={className:`meta`,begin:`@`+r},u=(e,t,n)=>{let r=e.contains.findIndex(e=>e.label===t);if(r===-1)throw Error(`can not find mode to replace`);e.contains.splice(r,1,n)};Object.assign(n.keywords,c),n.exports.PARAMS_CONTAINS.push(l);let d=n.contains.find(e=>e.scope===`attr`),f=Object.assign({},d,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,d,f]),n.contains=n.contains.concat([l,a,o,f]),u(n,`shebang`,e.SHEBANG()),u(n,`use_strict`,s);let p=n.contains.find(e=>e.label===`func.def`);return p.relevance=0,Object.assign(n,{name:`TypeScript`,aliases:[`ts`,`tsx`,`mts`,`cts`]}),n}function kV(e){let t=`true false yes no null`,n=`[\\w#;/?:@&=+$,.~*'()[\\]]+`,r={className:`attr`,variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:`template-variable`,variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},a={className:`string`,relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:`char.escape`,relevance:0}]},o={className:`string`,relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,i]},s=e.inherit(o,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),c={className:`number`,begin:`\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b`},l={end:`,`,endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},u={begin:/\{/,end:/\}/,contains:[l],illegal:`\\n`,relevance:0},d={begin:`\\[`,end:`\\]`,contains:[l],illegal:`\\n`,relevance:0},f=[r,{className:`meta`,begin:`^---\\s*$`,relevance:10},{className:`string`,begin:`[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*`},{begin:`<%[%=-]?`,end:`[%-]?%>`,subLanguage:`ruby`,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:`type`,begin:`!\\w+!`+n},{className:`type`,begin:`!<`+n+`>`},{className:`type`,begin:`!`+n},{className:`type`,begin:`!!`+n},{className:`meta`,begin:`&`+e.UNDERSCORE_IDENT_RE+`$`},{className:`meta`,begin:`\\*`+e.UNDERSCORE_IDENT_RE+`$`},{className:`bullet`,begin:`-(?=[ ]|$)`,relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},c,{className:`number`,begin:e.C_NUMBER_RE+`\\b`,relevance:0},u,d,a,o],p=[...f];return p.pop(),p.push(s),l.contains=p,{name:`YAML`,case_insensitive:!0,aliases:[`yml`],contains:f}}rV.registerLanguage(`bash`,iV),rV.registerLanguage(`diff`,aV),rV.registerLanguage(`javascript`,mV),rV.registerLanguage(`json`,gV),rV.registerLanguage(`markdown`,_V),rV.registerLanguage(`python`,vV),rV.registerLanguage(`typescript`,OV),rV.registerLanguage(`yaml`,kV);var AV={shell:`bash`};function jV(e){if(e===void 0)return!1;let t=AV[e.trim().toLowerCase()]??e.trim().toLowerCase();return t!==``&&rV.getLanguage(t)!==void 0}function MV(e,t){let n=t===void 0?``:AV[t.trim().toLowerCase()]??t.trim().toLowerCase();if(n!==``&&rV.getLanguage(n)!==void 0)try{return rV.highlight(e,{language:n}).value}catch{}return NV(e)}function NV(e){return e.replaceAll(`&`,`&`).replaceAll(`<`,`<`).replaceAll(`>`,`>`).replaceAll(`"`,`"`)}var B=class e extends Error{constructor(t,n){var r=`KaTeX parse error: `+t,i,a,o=n&&n.loc;if(o&&o.start<=o.end){var s=o.lexer.input;i=o.start,a=o.end,i===s.length?r+=` at end of input: `:r+=` at position `+(i+1)+`: `;var c=s.slice(i,a).replace(/[^]/g,`$&̲`),l=i>15?`…`+s.slice(i-15,i):s.slice(0,i),u=a+15<s.length?s.slice(a,a+15)+`…`:s.slice(a);r+=l+c+u}super(r),this.name=`ParseError`,this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,e.prototype),this.position=i,i!=null&&a!=null&&(this.length=a-i),this.rawMessage=t}},PV=/([A-Z])/g,FV=e=>e.replace(PV,`-$1`).toLowerCase(),IV={"&":`&`,">":`>`,"<":`<`,'"':`"`,"'":`'`},LV=/[&><"']/g,RV=e=>String(e).replace(LV,e=>IV[e]),zV=e=>e.type===`ordgroup`||e.type===`color`?e.body.length===1?zV(e.body[0]):e:e.type===`font`?zV(e.body):e,BV=new Set([`mathord`,`textord`,`atom`]),VV=e=>BV.has(zV(e).type),HV=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?t[2]!==`:`||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():`_relative`},UV={displayMode:{type:`boolean`,description:`Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.`,cli:`-d, --display-mode`},output:{type:{enum:[`htmlAndMathml`,`html`,`mathml`]},description:`Determines the markup language of the output.`,cli:`-F, --format <type>`},leqno:{type:`boolean`,description:`Render display math in leqno style (left-justified tags).`},fleqn:{type:`boolean`,description:`Render display math flush left.`},throwOnError:{type:`boolean`,default:!0,cli:`-t, --no-throw-on-error`,cliDescription:`Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error.`},errorColor:{type:`string`,default:`#cc0000`,cli:`-c, --error-color <color>`,cliDescription:`A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.`,cliProcessor:e=>`#`+e},macros:{type:`object`,cli:`-m, --macro <def>`,cliDescription:`Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).`,cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:`number`,description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:`--min-rule-thickness <size>`,cliProcessor:parseFloat},colorIsTextColor:{type:`boolean`,description:`Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.`,cli:`-b, --color-is-text-color`},strict:{type:[{enum:[`warn`,`ignore`,`error`]},`boolean`,`function`],description:`Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.`,cli:`-S, --strict`,cliDefault:!1},trust:{type:[`boolean`,`function`],description:`Trust the input, enabling all HTML features such as \\url.`,cli:`-T, --trust`},maxSize:{type:`number`,default:1/0,description:`If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large`,processor:e=>Math.max(0,e),cli:`-s, --max-size <n>`,cliProcessor:parseInt},maxExpand:{type:`number`,default:1e3,description:`Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.`,processor:e=>Math.max(0,e),cli:`-e, --max-expand <n>`,cliProcessor:e=>e===`Infinity`?1/0:parseInt(e)},globalGroup:{type:`boolean`,cli:!1}};function WV(e){if(typeof e!=`string`)return e.enum[0];switch(e){case`boolean`:return!1;case`string`:return``;case`number`:return 0;case`object`:return{};default:throw Error(`Unexpected schema type; settings must declare an explicit default.`)}}function GV(e){return Object.prototype.hasOwnProperty.call(e,`default`)&&e.default!==void 0?e.default:WV(Array.isArray(e.type)?e.type[0]:e.type)}function KV(e,t,n,r){var i=Object.prototype.hasOwnProperty.call(n,t)?n[t]:void 0,a=Object.prototype.hasOwnProperty.call(r,`processor`)?r.processor:void 0;e[t]=i===void 0?GV(r):a?a(i):i}var qV=class{constructor(e){e===void 0&&(e={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e||={};for(var t of Object.keys(UV)){var n=UV[t];n&&KV(this,t,e,n)}}isTrusted(e){if(`url`in e&&e.url&&!e.protocol){var t=HV(e.url);if(t==null)return!1;e.protocol=t}return!!(typeof this.trust==`function`?this.trust(e):this.trust)}},JV=class{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return rH[iH[this.id]]}sub(){return rH[aH[this.id]]}fracNum(){return rH[oH[this.id]]}fracDen(){return rH[sH[this.id]]}cramp(){return rH[cH[this.id]]}text(){return rH[lH[this.id]]}isTight(){return this.size>=2}},YV=0,XV=1,ZV=2,QV=3,$V=4,eH=5,tH=6,nH=7,rH=[new JV(YV,0,!1),new JV(XV,0,!0),new JV(ZV,1,!1),new JV(QV,1,!0),new JV($V,2,!1),new JV(eH,2,!0),new JV(tH,3,!1),new JV(nH,3,!0)],iH=[$V,eH,$V,eH,tH,nH,tH,nH],aH=[eH,eH,eH,eH,nH,nH,nH,nH],oH=[ZV,QV,$V,eH,tH,nH,tH,nH],sH=[QV,QV,eH,eH,nH,nH,nH,nH],cH=[XV,XV,QV,QV,eH,eH,nH,nH],lH=[YV,XV,ZV,QV,ZV,QV,ZV,QV],uH={DISPLAY:rH[YV],TEXT:rH[ZV],SCRIPT:rH[$V],SCRIPTSCRIPT:rH[tH]},dH=[{name:`latin`,blocks:[[256,591],[768,879]]},{name:`cyrillic`,blocks:[[1024,1279]]},{name:`armenian`,blocks:[[1328,1423]]},{name:`brahmic`,blocks:[[2304,4255]]},{name:`georgian`,blocks:[[4256,4351]]},{name:`cjk`,blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:`hangul`,blocks:[[44032,55215]]}];function fH(e){for(var t=0;t<dH.length;t++)for(var n=dH[t],r=0;r<n.blocks.length;r++){var i=n.blocks[r];if(e>=i[0]&&e<=i[1])return n.name}return null}var pH=[];dH.forEach(e=>e.blocks.forEach(e=>pH.push(...e)));function mH(e){for(var t=0;t<pH.length;t+=2)if(e>=pH[t]&&e<=pH[t+1])return!0;return!1}var hH=e=>e+` `+e,gH=80,_H=function(e,t){return`M95,`+(622+e+t)+`
|
|
130
|
+
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
|
131
|
+
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
|
|
132
|
+
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
|
|
133
|
+
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
|
|
134
|
+
c69,-144,104.5,-217.7,106.5,-221
|
|
135
|
+
l`+e/2.075+` -`+e+`
|
|
136
|
+
c5.3,-9.3,12,-14,20,-14
|
|
137
|
+
H400000v`+(40+e)+`H845.2724
|
|
138
|
+
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
|
|
139
|
+
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
|
|
140
|
+
M`+(834+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},vH=function(e,t){return`M263,`+(601+e+t)+`c0.7,0,18,39.7,52,119
|
|
141
|
+
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
|
|
142
|
+
c340,-704.7,510.7,-1060.3,512,-1067
|
|
143
|
+
l`+e/2.084+` -`+e+`
|
|
144
|
+
c4.7,-7.3,11,-11,19,-11
|
|
145
|
+
H40000v`+(40+e)+`H1012.3
|
|
146
|
+
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
|
|
147
|
+
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
|
|
148
|
+
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
|
|
149
|
+
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
|
|
150
|
+
M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},yH=function(e,t){return`M983 `+(10+e+t)+`
|
|
151
|
+
l`+e/3.13+` -`+e+`
|
|
152
|
+
c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+`
|
|
153
|
+
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
|
|
154
|
+
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
|
|
155
|
+
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
|
|
156
|
+
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
|
|
157
|
+
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
|
|
158
|
+
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
|
|
159
|
+
M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},bH=function(e,t){return`M424,`+(2398+e+t)+`
|
|
160
|
+
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
|
|
161
|
+
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
|
|
162
|
+
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
|
|
163
|
+
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
|
|
164
|
+
l`+e/4.223+` -`+e+`c4,-6.7,10,-10,18,-10 H400000
|
|
165
|
+
v`+(40+e)+`H1014.6
|
|
166
|
+
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
|
|
167
|
+
c-2,6,-10,9,-24,9
|
|
168
|
+
c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+` `+t+`
|
|
169
|
+
h400000v`+(40+e)+`h-400000z`},xH=function(e,t){return`M473,`+(2713+e+t)+`
|
|
170
|
+
c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+` -`+e+`
|
|
171
|
+
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7
|
|
172
|
+
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
|
|
173
|
+
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
|
|
174
|
+
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
|
|
175
|
+
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
|
|
176
|
+
606zM`+(1001+e)+` `+t+`h400000v`+(40+e)+`H1017.7z`},SH=function(e){var t=e/2;return`M400000 `+e+` H0 L`+t+` 0 l65 45 L145 `+(e-80)+` H400000z`},CH=function(e,t,n){var r=n-54-t-e;return`M702 `+(e+t)+`H400000`+(40+e)+`
|
|
177
|
+
H742v`+r+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
|
|
178
|
+
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
|
|
179
|
+
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
|
|
180
|
+
219 661 l218 661zM702 `+t+`H400000v`+(40+e)+`H742z`},wH=function(e,t,n){t=1e3*t;var r=``;switch(e){case`sqrtMain`:r=_H(t,gH);break;case`sqrtSize1`:r=vH(t,gH);break;case`sqrtSize2`:r=yH(t,gH);break;case`sqrtSize3`:r=bH(t,gH);break;case`sqrtSize4`:r=xH(t,gH);break;case`sqrtTall`:r=CH(t,gH,n)}return r},TH=function(e,t){switch(e){case`⎜`:return hH(`M291 0 H417 V`+t+` H291z`);case`∣`:return hH(`M145 0 H188 V`+t+` H145z`);case`∥`:return hH(`M145 0 H188 V`+t+` H145z`)+hH(`M367 0 H410 V`+t+` H367z`);case`⎟`:return hH(`M457 0 H583 V`+t+` H457z`);case`⎢`:return hH(`M319 0 H403 V`+t+` H319z`);case`⎥`:return hH(`M263 0 H347 V`+t+` H263z`);case`⎪`:return hH(`M384 0 H504 V`+t+` H384z`);case`⏐`:return hH(`M312 0 H355 V`+t+` H312z`);case`‖`:return hH(`M257 0 H300 V`+t+` H257z`)+hH(`M478 0 H521 V`+t+` H478z`);default:return``}},EH={doubleleftarrow:`M262 157
|
|
181
|
+
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
|
|
182
|
+
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
|
|
183
|
+
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
|
|
184
|
+
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
|
|
185
|
+
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
|
|
186
|
+
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
|
|
187
|
+
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
|
|
188
|
+
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
|
|
189
|
+
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
|
|
190
|
+
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
|
|
191
|
+
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
|
|
192
|
+
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
|
|
193
|
+
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
|
|
194
|
+
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
|
|
195
|
+
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
|
|
196
|
+
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
|
|
197
|
+
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
|
|
198
|
+
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
|
|
199
|
+
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
|
|
200
|
+
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
|
|
201
|
+
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
|
|
202
|
+
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
|
|
203
|
+
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
|
|
204
|
+
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
|
|
205
|
+
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
|
|
206
|
+
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
|
|
207
|
+
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
|
|
208
|
+
435 0h399565z`,leftgroupunder:`M400000 262
|
|
209
|
+
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
|
|
210
|
+
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
|
|
211
|
+
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
|
|
212
|
+
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
|
|
213
|
+
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
|
|
214
|
+
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
|
|
215
|
+
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
|
|
216
|
+
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
|
|
217
|
+
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
|
|
218
|
+
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
|
|
219
|
+
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
|
|
220
|
+
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
|
|
221
|
+
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
|
|
222
|
+
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
|
|
223
|
+
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
|
|
224
|
+
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
|
|
225
|
+
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
|
|
226
|
+
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:hH(`M40 281 V428 H0 V94 H40 V241 H400000 v40z`),leftbracketunder:hH(`M0 0 h120 V290 H399995 v120 H0z`),leftbracketover:hH(`M0 440 h120 V150 H399995 v-120 H0z`),leftmapsto:hH(`M40 281 V448H0V74H40V241H400000v40z`),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
|
|
227
|
+
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
|
|
228
|
+
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
|
|
229
|
+
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:hH(`M0 50 h400000 v40H0z m0 194h40000v40H0z`),midbrace:`M200428 334
|
|
230
|
+
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
|
|
231
|
+
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
|
|
232
|
+
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
|
|
233
|
+
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
|
|
234
|
+
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
|
|
235
|
+
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
|
|
236
|
+
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
|
|
237
|
+
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
|
|
238
|
+
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
|
|
239
|
+
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
|
|
240
|
+
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
|
|
241
|
+
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
|
|
242
|
+
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
|
|
243
|
+
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
|
|
244
|
+
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
|
|
245
|
+
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
|
|
246
|
+
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
|
|
247
|
+
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
|
|
248
|
+
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
|
|
249
|
+
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
|
|
250
|
+
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
|
|
251
|
+
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
|
|
252
|
+
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
|
|
253
|
+
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
254
|
+
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
255
|
+
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
|
|
256
|
+
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
|
|
257
|
+
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
|
|
258
|
+
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
|
|
259
|
+
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
|
|
260
|
+
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
|
|
261
|
+
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
|
|
262
|
+
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
|
|
263
|
+
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
|
|
264
|
+
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
|
|
265
|
+
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
|
|
266
|
+
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
|
|
267
|
+
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
|
|
268
|
+
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
|
|
269
|
+
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
|
|
270
|
+
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
|
|
271
|
+
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
|
|
272
|
+
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
|
|
273
|
+
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
|
|
274
|
+
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
|
|
275
|
+
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
|
|
276
|
+
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
|
|
277
|
+
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
|
|
278
|
+
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:hH(`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`),rightbracketunder:hH(`M399995 0 h-120 V290 H0 v120 H400000z`),rightbracketover:hH(`M399995 440 h-120 V150 H0 v-120 H399995z`),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
|
|
279
|
+
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
|
|
280
|
+
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
|
|
281
|
+
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
|
|
282
|
+
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
|
|
283
|
+
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
|
|
284
|
+
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
|
|
285
|
+
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
|
|
286
|
+
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
|
|
287
|
+
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
|
|
288
|
+
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
|
|
289
|
+
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
|
|
290
|
+
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
|
|
291
|
+
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
|
|
292
|
+
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
|
|
293
|
+
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
|
|
294
|
+
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
|
|
295
|
+
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
|
|
296
|
+
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
|
|
297
|
+
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
|
|
298
|
+
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
|
|
299
|
+
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
|
|
300
|
+
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
|
|
301
|
+
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
|
|
302
|
+
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
|
|
303
|
+
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
|
|
304
|
+
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
|
|
305
|
+
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
|
|
306
|
+
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
|
|
307
|
+
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
|
|
308
|
+
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
|
|
309
|
+
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
|
|
310
|
+
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
|
|
311
|
+
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
|
|
312
|
+
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
|
|
313
|
+
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
|
|
314
|
+
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
315
|
+
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
316
|
+
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
317
|
+
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
|
|
318
|
+
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
319
|
+
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
320
|
+
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
321
|
+
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
|
|
322
|
+
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
|
|
323
|
+
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
|
|
324
|
+
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
|
|
325
|
+
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
|
|
326
|
+
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
|
|
327
|
+
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
|
|
328
|
+
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
|
|
329
|
+
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
|
|
330
|
+
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
|
|
331
|
+
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
|
|
332
|
+
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
333
|
+
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
334
|
+
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
335
|
+
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
|
|
336
|
+
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
|
|
337
|
+
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
|
|
338
|
+
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
|
|
339
|
+
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
|
|
340
|
+
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
341
|
+
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
342
|
+
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
343
|
+
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
344
|
+
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
|
|
345
|
+
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
|
|
346
|
+
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
|
|
347
|
+
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
|
|
348
|
+
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
349
|
+
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
350
|
+
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
351
|
+
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},DH=function(e,t){switch(e){case`lbrack`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v1759 v84 h347 v-84
|
|
352
|
+
H403z M403 1759 V0 H319 V1759 v`+t+` v1759 v84 h84z`;case`rbrack`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v1759 H0 v84 H347z
|
|
353
|
+
M347 1759 V0 H263 V1759 v`+t+` v1759 h84z`;case`vert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
|
|
354
|
+
c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
355
|
+
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z`;case`doublevert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
|
|
356
|
+
c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
357
|
+
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z
|
|
358
|
+
M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
|
|
359
|
+
c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
360
|
+
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+` v585 h43z`;case`lfloor`:return`M319 602 V0 H403 V602 v`+t+` v1715 h263 v84 H319z
|
|
361
|
+
MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`rfloor`:return`M319 602 V0 H403 V602 v`+t+` v1799 H0 v-84 H319z
|
|
362
|
+
MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`lceil`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v602 h84z
|
|
363
|
+
M403 1759 V0 H319 V1759 v`+t+` v602 h84z`;case`rceil`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v602 h84z
|
|
364
|
+
M347 1759 V0 h-84 V1759 v`+t+` v602 h84z`;case`lparen`:return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
|
|
365
|
+
c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
|
|
366
|
+
-36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
|
|
367
|
+
949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
|
|
368
|
+
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
|
|
369
|
+
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
|
|
370
|
+
l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
|
|
371
|
+
-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case`rparen`:return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
|
|
372
|
+
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
|
|
373
|
+
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+`
|
|
374
|
+
c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
|
|
375
|
+
c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
|
|
376
|
+
c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
|
|
377
|
+
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
|
|
378
|
+
l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
|
|
379
|
+
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw Error(`Unknown stretchy delimiter.`)}};function OH(e){return`toText`in e}var kH=class{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e=``,t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map(e=>{if(OH(e))return e.toText();throw Error(`Expected MathDomNode with toText, got `+e.constructor.name)}).join(``)}},AH={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},jH={ex:!0,em:!0,mu:!0},MH=function(e){return typeof e!=`string`&&(e=e.unit),e in AH||e in jH||e===`ex`},NH=function(e,t){var n;if(e.unit in AH)n=AH[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit===`mu`)n=t.fontMetrics().cssEmPerMu;else{var r=t.style.isTight()?t.havingStyle(t.style.text()):t;if(e.unit===`ex`)n=r.fontMetrics().xHeight;else if(e.unit===`em`)n=r.fontMetrics().quad;else throw new B(`Invalid unit: '`+e.unit+`'`);r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},V=function(e){return+e.toFixed(4)+`em`},PH=function(e){return e.filter(e=>e).join(` `)},FH=function(e){var t=``;for(var n of Object.keys(e)){var r=e[n];r!==void 0&&(t+=FV(n)+`:`+r+`;`)}return t},IH=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push(`mtight`);var r=t.getColor();r&&(this.style.color=r)}},LH=function(e){var t=document.createElement(e);t.className=PH(this.classes),Object.assign(t.style,this.style);for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);for(var r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t},RH=/[\s"'>/=\x00-\x1f]/,zH=function(e){var t=`<`+e;this.classes.length&&(t+=` class="`+RV(PH(this.classes))+`"`);var n=FH(this.style);n&&(t+=` style="`+RV(n)+`"`);for(var r of Object.keys(this.attributes)){if(RH.test(r))throw new B(`Invalid attribute name '`+r+`'`);t+=` `+r+`="`+RV(this.attributes[r])+`"`}t+=`>`;for(var i=0;i<this.children.length;i++)t+=this.children[i].toMarkup();return t+=`</`+e+`>`,t},BH=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,IH.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return LH.call(this,`span`)}toMarkup(){return zH.call(this,`span`)}},VH=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,IH.call(this,t,r),this.children=n||[],this.setAttribute(`href`,e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return LH.call(this,`a`)}toMarkup(){return zH.call(this,`a`)}},HH=class{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=[`mord`],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement(`img`);return e.src=this.src,e.alt=this.alt,e.className=`mord`,Object.assign(e.style,this.style),e}toMarkup(){var e=`<img src="`+RV(this.src)+`"`+(` alt="`+RV(this.alt)+`"`),t=FH(this.style);return t&&(e+=` style="`+RV(t)+`"`),e+=`'/>`,e}},UH={î:`ı̂`,ï:`ı̈`,í:`ı́`,ì:`ı̀`},WH=class{constructor(e,t,n,r,i,a,o,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=i||0,this.width=a||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0;var c=fH(this.text.charCodeAt(0));c&&this.classes.push(c+`_fallback`),/[îïíì]/.test(this.text)&&(this.text=UH[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),t=null;return this.italic>0&&(t=document.createElement(`span`),t.style.marginRight=V(this.italic)),this.classes.length>0&&(t||=document.createElement(`span`),t.className=PH(this.classes)),Object.keys(this.style).length>0&&(t||=document.createElement(`span`),Object.assign(t.style,this.style)),t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t=`<span`;this.classes.length&&(e=!0,t+=` class="`,t+=RV(PH(this.classes)),t+=`"`);var n=``;this.italic>0&&(n+=`margin-right:`+V(this.italic)+`;`),n+=FH(this.style),n&&(e=!0,t+=` style="`+RV(n)+`"`);var r=RV(this.text);return e?(t+=`>`,t+=r,t+=`</span>`,t):r}},GH=class{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}toMarkup(){var e=`<svg xmlns="http://www.w3.org/2000/svg"`;for(var t of Object.keys(this.attributes))e+=` `+t+`="`+RV(this.attributes[t])+`"`;e+=`>`;for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+=`</svg>`,e}},KH=class{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);return this.alternate?e.setAttribute(`d`,this.alternate):e.setAttribute(`d`,EH[this.pathName]),e}toMarkup(){return this.alternate?`<path d="`+RV(this.alternate)+`"/>`:`<path d="`+RV(EH[this.pathName])+`"/>`}},qH=class{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`line`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e=`<line`;for(var t of Object.keys(this.attributes))e+=` `+t+`="`+RV(this.attributes[t])+`"`;return e+=`/>`,e}};function JH(e){if(e instanceof WH)return e;throw Error(`Expected symbolNode but got `+String(e)+`.`)}function YH(e){if(e instanceof BH)return e;throw Error(`Expected span<HtmlDomNode> but got `+String(e)+`.`)}var XH=e=>e instanceof BH||e instanceof VH||e instanceof kH,ZH={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},QH={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},$H={Å:`A`,Ð:`D`,Þ:`o`,å:`a`,ð:`d`,þ:`o`,А:`A`,Б:`B`,В:`B`,Г:`F`,Д:`A`,Е:`E`,Ж:`K`,З:`3`,И:`N`,Й:`N`,К:`K`,Л:`N`,М:`M`,Н:`H`,О:`O`,П:`N`,Р:`P`,С:`C`,Т:`T`,У:`y`,Ф:`O`,Х:`X`,Ц:`U`,Ч:`h`,Ш:`W`,Щ:`W`,Ъ:`B`,Ы:`X`,Ь:`B`,Э:`3`,Ю:`X`,Я:`R`,а:`a`,б:`b`,в:`a`,г:`r`,д:`y`,е:`e`,ж:`m`,з:`e`,и:`n`,й:`n`,к:`n`,л:`n`,м:`m`,н:`n`,о:`o`,п:`n`,р:`p`,с:`c`,т:`o`,у:`y`,ф:`b`,х:`x`,ц:`n`,ч:`n`,ш:`w`,щ:`w`,ъ:`a`,ы:`m`,ь:`a`,э:`e`,ю:`m`,я:`r`};function eU(e,t){ZH[e]=t}function tU(e,t,n){if(!ZH[t])throw Error(`Font metrics not found for font: `+t+`.`);var r=e.charCodeAt(0),i=ZH[t][r];if(!i&&e[0]in $H&&(r=$H[e[0]].charCodeAt(0),i=ZH[t][r]),!i&&n===`text`&&mH(r)&&(i=ZH[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var nU={};function rU(e){var t=e>=5?0:e>=3?1:2;if(!nU[t]){var n=nU[t]={cssEmPerMu:QH.quad[t]/18};for(var r of Object.keys(QH))n[r]=QH[r][t]}return nU[t]}var iU={math:{},text:{}};function H(e,t,n,r,i,a){iU[e][i]={font:t,group:n,replace:r},a&&r&&(iU[e][r]=iU[e][i])}var U=`math`,W=`text`,G=`main`,K=`ams`,aU=`accent-token`,q=`bin`,oU=`close`,sU=`inner`,cU=`mathord`,lU=`op-token`,uU=`open`,dU=`punct`,J=`rel`,fU=`spacing`,Y=`textord`;H(U,G,J,`≡`,`\\equiv`,!0),H(U,G,J,`≺`,`\\prec`,!0),H(U,G,J,`≻`,`\\succ`,!0),H(U,G,J,`∼`,`\\sim`,!0),H(U,G,J,`⊥`,`\\perp`),H(U,G,J,`⪯`,`\\preceq`,!0),H(U,G,J,`⪰`,`\\succeq`,!0),H(U,G,J,`≃`,`\\simeq`,!0),H(U,G,J,`∣`,`\\mid`,!0),H(U,G,J,`≪`,`\\ll`,!0),H(U,G,J,`≫`,`\\gg`,!0),H(U,G,J,`≍`,`\\asymp`,!0),H(U,G,J,`∥`,`\\parallel`),H(U,G,J,`⋈`,`\\bowtie`,!0),H(U,G,J,`⌣`,`\\smile`,!0),H(U,G,J,`⊑`,`\\sqsubseteq`,!0),H(U,G,J,`⊒`,`\\sqsupseteq`,!0),H(U,G,J,`≐`,`\\doteq`,!0),H(U,G,J,`⌢`,`\\frown`,!0),H(U,G,J,`∋`,`\\ni`,!0),H(U,G,J,`∝`,`\\propto`,!0),H(U,G,J,`⊢`,`\\vdash`,!0),H(U,G,J,`⊣`,`\\dashv`,!0),H(U,G,J,`∋`,`\\owns`),H(U,G,dU,`.`,`\\ldotp`),H(U,G,dU,`⋅`,`\\cdotp`),H(U,G,dU,`⋅`,`·`),H(W,G,Y,`⋅`,`·`),H(U,G,Y,`#`,`\\#`),H(W,G,Y,`#`,`\\#`),H(U,G,Y,`&`,`\\&`),H(W,G,Y,`&`,`\\&`),H(U,G,Y,`ℵ`,`\\aleph`,!0),H(U,G,Y,`∀`,`\\forall`,!0),H(U,G,Y,`ℏ`,`\\hbar`,!0),H(U,G,Y,`∃`,`\\exists`,!0),H(U,G,Y,`∇`,`\\nabla`,!0),H(U,G,Y,`♭`,`\\flat`,!0),H(U,G,Y,`ℓ`,`\\ell`,!0),H(U,G,Y,`♮`,`\\natural`,!0),H(U,G,Y,`♣`,`\\clubsuit`,!0),H(U,G,Y,`℘`,`\\wp`,!0),H(U,G,Y,`♯`,`\\sharp`,!0),H(U,G,Y,`♢`,`\\diamondsuit`,!0),H(U,G,Y,`ℜ`,`\\Re`,!0),H(U,G,Y,`♡`,`\\heartsuit`,!0),H(U,G,Y,`ℑ`,`\\Im`,!0),H(U,G,Y,`♠`,`\\spadesuit`,!0),H(U,G,Y,`§`,`\\S`,!0),H(W,G,Y,`§`,`\\S`),H(U,G,Y,`¶`,`\\P`,!0),H(W,G,Y,`¶`,`\\P`),H(U,G,Y,`†`,`\\dag`),H(W,G,Y,`†`,`\\dag`),H(W,G,Y,`†`,`\\textdagger`),H(U,G,Y,`‡`,`\\ddag`),H(W,G,Y,`‡`,`\\ddag`),H(W,G,Y,`‡`,`\\textdaggerdbl`),H(U,G,oU,`⎱`,`\\rmoustache`,!0),H(U,G,uU,`⎰`,`\\lmoustache`,!0),H(U,G,oU,`⟯`,`\\rgroup`,!0),H(U,G,uU,`⟮`,`\\lgroup`,!0),H(U,G,q,`∓`,`\\mp`,!0),H(U,G,q,`⊖`,`\\ominus`,!0),H(U,G,q,`⊎`,`\\uplus`,!0),H(U,G,q,`⊓`,`\\sqcap`,!0),H(U,G,q,`∗`,`\\ast`),H(U,G,q,`⊔`,`\\sqcup`,!0),H(U,G,q,`◯`,`\\bigcirc`,!0),H(U,G,q,`∙`,`\\bullet`,!0),H(U,G,q,`‡`,`\\ddagger`),H(U,G,q,`≀`,`\\wr`,!0),H(U,G,q,`⨿`,`\\amalg`),H(U,G,q,`&`,`\\And`),H(U,G,J,`⟵`,`\\longleftarrow`,!0),H(U,G,J,`⇐`,`\\Leftarrow`,!0),H(U,G,J,`⟸`,`\\Longleftarrow`,!0),H(U,G,J,`⟶`,`\\longrightarrow`,!0),H(U,G,J,`⇒`,`\\Rightarrow`,!0),H(U,G,J,`⟹`,`\\Longrightarrow`,!0),H(U,G,J,`↔`,`\\leftrightarrow`,!0),H(U,G,J,`⟷`,`\\longleftrightarrow`,!0),H(U,G,J,`⇔`,`\\Leftrightarrow`,!0),H(U,G,J,`⟺`,`\\Longleftrightarrow`,!0),H(U,G,J,`↦`,`\\mapsto`,!0),H(U,G,J,`⟼`,`\\longmapsto`,!0),H(U,G,J,`↗`,`\\nearrow`,!0),H(U,G,J,`↩`,`\\hookleftarrow`,!0),H(U,G,J,`↪`,`\\hookrightarrow`,!0),H(U,G,J,`↘`,`\\searrow`,!0),H(U,G,J,`↼`,`\\leftharpoonup`,!0),H(U,G,J,`⇀`,`\\rightharpoonup`,!0),H(U,G,J,`↙`,`\\swarrow`,!0),H(U,G,J,`↽`,`\\leftharpoondown`,!0),H(U,G,J,`⇁`,`\\rightharpoondown`,!0),H(U,G,J,`↖`,`\\nwarrow`,!0),H(U,G,J,`⇌`,`\\rightleftharpoons`,!0),H(U,K,J,`≮`,`\\nless`,!0),H(U,K,J,``,`\\@nleqslant`),H(U,K,J,``,`\\@nleqq`),H(U,K,J,`⪇`,`\\lneq`,!0),H(U,K,J,`≨`,`\\lneqq`,!0),H(U,K,J,``,`\\@lvertneqq`),H(U,K,J,`⋦`,`\\lnsim`,!0),H(U,K,J,`⪉`,`\\lnapprox`,!0),H(U,K,J,`⊀`,`\\nprec`,!0),H(U,K,J,`⋠`,`\\npreceq`,!0),H(U,K,J,`⋨`,`\\precnsim`,!0),H(U,K,J,`⪹`,`\\precnapprox`,!0),H(U,K,J,`≁`,`\\nsim`,!0),H(U,K,J,``,`\\@nshortmid`),H(U,K,J,`∤`,`\\nmid`,!0),H(U,K,J,`⊬`,`\\nvdash`,!0),H(U,K,J,`⊭`,`\\nvDash`,!0),H(U,K,J,`⋪`,`\\ntriangleleft`),H(U,K,J,`⋬`,`\\ntrianglelefteq`,!0),H(U,K,J,`⊊`,`\\subsetneq`,!0),H(U,K,J,``,`\\@varsubsetneq`),H(U,K,J,`⫋`,`\\subsetneqq`,!0),H(U,K,J,``,`\\@varsubsetneqq`),H(U,K,J,`≯`,`\\ngtr`,!0),H(U,K,J,``,`\\@ngeqslant`),H(U,K,J,``,`\\@ngeqq`),H(U,K,J,`⪈`,`\\gneq`,!0),H(U,K,J,`≩`,`\\gneqq`,!0),H(U,K,J,``,`\\@gvertneqq`),H(U,K,J,`⋧`,`\\gnsim`,!0),H(U,K,J,`⪊`,`\\gnapprox`,!0),H(U,K,J,`⊁`,`\\nsucc`,!0),H(U,K,J,`⋡`,`\\nsucceq`,!0),H(U,K,J,`⋩`,`\\succnsim`,!0),H(U,K,J,`⪺`,`\\succnapprox`,!0),H(U,K,J,`≆`,`\\ncong`,!0),H(U,K,J,``,`\\@nshortparallel`),H(U,K,J,`∦`,`\\nparallel`,!0),H(U,K,J,`⊯`,`\\nVDash`,!0),H(U,K,J,`⋫`,`\\ntriangleright`),H(U,K,J,`⋭`,`\\ntrianglerighteq`,!0),H(U,K,J,``,`\\@nsupseteqq`),H(U,K,J,`⊋`,`\\supsetneq`,!0),H(U,K,J,``,`\\@varsupsetneq`),H(U,K,J,`⫌`,`\\supsetneqq`,!0),H(U,K,J,``,`\\@varsupsetneqq`),H(U,K,J,`⊮`,`\\nVdash`,!0),H(U,K,J,`⪵`,`\\precneqq`,!0),H(U,K,J,`⪶`,`\\succneqq`,!0),H(U,K,J,``,`\\@nsubseteqq`),H(U,K,q,`⊴`,`\\unlhd`),H(U,K,q,`⊵`,`\\unrhd`),H(U,K,J,`↚`,`\\nleftarrow`,!0),H(U,K,J,`↛`,`\\nrightarrow`,!0),H(U,K,J,`⇍`,`\\nLeftarrow`,!0),H(U,K,J,`⇏`,`\\nRightarrow`,!0),H(U,K,J,`↮`,`\\nleftrightarrow`,!0),H(U,K,J,`⇎`,`\\nLeftrightarrow`,!0),H(U,K,J,`△`,`\\vartriangle`),H(U,K,Y,`ℏ`,`\\hslash`),H(U,K,Y,`▽`,`\\triangledown`),H(U,K,Y,`◊`,`\\lozenge`),H(U,K,Y,`Ⓢ`,`\\circledS`),H(U,K,Y,`®`,`\\circledR`),H(W,K,Y,`®`,`\\circledR`),H(U,K,Y,`∡`,`\\measuredangle`,!0),H(U,K,Y,`∄`,`\\nexists`),H(U,K,Y,`℧`,`\\mho`),H(U,K,Y,`Ⅎ`,`\\Finv`,!0),H(U,K,Y,`⅁`,`\\Game`,!0),H(U,K,Y,`‵`,`\\backprime`),H(U,K,Y,`▲`,`\\blacktriangle`),H(U,K,Y,`▼`,`\\blacktriangledown`),H(U,K,Y,`■`,`\\blacksquare`),H(U,K,Y,`⧫`,`\\blacklozenge`),H(U,K,Y,`★`,`\\bigstar`),H(U,K,Y,`∢`,`\\sphericalangle`,!0),H(U,K,Y,`∁`,`\\complement`,!0),H(U,K,Y,`ð`,`\\eth`,!0),H(W,G,Y,`ð`,`ð`),H(U,K,Y,`╱`,`\\diagup`),H(U,K,Y,`╲`,`\\diagdown`),H(U,K,Y,`□`,`\\square`),H(U,K,Y,`□`,`\\Box`),H(U,K,Y,`◊`,`\\Diamond`),H(U,K,Y,`¥`,`\\yen`,!0),H(W,K,Y,`¥`,`\\yen`,!0),H(U,K,Y,`✓`,`\\checkmark`,!0),H(W,K,Y,`✓`,`\\checkmark`),H(U,K,Y,`ℶ`,`\\beth`,!0),H(U,K,Y,`ℸ`,`\\daleth`,!0),H(U,K,Y,`ℷ`,`\\gimel`,!0),H(U,K,Y,`ϝ`,`\\digamma`,!0),H(U,K,Y,`ϰ`,`\\varkappa`),H(U,K,uU,`┌`,`\\@ulcorner`,!0),H(U,K,oU,`┐`,`\\@urcorner`,!0),H(U,K,uU,`└`,`\\@llcorner`,!0),H(U,K,oU,`┘`,`\\@lrcorner`,!0),H(U,K,J,`≦`,`\\leqq`,!0),H(U,K,J,`⩽`,`\\leqslant`,!0),H(U,K,J,`⪕`,`\\eqslantless`,!0),H(U,K,J,`≲`,`\\lesssim`,!0),H(U,K,J,`⪅`,`\\lessapprox`,!0),H(U,K,J,`≊`,`\\approxeq`,!0),H(U,K,q,`⋖`,`\\lessdot`),H(U,K,J,`⋘`,`\\lll`,!0),H(U,K,J,`≶`,`\\lessgtr`,!0),H(U,K,J,`⋚`,`\\lesseqgtr`,!0),H(U,K,J,`⪋`,`\\lesseqqgtr`,!0),H(U,K,J,`≑`,`\\doteqdot`),H(U,K,J,`≓`,`\\risingdotseq`,!0),H(U,K,J,`≒`,`\\fallingdotseq`,!0),H(U,K,J,`∽`,`\\backsim`,!0),H(U,K,J,`⋍`,`\\backsimeq`,!0),H(U,K,J,`⫅`,`\\subseteqq`,!0),H(U,K,J,`⋐`,`\\Subset`,!0),H(U,K,J,`⊏`,`\\sqsubset`,!0),H(U,K,J,`≼`,`\\preccurlyeq`,!0),H(U,K,J,`⋞`,`\\curlyeqprec`,!0),H(U,K,J,`≾`,`\\precsim`,!0),H(U,K,J,`⪷`,`\\precapprox`,!0),H(U,K,J,`⊲`,`\\vartriangleleft`),H(U,K,J,`⊴`,`\\trianglelefteq`),H(U,K,J,`⊨`,`\\vDash`,!0),H(U,K,J,`⊪`,`\\Vvdash`,!0),H(U,K,J,`⌣`,`\\smallsmile`),H(U,K,J,`⌢`,`\\smallfrown`),H(U,K,J,`≏`,`\\bumpeq`,!0),H(U,K,J,`≎`,`\\Bumpeq`,!0),H(U,K,J,`≧`,`\\geqq`,!0),H(U,K,J,`⩾`,`\\geqslant`,!0),H(U,K,J,`⪖`,`\\eqslantgtr`,!0),H(U,K,J,`≳`,`\\gtrsim`,!0),H(U,K,J,`⪆`,`\\gtrapprox`,!0),H(U,K,q,`⋗`,`\\gtrdot`),H(U,K,J,`⋙`,`\\ggg`,!0),H(U,K,J,`≷`,`\\gtrless`,!0),H(U,K,J,`⋛`,`\\gtreqless`,!0),H(U,K,J,`⪌`,`\\gtreqqless`,!0),H(U,K,J,`≖`,`\\eqcirc`,!0),H(U,K,J,`≗`,`\\circeq`,!0),H(U,K,J,`≜`,`\\triangleq`,!0),H(U,K,J,`∼`,`\\thicksim`),H(U,K,J,`≈`,`\\thickapprox`),H(U,K,J,`⫆`,`\\supseteqq`,!0),H(U,K,J,`⋑`,`\\Supset`,!0),H(U,K,J,`⊐`,`\\sqsupset`,!0),H(U,K,J,`≽`,`\\succcurlyeq`,!0),H(U,K,J,`⋟`,`\\curlyeqsucc`,!0),H(U,K,J,`≿`,`\\succsim`,!0),H(U,K,J,`⪸`,`\\succapprox`,!0),H(U,K,J,`⊳`,`\\vartriangleright`),H(U,K,J,`⊵`,`\\trianglerighteq`),H(U,K,J,`⊩`,`\\Vdash`,!0),H(U,K,J,`∣`,`\\shortmid`),H(U,K,J,`∥`,`\\shortparallel`),H(U,K,J,`≬`,`\\between`,!0),H(U,K,J,`⋔`,`\\pitchfork`,!0),H(U,K,J,`∝`,`\\varpropto`),H(U,K,J,`◀`,`\\blacktriangleleft`),H(U,K,J,`∴`,`\\therefore`,!0),H(U,K,J,`∍`,`\\backepsilon`),H(U,K,J,`▶`,`\\blacktriangleright`),H(U,K,J,`∵`,`\\because`,!0),H(U,K,J,`⋘`,`\\llless`),H(U,K,J,`⋙`,`\\gggtr`),H(U,K,q,`⊲`,`\\lhd`),H(U,K,q,`⊳`,`\\rhd`),H(U,K,J,`≂`,`\\eqsim`,!0),H(U,G,J,`⋈`,`\\Join`),H(U,K,J,`≑`,`\\Doteq`,!0),H(U,K,q,`∔`,`\\dotplus`,!0),H(U,K,q,`∖`,`\\smallsetminus`),H(U,K,q,`⋒`,`\\Cap`,!0),H(U,K,q,`⋓`,`\\Cup`,!0),H(U,K,q,`⩞`,`\\doublebarwedge`,!0),H(U,K,q,`⊟`,`\\boxminus`,!0),H(U,K,q,`⊞`,`\\boxplus`,!0),H(U,K,q,`⋇`,`\\divideontimes`,!0),H(U,K,q,`⋉`,`\\ltimes`,!0),H(U,K,q,`⋊`,`\\rtimes`,!0),H(U,K,q,`⋋`,`\\leftthreetimes`,!0),H(U,K,q,`⋌`,`\\rightthreetimes`,!0),H(U,K,q,`⋏`,`\\curlywedge`,!0),H(U,K,q,`⋎`,`\\curlyvee`,!0),H(U,K,q,`⊝`,`\\circleddash`,!0),H(U,K,q,`⊛`,`\\circledast`,!0),H(U,K,q,`⋅`,`\\centerdot`),H(U,K,q,`⊺`,`\\intercal`,!0),H(U,K,q,`⋒`,`\\doublecap`),H(U,K,q,`⋓`,`\\doublecup`),H(U,K,q,`⊠`,`\\boxtimes`,!0),H(U,K,J,`⇢`,`\\dashrightarrow`,!0),H(U,K,J,`⇠`,`\\dashleftarrow`,!0),H(U,K,J,`⇇`,`\\leftleftarrows`,!0),H(U,K,J,`⇆`,`\\leftrightarrows`,!0),H(U,K,J,`⇚`,`\\Lleftarrow`,!0),H(U,K,J,`↞`,`\\twoheadleftarrow`,!0),H(U,K,J,`↢`,`\\leftarrowtail`,!0),H(U,K,J,`↫`,`\\looparrowleft`,!0),H(U,K,J,`⇋`,`\\leftrightharpoons`,!0),H(U,K,J,`↶`,`\\curvearrowleft`,!0),H(U,K,J,`↺`,`\\circlearrowleft`,!0),H(U,K,J,`↰`,`\\Lsh`,!0),H(U,K,J,`⇈`,`\\upuparrows`,!0),H(U,K,J,`↿`,`\\upharpoonleft`,!0),H(U,K,J,`⇃`,`\\downharpoonleft`,!0),H(U,G,J,`⊶`,`\\origof`,!0),H(U,G,J,`⊷`,`\\imageof`,!0),H(U,K,J,`⊸`,`\\multimap`,!0),H(U,K,J,`↭`,`\\leftrightsquigarrow`,!0),H(U,K,J,`⇉`,`\\rightrightarrows`,!0),H(U,K,J,`⇄`,`\\rightleftarrows`,!0),H(U,K,J,`↠`,`\\twoheadrightarrow`,!0),H(U,K,J,`↣`,`\\rightarrowtail`,!0),H(U,K,J,`↬`,`\\looparrowright`,!0),H(U,K,J,`↷`,`\\curvearrowright`,!0),H(U,K,J,`↻`,`\\circlearrowright`,!0),H(U,K,J,`↱`,`\\Rsh`,!0),H(U,K,J,`⇊`,`\\downdownarrows`,!0),H(U,K,J,`↾`,`\\upharpoonright`,!0),H(U,K,J,`⇂`,`\\downharpoonright`,!0),H(U,K,J,`⇝`,`\\rightsquigarrow`,!0),H(U,K,J,`⇝`,`\\leadsto`),H(U,K,J,`⇛`,`\\Rrightarrow`,!0),H(U,K,J,`↾`,`\\restriction`),H(U,G,Y,`‘`,"`"),H(U,G,Y,`$`,`\\$`),H(W,G,Y,`$`,`\\$`),H(W,G,Y,`$`,`\\textdollar`),H(U,G,Y,`%`,`\\%`),H(W,G,Y,`%`,`\\%`),H(U,G,Y,`_`,`\\_`),H(W,G,Y,`_`,`\\_`),H(W,G,Y,`_`,`\\textunderscore`),H(U,G,Y,`∠`,`\\angle`,!0),H(U,G,Y,`∞`,`\\infty`,!0),H(U,G,Y,`′`,`\\prime`),H(U,G,Y,`△`,`\\triangle`),H(U,G,Y,`Γ`,`\\Gamma`,!0),H(U,G,Y,`Δ`,`\\Delta`,!0),H(U,G,Y,`Θ`,`\\Theta`,!0),H(U,G,Y,`Λ`,`\\Lambda`,!0),H(U,G,Y,`Ξ`,`\\Xi`,!0),H(U,G,Y,`Π`,`\\Pi`,!0),H(U,G,Y,`Σ`,`\\Sigma`,!0),H(U,G,Y,`Υ`,`\\Upsilon`,!0),H(U,G,Y,`Φ`,`\\Phi`,!0),H(U,G,Y,`Ψ`,`\\Psi`,!0),H(U,G,Y,`Ω`,`\\Omega`,!0),H(U,G,Y,`A`,`Α`),H(U,G,Y,`B`,`Β`),H(U,G,Y,`E`,`Ε`),H(U,G,Y,`Z`,`Ζ`),H(U,G,Y,`H`,`Η`),H(U,G,Y,`I`,`Ι`),H(U,G,Y,`K`,`Κ`),H(U,G,Y,`M`,`Μ`),H(U,G,Y,`N`,`Ν`),H(U,G,Y,`O`,`Ο`),H(U,G,Y,`P`,`Ρ`),H(U,G,Y,`T`,`Τ`),H(U,G,Y,`X`,`Χ`),H(U,G,Y,`¬`,`\\neg`,!0),H(U,G,Y,`¬`,`\\lnot`),H(U,G,Y,`⊤`,`\\top`),H(U,G,Y,`⊥`,`\\bot`),H(U,G,Y,`∅`,`\\emptyset`),H(U,K,Y,`∅`,`\\varnothing`),H(U,G,cU,`α`,`\\alpha`,!0),H(U,G,cU,`β`,`\\beta`,!0),H(U,G,cU,`γ`,`\\gamma`,!0),H(U,G,cU,`δ`,`\\delta`,!0),H(U,G,cU,`ϵ`,`\\epsilon`,!0),H(U,G,cU,`ζ`,`\\zeta`,!0),H(U,G,cU,`η`,`\\eta`,!0),H(U,G,cU,`θ`,`\\theta`,!0),H(U,G,cU,`ι`,`\\iota`,!0),H(U,G,cU,`κ`,`\\kappa`,!0),H(U,G,cU,`λ`,`\\lambda`,!0),H(U,G,cU,`μ`,`\\mu`,!0),H(U,G,cU,`ν`,`\\nu`,!0),H(U,G,cU,`ξ`,`\\xi`,!0),H(U,G,cU,`ο`,`\\omicron`,!0),H(U,G,cU,`π`,`\\pi`,!0),H(U,G,cU,`ρ`,`\\rho`,!0),H(U,G,cU,`σ`,`\\sigma`,!0),H(U,G,cU,`τ`,`\\tau`,!0),H(U,G,cU,`υ`,`\\upsilon`,!0),H(U,G,cU,`ϕ`,`\\phi`,!0),H(U,G,cU,`χ`,`\\chi`,!0),H(U,G,cU,`ψ`,`\\psi`,!0),H(U,G,cU,`ω`,`\\omega`,!0),H(U,G,cU,`ε`,`\\varepsilon`,!0),H(U,G,cU,`ϑ`,`\\vartheta`,!0),H(U,G,cU,`ϖ`,`\\varpi`,!0),H(U,G,cU,`ϱ`,`\\varrho`,!0),H(U,G,cU,`ς`,`\\varsigma`,!0),H(U,G,cU,`φ`,`\\varphi`,!0),H(U,G,q,`∗`,`*`,!0),H(U,G,q,`+`,`+`),H(U,G,q,`−`,`-`,!0),H(U,G,q,`⋅`,`\\cdot`,!0),H(U,G,q,`∘`,`\\circ`,!0),H(U,G,q,`÷`,`\\div`,!0),H(U,G,q,`±`,`\\pm`,!0),H(U,G,q,`×`,`\\times`,!0),H(U,G,q,`∩`,`\\cap`,!0),H(U,G,q,`∪`,`\\cup`,!0),H(U,G,q,`∖`,`\\setminus`,!0),H(U,G,q,`∧`,`\\land`),H(U,G,q,`∨`,`\\lor`),H(U,G,q,`∧`,`\\wedge`,!0),H(U,G,q,`∨`,`\\vee`,!0),H(U,G,Y,`√`,`\\surd`),H(U,G,uU,`⟨`,`\\langle`,!0),H(U,G,uU,`∣`,`\\lvert`),H(U,G,uU,`∥`,`\\lVert`),H(U,G,oU,`?`,`?`),H(U,G,oU,`!`,`!`),H(U,G,oU,`⟩`,`\\rangle`,!0),H(U,G,oU,`∣`,`\\rvert`),H(U,G,oU,`∥`,`\\rVert`),H(U,G,J,`=`,`=`),H(U,G,J,`:`,`:`),H(U,G,J,`≈`,`\\approx`,!0),H(U,G,J,`≅`,`\\cong`,!0),H(U,G,J,`≥`,`\\ge`),H(U,G,J,`≥`,`\\geq`,!0),H(U,G,J,`←`,`\\gets`),H(U,G,J,`>`,`\\gt`,!0),H(U,G,J,`∈`,`\\in`,!0),H(U,G,J,``,`\\@not`),H(U,G,J,`⊂`,`\\subset`,!0),H(U,G,J,`⊃`,`\\supset`,!0),H(U,G,J,`⊆`,`\\subseteq`,!0),H(U,G,J,`⊇`,`\\supseteq`,!0),H(U,K,J,`⊈`,`\\nsubseteq`,!0),H(U,K,J,`⊉`,`\\nsupseteq`,!0),H(U,G,J,`⊨`,`\\models`),H(U,G,J,`←`,`\\leftarrow`,!0),H(U,G,J,`≤`,`\\le`),H(U,G,J,`≤`,`\\leq`,!0),H(U,G,J,`<`,`\\lt`,!0),H(U,G,J,`→`,`\\rightarrow`,!0),H(U,G,J,`→`,`\\to`),H(U,K,J,`≱`,`\\ngeq`,!0),H(U,K,J,`≰`,`\\nleq`,!0),H(U,G,fU,`\xA0`,`\\ `),H(U,G,fU,`\xA0`,`\\space`),H(U,G,fU,`\xA0`,`\\nobreakspace`),H(W,G,fU,`\xA0`,`\\ `),H(W,G,fU,`\xA0`,` `),H(W,G,fU,`\xA0`,`\\space`),H(W,G,fU,`\xA0`,`\\nobreakspace`),H(U,G,fU,``,`\\nobreak`),H(U,G,fU,``,`\\allowbreak`),H(U,G,dU,`,`,`,`),H(U,G,dU,`;`,`;`),H(U,K,q,`⊼`,`\\barwedge`,!0),H(U,K,q,`⊻`,`\\veebar`,!0),H(U,G,q,`⊙`,`\\odot`,!0),H(U,G,q,`⊕`,`\\oplus`,!0),H(U,G,q,`⊗`,`\\otimes`,!0),H(U,G,Y,`∂`,`\\partial`,!0),H(U,G,q,`⊘`,`\\oslash`,!0),H(U,K,q,`⊚`,`\\circledcirc`,!0),H(U,K,q,`⊡`,`\\boxdot`,!0),H(U,G,q,`△`,`\\bigtriangleup`),H(U,G,q,`▽`,`\\bigtriangledown`),H(U,G,q,`†`,`\\dagger`),H(U,G,q,`⋄`,`\\diamond`),H(U,G,q,`⋆`,`\\star`),H(U,G,q,`◃`,`\\triangleleft`),H(U,G,q,`▹`,`\\triangleright`),H(U,G,uU,`{`,`\\{`),H(W,G,Y,`{`,`\\{`),H(W,G,Y,`{`,`\\textbraceleft`),H(U,G,oU,`}`,`\\}`),H(W,G,Y,`}`,`\\}`),H(W,G,Y,`}`,`\\textbraceright`),H(U,G,uU,`{`,`\\lbrace`),H(U,G,oU,`}`,`\\rbrace`),H(U,G,uU,`[`,`\\lbrack`,!0),H(W,G,Y,`[`,`\\lbrack`,!0),H(U,G,oU,`]`,`\\rbrack`,!0),H(W,G,Y,`]`,`\\rbrack`,!0),H(U,G,uU,`(`,`\\lparen`,!0),H(U,G,oU,`)`,`\\rparen`,!0),H(W,G,Y,`<`,`\\textless`,!0),H(W,G,Y,`>`,`\\textgreater`,!0),H(U,G,uU,`⌊`,`\\lfloor`,!0),H(U,G,oU,`⌋`,`\\rfloor`,!0),H(U,G,uU,`⌈`,`\\lceil`,!0),H(U,G,oU,`⌉`,`\\rceil`,!0),H(U,G,Y,`\\`,`\\backslash`),H(U,G,Y,`∣`,`|`),H(U,G,Y,`∣`,`\\vert`),H(W,G,Y,`|`,`\\textbar`,!0),H(U,G,Y,`∥`,`\\|`),H(U,G,Y,`∥`,`\\Vert`),H(W,G,Y,`∥`,`\\textbardbl`),H(W,G,Y,`~`,`\\textasciitilde`),H(W,G,Y,`\\`,`\\textbackslash`),H(W,G,Y,`^`,`\\textasciicircum`),H(U,G,J,`↑`,`\\uparrow`,!0),H(U,G,J,`⇑`,`\\Uparrow`,!0),H(U,G,J,`↓`,`\\downarrow`,!0),H(U,G,J,`⇓`,`\\Downarrow`,!0),H(U,G,J,`↕`,`\\updownarrow`,!0),H(U,G,J,`⇕`,`\\Updownarrow`,!0),H(U,G,lU,`∐`,`\\coprod`),H(U,G,lU,`⋁`,`\\bigvee`),H(U,G,lU,`⋀`,`\\bigwedge`),H(U,G,lU,`⨄`,`\\biguplus`),H(U,G,lU,`⋂`,`\\bigcap`),H(U,G,lU,`⋃`,`\\bigcup`),H(U,G,lU,`∫`,`\\int`),H(U,G,lU,`∫`,`\\intop`),H(U,G,lU,`∬`,`\\iint`),H(U,G,lU,`∭`,`\\iiint`),H(U,G,lU,`∏`,`\\prod`),H(U,G,lU,`∑`,`\\sum`),H(U,G,lU,`⨂`,`\\bigotimes`),H(U,G,lU,`⨁`,`\\bigoplus`),H(U,G,lU,`⨀`,`\\bigodot`),H(U,G,lU,`∮`,`\\oint`),H(U,G,lU,`∯`,`\\oiint`),H(U,G,lU,`∰`,`\\oiiint`),H(U,G,lU,`⨆`,`\\bigsqcup`),H(U,G,lU,`∫`,`\\smallint`),H(W,G,sU,`…`,`\\textellipsis`),H(U,G,sU,`…`,`\\mathellipsis`),H(W,G,sU,`…`,`\\ldots`,!0),H(U,G,sU,`…`,`\\ldots`,!0),H(U,G,sU,`⋯`,`\\@cdots`,!0),H(U,G,sU,`⋱`,`\\ddots`,!0),H(U,G,Y,`⋮`,`\\varvdots`),H(W,G,Y,`⋮`,`\\varvdots`),H(U,G,aU,`ˊ`,`\\acute`),H(U,G,aU,`ˋ`,`\\grave`),H(U,G,aU,`¨`,`\\ddot`),H(U,G,aU,`~`,`\\tilde`),H(U,G,aU,`ˉ`,`\\bar`),H(U,G,aU,`˘`,`\\breve`),H(U,G,aU,`ˇ`,`\\check`),H(U,G,aU,`^`,`\\hat`),H(U,G,aU,`⃗`,`\\vec`),H(U,G,aU,`˙`,`\\dot`),H(U,G,aU,`˚`,`\\mathring`),H(U,G,cU,``,`\\@imath`),H(U,G,cU,``,`\\@jmath`),H(U,G,Y,`ı`,`ı`),H(U,G,Y,`ȷ`,`ȷ`),H(W,G,Y,`ı`,`\\i`,!0),H(W,G,Y,`ȷ`,`\\j`,!0),H(W,G,Y,`ß`,`\\ss`,!0),H(W,G,Y,`æ`,`\\ae`,!0),H(W,G,Y,`œ`,`\\oe`,!0),H(W,G,Y,`ø`,`\\o`,!0),H(W,G,Y,`Æ`,`\\AE`,!0),H(W,G,Y,`Œ`,`\\OE`,!0),H(W,G,Y,`Ø`,`\\O`,!0),H(W,G,aU,`ˊ`,`\\'`),H(W,G,aU,`ˋ`,"\\`"),H(W,G,aU,`ˆ`,`\\^`),H(W,G,aU,`˜`,`\\~`),H(W,G,aU,`ˉ`,`\\=`),H(W,G,aU,`˘`,`\\u`),H(W,G,aU,`˙`,`\\.`),H(W,G,aU,`¸`,`\\c`),H(W,G,aU,`˚`,`\\r`),H(W,G,aU,`ˇ`,`\\v`),H(W,G,aU,`¨`,`\\"`),H(W,G,aU,`˝`,`\\H`),H(W,G,aU,`◯`,`\\textcircled`);var pU={"--":!0,"---":!0,"``":!0,"''":!0};H(W,G,Y,`–`,`--`,!0),H(W,G,Y,`–`,`\\textendash`),H(W,G,Y,`—`,`---`,!0),H(W,G,Y,`—`,`\\textemdash`),H(W,G,Y,`‘`,"`",!0),H(W,G,Y,`‘`,`\\textquoteleft`),H(W,G,Y,`’`,`'`,!0),H(W,G,Y,`’`,`\\textquoteright`),H(W,G,Y,`“`,"``",!0),H(W,G,Y,`“`,`\\textquotedblleft`),H(W,G,Y,`”`,`''`,!0),H(W,G,Y,`”`,`\\textquotedblright`),H(U,G,Y,`°`,`\\degree`,!0),H(W,G,Y,`°`,`\\degree`),H(W,G,Y,`°`,`\\textdegree`,!0),H(U,G,Y,`£`,`\\pounds`),H(U,G,Y,`£`,`\\mathsterling`,!0),H(W,G,Y,`£`,`\\pounds`),H(W,G,Y,`£`,`\\textsterling`,!0),H(U,K,Y,`✠`,`\\maltese`),H(W,K,Y,`✠`,`\\maltese`);for(var mU=`0123456789/@."`,hU=0;hU<mU.length;hU++){var gU=mU.charAt(hU);H(U,G,Y,gU,gU)}for(var _U=`0123456789!@*()-=+";:?/.,`,vU=0;vU<_U.length;vU++){var yU=_U.charAt(vU);H(W,G,Y,yU,yU)}for(var bU=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`,xU=0;xU<bU.length;xU++){var SU=bU.charAt(xU);H(U,G,cU,SU,SU),H(W,G,Y,SU,SU)}H(U,K,Y,`C`,`ℂ`),H(W,K,Y,`C`,`ℂ`),H(U,K,Y,`H`,`ℍ`),H(W,K,Y,`H`,`ℍ`),H(U,K,Y,`N`,`ℕ`),H(W,K,Y,`N`,`ℕ`),H(U,K,Y,`P`,`ℙ`),H(W,K,Y,`P`,`ℙ`),H(U,K,Y,`Q`,`ℚ`),H(W,K,Y,`Q`,`ℚ`),H(U,K,Y,`R`,`ℝ`),H(W,K,Y,`R`,`ℝ`),H(U,K,Y,`Z`,`ℤ`),H(W,K,Y,`Z`,`ℤ`),H(U,G,cU,`h`,`ℎ`),H(W,G,cU,`h`,`ℎ`);for(var CU,wU=0;wU<bU.length;wU++){var TU=bU.charAt(wU);CU=String.fromCharCode(55349,56320+wU),H(U,G,cU,TU,CU),H(W,G,Y,TU,CU),CU=String.fromCharCode(55349,56372+wU),H(U,G,cU,TU,CU),H(W,G,Y,TU,CU),CU=String.fromCharCode(55349,56424+wU),H(U,G,cU,TU,CU),H(W,G,Y,TU,CU),CU=String.fromCharCode(55349,56580+wU),H(U,G,cU,TU,CU),H(W,G,Y,TU,CU),CU=String.fromCharCode(55349,56684+wU),H(U,G,cU,TU,CU),H(W,G,Y,TU,CU),CU=String.fromCharCode(55349,56736+wU),H(U,G,cU,TU,CU),H(W,G,Y,TU,CU),CU=String.fromCharCode(55349,56788+wU),H(U,G,cU,TU,CU),H(W,G,Y,TU,CU),CU=String.fromCharCode(55349,56840+wU),H(U,G,cU,TU,CU),H(W,G,Y,TU,CU),CU=String.fromCharCode(55349,56944+wU),H(U,G,cU,TU,CU),H(W,G,Y,TU,CU),wU<26&&(CU=String.fromCharCode(55349,56632+wU),H(U,G,cU,TU,CU),H(W,G,Y,TU,CU),CU=String.fromCharCode(55349,56476+wU),H(U,G,cU,TU,CU),H(W,G,Y,TU,CU))}CU=String.fromCharCode(55349,56668),H(U,G,cU,`k`,CU),H(W,G,Y,`k`,CU);for(var EU=0;EU<10;EU++){var DU=EU.toString();CU=String.fromCharCode(55349,57294+EU),H(U,G,cU,DU,CU),H(W,G,Y,DU,CU),CU=String.fromCharCode(55349,57314+EU),H(U,G,cU,DU,CU),H(W,G,Y,DU,CU),CU=String.fromCharCode(55349,57324+EU),H(U,G,cU,DU,CU),H(W,G,Y,DU,CU),CU=String.fromCharCode(55349,57334+EU),H(U,G,cU,DU,CU),H(W,G,Y,DU,CU)}for(var OU=`ÐÞþ`,kU=0;kU<OU.length;kU++){var AU=OU.charAt(kU);H(U,G,cU,AU,AU),H(W,G,Y,AU,AU)}var jU={mathClass:`mathbf`,textClass:`textbf`,font:`Main-Bold`},MU={mathClass:`mathnormal`,textClass:`textit`,font:`Math-Italic`},NU={mathClass:`boldsymbol`,textClass:`boldsymbol`,font:`Main-BoldItalic`},PU={mathClass:`mathscr`,textClass:`textscr`,font:`Script-Regular`},FU={mathClass:``,textClass:``,font:``},IU={mathClass:`mathfrak`,textClass:`textfrak`,font:`Fraktur-Regular`},LU={mathClass:`mathbb`,textClass:`textbb`,font:`AMS-Regular`},RU={mathClass:`mathboldfrak`,textClass:`textboldfrak`,font:`Fraktur-Regular`},zU={mathClass:`mathsf`,textClass:`textsf`,font:`SansSerif-Regular`},BU={mathClass:`mathboldsf`,textClass:`textboldsf`,font:`SansSerif-Bold`},VU={mathClass:`mathitsf`,textClass:`textitsf`,font:`SansSerif-Italic`},HU={mathClass:`mathtt`,textClass:`texttt`,font:`Typewriter-Regular`},UU=[jU,jU,MU,MU,NU,NU,PU,FU,FU,FU,IU,IU,LU,LU,RU,RU,zU,zU,BU,BU,VU,VU,FU,FU,HU,HU],WU=[jU,FU,zU,BU,HU],GU=e=>{var t=e.charCodeAt(0),n=e.charCodeAt(1),r=(t-55296)*1024+(n-56320)+65536;if(119808<=r&&r<120484)return UU[Math.floor((r-119808)/26)];if(120782<=r&&r<=120831)return WU[Math.floor((r-120782)/10)];if(r===120485||r===120486)return UU[0];if(120486<r&&r<120782)return FU;throw new B(`Unsupported character: `+e)};function KU(e){var t=e.strict,n=e.errorCode,r=e.errorMsg,i=e.token,a=e.report,o=t;if(typeof t==`function`){if(a)o=t(n,r,i);else try{o=t(n,r,i)}catch{o=`error`}}switch(o){case!0:case`error`:if(a)throw new B(`LaTeX-incompatible input and strict mode is set to 'error': `+(r+` [`+n+`]`),i);return!0;case!1:case`ignore`:if(!a)return!1;break;default:if(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(r+` [`+n+`]`)),!a)return!1}}var qU=function(e,t,n){if(iU[n][e]){var r=iU[n][e].replace;r&&(e=r)}return{value:e,metrics:tU(e,t,n)}},JU=function(e,t,n,r,i){var a=qU(e,t,n),o=a.metrics;e=a.value;var s;if(o){var c=o.italic;(n===`text`||r&&r.font===`mathit`)&&(c=0),s=new WH(e,o.height,o.depth,c,o.skew,o.width,i)}else KU({strict:r.strict,errorCode:`symbolNotInFont`,errorMsg:`No character metrics for '`+e+`' in style '`+t+`' and mode '`+n+`'`,report:!0}),s=new WH(e,0,0,0,0,0,i);s.maxFontSize=r.sizeMultiplier,r.style.isTight()&&s.classes.push(`mtight`);var l=r.getColor();return l&&(s.style.color=l),s},YU=function(e,t,n,r){return r===void 0&&(r=[]),n.font===`boldsymbol`&&qU(e,`Main-Bold`,t).metrics?JU(e,`Main-Bold`,t,n,r.concat([`mathbf`])):e===`\\`||iU[t][e].font===`main`?JU(e,`Main-Regular`,t,n,r):JU(e,`AMS-Regular`,t,n,r.concat([`amsrm`]))},XU=function(e,t,n){return n!==`textord`&&qU(e,`Math-BoldItalic`,t).metrics?{fontName:`Math-BoldItalic`,fontClass:`boldsymbol`}:{fontName:`Main-Bold`,fontClass:`mathbf`}},ZU=function(e,t){var n=e.type===`mathord`?`mathord`:`textord`,r=e.mode,i=e.text,a=[`mord`],o=t.font,s=t.fontFamily,c=t.fontWeight,l=t.fontShape,u=r===`math`||r===`text`&&!!o,d=u?o:s,f=``,p=``;if(i.charCodeAt(0)===55349){var m=GU(i);f=m.font,p=m[r+`Class`]}if(f)return JU(i,f,r,t,a.concat(p));if(d){var h,g;if(d===`boldsymbol`){var _=XU(i,r,n);h=_.fontName,g=[_.fontClass]}else u?(h=uW[o].fontName,g=[o]):(h=lW(s,c,l),g=[s,c,l]);if(qU(i,h,r).metrics)return JU(i,h,r,t,a.concat(g));if(Object.prototype.hasOwnProperty.call(pU,i)&&h.slice(0,10)===`Typewriter`){for(var v=[],y=0;y<i.length;y++)v.push(JU(i[y],h,r,t,a.concat(g)));return iW(v)}}if(n===`mathord`)return JU(i,`Math-Italic`,r,t,a.concat([`mathnormal`]));if(n===`textord`){var b=iU[r][i]&&iU[r][i].font;if(b===`ams`)return JU(i,lW(`amsrm`,c,l),r,t,a.concat(`amsrm`,c,l));if(b===`main`||!b)return JU(i,lW(`textrm`,c,l),r,t,a.concat(c,l));var x=lW(b,c,l);return JU(i,x,r,t,a.concat(x,c,l))}throw Error(`unexpected type: `+n+` in makeOrd`)},QU=(e,t)=>{if(PH(e.classes)!==PH(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass(`mathnormal`))return!1;if(e.classes.length===1){var n=e.classes[0];if(n===`mbin`||n===`mord`)return!1}for(var r of Object.keys(e.style))if(e.style[r]!==t.style[r])return!1;for(var i of Object.keys(t.style))if(e.style[i]!==t.style[i])return!1;return!0},$U=e=>{for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n instanceof WH&&r instanceof WH&&QU(n,r)&&(n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,e.splice(t+1,1),t--)}return e},eW=function(e){for(var t=0,n=0,r=0,i=0;i<e.children.length;i++){var a=e.children[i];a.height>t&&(t=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>r&&(r=a.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},X=function(e,t,n,r){var i=new BH(e,t,n,r);return eW(i),i},tW=(e,t,n,r)=>new BH(e,t,n,r),nW=function(e,t,n){var r=X([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=V(r.height),r.maxFontSize=1,r},rW=function(e,t,n,r){var i=new VH(e,t,n,r);return eW(i),i},iW=function(e){var t=new kH(e);return eW(t),t},aW=function(e,t){return e instanceof kH?X([],[e],t):e},oW=function(e){if(e.positionType===`individualShift`){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,i=r,a=1;a<t.length;a++){var o=-t[a].shift-i-t[a].elem.depth,s=o-(t[a-1].elem.height+t[a-1].elem.depth);i+=o,n.push({type:`kern`,size:s}),n.push(t[a])}return{children:n,depth:r}}var c;if(e.positionType===`top`){for(var l=e.positionData,u=0;u<e.children.length;u++){var d=e.children[u];l-=d.type===`kern`?d.size:d.elem.height+d.elem.depth}c=l}else if(e.positionType===`bottom`)c=-e.positionData;else{var f=e.children[0];if(f.type!==`elem`)throw Error(`First child must have type "elem".`);if(e.positionType===`shift`)c=-f.elem.depth-e.positionData;else if(e.positionType===`firstBaseline`)c=-f.elem.depth;else throw Error(`Invalid positionType `+e.positionType+`.`)}return{children:e.children,depth:c}},sW=function(e,t){for(var n=oW(e),r=n.children,i=n.depth,a=0,o=0;o<r.length;o++){var s=r[o];if(s.type===`elem`){var c=s.elem;a=Math.max(a,c.maxFontSize,c.height)}}a+=2;var l=X([`pstrut`],[]);l.style.height=V(a);for(var u=[],d=i,f=i,p=i,m=0;m<r.length;m++){var h=r[m];if(h.type===`kern`)p+=h.size;else{var g=h.elem,_=h.wrapperClasses||[],v=h.wrapperStyle||{},y=X(_,[l,g],void 0,v);y.style.top=V(-a-p-g.depth),h.marginLeft&&(y.style.marginLeft=h.marginLeft),h.marginRight&&(y.style.marginRight=h.marginRight),u.push(y),p+=g.height+g.depth}d=Math.min(d,p),f=Math.max(f,p)}var b=X([`vlist`],u);b.style.height=V(f);var x;if(d<0){var S=X([`vlist`],[X([],[])]);S.style.height=V(-d),x=[X([`vlist-r`],[b,X([`vlist-s`],[new WH(``)])]),X([`vlist-r`],[S])]}else x=[X([`vlist-r`],[b])];var C=X([`vlist-t`],x);return x.length===2&&C.classes.push(`vlist-t2`),C.height=f,C.depth=-d,C},cW=(e,t)=>{var n=X([`mspace`],[],t),r=NH(e,t);return n.style.marginRight=V(r),n},lW=(e,t,n)=>{var r,i;switch(e){case`amsrm`:r=`AMS`;break;case`textrm`:r=`Main`;break;case`textsf`:r=`SansSerif`;break;case`texttt`:r=`Typewriter`;break;default:r=e}return i=t===`textbf`&&n===`textit`?`BoldItalic`:t===`textbf`?`Bold`:n===`textit`?`Italic`:`Regular`,r+`-`+i},uW={mathbf:{variant:`bold`,fontName:`Main-Bold`},mathrm:{variant:`normal`,fontName:`Main-Regular`},textit:{variant:`italic`,fontName:`Main-Italic`},mathit:{variant:`italic`,fontName:`Main-Italic`},mathnormal:{variant:`italic`,fontName:`Math-Italic`},mathsfit:{variant:`sans-serif-italic`,fontName:`SansSerif-Italic`},mathbb:{variant:`double-struck`,fontName:`AMS-Regular`},mathcal:{variant:`script`,fontName:`Caligraphic-Regular`},mathfrak:{variant:`fraktur`,fontName:`Fraktur-Regular`},mathscr:{variant:`script`,fontName:`Script-Regular`},mathsf:{variant:`sans-serif`,fontName:`SansSerif-Regular`},mathtt:{variant:`monospace`,fontName:`Typewriter-Regular`}},dW={vec:[`vec`,.471,.714],oiintSize1:[`oiintSize1`,.957,.499],oiintSize2:[`oiintSize2`,1.472,.659],oiiintSize1:[`oiiintSize1`,1.304,.499],oiiintSize2:[`oiiintSize2`,1.98,.659]},fW=function(e,t){var n=dW[e],r=n[0],i=n[1],a=n[2],o=tW([`katex-overlay`],[new GH([new KH(r)],{width:V(i),height:V(a),style:`width:`+V(i),viewBox:`0 0 `+1e3*i+` `+1e3*a,preserveAspectRatio:`xMinYMin`})],t);return o.height=a,o.style.height=V(a),o.style.width=V(i),o},pW={number:3,unit:`mu`},mW={number:4,unit:`mu`},hW={number:5,unit:`mu`},gW={mord:{mop:pW,mbin:mW,mrel:hW,minner:pW},mop:{mord:pW,mop:pW,mrel:hW,minner:pW},mbin:{mord:mW,mop:mW,mopen:mW,minner:mW},mrel:{mord:hW,mop:hW,mopen:hW,minner:hW},mopen:{},mclose:{mop:pW,mbin:mW,mrel:hW,minner:pW},mpunct:{mord:pW,mop:pW,mrel:hW,mopen:pW,mclose:pW,mpunct:pW,minner:pW},minner:{mord:pW,mop:pW,mbin:mW,mrel:hW,mopen:pW,mpunct:pW,minner:pW}},_W={mord:{mop:pW},mop:{mord:pW,mop:pW},mbin:{},mrel:{},mopen:{},mclose:{mop:pW},mpunct:{},minner:{mop:pW}},vW={},yW={},bW={};function Z(e){for(var t=e.type,n=e.names,r=e.htmlBuilder,i=e.mathmlBuilder,a=0;a<n.length;++a)vW[n[a]]=e;t&&(r&&(yW[t]=r),i&&(bW[t]=i))}function xW(e){var t=e.type,n=e.htmlBuilder,r=e.mathmlBuilder;n&&(yW[t]=n),r&&(bW[t]=r)}var SW=function(e){return e.type===`ordgroup`&&e.body.length===1?e.body[0]:e},CW=function(e){return e.type===`ordgroup`?e.body:[e]},wW=new Set([`leftmost`,`mbin`,`mopen`,`mrel`,`mop`,`mpunct`]),TW=new Set([`rightmost`,`mrel`,`mclose`,`mpunct`]),EW={display:uH.DISPLAY,text:uH.TEXT,script:uH.SCRIPT,scriptscript:uH.SCRIPTSCRIPT},DW={mord:`mord`,mop:`mop`,mbin:`mbin`,mrel:`mrel`,mopen:`mopen`,mclose:`mclose`,mpunct:`mpunct`,minner:`minner`},OW=function(e,t,n,r){r===void 0&&(r=[null,null]);for(var i=[],a=0;a<e.length;a++){var o=PW(e[a],t);if(o instanceof kH){var s=o.children;i.push(...s)}else i.push(o)}if($U(i),!n)return i;var c=t;if(e.length===1){var l=e[0];l.type===`sizing`?c=t.havingSize(l.size):l.type===`styling`&&(c=t.havingStyle(EW[l.style]))}var u=X([r[0]||`leftmost`],[],t),d=X([r[1]||`rightmost`],[],t),f=n===`root`;return kW(i,(e,t)=>{var n=t.classes[0],r=e.classes[0];n===`mbin`&&TW.has(r)?t.classes[0]=`mord`:r===`mbin`&&wW.has(n)&&(e.classes[0]=`mord`)},{node:u},d,f),kW(i,(e,t)=>{var n=MW(t),r=MW(e),i=n&&r?e.hasClass(`mtight`)?_W[n]?.[r]:gW[n]?.[r]:null;if(i)return cW(i,c)},{node:u},d,f),i},kW=function(e,t,n,r,i){r&&e.push(r);for(var a=0;a<e.length;a++){var o=e[a],s=AW(o);if(s)kW(s.children,t,n,null,i);else{var c=!o.hasClass(`mspace`);if(c){var l=t(o,n.node);l&&(n.insertAfter?n.insertAfter(l):(e.unshift(l),a++))}c?n.node=o:i&&o.hasClass(`katex-newline`)&&(n.node=X([`leftmost`])),n.insertAfter=(t=>n=>{e.splice(t+1,0,n),a++})(a)}}r&&e.pop()},AW=function(e){return e instanceof kH||e instanceof VH||e instanceof BH&&e.hasClass(`enclosing`)?e:null},jW=function(e,t){var n=AW(e);if(n){var r=n.children;if(r.length){if(t===`right`)return jW(r[r.length-1],`right`);if(t===`left`)return jW(r[0],`left`)}}return e},MW=function(e,t){return e?(t&&(e=jW(e,t)),DW[e.classes[0]]||null):null},NW=function(e,t){var n=[`nulldelimiter`].concat(e.baseSizingClasses());return X(t.concat(n))},PW=function(e,t,n){if(!e)return X();if(yW[e.type]){var r=yW[e.type](e,t);if(n&&t.size!==n.size){r=X(t.sizingClasses(n),[r],t);var i=t.sizeMultiplier/n.sizeMultiplier;r.height*=i,r.depth*=i}return r}throw new B(`Got group of unknown type: '`+e.type+`'`)};function FW(e,t){var n=X([`katex-base`],e,t),r=X([`katex-strut`]);return r.style.height=V(n.height+n.depth),n.depth&&(r.style.verticalAlign=V(-n.depth)),n.children.unshift(r),n}function IW(e,t){var n=null;e.length===1&&e[0].type===`tag`&&(n=e[0].tag,e=e[0].body);var r=OW(e,t,`root`),i;r.length===2&&r[1].hasClass(`katex-tag`)&&(i=r.pop());for(var a=[],o=[],s=0;s<r.length;s++)if(o.push(r[s]),r[s].hasClass(`mbin`)||r[s].hasClass(`mrel`)||r[s].hasClass(`allowbreak`)){for(var c=!1;s<r.length-1&&r[s+1].hasClass(`mspace`)&&!r[s+1].hasClass(`katex-newline`);)s++,o.push(r[s]),r[s].hasClass(`nobreak`)&&(c=!0);c||(a.push(FW(o,t)),o=[])}else r[s].hasClass(`katex-newline`)&&(o.pop(),o.length>0&&(a.push(FW(o,t)),o=[]),a.push(r[s]));o.length>0&&a.push(FW(o,t));var l;n?(l=FW(OW(n,t,!0),t),l.classes=[`katex-tag`],a.push(l)):i&&a.push(i);var u=X([`katex-html`],a);if(u.setAttribute(`aria-hidden`,`true`),l){var d=l.children[0];d.style.height=V(u.height+u.depth),u.depth&&(d.style.verticalAlign=V(-u.depth))}return u}function LW(e){return new kH(e)}var Q=class{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,this.type);for(var t of Object.entries(this.attributes)){var n=t[0],r=t[1];e.setAttribute(n,r)}this.classes.length>0&&(e.className=PH(this.classes));for(var i=0;i<this.children.length;i++)if(this.children[i]instanceof RW&&this.children[i+1]instanceof RW){for(var a=this.children[i].toText()+this.children[++i].toText();this.children[i+1]instanceof RW;)a+=this.children[++i].toText();e.appendChild(new RW(a).toNode())}else e.appendChild(this.children[i].toNode());return e}toMarkup(){var e=`<`+this.type;for(var t of Object.entries(this.attributes)){var n=t[0],r=t[1];e+=` `+n+`="`,e+=RV(r),e+=`"`}this.classes.length>0&&(e+=` class ="`+RV(PH(this.classes))+`"`),e+=`>`;for(var i=0;i<this.children.length;i++)e+=this.children[i].toMarkup();return e+=`</`+this.type+`>`,e}toText(){return this.children.map(e=>e.toText()).join(``)}},RW=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return RV(this.toText())}toText(){return this.text}},zW=class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?` `:e>=.1666&&e<=.1667?` `:e>=.2222&&e<=.2223?` `:e>=.2777&&e<=.2778?` `:e>=-.05556&&e<=-.05555?` `:e>=-.1667&&e<=-.1666?` `:e>=-.2223&&e<=-.2222?` `:e>=-.2778&&e<=-.2777?` `:null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`mspace`);return e.setAttribute(`width`,V(this.width)),e}toMarkup(){return this.character?`<mtext>`+this.character+`</mtext>`:`<mspace width="`+V(this.width)+`"/>`}toText(){return this.character?this.character:` `}},BW=new Set([`\\imath`,`\\jmath`]),VW=new Set([`mrow`,`mtable`]),HW=function(e,t,n){var r,i;return iU[t][e]&&iU[t][e].replace&&e.charCodeAt(0)!==55349&&(!Object.prototype.hasOwnProperty.call(pU,e)||(n==null||(r=n.fontFamily)==null?void 0:r.slice(4,6))!==`tt`&&(n==null||(i=n.font)==null?void 0:i.slice(4,6))!==`tt`)&&(e=iU[t][e].replace),new RW(e)},UW=function(e){return e.length===1?e[0]:new Q(`mrow`,e)},WW={mathit:`italic`,boldsymbol:e=>e.type===`textord`?`bold`:`bold-italic`,mathbf:`bold`,mathbb:`double-struck`,mathsfit:`sans-serif-italic`,mathfrak:`fraktur`,mathscr:`script`,mathcal:`script`,mathsf:`sans-serif`,mathtt:`monospace`},GW=(e,t)=>{if(e.mode===`text`){if(t.fontFamily===`texttt`)return`monospace`;if(t.fontFamily===`textsf`)return t.fontShape===`textit`&&t.fontWeight===`textbf`?`sans-serif-bold-italic`:t.fontShape===`textit`?`sans-serif-italic`:t.fontWeight===`textbf`?`bold-sans-serif`:`sans-serif`;if(t.fontShape===`textit`&&t.fontWeight===`textbf`)return`bold-italic`;if(t.fontShape===`textit`)return`italic`;if(t.fontWeight===`textbf`)return`bold`}var n=t.font;if(!n||n===`mathnormal`)return null;var r=e.mode,i=WW[n];if(i)return typeof i==`function`?i(e):i;var a=e.text;if(BW.has(a))return null;if(iU[r][a]){var o=iU[r][a].replace;o&&(a=o)}var s=uW[n].fontName;return tU(a,s,r)?uW[n].variant:null};function KW(e){if(!e)return!1;if(e.type===`mi`&&e.children.length===1){var t=e.children[0];return t instanceof RW&&t.text===`.`}if(e.type===`mo`&&e.children.length===1&&e.getAttribute(`separator`)===`true`&&e.getAttribute(`lspace`)===`0em`&&e.getAttribute(`rspace`)===`0em`){var n=e.children[0];return n instanceof RW&&n.text===`,`}return!1}var qW=function(e,t,n){if(e.length===1){var r=YW(e[0],t);return n&&r instanceof Q&&r.type===`mo`&&(r.setAttribute(`lspace`,`0em`),r.setAttribute(`rspace`,`0em`)),[r]}for(var i=[],a,o=0;o<e.length;o++){var s=YW(e[o],t);if(s instanceof Q&&a instanceof Q){if(s.type===`mtext`&&a.type===`mtext`&&s.getAttribute(`mathvariant`)===a.getAttribute(`mathvariant`)||s.type===`mn`&&a.type===`mn`||KW(s)&&a.type===`mn`){a.children.push(...s.children);continue}if(s.type===`mn`&&KW(a))s.children=[...a.children,...s.children],i.pop();else if((s.type===`msup`||s.type===`msub`)&&s.children.length>=1&&(a.type===`mn`||KW(a))){var c=s.children[0];c instanceof Q&&c.type===`mn`&&(c.children=[...a.children,...c.children],i.pop())}else if(a.type===`mi`&&a.children.length===1){var l=a.children[0];if(l instanceof RW&&l.text===`̸`&&(s.type===`mo`||s.type===`mi`||s.type===`mn`)){var u=s.children[0];u instanceof RW&&u.text.length>0&&(u.text=u.text.slice(0,1)+`̸`+u.text.slice(1),i.pop())}}}i.push(s),a=s}return i},JW=function(e,t,n){return UW(qW(e,t,n))},YW=function(e,t){if(!e)return new Q(`mrow`);if(bW[e.type])return bW[e.type](e,t);throw new B(`Got group of unknown type: '`+e.type+`'`)};function XW(e,t,n,r,i){var a=qW(e,n),o=a.length===1&&a[0]instanceof Q&&VW.has(a[0].type)?a[0]:new Q(`mrow`,a),s=new Q(`annotation`,[new RW(t)]);s.setAttribute(`encoding`,`application/x-tex`);var c=new Q(`math`,[new Q(`semantics`,[o,s])]);return c.setAttribute(`xmlns`,`http://www.w3.org/1998/Math/MathML`),r&&c.setAttribute(`display`,`block`),X([i?`katex`:`katex-mathml`],[c])}var ZW=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],QW=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],$W=function(e,t){return t.size<2?e:ZW[e-1][t.size-1]},eG=class e{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.strict=void 0,this.style=t.style,this.color=t.color,this.size=t.size||e.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||``,this.fontFamily=t.fontFamily||``,this.fontWeight=t.fontWeight||``,this.fontShape=t.fontShape||``,this.sizeMultiplier=QW[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this.strict=t.strict,this._fontMetrics=void 0}extend(t){var n={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness,strict:this.strict};return Object.assign(n,t),new e(n)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:$W(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:QW[e-1]})}havingBaseStyle(t){t||=this.style.text();var n=$W(e.BASESIZE,t);return this.size===n&&this.textSize===e.BASESIZE&&this.style===t?this:this.extend({style:t,size:n})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:``})}withTextFontWeight(e){return this.extend({fontWeight:e,font:``})}withTextFontShape(e){return this.extend({fontShape:e,font:``})}sizingClasses(e){return e.size===this.size?[]:[`katex-sizing`,`reset-size`+e.size,`size`+this.size]}baseSizingClasses(){return this.size===e.BASESIZE?[]:[`katex-sizing`,`reset-size`+this.size,`size`+e.BASESIZE]}fontMetrics(){return this._fontMetrics||=rU(this.size),this._fontMetrics}getColor(){return this.phantom?`transparent`:this.color}};eG.BASESIZE=6;var tG=e=>new eG({style:e.displayMode?uH.DISPLAY:uH.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness,strict:e.strict}),nG=function(e,t){if(t.displayMode){var n=[`katex-display`];t.leqno&&n.push(`leqno`),t.fleqn&&n.push(`fleqn`),e=X(n,[e])}return e},rG=function(e,t,n){var r=tG(n),i;return n.output===`mathml`?XW(e,t,r,n.displayMode,!0):(i=n.output===`html`?X([`katex`],[IW(e,r)]):X([`katex`],[XW(e,t,r,n.displayMode,!1),IW(e,r)]),nG(i,n))},iG=function(e,t){return nG(X([`katex`],[IW(e,tG(t))]),t)},aG={widehat:`^`,widecheck:`ˇ`,widetilde:`~`,utilde:`~`,overleftarrow:`←`,underleftarrow:`←`,xleftarrow:`←`,overrightarrow:`→`,underrightarrow:`→`,xrightarrow:`→`,underbrace:`⏟`,overbrace:`⏞`,underbracket:`⎵`,overbracket:`⎴`,overgroup:`⏠`,undergroup:`⏡`,overleftrightarrow:`↔`,underleftrightarrow:`↔`,xleftrightarrow:`↔`,Overrightarrow:`⇒`,xRightarrow:`⇒`,overleftharpoon:`↼`,xleftharpoonup:`↼`,overrightharpoon:`⇀`,xrightharpoonup:`⇀`,xLeftarrow:`⇐`,xLeftrightarrow:`⇔`,xhookleftarrow:`↩`,xhookrightarrow:`↪`,xmapsto:`↦`,xrightharpoondown:`⇁`,xleftharpoondown:`↽`,xrightleftharpoons:`⇌`,xleftrightharpoons:`⇋`,xtwoheadleftarrow:`↞`,xtwoheadrightarrow:`↠`,xlongequal:`=`,xtofrom:`⇄`,xrightleftarrows:`⇄`,xrightequilibrium:`⇌`,xleftequilibrium:`⇋`,"\\cdrightarrow":`→`,"\\cdleftarrow":`←`,"\\cdlongequal":`=`},oG=function(e){var t=new Q(`mo`,[new RW(aG[e.replace(/^\\/,``)])]);return t.setAttribute(`stretchy`,`true`),t},sG={overrightarrow:[[`rightarrow`],.888,522,`xMaxYMin`],overleftarrow:[[`leftarrow`],.888,522,`xMinYMin`],underrightarrow:[[`rightarrow`],.888,522,`xMaxYMin`],underleftarrow:[[`leftarrow`],.888,522,`xMinYMin`],xrightarrow:[[`rightarrow`],1.469,522,`xMaxYMin`],"\\cdrightarrow":[[`rightarrow`],3,522,`xMaxYMin`],xleftarrow:[[`leftarrow`],1.469,522,`xMinYMin`],"\\cdleftarrow":[[`leftarrow`],3,522,`xMinYMin`],Overrightarrow:[[`doublerightarrow`],.888,560,`xMaxYMin`],xRightarrow:[[`doublerightarrow`],1.526,560,`xMaxYMin`],xLeftarrow:[[`doubleleftarrow`],1.526,560,`xMinYMin`],overleftharpoon:[[`leftharpoon`],.888,522,`xMinYMin`],xleftharpoonup:[[`leftharpoon`],.888,522,`xMinYMin`],xleftharpoondown:[[`leftharpoondown`],.888,522,`xMinYMin`],overrightharpoon:[[`rightharpoon`],.888,522,`xMaxYMin`],xrightharpoonup:[[`rightharpoon`],.888,522,`xMaxYMin`],xrightharpoondown:[[`rightharpoondown`],.888,522,`xMaxYMin`],xlongequal:[[`longequal`],.888,334,`xMinYMin`],"\\cdlongequal":[[`longequal`],3,334,`xMinYMin`],xtwoheadleftarrow:[[`twoheadleftarrow`],.888,334,`xMinYMin`],xtwoheadrightarrow:[[`twoheadrightarrow`],.888,334,`xMaxYMin`],overleftrightarrow:[[`leftarrow`,`rightarrow`],.888,522],overbrace:[[`leftbrace`,`midbrace`,`rightbrace`],1.6,548],underbrace:[[`leftbraceunder`,`midbraceunder`,`rightbraceunder`],1.6,548],underleftrightarrow:[[`leftarrow`,`rightarrow`],.888,522],xleftrightarrow:[[`leftarrow`,`rightarrow`],1.75,522],xLeftrightarrow:[[`doubleleftarrow`,`doublerightarrow`],1.75,560],xrightleftharpoons:[[`leftharpoondownplus`,`rightharpoonplus`],1.75,716],xleftrightharpoons:[[`leftharpoonplus`,`rightharpoondownplus`],1.75,716],xhookleftarrow:[[`leftarrow`,`righthook`],1.08,522],xhookrightarrow:[[`lefthook`,`rightarrow`],1.08,522],overlinesegment:[[`leftlinesegment`,`rightlinesegment`],.888,522],underlinesegment:[[`leftlinesegment`,`rightlinesegment`],.888,522],overbracket:[[`leftbracketover`,`rightbracketover`],1.6,440],underbracket:[[`leftbracketunder`,`rightbracketunder`],1.6,410],overgroup:[[`leftgroup`,`rightgroup`],.888,342],undergroup:[[`leftgroupunder`,`rightgroupunder`],.888,342],xmapsto:[[`leftmapsto`,`rightarrow`],1.5,522],xtofrom:[[`leftToFrom`,`rightToFrom`],1.75,528],xrightleftarrows:[[`baraboveleftarrow`,`rightarrowabovebar`],1.75,901],xrightequilibrium:[[`baraboveshortleftharpoon`,`rightharpoonaboveshortbar`],1.75,716],xleftequilibrium:[[`shortbaraboveleftharpoon`,`shortrightharpoonabovebar`],1.75,716]},cG=new Set([`widehat`,`widecheck`,`widetilde`,`utilde`]),lG=function(e,t){function n(){var n=4e5,r=e.label.slice(1);if(cG.has(r)&&`base`in e){var i=e.base.type===`ordgroup`?e.base.body.length:1,a,o,s;if(i>5)r===`widehat`||r===`widecheck`?(a=420,n=2364,s=.42,o=r+`4`):(a=312,n=2340,s=.34,o=`tilde4`);else{var c=[1,1,2,2,3,3][i];r===`widehat`||r===`widecheck`?(n=[0,1062,2364,2364,2364][c],a=[0,239,300,360,420][c],s=[0,.24,.3,.3,.36,.42][c],o=r+c):(n=[0,600,1033,2339,2340][c],a=[0,260,286,306,312][c],s=[0,.26,.286,.3,.306,.34][c],o=`tilde`+c)}return{span:tW([],[new GH([new KH(o)],{width:`100%`,height:V(s),viewBox:`0 0 `+n+` `+a,preserveAspectRatio:`none`})],t),minWidth:0,height:s}}var l=[],u=sG[r];if(!u)throw Error(`No SVG data for "`+r+`".`);var d=u[0],f=u[1],p=u[2],m=p/1e3,h=d.length,g,_;if(h===1){if(u.length!==4)throw Error(`Expected 4-tuple for single-path SVG data "`+r+`".`);g=[`hide-tail`],_=[u[3]]}else if(h===2)g=[`halfarrow-left`,`halfarrow-right`],_=[`xMinYMin`,`xMaxYMin`];else if(h===3)g=[`brace-left`,`brace-center`,`brace-right`],_=[`xMinYMin`,`xMidYMin`,`xMaxYMin`];else throw Error(`Correct katexImagesData or update code here to support
|
|
380
|
+
`+h+` children.`);for(var v=0;v<h;v++){var y=new GH([new KH(d[v])],{width:`400em`,height:V(m),viewBox:`0 0 `+n+` `+p,preserveAspectRatio:_[v]+` slice`}),b=tW([g[v]],[y],t);if(h===1)return{span:b,minWidth:f,height:m};b.style.height=V(m),l.push(b)}return{span:X([`katex-stretchy`],l,t),minWidth:f,height:m}}var r=n(),i=r.span,a=r.minWidth,o=r.height;return i.height=o,i.style.height=V(o),a>0&&(i.style.minWidth=V(a)),i},uG=function(e,t,n,r,i){var a,o=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(a=X([`katex-stretchy`,t],[],i),t===`fbox`){var s=i.color&&i.getColor();s&&(a.style.borderColor=s)}}else{var c=[];/^[bx]cancel$/.test(t)&&c.push(new qH({x1:`0`,y1:`0`,x2:`100%`,y2:`100%`,"stroke-width":`0.046em`})),/^x?cancel$/.test(t)&&c.push(new qH({x1:`0`,y1:`100%`,x2:`100%`,y2:`0`,"stroke-width":`0.046em`})),a=tW([],[new GH(c,{width:`100%`,height:V(o)})],i)}return a.height=o,a.style.height=V(o),a},dG=[`bin`,`close`,`inner`,`open`,`punct`,`rel`],fG=[`accent-token`,`mathord`,`op-token`,`spacing`,`textord`],pG=new Set(dG),mG=new Set(fG);function hG(e){return pG.has(e)}function gG(e,t){if(!e||e.type!==t)throw Error(`Expected node of type `+t+`, but got `+(e?`node of type `+e.type:String(e)));return e}function _G(e){var t=vG(e);if(!t)throw Error(`Expected node of symbol group type, but got `+(e?`node of type `+e.type:String(e)));return t}function vG(e){return e.type===`atom`||mG.has(e.type)?e:null}function yG(e,t,n){var r=``;for(var i of e.body)if(i.type===`textord`)r+=i.text;else if(n&&i.type===`spacing`&&i.text===` `)r+=` `;else throw new B(t,e);return r}var bG=e=>{if(e instanceof WH)return e;if(XH(e)&&e.children.length===1)return bG(e.children[0])},xG=(e,t)=>{var n,r,i;e&&e.type===`supsub`?(r=gG(e.base,`accent`),n=r.base,e.base=n,i=YH(PW(e,t)),e.base=r):(r=gG(e,`accent`),n=r.base);var a=PW(n,t.havingCrampedStyle()),o=r.isShifty&&VV(n),s=0;o&&(s=bG(a)?.skew??0);var c=r.label===`\\c`,l=c?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),u;if(r.isStretchy)u=lG(r,t),u=sW({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`elem`,elem:u,wrapperClasses:[`svg-align`],wrapperStyle:s>0?{width:`calc(100% - `+V(2*s)+`)`,marginLeft:V(2*s)}:void 0}]});else{var d,f;r.label===`\\vec`?(d=fW(`vec`,t),f=dW.vec[1]):(d=ZU({type:`textord`,mode:r.mode,text:r.label},t),d=JH(d),d.italic=0,f=d.width,c&&(l+=d.depth)),u=X([`accent-body`],[d]);var p=r.label===`\\textcircled`;p&&(u.classes.push(`accent-full`),l=a.height);var m=s;p||(m-=f/2),u.style.left=V(m),r.label===`\\textcircled`&&(u.style.top=`.2em`),u=sW({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:-l},{type:`elem`,elem:u}]})}var h=X([`mord`,`katex-accent`],[u],t);return i?(i.children[0]=h,i.height=Math.max(h.height,i.height),i.classes[0]=`mord`,i):h},SG=(e,t)=>{var n=e.isStretchy?oG(e.label):new Q(`mo`,[HW(e.label,e.mode)]),r=new Q(`mover`,[YW(e.base,t),n]);return r.setAttribute(`accent`,`true`),r},CG=new RegExp([`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`].map(e=>`\\`+e).join(`|`));Z({type:`accent`,names:[`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`,`\\widecheck`,`\\widehat`,`\\widetilde`,`\\overrightarrow`,`\\overleftarrow`,`\\Overrightarrow`,`\\overleftrightarrow`,`\\overgroup`,`\\overlinesegment`,`\\overleftharpoon`,`\\overrightharpoon`],numArgs:1,handler:(e,t)=>{var n=SW(t[0]),r=!CG.test(e.funcName),i=!r||e.funcName===`\\widehat`||e.funcName===`\\widetilde`||e.funcName===`\\widecheck`;return{type:`accent`,mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:xG,mathmlBuilder:SG}),Z({type:`accent`,names:[`\\'`,"\\`",`\\^`,`\\~`,`\\=`,`\\u`,`\\.`,`\\"`,`\\c`,`\\r`,`\\H`,`\\v`,`\\textcircled`],numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`primitive`],handler:(e,t)=>{var n=t[0],r=e.parser.mode;return r===`math`&&(KU({strict:e.parser.settings.strict,errorCode:`mathVsTextAccents`,errorMsg:`LaTeX's accent `+e.funcName+` works only in text mode`,report:!0}),r=`text`),{type:`accent`,mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}}}),Z({type:`accentUnder`,names:[`\\underleftarrow`,`\\underrightarrow`,`\\underleftrightarrow`,`\\undergroup`,`\\underlinesegment`,`\\utilde`],numArgs:1,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=t[0];return{type:`accentUnder`,mode:n.mode,label:r,base:i}},htmlBuilder:(e,t)=>{var n=PW(e.base,t),r=lG(e,t),i=e.label===`\\utilde`?.12:0;return X([`mord`,`accentunder`],[sW({positionType:`top`,positionData:n.height,children:[{type:`elem`,elem:r,wrapperClasses:[`svg-align`]},{type:`kern`,size:i},{type:`elem`,elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=oG(e.label),r=new Q(`munder`,[YW(e.base,t),n]);return r.setAttribute(`accentunder`,`true`),r}});var wG=e=>{var t=new Q(`mpadded`,e?[e]:[]);return t.setAttribute(`width`,`+0.6em`),t.setAttribute(`lspace`,`0.3em`),t};Z({type:`xArrow`,names:[`\\xleftarrow`,`\\xrightarrow`,`\\xLeftarrow`,`\\xRightarrow`,`\\xleftrightarrow`,`\\xLeftrightarrow`,`\\xhookleftarrow`,`\\xhookrightarrow`,`\\xmapsto`,`\\xrightharpoondown`,`\\xrightharpoonup`,`\\xleftharpoondown`,`\\xleftharpoonup`,`\\xrightleftharpoons`,`\\xleftrightharpoons`,`\\xlongequal`,`\\xtwoheadrightarrow`,`\\xtwoheadleftarrow`,`\\xtofrom`,`\\xrightleftarrows`,`\\xrightequilibrium`,`\\xleftequilibrium`,`\\\\cdrightarrow`,`\\\\cdleftarrow`,`\\\\cdlongequal`],numArgs:1,numOptionalArgs:1,handler(e,t,n){var r=e.parser,i=e.funcName;return{type:`xArrow`,mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,r=t.havingStyle(n.sup()),i=aW(PW(e.body,r,t),t),a=e.label.slice(0,2)===`\\x`?`x`:`cd`;i.classes.push(a+`-arrow-pad`);var o;e.below&&(r=t.havingStyle(n.sub()),o=aW(PW(e.below,r,t),t),o.classes.push(a+`-arrow-pad`));var s=lG(e,t),c=-t.fontMetrics().axisHeight+.5*s.height,l=-t.fontMetrics().axisHeight-.5*s.height-.111;(i.depth>.25||e.label===`\\xleftequilibrium`)&&(l-=i.depth);var u;if(o){var d=-t.fontMetrics().axisHeight+o.height+.5*s.height+.111;u=sW({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c,wrapperClasses:[`svg-align`]},{type:`elem`,elem:o,shift:d}]})}else u=sW({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c,wrapperClasses:[`svg-align`]}]});return X([`mrel`,`x-arrow`],[u],t)},mathmlBuilder(e,t){var n=oG(e.label);n.setAttribute(`minsize`,e.label.charAt(0)===`x`?`1.75em`:`3.0em`);var r;if(e.body){var i=wG(YW(e.body,t));r=e.below?new Q(`munderover`,[n,wG(YW(e.below,t)),i]):new Q(`mover`,[n,i])}else e.below?r=new Q(`munder`,[n,wG(YW(e.below,t))]):(r=wG(),r=new Q(`mover`,[n,r]));return r}});function TG(e,t){var n=OW(e.body,t,!0);return X([e.mclass],n,t)}function EG(e,t){var n,r=qW(e.body,t);return e.mclass===`minner`?n=new Q(`mpadded`,r):e.mclass===`mord`?e.isCharacterBox?(n=r[0],n.type=`mi`):n=new Q(`mi`,r):(e.isCharacterBox?(n=r[0],n.type=`mo`):n=new Q(`mo`,r),e.mclass===`mbin`?(n.attributes.lspace=`0.22em`,n.attributes.rspace=`0.22em`):e.mclass===`mpunct`?(n.attributes.lspace=`0em`,n.attributes.rspace=`0.17em`):(e.mclass===`mopen`||e.mclass===`mclose`)&&(n.attributes.lspace=`0em`,n.attributes.rspace=`0em`)),n}Z({type:`mclass`,names:[`\\mathord`,`\\mathbin`,`\\mathrel`,`\\mathopen`,`\\mathclose`,`\\mathpunct`,`\\mathinner`],numArgs:1,primitive:!0,handler(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:`mclass`,mode:n.mode,mclass:`m`+r.slice(5),body:CW(i),isCharacterBox:VV(i)}},htmlBuilder:TG,mathmlBuilder:EG});var DG=e=>{var t=e.type===`ordgroup`&&e.body.length?e.body[0]:e;return t.type===`atom`&&(t.family===`bin`||t.family===`rel`)?`m`+t.family:`mord`};Z({type:`mclass`,names:[`\\@binrel`],numArgs:2,handler(e,t){return{type:`mclass`,mode:e.parser.mode,mclass:DG(t[0]),body:CW(t[1]),isCharacterBox:VV(t[1])}}}),Z({type:`mclass`,names:[`\\stackrel`,`\\overset`,`\\underset`],numArgs:2,handler(e,t){var n=e.parser,r=e.funcName,i=t[1],a=t[0],o=r===`\\stackrel`?`mrel`:DG(i),s={type:`op`,mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!==`\\stackrel`,body:CW(i)},c=r===`\\underset`?{type:`supsub`,mode:a.mode,base:s,sub:a}:{type:`supsub`,mode:a.mode,base:s,sup:a};return{type:`mclass`,mode:n.mode,mclass:o,body:[c],isCharacterBox:VV(c)}}}),Z({type:`pmb`,names:[`\\pmb`],numArgs:1,allowedInText:!0,handler(e,t){return{type:`pmb`,mode:e.parser.mode,mclass:DG(t[0]),body:CW(t[0])}},htmlBuilder(e,t){var n=OW(e.body,t,!0),r=X([e.mclass],n,t);return r.style.textShadow=`0.02em 0.01em 0.04px`,r},mathmlBuilder(e,t){var n=new Q(`mstyle`,qW(e.body,t));return n.setAttribute(`style`,`text-shadow: 0.02em 0.01em 0.04px`),n}});var OG={">":`\\\\cdrightarrow`,"<":`\\\\cdleftarrow`,"=":`\\\\cdlongequal`,A:`\\uparrow`,V:`\\downarrow`,"|":`\\Vert`,".":`no arrow`},kG=()=>({type:`styling`,body:[],mode:`math`,style:`display`,resetFont:!0}),AG=e=>e.type===`textord`&&e.text===`@`,jG=(e,t)=>(e.type===`mathord`||e.type===`atom`)&&e.text===t;function MG(e,t,n){var r=OG[e];switch(r){case`\\\\cdrightarrow`:case`\\\\cdleftarrow`:return n.callFunction(r,[t[0]],[t[1]]);case`\\uparrow`:case`\\downarrow`:var i=n.callFunction(`\\\\cdleft`,[t[0]],[]),a={type:`atom`,text:r,mode:`math`,family:`rel`},o={type:`ordgroup`,mode:`math`,body:[i,n.callFunction(`\\Big`,[a],[]),n.callFunction(`\\\\cdright`,[t[1]],[])]};return n.callFunction(`\\\\cdparent`,[o],[]);case`\\\\cdlongequal`:return n.callFunction(`\\\\cdlongequal`,[],[]);case`\\Vert`:return n.callFunction(`\\Big`,[{type:`textord`,text:`\\Vert`,mode:`math`}],[]);default:return{type:`textord`,text:` `,mode:`math`}}}function NG(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set(`\\cr`,`\\\\\\relax`),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,`\\\\`)),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if(n===`&`||n===`\\\\`)e.consume();else if(n===`\\end`){t[t.length-1].length===0&&t.pop();break}else throw new B(`Expected \\\\ or \\cr or \\end`,e.nextToken)}for(var r=[],i=[r],a=0;a<t.length;a++){for(var o=t[a],s=kG(),c=0;c<o.length;c++)if(!AG(o[c]))s.body.push(o[c]);else{r.push(s),c+=1;var l=_G(o[c]).text,u=[,,];if(u[0]={type:`ordgroup`,mode:`math`,body:[]},u[1]={type:`ordgroup`,mode:`math`,body:[]},!`=|.`.includes(l)){if(`<>AV`.includes(l))for(var d=0;d<2;d++){for(var f=!0,p=c+1;p<o.length;p++){if(jG(o[p],l)){f=!1,c=p;break}if(AG(o[p]))throw new B(`Missing a `+l+` character to complete a CD arrow.`,o[p]);u[d].body.push(o[p])}if(f)throw new B(`Missing a `+l+` character to complete a CD arrow.`,o[c])}else throw new B(`Expected one of "<>AV=|." after @`,o[c])}var m={type:`styling`,body:[MG(l,u,e)],mode:`math`,style:`display`,resetFont:!0};r.push(m),s=kG()}a%2==0?r.push(s):r.shift(),r=[],i.push(r)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:`math`,body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:Array(i[0].length).fill({type:`align`,align:`c`,pregap:.25,postgap:.25}),colSeparationType:`CD`,hLinesBeforeRow:Array(i.length+1).fill([])}}Z({type:`cdlabel`,names:[`\\\\cdleft`,`\\\\cdright`],numArgs:1,handler(e,t){var n=e.parser,r=e.funcName;return{type:`cdlabel`,mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=aW(PW(e.label,n,t),t);return r.classes.push(`cd-label-`+e.side),r.style.bottom=V(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new Q(`mrow`,[YW(e.label,t)]);return n=new Q(`mpadded`,[n]),n.setAttribute(`width`,`0`),e.side===`left`&&n.setAttribute(`lspace`,`-1width`),n.setAttribute(`voffset`,`0.7em`),n=new Q(`mstyle`,[n]),n.setAttribute(`displaystyle`,`false`),n.setAttribute(`scriptlevel`,`1`),n}}),Z({type:`cdlabelparent`,names:[`\\\\cdparent`],numArgs:1,handler(e,t){return{type:`cdlabelparent`,mode:e.parser.mode,fragment:t[0]}},htmlBuilder(e,t){var n=aW(PW(e.fragment,t),t);return n.classes.push(`cd-vert-arrow`),n},mathmlBuilder(e,t){return new Q(`mrow`,[YW(e.fragment,t)])}}),Z({type:`textord`,names:[`\\@char`],numArgs:1,allowedInText:!0,handler(e,t){var n=e.parser,r=yG(gG(t[0],`ordgroup`),`\\@char has non-numeric argument`),i=parseInt(r),a;if(isNaN(i))throw new B(`\\@char has non-numeric argument `+r);if(i<0||i>1114111)throw new B(`\\@char with invalid code point `+r);return i<=65535?a=String.fromCharCode(i):(i-=65536,a=String.fromCharCode((i>>10)+55296,(i&1023)+56320)),{type:`textord`,mode:n.mode,text:a}}}),Z({type:`color`,names:[`\\textcolor`],numArgs:2,allowedInText:!0,argTypes:[`color`,`original`],handler(e,t){var n=e.parser,r=gG(t[0],`color-token`).color,i=t[1];return{type:`color`,mode:n.mode,color:r,body:CW(i)}},htmlBuilder:(e,t)=>iW(OW(e.body,t.withColor(e.color),!1)),mathmlBuilder:(e,t)=>{var n=new Q(`mstyle`,qW(e.body,t.withColor(e.color)));return n.setAttribute(`mathcolor`,e.color),n}}),Z({type:`color`,names:[`\\color`],numArgs:1,allowedInText:!0,argTypes:[`color`],handler(e,t){var n=e.parser,r=e.breakOnTokenText,i=gG(t[0],`color-token`).color;n.gullet.macros.set(`\\current@color`,i);var a=n.parseExpression(!0,r);return{type:`color`,mode:n.mode,color:i,body:a}}}),Z({type:`cr`,names:[`\\\\`],numArgs:0,numOptionalArgs:0,allowedInText:!0,handler(e){var t=e.parser,n=t.gullet.future().text===`[`?t.parseSizeGroup(!0):null,r=!t.settings.displayMode||!KU({strict:t.settings.strict,errorCode:`newLineInDisplayMode`,errorMsg:`In LaTeX, \\\\ or \\newline does nothing in display mode`,report:!1});return{type:`cr`,mode:t.mode,newLine:r,size:n&&gG(n,`size`).value}},htmlBuilder(e,t){var n=X([`mspace`],[],t);return e.newLine&&(n.classes.push(`katex-newline`),e.size&&(n.style.marginTop=V(NH(e.size,t)))),n},mathmlBuilder(e,t){var n=new Q(`mspace`);return e.newLine&&(n.setAttribute(`linebreak`,`newline`),e.size&&n.setAttribute(`height`,V(NH(e.size,t)))),n}});var PG={"\\global":`\\global`,"\\long":`\\\\globallong`,"\\\\globallong":`\\\\globallong`,"\\def":`\\gdef`,"\\gdef":`\\gdef`,"\\edef":`\\xdef`,"\\xdef":`\\xdef`,"\\let":`\\\\globallet`,"\\futurelet":`\\\\globalfuture`},FG=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new B(`Expected a control sequence`,e);return t},IG=e=>{var t=e.gullet.popToken();return t.text===`=`&&(t=e.gullet.popToken(),t.text===` `&&(t=e.gullet.popToken())),t},LG=(e,t,n,r)=>{var i=e.gullet.macros.get(n.text);i??=(n.noexpand=!0,{tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)};Z({type:`internal`,names:[`\\global`,`\\long`,`\\\\globallong`],numArgs:0,allowedInText:!0,handler(e){var t=e.parser,n=e.funcName;t.consumeSpaces();var r=t.fetch();if(PG[r.text])return(n===`\\global`||n===`\\\\globallong`)&&(r.text=PG[r.text]),gG(t.parseFunction(),`internal`);throw new B(`Invalid token after macro prefix`,r)}}),Z({type:`internal`,names:[`\\def`,`\\gdef`,`\\edef`,`\\xdef`],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var t=e.parser,n=e.funcName,r=t.gullet.popToken(),i=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new B(`Expected a control sequence`,r);for(var a=0,o,s=[[]];t.gullet.future().text!==`{`;)if(r=t.gullet.popToken(),r.text===`#`){if(t.gullet.future().text===`{`){o=t.gullet.future(),s[a].push(`{`);break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new B(`Invalid argument number "`+r.text+`"`);if(parseInt(r.text)!==a+1)throw new B(`Argument number "`+r.text+`" out of order`);a++,s.push([])}else if(r.text===`EOF`)throw new B(`Expected a macro definition`);else s[a].push(r.text);var c=t.gullet.consumeArg().tokens;return o&&c.unshift(o),(n===`\\edef`||n===`\\xdef`)&&(c=t.gullet.expandTokens(c),c.reverse()),t.gullet.macros.set(i,{tokens:c,numArgs:a,delimiters:s},n===PG[n]),{type:`internal`,mode:t.mode}}}),Z({type:`internal`,names:[`\\let`,`\\\\globallet`],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var t=e.parser,n=e.funcName,r=FG(t.gullet.popToken());return t.gullet.consumeSpaces(),LG(t,r,IG(t),n===`\\\\globallet`),{type:`internal`,mode:t.mode}}}),Z({type:`internal`,names:[`\\futurelet`,`\\\\globalfuture`],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var t=e.parser,n=e.funcName,r=FG(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return LG(t,r,a,n===`\\\\globalfuture`),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:`internal`,mode:t.mode}}});var RG=function(e,t,n){var r=tU(iU.math[e]&&iU.math[e].replace||e,t,n);if(!r)throw Error(`Unsupported symbol `+e+` and font size `+t+`.`);return r},zG=function(e,t,n,r){var i=n.havingBaseStyle(t),a=X(r.concat(i.sizingClasses(n)),[e],n),o=i.sizeMultiplier/n.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},BG=function(e,t,n){var r=t.havingBaseStyle(n),i=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push(`delimcenter`),e.style.top=V(i),e.height-=i,e.depth+=i},VG=function(e,t,n,r,i,a){var o=zG(JU(e,`Main-Regular`,i,r),t,r,a);return n&&BG(o,r,t),o},HG=function(e,t,n,r){return JU(e,`Size`+t+`-Regular`,n,r)},UG=function(e,t,n,r,i,a){var o=HG(e,t,i,r),s=zG(X([`delimsizing`,`size`+t],[o],r),uH.TEXT,r,a);return n&&BG(s,r,uH.TEXT),s},WG=function(e,t,n,r){return{type:`elem`,elem:X([`delimsizinginner`,t===`Size1-Regular`?`delim-size1`:`delim-size4`],[X([],[JU(e,t,n,r)])])}},GG=function(e,t,n){var r=ZH[`Size4-Regular`][e.charCodeAt(0)]?ZH[`Size4-Regular`][e.charCodeAt(0)][4]:ZH[`Size1-Regular`][e.charCodeAt(0)][4],i=tW([],[new GH([new KH(`inner`,TH(e,Math.round(1e3*t)))],{width:V(r),height:V(t),style:`width:`+V(r),viewBox:`0 0 `+1e3*r+` `+Math.round(1e3*t),preserveAspectRatio:`xMinYMin`})],n);return i.height=t,i.style.height=V(t),i.style.width=V(r),{type:`elem`,elem:i}},KG=.008,qG={type:`kern`,size:-1*KG},JG=new Set([`|`,`\\lvert`,`\\rvert`,`\\vert`]),YG=new Set([`\\|`,`\\lVert`,`\\rVert`,`\\Vert`]),XG=function(e,t,n,r,i,a){var o,s,c,l,u=``,d=0;o=c=l=e,s=null;var f=`Size1-Regular`;e===`\\uparrow`?c=l=`⏐`:e===`\\Uparrow`?c=l=`‖`:e===`\\downarrow`?o=c=`⏐`:e===`\\Downarrow`?o=c=`‖`:e===`\\updownarrow`?(o=`\\uparrow`,c=`⏐`,l=`\\downarrow`):e===`\\Updownarrow`?(o=`\\Uparrow`,c=`‖`,l=`\\Downarrow`):JG.has(e)?(c=`∣`,u=`vert`,d=333):YG.has(e)?(c=`∥`,u=`doublevert`,d=556):e===`[`||e===`\\lbrack`?(o=`⎡`,c=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lbrack`,d=667):e===`]`||e===`\\rbrack`?(o=`⎤`,c=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rbrack`,d=667):e===`\\lfloor`||e===`⌊`?(c=o=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lfloor`,d=667):e===`\\lceil`||e===`⌈`?(o=`⎡`,c=l=`⎢`,f=`Size4-Regular`,u=`lceil`,d=667):e===`\\rfloor`||e===`⌋`?(c=o=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rfloor`,d=667):e===`\\rceil`||e===`⌉`?(o=`⎤`,c=l=`⎥`,f=`Size4-Regular`,u=`rceil`,d=667):e===`(`||e===`\\lparen`?(o=`⎛`,c=`⎜`,l=`⎝`,f=`Size4-Regular`,u=`lparen`,d=875):e===`)`||e===`\\rparen`?(o=`⎞`,c=`⎟`,l=`⎠`,f=`Size4-Regular`,u=`rparen`,d=875):e===`\\{`||e===`\\lbrace`?(o=`⎧`,s=`⎨`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\}`||e===`\\rbrace`?(o=`⎫`,s=`⎬`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lgroup`||e===`⟮`?(o=`⎧`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\rgroup`||e===`⟯`?(o=`⎫`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lmoustache`||e===`⎰`?(o=`⎧`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):(e===`\\rmoustache`||e===`⎱`)&&(o=`⎫`,l=`⎩`,c=`⎪`,f=`Size4-Regular`);var p=RG(o,f,i),m=p.height+p.depth,h=RG(c,f,i),g=h.height+h.depth,_=RG(l,f,i),v=_.height+_.depth,y=0,b=1;if(s!==null){var x=RG(s,f,i);y=x.height+x.depth,b=2}var S=m+v+y,C=S+Math.max(0,Math.ceil((t-S)/(b*g)))*b*g,w=r.fontMetrics().axisHeight;n&&(w*=r.sizeMultiplier);var T=C/2-w,ee=[];if(u.length>0){var te=C-m-v,ne=Math.round(C*1e3),re=DH(u,Math.round(te*1e3)),E=new KH(u,re),ie=V(d/1e3),ae=V(ne/1e3),oe=tW([],[new GH([E],{width:ie,height:ae,viewBox:`0 0 `+d+` `+ne})],r);oe.height=ne/1e3,oe.style.width=ie,oe.style.height=ae,ee.push({type:`elem`,elem:oe})}else{if(ee.push(WG(l,f,i,r)),ee.push(qG),s===null){var se=C-m-v+2*KG;ee.push(GG(c,se,r))}else{var ce=(C-m-v-y)/2+2*KG;ee.push(GG(c,ce,r)),ee.push(qG),ee.push(WG(s,f,i,r)),ee.push(qG),ee.push(GG(c,ce,r))}ee.push(qG),ee.push(WG(o,f,i,r))}var le=r.havingBaseStyle(uH.TEXT);return zG(X([`delimsizing`,`mult`],[sW({positionType:`bottom`,positionData:T,children:ee})],le),uH.TEXT,r,a)},ZG=80,QG=.08,$G=function(e,t,n,r,i){return tW([`hide-tail`],[new GH([new KH(e,wH(e,r,n))],{width:`400em`,height:V(t),viewBox:`0 0 400000 `+n,preserveAspectRatio:`xMinYMin slice`})],i)},eK=function(e,t){var n=t.havingBaseSizing(),r=uK(`\\surd`,e*n.sizeMultiplier,cK,n),i=n.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,s,c,l,u;return r.type===`small`?(l=1e3+1e3*a+ZG,e<1?i=1:e<1.4&&(i=.7),s=(1+a+QG)/i,c=(1+a)/i,o=$G(`sqrtMain`,s,l,a,t),o.style.minWidth=`0.853em`,u=.833/i):r.type===`large`?(l=(1e3+ZG)*iK[r.size],c=(iK[r.size]+a)/i,s=(iK[r.size]+a+QG)/i,o=$G(`sqrtSize`+r.size,s,l,a,t),o.style.minWidth=`1.02em`,u=1/i):(s=e+a+QG,c=e+a,l=Math.floor(1e3*e+a)+ZG,o=$G(`sqrtTall`,s,l,a,t),o.style.minWidth=`0.742em`,u=1.056),o.height=c,o.style.height=V(s),{span:o,advanceWidth:u,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},tK=new Set([`(`,`\\lparen`,`)`,`\\rparen`,`[`,`\\lbrack`,`]`,`\\rbrack`,`\\{`,`\\lbrace`,`\\}`,`\\rbrace`,`\\lfloor`,`\\rfloor`,`⌊`,`⌋`,`\\lceil`,`\\rceil`,`⌈`,`⌉`,`\\surd`]),nK=new Set([`\\uparrow`,`\\downarrow`,`\\updownarrow`,`\\Uparrow`,`\\Downarrow`,`\\Updownarrow`,`|`,`\\|`,`\\vert`,`\\Vert`,`\\lvert`,`\\rvert`,`\\lVert`,`\\rVert`,`\\lgroup`,`\\rgroup`,`⟮`,`⟯`,`\\lmoustache`,`\\rmoustache`,`⎰`,`⎱`]),rK=new Set([`<`,`>`,`\\langle`,`\\rangle`,`/`,`\\backslash`,`\\lt`,`\\gt`]),iK=[0,1.2,1.8,2.4,3],aK=function(e,t,n,r,i){if(e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`),tK.has(e)||rK.has(e))return UG(e,t,!1,n,r,i);if(nK.has(e))return XG(e,iK[t],!1,n,r,i);throw new B(`Illegal delimiter: '`+e+`'`)},oK=[{type:`small`,style:uH.SCRIPTSCRIPT},{type:`small`,style:uH.SCRIPT},{type:`small`,style:uH.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4}],sK=[{type:`small`,style:uH.SCRIPTSCRIPT},{type:`small`,style:uH.SCRIPT},{type:`small`,style:uH.TEXT},{type:`stack`}],cK=[{type:`small`,style:uH.SCRIPTSCRIPT},{type:`small`,style:uH.SCRIPT},{type:`small`,style:uH.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4},{type:`stack`}],lK=function(e){if(e.type===`small`)return`Main-Regular`;if(e.type===`large`)return`Size`+e.size+`-Regular`;if(e.type===`stack`)return`Size4-Regular`;var t=e.type;throw Error(`Add support for delim type '`+t+`' here.`)},uK=function(e,t,n,r){for(var i=Math.min(2,3-r.style.size);i<n.length;i++){var a=n[i];if(a.type===`stack`)break;var o=RG(e,lK(a),`math`),s=o.height+o.depth;if(a.type===`small`){var c=r.havingBaseStyle(a.style);s*=c.sizeMultiplier}if(s>t)return a}return n[n.length-1]},dK=function(e,t,n,r,i,a){e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`);var o=rK.has(e)?oK:tK.has(e)?cK:sK,s=uK(e,t,o,r);return s.type===`small`?VG(e,s.style,n,r,i,a):s.type===`large`?UG(e,s.size,n,r,i,a):XG(e,t,n,r,i,a)},fK=function(e,t,n,r,i,a){var o=r.fontMetrics().axisHeight*r.sizeMultiplier,s=901,c=5/r.fontMetrics().ptPerEm,l=Math.max(t-o,n+o);return dK(e,Math.max(l/500*s,2*l-c),!0,r,i,a)},pK={"\\bigl":{mclass:`mopen`,size:1},"\\Bigl":{mclass:`mopen`,size:2},"\\biggl":{mclass:`mopen`,size:3},"\\Biggl":{mclass:`mopen`,size:4},"\\bigr":{mclass:`mclose`,size:1},"\\Bigr":{mclass:`mclose`,size:2},"\\biggr":{mclass:`mclose`,size:3},"\\Biggr":{mclass:`mclose`,size:4},"\\bigm":{mclass:`mrel`,size:1},"\\Bigm":{mclass:`mrel`,size:2},"\\biggm":{mclass:`mrel`,size:3},"\\Biggm":{mclass:`mrel`,size:4},"\\big":{mclass:`mord`,size:1},"\\Big":{mclass:`mord`,size:2},"\\bigg":{mclass:`mord`,size:3},"\\Bigg":{mclass:`mord`,size:4}},mK=new Set(`(,\\lparen,),\\rparen,[,\\lbrack,],\\rbrack,\\{,\\lbrace,\\},\\rbrace,\\lfloor,\\rfloor,⌊,⌋,\\lceil,\\rceil,⌈,⌉,<,>,\\langle,⟨,\\rangle,⟩,\\lt,\\gt,\\lvert,\\rvert,\\lVert,\\rVert,\\lgroup,\\rgroup,⟮,⟯,\\lmoustache,\\rmoustache,⎰,⎱,/,\\backslash,|,\\vert,\\|,\\Vert,\\uparrow,\\Uparrow,\\downarrow,\\Downarrow,\\updownarrow,\\Updownarrow,.`.split(`,`));function hK(e){return`isMiddle`in e}function gK(e,t){var n=vG(e);if(n&&mK.has(n.text))return n;throw n?new B(`Invalid delimiter '`+n.text+`' after '`+t.funcName+`'`,e):new B(`Invalid delimiter type '`+e.type+`'`,e)}Z({type:`delimsizing`,names:[`\\bigl`,`\\Bigl`,`\\biggl`,`\\Biggl`,`\\bigr`,`\\Bigr`,`\\biggr`,`\\Biggr`,`\\bigm`,`\\Bigm`,`\\biggm`,`\\Biggm`,`\\big`,`\\Big`,`\\bigg`,`\\Bigg`],numArgs:1,argTypes:[`primitive`],handler:(e,t)=>{var n=gK(SW(t[0]),e);return{type:`delimsizing`,mode:e.parser.mode,size:pK[e.funcName].size,mclass:pK[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim===`.`?X([e.mclass]):aK(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!==`.`&&t.push(HW(e.delim,e.mode));var n=new Q(`mo`,t);e.mclass===`mopen`||e.mclass===`mclose`?n.setAttribute(`fence`,`true`):n.setAttribute(`fence`,`false`),n.setAttribute(`stretchy`,`true`);var r=V(iK[e.size]);return n.setAttribute(`minsize`,r),n.setAttribute(`maxsize`,r),n}});function _K(e){if(!e.body)throw Error(`Bug: The leftright ParseNode wasn't fully parsed.`)}Z({type:`leftright-right`,names:[`\\right`],numArgs:1,primitive:!0,handler:(e,t)=>{var n=e.parser.gullet.macros.get(`\\current@color`);if(n&&typeof n!=`string`)throw new B(`\\current@color set to non-string in \\right`);return{type:`leftright-right`,mode:e.parser.mode,delim:gK(t[0],e).text,color:n}}}),Z({type:`leftright`,names:[`\\left`],numArgs:1,primitive:!0,handler:(e,t)=>{var n=gK(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect(`\\right`,!1);var a=gG(r.parseFunction(),`leftright-right`);return{type:`leftright`,mode:r.mode,body:i,left:n.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{_K(e);for(var n=OW(e.body,t,!0,[`mopen`,`mclose`]),r=0,i=0,a=!1,o=0;o<n.length;o++){var s=n[o];hK(s)?a=!0:(r=Math.max(n[o].height,r),i=Math.max(n[o].depth,i))}r*=t.sizeMultiplier,i*=t.sizeMultiplier;var c=e.left===`.`?NW(t,[`mopen`]):fK(e.left,r,i,t,e.mode,[`mopen`]);if(n.unshift(c),a)for(var l=1;l<n.length;l++){var u=n[l];if(hK(u)){var d=u.isMiddle;n[l]=fK(d.delim,r,i,d.options,e.mode,[])}}var f;if(e.right===`.`)f=NW(t,[`mclose`]);else{var p=e.rightColor?t.withColor(e.rightColor):t;f=fK(e.right,r,i,p,e.mode,[`mclose`])}return n.push(f),X([`minner`],n,t)},mathmlBuilder:(e,t)=>{_K(e);var n=qW(e.body,t);if(e.left!==`.`){var r=new Q(`mo`,[HW(e.left,e.mode)]);r.setAttribute(`fence`,`true`),n.unshift(r)}if(e.right!==`.`){var i=new Q(`mo`,[HW(e.right,e.mode)]);i.setAttribute(`fence`,`true`),e.rightColor&&i.setAttribute(`mathcolor`,e.rightColor),n.push(i)}return UW(n)}}),Z({type:`middle`,names:[`\\middle`],numArgs:1,primitive:!0,handler:(e,t)=>{var n=gK(t[0],e);if(!e.parser.leftrightDepth)throw new B(`\\middle without preceding \\left`,n);return{type:`middle`,mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;return e.delim===`.`?n=NW(t,[]):(n=aK(e.delim,1,t,e.mode,[]),n.isMiddle={delim:e.delim,options:t}),n},mathmlBuilder:(e,t)=>{var n=new Q(`mo`,[e.delim===`\\vert`||e.delim===`|`?HW(`|`,`text`):HW(e.delim,e.mode)]);return n.setAttribute(`fence`,`true`),n.setAttribute(`lspace`,`0.05em`),n.setAttribute(`rspace`,`0.05em`),n}}),Z({type:`enclose`,names:[`\\colorbox`],numArgs:2,allowedInText:!0,argTypes:[`color`,`hbox`],handler(e,t,n){var r=e.parser,i=e.funcName,a=gG(t[0],`color-token`).color,o=t[1];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:a,body:o}},htmlBuilder:(e,t)=>{var n=aW(PW(e.body,t),t),r=e.label.slice(1),i=t.sizeMultiplier,a,o,s=VV(e.body);if(r===`sout`)a=X([`katex-stretchy`,`katex-sout`]),a.height=t.fontMetrics().defaultRuleThickness/i,o=-.5*t.fontMetrics().xHeight;else if(r===`phase`){var c=NH({number:.6,unit:`pt`},t),l=NH({number:.35,unit:`ex`},t),u=t.havingBaseSizing();i/=u.sizeMultiplier;var d=n.height+n.depth+c+l;n.style.paddingLeft=V(d/2+c);var f=Math.floor(1e3*d*i);a=tW([`hide-tail`],[new GH([new KH(`phase`,SH(f))],{width:`400em`,height:V(f/1e3),viewBox:`0 0 400000 `+f,preserveAspectRatio:`xMinYMin slice`})],t),a.style.height=V(d),o=n.depth+c+l}else{/cancel/.test(r)?s||n.classes.push(`cancel-pad`):r===`angl`?n.classes.push(`anglpad`):n.classes.push(`boxpad`);var p,m,h=0;/box/.test(r)?(h=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),p=t.fontMetrics().fboxsep+(r===`colorbox`?0:h),m=p):r===`angl`?(h=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),p=4*h,m=Math.max(0,.25-n.depth)):(p=s?.2:0,m=p),a=uG(n,r,p,m,t),/fbox|boxed|fcolorbox/.test(r)?(a.style.borderStyle=`solid`,a.style.borderWidth=V(h)):r===`angl`&&h!==.049&&(a.style.borderTopWidth=V(h),a.style.borderRightWidth=V(h)),o=n.depth+m,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var g;if(e.backgroundColor)g=sW({positionType:`individualShift`,children:[{type:`elem`,elem:a,shift:o},{type:`elem`,elem:n,shift:0}]});else{var _=/cancel|phase/.test(r)?[`svg-align`]:[];g=sW({positionType:`individualShift`,children:[{type:`elem`,elem:n,shift:0},{type:`elem`,elem:a,shift:o,wrapperClasses:_}]})}return/cancel/.test(r)&&(g.height=n.height,g.depth=n.depth),/cancel/.test(r)&&!s?X([`mord`,`cancel-lap`],[g],t):X([`mord`],[g],t)},mathmlBuilder:(e,t)=>{var n,r=new Q(e.label.includes(`colorbox`)?`mpadded`:`menclose`,[YW(e.body,t)]);switch(e.label){case`\\cancel`:r.setAttribute(`notation`,`updiagonalstrike`);break;case`\\bcancel`:r.setAttribute(`notation`,`downdiagonalstrike`);break;case`\\phase`:r.setAttribute(`notation`,`phasorangle`);break;case`\\sout`:r.setAttribute(`notation`,`horizontalstrike`);break;case`\\fbox`:r.setAttribute(`notation`,`box`);break;case`\\angl`:r.setAttribute(`notation`,`actuarial`);break;case`\\fcolorbox`:case`\\colorbox`:if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute(`width`,`+`+2*n+`pt`),r.setAttribute(`height`,`+`+2*n+`pt`),r.setAttribute(`lspace`,n+`pt`),r.setAttribute(`voffset`,n+`pt`),e.label===`\\fcolorbox`){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute(`style`,`border: `+V(i)+` solid `+e.borderColor)}break;case`\\xcancel`:r.setAttribute(`notation`,`updiagonalstrike downdiagonalstrike`)}return e.backgroundColor&&r.setAttribute(`mathbackground`,e.backgroundColor),r}}),Z({type:`enclose`,names:[`\\fcolorbox`],numArgs:3,allowedInText:!0,argTypes:[`color`,`color`,`hbox`],handler(e,t,n){var r=e.parser,i=e.funcName,a=gG(t[0],`color-token`).color,o=gG(t[1],`color-token`).color,s=t[2];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:o,borderColor:a,body:s}}}),Z({type:`enclose`,names:[`\\fbox`],numArgs:1,argTypes:[`hbox`],allowedInText:!0,handler(e,t){return{type:`enclose`,mode:e.parser.mode,label:`\\fbox`,body:t[0]}}}),Z({type:`enclose`,names:[`\\cancel`,`\\bcancel`,`\\xcancel`,`\\phase`],numArgs:1,handler(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}}}),Z({type:`enclose`,names:[`\\sout`],numArgs:1,allowedInText:!0,handler(e,t){var n=e.parser,r=e.funcName;n.mode===`math`&&KU({strict:n.settings.strict,errorCode:`mathVsSout`,errorMsg:`LaTeX's \\sout works only in text mode`,report:!0});var i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}}}),Z({type:`enclose`,names:[`\\angl`],numArgs:1,argTypes:[`hbox`],allowedInText:!1,handler(e,t){return{type:`enclose`,mode:e.parser.mode,label:`\\angl`,body:t[0]}}});var vK={};function yK(e){for(var t=e.type,n=e.names,r=e.props,i=e.handler,a=e.htmlBuilder,o=e.mathmlBuilder,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},c=0;c<n.length;++c)vK[n[c]]=s;a&&(yW[t]=a),o&&(bW[t]=o)}var bK={};function $(e,t){bK[e]=t}var xK=class e{constructor(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}static range(t,n){return n?!t||!t.loc||!n.loc||t.loc.lexer!==n.loc.lexer?null:new e(t.loc.lexer,t.loc.start,n.loc.end):t&&t.loc}},SK=class e{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(t,n){return new e(n,xK.range(this,t))}};function CK(e){var t=[];e.consumeSpaces();var n=e.fetch().text;for(n===`\\relax`&&(e.consume(),e.consumeSpaces(),n=e.fetch().text);n===`\\hline`||n===`\\hdashline`;)e.consume(),t.push(n===`\\hdashline`),e.consumeSpaces(),n=e.fetch().text;return t}var wK=e=>{if(!e.parser.settings.displayMode)throw new B(`{`+e.envName+`} can be used only in display mode.`)},TK=new Set([`gather`,`gather*`]);function EK(e){if(!e.includes(`ed`))return!e.includes(`*`)}function DK(e,t,n){var r=t.hskipBeforeAndAfter,i=t.addJot,a=t.cols,o=t.arraystretch,s=t.colSeparationType,c=t.autoTag,l=t.singleRow,u=t.emptySingleRow,d=t.maxNumCols,f=t.leqno;if(e.gullet.beginGroup(),l||e.gullet.macros.set(`\\cr`,`\\\\\\relax`),!o){var p=e.gullet.expandMacroAsText(`\\arraystretch`);if(p==null)o=1;else if(o=parseFloat(p),!o||o<0)throw new B(`Invalid \\arraystretch: `+p)}e.gullet.beginGroup();var m=[],h=[m],g=[],_=[],v=c==null?void 0:[];function y(){c&&e.gullet.macros.set(`\\@eqnsw`,`1`,!0)}function b(){v&&(e.gullet.macros.get(`\\df@tag`)?(v.push(e.subparse([new SK(`\\df@tag`)])),e.gullet.macros.set(`\\df@tag`,void 0,!0)):v.push(!!c&&e.gullet.macros.get(`\\@eqnsw`)===`1`))}for(y(),_.push(CK(e));;){var x=e.parseExpression(!1,l?`\\end`:`\\\\`);e.gullet.endGroup(),e.gullet.beginGroup();var S={type:`ordgroup`,mode:e.mode,body:x};n&&(S={type:`styling`,mode:e.mode,style:n,resetFont:!0,body:[S]}),m.push(S);var C=e.fetch().text;if(C===`&`){if(d&&m.length===d){if(l||s)throw new B(`Too many tab characters: &`,e.nextToken);KU({strict:e.settings.strict,errorCode:`textEnv`,errorMsg:`Too few columns specified in the {array} column argument.`,report:!0})}e.consume()}else if(C===`\\end`){b(),m.length===1&&S.type===`styling`&&S.body.length===1&&S.body[0].type===`ordgroup`&&S.body[0].body.length===0&&(h.length>1||!u)&&!Array.isArray(v?.[v.length-1])&&!(c&&v?.[v.length-1]===!0)&&h.pop(),_.length<h.length+1&&_.push([]);break}else if(C===`\\\\`){e.consume();var w=void 0;e.gullet.future().text!==` `&&(w=e.parseSizeGroup(!0)),g.push(w?w.value:null),b(),_.push(CK(e)),m=[],h.push(m),y()}else throw new B(`Expected & or \\\\ or \\cr or \\end`,e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:e.mode,addJot:i,arraystretch:o,body:h,cols:a,rowGaps:g,hskipBeforeAndAfter:r,hLinesBeforeRow:_,colSeparationType:s,tags:v,leqno:f}}function OK(e){return e.slice(0,1)===`d`?`display`:`text`}var kK=function(e,t){var n,r,i=e.body.length,a=e.hLinesBeforeRow,o=0,s=Array(i),c=[],l=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),u=1/t.fontMetrics().ptPerEm,d=5*u;e.colSeparationType&&e.colSeparationType===`small`&&(d=.2778*(t.havingStyle(uH.SCRIPT).sizeMultiplier/t.sizeMultiplier));var f=e.colSeparationType===`CD`?NH({number:3,unit:`ex`},t):12*u,p=3*u,m=e.arraystretch*f,h=.7*m,g=.3*m,_=0;function v(e){for(var t=0;t<e.length;++t)t>0&&(_+=.25),c.push({pos:_,isDashed:e[t]})}for(v(a[0]),n=0;n<e.body.length;++n){var y=e.body[n],b=h,x=g;o<y.length&&(o=y.length);var S={cells:Array(y.length),height:0,depth:0,pos:0};for(r=0;r<y.length;++r){var C=PW(y[r],t);x<C.depth&&(x=C.depth),b<C.height&&(b=C.height),S.cells[r]=C}var w=e.rowGaps[n],T=0;w&&(T=NH(w,t),T>0&&(T+=g,x<T&&(x=T),T=0)),e.addJot&&n<e.body.length-1&&(x+=p),S.height=b,S.depth=x,_+=b,S.pos=_,_+=x+T,s[n]=S,v(a[n+1])}var ee=_/2+t.fontMetrics().axisHeight,te=e.cols||[],ne=[],re,E,ie=[];if(e.tags&&e.tags.some(e=>e))for(n=0;n<i;++n){var ae=s[n],oe=ae.pos-ee,se=e.tags[n],ce=void 0;ce=se===!0?X([`eqn-num`],[],t):se===!1?X([],[],t):X([],OW(se,t,!0),t),ce.depth=ae.depth,ce.height=ae.height,ie.push({type:`elem`,elem:ce,shift:oe})}for(r=0,E=0;r<o||E<te.length;++r,++E){for(var le=te[E],ue=!0;(de=le)?.type===`separator`;){var de;if(ue||(re=X([`arraycolsep`],[]),re.style.width=V(t.fontMetrics().doubleRuleSep),ne.push(re)),le.separator===`|`||le.separator===`:`){var fe=le.separator===`|`?`solid`:`dashed`,pe=X([`vertical-separator`],[],t);pe.style.height=V(_),pe.style.borderRightWidth=V(l),pe.style.borderRightStyle=fe,pe.style.margin=`0 `+V(-l/2);var me=_-ee;me&&(pe.style.verticalAlign=V(-me)),ne.push(pe)}else throw new B(`Invalid separator type: `+le.separator);E++,le=te[E],ue=!1}if(!(r>=o)){var he=void 0;(r>0||e.hskipBeforeAndAfter)&&(he=le?.pregap??d,he!==0&&(re=X([`arraycolsep`],[]),re.style.width=V(he),ne.push(re)));var ge=[];for(n=0;n<i;++n){var _e=s[n],ve=_e.cells[r];if(ve){var ye=_e.pos-ee;ve.depth=_e.depth,ve.height=_e.height,ge.push({type:`elem`,elem:ve,shift:ye})}}var be=sW({positionType:`individualShift`,children:ge}),xe=X([`col-align-`+(le?.align||`c`)],[be]);ne.push(xe),(r<o-1||e.hskipBeforeAndAfter)&&(he=le?.postgap??d,he!==0&&(re=X([`arraycolsep`],[]),re.style.width=V(he),ne.push(re)))}}var D=X([`mtable`],ne);if(c.length>0){for(var O=nW(`katex-hline`,t,l),Se=nW(`katex-hdashline`,t,l),Ce=[{type:`elem`,elem:D,shift:0}];c.length>0;){var we=c.pop(),Te=we.pos-ee;we.isDashed?Ce.push({type:`elem`,elem:Se,shift:Te}):Ce.push({type:`elem`,elem:O,shift:Te})}D=sW({positionType:`individualShift`,children:Ce})}if(ie.length===0)return X([`mord`],[D],t);var Ee=X([`katex-tag`],[sW({positionType:`individualShift`,children:ie})],t);return iW([D,Ee])},AK={c:`center `,l:`left `,r:`right `},jK=function(e,t){for(var n=[],r=new Q(`mtd`,[],[`mtr-glue`]),i=new Q(`mtd`,[],[`mml-eqn-num`]),a=0;a<e.body.length;a++){for(var o=e.body[a],s=[],c=0;c<o.length;c++)s.push(new Q(`mtd`,[YW(o[c],t)]));e.tags&&e.tags[a]&&(s.unshift(r),s.push(r),e.leqno?s.unshift(i):s.push(i)),n.push(new Q(`mtr`,s))}var l=new Q(`mtable`,n),u=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);l.setAttribute(`rowspacing`,V(u));var d=``,f=``;if(e.cols&&e.cols.length>0){var p=e.cols,m=``,h=!1,g=0,_=p.length;p[0].type===`separator`&&(d+=`top `,g=1),p[p.length-1].type===`separator`&&(d+=`bottom `,--_);for(var v=g;v<_;v++){var y=p[v];y.type===`align`?(f+=AK[y.align],h&&(m+=`none `),h=!0):y.type===`separator`&&(h&&=(m+=y.separator===`|`?`solid `:`dashed `,!1))}l.setAttribute(`columnalign`,f.trim()),/[sd]/.test(m)&&l.setAttribute(`columnlines`,m.trim())}if(e.colSeparationType===`align`){for(var b=e.cols||[],x=``,S=1;S<b.length;S++)x+=S%2?`0em `:`1em `;l.setAttribute(`columnspacing`,x.trim())}else e.colSeparationType===`alignat`||e.colSeparationType===`gather`?l.setAttribute(`columnspacing`,`0em`):e.colSeparationType===`small`?l.setAttribute(`columnspacing`,`0.2778em`):e.colSeparationType===`CD`?l.setAttribute(`columnspacing`,`0.5em`):l.setAttribute(`columnspacing`,`1em`);var C=``,w=e.hLinesBeforeRow;d+=w[0].length>0?`left `:``,d+=w[w.length-1].length>0?`right `:``;for(var T=1;T<w.length-1;T++)C+=w[T].length===0?`none `:w[T][0]?`dashed `:`solid `;return/[sd]/.test(C)&&l.setAttribute(`rowlines`,C.trim()),d!==``&&(l=new Q(`menclose`,[l]),l.setAttribute(`notation`,d.trim())),e.arraystretch&&e.arraystretch<1&&(l=new Q(`mstyle`,[l]),l.setAttribute(`scriptlevel`,`1`)),l},MK=function(e,t){e.envName.includes(`ed`)||wK(e);var n=[],r=e.envName===`split`,i=DK(e.parser,{cols:n,addJot:!0,autoTag:r?void 0:EK(e.envName),emptySingleRow:!0,colSeparationType:e.envName.includes(`at`)?`alignat`:`align`,maxNumCols:r?2:void 0,leqno:e.parser.settings.leqno},`display`),a=0,o=0,s={type:`ordgroup`,mode:e.mode,body:[]};if(t[0]&&t[0].type===`ordgroup`){var c=`Number of columns should be a positive integer`,l=yG(t[0],c);if(!/^[0-9]+$/.test(l)||Number(l)<1)throw new B(c,t[0]);a=Number(l),o=a*2}var u=!o;i.body.forEach(function(e){for(var t=1;t<e.length;t+=2)gG(gG(e[t],`styling`).body[0],`ordgroup`).body.unshift(s);if(u)o<e.length&&(o=e.length);else{var n=e.length/2;if(a<n)throw new B(`Too many math in a row: `+(`expected `+a+`, but got `+n),e[0])}});for(var d=0;d<o;++d){var f=`r`,p=0;d%2==1?f=`l`:d>0&&u&&(p=1),n[d]={type:`align`,align:f,pregap:p,postgap:0}}return i.colSeparationType=u?`align`:`alignat`,i};yK({type:`array`,names:[`array`,`darray`],props:{numArgs:1},handler(e,t){var n=(vG(t[0])?[t[0]]:gG(t[0],`ordgroup`).body).map(function(e){var t=_G(e).text;if(`lcr`.includes(t))return{type:`align`,align:t};if(t===`|`)return{type:`separator`,separator:`|`};if(t===`:`)return{type:`separator`,separator:`:`};throw new B(`Unknown column alignment: `+t,e)}),r={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return DK(e.parser,r,OK(e.envName))},htmlBuilder:kK,mathmlBuilder:jK}),yK({type:`array`,names:[`matrix`,`pmatrix`,`bmatrix`,`Bmatrix`,`vmatrix`,`Vmatrix`,`matrix*`,`pmatrix*`,`bmatrix*`,`Bmatrix*`,`vmatrix*`,`Vmatrix*`],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:[`(`,`)`],bmatrix:[`[`,`]`],Bmatrix:[`\\{`,`\\}`],vmatrix:[`|`,`|`],Vmatrix:[`\\Vert`,`\\Vert`]}[e.envName.replace(`*`,``)],n=`c`,r={hskipBeforeAndAfter:!1,cols:[{type:`align`,align:n}]};if(e.envName.charAt(e.envName.length-1)===`*`){var i=e.parser;if(i.consumeSpaces(),i.fetch().text===`[`){if(i.consume(),i.consumeSpaces(),n=i.fetch().text,!`lcr`.includes(n))throw new B(`Expected l or c or r`,i.nextToken);i.consume(),i.consumeSpaces(),i.expect(`]`),i.consume(),r.cols=[{type:`align`,align:n}]}}var a=DK(e.parser,r,OK(e.envName)),o=Math.max(0,...a.body.map(e=>e.length));return a.cols=Array(o).fill({type:`align`,align:n}),t?{type:`leftright`,mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:kK,mathmlBuilder:jK}),yK({type:`array`,names:[`smallmatrix`],props:{numArgs:0},handler(e){var t=DK(e.parser,{arraystretch:.5},`script`);return t.colSeparationType=`small`,t},htmlBuilder:kK,mathmlBuilder:jK}),yK({type:`array`,names:[`subarray`],props:{numArgs:1},handler(e,t){var n=(vG(t[0])?[t[0]]:gG(t[0],`ordgroup`).body).map(function(e){var t=_G(e).text;if(`lc`.includes(t))return{type:`align`,align:t};throw new B(`Unknown column alignment: `+t,e)});if(n.length>1)throw new B(`{subarray} can contain only one column`);var r={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5},i=DK(e.parser,r,`script`);if(i.body.length>0&&i.body[0].length>1)throw new B(`{subarray} can contain only one column`);return i},htmlBuilder:kK,mathmlBuilder:jK}),yK({type:`array`,names:[`cases`,`dcases`,`rcases`,`drcases`],props:{numArgs:0},handler(e){var t=DK(e.parser,{arraystretch:1.2,cols:[{type:`align`,align:`l`,pregap:0,postgap:1},{type:`align`,align:`l`,pregap:0,postgap:0}]},OK(e.envName));return{type:`leftright`,mode:e.mode,body:[t],left:e.envName.includes(`r`)?`.`:`\\{`,right:e.envName.includes(`r`)?`\\}`:`.`,rightColor:void 0}},htmlBuilder:kK,mathmlBuilder:jK}),yK({type:`array`,names:[`align`,`align*`,`aligned`,`split`],props:{numArgs:0},handler:MK,htmlBuilder:kK,mathmlBuilder:jK}),yK({type:`array`,names:[`gathered`,`gather`,`gather*`],props:{numArgs:0},handler(e){TK.has(e.envName)&&wK(e);var t={cols:[{type:`align`,align:`c`}],addJot:!0,colSeparationType:`gather`,autoTag:EK(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return DK(e.parser,t,`display`)},htmlBuilder:kK,mathmlBuilder:jK}),yK({type:`array`,names:[`alignat`,`alignat*`,`alignedat`],props:{numArgs:1},handler:MK,htmlBuilder:kK,mathmlBuilder:jK}),yK({type:`array`,names:[`equation`,`equation*`],props:{numArgs:0},handler(e){wK(e);var t={autoTag:EK(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return DK(e.parser,t,`display`)},htmlBuilder:kK,mathmlBuilder:jK}),yK({type:`array`,names:[`CD`],props:{numArgs:0},handler(e){return wK(e),NG(e.parser)},htmlBuilder:kK,mathmlBuilder:jK}),$(`\\nonumber`,`\\gdef\\@eqnsw{0}`),$(`\\notag`,`\\nonumber`),Z({type:`text`,names:[`\\hline`,`\\hdashline`],numArgs:0,allowedInText:!0,allowedInMath:!0,handler(e,t){throw new B(e.funcName+` valid only within array environment`)}});var NK=vK;Z({type:`environment`,names:[`\\begin`,`\\end`],numArgs:1,argTypes:[`text`],handler(e,t){var n=e.parser,r=e.funcName,i=t[0];if(i.type!==`ordgroup`)throw new B(`Invalid environment name`,i);var a=yG(i,`Environment name should contain only text characters and spaces`,!0);if(r===`\\begin`){if(!Object.prototype.hasOwnProperty.call(NK,a))throw new B(`No such environment: `+a,i);var o=NK[a],s=n.parseArguments(`\\begin{`+a+`}`,o),c=s.args,l=s.optArgs,u={mode:n.mode,envName:a,parser:n},d=o.handler(u,c,l);n.expect(`\\end`,!1);var f=n.nextToken,p=gG(n.parseFunction(),`environment`);if(p.name!==a)throw new B(`Mismatch: \\begin{`+a+`} matched by \\end{`+p.name+`}`,f);return d}return{type:`environment`,mode:n.mode,name:a,nameGroup:i}}});var PK=(e,t)=>{var n=e.font,r=t.withFont(n);return PW(e.body,r)},FK=(e,t)=>{var n=e.font,r=t.withFont(n);return YW(e.body,r)},IK={"\\Bbb":`\\mathbb`,"\\bold":`\\mathbf`,"\\frak":`\\mathfrak`};Z({type:`font`,names:[`\\mathrm`,`\\mathit`,`\\mathbf`,`\\mathnormal`,`\\mathsfit`,`\\mathbb`,`\\mathcal`,`\\mathfrak`,`\\mathscr`,`\\mathsf`,`\\mathtt`,`\\Bbb`,`\\bold`,`\\frak`],numArgs:1,allowedInArgument:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=SW(t[0]),a=r in IK?IK[r]:r;return{type:`font`,mode:n.mode,font:a.slice(1),body:i}},htmlBuilder:PK,mathmlBuilder:FK}),Z({type:`mclass`,names:[`\\boldsymbol`,`\\bm`],numArgs:1,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:`mclass`,mode:n.mode,mclass:DG(r),body:[{type:`font`,mode:n.mode,font:`boldsymbol`,body:r}],isCharacterBox:VV(r)}}}),Z({type:`font`,names:[`\\rm`,`\\sf`,`\\tt`,`\\bf`,`\\it`,`\\cal`],numArgs:0,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=e.breakOnTokenText,a=n.mode,o=n.parseExpression(!0,i);return{type:`font`,mode:a,font:`math`+r.slice(1),body:{type:`ordgroup`,mode:n.mode,body:o}}}});var LK=(e,t)=>{var n=t.style,r=n.fracNum(),i=n.fracDen(),a=t.havingStyle(r),o=PW(e.numer,a,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,c=3.5/t.fontMetrics().ptPerEm;o.height=o.height<s?s:o.height,o.depth=o.depth<c?c:o.depth}a=t.havingStyle(i);var l=PW(e.denom,a,t),u,d,f;e.hasBarLine?(e.barSize?(d=NH(e.barSize,t),u=nW(`frac-line`,t,d)):u=nW(`frac-line`,t),d=u.height,f=u.height):(u=null,d=0,f=t.fontMetrics().defaultRuleThickness);var p,m,h;n.size===uH.DISPLAY.size?(p=t.fontMetrics().num1,m=d>0?3*f:7*f,h=t.fontMetrics().denom1):(d>0?(p=t.fontMetrics().num2,m=f):(p=t.fontMetrics().num3,m=3*f),h=t.fontMetrics().denom2);var g;if(u){var _=t.fontMetrics().axisHeight;p-o.depth-(_+.5*d)<m&&(p+=m-(p-o.depth-(_+.5*d))),_-.5*d-(l.height-h)<m&&(h+=m-(_-.5*d-(l.height-h)));var v=-(_-.5*d);g=sW({positionType:`individualShift`,children:[{type:`elem`,elem:l,shift:h},{type:`elem`,elem:u,shift:v},{type:`elem`,elem:o,shift:-p}]})}else{var y=p-o.depth-(l.height-h);y<m&&(p+=.5*(m-y),h+=.5*(m-y)),g=sW({positionType:`individualShift`,children:[{type:`elem`,elem:l,shift:h},{type:`elem`,elem:o,shift:-p}]})}a=t.havingStyle(n),g.height*=a.sizeMultiplier/t.sizeMultiplier,g.depth*=a.sizeMultiplier/t.sizeMultiplier;var b=n.size===uH.DISPLAY.size?t.fontMetrics().delim1:n.size===uH.SCRIPTSCRIPT.size?t.havingStyle(uH.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,x=e.leftDelim==null?NW(t,[`mopen`]):dK(e.leftDelim,b,!0,t.havingStyle(n),e.mode,[`mopen`]),S=e.continued?X([]):e.rightDelim==null?NW(t,[`mclose`]):dK(e.rightDelim,b,!0,t.havingStyle(n),e.mode,[`mclose`]);return X([`mord`].concat(a.sizingClasses(t)),[x,X([`mfrac`],[g]),S],t)},RK=(e,t)=>{var n=new Q(`mfrac`,[YW(e.numer,t),YW(e.denom,t)]);if(!e.hasBarLine)n.setAttribute(`linethickness`,`0px`);else if(e.barSize){var r=NH(e.barSize,t);n.setAttribute(`linethickness`,V(r))}if(e.leftDelim!=null||e.rightDelim!=null){var i=[];if(e.leftDelim!=null){var a=new Q(`mo`,[new RW(e.leftDelim.replace(`\\`,``))]);a.setAttribute(`fence`,`true`),i.push(a)}if(i.push(n),e.rightDelim!=null){var o=new Q(`mo`,[new RW(e.rightDelim.replace(`\\`,``))]);o.setAttribute(`fence`,`true`),i.push(o)}return UW(i)}return n},zK=(e,t)=>t?{type:`styling`,mode:e.mode,style:t,body:[e]}:e;Z({type:`genfrac`,names:[`\\cfrac`,`\\dfrac`,`\\frac`,`\\tfrac`,`\\dbinom`,`\\binom`,`\\tbinom`,`\\\\atopfrac`,`\\\\bracefrac`,`\\\\brackfrac`],numArgs:2,allowedInArgument:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=t[0],a=t[1],o,s=null,c=null;switch(r){case`\\cfrac`:case`\\dfrac`:case`\\frac`:case`\\tfrac`:o=!0;break;case`\\\\atopfrac`:o=!1;break;case`\\dbinom`:case`\\binom`:case`\\tbinom`:o=!1,s=`(`,c=`)`;break;case`\\\\bracefrac`:o=!1,s=`\\{`,c=`\\}`;break;case`\\\\brackfrac`:o=!1,s=`[`,c=`]`;break;default:throw Error(`Unrecognized genfrac command`)}var l=r===`\\cfrac`,u=null;return l||r.startsWith(`\\d`)?u=`display`:r.startsWith(`\\t`)&&(u=`text`),zK({type:`genfrac`,mode:n.mode,numer:i,denom:a,continued:l,hasBarLine:o,leftDelim:s,rightDelim:c,barSize:null},u)},htmlBuilder:LK,mathmlBuilder:RK}),Z({type:`infix`,names:[`\\over`,`\\choose`,`\\atop`,`\\brace`,`\\brack`],numArgs:0,infix:!0,handler(e){var t=e.parser,n=e.funcName,r=e.token,i;switch(n){case`\\over`:i=`\\frac`;break;case`\\choose`:i=`\\binom`;break;case`\\atop`:i=`\\\\atopfrac`;break;case`\\brace`:i=`\\\\bracefrac`;break;case`\\brack`:i=`\\\\brackfrac`;break;default:throw Error(`Unrecognized infix genfrac command`)}return{type:`infix`,mode:t.mode,replaceWith:i,token:r}}});var BK=[`display`,`text`,`script`,`scriptscript`],VK=function(e){var t=null;return e.length>0&&(t=e,t=t===`.`?null:t),t};Z({type:`genfrac`,names:[`\\genfrac`],numArgs:6,allowedInArgument:!0,argTypes:[`math`,`math`,`size`,`text`,`math`,`math`],handler(e,t){var n=e.parser,r=t[4],i=t[5],a=SW(t[0]),o=a.type===`atom`&&a.family===`open`?VK(a.text):null,s=SW(t[1]),c=s.type===`atom`&&s.family===`close`?VK(s.text):null,l=gG(t[2],`size`),u,d=null;l.isBlank?u=!0:(d=l.value,u=d.number>0);var f=null,p=t[3];if(p.type===`ordgroup`){if(p.body.length>0){var m=gG(p.body[0],`textord`);f=BK[Number(m.text)]}}else p=gG(p,`textord`),f=BK[Number(p.text)];return zK({type:`genfrac`,mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:u,barSize:d,leftDelim:o,rightDelim:c},f)}}),Z({type:`infix`,names:[`\\above`],numArgs:1,argTypes:[`size`],infix:!0,handler(e,t){var n=e.parser;e.funcName;var r=e.token;return{type:`infix`,mode:n.mode,replaceWith:`\\\\abovefrac`,size:gG(t[0],`size`).value,token:r}}}),Z({type:`genfrac`,names:[`\\\\abovefrac`],numArgs:3,argTypes:[`math`,`size`,`math`],handler:(e,t)=>{var n=e.parser;e.funcName;var r=t[0],i=gG(t[1],`infix`).size;if(!i)throw Error(`\\\\abovefrac expected size, but got `+String(i));var a=t[2],o=i.number>0;return{type:`genfrac`,mode:n.mode,numer:r,denom:a,continued:!1,hasBarLine:o,barSize:i,leftDelim:null,rightDelim:null}}});var HK=(e,t)=>{var n=t.style,r,i;e.type===`supsub`?(r=e.sup?PW(e.sup,t.havingStyle(n.sup()),t):PW(e.sub,t.havingStyle(n.sub()),t),i=gG(e.base,`horizBrace`)):i=gG(e,`horizBrace`);var a=PW(i.base,t.havingBaseStyle(uH.DISPLAY)),o=lG(i,t),s=i.isOver?sW({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:.1},{type:`elem`,elem:o,wrapperClasses:[`svg-align`]}]}):sW({positionType:`bottom`,positionData:a.depth+.1+o.height,children:[{type:`elem`,elem:o,wrapperClasses:[`svg-align`]},{type:`kern`,size:.1},{type:`elem`,elem:a}]});if(r){var c=X([`minner`,i.isOver?`mover`:`munder`],[s],t);s=i.isOver?sW({positionType:`firstBaseline`,children:[{type:`elem`,elem:c},{type:`kern`,size:.2},{type:`elem`,elem:r}]}):sW({positionType:`bottom`,positionData:c.depth+.2+r.height+r.depth,children:[{type:`elem`,elem:r},{type:`kern`,size:.2},{type:`elem`,elem:c}]})}return X([`minner`,i.isOver?`mover`:`munder`],[s],t)};Z({type:`horizBrace`,names:[`\\overbrace`,`\\underbrace`,`\\overbracket`,`\\underbracket`],numArgs:1,handler(e,t){var n=e.parser,r=e.funcName;return{type:`horizBrace`,mode:n.mode,label:r,isOver:r.includes(`\\over`),base:t[0]}},htmlBuilder:HK,mathmlBuilder:(e,t)=>{var n=oG(e.label);return new Q(e.isOver?`mover`:`munder`,[YW(e.base,t),n])}}),Z({type:`href`,names:[`\\href`],numArgs:2,argTypes:[`url`,`original`],allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=t[1],i=gG(t[0],`url`).url;return n.settings.isTrusted({command:`\\href`,url:i})?{type:`href`,mode:n.mode,href:i,body:CW(r)}:n.formatUnsupportedCmd(`\\href`)},htmlBuilder:(e,t)=>{var n=OW(e.body,t,!1);return rW(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=JW(e.body,t);return n instanceof Q||(n=new Q(`mrow`,[n])),n.setAttribute(`href`,e.href),n}}),Z({type:`href`,names:[`\\url`],numArgs:1,argTypes:[`url`],allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=gG(t[0],`url`).url;if(!n.settings.isTrusted({command:`\\url`,url:r}))return n.formatUnsupportedCmd(`\\url`);for(var i=[],a=0;a<r.length;a++){var o=r[a];o===`~`&&(o=`\\textasciitilde`),i.push({type:`textord`,mode:`text`,text:o})}var s={type:`text`,mode:n.mode,font:`\\texttt`,body:i};return{type:`href`,mode:n.mode,href:r,body:CW(s)}}}),Z({type:`hbox`,names:[`\\hbox`],numArgs:1,argTypes:[`text`],allowedInText:!0,primitive:!0,handler(e,t){return{type:`hbox`,mode:e.parser.mode,body:CW(t[0])}},htmlBuilder(e,t){return iW(OW(e.body,t.withFont(``),!1))},mathmlBuilder(e,t){return new Q(`mrow`,qW(e.body,t.withFont(``)))}}),Z({type:`html`,names:[`\\htmlClass`,`\\htmlId`,`\\htmlStyle`,`\\htmlData`],numArgs:2,argTypes:[`raw`,`original`],allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName;e.token;var i=gG(t[0],`raw`).string,a=t[1];n.settings.strict&&KU({strict:n.settings.strict,errorCode:`htmlExtension`,errorMsg:`HTML extension is disabled on strict mode`,report:!0});var o,s={};switch(r){case`\\htmlClass`:s.class=i,o={command:`\\htmlClass`,class:i};break;case`\\htmlId`:s.id=i,o={command:`\\htmlId`,id:i};break;case`\\htmlStyle`:s.style=i,o={command:`\\htmlStyle`,style:i};break;case`\\htmlData`:for(var c=`{,}`,l=[],u=``,d=0;d<i.length;d++)i.startsWith(c,d)?(u+=`,`,d+=c.length-1):i[d]===`,`?(l.push(u),u=``):u+=i[d];l.push(u);for(var f=0;f<l.length;f++){var p=l[f],m=p.indexOf(`=`);if(m<0)throw new B(`\\htmlData key/value '`+p+`' missing equals sign`);var h=p.slice(0,m),g=p.slice(m+1);s[`data-`+h.trim()]=g}o={command:`\\htmlData`,attributes:s};break;default:throw Error(`Unrecognized html command`)}return n.settings.isTrusted(o)?{type:`html`,mode:n.mode,attributes:s,body:CW(a)}:n.formatUnsupportedCmd(r)},htmlBuilder:(e,t)=>{var n=OW(e.body,t,!1),r=[`enclosing`];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=X(r,n,t);for(var a of Object.entries(e.attributes)){var o=a[0],s=a[1];o!==`class`&&i.setAttribute(o,s)}return i},mathmlBuilder:(e,t)=>JW(e.body,t)}),Z({type:`htmlmathml`,names:[`\\html@mathml`],numArgs:2,allowedInArgument:!0,allowedInText:!0,handler:(e,t)=>({type:`htmlmathml`,mode:e.parser.mode,html:CW(t[0]),mathml:CW(t[1])}),htmlBuilder:(e,t)=>iW(OW(e.html,t,!1)),mathmlBuilder:(e,t)=>JW(e.mathml,t)});var UK=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:`bp`};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new B(`Invalid size: '`+e+`' in \\includegraphics`);var n={number:+(t[1]+t[2]),unit:t[3]};if(!MH(n))throw new B(`Invalid unit: '`+n.unit+`' in \\includegraphics.`);return n};Z({type:`includegraphics`,names:[`\\includegraphics`],numArgs:1,numOptionalArgs:1,argTypes:[`raw`,`url`],allowedInText:!1,handler:(e,t,n)=>{var r=e.parser,i={number:0,unit:`em`},a={number:.9,unit:`em`},o={number:0,unit:`em`},s=``;if(n[0])for(var c=gG(n[0],`raw`).string.split(`,`),l=0;l<c.length;l++){var u=c[l].split(`=`);if(u.length===2){var d=u[1].trim();switch(u[0].trim()){case`alt`:s=d;break;case`width`:i=UK(d);break;case`height`:a=UK(d);break;case`totalheight`:o=UK(d);break;default:throw new B(`Invalid key: '`+u[0]+`' in \\includegraphics.`)}}}var f=gG(t[0],`url`).url;return s===``&&(s=f,s=s.replace(/^.*[\\/]/,``),s=s.substring(0,s.lastIndexOf(`.`))),r.settings.isTrusted({command:`\\includegraphics`,url:f})?{type:`includegraphics`,mode:r.mode,alt:s,width:i,height:a,totalheight:o,src:f}:r.formatUnsupportedCmd(`\\includegraphics`)},htmlBuilder:(e,t)=>{var n=NH(e.height,t),r=0;e.totalheight.number>0&&(r=NH(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=NH(e.width,t));var a={height:V(n+r)};i>0&&(a.width=V(i)),r>0&&(a.verticalAlign=V(-r));var o=new HH(e.src,e.alt,a);return o.height=n,o.depth=r,o},mathmlBuilder:(e,t)=>{var n=new Q(`mglyph`,[]);n.setAttribute(`alt`,e.alt);var r=NH(e.height,t),i=0;if(e.totalheight.number>0&&(i=NH(e.totalheight,t)-r,n.setAttribute(`valign`,V(-i))),n.setAttribute(`height`,V(r+i)),e.width.number>0){var a=NH(e.width,t);n.setAttribute(`width`,V(a))}return n.setAttribute(`src`,e.src),n}}),Z({type:`kern`,names:[`\\kern`,`\\mkern`,`\\hskip`,`\\mskip`],numArgs:1,argTypes:[`size`],primitive:!0,allowedInText:!0,handler(e,t){var n=e.parser,r=e.funcName,i=gG(t[0],`size`);if(n.settings.strict){var a=r[1]===`m`,o=i.value.unit===`mu`;a?(o||KU({strict:n.settings.strict,errorCode:`mathVsTextUnits`,errorMsg:`LaTeX's `+r+` supports only mu units, `+(`not `+i.value.unit+` units`),report:!0}),n.mode!==`math`&&KU({strict:n.settings.strict,errorCode:`mathVsTextUnits`,errorMsg:`LaTeX's `+r+` works only in math mode`,report:!0})):o&&KU({strict:n.settings.strict,errorCode:`mathVsTextUnits`,errorMsg:`LaTeX's `+r+` doesn't support mu units`,report:!0})}return{type:`kern`,mode:n.mode,dimension:i.value}},htmlBuilder(e,t){return cW(e.dimension,t)},mathmlBuilder(e,t){return new zW(NH(e.dimension,t))}}),Z({type:`lap`,names:[`\\mathllap`,`\\mathrlap`,`\\mathclap`],numArgs:1,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=t[0];return{type:`lap`,mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:(e,t)=>{var n;e.alignment===`clap`?(n=X([],[PW(e.body,t)]),n=X([`katex-inner`],[n],t)):n=X([`katex-inner`],[PW(e.body,t)]);var r=X([`katex-fix`],[]),i=X([e.alignment],[n,r],t),a=X([`katex-strut`]);return a.style.height=V(i.height+i.depth),i.depth&&(a.style.verticalAlign=V(-i.depth)),i.children.unshift(a),i=X([`katex-thinbox`],[i],t),X([`mord`,`katex-vbox`],[i],t)},mathmlBuilder:(e,t)=>{var n=new Q(`mpadded`,[YW(e.body,t)]);if(e.alignment!==`rlap`){var r=e.alignment===`llap`?`-1`:`-0.5`;n.setAttribute(`lspace`,r+`width`)}return n.setAttribute(`width`,`0px`),n}}),Z({type:`styling`,names:[`\\(`,`$`],numArgs:0,allowedInText:!0,allowedInMath:!1,handler(e,t){var n=e.funcName,r=e.parser,i=r.mode;r.switchMode(`math`);var a=n===`\\(`?`\\)`:`$`,o=r.parseExpression(!1,a);return r.expect(a),r.switchMode(i),{type:`styling`,mode:r.mode,style:`text`,resetFont:!0,body:o}}}),Z({type:`text`,names:[`\\)`,`\\]`],numArgs:0,allowedInText:!0,allowedInMath:!1,handler(e,t){throw new B(`Mismatched `+e.funcName)}});var WK=(e,t)=>{switch(t.style.size){case uH.DISPLAY.size:return e.display;case uH.TEXT.size:return e.text;case uH.SCRIPT.size:return e.script;case uH.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};Z({type:`mathchoice`,names:[`\\mathchoice`],numArgs:4,primitive:!0,handler:(e,t)=>({type:`mathchoice`,mode:e.parser.mode,display:CW(t[0]),text:CW(t[1]),script:CW(t[2]),scriptscript:CW(t[3])}),htmlBuilder:(e,t)=>iW(OW(WK(e,t),t,!1)),mathmlBuilder:(e,t)=>JW(WK(e,t),t)});var GK=(e,t,n,r,i,a,o)=>{e=X([],[e]);var s=n&&VV(n),c,l;if(t){var u=PW(t,r.havingStyle(i.sup()),r);l={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-u.depth)}}if(n){var d=PW(n,r.havingStyle(i.sub()),r);c={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-d.height)}}var f;if(l&&c)f=sW({positionType:`bottom`,positionData:r.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:V(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:V(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else if(c)f=sW({positionType:`top`,positionData:e.height-o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:V(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e}]});else if(l)f=sW({positionType:`bottom`,positionData:e.depth+o,children:[{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:V(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else return e;var p=[f];if(c&&a!==0&&!s){var m=X([`mspace`],[],r);m.style.marginRight=V(a),p.unshift(m)}return X([`mop`,`op-limits`],p,r)},KK=new Set([`\\smallint`]),qK=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=gG(e.base,`op`),i=!0):a=gG(e,`op`);var o=t.style,s=!1;o.size===uH.DISPLAY.size&&a.symbol&&!KK.has(a.name)&&(s=!0);var c,l;if(a.symbol){var u=s?`Size2-Regular`:`Size1-Regular`,d=``;if((a.name===`\\oiint`||a.name===`\\oiiint`)&&(d=a.name.slice(1),a.name=d===`oiint`?`\\iint`:`\\iiint`),c=JU(a.name,u,`math`,t,[`mop`,`op-symbol`,s?`large-op`:`small-op`]),l=c.italic,d.length>0){var f=fW(d+`Size`+(s?`2`:`1`),t);c=sW({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:0},{type:`elem`,elem:f,shift:s?.08:0}]}),a.name=`\\`+d,c.classes.unshift(`mop`),c.italic=l}}else if(a.body){var p=OW(a.body,t,!0);p.length===1&&p[0]instanceof WH?(c=p[0],c.classes[0]=`mop`):c=X([`mop`],p,t)}else{for(var m=[],h=1;h<a.name.length;h++)m.push(YU(a.name[h],a.mode,t));c=X([`mop`],m,t)}var g=0,_=0;return(c instanceof WH||a.name===`\\oiint`||a.name===`\\oiiint`)&&!a.suppressBaseShift&&(g=(c.height-c.depth)/2-t.fontMetrics().axisHeight,_=c.italic??0),i?GK(c,n,r,t,o,_,g):(g&&(c.style.position=`relative`,c.style.top=V(g)),c)},JK=(e,t)=>{var n;if(e.symbol)n=new Q(`mo`,[HW(e.name,e.mode)]),KK.has(e.name)&&n.setAttribute(`largeop`,`false`);else if(e.body)n=new Q(`mo`,qW(e.body,t));else{n=new Q(`mi`,[new RW(e.name.slice(1))]);var r=new Q(`mo`,[HW(``,`text`)]);n=e.parentIsSupSub?new Q(`mrow`,[n,r]):LW([n,r])}return n},YK={"∏":`\\prod`,"∐":`\\coprod`,"∑":`\\sum`,"⋀":`\\bigwedge`,"⋁":`\\bigvee`,"⋂":`\\bigcap`,"⋃":`\\bigcup`,"⨀":`\\bigodot`,"⨁":`\\bigoplus`,"⨂":`\\bigotimes`,"⨄":`\\biguplus`,"⨆":`\\bigsqcup`};Z({type:`op`,names:`\\coprod.\\bigvee.\\bigwedge.\\biguplus.\\bigcap.\\bigcup.\\intop.\\prod.\\sum.\\bigotimes.\\bigoplus.\\bigodot.\\bigsqcup.\\smallint.∏.∐.∑.⋀.⋁.⋂.⋃.⨀.⨁.⨂.⨄.⨆`.split(`.`),numArgs:0,handler:(e,t)=>{var n=e.parser,r=e.funcName;return r.length===1&&(r=YK[r]),{type:`op`,mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:qK,mathmlBuilder:JK}),Z({type:`op`,names:[`\\mathop`],numArgs:1,primitive:!0,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:`op`,mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:CW(r)}}});var XK={"∫":`\\int`,"∬":`\\iint`,"∭":`\\iiint`,"∮":`\\oint`,"∯":`\\oiint`,"∰":`\\oiiint`};Z({type:`op`,names:`\\arcsin.\\arccos.\\arctan.\\arctg.\\arcctg.\\arg.\\ch.\\cos.\\cosec.\\cosh.\\cot.\\cotg.\\coth.\\csc.\\ctg.\\cth.\\deg.\\dim.\\exp.\\hom.\\ker.\\lg.\\ln.\\log.\\sec.\\sin.\\sinh.\\sh.\\tan.\\tanh.\\tg.\\th`.split(`.`),numArgs:0,handler(e){var t=e.parser,n=e.funcName;return{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}}}),Z({type:`op`,names:[`\\det`,`\\gcd`,`\\inf`,`\\lim`,`\\max`,`\\min`,`\\Pr`,`\\sup`],numArgs:0,handler(e){var t=e.parser,n=e.funcName;return{type:`op`,mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}}}),Z({type:`op`,names:[`\\int`,`\\iint`,`\\iiint`,`\\oint`,`\\oiint`,`\\oiiint`,`∫`,`∬`,`∭`,`∮`,`∯`,`∰`],numArgs:0,allowedInArgument:!0,handler(e){var t=e.parser,n=e.funcName;return n.length===1&&(n=XK[n]),{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}}});var ZK=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=gG(e.base,`operatorname`),i=!0):a=gG(e,`operatorname`);var o;if(a.body.length>0){for(var s=OW(a.body.map(e=>{var t=`text`in e?e.text:void 0;return typeof t==`string`?{type:`textord`,mode:e.mode,text:t}:e}),t.withFont(`mathrm`),!0),c=0;c<s.length;c++){var l=s[c];l instanceof WH&&(l.text=l.text.replace(/\u2212/,`-`).replace(/\u2217/,`*`))}o=X([`mop`],s,t)}else o=X([`mop`],[],t);return i?GK(o,n,r,t,t.style,0,0):o};Z({type:`operatorname`,names:[`\\operatorname@`,`\\operatornamewithlimits`],numArgs:1,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=t[0];return{type:`operatorname`,mode:n.mode,body:CW(i),alwaysHandleSupSub:r===`\\operatornamewithlimits`,limits:!1,parentIsSupSub:!1}},htmlBuilder:ZK,mathmlBuilder:(e,t)=>{for(var n=qW(e.body,t.withFont(`mathrm`)),r=!0,i=0;i<n.length;i++){var a=n[i];if(!(a instanceof zW)){if(a instanceof Q)switch(a.type){case`mi`:case`mn`:case`mspace`:case`mtext`:break;case`mo`:var o=a.children[0];a.children.length===1&&o instanceof RW?o.text=o.text.replace(/\u2212/,`-`).replace(/\u2217/,`*`):r=!1;break;default:r=!1}else r=!1}}r&&(n=[new RW(n.map(e=>e.toText()).join(``))]);var s=new Q(`mi`,n);s.setAttribute(`mathvariant`,`normal`);var c=new Q(`mo`,[HW(``,`text`)]);return e.parentIsSupSub?new Q(`mrow`,[s,c]):LW([s,c])}}),$(`\\operatorname`,`\\@ifstar\\operatornamewithlimits\\operatorname@`),xW({type:`ordgroup`,htmlBuilder(e,t){return e.semisimple?iW(OW(e.body,t,!1)):X([`mord`],OW(e.body,t,!0),t)},mathmlBuilder(e,t){return JW(e.body,t,!0)}}),Z({type:`overline`,names:[`\\overline`],numArgs:1,handler(e,t){var n=e.parser,r=t[0];return{type:`overline`,mode:n.mode,body:r}},htmlBuilder(e,t){var n=PW(e.body,t.havingCrampedStyle()),r=nW(`overline-line`,t),i=t.fontMetrics().defaultRuleThickness;return X([`mord`,`katex-overline`],[sW({positionType:`firstBaseline`,children:[{type:`elem`,elem:n},{type:`kern`,size:3*i},{type:`elem`,elem:r},{type:`kern`,size:i}]})],t)},mathmlBuilder(e,t){var n=new Q(`mo`,[new RW(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new Q(`mover`,[YW(e.body,t),n]);return r.setAttribute(`accent`,`true`),r}}),Z({type:`phantom`,names:[`\\phantom`],numArgs:1,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:`phantom`,mode:n.mode,body:CW(r)}},htmlBuilder:(e,t)=>iW(OW(e.body,t.withPhantom(),!1)),mathmlBuilder:(e,t)=>new Q(`mphantom`,qW(e.body,t))}),$(`\\hphantom`,`\\smash{\\phantom{#1}}`),Z({type:`vphantom`,names:[`\\vphantom`],numArgs:1,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:`vphantom`,mode:n.mode,body:r}},htmlBuilder:(e,t)=>X([`mord`,`rlap`],[X([`katex-inner`],[PW(e.body,t.withPhantom())]),X([`katex-fix`],[])],t),mathmlBuilder:(e,t)=>{var n=new Q(`mpadded`,[new Q(`mphantom`,qW(CW(e.body),t))]);return n.setAttribute(`width`,`0px`),n}}),Z({type:`raisebox`,names:[`\\raisebox`],numArgs:2,argTypes:[`size`,`hbox`],allowedInText:!0,handler(e,t){var n=e.parser,r=gG(t[0],`size`).value,i=t[1];return{type:`raisebox`,mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=PW(e.body,t);return sW({positionType:`shift`,positionData:-NH(e.dy,t),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){var n=new Q(`mpadded`,[YW(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute(`voffset`,r),n}});var QK=(e,t)=>({type:`reflectbox`,mode:e.parser.mode,body:t[0]});Z({type:`reflectbox`,names:[`\\reflectbox`],numArgs:1,argTypes:[`hbox`],allowedInText:!0,handler:QK,htmlBuilder(e,t){return X([`mord`,`reflectbox`],[PW(e.body,t)],t)},mathmlBuilder(e,t){return YW(e.body,t)}}),Z({type:`reflectbox`,names:[`\\mathreflectbox`],numArgs:1,argTypes:[`math`],handler:QK}),Z({type:`internal`,names:[`\\relax`],numArgs:0,allowedInText:!0,allowedInArgument:!0,handler(e){return{type:`internal`,mode:e.parser.mode}}}),Z({type:`rule`,names:[`\\rule`],numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`size`,`size`,`size`],handler(e,t,n){var r=e.parser,i=n[0],a=gG(t[0],`size`),o=gG(t[1],`size`);return{type:`rule`,mode:r.mode,shift:i&&gG(i,`size`).value,width:a.value,height:o.value}},htmlBuilder(e,t){var n=X([`mord`,`katex-rule`],[],t),r=NH(e.width,t),i=NH(e.height,t),a=e.shift?NH(e.shift,t):0;return n.style.borderRightWidth=V(r),n.style.borderTopWidth=V(i),n.style.bottom=V(a),n.width=r,n.height=i+a,n.depth=-a,n.maxFontSize=i*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=NH(e.width,t),r=NH(e.height,t),i=e.shift?NH(e.shift,t):0,a=t.color&&t.getColor()||`black`,o=new Q(`mspace`);o.setAttribute(`mathbackground`,a),o.setAttribute(`width`,V(n)),o.setAttribute(`height`,V(r));var s=new Q(`mpadded`,[o]);return i>=0?s.setAttribute(`height`,V(i)):(s.setAttribute(`height`,V(i)),s.setAttribute(`depth`,V(-i))),s.setAttribute(`voffset`,V(i)),s}});function $K(e,t,n){for(var r=OW(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,a=0;a<r.length;a++){var o=r[a].classes.indexOf(`katex-sizing`);o<0?Array.prototype.push.apply(r[a].classes,t.sizingClasses(n)):r[a].classes[o+1]===`reset-size`+t.size&&(r[a].classes[o+1]=`reset-size`+n.size),r[a].height*=i,r[a].depth*=i}return iW(r)}var eq=[`\\tiny`,`\\sixptsize`,`\\scriptsize`,`\\footnotesize`,`\\small`,`\\normalsize`,`\\large`,`\\Large`,`\\LARGE`,`\\huge`,`\\Huge`];Z({type:`sizing`,names:eq,numArgs:0,allowedInText:!0,handler:(e,t)=>{var n=e.breakOnTokenText,r=e.funcName,i=e.parser,a=i.parseExpression(!1,n);return{type:`sizing`,mode:i.mode,size:eq.indexOf(r)+1,body:a}},htmlBuilder:(e,t)=>{var n=t.havingSize(e.size);return $K(e.body,n,t)},mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=new Q(`mstyle`,qW(e.body,n));return r.setAttribute(`mathsize`,V(n.sizeMultiplier)),r}}),Z({type:`smash`,names:[`\\smash`],numArgs:1,numOptionalArgs:1,allowedInText:!0,handler:(e,t,n)=>{var r=e.parser,i=!1,a=!1,o=n[0]&&gG(n[0],`ordgroup`);if(o)for(var s,c=0;c<o.body.length;++c){var l=o.body[c];if(s=_G(l).text,s===`t`)i=!0;else if(s===`b`)a=!0;else{i=!1,a=!1;break}}else i=!0,a=!0;var u=t[0];return{type:`smash`,mode:r.mode,body:u,smashHeight:i,smashDepth:a}},htmlBuilder:(e,t)=>{var n=X([],[PW(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0),e.smashDepth&&(n.depth=0),e.smashHeight&&e.smashDepth)return X([`mord`,`katex-smash`],[n],t);if(n.children)for(var r=0;r<n.children.length;r++)e.smashHeight&&(n.children[r].height=0),e.smashDepth&&(n.children[r].depth=0);return X([`mord`],[sW({positionType:`firstBaseline`,children:[{type:`elem`,elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=new Q(`mpadded`,[YW(e.body,t)]);return e.smashHeight&&n.setAttribute(`height`,`0px`),e.smashDepth&&n.setAttribute(`depth`,`0px`),n}}),Z({type:`sqrt`,names:[`\\sqrt`],numArgs:1,numOptionalArgs:1,handler(e,t,n){var r=e.parser,i=n[0],a=t[0];return{type:`sqrt`,mode:r.mode,body:a,index:i}},htmlBuilder(e,t){var n=PW(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=aW(n,t);var r=t.fontMetrics().defaultRuleThickness,i=r;t.style.id<uH.TEXT.id&&(i=t.fontMetrics().xHeight);var a=r+i/4,o=eK(n.height+n.depth+a+r,t),s=o.span,c=o.ruleWidth,l=o.advanceWidth,u=s.height-c;u>n.height+n.depth+a&&(a=(a+u-n.height-n.depth)/2);var d=s.height-n.height-a-c;n.style.paddingLeft=V(l);var f=sW({positionType:`firstBaseline`,children:[{type:`elem`,elem:n,wrapperClasses:[`svg-align`]},{type:`kern`,size:-(n.height+d)},{type:`elem`,elem:s},{type:`kern`,size:c}]});if(e.index){var p=t.havingStyle(uH.SCRIPTSCRIPT),m=PW(e.index,p,t);return X([`mord`,`sqrt`],[X([`katex-root`],[sW({positionType:`shift`,positionData:-(.6*(f.height-f.depth)),children:[{type:`elem`,elem:m}]})]),f],t)}return X([`mord`,`sqrt`],[f],t)},mathmlBuilder(e,t){var n=e.body,r=e.index;return r?new Q(`mroot`,[YW(n,t),YW(r,t)]):new Q(`msqrt`,[YW(n,t)])}});var tq={display:uH.DISPLAY,text:uH.TEXT,script:uH.SCRIPT,scriptscript:uH.SCRIPTSCRIPT};function nq(e){return e in tq}Z({type:`styling`,names:[`\\displaystyle`,`\\textstyle`,`\\scriptstyle`,`\\scriptscriptstyle`],numArgs:0,allowedInText:!0,primitive:!0,handler(e,t){var n=e.breakOnTokenText,r=e.funcName,i=e.parser,a=i.parseExpression(!0,n),o=r.slice(1,r.length-5);if(!nq(o))throw Error(`Unknown style: `+o);return{type:`styling`,mode:i.mode,style:o,body:a}},htmlBuilder(e,t){var n=tq[e.style],r=t.havingStyle(n);return e.resetFont&&(r=r.withFont(``)),$K(e.body,r,t)},mathmlBuilder(e,t){var n=tq[e.style],r=t.havingStyle(n);e.resetFont&&(r=r.withFont(``));var i=new Q(`mstyle`,qW(e.body,r)),a={display:[`0`,`true`],text:[`0`,`false`],script:[`1`,`false`],scriptscript:[`2`,`false`]}[e.style];return i.setAttribute(`scriptlevel`,a[0]),i.setAttribute(`displaystyle`,a[1]),i}});var rq=function(e,t){var n=e.base;return n?n.type===`op`?n.limits&&(t.style.size===uH.DISPLAY.size||n.alwaysHandleSupSub)?qK:null:n.type===`operatorname`?n.alwaysHandleSupSub&&(t.style.size===uH.DISPLAY.size||n.limits)?ZK:null:n.type===`accent`?VV(n.base)?xG:null:n.type===`horizBrace`&&!e.sub===n.isOver?HK:null:null};xW({type:`supsub`,htmlBuilder(e,t){var n=rq(e,t);if(n)return n(e,t);var r=e.base,i=e.sup,a=e.sub,o=PW(r,t),s,c,l=t.fontMetrics(),u=0,d=0,f=r&&VV(r);if(i){var p=t.havingStyle(t.style.sup());s=PW(i,p,t),f||(u=o.height-p.fontMetrics().supDrop*p.sizeMultiplier/t.sizeMultiplier)}if(a){var m=t.havingStyle(t.style.sub());c=PW(a,m,t),f||(d=o.depth+m.fontMetrics().subDrop*m.sizeMultiplier/t.sizeMultiplier)}var h=t.style===uH.DISPLAY?l.sup1:t.style.cramped?l.sup3:l.sup2,g=t.sizeMultiplier,_=V(.5/l.ptPerEm/g),v=null;if(c){var y=e.base&&e.base.type===`op`&&e.base.name&&(e.base.name===`\\oiint`||e.base.name===`\\oiiint`);(o instanceof WH||y)&&(v=V(-(o.italic??0)))}var b;if(s&&c){u=Math.max(u,h,s.depth+.25*l.xHeight),d=Math.max(d,l.sub2);var x=4*l.defaultRuleThickness;if(u-s.depth-(c.height-d)<x){d=x-(u-s.depth)+c.height;var S=.8*l.xHeight-(u-s.depth);S>0&&(u+=S,d-=S)}b=sW({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:d,marginRight:_,marginLeft:v},{type:`elem`,elem:s,shift:-u,marginRight:_}]})}else if(c)d=Math.max(d,l.sub1,c.height-.8*l.xHeight),b=sW({positionType:`shift`,positionData:d,children:[{type:`elem`,elem:c,marginLeft:v,marginRight:_}]});else if(s)u=Math.max(u,h,s.depth+.25*l.xHeight),b=sW({positionType:`shift`,positionData:-u,children:[{type:`elem`,elem:s,marginRight:_}]});else throw Error(`supsub must have either sup or sub.`);return X([MW(o,`right`)||`mord`],[o,X([`msupsub`],[b])],t)},mathmlBuilder(e,t){var n=!1,r,i;e.base&&e.base.type===`horizBrace`&&(i=!!e.sup,i===e.base.isOver&&(n=!0,r=e.base.isOver)),e.base&&(e.base.type===`op`||e.base.type===`operatorname`)&&(e.base.parentIsSupSub=!0);var a=[YW(e.base,t)];e.sub&&a.push(YW(e.sub,t)),e.sup&&a.push(YW(e.sup,t));var o;if(n)o=r?`mover`:`munder`;else if(!e.sub){var s=e.base;o=s&&s.type===`op`&&s.limits&&(t.style===uH.DISPLAY||s.alwaysHandleSupSub)||s&&s.type===`operatorname`&&s.alwaysHandleSupSub&&(s.limits||t.style===uH.DISPLAY)?`mover`:`msup`}else if(e.sup){var c=e.base;o=c&&c.type===`op`&&c.limits&&t.style===uH.DISPLAY||c&&c.type===`operatorname`&&c.alwaysHandleSupSub&&(t.style===uH.DISPLAY||c.limits)?`munderover`:`msubsup`}else{var l=e.base;o=l&&l.type===`op`&&l.limits&&(t.style===uH.DISPLAY||l.alwaysHandleSupSub)||l&&l.type===`operatorname`&&l.alwaysHandleSupSub&&(l.limits||t.style===uH.DISPLAY)?`munder`:`msub`}return new Q(o,a)}}),xW({type:`atom`,htmlBuilder(e,t){return YU(e.text,e.mode,t,[`m`+e.family])},mathmlBuilder(e,t){var n=new Q(`mo`,[HW(e.text,e.mode)]);if(e.family===`bin`){var r=GW(e,t);r===`bold-italic`&&n.setAttribute(`mathvariant`,r)}else e.family===`punct`?n.setAttribute(`separator`,`true`):(e.family===`open`||e.family===`close`)&&n.setAttribute(`stretchy`,`false`);return n}});var iq={mi:`italic`,mn:`normal`,mtext:`normal`};xW({type:`mathord`,htmlBuilder(e,t){return ZU(e,t)},mathmlBuilder(e,t){var n=new Q(`mi`,[HW(e.text,e.mode,t)]),r=GW(e,t)||`italic`;return r!==iq[n.type]&&n.setAttribute(`mathvariant`,r),n}}),xW({type:`textord`,htmlBuilder(e,t){return ZU(e,t)},mathmlBuilder(e,t){var n=HW(e.text,e.mode,t),r=GW(e,t)||`normal`,i=e.mode===`text`?new Q(`mtext`,[n]):/[0-9]/.test(e.text)?new Q(`mn`,[n]):e.text===`\\prime`?new Q(`mo`,[n]):new Q(`mi`,[n]);return r!==iq[i.type]&&i.setAttribute(`mathvariant`,r),i}});var aq=new Map([[`\\nobreak`,`nobreak`],[`\\allowbreak`,`allowbreak`]]),oq=new Map([[` `,{}],[`\\ `,{}],[`~`,{className:`nobreak`}],[`\\space`,{}],[`\\nobreakspace`,{className:`nobreak`}]]);xW({type:`spacing`,htmlBuilder(e,t){var n=oq.get(e.text),r=aq.get(e.text);if(n){var i=n.className||``;if(e.mode===`text`){var a=ZU(e,t);return a.classes.push(i),a}return X([`mspace`,i],[YU(e.text,e.mode,t)],t)}if(r)return X([`mspace`,r],[],t);throw new B(`Unknown type of space "`+e.text+`"`)},mathmlBuilder(e,t){var n;if(oq.has(e.text))n=new Q(`mtext`,[new RW(`\xA0`)]);else if(aq.has(e.text))return new Q(`mspace`);else throw new B(`Unknown type of space "`+e.text+`"`);return n}});var sq=()=>{var e=new Q(`mtd`,[]);return e.setAttribute(`width`,`50%`),e};xW({type:`tag`,mathmlBuilder(e,t){var n=new Q(`mtable`,[new Q(`mtr`,[sq(),new Q(`mtd`,[JW(e.body,t)]),sq(),new Q(`mtd`,[JW(e.tag,t)])])]);return n.setAttribute(`width`,`100%`),n}});var cq={"\\text":void 0,"\\textrm":`textrm`,"\\textsf":`textsf`,"\\texttt":`texttt`,"\\textnormal":`textrm`},lq={"\\textbf":`textbf`,"\\textmd":`textmd`},uq={"\\textit":`textit`,"\\textup":`textup`},dq=(e,t)=>{var n=e.font;return n?cq[n]?t.withTextFontFamily(cq[n]):lq[n]?t.withTextFontWeight(lq[n]):n===`\\emph`?t.fontShape===`textit`?t.withTextFontShape(`textup`):t.withTextFontShape(`textit`):t.withTextFontShape(uq[n]):t};Z({type:`text`,names:[`\\text`,`\\textrm`,`\\textsf`,`\\texttt`,`\\textnormal`,`\\textbf`,`\\textmd`,`\\textit`,`\\textup`,`\\emph`],numArgs:1,argTypes:[`text`],allowedInArgument:!0,allowedInText:!0,handler(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:`text`,mode:n.mode,body:CW(i),font:r}},htmlBuilder(e,t){var n=dq(e,t);return X([`mord`,`text`],OW(e.body,n,!0),n)},mathmlBuilder(e,t){var n=dq(e,t);return JW(e.body,n)}}),Z({type:`underline`,names:[`\\underline`],numArgs:1,allowedInText:!0,handler(e,t){return{type:`underline`,mode:e.parser.mode,body:t[0]}},htmlBuilder(e,t){var n=PW(e.body,t),r=nW(`underline-line`,t),i=t.fontMetrics().defaultRuleThickness;return X([`mord`,`katex-underline`],[sW({positionType:`top`,positionData:n.height,children:[{type:`kern`,size:i},{type:`elem`,elem:r},{type:`kern`,size:3*i},{type:`elem`,elem:n}]})],t)},mathmlBuilder(e,t){var n=new Q(`mo`,[new RW(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new Q(`munder`,[YW(e.body,t),n]);return r.setAttribute(`accentunder`,`true`),r}}),Z({type:`vcenter`,names:[`\\vcenter`],numArgs:1,argTypes:[`original`],allowedInText:!1,handler(e,t){return{type:`vcenter`,mode:e.parser.mode,body:t[0]}},htmlBuilder(e,t){var n=PW(e.body,t),r=t.fontMetrics().axisHeight;return sW({positionType:`shift`,positionData:.5*(n.height-r-(n.depth+r)),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){return new Q(`mrow`,[new Q(`mpadded`,[YW(e.body,t)],[`vcenter`])])}}),Z({type:`verb`,names:[`\\verb`],numArgs:0,allowedInText:!0,handler(e,t,n){throw new B(`\\verb ended by end of line instead of matching delimiter`)},htmlBuilder(e,t){for(var n=fq(e),r=[],i=t.havingStyle(t.style.text()),a=0;a<n.length;a++){var o=n[a];o===`~`&&(o=`\\textasciitilde`),r.push(JU(o,`Typewriter-Regular`,e.mode,i,[`mord`,`texttt`]))}return X([`mord`,`text`].concat(i.sizingClasses(t)),$U(r),i)},mathmlBuilder(e,t){var n=new Q(`mtext`,[new RW(fq(e))]);return n.setAttribute(`mathvariant`,`monospace`),n}});var fq=e=>e.body.replace(/ /g,e.star?`␣`:`\xA0`),pq=vW,mq=`[ \r
|
|
381
|
+
]`,hq=`\\\\[a-zA-Z@]+`,gq=`\\\\[^\ud800-\udfff]`,_q=`(`+hq+`)`+mq+`*`,vq=`\\\\(
|
|
382
|
+
|[ \r ]+
|
|
383
|
+
?)[ \r ]*`,yq=`[̀-ͯ]`,bq=RegExp(yq+`+$`),xq=`(`+mq+`+)|`+(vq+`|`)+`([!-\\[\\]-‧-豈-]`+(yq+`*`)+`|[\ud800-\udbff][\udc00-\udfff]`+(yq+`*`)+`|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5`+(`|`+_q)+(`|`+gq+`)`),Sq=class{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(xq,`g`),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new SK(`EOF`,new xK(this,t,t));var n=this.tokenRegex.exec(e);if(n===null||n.index!==t)throw new B(`Unexpected character: '`+e[t]+`'`,new SK(e[t],new xK(this,t,t+1)));var r=n[6]||n[3]||(n[2]?`\\ `:` `);if(this.catcodes[r]===14){var i=e.indexOf(`
|
|
384
|
+
`,this.tokenRegex.lastIndex);return i===-1?(this.tokenRegex.lastIndex=e.length,KU({strict:this.settings.strict,errorCode:`commentAtEnd`,errorMsg:`% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)`,report:!0})):this.tokenRegex.lastIndex=i+1,this.lex()}return new SK(r,new xK(this,t,this.tokenRegex.lastIndex))}},Cq=class{constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new B(`Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug`);var e=this.undefStack.pop();for(var t of Object.keys(e))e[t]===void 0?delete this.current[t]:this.current[t]=e[t]}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return Object.prototype.hasOwnProperty.call(this.current,e)||Object.prototype.hasOwnProperty.call(this.builtins,e)}get(e){if(Object.prototype.hasOwnProperty.call(this.current,e))return this.current[e];if(Object.prototype.hasOwnProperty.call(this.builtins,e))return this.builtins[e]}set(e,t,n){if(n===void 0&&(n=!1),n){for(var r=0;r<this.undefStack.length;r++)delete this.undefStack[r][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var i=this.undefStack[this.undefStack.length-1];i&&!Object.prototype.hasOwnProperty.call(i,e)&&(i[e]=Object.prototype.hasOwnProperty.call(this.current,e)?this.current[e]:void 0)}t==null?delete this.current[e]:this.current[e]=t}},wq=bK;$(`\\noexpand`,function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),$(`\\expandafter`,function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),$(`\\@firstoftwo`,function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),$(`\\@secondoftwo`,function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),$(`\\@ifnextchar`,function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),$(`\\@ifstar`,`\\@ifnextchar *{\\@firstoftwo{#1}}`),$(`\\TextOrMath`,function(e){var t=e.consumeArgs(2);return e.mode===`text`?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var Tq={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};$(`\\char`,function(e){var t=e.popToken(),n,r=0;if(t.text===`'`)n=8,t=e.popToken();else if(t.text===`"`)n=16,t=e.popToken();else if(t.text==="`"){if(t=e.popToken(),t.text[0]===`\\`)r=t.text.charCodeAt(1);else if(t.text===`EOF`)throw new B("\\char` missing argument");else r=t.text.charCodeAt(0)}else n=10;if(n){if(r=Tq[t.text],r==null||r>=n)throw new B(`Invalid base-`+n+` digit `+t.text);for(var i;(i=Tq[e.future().text])!=null&&i<n;)r*=n,r+=i,e.popToken()}return`\\@char{`+r+`}`});var Eq=(e,t,n,r)=>{var i=e.consumeArg().tokens;if(i.length!==1)throw new B(`\\newcommand's first argument must be a macro name`);var a=i[0].text,o=e.isDefined(a);if(o&&!t)throw new B(`\\newcommand{`+a+`} attempting to redefine `+(a+`; use \\renewcommand`));if(!o&&!n)throw new B(`\\renewcommand{`+a+`} when command `+a+` does not yet exist; use \\newcommand`);var s=0;if(i=e.consumeArg().tokens,i.length===1&&i[0].text===`[`){for(var c=``,l=e.expandNextToken();l.text!==`]`&&l.text!==`EOF`;)c+=l.text,l=e.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new B(`Invalid number of arguments: `+c);s=parseInt(c),i=e.consumeArg().tokens}return o&&r||e.macros.set(a,{tokens:i,numArgs:s}),``};$(`\\newcommand`,e=>Eq(e,!1,!0,!1)),$(`\\renewcommand`,e=>Eq(e,!0,!1,!1)),$(`\\providecommand`,e=>Eq(e,!0,!0,!0)),$(`\\message`,e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(e=>e.text).join(``)),``}),$(`\\errmessage`,e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(e=>e.text).join(``)),``}),$(`\\show`,e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),pq[n],iU.math[n],iU.text[n]),``}),$(`\\bgroup`,`{`),$(`\\egroup`,`}`),$(`~`,`\\nobreakspace`),$(`\\lq`,"`"),$(`\\rq`,`'`),$(`\\aa`,`\\r a`),$(`\\AA`,`\\r A`),$(`\\textcopyright`,"\\html@mathml{\\textcircled{c}}{\\char`©}"),$(`\\copyright`,`\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}`),$(`\\textregistered`,"\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),$(`ℬ`,`\\mathscr{B}`),$(`ℰ`,`\\mathscr{E}`),$(`ℱ`,`\\mathscr{F}`),$(`ℋ`,`\\mathscr{H}`),$(`ℐ`,`\\mathscr{I}`),$(`ℒ`,`\\mathscr{L}`),$(`ℳ`,`\\mathscr{M}`),$(`ℛ`,`\\mathscr{R}`),$(`ℭ`,`\\mathfrak{C}`),$(`ℌ`,`\\mathfrak{H}`),$(`ℨ`,`\\mathfrak{Z}`),$(`\\Bbbk`,`\\Bbb{k}`),$(`\\llap`,`\\mathllap{\\textrm{#1}}`),$(`\\rlap`,`\\mathrlap{\\textrm{#1}}`),$(`\\clap`,`\\mathclap{\\textrm{#1}}`),$(`\\mathstrut`,`\\vphantom{(}`),$(`\\underbar`,`\\underline{\\text{#1}}`),$(`\\not`,`\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}`),$(`\\neq`,"\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),$(`\\ne`,`\\neq`),$(`≠`,`\\neq`),$(`\\notin`,"\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),$(`∉`,`\\notin`),$(`≘`,"\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),$(`≙`,"\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),$(`≚`,"\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),$(`≛`,"\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),$(`≝`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),$(`≞`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),$(`≟`,"\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),$(`⟂`,`\\perp`),$(`‼`,`\\mathclose{!\\mkern-0.8mu!}`),$(`∌`,`\\notni`),$(`⌜`,`\\ulcorner`),$(`⌝`,`\\urcorner`),$(`⌞`,`\\llcorner`),$(`⌟`,`\\lrcorner`),$(`©`,`\\copyright`),$(`®`,`\\textregistered`),$(`\\ulcorner`,`\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}`),$(`\\urcorner`,`\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}`),$(`\\llcorner`,`\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}`),$(`\\lrcorner`,`\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}`),$(`\\vdots`,`{\\varvdots\\rule{0pt}{15pt}}`),$(`⋮`,`\\vdots`),$(`\\varGamma`,`\\mathit{\\Gamma}`),$(`\\varDelta`,`\\mathit{\\Delta}`),$(`\\varTheta`,`\\mathit{\\Theta}`),$(`\\varLambda`,`\\mathit{\\Lambda}`),$(`\\varXi`,`\\mathit{\\Xi}`),$(`\\varPi`,`\\mathit{\\Pi}`),$(`\\varSigma`,`\\mathit{\\Sigma}`),$(`\\varUpsilon`,`\\mathit{\\Upsilon}`),$(`\\varPhi`,`\\mathit{\\Phi}`),$(`\\varPsi`,`\\mathit{\\Psi}`),$(`\\varOmega`,`\\mathit{\\Omega}`),$(`\\substack`,`\\begin{subarray}{c}#1\\end{subarray}`),$(`\\colon`,`\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax`),$(`\\boxed`,`\\fbox{$\\displaystyle{#1}$}`),$(`\\iff`,`\\DOTSB\\;\\Longleftrightarrow\\;`),$(`\\implies`,`\\DOTSB\\;\\Longrightarrow\\;`),$(`\\impliedby`,`\\DOTSB\\;\\Longleftarrow\\;`),$(`\\dddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}`),$(`\\ddddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}`);var Dq={",":`\\dotsc`,"\\not":`\\dotsb`,"+":`\\dotsb`,"=":`\\dotsb`,"<":`\\dotsb`,">":`\\dotsb`,"-":`\\dotsb`,"*":`\\dotsb`,":":`\\dotsb`,"\\DOTSB":`\\dotsb`,"\\coprod":`\\dotsb`,"\\bigvee":`\\dotsb`,"\\bigwedge":`\\dotsb`,"\\biguplus":`\\dotsb`,"\\bigcap":`\\dotsb`,"\\bigcup":`\\dotsb`,"\\prod":`\\dotsb`,"\\sum":`\\dotsb`,"\\bigotimes":`\\dotsb`,"\\bigoplus":`\\dotsb`,"\\bigodot":`\\dotsb`,"\\bigsqcup":`\\dotsb`,"\\And":`\\dotsb`,"\\longrightarrow":`\\dotsb`,"\\Longrightarrow":`\\dotsb`,"\\longleftarrow":`\\dotsb`,"\\Longleftarrow":`\\dotsb`,"\\longleftrightarrow":`\\dotsb`,"\\Longleftrightarrow":`\\dotsb`,"\\mapsto":`\\dotsb`,"\\longmapsto":`\\dotsb`,"\\hookrightarrow":`\\dotsb`,"\\doteq":`\\dotsb`,"\\mathbin":`\\dotsb`,"\\mathrel":`\\dotsb`,"\\relbar":`\\dotsb`,"\\Relbar":`\\dotsb`,"\\xrightarrow":`\\dotsb`,"\\xleftarrow":`\\dotsb`,"\\DOTSI":`\\dotsi`,"\\int":`\\dotsi`,"\\oint":`\\dotsi`,"\\iint":`\\dotsi`,"\\iiint":`\\dotsi`,"\\iiiint":`\\dotsi`,"\\idotsint":`\\dotsi`,"\\DOTSX":`\\dotsx`},Oq=new Set([`bin`,`rel`]);$(`\\dots`,function(e){var t=`\\dotso`,n=e.expandAfterFuture().text;return n in Dq?t=Dq[n]:(n.slice(0,4)===`\\not`||n in iU.math&&Oq.has(iU.math[n].group))&&(t=`\\dotsb`),t});var kq={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};$(`\\dotso`,function(e){return e.future().text in kq?`\\ldots\\,`:`\\ldots`}),$(`\\dotsc`,function(e){var t=e.future().text;return t in kq&&t!==`,`?`\\ldots\\,`:`\\ldots`}),$(`\\cdots`,function(e){return e.future().text in kq?`\\@cdots\\,`:`\\@cdots`}),$(`\\dotsb`,`\\cdots`),$(`\\dotsm`,`\\cdots`),$(`\\dotsi`,`\\!\\cdots`),$(`\\dotsx`,`\\ldots\\,`),$(`\\DOTSI`,`\\relax`),$(`\\DOTSB`,`\\relax`),$(`\\DOTSX`,`\\relax`),$(`\\tmspace`,`\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax`),$(`\\,`,`\\tmspace+{3mu}{.1667em}`),$(`\\thinspace`,`\\,`),$(`\\>`,`\\mskip{4mu}`),$(`\\:`,`\\tmspace+{4mu}{.2222em}`),$(`\\medspace`,`\\:`),$(`\\;`,`\\tmspace+{5mu}{.2777em}`),$(`\\thickspace`,`\\;`),$(`\\!`,`\\tmspace-{3mu}{.1667em}`),$(`\\negthinspace`,`\\!`),$(`\\negmedspace`,`\\tmspace-{4mu}{.2222em}`),$(`\\negthickspace`,`\\tmspace-{5mu}{.277em}`),$(`\\enspace`,`\\kern.5em `),$(`\\enskip`,`\\hskip.5em\\relax`),$(`\\quad`,`\\hskip1em\\relax`),$(`\\qquad`,`\\hskip2em\\relax`),$(`\\tag`,`\\@ifstar\\tag@literal\\tag@paren`),$(`\\tag@paren`,`\\tag@literal{({#1})}`),$(`\\tag@literal`,e=>{if(e.macros.get(`\\df@tag`))throw new B(`Multiple \\tag`);return`\\gdef\\df@tag{\\text{#1}}`}),$(`\\bmod`,`\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}`),$(`\\pod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)`),$(`\\pmod`,`\\pod{{\\rm mod}\\mkern6mu#1}`),$(`\\mod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1`),$(`\\newline`,`\\\\\\relax`),$(`\\TeX`,`\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}`);var Aq=V(ZH[`Main-Regular`][84][1]-.7*ZH[`Main-Regular`][65][1]);$(`\\LaTeX`,`\\textrm{\\html@mathml{`+(`L\\kern-.36em\\raisebox{`+Aq+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{LaTeX}}`),$(`\\KaTeX`,`\\textrm{\\html@mathml{`+(`K\\kern-.17em\\raisebox{`+Aq+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{KaTeX}}`),$(`\\hspace`,`\\@ifstar\\@hspacer\\@hspace`),$(`\\@hspace`,`\\hskip #1\\relax`),$(`\\@hspacer`,`\\rule{0pt}{0pt}\\hskip #1\\relax`),$(`\\ordinarycolon`,`:`),$(`\\vcentcolon`,`\\mathrel{\\mathop\\ordinarycolon}`),$(`\\dblcolon`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}`),$(`\\coloneqq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}`),$(`\\Coloneqq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}`),$(`\\coloneq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}`),$(`\\Coloneq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}`),$(`\\eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}`),$(`\\Eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}`),$(`\\eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}`),$(`\\Eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}`),$(`\\colonapprox`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}`),$(`\\Colonapprox`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}`),$(`\\colonsim`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}`),$(`\\Colonsim`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}`),$(`∷`,`\\dblcolon`),$(`∹`,`\\eqcolon`),$(`≔`,`\\coloneqq`),$(`≕`,`\\eqqcolon`),$(`⩴`,`\\Coloneqq`),$(`\\ratio`,`\\vcentcolon`),$(`\\coloncolon`,`\\dblcolon`),$(`\\colonequals`,`\\coloneqq`),$(`\\coloncolonequals`,`\\Coloneqq`),$(`\\equalscolon`,`\\eqqcolon`),$(`\\equalscoloncolon`,`\\Eqqcolon`),$(`\\colonminus`,`\\coloneq`),$(`\\coloncolonminus`,`\\Coloneq`),$(`\\minuscolon`,`\\eqcolon`),$(`\\minuscoloncolon`,`\\Eqcolon`),$(`\\coloncolonapprox`,`\\Colonapprox`),$(`\\coloncolonsim`,`\\Colonsim`),$(`\\simcolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),$(`\\simcoloncolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}`),$(`\\approxcolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),$(`\\approxcoloncolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}`),$(`\\notni`,"\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),$(`\\limsup`,`\\DOTSB\\operatorname*{lim\\,sup}`),$(`\\liminf`,`\\DOTSB\\operatorname*{lim\\,inf}`),$(`\\injlim`,`\\DOTSB\\operatorname*{inj\\,lim}`),$(`\\projlim`,`\\DOTSB\\operatorname*{proj\\,lim}`),$(`\\varlimsup`,`\\DOTSB\\operatorname*{\\overline{lim}}`),$(`\\varliminf`,`\\DOTSB\\operatorname*{\\underline{lim}}`),$(`\\varinjlim`,`\\DOTSB\\operatorname*{\\underrightarrow{lim}}`),$(`\\varprojlim`,`\\DOTSB\\operatorname*{\\underleftarrow{lim}}`),$(`\\gvertneqq`,`\\html@mathml{\\@gvertneqq}{≩}`),$(`\\lvertneqq`,`\\html@mathml{\\@lvertneqq}{≨}`),$(`\\ngeqq`,`\\html@mathml{\\@ngeqq}{≱}`),$(`\\ngeqslant`,`\\html@mathml{\\@ngeqslant}{≱}`),$(`\\nleqq`,`\\html@mathml{\\@nleqq}{≰}`),$(`\\nleqslant`,`\\html@mathml{\\@nleqslant}{≰}`),$(`\\nshortmid`,`\\html@mathml{\\@nshortmid}{∤}`),$(`\\nshortparallel`,`\\html@mathml{\\@nshortparallel}{∦}`),$(`\\nsubseteqq`,`\\html@mathml{\\@nsubseteqq}{⊈}`),$(`\\nsupseteqq`,`\\html@mathml{\\@nsupseteqq}{⊉}`),$(`\\varsubsetneq`,`\\html@mathml{\\@varsubsetneq}{⊊}`),$(`\\varsubsetneqq`,`\\html@mathml{\\@varsubsetneqq}{⫋}`),$(`\\varsupsetneq`,`\\html@mathml{\\@varsupsetneq}{⊋}`),$(`\\varsupsetneqq`,`\\html@mathml{\\@varsupsetneqq}{⫌}`),$(`\\imath`,`\\html@mathml{\\@imath}{ı}`),$(`\\jmath`,`\\html@mathml{\\@jmath}{ȷ}`),$(`\\llbracket`,"\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),$(`\\rrbracket`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),$(`⟦`,`\\llbracket`),$(`⟧`,`\\rrbracket`),$(`\\lBrace`,"\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),$(`\\rBrace`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),$(`↤`,`\\mapsfrom`),$(`\\mapsfrom`,"\\html@mathml{\\mathrel{\\mathreflectbox{\\mapsto}}}{\\mathrel{\\char`↤}}"),$(`⦃`,`\\lBrace`),$(`⦄`,`\\rBrace`),$(`\\minuso`,"\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),$(`⦵`,`\\minuso`),$(`\\darr`,`\\downarrow`),$(`\\dArr`,`\\Downarrow`),$(`\\Darr`,`\\Downarrow`),$(`\\lang`,`\\langle`),$(`\\rang`,`\\rangle`),$(`\\uarr`,`\\uparrow`),$(`\\uArr`,`\\Uparrow`),$(`\\Uarr`,`\\Uparrow`),$(`\\N`,`\\mathbb{N}`),$(`\\R`,`\\mathbb{R}`),$(`\\Z`,`\\mathbb{Z}`),$(`\\alef`,`\\aleph`),$(`\\alefsym`,`\\aleph`),$(`\\Alpha`,`\\mathrm{A}`),$(`\\Beta`,`\\mathrm{B}`),$(`\\bull`,`\\bullet`),$(`\\Chi`,`\\mathrm{X}`),$(`\\clubs`,`\\clubsuit`),$(`\\cnums`,`\\mathbb{C}`),$(`\\Complex`,`\\mathbb{C}`),$(`\\Dagger`,`\\ddagger`),$(`\\diamonds`,`\\diamondsuit`),$(`\\empty`,`\\emptyset`),$(`\\Epsilon`,`\\mathrm{E}`),$(`\\Eta`,`\\mathrm{H}`),$(`\\exist`,`\\exists`),$(`\\harr`,`\\leftrightarrow`),$(`\\hArr`,`\\Leftrightarrow`),$(`\\Harr`,`\\Leftrightarrow`),$(`\\hearts`,`\\heartsuit`),$(`\\image`,`\\Im`),$(`\\infin`,`\\infty`),$(`\\Iota`,`\\mathrm{I}`),$(`\\isin`,`\\in`),$(`\\Kappa`,`\\mathrm{K}`),$(`\\larr`,`\\leftarrow`),$(`\\lArr`,`\\Leftarrow`),$(`\\Larr`,`\\Leftarrow`),$(`\\lrarr`,`\\leftrightarrow`),$(`\\lrArr`,`\\Leftrightarrow`),$(`\\Lrarr`,`\\Leftrightarrow`),$(`\\Mu`,`\\mathrm{M}`),$(`\\natnums`,`\\mathbb{N}`),$(`\\Nu`,`\\mathrm{N}`),$(`\\Omicron`,`\\mathrm{O}`),$(`\\plusmn`,`\\pm`),$(`\\rarr`,`\\rightarrow`),$(`\\rArr`,`\\Rightarrow`),$(`\\Rarr`,`\\Rightarrow`),$(`\\real`,`\\Re`),$(`\\reals`,`\\mathbb{R}`),$(`\\Reals`,`\\mathbb{R}`),$(`\\Rho`,`\\mathrm{P}`),$(`\\sdot`,`\\cdot`),$(`\\sect`,`\\S`),$(`\\spades`,`\\spadesuit`),$(`\\sub`,`\\subset`),$(`\\sube`,`\\subseteq`),$(`\\supe`,`\\supseteq`),$(`\\Tau`,`\\mathrm{T}`),$(`\\thetasym`,`\\vartheta`),$(`\\weierp`,`\\wp`),$(`\\Zeta`,`\\mathrm{Z}`),$(`\\argmin`,`\\DOTSB\\operatorname*{arg\\,min}`),$(`\\argmax`,`\\DOTSB\\operatorname*{arg\\,max}`),$(`\\plim`,`\\DOTSB\\mathop{\\operatorname{plim}}\\limits`),$(`\\bra`,`\\mathinner{\\langle{#1}|}`),$(`\\ket`,`\\mathinner{|{#1}\\rangle}`),$(`\\braket`,`\\mathinner{\\langle{#1}\\rangle}`),$(`\\Bra`,`\\left\\langle#1\\right|`),$(`\\Ket`,`\\left|#1\\right\\rangle`);var jq=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,i=t.consumeArg().tokens,a=t.consumeArg().tokens,o=t.macros.get(`|`),s=t.macros.get(`\\|`);t.macros.beginGroup();var c=t=>n=>{e&&(n.macros.set(`|`,o),i.length&&n.macros.set(`\\|`,s));var a=t;return!t&&i.length&&n.future().text===`|`&&(n.popToken(),a=!0),{tokens:a?i:r,numArgs:0}};t.macros.set(`|`,c(!1)),i.length&&t.macros.set(`\\|`,c(!0));var l=t.consumeArg().tokens,u=t.expandTokens([...a,...l,...n]);return t.macros.endGroup(),{tokens:u.reverse(),numArgs:0}};$(`\\bra@ket`,jq(!1)),$(`\\bra@set`,jq(!0)),$(`\\Braket`,`\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}`),$(`\\Set`,`\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}`),$(`\\set`,`\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}`),$(`\\angln`,`{\\angl n}`),$(`\\blue`,`\\textcolor{##6495ed}{#1}`),$(`\\orange`,`\\textcolor{##ffa500}{#1}`),$(`\\pink`,`\\textcolor{##ff00af}{#1}`),$(`\\red`,`\\textcolor{##df0030}{#1}`),$(`\\green`,`\\textcolor{##28ae7b}{#1}`),$(`\\gray`,`\\textcolor{gray}{#1}`),$(`\\purple`,`\\textcolor{##9d38bd}{#1}`),$(`\\blueA`,`\\textcolor{##ccfaff}{#1}`),$(`\\blueB`,`\\textcolor{##80f6ff}{#1}`),$(`\\blueC`,`\\textcolor{##63d9ea}{#1}`),$(`\\blueD`,`\\textcolor{##11accd}{#1}`),$(`\\blueE`,`\\textcolor{##0c7f99}{#1}`),$(`\\tealA`,`\\textcolor{##94fff5}{#1}`),$(`\\tealB`,`\\textcolor{##26edd5}{#1}`),$(`\\tealC`,`\\textcolor{##01d1c1}{#1}`),$(`\\tealD`,`\\textcolor{##01a995}{#1}`),$(`\\tealE`,`\\textcolor{##208170}{#1}`),$(`\\greenA`,`\\textcolor{##b6ffb0}{#1}`),$(`\\greenB`,`\\textcolor{##8af281}{#1}`),$(`\\greenC`,`\\textcolor{##74cf70}{#1}`),$(`\\greenD`,`\\textcolor{##1fab54}{#1}`),$(`\\greenE`,`\\textcolor{##0d923f}{#1}`),$(`\\goldA`,`\\textcolor{##ffd0a9}{#1}`),$(`\\goldB`,`\\textcolor{##ffbb71}{#1}`),$(`\\goldC`,`\\textcolor{##ff9c39}{#1}`),$(`\\goldD`,`\\textcolor{##e07d10}{#1}`),$(`\\goldE`,`\\textcolor{##a75a05}{#1}`),$(`\\redA`,`\\textcolor{##fca9a9}{#1}`),$(`\\redB`,`\\textcolor{##ff8482}{#1}`),$(`\\redC`,`\\textcolor{##f9685d}{#1}`),$(`\\redD`,`\\textcolor{##e84d39}{#1}`),$(`\\redE`,`\\textcolor{##bc2612}{#1}`),$(`\\maroonA`,`\\textcolor{##ffbde0}{#1}`),$(`\\maroonB`,`\\textcolor{##ff92c6}{#1}`),$(`\\maroonC`,`\\textcolor{##ed5fa6}{#1}`),$(`\\maroonD`,`\\textcolor{##ca337c}{#1}`),$(`\\maroonE`,`\\textcolor{##9e034e}{#1}`),$(`\\purpleA`,`\\textcolor{##ddd7ff}{#1}`),$(`\\purpleB`,`\\textcolor{##c6b9fc}{#1}`),$(`\\purpleC`,`\\textcolor{##aa87ff}{#1}`),$(`\\purpleD`,`\\textcolor{##7854ab}{#1}`),$(`\\purpleE`,`\\textcolor{##543b78}{#1}`),$(`\\mintA`,`\\textcolor{##f5f9e8}{#1}`),$(`\\mintB`,`\\textcolor{##edf2df}{#1}`),$(`\\mintC`,`\\textcolor{##e0e5cc}{#1}`),$(`\\grayA`,`\\textcolor{##f6f7f7}{#1}`),$(`\\grayB`,`\\textcolor{##f0f1f2}{#1}`),$(`\\grayC`,`\\textcolor{##e3e5e6}{#1}`),$(`\\grayD`,`\\textcolor{##d6d8da}{#1}`),$(`\\grayE`,`\\textcolor{##babec2}{#1}`),$(`\\grayF`,`\\textcolor{##888d93}{#1}`),$(`\\grayG`,`\\textcolor{##626569}{#1}`),$(`\\grayH`,`\\textcolor{##3b3e40}{#1}`),$(`\\grayI`,`\\textcolor{##21242c}{#1}`),$(`\\kaBlue`,`\\textcolor{##314453}{#1}`),$(`\\kaGreen`,`\\textcolor{##71B307}{#1}`);var Mq={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},Nq=class{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Cq(wq,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new Sq(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,r;if(e){if(this.consumeSpaces(),this.future().text!==`[`)return null;t=this.popToken();var i=this.consumeArg([`]`]);r=i.tokens,n=i.end}else{var a=this.consumeArg();r=a.tokens,t=a.start,n=a.end}return this.pushToken(new SK(`EOF`,n.loc)),this.pushTokens(r),new SK(``,xK.range(t,n))}consumeSpaces(){for(;this.future().text===` `;)this.stack.pop()}consumeArg(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var r=this.future(),i,a=0,o=0;do{if(i=this.popToken(),t.push(i),i.text===`{`)++a;else if(i.text===`}`){if(--a,a===-1)throw new B(`Extra }`,i)}else if(i.text===`EOF`)throw new B(`Unexpected end of input in a macro argument, expected '`+(e&&n?e[o]:`}`)+`'`,i);if(e&&n){if((a===0||a===1&&e[o]===`{`)&&i.text===e[o]){if(++o,o===e.length){t.splice(-o,o);break}}else o=0}}while(a!==0||n);return r.text===`{`&&t[t.length-1].text===`}`&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:r,end:i}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new B(`The length of delimiters doesn't match the number of args!`);for(var n=t[0],r=0;r<n.length;r++){var i=this.popToken();if(n[r]!==i.text)throw new B(`Use of the macro doesn't match its definition`,i)}}for(var a=[],o=0;o<e;o++)a.push(this.consumeArg(t&&t[o+1]).tokens);return a}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new B(`Too many expansions: infinite loop or need to increase maxExpand setting`)}expandOnce(e){var t=this.popToken(),n=t.text,r=t.noexpand?null:this._getExpansion(n);if(r==null||e&&r.unexpandable){if(e&&r==null&&n[0]===`\\`&&!this.isDefined(n))throw new B(`Undefined control sequence: `+n);return this.pushToken(t),!1}this.countExpansion(1);var i=r.tokens,a=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs){i=i.slice();for(var o=i.length-1;o>=0;--o){var s=i[o];if(s.text===`#`){if(o===0)throw new B(`Incomplete placeholder at end of macro body`,s);if(s=i[--o],s.text===`#`)i.splice(o+1,1);else if(/^[1-9]$/.test(s.text))i.splice(o,2,...a[s.text-1]);else throw new B(`Not a valid argument number`,s)}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text=`\\relax`),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new SK(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var r=this.stack.pop();r.treatAsRelax&&=(r.noexpand=!1,!1),t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(e=>e.text).join(``)}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var r=typeof t==`function`?t(this):t;if(typeof r==`string`){var i=0;if(r.includes(`#`))for(var a=r.replace(/##/g,``);a.includes(`#`+(i+1));)++i;for(var o=new Sq(r,this.settings),s=[],c=o.lex();c.text!==`EOF`;)s.push(c),c=o.lex();return s.reverse(),{tokens:s,numArgs:i}}return r}isDefined(e){return this.macros.has(e)||Object.prototype.hasOwnProperty.call(pq,e)||Object.prototype.hasOwnProperty.call(iU.math,e)||Object.prototype.hasOwnProperty.call(iU.text,e)||Object.prototype.hasOwnProperty.call(Mq,e)}isExpandable(e){var t=this.macros.get(e);return t==null?Object.prototype.hasOwnProperty.call(pq,e)&&!pq[e].primitive:typeof t==`string`||typeof t==`function`||!t.unexpandable}},Pq=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Fq=Object.freeze({"₊":`+`,"₋":`-`,"₌":`=`,"₍":`(`,"₎":`)`,"₀":`0`,"₁":`1`,"₂":`2`,"₃":`3`,"₄":`4`,"₅":`5`,"₆":`6`,"₇":`7`,"₈":`8`,"₉":`9`,ₐ:`a`,ₑ:`e`,ₕ:`h`,ᵢ:`i`,ⱼ:`j`,ₖ:`k`,ₗ:`l`,ₘ:`m`,ₙ:`n`,ₒ:`o`,ₚ:`p`,ᵣ:`r`,ₛ:`s`,ₜ:`t`,ᵤ:`u`,ᵥ:`v`,ₓ:`x`,ᵦ:`β`,ᵧ:`γ`,ᵨ:`ρ`,ᵩ:`ϕ`,ᵪ:`χ`,"⁺":`+`,"⁻":`-`,"⁼":`=`,"⁽":`(`,"⁾":`)`,"⁰":`0`,"¹":`1`,"²":`2`,"³":`3`,"⁴":`4`,"⁵":`5`,"⁶":`6`,"⁷":`7`,"⁸":`8`,"⁹":`9`,ᴬ:`A`,ᴮ:`B`,ᴰ:`D`,ᴱ:`E`,ᴳ:`G`,ᴴ:`H`,ᴵ:`I`,ᴶ:`J`,ᴷ:`K`,ᴸ:`L`,ᴹ:`M`,ᴺ:`N`,ᴼ:`O`,ᴾ:`P`,ᴿ:`R`,ᵀ:`T`,ᵁ:`U`,ⱽ:`V`,ᵂ:`W`,ᵃ:`a`,ᵇ:`b`,ᶜ:`c`,ᵈ:`d`,ᵉ:`e`,ᶠ:`f`,ᵍ:`g`,ʰ:`h`,ⁱ:`i`,ʲ:`j`,ᵏ:`k`,ˡ:`l`,ᵐ:`m`,ⁿ:`n`,ᵒ:`o`,ᵖ:`p`,ʳ:`r`,ˢ:`s`,ᵗ:`t`,ᵘ:`u`,ᵛ:`v`,ʷ:`w`,ˣ:`x`,ʸ:`y`,ᶻ:`z`,ᵝ:`β`,ᵞ:`γ`,ᵟ:`δ`,ᵠ:`ϕ`,ᵡ:`χ`,ᶿ:`θ`}),Iq={"́":{text:`\\'`,math:`\\acute`},"̀":{text:"\\`",math:`\\grave`},"̈":{text:`\\"`,math:`\\ddot`},"̃":{text:`\\~`,math:`\\tilde`},"̄":{text:`\\=`,math:`\\bar`},"̆":{text:`\\u`,math:`\\breve`},"̌":{text:`\\v`,math:`\\check`},"̂":{text:`\\^`,math:`\\hat`},"̇":{text:`\\.`,math:`\\dot`},"̊":{text:`\\r`,math:`\\mathring`},"̋":{text:`\\H`},"̧":{text:`\\c`}},Lq={á:`á`,à:`à`,ä:`ä`,ǟ:`ǟ`,ã:`ã`,ā:`ā`,ă:`ă`,ắ:`ắ`,ằ:`ằ`,ẵ:`ẵ`,ǎ:`ǎ`,â:`â`,ấ:`ấ`,ầ:`ầ`,ẫ:`ẫ`,ȧ:`ȧ`,ǡ:`ǡ`,å:`å`,ǻ:`ǻ`,ḃ:`ḃ`,ć:`ć`,ḉ:`ḉ`,č:`č`,ĉ:`ĉ`,ċ:`ċ`,ç:`ç`,ď:`ď`,ḋ:`ḋ`,ḑ:`ḑ`,é:`é`,è:`è`,ë:`ë`,ẽ:`ẽ`,ē:`ē`,ḗ:`ḗ`,ḕ:`ḕ`,ĕ:`ĕ`,ḝ:`ḝ`,ě:`ě`,ê:`ê`,ế:`ế`,ề:`ề`,ễ:`ễ`,ė:`ė`,ȩ:`ȩ`,ḟ:`ḟ`,ǵ:`ǵ`,ḡ:`ḡ`,ğ:`ğ`,ǧ:`ǧ`,ĝ:`ĝ`,ġ:`ġ`,ģ:`ģ`,ḧ:`ḧ`,ȟ:`ȟ`,ĥ:`ĥ`,ḣ:`ḣ`,ḩ:`ḩ`,í:`í`,ì:`ì`,ï:`ï`,ḯ:`ḯ`,ĩ:`ĩ`,ī:`ī`,ĭ:`ĭ`,ǐ:`ǐ`,î:`î`,ǰ:`ǰ`,ĵ:`ĵ`,ḱ:`ḱ`,ǩ:`ǩ`,ķ:`ķ`,ĺ:`ĺ`,ľ:`ľ`,ļ:`ļ`,ḿ:`ḿ`,ṁ:`ṁ`,ń:`ń`,ǹ:`ǹ`,ñ:`ñ`,ň:`ň`,ṅ:`ṅ`,ņ:`ņ`,ó:`ó`,ò:`ò`,ö:`ö`,ȫ:`ȫ`,õ:`õ`,ṍ:`ṍ`,ṏ:`ṏ`,ȭ:`ȭ`,ō:`ō`,ṓ:`ṓ`,ṑ:`ṑ`,ŏ:`ŏ`,ǒ:`ǒ`,ô:`ô`,ố:`ố`,ồ:`ồ`,ỗ:`ỗ`,ȯ:`ȯ`,ȱ:`ȱ`,ő:`ő`,ṕ:`ṕ`,ṗ:`ṗ`,ŕ:`ŕ`,ř:`ř`,ṙ:`ṙ`,ŗ:`ŗ`,ś:`ś`,ṥ:`ṥ`,š:`š`,ṧ:`ṧ`,ŝ:`ŝ`,ṡ:`ṡ`,ş:`ş`,ẗ:`ẗ`,ť:`ť`,ṫ:`ṫ`,ţ:`ţ`,ú:`ú`,ù:`ù`,ü:`ü`,ǘ:`ǘ`,ǜ:`ǜ`,ǖ:`ǖ`,ǚ:`ǚ`,ũ:`ũ`,ṹ:`ṹ`,ū:`ū`,ṻ:`ṻ`,ŭ:`ŭ`,ǔ:`ǔ`,û:`û`,ů:`ů`,ű:`ű`,ṽ:`ṽ`,ẃ:`ẃ`,ẁ:`ẁ`,ẅ:`ẅ`,ŵ:`ŵ`,ẇ:`ẇ`,ẘ:`ẘ`,ẍ:`ẍ`,ẋ:`ẋ`,ý:`ý`,ỳ:`ỳ`,ÿ:`ÿ`,ỹ:`ỹ`,ȳ:`ȳ`,ŷ:`ŷ`,ẏ:`ẏ`,ẙ:`ẙ`,ź:`ź`,ž:`ž`,ẑ:`ẑ`,ż:`ż`,Á:`Á`,À:`À`,Ä:`Ä`,Ǟ:`Ǟ`,Ã:`Ã`,Ā:`Ā`,Ă:`Ă`,Ắ:`Ắ`,Ằ:`Ằ`,Ẵ:`Ẵ`,Ǎ:`Ǎ`,Â:`Â`,Ấ:`Ấ`,Ầ:`Ầ`,Ẫ:`Ẫ`,Ȧ:`Ȧ`,Ǡ:`Ǡ`,Å:`Å`,Ǻ:`Ǻ`,Ḃ:`Ḃ`,Ć:`Ć`,Ḉ:`Ḉ`,Č:`Č`,Ĉ:`Ĉ`,Ċ:`Ċ`,Ç:`Ç`,Ď:`Ď`,Ḋ:`Ḋ`,Ḑ:`Ḑ`,É:`É`,È:`È`,Ë:`Ë`,Ẽ:`Ẽ`,Ē:`Ē`,Ḗ:`Ḗ`,Ḕ:`Ḕ`,Ĕ:`Ĕ`,Ḝ:`Ḝ`,Ě:`Ě`,Ê:`Ê`,Ế:`Ế`,Ề:`Ề`,Ễ:`Ễ`,Ė:`Ė`,Ȩ:`Ȩ`,Ḟ:`Ḟ`,Ǵ:`Ǵ`,Ḡ:`Ḡ`,Ğ:`Ğ`,Ǧ:`Ǧ`,Ĝ:`Ĝ`,Ġ:`Ġ`,Ģ:`Ģ`,Ḧ:`Ḧ`,Ȟ:`Ȟ`,Ĥ:`Ĥ`,Ḣ:`Ḣ`,Ḩ:`Ḩ`,Í:`Í`,Ì:`Ì`,Ï:`Ï`,Ḯ:`Ḯ`,Ĩ:`Ĩ`,Ī:`Ī`,Ĭ:`Ĭ`,Ǐ:`Ǐ`,Î:`Î`,İ:`İ`,Ĵ:`Ĵ`,Ḱ:`Ḱ`,Ǩ:`Ǩ`,Ķ:`Ķ`,Ĺ:`Ĺ`,Ľ:`Ľ`,Ļ:`Ļ`,Ḿ:`Ḿ`,Ṁ:`Ṁ`,Ń:`Ń`,Ǹ:`Ǹ`,Ñ:`Ñ`,Ň:`Ň`,Ṅ:`Ṅ`,Ņ:`Ņ`,Ó:`Ó`,Ò:`Ò`,Ö:`Ö`,Ȫ:`Ȫ`,Õ:`Õ`,Ṍ:`Ṍ`,Ṏ:`Ṏ`,Ȭ:`Ȭ`,Ō:`Ō`,Ṓ:`Ṓ`,Ṑ:`Ṑ`,Ŏ:`Ŏ`,Ǒ:`Ǒ`,Ô:`Ô`,Ố:`Ố`,Ồ:`Ồ`,Ỗ:`Ỗ`,Ȯ:`Ȯ`,Ȱ:`Ȱ`,Ő:`Ő`,Ṕ:`Ṕ`,Ṗ:`Ṗ`,Ŕ:`Ŕ`,Ř:`Ř`,Ṙ:`Ṙ`,Ŗ:`Ŗ`,Ś:`Ś`,Ṥ:`Ṥ`,Š:`Š`,Ṧ:`Ṧ`,Ŝ:`Ŝ`,Ṡ:`Ṡ`,Ş:`Ş`,Ť:`Ť`,Ṫ:`Ṫ`,Ţ:`Ţ`,Ú:`Ú`,Ù:`Ù`,Ü:`Ü`,Ǘ:`Ǘ`,Ǜ:`Ǜ`,Ǖ:`Ǖ`,Ǚ:`Ǚ`,Ũ:`Ũ`,Ṹ:`Ṹ`,Ū:`Ū`,Ṻ:`Ṻ`,Ŭ:`Ŭ`,Ǔ:`Ǔ`,Û:`Û`,Ů:`Ů`,Ű:`Ű`,Ṽ:`Ṽ`,Ẃ:`Ẃ`,Ẁ:`Ẁ`,Ẅ:`Ẅ`,Ŵ:`Ŵ`,Ẇ:`Ẇ`,Ẍ:`Ẍ`,Ẋ:`Ẋ`,Ý:`Ý`,Ỳ:`Ỳ`,Ÿ:`Ÿ`,Ỹ:`Ỹ`,Ȳ:`Ȳ`,Ŷ:`Ŷ`,Ẏ:`Ẏ`,Ź:`Ź`,Ž:`Ž`,Ẑ:`Ẑ`,Ż:`Ż`,ά:`ά`,ὰ:`ὰ`,ᾱ:`ᾱ`,ᾰ:`ᾰ`,έ:`έ`,ὲ:`ὲ`,ή:`ή`,ὴ:`ὴ`,ί:`ί`,ὶ:`ὶ`,ϊ:`ϊ`,ΐ:`ΐ`,ῒ:`ῒ`,ῑ:`ῑ`,ῐ:`ῐ`,ό:`ό`,ὸ:`ὸ`,ύ:`ύ`,ὺ:`ὺ`,ϋ:`ϋ`,ΰ:`ΰ`,ῢ:`ῢ`,ῡ:`ῡ`,ῠ:`ῠ`,ώ:`ώ`,ὼ:`ὼ`,Ύ:`Ύ`,Ὺ:`Ὺ`,Ϋ:`Ϋ`,Ῡ:`Ῡ`,Ῠ:`Ῠ`,Ώ:`Ώ`,Ὼ:`Ὼ`},Rq=class e{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode=`math`,this.gullet=new Nq(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new B(`Expected '`+e+`', got '`+this.fetch().text+`'`,this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken??=this.gullet.expandNextToken(),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set(`\\color`,`\\textcolor`);try{var e=this.parseExpression(!1);return this.expect(`EOF`),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new SK(`}`)),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect(`}`),this.nextToken=t,n}parseExpression(t,n){for(var r=[];;){this.mode===`math`&&this.consumeSpaces();var i=this.fetch();if(e.endOfExpression.has(i.text)||n&&i.text===n||t&&pq[i.text]&&pq[i.text].infix)break;var a=this.parseAtom(n);if(!a)break;a.type!==`internal`&&r.push(a)}return this.mode===`text`&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t=-1,n,r=0;r<e.length;r++){var i=e[r];if(i.type===`infix`){if(t!==-1)throw new B(`only one infix operator per group`,i.token);t=r,n=i.replaceWith}}if(t!==-1&&n){var a,o,s=e.slice(0,t),c=e.slice(t+1);return a=s.length===1&&s[0].type===`ordgroup`?s[0]:{type:`ordgroup`,mode:this.mode,body:s},o=c.length===1&&c[0].type===`ordgroup`?c[0]:{type:`ordgroup`,mode:this.mode,body:c},[n===`\\\\abovefrac`?this.callFunction(n,[a,e[t],o],[]):this.callFunction(n,[a,o],[])]}return e}handleSupSubscript(e){var t=this.fetch(),n=t.text;this.consume(),this.consumeSpaces();var r;do r=this.parseGroup(e);while(r?.type===`internal`);if(!r)throw new B(`Expected group after '`+n+`'`,t);return r}formatUnsupportedCmd(e){for(var t=[],n=0;n<e.length;n++)t.push({type:`textord`,mode:`text`,text:e[n]});var r={type:`text`,mode:this.mode,body:t};return{type:`color`,mode:this.mode,color:this.settings.errorColor,body:[r]}}parseAtom(e){var t=this.parseGroup(`atom`,e);if(t?.type===`internal`||this.mode===`text`)return t;for(var n,r;;){this.consumeSpaces();var i=this.fetch();if(i.text===`\\limits`||i.text===`\\nolimits`){if(t&&t.type===`op`)t.limits=i.text===`\\limits`,t.alwaysHandleSupSub=!0;else if(t&&t.type===`operatorname`)t.alwaysHandleSupSub&&(t.limits=i.text===`\\limits`);else throw new B(`Limit controls must follow a math operator`,i);this.consume()}else if(i.text===`^`){if(n)throw new B(`Double superscript`,i);n=this.handleSupSubscript(`superscript`)}else if(i.text===`_`){if(r)throw new B(`Double subscript`,i);r=this.handleSupSubscript(`subscript`)}else if(i.text===`'`){if(n)throw new B(`Double superscript`,i);var a={type:`textord`,mode:this.mode,text:`\\prime`},o=[a];for(this.consume();this.fetch().text===`'`;)o.push(a),this.consume();this.fetch().text===`^`&&o.push(this.handleSupSubscript(`superscript`)),n={type:`ordgroup`,mode:this.mode,body:o}}else if(Fq[i.text]){var s=Pq.test(i.text),c=[];for(c.push(new SK(Fq[i.text])),this.consume();;){var l=this.fetch().text;if(!Fq[l]||Pq.test(l)!==s)break;c.unshift(new SK(Fq[l])),this.consume()}var u=this.subparse(c);s?r={type:`ordgroup`,mode:`math`,body:u}:n={type:`ordgroup`,mode:`math`,body:u}}else break}return n&&r?{type:`supsub`,mode:this.mode,base:t,sup:n,sub:r}:n?{type:`supsub`,mode:this.mode,base:t,sup:n}:r?{type:`supsub`,mode:this.mode,base:t,sub:r}:t}parseFunction(e,t){var n=this.fetch(),r=n.text,i=pq[r];if(!i)return null;if(this.consume(),t&&t!==`atom`&&!i.allowedInArgument)throw new B(`Got function '`+r+`' with no arguments`+(t?` as `+t:``),n);if(this.mode===`text`&&!i.allowedInText)throw new B(`Can't use function '`+r+`' in text mode`,n);if(this.mode===`math`&&i.allowedInMath===!1)throw new B(`Can't use function '`+r+`' in math mode`,n);var a=this.parseArguments(r,i),o=a.args,s=a.optArgs;return this.callFunction(r,o,s,n,e)}callFunction(e,t,n,r,i){var a={funcName:e,parser:this,token:r,breakOnTokenText:i},o=pq[e];if(o&&o.handler)return o.handler(a,t,n);throw new B(`No function handler for `+e)}parseArguments(e,t){var n=t.numOptionalArgs??0,r=t.numArgs+n;if(r===0)return{args:[],optArgs:[]};for(var i=[],a=[],o=0;o<r;o++){var s=t.argTypes?.[o],c=o<n;(`primitive`in t&&t.primitive&&s==null||t.type===`sqrt`&&o===1&&a[0]==null)&&(s=`primitive`);var l=this.parseGroupOfType(`argument to '`+e+`'`,s,c);if(c)a.push(l);else if(l!=null)i.push(l);else throw new B(`Null argument, please report this as a bug`)}return{args:i,optArgs:a}}parseGroupOfType(e,t,n){switch(t){case`color`:return this.parseColorGroup(n);case`size`:return this.parseSizeGroup(n);case`url`:return this.parseUrlGroup(n);case`math`:case`text`:return this.parseArgumentGroup(n,t);case`hbox`:var r=this.parseArgumentGroup(n,`text`);return r==null?null:{type:`styling`,mode:r.mode,body:[r],style:`text`,resetFont:!0};case`raw`:var i=this.parseStringGroup(n);return i==null?null:{type:`raw`,mode:`text`,string:i.text};case`primitive`:if(n)throw new B(`A primitive argument cannot be optional`);var a=this.parseGroup(e);if(a==null)throw new B(`Expected group as `+e,this.fetch());return a;case`original`:case void 0:return this.parseArgumentGroup(n);default:throw new B(`Unknown group type as `+e,this.fetch())}}consumeSpaces(){for(;this.fetch().text===` `;)this.consume()}parseStringGroup(e){var t=this.gullet.scanArgument(e);if(t==null)return null;for(var n=``,r;(r=this.fetch()).text!==`EOF`;)n+=r.text,this.consume();return this.consume(),t.text=n,t}parseRegexGroup(e,t){for(var n=this.fetch(),r=n,i=``,a;(a=this.fetch()).text!==`EOF`&&e.test(i+a.text);)r=a,i+=r.text,this.consume();if(i===``)throw new B(`Invalid `+t+`: '`+n.text+`'`,n);return n.range(r,i)}parseColorGroup(e){var t=this.parseStringGroup(e);if(t==null)return null;var n=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!n)throw new B(`Invalid color: '`+t.text+`'`,t);var r=n[0];return/^[0-9a-f]{6}$/i.test(r)&&(r=`#`+r),{type:`color-token`,mode:this.mode,color:r}}parseSizeGroup(e){var t,n=!1;if(this.gullet.consumeSpaces(),t=!e&&this.gullet.future().text!==`{`?this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,`size`):this.parseStringGroup(e),!t)return null;!e&&t.text.length===0&&(t.text=`0pt`,n=!0);var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!r)throw new B(`Invalid size: '`+t.text+`'`,t);var i={number:+(r[1]+r[2]),unit:r[3]};if(!MH(i))throw new B(`Invalid unit: '`+i.unit+`'`,t);return{type:`size`,mode:this.mode,value:i,isBlank:n}}parseUrlGroup(e){this.gullet.lexer.setCatcode(`%`,13),this.gullet.lexer.setCatcode(`~`,12);var t=this.parseStringGroup(e);if(this.gullet.lexer.setCatcode(`%`,14),this.gullet.lexer.setCatcode(`~`,13),t==null)return null;var n=t.text.replace(/\\([#$%&~_^{}])/g,`$1`);return{type:`url`,mode:this.mode,url:n}}parseArgumentGroup(e,t){var n=this.gullet.scanArgument(e);if(n==null)return null;var r=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var i=this.parseExpression(!1,`EOF`);this.expect(`EOF`),this.gullet.endGroup();var a={type:`ordgroup`,mode:this.mode,loc:n.loc,body:i};return t&&this.switchMode(r),a}parseGroup(e,t){var n=this.fetch(),r=n.text,i;if(r===`{`||r===`\\begingroup`){this.consume();var a=r===`{`?`}`:`\\endgroup`;this.gullet.beginGroup();var o=this.parseExpression(!1,a),s=this.fetch();this.expect(a),this.gullet.endGroup(),i={type:`ordgroup`,mode:this.mode,loc:xK.range(n,s),body:o,semisimple:r===`\\begingroup`||void 0}}else if(i=this.parseFunction(t,e)||this.parseSymbol(),i==null&&r[0]===`\\`&&!Object.prototype.hasOwnProperty.call(Mq,r)){if(this.settings.throwOnError)throw new B(`Undefined control sequence: `+r,n);i=this.formatUnsupportedCmd(r),this.consume()}return i}formLigatures(e){for(var t=e.length-1,n=0;n<t;++n){var r=e[n];if(r.type===`textord`){var i=r.text,a=e[n+1];if(a&&a.type===`textord`){if(i===`-`&&a.text===`-`){var o=e[n+2];n+1<t&&o&&o.type===`textord`&&o.text===`-`?(e.splice(n,3,{type:`textord`,mode:`text`,loc:xK.range(r,o),text:`---`}),t-=2):(e.splice(n,2,{type:`textord`,mode:`text`,loc:xK.range(r,a),text:`--`}),--t)}(i===`'`||i==="`")&&a.text===i&&(e.splice(n,2,{type:`textord`,mode:`text`,loc:xK.range(r,a),text:i+i}),--t)}}}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var n=t.slice(5),r=n.charAt(0)===`*`;if(r&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new B(`\\verb assertion failed --
|
|
385
|
+
please report what input caused this bug`);return n=n.slice(1,-1),{type:`verb`,mode:`text`,body:n,star:r}}Object.prototype.hasOwnProperty.call(Lq,t[0])&&!iU[this.mode][t[0]]&&(this.settings.strict&&this.mode===`math`&&KU({strict:this.settings.strict,errorCode:`unicodeTextInMathMode`,errorMsg:`Accented Unicode text character "`+t[0]+`" used in math mode`,report:!0,token:e}),t=Lq[t[0]]+t.slice(1));var i=bq.exec(t);i&&(t=t.substring(0,i.index),t===`i`?t=`ı`:t===`j`&&(t=`ȷ`));var a;if(iU[this.mode][t]){this.settings.strict&&this.mode===`math`&&OU.includes(t)&&KU({strict:this.settings.strict,errorCode:`unicodeTextInMathMode`,errorMsg:`Latin-1/Unicode text character "`+t[0]+`" used in math mode`,report:!0,token:e});var o=iU[this.mode][t].group,s=xK.range(e);a=hG(o)?{type:`atom`,mode:this.mode,family:o,loc:s,text:t}:{type:o,mode:this.mode,loc:s,text:t}}else if(t.charCodeAt(0)>=128)this.settings.strict&&(mH(t.charCodeAt(0))?this.mode===`math`&&KU({strict:this.settings.strict,errorCode:`unicodeTextInMathMode`,errorMsg:`Unicode text character "`+t[0]+`" used in math mode`,report:!0,token:e}):KU({strict:this.settings.strict,errorCode:`unknownSymbol`,errorMsg:`Unrecognized Unicode character "`+t[0]+`"`+(` (`+t.charCodeAt(0)+`)`),report:!0,token:e})),a={type:`textord`,mode:`text`,loc:xK.range(e),text:t};else return null;if(this.consume(),i)for(var c=0;c<i[0].length;c++){var l=i[0][c];if(!Iq[l])throw new B(`Unknown accent ' `+l+`'`,e);var u=Iq[l][this.mode]||Iq[l].text;if(!u)throw new B(`Accent `+l+` unsupported in `+this.mode+` mode`,e);a={type:`accent`,mode:this.mode,loc:xK.range(e),label:u,isStretchy:!1,isShifty:!0,base:a}}return a}};Rq.endOfExpression=new Set([`}`,`\\endgroup`,`\\end`,`\\right`,`&`]);var zq=function(e,t){if(!(typeof e==`string`||e instanceof String))throw TypeError(`KaTeX can only parse string typed expression`);var n=new Rq(e,t);delete n.gullet.macros.current[`\\df@tag`];var r=n.parse();if(delete n.gullet.macros.current[`\\current@color`],delete n.gullet.macros.current[`\\color`],n.gullet.macros.get(`\\df@tag`)){if(!t.displayMode)throw new B(`\\tag works only in display equations`);r=[{type:`tag`,mode:`text`,body:r,tag:n.subparse([new SK(`\\df@tag`)])}]}return r},Bq=function(e,t,n){t.textContent=``;var r=Wq(e,n).toNode();t.appendChild(r)};typeof document<`u`&&document.compatMode!==`CSS1Compat`&&(typeof console<`u`&&console.warn(`Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype.`),Bq=function(){throw new B(`KaTeX doesn't work in quirks mode.`)});var Vq=function(e,t){return Wq(e,t).toMarkup()},Hq=function(e,t){return zq(e,new qV(t))},Uq=function(e,t,n){if(n.throwOnError||!(e instanceof B))throw e;var r=X([`katex-error`],[new WH(t)]);return r.setAttribute(`title`,e.toString()),r.setAttribute(`style`,`color:`+n.errorColor),r},Wq=function(e,t){var n=new qV(t);try{return rG(zq(e,n),e,n)}catch(t){return Uq(t,e,n)}},Gq={version:`0.19.0`,render:Bq,renderToString:Vq,ParseError:B,SETTINGS_SCHEMA:UV,__parse:Hq,__renderToDomTree:Wq,__renderToHTMLTree:function(e,t){var n=new qV(t);try{return iG(zq(e,n),n)}catch(t){return Uq(t,e,n)}},__setFontMetrics:eU,__defineSymbol:H,__defineFunction:Z,__defineMacro:$,__domTree:{Span:BH,Anchor:VH,SymbolNode:WH,SvgNode:GH,PathNode:KH,LineNode:qH}},Kq=500,qq=new Map;function Jq(e,t){let n=`${+!!t}:${e}`;if(qq.has(n)){let e=qq.get(n)??null;return qq.delete(n),qq.set(n,e),e}let r;try{let n=Gq.renderToString(e,{displayMode:t,output:`htmlAndMathml`,throwOnError:!0,trust:!1,strict:`ignore`,maxExpand:1e3,maxSize:50});r=nV.sanitize(n,{USE_PROFILES:{html:!0,svg:!0,mathMl:!0}})}catch{r=null}return qq.set(n,r),qq.size>Kq&&qq.delete(qq.keys().next().value),r}var Yq=null;function Xq(e,t){let n=Yq;Yq=e;try{return t()}finally{Yq=n}}function Zq(e,t){let n=RegExp(`<span data-math="${t.nonce}:(\\d+)"></span>`,`g`);return e.replace(n,(e,n)=>t.items[Number(n)]??e)}function Qq(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`)}function $q(e,t,n){let r=Jq(e,t);return r===null||Yq===null?Qq(n):(Yq.items.push(r),`<span data-math="${Yq.nonce}:${Yq.items.length-1}"></span>`)}var eJ=[/^\$\$[ \t]*\n?([\s\S]+?)\n?[ \t]*\$\$[ \t]*(?:\n|$)/,/^\\\[[ \t]*\n?([\s\S]+?)\n?[ \t]*\\\][ \t]*(?:\n|$)/],tJ=/^(?:\\\(([\s\S]+?)\\\)|(\$\$?)(?![\s$])((?:\\[\s\S]|[^$\\`])+?)(?<!\s)\2(?!\d))/,nJ=/^\\[()[\]]/;function rJ(e,t){let n=e.search(t);return n<0?void 0:n}var iJ=new YR({extensions:[{name:`mathLiteral`,level:`inline`,start:e=>rJ(e,/\\[()[\]]/),tokenizer(e){let t=nJ.exec(e);return t?{type:`mathLiteral`,raw:t[0]}:void 0},renderer:e=>Qq(e.raw)},{name:`mathBlock`,level:`block`,start:e=>e.match(/^(?:\$\$|\\\[)/m)?.index,tokenizer(e){for(let t of eJ){let n=t.exec(e);if(n?.[1]?.trim())return{type:`mathBlock`,raw:n[0],text:n[1].trim()}}},renderer:e=>`<p>${$q(e.text,!0,e.raw.trimEnd())}</p>\n`},{name:`mathInline`,level:`inline`,start:e=>rJ(e,/\$|\\\(/),tokenizer(e){let t=tJ.exec(e),n=t?.[1]??t?.[3];if(t&&n?.trim())return{type:`mathInline`,raw:t[0],text:n.trim(),display:t[2]===`$$`}},renderer:e=>$q(e.text,e.display,e.raw)}],renderer:{code({text:e,lang:t}){return`<pre><code class="${jV(t)?`hljs language-${t??``}`:`hljs`}">${MV(e,t)}</code></pre>`}}});function aJ(e){let t={nonce:crypto.randomUUID(),items:[]},n=Xq(t,()=>iJ.parse(e,{async:!1,gfm:!0,breaks:!0}));return Zq(nV.sanitize(n,{USE_PROFILES:{html:!0}}),t)}function oJ({text:e}){let t=(0,f.useMemo)(()=>aJ(e),[e]);return(0,k.jsx)(`div`,{className:`md`,dangerouslySetInnerHTML:{__html:t}})}function sJ({invocation:e}){let[t,n]=(0,f.useState)(!1);return(0,k.jsxs)(`div`,{className:`overflow-hidden rounded-card border border-sakura-200 bg-surface text-left shadow-soft`,children:[(0,k.jsxs)(`button`,{type:`button`,onClick:()=>n(!t),"aria-expanded":t,className:`focus-neko flex w-full items-center gap-2 px-3 py-2`,children:[(0,k.jsx)(`span`,{className:`text-sakura-500`,children:(0,k.jsx)(lI,{name:`sparkles`,size:14})}),(0,k.jsxs)(`span`,{className:`shrink-0 font-mono text-sm font-semibold text-sakura-800`,children:[`skill:`,e.name]}),(0,k.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-xs text-ink-600`,title:e.location,children:e.location}),(0,k.jsx)(`span`,{"aria-hidden":!0,className:`shrink-0 text-ink-400`,children:t?`▾`:`▸`})]}),t&&(0,k.jsx)(`div`,{className:`border-t border-sakura-100 px-3 py-2`,children:(0,k.jsx)(`pre`,{className:`max-h-48 overflow-auto whitespace-pre-wrap rounded-lg bg-ink-50 p-2 font-mono text-xs text-ink-700`,children:e.body.trim()})})]})}function cJ({text:e}){let[t,n]=(0,f.useState)(!1);return e.trim()===``?null:(0,k.jsxs)(`div`,{className:`rounded-xl border border-dashed border-sakura-300 bg-sakura-50/70`,children:[(0,k.jsxs)(`button`,{type:`button`,onClick:()=>{n(!t)},className:`focus-neko flex w-full items-center gap-1.5 px-3 py-1.5 text-left text-xs text-ink-600 italic`,children:[(0,k.jsx)(`span`,{"aria-hidden":!0,children:t?`▾`:`▸`}),`思考过程…`]}),t&&(0,k.jsx)(`div`,{className:`px-3 pb-2 text-sm whitespace-pre-wrap text-ink-600 italic`,children:e})]})}function lJ(e,t=`edit`){if(t===`write`)return e.startsWith(`+ `)?{prefix:`+`,lineNum:``,content:e.slice(2)}:null;let n=e.match(/^([+\- ])( *\d+) (.*)$/),r=n?.[1];return r!==`+`&&r!==`-`&&r!==` `?null:{prefix:r,lineNum:n?.[2]??``,content:n?.[3]??``}}function uJ(e,t){if(e===`write`){let e=t.trim();return e===``?null:e}if(e===`edit`){let e=(t.match(/^(.*) \(\d+ edits\)$/)?.[1]??``).trim();return e===``?null:e}return null}function dJ(e){if(e==null)return;let t=e.split(`/`).pop()??``,n=t.lastIndexOf(`.`);if(n<=0)return;let r=t.slice(n+1).trim().toLowerCase();return jV(r)?r:void 0}function fJ(e,t,n=`edit`){let r=e.split(`
|
|
386
|
+
`),i=r.map(e=>lJ(e,n)),a=[],o=[],s=[],c=[];for(let e=0;e<i.length;e++){let t=i[e];t==null?(s.push(-1),c.push(-1)):(t.prefix===`-`?s.push(-1):(s.push(a.length),a.push(t.content)),t.prefix===`+`?c.push(-1):(c.push(o.length),o.push(t.content)))}let l=t!==void 0&&jV(t)?t:void 0;if(l!==void 0)try{return{kind:`highlighted`,rows:pJ(r,i,s,c,mJ(rV.highlight(a.join(`
|
|
387
|
+
`),{language:l}).value),mJ(rV.highlight(o.join(`
|
|
388
|
+
`),{language:l}).value))}}catch{}return{kind:`plain`,rows:pJ(r,i,s,c,a.map(NV),o.map(NV))}}function pJ(e,t,n,r,i,a){return t.map((t,o)=>{if(t===null)return{kind:`context`,gutter:``,html:NV(e[o]??``)};let s=`${t.prefix}${t.lineNum}`;if(t.prefix===`-`)return{kind:`removed`,gutter:s,html:a[r[o]??-1]??``};let c=i[n[o]??-1]??``;return t.prefix===`+`?{kind:`added`,gutter:s,html:c}:{kind:`context`,gutter:s,html:c}})}function mJ(e){let t=[],n=[],r=/<span class="([^"]*)">|<\/span>|\n/g,i=``,a=0;for(let o of e.matchAll(r)){let r=o.index;i+=e.slice(a,r),a=r+o[0].length,o[0]===`
|
|
389
|
+
`?(t.push(i+n.map(()=>`</span>`).join(``)),i=n.map(e=>`<span class="${e}">`).join(``)):o[1]===void 0?(n.pop(),i+=o[0]):(n.push(o[1]),i+=o[0])}return t.push(i+e.slice(a)),t}var hJ={pending:{label:`待执行`,icon:`clock`,spin:!1,className:`border-ink-200 bg-ink-100 text-ink-600`},running:{label:`运行中`,icon:`spinner`,spin:!0,className:`border-tianyi-300 bg-tianyi-100 text-tianyi-900`},doneOk:{label:`完成`,icon:`check`,spin:!1,className:`border-ink-200 bg-ink-50 text-ink-600`},doneError:{label:`失败`,icon:`close`,spin:!1,className:`border-2 border-sakura-500 bg-sakura-100 text-sakura-900 font-semibold`}};function gJ(e){let[t,n]=(0,f.useState)(!1),r=e.phase===`done`?e.isError?hJ.doneError:hJ.doneOk:hJ[e.phase],i=e.phase===`done`&&e.durationMs!==void 0&&e.durationMs!==null?` · ${(e.durationMs/1e3).toFixed(1)}s`:``,a=(0,f.useMemo)(()=>{if(!t||e.diff==null)return null;let n=dJ(uJ(e.name,e.summary));return fJ(e.diff,n,e.name===`write`?`write`:`edit`).rows.map(e=>({...e,html:nV.sanitize(e.html,{USE_PROFILES:{html:!0}})}))},[t,e.diff,e.name,e.summary]),o=e.diffAdded??null,s=e.diffRemoved??null,c=o!==null&&s!==null?o>0&&s>0?`(+${o}/-${s})`:o>0?`(+${o})`:s>0?`(-${s})`:null:null,l=e.detail!==null&&!(e.name===`write`&&e.diff!=null&&!e.diffTruncated),u=l||e.output!=null||e.result!=null||e.note!=null||e.diff!=null;return(0,k.jsxs)(`div`,{className:`overflow-hidden rounded-card border border-tianyi-200 bg-surface shadow-soft`,children:[(0,k.jsxs)(`button`,{type:`button`,"aria-expanded":u?t:void 0,onClick:()=>{u&&n(!t)},className:`focus-neko flex w-full items-center gap-2 px-3 py-2 text-left`,children:[(0,k.jsx)(`span`,{className:`text-tianyi-500`,children:(0,k.jsx)(lI,{name:`bolt`,size:14})}),(0,k.jsx)(`span`,{className:`font-mono text-sm font-semibold text-tianyi-800`,children:e.name}),(0,k.jsxs)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-xs text-ink-600`,children:[e.summary,c!==null&&(0,k.jsxs)(`span`,{className:`text-ink-400`,children:[` `,c]})]}),(0,k.jsxs)(`span`,{className:`inline-flex shrink-0 items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium ${r.className}`,children:[(0,k.jsx)(lI,{name:r.icon,size:12,className:r.spin?`animate-spin`:void 0}),r.label,i]}),u&&(0,k.jsx)(`span`,{"aria-hidden":!0,className:`shrink-0 text-ink-400`,children:t?`▾`:`▸`})]}),t&&(0,k.jsxs)(`div`,{className:`space-y-2 border-t border-tianyi-100 px-3 py-2`,children:[a!==null&&(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`div`,{className:`mb-1 text-xs font-medium text-tianyi-700`,children:`代码变更`}),e.diffTruncated&&(0,k.jsx)(`div`,{className:`mb-1 text-xs text-ink-600`,children:`代码变更预览已截断,可在下方查看完整写入内容。`}),(0,k.jsx)(`div`,{className:`max-h-48 overflow-auto rounded-lg bg-ink-50 p-2 font-mono text-xs text-ink-700`,children:a.map((e,t)=>(0,k.jsxs)(`div`,{className:`whitespace-pre ${e.kind===`added`?`diff-line-add`:e.kind===`removed`?`diff-line-del`:``}`,children:[(0,k.jsx)(`span`,{className:`diff-gutter`,children:e.gutter}),(0,k.jsx)(`span`,{dangerouslySetInnerHTML:{__html:e.html}})]},t))})]}),l&&(0,k.jsxs)(`div`,{children:[e.name===`write`&&e.diffTruncated&&(0,k.jsx)(`div`,{className:`mb-1 text-xs font-medium text-tianyi-700`,children:`完整写入内容`}),(0,k.jsx)(`pre`,{className:`max-h-48 overflow-auto rounded-lg bg-ink-50 p-2 font-mono text-xs text-ink-700`,children:e.detail})]}),e.output!=null&&e.output!==``&&(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`div`,{className:`mb-1 text-xs font-medium text-tianyi-700`,children:`输出`}),(0,k.jsx)(`pre`,{className:`max-h-48 overflow-auto rounded-lg bg-tianyi-50 p-2 font-mono text-xs text-ink-700`,children:e.output})]}),e.result!=null&&e.result!==``&&(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`div`,{className:`mb-1 text-xs font-medium ${e.isError?`text-sakura-800`:`text-ink-600`}`,children:e.isError?`错误输出`:`结果`}),(0,k.jsx)(`pre`,{className:`max-h-48 overflow-auto rounded-lg p-2 font-mono text-xs ${e.isError?`bg-sakura-50 text-sakura-900`:`bg-ink-50 text-ink-700`}`,children:e.result})]}),e.note!=null&&(0,k.jsx)(`div`,{className:`text-xs italic text-ink-500`,children:e.note})]})]})}var _J=48;function vJ(){let e=`var(--color-sakura-200)`,t=`var(--color-sakura-300)`,n=`var(--color-tianyi-800)`;return(0,k.jsxs)(`svg`,{width:`132`,height:`112`,viewBox:`0 0 132 112`,fill:`none`,"aria-hidden":`true`,children:[(0,k.jsx)(`title`,{children:`neko 小猫`}),(0,k.jsx)(`path`,{d:`M30 46 L24 14 L54 30 Z`,fill:e,stroke:t,strokeWidth:`2.5`,strokeLinejoin:`round`}),(0,k.jsx)(`path`,{d:`M102 46 L108 14 L78 30 Z`,fill:e,stroke:t,strokeWidth:`2.5`,strokeLinejoin:`round`}),(0,k.jsx)(`path`,{d:`M32 39 L29 23 L46 32 Z`,fill:t,opacity:`0.55`}),(0,k.jsx)(`path`,{d:`M100 39 L103 23 L86 32 Z`,fill:t,opacity:`0.55`}),(0,k.jsx)(`ellipse`,{cx:`66`,cy:`66`,rx:`44`,ry:`38`,fill:`var(--color-surface)`,stroke:e,strokeWidth:`2.5`}),(0,k.jsx)(`circle`,{cx:`50`,cy:`62`,r:`5`,fill:n}),(0,k.jsx)(`circle`,{cx:`82`,cy:`62`,r:`5`,fill:n}),(0,k.jsx)(`circle`,{cx:`51.8`,cy:`60`,r:`1.6`,fill:`var(--color-surface)`}),(0,k.jsx)(`circle`,{cx:`83.8`,cy:`60`,r:`1.6`,fill:`var(--color-surface)`}),(0,k.jsx)(`ellipse`,{cx:`40`,cy:`74`,rx:`6.5`,ry:`3.6`,fill:t,opacity:`0.65`}),(0,k.jsx)(`ellipse`,{cx:`92`,cy:`74`,rx:`6.5`,ry:`3.6`,fill:t,opacity:`0.65`}),(0,k.jsx)(`path`,{d:`M62 71 q4 4.5 4 1 q0 -3.5 4 -1`,stroke:`var(--color-sakura-800)`,strokeWidth:`2`,fill:`none`,strokeLinecap:`round`}),(0,k.jsx)(`path`,{d:`M18 64 L32 66 M19 72 L32 70`,stroke:e,strokeWidth:`2`,strokeLinecap:`round`}),(0,k.jsx)(`path`,{d:`M114 64 L100 66 M113 72 L100 70`,stroke:e,strokeWidth:`2`,strokeLinecap:`round`})]})}function yJ({text:e,images:t,skill:n,defaultImagePrompt:r,copy:i}){return n===void 0?(0,k.jsxs)(`div`,{className:`chat-row anim-user flex flex-col items-end`,children:[(0,k.jsxs)(`div`,{className:`bubble-user chat-bubble px-4 py-2.5 whitespace-pre-wrap${r?` [&>div]:mt-0`:``}`,children:[e,r&&(0,k.jsxs)(`details`,{className:`min-w-0 text-sm`,children:[(0,k.jsx)(`summary`,{className:`cursor-pointer min-h-8 py-1 text-ink-500 focus-visible:outline-2 focus-visible:outline-sakura-500`,children:`默认图片提示`}),(0,k.jsx)(`p`,{className:`pt-2 whitespace-pre-wrap break-words`,children:r.text})]}),t&&(0,k.jsx)(Ez,{images:t})]}),(0,k.jsx)(Cz,{text:i})]}):(0,k.jsxs)(`div`,{className:`chat-row anim-user flex flex-col items-end`,children:[(0,k.jsxs)(`div`,{className:`chat-bubble flex min-w-0 flex-col items-stretch gap-1.5`,children:[(0,k.jsx)(sJ,{invocation:n}),n.args!==``&&(0,k.jsx)(`div`,{className:`bubble-user px-4 py-2.5 whitespace-pre-wrap`,children:n.args})]}),(0,k.jsx)(Cz,{text:i})]})}function bJ({thinking:e,text:t}){return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(cJ,{text:e}),t.trim()!==``&&(0,k.jsx)(oJ,{text:t})]})}function xJ({item:e}){return e.text.trim()===``&&e.thinking.trim()===``&&e.note===null?null:(0,k.jsxs)(`div`,{className:`chat-row anim-other flex flex-col items-start`,children:[(0,k.jsxs)(`div`,{className:`bubble-assistant space-y-1.5 px-4 py-2.5`,children:[(0,k.jsx)(bJ,{thinking:e.thinking,text:e.text}),e.note!==null&&(0,k.jsxs)(`div`,{className:`text-xs text-sakura-800 italic`,children:[`⚠ `,e.note]})]}),(0,k.jsx)(Cz,{text:fz(e),label:`复制回答`})]})}function SJ({text:e}){return(0,k.jsx)(`div`,{className:`chat-row anim-other flex justify-center`,children:(0,k.jsx)(`span`,{className:`rounded-full bg-ink-100 px-3 py-1 text-xs text-ink-600`,children:e})})}function CJ({item:e}){return(0,k.jsxs)(`div`,{className:`chat-row anim-other`,children:[(0,k.jsx)(gJ,{name:e.name,summary:e.summary,detail:e.detail,phase:e.phase,isError:e.isError,output:e.output,result:e.result,durationMs:e.durationMs,note:e.note,diff:e.diff,diffAdded:e.diffAdded,diffRemoved:e.diffRemoved,diffTruncated:e.diffTruncated}),e.images&&(0,k.jsx)(Ez,{images:e.images})]})}function wJ({streaming:e,busy:t}){let n=e.text.trim()!==``||e.thinking.trim()!==``;return(0,k.jsxs)(k.Fragment,{children:[n&&(0,k.jsx)(`div`,{className:`chat-row stream-block flex justify-start`,children:(0,k.jsxs)(`div`,{className:`bubble-assistant space-y-1.5 px-4 py-2.5`,children:[(0,k.jsx)(bJ,{thinking:e.thinking,text:e.text}),t&&(0,k.jsx)(`span`,{className:`stream-caret`,"aria-hidden":!0})]})}),e.toolCalls.map(e=>(0,k.jsx)(`div`,{className:`chat-row anim-other`,children:(0,k.jsx)(gJ,{name:e.name,summary:e.summary,detail:e.detail,phase:e.phase,output:e.output,diff:e.diff,diffAdded:e.diffAdded,diffRemoved:e.diffRemoved,diffTruncated:e.diffTruncated})},`st${e.callId}`))]})}function TJ({view:e,busy:t,onSubagent:n,emptyLabel:r,onLoadEarlier:i,tray:a,focusEntry:o}){let s=(0,f.useRef)(null),c=(0,f.useRef)(``),l=(0,f.useRef)(!0),u=(0,f.useRef)(!1),[d,p]=(0,f.useState)(!1),m=e?.items??[],h=e?.streaming??null,g=e=>{let t=s.current;t!==null&&t.scrollTo({top:t.scrollHeight,behavior:e?`smooth`:`auto`})};return(0,f.useEffect)(()=>{if(!l.current)return;let e=s.current;e!==null&&e.scrollTo({top:e.scrollHeight})}),(0,f.useEffect)(()=>{if(!o||!m.some(e=>e.type===`user`&&e.id===o.id))return;let e=`${o.id}:${o.nonce}`;if(c.current===e)return;let t=s.current,n=t?.querySelector(`[data-entry-id="${o.id}"]`);t&&n&&(c.current=e,l.current=!1,t.scrollTop+=n.getBoundingClientRect().top-t.getBoundingClientRect().top,p(!0))},[o,m]),(0,k.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,k.jsx)(`div`,{ref:s,onScroll:()=>{let e=s.current;if(e===null)return;let t=e.scrollHeight-e.scrollTop-e.clientHeight<_J;if(l.current=t,p(!t),e.scrollTop<=24&&i&&!u.current){u.current=!0,l.current=!1;let t=e.scrollTop,n=e.scrollHeight;i().finally(()=>{requestAnimationFrame(()=>{s.current===e&&(e.scrollTop=t+e.scrollHeight-n),u.current=!1})})}},className:`min-h-0 flex-1 overflow-y-auto`,children:(0,k.jsxs)(`div`,{className:`chat-column flex flex-col gap-3 px-4 py-5`,children:[m.length===0&&h===null&&(r?(0,k.jsx)(`p`,{className:`p-4 text-sm text-ink-500`,children:r}):(0,k.jsxs)(`div`,{className:`mt-[14vh] flex flex-col items-center gap-4 text-center`,children:[(0,k.jsx)(`div`,{className:`welcome-cat`,children:(0,k.jsx)(vJ,{})}),(0,k.jsxs)(`div`,{className:`text-4xl font-extrabold tracking-tight`,children:[(0,k.jsx)(`span`,{className:`logo-gradient`,children:`neko`}),(0,k.jsx)(`span`,{className:`text-tianyi-600`,children:`.`}),(0,k.jsx)(`span`,{className:`logo-gradient`,children:`harness`})]}),(0,k.jsx)(`p`,{className:`max-w-sm text-sm text-ink-600`,children:`输入消息开始吧 ✦`})]})),m.map(t=>{switch(t.type){case`user`:{let n=e?.rounds?.find(e=>e.inputEntryId===t.id||e.taskId===t.subagentRoundId);return(0,k.jsxs)(`div`,{"data-entry-id":t.id,children:[n&&(0,k.jsxs)(`details`,{className:`chat-row border-t border-sakura-200 pt-2 text-xs text-ink-500`,children:[(0,k.jsxs)(`summary`,{className:`cursor-pointer`,children:[`任务 `,n.round??``,` · `,n.title,` ·`,` `,{queued:`排队中`,running:`运行中`,completed:`已完成`,failed:`失败`,cancelled:`已停止`}[n.status]]}),(0,k.jsx)(`p`,{className:`pt-1`,children:n.roundUsage?`本轮 ↑${n.roundUsage.input} ↓${n.roundUsage.output} · 缓存 ${n.roundUsage.cacheRead}/${n.roundUsage.cacheWrite} · $${n.roundUsage.cost.toFixed(4)}`:`本轮用量未记录`})]}),(0,k.jsx)(yJ,{text:t.text,copy:fz(t),images:t.images,skill:t.skill,defaultImagePrompt:t.defaultImagePrompt})]},t.key)}case`assistant`:return(0,k.jsx)(xJ,{item:t},t.key);case`tool`:{let r=e?.subagents?.find(e=>e.callId===t.callId);return r&&n?(0,k.jsxs)(`button`,{type:`button`,onClick:()=>n(r.taskId),className:`focus-neko rounded-2xl border border-sakura-200 bg-surface p-4 text-left`,children:[(0,k.jsx)(`span`,{className:`text-tianyi-700`,children:r.role}),` · `,r.title,(0,k.jsxs)(`span`,{className:`block text-xs text-ink-500`,children:[r.status===`completed`?`已完成`:r.status===`cancelled`?`已停止`:r.status===`failed`?`失败`:r.status===`queued`?`排队中`:`运行中`,` `,r.approvalCount?`· 待审批 ${r.approvalCount}`:`· 查看完整过程`]})]},t.key):(0,k.jsxs)(`div`,{children:[(0,k.jsx)(CJ,{item:t}),e?.approvals?.filter(e=>e.callId===t.callId&&e.status!==`pending`).map(e=>(0,k.jsxs)(`p`,{className:`chat-row text-xs text-ink-500`,children:[`审批 ·`,` `,{allowed:`已允许本次`,denied:`已拒绝`,cancelled:`已取消`}[e.status]]},e.id))]},t.key)}case`system`:return t.jobId===void 0?(0,k.jsx)(SJ,{text:t.text},t.key):(0,k.jsx)(Dz,{text:t.text,jobId:t.jobId,job:e?.jobs?.find(e=>e.jobId===t.jobId)},t.key);default:return null}}),h!==null&&(0,k.jsx)(wJ,{streaming:h,busy:t})]})}),(d||a)&&(0,k.jsxs)(`div`,{className:`discrete-in flex shrink-0 items-center justify-center gap-2 border-t border-sakura-100 bg-base/70 py-1.5`,children:[a,d&&(0,k.jsx)(`button`,{type:`button`,onClick:()=>{l.current=!0,p(!1),g(!0)},className:`focus-neko rounded-full border border-sakura-300 bg-surface px-3.5 py-1 text-xs font-medium text-sakura-800 hover:bg-sakura-50`,children:`回到底部 ↓`})]})]})}var EJ=Date.now(),DJ=new Set,OJ,kJ=()=>{EJ=Date.now();for(let e of DJ)e()},AJ=e=>(DJ.add(e),DJ.size===1&&(kJ(),OJ=setInterval(kJ,6e4),window.addEventListener(`focus`,kJ)),()=>{DJ.delete(e),DJ.size||(clearInterval(OJ),window.removeEventListener(`focus`,kJ))}),jJ=()=>(0,f.useSyncExternalStore)(AJ,()=>EJ);function MJ(e){let t=/^([A-Za-z]:)[\\/]/.exec(e)?.[1];if(t!==void 0){let n=`${t}\\`,r=e.slice(n.length).split(/[\\/]+/).filter(Boolean);return{root:`/`,rootLabel:`此电脑`,crumbs:[{label:t,path:n},...r.map((e,t)=>({label:e,path:n+r.slice(0,t+1).join(`\\`)}))]}}let n=e.split(`/`).filter(Boolean);return{root:`/`,rootLabel:`/`,crumbs:n.map((e,t)=>({label:e,path:`/${n.slice(0,t+1).join(`/`)}`}))}}function NJ({initialPath:e,onClose:t}){let[n,r]=(0,f.useState)(e),[i,a]=(0,f.useState)(e),[o,s]=(0,f.useState)(``),[c,l]=(0,f.useState)(!1),[u,d]=(0,f.useState)(null),[p,m]=(0,f.useState)(!0),[h,g]=(0,f.useState)(!1),[_,v]=(0,f.useState)(``),[y,b]=(0,f.useState)(0),x=(0,f.useRef)(0),S=(0,f.useRef)(null),C=(0,f.useRef)(!1);(0,f.useEffect)(()=>{let e=++x.current;return m(!0),v(``),d(null),OM.browse({path:n,query:o,showHidden:c}).then(t=>{e===x.current&&(d(t),a(e=>e===n?t.path:e),m(!1))},t=>{e===x.current&&(v(String(t)),m(!1))}),()=>{++x.current}},[n,o,c,y]);let w=e=>{S.current?.focus(),r(e),a(e),s(``),b(e=>e+1)},T=async()=>{if(!u?.next||p)return;let e=++x.current;m(!0),v(``);try{let t=await OM.browse({path:n,query:o,showHidden:c,cursor:u.next});e===x.current&&d({...t,entries:[...u.entries,...t.entries]})}catch(t){e===x.current&&v(String(t))}finally{e===x.current&&m(!1)}},ee=async()=>{if(!(!u||p||C.current)){C.current=!0,g(!0),v(``);try{await OM.addWorkspace(u.path),t()}catch(e){v(String(e))}finally{C.current=!1,g(!1)}}},{root:te,rootLabel:ne,crumbs:re}=MJ(u?.path??n);return(0,k.jsxs)(pI,{title:`添加工作区`,onClose:t,locked:h,children:[(0,k.jsxs)(`div`,{className:`picker-controls`,children:[(0,k.jsx)(`p`,{className:`text-ink-500`,children:`选择 Harness 所在电脑上的文件夹`}),(0,k.jsxs)(`nav`,{className:`breadcrumbs`,"aria-label":`目录路径`,children:[(0,k.jsx)(`button`,{type:`button`,disabled:h,onClick:()=>w(te),children:ne}),re.map(e=>(0,k.jsxs)(`button`,{type:`button`,disabled:h,onClick:()=>w(e.path),children:[e.label,` /`]},e.path))]}),(0,k.jsxs)(`form`,{className:`path-form`,onSubmit:e=>{e.preventDefault(),w(i)},children:[(0,k.jsx)(`input`,{ref:S,"aria-label":`完整目录路径`,value:i,disabled:h,onChange:e=>a(e.target.value)}),(0,k.jsx)(`button`,{className:`btn-outline`,type:`submit`,disabled:h,children:`前往`})]}),(0,k.jsxs)(`div`,{className:`filter-row`,children:[(0,k.jsx)(`input`,{"aria-label":`筛选文件夹`,placeholder:`筛选文件夹…`,value:o,disabled:h,onChange:e=>s(e.target.value)}),(0,k.jsxs)(`label`,{children:[(0,k.jsx)(`input`,{type:`checkbox`,checked:c,disabled:h,onChange:e=>l(e.target.checked)}),`隐藏目录`]})]})]}),(0,k.jsxs)(`fieldset`,{className:`folder-list`,"aria-label":`文件夹列表`,"aria-busy":p,onKeyDown:e=>{if(e.key!==`ArrowDown`&&e.key!==`ArrowUp`)return;e.preventDefault();let t=[...e.currentTarget.querySelectorAll(`button:not(:disabled)`)];t[(t.indexOf(document.activeElement)+(e.key===`ArrowDown`?1:-1)+t.length)%t.length]?.focus()},children:[_&&(0,k.jsxs)(`div`,{role:`alert`,className:`error-text`,children:[_,(0,k.jsx)(`button`,{type:`button`,className:`btn-outline`,disabled:h,onClick:()=>b(e=>e+1),children:`重试`})]}),u?.parent&&(0,k.jsxs)(`button`,{type:`button`,className:`chrome-row`,disabled:h||p,onClick:()=>w(u.parent),children:[(0,k.jsx)(lI,{name:`up`}),`上级目录`]}),u?.entries.map(e=>(0,k.jsxs)(`button`,{type:`button`,className:`chrome-row`,disabled:h||p||!!e.error,title:e.error??e.path,onClick:()=>w(e.path),children:[(0,k.jsx)(lI,{name:`folder`}),(0,k.jsx)(`span`,{className:`truncate min-w-0`,children:e.name}),e.error&&(0,k.jsx)(`span`,{className:`text-ink-500`,children:`不可访问`})]},e.path)),p&&(0,k.jsx)(`output`,{className:`empty-text`,children:`正在读取目录…`}),!p&&u?.entries.length===0&&(0,k.jsx)(`p`,{className:`empty-text`,children:`没有匹配的子文件夹,可选择当前目录`}),u?.next&&(0,k.jsx)(`button`,{type:`button`,className:`btn-outline`,disabled:p||h,onClick:()=>void T(),children:`加载更多`})]}),(0,k.jsxs)(`div`,{className:`picker-footer`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`strong`,{children:hI(u?.path??n)}),(0,k.jsx)(`p`,{className:`path-text`,children:u?.path??n})]}),(0,k.jsxs)(`div`,{className:`actions`,children:[(0,k.jsx)(`button`,{type:`button`,className:`btn-outline`,disabled:h,onClick:t,children:`取消`}),(0,k.jsx)(`button`,{type:`button`,className:`btn-primary px-3 py-1.5`,disabled:!u||p||h||!!_,onClick:()=>void ee(),children:h?`正在添加…`:`选择文件夹`})]})]})]})}function PJ({open:e,onClose:t}){let n=gM(),r=jJ(),i=uI(),[a,o]=(0,f.useState)(null),s=n.sessions.find(e=>e.id===a?.id),[c,l]=(0,f.useState)(!1),[u,d]=(0,f.useState)(null),[p,m]=(0,f.useState)(``),[h,g]=(0,f.useState)(``),_=n.phase!==`ready`||n.operating,v=uM(n.sessions,n.workspaceRoot).filter(e=>Pi(e,h)),y=e=>{e.then(()=>{i&&t()}).catch(AM)};if(!e)return null;let b=(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(`div`,{className:`sidebar-top`,children:[(0,k.jsxs)(`div`,{className:`workspace-heading`,children:[(0,k.jsxs)(`button`,{type:`button`,className:`workspace-trigger`,"aria-label":`切换工作区`,"aria-expanded":a!==null&&!a.id,disabled:_,onClick:e=>o({anchor:e.currentTarget}),children:[(0,k.jsx)(`span`,{className:`workspace-mark`,children:(0,k.jsx)(lI,{name:`folder`})}),(0,k.jsx)(`span`,{className:`truncate min-w-0`,children:hI(n.workspaceRoot)||`工作区`}),(0,k.jsx)(lI,{name:`chevron`})]}),!i&&(0,k.jsx)(`button`,{type:`button`,className:`icon-btn`,"aria-label":`收起侧栏`,title:`收起侧栏`,onClick:t,children:(0,k.jsx)(lI,{name:`panel`})})]}),(0,k.jsxs)(`button`,{type:`button`,className:`chrome-row font-medium`,disabled:_,onClick:()=>y(OM.createSession()),children:[(0,k.jsx)(lI,{name:`plus`}),`新建会话`]}),(0,k.jsxs)(`div`,{className:`search-box`,children:[(0,k.jsx)(lI,{name:`search`}),(0,k.jsx)(`input`,{"aria-label":`搜索当前工作区会话`,placeholder:`搜索会话…`,value:h,onChange:e=>g(e.target.value)})]})]}),(0,k.jsxs)(`div`,{className:`section-label`,children:[`会话 `,(0,k.jsx)(`span`,{children:v.length})]}),(0,k.jsxs)(`div`,{className:`session-scroll`,children:[(0,k.jsx)(`ul`,{className:`session-list`,children:v.map(e=>(0,k.jsxs)(`li`,{className:`session-row ${e.id===n.currentSessionId?`is-active`:``}`,children:[(0,k.jsxs)(`button`,{type:`button`,className:`chrome-row session-select`,disabled:_,"aria-current":e.id===n.currentSessionId?`page`:void 0,"aria-describedby":`session-tip-${e.id}`,onClick:()=>y(OM.selectSession(e.id)),children:[(0,k.jsx)(lI,{name:`chat`}),(0,k.jsxs)(`span`,{className:`session-copy`,children:[(0,k.jsx)(`span`,{className:`truncate min-w-0`,children:Ai(e,`新会话`)}),(0,k.jsxs)(`span`,{className:`session-meta`,children:[(0,k.jsx)(`time`,{dateTime:new Date(ji(e)).toISOString(),children:Fi(ji(e),r,`zh`)}),e.status===`running`?` · 运行中`:e.status===`error`?` · 出错`:``]}),(0,k.jsxs)(`span`,{className:`session-tooltip`,role:`tooltip`,id:`session-tip-${e.id}`,children:[Ai(e,`新会话`),(0,k.jsx)(`br`,{}),new Date(ji(e)).toLocaleString(`zh-CN`)]})]})]}),(0,k.jsx)(`button`,{type:`button`,className:`icon-btn row-more`,disabled:_,"aria-label":`${Ai(e,`新会话`)}的操作`,title:`会话操作`,onClick:t=>o({anchor:t.currentTarget,id:e.id}),children:(0,k.jsx)(lI,{name:`more`})})]},e.id))}),v.length===0&&(0,k.jsx)(`div`,{className:`empty-text`,children:n.phase===`ready`?h?`没有匹配的会话`:`此工作区暂无会话`:`等待网关连接…`})]}),(0,k.jsxs)(`div`,{className:`sidebar-bottom`,children:[(0,k.jsx)(`span`,{className:`path-text`,title:n.workspaceRoot,children:n.workspaceRoot}),(0,k.jsxs)(Ur,{to:`/skills`,className:`chrome-row`,onClick:()=>{i&&t()},children:[(0,k.jsx)(lI,{name:`store`}),`技能市场`]}),(0,k.jsxs)(Ur,{to:`/settings`,className:`chrome-row`,onClick:()=>{i&&t()},children:[(0,k.jsx)(lI,{name:`settings`}),`设置`]})]})]});return(0,k.jsxs)(k.Fragment,{children:[i?(0,k.jsx)(pI,{title:`工作区与会话`,drawer:!0,onClose:t,children:b}):(0,k.jsx)(`aside`,{className:`chrome sidebar`,"aria-label":`工作区与会话`,children:b}),a&&(0,k.jsx)(mI,{anchor:a.anchor,label:a.id?`会话操作`:`选择工作区`,onClose:()=>o(null),children:a.id?(0,k.jsxs)(k.Fragment,{children:[s&&(0,k.jsxs)(`div`,{className:`session-details`,children:[(0,k.jsx)(`strong`,{children:Ai(s,`新会话`)}),(0,k.jsx)(`small`,{children:new Date(ji(s)).toLocaleString(`zh-CN`)})]}),(0,k.jsxs)(`button`,{type:`button`,className:`chrome-row`,onClick:()=>{d(a.id),m(``),o(null)},children:[(0,k.jsx)(lI,{name:`archive`}),`归档会话`]})]}):(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`div`,{className:`section-label`,children:`工作区`}),(0,k.jsx)(`div`,{className:`workspace-options`,children:n.workspaces.map(e=>(0,k.jsxs)(`button`,{type:`button`,className:`workspace-option ${e.path===n.workspaceRoot?`is-active`:``}`,title:e.path,onClick:()=>{o(null),g(``),y(OM.selectWorkspace(e.path))},children:[(0,k.jsx)(lI,{name:`folder`}),(0,k.jsxs)(`span`,{children:[(0,k.jsx)(`strong`,{children:hI(e.path)}),(0,k.jsx)(`small`,{children:e.path})]}),e.path===n.workspaceRoot&&(0,k.jsx)(`span`,{role:`img`,"aria-label":`当前工作区`,children:`✓`})]},e.path))}),(0,k.jsxs)(`button`,{type:`button`,className:`chrome-row add-workspace`,onClick:()=>{o(null),l(!0)},children:[(0,k.jsx)(lI,{name:`plus`}),`添加工作区`]})]})}),c&&(0,k.jsx)(NJ,{initialPath:n.workspaceRoot,onClose:()=>l(!1)}),u&&(0,k.jsx)(pI,{title:`归档会话`,locked:n.operating,onClose:()=>d(null),children:(0,k.jsxs)(`div`,{className:`confirm-body`,children:[(0,k.jsxs)(`p`,{children:[`归档“`,Ai(n.sessions.find(e=>e.id===u)??{title:``,firstPromptPreview:``},`新会话`),`”?会话将从列表中隐藏,工作区和文件仍会保留。`]}),p&&(0,k.jsx)(`p`,{role:`alert`,className:`error-text`,children:p}),(0,k.jsxs)(`div`,{className:`actions`,children:[(0,k.jsx)(`button`,{type:`button`,className:`btn-outline`,disabled:n.operating,onClick:()=>d(null),children:`取消`}),(0,k.jsx)(`button`,{type:`button`,className:`btn-primary`,disabled:n.operating,onClick:()=>{OM.archiveSession(u).then(()=>d(null)).catch(e=>m(String(e)))},children:`确认归档`})]})]})})]})}function FJ(e,t){let n=new Map(e.map(e=>[e.key,e]));for(let e of t){let t=n.get(e.key);(t?.type!==`tool`||e.type!==`tool`||t.phase!==`done`||e.phase===`done`)&&n.set(e.key,e)}return[...n.values()].sort((e,t)=>(e.order??0)-(t.order??0))}var IJ={idle:`空闲`,queued:`排队中`,running:`运行中`,completed:`已完成`,failed:`失败`,cancelled:`已停止`};function LJ({entry:e,active:t,target:n}){let{phase:r,operating:i,view:a}=gM(),[o,s]=(0,f.useState)(null),[c,l]=(0,f.useState)(``),[u,d]=(0,f.useState)([]),[p,m]=(0,f.useState)(),[h,g]=(0,f.useState)(!1),[,_]=(0,f.useState)(Date.now);(0,f.useEffect)(()=>{if(!t||e.activeRoundId===null)return;let n=setInterval(()=>_(Date.now()),1e3);return()=>clearInterval(n)},[t,e.activeRoundId]);let v=r===`ready`&&!i&&a!==null,y=(0,f.useMemo)(()=>v&&t?OM.subagent(e.agentId):null,[v,t,e.agentId]),b=(0,f.useRef)(0);(0,f.useEffect)(()=>{let e=++b.current;if(g(!1),m(void 0),!y)return;let t=y.view.subscribe(t=>{e===b.current&&y.error&&l(y.error),e===b.current&&t&&(s(e=>(e?.items.length&&!t.items.some(t=>e.items.some(e=>e.key===t.key))&&m(t.historyBefore),{...t,items:FJ(e?.items??[],t.items)})),m(e=>e===void 0?t.historyBefore:e),y.error||l(``))});return()=>{b.current++,t()}},[y]);let x=(0,f.useMemo)(()=>y?(e,t)=>Oi(n=>y.getImage({entryId:e,contentIndex:t,offset:n})):null,[y]),S=(0,f.useMemo)(()=>o?{...o,items:FJ(u,o.items)}:null,[o,u]),C=(0,f.useCallback)(async()=>{if(!y||h||p==null)return;let e=b.current;g(!0);try{let t=await y.history(p==null?{}:{before:p});if(e!==b.current)return;d(e=>FJ(e,t.items)),m(t.next)}catch(t){e===b.current&&l(String(t))}finally{e===b.current&&g(!1)}},[y,h,p]),w=n?o?.rounds?.find(e=>e.taskId===n.taskId)?.inputEntryId:void 0,T=o?.rounds?.find(t=>t.taskId===(e.activeRoundId??e.lastRoundId));return(0,f.useEffect)(()=>{t&&w!==void 0&&S&&!S.items.some(e=>e.type===`user`&&e.id===w)&&p!=null&&!h&&C()},[t,w,S,p,h,C]),(0,k.jsxs)(`div`,{className:`${t?`flex`:`hidden`} min-h-0 flex-1 flex-col`,children:[(0,k.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 border-b border-sakura-100 p-3 text-xs`,children:[(0,k.jsxs)(`span`,{children:[e.historyThrough===void 0?``:`历史 · `,IJ[e.status]]}),o&&(0,k.jsxs)(`span`,{title:`子智能体累计用量`,children:[`↑`,o.usage.input,` ↓`,o.usage.output,` · $`,o.usage.cost.toFixed(4)]}),T&&(0,k.jsxs)(`span`,{title:`当前或最近任务耗时`,children:[Math.max(0,Math.round(((T.endedAt??Date.now())-T.createdAt)/1e3)),`s`]}),e.historyThrough===void 0&&(e.status===`running`||e.status===`queued`)&&(0,k.jsx)(`button`,{type:`button`,className:`focus-neko rounded-lg border border-sakura-300 px-2 leading-[14px]`,onClick:()=>{y?.stop({taskId:e.activeRoundId}).catch(e=>l(String(e)))},children:`停止此任务`})]}),c&&(0,k.jsx)(`p`,{role:`alert`,className:`p-3 text-sm text-sakura-800`,children:c}),(0,k.jsx)(wz.Provider,{value:x,children:(0,k.jsx)(TJ,{view:S,focusEntry:w!==void 0&&n?{id:w,nonce:n.nonce}:void 0,onLoadEarlier:t&&p!=null?C:void 0,busy:o?.busy??!1,emptyLabel:e.status===`queued`?`任务排队中…`:`暂无内容`})})]})}function RJ({entries:e,selected:t,open:n,onSelect:r,onClose:i,approval:a,target:o}){let[s,c]=(0,f.useState)([]),l=(0,f.useRef)(null),u=(0,f.useRef)(null),[d,p]=(0,f.useState)(()=>window.matchMedia(`(max-width: 1023px)`).matches);return(0,f.useEffect)(()=>{let e=window.matchMedia(`(max-width: 1023px)`),t=()=>p(e.matches);return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]),(0,f.useEffect)(()=>{t!==null&&c(e=>e.includes(t)?e:[...e,t])},[t]),(0,f.useEffect)(()=>{if(!n)return;let e=document.activeElement,t=d&&u.current?.parentElement?[...u.current.parentElement.children].filter(e=>e instanceof HTMLElement&&e!==u.current):[],r=t.map(e=>e.inert);return t.forEach(e=>{e.inert=!0}),l.current?.focus(),()=>{t.forEach((e,t)=>{e.inert=r[t]}),e?.isConnected&&e.focus()}},[n,d]),(0,k.jsxs)(`aside`,{ref:u,role:d?`dialog`:`complementary`,"aria-modal":d&&n?!0:void 0,"aria-label":`子智能体`,className:`${n?`flex`:`hidden`} fixed inset-0 z-30 min-w-0 flex-col border-l border-sakura-200 bg-base lg:static lg:z-auto lg:w-[min(42vw,40rem)] lg:shrink-0`,onKeyDown:e=>{if(e.currentTarget.contains(e.target)){if(e.key===`Tab`&&window.innerWidth<1024){let t=[...e.currentTarget.querySelectorAll(`button:not([disabled]),a[href],summary,[tabindex='0']`)].filter(e=>e.getClientRects().length>0),n=t[0],r=t.at(-1);e.shiftKey&&document.activeElement===n?(e.preventDefault(),r?.focus()):!e.shiftKey&&document.activeElement===r&&(e.preventDefault(),n?.focus())}e.key===`Escape`&&(e.stopPropagation(),i())}},children:[(0,k.jsxs)(`div`,{className:`flex items-center justify-between border-b border-sakura-200 px-4 py-1.5`,children:[(0,k.jsx)(`strong`,{className:`text-sm text-ink-800`,children:`子智能体`}),(0,k.jsx)(`button`,{ref:l,type:`button`,className:`focus-neko rounded-lg px-2 py-1 text-sm text-ink-600 hover:bg-sakura-50`,onClick:i,children:`关闭`})]}),(0,k.jsx)(`div`,{className:`max-h-44 shrink-0 overflow-auto border-b border-sakura-100 p-2`,children:e.map(e=>(0,k.jsxs)(`button`,{type:`button`,"aria-pressed":t===e.agentId,className:`focus-neko flex w-full min-w-0 items-center gap-2 rounded-lg px-2 py-1.5 text-left text-sm ${t===e.agentId?`bg-tianyi-100`:`hover:bg-sakura-50`}`,onClick:()=>r(e.agentId),children:[(0,k.jsxs)(`span`,{className:`min-w-0 truncate`,children:[(0,k.jsx)(`span`,{className:`text-tianyi-700`,children:e.role}),` · `,e.title]}),(0,k.jsxs)(`span`,{className:`shrink-0 text-xs text-ink-500`,children:[e.roundCount,` 轮`]})]},e.agentId))}),s.map(r=>{let i=e.find(e=>e.agentId===r);return i?(0,k.jsx)(LJ,{entry:i,active:n&&r===t,target:r===t?o:void 0},r):null}),a]})}var zJ=class extends Error{constructor(){super(`会话已切换,导出已取消`),this.name=`ExportCancelledError`}};async function BJ(e){let{snapshot:t}=e,n=e.now??new Date,r=!1,i=await mz(e.format,{...t,exportedAt:n},{includeThinking:e.includeThinking,loadImage:n=>e.currentSessionId()===t.sessionId?e.readImage(n,t.sessionId):(r=!0,Promise.reject(new zJ))});if(r)throw new zJ;return{...i,fileName:pz(t.title,e.format,n)}}function VJ(e){let t=e.skippedImages>0?`,${e.skippedImages} 张图片未能内嵌`:``;return`已导出 ${e.fileName}${t}`}function HJ(e,t,n){let r=URL.createObjectURL(new Blob([t],{type:n})),i=document.createElement(`a`);i.href=r,i.download=e,i.hidden=!0,document.body.append(i);try{i.click()}finally{i.remove(),setTimeout(()=>URL.revokeObjectURL(r),0)}}var UJ=[{format:`markdown`,label:`Markdown (.md)`},{format:`html`,label:`HTML (.html)`},{format:`json`,label:`JSON (.json)`}];function WJ(){let{view:e,currentSessionId:t,sessions:n}=gM(),[r,i]=(0,f.useState)(null),[a,o]=(0,f.useState)(!1),[s,c]=(0,f.useState)(!1),l=(0,f.useRef)(!1),u=e===null||t===null||e.items.length===0,d=s?`导出中…`:u?`当前会话还没有内容可导出`:`导出会话`,p=async r=>{if(l.current||e===null||t===null)return;l.current=!0,c(!0),i(null);let o=n.find(e=>e.id===t);try{let n=await BJ({format:r,includeThinking:a,snapshot:{sessionId:t,title:o?Ai(o,`新会话`):`新会话`,model:e.model,cwd:e.cwd,items:e.items},currentSessionId:()=>_M().currentSessionId,readImage:(e,t)=>OM.image(e.entryId,e.contentIndex,t)});HJ(n.fileName,n.content,n.mimeType),vM.notice({level:`info`,text:VJ(n)})}catch(e){vM.notice({level:`error`,text:e instanceof zJ?e.message:`导出失败:${e instanceof Error?e.message:String(e)}`})}finally{l.current=!1,c(!1)}};return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(`button`,{type:`button`,className:`icon-btn export-btn`,"aria-label":`导出会话`,"aria-haspopup":`dialog`,"aria-expanded":r!==null,"aria-disabled":s||void 0,disabled:u&&!s,title:d,onClick:e=>{s||i(r===null?e.currentTarget:null)},children:[(0,k.jsx)(lI,{name:`download`}),(0,k.jsx)(`span`,{className:`export-label`,children:s?`导出中…`:`导出`})]}),r&&(0,k.jsxs)(mI,{anchor:r,label:`导出会话`,onClose:()=>i(null),children:[(0,k.jsx)(`div`,{className:`section-label`,children:`导出格式`}),UJ.map(({format:e,label:t})=>(0,k.jsxs)(`button`,{type:`button`,className:`chrome-row`,onClick:()=>void p(e),children:[(0,k.jsx)(lI,{name:`download`}),t]},e)),(0,k.jsxs)(`button`,{type:`button`,role:`switch`,"aria-checked":a,className:`chrome-row export-option`,onClick:()=>o(!a),children:[(0,k.jsx)(`span`,{className:`export-check`,"aria-hidden":`true`,children:a?`✓`:``}),`包含思考过程`]})]})]})}var GJ={ready:`已连接`,connecting:`连接中…`,reconnecting:`重连中…`,error:`连接失败`};function KJ(e){let{workspaceRoot:t,currentSessionId:n,operating:r,sessions:i,view:a}=gM(),o=a?.jobs,s=o?.filter(e=>e.status===`running`).length??0,c=i.find(e=>e.id===n);return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(`header`,{className:`chrome topbar`,children:[(0,k.jsx)(`button`,{type:`button`,className:`icon-btn`,"aria-label":`切换侧栏`,title:`切换侧栏`,"aria-expanded":e.sidebarOpen,onClick:e.onToggleSessions,children:(0,k.jsx)(lI,{name:`panel`})}),(0,k.jsxs)(`span`,{className:`topbar-path`,title:t,children:[(0,k.jsx)(lI,{name:`folder`}),(0,k.jsx)(`span`,{className:`truncate min-w-0`,children:hI(t)||`工作区`})]}),(0,k.jsx)(`span`,{className:`text-ink-500`,children:`/`}),(0,k.jsx)(`span`,{className:`truncate min-w-0`,title:c?Ai(c,`新会话`):void 0,children:c?Ai(c,`新会话`):`新会话`}),(0,k.jsx)(`output`,{className:`conn-status ${e.conn===`ready`?`is-connected`:e.conn===`error`?`is-error`:``}`,children:r?`切换中…`:GJ[e.conn]}),o!==void 0&&o.length>0&&e.onToggleJobs&&(0,k.jsxs)(`button`,{type:`button`,className:`focus-neko shrink-0 whitespace-nowrap rounded-full border border-sakura-300 px-2.5 py-0.5 text-xs text-sakura-800 hover:bg-sakura-50`,"aria-expanded":e.jobsOpen,title:`后台任务`,onClick:e.onToggleJobs,children:[`任务`,s>0?` · ${s} 运行中`:` ${o.length}`]}),(0,k.jsx)(WJ,{})]}),(0,k.jsx)(FI,{})]})}var qJ=8e3;function JJ(){let{view:e,phase:t,notice:n,operating:r,workspaceRoot:i,currentSessionId:a}=gM(),o=uI();(0,f.useEffect)(()=>{if(n?.level!==`info`)return;let e=setTimeout(vM.clearNotice,qJ);return()=>clearTimeout(e)},[n]);let s=(0,f.useRef)(0),[c,l]=(0,f.useState)(()=>window.matchMedia(`(max-width: 1023px)`).matches);(0,f.useEffect)(()=>{let e=window.matchMedia(`(max-width: 1023px)`),t=()=>l(e.matches);return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]);let[u,d]=(0,f.useState)({}),p=e?.agents;(0,f.useEffect)(()=>{a&&p?.length&&d(e=>({...e,[a]:{open:e[a]?.open??!0,...e[a]?.target?{target:e[a].target}:{},selected:e[a]?.selected??p[0].agentId,entries:p}}))},[p,a]);let[m,h]=(0,f.useState)(null),g=m!==null&&m===a,_=(e,t)=>{if(!a)return;h(null);let n=++s.current;d(r=>({...r,[a]:{open:!0,selected:e,entries:p??[],...t===void 0?{}:{target:{taskId:t,nonce:n}}}}))},v=t=>{let n=e?.subagents?.find(e=>e.taskId===t);n?.agentId&&_(n.agentId,t)},[y,b]=(0,f.useState)(()=>!window.matchMedia(cI).matches);(0,f.useEffect)(()=>{b(!o)},[o]);let x=c&&!!u[a??``]?.open,S=e?.busy??!1,C=e?.status??null;return(0,k.jsxs)(`div`,{className:`flex h-dvh`,children:[(0,k.jsx)(`a`,{href:`#main-content`,className:`skip-link`,children:`跳到主内容`}),(0,k.jsx)(PJ,{open:y,onClose:()=>b(!1)}),(0,k.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,k.jsx)(KJ,{sidebarOpen:y,conn:t,onToggleSessions:()=>b(!y),jobsOpen:g,onToggleJobs:()=>{!g&&a&&d(e=>e[a]?{...e,[a]:{...e[a],open:!1}}:e),h(g?null:a??null)}}),n!==null&&(0,k.jsxs)(`div`,{className:`discrete-in flex items-center gap-2 border-b py-1 pr-2 pl-9 text-xs ${n.level===`error`?`border-sakura-300 bg-sakura-100 text-sakura-900`:`border-tianyi-200 bg-tianyi-50 text-tianyi-900`}`,role:`alert`,children:[(0,k.jsx)(`span`,{className:`min-w-0 flex-1 text-center`,children:n.text}),(0,k.jsx)(gI,{label:`关闭提示`,onClick:vM.clearNotice})]}),(0,k.jsxs)(`main`,{id:`main-content`,tabIndex:-1,className:`flex min-h-0 flex-1 flex-col focus:outline-none`,children:[!a&&t===`ready`&&!r?(0,k.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-3 px-6 text-center`,children:[(0,k.jsx)(`h1`,{className:`text-xl font-semibold text-ink-900`,children:hI(i)}),(0,k.jsx)(`p`,{className:`text-sm text-ink-600`,children:`在这个工作区开始新的会话`}),(0,k.jsx)(`button`,{type:`button`,className:`btn-primary focus-neko rounded-xl px-4 py-2`,onClick:()=>{OM.createSession().catch(AM)},children:`新建会话`})]}):(0,k.jsx)(TJ,{view:e,busy:S,onSubagent:v,tray:(p?.length??0)>0?(0,k.jsxs)(`button`,{type:`button`,className:`focus-neko rounded-full border border-sakura-300 bg-surface px-3.5 py-1 text-xs font-medium text-sakura-800 hover:bg-sakura-50`,onClick:()=>_(u[a??``]?.selected??p[0].agentId),children:[`子智能体 · `,p.length,` 个`,p.some(e=>e.approvalCount)?` · 待审批 ${p.reduce((e,t)=>e+(t.approvalCount??0),0)}`:``,p.some(e=>e.historyThrough===void 0&&e.status===`running`)?` · ${p.filter(e=>e.historyThrough===void 0&&e.status===`running`).length} 运行中`:``]}):void 0}),!x&&(0,k.jsx)(BI,{}),(0,k.jsx)(OI,{disabled:t!==`ready`||r,busy:S,status:C})]})]}),Object.entries(u).map(([e,t])=>(0,k.jsx)(RJ,{entries:e===a?p??t.entries:t.entries,approval:x&&e===a?(0,k.jsx)(BI,{}):void 0,selected:t.selected,open:e===a&&t.open,onSelect:_,target:t.target,onClose:()=>d(n=>({...n,[e]:{...t,open:!1}}))},e)),a&&e?.jobs!==void 0&&(0,k.jsx)(aL,{sessionId:a,jobs:e.jobs,open:g,onClose:()=>h(null)},a)]})}var YJ={compaction:{group:`compaction`,field:`enabled`,key:`compaction.enabled`},pruning:{group:`pruning`,field:`enabled`,key:`pruning.enabled`}},XJ=[{key:`compaction.triggerPercent`,group:`compaction`,field:`triggerPercent`,label:`触发时机`,description:`上下文达到模型窗口的这个比例时自动压缩。默认接近窗口上限。`,unit:`percent`,presets:[30,40,50,60,70,80]},{key:`compaction.keepRecentTokens`,group:`compaction`,field:`keepRecentTokens`,label:`保留近期`,description:`压缩时逐字保留的近期内容,越多越不容易丢细节。`,unit:`tokens`,presets:[1e4,2e4,4e4,8e4]},{key:`pruning.triggerPercent`,group:`pruning`,field:`triggerPercent`,label:`触发时机`,description:`上下文达到模型窗口的这个比例时裁剪旧结果。`,unit:`percent`,presets:[20,30,35,45,55]},{key:`pruning.keepRecent`,group:`pruning`,field:`keepRecent`,label:`保留最近结果`,description:`最新的这些工具结果永远保持完整。`,unit:`count`,presets:[5,10,20,40]},{key:`pruning.minChars`,group:`pruning`,field:`minChars`,label:`最小结果长度`,description:`短于这个长度的结果不会被裁剪。`,unit:`chars`,presets:[2e3,4e3,8e3,16e3]},{key:`pruning.minSavePercent`,group:`pruning`,field:`minSavePercent`,label:`单次最小释放量`,description:`单次裁剪预计释放的上下文达到模型窗口的这个比例才会执行。每次裁剪都会使提示词缓存失效,比例越大,裁剪越少、越集中。`,unit:`percent`,presets:[2,5,10,15]}],ZJ={default:`默认`,config:`配置文件`,saved:`已保存`};function QJ(e,t){let n=e.effective[t.group],r=e.sources[t.group];return{value:n[t.field]??null,source:r[t.field]??`default`}}function $J(e,t){switch(e){case`percent`:return`${t}%`;case`tokens`:return t>=1e3?`${Number((t/1e3).toFixed(1))}k`:String(t);case`chars`:return t>=1e3?`${Number((t/1e3).toFixed(1))}k 字符`:`${t} 字符`;default:return`${t} 个`}}function eY(e,t){let{value:n,source:r}=QJ(t,e),i=typeof n==`number`?n:null,a=[{id:`default`,label:`默认`,value:null,selected:r!==`saved`}];for(let t of e.presets)a.push({id:String(t),label:$J(e.unit,t),value:t,selected:r===`saved`&&i===t});return i!==null&&r!=="default"&&!e.presets.includes(i)&&a.push({id:`custom-${i}`,label:`${$J(e.unit,i)} · 自定义`,value:i,selected:r===`saved`}),a}function tY(e,t){let{value:n,source:r}=QJ(t,e);return`当前生效 ${typeof n==`number`?$J(e.unit,n):`接近窗口上限`} · ${ZJ[r]}`}function nY(e,t){return{[e.group]:{[e.field]:t}}}function rY(e){let t=[],{compaction:n,pruning:r}=e.effective;return r.enabled&&t.push({id:`pruning`,label:`裁剪`,percent:r.triggerPercent,native:!1}),n.enabled&&t.push({id:`compaction`,label:`压缩`,percent:n.triggerPercent??98,native:n.triggerPercent===null}),t}var iY=[{id:`compaction`,title:`上下文压缩`,blurb:`对话变长时,把较早的内容整理成摘要,腾出空间继续聊。手动 /compact 始终可用。`},{id:`pruning`,title:`工具结果裁剪`,blurb:`把较早的大段工具输出在模型眼中换成一行说明;界面里的完整结果和历史记录不受影响。每次裁剪会让提示词缓存失效,所以按批量进行。`}];function aY(e){return(0,k.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":e.checked,"aria-label":e.label,disabled:e.disabled,onClick:()=>e.onChange(!e.checked),className:`focus-neko relative inline-flex h-6 w-11 shrink-0 items-center rounded-full transition-colors disabled:opacity-60 ${e.checked?`bg-sakura-500`:`bg-ink-200`}`,children:(0,k.jsx)(`span`,{className:`inline-block size-5 rounded-full bg-white shadow transition-transform ${e.checked?`translate-x-[22px]`:`translate-x-0.5`}`})})}function oY({items:e}){return(0,k.jsxs)(`section`,{className:`rounded-2xl border border-sakura-200 bg-surface p-5 shadow-soft`,"aria-label":`触发位置预览`,children:[(0,k.jsxs)(`div`,{className:`flex items-center justify-between text-xs text-ink-500`,children:[(0,k.jsx)(`span`,{className:`font-semibold text-ink-900`,children:`触发位置`}),(0,k.jsx)(`span`,{children:`模型上下文窗口`})]}),(0,k.jsx)(`div`,{className:`px-6`,children:(0,k.jsx)(`div`,{className:`relative mt-9 mb-9 h-2.5 rounded-full bg-gradient-to-r from-tianyi-100 via-sakura-100 to-sakura-200`,children:e.map(e=>(0,k.jsxs)(`div`,{className:`absolute top-1/2 -translate-x-1/2 -translate-y-1/2`,style:{left:`${e.percent}%`},children:[(0,k.jsx)(`span`,{className:`block size-4 rounded-full border-2 border-white shadow ${e.id===`pruning`?`bg-tianyi-500`:`bg-sakura-600`}`}),(0,k.jsxs)(`span`,{className:`absolute left-1/2 -translate-x-1/2 whitespace-nowrap text-xs font-semibold ${e.id===`pruning`?`-top-7 text-tianyi-800`:`top-6 text-sakura-800`}`,children:[e.label,` `,e.native?`≈`:``,e.percent,`%`]})]},e.id))})}),(0,k.jsxs)(`div`,{className:`flex justify-between text-[11px] text-ink-400`,children:[(0,k.jsx)(`span`,{children:`0%`}),(0,k.jsx)(`span`,{children:`100%`})]}),e.length===0&&(0,k.jsx)(`p`,{className:`mt-2 text-xs text-ink-500`,children:`自动压缩与裁剪均已关闭。`})]})}function sY(e){let{row:t,settings:n,disabled:r,dim:i,onPick:a}=e,{source:o}=QJ(n,t);return(0,k.jsxs)(`div`,{className:`transition-opacity ${i?`opacity-55`:``}`,children:[(0,k.jsxs)(`div`,{className:`flex flex-wrap items-baseline justify-between gap-x-3`,children:[(0,k.jsx)(`span`,{className:`text-sm font-semibold text-ink-900`,children:t.label}),(0,k.jsx)(`span`,{className:`text-xs text-ink-500`,children:tY(t,n)})]}),(0,k.jsx)(`p`,{className:`mt-0.5 text-xs text-ink-500`,children:t.description}),(0,k.jsxs)(`fieldset`,{className:`m-0 mt-2 flex min-w-0 flex-wrap gap-1.5 border-0 p-0`,children:[(0,k.jsx)(`legend`,{className:`sr-only`,children:t.label}),eY(t,n).map(e=>(0,k.jsx)(`button`,{type:`button`,"aria-pressed":e.selected,disabled:r,"data-row":t.key,"data-chip":e.id,onClick:()=>!e.selected&&a(e.value),className:`focus-neko rounded-full border px-3 py-1 text-xs transition-colors disabled:opacity-60 ${e.selected?`border-sakura-400 bg-sakura-100 font-semibold text-sakura-800`:`border-sakura-200 bg-surface text-ink-700 hover:bg-sakura-50`}`,children:e.label},e.id))]}),o===`config`&&(0,k.jsx)(`p`,{className:`mt-1 text-[11px] text-ink-400`,children:`来自配置文件,选择其他档位会覆盖它。`})]})}function cY(e){let{settings:t,ready:n,onChange:r,onReset:i}=e,[a,o]=(0,f.useState)(0),[s,c]=(0,f.useState)(``),l=!n||!t,u=(0,f.useRef)(0);async function d(e,t){let n=++u.current;o(e=>e+1),c(``);try{await e(),n===u.current&&c(t)}catch{n===u.current&&c(`保存失败,请检查连接后重试。`)}finally{o(e=>e-1)}}let p=(e,t)=>void d(()=>r(nY(e,t)),t===null?`${e.label}已恢复默认`:`已保存`);if(!t)return(0,k.jsx)(`p`,{className:`text-sm text-ink-500`,children:`读取中…`});let m=[...Object.values(t.sources.compaction),...Object.values(t.sources.pruning)].includes(`saved`);return(0,k.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,k.jsx)(oY,{items:rY(t)}),iY.map(e=>{let n=YJ[e.id],{value:r,source:i}=QJ(t,n);return(0,k.jsxs)(`section`,{className:`rounded-2xl border border-sakura-200 bg-surface p-5 shadow-soft`,"aria-labelledby":`ctx-${e.id}`,children:[(0,k.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,k.jsx)(`span`,{className:`mt-0.5 inline-flex size-8 shrink-0 items-center justify-center rounded-xl bg-sakura-50 text-sakura-700`,children:(0,k.jsx)(lI,{name:e.id===`compaction`?`layers`:`sparkles`,size:16})}),(0,k.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,k.jsx)(`h2`,{id:`ctx-${e.id}`,className:`text-base font-bold text-ink-900`,children:e.title}),(0,k.jsx)(`p`,{className:`mt-0.5 text-xs text-ink-500`,children:e.blurb})]}),(0,k.jsxs)(`div`,{className:`flex flex-col items-end gap-1`,children:[(0,k.jsx)(aY,{checked:r===!0,label:e.id===`compaction`?`自动压缩`:`裁剪工具结果`,disabled:l,onChange:t=>p({...n,label:e.title},t)}),(0,k.jsx)(`span`,{className:`text-[11px] text-ink-400`,children:ZJ[i]})]})]}),(0,k.jsx)(`div`,{className:`mt-4 flex flex-col gap-4 border-t border-sakura-100 pt-4`,children:XJ.filter(t=>t.group===e.id).map(e=>(0,k.jsx)(sY,{row:e,settings:t,disabled:l,dim:r!==!0,onPick:t=>p(e,t)},e.key))})]},e.id)}),(0,k.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,k.jsx)(`button`,{type:`button`,disabled:l||!m,onClick:()=>void d(i,`已全部恢复默认`),className:`focus-neko rounded-full border border-sakura-200 bg-surface px-4 py-1.5 text-xs text-ink-700 hover:bg-sakura-50 disabled:opacity-50`,children:`全部恢复默认`}),(0,k.jsx)(`output`,{"aria-live":`polite`,className:`min-h-4 text-xs text-tianyi-800`,children:a>0?`保存中…`:s})]})]})}function lY(){let{contextSettings:e,phase:t}=gM();return(0,k.jsxs)(MI,{active:`context`,children:[(0,k.jsxs)(`div`,{className:`mx-auto w-full max-w-4xl px-5 pt-6 pb-3`,children:[(0,k.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-2`,children:[(0,k.jsx)(`h1`,{className:`text-xl font-bold text-ink-900`,children:`上下文`}),(0,k.jsx)(`span`,{className:`ml-auto text-xs text-ink-500`,children:t===`ready`?`已连接`:`连接中…`})]}),(0,k.jsx)(`p`,{className:`mt-1 text-sm text-ink-500`,children:`管理长对话如何节省上下文。点选即保存、立即生效,所有工作区共用;不选“默认”则沿用原有行为。`})]}),(0,k.jsx)(`main`,{className:`mx-auto w-full max-w-4xl px-5 pb-8`,children:(0,k.jsx)(cY,{settings:e,ready:t===`ready`,onChange:e=>OM.setContextSettings(e),onReset:()=>OM.resetContextSettings()})})]})}var uY=function(e,t){let n=e,r=fY[t],i=null,a=0,o=null,s=[],c={},l=function(e,t){a=n*4+17,i=function(e){let t=Array(e);for(let n=0;n<e;n+=1){t[n]=Array(e);for(let r=0;r<e;r+=1)t[n][r]=null}return t}(a),u(0,0),u(a-7,0),u(0,a-7),p(),f(),h(e,t),n>=7&&m(e),o??=v(n,r,s),g(o,t)},u=function(e,t){for(let n=-1;n<=7;n+=1)if(!(e+n<=-1||a<=e+n))for(let r=-1;r<=7;r+=1)t+r<=-1||a<=t+r||(0<=n&&n<=6&&(r==0||r==6)||0<=r&&r<=6&&(n==0||n==6)||2<=n&&n<=4&&2<=r&&r<=4?i[e+n][t+r]=!0:i[e+n][t+r]=!1)},d=function(){let e=0,t=0;for(let n=0;n<8;n+=1){l(!0,n);let r=mY.getLostPoint(c);(n==0||e>r)&&(e=r,t=n)}return t},f=function(){for(let e=8;e<a-8;e+=1)i[e][6]??(i[e][6]=e%2==0);for(let e=8;e<a-8;e+=1)i[6][e]??(i[6][e]=e%2==0)},p=function(){let e=mY.getPatternPosition(n);for(let t=0;t<e.length;t+=1)for(let n=0;n<e.length;n+=1){let r=e[t],a=e[n];if(i[r][a]==null)for(let e=-2;e<=2;e+=1)for(let t=-2;t<=2;t+=1)e==-2||e==2||t==-2||t==2||e==0&&t==0?i[r+e][a+t]=!0:i[r+e][a+t]=!1}},m=function(e){let t=mY.getBCHTypeNumber(n);for(let n=0;n<18;n+=1){let r=!e&&(t>>n&1)==1;i[Math.floor(n/3)][n%3+a-8-3]=r}for(let n=0;n<18;n+=1){let r=!e&&(t>>n&1)==1;i[n%3+a-8-3][Math.floor(n/3)]=r}},h=function(e,t){let n=r<<3|t,o=mY.getBCHTypeInfo(n);for(let t=0;t<15;t+=1){let n=!e&&(o>>t&1)==1;t<6?i[t][8]=n:t<8?i[t+1][8]=n:i[a-15+t][8]=n}for(let t=0;t<15;t+=1){let n=!e&&(o>>t&1)==1;t<8?i[8][a-t-1]=n:t<9?i[8][15-t-1+1]=n:i[8][15-t-1]=n}i[a-8][8]=!e},g=function(e,t){let n=-1,r=a-1,o=7,s=0,c=mY.getMaskFunction(t);for(let t=a-1;t>0;t-=2)for(t==6&&--t;;){for(let n=0;n<2;n+=1)if(i[r][t-n]==null){let a=!1;s<e.length&&(a=(e[s]>>>o&1)==1),c(r,t-n)&&(a=!a),i[r][t-n]=a,--o,o==-1&&(s+=1,o=7)}if(r+=n,r<0||a<=r){r-=n,n=-n;break}}},_=function(e,t){let n=0,r=0,i=0,a=Array(t.length),o=Array(t.length);for(let s=0;s<t.length;s+=1){let c=t[s].dataCount,l=t[s].totalCount-c;r=Math.max(r,c),i=Math.max(i,l),a[s]=Array(c);for(let t=0;t<a[s].length;t+=1)a[s][t]=255&e.getBuffer()[t+n];n+=c;let u=mY.getErrorCorrectPolynomial(l),d=gY(a[s],u.getLength()-1).mod(u);o[s]=Array(u.getLength()-1);for(let e=0;e<o[s].length;e+=1){let t=e+d.getLength()-o[s].length;o[s][e]=t>=0?d.getAt(t):0}}let s=0;for(let e=0;e<t.length;e+=1)s+=t[e].totalCount;let c=Array(s),l=0;for(let e=0;e<r;e+=1)for(let n=0;n<t.length;n+=1)e<a[n].length&&(c[l]=a[n][e],l+=1);for(let e=0;e<i;e+=1)for(let n=0;n<t.length;n+=1)e<o[n].length&&(c[l]=o[n][e],l+=1);return c},v=function(e,t,n){let r=_Y.getRSBlocks(e,t),i=vY();for(let t=0;t<n.length;t+=1){let r=n[t];i.put(r.getMode(),4),i.put(r.getLength(),mY.getLengthInBits(r.getMode(),e)),r.write(i)}let a=0;for(let e=0;e<r.length;e+=1)a+=r[e].dataCount;if(i.getLengthInBits()>a*8)throw`code length overflow. (`+i.getLengthInBits()+`>`+a*8+`)`;for(i.getLengthInBits()+4<=a*8&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(!1);for(;!(i.getLengthInBits()>=a*8||(i.put(236,8),i.getLengthInBits()>=a*8));)i.put(17,8);return _(i,r)};c.addData=function(e,t){t||=`Byte`;let n=null;switch(t){case`Numeric`:n=yY(e);break;case`Alphanumeric`:n=bY(e);break;case`Byte`:n=xY(e);break;case`Kanji`:n=SY(e);break;default:throw`mode:`+t}s.push(n),o=null},c.isDark=function(e,t){if(e<0||a<=e||t<0||a<=t)throw e+`,`+t;return i[e][t]},c.getModuleCount=function(){return a},c.make=function(){if(n<1){let e=1;for(;e<40;e++){let t=_Y.getRSBlocks(e,r),n=vY();for(let t=0;t<s.length;t++){let r=s[t];n.put(r.getMode(),4),n.put(r.getLength(),mY.getLengthInBits(r.getMode(),e)),r.write(n)}let i=0;for(let e=0;e<t.length;e++)i+=t[e].dataCount;if(n.getLengthInBits()<=i*8)break}n=e}l(!1,d())},c.createTableTag=function(e,t){e||=2,t=t===void 0?e*4:t;let n=``;n+=`<table style="`,n+=` border-width: 0px; border-style: none;`,n+=` border-collapse: collapse;`,n+=` padding: 0px; margin: `+t+`px;`,n+=`">`,n+=`<tbody>`;for(let t=0;t<c.getModuleCount();t+=1){n+=`<tr>`;for(let r=0;r<c.getModuleCount();r+=1)n+=`<td style="`,n+=` border-width: 0px; border-style: none;`,n+=` border-collapse: collapse;`,n+=` padding: 0px; margin: 0px;`,n+=` width: `+e+`px;`,n+=` height: `+e+`px;`,n+=` background-color: `,n+=c.isDark(t,r)?`#000000`:`#ffffff`,n+=`;`,n+=`"/>`;n+=`</tr>`}return n+=`</tbody>`,n+=`</table>`,n},c.createSvgTag=function(e,t,n,r){let i={};typeof arguments[0]==`object`&&(i=arguments[0],e=i.cellSize,t=i.margin,n=i.alt,r=i.title),e||=2,t=t===void 0?e*4:t,n=typeof n==`string`?{text:n}:n||{},n.text=n.text||null,n.id=n.text?n.id||`qrcode-description`:null,r=typeof r==`string`?{text:r}:r||{},r.text=r.text||null,r.id=r.text?r.id||`qrcode-title`:null;let a=c.getModuleCount()*e+t*2,o,s,l,u,d=``,f;for(f=`l`+e+`,0 0,`+e+` -`+e+`,0 0,-`+e+`z `,d+=`<svg version="1.1" xmlns="http://www.w3.org/2000/svg"`,d+=i.scalable?``:` width="`+a+`px" height="`+a+`px"`,d+=` viewBox="0 0 `+a+` `+a+`" `,d+=` preserveAspectRatio="xMinYMin meet"`,d+=r.text||n.text?` role="img" aria-labelledby="`+y([r.id,n.id].join(` `).trim())+`"`:``,d+=`>`,d+=r.text?`<title id="`+y(r.id)+`">`+y(r.text)+`</title>`:``,d+=n.text?`<description id="`+y(n.id)+`">`+y(n.text)+`</description>`:``,d+=`<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>`,d+=`<path d="`,l=0;l<c.getModuleCount();l+=1)for(u=l*e+t,o=0;o<c.getModuleCount();o+=1)c.isDark(l,o)&&(s=o*e+t,d+=`M`+s+`,`+u+f);return d+=`" stroke="transparent" fill="black"/>`,d+=`</svg>`,d},c.createDataURL=function(e,t){e||=2,t=t===void 0?e*4:t;let n=c.getModuleCount()*e+t*2,r=t,i=n-t;return DY(n,n,function(t,n){if(r<=t&&t<i&&r<=n&&n<i){let i=Math.floor((t-r)/e),a=Math.floor((n-r)/e);return+!c.isDark(a,i)}return 1})},c.createImgTag=function(e,t,n){e||=2,t=t===void 0?e*4:t;let r=c.getModuleCount()*e+t*2,i=``;return i+=`<img`,i+=` src="`,i+=c.createDataURL(e,t),i+=`"`,i+=` width="`,i+=r,i+=`"`,i+=` height="`,i+=r,i+=`"`,n&&(i+=` alt="`,i+=y(n),i+=`"`),i+=`/>`,i};let y=function(e){let t=``;for(let n=0;n<e.length;n+=1){let r=e.charAt(n);switch(r){case`<`:t+=`<`;break;case`>`:t+=`>`;break;case`&`:t+=`&`;break;case`"`:t+=`"`;break;default:t+=r}}return t},b=function(e){e=e===void 0?2:e;let t=c.getModuleCount()*1+e*2,n=e,r=t-e,i,a,o,s,l,u={"██":`█`,"█ ":`▀`," █":`▄`," ":` `},d={"██":`▀`,"█ ":`▀`," █":` `," ":` `},f=``;for(i=0;i<t;i+=2){for(o=Math.floor((i-n)/1),s=Math.floor((i+1-n)/1),a=0;a<t;a+=1)l=`█`,n<=a&&a<r&&n<=i&&i<r&&c.isDark(o,Math.floor((a-n)/1))&&(l=` `),n<=a&&a<r&&n<=i+1&&i+1<r&&c.isDark(s,Math.floor((a-n)/1))?l+=` `:l+=`█`,f+=e<1&&i+1>=r?d[l]:u[l];f+=`
|
|
390
|
+
`}return t%2&&e>0?f.substring(0,f.length-t-1)+Array(t+1).join(`▀`):f.substring(0,f.length-1)};return c.createASCII=function(e,t){if(e||=1,e<2)return b(t);--e,t=t===void 0?e*2:t;let n=c.getModuleCount()*e+t*2,r=t,i=n-t,a,o,s,l,u=Array(e+1).join(`██`),d=Array(e+1).join(` `),f=``,p=``;for(a=0;a<n;a+=1){for(s=Math.floor((a-r)/e),p=``,o=0;o<n;o+=1)l=1,r<=o&&o<i&&r<=a&&a<i&&c.isDark(s,Math.floor((o-r)/e))&&(l=0),p+=l?u:d;for(s=0;s<e;s+=1)f+=p+`
|
|
391
|
+
`}return f.substring(0,f.length-1)},c.renderTo2dContext=function(e,t){t||=2;let n=c.getModuleCount();for(let r=0;r<n;r++)for(let i=0;i<n;i++)e.fillStyle=c.isDark(r,i)?`black`:`white`,e.fillRect(i*t,r*t,t,t)},c};uY.stringToBytes=function(e){let t=[];for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);t.push(r&255)}return t},uY.createStringToBytes=function(e,t){let n=function(){let n=TY(e),r=function(){let e=n.read();if(e==-1)throw`eof`;return e},i=0,a={};for(;;){let e=n.read();if(e==-1)break;let t=r(),o=r(),s=r(),c=String.fromCharCode(e<<8|t);a[c]=o<<8|s,i+=1}if(i!=t)throw i+` != `+t;return a}();return function(e){let t=[];for(let r=0;r<e.length;r+=1){let i=e.charCodeAt(r);if(i<128)t.push(i);else{let i=n[e.charAt(r)];typeof i==`number`?(i&255)==i?t.push(i):(t.push(i>>>8),t.push(i&255)):t.push(63)}}return t}};var dY={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},fY={L:1,M:0,Q:3,H:2},pY={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},mY=function(){let e=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],t=1335,n=7973,r={},i=function(e){let t=0;for(;e!=0;)t+=1,e>>>=1;return t};return r.getBCHTypeInfo=function(e){let n=e<<10;for(;i(n)-i(t)>=0;)n^=t<<i(n)-i(t);return(e<<10|n)^21522},r.getBCHTypeNumber=function(e){let t=e<<12;for(;i(t)-i(n)>=0;)t^=n<<i(t)-i(n);return e<<12|t},r.getPatternPosition=function(t){return e[t-1]},r.getMaskFunction=function(e){switch(e){case pY.PATTERN000:return function(e,t){return(e+t)%2==0};case pY.PATTERN001:return function(e,t){return e%2==0};case pY.PATTERN010:return function(e,t){return t%3==0};case pY.PATTERN011:return function(e,t){return(e+t)%3==0};case pY.PATTERN100:return function(e,t){return(Math.floor(e/2)+Math.floor(t/3))%2==0};case pY.PATTERN101:return function(e,t){return e*t%2+e*t%3==0};case pY.PATTERN110:return function(e,t){return(e*t%2+e*t%3)%2==0};case pY.PATTERN111:return function(e,t){return(e*t%3+(e+t)%2)%2==0};default:throw`bad maskPattern:`+e}},r.getErrorCorrectPolynomial=function(e){let t=gY([1],0);for(let n=0;n<e;n+=1)t=t.multiply(gY([1,hY.gexp(n)],0));return t},r.getLengthInBits=function(e,t){if(1<=t&&t<10)switch(e){case dY.MODE_NUMBER:return 10;case dY.MODE_ALPHA_NUM:return 9;case dY.MODE_8BIT_BYTE:return 8;case dY.MODE_KANJI:return 8;default:throw`mode:`+e}else if(t<27)switch(e){case dY.MODE_NUMBER:return 12;case dY.MODE_ALPHA_NUM:return 11;case dY.MODE_8BIT_BYTE:return 16;case dY.MODE_KANJI:return 10;default:throw`mode:`+e}else if(t<41)switch(e){case dY.MODE_NUMBER:return 14;case dY.MODE_ALPHA_NUM:return 13;case dY.MODE_8BIT_BYTE:return 16;case dY.MODE_KANJI:return 12;default:throw`mode:`+e}else throw`type:`+t},r.getLostPoint=function(e){let t=e.getModuleCount(),n=0;for(let r=0;r<t;r+=1)for(let i=0;i<t;i+=1){let a=0,o=e.isDark(r,i);for(let n=-1;n<=1;n+=1)if(!(r+n<0||t<=r+n))for(let s=-1;s<=1;s+=1)i+s<0||t<=i+s||(n!=0||s!=0)&&o==e.isDark(r+n,i+s)&&(a+=1);a>5&&(n+=3+a-5)}for(let r=0;r<t-1;r+=1)for(let i=0;i<t-1;i+=1){let t=0;e.isDark(r,i)&&(t+=1),e.isDark(r+1,i)&&(t+=1),e.isDark(r,i+1)&&(t+=1),e.isDark(r+1,i+1)&&(t+=1),(t==0||t==4)&&(n+=3)}for(let r=0;r<t;r+=1)for(let i=0;i<t-6;i+=1)e.isDark(r,i)&&!e.isDark(r,i+1)&&e.isDark(r,i+2)&&e.isDark(r,i+3)&&e.isDark(r,i+4)&&!e.isDark(r,i+5)&&e.isDark(r,i+6)&&(n+=40);for(let r=0;r<t;r+=1)for(let i=0;i<t-6;i+=1)e.isDark(i,r)&&!e.isDark(i+1,r)&&e.isDark(i+2,r)&&e.isDark(i+3,r)&&e.isDark(i+4,r)&&!e.isDark(i+5,r)&&e.isDark(i+6,r)&&(n+=40);let r=0;for(let n=0;n<t;n+=1)for(let i=0;i<t;i+=1)e.isDark(i,n)&&(r+=1);let i=Math.abs(100*r/t/t-50)/5;return n+=i*10,n},r}(),hY=function(){let e=Array(256),t=Array(256);for(let t=0;t<8;t+=1)e[t]=1<<t;for(let t=8;t<256;t+=1)e[t]=e[t-4]^e[t-5]^e[t-6]^e[t-8];for(let n=0;n<255;n+=1)t[e[n]]=n;let n={};return n.glog=function(e){if(e<1)throw`glog(`+e+`)`;return t[e]},n.gexp=function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return e[t]},n}(),gY=function(e,t){if(e.length===void 0)throw e.length+`/`+t;let n=function(){let n=0;for(;n<e.length&&e[n]==0;)n+=1;let r=Array(e.length-n+t);for(let t=0;t<e.length-n;t+=1)r[t]=e[t+n];return r}(),r={};return r.getAt=function(e){return n[e]},r.getLength=function(){return n.length},r.multiply=function(e){let t=Array(r.getLength()+e.getLength()-1);for(let n=0;n<r.getLength();n+=1)for(let i=0;i<e.getLength();i+=1)t[n+i]^=hY.gexp(hY.glog(r.getAt(n))+hY.glog(e.getAt(i)));return gY(t,0)},r.mod=function(e){if(r.getLength()-e.getLength()<0)return r;let t=hY.glog(r.getAt(0))-hY.glog(e.getAt(0)),n=Array(r.getLength());for(let e=0;e<r.getLength();e+=1)n[e]=r.getAt(e);for(let r=0;r<e.getLength();r+=1)n[r]^=hY.gexp(hY.glog(e.getAt(r))+t);return gY(n,0).mod(e)},r},_Y=function(){let e=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],t=function(e,t){let n={};return n.totalCount=e,n.dataCount=t,n},n={},r=function(t,n){switch(n){case fY.L:return e[(t-1)*4+0];case fY.M:return e[(t-1)*4+1];case fY.Q:return e[(t-1)*4+2];case fY.H:return e[(t-1)*4+3];default:return}};return n.getRSBlocks=function(e,n){let i=r(e,n);if(i===void 0)throw`bad rs block @ typeNumber:`+e+`/errorCorrectionLevel:`+n;let a=i.length/3,o=[];for(let e=0;e<a;e+=1){let n=i[e*3+0],r=i[e*3+1],a=i[e*3+2];for(let e=0;e<n;e+=1)o.push(t(r,a))}return o},n}(),vY=function(){let e=[],t=0,n={};return n.getBuffer=function(){return e},n.getAt=function(t){let n=Math.floor(t/8);return(e[n]>>>7-t%8&1)==1},n.put=function(e,t){for(let r=0;r<t;r+=1)n.putBit((e>>>t-r-1&1)==1)},n.getLengthInBits=function(){return t},n.putBit=function(n){let r=Math.floor(t/8);e.length<=r&&e.push(0),n&&(e[r]|=128>>>t%8),t+=1},n},yY=function(e){let t=dY.MODE_NUMBER,n=e,r={};r.getMode=function(){return t},r.getLength=function(e){return n.length},r.write=function(e){let t=n,r=0;for(;r+2<t.length;)e.put(i(t.substring(r,r+3)),10),r+=3;r<t.length&&(t.length-r==1?e.put(i(t.substring(r,r+1)),4):t.length-r==2&&e.put(i(t.substring(r,r+2)),7))};let i=function(e){let t=0;for(let n=0;n<e.length;n+=1)t=t*10+a(e.charAt(n));return t},a=function(e){if(`0`<=e&&e<=`9`)return e.charCodeAt(0)-48;throw`illegal char :`+e};return r},bY=function(e){let t=dY.MODE_ALPHA_NUM,n=e,r={};r.getMode=function(){return t},r.getLength=function(e){return n.length},r.write=function(e){let t=n,r=0;for(;r+1<t.length;)e.put(i(t.charAt(r))*45+i(t.charAt(r+1)),11),r+=2;r<t.length&&e.put(i(t.charAt(r)),6)};let i=function(e){if(`0`<=e&&e<=`9`)return e.charCodeAt(0)-48;if(`A`<=e&&e<=`Z`)return e.charCodeAt(0)-65+10;switch(e){case` `:return 36;case`$`:return 37;case`%`:return 38;case`*`:return 39;case`+`:return 40;case`-`:return 41;case`.`:return 42;case`/`:return 43;case`:`:return 44;default:throw`illegal char :`+e}};return r},xY=function(e){let t=dY.MODE_8BIT_BYTE,n=uY.stringToBytes(e),r={};return r.getMode=function(){return t},r.getLength=function(e){return n.length},r.write=function(e){for(let t=0;t<n.length;t+=1)e.put(n[t],8)},r},SY=function(e){let t=dY.MODE_KANJI,n=uY.stringToBytes;(function(e,t){let r=n(e);if(r.length!=2||(r[0]<<8|r[1])!=t)throw`sjis not supported.`})(`友`,38726);let r=n(e),i={};return i.getMode=function(){return t},i.getLength=function(e){return~~(r.length/2)},i.write=function(e){let t=r,n=0;for(;n+1<t.length;){let r=(255&t[n])<<8|255&t[n+1];if(33088<=r&&r<=40956)r-=33088;else if(57408<=r&&r<=60351)r-=49472;else throw`illegal char at `+(n+1)+`/`+r;r=(r>>>8&255)*192+(r&255),e.put(r,13),n+=2}if(n<t.length)throw`illegal char at `+(n+1)},i},CY=function(){let e=[],t={};return t.writeByte=function(t){e.push(t&255)},t.writeShort=function(e){t.writeByte(e),t.writeByte(e>>>8)},t.writeBytes=function(e,n,r){n||=0,r||=e.length;for(let i=0;i<r;i+=1)t.writeByte(e[i+n])},t.writeString=function(e){for(let n=0;n<e.length;n+=1)t.writeByte(e.charCodeAt(n))},t.toByteArray=function(){return e},t.toString=function(){let t=``;t+=`[`;for(let n=0;n<e.length;n+=1)n>0&&(t+=`,`),t+=e[n];return t+=`]`,t},t},wY=function(){let e=0,t=0,n=0,r=``,i={},a=function(e){r+=String.fromCharCode(o(e&63))},o=function(e){if(e<0)throw`n:`+e;if(e<26)return 65+e;if(e<52)return 97+(e-26);if(e<62)return 48+(e-52);if(e==62)return 43;if(e==63)return 47;throw`n:`+e};return i.writeByte=function(r){for(e=e<<8|r&255,t+=8,n+=1;t>=6;)a(e>>>t-6),t-=6},i.flush=function(){if(t>0&&(a(e<<6-t),e=0,t=0),n%3!=0){let e=3-n%3;for(let t=0;t<e;t+=1)r+=`=`}},i.toString=function(){return r},i},TY=function(e){let t=e,n=0,r=0,i=0,a={};a.read=function(){for(;i<8;){if(n>=t.length){if(i==0)return-1;throw`unexpected end of file./`+i}let e=t.charAt(n);if(n+=1,e==`=`)return i=0,-1;e.match(/^\s$/)||(r=r<<6|o(e.charCodeAt(0)),i+=6)}let e=r>>>i-8&255;return i-=8,e};let o=function(e){if(65<=e&&e<=90)return e-65;if(97<=e&&e<=122)return e-97+26;if(48<=e&&e<=57)return e-48+52;if(e==43)return 62;if(e==47)return 63;throw`c:`+e};return a},EY=function(e,t){let n=e,r=t,i=Array(e*t),a={};a.setPixel=function(e,t,r){i[t*n+e]=r},a.write=function(e){e.writeString(`GIF87a`),e.writeShort(n),e.writeShort(r),e.writeByte(128),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(255),e.writeByte(255),e.writeByte(255),e.writeString(`,`),e.writeShort(0),e.writeShort(0),e.writeShort(n),e.writeShort(r),e.writeByte(0);let t=s(2);e.writeByte(2);let i=0;for(;t.length-i>255;)e.writeByte(255),e.writeBytes(t,i,255),i+=255;e.writeByte(t.length-i),e.writeBytes(t,i,t.length-i),e.writeByte(0),e.writeString(`;`)};let o=function(e){let t=e,n=0,r=0,i={};return i.write=function(e,i){if(e>>>i)throw`length over`;for(;n+i>=8;)t.writeByte(255&(e<<n|r)),i-=8-n,e>>>=8-n,r=0,n=0;r=e<<n|r,n+=i},i.flush=function(){n>0&&t.writeByte(r)},i},s=function(e){let t=1<<e,n=(1<<e)+1,r=e+1,a=c();for(let e=0;e<t;e+=1)a.add(String.fromCharCode(e));a.add(String.fromCharCode(t)),a.add(String.fromCharCode(n));let s=CY(),l=o(s);l.write(t,r);let u=0,d=String.fromCharCode(i[u]);for(u+=1;u<i.length;){let e=String.fromCharCode(i[u]);u+=1,a.contains(d+e)?d+=e:(l.write(a.indexOf(d),r),a.size()<4095&&(a.size()==1<<r&&(r+=1),a.add(d+e)),d=e)}return l.write(a.indexOf(d),r),l.write(n,r),l.flush(),s.toByteArray()},c=function(){let e={},t=0,n={};return n.add=function(r){if(n.contains(r))throw`dup key:`+r;e[r]=t,t+=1},n.size=function(){return t},n.indexOf=function(t){return e[t]},n.contains=function(t){return e[t]!==void 0},n};return a},DY=function(e,t,n){let r=EY(e,t);for(let i=0;i<t;i+=1)for(let t=0;t<e;t+=1)r.setPixel(t,i,n(t,i));let i=CY();r.write(i);let a=wY(),o=i.toByteArray();for(let e=0;e<o.length;e+=1)a.writeByte(o[e]);return a.flush(),`data:image/gif;base64,`+a};uY.stringToBytes;var OY=class extends Error{constructor(){super(`gateway_unsupported`),this.name=`GatewayUnsupportedError`}},kY;function AY(){kY=void 0}async function jY(){return kY??=fetch(`/api/mobile/session`,{cache:`no-store`}).then(async e=>{if(!e.ok)throw Error(`GET /api/mobile/session 失败(${e.status})`);return await e.json()}).catch(e=>{throw kY=void 0,e}),kY}async function MY(e,t,n=!0){let{csrf:r}=await jY(),i=await fetch(e,{method:`POST`,headers:{"content-type":`application/json`,"x-neko-csrf":r},body:JSON.stringify(t??null)});if(i.status===501)throw new OY;if(i.status===403&&n)return AY(),MY(e,t,!1);if(!i.ok){let e=`请求失败(${i.status})`;try{let t=await i.json();typeof t.message==`string`&&t.message!==``&&(e=t.message)}catch{}throw Error(e)}return await i.json()}async function NY(e){let t=await fetch(e,{cache:`no-store`});if(t.status===501)throw new OY;if(!t.ok)throw Error(`GET ${e} 失败(${t.status})`);return await t.json()}var PY={session:()=>jY(),state:()=>NY(`/api/mobile/state`),enable:e=>MY(`/api/mobile/enable`,e),disable:()=>MY(`/api/mobile/disable`,null),createPairing:()=>MY(`/api/mobile/pairing`,null),cancelPairing:()=>MY(`/api/mobile/pairing/cancel`,null),revoke:e=>MY(`/api/mobile/revoke`,{deviceId:e}),regenerateCertificate:()=>MY(`/api/mobile/certificate/regenerate`,null)},FY=2592e6,IY=5e3;function LY(e){return e instanceof Error?e.message:String(e)}function RY(e){let t=uY(0,`M`);t.addData(e.text,`Byte`),t.make();let n=t.getModuleCount(),r=n+4,i=[];for(let e=0;e<n;e+=1)for(let r=0;r<n;r+=1)t.isDark(e,r)&&i.push(`M${r+2} ${e+2}h1v1h-1z`);return(0,k.jsxs)(`svg`,{role:`img`,viewBox:`0 0 ${r} ${r}`,shapeRendering:`crispEdges`,className:`h-44 w-44 rounded-xl bg-white p-2 text-ink-900`,children:[(0,k.jsx)(`title`,{children:`手机配对二维码`}),(0,k.jsx)(`path`,{d:i.join(` `),fill:`currentColor`})]})}function zY(){let{webInfo:e}=gM(),[t,n]=(0,f.useState)(null),[r,i]=(0,f.useState)(null),[a,o]=(0,f.useState)(``),[s,c]=(0,f.useState)(``),[l,u]=(0,f.useState)(``),[d,p]=(0,f.useState)(`8323`),[m,h]=(0,f.useState)(!1),[g,_]=(0,f.useState)(null),[v,y]=(0,f.useState)(0),[b,x]=(0,f.useState)(null),S=(0,f.useRef)(0),C=(0,f.useCallback)(async()=>{let e=++S.current;try{let t=await PY.state();if(e!==S.current)return;i(t),o(``),u(e=>e===``?t.candidates[0]??``:e),p(String(t.port))}catch(t){e===S.current&&o(LY(t))}},[]),w=(0,f.useCallback)(async()=>{if(document.hidden)return;let e=++S.current;try{let t=await PY.state();if(e!==S.current)return;i(t),o(``)}catch{}},[]);(0,f.useEffect)(()=>{let e=!1;return PY.session().then(t=>{e||(n(t.supported),t.supported&&C())}).catch(t=>{e||o(LY(t))}),()=>{e=!0}},[C]),(0,f.useEffect)(()=>{if(t!==!0)return;let e,n=()=>{e!==void 0&&(clearInterval(e),e=void 0)},r=()=>{e===void 0&&(e=setInterval(()=>void w(),IY))},i=()=>{document.hidden?n():(w(),r())};return document.addEventListener(`visibilitychange`,i),r(),()=>{n(),document.removeEventListener(`visibilitychange`,i)}},[t,w]),(0,f.useEffect)(()=>{if(g===null)return;let e=()=>y(Math.max(0,Math.ceil((g.expiresAt-Date.now())/1e3)));e();let t=setInterval(e,1e3);return()=>clearInterval(t)},[g]);let T=r?.state.status===`listening`,ee=T?`${r.state.address}:${r.state.port}`:``;async function te(){if(!(r===null||m)){h(!0),o(``),c(``);try{if(T)await PY.disable(),_(null),c(`手机访问已关闭,已受理的任务继续运行。`);else{let e=Number(d);if(l.trim()===``)throw Error(`请选择要监听的局域网地址。`);if(!Number.isInteger(e)||e<1||e>65535)throw Error(`端口必须是 1-65535 的整数。`);await PY.enable({address:l.trim(),port:e}),c(`手机访问已开启:${l.trim()}:${e}`)}await C()}catch(e){o(LY(e))}finally{h(!1)}}}async function ne(){h(!0),o(``);try{let e=await PY.createPairing();_(e),c(`二维码已生成,120 秒内有效。`)}catch(e){_(null),o(LY(e))}finally{h(!1)}}async function re(){x(null),h(!0),o(``);try{let e=await PY.regenerateCertificate();_(null),c(`证书已重新生成(${e.fingerprint.slice(0,12)}…),手机需重新扫码配对。`),await C()}catch(e){o(LY(e))}finally{h(!1)}}async function E(e){x(null),h(!0),o(``);try{let t=await PY.revoke(e);c(t.revoked?`已撤销设备授权,该设备已受理的任务继续运行。`:`设备不存在或已撤销。`),await C()}catch(e){o(LY(e))}finally{h(!1)}}if(t===null)return(0,k.jsxs)(`section`,{className:`rounded-2xl border border-sakura-200 bg-surface p-5 shadow-soft`,children:[(0,k.jsx)(`h2`,{className:`text-base font-bold text-ink-900`,children:`手机配对`}),(0,k.jsx)(`p`,{className:`mt-2 text-sm text-ink-500`,children:`读取中…`})]});if(!t)return(0,k.jsxs)(`section`,{className:`rounded-2xl border border-sakura-200 bg-surface p-5 shadow-soft`,children:[(0,k.jsx)(`h2`,{className:`text-base font-bold text-ink-900`,children:`手机配对`}),(0,k.jsx)(`p`,{className:`mt-2 text-sm text-ink-600`,role:`alert`,children:`当前 gateway 版本不支持手机配对。请更新或重启电脑端后刷新本页;聊天功能不受影响。`})]});let ie=r?.certificate??null,ae=ie!==null&&ie.expiresAt-Date.now()<FY,oe=r?.wsl??null,se=r?.state.status===`listening`&&r.state.mode===`wsl-relay`,ce=r===null?`读取中…`:r.state.status===`listening`?`已开启 · https://${ee}${se?`(经 Windows 中继)`:``}`:r.state.status===`error`?`开启失败`:r.state.status===`disabled`?`已关闭`:`处理中…`;return(0,k.jsxs)(`section`,{className:`rounded-2xl border border-sakura-200 bg-surface p-5 shadow-soft`,children:[(0,k.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center justify-between gap-2`,children:[(0,k.jsx)(`h2`,{className:`text-base font-bold text-ink-900`,children:`手机配对`}),(0,k.jsx)(`span`,{className:`rounded-full bg-tianyi-50 px-3 py-1 text-xs text-tianyi-800`,children:ce})]}),(0,k.jsx)(`p`,{className:`mb-3 text-xs text-ink-500`,children:`允许手机控制电脑上的 Agent。配对仅限本机管理,请只在可信网络中开启。`}),oe!==null&&(0,k.jsx)(`p`,{className:`mb-3 rounded-xl bg-tianyi-50 px-3 py-2 text-xs text-tianyi-800`,children:`当前在 WSL 中运行:这里列出的是 Windows 的局域网地址,开启后由 Windows 侧的转发进程接入手机连接(无需管理员权限,关闭手机访问或退出 neko 时自动停止)。`}),oe?.error!=null&&(0,k.jsx)(`p`,{className:`mb-3 rounded-xl bg-sakura-50 px-3 py-2 text-xs text-sakura-800`,role:`alert`,children:oe.error}),r?.state.status===`error`&&(0,k.jsxs)(`p`,{className:`mb-3 rounded-xl bg-sakura-50 px-3 py-2 text-xs text-sakura-800`,role:`alert`,children:[`开启失败:`,r.state.error,`。请检查所选地址与端口是否被占用。`]}),a!==``&&(0,k.jsx)(`p`,{className:`mb-3 rounded-xl bg-sakura-50 px-3 py-2 text-xs text-sakura-800`,role:`alert`,children:a}),(0,k.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-4 gap-y-3`,children:[(0,k.jsxs)(`label`,{className:`inline-flex min-h-6 items-center gap-2 text-sm text-ink-700`,children:[(0,k.jsx)(`input`,{type:`checkbox`,checked:T===!0,disabled:m||r===null||!T&&(r?.candidates.length??0)===0&&l===``,onChange:()=>void te(),className:`focus-neko h-4 w-4 rounded border-sakura-300 accent-sakura-600`}),`允许手机控制电脑上的 Agent`]}),(0,k.jsxs)(`label`,{className:`inline-flex min-h-6 items-center gap-2 text-sm text-ink-700`,children:[`地址`,(0,k.jsxs)(`select`,{value:l,disabled:m||T===!0,onChange:e=>u(e.target.value),className:`focus-neko rounded-xl border border-sakura-200 bg-base px-2 py-1.5 text-sm`,children:[r?.candidates.length===0&&(0,k.jsx)(`option`,{value:``,children:oe===null?`未发现局域网地址`:`未发现 Windows 局域网地址`}),(r?.candidates??[]).map(e=>(0,k.jsx)(`option`,{value:e,children:e===r?.lastConnectedAddress?`${e}(上次连接成功)`:e},e))]})]}),(0,k.jsxs)(`label`,{className:`inline-flex min-h-6 items-center gap-2 text-sm text-ink-700`,htmlFor:`mobile-port`,children:[`端口`,(0,k.jsx)(`input`,{id:`mobile-port`,type:`number`,min:1,max:65535,value:d,disabled:m||T===!0,onChange:e=>p(e.target.value),className:`focus-neko w-24 rounded-xl border border-sakura-200 bg-base px-2 py-1.5 text-sm`})]})]}),T!==!0&&(r?.candidates.length??0)===0&&(0,k.jsx)(`p`,{className:`mt-2 text-xs text-ink-500`,children:oe===null?`未发现可用的局域网地址,请确认电脑已连接网络(本机回环地址不可用于手机访问)。`:`未发现可用的 Windows 局域网地址,请确认 Windows 已连接网络且 WSL 互操作可用。`}),T===!0&&(0,k.jsx)(`div`,{className:`mt-4 border-t border-sakura-100 pt-4`,children:(0,k.jsxs)(`div`,{className:`flex flex-wrap items-center gap-4`,children:[g!==null&&v>0?(0,k.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,k.jsx)(RY,{text:g.pairingText}),(0,k.jsxs)(`div`,{className:`flex flex-col items-start gap-2`,children:[(0,k.jsxs)(`span`,{className:`text-xs text-ink-500`,children:[`二维码剩余 `,v,` 秒`]}),(0,k.jsx)(Cz,{text:g.pairingText,label:`复制配对文本`}),(0,k.jsx)(`button`,{type:`button`,disabled:m,onClick:()=>void ne(),className:`focus-neko rounded-full bg-sakura-100 px-4 py-1.5 text-sm font-semibold text-sakura-800 disabled:opacity-50`,children:`刷新二维码`})]})]}):(0,k.jsxs)(`div`,{className:`flex flex-col items-start gap-2`,children:[g!==null&&v<=0&&(0,k.jsx)(`span`,{className:`text-xs text-ink-500`,children:`二维码已过期,请刷新后重新扫码。`}),(0,k.jsx)(`button`,{type:`button`,disabled:m,onClick:()=>void ne(),className:`focus-neko rounded-full bg-sakura-100 px-4 py-1.5 text-sm font-semibold text-sakura-800 disabled:opacity-50`,children:`生成二维码`})]}),(0,k.jsxs)(`p`,{className:`max-w-64 text-xs text-ink-500`,children:[`用手机 App 扫码,或点击「复制配对文本」后在 App 中粘贴。请确保手机与电脑在同一网络,防火墙放行所选端口`,se?`(WSL 下需在 Windows 防火墙放行 powershell.exe)`:``,`。`]})]})}),(0,k.jsxs)(`div`,{className:`mt-4 border-t border-sakura-100 pt-4`,children:[(0,k.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,k.jsx)(`h3`,{className:`text-sm font-semibold text-ink-800`,children:`证书`}),ie!==null&&(0,k.jsxs)(`span`,{className:`text-xs text-ink-500`,children:[ie.fingerprint.slice(0,16),`… · 到期 `,new Date(ie.expiresAt).toLocaleDateString()]}),(0,k.jsx)(`button`,{type:`button`,disabled:m,onClick:()=>x(`regenerate`),className:`focus-neko ml-auto rounded-full px-3 py-1.5 text-sm text-ink-500 disabled:opacity-50`,children:`重新生成证书`})]}),ae&&(0,k.jsx)(`p`,{className:`mt-2 text-xs text-sakura-800`,role:`alert`,children:`证书即将到期,建议尽快重新生成;重新生成后全部手机需重新扫码。`}),(0,k.jsx)(`p`,{className:`mt-2 text-xs text-ink-500`,children:`重新生成会断开全部手机并撤销全部设备授权,电脑上已受理的任务继续运行。`})]}),(0,k.jsxs)(`div`,{className:`mt-4 border-t border-sakura-100 pt-4`,children:[(0,k.jsx)(`h3`,{className:`text-sm font-semibold text-ink-800`,children:`已配对设备`}),r===null||r.devices.length===0?(0,k.jsx)(`p`,{className:`mt-2 text-xs text-ink-500`,children:`暂无已配对设备。`}):(0,k.jsx)(`ul`,{className:`mt-2 flex flex-col gap-2`,children:r.devices.map(e=>(0,k.jsxs)(`li`,{className:`flex flex-wrap items-center gap-2 text-sm`,children:[(0,k.jsx)(`span`,{"aria-hidden":`true`,className:`inline-flex`,children:(0,k.jsx)(lI,{name:`phone`,size:15,className:`text-ink-400`})}),(0,k.jsx)(`span`,{className:`text-ink-800`,children:e.name}),(0,k.jsx)(`span`,{className:`rounded-full px-2 py-0.5 text-xs ${e.online?`bg-tianyi-50 text-tianyi-800`:`bg-ink-100 text-ink-500`}`,children:e.online?`在线`:`离线`}),(0,k.jsxs)(`span`,{className:`text-xs text-ink-500`,children:[`最后连接 `,new Date(e.lastSeenAt).toLocaleString()]}),(0,k.jsx)(`button`,{type:`button`,disabled:m,onClick:()=>x({deviceId:e.deviceId,name:e.name}),className:`focus-neko ml-auto rounded-full px-3 py-1.5 text-sm text-sakura-800 disabled:opacity-50`,children:`撤销`})]},e.deviceId))})]}),e?.gatewaySpawned===!0&&(0,k.jsxs)(`p`,{className:`mt-4 rounded-xl bg-tianyi-50 px-3 py-2 text-xs text-tianyi-800`,children:[`本页面通过 neko web 启动了 gateway;退出本页面会同时停止 gateway 与手机入口。需要手机长期连接时,请改用`,(0,k.jsx)(`code`,{className:`mx-1`,children:`neko serve`}),`或保持 TUI 运行。`]}),(0,k.jsx)(`output`,{className:`mt-3 block min-h-4 text-xs text-tianyi-800`,"aria-live":`polite`,children:s}),b===`regenerate`&&(0,k.jsxs)(pI,{title:`重新生成证书`,onClose:()=>x(null),children:[(0,k.jsx)(`p`,{className:`text-sm text-ink-700`,children:`将生成新的自签名证书:全部手机断开、全部设备授权失效,需要重新扫码配对。电脑上已受理的任务继续运行。`}),(0,k.jsxs)(`div`,{className:`mt-4 flex justify-end gap-2`,children:[(0,k.jsx)(`button`,{type:`button`,className:`focus-neko rounded-full px-4 py-1.5 text-sm text-ink-500`,onClick:()=>x(null),children:`取消`}),(0,k.jsx)(`button`,{type:`button`,className:`focus-neko rounded-full bg-sakura-100 px-4 py-1.5 text-sm font-semibold text-sakura-800`,onClick:()=>void re(),children:`确认重新生成`})]})]}),typeof b==`object`&&!!b&&(0,k.jsxs)(pI,{title:`撤销设备「${b.name}」`,onClose:()=>x(null),children:[(0,k.jsx)(`p`,{className:`text-sm text-ink-700`,children:`撤销后该手机立即断开且无法重新连接;电脑上已受理的任务继续运行,停止任务需在电脑上单独操作。`}),(0,k.jsxs)(`div`,{className:`mt-4 flex justify-end gap-2`,children:[(0,k.jsx)(`button`,{type:`button`,className:`focus-neko rounded-full px-4 py-1.5 text-sm text-ink-500`,onClick:()=>x(null),children:`取消`}),(0,k.jsx)(`button`,{type:`button`,className:`focus-neko rounded-full bg-sakura-100 px-4 py-1.5 text-sm font-semibold text-sakura-800`,onClick:()=>void E(b.deviceId),children:`确认撤销`})]})]})]})}function BY(){return(0,k.jsxs)(MI,{active:`mobile`,children:[(0,k.jsxs)(`div`,{className:`mx-auto w-full max-w-4xl px-5 pt-6 pb-3`,children:[(0,k.jsx)(`h1`,{className:`text-xl font-bold text-ink-900`,children:`手机配对`}),(0,k.jsx)(`p`,{className:`mt-1 text-sm text-ink-500`,children:`在手机 App 上控制电脑上的 Agent;配对管理仅限电脑本机。`})]}),(0,k.jsx)(`main`,{className:`mx-auto w-full max-w-4xl px-5 pb-8`,children:(0,k.jsx)(zY,{})})]})}var VY=[{id:`deepseek`,envVar:`DEEPSEEK_API_KEY`,signupUrl:`https://platform.deepseek.com/api_keys`,keyless:!1},{id:`tavily`,envVar:`TAVILY_API_KEY`,signupUrl:`https://app.tavily.com`,keyless:!0}],HY=[`tavily`,`deepseek`],UY={tavily:`Tavily`,deepseek:`DeepSeek`},WY={saved:`已保存密钥`,environment:`环境变量`,runtime:`运行时配置`,keyless:`keyless 限流`,none:`未配置密钥`};function GY(e,t){let n=e=>{let n=t?.statuses[e];return n?WY[n.source]:`读取中…`},r={tavily:`使用 Tavily 搜索与抓取(${n(`tavily`)}),默认选项`,deepseek:`使用 DeepSeek 搜索与抓取,共用 DeepSeek 密钥(${n(`deepseek`)})`};return HY.map(t=>({value:t,label:UY[t],description:r[t],selected:e?.selected===t}))}function KY(e,t){return e?.selected===`deepseek`&&t?.statuses.deepseek.source===`none`?`尚未配置 DeepSeek 密钥,搜索将不可用。请在下方配置密钥,或改选 Tavily。`:null}function qY(e){let{settings:t,credentials:n,ready:r,onSelect:i}=e,[a,o]=(0,f.useState)(!1),s=(0,f.useRef)(!1),[c,l]=(0,f.useState)(``),u=KY(t,n);async function d(e){if(!(s.current||e===t?.selected)){s.current=!0,o(!0),l(``);try{await i(e),l(`已切换为${UY[e]},下次搜索生效`)}catch{l(`保存失败,请检查连接后重试。`)}finally{s.current=!1,o(!1)}}}let p=a||!r||!t;return(0,k.jsxs)(`section`,{className:`rounded-2xl border border-sakura-200 bg-surface p-5 shadow-soft`,"aria-labelledby":`search-service`,children:[(0,k.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center justify-between gap-2`,children:[(0,k.jsx)(`h2`,{id:`search-service`,className:`text-base font-bold text-ink-900`,children:`搜索服务`}),(0,k.jsx)(`span`,{className:`rounded-full bg-tianyi-50 px-3 py-1 text-xs text-tianyi-800`,children:t?`当前使用:${UY[t.selected]}`:`读取中…`})]}),(0,k.jsx)(`p`,{className:`mb-3 text-xs text-ink-500`,children:`选择助手联网搜索与读取网页使用的服务;保存后下一次调用生效。`}),(0,k.jsxs)(`fieldset`,{className:`flex flex-col gap-2`,disabled:p,children:[(0,k.jsx)(`legend`,{className:`sr-only`,children:`搜索服务`}),GY(t,n).map(e=>(0,k.jsxs)(`label`,{className:`flex cursor-pointer items-start gap-3 rounded-xl border px-3 py-2.5 text-sm ${e.selected?`border-sakura-400 bg-sakura-50`:`border-sakura-100`} ${p?`opacity-60`:``}`,children:[(0,k.jsx)(`input`,{type:`radio`,name:`search-provider`,value:e.value,checked:e.selected,onChange:()=>void d(e.value),className:`mt-1`}),(0,k.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,k.jsx)(`span`,{className:`font-semibold text-ink-900`,children:e.label}),(0,k.jsx)(`span`,{className:`block text-xs text-ink-500`,children:e.description})]})]},e.value))]}),u&&(0,k.jsxs)(`p`,{className:`mt-3 text-xs text-sakura-800`,children:[u,` `,(0,k.jsx)(`a`,{href:`#credential-deepseek`,className:`focus-neko rounded underline`,children:`前往配置`})]}),(0,k.jsx)(`output`,{className:`mt-2 block min-h-4 text-xs text-tianyi-800`,children:c})]})}var JY={saved:`使用已保存密钥`,environment:`使用环境变量`,runtime:`使用运行时配置`,keyless:`keyless(限流)`,none:`尚未配置`},YY={deepseek:`DeepSeek`,tavily:`Tavily`};function XY(e){let{spec:t,status:n,ready:r}=e,i=YY[t.id]??t.id,[a,o]=(0,f.useState)(``),[s,c]=(0,f.useState)(!1),l=(0,f.useRef)(!1),[u,d]=(0,f.useState)(``);async function p(e){if(!l.current){l.current=!0,c(!0),d(``);try{e?await OM.removeCredential(t.id):await OM.saveCredential(t.id,a),o(``),d(e?`已移除保存的密钥`:`已保存,下次请求生效`)}catch{d(`操作失败,请检查连接后重试。`)}finally{l.current=!1,c(!1)}}}let m=s||!r||!n;return(0,k.jsxs)(`section`,{id:`credential-${t.id}`,className:`rounded-2xl border border-sakura-200 bg-surface p-5 shadow-soft`,children:[(0,k.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center justify-between gap-2`,children:[(0,k.jsx)(`h2`,{className:`text-base font-bold text-ink-900`,children:i}),(0,k.jsx)(`span`,{className:`rounded-full bg-tianyi-50 px-3 py-1 text-xs text-tianyi-800`,children:n?JY[n.source]:`读取中…`})]}),(0,k.jsxs)(`p`,{className:`mb-3 text-xs text-ink-500`,children:[`环境变量:`,n?n.environmentConfigured?`已配置`:`未配置`:`读取中…`,t.keyless?` · 未配置时以 keyless 限流模式运行`:``]}),(0,k.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),p(!1)},children:[(0,k.jsxs)(`label`,{className:`sr-only`,htmlFor:`${t.id}-key`,children:[i,` API Key`]}),(0,k.jsx)(`input`,{id:`${t.id}-key`,type:`password`,autoComplete:`off`,spellCheck:!1,value:a,maxLength:4096,disabled:m,onChange:e=>o(e.target.value),placeholder:n?.savedConfigured?`输入新密钥以替换`:`粘贴你的 API Key`,className:`focus-neko w-full min-w-0 rounded-xl border border-sakura-200 bg-base px-3 py-2.5 text-sm`}),(0,k.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-center gap-3`,children:[(0,k.jsx)(`button`,{type:`submit`,disabled:m||!a.trim(),className:`focus-neko rounded-full bg-sakura-100 px-4 py-1.5 text-sm font-semibold text-sakura-800 disabled:opacity-50`,children:s?`处理中…`:`保存密钥`}),n?.savedConfigured&&(0,k.jsx)(`button`,{type:`button`,disabled:m,onClick:()=>void p(!0),className:`focus-neko rounded-full px-3 py-1.5 text-sm text-ink-500 disabled:opacity-50`,children:`移除已保存密钥`}),(0,k.jsxs)(`a`,{href:t.signupUrl,target:`_blank`,rel:`noreferrer`,className:`focus-neko ml-auto inline-block rounded text-xs text-sakura-700`,children:[`获取 `,i,` API Key ↗`]})]})]}),(0,k.jsx)(`output`,{className:`mt-2 block min-h-4 text-xs text-tianyi-800`,children:u})]})}function ZY(){let{credentials:e,searchSettings:t,phase:n}=gM(),r=n===`ready`&&e!==null;return(0,k.jsxs)(MI,{active:`credentials`,children:[(0,k.jsxs)(`div`,{className:`mx-auto w-full max-w-4xl px-5 pt-6 pb-3`,children:[(0,k.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-2`,children:[(0,k.jsx)(`h1`,{className:`text-xl font-bold text-ink-900`,children:`密钥`}),(0,k.jsx)(`span`,{className:`ml-auto text-xs text-ink-500`,children:n===`ready`?`已连接`:`连接中…`})]}),(0,k.jsx)(`p`,{className:`mt-1 text-sm text-ink-500`,children:`管理 API Key,保存值优先于环境变量,所有工作区共用。`})]}),(0,k.jsx)(`main`,{className:`mx-auto w-full max-w-4xl px-5 pb-8`,children:(0,k.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,k.jsx)(qY,{settings:t,credentials:e,ready:r,onSelect:e=>OM.setSearchProvider(e)}),VY.map(t=>(0,k.jsx)(XY,{spec:t,status:e?.statuses[t.id],ready:r},t.id))]})})]})}var QY={documents:`文档处理`,development:`开发工作流`,frontend:`前端 / UI`,research:`研究检索`,skills:`技能生态`,automation:`自动化`,database:`数据库`,writing:`写作`,uncategorized:`未分类`},$Y=e=>e>=1048576?`${(e/1024/1024).toFixed(1)}MB`:`${Math.max(1,Math.round(e/1024))}KB`,eX=e=>e===``?``:e.slice(0,10),tX=e=>e instanceof L?e.reason??null:null;function nX(e,t){let n=new Map;for(let r of e){let e=t===`category`?QY[r.category]??r.category:r.source,i=n.get(e)??[];i.push(r),n.set(e,i)}return[...n.entries()].sort((e,t)=>t[1].length-e[1].length||e[0].localeCompare(t[0]))}function rX({skill:e}){return(0,k.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1.5 text-xs`,children:[e.installed.project&&(0,k.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-sakura-100 px-2 py-0.5 text-sakura-800`,children:[(0,k.jsx)(`span`,{className:`inline-block h-1.5 w-1.5 rounded-full bg-sakura-500`}),`项目级`,e.activeLevel===`project`?`·生效`:``]}),e.installed.user&&(0,k.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-sakura-100 px-2 py-0.5 text-sakura-800`,children:[(0,k.jsx)(`span`,{className:`inline-block h-1.5 w-1.5 rounded-full bg-sakura-500`}),`用户级`,e.activeLevel===`user`?`·生效`:``]}),e.installed.builtin&&(0,k.jsx)(`span`,{className:`rounded-full bg-ink-100 px-2 py-0.5 text-ink-600`,children:`内置`})]})}function iX({confirm:e,onClose:t}){let[n,r]=(0,f.useState)(!1);return(0,k.jsx)(aX,{children:(0,k.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center p-4`,children:[(0,k.jsx)(`button`,{type:`button`,"aria-label":`取消`,onClick:t,className:`absolute inset-0 bg-ink-900/20`}),(0,k.jsxs)(`div`,{role:`alertdialog`,"aria-modal":`true`,"aria-label":e.title,className:`relative w-full max-w-sm rounded-card border border-sakura-200 bg-surface p-5 shadow-lift`,children:[(0,k.jsx)(`h3`,{className:`text-base font-bold text-ink-900`,children:e.title}),(0,k.jsx)(`p`,{className:`mt-2 text-sm text-ink-600`,children:e.body}),(0,k.jsxs)(`div`,{className:`mt-4 flex justify-end gap-2`,children:[(0,k.jsx)(`button`,{type:`button`,onClick:t,className:`focus-neko rounded-full px-4 py-1.5 text-sm text-ink-500`,children:`取消`}),(0,k.jsx)(`button`,{type:`button`,disabled:n,className:`focus-neko rounded-full px-4 py-1.5 text-sm font-semibold disabled:opacity-50 ${e.danger?`bg-sakura-100 text-sakura-800`:`bg-tianyi-100 text-tianyi-800`}`,onClick:()=>{r(!0),e.action().finally(()=>{r(!1),t()})},children:n?`处理中…`:e.confirmLabel})]})]})]})})}function aX({children:e}){return(0,jP.createPortal)(e,document.body)}function oX({name:e,onClose:t,onChanged:n}){let[r,i]=(0,f.useState)(null),[a,o]=(0,f.useState)(null),[s,c]=(0,f.useState)(`about`),[l,u]=(0,f.useState)(null),[d,p]=(0,f.useState)(null),[m,h]=(0,f.useState)(null),[g,_]=(0,f.useState)(``),[v,y]=(0,f.useState)(null);(0,f.useEffect)(()=>{let t=!1;return i(null),o(null),u(null),c(`about`),_(``),OM.marketDetail(e).then(e=>{t||i(e)}).catch(e=>{t||o(e instanceof Error?e.message:String(e))}),()=>{t=!0}},[e]),(0,f.useEffect)(()=>{if(s!==`preview`||l!==null||d!==null)return;let t=!1;return OM.marketPreview(e).then(e=>{t||u(e)}).catch(e=>{t||p(e instanceof Error?e.message:String(e))}),()=>{t=!0}},[s,e,l,d]);let b=async(t,r)=>{h(t),_(``);try{let a=await OM.marketInstall(e,t,r);_(a.shadowedBy===`project`?`已安装到用户级,但项目级同名技能优先,此安装暂不生效。下次发送消息时生效。`:`安装完成,下次发送消息时生效。`),n();let o=await OM.marketDetail(e);i(o)}catch(n){tX(n)===`skill_exists`&&!r?y({title:`覆盖已安装技能`,body:`${t===`user`?`用户级`:`项目级`}已存在 ${e}。以市场版本覆盖?本地改动将丢失。`,confirmLabel:`覆盖安装`,action:()=>b(t,!0)}):_(`操作失败:${n instanceof Error?n.message:String(n)}`)}finally{h(null)}},x=t=>{if(r===null)return;let n=t===`user`?r.installed.user:r.installed.project,i=t===`user`&&r.installed.project;n?y({title:`覆盖已安装技能`,body:`${t===`user`?`用户级`:`项目级`}已存在 ${e}。以市场版本 ${r.version} 覆盖?本地改动将丢失。`,confirmLabel:`覆盖安装`,action:()=>b(t,!0)}):i?y({title:`安装后暂不生效`,body:`项目级已存在同名 ${e},项目级优先。仍要安装到用户级吗?`,confirmLabel:`仍安装`,action:()=>b(t,!1)}):b(t,!1)},S=t=>{y({title:`卸载技能`,body:`删除${t===`user`?`用户级`:`项目级`}的 ${e}?此操作不可撤销。`,confirmLabel:`卸载`,danger:!0,action:async()=>{h(t),_(``);try{await OM.marketUninstall(e,t),_(`已卸载,下次发送消息时生效。`),n(),i(await OM.marketDetail(e))}catch(e){_(`操作失败:${e instanceof Error?e.message:String(e)}`)}finally{h(null)}}})};return(0,k.jsxs)(aX,{children:[(0,k.jsx)(`button`,{type:`button`,"aria-label":`关闭详情`,onClick:t,className:`fixed inset-0 z-40 bg-ink-900/10`}),(0,k.jsxs)(`aside`,{role:`dialog`,"aria-label":`技能详情 ${e}`,className:`fixed inset-0 z-50 flex flex-col bg-base sm:inset-y-0 sm:left-auto sm:right-0 sm:w-[26rem] sm:border-l sm:border-sakura-200 sm:shadow-lift`,children:[(0,k.jsxs)(`header`,{className:`flex items-center justify-between gap-2 border-b border-sakura-100 px-4 py-3`,children:[(0,k.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,k.jsx)(`span`,{className:`text-sakura-500`,children:(0,k.jsx)(lI,{name:`sparkles`,size:16})}),(0,k.jsx)(`h2`,{className:`truncate text-lg font-bold text-ink-900`,children:e}),r&&(0,k.jsx)(`span`,{className:`shrink-0 text-xs text-ink-400`,children:r.version})]}),(0,k.jsx)(`button`,{type:`button`,onClick:t,"aria-label":`关闭详情`,className:`focus-neko rounded-lg p-1 text-ink-500 hover:bg-ink-100`,children:(0,k.jsx)(lI,{name:`close`,size:16})})]}),(0,k.jsx)(`div`,{className:`flex gap-1 border-b border-sakura-100 px-4 py-2`,children:[`about`,`preview`].map(e=>(0,k.jsx)(`button`,{type:`button`,onClick:()=>c(e),className:`focus-neko rounded-full px-3 py-1 text-sm ${s===e?`bg-tianyi-100 font-semibold text-tianyi-800`:`text-ink-500`}`,children:e===`about`?`说明`:`预览`},e))}),(0,k.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-4 py-3`,children:[a!==null&&(0,k.jsxs)(`p`,{className:`text-sm text-sakura-800`,children:[`加载失败:`,a]}),r===null&&a===null&&(0,k.jsx)(`p`,{className:`text-sm text-ink-500`,children:`加载中…`}),r!==null&&s===`about`&&(0,k.jsxs)(`div`,{className:`space-y-3`,children:[(0,k.jsx)(`p`,{className:`text-sm text-ink-700`,children:r.description}),(0,k.jsx)(`dl`,{className:`space-y-1.5 text-xs text-ink-600`,children:[[`分类`,QY[r.category]??r.category],[`来源`,r.source],[`大小`,$Y(r.sizeBytes)],[`SHA-256`,`${r.sha256.slice(0,12)}…`],[`上传于`,eX(r.uploadedAt)],...r.license===``?[]:[[`许可证`,r.license]]].map(([e,t])=>(0,k.jsxs)(`div`,{className:`flex gap-2`,children:[(0,k.jsx)(`dt`,{className:`w-14 shrink-0 text-ink-400`,children:e}),(0,k.jsx)(`dd`,{className:`min-w-0 font-mono`,children:t})]},e))}),(0,k.jsxs)(`div`,{className:`rounded-xl bg-ink-50 px-3 py-2 text-xs text-ink-600`,children:[(0,k.jsx)(rX,{skill:r}),!r.installed.project&&!r.installed.user&&!r.installed.builtin&&`尚未安装`]})]}),r!==null&&s===`preview`&&(0,k.jsxs)(`div`,{children:[l===null&&d===null&&(0,k.jsx)(`p`,{className:`text-sm text-ink-500`,children:`下载并解开预览…`}),d!==null&&(0,k.jsxs)(`p`,{className:`text-sm text-sakura-800`,children:[`预览失败:`,d]}),l!==null&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(oJ,{text:l.body}),(0,k.jsx)(`h3`,{className:`mb-1 mt-4 text-xs font-medium text-ink-400`,children:`包内文件`}),(0,k.jsx)(`ul`,{className:`space-y-0.5 font-mono text-xs text-ink-600`,children:l.files.map(e=>(0,k.jsx)(`li`,{children:e},e))})]})]})]}),r!==null&&(0,k.jsxs)(`footer`,{className:`space-y-2 border-t border-sakura-100 px-4 py-3`,children:[g!==``&&(0,k.jsx)(`output`,{className:`block text-xs text-tianyi-800`,children:g}),r.installed.builtin&&!r.installed.user&&!r.installed.project?(0,k.jsx)(`p`,{className:`text-xs text-ink-500`,children:`内置技能随 neko 分发,无需安装,也不支持卸载。`}):(0,k.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:[`user`,`project`].map(e=>{let t=e===`user`?r.installed.user:r.installed.project,n=e===`user`?`用户级`:`项目级`;return t?(0,k.jsxs)(`button`,{type:`button`,disabled:m!==null,onClick:()=>S(e),className:`focus-neko inline-flex items-center gap-1.5 rounded-full border border-ink-200 px-3 py-1.5 text-sm text-ink-600 disabled:opacity-50`,children:[(0,k.jsx)(lI,{name:`trash`,size:14}),m===e?`处理中…`:`卸载${n}`]},e):(0,k.jsxs)(`button`,{type:`button`,disabled:m!==null,onClick:()=>x(e),className:`focus-neko inline-flex items-center gap-1.5 rounded-full bg-tianyi-100 px-3 py-1.5 text-sm font-semibold text-tianyi-800 disabled:opacity-50`,children:[(0,k.jsx)(lI,{name:`download`,size:14}),m===e?`安装中…`:`安装到${n}`]},e)})})]})]}),v&&(0,k.jsx)(iX,{confirm:v,onClose:()=>y(null)})]})}function sX(){let{phase:e}=gM(),[t,n]=(0,f.useState)([]),[r,i]=(0,f.useState)(!0),[a,o]=(0,f.useState)(null),[s,c]=(0,f.useState)(``),[l,u]=(0,f.useState)(`category`),[d,p]=(0,f.useState)(null),m=(0,f.useRef)(0),h=()=>{let e=++m.current;i(!0),o(null),OM.marketList().then(t=>{e===m.current&&n(t)}).catch(t=>{e===m.current&&o(t instanceof Error?t.message:String(t))}).finally(()=>{e===m.current&&i(!1)})};(0,f.useEffect)(()=>{e===`ready`&&h()},[e]);let g=(0,f.useMemo)(()=>{let e=s.trim().toLowerCase();return e===``?t:t.filter(t=>t.name.toLowerCase().includes(e)||t.description.toLowerCase().includes(e))},[t,s]),_=(0,f.useMemo)(()=>nX(g,l),[g,l]);return(0,k.jsxs)(`div`,{className:`flex min-h-dvh flex-col bg-base`,children:[(0,k.jsx)(`header`,{className:`sticky top-0 z-10 border-b border-sakura-100 bg-surface/90 px-4 py-3 backdrop-blur-md sm:px-6`,children:(0,k.jsxs)(`div`,{className:`mx-auto flex w-full max-w-7xl flex-wrap items-center gap-3`,children:[(0,k.jsx)(Ur,{to:`/`,className:`focus-neko inline-flex shrink-0 items-center gap-1 rounded-lg px-2 py-1 text-sm font-medium text-sakura-700 hover:bg-sakura-50`,children:`← 返回聊天`}),(0,k.jsx)(`span`,{className:`text-ink-300`,children:`/`}),(0,k.jsx)(`h1`,{className:`text-base font-bold text-ink-900 sm:text-lg`,children:`技能市场`}),(0,k.jsxs)(`div`,{className:`ml-auto flex flex-wrap items-center gap-2 sm:gap-3`,children:[(0,k.jsx)(`div`,{className:`flex rounded-full border border-sakura-200 p-0.5 text-xs`,children:[`category`,`source`].map(e=>(0,k.jsx)(`button`,{type:`button`,onClick:()=>u(e),className:`focus-neko rounded-full px-3 py-1 ${l===e?`bg-sakura-100 font-semibold text-sakura-800`:`text-ink-500 hover:text-ink-800`}`,children:e===`category`?`按分类`:`按来源`},e))}),(0,k.jsxs)(`label`,{className:`relative`,children:[(0,k.jsx)(`span`,{className:`sr-only`,children:`搜索技能`}),(0,k.jsx)(`span`,{className:`pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-ink-400`,children:(0,k.jsx)(lI,{name:`search`,size:14})}),(0,k.jsx)(`input`,{value:s,onChange:e=>c(e.target.value),placeholder:`搜索技能…`,className:`focus-neko w-36 rounded-full border border-sakura-200 bg-surface py-1.5 pl-8 pr-3 text-sm sm:w-56`})]}),(0,k.jsx)(`span`,{className:`text-xs text-ink-400`,children:e===`ready`?`已连接`:`连接中…`})]})]})}),(0,k.jsxs)(`main`,{className:`mx-auto w-full max-w-7xl flex-1 px-4 py-6 sm:px-6`,children:[r&&(0,k.jsx)(`p`,{className:`py-16 text-center text-sm text-ink-500`,children:e===`ready`?`加载市场目录…`:`等待网关连接…`}),a!==null&&(0,k.jsxs)(`div`,{className:`mx-auto max-w-md rounded-card border border-sakura-200 bg-surface p-6 text-center shadow-soft`,children:[(0,k.jsx)(`p`,{className:`text-sm text-ink-700`,children:`市场目录加载失败,请检查网络后重试。`}),(0,k.jsx)(`p`,{className:`mt-1 break-all font-mono text-xs text-ink-400`,children:a}),(0,k.jsx)(`button`,{type:`button`,onClick:h,className:`focus-neko mt-4 rounded-full bg-sakura-100 px-4 py-1.5 text-sm font-semibold text-sakura-800`,children:`重试`})]}),!r&&a===null&&g.length===0&&(0,k.jsx)(`p`,{className:`py-16 text-center text-sm text-ink-500`,children:"没有匹配的技能。反复出现的需求可以用 `/skill:skill-creator` 自己造一个。"}),_.map(([e,t])=>(0,k.jsxs)(`section`,{className:`mb-7`,children:[(0,k.jsxs)(`h2`,{className:`mb-2.5 flex items-baseline gap-2 text-lg font-bold text-ink-900`,children:[e,(0,k.jsx)(`span`,{className:`text-xs font-normal text-ink-400`,children:t.length})]}),(0,k.jsx)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4`,children:t.map(e=>(0,k.jsxs)(`button`,{type:`button`,onClick:()=>p(e.name),className:`focus-neko rounded-2xl border border-sakura-200 bg-surface p-4 text-left shadow-soft transition-shadow hover:shadow-lift`,children:[(0,k.jsxs)(`div`,{className:`mb-1 flex items-center justify-between gap-2`,children:[(0,k.jsx)(`span`,{className:`truncate text-base font-bold text-ink-900`,children:e.name}),(0,k.jsx)(rX,{skill:e})]}),(0,k.jsx)(`p`,{className:`mb-2.5 line-clamp-2 min-h-10 text-sm text-ink-500`,children:e.description}),(0,k.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-ink-400`,children:[(0,k.jsx)(`span`,{className:`rounded-full bg-tianyi-50 px-2 py-0.5 text-tianyi-800`,children:e.source}),(0,k.jsx)(`span`,{className:`font-mono`,children:e.version}),(0,k.jsx)(`span`,{children:$Y(e.sizeBytes)})]})]},e.name))})]},e))]}),d!==null&&(0,k.jsx)(oX,{name:d,onClose:()=>p(null),onChanged:()=>h()})]})}var cX=Jr({component:()=>(0,k.jsx)(ii,{})}),lX=Kr({getParentRoute:()=>cX,path:`/`,component:JJ}),uX=Kr({getParentRoute:()=>cX,path:`/settings`,component:ZY}),dX=Kr({getParentRoute:()=>cX,path:`/settings/context`,component:lY}),fX=Kr({getParentRoute:()=>cX,path:`/settings/mobile`,component:BY}),pX=Kr({getParentRoute:()=>cX,path:`/skills`,component:sX}),mX=Kr({getParentRoute:()=>cX,path:`/about`,component:II}),hX=ui({routeTree:cX.addChildren([lX,uX,dX,fX,pX,mX])});EM();var gX=document.getElementById(`root`);gX!==null&&(0,yi.createRoot)(gX).render((0,k.jsx)(f.StrictMode,{children:(0,k.jsx)(pi,{router:hX})}));
|