170 lines
2.1 MiB
Plaintext
170 lines
2.1 MiB
Plaintext
<!doctype html>
|
||
<html lang="zh-CN" translate="no" class="notranslate">
|
||
<head>
|
||
<meta charset="UTF-8" />
|
||
<meta name="google" content="notranslate" />
|
||
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20aria-hidden%3D%22true%22%20role%3D%22img%22%20class%3D%22iconify%20iconify--logos%22%20width%3D%2231.88%22%20height%3D%2232%22%20preserveAspectRatio%3D%22xMidYMid%20meet%22%20viewBox%3D%220%200%20256%20257%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22IconifyId1813088fe1fbc01fb466%22%20x1%3D%22-.828%25%22%20x2%3D%2257.636%25%22%20y1%3D%227.652%25%22%20y2%3D%2278.411%25%22%3E%3Cstop%20offset%3D%220%25%22%20stop-color%3D%22%2341D1FF%22%3E%3C%2Fstop%3E%3Cstop%20offset%3D%22100%25%22%20stop-color%3D%22%23BD34FE%22%3E%3C%2Fstop%3E%3C%2FlinearGradient%3E%3ClinearGradient%20id%3D%22IconifyId1813088fe1fbc01fb467%22%20x1%3D%2243.376%25%22%20x2%3D%2250.316%25%22%20y1%3D%222.242%25%22%20y2%3D%2289.03%25%22%3E%3Cstop%20offset%3D%220%25%22%20stop-color%3D%22%23FFEA83%22%3E%3C%2Fstop%3E%3Cstop%20offset%3D%228.333%25%22%20stop-color%3D%22%23FFDD35%22%3E%3C%2Fstop%3E%3Cstop%20offset%3D%22100%25%22%20stop-color%3D%22%23FFA800%22%3E%3C%2Fstop%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Cpath%20fill%3D%22url(%23IconifyId1813088fe1fbc01fb466)%22%20d%3D%22M255.153%2037.938L134.897%20252.976c-2.483%204.44-8.862%204.466-11.382.048L.875%2037.958c-2.746-4.814%201.371-10.646%206.827-9.67l120.385%2021.517a6.537%206.537%200%200%200%202.322-.004l117.867-21.483c5.438-.991%209.574%204.796%206.877%209.62Z%22%3E%3C%2Fpath%3E%3Cpath%20fill%3D%22url(%23IconifyId1813088fe1fbc01fb467)%22%20d%3D%22M185.432.063L96.44%2017.501a3.268%203.268%200%200%200-2.634%203.014l-5.474%2092.456a3.268%203.268%200%200%200%203.997%203.378l24.777-5.718c2.318-.535%204.413%201.507%203.936%203.838l-7.361%2036.047c-.495%202.426%201.782%204.5%204.151%203.78l15.304-4.649c2.372-.72%204.652%201.36%204.15%203.788l-11.698%2056.621c-.732%203.542%203.979%205.473%205.943%202.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505%204.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||
<title>CLI Proxy API Management Center</title>
|
||
<script type="module" crossorigin>var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(e&&(t=e(e=0)),t),s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(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},l=(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},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var d=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function ee(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function j(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function M(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,M(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ee(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),M(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ee(a,u),c+=M(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ee(a,u++),c+=M(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return M(j(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function N(e,t,n){if(e==null)return e;var r=[],i=0;return M(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function te(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var P=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)},F={map:N,forEach:function(e,t,n){N(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return N(e,function(){t++}),t},toArray:function(e){return N(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=F,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:te}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,P)}catch(e){P(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.1`})),f=s(((e,t)=>{t.exports=d()})),p=s((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&ee(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ee(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function ee(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,ee(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),m=s(((e,t)=>{t.exports=p()})),h=s((e=>{var t=f();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.1`})),g=s(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()})),_=s((e=>{var t=m(),n=f(),r=g();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var p=Object.assign,h=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),ee=Symbol.iterator;function j(e){return typeof e!=`object`||!e?null:(e=ee&&e[ee]||e[`@@iterator`],typeof e==`function`?e:null)}var M=Symbol.for(`react.client.reference`);function N(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===M?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||``,e=e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?N(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return N(e(t))}catch{}}return null}var te=Array.isArray,P=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},re=[],ie=-1;function ae(e){return{current:e}}function oe(e){0>ie||(e.current=re[ie],re[ie]=null,ie--)}function se(e,t){ie++,re[ie]=e.current,e.current=t}var ce=ae(null),le=ae(null),ue=ae(null),de=ae(null);function fe(e,t){switch(se(ue,t),se(le,e),se(ce,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?tf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=tf(t),e=nf(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}oe(ce),se(ce,e)}function pe(){oe(ce),oe(le),oe(ue)}function me(e){e.memoizedState!==null&&se(de,e);var t=ce.current,n=nf(t,e.type);t!==n&&(se(le,e),se(ce,n))}function he(e){le.current===e&&(oe(ce),oe(le)),de.current===e&&(oe(de),dp._currentValue=ne)}var ge,_e;function ve(e){if(ge===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ge=t&&t[1]||``,_e=-1<e.stack.indexOf(`
|
||
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
||
`+ge+e+_e}var ye=!1;function be(e,t){if(!e||ye)return``;ye=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
||
`),l=s.split(`
|
||
`);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=`
|
||
`+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{ye=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ve(n):``}function xe(e,t){switch(e.tag){case 26:case 27:case 5:return ve(e.type);case 16:return ve(`Lazy`);case 13:return e.child!==t&&t!==null?ve(`Suspense Fallback`):ve(`Suspense`);case 19:return ve(`SuspenseList`);case 0:case 15:return be(e.type,!1);case 11:return be(e.type.render,!1);case 1:return be(e.type,!0);case 31:return ve(`Activity`);default:return``}}function Se(e){try{var t=``,n=null;do t+=xe(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
||
Error generating stack: `+e.message+`
|
||
`+e.stack}}var Ce=Object.prototype.hasOwnProperty,we=t.unstable_scheduleCallback,Te=t.unstable_cancelCallback,Ee=t.unstable_shouldYield,De=t.unstable_requestPaint,Oe=t.unstable_now,ke=t.unstable_getCurrentPriorityLevel,Ae=t.unstable_ImmediatePriority,je=t.unstable_UserBlockingPriority,Me=t.unstable_NormalPriority,Ne=t.unstable_LowPriority,Pe=t.unstable_IdlePriority,Fe=t.log,Ie=t.unstable_setDisableYieldValue,Le=null,Re=null;function ze(e){if(typeof Fe==`function`&&Ie(e),Re&&typeof Re.setStrictMode==`function`)try{Re.setStrictMode(Le,e)}catch{}}var Be=Math.clz32?Math.clz32:Ue,Ve=Math.log,He=Math.LN2;function Ue(e){return e>>>=0,e===0?32:31-(Ve(e)/He|0)|0}var We=256,Ge=262144,Ke=4194304;function qe(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Je(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=qe(n))):i=qe(o):i=qe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=qe(n))):i=qe(o)):i=qe(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ye(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Xe(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ze(){var e=Ke;return Ke<<=1,!(Ke&62914560)&&(Ke=4194304),e}function Qe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function $e(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function et(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Be(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&tt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function tt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Be(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function nt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Be(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function rt(e,t){var n=t&-t;return n=n&42?1:it(n),(n&(e.suspendedLanes|t))===0?n:0}function it(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function at(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function ot(){var e=F.p;return e===0?(e=window.event,e===void 0?32:Dp(e.type)):e}function st(e,t){var n=F.p;try{return F.p=e,t()}finally{F.p=n}}var ct=Math.random().toString(36).slice(2),lt=`__reactFiber$`+ct,ut=`__reactProps$`+ct,dt=`__reactContainer$`+ct,ft=`__reactEvents$`+ct,pt=`__reactListeners$`+ct,mt=`__reactHandles$`+ct,ht=`__reactResources$`+ct,gt=`__reactMarker$`+ct;function _t(e){delete e[lt],delete e[ut],delete e[ft],delete e[pt],delete e[mt]}function vt(e){var t=e[lt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[dt]||n[lt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=wf(e);e!==null;){if(n=e[lt])return n;e=wf(e)}return t}e=n,n=e.parentNode}return null}function yt(e){if(e=e[lt]||e[dt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function bt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function xt(e){var t=e[ht];return t||(t=e[ht]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function St(e){e[gt]=!0}var Ct=new Set,wt={};function Tt(e,t){Et(e,t),Et(e+`Capture`,t)}function Et(e,t){for(wt[e]=t,e=0;e<t.length;e++)Ct.add(t[e])}var Dt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Ot={},kt={};function At(e){return Ce.call(kt,e)?!0:Ce.call(Ot,e)?!1:Dt.test(e)?kt[e]=!0:(Ot[e]=!0,!1)}function jt(e,t,n){if(At(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function Mt(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 Nt(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 Pt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Ft(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function It(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 Lt(e){if(!e._valueTracker){var t=Ft(e)?`checked`:`value`;e._valueTracker=It(e,t,``+e[t])}}function Rt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Ft(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function zt(e){if(e=e||(typeof document<`u`?document:void 0),e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Bt=/[\n"\\]/g;function Vt(e){return e.replace(Bt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Ht(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=``+Pt(t)):e.value!==``+Pt(t)&&(e.value=``+Pt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Wt(e,o,Pt(n)):Wt(e,o,Pt(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=``+Pt(s):e.removeAttribute(`name`)}function Ut(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)){Lt(e);return}n=n==null?``:``+Pt(n),t=t==null?n:``+Pt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r=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),Lt(e)}function Wt(e,t,n){t===`number`&&zt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Gt(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=``+Pt(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 Kt(e,t,n){if(t!=null&&(t=``+Pt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Pt(n)}function qt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(te(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??(n=``),t=n}n=Pt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Lt(e)}function Jt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Yt=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 Xt(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||Yt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Zt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Xt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Xt(e,o,t[o])}function Qt(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 $t=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),en=/^[\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 tn(e){return en.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function nn(){}var rn=null;function an(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var on=null,sn=null;function cn(e){var t=yt(e);if(t&&(e=t.stateNode)){var n=e[ut]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Ht(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="`+Vt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[ut]||null;if(!a)throw Error(i(90));Ht(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&&Rt(r)}break a;case`textarea`:Kt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Gt(e,!!n.multiple,t,!1)}}}var ln=!1;function un(e,t,n){if(ln)return e(t,n);ln=!0;try{return e(t)}finally{if(ln=!1,(on!==null||sn!==null)&&(ju(),on&&(t=on,e=sn,sn=on=null,cn(t),e)))for(t=0;t<e.length;t++)cn(e[t])}}function dn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ut]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var fn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),pn=!1;if(fn)try{var mn={};Object.defineProperty(mn,`passive`,{get:function(){pn=!0}}),window.addEventListener(`test`,mn,mn),window.removeEventListener(`test`,mn,mn)}catch{pn=!1}var hn=null,gn=null,_n=null;function vn(){if(_n)return _n;var e,t=gn,n=t.length,r,i=`value`in hn?hn.value:hn.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 _n=i.slice(e,1<r?1-r:void 0)}function yn(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 bn(){return!0}function xn(){return!1}function Sn(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)?bn:xn,this.isPropagationStopped=xn,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=bn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=bn)},persist:function(){},isPersistent:bn}),t}var Cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wn=Sn(Cn),Tn=p({},Cn,{view:0,detail:0}),En=Sn(Tn),Dn,On,kn,An=p({},Tn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Vn,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!==kn&&(kn&&e.type===`mousemove`?(Dn=e.screenX-kn.screenX,On=e.screenY-kn.screenY):On=Dn=0,kn=e),Dn)},movementY:function(e){return`movementY`in e?e.movementY:On}}),jn=Sn(An),Mn=Sn(p({},An,{dataTransfer:0})),Nn=Sn(p({},Tn,{relatedTarget:0})),Pn=Sn(p({},Cn,{animationName:0,elapsedTime:0,pseudoElement:0})),Fn=Sn(p({},Cn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),In=Sn(p({},Cn,{data:0})),Ln={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Rn={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`},zn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Bn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=zn[e])?!!t[e]:!1}function Vn(){return Bn}var Hn=Sn(p({},Tn,{key:function(e){if(e.key){var t=Ln[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=yn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Rn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Vn,charCode:function(e){return e.type===`keypress`?yn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?yn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Un=Sn(p({},An,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Wn=Sn(p({},Tn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Vn})),Gn=Sn(p({},Cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Kn=Sn(p({},An,{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})),qn=Sn(p({},Cn,{newState:0,oldState:0})),Jn=[9,13,27,32],Yn=fn&&`CompositionEvent`in window,Xn=null;fn&&`documentMode`in document&&(Xn=document.documentMode);var Zn=fn&&`TextEvent`in window&&!Xn,Qn=fn&&(!Yn||Xn&&8<Xn&&11>=Xn),$n=` `,er=!1;function tr(e,t){switch(e){case`keyup`:return Jn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function nr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var rr=!1;function ir(e,t){switch(e){case`compositionend`:return nr(t);case`keypress`:return t.which===32?(er=!0,$n):null;case`textInput`:return e=t.data,e===$n&&er?null:e;default:return null}}function ar(e,t){if(rr)return e===`compositionend`||!Yn&&tr(e,t)?(e=vn(),_n=gn=hn=null,rr=!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 Qn&&t.locale!==`ko`?null:t.data;default:return null}}var or={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 sr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!or[e.type]:t===`textarea`}function cr(e,t,n,r){on?sn?sn.push(r):sn=[r]:on=r,t=zd(t,`onChange`),0<t.length&&(n=new wn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var lr=null,ur=null;function dr(e){jd(e,0)}function fr(e){if(Rt(bt(e)))return e}function pr(e,t){if(e===`change`)return t}var mr=!1;if(fn){var hr;if(fn){var gr=`oninput`in document;if(!gr){var _r=document.createElement(`div`);_r.setAttribute(`oninput`,`return;`),gr=typeof _r.oninput==`function`}hr=gr}else hr=!1;mr=hr&&(!document.documentMode||9<document.documentMode)}function vr(){lr&&(lr.detachEvent(`onpropertychange`,yr),ur=lr=null)}function yr(e){if(e.propertyName===`value`&&fr(ur)){var t=[];cr(t,ur,e,an(e)),un(dr,t)}}function br(e,t,n){e===`focusin`?(vr(),lr=t,ur=n,lr.attachEvent(`onpropertychange`,yr)):e===`focusout`&&vr()}function xr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return fr(ur)}function Sr(e,t){if(e===`click`)return fr(t)}function Cr(e,t){if(e===`input`||e===`change`)return fr(t)}function wr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Tr=typeof Object.is==`function`?Object.is:wr;function Er(e,t){if(Tr(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(!Ce.call(t,i)||!Tr(e[i],t[i]))return!1}return!0}function Dr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Or(e,t){var n=Dr(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=Dr(n)}}function kr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?kr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ar(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=zt(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=zt(e.document)}return t}function jr(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 Mr=fn&&`documentMode`in document&&11>=document.documentMode,Nr=null,Pr=null,Fr=null,Ir=!1;function Lr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ir||Nr==null||Nr!==zt(r)||(r=Nr,`selectionStart`in r&&jr(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}),Fr&&Er(Fr,r)||(Fr=r,r=zd(Pr,`onSelect`),0<r.length&&(t=new wn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Nr)))}function Rr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var zr={animationend:Rr(`Animation`,`AnimationEnd`),animationiteration:Rr(`Animation`,`AnimationIteration`),animationstart:Rr(`Animation`,`AnimationStart`),transitionrun:Rr(`Transition`,`TransitionRun`),transitionstart:Rr(`Transition`,`TransitionStart`),transitioncancel:Rr(`Transition`,`TransitionCancel`),transitionend:Rr(`Transition`,`TransitionEnd`)},Br={},Vr={};fn&&(Vr=document.createElement(`div`).style,`AnimationEvent`in window||(delete zr.animationend.animation,delete zr.animationiteration.animation,delete zr.animationstart.animation),`TransitionEvent`in window||delete zr.transitionend.transition);function Hr(e){if(Br[e])return Br[e];if(!zr[e])return e;var t=zr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Vr)return Br[e]=t[n];return e}var Ur=Hr(`animationend`),Wr=Hr(`animationiteration`),Gr=Hr(`animationstart`),Kr=Hr(`transitionrun`),qr=Hr(`transitionstart`),Jr=Hr(`transitioncancel`),Yr=Hr(`transitionend`),Xr=new Map,Zr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Zr.push(`scrollEnd`);function Qr(e,t){Xr.set(e,t),Tt(t,[e])}var $r=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)},ei=[],ti=0,ni=0;function ri(){for(var e=ti,t=ni=ti=0;t<e;){var n=ei[t];ei[t++]=null;var r=ei[t];ei[t++]=null;var i=ei[t];ei[t++]=null;var a=ei[t];if(ei[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&si(n,i,a)}}function ii(e,t,n,r){ei[ti++]=e,ei[ti++]=t,ei[ti++]=n,ei[ti++]=r,ni|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ai(e,t,n,r){return ii(e,t,n,r),ci(e)}function oi(e,t){return ii(e,null,null,t),ci(e)}function si(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Be(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ci(e){if(50<wu)throw wu=0,Tu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var li={};function ui(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 di(e,t,n,r){return new ui(e,t,n,r)}function fi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function pi(e,t){var n=e.alternate;return n===null?(n=di(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function mi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function hi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)fi(e)&&(s=1);else if(typeof e==`string`)s=np(e,n,ce.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=di(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return gi(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=di(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=di(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=di(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=di(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function gi(e,t,n,r){return e=di(7,e,r,t),e.lanes=n,e}function _i(e,t,n){return e=di(6,e,null,t),e.lanes=n,e}function vi(e){var t=di(18,null,null,0);return t.stateNode=e,t}function yi(e,t,n){return t=di(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var bi=new WeakMap;function xi(e,t){if(typeof e==`object`&&e){var n=bi.get(e);return n===void 0?(t={value:e,source:t,stack:Se(t)},bi.set(e,t),t):n}return{value:e,source:t,stack:Se(t)}}var Si=[],Ci=0,wi=null,Ti=0,Ei=[],Di=0,Oi=null,ki=1,Ai=``;function ji(e,t){Si[Ci++]=Ti,Si[Ci++]=wi,wi=e,Ti=t}function Mi(e,t,n){Ei[Di++]=ki,Ei[Di++]=Ai,Ei[Di++]=Oi,Oi=e;var r=ki;e=Ai;var i=32-Be(r)-1;r&=~(1<<i),n+=1;var a=32-Be(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,ki=1<<32-Be(t)+i|n<<i|r,Ai=a+e}else ki=1<<a|n<<i|r,Ai=e}function Ni(e){e.return!==null&&(ji(e,1),Mi(e,1,0))}function Pi(e){for(;e===wi;)wi=Si[--Ci],Si[Ci]=null,Ti=Si[--Ci],Si[Ci]=null;for(;e===Oi;)Oi=Ei[--Di],Ei[Di]=null,Ai=Ei[--Di],Ei[Di]=null,ki=Ei[--Di],Ei[Di]=null}function Fi(e,t){Ei[Di++]=ki,Ei[Di++]=Ai,Ei[Di++]=Oi,ki=t.id,Ai=t.overflow,Oi=e}var Ii=null,Li=null,Ri=!1,zi=null,Bi=!1,Vi=Error(i(519));function Hi(e){throw Ji(xi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Vi}function Ui(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[lt]=e,t[ut]=r,n){case`dialog`:Md(`cancel`,t),Md(`close`,t);break;case`iframe`:case`object`:case`embed`:Md(`load`,t);break;case`video`:case`audio`:for(n=0;n<kd.length;n++)Md(kd[n],t);break;case`source`:Md(`error`,t);break;case`img`:case`image`:case`link`:Md(`error`,t),Md(`load`,t);break;case`details`:Md(`toggle`,t);break;case`input`:Md(`invalid`,t),Ut(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Md(`invalid`,t);break;case`textarea`:Md(`invalid`,t),qt(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||Gd(t.textContent,n)?(r.popover!=null&&(Md(`beforetoggle`,t),Md(`toggle`,t)),r.onScroll!=null&&Md(`scroll`,t),r.onScrollEnd!=null&&Md(`scrollend`,t),r.onClick!=null&&(t.onclick=nn),t=!0):t=!1,t||Hi(e,!0)}function Wi(e){for(Ii=e.return;Ii;)switch(Ii.tag){case 5:case 31:case 13:Bi=!1;return;case 27:case 3:Bi=!0;return;default:Ii=Ii.return}}function Gi(e){if(e!==Ii)return!1;if(!Ri)return Wi(e),Ri=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||rf(e.type,e.memoizedProps)),n=!n),n&&Li&&Hi(e),Wi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Li=Cf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Li=Cf(e)}else t===27?(t=Li,ff(e.type)?(e=Sf,Sf=null,Li=e):Li=t):Li=Ii?B(e.stateNode.nextSibling):null;return!0}function Ki(){Li=Ii=null,Ri=!1}function qi(){var e=zi;return e!==null&&(uu===null?uu=e:uu.push.apply(uu,e),zi=null),e}function Ji(e){zi===null?zi=[e]:zi.push(e)}var Yi=ae(null),Xi=null,Zi=null;function Qi(e,t,n){se(Yi,t._currentValue),t._currentValue=n}function $i(e){e._currentValue=Yi.current,oe(Yi)}function ea(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 ta(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),ea(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),ea(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function na(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;Tr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===de.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[dp]:e.push(dp))}a=a.return}e!==null&&ta(t,e,n,r),t.flags|=262144}function ra(e){for(e=e.firstContext;e!==null;){if(!Tr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ia(e){Xi=e,Zi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function aa(e){return sa(Xi,e)}function oa(e,t){return Xi===null&&ia(e),sa(e,t)}function sa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Zi===null){if(e===null)throw Error(i(308));Zi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Zi=Zi.next=t;return n}var ca=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,ua=t.unstable_NormalPriority,da={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function fa(){return{controller:new ca,data:new Map,refCount:0}}function pa(e){e.refCount--,e.refCount===0&&la(ua,function(){e.controller.abort()})}var ma=null,ha=0,ga=0,_a=null;function va(e,t){if(ma===null){var n=ma=[];ha=0,ga=Cd(),_a={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ha++,t.then(ya,ya),t}function ya(){if(--ha===0&&ma!==null){_a!==null&&(_a.status=`fulfilled`);var e=ma;ma=null,ga=0,_a=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ba(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 xa=P.S;P.S=function(e,t){pu=Oe(),typeof t==`object`&&t&&typeof t.then==`function`&&va(e,t),xa!==null&&xa(e,t)};var Sa=ae(null);function Ca(){var e=Sa.current;return e===null?Jl.pooledCache:e}function wa(e,t){t===null?se(Sa,Sa.current):se(Sa,t.pool)}function Ta(){var e=Ca();return e===null?null:{parent:da._currentValue,pool:e}}var Ea=Error(i(460)),Da=Error(i(474)),Oa=Error(i(542)),ka={then:function(){}};function Aa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ja(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(nn,nn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Fa(e),e;default:if(typeof t.status==`string`)t.then(nn,nn);else{if(e=Jl,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,Fa(e),e}throw Na=t,Ea}}function Ma(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Na=e,Ea):e}}var Na=null;function Pa(){if(Na===null)throw Error(i(459));var e=Na;return Na=null,e}function Fa(e){if(e===Ea||e===Oa)throw Error(i(483))}var Ia=null,La=0;function Ra(e){var t=La;return La+=1,Ia===null&&(Ia=[]),ja(Ia,e,t)}function za(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ba(e,t){throw t.$$typeof===h?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Va(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=pi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=_i(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&Ma(i)===t.type)?(t=a(t,n.props),za(t,n),t.return=e,t):(t=hi(n.type,n.key,n.props,null,e.mode,r),za(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=yi(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=gi(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=_i(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=hi(t.type,t.key,t.props,null,e.mode,n),za(n,t),n.return=e,n;case v:return t=yi(t,e.mode,n),t.return=e,t;case O:return t=Ma(t),f(e,t,n)}if(te(t)||j(t))return t=gi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ra(t),n);if(t.$$typeof===C)return f(e,oa(e,t),n);Ba(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=Ma(n),p(e,t,n,r)}if(te(n)||j(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ra(n),r);if(n.$$typeof===C)return p(e,t,oa(e,n),r);Ba(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=Ma(r),m(e,t,n,r,i)}if(te(r)||j(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Ra(r),i);if(r.$$typeof===C)return m(e,t,n,oa(t,r),i);Ba(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),Ri&&ji(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 Ri&&ji(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Ri&&ji(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),Ri&&ji(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 Ri&&ji(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Ri&&ji(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&Ma(l)===r.type){n(e,r.sibling),c=a(r,o.props),za(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=gi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=hi(o.type,o.key,o.props,null,e.mode,c),za(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=yi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Ma(o),b(e,r,o,c)}if(te(o))return h(e,r,o,c);if(j(o)){if(l=j(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Ra(o),c);if(o.$$typeof===C)return b(e,r,oa(e,o),c);Ba(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=_i(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{La=0;var i=b(e,t,n,r);return Ia=null,i}catch(t){if(t===Ea||t===Oa)throw t;var a=di(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ha=Va(!0),Ua=Va(!1),Wa=!1;function Ga(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ka(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 qa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ja(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ql&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ci(e),si(e,null,n),t}return ii(e,r,t,n),ci(e)}function Ya(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,nt(e,n)}}function Xa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Za=!1;function Qa(){if(Za){var e=_a;if(e!==null)throw e}}function $a(e,t,n,r){Za=!1;var i=e.updateQueue;Wa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,m=f!==s.lane;if(m?(Xl&f)===f:(r&f)===f){f!==0&&f===ga&&(Za=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=p({},d,f);break a;case 2:Wa=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),iu|=o,e.lanes=o,e.memoizedState=d}}function eo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function to(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)eo(n[e],t)}var no=ae(null),ro=ae(0);function io(e,t){e=nu,se(ro,e),se(no,t),nu=e|t.baseLanes}function ao(){se(ro,nu),se(no,no.current)}function oo(){nu=ro.current,oe(no),oe(ro)}var so=ae(null),co=null;function lo(e){var t=e.alternate;se(ho,ho.current&1),se(so,e),co===null&&(t===null||no.current!==null||t.memoizedState!==null)&&(co=e)}function uo(e){se(ho,ho.current),se(so,e),co===null&&(co=e)}function fo(e){e.tag===22?(se(ho,ho.current),se(so,e),co===null&&(co=e)):po(e)}function po(){se(ho,ho.current),se(so,so.current)}function mo(e){oe(so),co===e&&(co=null),oe(ho)}var ho=ae(0);function go(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||yf(n)||bf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var _o=0,vo=null,yo=null,bo=null,xo=!1,So=!1,Co=!1,wo=0,To=0,Eo=null,Do=0;function Oo(){throw Error(i(321))}function ko(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Tr(e[n],t[n]))return!1;return!0}function Ao(e,t,n,r,i,a){return _o=a,vo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=e===null||e.memoizedState===null?Gs:Ks,Co=!1,a=n(r,i),Co=!1,So&&(a=Mo(t,n,r,i)),jo(e),a}function jo(e){P.H=Ws;var t=yo!==null&&yo.next!==null;if(_o=0,bo=yo=vo=null,xo=!1,To=0,Eo=null,t)throw Error(i(300));e===null||lc||(e=e.dependencies,e!==null&&ra(e)&&(lc=!0))}function Mo(e,t,n,r){vo=e;var a=0;do{if(So&&(Eo=null),To=0,So=!1,25<=a)throw Error(i(301));if(a+=1,bo=yo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}P.H=qs,o=t(n,r)}while(So);return o}function No(){var e=P.H,t=e.useState()[0];return t=typeof t.then==`function`?Bo(t):t,e=e.useState()[0],(yo===null?null:yo.memoizedState)!==e&&(vo.flags|=1024),t}function Po(){var e=wo!==0;return wo=0,e}function Fo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Io(e){if(xo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}xo=!1}_o=0,bo=yo=vo=null,So=!1,To=wo=0,Eo=null}function Lo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return bo===null?vo.memoizedState=bo=e:bo=bo.next=e,bo}function Ro(){if(yo===null){var e=vo.alternate;e=e===null?null:e.memoizedState}else e=yo.next;var t=bo===null?vo.memoizedState:bo.next;if(t!==null)bo=t,yo=e;else{if(e===null)throw vo.alternate===null?Error(i(467)):Error(i(310));yo=e,e={memoizedState:yo.memoizedState,baseState:yo.baseState,baseQueue:yo.baseQueue,queue:yo.queue,next:null},bo===null?vo.memoizedState=bo=e:bo=bo.next=e}return bo}function zo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Bo(e){var t=To;return To+=1,Eo===null&&(Eo=[]),e=ja(Eo,e,t),t=vo,(bo===null?t.memoizedState:bo.next)===null&&(t=t.alternate,P.H=t===null||t.memoizedState===null?Gs:Ks),e}function Vo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Bo(e);if(e.$$typeof===C)return aa(e)}throw Error(i(438,String(e)))}function Ho(e){var t=null,n=vo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=vo.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??(t={data:[],index:0}),n===null&&(n=zo(),vo.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]=A;return t.index++,n}function Uo(e,t){return typeof t==`function`?t(e):t}function Wo(e){return Go(Ro(),yo,e)}function Go(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?(_o&f)===f:(Xl&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===ga&&(d=!0);else if((_o&p)===p){u=u.next,p===ga&&(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,vo.lanes|=p,iu|=p;f=u.action,Co&&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,vo.lanes|=f,iu|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Tr(o,e.memoizedState)&&(lc=!0,d&&(n=_a,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 Ko(e){var t=Ro(),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);Tr(o,t.memoizedState)||(lc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function qo(e,t,n){var r=vo,a=Ro(),o=Ri;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Tr((yo||a).memoizedState,n);if(s&&(a.memoizedState=n,lc=!0),a=a.queue,gs(Xo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||bo!==null&&bo.memoizedState.tag&1){if(r.flags|=2048,ds(9,{destroy:void 0},Yo.bind(null,r,a,n,t),null),Jl===null)throw Error(i(349));o||_o&127||Jo(r,t,n)}return n}function Jo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=vo.updateQueue,t===null?(t=zo(),vo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Yo(e,t,n,r){t.value=n,t.getSnapshot=r,Zo(t)&&Qo(e)}function Xo(e,t,n){return n(function(){Zo(t)&&Qo(e)})}function Zo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Tr(e,n)}catch{return!0}}function Qo(e){var t=oi(e,2);t!==null&&z(t,e,2)}function I(e){var t=Lo();if(typeof e==`function`){var n=e;if(e=n(),Co){ze(!0);try{n()}finally{ze(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Uo,lastRenderedState:e},t}function L(e,t,n,r){return e.baseState=n,Go(e,yo,typeof r==`function`?r:Uo)}function $o(e,t,n,r,a){if(Vs(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};P.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,es(t,o)):(o.next=n.next,t.pending=n.next=o)}}function es(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=P.T,o={};P.T=o;try{var s=n(i,r),c=P.S;c!==null&&c(o,s),ts(e,t,s)}catch(n){rs(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),P.T=a}}else try{a=n(i,r),ts(e,t,a)}catch(n){rs(e,t,n)}}function ts(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ns(e,t,n)},function(n){return rs(e,t,n)}):ns(e,t,n)}function ns(e,t,n){t.status=`fulfilled`,t.value=n,is(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,es(e,n)))}function rs(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,is(t),t=t.next;while(t!==r)}e.action=null}function is(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function as(e,t){return t}function os(e,t){if(Ri){var n=Jl.formState;if(n!==null){a:{var r=vo;if(Ri){if(Li){b:{for(var i=Li,a=Bi;i.nodeType!==8;){if(!a){i=null;break b}if(i=B(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Li=B(i.nextSibling),r=i.data===`F!`;break a}}Hi(r)}r=!1}r&&(t=n[0])}}return n=Lo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:as,lastRenderedState:t},n.queue=r,n=Rs.bind(null,vo,r),r.dispatch=n,r=I(!1),a=Bs.bind(null,vo,!1,r.queue),r=Lo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=$o.bind(null,vo,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ss(e){return cs(Ro(),yo,e)}function cs(e,t,n){if(t=Go(e,t,as)[0],e=Wo(Uo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Bo(t)}catch(e){throw e===Ea?Oa:e}else r=t;t=Ro();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(vo.flags|=2048,ds(9,{destroy:void 0},ls.bind(null,i,n),null)),[r,a,e]}function ls(e,t){e.action=t}function us(e){var t=Ro(),n=yo;if(n!==null)return cs(t,n,e);Ro(),t=t.memoizedState,n=Ro();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ds(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=vo.updateQueue,t===null&&(t=zo(),vo.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 fs(){return Ro().memoizedState}function ps(e,t,n,r){var i=Lo();vo.flags|=e,i.memoizedState=ds(1|t,{destroy:void 0},n,r===void 0?null:r)}function ms(e,t,n,r){var i=Ro();r=r===void 0?null:r;var a=i.memoizedState.inst;yo!==null&&r!==null&&ko(r,yo.memoizedState.deps)?i.memoizedState=ds(t,a,n,r):(vo.flags|=e,i.memoizedState=ds(1|t,a,n,r))}function hs(e,t){ps(8390656,8,e,t)}function gs(e,t){ms(2048,8,e,t)}function _s(e){vo.flags|=4;var t=vo.updateQueue;if(t===null)t=zo(),vo.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function vs(e){var t=Ro().memoizedState;return _s({ref:t,nextImpl:e}),function(){if(ql&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ys(e,t){return ms(4,2,e,t)}function bs(e,t){return ms(4,4,e,t)}function xs(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 Ss(e,t,n){n=n==null?null:n.concat([e]),ms(4,4,xs.bind(null,t,e),n)}function Cs(){}function ws(e,t){var n=Ro();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&ko(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ts(e,t){var n=Ro();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&ko(t,r[1]))return r[0];if(r=e(),Co){ze(!0);try{e()}finally{ze(!1)}}return n.memoizedState=[r,t],r}function Es(e,t,n){return n===void 0||_o&1073741824&&!(Xl&261930)?e.memoizedState=t:(e.memoizedState=n,e=R(),vo.lanes|=e,iu|=e,n)}function Ds(e,t,n,r){return Tr(n,t)?n:no.current===null?!(_o&42)||_o&1073741824&&!(Xl&261930)?(lc=!0,e.memoizedState=n):(e=R(),vo.lanes|=e,iu|=e,t):(e=Es(e,n,r),Tr(e,t)||(lc=!0),e)}function Os(e,t,n,r,i){var a=F.p;F.p=a!==0&&8>a?a:8;var o=P.T,s={};P.T=s,Bs(e,!1,t,n);try{var c=i(),l=P.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?zs(e,t,ba(c,r),Eu(e)):zs(e,t,r,Eu(e))}catch(n){zs(e,t,{then:function(){},status:`rejected`,reason:n},Eu())}finally{F.p=a,o!==null&&s.types!==null&&(o.types=s.types),P.T=o}}function ks(){}function As(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=js(e).queue;Os(e,a,t,ne,n===null?ks:function(){return Ms(e),n(r)})}function js(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Uo,lastRenderedState:ne},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Uo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ms(e){var t=js(e);t.next===null&&(t=e.alternate.memoizedState),zs(e,t.next.queue,{},Eu())}function Ns(){return aa(dp)}function Ps(){return Ro().memoizedState}function Fs(){return Ro().memoizedState}function Is(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Eu();e=qa(n);var r=Ja(t,e,n);r!==null&&(z(r,t,n),Ya(r,t,n)),t={cache:fa()},e.payload=t;return}t=t.return}}function Ls(e,t,n){var r=Eu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Vs(e)?Hs(t,n):(n=ai(e,t,n,r),n!==null&&(z(n,e,r),Us(n,t,r)))}function Rs(e,t,n){zs(e,t,n,Eu())}function zs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Vs(e))Hs(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,Tr(s,o))return ii(e,t,i,0),Jl===null&&ri(),!1}catch{}if(n=ai(e,t,i,r),n!==null)return z(n,e,r),Us(n,t,r),!0}return!1}function Bs(e,t,n,r){if(r={lane:2,revertLane:Cd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Vs(e)){if(t)throw Error(i(479))}else t=ai(e,n,r,2),t!==null&&z(t,e,2)}function Vs(e){var t=e.alternate;return e===vo||t!==null&&t===vo}function Hs(e,t){So=xo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Us(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,nt(e,n)}}var Ws={readContext:aa,use:Vo,useCallback:Oo,useContext:Oo,useEffect:Oo,useImperativeHandle:Oo,useLayoutEffect:Oo,useInsertionEffect:Oo,useMemo:Oo,useReducer:Oo,useRef:Oo,useState:Oo,useDebugValue:Oo,useDeferredValue:Oo,useTransition:Oo,useSyncExternalStore:Oo,useId:Oo,useHostTransitionStatus:Oo,useFormState:Oo,useActionState:Oo,useOptimistic:Oo,useMemoCache:Oo,useCacheRefresh:Oo};Ws.useEffectEvent=Oo;var Gs={readContext:aa,use:Vo,useCallback:function(e,t){return Lo().memoizedState=[e,t===void 0?null:t],e},useContext:aa,useEffect:hs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ps(4194308,4,xs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ps(4194308,4,e,t)},useInsertionEffect:function(e,t){ps(4,2,e,t)},useMemo:function(e,t){var n=Lo();t=t===void 0?null:t;var r=e();if(Co){ze(!0);try{e()}finally{ze(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Lo();if(n!==void 0){var i=n(t);if(Co){ze(!0);try{n(t)}finally{ze(!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=Ls.bind(null,vo,e),[r.memoizedState,e]},useRef:function(e){var t=Lo();return e={current:e},t.memoizedState=e},useState:function(e){e=I(e);var t=e.queue,n=Rs.bind(null,vo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Cs,useDeferredValue:function(e,t){return Es(Lo(),e,t)},useTransition:function(){var e=I(!1);return e=Os.bind(null,vo,e.queue,!0,!1),Lo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=vo,a=Lo();if(Ri){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Jl===null)throw Error(i(349));Xl&127||Jo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,hs(Xo.bind(null,r,o,e),[e]),r.flags|=2048,ds(9,{destroy:void 0},Yo.bind(null,r,o,n,t),null),n},useId:function(){var e=Lo(),t=Jl.identifierPrefix;if(Ri){var n=Ai,r=ki;n=(r&~(1<<32-Be(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=wo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Do++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ns,useFormState:os,useActionState:os,useOptimistic:function(e){var t=Lo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Bs.bind(null,vo,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ho,useCacheRefresh:function(){return Lo().memoizedState=Is.bind(null,vo)},useEffectEvent:function(e){var t=Lo(),n={impl:e};return t.memoizedState=n,function(){if(ql&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Ks={readContext:aa,use:Vo,useCallback:ws,useContext:aa,useEffect:gs,useImperativeHandle:Ss,useInsertionEffect:ys,useLayoutEffect:bs,useMemo:Ts,useReducer:Wo,useRef:fs,useState:function(){return Wo(Uo)},useDebugValue:Cs,useDeferredValue:function(e,t){return Ds(Ro(),yo.memoizedState,e,t)},useTransition:function(){var e=Wo(Uo)[0],t=Ro().memoizedState;return[typeof e==`boolean`?e:Bo(e),t]},useSyncExternalStore:qo,useId:Ps,useHostTransitionStatus:Ns,useFormState:ss,useActionState:ss,useOptimistic:function(e,t){return L(Ro(),yo,e,t)},useMemoCache:Ho,useCacheRefresh:Fs};Ks.useEffectEvent=vs;var qs={readContext:aa,use:Vo,useCallback:ws,useContext:aa,useEffect:gs,useImperativeHandle:Ss,useInsertionEffect:ys,useLayoutEffect:bs,useMemo:Ts,useReducer:Ko,useRef:fs,useState:function(){return Ko(Uo)},useDebugValue:Cs,useDeferredValue:function(e,t){var n=Ro();return yo===null?Es(n,e,t):Ds(n,yo.memoizedState,e,t)},useTransition:function(){var e=Ko(Uo)[0],t=Ro().memoizedState;return[typeof e==`boolean`?e:Bo(e),t]},useSyncExternalStore:qo,useId:Ps,useHostTransitionStatus:Ns,useFormState:us,useActionState:us,useOptimistic:function(e,t){var n=Ro();return yo===null?(n.baseState=e,[e,n.queue.dispatch]):L(n,yo,e,t)},useMemoCache:Ho,useCacheRefresh:Fs};qs.useEffectEvent=vs;function Js(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:p({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ys={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Eu(),i=qa(r);i.payload=t,n!=null&&(i.callback=n),t=Ja(e,i,r),t!==null&&(z(t,e,r),Ya(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Eu(),i=qa(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ja(e,i,r),t!==null&&(z(t,e,r),Ya(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Eu(),r=qa(n);r.tag=2,t!=null&&(r.callback=t),t=Ja(e,r,n),t!==null&&(z(t,e,n),Ya(t,e,n))}};function Xs(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?!Er(n,r)||!Er(i,a):!0}function Zs(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&&Ys.enqueueReplaceState(t,t.state,null)}function Qs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=p({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function $s(e){$r(e)}function ec(e){console.error(e)}function tc(e){$r(e)}function nc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function rc(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=qa(n),n.tag=3,n.payload={element:null},n.callback=function(){nc(e,t)},n}function ac(e){return e=qa(e),e.tag=3,e}function oc(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(){rc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){rc(t,n,r),typeof i!=`function`&&(gu===null?gu=new Set([this]):gu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function sc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&na(t,n,a,!0),n=so.current,n!==null){switch(n.tag){case 31:case 13:return co===null?Ru():n.alternate===null&&ru===0&&(ru=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===ka?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),rd(e,r,a)),!1;case 22:return n.flags|=65536,r===ka?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),rd(e,r,a)),!1}throw Error(i(435,n.tag))}return rd(e,r,a),Ru(),!1}if(Ri)return t=so.current,t===null?(r!==Vi&&(t=Error(i(423),{cause:r}),Ji(xi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=xi(r,n),a=ic(e.stateNode,r,a),Xa(e,a),ru!==4&&(ru=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Vi&&(e=Error(i(422),{cause:r}),Ji(xi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=xi(o,n),lu===null?lu=[o]:lu.push(o),ru!==4&&(ru=2),t===null)return!0;r=xi(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),Xa(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`&&(gu===null||!gu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=ac(a),oc(a,e,n,r),Xa(n,a),!1}n=n.return}while(n!==null);return!1}var cc=Error(i(461)),lc=!1;function uc(e,t,n,r){t.child=e===null?Ua(t,null,n,r):Ha(t,e.child,n,r)}function dc(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 ia(t),r=Ao(e,t,n,o,a,i),s=Po(),e!==null&&!lc?(Fo(e,t,i),Fc(e,t,i)):(Ri&&s&&Ni(t),t.flags|=1,uc(e,t,r,i),t.child)}function fc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!fi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,pc(e,t,a,r,i)):(e=hi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Ic(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Er:n,n(o,r)&&e.ref===t.ref)return Fc(e,t,i)}return t.flags|=1,e=pi(a,r),e.ref=t.ref,e.return=t,t.child=e}function pc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Er(a,r)&&e.ref===t.ref)if(lc=!1,t.pendingProps=r=a,Ic(e,i))e.flags&131072&&(lc=!0);else return t.lanes=e.lanes,Fc(e,t,i)}return xc(e,t,n,r,i)}function mc(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 gc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&wa(t,a===null?null:a.cachePool),a===null?ao():io(t,a),fo(t);else return r=t.lanes=536870912,gc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&wa(t,null),ao(),po(t)):(wa(t,a.cachePool),io(t,a),po(t),t.memoizedState=null);return uc(e,t,i,n),t.child}function hc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function gc(e,t,n,r,i){var a=Ca();return a=a===null?null:{parent:da._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&wa(t,null),ao(),fo(t),e!==null&&na(e,t,r,!0),t.childLanes=i,null}function _c(e,t){return t=Ac({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function vc(e,t,n){return Ha(t,e.child,null,n),e=_c(t,t.pendingProps),e.flags|=2,mo(t),t.memoizedState=null,e}function yc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Ri){if(r.mode===`hidden`)return e=_c(t,r),t.lanes=536870912,hc(null,e);if(uo(t),(e=Li)?(e=vf(e,Bi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Oi===null?null:{id:ki,overflow:Ai},retryLane:536870912,hydrationErrors:null},n=vi(e),n.return=t,t.child=n,Ii=t,Li=null)):e=null,e===null)throw Hi(t);return t.lanes=536870912,null}return _c(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(uo(t),a)if(t.flags&256)t.flags&=-257,t=vc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(lc||na(e,t,n,!1),a=(n&e.childLanes)!==0,lc||a){if(r=Jl,r!==null&&(s=rt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,oi(e,s),z(r,e,s),cc;Ru(),t=vc(e,t,n)}else e=o.treeContext,Li=B(s.nextSibling),Ii=t,Ri=!0,zi=null,Bi=!1,e!==null&&Fi(t,e),t=_c(t,r),t.flags|=4096;return t}return e=pi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function bc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function xc(e,t,n,r,i){return ia(t),n=Ao(e,t,n,r,void 0,i),r=Po(),e!==null&&!lc?(Fo(e,t,i),Fc(e,t,i)):(Ri&&r&&Ni(t),t.flags|=1,uc(e,t,n,i),t.child)}function Sc(e,t,n,r,i,a){return ia(t),t.updateQueue=null,n=Mo(t,r,n,i),jo(e),r=Po(),e!==null&&!lc?(Fo(e,t,a),Fc(e,t,a)):(Ri&&r&&Ni(t),t.flags|=1,uc(e,t,n,a),t.child)}function Cc(e,t,n,r,i){if(ia(t),t.stateNode===null){var a=li,o=n.contextType;typeof o==`object`&&o&&(a=aa(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ys,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ga(t),o=n.contextType,a.context=typeof o==`object`&&o?aa(o):li,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Js(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&&Ys.enqueueReplaceState(a,a.state,null),$a(t,r,a,i),Qa(),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=Qs(n,s);a.props=c;var l=a.context,u=n.contextType;o=li,typeof u==`object`&&u&&(o=aa(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)&&Zs(t,a,r,o),Wa=!1;var f=t.memoizedState;a.state=f,$a(t,r,a,i),Qa(),l=t.memoizedState,s||f!==l||Wa?(typeof d==`function`&&(Js(t,n,d,r),l=t.memoizedState),(c=Wa||Xs(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,Ka(e,t),o=t.memoizedProps,u=Qs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=li,typeof l==`object`&&l&&(c=aa(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)&&Zs(t,a,r,c),Wa=!1,f=t.memoizedState,a.state=f,$a(t,r,a,i),Qa();var p=t.memoizedState;o!==d||f!==p||Wa||e!==null&&e.dependencies!==null&&ra(e.dependencies)?(typeof s==`function`&&(Js(t,n,s,r),p=t.memoizedState),(u=Wa||Xs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ra(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,bc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ha(t,e.child,null,i),t.child=Ha(t,null,n,i)):uc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Fc(e,t,i),e}function wc(e,t,n,r){return Ki(),t.flags|=256,uc(e,t,n,r),t.child}var Tc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ec(e){return{baseLanes:e,cachePool:Ta()}}function Dc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=su),e}function Oc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(ho.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Ri){if(a?lo(t):po(t),(e=Li)?(e=vf(e,Bi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Oi===null?null:{id:ki,overflow:Ai},retryLane:536870912,hydrationErrors:null},n=vi(e),n.return=t,t.child=n,Ii=t,Li=null)):e=null,e===null)throw Hi(t);return bf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(po(t),a=t.mode,c=Ac({mode:`hidden`,children:c},a),r=gi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=Ec(n),r.childLanes=Dc(e,s,n),t.memoizedState=Tc,hc(null,r)):(lo(t),kc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(lo(t),t.flags&=-257,t=jc(e,t,n)):t.memoizedState===null?(po(t),c=r.fallback,a=t.mode,r=Ac({mode:`visible`,children:r.children},a),c=gi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ha(t,e.child,null,n),r=t.child,r.memoizedState=Ec(n),r.childLanes=Dc(e,s,n),t.memoizedState=Tc,t=hc(null,r)):(po(t),t.child=e.child,t.flags|=128,t=null);else if(lo(t),bf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Ji({value:r,source:null,stack:null}),t=jc(e,t,n)}else if(lc||na(e,t,n,!1),s=(n&e.childLanes)!==0,lc||s){if(s=Jl,s!==null&&(r=rt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,oi(e,r),z(s,e,r),cc;yf(c)||Ru(),t=jc(e,t,n)}else yf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Li=B(c.nextSibling),Ii=t,Ri=!0,zi=null,Bi=!1,e!==null&&Fi(t,e),t=kc(t,r.children),t.flags|=4096);return t}return a?(po(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=pi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=gi(c,a,n,null),c.flags|=2):c=pi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,hc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=Ec(n):(a=c.cachePool,a===null?a=Ta():(l=da._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Dc(e,s,n),t.memoizedState=Tc,hc(e.child,r)):(lo(t),n=e.child,e=n.sibling,n=pi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function kc(e,t){return t=Ac({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Ac(e,t){return e=di(22,e,null,t),e.lanes=0,e}function jc(e,t,n){return Ha(t,e.child,null,n),e=kc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Mc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ea(e.return,t,n)}function Nc(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 Pc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=ho.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,se(ho,o),uc(e,t,r,n),r=Ri?Ti:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Mc(e,n,t);else if(e.tag===19)Mc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&go(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Nc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&go(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Nc(t,!0,n,null,a,r);break;case`together`:Nc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Fc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),iu|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(na(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=pi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=pi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ic(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&ra(e))):!0}function Lc(e,t,n){switch(t.tag){case 3:fe(t,t.stateNode.containerInfo),Qi(t,da,e.memoizedState.cache),Ki();break;case 27:case 5:me(t);break;case 4:fe(t,t.stateNode.containerInfo);break;case 10:Qi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,uo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(lo(t),e=Fc(e,t,n),e===null?null:e.sibling):Oc(e,t,n):(lo(t),t.flags|=128,null);lo(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||(na(e,t,n,!1),r=(n&t.childLanes)!==0),i){if(r)return Pc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),se(ho,ho.current),r)break;return null;case 22:return t.lanes=0,mc(e,t,n,t.pendingProps);case 24:Qi(t,da,e.memoizedState.cache)}return Fc(e,t,n)}function Rc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)lc=!0;else{if(!Ic(e,n)&&!(t.flags&128))return lc=!1,Lc(e,t,n);lc=!!(e.flags&131072)}else lc=!1,Ri&&t.flags&1048576&&Mi(t,Ti,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ma(t.elementType),t.type=e,typeof e==`function`)fi(e)?(r=Qs(e,r),t.tag=1,t=Cc(null,t,e,r,n)):(t.tag=0,t=xc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=dc(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=fc(null,t,e,r,n);break a}}throw t=N(e)||e,Error(i(306,t,``))}}return t;case 0:return xc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Qs(r,t.pendingProps),Cc(e,t,r,a,n);case 3:a:{if(fe(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ka(e,t),$a(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Qi(t,da,r),r!==o.cache&&ta(t,[da],n,!0),Qa(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=wc(e,t,r,n);break a}else if(r!==a){a=xi(Error(i(424)),t),Ji(a),t=wc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Li=B(e.firstChild),Ii=t,Ri=!0,zi=null,Bi=!0,n=Ua(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ki(),r===a){t=Fc(e,t,n);break a}uc(e,t,r,n)}t=t.child}return t;case 26:return bc(e,t),e===null?(n=Hf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ri||(n=t.type,e=t.pendingProps,r=ef(ue.current).createElement(n),r[lt]=t,r[ut]=e,Jd(r,n,e),St(r),t.stateNode=r):t.memoizedState=Hf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return me(t),e===null&&Ri&&(r=t.stateNode=Tf(t.type,t.pendingProps,ue.current),Ii=t,Bi=!0,a=Li,ff(t.type)?(Sf=a,Li=B(r.firstChild)):Li=a),uc(e,t,t.pendingProps.children,n),bc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ri&&((a=r=Li)&&(r=gf(r,t.type,t.pendingProps,Bi),r===null?a=!1:(t.stateNode=r,Ii=t,Li=B(r.firstChild),Bi=!1,a=!0)),a||Hi(t)),me(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,rf(a,o)?r=null:s!==null&&rf(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Ao(e,t,No,null,null,n),dp._currentValue=a),bc(e,t),uc(e,t,r,n),t.child;case 6:return e===null&&Ri&&((e=n=Li)&&(n=_f(n,t.pendingProps,Bi),n===null?e=!1:(t.stateNode=n,Ii=t,Li=null,e=!0)),e||Hi(t)),null;case 13:return Oc(e,t,n);case 4:return fe(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ha(t,null,r,n):uc(e,t,r,n),t.child;case 11:return dc(e,t,t.type,t.pendingProps,n);case 7:return uc(e,t,t.pendingProps,n),t.child;case 8:return uc(e,t,t.pendingProps.children,n),t.child;case 12:return uc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Qi(t,t.type,r.value),uc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,ia(t),a=aa(a),r=r(a),t.flags|=1,uc(e,t,r,n),t.child;case 14:return fc(e,t,t.type,t.pendingProps,n);case 15:return pc(e,t,t.type,t.pendingProps,n);case 19:return Pc(e,t,n);case 31:return yc(e,t,n);case 22:return mc(e,t,n,t.pendingProps);case 24:return ia(t),r=aa(da),e===null?(a=Ca(),a===null&&(a=Jl,o=fa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ga(t),Qi(t,da,a)):((e.lanes&n)!==0&&(Ka(e,t),$a(t,null,null,n),Qa()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Qi(t,da,r),r!==a.cache&&ta(t,[da],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Qi(t,da,r))),uc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function zc(e){e.flags|=4}function Bc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Fu())e.flags|=8192;else throw Na=ka,Da}else e.flags&=-16777217}function Vc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!rp(t))if(Fu())e.flags|=8192;else throw Na=ka,Da}function Hc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ze(),e.lanes|=t,cu|=t)}function Uc(e,t){if(!Ri)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Wc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Gc(e,t,n){var r=t.pendingProps;switch(Pi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Wc(t),null;case 1:return Wc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),$i(da),pe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Gi(t)?zc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,qi())),Wc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(zc(t),o===null?(Wc(t),Bc(t,a,null,r,n)):(Wc(t),Vc(t,o))):o?o===e.memoizedState?(Wc(t),t.flags&=-16777217):(zc(t),Wc(t),Vc(t,o)):(e=e.memoizedProps,e!==r&&zc(t),Wc(t),Bc(t,a,e,r,n)),null;case 27:if(he(t),n=ue.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&zc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Wc(t),null}e=ce.current,Gi(t)?Ui(t,e):(e=Tf(a,r,n),t.stateNode=e,zc(t))}return Wc(t),null;case 5:if(he(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&zc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Wc(t),null}if(o=ce.current,Gi(t))Ui(t,o);else{var s=ef(ue.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[lt]=t,o[ut]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Jd(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&&zc(t)}}return Wc(t),Bc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&zc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ue.current,Gi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ii,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[lt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Gd(e.nodeValue,n)),e||Hi(t,!0)}else e=ef(e).createTextNode(r),e[lt]=t,t.stateNode=e}return Wc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Gi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[lt]=t}else Ki(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Wc(t),e=!1}else n=qi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(mo(t),t):(mo(t),null);if(t.flags&128)throw Error(i(558))}return Wc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Gi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[lt]=t}else Ki(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Wc(t),a=!1}else a=qi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(mo(t),t):(mo(t),null)}return mo(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),Hc(t,t.updateQueue),Wc(t),null);case 4:return pe(),e===null&&Fd(t.stateNode.containerInfo),Wc(t),null;case 10:return $i(t.type),Wc(t),null;case 19:if(oe(ho),r=t.memoizedState,r===null)return Wc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Uc(r,!1);else{if(ru!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=go(e),o!==null){for(t.flags|=128,Uc(r,!1),e=o.updateQueue,t.updateQueue=e,Hc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)mi(n,e),n=n.sibling;return se(ho,ho.current&1|2),Ri&&ji(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Oe()>mu&&(t.flags|=128,a=!0,Uc(r,!1),t.lanes=4194304)}else{if(!a)if(e=go(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Hc(t,e),Uc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ri)return Wc(t),null}else 2*Oe()-r.renderingStartTime>mu&&n!==536870912&&(t.flags|=128,a=!0,Uc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Wc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Oe(),e.sibling=null,n=ho.current,se(ho,a?n&1|2:n&1),Ri&&ji(t,r.treeForkCount),e);case 22:case 23:return mo(t),oo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Wc(t),t.subtreeFlags&6&&(t.flags|=8192)):Wc(t),n=t.updateQueue,n!==null&&Hc(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&&oe(Sa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),$i(da),Wc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Kc(e,t){switch(Pi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return $i(da),pe(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return he(t),null;case 31:if(t.memoizedState!==null){if(mo(t),t.alternate===null)throw Error(i(340));Ki()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(mo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Ki()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return oe(ho),null;case 4:return pe(),null;case 10:return $i(t.type),null;case 22:case 23:return mo(t),oo(),e!==null&&oe(Sa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return $i(da),null;case 25:return null;default:return null}}function qc(e,t){switch(Pi(t),t.tag){case 3:$i(da),pe();break;case 26:case 27:case 5:he(t);break;case 4:pe();break;case 31:t.memoizedState!==null&&mo(t);break;case 13:mo(t);break;case 19:oe(ho);break;case 10:$i(t.type);break;case 22:case 23:mo(t),oo(),e!==null&&oe(Sa);break;case 24:$i(da)}}function Jc(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){nd(t,t.return,e)}}function Yc(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){nd(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){nd(t,t.return,e)}}function Xc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{to(t,n)}catch(t){nd(e,e.return,t)}}}function Zc(e,t,n){n.props=Qs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){nd(e,t,n)}}function Qc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){nd(e,t,n)}}function $c(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){nd(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){nd(e,t,n)}else n.current=null}function el(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){nd(e,e.return,t)}}function tl(e,t,n){try{var r=e.stateNode;Yd(r,e.type,n,t),r[ut]=t}catch(t){nd(e,e.return,t)}}function nl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ff(e.type)||e.tag===4}function rl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||nl(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&&ff(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 il(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=nn));else if(r!==4&&(r===27&&ff(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(il(e,t,n),e=e.sibling;e!==null;)il(e,t,n),e=e.sibling}function al(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&ff(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(al(e,t,n),e=e.sibling;e!==null;)al(e,t,n),e=e.sibling}function ol(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Jd(t,r,n),t[lt]=e,t[ut]=n}catch(t){nd(e,e.return,t)}}var sl=!1,cl=!1,ll=!1,ul=typeof WeakSet==`function`?WeakSet:Set,dl=null;function fl(e,t){if(e=e.containerInfo,Qd=bp,e=Ar(e),jr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for($d={focusedElem:e,selectionRange:n},bp=!1,dl=t;dl!==null;)if(t=dl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,dl=e;else for(;dl!==null;){switch(t=dl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Qs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){nd(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)hf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:hf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,dl=e;break}dl=t.return}}function pl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Ol(e,n),r&4&&Jc(5,n);break;case 1:if(Ol(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){nd(n,n.return,e)}else{var i=Qs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){nd(n,n.return,e)}}r&64&&Xc(n),r&512&&Qc(n,n.return);break;case 3:if(Ol(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{to(e,t)}catch(e){nd(n,n.return,e)}}break;case 27:t===null&&r&4&&ol(n);case 26:case 5:Ol(e,n),t===null&&r&4&&el(n),r&512&&Qc(n,n.return);break;case 12:Ol(e,n);break;case 31:Ol(e,n),r&4&&yl(e,n);break;case 13:Ol(e,n),r&4&&bl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=od.bind(null,n),xf(e,n))));break;case 22:if(r=n.memoizedState!==null||sl,!r){t=t!==null&&t.memoizedState!==null||cl,i=sl;var a=cl;sl=r,(cl=t)&&!a?Al(e,n,(n.subtreeFlags&8772)!=0):Ol(e,n),sl=i,cl=a}break;case 30:break;default:Ol(e,n)}}function ml(e){var t=e.alternate;t!==null&&(e.alternate=null,ml(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&_t(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var hl=null,gl=!1;function _l(e,t,n){for(n=n.child;n!==null;)vl(e,t,n),n=n.sibling}function vl(e,t,n){if(Re&&typeof Re.onCommitFiberUnmount==`function`)try{Re.onCommitFiberUnmount(Le,n)}catch{}switch(n.tag){case 26:cl||$c(n,t),_l(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:cl||$c(n,t);var r=hl,i=gl;ff(n.type)&&(hl=n.stateNode,gl=!1),_l(e,t,n),Ef(n.stateNode),hl=r,gl=i;break;case 5:cl||$c(n,t);case 6:if(r=hl,i=gl,hl=null,_l(e,t,n),hl=r,gl=i,hl!==null)if(gl)try{(hl.nodeType===9?hl.body:hl.nodeName===`HTML`?hl.ownerDocument.body:hl).removeChild(n.stateNode)}catch(e){nd(n,t,e)}else try{hl.removeChild(n.stateNode)}catch(e){nd(n,t,e)}break;case 18:hl!==null&&(gl?(e=hl,pf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Kp(e)):pf(hl,n.stateNode));break;case 4:r=hl,i=gl,hl=n.stateNode.containerInfo,gl=!0,_l(e,t,n),hl=r,gl=i;break;case 0:case 11:case 14:case 15:Yc(2,n,t),cl||Yc(4,n,t),_l(e,t,n);break;case 1:cl||($c(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Zc(n,t,r)),_l(e,t,n);break;case 21:_l(e,t,n);break;case 22:cl=(r=cl)||n.memoizedState!==null,_l(e,t,n),cl=r;break;default:_l(e,t,n)}}function yl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Kp(e)}catch(e){nd(t,t.return,e)}}}function bl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Kp(e)}catch(e){nd(t,t.return,e)}}function xl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ul),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ul),t;default:throw Error(i(435,e.tag))}}function Sl(e,t){var n=xl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=sd.bind(null,e,t);t.then(r,r)}})}function Cl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(ff(c.type)){hl=c.stateNode,gl=!1;break a}break;case 5:hl=c.stateNode,gl=!1;break a;case 3:case 4:hl=c.stateNode.containerInfo,gl=!0;break a}c=c.return}if(hl===null)throw Error(i(160));vl(o,s,a),hl=null,gl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Tl(t,e),t=t.sibling}var wl=null;function Tl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Cl(t,e),El(e),r&4&&(Yc(3,e,e.return),Jc(3,e),Yc(5,e,e.return));break;case 1:Cl(t,e),El(e),r&512&&(cl||n===null||$c(n,n.return)),r&64&&sl&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=wl;if(Cl(t,e),El(e),r&512&&(cl||n===null||$c(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[gt]||o[lt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Jd(o,r,n),o[lt]=e,St(o),r=o;break a;case`link`:var s=ep(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Jd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=ep(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Jd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[lt]=e,St(o),r=o}e.stateNode=r}else tp(a,e.type,e.stateNode);else e.stateNode=Yf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&tl(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?tp(a,e.type,e.stateNode):Yf(a,r,e.memoizedProps))}break;case 27:Cl(t,e),El(e),r&512&&(cl||n===null||$c(n,n.return)),n!==null&&r&4&&tl(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Cl(t,e),El(e),r&512&&(cl||n===null||$c(n,n.return)),e.flags&32){a=e.stateNode;try{Jt(a,``)}catch(t){nd(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,tl(e,a,n===null?a:n.memoizedProps)),r&1024&&(ll=!0);break;case 6:if(Cl(t,e),El(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){nd(e,e.return,t)}}break;case 3:if($f=null,a=wl,wl=kf(t.containerInfo),Cl(t,e),wl=a,El(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Kp(t.containerInfo)}catch(t){nd(e,e.return,t)}ll&&(ll=!1,Dl(e));break;case 4:r=wl,wl=kf(e.stateNode.containerInfo),Cl(t,e),El(e),wl=r;break;case 12:Cl(t,e),El(e);break;case 31:Cl(t,e),El(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Sl(e,r)));break;case 13:Cl(t,e),El(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(fu=Oe()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Sl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=sl,d=cl;if(sl=u||a,cl=d||l,Cl(t,e),cl=d,sl=u,El(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||sl||cl||kl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){nd(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){nd(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?mf(m,!0):mf(l.stateNode,!1)}catch(e){nd(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,Sl(e,n))));break;case 19:Cl(t,e),El(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Sl(e,r)));break;case 30:break;case 21:break;default:Cl(t,e),El(e)}}function El(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(nl(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;al(e,rl(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Jt(o,``),n.flags&=-33),al(e,rl(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;il(e,rl(e),s);break;default:throw Error(i(161))}}catch(t){nd(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Dl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Dl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ol(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)pl(e,t.alternate,t),t=t.sibling}function kl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Yc(4,t,t.return),kl(t);break;case 1:$c(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Zc(t,t.return,n),kl(t);break;case 27:Ef(t.stateNode);case 26:case 5:$c(t,t.return),kl(t);break;case 22:t.memoizedState===null&&kl(t);break;case 30:kl(t);break;default:kl(t)}e=e.sibling}}function Al(e,t,n){for(n=n&&(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Al(i,a,n),Jc(4,a);break;case 1:if(Al(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){nd(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)eo(c[i],s)}catch(e){nd(r,r.return,e)}}n&&o&64&&Xc(a),Qc(a,a.return);break;case 27:ol(a);case 26:case 5:Al(i,a,n),n&&r===null&&o&4&&el(a),Qc(a,a.return);break;case 12:Al(i,a,n);break;case 31:Al(i,a,n),n&&o&4&&yl(i,a);break;case 13:Al(i,a,n),n&&o&4&&bl(i,a);break;case 22:a.memoizedState===null&&Al(i,a,n),Qc(a,a.return);break;case 30:break;default:Al(i,a,n)}t=t.sibling}}function jl(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&&pa(n))}function Ml(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&pa(e))}function Nl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Pl(e,t,n,r),t=t.sibling}function Pl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Nl(e,t,n,r),i&2048&&Jc(9,t);break;case 1:Nl(e,t,n,r);break;case 3:Nl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&pa(e)));break;case 12:if(i&2048){Nl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){nd(t,t.return,e)}}else Nl(e,t,n,r);break;case 31:Nl(e,t,n,r);break;case 13:Nl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Nl(e,t,n,r):(a._visibility|=2,Fl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Nl(e,t,n,r):Il(e,t),i&2048&&jl(o,t);break;case 24:Nl(e,t,n,r),i&2048&&Ml(t.alternate,t);break;default:Nl(e,t,n,r)}}function Fl(e,t,n,r,i){for(i=i&&((t.subtreeFlags&10256)!=0||!1),t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Fl(a,o,s,c,i),Jc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Fl(a,o,s,c,i)):u._visibility&2?Fl(a,o,s,c,i):Il(a,o),i&&l&2048&&jl(o.alternate,o);break;case 24:Fl(a,o,s,c,i),i&&l&2048&&Ml(o.alternate,o);break;default:Fl(a,o,s,c,i)}t=t.sibling}}function Il(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:Il(n,r),i&2048&&jl(r.alternate,r);break;case 24:Il(n,r),i&2048&&Ml(r.alternate,r);break;default:Il(n,r)}t=t.sibling}}var Ll=8192;function Rl(e,t,n){if(e.subtreeFlags&Ll)for(e=e.child;e!==null;)zl(e,t,n),e=e.sibling}function zl(e,t,n){switch(e.tag){case 26:Rl(e,t,n),e.flags&Ll&&e.memoizedState!==null&&ip(n,wl,e.memoizedState,e.memoizedProps);break;case 5:Rl(e,t,n);break;case 3:case 4:var r=wl;wl=kf(e.stateNode.containerInfo),Rl(e,t,n),wl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Ll,Ll=16777216,Rl(e,t,n),Ll=r):Rl(e,t,n));break;default:Rl(e,t,n)}}function Bl(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 Vl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];dl=r,Wl(r,e)}Bl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Hl(e),e=e.sibling}function Hl(e){switch(e.tag){case 0:case 11:case 15:Vl(e),e.flags&2048&&Yc(9,e,e.return);break;case 3:Vl(e);break;case 12:Vl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ul(e)):Vl(e);break;default:Vl(e)}}function Ul(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];dl=r,Wl(r,e)}Bl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Yc(8,t,t.return),Ul(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ul(t));break;default:Ul(t)}e=e.sibling}}function Wl(e,t){for(;dl!==null;){var n=dl;switch(n.tag){case 0:case 11:case 15:Yc(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:pa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,dl=r;else a:for(n=e;dl!==null;){r=dl;var i=r.sibling,a=r.return;if(ml(r),r===n){dl=null;break a}if(i!==null){i.return=a,dl=i;break a}dl=a}}}var Gl={getCacheForType:function(e){var t=aa(da),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return aa(da).controller.signal}},Kl=typeof WeakMap==`function`?WeakMap:Map,ql=0,Jl=null,Yl=null,Xl=0,Zl=0,Ql=null,$l=!1,eu=!1,tu=!1,nu=0,ru=0,iu=0,au=0,ou=0,su=0,cu=0,lu=null,uu=null,du=!1,fu=0,pu=0,mu=1/0,hu=null,gu=null,_u=0,vu=null,yu=null,bu=0,xu=0,Su=null,Cu=null,wu=0,Tu=null;function Eu(){return ql&2&&Xl!==0?Xl&-Xl:P.T===null?ot():Cd()}function R(){if(su===0)if(!(Xl&536870912)||Ri){var e=Ge;Ge<<=1,!(Ge&3932160)&&(Ge=262144),su=e}else su=536870912;return e=so.current,e!==null&&(e.flags|=32),su}function z(e,t,n){(e===Jl&&(Zl===2||Zl===9)||e.cancelPendingCommit!==null)&&(Nu(e,0),Au(e,Xl,su,!1)),$e(e,n),(!(ql&2)||e!==Jl)&&(e===Jl&&(!(ql&2)&&(au|=n),ru===4&&Au(e,Xl,su,!1)),hd(e))}function Du(e,t,n){if(ql&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Ye(e,t),a=r?Vu(e,t):zu(e,t,!0),o=r;do{if(a===0){eu&&!r&&Au(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!ku(n)){a=zu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=lu;var l=c.current.memoizedState.isDehydrated;if(l&&(Nu(c,s).flags|=256),s=zu(c,s,!1),s!==2){if(tu&&!l){c.errorRecoveryDisabledLanes|=o,au|=o,a=4;break a}o=uu,uu=a,o!==null&&(uu===null?uu=o:uu.push.apply(uu,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Nu(e,0),Au(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Au(r,t,su,!$l);break a;case 2:uu=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=fu+300-Oe(),10<a)){if(Au(r,t,su,!$l),Je(r,0,!0)!==0)break a;bu=t,r.timeoutHandle=sf(Ou.bind(null,r,n,uu,hu,du,t,su,au,cu,$l,o,`Throttled`,-0,0),a);break a}Ou(r,n,uu,hu,du,t,su,au,cu,$l,o,null,-0,0)}}break}while(1);hd(e)}function Ou(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:nn},zl(t,a,d);var m=(a&62914560)===a?fu-Oe():(a&4194048)===a?pu-Oe():0;if(m=op(d,m),m!==null){bu=a,e.cancelPendingCommit=m(Ju.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Au(e,a,o,!l);return}}Ju(e,t,a,n,r,i,o,s,c)}function ku(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(!Tr(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 Au(e,t,n,r){t&=~ou,t&=~au,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Be(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&tt(e,n,t)}function ju(){return ql&6?!0:(gd(0,!1),!1)}function Mu(){if(Yl!==null){if(Zl===0)var e=Yl.return;else e=Yl,Zi=Xi=null,Io(e),Ia=null,La=0,e=Yl;for(;e!==null;)qc(e.alternate,e),e=e.return;Yl=null}}function Nu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,cf(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),bu=0,Mu(),Jl=e,Yl=n=pi(e.current,null),Xl=t,Zl=0,Ql=null,$l=!1,eu=Ye(e,t),tu=!1,cu=su=ou=au=iu=ru=0,uu=lu=null,du=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Be(r),a=1<<i;t|=e[i],r&=~a}return nu=t,ri(),n}function Pu(e,t){vo=null,P.H=Ws,t===Ea||t===Oa?(t=Pa(),Zl=3):t===Da?(t=Pa(),Zl=4):Zl=t===cc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Ql=t,Yl===null&&(ru=1,nc(e,xi(t,e.current)))}function Fu(){var e=so.current;return e===null?!0:(Xl&4194048)===Xl?co===null:(Xl&62914560)===Xl||Xl&536870912?e===co:!1}function Iu(){var e=P.H;return P.H=Ws,e===null?Ws:e}function Lu(){var e=P.A;return P.A=Gl,e}function Ru(){ru=4,$l||(Xl&4194048)!==Xl&&so.current!==null||(eu=!0),!(iu&134217727)&&!(au&134217727)||Jl===null||Au(Jl,Xl,su,!1)}function zu(e,t,n){var r=ql;ql|=2;var i=Iu(),a=Lu();(Jl!==e||Xl!==t)&&(hu=null,Nu(e,t)),t=!1;var o=ru;a:do try{if(Zl!==0&&Yl!==null){var s=Yl,c=Ql;switch(Zl){case 8:Mu(),o=6;break a;case 3:case 2:case 9:case 6:so.current===null&&(t=!0);var l=Zl;if(Zl=0,Ql=null,Gu(e,s,c,l),n&&eu){o=0;break a}break;default:l=Zl,Zl=0,Ql=null,Gu(e,s,c,l)}}Bu(),o=ru;break}catch(t){Pu(e,t)}while(1);return t&&e.shellSuspendCounter++,Zi=Xi=null,ql=r,P.H=i,P.A=a,Yl===null&&(Jl=null,Xl=0,ri()),o}function Bu(){for(;Yl!==null;)Uu(Yl)}function Vu(e,t){var n=ql;ql|=2;var r=Iu(),a=Lu();Jl!==e||Xl!==t?(hu=null,mu=Oe()+500,Nu(e,t)):eu=Ye(e,t);a:do try{if(Zl!==0&&Yl!==null){t=Yl;var o=Ql;b:switch(Zl){case 1:Zl=0,Ql=null,Gu(e,t,o,1);break;case 2:case 9:if(Aa(o)){Zl=0,Ql=null,Wu(t);break}t=function(){Zl!==2&&Zl!==9||Jl!==e||(Zl=7),hd(e)},o.then(t,t);break a;case 3:Zl=7;break a;case 4:Zl=5;break a;case 7:Aa(o)?(Zl=0,Ql=null,Wu(t)):(Zl=0,Ql=null,Gu(e,t,o,7));break;case 5:var s=null;switch(Yl.tag){case 26:s=Yl.memoizedState;case 5:case 27:var c=Yl;if(s?rp(s):c.stateNode.complete){Zl=0,Ql=null;var l=c.sibling;if(l!==null)Yl=l;else{var u=c.return;u===null?Yl=null:(Yl=u,Ku(u))}break b}}Zl=0,Ql=null,Gu(e,t,o,5);break;case 6:Zl=0,Ql=null,Gu(e,t,o,6);break;case 8:Mu(),ru=6;break a;default:throw Error(i(462))}}Hu();break}catch(t){Pu(e,t)}while(1);return Zi=Xi=null,P.H=r,P.A=a,ql=n,Yl===null?(Jl=null,Xl=0,ri(),ru):0}function Hu(){for(;Yl!==null&&!Ee();)Uu(Yl)}function Uu(e){var t=Rc(e.alternate,e,nu);e.memoizedProps=e.pendingProps,t===null?Ku(e):Yl=t}function Wu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Sc(n,t,t.pendingProps,t.type,void 0,Xl);break;case 11:t=Sc(n,t,t.pendingProps,t.type.render,t.ref,Xl);break;case 5:Io(t);default:qc(n,t),t=Yl=mi(t,nu),t=Rc(n,t,nu)}e.memoizedProps=e.pendingProps,t===null?Ku(e):Yl=t}function Gu(e,t,n,r){Zi=Xi=null,Io(t),Ia=null,La=0;var i=t.return;try{if(sc(e,i,t,n,Xl)){ru=1,nc(e,xi(n,e.current)),Yl=null;return}}catch(t){if(i!==null)throw Yl=i,t;ru=1,nc(e,xi(n,e.current)),Yl=null;return}t.flags&32768?(Ri||r===1?e=!0:eu||Xl&536870912?e=!1:($l=e=!0,(r===2||r===9||r===3||r===6)&&(r=so.current,r!==null&&r.tag===13&&(r.flags|=16384))),qu(t,e)):Ku(t)}function Ku(e){var t=e;do{if(t.flags&32768){qu(t,$l);return}e=t.return;var n=Gc(t.alternate,t,nu);if(n!==null){Yl=n;return}if(t=t.sibling,t!==null){Yl=t;return}Yl=t=e}while(t!==null);ru===0&&(ru=5)}function qu(e,t){do{var n=Kc(e.alternate,e);if(n!==null){n.flags&=32767,Yl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Yl=e;return}Yl=e=n}while(e!==null);ru=6,Yl=null}function Ju(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do $u();while(_u!==0);if(ql&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=ni,et(e,n,o,s,c,l),e===Jl&&(Yl=Jl=null,Xl=0),yu=t,vu=e,bu=n,xu=o,Su=a,Cu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,cd(Me,function(){return ed(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=P.T,P.T=null,a=F.p,F.p=2,s=ql,ql|=4;try{fl(e,t,n)}finally{ql=s,F.p=a,P.T=r}}_u=1,Yu(),Xu(),Zu()}}function Yu(){if(_u===1){_u=0;var e=vu,t=yu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=ql;ql|=4;try{Tl(t,e);var a=$d,o=Ar(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&kr(s.ownerDocument.documentElement,s)){if(c!==null&&jr(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 _=Or(s,h),v=Or(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}}bp=!!Qd,$d=Qd=null}finally{ql=i,F.p=r,P.T=n}}e.current=t,_u=2}}function Xu(){if(_u===2){_u=0;var e=vu,t=yu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=ql;ql|=4;try{pl(e,t.alternate,t)}finally{ql=i,F.p=r,P.T=n}}_u=3}}function Zu(){if(_u===4||_u===3){_u=0,De();var e=vu,t=yu,n=bu,r=Cu;t.subtreeFlags&10256||t.flags&10256?_u=5:(_u=0,yu=vu=null,Qu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(gu=null),at(n),t=t.stateNode,Re&&typeof Re.onCommitFiberRoot==`function`)try{Re.onCommitFiberRoot(Le,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=P.T,i=F.p,F.p=2,P.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{P.T=t,F.p=i}}bu&3&&$u(),hd(e),i=e.pendingLanes,n&261930&&i&42?e===Tu?wu++:(wu=0,Tu=e):wu=0,gd(0,!1)}}function Qu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,pa(t)))}function $u(){return Yu(),Xu(),Zu(),ed()}function ed(){if(_u!==5)return!1;var e=vu,t=xu;xu=0;var n=at(bu),r=P.T,a=F.p;try{F.p=32>n?32:n,P.T=null,n=Su,Su=null;var o=vu,s=bu;if(_u=0,yu=vu=null,bu=0,ql&6)throw Error(i(331));var c=ql;if(ql|=4,Hl(o.current),Pl(o,o.current,s,n),ql=c,gd(0,!1),Re&&typeof Re.onPostCommitFiberRoot==`function`)try{Re.onPostCommitFiberRoot(Le,o)}catch{}return!0}finally{F.p=a,P.T=r,Qu(e,t)}}function td(e,t,n){t=xi(n,t),t=ic(e.stateNode,t,2),e=Ja(e,t,2),e!==null&&($e(e,2),hd(e))}function nd(e,t,n){if(e.tag===3)td(e,e,n);else for(;t!==null;){if(t.tag===3){td(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(gu===null||!gu.has(r))){e=xi(n,e),n=ac(2),r=Ja(t,n,2),r!==null&&(oc(n,r,t,e),$e(r,2),hd(r));break}}t=t.return}}function rd(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Kl;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)||(tu=!0,i.add(n),e=id.bind(null,e,t,n),t.then(e,e))}function id(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Jl===e&&(Xl&n)===n&&(ru===4||ru===3&&(Xl&62914560)===Xl&&300>Oe()-fu?!(ql&2)&&Nu(e,0):ou|=n,cu===Xl&&(cu=0)),hd(e)}function ad(e,t){t===0&&(t=Ze()),e=oi(e,t),e!==null&&($e(e,t),hd(e))}function od(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ad(e,n)}function sd(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),ad(e,n)}function cd(e,t){return we(e,t)}var ld=null,ud=null,dd=!1,fd=!1,pd=!1,md=0;function hd(e){e!==ud&&e.next===null&&(ud===null?ld=ud=e:ud=ud.next=e),fd=!0,dd||(dd=!0,Sd())}function gd(e,t){if(!pd&&fd){pd=!0;do for(var n=!1,r=ld;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Be(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,xd(r,a))}else a=Xl,a=Je(r,r===Jl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ye(r,a)||(n=!0,xd(r,a));r=r.next}while(n);pd=!1}}function _d(){vd()}function vd(){fd=dd=!1;var e=0;md!==0&&of()&&(e=md);for(var t=Oe(),n=null,r=ld;r!==null;){var i=r.next,a=yd(r,t);a===0?(r.next=null,n===null?ld=i:n.next=i,i===null&&(ud=n)):(n=r,(e!==0||a&3)&&(fd=!0)),r=i}_u!==0&&_u!==5||gd(e,!1),md!==0&&(md=0)}function yd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Be(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Xe(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Jl,n=Xl,n=Je(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Zl===2||Zl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Te(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ye(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Te(r),at(n)){case 2:case 8:n=je;break;case 32:n=Me;break;case 268435456:n=Pe;break;default:n=Me}return r=bd.bind(null,e),n=we(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Te(r),e.callbackPriority=2,e.callbackNode=null,2}function bd(e,t){if(_u!==0&&_u!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if($u()&&e.callbackNode!==n)return null;var r=Xl;return r=Je(e,e===Jl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Du(e,r,t),yd(e,Oe()),e.callbackNode!=null&&e.callbackNode===n?bd.bind(null,e):null)}function xd(e,t){if($u())return null;Du(e,t,!0)}function Sd(){uf(function(){ql&6?we(Ae,_d):vd()})}function Cd(){if(md===0){var e=ga;e===0&&(e=We,We<<=1,!(We&261888)&&(We=256)),md=e}return md}function wd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:tn(``+e)}function Td(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Ed(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=wd((i[ut]||null).action),o=r.submitter;o&&(t=(t=o[ut]||null)?wd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new wn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(md!==0){var e=o?Td(i,o):new FormData(i);As(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?Td(i,o):new FormData(i),As(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Dd=0;Dd<Zr.length;Dd++){var Od=Zr[Dd];Qr(Od.toLowerCase(),`on`+(Od[0].toUpperCase()+Od.slice(1)))}Qr(Ur,`onAnimationEnd`),Qr(Wr,`onAnimationIteration`),Qr(Gr,`onAnimationStart`),Qr(`dblclick`,`onDoubleClick`),Qr(`focusin`,`onFocus`),Qr(`focusout`,`onBlur`),Qr(Kr,`onTransitionRun`),Qr(qr,`onTransitionStart`),Qr(Jr,`onTransitionCancel`),Qr(Yr,`onTransitionEnd`),Et(`onMouseEnter`,[`mouseout`,`mouseover`]),Et(`onMouseLeave`,[`mouseout`,`mouseover`]),Et(`onPointerEnter`,[`pointerout`,`pointerover`]),Et(`onPointerLeave`,[`pointerout`,`pointerover`]),Tt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Tt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Tt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Tt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Tt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Tt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var kd=`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(` `),Ad=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(kd));function jd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){$r(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){$r(e)}i.currentTarget=null,a=c}}}}function Md(e,t){var n=t[ft];n===void 0&&(n=t[ft]=new Set);var r=e+`__bubble`;n.has(r)||(Id(t,e,2,!1),n.add(r))}function Nd(e,t,n){var r=0;t&&(r|=4),Id(n,e,r,t)}var Pd=`_reactListening`+Math.random().toString(36).slice(2);function Fd(e){if(!e[Pd]){e[Pd]=!0,Ct.forEach(function(t){t!==`selectionchange`&&(Ad.has(t)||Nd(t,!1,e),Nd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Pd]||(t[Pd]=!0,Nd(`selectionchange`,!1,t))}}function Id(e,t,n,r){switch(Dp(t)){case 2:var i=xp;break;case 8:i=Sp;break;default:i=Cp}n=i.bind(null,t,n,e),i=void 0,!pn||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 Ld(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=vt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}un(function(){var r=a,i=an(n),s=[];a:{var c=Xr.get(e);if(c!==void 0){var l=wn,u=e;switch(e){case`keypress`:if(yn(n)===0)break a;case`keydown`:case`keyup`:l=Hn;break;case`focusin`:u=`focus`,l=Nn;break;case`focusout`:u=`blur`,l=Nn;break;case`beforeblur`:case`afterblur`:l=Nn;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=jn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Mn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Wn;break;case Ur:case Wr:case Gr:l=Pn;break;case Yr:l=Gn;break;case`scroll`:case`scrollend`:l=En;break;case`wheel`:l=Kn;break;case`copy`:case`cut`:case`paste`:l=Fn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Un;break;case`toggle`:case`beforetoggle`:l=qn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=dn(m,p),g!=null&&d.push(Rd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==rn&&(u=n.relatedTarget||n.fromElement)&&(vt(u)||u[dt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?vt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=jn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Un,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:bt(l),h=u==null?c:bt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,vt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Bd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Vd(s,c,l,d,!1),u!==null&&f!==null&&Vd(s,f,u,d,!0)}}a:{if(c=r?bt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=pr;else if(sr(c))if(mr)v=Cr;else{v=xr;var y=br}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Qt(r.elementType)&&(v=pr):v=Sr;if(v&&(v=v(e,r))){cr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Wt(c,`number`,c.value)}switch(y=r?bt(r):window,e){case`focusin`:(sr(y)||y.contentEditable===`true`)&&(Nr=y,Pr=r,Fr=null);break;case`focusout`:Fr=Pr=Nr=null;break;case`mousedown`:Ir=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Ir=!1,Lr(s,n,i);break;case`selectionchange`:if(Mr)break;case`keydown`:case`keyup`:Lr(s,n,i)}var b;if(Yn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else rr?tr(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Qn&&n.locale!==`ko`&&(rr||x!==`onCompositionStart`?x===`onCompositionEnd`&&rr&&(b=vn()):(hn=i,gn=`value`in hn?hn.value:hn.textContent,rr=!0)),y=zd(r,x),0<y.length&&(x=new In(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=nr(n),b!==null&&(x.data=b)))),(b=Zn?ir(e,n):ar(e,n))&&(x=zd(r,`onBeforeInput`),0<x.length&&(y=new In(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),Ed(s,e,r,n,i)}jd(s,t)})}function Rd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function zd(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=dn(e,n),i!=null&&r.unshift(Rd(e,i,a)),i=dn(e,t),i!=null&&r.push(Rd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Bd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Vd(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=dn(n,a),l!=null&&o.unshift(Rd(n,l,c))):i||(l=dn(n,a),l!=null&&o.push(Rd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Hd=/\r\n?/g,Ud=/\u0000|\uFFFD/g;function Wd(e){return(typeof e==`string`?e:``+e).replace(Hd,`
|
||
`).replace(Ud,``)}function Gd(e,t){return t=Wd(t),Wd(e)===t}function Kd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Jt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Jt(e,``+r);break;case`className`:Mt(e,`class`,r);break;case`tabIndex`:Mt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Mt(e,n,r);break;case`style`:Zt(e,r,o);break;case`data`:if(t!==`object`){Mt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=tn(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Kd(e,t,`name`,a.name,a,null),Kd(e,t,`formEncType`,a.formEncType,a,null),Kd(e,t,`formMethod`,a.formMethod,a,null),Kd(e,t,`formTarget`,a.formTarget,a,null)):(Kd(e,t,`encType`,a.encType,a,null),Kd(e,t,`method`,a.method,a,null),Kd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=tn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=nn);break;case`onScroll`:r!=null&&Md(`scroll`,e);break;case`onScrollEnd`:r!=null&&Md(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=tn(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Md(`beforetoggle`,e),Md(`toggle`,e),jt(e,`popover`,r);break;case`xlinkActuate`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Nt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Nt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Nt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:jt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=$t.get(n)||n,jt(e,n,r))}}function qd(e,t,n,r,a,o){switch(n){case`style`:Zt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Jt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Jt(e,``+r);break;case`onScroll`:r!=null&&Md(`scroll`,e);break;case`onScrollEnd`:r!=null&&Md(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=nn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!wt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[ut]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):jt(e,n,r)}}}function Jd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Md(`error`,e),Md(`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:Kd(e,t,o,s,n,null)}}a&&Kd(e,t,`srcSet`,n.srcSet,n,null),r&&Kd(e,t,`src`,n.src,n,null);return;case`input`:Md(`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:Kd(e,t,r,d,n,null)}}Ut(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Md(`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:Kd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Gt(e,!!r,n,!0):Gt(e,!!r,t,!1);return;case`textarea`:for(s in Md(`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:Kd(e,t,s,c,n,null)}qt(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:Kd(e,t,l,r,n,null)}return;case`dialog`:Md(`beforetoggle`,e),Md(`toggle`,e),Md(`cancel`,e),Md(`close`,e);break;case`iframe`:case`object`:Md(`load`,e);break;case`video`:case`audio`:for(r=0;r<kd.length;r++)Md(kd[r],e);break;case`image`:Md(`error`,e),Md(`load`,e);break;case`details`:Md(`toggle`,e);break;case`embed`:case`source`:case`link`:Md(`error`,e),Md(`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:Kd(e,t,u,r,n,null)}return;default:if(Qt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&qd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Kd(e,t,c,r,n,null))}function Yd(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)||Kd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Kd(e,t,p,m,r,f)}}Ht(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)||Kd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Kd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Gt(e,!!n,n?[]:``,!1):Gt(e,!!n,t,!0)):Gt(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:Kd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Kd(e,t,s,a,r,o)}Kt(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:Kd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Kd(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)&&Kd(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:Kd(e,t,u,p,r,m)}return;default:if(Qt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&qd(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||qd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Kd(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||Kd(e,t,f,p,r,m)}function Xd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Zd(){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&&Xd(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&&Xd(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 Qd=null,$d=null;function ef(e){return e.nodeType===9?e:e.ownerDocument}function tf(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 nf(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 rf(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 af=null;function of(){var e=window.event;return e&&e.type===`popstate`?e===af?!1:(af=e,!0):(af=null,!1)}var sf=typeof setTimeout==`function`?setTimeout:void 0,cf=typeof clearTimeout==`function`?clearTimeout:void 0,lf=typeof Promise==`function`?Promise:void 0,uf=typeof queueMicrotask==`function`?queueMicrotask:lf===void 0?sf:function(e){return lf.resolve(null).then(e).catch(df)};function df(e){setTimeout(function(){throw e})}function ff(e){return e===`head`}function pf(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),Kp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Ef(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Ef(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[gt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Ef(e.ownerDocument.body);n=i}while(n);Kp(t)}function mf(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 hf(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`:hf(n),_t(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function gf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[gt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=B(e.nextSibling),e===null)break}return null}function _f(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=B(e.nextSibling),e===null))return null;return e}function vf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=B(e.nextSibling),e===null))return null;return e}function yf(e){return e.data===`$?`||e.data===`$~`}function bf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function xf(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 B(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 Sf=null;function Cf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return B(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function wf(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 Tf(e,t,n){switch(t=ef(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 Ef(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);_t(e)}var Df=new Map,Of=new Set;function kf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Af=F.d;F.d={f:jf,r:Mf,D:Ff,C:If,L:Lf,m:Rf,X:Bf,S:zf,M:Vf};function jf(){var e=Af.f(),t=ju();return e||t}function Mf(e){var t=yt(e);t!==null&&t.tag===5&&t.type===`form`?Ms(t):Af.r(e)}var Nf=typeof document>`u`?null:document;function Pf(e,t,n){var r=Nf;if(r&&typeof t==`string`&&t){var i=Vt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Of.has(i)||(Of.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Jd(t,`link`,e),St(t),r.head.appendChild(t)))}}function Ff(e){Af.D(e),Pf(`dns-prefetch`,e,null)}function If(e,t){Af.C(e,t),Pf(`preconnect`,e,t)}function Lf(e,t,n){Af.L(e,t,n);var r=Nf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Vt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Vt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Vt(n.imageSizes)+`"]`)):i+=`[href="`+Vt(e)+`"]`;var a=i;switch(t){case`style`:a=Uf(e);break;case`script`:a=qf(e)}Df.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Df.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Wf(a))||t===`script`&&r.querySelector(Jf(a))||(t=r.createElement(`link`),Jd(t,`link`,e),St(t),r.head.appendChild(t)))}}function Rf(e,t){Af.m(e,t);var n=Nf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Vt(r)+`"][href="`+Vt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=qf(e)}if(!Df.has(a)&&(e=p({rel:`modulepreload`,href:e},t),Df.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Jf(a)))return}r=n.createElement(`link`),Jd(r,`link`,e),St(r),n.head.appendChild(r)}}}function zf(e,t,n){Af.S(e,t,n);var r=Nf;if(r&&e){var i=xt(r).hoistableStyles,a=Uf(e);t=t||`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Wf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Df.get(a))&&Zf(e,n);var c=o=r.createElement(`link`);St(c),Jd(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,Xf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Bf(e,t){Af.X(e,t);var n=Nf;if(n&&e){var r=xt(n).hoistableScripts,i=qf(e),a=r.get(i);a||(a=n.querySelector(Jf(i)),a||(e=p({src:e,async:!0},t),(t=Df.get(i))&&Qf(e,t),a=n.createElement(`script`),St(a),Jd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Vf(e,t){Af.M(e,t);var n=Nf;if(n&&e){var r=xt(n).hoistableScripts,i=qf(e),a=r.get(i);a||(a=n.querySelector(Jf(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=Df.get(i))&&Qf(e,t),a=n.createElement(`script`),St(a),Jd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Hf(e,t,n,r){var a=(a=ue.current)?kf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Uf(n.href),n=xt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Uf(n.href);var o=xt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Wf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Df.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Df.set(e,n),o||Kf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=qf(n),n=xt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Uf(e){return`href="`+Vt(e)+`"`}function Wf(e){return`link[rel="stylesheet"][`+e+`]`}function Gf(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function Kf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Jd(t,`link`,n),St(t),e.head.appendChild(t))}function qf(e){return`[src="`+Vt(e)+`"]`}function Jf(e){return`script[async]`+e}function Yf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Vt(n.href)+`"]`);if(r)return t.instance=r,St(r),r;var a=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),St(r),Jd(r,`style`,a),Xf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Uf(n.href);var o=e.querySelector(Wf(a));if(o)return t.state.loading|=4,t.instance=o,St(o),o;r=Gf(n),(a=Df.get(a))&&Zf(r,a),o=(e.ownerDocument||e).createElement(`link`),St(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Jd(o,`link`,r),t.state.loading|=4,Xf(o,n.precedence,e),t.instance=o;case`script`:return o=qf(n.src),(a=e.querySelector(Jf(o)))?(t.instance=a,St(a),a):(r=n,(a=Df.get(o))&&(r=p({},n),Qf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),St(a),Jd(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,Xf(r,n.precedence,e));return t.instance}function Xf(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 Zf(e,t){e.crossOrigin??(e.crossOrigin=t.crossOrigin),e.referrerPolicy??(e.referrerPolicy=t.referrerPolicy),e.title??(e.title=t.title)}function Qf(e,t){e.crossOrigin??(e.crossOrigin=t.crossOrigin),e.referrerPolicy??(e.referrerPolicy=t.referrerPolicy),e.integrity??(e.integrity=t.integrity)}var $f=null;function ep(e,t,n){if($f===null){var r=new Map,i=$f=new Map;i.set(n,r)}else i=$f,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[gt]||a[lt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function tp(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function np(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 rp(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function ip(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=Uf(r.href),a=t.querySelector(Wf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=sp.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,St(a);return}a=t.ownerDocument||t,r=Gf(r),(i=Df.get(i))&&Zf(r,i),a=a.createElement(`link`),St(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Jd(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=sp.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var ap=0;function op(e,t){return e.stylesheets&&e.count===0&&lp(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&lp(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&ap===0&&(ap=62500*Zd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&lp(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>ap?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function sp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)lp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var cp=null;function lp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,cp=new Map,t.forEach(up,e),cp=null,sp.call(e))}function up(e,t){if(!(t.state.loading&4)){var n=cp.get(e);if(n)var r=n.get(null);else{n=new Map,cp.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=sp.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 dp={$$typeof:C,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function fp(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Qe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qe(0),this.hiddenUpdates=Qe(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function pp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new fp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=di(3,null,null,t),e.current=a,a.stateNode=e,t=fa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ga(a),e}function mp(e){return e?(e=li,e):li}function hp(e,t,n,r,i,a){i=mp(i),r.context===null?r.context=i:r.pendingContext=i,r=qa(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ja(e,r,t),n!==null&&(z(n,e,t),Ya(n,e,t))}function gp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function _p(e,t){gp(e,t),(e=e.alternate)&&gp(e,t)}function vp(e){if(e.tag===13||e.tag===31){var t=oi(e,67108864);t!==null&&z(t,e,67108864),_p(e,67108864)}}function yp(e){if(e.tag===13||e.tag===31){var t=Eu();t=it(t);var n=oi(e,t);n!==null&&z(n,e,t),_p(e,t)}}var bp=!0;function xp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=2,Cp(e,t,n,r)}finally{F.p=a,P.T=i}}function Sp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=8,Cp(e,t,n,r)}finally{F.p=a,P.T=i}}function Cp(e,t,n,r){if(bp){var i=wp(r);if(i===null)Ld(e,t,r,Tp,n),Ip(e,r);else if(Rp(i,e,t,n,r))r.stopPropagation();else if(Ip(e,r),t&4&&-1<Fp.indexOf(e)){for(;i!==null;){var a=yt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=qe(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Be(o);s.entanglements[1]|=c,o&=~c}hd(a),!(ql&6)&&(mu=Oe()+500,gd(0,!1))}}break;case 31:case 13:s=oi(a,2),s!==null&&z(s,a,2),ju(),_p(a,2)}if(a=wp(r),a===null&&Ld(e,t,r,Tp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Ld(e,t,r,null,n)}}function wp(e){return e=an(e),Ep(e)}var Tp=null;function Ep(e){if(Tp=null,e=vt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Tp=e,null}function Dp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(ke()){case Ae:return 2;case je:return 8;case Me:case Ne:return 32;case Pe:return 268435456;default:return 32}default:return 32}}var Op=!1,kp=null,Ap=null,jp=null,Mp=new Map,Np=new Map,Pp=[],Fp=`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 Ip(e,t){switch(e){case`focusin`:case`focusout`:kp=null;break;case`dragenter`:case`dragleave`:Ap=null;break;case`mouseover`:case`mouseout`:jp=null;break;case`pointerover`:case`pointerout`:Mp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Np.delete(t.pointerId)}}function Lp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=yt(t),t!==null&&vp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Rp(e,t,n,r,i){switch(t){case`focusin`:return kp=Lp(kp,e,t,n,r,i),!0;case`dragenter`:return Ap=Lp(Ap,e,t,n,r,i),!0;case`mouseover`:return jp=Lp(jp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Mp.set(a,Lp(Mp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Np.set(a,Lp(Np.get(a)||null,e,t,n,r,i)),!0}return!1}function zp(e){var t=vt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,st(e.priority,function(){yp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,st(e.priority,function(){yp(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 Bp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=wp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);rn=r,n.target.dispatchEvent(r),rn=null}else return t=yt(n),t!==null&&vp(t),e.blockedOn=n,!1;t.shift()}return!0}function Vp(e,t,n){Bp(e)&&n.delete(t)}function Hp(){Op=!1,kp!==null&&Bp(kp)&&(kp=null),Ap!==null&&Bp(Ap)&&(Ap=null),jp!==null&&Bp(jp)&&(jp=null),Mp.forEach(Vp),Np.forEach(Vp)}function Up(e,n){e.blockedOn===n&&(e.blockedOn=null,Op||(Op=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Hp)))}var Wp=null;function Gp(e){Wp!==e&&(Wp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Wp===e&&(Wp=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(Ep(r||n)===null)continue;break}var a=yt(n);a!==null&&(e.splice(t,3),t-=3,As(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Kp(e){function t(t){return Up(t,e)}kp!==null&&Up(kp,e),Ap!==null&&Up(Ap,e),jp!==null&&Up(jp,e),Mp.forEach(t),Np.forEach(t);for(var n=0;n<Pp.length;n++){var r=Pp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Pp.length&&(n=Pp[0],n.blockedOn===null);)zp(n),n.blockedOn===null&&Pp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ut]||null;if(typeof a==`function`)o||Gp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ut]||null)s=o.formAction;else if(Ep(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Gp(n)}}}function qp(){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 Jp(e){this._internalRoot=e}Yp.prototype.render=Jp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;hp(n,Eu(),e,t,null,null)},Yp.prototype.unmount=Jp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;hp(e.current,2,null,e,null,null),ju(),t[dt]=null}};function Yp(e){this._internalRoot=e}Yp.prototype.unstable_scheduleHydration=function(e){if(e){var t=ot();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Pp.length&&t!==0&&t<Pp[n].priority;n++);Pp.splice(n,0,e),n===0&&zp(e)}};var Xp=n.version;if(Xp!==`19.2.1`)throw Error(i(527,Xp,`19.2.1`));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Zp={bundleType:0,version:`19.2.1`,rendererPackageName:`react-dom`,currentDispatcherRef:P,reconcilerVersion:`19.2.1`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Qp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qp.isDisabled&&Qp.supportsFiber)try{Le=Qp.inject(Zp),Re=Qp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=$s,s=ec,c=tc;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=pp(e,1,!1,null,null,n,r,null,o,s,c,qp),e[dt]=t.current,Fd(e),new Jp(t)}})),v=s(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=_()})),y=u(f(),1),b=v(),x=`data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAKlAzkDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD7TwaULilor+Sas3U0R9NGHKFB6GjNJniroYdvUUpDDSUpNJXt06XKjDmCiiiifYQq9adTV606sGWFFITimlqhRuNOw7NBPFR76TfW8aLJcxWNRGlLU0mtVTsc7dxvrQBmkp/Sly2GmFPHFIBijOKnlLQ4GlyKj3UA1PIUOoUUDmnAYo2JHL0pabnFGTUcppcdRTcmjJqeULjqKbk0ZNLlC46im5NGTS5QuJRRRRYLjxzRSKaWosMcvelpo4p1TYaClU4FJRUWKHUUm6lyKLAFFAOaKiw0woooqbDCiiiosO4UUUVm4juFFFFZcowooopNFhRRRWTQBRRRWdi1oFFFFZtFIKKKK55ItBQehoormaKRGaSnEcU2uSSNkNPWkp+OKZXJKJaYUUUVyyRomFFFFccolhRRRWLiMKKKK53EoKKKKycSwooornaKCiiis+UsKKKKzaHcKKKKyaGFFFFZ2GFFFFUAUUUUAFFFFSUFFFFIAooooAKKKKACiiigAooooAnzSFqaWphav6Po4a7Pip1R5am7qYWpK9qFFQRzc9x+TRk0g5FFDRKlqLk0ZNJRXLKFzoix9GcUzIppfFSqTYnKxIW61Ez9aYZOtRNJXXToGMqhIXpN9QlqFNdippIw57k+6gc0xTUi9DWMolxYAYpaTNITWHKUmPzikzUe6lHNTyWLTHdaUUAU8L6VDKuC06m4xRk1lyiuOooop8pVwooopcoXCiiilyhcKKKKXKFwooorPlLuL0pwOaZSg4qeUaY6lBxTQc0tRyjuOHNLTKAcVPKVcfRSZFGRU8ori0ZNIDmlqeUdxQeOaXIptFTyjTHUU2jOKnlKuOooopcorhRRRWTiNMKKKKycTVMKKKKxcSgoooqeULhRRRUOJSYUUUVzyiWmFFFFc7gVcbSEUtFc8oGiYyjFOxSba5JUy0xm2jBp1Fc0qZomNxRg06iuSVM0TGUUUVzygWmFFFFczgWmFFFFYuJSYUUUVzOJdwooorLlC4UUUVm4lJhRRRWLiUmFFFFZWHcKKKKmwXCiiipsUFFFFSNBRRRSGFFFFABRRRQAUUUUAFFFFACFqZupu6kzX9ZU4WPzfmuOpw5FMU8U4HFOaHcdRRRXPYpaC7qTfSHpUZbrVxpNj9pZDi3FRPJimtJgGoHk613U8Oc0qo9paZvzUJanJzXT7JRRnz3Jl709RTYxUqjiuaehrFijinZFMzSZrlauaXH7qSm5NKORUuNhpi09RTVFPAxWTNEx6in0wdKXPvWfIO4ppKTdTaXKK5KvSim0U+Udx1FNopcoXHUU2ip5QuOoptFLlGmGacDTaKnlLUh1FNBxTsip5SuYKUGkoqOUdx2RRkU2ip5R3H0U3Jpcio5R3FoBxSZFLU8o0xcmlyKbRUco7jsil60yip5R3H0UUVFhjqKKKysWFFFFJodwooorFo0Ciiip5RXCiiio5SkwooorFxLTCiiisHAq4m2jbS0Vk4DTG4NFOoxXNKmWmNpu2n7aSueVM0TGYop2KTFcsqZomN20m2nUVxSpmqkNxRinUVyygUpDKKdtFJtrnlAtSEopcUYrlcCriUUUVlyBcKKKKxcCkwooorBxNEwooorFxLuFFFFRyjCiiio5RrQKKKKixQUUUVFgCiiipKCiiigAooooAKKKKAKYbNPU5qFakQ1/YLikfl0WSdKN1JRmuaSudCaHb6TzaYXwKheTGadOlzMznUsVPE+kt4i0S605NSv9HeddovtLlWO4h90LKy5+qmrJk61C1xjPNRGbrXqU6FjjnWJjL15phbNQhsmnoc12ciSMFK48DNSxrTYxUy965ZnVEegwDS5xSA4FJXFKNzROwu6kzSUqis+QpO44c09RSKMCnqOK5mrmqHKKWgdKKXIaJhSZpe1Mpco7jt1ANNoqeUm4/NGabmjNHKO47NGabmjNLlC47NGabmjNLlC47NGabmlU1PKFySikU8UtZ2LuFFFFRYdwyaUNSUVNirjgc0Dmm0oJFRYaYtFFFRylphSg4pKKixVxwal60yiosMfRSKc5pahodx9FFJWdihLm5hs7d555Y4Il6vI2AKo2fiXS7+WOK3voZXk+4Ff7309a+Hv2gPjTq/in433Gh2Vw0Wg6FKsEcEf3Zbgf6yQ+vzfL+FfTfw912LXfDEFvd4kSRBkEV9nh+G1Okqk52b8jRI9YornfAOsSahpd7a3JaS70+4a3eVvvSJ8rRsf+AsP+Bbq6KvjcRQnh6sqU90MKKMijIrjsUFFFFKwkwooopWKQUUUVk0WgooorBooKKKKhxEmFFKtKR1rBxLTG0hHFLRWDiaJjaKKK5ZRNExu2jbTqK5JQLTGkYpKfSYrllAtMbRRRXNKBSYUUUVyygVcZRRRWLgWncKKKKwlEtMKKKK55RNEFFFFYOJoFFFFYuJS1Ciiis2hhRRRWTQ0FFFFZtDCiiisiwooopAFFFFABRRRQBQFPU1FupQ2K/sdxPypMlzTS/WozJUTy4zUxpNslzsPeSoHl61FJN1qu02c161HD2OOdYkdutR5NN35p6DOa7XBROVvmY+OpkFMRakUda4qj7HTBWJUp6nFRr0pwOa5OVs61Ik3ZoXrTBUi9aynoUh6jrTlFIgqRRXK9TpihQMCim5NGTWfKXcdRTcmjJo5SbjqKbk0ZNLlFcdRTcmjJp8orjqKTdRuqLFC0UAiipsNMKKKKmxQUUUVFh3FBxTgc0yis+UY+gcUgb1pRzU8o0PopgOKUNUcpQ8GlyKZkUZqbALRTKcDmlY0uOXvS02l3Vk0O4tFNyaMms+Uu48HGaXdTFOc0tS4hcfWD468V23g3wlrOtXLAR2FrJcEHuVU4H4nArezgV8l/t1/Eg6V4PsPCVrLi51ubzLgKeRbxtkA/7z7f++TXbgMN9ZxEaXcuLPlrwjczar4gutUuT5lzeXDTyv6szbmNfXXwl8SjyI4S33cACvlTwJp5SNWxyAPzNelfD/xcbDxK9qzEKpFfrs49DpgfYPhW6Gn+OzHnEGrWWB6edD83/jylv+/deidjXj8V49zodvqVr891p7pdxqP4wv3k/wCBKWX/AIFXrVleRahZw3UDb4ZoxIjeoIyK/L+IcM6eI9r0kJjiaN1B6mkr5W2hI4HNLTKcDmosVccvelptKGosFxaKMijIrJxKTCiiis+Uu42ijBpdtRygKtFA4orNxLQUUUVzSiWmFFFFcziUhuKKdSbaxlAsSijFFcsoFpjSKSn03bXNKBSYlFLikrllAtDKKfik2iuaUTVDaKdtFG2uaUS0NopcGjFYOBaYlFFFcziUmFFFFZOJqgooorFxAKKKcoqeUYtFFFYuADKKdijFcjiUNop2KMVnYobRTsUYoWgxtFOxRimVcyd1NL0wvULy9a/tKEOY/I3OxI0uKrSTdeajkm61WeXOea9Slh+pw1KxI8uc1FuzTM5qSNa9BRUUcHM2yWMVYjFRxpU6CuKqztpIkUdafSL0pa4bXOkAcU4c00DNPUVnJWLiPUVIi0iLUgGK45e8dcRyjilBxTQcCjdWPLY2vYM0bqSijlI5hd1G6koo5Q5hd1G6kopcori7qN1JRRYVxd1LuFM3UoOaysXcdSjimdKcDU8o7jgaWm0oOKixVxaKAc0VPKO4UUUVFirhRRRU2HcUHFLuptFRYdx2RS5plFTYq4+imjinCoaKuOBzS0zpTgazcR3FooorPlLTCjNFFKwXK9/crbwO7uEjUZZj2FfmV8UPGMnxi+Kmra4rtJpqt9msQegt0yFP/AuW/wCB19X/ALYfxRPhHwO3h6zmxq2v7rZQDzHB/wAtm/8AZf8AgX+zXyT4K0xYYlO3Axj8K+54fwTpQeKnu9F/mdNONzqdLsU0uyLsMAc15qvjH+zvG15KkpCrIoxXa+OfEsWjaRcys2FiQsfrXzFo2sahca/N/aEUkUtx/pUOfl/dn7tfZU4c92a1Jcuh+nHwT8bpq2nRRM4YFRxntXuPgO7W0F3oxPFs3m2+e8Emdv5NuX8q+Dv2evGhsb2KFn+8QMGvszTtUYQWutW4Ly2QJZF6yQH/AFifX+L/AHhXzub4L63h5RXxLVFvVXPUaKZFOk0ayRuskTgMjqchhTuxr8k5TLmG0UnOaWosTccDmlpnSnilYLhRRRUtFpiqaWm0qmsrFpi0UUVNirhRRRUNFJhRRRXPKJaYUUUVzuJSYUUUVlKJaYUm2lormlEpMbiinUYFc8oFpjaTFO20ba5ZQKTGbaMU6iuaUDVMZRT6btrmlAtMSkxS0VhKBaY0jFJT6TaK5nApMbRT8UYFYSiapjKUDNOxRXM4juIBS0UUlELhRRRUuOg0FFFFcMoGiYUUUVg4jCiiisrDuFFFFSM5lpcA1VlmxmmPNwaqSS5zX94UMNrqfhlXED3mzmmhsmoMkmpolzXreyUUcMajkyeNc1ZjWoolqxGMVwVGdkESoKkHFRpT689q7OuLsiQHFOHNRr0qWMVnJcqNYu45VqRVpUFOrik+Y7IoBxTt1NJpu6s+WxXNYfuoyaZk0oNLkuHOOyaMmkzRmp5RcwuTRk0maM0uUfMLk0ZNJmjNTyhcXJoyaTNGamw7hRRmiosXcUHFOplKDipsO48HFKDmmA0tRYdx9FMzS7qnlHcfmlzTM0tZWNLjqKbQDiosO46ikDetLU2GmFFFFRYdwoooqbFBSg0lFKwD6KKKz5TVDs1Q1rV7XRNNur68nW3tbaNpZZHOAqqCSatZ96+Rf20fi6WVPh9pk376bbNqrIekfWOH/gXDN/s7fWuzB4SWLqKETRK54T8RPHVx8XviPqPiGcv9iJ+y2MTZ/d26khf+BN95vdq07OFNNsckYIGcVj+GNJSNVbbiOMAKKi8a68LC1kEZzIw2Rr71+nxhGnBU47I9KnHlic1JpF38WfiDYeGLcMbBJPtGoyqfuxryR+Vd5+0l8G4p/DNt4g0m38u/0cCMIg+/bD+H/gP3v++q9r/Zo+B3/CJ+DG1jUY86vrH76QsPmSLqq/j1/D3r0LXfDyPC6MgKkYxjg181ic09nil7N6R/HuclSXNI/Pz4d+KGtLmCZG2sCMjPf0r7y+DHj+PVdPiUsG3DoT145H4ivgf4t+CJvhZ4/vLVFZdLnfzrZu20np+GMV6Z8E/iU+lXkUbykRsR36e9fUNxrQVWGzNKcrrlZ+i3gy9+yzT6M75SIefaMe8X8Sf8BP8A46611VeQeGdd/tvS7a9tJFW8tyJ4GJ43D+FvZlyv/Aq9O0bVotYsI7mE4DcMh6o3dW9xX5hnOAdCq6q2ZM/dL9FFFfM2RkmFFFFTYtD6KZRUNGiY+imUVk0O5LkUZptFRYdx1FNBxS7qlopMWigHNFYSiWmFFFFYOJaYUUUVk0WmFFFFc7RSYUUUVg4lphRRRXO4lJhSbaWisJQNExuKKdSba5pQKTG4pNtOxRWEoFpjMUU+iuaUC0xlFO20m2uWUDRMSijFFcrgUmFFFFTylXCiiipaKTCiiiuaUC7hRRRXNKIwooorncR3Ciiio5R3PPzLmoic1GDmpIxmv9CvZqJ/Ork5DkTJq1CmKZElWY1rkqTtodlGBIgwDUg6U0DFOHSvOlqd2xIvepV5qJBUyDrXM9DaGo5VqVBimqOKeveuSbudMVYepp26o80VzpG6dkOJptFFNohsVT2p1Mpc0JCTFzRmmZFGRRyl3H5ozTMilqOUaY7NGabRUcpSY7NFNoqHEdySlFNpVrKxVxaKKKmw0wpRxSUVFihcmjdSUVNhofmgUyis7GiJAcUBvWmqaWpsUmPopoOKdUWGKGpcim0VLQ0OooorPlNAoooo5RhRRVXVNUs9F065v7+5is7K2jMs08zBUjUdSSaXKWjiPjZ8U7T4U+CrrV5Qst6/7ixtyf8AXTtwox/dH3m9FU1+fdtb3fiHVrrVdRne71C7kM088p3MzEknJ+tdb8XfijdfGfx1JqaF00W0Jg06BsjCZ5kI/vN/8Sv8NZ9sgt1wBg/Sv0DLcCsJTu/iZ6FGnpdhqF7HpVkwyEVV5Pp/9etH9nj4YP8AF3x3Dq2oxs2i6cwfkcSc9P8AgR/8dFcha6Ze/ETxVbaHp6s4eQCVlHAXP3fq1foL8LPhzY/D3wpaaVaRqGRQ00gGC796yzPGLDU+VfEy6k+XRG8tisUaogwg6Vj6xpgeNvlyD1FdbsHpVS7tQykYr88uciZ8r/tBfCVPHnha4SKIHUbUGS3YDk/3o/8AgX/oSiviHQr248P6s9pNlJYXxzx3r9Utf0gfOduR3FfDn7UvwefSdVHibTotsEzfvlVcBX53D/db7y/7X+9X2+RY5NPDzfoNPld0eu/s+fFFdkNrPJnAxgnqvpX05oevJpt2l7vH9m3W1Zj2R/urJ+P3W/4Cf4a/Lv4c+OZdGvoZRIQVI5r7r+EHxAj8Q6UkEzLIrrt2E9Ceo/Gvcx2EjiKTpT2Z2aVYn0xTsiuT8L6wYV/s24fOF3Wrn+NB/wAs/wDeX/0H/daumUnNfkeJws8LUdKe6OZxsSUUDkUVy2AfRTcmjJrNodx1FNyaVTmsmguSUUg5FLU8paYUUUVLiWgoyaKKycSkLuo3UlFYuJQ6iiiueUTRMKKKK53EpBRRRWTiWgooorncSgoooqHEtBRRRXNKJSCjFFFYOBaDApNtLRXNKBaG0UUVyygaJhSEUtFczgUhlFKetJWLiWmFFFFYNFphRRRWTiXcKKKK5pIYUUUVg4jQUUUVHKM81XqasRDNQoOatQrX+g1R6H87U0TxLVhKijHFSDivInqepDREi96etRrUqCuZ6Gy1JEFSoMUxBUgGBXJPU6oaDx0opuTRk1z8ptcdRTcmjJpcouYdRTcmjJpcpNx1LmmZNGTS5RXF3UbqSilymlxd1KORTaVTU2GmLRRRUWKuFKvekoqLDuSr0optFZcpdx2aKbRU8pSY+lU0wHFKDmo5S0x9FNBxS7qnlKTFopN1KDmo5RqQo4NLkU2ip5B8w/IoplFQ4jUh9Lk1HTl71HKVzElFIDxRkUrGiYtFJmlpWGmFfF/7V3xvfxTrE3grQrgtpVq4GozxH5biZT/qQe6r/F/tf7telftS/Hg+DtLbwroFxjxHfx/vp0OTZQHgt/10b+H0+9/dz8h6VpyxLnGW7k19LlWXp/7RVXov1/yPQoU7+8y3p0H2eHmqWr6u4kitLXL3Ny/lxheTmjWtVjsLd8tgAdv89a9U/Zf+Cr+KNYPiXXExGq/JE3ZTysX/AAL7zf8AAVr6OtVjRg5y2R1ynyI9k/ZZ+CyeENETWr+LdqN0NyFhyN33pP8AgX8P+z/vV9ExwCNcYAqlp9uQc1pV+ZYmvPEVXOR57nzO5F5dMkiytWKCMiuOw0zm9Vst6txXmfjfwla67pl5p95CJbW4QoykdPp7jrXss8W6uY1vSwwbjINaUpypyU47ou5+Wvxd+Gt78M/Fs3moxs3bcZAOCjH5ZP8A4r/aruvg38SZdE1CNZZTgYHXqK+qfi98LrXx7oM1nKireRgm3mYdD/dP+yehr4Gv9LvfAHiKWxuVeNQ58ot9/wCU/Mrf7S1+mYDGxxtGz+JGlOXKz9MvBfie38TaVGRLh8BldT8ysOjD3Feo6Dqn9o2zJL8t9FhZYh3/ALrL/sn/AOtX5/8AwP8Ais2nXEMEk37skbTnpX2N4b14arbQXdo6/aox8uTw4P3kP+y1eZmmX/Wafu/EtjonG6uj0+nVQ0rU4tVs1niOP4Xjb70bd1I7GrtfmsqcoPlZzDqKKKmxQUUUVjYY+im5pQaiwC0UUVm0UgHFPplOBrJotC0UUVlYocOaKaDinA5rJxNAooorncSkKcUlFFYuJaCiiiudxKCiiis3EsKKKKwcS0FFFFZuJSCiiiueUSxtFFFcsoloKKKK5nEtBRRRWEolJhRRRXM4al3CkIpaKznDQpMZRSkYpK4uUtBRRSgZqXAdxVHWlo6UVnyCuecIlWYlpirU0YxX95zdz8BpqxKvanjmmL2qVBXDI7ojkFTxrUaLU6DFck2dMR6ilptJmublNLi5ozTcmjJpWDmHZozTcmjJpcoXHZozTcmjJpWFcdmjNNyaMmlyhckyKWmUVNjRMfRTQaXIqLDuOB4pabRU2KuOopuTShqiw7jsmikyKTNZ2NExaXpTd1ANTYpMeG9aXrTKUcVHKUmPBxS5FN60VNirjgc0tNXrTqmw7iqaWm0oPrUco72FoooqHEaYUUUVHKPmFBxRupKKOU0UhcmvMPjv8ZrP4U+Ht6MlzrN2pSwsm67v+erf7K/+PfdrY+K3xY0f4UeG59S1OQNOw22toD+8uH7Ko9P7zfw18Faz4p1Tx74lude1m5a4vJznk/Ki/wAKKP4VFepgcCqz557Hbh6PtXd7FWWe917VLrU9Sne7v7uQyzzv1dj/AE9BU15cpp9ueRux1PanT3EVuDWZ4f8AD+ofFDxBFpNp5n2XevnSR/x/7A/2v5CvsFZLTY9nRI2/hD8N734p+KIZWjP9nRPuUsPlO0/PKf8AZX0/ibAr7+8H+GLXw5pVvZ2sWyKJcKD1Pqx9z1rA+FXw3s/AegQ2kUaeeVXz3QcE9kX/AGV7V6FHGEHHWvhsyxzxMuSHwr8TyK1XmloSxjaKmXvUSjrUq968GxkmLRRRUWNUxjrkGqF3AJUYYrSqCROtSO5w2s6XuDYXkV8wftIfBmLxdpM+qWcRW+hG6Xyx8xVRxKP9pf8Ax4fSvsS/tA6k4rjNe0USK7BR7jHWu/CYmWFqKcTRM/LTSNTvPDGqNaXWY5Yz1HRh6j2r6r+B/wAYihitbibjgAk1yX7SXwIMDP4h0iLYmSzoo+WFj3P+w3/jrV4d4N8RS6ZeKrExujYKnqCO1fpFKrDF0lUgdlKfRn6m6HrwAW/tf3jkAXNqv/LVfVfdf4fUfL/u99Z3Ud3AksTh43GVYd6+Qvgn8V4r+3itJ5R5ygBCT19q+jtC1wWI+1wnfaS8zxDt/wBNE/8AZl/i/wB773y2a5X7VOpSXvfn/wAEqcL6o7anVFHKk0aSxussTjcjocginZr4M5Lj6KbRWVirjqKKKnlKuKDinA5plKDis3EaY6ikBpaycS0xQcUbqSis+Uq4+gHFIDmlrNo0THDmimg4p1YOJSYUUUVk4lphRRRXO4lJhRRRWTiaJhRRRWDiUmFFFFZuJaYUUUVg4lXG4oxTqK5pRLTG4oxTqK5ZRKTG4oxTqKxcS0xuKMU6isHAq42il20mMVnOGhaYU3bTqK4nAtMbtp1FFTyjuFFAGaXbU+zFc4EDNPQU1RUqCv7iZ+E2HoKmRaYgqVelcNQ6KY9elPDVGDijdXNa50XsSbvejIqPdS5FPlJUh+RRkUzIoyKysXzD8ijIpmRRkUuULj8ijIpmRRkUrDuPyKMimZFGRS5R3JMmjJpmTS7qzsXcfupcio91KDmpsVcf0pc0wHFGaiw7km6jIpm6gGpsO5JRSbqTdWdguOopu6gNU8pSY4HFOpmc0oOKmxSY8HFKCKaDRU2LTH0Um6jdU2LuLSg4pu6gHNKwXJKKQGjIrOxQtFFFTYsdXLfEn4jaR8MPC9xreryYiT5YoU/1k8h6Ig7k0/4gfEPSfhx4duNa1q4EdrEMLGP9ZPJ2SNe5r4B+JvxO1f4ueKn1PVHMcCEi1slO5IE/9mY/xNXZhsHLESu9jrw9B1XfoVfHHjjWfin4mm1jWJixY4gth9y2i7RqP5t/FVCSeOzj2IAD7VC8iWkW1OXx1rmby7u9a1GPT9PHm3Un/fKL3Zvavq4QjTjyrZH0EYqCstjWtVv/ABhqsel2AJaU/vJwMiJO5+v90V9wfAX4NW3gXRIJ5oQt46cBh80at13f7TdWrkf2bfgRB4SsYdSvoQ9w2HiDjkv/AH2/9lX+GvpK2gxmvnswxntL0obHl4jE/YgWbeIKvSp1FIowMUoOK+ZscCJFHFKOKaDindazcTRMcOaKQHFLWbiO4UhXIpaKzcSlIqyx5BFY9/ZBg3HFdAy5FVJoQwIIoSLUjzDxL4diuYJo5IhJBICroRkYNfEHx++BM/g/UpNW0aJmsnbKhR/5Db/a/ut/F92v0T1CxDBgRmuC8UeF7fUrOe2uYVmtpQVZGGa9rL8bLCT8mbQmfnV4J8azaXcxukjIynkdCDX2p8GPi5DrVpHb3EoL4AIJ/Wvkz48fB3UPh/r0uo6dE09lKdw2jh0/+OL/AOPda53wF8QLjR7qKWKUrg+tfepwr0+eGzO+nU6M/UrRdaj0rkEy6dIcyqOfszf3h/s/3h/D97+9XZbq+Xvg/wDF+DxDaxRSygXAABBP3q9w0HXl09FR3zp54Vz/AMu/sf8AY/8AQf8Ad+78VmuWc169Fa9V+pNSnfVHZ0UDpRXxljjH5pd1JRRyl3HA5opvSlBqHEpMWlBxSUVi4lpjs0tMpc1nylJjqVTSUVi4mlx9KppoOaWsHEpMdRQvSiocS0wooorBxKTCiiisHEu4UUUVi4lJhRRRWTiWmFFFFYOJaYUUUVhKJaYUUUVySiUmFFFFZcpaYUUUVm4FJhRRRWMolJibaTFOoxXFOJaY3FKFpcUVmkVcKKKK05BXODUVNGKaq1IgxX9pNn4bHUevenZxTOlFczVzoWg7OaKaOKdWfLYd7ig4pd1NpN1TYVx+6jdTaKnlDmHbqN1NopcpSY7dRuptFTYdx26jdTaKXKVckyaN1JRWdi+YcDmlplKDipsNMcDilDUlFRYq44EUU2ipsO5LkUm4U3IoyKjlC47dRmm5FGRS5S0x9KDimdKcORUcpSY4HNLTKVT61Fi0SUUgPrS5FZ2LuFFFFKw0xc0bqSlFRYsdXP8Aj7x7pHw58OXGtazcLDbR/KkYP72dz0jjX+Jj6VS+I3xN0b4ZeHrjVtWnEcSjbDAD+8nk7Ko718C/ET4m638WPEb6rqzmOFCVtLJT+6t4/wD2Zv7zV14bCOu9VoduHous7Im+JvxR1r4v+JW1PVGNvZRErZacjZS2T+rnu3+TzymOBagLrCuBgmsa5u57q6jtbWJp7iVtqIv8zX08aapx5Yn0cYKC5US3t1caperp+nqZbmTg46KPU+gr6p/Z0/Z4j0e2j1rVIRczvtlAkUDzmH3Xdf7q9lH+9Vf9nb9ndLCGLW9ahLvPsdVccuf4Sf8AY9v4vvV9T2VokMYRFAAGOBwK8XHYrlTpw3PKxWK+xATTbBLaJY0UKqgAAVrRJsFMgi2ipq+aszy0OooopWNLj6UHFIDmis3Edx4opq96dWTQXHA5opo4p1LkLQUx0yKfRWbjY0joZ9xBvU1g6jYB1Yba6mRM5qhdW4dScVJseM+PvBVpr+mXFldwiWCUenKnsRXwN8X/AIRan8MtbmnhjZrKVjKhUcSD++v+1/eX/gVfp9qmmiWNgRXlvj3wDZeJ9Ln07UYBLA4O1scoezA9jXuZdj5YWXLL4WbQl0Pg74e/EKfSLmKWKUrtIyM9K+3fhH8W7fxFZxwzSr52ACCfvV8V/Fr4O6n8M9ckkjRns2O5JFHysP7y/wC1/eWpPhv4/m0W8iIkKgEcZ6V9naNaPPTZ2wn0Z+nuga+umokMz7tNPCSE/wDHv/sn/Y9/4f8Ad+72NfM3wq+KsGu2kcUsqmTAGCfvV7LoeutpChctPph6KOWt/cf9M/8AZ/hr5HMsq3rUF6oJ076o7eimhs06vjrHFsFFFFZtFIUGlptOHIrFotBRRRWdihQadTKcvSs3E0THLTqZTsisXEpCg4p1NpVPFQ4lpi0UUVi4lBRRRWDiWmFFFFc7iUgooorNxLQUUUVi4lBRT8UYrGUTRMZRT8UYrjlEpDKKfijFZ8paGUU/FGKlxKDFNIp1GK5HEpDKKKK4pxNEwooorKMR3FUZp2KAMUV0JEnEAD1pcim5ozX9iWZ+JJjs0ZpuaM1PKPmHZozTc0Zpco0x2aM03NGaXKO4+imUVPKO4+imUuTU2HcdSg0zNG6o5Rpj91LkVHupd1TyjuPopuaAcVFg5h1KDim7qXIqeUpMfmimUuTUWKTHUU3dS7qnlLuO3UbqSipsVcXdRupKKVh3HinKeKjU04HFRylKQ/NLupgNLUcpSkO3UbqbRS5EPmJQ1O3VEvSng1DiXF3H1wPxa+MGjfCPQ3v9UlEk8gItLBT+9uG9vRf7zfw1R+NPxy0n4S6O5mdbzWrhSLXT1b5j/tSf3V/ytfCPizxZq/j7xBc61rV813dSHgfdVF/hVF/hArrw+E9o+aWx6uFwzravYf47+ImvfE3X5NV1qYs+T5NsDiO3j/uqv9f4qwWuDbqfWmSTpCCF61zGoahLPPHFDF5ssn3I/wC//wDY19DCMacbRPpacYUo8sS9davPc3C21oplnkOFUV9Vfs2/s7rZRxa94ii8yWbDJE4/1n93jsv+z/F3qr+zb+zOukRReIPEsPmajNh4oHHK91JX+7/s/wDfVfW1jp62qrwN2McdB9K8fF4xK9OnueLjMb9imWrSzCqAAFUDGB2q9HEEFEK7Up9fPtXPHTuSr90UtIv3RRmosaJj6KKKzsO4U+ql/qNrpdnNeXtzHaWkK75biZsJGvck14jr/wC0jDqNxLbeGiIrQZU6pcJzJ7wxNz/wJv8Avk1pSoSquyOmlSlVdke26nq9no8Pm3t1DaxngNK+3P0rEPjmHJ+yWlxOP+eko8pf/Hvm/wDHa+eZviN5c5uC73N4etzcSGWX8CeF/wB0Vx3iD44xaeD++82vWp5bH7Z6cMFb4mfWb+M7nkNPpsH+88r/APxNSjxFct01Ow/8Bn/+OV8G3n7S8sBbysD8ay5P2otU/havRjgKKWx1Rw9NI/QlNZ1Aji+06X/tnJH/AOzNVuPV74A+bpwlX1tbhW/Rtpr4C0X9rbUYCBMc475r0jwr+2DZSyBLo7T3OaynllGWyJeGh0Prq11u1nk8rzjDMf8Aljcq0TH/AHd33v8AgNXq8o8K/GPQPF9qqGeGZWHKS4Nd1Z2g2BtEvfIXtYzlntz/ALo+9H/wE7f9lq8erlEo602YvDNbGpcWiyqSBzXP6no6yqwK1s2uvLd3H2C6ibTdSxn7NIeHX1jb7rr/AOPf3lWrE8PmKQfvCvDqUp0pcs1Yws46M8X8a+B7LxBps+n6jbie2kHccqexB7H3r4V+MHwe1H4X6w88CNJp7sSkijgj/wBlb+8v/fNfpjqumiVG45rzPxv4Js9d064sb6BZbWQENuHT3Hoa9fAY6WHdnsaRl0Z8J/D/AOI0+kXMbLKVwRkZ6V9gfCr40QapDFDcTANwMk18g/GD4Pat8N9Ye8s0a60+RsxyqOHHp7Sf7P8AF2rE8F+PpNOlSSGXawPK5619qnGtHngdtKpbRn6l6D4h+xIpiJntD1hHJT3j/wDif++ffurWZLq3jmidZIpF3I6nIIr41+EPxpivYYoLiTI4HJ5FfRPhrxP5YFzaN50EnM1tng+6/wB1v/Qq+QzLK1NurRWv5jrUeb3o7no1FV9Ov4b+382CUSxHv/d/2W/2qsV8a4nCrrcKKKK5Wih1FFFQWgoooqbGiYUu6korNoEx9KDikBzRWDRqmPopAaWsmh3HUUUVi4lBRRRWLiUgoooqHEtBRRRWLiUmFFFFZSiaIcvQ0tIvQ0tcs4lJhRRRXMolofRRRSlEq4yiiiuWUS0Mop+KMVxziaoZRT8UYrBRGFFFFaqJFzg91G6m5FGRX9jWPw647dRupuRRkUrDuO3UbqbkUZFKw7jt1G6m5FGRU8o7j6KMijIpWKuLmjdSZoqeUq44GlplFRyjuPopuaMmp5R3HZpcmmbqUNUcorjg1LkU0HNFTYpMfRk0zpShqjlLTH7qN1NzmlqbFJkm6jdTaKxsXcduo3U2ilYdx4OacpzTF70o4pWGmPoooqbFXF3UbqSilyjuOFeK/Hj9pHT/AIYW82k6SY9R8TyD5I/vRWv+1J7/AOzXE/H/AParTRFufDvgqaK51XlJ9VHKQeqx/wB5v9r7q/71fIs93Nd3Ek88jSyyMWaSQ5Zj7mu2hhOf3p7Hu4TBOXv1NuxqavrF94i1SfU9Vu5L/UZ23SzynJJqnNfLCpUct61Qmv8AyBWfHJd63qEem6XC93qEzBVVVyFz3NepyqKsj6GKUVZDbu9m1C/isLZTdXk/yRw9gP8Aa9q+u/2bv2XovDHleIPEsX2vVpNuyOT+D/P92tX9nX9mK08DW8Wsa3GLvXpQGw4z5f8A9f8A9Br6Tt7evKxGJv7kDwsXjOZ8lNjLGxS1GRhnx97HT2FaCDpXnXxW+N/hr4SWwivZG1HWpk3W+lWfMrjsXP8AyzX/AGmGP7u6vmLxd8Z/E/xIaSLV7wWWkE5XS7BikJH/AE0b70h/3vl9FWvPjh5T1Oahhp19j631n4x+FdJuHtlvzqF0nBg01PtDZ9Cy/Kp/3mFc/J8Z5rh2FrpkFsnaS+ud5/74T/4qvkr/AITtNITZAyxqOyiuZ1n40tAzLGzM/qTXbDBxW+p7lPAUofFqfccPxMun+/qmnx/9c7Rv/ZpK0o/HTSL/AMhy3/8AARf/AIuvzjufjbqrk7WI/GmQfHPV4zjefzrq+opq/Kb/AFWj/Kj9LrHxVPJ9zULCfP8AejKf+zNW1BrkxGZbLzF/v2rpLn8PlNfm7o/7R2qWxXfJ0969K8N/tTyIFEsh+oNYSwMHuiHgqEttC58afizrPxJ8QNaXRbT9CtJcwaUp4Zl6PKf4m9vur/49XF3HiH+z7c4NUNX8VWesa/czQyL5c8pcAnkZHArf034Hat8TxjT7u3tMf8/H3a6KVKNNcsUdkIwoxtFHk/iP4jz3DNHE28k4GDx+f+Fcjb3l5r9wVthNfMf4LZd1egeHv2ZvENx44m0nxt/xJJbd2dNP3/8AH3GP44pfuyL/ALS/d/i219TeBfhNp/h+38nT7SO0i/8AHqdXE06Om7OKpWaZ8i6R8GvF2thTFo5tkb/lpePj9K3If2bfFjn5pdPj+gNfcdh4MiUD93uPqRWmvg2IjmFfyrzJZjK/uo43Xn0Pgm5/Zy8XQZ2W9lcj1WQr/OuX1f4W+JvDpP2vRbuID+OIb1/76H+Nfo2/guHB/cise/8AB4Xdsynt2qI5pJP3kNYia3Pzj03xXqmhXH7i4mgdT91iQRX0F8KP2r9Q0d4rbV2M0IIG8nkV6X43+BWheJkkN3pqxTHpcWw2n/gQ6NXyh8T/AIM6/wDD26eaFDeaYT8k8I+UD0cfwmvVoYulX0W52U8QpaM/SHwx8RdC+JGjxiSVJEIQq6nZJGf4WVl+ZW/2q39L8Rywaimk6s4Mkr7LO/HC3B/55yf3ZP8Ax1v4fm+Wvy9+Fvxd1HwrfxjznEasA0bHkV9x+BPiVpnxE0Nre4kVpCoD5PIP972Nc2NwUa8Xbc1nTVRaHvc8G4EEcisLUtLWZGG38Kzvh94uk1B5dA1Ry2rWUQeKY/8AL3b/APPQH+8v3W/4C38VddLbiQcCvi505UpOEjz9YuzPGPGfga21iyuLa8t1uLWUYaNh/Kvh342/AnU/AOqPqOnI0thIchgPv/7Lf3ZP9r7rfz/TO+05ZVYFa4bxR4Pt9RtJre4gW4t5BteN1yCK9PBY+eGdnrEuMrH5teDPGc2nzoyyFSDg54/A+9fVnwm+MnEccsuegIJ615N8dP2d7rwzdT67ocZexzuZFH+r6/K/+z/00/76/vV5X4c8TT6VcYJaN0OGQ8FTX2UJwxMOeB3U6mlmfqD4Y8UCbbd2Uo3sBvjJ+WYejeje9eiaXq9vqkLPESrpxJE/3oz7/wCNfBfwn+Nr27xwSzccDk19PeFvF0OrRx3NrOI7hRxIPmyv91h/EtfO47LVXTlD4iZwUj2Sisfw/wCJYNWTyXXyLpRlomOfxU91rYr4arSlTk4yRySvHcTIoBptKveuflEpEg5ooXpRU2NbhRRRWTQ0wpymm0Vg0apj6UHFIORRWLQ7jwcUoNJRUuJdxwNFNpQcVi4lJi0UUVDiWmFFFFZOJVwooorJxNExy9DS0i9DS1zTiUmFFFFcnKWmPoooocblXE20baXBornnEpMZRRRXnzRtFhRRRWaiVcdto20tGDW6gZ3PPKKZmjNf2BY/DLj6KZmjNLlHcfRTM0ZqbFXH0UzNGaXKO5Luo3VHmjJqbBck3CjIqPJoyanlHck3e9Lu96i3Uu6o5R3JMmjJqPdQDmp5R3JqKYOaUHFTylpjqXNN3UuRU8pSY4HNLTKXOKixaY6im7qXdU8pVx4OaUHFRg5pwNZ8g+Yfuo3U0GlqeQfMOVutLuplGfeosMlp9Qg1jeMPG2j+AtEl1fW7xLOxi6sT8zHsFXufakos0im9jYvr2DTrOa7u5o7a1hXfLPK21EXuSa+M/jv+1NceMXuPD/hGR7TRBlbm/wA4e89l/ux/+PN/s1xnxo/aH1b4uXslrCz6Z4cRsRWaNgzj+9Mf4v8Ad+6teT/aBzXbSo296R9Ng8Cqfv1dx/SqVzfLECF5NQ3eoZyqHA9a3vh18Hdf+K2qR29pE9vYP8zzOcEJ6n+6P/Qv4a7laKPbnKMI3kzltB0PXPiBry6VoUTTTMcPJ/DGO5J/zivuj4Afs86X8LLKK6liW61mQAtOwztP+z/8VXVfCj4L6J8M9JjstOtlNxgedcsMtIfb+6v+zXptvb+QDXmYivze7HY+ZxWOdT3KeiJ7aCvD/wBoD9pmL4fiXwz4Z8q68V/8t7j70WnKf73rJ/dX/gTf3af+018d4/hH4ZFnprJN4q1NSlkh+cW6dGuHX/Z/hX+Jv91q+GbO4mknluLiaS6uJmaSWeZtzyOxyWY9zWVDD83vSNMDhPa+/PY6SW9uL69uL69upb2+uHMk9zcNukkb1Y9zVDVPE/2VCBIvHYVk6jrIiQxxnnpmt74cfCHxD8TbxDZwGDTw2Hu2HyrXqe7Ban0kpxguZnFXWp3epy7U3fMcDgkn6Ctnw/8ACnxL4mj8y10aeSI/8tZhtQ/p/WvsL4ffs0+HfB6pM1sdQv8Agtc3XzYP+ytepW/g6LH/ANauWWJUfhR5c8cr2R8Paf8Asw+JpwDJNZWq+0e41e/4ZY1vvqtt/wCA9fcEXhGEfwk/hSS+EoucAj8Kwljqi2Ob61Le58D6n+zZ4nstxhawuwPRyh/KvPPEPg3XfCsjLfaddW2OjqDtNfpLe+DdwOAG+orl9b8ERzwvFNAssZ6pIu4GnDHyT95GkcU+rPzptfEd1btgTbgP4ZBXt3wn+OlzoFzCGcqAQDk11nxA/ZcsNVMtxog+wXXXyj9xj7f3f/Hq+fPE/gPX/Al60Op2ksYU/K4HB9wR1/CvShOjXWmjO+niU9z9EfDfxA8M/FnSk0/XoIb8ZDp5hw8b/wB+N1wyN/tLtauv07w/qPh/mGaTxNpX/Af7Ri/9BWf/AMdk/wCulfml4R+It/oE6PHOxVSOQeRX1X8Jf2nVkWKDUJd3Qb88iuevhuZWkdLjCqrM+sdKey1CB7ixuVniQ4faMNGf7rp95W/2WGa0vsvHXP4Vwek+J9K8XhL+2uzaaiVCi/tSBKR/dkHSRf8AZdW/4DW3D4mutET/AIn8SC1PA1SyU+Sf+uq/eh+vzL/tLXzdbBzpu61R5lTDShqtjeNmOap3WmrIDxWpFLHcxLLE4eNhkMpyDQVzXA0crdjjr7ReG+XIrh/Evg+K+glRolkRwQ0bDIYV7HJbBgax7/SVlDYGDVRlyscZH5r/AB8+BE/gW5k1zR42Oms2ZEA/1R9D7f5+mZ8HPiPd6BqMMvmnAIDIT1HpX3/4p8I2+p209tdQLNBKpWSNhwwr89/ip8Orn4R+Prix5/s+ZvNtJSOGQnp9R0r6nBYlV48st0epQq82jPuCx1yXWdJ07XdGlUarYEXFsSeHGDvib2Zdyn/ez/DX0H4f1m18S6FaatZZNndRLKm77wH91v8AaH3f+A18Nfs++OPPsP7Plk5A3Jk/mP8APvX0T8A/E62fiDxB4Pkb92P+JrZg/wB2Rtsyj/dk2tj0krzMzw11zroVXhdcyPYJLYSKTWVeaeJFYYrdKFCfSo5YQykjrXy55tzzTXfDoZZPkDKeqkV8ifHf9nCRXn1rwvAeMtLaxjJT1KL/ABL/ALP8P8P92vvC9s/MU8Vx2taCJA7KvPcetejhMTPDyvHY1hNo/LXT9VutJvPKlDQ3CHp2PuK9w+Fvxon0u4ijlmIwRyTXovx2/Z4g8Uw3Gp6TCINXXLPGowly395f7sn+191v4v71fIV7bX/hu/ktr+KS2mifYxdSpB9GB6GvsqFenio80NzuhUufpT4K+INn4jt4iJRG45jeJsFD/s161oHi77UUttQZVkbiK4XhJPY+h9vyr8zfhj8VrnRLmOOSU7c+vWvrjwF8TrXXrVEeVX3AAhu/1rz8flscRHmS1OiUI1Y2Pp2n1w3hzxebZFjvHM9nwBcE5eD/AK6f3l/2v++v71dvC6zRh423Ke9fBYjDTw8uWaPPlBwdmS0UUVw2IF3UbqSisrGiHA5optKprFxuaJjwcCjIptFZOBVyQNSg5ptFZuJdx9FNBp1YuJSYqmlptOXpUNFphRRRWLiUmFFFFRymiY5ehpaRehpa55xKTCiiiuOUSkx9FFFEY3KuOppFOorCpEtMZijFLRXmyWpsmJijFLRRGI7gozTqBxRXQoEXPNMijIpmRSg5r+veU/CbjsijIptFLlGmOyKMim0UuUq47IoyKbRU8o7j6KKKnlKuGacOaaOTTqnlC4UUUVDiUmFFFFTyjuPozTc4oBqeUq48NS7qaOaKnlKTH0ZplKDio5SlIfuo3U0HNLU2LuOB9KcDmmL3pw4qGh3HUUUVFhpjs8VHnmjNfPvxz/aosPBMc+jeFWTVPEGNstz/AMsLY/8Aszf7P/fX92pVO510KM68uWCO/wDi58btC+EulvLfSi81KRf9G02Bsyuf7zf3V96+D/iP8VfEHxO1eS+1q8eRMsYLJTiGAf3QP/Zutc9rOt3+v6jPqOqXMl3fXDbpJZWyxrLnuMcV1U6aR9jhMFHDq8tyf7Tgc1UuLstlV4FR2ljeaxciC0jMjnv0A+pr6c+Bv7NBdrfV9dVtmAyxuMNJ/u/3V/8AHm/2RzWsmoK7OqtWhQjzSZw3wY/Z51Dxrcx32oI1vp6sMsw3Ivt/tN/s/dX+Kvtzwf4N07wppsdlp1usMSgZIHzMfUmtLR9Fg0+2jghhWGGMBVjQYAFbUcIUcCuCc3M+TxOMdd+QQwrGmMVmeJtfs/C+g6jq+oyiGxsYHuJpD2RQSf5Vr4r5a/br+Iv9keDNL8I2k2Jtbn8+7CnkW8JztP8AvSbf+/bVjClzyRz0I+1qKB8neNfGmofE3x5qXiXUjmS9k/cxZ4ghXiOMewXH/AtzfxVUuJxb25pdKswIt+OvA+lXNH8H3fjjxRp/h60/5eP9d/1z/i/+Jr1opJH3MIqnBQR0vwJ+DF/8WNeW9vEaHQoGBZiMeZ7Cvvfwt4TstA0+KysLdLeCMABUGBVf4dfDy08FaBa6ZZxBFiQAkDqa7u2sFiHSvJr1HJ6Hy2KxjrStHYq21iFHSr8dqqjoKmRAop1chxplcwhegqNoAwPFXdqJHJLI6xxRjc7ucBRXleu/tCaGNSXS/DYTWLluGvnbbZx/RvvSf8B+X/apqDnsdNKnOq+WCO/azU54qhd6WsgIKgiq2mar4jFql09nY+ILYjMkemhobhP92J2ZZP8AvpW/3q2dK1bT/EccpsblZZYjtmtmQxTwMOqyRt8ykehqZUZI3lRq0vjicfqHhlJASq4NcX4j8Fwajbvb3tpHdwHgrIua9pmsuDkVlXmlLJkFcisk3B6Exm1sfCnxK/ZcktfOvvC7FyMsbF/vf8BP8VeA3f8AaPhu+aG5ilsrhDghwRzX6har4bDBtq59q8r+IXwl0bxjbyRapYrI+MLOoxIv49/xr1KGOlHSeqO2niLHyT4J+M+q+HZ0IuHAHcNX1j8Kf2m7XVIo4Lq4HmEAMT/UV8tfED9nXW/CrS3WjE6nYrkmMD51H0/z/wABrzvTdUudIu9yFopYzhkPBBr00qdZXgetSrqWh+qOi3lncAXWgXy6ZM/LWrjfay+vyf8ALNjz80e31ZWrrNM8VRzzrZ6jEdL1KX/VQud8U/vG4+V/935W/wBmvzr+Hnx9vtFkSOSYlOAVY8V9beAfjfo/jTTxaXvk3Ebj57efkH6V5VfAxnfSzHOhCotNGe+4FRSwBwcVwzeM08HWQvjfG98PxcXEc5Mk9pH/AM9EPVkX+JW+bH3W/hrvDKh2lHWRCoYOhyDXzlSjKlK0jyKkJUnZmBqmniRSccivmD9sP4et4h+Hs2qwRbr3SX8/Kjlozwy/+zf8Br60u0yCfUV5x8SNETWPDmrWDrlLm1eEjHXKmtMNUdGopIKdW0j88fg/4rbTdSt3D4KsM819N6B4ifw58TPCHiFWxbG6FncNnA8m4Hl5PsrNG3/Aa+K/CbPYan5LZBjlKkfQ1+gPwB1HSl0qKa7NvN8o/wBZ81fXYinzRsz3o2nGx9SUzHBrmLUabIDJpd1JpTk52wsDGT6mNvlJ/CrL+IbjTVC6nEPs/bUbVSUH/XSPll/3vmX/AHa+KrYCtR1WqPNqYecX5GvImc1m3mniQMQPwrQguUnhWRHSaFvuyxncp/KnOn5V56djms4nB6vookRxtyK8L+L3wM03xzZys0a2+oBSI7pV+U+0i/xL/wCPLX1Hd2ImUkDmuc1HRRIG+XmumjWnSlzwZop21Py18VeA9Z+Hery2t3bSIE529fl/vIf4l/2v++q3/BPxBuNHnjZJjtz619u+Pvhpp3inT3s9Qt96DmOReJIW9VPb6V8Z/FT4Kar4Av3nhQzWbt8k8a/JJ7f7Lf7Pf+GvtcHjoYiNpaM7qVVH0x8MPjJDqEcccsoDcDk17l4Y8XtZbXtG861bl7bPT3T+79Pu/wC73/MPQ/Fd1pM4+do3U/Svon4VfG7cYoLuXDcAMT1oxOFhVi4zV0dvu1FqffOm6tbaxbCe2k3A8MpGGU+hHUGrleIeFvGC3Gy9tJwk2Ah53LKv92Re9eq6B4qg1hPIYfZr1RloCchh6q38S/5avg8bls8M3KOsThqUXHVG1RRRXiWMRV706mr1p1ZtFoVT2pabTlOaz5Sh9FAorNxLCnA5FNpVOM1jylJjqVTSUL1qHEtDqKKKxcSkwoooqbGg5ehpaRehpa55RKQUUUVxziWh9FFFEIlJjqKKKxqR0KQ09TRQeporypR1NkFA60UL1rSER3HUUUV0qJFzy7dQG9aSiv64sfgtx1FNHFKGpWKuLSg4pARRSsO4+imUuTSsO4/dQGpu6jdWdh8w/IozTMilzS5Skx1LTKKixaY+imZozU8pVyWim5ozU2FcdRTc0ZosO46lBxSZFGRWdi0x6ml3VHS5rPlL5iRTTt1RKeKcDWbQcxJVTWtbsPD2mT6jqd3FY2MA3SXEzbVUVxPxX+NGgfCbS2m1Sbzb11JtrCE5lnPr/sr7mvhj4rfGvxF8WdTMuqXJh09G/cadASIYx9P4j7mpjG57OEy+piNXoj0343ftW3/jLz9J8KmTS9G5VrvOLi5H1/5Zr7fe/lXz5PdcsSdzk5JJ/WqryhQec1UeYtmuqMUkfZ4ejDDx5YIsS3Oc85NbXg/wFqPja6CwhhbZ2+YRkt7KO9dn8MPgTqXiu9jluEOzIPln5Qi/3i39K+y/h/8ADHTfB9qi28Mc1yBzPsxj2UdhSb5Uc2Lx1PDabs4f4N/s96b4Wgiu9RhWW74ZYm+cK395v7zf+O17vY6alug4GfpUtnZrEuSOat4NedNuTuz4+tip4iXNNiIgAqUcCmAYFP8A4amxz3IppsAgV+bf7VXjN/FPx21xRJ5lppSppkWDwNo3N/4+zV+jV5KEVj6DNfkTr2qtr3jbX9TZtzXmoTzZPvIxFdWHje572VQUqjZ2ukQ7rVjX0n+xZ4Dju7nWvFdzHlWl+y2+4fwL8ufx+avnKzYW+lSP6ITX3R+yrpI034M6GSMPcJ55993NaTdlY+hzCahRZ7DbwrGMKOKnpF6VjeLfGmieBNJfUte1CKwtRwoY5klP92NOrt7CvNcb7HxcVfY3K88+JXx48N/DZxazSnVNXA40qx+aVP8Aro33Y1/3v+Ahq8C+KP7T2ueK1m07w0snh3SWyrXCNi9nX/eH+p/4D83+0teEicWwP+WdvU1pDDp7nvYbLZv3qh6X8RPjP4h+JEzLqtyLXSw2V0m0LLCvoZP4pD/vfL6Ktcf/AMJj/ZOZa4PUfFYAYRmuXv8AVpbtiWcgV3RpJaI+lpxp0I2ifXXwv/aZW1mjt7uTEYwA4bpX0JYeKPDnxDiiuZH+z6oqgRatZyeXcR/7O4feX/Zbcv8As1+WPnXFvn5pIvZ/vV2XhD4w6r4ZnTFw/lAjoaHSuhucZaNH6XjxJqfh2PGtR/2tpoH/ACGtOjwyD1mgX5l/3o9w77Vrfsry11eyivLKeK7tZhujnhbcjj1Br5M+Gn7Ty3SxpdzbumWzzXtmhS2GsyvqXh7Uf7E1OY+Y7RAS2l23rNF6/wC0u1v9qvMq4aS1R5lfARn71I9AubMODgfhWJfaMkykNHn8Kn03xX9lu4bLxBaf2NfSELDPu82zuj/0zm6bj/ck2t/vV0v2UdDz+FcLg1ueJOEqbtJHlmpeEUkDMqgn3rxn4mfs+aN4vEkhtv7Nv8cXVuvU/wC0vevqy60tJASBtPqK5nVNIDhlZeacJypu8WEKjjqj81fHvwt1/wCG9y3262M9iT+7voATG31PY+xqLwP4wutHvkeOZgoI5Br7q8W+Hh9mmjaJZYZAQyOMg+496/PXRedUn7/v2/8AQjXv4eq68Wpnv4Wt7RWPo3V/ibqk/hm5t2uHMcsDqw3dRivs/wCBepSax8GPBF3KcyPotoT/AN+1r88tTydII9q/QP8AZxH/ABYrwN/2BbX/ANAWvHzKNoxZGPdoxZ30i7k5rmfEVqHgf6V1L/dNc9rnMLj2rxqUbs8iO5+UCW4h8U6h3P26b/0Nq9G/4SDUtAsBJaSsqqABg154zZ8X6rz/AMv83/obV6BcskmkAEZyoNfbSdz6GlojV8M/tLa3ozKsszlQfWvon4cftMWmsJGl3IqM2Mknj8q+DZfBXi630qPXBZjVtKuE87Nt/rUz7d6h0TxNLay5tpmjdTzG3BH4UlTUkXGrrZn6n6XrTCQ6hoMsUbu3mTWMjD7Lc+//AEzk/wBpf+BK1d/4e8Q2niOwkntg8EsOI7i1mwJLd/7rL3z/AHvut95a+Bvgp8cGgaO0vJeOAQxr6Ss/FZS5h1rRZ1a+giwEJ/d3EfeCT1X+638Lc/3g3g43L4zTlHRk1qCnG8dz3kqMGqU8O7PFN8NeIbLxZosGpWJYQyZVon+/C4+8jDsQauuma+WcZQbizx3daM5nU9JEqsQvNcL4k8J2+o2k9tc26XFtKNrxSLlWFesvCCDmsq/0tZVYgc1pGVi4ux8C/Gb9nebSPO1LR0e4shlm4zJD/vf3l/2vvL/tV4ELm60W82PujdTuH90/7Qr9R9X0HcHwg5HKkcGvnb4s/s92Ouxz3OlRJbXvLNb9ElP95T/yzb/x1v4v71fT4LMrL2dbbudtOq46M8o+Ffxkm06WOG4l+XgZJ4NfU3hD4hWutQRZl+YYKsrYZT6g9q+A9e8Mah4Rv5VeN1RGw2V2lD6MvVTXYeAPidc6PNGrynYDjr0r2Z0VKN46o9GMlJH6XeG/HqsqQapIrI2Fjvv4W9pP7rf7X3T/ALPftK+OfAPxYgv4kVpQQwAIJ4Ne2eEPHJs41UMbix4zEDloveP1X/Z/75218Zj8pd3UofcYVKW7ietU+s7TNWttUgE1rMs0bcZU8hv7rDs3tV4c18w6bjoziTH0UUVjYq46iiioaKuFKDikorJoLj+lOBzTRyKVetYyiaRkPDUuRTaKxcS0x1FIppaysaJhTl6U2isXEtD6VetNBzS1g4miHinU2nVnYsbRRRUTjoOIq96WhRxRXlzjqbphRRRThElsVe9OpAMUtd0Y6GZ5PRTMijPvX9Zcp+CXJM0u6owaXdS5R3H5FLmo9wpc+9TyjuSZNG6mZNG6lyjuP3UbqZuo3VPKO4/dSg0zIpanlKTHUU2gHFRylpj80Zpu6jdU2KuSZozTc0ZqOUdx2aM03NGaVguP3UA5pKKzsaJko6UU2szxN4o0zwfo0+q6xew2FjCMtLM2M+gUdz7VNi6alN2ia1fOvxs/azsPCH2jR/CbR6trQyj3eM21of8A2o3/AI7/ACryL41/tT6p43M+l+Hmk0jQySplQ4uLof7TDov+yPxrwA3AwayaufX4DKL/ALyv9xf13X9Q8R6lPqGqXkt7eSnLSysST/gKyXuMZGaZNOWyF4Fbvg34d6l4tvY0jilSJzjdtyW/3fWqirH1Kioqy2MfTtNvNbuRBaxPNIxwFQZJr6Q+DX7Pcl00eoX6DygQfNYct7Rr/wCzV6N8KvgBYeGreOa7gVpeCYTzz/tN/F/u/dr3XTNMjtIlSNAoAA4GKUn2PmcZmqi3To/eZvhnwna6NaJDDEI4x2HVvc11MMQUAAYApIodtWFXFZNNnzDnKb5pMlj6GpMVGvepKysQAGKOxoozU8oXOf8AEDEW04/6Zt/6DX5Cacd99IfWVj+pr9e9aIkjcHuCK/JC/sv7G8TalZY2/ZryaLH+7Iw/pXTh1Zs+nyeVpS+X6np8diZNCl/64Mf/AB2vuj9ny8gsfgv4ZubmaO3torCJ5JZm2ooA5JNfH/wntbDxKYbO/l8uBxsYg9e1J4l1S9ECeHDrFzf6BpZFvZ2kmBEFU8FgMbm/2j61M1d2Po8ZQ+s0+ROx9NfEf9rTTtMM1j4Pt11a5XKnU5g32aM/9M1+9KfyX6181eIfFN94n1STU9b1CfULxxj7RdPuwv8AdUfdVfYcVyd7rENqpBYZ/uiucvvEEtySqHC0RgkRh8HRwy01fc6HV/EscAZICCem7/P/AOquT1DWJbpmLOeepPJqzoWg6t4q1BbPSrKW/um6JGOB9T2r6O+GX7JiJ5V74tlF3Jww0+DiNf8AePeqbjHVjq4uFPdnz54L+GfiP4iXqw6RYP8AZycPezjEa19OfD79mXRPB/l3l+P7b1QYPn3Q+VD/ALK175ofhC00mzjgtbeO2t0GFiiXCityLT1jHQVyzr30ieDWx85u0NEfP3j34T6V4rtJE1GxinYjCzBcSJ/unt+VfKvxG+A+v+DnkutLibWdOBJKoP38Y/3f4vwr9ILzQoJ1Y7Nreq/4VxuueEFcMfLDD1A4pQrSiTRxc4vU/M/R9aks5BNbSEYPK9MGvYvhv8a7/QLiPFwygHlWPBrW+N/gnwl4p1h30PeNbDHzNQsdv2VG/uyt/wAtG/2V/wCBFa46L4dRaWmTdidh32Y/rXZzKaufS4epKcbtH3H8OPjJp3i/STZX/kzxTpslt7hA8ci9wwPUV3Vja3ujL5nhi+S90/r/AGHqcx2qPSCflo/91ty/7tfnlYeLJ/CQ325I2nOB0r0LwN+05cWcirdSuMe+RWMqSktUbzpwqK0kfcmi+MLHWbo2LiXT9VXl9OvV8ufb/eX+GRf9pGZferV1brKDXknhz4n+H/iJp1vDqGycoQ8TltssL/3o5FO5W/2lZa7Szu9Z0iPKPJ4q0vH+ymoQj/x0T/8Ajrf9dK8yrhmtUeHXy+Ufep6lLxdY79PlwORX5k+HbfOqz/8AXdv/AEI1+oGoa3p+uaTez6fdJcpEpDqRtkiPPyyIeUb2NfmZ4cH/ABM5v+u7f+hGu3ANrmTNcvVnL+u56Bfxf8Sl/wDcr9Av2el2/BDwPj/oC2v/AKLWvgHUnA0l/wDrnX31+z7L/wAWR8D/APYFtf8A0Wtc+OXNT+ZtmH8OPqd+5whrnNfbEJroHb5DXNeIG/dGvEpnjo/KHcf+Ev1X/r/m/wDQ2rv5D/xKV/3B/KvPwM+LdUP/AE/zf+htXfy8aSPZB/Kvr5bH1FGOlj334N+Evt3wk8MTeXuLWSfzrk/il+zRZ+Jkm1DTIEsNYPP7viOU+jf3T/tdK+hfgBoKH4KeDsr9/S4W/MZro9S8N9SF/wAa+eeKqUqrszx/aNM/L9Pt/hbWJLO7R7e8t32lWGCcV9E/CD4qZEdvPJ7YJrp/2k/gsninRJdXsIgmtWgydo/18S/1WvlHwxrNxp99tbMc0TYZTxXu06kcTDmjuelh6t1bofevgT4kx+AvGUNxJKf7E1Zxb32fuxv0juMeq/db/Zb/AGa+oOpr88dG1OLXPDwjmIZWX5v9oY/wr6+/Zx8cv4z+HltDeS+Zq2jS/YLpieZNo/dSf8CjK/iGr5vMMPy++jHF07e8j1EpkVFJDuFWQM0Fa8E8sxLqxWQEEVzGr+HVmVvlz6EV3jxBgapz2oYEYyKSk0awnbRnzt8RfhFp/ii3cTxCK9Awl4i84/uuP4l9jXyD8RvhDqfg3UX8u3KdWCJkxzf9cz6f7J+av0o1TSFkVuMivPfF3gm01uyltL23WeB+xHQ+oPY17WDzGdB8stUdcKrifndofi660q4AjkeCRTgxvxzXvvw0+OHMcF3JtbgZJ61h/GH4DT6S0mowK1zZ55vVH7yL3mX+If7Q/wCBV4jIl5oF35U6mNhyrKchh6qe4/lX1kKlPExvE9GFS5+i/hLxysxS4s7kRTEDJ6hx6MO4r2bwz4uttdQQy4g1FR80BOd3vG3df5V+Z3w/+LV1o0saSSlovrX034G+JNrrMEWZQWGCCGwVPqp/hNeFjcsjXTlHRiqUlPVbn1uKK878L/EcpGkOpv59vwFvFHzL7SD/ANmH/AvWvQIpknjSWJ1licZV0OQa+KrYWdCVpo4ZQcNyaigHIoriaJuFFFFZWC45e9LTV606sZI0ixymlplOU1i0api04cim0A4rNxNEx1FFFZNGiYo4p1Mpy9K52jRMeOlPB4pi9KWsrFphQBmlApaznsVFhRRRXnSjqbphSikp4GKqESGwooorsitCLnkO6jcKZuo3V/WfKfgNx4PvSg4qMEUtLlHck3UbhTMml3UuUq48H3oz70wEUZqeUdyXdQGpm6jdWfKO5IDmimZFKDipsUmPBpQc0wNS1Fikx9FNBxRuqeUu46iiiiwxd1G6koqHEdx1PqjqurWeiafNfX9zHaWkQy80zbVX6mvkf41/tiT6glxo3gYvbQE7ZNWfiRx6Rr/B/vZLf7vfGSselg8LPFycIHtXxh/aL8PfCi1ktDKNV19l/dabE2Sp7NI38I/8er4l+IfxY8Q/FDV2vtduzKFOIrWE7YYR/dVe5/2jXGXV1Ne3Elzdzvc3Dks0kjEkmq7XBGcGsT7vCZfSwkdNX3Lks27PNRR7p5BHGu5icDFP0XR73XbjyraMvnqew+tfTnwc/Z92Qx314hQMATK/329lX+Ff9qlY7qteFCPNNnn3w0+A934jnWS+T5QQTG3ypF/10b1/2a+uvA3wz0/wrbKIolknwA0pXH/AV/uiuj0Hw1a6NbR29pCsMSDhUHA/z610VvbADpRY+Ix2aTxL5YaIjtLJUGcVoRRgdKaiH6CpkGKix4yY9VxTqQdKWnY0H0A4oorOxVx2ajLdaCeDUROc0rAY2qfdY+9fl/8AGK1sJ/iv4ln0u4ju7Ge+d0nh+45OWYj/AIFur6c/ar/aH8qe58DeGbn96fk1S+ib/V+tupH8X97/AL5/vV8q4qo6H12VYeUIupLqWfDPiW40Jg0blSpzxUeoeKZp5HYO3PvWbIACa9R+Hn7PXiDxqsVzPH/ZWnSDKzScyOPVVpvue/Oqqa1Z5VBJcancrFDFJNK5wscY3Ma9y+GP7MGreJvKu/ELHTbBsEW68yMPevoX4afALQfBESNbWatc4+a4mG5z9PSvX9N0WKFRgAH1PWoc0tj57E5l9mmch4F+GeleENPS00qyS0iAALAfO/1Nd3aaWkK/dFW4bYR1cRABXNL3tzw3UlN3kyvHb5GMYFSC2Hrms7xV4v0TwRpbajrmp2+n2gbYGlb5nb+6q9Wb2Ar5q+I/7Uuua95tl4QgbQLA5U6hcBWunH+yvKx/+PN/ums1C524fDVcS7QR7d8Svi94Z+GluU1Gfz9QYZi0u1IkuX99v8C/7TbVr5X+IXxl8QfEh5IbuQaRozcDSrRiQ4/6bSf8tPp8q/7Lda8/uZ8TTXE0rT3Mzb5ZpWJkkb+8zHljXO6j4lVQwjNbRgkfU4fL6dDWWrOjudUhtVIBFcrrXigsGVG/AVhy39zqEuyMMxbgBRkmvVPh1+zb4g8XBbq9QabaMMiScZJ+grZJI7ataNKN2eRmG41RwMOxY4VEGWb6CjUfCGsaKiSXFlPa7+VWdSpNfdHg34DaH4TQG0tQ9zjm5uFzIfoO1b2s/Dy21C1MNzaR3kR6pIN/60/bKJ4zzH3tD4G8LePdS8M3a+XK6FTkxscV9KfDD9ps2/lw3UxHQfMayPiP+zSsqy3WhqSRybSQ4Yf7rf8AxVfPureH7/w7dyQzxyRSRHDK6lWU+4qlKM0elRxEKq0ep+i1p4s8NfEAR3Lym11PYETULR9k4H90t/Gv+yylf9mvhfW/Cp8J+NdV08D5YbuQL/u7iQfyrC8PfEPVNBlUxXLgA9M1003jCPxFcG6uH3zt1zQoKOqOrzF1ad5LUxk8bcV+hP7P3/JEvA3/AGBrX/0WtfnbrMmy0mfsqE5/A1+iX7P3/JEvA3/YGtf/AEWteZjdKdjy8wdoRR3rn5a57Xv+PZ66Bulc9r/FrJXjU4+9Y8Wm7n5RQ8+J9SP/AE+Tf+jGrvLpsaW3+5XBQn/ipdRI/wCfyb/0Y1dveyY0xh/sV9dNaH11P4WfoB+z8m74J+Cf+wTb/wDoFdncQZzxXKfs8Ju+CXgj/sE2/wD6DXfTW4xXx1b+Kz5mc/faOB8QaGlzE5C5B6jHT3r89/2kPAJ+H3xEa6totthqWZY8DhWzytfpjd23Xjivlb9szwb/AGl8PG1CNMzadcq+R12nrXdgKvJU5X1OzC1LSsfPvw21qU2v2Z2yMZXP6ivo/wDZR8Vf2T8UbvSZHxBrNmQoJ486E7l/Eq0n5V8l+A77ypwc8Afoa9S+HHib+wfip4Pv921Y9XhVj/syHY3/AI6xr18XS9pTaPXrLmoyP0ojOakzUMZ60+vh+U+duOPSoyAc1J/DUfrWUogmVri1EgOBWDqGlhw3GRXT1BNbCQHHWpN0zzHV/Dyyq/yggjBBGQRXz18UPgFb6nHPcaRAkUjEs9ixwkrf3o/7h/8AHfpX1/dacHByuDXL6z4fWZW+Xnsa7MPip0JXTNoTcWfmT4h8E33ha7nXy5EjjbDxuuHhP+0P/Zh8taHhHx/d6DcphztB6Zr7T8efDGx8SwMl3D5c4H7u6jH7xf8AZ/2l9mr5O+JPwWv/AAtcPP5YWMn93PGP3Mvsf+ebex/CvrsNjKeJVnoz06dVM9o8AfGaK7VEeUA9wTXvXgr4gyWWHs5RLA3L2rn5T7r6GvzatdSu9Iudp3wSoeVbg17B8OvjNJZvHFcynAIGc1dbCxqx5Zq6Ou0aisz9JdA8SWevQbrZ8SAfPA/30/xH+1WvXyb4P+JcN8I5La42SDGJEbBH+f7te1eEfipDeiO31ZltpDwt2Plgf/e/ut/47XxWNyydBuVPVHFUoNK6PSKKKK8CxyWsFFFFZtFXH0UUVlylofRTVNOrFo0TFU0tNozWEkWmOpV70gOaUcVzSRomPWnUwcU+sLGlx1FFFYyLiwooorkcTdMVRTqKK0jEhsKKKK6EiLnje6lBFNor+tbH8/XHUtMBxTqVguLupcim0UrFXH0U0HFLuqbDuOyaN1MyaUHNTyjuPyKUGmUoOKmxSY8NS0wc0tRylpjwcUu6mA0tTYpMdkUZFR5NQX+o22lWM95e3EdraQIZJZpW2qijqSazLTLsbMBwB9e9ee/FP45eGfhVbkajdrd6owzFptu26V/rj7o92rwT4y/thSXKTab4DPlxHKvrMv3j/wBcV/8AZjXyvfaxc6ndzXF5cSXVxMxaW4lbLSH/AGmrmnOx9dl+Rzm+fE6LsekfFr42+IfiteyHUJzDpoP7rTojiCMf+zN7tXmZ4zSifI9akghac4HA9awTufb0qUKUeWCsisxzkV1vgn4a33iW5jMsbLG/3EHVv8+teg/Cr4I3WvOl1NBshByZXHC/T+83+zX1Z4Q+HWn+G4QLSHbIRh7huXf/AOtTSbPHxuZ0sNotWcZ8MPgZp/h62hlu4UaUAEQ4yoP+1/eNe2WVgltGFVQoHan2lksIzjLepq6q8VfIfDYnF1MTLmmyS3UY6VaUYFRxdKmVuKOU5birxTxTKUH1rOw0ySikDUoOak0TH0UDmjsaiw7hXiH7UHxp/wCFP+B5pbPA8Qai7Wun/wCw38U3/AV/XbXteecV+aP7TvxGb4nfFnUZY5DJpOlt9gtFB+U7W/eSD/ebd+AWhRuevluF+s1tdlueaQGWaWS6uXaWeVvMeRzku5OdzGppb/AwKQDg+9eq/ss/ChfiX4xm1i+hZtF004Ct92Z+4NK1j7ydSFCGp6j+zl+zmrRReJfE0QnupPnt7RjlY/8Aab/ar6osNCS3QJFGqAegqzpenR20KRRIERQAABWvDHsFYyd9D4fEYyVaTuQW2nJEMtyasLGFOcYxUgry74n/ALQ3hn4ciazif+3tdUYGnWbgLG3pNKRtj+nzN/s1lY5qUJ1pcsFc9MuLiKztpbieRIIIlLySyEKqr6k9q+ePiV+1xY6d5lj4Ihj1a66HVboEW0f+4v3pPqdq/wC9XgXxI+K3iP4pXJ/t29/0FG3RaZbEpaQ+mFH+sb/abd/wGuDudRFuDVKNz6jB5Vy+9WfyOo1vxZqPiXVJdW1zUZtU1GTrPcHIVf7qL91V/wBlflrKufEUZ+UEye2eB+HSuK1HxEzFgDisQa1IJupraMFY+hgo0lywVj0uc/b7aovh98JdZ+JGq3KWSYtLdj5s7dF5qvod4J7ZT6ivp39jbS45dK8VS4+9exj/AMcrNvlMMXVdKm5I6D4Y/s8aN4ViSR4Be3fGZJF+XPsK9n0/RI7VQCoGBgADpWta2SxLgLiri2/f+lc8pNnw1SvUqu82Zws4sfdFI1lFtPy1rCLA60GHIrEUXY4nUvD4nZiK858cfCrTfElu0eoWSykD5ZlGHX6GvdJLNWzxWVf6YHDAjIoTaOmnUcXdM/P/AOJP7OV/ozyXOjBr23GSUA/er+H8VeP6JO8N5sbIZTtYV+k/iTw9mGRlXPByK/N+yUHW7rj/AJav/wChV30p8yPpsDWlVTTex3NxzYknrsr9EP2fj/xZLwP/ANga1/8ARa1+d0//AB4f8Ar9Df2fT/xZHwN/2BrX/wBFrXHjF7iJzH4Ynfuetc94iOLeQe1dAx4Nc54kbEL/AO7XlJdjwqeh+UNo/wDxP78/9PUn/obV2F/L/oWM/wANcLaSY16/5/5eZP8A0Jq6++k/0L8K+omfYU37rP0i/Z0H/FkvA/8A2Cbf/wBBr0SUcGvPP2dP+SJeB/8AsE2//oNeiSDOa+NrfxJHy8v4kihcxZU14l+0fpv274UeKosZP2J5B/wE7q9ym+6a8c/aJf7N8LfFT/8AUPmH/juKrD/xYmlF2mj84fBk+4qf9muzkuvKv7CXP+ruI3/JhXEeCkxGp/2f6107P52qWMH/AD0uI0/NhX109j6X7B+t0RqQHFQx8cVKpzmvgrHzNyQH5aZ3pw6U0cmspIEOooorGxqmMkiDg8VnXNnkEEVqUjIGBBqbFpnHajoyTqwK5rg/EnhCO6glimhWaFxgqwzXsE9pnPFZV5pyuCCKcJSg7xNYycT4W+LX7PrWyy3mkRG6th8xt1fdPB/1zP8AEv8AstzXzlqWnXOg3RTkFTgNjGfr6V+oWv8AhYSBnjXB9PWvCPil8DNP8YRSugNhqQB2yoPlc/7Y719Pg80XwVT0KdY+X/BnxIutJnRWkZGHUE9f8a+ivAXxZg1KNIppBuIwQ3INfMPjX4ear4M1B7bULVojn5JV+449VP8ASoNB1250uVPnIweDmvelCFWPPB3R1qbP0f8AAvxMudGRI0Y3unHk2rN80Y9Y27f7p+X/AHete0aF4j0/xHamaxnEm3AeMja8Z9GU8ivzn8BfFt4GSOeTpgZzXtXhj4jlZI7yyuTDOv3ZYmwR/st6j/Zr5jF5VCq3KGjFOlGorrc+wKK818C/Gex1x49P1cpY6iWCxzA/uZz/AHc/wt/s16RXyFbDzoS5Zo89wlB2Y6iiiuewx9OFNpy9KwcTRC0UUVzyiWgU06m06uWSNUPFOHSmL0p69KwaKTH0UUVzyRrEKVRmkpy96x5TdC0UUVpGJDCiiitbE3PF80UzNANf1pyn88XH04HNR7qUGlyBckoBxTAaUNS5SuYkBozTAaM1PIO4+im5xS7qnlKuOBxTqj3UoPpU8pSY+nA1GGpQRUWLUiSimA0uTU8pVx1fLf7d/jC90rwloOiWk3lxahcySXCg8sqBdo/76bd/wGvqPIFeG/tKfCw/FfwqbSKXyNRtJBPZyEfKSAdyn/ZNYzi7aHpZbVp08TGVTVH5+W+ofaOKvWVhcalIY7aMyPjoKzPEPhvVPCOrTWGpWr2d5EcFWHDD1B7il0rVpIZVkRjHIvcV50lY/V4TUjrNX+HHi/w/4VvPEVz4dvZtItSFllhAcJnoW2tuVf8Aar2L9n/4Py+ItPtvEmsmBoplElrZ27blCn1PrWZ8IPjxqHhu5RPOGPutFNzG691I9DXuvg7RdOubyTWPhyYbGab97f8Ag+Q4trju0ls3/LNv9n7p/wBms4zjF+8Y42lXqUJLDuzPVPDnh6Gwto4441iijGFRRxXV28KhRxXOeENetPEdvJ9lLxzwNsuLScbZoG7qynkV1MabRiu+PK1dH5VONSlJwqKzRIiin4xSLgUtVYyuPHFOVqbRWdh8xKDmlBxTKcDmocSkx6tSg+tR04GsnE1TJQaXIqPNIXxSsFzgPjn42bwD8L/E+tRvsuLe1KW5z/y2kPlx4/4Ewr8ydNtwa+0f28/ET2fw00zTY22tqOqJuHqkaO3/AKFtr420UbhzUJ2R99kdO1D2n8xLc2U1wYbe1Qvc3TrBEoH8THbX6KfAr4bW3w4+HulaTDGBN5Yed8cs565r47+A3hc+K/jBosBTdDZK1y/pj7o/9CNfonBCqcAVmzLPcQ4ctKI+3h2CnytsFSgYxVW/kEcZYnAAyTUKJ8cmfL37W3x51Dw5qNt4I0W7fT5Lm3W5vryE4kMbMyqiH+H7rZPPavmL+0YcdRXS/tgTn/hecuP+gfb/AKl684sIWuIqTjY/RstoqGHUo9S9eawTuWPmst2lmz5j4H90feb6V0/w/wDh7qXxD1i4sdM2L9mwbiZ/ux5/nX1V8PP2d9H8Iol1JELy/wAc3V0uWU/7I/hoSsb4jF08OrPc+X/CXwK8S+LtktxG2gaa3O+Rc3Eg/wBkf8s/q2GrhvHvge28CeNbvR7PzDFHHG7NK+5mZl5JP4V+lM3h6NId23mvhL9o6xW1+MV+ijj7Pbkn1+Tk1rB2Z5mExcq1ZpmPoXy2ae1fXv7Ew3eHPEuf+f8AT/0WK+RNHTFsB6HFfXf7E3Hh3xL/ANf6f+ixWVW0mejmP+7M+m0UCpAM01e9PQda5LHwPtLjguRRtqRF607bWZqmQ7BUE8IZTVsio2HaosaJ2OI8TrttZ/8Adavy3tH/AOJzcH/ptJ/6E1fqT4q4trj6GvyrtZv+Jxcc/wDLaT/0KurD7M+lyp6y+X6notwP+Jf/AMAr9Cv2e/8AkhngY/8AUGt//QRXwBBAJ9NX3TFfYnw7+MWleEvhB4SsLeGTVdVi0+OJ7WJtkcLAdJZcFUP+yMt/s1OJg5wsj0cbSlVjFRR7tPPHa28k88iwwoMs7nAFeJ/Ef4xW8tu9p4ejjuW6HUbkfuf+2Y/5af8AoP8AtNXl/jX4m6p4suTJqF6WiB+SyQ4tkH+7/E3u36V5j4g8cfZ1bnmuSnQ6snD5co+9VZ5Trfw+fQ9VnmgmEts8jOePmySTVbV7wR2ZGei1b1/xVLfysqEkE9qk8C/DPxB8WfEEOi6JbNPM5BmlxlLePu7n0Feld21PSqzhCLZ+k37Of/JEvBH/AGCLf/0CvRax/BugQeFfC+laPbKEt7C1itYwPRVA/pWxXzFdKU20fIylzSciCZAc183/ALZniKLRvgzq0TNi4vnS0iHrlvm/QGvou9m8qJznnpXwP+2V48i8V/EOw8M2z77PRVMlxg8NcyfdX/gI/wDQq6MDT5qvodOGi6kzwrw9ZLaWe4jAx+ldP8K9FPij4v8AhLTMbkm1SFnH+yrbm/8AHRWMwENqEH0r2/8AYc8JHXvizea66brfRbVmViP+W0vyr/44Hr6GrNRi5HvVpezp3Pv/ABinL0pgOactfGNWPmObUkU8Uq8U1TTqxaLTHZFFNpy9KyaKTCiiis2jVMCMjFVprfINWaCMiosaJmJc2YYEEVy2t+HUnViF5rvZIQwPFULi1yCMVNjWL7Hz9458EWWrWMtpqVlHeWz9UkXI+tfFnxa+F9x8ONbsxoLrqtpqU/lQ6WWLXgY9Qg/ir7a+IvjOS9v7rRPDEMeo6hGf3+o3P/Hnaf7zfxv/ANM1/wDHa8/0vTNJ8G3MuoiVtT12dds+s3YUzyD+5GvSNP8AZX/x6vq8sVWCbk9D0qEJvV7HzQPhN43sP9dp3k+v79dyfX5q6HTtZ1Hw/wD8fXGK7Pxt8SVtlkVH4+vJrw7WvF11fO2XIX0zXvW5zra5T0DxB8WriWwaANtH1xX6P/BnXr3xR8KvCOraiWN9d6VbyzMxyXYr9/8AHrX5y/AT9nXX/jHrVrPdxPY+F45N8964K+av8UcefvN/tD7tfqDpNhBpen29naxiK2gjWGKNeioowo/IV8fnc6TUYR1kjjqzT0L1FFFfJGQ+ikBzS1DQ0KtOpg4p9c8kWhy9KKRehpa45I2iPooHNFc7Roh9KvQ0lKvQ1g0WhaKKKysaJjx0pV601elLVpAKeppKKKqwrniO6jIpmRS1/W9j+cbjwaUNUYOKcG9aLDuPBpc0wUA4qbDuSbqMimbqXIpWHzD8+9GaZS5xS5Skx4alBpgb1pQc1Nikx4NLupgOKUNUcpaY8GlzTKF61NiriuSBWJqsG8E4rac1XmhDipa0NYM8S+Ifwx0nxpavbanZrIoB8uYDEkZ9jXyV8TvgNrPgh5bu1U6hpgPE0S/Mg/2hX6D6hpiyK3Fcnq2hh1dWQOhGCCOv1rknS5j6HAZnUw3uy1ifm3a3TROCCVYHrXofg34m3/h+4idZ3XYQQysQR9DXrXxW/ZxttX87UNAVbS95Zrfokh9vQ18v6vY6joN9LZ38L288ZwyOMGvLqUnHc/QMHjoV43iz7i8GfG7R/GYtzq10dL1yMAQ6zbjDeyyr/EPevb9F8ZOskNjrSx291IMw3cTbre6H95G/pX5eaH4mmsZFw5GPevoL4W/HqXTbddN1ILqWkuRutZj933Q/wn6VhCU6TvHY1xeAoY+Npq0u591KTmng15x4H8WR3dgbvSp31fSwoM1u53XdoPU/89F+ld9pt/b6larcW0qzRN0Za9OnVjUV0fm+YZZXwDvUXu9y5SrSDgUVseRclXpS1GGp4NHKWmPBzSjiowacGrJxNUyQGq8z4zzUm6qtw3WsrFHxt+3/AHu648D2oPAN3MR+CCvmzw8Nymvon9vmH/TfBlx6LdR/+gH+lfPHhX5gR71hUVkj9Nya31WKPo79juy874karMRxFaxqP/Hq+2Ixivjf9kmJrH4janG3/La0iYfrX2QtZxjc+fz/APjr0J81Q1Fvlq3urN1F8CtOU+aPzv8A2vOfjbN/14W383rh9BH+jCu4/a8/5LZN/wBeFv8AzeuI0H/j2Wspn6hlz/cU4+R9DfsY2Hm6z40lx1+zrn/gLV9cQWQiXgc18yfsUWwNz4xOON9v/Jq+rtgxUHyuazccRKJiXibI29K/Pj9qm5CfHDUB/wBO1v8A+gmv0R1GLMb1+c/7V0ZHxxv/APr2t/8A0E1aReUy5qr9DM8NL9oh/wCBV9cfsWQ7fDviX/r/AE/9FivlX4aQR3UyQyPsDN1xmvt74UaDp3hzTvM8KXg+0XADXVhfnMdyw6upJ/dn/wAdrCWh9VjqE6+Gcae57FinrwaytO8SwXshs5VlsL8dbW4+R/8AeT+8v+0talZqx+dTpTpS5ZqzJ1fApQ+ah3UbsVHKNMnzUTdTRvqnq2p2uj2E17fXMdnaRDLzzNhF+pqOU1jqcx4qX/R7j6GvybtmI1e4/wCu0n/oQr78+Kf7QMeoiaw8KqUXlW1W6Xn/ALZxt0+rf9818caz4Ii02YyxTebEP++q1oq1z7HL8PUormkjtvhjqNtHqVs1+oltowGdSM5Fdj4l8fwS308kUYigkcssa/IB9BXhB1D7PwKo3OpSTZwcCt2rnuqVtzufEvxCaUvHC24+g6CuLNxeazeRwgS3E8rBUhiXc7H0Ve9d38LfgN4m+JM8U0MX9n6SeX1G9T76/wDTOPv/AL33a+zfhP8AAPQPh1bD7BbCfUGUCXULgbpX/wCBdFH+ytZSlGmjzMRjoU9Lnz58Jv2S9T8QCG/8UTNpVk2GFjEf9IkH+038P/oX0r7T8C+BdI8DaPFpmjafDp9ogHyRD5nPq7fxGrlhpMdtgkbmrctgMH8K8urWctD5+pipVvJE68Cn0Vz3jvx1pHw88Oz6zrNx5NrH8qovMkrnoqL3JrkUObQwipTfLE4L9oP4u2Xwl8EXeoSsHv5M29jbk/PPMQdv/Af4m/2RX50Wktzf3V3ql9IZby7la4mkb+KRjkn8Oleg/Ffx1q/xa8W3Gt6p+5tYiY7KxHzLBDk9f9pu5968+1K5SzhWFTjj9K9zDUlSj5n1WFw/sY67lTUtSIyinmv0R/ZE+G3/AAgHwksZriLZqmsEX9zkfMAw/dqfouP++mr4/wD2W/hC/wAWPiAt7fRFtA0l1nvSR8s75/dw/wDAv4vZf9qv0ntx5VcWNrW/do48wrX/AHcS3Tgc0wcinLXiM8RMkHIpwOaYvelrJo0TH05elRqcUuRWbRSY+igHiismjVMKDxmiuJ8e/EzT/B8TQjF5qjD93aIfmHu390U4UpVHZG9OMpuyOi1zxFp/hrT5r7UblLa2jGWkc9a8O8Y/Em/8YRyxRPLo2hyAjAO26ul9QR/q1/WuH8W+NbrWb37bq9yLmaM7oYf+WNv/ALq/xH/aNeV+Lvin9nLgzEn68/8A1q9yhgox1Z7lHCqC5pnf614w0/RLAWtq0dtBH92KE7QPevEPGXxKaZpI7dySeN1cTrvjW51OR1VyEPoa6b4SfA3xH8X9URrOJrHS42xJqcw/dr7L/eNexaNGHNLQ6nVjFWOLitNW8ValHaWVvLfXcx+SGIZY19T/AAQ/YviT7PrPjhlupTh49KjP7sf9dG7/AEFe8/CT4DeH/hbpwi0y1FxdsB5uoXIDTSn/ANlX/Zr1e1sACC5y3vXgYvM5SXJS0R5lWvzOyGeHdGt9JsYre3gSCGNQqRRrhVH0raXimxoETApy9a+Ulqc97kgpaQdKWsS0x1OU02ioaLTH05elMByKctc8kapj160tNHFOrlkjVMcvSlpq96dXO4miY+lXoaYvenL1rBxLTHUUUVlYtMcvQ0tNWnVSRVwoooosTc8MopmaXPvX9e2R/Ntx4NKDmmbqUEUrDuPHFKGpgNKGpWHcfmlqPIpc+9Kw7j+lGTTc0bqjlKuPDUtMDUoPpU2KTHg04HNRhqUEVFi0x9Lk0wGjdU2KuOZqbmjNJWdi1Ihli3ZrPnsw27itbHFQyJ1qOU2jNo47VNGDBio/CvKviT8INK8dWjx38AScD93dIPnT/GveZbYODkVmXelq6njIrKVNSWp2YfFzoy5qbPzd+I3wg1v4d3bG4ia508n93fRDKkf7X901zGl3z20n3iMV+jev+FIL+3lgmgSeCQYaOQZBFfMHxV/ZrlsjNqPhlSycs9g3Uf8AXM9/92vPlh2tj7/L85p1koVNGc18PfivqXhO+hntbuSMoRgq3I/z6V9bfDn4xaZ4zEbxXEWk622N4Jxb3J/2h/C3uK/PJZZrCdoplaORTghhjmun8PeM7jS51eKVkKnsa4JU3F80dGfWXhWh7OqrxZ+o2layt8zQSobe8T78D9fqPUe9aWa+RfhX+0FbahbW+m6/ungjwIp0bE0H+6e49q+idM8WCC1inubhb7TnwIdRh5H+7IP4TXRSxGtpHwuZcPypXq4XWPY64PzT1aqqtk1Khr090fFE26nK1MHSlXvWbLTJB0qrcNwas5wMVUueQazsa3Pkr9u3RmufBfh/VEGTZ6l5Ln0SRG/qq18seD3/ANIYGvv79oXwd/wmXwr8Sacqb5xbm5h9fMj+dcfXbt/4FX52+H7w2t4hPy84I9K46q0P0PJKqnQ5V0Pqv4H3v9i/EXQb0thLhTZP7lvmH/oNfao4r4B8EXR1CyRIG23UZWSJs9HU5X+WK+1Ph34uj8X+F7LUAcOyBJV7q44INRhndtMw4hotKnWW2x1LNWVqT8VoO9ZOpNwa7LI+Jufnx+123/F6ZP8Arwt//Zq4rQj/AKOn0rtv2uoz/wALnkP/AE4W/wD7NXD6IuLZPpXHNan6nlz/AHNN+R9YfsQDc3jE/wDTaH/0GvqfHNfLP7Dgz/wmP/XaH/0GvqgjBrOx8dnEv9skUr1f3b/Svzq/a54+OF1/15W//s1foten9030r86P2uT/AMXwu/8Arxt//ZqpG+Tv9815HCabdTWkSywsQwr0LwL8ddR0G5RJpm2KfWvPtJTfDsPQiuc1iWCy1MwF8E0nFPc+6UnBaH6BeB/j7pnim0itdU8u6QYKlz86H1VuqmvU9G1+7aESWFz/AG9aY/1TsoukHsfuyf8Ajrf71fl9pOu3ukSLJFMyqO4PNe4/Db4+3GmyxrczkYx+9B/mK53T7GdajRxMbVUffWka5Z6vHIbWbzHiO2WJlKyRN6Mp5H41fDZ6V4Z4V+L2i+NY4Xu22XSqFjv7V9kqD0z/ABD/AGW+WuQ+Onj7UVnXSm8RfbtPRMNFap5Pmf75X73/AKD/ALNRr1PnJ5G1L3J6Ho3xC/aM0fw2JbTQ9muaoOC8cn+jQn/ak/i+i/pXzV4v+Jus+NLw3Gs373rA5SAfJBH/ALsY4/4Efm/2q43VfFYVWjQhUH8CdPx/+vn8K4bVvFMl0WEbYHtTULnuYXA0sKr21Ov1jxZFBkGTzHHRQeB/QVxOp+IJ9QYgNhewHSsaSaa7uoreKKa7u5ztitrdd8kp9FXvXvfwp/ZZ1LX/AC77xY/2OzOCulW7/vG/66yD/wBBX/vqtVFRRrWxkKSvJ6HkXhDwHrnj/Ufseh2TX8wO2SXkQxf774PP+zy3tX1b8Kf2RNG8OyQaj4gkGv6mpDKrLi2iP+yn8X1b8hXt3hDwTYaBYQ2WnWcVrbRLtWONQqqPwrtYLJIlHG5vXsK5p1Hsj5jE5lKq+WnojJ07QIoK3ra2WJcAU+KAAZxUoGK4ZXZ5adxq9asJx0rzz4gfGnQPAbyWhdtV1lRkabZnLL6eY33Yx7t+VfOXj74wa742Z49SuxFppPGl2DFIP+Bt96Q/72F/2amNJs9TDYGrX12Xc998cftCaZowmsfDyxazeoCr3hY/Y4z/ALwI8xh/dU/8CU18y/EPxHqfjK7a71S8kvJsFVeTgRqf4UT7qr/nLVyur+MvswPIFcRqHjue7nKhvl+tdtOgkfT0MJSw693fuT+J9RSwhcA5A9O5rC8CeA9d+LXiyDRNFiLzStumlP3LeP8AikY9hV3UANQtvm5r7M/YtsdJf4Tiays4re/S9lhvpEHzSspyjMfXawrWpP2ULonFVXSpuSPUvhR8M9K+F/hOy0TSosQQDc8pX5p5D96Rv9r09q9AiXLc9BUVsBzVgcV89O8ndnyfPzaslHtS0ynA5rJokcppabS7qyaGhwOKN1JkUZFQbIkyaVpUt4mkkOFAzzWP4j8Uad4U0x7/AFO5S2gX+Jzivnf4h/F298Xh4C76fpH8FsjbZJh/009B/s1tSw7rOyPRw+GnW16Hd/ED40uwlsPD0iqBlZtRcZVR6R+p968F1/xRFZ+a4lZ5X+aSeVsySH1Y+ntXM+J/H8djEyK4CqMKo4C/h2rxzxH41udQdwrnYe/XNfQUcLGmrI+hpUYUF5nS+L/iM0zSRwPn1avL7q8vNavVhiSS5uJThIoxlmPtXSeAvhz4j+KetLp2hWbTjIM9y/EcK5+8x9K+5/gj+zLoPwtgiupoU1XX2GXv5UyF9o1P3frSq4inh99WYV8TGK0PDfgT+xpPqRh1jxwrW9scPFpSn53HbzG/hH+zX2r4d8LWehWENrZ20dtbxKAkUS7VUfStKy05IQCRlv5VoKmBXzOJxU6zd2ePKrKbGQQhBVyGPuabGmeT0qcEYry2ShQcU6mUqnFYtDQ8HFOplKDismjVDs04HNNoHFZtGyY8HFOplPHIrCSNEx9OHSmL0py9DXNJGqY4cU6mU8c1g4miYq9acKYKfWDiWmOooHSisbFoVetOplPp2KuFFFFKxNzwbcKXNMor+wOQ/mfmJAcUBqYDinA5pcpXMPB9KUNUdKDU8g+Yfupcim0UuUfMOBpQcUyjNLlKuSBqAaaDmipsWmSA4pd1Rg4p1RylJjgaXNMozU2LuSL3paYp4p4NZtDTCkK5paKysaKZEYwaieDINWqCOKixaZg3NkHzxXP6npAdW+Wu2eENmqNxZ7weKlo3p1GmfNnxU+BGl+NI5LiONbLVAPluUXh/Zx3+vWvkzxb4P1XwPqklnqMDRsp+WT+Fh6g96/Sm+0sOG4rg/Gnw/wBN8U6fLZ6laLcQsO4wy+4PauWpRU9VufX5dnM6PuVdUfBOleIZLOUFXKkGvdvhR8er3w5MImlElu/yyQS/Mjj0INcH8VPgNqvgh5r6xD6jpIOTKq/PF7MP615zpt88DgE4IryqlHoz9Bw+KjVjzU3dH6X+BfHVprNgLnQ3NxEBmbSpWzLH7xN/EvtXoWmapb6rbia3fcOjL0Kn0Ir83/h/8Tb3w3eRSQzsu0g8HpX118OfivpvjCON3uU0zXcAfaycQ3P+zMvZv9qlSrSovlnqjyMxyWjjU6tD3Z/gz3MU+sjStaF3IbadDbXiDLQsc5H95T/EK1a9OMlJXR+a4ihVw0/Z1VZjy1QSnKmlL8VGW61djJMxNZ/1Rr8zPjX4Nl+HXxK1fTolK2csv2qzP/TCTJx/wEll/wCA1+m2oxhyQeRXzR+1Z8I5fHPhZNT0+LdrWjh5oIwOZU/5aR/1X6f7Vc1SF0z6HKMX9Xr2ez0Pn74a+KjBLES+CCAea+sPhl4wTw3qP21WxoOqOEvAP+XS46K/+63evgXQr97C5V8lcHDKex9K+ofgn8RIIT9kuwtxZzgR3ED8iRPf6V5bTg+ZH6U40sXRdGpqmfbZY1Tu135zXG6Drv8AwhlvAlxcNf8AhacgWuosctZE9EmP93/artboq6K8bq6OuQy1306qmj8xxeAqYKp7Oep+f/7Xij/hcsn/AF4W/wD7NXA6QQLVPpXd/teS5+Msn/XhB/7NXnukyf6KlZzP0DLv92pvyPrb9hs5Xxj/ANdof/Qa+pZGr5W/YYbMXjE/9N4R/wCO19Tyc1mlc+Lzd/7bIp3jZif6V+dP7XR/4vfd/wDXjb/+zV+il0f3T/Svzq/a6H/F77v/AK8bf/2aix1ZM/37OP0Qf6OPXFdt8IfB0XibWPFazwR3UKxW6mKVMj/lpXE6J/x7j6V79+yTZ/btb8ZsP4Y7X/2pUJ3dj67MJqFBs8+8Wfs7zWJkn8MSeV3OlXhzGf8Arm3Vfx+WvLr3SLrSL97S8t5tKv16wXAxn/aVvusvutfond+FYpVbdEpB9BiuO8XfDLTPEdi1pqFlHdw/wrKOU91bqDTseBhs0cHyyd0fFWjeL9R8PXIaOR1Of4T1re1H4gXmvgiU8+ldH8Q/gDrXhrzrjQ1k1rTxybeYf6ZEP9k/dkH/AI9/vV5HuMLv94OhwyMu2RD6FahxPpqOJhWV4M62z8Pav4jnSGyheUt/drqR8APFlh4p07SfEEdt4V0+9/1Os3DrPBM39yJ1+XzP9mRl/wB1q4jwv41n0e6RvMKgHIINfTPw+/aBTUNLk0vVoYNS0+4Ty5ra7UNFIvoVNZvQ2lFyVj0v4X/s9eHfh1AGsLUzai4Hm6hdjfNP+P8A7Kvy165p+hrEAZOv615z4LuntoQ3hC/S7ssZbw1q02Sg/wCne4b5l9lk3L23LXpHh/xPY67JLbp5lpqNvgT6ddr5c8P4H7y+jLuU1zOd9D4/G4SvTbm9UbNtCsSBVGAP1q0oqleX1tpdjPe3txFaWkC7pJ53CIg9yeK8E+Iv7TMjebaeDrZGQZVtbvYmEQ9fKjOGk/3m2r/vVha5x4fC1cRK0Ee5eK/HGh+CNNa91nUFsosfu487pJj6Iq/Mx/3RXzx8Qv2htY8R+ba6UkvhnSzxmP8A4/5h7t92H/gO5v8AdrxXWfFE11qE19e3suoajKMPe3ThpCP7q/3V/wBlflri9Z8crlo4iWboWNaxpn1eFyynQ96pqzqtV1+CxhdEIjjJLMM5Lt6sTyx9zXDax4zmbcsZ2j1rn73VZrxyWYn610PgX4Q+JviUSdJszHZH72q3albb/gHeX/gPy/7VdMIKJ6dSpGnHXRHHajrjSbnklwCcbmPf0qhp+orcyyp5U8LRthkuI9jDr2r7B8Jfs06H4EMV7Osus6wuD9vvFB2H/pmv3Y/+A/N/tV80/F6D7J8Xtcgz91Ih/wCOVqpRexw08V7SVkX7GQSWg56gV9b/ALB94G0PxhY5yY7yGbHpvjYf+yV8Y6ddMkIGe1fXP/BP1zIvjljz81l/OWuLE/ATj3eiz69gTAqWkXjNLkV4tj5JMeOaKaDinDms2jZDgc0tMHFPHNZ8tykFcP8AET4q6X4HtniDreaqw/dWaNznsX9BXBfFD49ppxuNL8PyLNecrNfdUh9k9W96+cda8VHzprm5naWeQ7nmkbLsfc120cNfWR7+EwDladXbsdh4v8f32vXzXmqXP2if+CMcRxeyj+teSeKviF5e8JIQPaua8VePWlLxwtwfSuNsbTVPF2qRWGn201/fTHEdvAu5m+gr2oUuVHtynCmuWJJrHii41CR8MVT+dex/A39l3WPiO0Oqa6JdJ0EnK5XE1wPRQein+8a9c+A/7INj4a+zaz4sVNR1TAZLHrBAff8AvN+lfVen6ZHBGsaIAqjAVRgCvNxGNULwp79zx6+LT0ic/wCAvh/pHgnR4dO0iwisbSMDEaDlj/edurN7muyhtwnbn1NSQ2yxD1NTKvtXzs5ubbZ5bk5O7BFqXFA6UVg0NDxx0pQ1JRWVjVEimlptKprJo0Q4HFOplKDisWjREmaWmU+sWjRDl6U5e9MXvTl71izWJIvenL3pi96eveudo1iLTl702nL3rFo0QtPplPrCSLQq9KWkXvS1hYtBTxyKZTl6UWHcWm5NO7GmVIjwTNLTM0A1/Y1j+YOYfSg0zdSg1NilIfSg4pgNKGqLFpj8ilzTAaM1PKVcfSg4pu6lzRYdxwOaWmUoao5SlIeppaYDmlBxU2LUh1FIGpQc1FilIfSg+tIOaKjlLTHil3VHnHejd71HKUmSbqTNMDe9KDU8popCkcU0rwafRUcpSkZs9sGJrLu9MDg8V0RQGo3gBBqeRGqqNHnmr6AkyOjoGVhggjIIr5u+LP7NUNz52o+GVW2u+XewPCSf9c/7v+7X1/e2YYHiue1DShKrArXNUpKSsz2MHmNXCyvBn5ryR3Ok3clvdRtBPGcMrDBzXUeGPG0+jzq6SFcH1r6b+LPwR0/xtbyTKi2upqPkulH3vZv8a+RfF/hDV/BOpy2OpwNEw4D4+SVfVTXkVqDifpuX5lTxkUou0ux9f/DL472ur2NvpussZ4o/9VMGxNEfVW/pXv2j+L/s6QpezLcWM3FvqcZ+R/8AZf8AutX5f+H/ABHNpcy/OQAeDX0V8JfjhLpP+iXTLdWM2Flt5eUcf0PvXHCUqTvE7sXgqOYQ5Kq16M+3C3Wkrzbwp4tihsVu9NmbVdCxmSAnNzY//HEr0GxvYNQtUuLWVZ4HGVdDkGvVpVY1FofmGY5XiMvlaorx79BbmESKT3rnNX01bmJ1ZQciuq7VRvLcEEitrHmwkfCf7SnwOk8P6jN4m0OAnTJT5moWiD/j3f8AvqP7rf8Ajv8Au14zoWvT6NcJJE52A9u1fpJrWkiZJVeNXRwVKsMgg9j7V8kfGX9nSXSXuda8LW7SWfLz6aoy0fqYx3X/AGa46lK60PuMpzOOlKu7eZ2Hwh+P72Sra3TLPaSDbJDJyso/uste1aXfiSH7V4I1KJFIzJ4e1KTEJ/64v1j+jfLX53W2oSW+cV2Phn4o6roci+XMWRegJOR9DXlShKLvE+wn7KvHkrxuja/afu766+LbtqWmT6TdizhV7edlbsfmVl4YH19jXI6Wf3Aq78QfEo8c6vFqlyzPcpAsOWbPC5/xqlpf+oFbJt7l0qcKMVCnsj6x/YWP+g+Lz/09xj/x2vqs9DXyx+wtDjSvFxz/AMvkf/oNfU56V1wV0fnOcu2MkULs/I9fnh+14P8Ai911/wBeNv8A+zV+h93916/PD9rz/kt93/142/8A7NQ4nXkmuIfocZofNuPpX01+xZZZu/G7kc7rUZ/CSvmnwTdWy3aC5/1Q+8K+wvAl74LvLGz/ALGl/wCEY1mNAkeo2fzb/wDZuIj8sw/3vm/utXA3yyufZ4rDSxVFwi9T3b7IrL0FUrrSI5QcrXM2HxJn0KSO28X2sNmrnEWt2O5tOn/3m+9Cx/ut+dd3DIlxEskbrJG33XXkGt4zUtj88r4ephp8lRHD6p4ZDK2FyPpXkHxF+BmieMVd7m28i8A+S8g+WVfTJ/iHs1fSctuHB4rGv9HjnVvl5q9wpV50XeDPzk+IHwf13wHM73kJvtP/AIdStVJA/wCug/hP1+X3rlLO8utMcPE5KjuP6jtX6Oal4XWRXBQMDweOteC/Eb9nHT9Wlku9F26PfclkRcwS890/hPuvrUuKZ9RhM2UvdqHlvgP4yXWjyxh5WAU5HzdPoa+k/Cfx40fxXbW9trMa3vlf6qQt5dxAfVJB8y/jXxr4o8F6p4SvzbaravYS/wAE3WGX3Vuh+n3qyrfULu24z0rlnSTPpadWFRXWqPrD4wfEA6vqxt21S71Ows+IReOu1f8AaZF+Ut/tN81eO6z45X5ljO8+vavOpNevJ+JGYj60/TLO81zUIrOzt5ry6lOEgt03u30FTGmkF401aCsi5qWtTX8h3OWJ6AdKm8KeC9c8b6kbHQ9Om1C4A+d0GIYT/wBNJDwo9uW/2a99+GH7IUt+Ir7xjceSpwy6TaPyf+urj/0Ff++q+qfC3gfT/Dmnw2dhaRW0ES7VjjQKoH4Vq2oo8SvmUaTtDU+e/hZ+yDp1gYb7xbMuu3qkMLQKVsoz/u/8tD7tx/sivpHTtAt9MgSGCJURAFVVXCqB0AFbttYLEMkc1Ls7YrjnUb0PnquJqYiV5vTscX4j05VhJwOa/OD4pOdR+LviWfrtnWPP+6oFfo98S9et/DPhPVtVuseVa20knPqAcV+aFm8uoT3F/cfNPdSNM5PqxzW1Ha57eXRcm5D4x5cJNfan/BP/AEv7P4G8T6iRzd6ksQPtGgP/ALPXxVctsjIr9IP2WPBz+DPgf4ZtZU23NzCb+b3aZi4/8dK1livgsdmYTUaVu567uo3UlFeOfKJj6dUe6uY8c/EvRvh7pRvdUlYu52wW8YzJOw6hRStc6qMJVXyxOg1XW7LQdPlvtRuY7S1iGS8hxXzJ8Vvjpe+LBLZaW76do5+UtnE1wP8A2Va4X4h/FHUfG1+13qdzsgU5is1OI4vr6mvJ/EnjQxhhGxx6+v19K76OHtqz67C4GFFc09WbWs+KEtwyRnLegry7XvFk+oyMquQnrVDVNdlvmZVJSL9T9a9m+Bn7Luo/EJ4NX11ZdN0LOVBGJLgew7L/ALVehaNGPNM6q1eNOOp578M/hB4k+LmsfZdMgMdqrf6ReyAhIh6f73+zX3n8HvgL4f8AhXpypY2/nXzgedfTDMsh+vZfau28HeCdL8JaZDp+lWcdpbRjAWNcZ+tdXDAF5xzXi4nFSq+7HY+arYt1dI7EFtbRqOFX/vmtCKMAcfypUAHapVIry2jjTY9ABT1pgOKUNWVjRD6KAc0VDRaYq06mjinVg0axY5elLSL0NLWbRrEdRQOlFYNGiY8dKcOlMXpT16Vi0aocvenL1pi9aeKxaNEPXvTl601etOFc7Rsh1KvekpV61k0aIdSr1pKBxWDRY+nDpTacOlZWKQ5elLSL0pamxSEPSm0ppKzZSZ8/bqXIpmRS1/ZVj+V7jwaUNUYOKUN61NikyQGlzUYpQcVFi0yTdQDmmbqUHNTYq5LkUU2ilYdx4OKUN60wGlBzU2KTH0oOKYDilDVNi0x+RSg4plFRYpMmBwKM1FupQc1Fi0x+aKaKd0qbFphTxyKaBmnVFikxynilpgOKXdU2LuOpKWis7FJlWWINmqM1mGB4rUYdaiZM5qHE2jI5e+0sMG4yK4Dxx8OdN8V6fJaaharcREHBI+ZD6g9q9fktg+eKyr3TgQeKwlBM7qGInSlzQZ+d/wAVPgtqvw8uXuY4nutFdsJcKM7PZvT61xelanLYuCGO3+VfoxrXh+K7t5oJ4Unt5RteN1yrCvlT4wfs7T6K0+r+Go2nsuWlsurx+6+orya+Gcfeifo+V53HEfu67tLuQ/C/4w3nhy7jeOcgA888Ee9fUPgbxlB4gc6hoEsNnq0p3XOlO222vD/eT/nnJ+h9u/56W9xLaSnGVZTgqeK9D8D/ABFudHuI3SZlKkdDXm8rT5o7n17dOtB0qyumfo3oPiK11+KTyw0F1Cds9rMNskTehH9avSjOa+ePBXxVsvGMcMkt+NL8RRgLbauqbt3+xcL/ABx/+PLXr/h3x2mpXjaRrEKaZr0a5MKvujuF/wCekLfxKa9LD4hT92e5+d5rkksI3Woaw/I2rqBZEIxXK6vpWQ/y5B7Yrr25+lVri1EqniuuUbbHy0ZuLPmf4ofATRvGYlu4oRpurEZF5brguf8Apov8X86+cfFnwg8U+EGZ5bI3dop/4+bMeYoHqy9Vr9D7rRVcH5fyrn9Q8LrID8mfw5rnlSjJao+gwecVsO+WWsex+cwHFbOkNujAr3/9qDwFBF4OTWYII4LuyuQJpI0+Z4zxz+OK+dvDM26cqTXnTjys++wWLhi4c8T7E/Ykn2p4us8/vQ9tNj/ZIZf/AGWvqLPFfFf7OviIeD/iZYuz7NP1ZP7PlJPAf70Z/Qj8a+z8100tj4vPqbp4nnf2ivdfdavm/wDaj+CQ+JFtaarpYEfiCwQxrvGxbiH7xiZv4fm+63+0396vpCYbs1i6zZfaLcttywGCPUVo4niYfETw9RVIPVH5bavp1/oGoS2N/azWN3H9+GYYYVreHfHd/okq4lYqD619r/EX4W6T4xsWh1GyWUgfu5lGJYz7N/Svl/x7+z3rPhsy3GmA6zZLzhR/pKD/AGl/i/4D+Vc0qVz77B5vTruz91no3w5/aClSP7PdSLPbuNskMwDK49CD1r2XwnfiMfbPBWpx6cX+aTQNRlZ9PnP/AExf70DH/vnmvgGCWaxl3RkqQcEeld54P+Kd7osq7J2UDqpPBrkdO2x70uSvHkrRUkfoV4b8f2msagukajbTaF4gxk6dejb5nvE/3ZF91JrqZrQg8rzXy/4M+M2leL9Pj03XYY9UtRgpFOcSRt/ejb7yt/tLXrGg+I9W0GFW025k8ZaGo/4852U6rbj/AGW+7cKPT73+9Uqq4u0j5bGZJa88K7rsd1PYgg8VhaloSzhvl59a1fDnjHRvGFs8ukXi3OziS2cFZ4j3EiH5lNXSAa6ou6uj5dxlTfLJWZ5N4k8FWuq2ktrfWkd1buMMkihga+ePF/7LlwDJc+GphGOv2C9dtn0STGV/4FX2rdaalwDgAH0qtHoYU8gCoc0tGd9DGVaHws+KPB37KfijXp1Oqm10Ky674pVmnb/dX7v/AH1+VfU3wz+Cvh/4eaf5WlWY+0OB5t1L880p9Wf/ANl6V6LZ6YsY+7+JrWgt1QdMVjKemhrWzCrWVnsVLDSljUEitNI1QYApyjAormdzi5r7hTMU+vLPjn8arH4S+HZCCl5rl0hSxsg2Mt/ff0UVly3Z04eEqsuWJ4h+2l8S0uxbeA9Pk/eOVutRZT91B/q0/wCBfeP/AAGvmLAhUip7u7ur+8u9S1G5e81C7kM09xIctI56n6egrJubrJPNd8Vyqx91hqKo01E6v4YeDJPiP8SdA8OxglLy6UTsB9yBTukb/vkGv1Sghit4kiiRY4kUKqKMAAdK+T/2F/hY2laHfePNTg23eqp9m05XHKWqnmQf9dGH5L/tV9Xg8V52IlzOy6HgZhWVSpyroS9jUZNLjNfN/wAZv2jyvn6F4SmWRwuy41X+GP8A2Y/U1xqDZxYbCzxEuWJ2fxb+PeneBopNN08rqWusvy26H5YfeRv4fpXyX4i8Z3er6hLqWo3b3l7Ifvufuj0Ufwj6Vzmp6wYnlbzGkkc5eRzlmPqTXFaz4gkkZlRseprvo0EtWfY4bCwwsfM29e8VfeBfJ7KK5FGvddv47a3ikuJpm2xwxDJJqx4O8Ga38SfEMelaLavd3Tn5n/gjH9527D3r73+Av7OulfC62+1yn+0PEEn+uvf7n+zF/dWumdSNJXMcRjY0dN2ed/AL9k+PTxBr3jCIXN4MPDpjfPHD6GT+83+z92vq/T9MSCNURAiKMKqjAAqe0tViQKowBVuNNteFWqSqu7Pma2InWd5EsUCqOlTqopqdKkXtXLYzjsPUClJxSLSnpUtGiFHSigdKKyaNUPpVNJRWTQ0x1OXpTQc0q1g0aJj1606mDin1m0bJir0paRe9LWDRomOXvT171Gvenr3rNo0THDinU2nDpWMkapjxT6jXpTx0rnaNUx4pRxSL0orJo0TH0UUVztFpj6cOlMXpT16VlYtMcvQ0E4pAcUZpWLTEoyKQmkrJodz58opmaXPvX9lWP5TuPBpQc1HupQRU2KTJBxShqjBpQ1TYtMkzRTMilBqbFXJaXJqPd70ob3pWHckDUoqLdSg1Ni0yUGlBFRhvxoDVFikySlyajDUufepsVceGpwNMpQcVnY05iQHNPBzUIb8KcGqbFJkoOKXIqMN70u6osWmPzRupuRRU2KuPoplFRYpMfSEcU2iixomNK1BNFuU1ZxTSvFQ4I1U7GNcWYYEEVgajoocNhcg9q7KSEEGqc1tkHisJQOmnUad1ufKvxh/Z6t/EIm1LRkW11cfM0QGI5/8ABq+XL/T7zQ7+W1u4XtbqI4aNxgiv0y1HSxIGwOa8g+KvwZ03x3aOZIxb6ig/dXSDn6H1FeXWw19Yn3GWZ44WpV9V3Pkbw74sn024VlkMbA9QetfR/gD4p6f4m02HSPEO9lQg215E22e0f+9G3b3HSvmfxl4I1XwRqj2epQMmD8koHyOPUGotC8QS6fKoLkAHhvSvJnCz13P0GjWjUhdO8Wfop4Y8aXWlT2+l+IZUmScYsdZjGIbwejf3X9RXogt6+M/hb8X4Xs/7H1mEahpFzgSWrHnP95T/AAt/tV9HeEvFX9hWdvHcXx1Tw5IQltqbf6y1J+7HP6f73tXRRxVnyVD43Ncj3r4RadV/kd5JBwaoy2uSeK1GbOaiZcg16tj4VHmPxL8Ir4q8NarpLrn7VbvCpPZsHYf+AsFNfnfBHPoeszWlyhint5WikQ9QQcGv1F1CAEk18K/tZ/D4+G/F8Xie0j22WqP5dztHEdwP4v8AgS/+PK1edXp9UfYZDi1Tqeyk9y14IvYtSt/IMnlvwUkHVHByjD6ECvtL4WeNf+Ez8OQ+ccajaYguk7h/730brX5ueBfFcmmaguW6H86+uPh14jm1D7Pqeg4OtWkYR7ReFvoe8f8Avf3TXHCr7N6n1mZ4D+0MO4w+Jao+ncVBKmQao+FvE1p4s0tLy0bnpJE3DRt3UjsRWqVzXqJKS5kflcoTpScJqzRiXOnJNnK9a5zVPDiuGIX9K7prcHNQSWocEEZqXGxtTm47Hzp8QfgZovi1ZJZrb7Ne44vLcbX/AOBf3vxr5f8AH3wh1rwPOzzwmezz8t3CMr/wIdq/Ra90dXBwPwrjPEPhlbiGRTGrqRgowyDWMqaZ9Bg81qUXyyd0fnpYatd6W4IYgDuK9R8FfHDUNIdFkmaRBjq3I/Gur+IvwEt5TNc6IF065OSbZ/8Aj3b6D+H/AID/AN81886raXWgX5tNStn0+67I/wB2QeqN0YVySpdz7PDY6FbWLPtTQ/iLonxAkhurqaXTdbjULFrVgdlwg9JB92RfZq9N074han4biU+KIEvtK4A8S6WpaDHY3EX3o/8Ae5X6V+d2ieJbvTJlkgmZCvoa+hPhP8ebjTpoUmmwRwVY/K3+FcnLKnrE6cRhaGMjaorPufaen3VpqtrHdWVxFc28gykkLhkYexFX0twPQ14f4f8AEPhq+la80fUJ/CmpyfM8mnhWtp29ZbY/Kf8AgO2u10vxb4hjXaV0fxHH2l0+6+yzEepjk+XPsGqvaKXxHylfJMRCX7r3kd+qgVJXGReP70f63wrrWPWKGOUf+OyVYX4gSOPk8M6vn/pssUX/AKFJR7r6nnf2di07cjOuAzTwM15TrXxiv7OKUwW2laayd729+0Of+2cX+NeJ/EH4q3Wuq0WoatcaihP/AB758i3H0jXr9WZvpUNI7qGT4io/edj1b4sftGaZ4UWaz8PtFrGqJlWmLH7HAR/fbPzMP7q/+O9/i/xj4k1DxLqt3q+rXb3l9McyzyH/AMcUfwr7VZ8T+MoQWiiYOw4CJ91a4PUNSe9kLHj2pxikfU4bA0sKrR1fcbd3xkyAcV2X7P3wXu/jV44MUwki8M6e6yapeD5dy9oVP95v/HR8392qnwm+DGu/GXxF9i00Na6TAR9u1aUfu4l/ur/ekP8Ad7d6/RT4c+AtI+Hfhy10PQ7UWthAMZb78rfxSOe5anUlyxOTHYxUlyRep1ulWsGmWVvZ2sSwW0EaxxxIMBFAwFFT6hrFno1hNe39zHaWkK7pJpWwqiue8X+ONJ8CaJcarq95HbWUQ5Ynlj/dX1PtXxR8VPjZq3xWv385WsfDit/o+mE/NKP703/xNefGDlueLhcJPFyu9u56J8Yv2jL3xx5+k+H5JNO8PnKy3AOJbwf7J/hWvBtT1pbVTHGQAKzdR8ReSGRTk+tctd6hJcs3zda7IwSWh9lThDDw5YKxZ1PWmmZlRvqa6r4S/A3Xvi7qINujWejow8++kXjHcL6mu3+Av7Ml78QJIdY11HstByGRGGJbsf7P91f9qvuTw34asfD+nw2Gn2yWttEAFjjGBSnU5FoeRi8wUE4w3OZ+Fnwg0b4d6PHY6TaiJcDzbhhmSU+pNejW1osGcdxipYUCqABgegqYDFeZNubuz5hzcndixrxUqimqRingjFc7Q0yVehp1RhqeGBrOxqmODUtNpQcVJSY4HFOplKDisjVMcDinA5ptA4rFotMeDinU2nDkVg0aJj6cOlMXpT16Gs2jZMUcU6m04c1g0aIVetPXrUdPrJmiY+nL0ptKvesJI1ix696evSo1709e9YNGqY9e9LSL3payaNLjgaWmU8cismjRDl6U9elMXoacvQ1lYpMWiig9DU2LTG5pu6g0lZ2Hc+edwozTaK/svlP5OUh4OKUNTAcUoOamxaY8H0pQ1MpQaixSY/dRkU2ilylXJN1LuqPdShqVirjw3vTt1R0A4qbFJkganA+9Rg5paixSkP3U5TUQOKcrVNi0yZTxS7qjVuKUNWdi0x+6lBptFTYpMeGpwb0qNTS1Fi0yQNSg5qPJpwNS0UmSjmimg8UZNZWNEx1FNyaMmlY1THUUUUguIVqNkzmpaCKho2jIoTW4YHisi+01ZQeOa6NlzVeWAEHisJQ7HTCdjyfxp8P9O8T2EtpqVqs8TAgEjke4NfG3xW+D9/8ADzUGkRWudJkb9zcgfd/2W9DX6FX1kGB4rkfEHhm21Wzntrm3S4gkGHikGQ1cFbDqovM+my3NqmDlZ6xPz20jVZtPlUhyAOhB6V7v8K/jTcaLKIpZFlgkGySOT5kkX0Yd65b4wfBC68HzTaro8bz6OSTIgGWt/wD7H/aryi0vJLWTKk/SvAq0XF2Z+oYXFU8VDnps/Qzwp46g0iwW7sS114ZGPNgBLTaZnv8A7UP/AKDXqdlewajax3NtKk8EgDJIhyGHsa/Pf4b/ABWvPD9zGVmIUcEHkEehHcV9KeCvHqWEZ1TRGNxpkn7y/wBEByYP700H+z6rVUMTKi+Sex8/m2SLFJ1sMrT7d/8Agntt1GrE5rzn4k+CrHxjoeoaVqEIlt7qMqfVT/Cw9GBwa77TNUtde0+K8s5VmhlGVZf5Vn6nabmIIr3FFTjdbM/PISlSnro0fmX428D6j8OfE1xpF6CQp3QzgYEqZ4IrsPhh8R7nw/qEOZmRlIwc9a+rvir8KdP8f6NJa3aBJ1Ba1vVHzQN/8T/eWvi7xr4D1j4f6w1lqluYnzmKZeY5V9VNeRXouD8j9NynM1XgoSfvI+7fAfjKw8YSjVdG1CLS/EhA84Oc296PSRf4W/2u/evT9K8Y28t0NP1aA6Nq3QW9yfll/wBqN+jCvzT8IePr3w/dRuszIVPDKa+jfBX7TEV9ZLpuuQ2+o2TcGO5Xcv1HdT7iuenUnR+HVHoY7LMPmC5paS7n17UeK8Q8OeP9FmQNo/iG90dj/wAut232y2X2Xd8yj6NXZWfjTV3XMcugasnrBetbMf8AgMi/+zV2RxUH8Wh8bX4dxlL+G1I7aVAc1n3lisynjn1rDHjHUTndoaE/9MtWt2/9mrIvviZd2oO6y0q1HrdaqG/9Fq1P29LucqybHr7H4jfEHh5Z0cbM56ivnr4v+HtKt9PmtNVijlEn3Lb70r/7o+9/wKu48YfFm7keRTrkca/889IttgPsZJdzH/gKrXhfiDxTaG4mmjBE7/fnkdnkk/3nb5jWDrKWiPpcDlFWkuarO3kjze38Iz2BmeRpIoHO6KGY5eNfQn1o+0ixBEfUd6t6prLXbsFJ5NVbPTLjUZlihiaWVyFVVGSTWe59MlYltfFuqWzZhd1x6MRXT6X8Zda00BZC7gdmJNeg+EP2aZX0Uy61dSW2oTfMiRAFYV/usP4jVfUv2bNTjJ+yX9rOPSQNGT/6FS5EzgWY4bmcVMwoP2gtS5BD/rSy/Ha/kBwG/Wobr4A+Kbcnbp0c/wD1znU/+hYpifAzxWemht/4ER//ABVT7OPY6VjaT/5eIoXvxc1W6J2sVrl7/wAQ3+pOxmnY57Zr1DTv2bfF12AWj02xH/TWVnP5KtekeF/2RrXKSa3rF1fsMfurKNYEHtu+Zvy21PIYTzHDw3kfLcVlNcXkVvFHJdXMx2x29ujSSSH0VVBLfhXv/wAJ/wBknVfFbQXvi4SaFpRww06Li7nH+0f+WQ/8e+lfTfgf4UeHPA8O3RdFtdPcgBpgu+Z/95zya7+xsREuerHqaWiPCxGbOd1S2M7w14X0zwppNvpmkWMNhY26hY4IECqv+J9zVD4hfEbRvhl4dl1XWJ9uTsgtk5kuH/uqPWqnxT+LGjfCXRTe6i4mvZRiz05D89w39B718PeNfHGr/EDX5Na12fzbjkQ26n91bJ/dQfzPeuRpzd2RgsDUxL9pV2LPxF+JGt/EzWTqesyGO0jP+h6ap/dQDs2P4m/2q4m/1UIpVTUepanvyM8Vhpa3Oq3cdtbRPcTyttSKMZZj7Ct4RSPsIRjRhyRIJ7lrst82B7V9Qfs6/sqfajF4g8Yw/ufvwaU/8f8AtS//ABNdZ+zx+y9D4TSHXvEiJd61w0NqRmO2/wDij719O2FgIRzRKVj5jHZlzN06T+Y7TtOitIVihQRooAAUYAFa0ECoM96bbxDGe1WK4Jau7PnnNt3Y9FFO6U1e9OrE0TFXrTqavenVk0WmOpQcUlFZNGqZIDTqZTlNYtFJjgcUtNpQcVmzWLJM0Uyn1m0bIcvSnL3pi96evesWjRD1705e9NXvTl71kzZDqVe9JSr3rBosWnjpTKcvSs2jVDx0py96avSlXrWEkaoevWnr3pgpw4rFo1Q9etOpo4pwOaxaKQU5elNpy96yaNUxy96evemL3p696ysWLSGlpDSsUmMPemZNOPemVlYs+d6KbmjJr+zOU/kq48HFOzUYalBpWKTH04H1qMGl3VNi0ySimA0uTS5R8w8NSg0zdRkVnYq4+lHFMBpQ1KxSZIDmimA+lKDiosWpDwcUoNM3UZFTYpMlBpwNRg0oOKzsWmSjmlBxUYPpTg1TYtMeDmlHFMzSg1FjRMkHNKppgPpTgamxaY+lBxTN1KDUWLuPpaYDTgamxSY+lFMBxSg1Fi0ySjtTBS5qbFJ2EIzUbLnNSUYrOxqpFOWEMCCKzLuxznitwrULxZBFZONzeFTocFrOhJcRyKY1ZWGGQjIYV8r/ABl/Z+l0xp9c8OQM9rktcWCjJj9WQf3f9mvtS6sgwOBkVzupaVuDELn1GOtcdWiqisz3cBmNTBT5ovQ/Nu3ma2l69K9D8C+P7rQLuKSOVlCkHg9K9G+NPwEF75+ueHYQlwPmuLKIcP6sn+1/s189QyyWsrI4KuhwQa+erUHB2kfrOBx9PFwU4M+0/h/43+zzy6toce9nxJqOhQnas/8AemhXtL/eH8Ve5aPq9h4p0qLUNPlE0Eg/FT3Ujsa/PTwP49uNEu4pEmZChBVgeV/+tX0n4E8fzec2saMolnkAOpaOpwt4O8sX92UdePvfXqsPiJYd8stYnn5vk8MfF16GlRfie23un5DYGR3FcP4y8D6b4o02Sy1GzS8tmz8rfeQ+qnsa9B0XWrLxNpkV9YyiWCQfQqe6sOxHpTLzTxIDgYNe77tSN1qj81UqtCbtpJHw18Qf2edZ8Nma50LfrWnryYcf6TGPp/EP938q8t+xSxStGweCVTgpINrA1+i9/wCHllySMN2YCuP8TfDDTfEMbLqemwXfGBJt2yD6MvzCuCeFT1ifVYDiCUPdrq58T2mr6ppbBop3GPeuk0z4t6zYcO5ce9ezar+zLYvvbTNRntG6iK4USp+Yww/HNc1d/s367Hnyp7C4HuSn8xXG8PJH1tLOcHNayscXJ8ZtTcHr+v8AjWZcfFLU584Yiu6H7O/iMn/U2P8A3+FW4P2bPED/AHmsY/8Atpn/ANlrP2Mux0vMsLa6qI8hufEOpamx3SOQfeqf2KSUkySGvpLS/wBl2U4+2aqiDulrAT/48f8ACvTvCn7PnhrRSkgsPt0o/wCWl6d5/wC+fu1aos8ytneHp7O/ofMXw/8AgxrXjNlaxsWS1J+a7uBtjH0Y/e/4DX1V8Nvgho/ga2WQIL3UiBuuZVyFP+wvb+dek6Z4fitkVQgAUYCgYA/wragtETjAreNLlPlsXnFbEXjHSJgQ6BG45Vn+vAqGfwvC2f3RH0NdeLbil+zGm4nkRqN7nGR+FYx/B+dWYvDUa/8ALMV1i2g54py2oHasnEvnMG10VI/4QK04NPVf4a0EhC1IFArCSsLmbIIrYIOlcB8ZPjXpPwk0BpLgreavMMWmnIfmkbsW/ur/ALVUvjl8ctN+EOiNyt7rt0pFpYqeWb+83otfB+v+KNS8Ya1ca1rd699qszZMrH5Ik/55ov8ACtYPsfR5Zl8q79pP4TS8TeLtT8Ya3PrOuXTXepSnPzH5YV/uIv8ACtYF3qTSZVTgVTvL/qF/E+tWPCXhvVvGuuQ6VpFo93dzHHHCIP7znsPekon3PuUoXeiRFpOiaj4m1WDTtNtnvL24YJHDGMljX3B8Bf2dLP4aW6ahqMSX/iCQAmYjIg/2U/8Aiq2vgj8B9M+F+nJIiLd61Ko+0XxGf+Ar6CvYoYtgx37mnsj43H5m6rdOlpEisrIQr05q/HH7U6KPNS4xXOzwExY/lFSVGvSnr0rJotMeD6U7dUanFOrLlNkx9Kp60wHFOB9KTiUmPHFOBzTAc0tYOJsh1KpxTQ1LWTiWh44pw5pinNKDisXE2RLRSKaWsWjRDl6U9elMXpT16Vk0bIeOlPpi9KeOlYMtMcOlLSL0paysbRHU5elNpy9KzkjZElOpg5FOU8VzNG0WLSjikoqOU0Q+nKc0xehpRxWbQEq9KcveowcU9TWLRoiRehpy96jzSqajlNEPNMJpScCoi1S4gLSUinNLWDiaI+cs0A+9Mor+zLH8jXJA1LkVGDSg5pWKTJAaUNUYOKUNSsWmSAijPvTAc0tKxVyTdRkU3OaKzsNMf0pQ3rTBxSg+tTYpMeDmlzTKUHFRYtMfuozTcil61NirkgNOBxUYOaVTisrFpkoPpShvWoxxTgamxaY8HNKDimUqmosaJkgPpTgajBxThzU2NEyTdS5FNoqbGqkPHFKG9ajBxTutTYpMeDinA5qMHFOqLFpj6MmmA4pQ1RYpMfmjdTQc0tZmg7rTStAOKcDmoaKTK7x9az7q0DAkCtcrwagePrWLidEJ9GcfqOjLLuZRtf19frXzz8a/gZ/b4n1nRoBHqSZaa3UYE3uPf+f8/qqe1DA4rn9U03ILqPmrlqUVUVmezgcdUwdTmi9D82GWSwuWDAoynDKeoNdl4N8a3Gh3UckUrKFIPB6V7T8dvgiviKOfWtFhEeqIN00CjAnA7j/a/nXzAhe2kKONrDqK+frUHTdmfrWX5hHF0+eD1PsPwL8QmtbuTWNIILSgHUdKBwLkf89UXtIvf+9X0FoWtWfiTTIbyylE0Mq7gw/ka/O/wX4vl0u6jxIVKkbWzX0v8NfiSmlySajaHfbtg6hp4P8A5Gj9/wC8P8nPD13QlyS2OPOMojjoPEUF76/E+hWtyeMVG+mKwOV/KrOn31vq1lDeWsglglUMrLVsLgdK99NSV0flU1KEnGW6MJ9HT0qu2gxnPyj8q6Yxg0CFT2FDRUZtHNx6Eg/hH5VPHoyD+H9K6FYFpwhHpXO0a+0Mq30xV/hAq/FaKnarKoAKeq0rFKpcSOPsBU6Rhfc05BhaWoLTHYFOQcmkpV71k0apj1HFKBikUjFLWTGmFeY/G3436Z8I9A3ki71u6G2zsB1J/vN6LVr4yfGPTPhP4caecrc6lMCtnYKfmkPb6LX59+KPFGpeL9cvNZ1m4a5vpyTyeIx/dX0Fc0tT6nKsteJftavwr8SPxD4h1HxTrN1q2rXb3uo3BzJM5yFH91fQVhzT7QQvFSiXIrc8DeANV+IniCHStJhMkrkGSUj5Yk7s3tUcp903ChDskUvA/gfWPiFrkOmaZA0sshG5gPlQd2PtX338FvgtpXwv0VYLeNbjUJQDc3rD5pW/ugdlqf4TfCTSvhnoKWNhGJLhgDcXbL88zd/oPQV6daW4ijGBWb8j4jMMyliG4Q2FigINXYosCo0GKmR8VB4KY9V20tNDZpwrKxohy9DTl601e9LWbRaH0UgOaWsrGooOacDimU4VLLTH0oNNXpS1gzZMfSqaaKUVmy0x44p1Mp9YM2ix9OHNNpV71i0axY9e9OXvTF609etZNGyY9ehp69KYtOWsGi0x606mU4GsrG0WPpy96Yppw4qGjZMevenUynA1g0aJjgfWlptCnFTY0THg4p1Mpy9KyaKuSUq9DTVHFP6Cudo1QU5elMXvTxwKmxpcGbioC1PdutRDk0mhXJEOKfmogcUb6waLTPnKgHFMzS5r+yrH8h3HhvWlqMNSg0rFJkgOKUGmbqXIqbFpj6OlMB96XJpWKuS0A4pgNLmosO48H1paYDSipsUmPBxSg5pgalyKixaY+imjijJqbFcxLTgc1GDilBzUWLTJAcU6owfWlBqbFpjwcU4HNR7qcDUWNUyRTS0wGlBxU2LTJaUHFMBpd1YtGiY8c0oOKYKUN61NikyQc0oOKYDilBqLFpkg5oplKDipsUpDgcU4Go8mnA5qHE1TuPoBxmmUqnrU2NEySmuOtLnikPNZuJomRFeDWfdw7latMDOaryx5BrDlN1M5LUdMEysQPmr50+OXwN/tkT61osOzUly01ugwJx6j/a/9Cr6pmtgc8VharpYlU8c1zVqKqRsz2MuzCpg6inBn5tRs9tKysCrKcEHgg13/AIB8bTaVeIyyEMOCOzCvS/j18ETcef4g0KDFwoLXsCD74/56KPX+9+dfPFtcfZ+lfN1qLi+WR+xYDHQxVNVaT9T7h+FXxCj0YIyOX0eYgXNoOfszf319q9+inS4iR42WSJ1DK68hl9a/OrwH48l0y4TEnXhlPR1/u19VfCX4mRQRxWNxITp0x/0aVmz9mf8A55t7H+Gqwtd0peznseHnmURxcXicOrTW67/8E9upV60lFfQH5dclXpTlqMcU8Gs2ikx4GTT1FMFPWsmjRMkXpRQvSisi02PoopCcCoN0xN3vXF/Ff4raT8KPCs+r6lIGk+5bWoOGnk7KK0vGvjLTfA3h+71fVLgQWkCktk8sewX3r86Pin8T9T+K/ieXVb92S1QkWtrniNexx6muKpLoj6XKsseLl7Sp8K/Eh8ZeP9X8fa/da1rU/nXcx/dpn5YE7IvoK595i2c96rZ961/CPhnUvGuv2uj6Vbm4up2xx0Re7H2FYLU/Q+aFGHZI0PAfgXVPiBr0Ol6XCZHc/PJj5Y17kmvvz4T/AAo0v4aaElnZoJLlgDcXRHzTt/Rf9mq3wZ+D+mfDDw7HZ26LLeOAbq7I+aVv8BXpsCKowBgVdtD4TMs0eIk4Q2FhhAXhQPwq4OlMUcVJU2R8+hw6U5e9NpQcVm0apki9KcDxUYOKcDWTRqmPBzRTacDmsWi0xwOaWmU4NWTRqmSU5elMBpVOKhlJki9DS00cU6sGbJjh0py96YppwOKzZSY8dadTRxTqwZtFj6BxSKaWs2jeLHU8UxelOXpWTRsiQcU8cVGOlPHSsGi0x9FIvSlrKxtFjxxTqbSr3rNo2THqaWmUoOKysUmOBxThzTQc0q1DRomPXpTl701e9OXrWEkaJkq9qU9Kappc1g4miYq96cThaYDikduDU8pdyNm5pV6GoyeacrYFPlI5hXbFRb6JG61FurJxLUj54zS5plGa/six/ISY/dSgimA+tLRylJkgOKN1MBxSg1Ni0x+RSg0yilylXJgaMmmA0oaosO4/dSg+lMBBoqLFpkgb1pQaYDS1Nikx+aMmmUuTUWLuS5pQc1GDinVnYvmJA3rTgfSmA5o6VNi0yQGlBqMH1p1RY0UiQH1pwOKjBzSqamxakTBqN1NB45oBzWVjZMeKcGqMHFOqLFpjwcU4NUYOKdU2LTHijNMzilU1Nih4NL0ptOBzUNG0WOBpaZTlOazsaokooFFZtFgB1pjJkGpF70EVi0VcqPF1qnNbhgeK1GUGoXj61FjSMrHG6xpeQxAz6ivkv48fBo6NcT6/o0H+hud1zbIP9We7Aeh9K+07233Ka5bWdFjuoZI5Iw6MMMrDgiuWtQjVjZn0OWZjUwVVSi9D86YLhrdhzx/KvUfAXjVrWRYpX3I3BB/iH+NQfGv4SS+B9Xe8sIy2i3DZUj/lif7rV5zY3r2koBJGOh9K+bq0nFuMj9nwuIhiaSq09mfoj8H/AIiLrdlHpd3NvuY1/cSsf9anofcV6fX5/wDw58dyW80SmYxyIQyODyp9a+1fh143g8Y6Kkm4LeRALMme/r9DXXg8TZ+ym/Q+A4jyfkf13DrT7S/U64HIpV70wU4cV67R8JFki96cDimDinZFZtGqZKppcmo1PFLvwKycTRMlqtql/BplnNdXUqw20Kl5JGOAAKU3BzXxz+1Z8ef7cvLjwVoU3+gxN/xMbhTxIw/gX+tcdV2R7eWYKWPrcn2VucF+0P8AGqb4teJHgs3ZPD9ixW2QHiZh/wAtG/8AZa8ixxT6kt7aS6lWOJSzscACvOP1elShRgoQVkg0fRb7xBqkGn2ETT3MzBVRRmvvf4B/BO0+F+hB5kWbWrpQbicjlf8AYHoK579nD4FQ+AtOj1rU4Q+v3SggMP8AUIf4R7+te/29vitoQ7nw2bZn7V+xov3V+JNAgCgDoKuRJUUSYqwuAMVpY+WHU+mU+s7G6HUUZFFZtDTFBxSg5ptFZNGqZKDmlpg4p4rFotMcDmim9KcKyaNUx9OU1GOKd0rNxNESKacDimCnDkVg4myH05Tmo1NPBxWTiWh6nNOU4pgp1YuJtEfT6ZTl6Vm0bxHL3p696YvenL3rJo1TJF6U9elRr3p696wZohy96dTRTqysbRH0DikyKMipsbXH0UgPFLkVHKCYo4pw4plPHNQ4mkWPWnUwU+uaUTZDt1Kpph6GiPvWfKNEpOBUDvUkjYFVWfJNCgO4/NBfApFPFRO3WjlJuKWzRTFOafWbiNM+dKOlJuoyK/sKx/JFx4PrS0ygHFKw7j80u6mg5paVikxd1KrU2gcVNh3JRzR0poOKUNUhccGp1MpQcVFi0xwOKdTaVTipsaJi0q96SlHFRYtMkXpS00HFG6s7FIeDS0wHNOBqbFpjwc0tMBpQ1RY0TJAaUHFMyKKmxaZKGpwNR0oPrUWNUyQU4HNRg4pwqGjRMeOKcDmow1OB9KzaNUyRTxS9KYDTg1Z2NEx+aWmUoOKmxaY9TS0wHNOBxUNFqRIOaVTimA0oOazaNEySimA4pd1Ryl3EoxmgDNOAxWTiUmVposg8VlXVtweK3SuQaqzwgg8cVlY2hOzPOPGHhKz8RaXdWN5CJraddrqf518QfEj4e3ngHXpbCcM9sxLW056Onp9RX6HXlr1GOK8w+K/wztfHWhTWkihbpAWtpsco9cGJoe1jdbn2mS5u8HU5Knws+KND1BrWZTkgqa9/+EHxHl0LUYLlJCVGFlTP3o/8RXz1qum3Oh6nPa3KGKeBzG6njkVseH9cexmV1Y7c818tUg0z9cShVg4y1TP000TV4Na0+K6gcOjqGBFaNfM3wA+KC2d1HpFzLmzuf9WWP+rf0/z/ALVfSoNe/hK3tYWluj8cznLv7OxFl8MtiTpS7qaDmlrvWqPBHg4phbg0+uM+KvxCsfhv4Qvtc1B8RQIdkSn5pX7KvvWFRqEW2dWHozxFRUqe7PMP2nPjqPAGjNoOjzbvEWoIwDIebaP+J/rXxBEMZJO525Zj3PrVrxH4l1Hxl4g1DWtUkMl3eyb2yfuL2Qew/nVNDXgzm5u5+w4DBwwVFUqZYr6m/Zb+CQdovF2swfLkHToXHXn/AFjD/wBBryz9n74RyfErxQsl1Gw0WyYSXMnZ+eEHua+/NLsYrSCNI41iijULHGowFA6cVpSp82rPDzrM/YxeHpPV7/5Fq2tBGBVpRg0wVIorp5T4LmvqSKcVIDUY6U4HNS0WmSL1p1MHIpwNZtGqY7dSg5puaOlZNFoeOKdTAc05TWLRoiQcinL0qMHFOqWjVD6UGmg5paxaNB1PplOXpWTRoh46U5e9NXpSrxWLRrEdTl6U2nL0NYNG8R69DS0i9DS1k0aoevWnr3qOnqazaNESL3p696jXrTwcVg0axHDin0ylU1i0bIkXpRTQcU4HNTymiYu6jdSUVmomnMPDelLupg4pwOaTQJjxUi96iXpT1NZG8WSr0p4OajU04VhJHQmOpw4FMBpssmAazUbjuNmk61XzyaRpMmlHStlGxg5Dt+BUTNnNMeSiM5qHC2pKkTJTt1RlsCmb6y5LmqmfPG6lyKj3Uu6v6/sfyNzDwfSnBvWowfSlDUrD5iSlB9aYDilBzSsPmJKKZS5NTYfMP3UuRUe6lBrOxaZIDilBzUYOKcDmosWmSA4pQc0wH1pRU2NEx4OKXdTA1LkVNi0yTJpQ1M3Uo5qLFXHg5pQajpwOamxaY8GnA+tRjinA5qLGiY8HNFNoziosWmSg0oNR08HIqLFqRIDilFMBzSg4qWjRSJA3rSg+lMBzSg4rJo2UiUH0pQ1Rg4p9RY0Uh1KG9aaDS1Nikx4pQfWmA4p1Q0WmPBxTgc0xTxSjis2jRMeDil3U0c0VFi7j1OKfUY4pynFQ0aKQpNRsMinUVi4miZSuIdwNYl9abgwxXSOmQaz7q33A8Vg1Y6ITtoz5c/aQ+FP9rae/iLToc3tquLqNB9+P+9/vD+VfMNpKYpCpr9ItTsFlR8oGBGGUjhhXw98cfhy3gTxTJJbof7NuyZbduw/vJ/wH+VeHjaH24n6tw3mftYfVar1W3oM8Ha89vIE8wowxhgeh7Gvtn4KfEhPGehLaXMg/tO0UK/PLr2Nfnhp960Tgg8ivWPhZ49n8L67aalA5CxEC4TP+siz83/fP3q8ilN0p3R9TmOAhmOHlRktenqffympB0rN0PVbfXdKt7+1kEsMyhgwrQr6mL5o3R+JVKcqU3CW6HSSiKJpD9xfvH0r4D/aS+LknxS8XvZ2UxGgaa5jgUHiVx9+Q/wDste6fta/GD/hDvDA8NabPt1fV0IZkPzRW/IZv+Bfdr4tWvGxtW8uRdD9D4by90qX1mqtZbeg0Lmt3wb4Ov/G3iC00fTk3XM7Y3EcIvdj7Cs+2tw3Jr7Q/Zk+Eg8J+Hm13UItuqaiqlAw5ig/hX6t94/8AAa4qcHUdkfRZhjo5fQ9p9roepfDjwFp/gXw7a6VYRhYIQC8hHzSv3Y12UfemooAwOAKevWvWjBRVkfkkqjqScpbk0fQ1KOKiTpUgOaVhDgc05ajp46Vm0WmPU4p1NFOHIrNo1TCnKc02lHFZtGiY4cU4c02nL0rFo0THqcinKaYvenDioaNkx1KppKKxaNEyVTSrTBxThWTRqmSLTqYKfWTRpFjhyKcvemL3py96waN4sevenU1e9OrJo2THU5elIKcBWLRsh4p1NFOrFo0TFU4p1Mpy9Kysapj1OaWmU4Glyl3HbqN1NzS0uWxNxwOaVetMXrT161jJGsR696evQ01RwaeBgVzM3iOXpS5xTVOKXIrFq5snYUtiq8suc06V8A1VLZNawgZuYqnk05pMDFMzgVC0mTXSoX1MHMcTuNSpwDUUYzTi2Kzkr6EqQrPTaQcmn7KxasapnztupQabRX9a2P5JuP6U4H1qMHFKDmixVyQHFOBqMHFKDU2HckBxRupgNGTSsO4/dShqjyaUN61Ni7kgOKcDmowcU4HNTYtMkB9acDiowc04HFRY0THg5paZSg4qbFpktFNyaN1ZWKTHg0tMBzTgcVNi0x4OaWmA5pQ1Q0aJjw3rTutR5FLU2LTJAc04HFRg5pwNRYpSJBxTgc1GDinCoaNFIf0pwOajDetOB9KyaNoyJFNKDimA04NUWNFIkoBxTd1KDmpsapj6cpqMHFOBzUNGiY8cU4c0xTSg4rNo0THg4pQaaDmlqLFpjqVeKQHNFZWKH0UgNLSsNMQjNQSx7gasUhWocTdMxbu3BLdq8w+K/wAPrfxt4ZutOlQebgy28ndZB92vXZ4gSaxdTtN6sMe4rnnTUk0z1cLiZUZqpB6o/NS+06fSL65tLhDFPbyGN0PUEGtvw/dBeCa9c/ac+Hv9nalF4ltIsQXJEV0FHCv2b8f6V4haS+XnFfIV6TpzcWfumBxkcXQjWj1PsX9mf4ni1nbwvqE37mTc1kzHp/eT8P6+1e8eJPElp4c0a91G9lWC1tYmmlkJ+6oGTX536Zrt1DClxYzGDUrdhLBL6OOn59K7D4v/ALSo+JvgfR9J0tjDc3Q36yn/ADyZWK+X+YLf7pFb4bFOnBwfQ+czTJvrWNhWh8MviPOPiF4zu/iL401PxBdkg3Eo8iM/8soV+6o/z3rEUE0oFaOkaTcavfQWlqhkuJnCIo7k1xzvKVz6yMVTioR2R6z+zh8Kz4/8Vpc3cRbRtOKyzk9JG/hT8cc+1fdVvBiuK+D/AMP4fh74RsdHRR5iqJbl8f6yQ/ervVFe1hqHs4XfU/Jc4x/13EO3wx0Q9BinL1pB0py961seImPXvTwc1GOKcKVjVMlHSnL3qNTinjismi0yRehpQcU0HFOrJo1THUUZorFotMfTl6GmKc05TWLRpFj170tNBxTqho2TH0UgNLWLRomPpV70wHFOHFZWNEyRelOXvTFp68Vk0axY5aevWmU8Vg0bxY9adTV606srGyY9etPXrTBxTgaycTZMeOKdTAc0oOKycS0x1L0pu6jdUcpakPBzS0wHNKD70cpfMOoBxTcmnVnJDix69akUdajXtUq9q5ZI6Yj1FOpoOKC1YOJsnYdmml8CmF+tRtJ1ojATkEj5zUIODQXzTS2BXXGmczmDvwahHJpc5NKBitGuVGVyRTgU0nNJuoUVyyVjSJLGKlqFTin765nFs64vQ+csmnA5ptC9a/rqx/I46iiilYBwb1pRzTKKVikPozTQaXdSsA7dSg5ptKKiwx4OKcOKZTl6VFi0PpwOaYvSnKcVFjRMcDinUwHNKOKmxaY/OKUNTA1KOaixSY4HNOBxUdOU5qLFpjwc04H1qOnA5qbGiY8Gim0ZqLFXJQaUGo6cDkVNikyUHFKKYppQcVm0aJkgNKD6UwHNKprNo2iyQH0pwNRg4pwOaixomS7qWmUdKmxomSA4pw9qjBzSg4qGjRMlBzSg4plKprNo0TJAc0UynKazaNEySlU00HIpaxsbodSg4pByKKLDH0UUVBpcjlTINZ9zFvU1qEZFVZI+tZyRrTlys888d+FbfxNoV9plygaG5jKZI+6ex/A818E6rpc+g6xd6fcqVlt5DE2fYnmv0h1G13K3FfIv7UPgr+ztWh8QW8eIrv8AdXBA6SL90/iv/oNeJj6N4c66H6NwxjeSq8PJ6PY8csbgxSDB71m6vZQ2+oyyW6CPzj5kmO7Hqf5UQXHOehFS3D+fJuNfNpWP07canQV9I/skfD/+09ZuPEl1Fm2sf3duGHDTH+If7o/nXz1pVhJqF9DbxqWeRgoA9TX6JfCjwbH4G8DaZpIUCWKMPMfV25Nd2Fpe0qa7I+Z4gx/1TDckX70tPl1O3g6Zq0g4qrBVpPu175+R3HhaXpSAjFLWDRqmFKvekpVpWNUyRelOU0xacvWsmi0yRelOBxTFp1ZNGsWPpQaaDmlrJo1THCng5qNehpy96xaNESKc04HFRjin1DRsmOpc01ehpaxaNEPpw6U2nL0rJo0Q8U+mDpT6yaNYj6cKYvSnr0rBo3iPFPpi9qfWVjZChqcDimUqmp5TRMkBpd1MHFLurNxKTHbqN1M3e9Ab8ankKTHhqUGmA5py96XKVckpy9KavSnL0rlmjaNyRalXtUS9akU8VzWOqJJTGagmo3brS5Sm7DGfGahZ+tDt1qEtXRCmc8pjt9JuzTM0V0qFjDmuPXrTs4plGeazlG+pohRyakXpTENOLcVyyjc0TsIXxSeZUbN1pm+pVMrnseA5FGRTMilr+rj+Tbj6M0ylB9aB3HZNLupKKkpMXdSg5ptKvekO5IOaKRelLU2KuOXvS0wcU+paKTHL0pQcUxTinVDRaY4HNLTKcG9amxSZJRSBqWszVMFOKdTacpyKixVxVp1Mp4OamxSYDinA5ptFQUmSg5optKDU2NExymnUynBvWoaNEySlB4qMHFODVm0aJknSlDVGD70oaosWmTA05Tiog1OBrOxqmSg4pciowacDUNGiY+lBxUfSnA5qLGyZIKcDUamnA4rNotMkBpwOKi3U5WrI0TJVOKdUStTgag0TJd1GRTA1LmpY0xxNNIyKQmkqTWLKN2mVNeUfGXwiPFPgzVbELmYxmWHj+NeR/UfjXrkwzmsLVrQSRtxmuarTU4NHrYLEvD1o1F0PzS8po5CGGCDgircSZ5rqPih4aPhnxxq9jt2xrMZI/wDdbkfzrnrRNw+lfEVIOMmmf0BRqKpBTjsz2X9mLwGPE3j62vZ491npg+0uSOCw+4P++v5V9yRQ8V4D+yL4Wk07wbfapKuP7Qn2xH1RDg/+Pbq+g4xgYr38DS5Kd31PyLiTF+3x0qa2hp/mOjTbUw6VGvenA4ruaPmUx+aUc02lXvWDRrFki9KVe9NXoacOtZtG6Y6nL0ptOXpWTRqmPXpSikHSnKOKysbxYtOHSm08VmO45elOXoaaOlOXpWbRpFi0+mU+sWbRHDpTl6GmjpTl6VmaoWnr1plPFZM1RIvenL3pi09etYSRrEcKdTacOlYtG8WPHSikXoaWlY2TCnL0NNxSg4qLF8w8GkzTd1N3VagK47dSqaYDmnL3qJRLiyVOhqVKjTvUinFc7djaJIvSlpoOKUHNcclc64tDl608HFR9KUtWPKacySHlqhd+tNaTFQNJ1rohTuc86grt1qLNG7NJXWocqOZyuPFKFpBTs1ky0IelJQTSFuKhq5onYA2M0GSoWemqSTUqnbVi5iXOc0bDT4VzU+yndRGtT5zooor+oLH8pXHA0tMpQakaY9TjNOplAOKB3H0U3dS5qbDuPpQcU0NSjmkUmPHNKDimDilBzU2KTJOtAOKYDinA5qbFpjxzRTaMmosVcloHFNBpQaixSkPBzS9KZSg+tRYtMkBzSjimUoNTY0THg0tMoqbFpkuc0tMpQcVNi0xw4pwOabQvBrNo0THg4pQc02lWs2jRMdSg0lFRYu5IppwOKZSg+tKxSkSA+lOBzUYOKcD6Vm0aKQ8HFOpgNKDismjZSJAc07NRhqXdUWNFIfk0qmo8mlDVlylRkTKaepqENT1ap5TZSJqcvSoQ9ODis7FKRJRimb/egSVNjWLI5lqhdR7kNabfMKqyJkEVm0dUJHjPxO+DGmfEFFnkdrPU4gViuAM8ejDuK5Twj+yPFHqAm1PVxPaf88oI9pP+FfRD2wbqoNXLKFYkwFxXBUwtOcuZrU+jwueY3CUfYUp+6T6TpltpNlDaWkSwW8ShEjQYAAq9UMbYFSg5quW2iPFvfVklAOKQEUVJZItPWowc04HNZNGsSRaeKjU08HNZtGyH04dKYppymsWjRMkFPHSo1PFOBxWdjeLHU5elMyKcpxWNhpki9KVe9NU04cVm0axHU+mU5elYtHREevSnL0NNXpTl6Vm0bIWnCm0+sWjZD1604cU0cU6s+UtMeOaVTTAcUoOanlNFIkBxThzUYOKXIo5SuYfSZpm6lBzS5LApC5pKUDNOAxUPQ0ixFGKeooUU5RXPJnTEevenr0pi9Kco61zNXN0SCnL3qMHFOyKw5QUrClqieTGaR5MZqrJL1rWFK5LqD3l61EWqMvSr3rsjBRRz81yRTkU8UxelOBwKTNIjt1N3UlJXO4ml7C7qY0lIzYzUfWqjT6sjmuOB3ZqWNKZElWFGBUzfRGiHIdop/mVCWpu6s/Z33K5rHz7RTcmjJr+nD+U0x1FJuozQMd0oyaTNFQNDt1AOabR0oKJRyKWmUob1oKHg+tLTaUHFTYpMeDmlplKDiosWh4alyKbRU2KuS5FFNoBxU2BDwcU4c0wHNKOKmxaHg4p1MBzQDiosaJjwcUoNNBzS1Ni0yQHNLTKUHFTYtMeDinVGGpQfeoaLRIpp3Sot1KGrNo0TJQaXNRb6XfUWLuS7qN1RbxSb6ktE4alD1W8yl82s2aItB6UPVXzfejzfesWaot+ZR5lU/OpPO96yNEXhIKUSe9UfP96PP96DSKZfEtOEvvWd9oFL9p96hm6Roial86s37T70fafesmWomn51KJs96y/tPvSrddeazubxiawkz3pN4rPW7x3pPtY9azbNUjSVhUiOBWWt4PWnreD1rJs1VzXWQYpyy+9ZIvQO9OW9HrWLZsos1xLThL71lLeD1pwvMd6zbNVFmqJRT1lrKF3jvT1u+vNZHRGJqrLTxJWWt171It171mzZI0xJT1krNW596kW4681kykjRV6cHqis/vThPms2apF0PTlaqYmp6ze9ZWNEi6rU4NVRZaestZtGkUW1anqaqLLUiy1k0bRLSmnA4quslOElZNGqJw1OVqr+Z705XrLlNEywrU4NjvUCvTg9HKUmTbqUNUIanBqXKUmSg+hpd1RBqcD71Nikx+acpplOWs2zREq96cvemLTulc0jeI+nL0pgOaUHFc7R0RZKOlOXpUStTt3FRY15h26mNJimNJUDy1cKVzCUx0kvWqzNmhnzmm12xpqKOfmuKvepU6GolGKkU4rOSNYktFMDUu73rDlZd7DqazYBppk4qMtk1pCn1Yua4pOafGmaSNc1Mvy0pvoikKBtFG6mF6ZurFU+rL57ElJupm+jdWqjchu54BkUZFNor+jrH8uj6KaDinUhhThzTaVehpDQtFFFKw7j6KQHNLTFcUHFOplOXpUlJjl70tNpw5qCkxQcUoOabRU2LTJQc0tMpynNKxshacOabSqamwxwOKdTKcpqLFIWlBxSUVJSH0ZNN3Ubqk1Q/NG6o80VDNESbqN9R03dWTNETb6N9Q5NGaixZL5lJ5lQ7qQnioNES+b70nm+9QZpu6smapFnzfek873qtupN9YM1SLBmpDP71VL03fWJtFFnz/ek+0VUL0wyVNzrjEu/auOtNN371QMh5qNpTzWbZvGKNI3nvTftvvWUZTUZmPNYtmsYGx9u96T7f71imdqb9oPrWVzojBG7/AGh70n9o+9YRuDTftB9als1VNHQrqHvTxqHvXOrcH1p4uT61m2aqmdANQ96kXUPeueFwfWpEuD61i2bKCOiW/wDepFv/AHrnkuD61Mk59aybNVE6Bb33qRb33rDSY+tTJIaGUkbaXnvUyXfvWLHIamjkNZs0SNpLr3qZLr3rHjkNTpIaxY0jXS596kS496ykkNSpIazZrFGos9SLP71mpJ1qRZKRqkaST1Ks/vWasnvUqSe9ZspI0VmqRZqzlepUesmi0aCzU8Te9UVc1Ij1nYouiTNPWSqisakRqnlHctq9PV6rI1SKadikywrU8NUCmpFqGjREqmnr3qJelPQ1mWiVelPXvTF6GnL3rnaNkSL0p9Rr3qRa52bRY4DFBNLTD3qbXL5rBvppkpjNjNQu/WtI07kuY9petRF81GWNArrUFFHO5XF609RmmqOtPXoahjQtLSUhrLlNlIXd70FuKYTihTmqUAuBJzUka0irUgwBSl2Q1oOU4zTWemlutRk5qFTvuVzDi3vQDmm05BkU3CwriqM0/bTkXAp2KjYtHzyvQ0tNBxSqc1/Rh/LgtFFFKwBTl6U2nL0qQuLRRRQFx1FAOaKk0QU8dKZTx0pFIBT6ZT6ktBRRRQMdTl702lHFQWOpVpKBUlIfSrSUDioLQ6iiioKQuaVe9Npy9KyZshaKKULUWLTEpu2pNtG2psaJkeKSpNtG2psXci20m2p9lJ5dZ2NIsrlaaVqz5dJ5dZtHRFlUqaaVNWzFSeTWLRtGRSKk0hQ4q75PtSeR9ayaN4yRQMRNM8k1qeRSfZxWLRspoyTAaYYDzWubf2pPsvtWTRvGZim3NRm2PpW59l9qabT2rJxOmM0YZtjTfsp9K3fsftQLL2rOxspowvshPam/ZD6V0Isv9mgWP+zUNGsahzoszT1s29K6AWHtTl0/2rLlNVUMBbQ+lSJaHmt9dOHpT10+pcTRVDCS1NTR2praWx5PFPWx9qy5TT2hlJbkdqmjhNai2XHSnrZ+1ZOJamZ8cRqdI6uraU9bbrxWbiaKZWSOpUjNWktsZ4qVLepcS1IrJGalVKspB7U8QVk4mqmQIlSKhqwkFSrDgVPKWpldIzUqR1KsVPWP2qeUOe5GFIp6KcVMsVPWKpsNMjReDUig09Y6eExS5TVMRelSpSBKkRamxdx6d6kWmqtPArMLj171IvWo1HFSL1rJo0TJF6Gnr3qKnoetZWNUyde9OXvTFPWnZx3qGrmqY+nBsVGG/GkLcVnyGikS+ZUZk61EXppatFSJcxXkqPfk0hNNHU1ooWM3Ik60Ui9KWlyj5h9KvembqN4FTyhzEtRs2CaZ59IPnzRGIlIcBvp6ptpittqQPuptGiYo5o2mkUgUGQYpcpfMBOKaWzTCxanIlHKHMKg61OgwKaowKep4rKSNEPFFGRRkVnYs+d6UcUlFf0RY/l8fRSKaWkAUDg0UUrAPopoOKdUgKvelptKvQ0rFi05elNpV70ikOpw6U2lXvU2LQ6iiikUOoooqSkx9FIvelqWUh9FIvQ0tQy0OopFPWlqRhT6atOqLGiYqinAZpF6U5e9TYtMULRRSrUWNEwwaMGnUVNi0xNtG2nAZpQMVnYuLGhKNlPpQMVm0aqQzZR5dSgZpQMVm4lqRD5VL5VTBc0u2s+U1UyDyaPJqyEpdgrPlKUyr5NL5HtVoJTggNZuJtGZT+zj0pfs4q6IwacIxWLidEahQ+ze1Ktt14q+IqcsQrPlNVUKS23HSlFpkVfWIYpdg6VDiaxqFAWmKkW1x2q6sYp6xjms+U1VRlJbbGacLervligIKlxNVNlMWw9KctuPSrgjAp3l+1Zcpqpsqi3GKcIB6VYAFPVaycTZTKy2/tT1txzVlVFPCAVk4mqmV1gqRYKnCgU8Lik4lqZAsNPWGplWnKtZOJqpkaw09YalUcU9RxWbRpGRAIqcsVThQKdsFZs2REsdOCU+lC1Fi0xoWnBaWlWlY0TALinqtKo4pyisWXcFXFPC0KKWs7DTFUU4U1e9OpNGiY6lXvSUVk0apkqtS76i3Uhb3pKJdyXfSF+OtQ7qTdWigRzEhekpgOaXJq7WJUh1AGKB0o7VBomG7Hejd70wmmlvenyk8xJvpN2aizRk0cocxJtpyttqNXNPUZpOJSZKo30Y20wSbBSeZuoUTRMcZKRcnNNC5pw+WjlFzEirgUuai8w09TmlyjTJlbijdTVHFLWDR0ok3UbqSip0ND58ooor+gT+Ygp45ooqWAUUUUgClBxRRQA6gUUVBQ6lHFFFJlIdSg4oopFodRRRSGOoooqShV606iioLFWnUUVBQUoOaKKkseveloopDQ5e9KOKKKktDqKKKhmiClU0UVJZIvSloorItAvWnUUVLNEOXpS0UVmxj6KKKg0Q4HNFFFQaDlNOU0UVDNIjlNOoorFm8R9FFFZmqH0q9DRRUM0QtPoorM2Q+iiismaodT6KKzNohRRRWbNlsSL3qSiismOO4+nUUVLN4jx0pV60UVkzZEg6UUUVizaOw8HFPoorJm8Qp1FFSWgpV60UUFskHSloorFoqI6n0UVCNQp9FFJmiHUUUVkUw7GozRRWkUJsSiiitGgCiiiswQ+gng0UVMUadCI96iJOaKK2MkOXrUgHFFFQaD8Cm5xRRSKGk5p1FFAkPoooqTQKevWiis5DRIOlLRRWctjoiSL3paKK5kbI//9k=`,S=u(g(),1),C=`modulepreload`,w=function(e,t){return new URL(e,t).href},T={},E=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=w(t,n),t in T)return;T[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:C,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},D=e=>{throw TypeError(e)},O=(e,t,n)=>t.has(e)||D(`Cannot `+n),k=(e,t,n)=>(O(e,t,`read from private field`),n?n.call(e):t.get(e)),A=(e,t,n)=>t.has(e)?D(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),ee=`popstate`;function j(e={}){function t(e,t){let{pathname:n=`/`,search:r=``,hash:i=``}=re(e.location.hash.substring(1));return!n.startsWith(`/`)&&!n.startsWith(`.`)&&(n=`/`+n),F(``,{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||`default`)}function n(e,t){let n=e.document.querySelector(`base`),r=``;if(n&&n.getAttribute(`href`)){let t=e.location.href,n=t.indexOf(`#`);r=n===-1?t:t.slice(0,n)}return r+`#`+(typeof t==`string`?t:ne(t))}function r(e,t){N(e.pathname.charAt(0)===`/`,`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)}return ie(t,n,r,e)}function M(e,t){if(e===!1||e==null)throw Error(t)}function N(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function te(){return Math.random().toString(36).substring(2,10)}function P(e,t){return{usr:e.state,key:e.key,idx:t}}function F(e,t,n=null,r){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?re(t):t,state:n,key:t&&t.key||r||te()}}function ne({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function re(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function ie(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=F(h.location,e,t);n&&n(r,e),l=u()+1;let d=P(r,l),f=h.createHref(r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=F(h.location,e,t);n&&n(r,e),l=u();let i=P(r,l),d=h.createHref(r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return ae(e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(ee,d),c=e,()=>{i.removeEventListener(ee,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function ae(e,t=!1){let n=`http://localhost`;typeof window<`u`&&(n=window.location.origin===`null`?window.location.href:window.location.origin),M(n,`No window.location.(origin|href) available to create URL`);let r=typeof e==`string`?e:ne(e);return r=r.replace(/ $/,`%20`),!t&&r.startsWith(`//`)&&(r=n+r),new URL(r,n)}var oe,se=class{constructor(e){if(A(this,oe,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(k(this,oe).has(e))return k(this,oe).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){k(this,oe).set(e,t)}};oe=new WeakMap;var ce=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function le(e){return ce.has(e)}var ue=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`]);function de(e){return ue.has(e)}function fe(e){return e.index===!0}function pe(e,t,n=[],r={},i=!1){return e.map((e,a)=>{let o=[...n,String(a)],s=typeof e.id==`string`?e.id:o.join(`-`);if(M(e.index!==!0||!e.children,`Cannot specify children on an index route`),M(i||!r[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),fe(e)){let n={...e,id:s};return r[s]=me(n,t(n)),n}else{let n={...e,id:s,children:void 0};return r[s]=me(n,t(n)),e.children&&(n.children=pe(e.children,t,o,r,i)),n}})}function me(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function he(e,t,n=`/`){return ge(e,t,n,!1)}function ge(e,t,n,r){let i=Pe((typeof t==`string`?re(t):t).pathname||`/`,n);if(i==null)return null;let a=ve(e);be(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=Ne(i);o=Ae(a[e],t,r)}return o}function _e(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function ve(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;M(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=We([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(M(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),ve(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:Oe(l,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of ye(e.path))a(e,t,!0,n)}),t}function ye(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=ye(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function be(e){e.sort((e,t)=>e.score===t.score?ke(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var xe=/^:[\w-]+$/,Se=3,Ce=2,we=1,Te=10,Ee=-2,De=e=>e===`*`;function Oe(e,t){let n=e.split(`/`),r=n.length;return n.some(De)&&(r+=Ee),t&&(r+=Ce),n.filter(e=>!De(e)).reduce((e,t)=>e+(xe.test(t)?Se:t===``?we:Te),r)}function ke(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function Ae(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u=je({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=je({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:We([a,u.pathname]),pathnameBase:Ge(We([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=We([a,u.pathnameBase]))}return o}function je(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Me(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function Me(e,t=!1,n=!0){N(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(r.push({paramName:t,isOptional:n!=null}),n?`/?([^\\/]+)?`:`/([^\\/]+)`)).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function Ne(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return N(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Pe(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function Fe({basename:e,pathname:t}){return t===`/`?e:We([e,t])}var Ie=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Le=e=>Ie.test(e);function Re(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?re(e):e,a;if(n)if(Le(n))a=n;else{if(n.includes(`//`)){let e=n;n=n.replace(/\/\/+/g,`/`),N(!1,`Pathnames cannot have embedded double slashes - normalizing ${e} -> ${n}`)}a=n.startsWith(`/`)?ze(n.substring(1),`/`):ze(n,t)}else a=t;return{pathname:a,search:Ke(r),hash:qe(i)}}function ze(e,t){let n=t.replace(/\/+$/,``).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Be(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Ve(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function He(e){let t=Ve(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Ue(e,t,n,r=!1){let i;typeof e==`string`?i=re(e):(i={...e},M(!i.pathname||!i.pathname.includes(`?`),Be(`?`,`pathname`,`search`,i)),M(!i.pathname||!i.pathname.includes(`#`),Be(`#`,`pathname`,`hash`,i)),M(!i.search||!i.search.includes(`#`),Be(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=Re(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var We=e=>e.join(`/`).replace(/\/\/+/g,`/`),Ge=e=>e.replace(/\/+$/,``).replace(/^\/*/,`/`),Ke=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,qe=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Je=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Ye(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Xe(e){return e.map(e=>e.route.path).filter(Boolean).join(`/`).replace(/\/\/*/g,`/`)||`/`}var Ze=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Qe(e,t){let n=e;if(typeof n!=`string`||!Ie.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Ze)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=Pe(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{N(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var $e=Symbol(`Uninstrumented`);function et(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){let t=Object.keys(n);for(let r of t)e[r]&&n[r].push(e[r])}}));let r={};if(typeof t.lazy==`function`&&n.lazy.length>0){let e=nt(n.lazy,t.lazy,()=>void 0);e&&(r.lazy=e)}if(typeof t.lazy==`object`){let e=t.lazy;[`middleware`,`loader`,`action`].forEach(t=>{let i=e[t],a=n[`lazy.${t}`];if(typeof i==`function`&&a.length>0){let e=nt(a,i,()=>void 0);e&&(r.lazy=Object.assign(r.lazy||{},{[t]:e}))}})}return[`loader`,`action`].forEach(e=>{let i=t[e];if(typeof i==`function`&&n[e].length>0){let t=i[$e]??i,a=nt(n[e],t,(...e)=>it(e[0]));a&&(e===`loader`&&t.hydrate===!0&&(a.hydrate=!0),a[$e]=t,r[e]=a)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=e[$e]??e,r=nt(n.middleware,t,(...e)=>it(e[0]));return r?(r[$e]=t,r):e})),r}function tt(e,t){let n={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){let t=Object.keys(e);for(let r of t)e[r]&&n[r].push(e[r])}})),n.navigate.length>0){let t=e.navigate[$e]??e.navigate,r=nt(n.navigate,t,(...t)=>{let[n,r]=t;return{to:typeof n==`number`||typeof n==`string`?n:n?ne(n):`.`,...at(e,r??{})}});r&&(r[$e]=t,e.navigate=r)}if(n.fetch.length>0){let t=e.fetch[$e]??e.fetch,r=nt(n.fetch,t,(...t)=>{let[n,,r,i]=t;return{href:r??`.`,fetcherKey:n,...at(e,i??{})}});r&&(r[$e]=t,e.fetch=r)}return e}function nt(e,t,n){return e.length===0?null:async(...r)=>{let i=await rt(e,n(...r),()=>t(...r),e.length-1);if(i.type===`error`)throw i.value;return i.value}}async function rt(e,t,n,r){let i=e[r],a;if(i){let o,s=async()=>(o?console.error(`You cannot call instrumented handlers more than once`):o=rt(e,t,n,r-1),a=await o,M(a,`Expected a result`),a.type===`error`&&a.value instanceof Error?{status:`error`,error:a.value}:{status:`success`,error:void 0});try{await i(s,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}o||await s(),await o}else try{a={type:`success`,value:await n()}}catch(e){a={type:`error`,value:e}}return a||{type:`error`,value:Error(`No result assigned in instrumentation chain.`)}}function it(e){let{request:t,context:n,params:r,unstable_pattern:i}=e;return{request:ot(t),params:{...r},unstable_pattern:i,context:st(n)}}function at(e,t){return{currentUrl:ne(e.state.location),...`formMethod`in t?{formMethod:t.formMethod}:{},...`formEncType`in t?{formEncType:t.formEncType}:{},...`formData`in t?{formData:t.formData}:{},...`body`in t?{body:t.body}:{}}}function ot(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function st(e){if(lt(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var ct=Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function lt(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join(`\0`)===ct}var ut=[`POST`,`PUT`,`PATCH`,`DELETE`],dt=new Set(ut),ft=[`GET`,...ut],pt=new Set(ft),mt=new Set([301,302,303,307,308]),ht=new Set([307,308]),gt={state:`idle`,location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},_t={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},vt={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},yt=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),bt=`remix-router-transitions`,xt=Symbol(`ResetLoaderData`);function St(e){let t=e.window?e.window:typeof window<`u`?window:void 0,n=t!==void 0&&t.document!==void 0&&t.document.createElement!==void 0;M(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties||yt,a=i;if(e.unstable_instrumentations){let t=e.unstable_instrumentations;a=e=>({...i(e),...et(t.map(e=>e.route).filter(Boolean),e)})}let o={},s=pe(e.routes,a,void 0,o),c,l=e.basename||`/`;l.startsWith(`/`)||(l=`/${l}`);let u=e.dataStrategy||zt,d={...e.future},f=null,p=new Set,m=null,h=null,g=null,_=e.hydrationData!=null,v=he(s,e.history.location,l),y=!1,b=null,x;if(v==null&&!e.patchRoutesOnNavigation){let t=cn(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=sn(s);x=!0,v=n,b={[r.id]:t}}else if(v&&!e.hydrationData&&st(v,s,e.history.location.pathname).active&&(v=null),!v){x=!1,v=[];let t=st(null,s,e.history.location.pathname);t.active&&t.matches&&(y=!0,v=t.matches)}else if(v.some(e=>e.route.lazy))x=!1;else if(!v.some(e=>Dt(e.route)))x=!0;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null;if(n){let e=v.findIndex(e=>n[e.route.id]!==void 0);x=v.slice(0,e+1).every(e=>!Ot(e.route,t,n))}else x=v.every(e=>!Ot(e.route,t,n))}let S,C={historyAction:e.history.action,location:e.history.location,matches:v,initialized:x,navigation:gt,restoreScrollPosition:e.hydrationData==null?null:!1,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||b,fetchers:new Map,blockers:new Map},w=`POP`,T=null,E=!1,D,O=!1,k=new Map,A=null,ee=!1,j=!1,te=new Set,P=new Map,ne=0,re=-1,ie=new Map,oe=new Set,ce=new Map,le=new Map,ue=new Set,de=new Map,fe,me=null;function ve(){if(f=e.history.listen(({action:t,location:n,delta:r})=>{if(fe){fe(),fe=void 0;return}N(de.size===0||r!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let i=$e({currentLocation:C.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{fe=e});e.history.go(r*-1),Qe(i,{state:`blocked`,location:n,proceed(){Qe(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(C.blockers);e.set(i,vt),xe({blockers:e})}}),T?.resolve(),T=null;return}return Te(t,n)}),n){Mn(t,k);let e=()=>Nn(t,k);t.addEventListener(`pagehide`,e),A=()=>t.removeEventListener(`pagehide`,e)}return C.initialized||Te(`POP`,C.location,{initialHydration:!0}),S}function ye(){f&&f(),A&&A(),p.clear(),D&&D.abort(),C.fetchers.forEach((e,t)=>Ue(t)),C.blockers.forEach((e,t)=>Ze(t))}function be(e){return p.add(e),()=>p.delete(e)}function xe(e,t={}){e.matches&&(e.matches=e.matches.map(e=>{let t=o[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e})),C={...C,...e};let n=[],r=[];C.fetchers.forEach((e,t)=>{e.state===`idle`&&(ue.has(t)?n.push(t):r.push(t))}),ue.forEach(e=>{!C.fetchers.has(e)&&!P.has(e)&&n.push(e)}),[...p].forEach(r=>r(C,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>Ue(e)),r.forEach(e=>C.fetchers.delete(e))}function Se(t,n,{flushSync:r}={}){let i=C.actionData!=null&&C.navigation.formMethod!=null&&Cn(C.navigation.formMethod)&&C.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?C.actionData:null;let o=n.loaderData?rn(C.loaderData,n.loaderData,n.matches||[],n.errors):C.loaderData,l=C.blockers;l.size>0&&(l=new Map(l),l.forEach((e,t)=>l.set(t,vt)));let u=ee?!1:ot(t,n.matches||C.matches),d=E===!0||C.navigation.formMethod!=null&&Cn(C.navigation.formMethod)&&t.state?._isRedirect!==!0;c&&(s=c,c=void 0),ee||w===`POP`||(w===`PUSH`?e.history.push(t,t.state):w===`REPLACE`&&e.history.replace(t,t.state));let f;if(w===`POP`){let e=k.get(C.location.pathname);e&&e.has(t.pathname)?f={currentLocation:C.location,nextLocation:t}:k.has(t.pathname)&&(f={currentLocation:t,nextLocation:C.location})}else if(O){let e=k.get(C.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),k.set(C.location.pathname,e)),f={currentLocation:C.location,nextLocation:t}}xe({...n,actionData:a,loaderData:o,historyAction:w,location:t,initialized:!0,navigation:gt,revalidation:`idle`,restoreScrollPosition:u,preventScrollReset:d,blockers:l},{viewTransitionOpts:f,flushSync:r===!0}),w=`POP`,E=!1,O=!1,ee=!1,j=!1,T?.resolve(),T=null,me?.resolve(),me=null}async function Ce(t,n){if(T?.resolve(),T=null,typeof t==`number`){T||(T=Pn());let n=T.promise;return e.history.go(t),n}let{path:r,submission:i,error:a}=Tt(!1,wt(C.location,C.matches,l,t,n?.fromRouteId,n?.relative),n),o=C.location,s=F(C.location,r,n&&n.state);s={...s,...e.history.encodeLocation(s)};let c=n&&n.replace!=null?n.replace:void 0,u=`PUSH`;c===!0?u=`REPLACE`:c===!1||i!=null&&Cn(i.formMethod)&&i.formAction===C.location.pathname+C.location.search&&(u=`REPLACE`);let d=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,f=(n&&n.flushSync)===!0,p=$e({currentLocation:o,nextLocation:s,historyAction:u});if(p){Qe(p,{state:`blocked`,location:s,proceed(){Qe(p,{state:`proceeding`,proceed:void 0,reset:void 0,location:s}),Ce(t,n)},reset(){let e=new Map(C.blockers);e.set(p,vt),xe({blockers:e})}});return}await Te(u,s,{submission:i,pendingError:a,preventScrollReset:d,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:f,callSiteDefaultShouldRevalidate:n&&n.unstable_defaultShouldRevalidate})}function we(){me||(me=Pn()),Re(),xe({revalidation:`loading`});let e=me.promise;return C.navigation.state===`submitting`?e:C.navigation.state===`idle`?(Te(C.historyAction,C.location,{startUninterruptedRevalidation:!0}),e):(Te(w||C.historyAction,C.navigation.location,{overrideNavigation:C.navigation,enableViewTransition:O===!0}),e)}async function Te(t,n,r){D&&D.abort(),D=null,w=t,ee=(r&&r.startUninterruptedRevalidation)===!0,at(C.location,C.matches),E=(r&&r.preventScrollReset)===!0,O=(r&&r.enableViewTransition)===!0;let i=c||s,a=r&&r.overrideNavigation,o=r?.initialHydration&&C.matches&&C.matches.length>0&&!y?C.matches:he(i,n,l),u=(r&&r.flushSync)===!0;if(o&&C.initialized&&!j&&dn(C.location,n)&&!(r&&r.submission&&Cn(r.submission.formMethod))){Se(n,{matches:o},{flushSync:u});return}let d=st(o,i,n.pathname);if(d.active&&d.matches&&(o=d.matches),!o){let{error:e,notFoundMatches:t,route:r}=nt(n.pathname);Se(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:u});return}D=new AbortController;let f=Qt(e.history,n,D.signal,r&&r.submission),p=e.getContext?await e.getContext():new se,m;if(r&&r.pendingError)m=[on(o).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&Cn(r.submission.formMethod)){let t=await Ee(f,n,r.submission,o,p,d.active,r&&r.initialHydration===!0,{replace:r.replace,flushSync:u});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if(gn(r)&&Ye(r.error)&&r.error.status===404){D=null,Se(n,{matches:t.matches,loaderData:{},errors:{[e]:r.error}});return}}o=t.matches||o,m=t.pendingActionResult,a=Dn(n,r.submission),u=!1,d.active=!1,f=Qt(e.history,f.url,f.signal)}let{shortCircuited:h,matches:g,loaderData:_,errors:v}=await De(f,n,o,p,d.active,a,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,u,m,r&&r.callSiteDefaultShouldRevalidate);h||(D=null,Se(n,{matches:g||o,...an(m),loaderData:_,errors:v}))}async function Ee(t,n,i,c,u,d,f,p={}){if(Re(),xe({navigation:On(n,i)},{flushSync:p.flushSync===!0}),d){let e=await ct(c,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=sn(s);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=on(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:`error`,error:e.error}]}}else if(e.matches)c=e.matches;else{let{notFoundMatches:e,error:t,route:r}=nt(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let m,h=Tn(c,n);if(!h.route.action&&!h.route.lazy)m={type:`error`,error:cn(405,{method:t.method,pathname:n.pathname,routeId:h.route.id})};else{let e=await Fe(t,Gt(a,o,t,c,h,f?[]:r,u),u,null);if(m=e[h.route.id],!m){for(let t of c)if(e[t.route.id]){m=e[t.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}if(_n(m)){let n;return n=p&&p.replace!=null?p.replace:Zt(m.response.headers.get(`Location`),new URL(t.url),l,e.history)===C.location.pathname+C.location.search,await Ne(t,m,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(gn(m)){let e=on(c,h.route.id);return(p&&p.replace)!==!0&&(w=`PUSH`),{matches:c,pendingActionResult:[e.route.id,m,h.route.id]}}return{matches:c,pendingActionResult:[h.route.id,m]}}async function De(t,n,i,u,d,f,p,m,h,g,_,v,y){let b=f||Dn(n,p),x=p||m||En(b),S=!ee&&!g;if(d){if(S){let e=Oe(v);xe({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await ct(i,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=sn(s);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=on(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}else if(e.matches)i=e.matches;else{let{error:e,notFoundMatches:t,route:r}=nt(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let w=c||s,{dsMatches:T,revalidatingFetchers:E}=Et(t,u,a,o,e.history,C,i,x,n,g?[]:r,g===!0,j,te,ue,ce,oe,w,l,e.patchRoutesOnNavigation!=null,v,y);if(re=++ne,!e.dataStrategy&&!T.some(e=>e.shouldLoad)&&!T.some(e=>e.route.middleware&&e.route.middleware.length>0)&&E.length===0){let e=qe();return Se(n,{matches:i,loaderData:{},errors:v&&gn(v[1])?{[v[0]]:v[1].error}:null,...an(v),...e?{fetchers:new Map(C.fetchers)}:{}},{flushSync:_}),{shortCircuited:!0}}if(S){let e={};if(!d){e.navigation=b;let t=Oe(v);t!==void 0&&(e.actionData=t)}E.length>0&&(e.fetchers=ke(E)),xe(e,{flushSync:_})}E.forEach(e=>{Ge(e.key),e.controller&&P.set(e.key,e.controller)});let O=()=>E.forEach(e=>Ge(e.key));D&&D.signal.addEventListener(`abort`,O);let{loaderResults:k,fetcherResults:A}=await Ie(T,E,t,u);if(t.signal.aborted)return{shortCircuited:!0};D&&D.signal.removeEventListener(`abort`,O),E.forEach(e=>P.delete(e.key));let M=ln(k);if(M)return await Ne(t,M.result,!0,{replace:h}),{shortCircuited:!0};if(M=ln(A),M)return oe.add(M.key),await Ne(t,M.result,!0,{replace:h}),{shortCircuited:!0};let{loaderData:N,errors:F}=nn(C,i,k,v,E,A);g&&C.errors&&(F={...C.errors,...F});let ie=qe(),ae=Je(re),se=ie||ae||E.length>0;return{matches:i,loaderData:N,errors:F,...se?{fetchers:new Map(C.fetchers)}:{}}}function Oe(e){if(e&&!gn(e[1]))return{[e[0]]:e[1].data};if(C.actionData)return Object.keys(C.actionData).length===0?null:C.actionData}function ke(e){return e.forEach(e=>{let t=C.fetchers.get(e.key),n=kn(void 0,t?t.data:void 0);C.fetchers.set(e.key,n)}),new Map(C.fetchers)}async function Ae(t,n,r,i){Ge(t);let a=(i&&i.flushSync)===!0,o=c||s,u=wt(C.location,C.matches,l,r,n,i?.relative),d=he(o,u,l),f=st(d,o,u);if(f.active&&f.matches&&(d=f.matches),!d){Be(t,n,cn(404,{pathname:u}),{flushSync:a});return}let{path:p,submission:m,error:h}=Tt(!0,u,i);if(h){Be(t,n,h,{flushSync:a});return}let g=e.getContext?await e.getContext():new se,_=(i&&i.preventScrollReset)===!0;if(m&&Cn(m.formMethod)){await je(t,n,p,d,g,f.active,a,_,m,i&&i.unstable_defaultShouldRevalidate);return}ce.set(t,{routeId:n,path:p}),await Me(t,n,p,d,g,f.active,a,_,m)}async function je(t,n,i,u,d,f,p,m,h,g){Re(),ce.delete(t),ze(t,An(h,C.fetchers.get(t)),{flushSync:p});let _=new AbortController,v=Qt(e.history,i,_.signal,h);if(f){let e=await ct(u,new URL(v.url).pathname,v.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){Be(t,n,e.error,{flushSync:p});return}else if(e.matches)u=e.matches;else{Be(t,n,cn(404,{pathname:i}),{flushSync:p});return}}let y=Tn(u,i);if(!y.route.action&&!y.route.lazy){Be(t,n,cn(405,{method:h.formMethod,pathname:i,routeId:n}),{flushSync:p});return}P.set(t,_);let b=ne,x=Gt(a,o,v,u,y,r,d),S=await Fe(v,x,d,t),T=S[y.route.id];if(!T){for(let e of x)if(S[e.route.id]){T=S[e.route.id];break}}if(v.signal.aborted){P.get(t)===_&&P.delete(t);return}if(ue.has(t)){if(_n(T)||gn(T)){ze(t,jn(void 0));return}}else{if(_n(T))if(P.delete(t),re>b){ze(t,jn(void 0));return}else return oe.add(t),ze(t,kn(h)),Ne(v,T,!1,{fetcherSubmission:h,preventScrollReset:m});if(gn(T)){Be(t,n,T.error);return}}let E=C.navigation.location||C.location,O=Qt(e.history,E,_.signal),k=c||s,A=C.navigation.state===`idle`?C.matches:he(k,C.navigation.location,l);M(A,`Didn't find any matches after fetcher action`);let ee=++ne;ie.set(t,ee);let N=kn(h,T.data);C.fetchers.set(t,N);let{dsMatches:F,revalidatingFetchers:ae}=Et(O,d,a,o,e.history,C,A,h,E,r,!1,j,te,ue,ce,oe,k,l,e.patchRoutesOnNavigation!=null,[y.route.id,T],g);ae.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=C.fetchers.get(t),r=kn(void 0,n?n.data:void 0);C.fetchers.set(t,r),Ge(t),e.controller&&P.set(t,e.controller)}),xe({fetchers:new Map(C.fetchers)});let se=()=>ae.forEach(e=>Ge(e.key));_.signal.addEventListener(`abort`,se);let{loaderResults:le,fetcherResults:de}=await Ie(F,ae,O,d);if(_.signal.aborted)return;if(_.signal.removeEventListener(`abort`,se),ie.delete(t),P.delete(t),ae.forEach(e=>P.delete(e.key)),C.fetchers.has(t)){let e=jn(T.data);C.fetchers.set(t,e)}let fe=ln(le);if(fe)return Ne(O,fe.result,!1,{preventScrollReset:m});if(fe=ln(de),fe)return oe.add(fe.key),Ne(O,fe.result,!1,{preventScrollReset:m});let{loaderData:pe,errors:me}=nn(C,A,le,void 0,ae,de);Je(ee),C.navigation.state===`loading`&&ee>re?(M(w,`Expected pending action`),D&&D.abort(),Se(C.navigation.location,{matches:A,loaderData:pe,errors:me,fetchers:new Map(C.fetchers)})):(xe({errors:me,loaderData:rn(C.loaderData,pe,A,me),fetchers:new Map(C.fetchers)}),j=!1)}async function Me(t,n,i,s,c,l,u,d,f){let p=C.fetchers.get(t);ze(t,kn(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=Qt(e.history,i,m.signal);if(l){let e=await ct(s,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){Be(t,n,e.error,{flushSync:u});return}else if(e.matches)s=e.matches;else{Be(t,n,cn(404,{pathname:i}),{flushSync:u});return}}let g=Tn(s,i);P.set(t,m);let _=ne,v=(await Fe(h,Gt(a,o,h,s,g,r,c),c,t))[g.route.id];if(P.get(t)===m&&P.delete(t),!h.signal.aborted){if(ue.has(t)){ze(t,jn(void 0));return}if(_n(v))if(re>_){ze(t,jn(void 0));return}else{oe.add(t),await Ne(h,v,!1,{preventScrollReset:d});return}if(gn(v)){Be(t,n,v.error);return}ze(t,jn(v.data))}}async function Ne(r,i,a,{submission:o,fetcherSubmission:s,preventScrollReset:c,replace:u}={}){a||(T?.resolve(),T=null),i.response.headers.has(`X-Remix-Revalidate`)&&(j=!0);let d=i.response.headers.get(`Location`);M(d,`Expected a Location header on the redirect Response`),d=Zt(d,new URL(r.url),l,e.history);let f=F(C.location,d,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(Le(d)){let n=ae(d,!0);e=n.origin!==t.location.origin||Pe(n.pathname,l)==null}if(e){u?t.location.replace(d):t.location.assign(d);return}}D=null;let p=u===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:m,formAction:h,formEncType:g}=C.navigation;!o&&!s&&m&&h&&g&&(o=En(C.navigation));let _=o||s;ht.has(i.response.status)&&_&&Cn(_.formMethod)?await Te(p,f,{submission:{..._,formAction:d},preventScrollReset:c||E,enableViewTransition:a?O:void 0}):await Te(p,f,{overrideNavigation:Dn(f,o),fetcherSubmission:s,preventScrollReset:c||E,enableViewTransition:a?O:void 0})}async function Fe(e,t,n,r){let i,a={};try{i=await Kt(u,e,t,r,n,!1)}catch(e){return t.filter(e=>e.shouldLoad).forEach(t=>{a[t.route.id]={type:`error`,error:e}}),a}if(e.signal.aborted)return a;if(!Cn(e.method))for(let e of t){if(i[e.route.id]?.type===`error`)break;!i.hasOwnProperty(e.route.id)&&!C.loaderData.hasOwnProperty(e.route.id)&&(!C.errors||!C.errors.hasOwnProperty(e.route.id))&&e.shouldCallHandler()&&(i[e.route.id]={type:`error`,result:Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[n,r]of Object.entries(i))if(hn(r)){let i=r.result;a[n]={type:`redirect`,response:Xt(i,e,n,t,l)}}else a[n]=await Yt(r);return a}async function Ie(e,t,n,r){let i=Fe(n,e,r,null),a=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await Fe(e.request,e.matches,r,e.key))[e.match.route.id];return{[e.key]:t}}else return Promise.resolve({[e.key]:{type:`error`,error:cn(404,{pathname:e.path})}})}));return{loaderResults:await i,fetcherResults:(await a).reduce((e,t)=>Object.assign(e,t),{})}}function Re(){j=!0,ce.forEach((e,t)=>{P.has(t)&&te.add(t),Ge(t)})}function ze(e,t,n={}){C.fetchers.set(e,t),xe({fetchers:new Map(C.fetchers)},{flushSync:(n&&n.flushSync)===!0})}function Be(e,t,n,r={}){let i=on(C.matches,t);Ue(e),xe({errors:{[i.route.id]:n},fetchers:new Map(C.fetchers)},{flushSync:(r&&r.flushSync)===!0})}function Ve(e){return le.set(e,(le.get(e)||0)+1),ue.has(e)&&ue.delete(e),C.fetchers.get(e)||_t}function He(e,t){Ge(e,t?.reason),ze(e,jn(null))}function Ue(e){let t=C.fetchers.get(e);P.has(e)&&!(t&&t.state===`loading`&&ie.has(e))&&Ge(e),ce.delete(e),ie.delete(e),oe.delete(e),ue.delete(e),te.delete(e),C.fetchers.delete(e)}function We(e){let t=(le.get(e)||0)-1;t<=0?(le.delete(e),ue.add(e)):le.set(e,t),xe({fetchers:new Map(C.fetchers)})}function Ge(e,t){let n=P.get(e);n&&(n.abort(t),P.delete(e))}function Ke(e){for(let t of e){let e=jn(Ve(t).data);C.fetchers.set(t,e)}}function qe(){let e=[],t=!1;for(let n of oe){let r=C.fetchers.get(n);M(r,`Expected fetcher: ${n}`),r.state===`loading`&&(oe.delete(n),e.push(n),t=!0)}return Ke(e),t}function Je(e){let t=[];for(let[n,r]of ie)if(r<e){let e=C.fetchers.get(n);M(e,`Expected fetcher: ${n}`),e.state===`loading`&&(Ge(n),ie.delete(n),t.push(n))}return Ke(t),t.length>0}function Xe(e,t){let n=C.blockers.get(e)||vt;return de.get(e)!==t&&de.set(e,t),n}function Ze(e){C.blockers.delete(e),de.delete(e)}function Qe(e,t){let n=C.blockers.get(e)||vt;M(n.state===`unblocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`proceeding`||n.state===`blocked`&&t.state===`unblocked`||n.state===`proceeding`&&t.state===`unblocked`,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(C.blockers);r.set(e,t),xe({blockers:r})}function $e({currentLocation:e,nextLocation:t,historyAction:n}){if(de.size===0)return;de.size>1&&N(!1,`A router only supports one blocker at a time`);let r=Array.from(de.entries()),[i,a]=r[r.length-1],o=C.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function nt(e){let t=cn(404,{pathname:e}),{matches:n,route:r}=sn(c||s);return{notFoundMatches:n,route:r,error:t}}function rt(e,t,n){if(m=e,g=t,h=n||null,!_&&C.navigation===gt){_=!0;let e=ot(C.location,C.matches);e!=null&&xe({restoreScrollPosition:e})}return()=>{m=null,g=null,h=null}}function it(e,t){return h&&h(e,t.map(e=>_e(e,C.loaderData)))||e.key}function at(e,t){if(m&&g){let n=it(e,t);m[n]=g()}}function ot(e,t){if(m){let n=it(e,t),r=m[n];if(typeof r==`number`)return r}return null}function st(t,n,r){if(e.patchRoutesOnNavigation){if(!t)return{active:!0,matches:ge(n,r,l,!0)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:ge(n,r,l,!0)}}return{active:!1,matches:null}}async function ct(t,n,r,i){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let u=t;for(;;){let t=c==null,d=c||s,f=o;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:u,fetcherKey:i,patch:(e,t)=>{r.aborted||Mt(e,t,d,f,a,!1)}})}catch(e){return{type:`error`,error:e,partialMatches:u}}finally{t&&!r.aborted&&(s=[...s])}if(r.aborted)return{type:`aborted`};let p=he(d,n,l),m=null;if(p&&(Object.keys(p[0].params).length===0||(m=ge(d,n,l,!0),!(m&&u.length<m.length&<(u,m.slice(0,u.length))))))return{type:`success`,matches:p};if(m||(m=ge(d,n,l,!0)),!m||lt(u,m))return{type:`success`,matches:null};u=m}}function lt(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function ut(e){o={},c=pe(e,a,void 0,o)}function dt(e,t,n=!1){let r=c==null;Mt(e,t,c||s,o,a,n),r&&(s=[...s],xe({}))}return S={get basename(){return l},get future(){return d},get state(){return C},get routes(){return s},get window(){return t},initialize:ve,subscribe:be,enableScrollRestoration:rt,navigate:Ce,fetch:Ae,revalidate:we,createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Ve,resetFetcher:He,deleteFetcher:We,dispose:ye,getBlocker:Xe,deleteBlocker:Ze,patchRoutes:dt,_internalFetchControllers:P,_internalSetRoutes:ut,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){xe(e)}},e.unstable_instrumentations&&(S=tt(S,e.unstable_instrumentations.map(e=>e.router).filter(Boolean))),S}function Ct(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function wt(e,t,n,r,i,a){let o,s;if(i){o=[];for(let e of t)if(o.push(e),e.route.id===i){s=e;break}}else o=t,s=t[t.length-1];let c=Ue(r||`.`,He(o),Pe(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=wn(c.search);if(s.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,`?index&`):`?index`;else if(!s.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();c.search=n?`?${n}`:``}}return n!==`/`&&(c.pathname=Fe({basename:n,pathname:c.pathname})),ne(c)}function Tt(e,t,n){if(!n||!Ct(n))return{path:t};if(n.formMethod&&!Sn(n.formMethod))return{path:t,error:cn(405,{method:n.formMethod})};let r=()=>({path:t,error:cn(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=un(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!Cn(i))return r();let e=typeof n.body==`string`?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,[t,n])=>`${e}${t}=${n}
|
||
`,``):String(n.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}else if(n.formEncType===`application/json`){if(!Cn(i))return r();try{let e=typeof n.body==`string`?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch{return r()}}}M(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=$t(n.formData),s=n.formData;else if(n.body instanceof FormData)o=$t(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=en(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=en(o)}catch{return r()}let c={formMethod:i,formAction:a,formEncType:n&&n.formEncType||`application/x-www-form-urlencoded`,formData:s,json:void 0,text:void 0};if(Cn(c.formMethod))return{path:t,submission:c};let l=re(t);return e&&l.search&&wn(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:ne(l),submission:c}}function Et(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b){let x=y?gn(y[1])?y[1].error:y[1].data:void 0,S=i.createURL(a.location),C=i.createURL(c),w;if(u&&a.errors){let e=Object.keys(a.errors)[0];w=o.findIndex(t=>t.route.id===e)}else if(y&&gn(y[1])){let e=y[0];w=o.findIndex(t=>t.route.id===e)-1}let T=y?y[1].statusCode:void 0,E=T&&T>=400,D={currentUrl:S,currentParams:a.matches[0]?.params||{},nextUrl:C,nextParams:o[0].params,...s,actionResult:x,actionStatus:T},O=Xe(o),k=o.map((i,o)=>{let{route:s}=i,c=null;if(w!=null&&o>w?c=!1:s.lazy?c=!0:Dt(s)?u?c=Ot(s,a.loaderData,a.errors):kt(a.loaderData,a.matches[o],i)&&(c=!0):c=!1,c!==null)return Wt(n,r,e,O,i,l,t,c);let f=!1;typeof b==`boolean`?f=b:E?f=!1:d||S.pathname+S.search===C.pathname+C.search?f=!0:S.search===C.search?At(a.matches[o],i)&&(f=!0):f=!0;let p={...D,defaultShouldRevalidate:f};return Wt(n,r,e,O,i,l,t,jt(i,p),p,b)}),A=[];return m.forEach((e,s)=>{if(u||!o.some(t=>t.route.id===e.routeId)||p.has(s))return;let c=a.fetchers.get(s),m=c&&c.state!==`idle`&&c.data===void 0,y=he(g,e.path,_);if(!y){if(v&&m)return;A.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(h.has(s))return;let x=Tn(y,e.path),S=new AbortController,C=Qt(i,e.path,S.signal),w=null;if(f.has(s))f.delete(s),w=Gt(n,r,C,y,x,l,t);else if(m)d&&(w=Gt(n,r,C,y,x,l,t));else{let e;e=typeof b==`boolean`?b:E?!1:d;let i={...D,defaultShouldRevalidate:e};jt(x,i)&&(w=Gt(n,r,C,y,x,l,t,i))}w&&A.push({key:s,routeId:e.routeId,path:e.path,matches:w,match:x,request:C,controller:S})}),{dsMatches:k,revalidatingFetchers:A}}function Dt(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Ot(e,t,n){if(e.lazy)return!0;if(!Dt(e))return!1;let r=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;return!r&&i?!1:typeof e.loader==`function`&&e.loader.hydrate===!0?!0:!r&&!i}function kt(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function At(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function jt(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function Mt(e,t,n,r,i,a){let o;if(e){let t=r[e];M(t,`No route found to patch children into: routeId = ${e}`),t.children||(t.children=[]),o=t.children}else o=n;let s=[],c=[];if(t.forEach(e=>{let t=o.find(t=>Nt(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=pe(s,i,[e||`_`,`patch`,String(o?.length||`0`)],r);o.push(...t)}if(a&&c.length>0)for(let e=0;e<c.length;e++){let{existingRoute:t,newRoute:n}=c[e],r=t,[a]=pe([n],i,[],{},!0);Object.assign(r,{element:a.element?a.element:r.element,errorElement:a.errorElement?a.errorElement:r.errorElement,hydrateFallbackElement:a.hydrateFallbackElement?a.hydrateFallbackElement:r.hydrateFallbackElement})}}function Nt(e,t){return`id`in e&&`id`in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((e,n)=>t.children?.some(t=>Nt(e,t))):!1}var Pt=new WeakMap,Ft=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(M(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=Pt.get(i);o||(o={},Pt.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=le(e),n=i[e]!==void 0&&e!==`hasErrorBoundary`;if(t)N(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)N(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await a();t!=null&&(Object.assign(i,{[e]:t}),Object.assign(i,r(i)))}typeof i.lazy==`object`&&(i.lazy[e]=void 0,Object.values(i.lazy).every(e=>e===void 0)&&(i.lazy=void 0))})();return o[e]=c,c},It=new WeakMap;function Lt(e,t,n,r,i){let a=n[e.id];if(M(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=It.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{M(typeof e.lazy==`function`,`No lazy route function found`);let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(r===void 0)continue;let i=de(e),o=a[e]!==void 0&&e!==`hasErrorBoundary`;i?N(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?N(!o,`Route "${a.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):n[e]=r}Object.assign(a,n),Object.assign(a,{...r(a),lazy:void 0})})();return It.set(a,n),n.catch(()=>{}),{lazyRoutePromise:n,lazyHandlerPromise:n}}let o=Object.keys(e.lazy),s=[],c;for(let a of o){if(i&&i.includes(a))continue;let o=Ft({key:a,route:e,manifest:n,mapRouteProperties:r});o&&(s.push(o),a===t&&(c=o))}let l=s.length>0?Promise.all(s).then(()=>{}):void 0;return l?.catch(()=>{}),c?.catch(()=>{}),{lazyRoutePromise:l,lazyHandlerPromise:c}}async function Rt(e){let t=e.matches.filter(e=>e.shouldLoad),n={};return(await Promise.all(t.map(e=>e.resolve()))).forEach((e,r)=>{n[t[r].route.id]=e}),n}async function zt(e){return e.matches.some(e=>e.route.middleware)?Bt(e,()=>Rt(e)):Rt(e)}function Bt(e,t){return Vt(e,t,e=>{if(xn(e))throw e;return e},pn,n);function n(t,n,r){if(r)return Promise.resolve(Object.assign(r.value,{[n]:{type:`error`,result:t}}));{let{matches:r}=e,i=on(r,r[Math.min(Math.max(r.findIndex(e=>e.route.id===n),0),Math.max(r.findIndex(e=>e.shouldCallHandler()),0))].route.id).route.id;return Promise.resolve({[i]:{type:`error`,result:t}})}}}async function Vt(e,t,n,r,i){let{matches:a,request:o,params:s,context:c,unstable_pattern:l}=e,u=a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]);return await Ht({request:o,params:s,context:c,unstable_pattern:l},u,t,n,r,i)}async function Ht(e,t,n,r,i,a,o=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??Error(`Request aborted: ${s.method} ${s.url}`);let c=t[o];if(!c)return await n();let[l,u]=c,d,f=async()=>{if(d)throw Error("You may only call `next()` once per middleware");try{return d={value:await Ht(e,t,n,r,i,a,o+1)},d.value}catch(e){return d={value:await a(e,l,d)},d.value}};try{let t=await u(e,f),n=t==null?void 0:r(t);return i(n)?n:d?n??d.value:(d={value:await f()},d.value)}catch(e){return await a(e,l,d)}}function Ut(e,t,n,r,i){let a=Ft({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=Lt(r.route,Cn(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function Wt(e,t,n,r,i,a,o,s,c=null,l){let u=!1,d=Ut(e,t,n,i,a);return{...i,_lazyPromises:d,shouldLoad:s,shouldRevalidateArgs:c,shouldCallHandler(e){return u=!0,c?typeof l==`boolean`?jt(i,{...c,defaultShouldRevalidate:l}):typeof e==`boolean`?jt(i,{...c,defaultShouldRevalidate:e}):jt(i,c):s},resolve(e){let{lazy:t,loader:a,middleware:c}=i.route,l=u||s||e&&!Cn(n.method)&&(t||a),f=c&&c.length>0&&!a&&!t;return l&&(Cn(n.method)||!f)?qt({request:n,unstable_pattern:r,match:i,lazyHandlerPromise:d?.handler,lazyRoutePromise:d?.route,handlerOverride:e,scopedContext:o}):Promise.resolve({type:`data`,result:void 0})}}}function Gt(e,t,n,r,i,a,o,s=null){return r.map(c=>c.route.id===i.route.id?Wt(e,t,n,Xe(r),c,a,o,!0,s):{...c,shouldLoad:!1,shouldRevalidateArgs:s,shouldCallHandler:()=>!1,_lazyPromises:Ut(e,t,n,c,a),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function Kt(e,t,n,r,i,a){n.some(e=>e._lazyPromises?.middleware)&&await Promise.all(n.map(e=>e._lazyPromises?.middleware));let o={request:t,unstable_pattern:Xe(n),params:n[0].params,context:i,matches:n},s=a?()=>{throw Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>{let t=o;return Bt(t,()=>e({...t,fetcherKey:r,runClientMiddleware:()=>{throw Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))},c=await e({...o,fetcherKey:r,runClientMiddleware:s});try{await Promise.all(n.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch{}return c}async function qt({request:e,unstable_pattern:t,match:n,lazyHandlerPromise:r,lazyRoutePromise:i,handlerOverride:a,scopedContext:o}){let s,c,l=Cn(e.method),u=l?`action`:`loader`,d=r=>{let i,s=new Promise((e,t)=>i=t);c=()=>i(),e.signal.addEventListener(`abort`,c);let l=i=>typeof r==`function`?r({request:e,unstable_pattern:t,params:n.params,context:o},...i===void 0?[]:[i]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean "${u}" [routeId: ${n.route.id}]`)),d=(async()=>{try{return{type:`data`,result:await(a?a(e=>l(e)):l())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([d,s])};try{let t=l?n.route.action:n.route.loader;if(r||i)if(t){let e,[n]=await Promise.all([d(t).catch(t=>{e=t}),r,i]);if(e!==void 0)throw e;s=n}else{await r;let t=l?n.route.action:n.route.loader;if(t)[s]=await Promise.all([d(t),i]);else if(u===`action`){let t=new URL(e.url),r=t.pathname+t.search;throw cn(405,{method:e.method,pathname:r,routeId:n.route.id})}else return{type:`data`,result:void 0}}else if(t)s=await d(t);else{let t=new URL(e.url);throw cn(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{c&&e.signal.removeEventListener(`abort`,c)}return s}async function Jt(e){let t=e.headers.get(`Content-Type`);return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function Yt(e){let{result:t,type:n}=e;if(yn(t)){let e;try{e=await Jt(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new Je(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?vn(t)?t.data instanceof Error?{type:`error`,error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:fn(t),statusCode:Ye(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:Ye(t)?t.status:void 0}:vn(t)?{type:`data`,data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`data`,data:t}}function Xt(e,t,n,r,i){let a=e.headers.get(`Location`);if(M(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!Le(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=wt(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}function Zt(e,t,n,r){let i=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];if(Le(e)){let r=e,a=r.startsWith(`//`)?new URL(t.protocol+r):new URL(r);if(i.includes(a.protocol))throw Error(`Invalid redirect location`);let o=Pe(a.pathname,n)!=null;if(a.origin===t.origin&&o)return a.pathname+a.search+a.hash}try{let t=r.createURL(e);if(i.includes(t.protocol))throw Error(`Invalid redirect location`)}catch{}return e}function Qt(e,t,n,r){let i=e.createURL(un(t)).toString(),a={signal:n};if(r&&Cn(r.formMethod)){let{formMethod:e,formEncType:t}=r;a.method=e.toUpperCase(),t===`application/json`?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(r.json)):t===`text/plain`?a.body=r.text:t===`application/x-www-form-urlencoded`&&r.formData?a.body=$t(r.formData):a.body=r.formData}return new Request(i,a)}function $t(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function en(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function tn(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},u=n&&gn(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let d=n.route.id,f=t[d];if(M(!_n(f),`Cannot handle redirect results in processLoaderData`),gn(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o=o||{},i)o[d]=t;else{let n=on(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=xt),c||(c=!0,s=Ye(f.error)?f.error.status:500),f.headers&&(l[d]=f.headers)}else a[d]=f.data,f.statusCode&&f.statusCode!==200&&!c&&(s=f.statusCode),f.headers&&(l[d]=f.headers)}),u!==void 0&&n&&(o={[n[0]]:u},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:l}}function nn(e,t,n,r,i,a){let{loaderData:o,errors:s}=tn(t,n,r);return i.filter(e=>!e.matches||e.matches.some(e=>e.shouldLoad)).forEach(t=>{let{key:n,match:r,controller:i}=t;if(i&&i.signal.aborted)return;let o=a[n];if(M(o,`Did not find corresponding fetcher result`),gn(o)){let t=on(e.matches,r?.route.id);s&&s[t.route.id]||(s={...s,[t.route.id]:o.error}),e.fetchers.delete(n)}else if(_n(o))M(!1,`Unhandled fetcher revalidation redirect`);else{let t=jn(o.data);e.fetchers.set(n,t)}}),{loaderData:o,errors:s}}function rn(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==xt).reduce((e,[t,n])=>(e[t]=n,e),{});for(let a of n){let n=a.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&a.route.loader&&(i[n]=e[n]),r&&r.hasOwnProperty(n))break}return i}function an(e){return e?gn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function on(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.hasErrorBoundary===!0)||e[0]}function sn(e){let t=e.length===1?e[0]:e.find(e=>e.index||!e.path||e.path===`/`)||{id:`__shim-error-route__`};return{matches:[{params:{},pathname:``,pathnameBase:``,route:t}],route:t}}function cn(e,{pathname:t,routeId:n,method:r,type:i,message:a}={}){let o=`Unknown Server Error`,s=`Unknown @remix-run/router error`;return e===400?(o=`Bad Request`,r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i===`invalid-body`&&(s=`Unable to encode submission body`)):e===403?(o=`Forbidden`,s=`Route "${n}" does not match URL "${t}"`):e===404?(o=`Not Found`,s=`No route matches URL "${t}"`):e===405&&(o=`Method Not Allowed`,r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new Je(e||500,o,Error(s),!0)}function ln(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(_n(r))return{key:n,result:r}}}function un(e){return ne({...typeof e==`string`?re(e):e,hash:``})}function dn(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash?!0:t.hash!==``}function fn(e){return new Je(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function pn(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&mn(t))}function mn(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function hn(e){return yn(e.result)&&mt.has(e.result.status)}function gn(e){return e.type===`error`}function _n(e){return(e&&e.type)===`redirect`}function vn(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function yn(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function bn(e){return mt.has(e)}function xn(e){return yn(e)&&bn(e.status)&&e.headers.has(`Location`)}function Sn(e){return pt.has(e.toUpperCase())}function Cn(e){return dt.has(e.toUpperCase())}function wn(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function Tn(e,t){let n=typeof t==`string`?re(t).search:t.search;if(e[e.length-1].route.index&&wn(n||``))return e[e.length-1];let r=Ve(e);return r[r.length-1]}function En(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:o}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function Dn(e,t){return t?{state:`loading`,location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:`loading`,location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function On(e,t){return{state:`submitting`,location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function kn(e,t){return e?{state:`loading`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:`loading`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function An(e,t){return{state:`submitting`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function jn(e){return{state:`idle`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Mn(e,t){try{let n=e.sessionStorage.getItem(bt);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch{}}function Nn(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(bt,JSON.stringify(n))}catch(e){N(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function Pn(){let e,t,n=new Promise((r,i)=>{e=async e=>{r(e);try{await n}catch{}},t=async e=>{i(e);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var Fn=y.createContext(null);Fn.displayName=`DataRouter`;var In=y.createContext(null);In.displayName=`DataRouterState`;var Ln=y.createContext(!1);function Rn(){return y.useContext(Ln)}var zn=y.createContext({isTransitioning:!1});zn.displayName=`ViewTransition`;var Bn=y.createContext(new Map);Bn.displayName=`Fetchers`;var Vn=y.createContext(null);Vn.displayName=`Await`;var Hn=y.createContext(null);Hn.displayName=`Navigation`;var Un=y.createContext(null);Un.displayName=`Location`;var Wn=y.createContext({outlet:null,matches:[],isDataRoute:!1});Wn.displayName=`Route`;var Gn=y.createContext(null);Gn.displayName=`RouteError`;var Kn=`REACT_ROUTER_ERROR`,qn=`REDIRECT`,Jn=`ROUTE_ERROR_RESPONSE`;function Yn(e){if(e.startsWith(`${Kn}:${qn}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function Xn(e){if(e.startsWith(`${Kn}:${Jn}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Je(t.status,t.statusText,t.data)}catch{}}function Zn(e,{relative:t}={}){M(Qn(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=y.useContext(Hn),{hash:i,pathname:a,search:o}=sr(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:We([n,a])),r.createHref({pathname:s,search:o,hash:i})}function Qn(){return y.useContext(Un)!=null}function $n(){return M(Qn(),`useLocation() may be used only in the context of a <Router> component.`),y.useContext(Un).location}var er=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function tr(e){y.useContext(Hn).static||y.useLayoutEffect(e)}function nr(){let{isDataRoute:e}=y.useContext(Wn);return e?Or():rr()}function rr(){M(Qn(),`useNavigate() may be used only in the context of a <Router> component.`);let e=y.useContext(Fn),{basename:t,navigator:n}=y.useContext(Hn),{matches:r}=y.useContext(Wn),{pathname:i}=$n(),a=JSON.stringify(He(r)),o=y.useRef(!1);return tr(()=>{o.current=!0}),y.useCallback((r,s={})=>{if(N(o.current,er),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Ue(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:We([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var ir=y.createContext(null);function ar(e){let t=y.useContext(Wn).outlet;return y.useMemo(()=>t&&y.createElement(ir.Provider,{value:e},t),[t,e])}function or(){let{matches:e}=y.useContext(Wn),t=e[e.length-1];return t?t.params:{}}function sr(e,{relative:t}={}){let{matches:n}=y.useContext(Wn),{pathname:r}=$n(),i=JSON.stringify(He(n));return y.useMemo(()=>Ue(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function cr(e,t){return lr(e,t)}function lr(e,t,n,r,i){M(Qn(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:a}=y.useContext(Hn),{matches:o}=y.useContext(Wn),s=o[o.length-1],c=s?s.params:{},l=s?s.pathname:`/`,u=s?s.pathnameBase:`/`,d=s&&s.route;{let e=d&&d.path||``;Ar(l,!d||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
||
|
||
Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let f=$n(),p;if(t){let e=typeof t==`string`?re(t):t;M(u===`/`||e.pathname?.startsWith(u),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${e.pathname}" was given in the \`location\` prop.`),p=e}else p=f;let m=p.pathname||`/`,h=m;if(u!==`/`){let e=u.replace(/^\//,``).split(`/`);h=`/`+m.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let g=he(e,{pathname:h});N(d||g!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),N(g==null||g[g.length-1].route.element!==void 0||g[g.length-1].route.Component!==void 0||g[g.length-1].route.lazy!==void 0,`Matched leaf route at location "${p.pathname}${p.search}${p.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let _=gr(g&&g.map(e=>Object.assign({},e,{params:Object.assign({},c,e.params),pathname:We([u,a.encodeLocation?a.encodeLocation(e.pathname.replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?u:We([u,a.encodeLocation?a.encodeLocation(e.pathnameBase.replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),o,n,r,i);return t&&_?y.createElement(Un.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,...p},navigationType:`POP`}},_):_}function ur(){let e=Tr(),t=Ye(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=y.createElement(y.Fragment,null,y.createElement(`p`,null,`💿 Hey developer 👋`),y.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,y.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,y.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),y.createElement(y.Fragment,null,y.createElement(`h2`,null,`Unexpected Application Error!`),y.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?y.createElement(`pre`,{style:i},n):null,o)}var dr=y.createElement(ur,null),fr=class extends y.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=Xn(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:y.createElement(Wn.Provider,{value:this.props.routeContext},y.createElement(Gn.Provider,{value:e,children:this.props.component}));return this.context?y.createElement(mr,{error:e},t):t}};fr.contextType=Ln;var pr=new WeakMap;function mr({children:e,error:t}){let{basename:n}=y.useContext(Hn);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Yn(t.digest);if(e){let r=pr.get(t);if(r)throw r;let i=Qe(e.location,n);if(Ze&&!pr.get(t))if(i.isExternal||e.reloadDocument)window.location.href=i.absoluteURL||i.to;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw pr.set(t,n),n}return y.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function hr({routeContext:e,match:t,children:n}){let r=y.useContext(Fn);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),y.createElement(Wn.Provider,{value:e},n)}function gr(e,t=[],n=null,r=null,i=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,o=n?.errors;if(o!=null){let e=a.findIndex(e=>e.route.id&&o?.[e.route.id]!==void 0);M(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(`,`)}`),a=a.slice(0,Math.min(a.length,e+1))}let s=!1,c=-1;if(n)for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(c=e),t.route.id){let{loaderData:e,errors:r}=n,i=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!r||r[t.route.id]===void 0);if(t.route.lazy||i){s=!0,a=c>=0?a.slice(0,c+1):[a[0]];break}}}let l=n&&r?(e,t)=>{r(e,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:Xe(n.matches),errorInfo:t})}:void 0;return a.reduceRight((e,r,i)=>{let u,d=!1,f=null,p=null;n&&(u=o&&r.route.id?o[r.route.id]:void 0,f=r.route.errorElement||dr,s&&(c<0&&i===0?(Ar(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):c===i&&(d=!0,p=r.route.hydrateFallbackElement||null)));let m=t.concat(a.slice(0,i+1)),h=()=>{let t;return t=u?f:d?p:r.route.Component?y.createElement(r.route.Component,null):r.route.element?r.route.element:e,y.createElement(hr,{match:r,routeContext:{outlet:e,matches:m,isDataRoute:n!=null},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||i===0)?y.createElement(fr,{location:n.location,revalidation:n.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function _r(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function vr(e){let t=y.useContext(Fn);return M(t,_r(e)),t}function yr(e){let t=y.useContext(In);return M(t,_r(e)),t}function br(e){let t=y.useContext(Wn);return M(t,_r(e)),t}function xr(e){let t=br(e),n=t.matches[t.matches.length-1];return M(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Sr(){return xr(`useRouteId`)}function Cr(){return yr(`useNavigation`).navigation}function wr(){let{matches:e,loaderData:t}=yr(`useMatches`);return y.useMemo(()=>e.map(e=>_e(e,t)),[e,t])}function Tr(){let e=y.useContext(Gn),t=yr(`useRouteError`),n=xr(`useRouteError`);return e===void 0?t.errors?.[n]:e}var Er=0;function Dr(e){let{router:t,basename:n}=vr(`useBlocker`),r=yr(`useBlocker`),[i,a]=y.useState(``),o=y.useCallback(t=>{if(typeof e!=`function`)return!!e;if(n===`/`)return e(t);let{currentLocation:r,nextLocation:i,historyAction:a}=t;return e({currentLocation:{...r,pathname:Pe(r.pathname,n)||r.pathname},nextLocation:{...i,pathname:Pe(i.pathname,n)||i.pathname},historyAction:a})},[n,e]);return y.useEffect(()=>{let e=String(++Er);return a(e),()=>t.deleteBlocker(e)},[t]),y.useEffect(()=>{i!==``&&t.getBlocker(i,o)},[t,i,o]),i&&r.blockers.has(i)?r.blockers.get(i):vt}function Or(){let{router:e}=vr(`useNavigate`),t=xr(`useNavigate`),n=y.useRef(!1);return tr(()=>{n.current=!0}),y.useCallback(async(r,i={})=>{N(n.current,er),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var kr={};function Ar(e,t,n){!t&&!kr[e]&&(kr[e]=!0,N(!1,n))}var jr={};function Mr(e,t){!e&&!jr[t]&&(jr[t]=!0,console.warn(t))}var Nr=y.useOptimistic,Pr=()=>void 0;function Fr(e){return Nr?Nr(e):[e,Pr]}function Ir(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&N(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:y.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&N(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:y.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&N(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:y.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var Lr=[`HydrateFallback`,`hydrateFallbackElement`],Rr=class{constructor(){this.status=`pending`,this.promise=new Promise((e,t)=>{this.resolve=t=>{this.status===`pending`&&(this.status=`resolved`,e(t))},this.reject=e=>{this.status===`pending`&&(this.status=`rejected`,t(e))}})}};function zr({router:e,flushSync:t,onError:n,unstable_useTransitions:r}){r=Rn()||r;let[i,a]=y.useState(e.state),[o,s]=Fr(i),[c,l]=y.useState(),[u,d]=y.useState({isTransitioning:!1}),[f,p]=y.useState(),[m,h]=y.useState(),[g,_]=y.useState(),v=y.useRef(new Map),b=y.useCallback((i,{deletedFetchers:o,newErrors:c,flushSync:u,viewTransitionOpts:g})=>{c&&n&&Object.values(c).forEach(e=>n(e,{location:i.location,params:i.matches[0]?.params??{},unstable_pattern:Xe(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&v.current.set(t,e.data)}),o.forEach(e=>v.current.delete(e)),Mr(u===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let b=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(Mr(g==null||b,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!g||!b){t&&u?t(()=>a(i)):r===!1?a(i):y.startTransition(()=>{r===!0&&s(e=>Br(e,i)),a(i)});return}if(t&&u){t(()=>{m&&(f?.resolve(),m.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:g.currentLocation,nextLocation:g.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>a(i))});n.finished.finally(()=>{t(()=>{p(void 0),h(void 0),l(void 0),d({isTransitioning:!1})})}),t(()=>h(n));return}m?(f?.resolve(),m.skipTransition(),_({state:i,currentLocation:g.currentLocation,nextLocation:g.nextLocation})):(l(i),d({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}))},[e.window,t,m,f,r,s,n]);y.useLayoutEffect(()=>e.subscribe(b),[e,b]),y.useEffect(()=>{u.isTransitioning&&!u.flushSync&&p(new Rr)},[u]),y.useEffect(()=>{if(f&&c&&e.window){let t=c,n=f.promise,i=e.window.document.startViewTransition(async()=>{r===!1?a(t):y.startTransition(()=>{r===!0&&s(e=>Br(e,t)),a(t)}),await n});i.finished.finally(()=>{p(void 0),h(void 0),l(void 0),d({isTransitioning:!1})}),h(i)}},[c,f,e.window,r,s]),y.useEffect(()=>{f&&c&&o.location.key===c.location.key&&f.resolve()},[f,m,o.location,c]),y.useEffect(()=>{!u.isTransitioning&&g&&(l(g.state),d({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),_(void 0))},[u.isTransitioning,g]);let x=y.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})}),[e]),S=e.basename||`/`,C=y.useMemo(()=>({router:e,navigator:x,static:!1,basename:S,onError:n}),[e,x,S,n]);return y.createElement(y.Fragment,null,y.createElement(Fn.Provider,{value:C},y.createElement(In.Provider,{value:o},y.createElement(Bn.Provider,{value:v.current},y.createElement(zn.Provider,{value:u},y.createElement(Gr,{basename:S,location:o.location,navigationType:o.historyAction,navigator:x,unstable_useTransitions:r},y.createElement(Vr,{routes:e.routes,future:e.future,state:o,onError:n})))))),null)}function Br(e,t){return{...e,navigation:t.navigation.state===`idle`?e.navigation:t.navigation,revalidation:t.revalidation===`idle`?e.revalidation:t.revalidation,actionData:t.navigation.state===`submitting`?e.actionData:t.actionData,fetchers:t.fetchers}}var Vr=y.memo(Hr);function Hr({routes:e,future:t,state:n,onError:r}){return lr(e,void 0,n,r,t)}function Ur({to:e,replace:t,state:n,relative:r}){M(Qn(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=y.useContext(Hn);N(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:a}=y.useContext(Wn),{pathname:o}=$n(),s=nr(),c=Ue(e,He(a),o,r===`path`),l=JSON.stringify(c);return y.useEffect(()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})},[s,l,r,t,n]),null}function Wr(e){return ar(e.context)}function Gr({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,unstable_useTransitions:o}){M(!Qn(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=y.useMemo(()=>({basename:s,navigator:i,static:a,unstable_useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=re(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`}=n,m=y.useMemo(()=>{let e=Pe(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p},navigationType:r}},[s,l,u,d,f,p,r]);return N(m!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),m==null?null:y.createElement(Hn.Provider,{value:c},y.createElement(Un.Provider,{children:t,value:m}))}y.Component;var Kr=`get`,qr=`application/x-www-form-urlencoded`;function Jr(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Yr(e){return Jr(e)&&e.tagName.toLowerCase()===`button`}function Xr(e){return Jr(e)&&e.tagName.toLowerCase()===`form`}function Zr(e){return Jr(e)&&e.tagName.toLowerCase()===`input`}function Qr(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function $r(e,t){return e.button===0&&(!t||t===`_self`)&&!Qr(e)}function ei(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function ti(e,t){let n=ei(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var ni=null;function ri(){if(ni===null)try{new FormData(document.createElement(`form`),0),ni=!1}catch{ni=!0}return ni}var ii=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function ai(e){return e!=null&&!ii.has(e)?(N(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${qr}"`),null):e}function oi(e,t){let n,r,i,a,o;if(Xr(e)){let o=e.getAttribute(`action`);r=o?Pe(o,t):null,n=e.getAttribute(`method`)||Kr,i=ai(e.getAttribute(`enctype`))||qr,a=new FormData(e)}else if(Yr(e)||Zr(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?Pe(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||Kr,i=ai(e.getAttribute(`formenctype`))||ai(o.getAttribute(`enctype`))||qr,a=new FormData(o,e),!ri()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(Jr(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=Kr,r=null,i=qr,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var si={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},ci=/[&><\u2028\u2029]/g;function li(e){return e.replace(ci,e=>si[e])}function ui(e,t){if(e===!1||e==null)throw Error(t)}function di(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&Pe(i.pathname,t)===`/`?i.pathname=`${t.replace(/\/$/,``)}/_root.${r}`:i.pathname=`${i.pathname.replace(/\/$/,``)}.${r}`,i}async function fi(e,t){if(e.id in t)return t[e.id];try{let n=await E(()=>import(e.module),void 0,import.meta.url);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function pi(e){return e!=null&&typeof e.page==`string`}function mi(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function hi(e,t,n){return bi((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await fi(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(mi).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function gi(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function _i(e,t,{includeHydrateFallback:n}={}){return vi(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function vi(e){return[...new Set(e)]}function yi(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function bi(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!pi(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(yi(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function xi(){let e=y.useContext(Fn);return ui(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Si(){let e=y.useContext(In);return ui(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Ci=y.createContext(void 0);Ci.displayName=`FrameworkContext`;function wi(){let e=y.useContext(Ci);return ui(e,`You must render this element inside a <HydratedRouter> element`),e}function Ti(e,t){let n=y.useContext(Ci),[r,i]=y.useState(!1),[a,o]=y.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=y.useRef(null);y.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),y.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:Ei(s,p),onBlur:Ei(c,m),onMouseEnter:Ei(l,p),onMouseLeave:Ei(u,m),onTouchStart:Ei(d,p)}]:[a,f,{}]:[!1,f,{}]}function Ei(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Di({page:e,...t}){let{router:n}=xi(),r=y.useMemo(()=>he(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?y.createElement(ki,{page:e,matches:r,...t}):null}function Oi(e){let{manifest:t,routeModules:n}=wi(),[r,i]=y.useState([]);return y.useEffect(()=>{let r=!1;return hi(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function ki({page:e,matches:t,...n}){let r=$n(),{future:i,manifest:a,routeModules:o}=wi(),{basename:s}=xi(),{loaderData:c,matches:l}=Si(),u=y.useMemo(()=>gi(e,t,l,a,r,`data`),[e,t,l,a,r]),d=y.useMemo(()=>gi(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=y.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=di(e,s,i.unstable_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.unstable_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=y.useMemo(()=>_i(d,a),[d,a]),m=Oi(d);return y.createElement(y.Fragment,null,f.map(e=>y.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>y.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>y.createElement(`link`,{key:e,nonce:n.nonce,...t})))}function Ai(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}y.Component;var ji=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{ji&&(window.__reactRouterVersion=`7.12.0`)}catch{}function Mi(e,t){return St({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:j({window:t?.window}),hydrationData:t?.hydrationData||Ni(),routes:e,mapRouteProperties:Ir,hydrationRouteProperties:Lr,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}function Ni(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:Pi(e.errors)}),e}function Pi(e){if(!e)return null;let t=Object.entries(e),n={};for(let[e,r]of t)if(r&&r.__type===`RouteErrorResponse`)n[e]=new Je(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type===`Error`){if(r.__subType){let t=window[r.__subType];if(typeof t==`function`)try{let i=new t(r.message);i.stack=``,n[e]=i}catch{}}if(n[e]==null){let t=Error(r.message);t.stack=``,n[e]=t}}else n[e]=r;return n}function Fi({basename:e,children:t,history:n,unstable_useTransitions:r}){let[i,a]=y.useState({action:n.action,location:n.location}),o=y.useCallback(e=>{r===!1?a(e):y.startTransition(()=>a(e))},[r]);return y.useLayoutEffect(()=>n.listen(o),[n,o]),y.createElement(Gr,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,unstable_useTransitions:r})}Fi.displayName=`unstable_HistoryRouter`;var Ii=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Li=y.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,state:o,target:s,to:c,preventScrollReset:l,viewTransition:u,unstable_defaultShouldRevalidate:d,...f},p){let{basename:m,unstable_useTransitions:h}=y.useContext(Hn),g=typeof c==`string`&&Ii.test(c),_=Qe(c,m);c=_.to;let v=Zn(c,{relative:r}),[b,x,S]=Ti(n,f),C=Wi(c,{replace:a,state:o,target:s,preventScrollReset:l,relative:r,viewTransition:u,unstable_defaultShouldRevalidate:d,unstable_useTransitions:h});function w(t){e&&e(t),t.defaultPrevented||C(t)}let T=y.createElement(`a`,{...f,...S,href:_.absoluteURL||v,onClick:_.isExternal||i?e:w,ref:Ai(p,x),target:s,"data-discover":!g&&t===`render`?`true`:void 0});return b&&!g?y.createElement(y.Fragment,null,T,y.createElement(Di,{page:v})):T});Li.displayName=`Link`;var Ri=y.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=sr(a,{relative:c.relative}),d=$n(),f=y.useContext(In),{navigator:p,basename:m}=y.useContext(Hn),h=f!=null&&ta(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=Pe(v,m)||v);let b=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,x=_===g||!r&&_.startsWith(g)&&_.charAt(b)===`/`,S=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(g.length)===`/`),C={isActive:x,isPending:S,isTransitioning:h},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return y.createElement(Li,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});Ri.displayName=`NavLink`;var zi=y.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=Kr,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},m)=>{let{unstable_useTransitions:h}=y.useContext(Hn),g=Ji(),_=Yi(s,{relative:l}),v=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&Ii.test(s);return y.createElement(`form`,{ref:m,method:v,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f});h&&n!==!1?y.startTransition(()=>p()):p()},...p,"data-discover":!b&&e===`render`?`true`:void 0})});zi.displayName=`Form`;function Bi({getKey:e,storageKey:t,...n}){let r=y.useContext(Ci),{basename:i}=y.useContext(Hn),a=$n(),o=wr();$i({getKey:e,storageKey:t});let s=y.useMemo(()=>{if(!r||!e)return null;let t=Qi(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return y.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${li(JSON.stringify(t||Xi))}, ${li(JSON.stringify(s))})`}})}Bi.displayName=`ScrollRestoration`;function Vi(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Hi(e){let t=y.useContext(Fn);return M(t,Vi(e)),t}function Ui(e){let t=y.useContext(In);return M(t,Vi(e)),t}function Wi(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:a,viewTransition:o,unstable_defaultShouldRevalidate:s,unstable_useTransitions:c}={}){let l=nr(),u=$n(),d=sr(e,{relative:a});return y.useCallback(f=>{if($r(f,t)){f.preventDefault();let t=n===void 0?ne(u)===ne(d):n,p=()=>l(e,{replace:t,state:r,preventScrollReset:i,relative:a,viewTransition:o,unstable_defaultShouldRevalidate:s});c?y.startTransition(()=>p()):p()}},[u,l,d,n,r,t,e,i,a,o,s,c])}function Gi(e){N(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=y.useRef(ei(e)),n=y.useRef(!1),r=$n(),i=y.useMemo(()=>ti(r.search,n.current?null:t.current),[r.search]),a=nr();return[i,y.useCallback((e,t)=>{let r=ei(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var Ki=0,qi=()=>`__${String(++Ki)}__`;function Ji(){let{router:e}=Hi(`useSubmit`),{basename:t}=y.useContext(Hn),n=Sr(),r=e.fetch,i=e.navigate;return y.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=oi(e,t);a.navigate===!1?await r(a.fetcherKey||qi(),n,a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function Yi(e,{relative:t}={}){let{basename:n}=y.useContext(Hn),r=y.useContext(Wn);M(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...sr(e||`.`,{relative:t})},o=$n();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:We([n,a.pathname])),ne(a)}var Xi=`react-router-scroll-positions`,Zi={};function Qi(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:Pe(e.pathname,n)||e.pathname},t)),i??(i=e.key),i}function $i({getKey:e,storageKey:t}={}){let{router:n}=Hi(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=Ui(`useScrollRestoration`),{basename:a}=y.useContext(Hn),o=$n(),s=wr(),c=Cr();y.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),ea(y.useCallback(()=>{if(c.state===`idle`){let t=Qi(o,s,a,e);Zi[t]=window.scrollY}try{sessionStorage.setItem(t||Xi,JSON.stringify(Zi))}catch(e){N(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(y.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||Xi);e&&(Zi=JSON.parse(e))}catch{}},[t]),y.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(Zi,()=>window.scrollY,e?(t,n)=>Qi(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),y.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{N(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function ea(e,t){let{capture:n}=t||{};y.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function ta(e,{relative:t}={}){let n=y.useContext(zn);M(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Hi(`useViewTransitionState`),i=sr(e,{relative:t});if(!n.isTransitioning)return!1;let a=Pe(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Pe(n.nextLocation.pathname,r)||n.nextLocation.pathname;return je(i.pathname,o)!=null||je(i.pathname,a)!=null}function na(e){return y.createElement(zr,{flushSync:S.flushSync,...e})}var ra=e=>typeof e==`string`,ia=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},aa=e=>e==null?``:String(e),oa=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},sa=/###/g,ca=e=>e&&e.includes(`###`)?e.replace(sa,`.`):e,la=e=>!e||ra(e),ua=(e,t,n)=>{let r=ra(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(la(e))return{};let t=ca(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return la(e)?{}:{obj:e,k:ca(r[i])}},da=(e,t,n)=>{let{obj:r,k:i}=ua(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=ua(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=ua(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},fa=(e,t,n,r)=>{let{obj:i,k:a}=ua(e,t,Object);i[a]=i[a]||[],i[a].push(n)},pa=(e,t)=>{let{obj:n,k:r}=ua(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},ma=(e,t,n)=>{let r=pa(e,n);return r===void 0?pa(t,n):r},ha=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(r in e?ra(e[r])||e[r]instanceof String||ra(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):ha(e[r],t[r],n):e[r]=t[r]);return e},ga=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),_a={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`},va=e=>ra(e)?e.replace(/[&<>"'\/]/g,e=>_a[e]):e,ya=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},ba=[` `,`,`,`?`,`!`,`;`],xa=new ya(20),Sa=(e,t,n)=>{t=t||``,n=n||``;let r=ba.filter(e=>!t.includes(e)&&!n.includes(e));if(r.length===0)return!0;let i=xa.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},Ca=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].includes(typeof t)&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},wa=e=>e?.replace(/_/g,`-`),Ta={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},Ea=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||Ta,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(e=e.map(e=>ra(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e),ra(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},Da=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){let n=(...r)=>{t(...r),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n(e,...t)})}},Oa=class extends Da{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.includes(`.`)?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):ra(n)&&i?o.push(...n.split(i)):o.push(n)));let s=pa(this.data,o);return!s&&!t&&!n&&e.includes(`.`)&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!ra(n)?s:Ca(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.includes(`.`)&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),da(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(ra(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.includes(`.`)&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=pa(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?ha(s,n,i):s={...s,...n},da(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},ka={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},Aa=Symbol(`i18next/PATH_KEY`);function ja(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===Aa?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Ma(e,t){let{[Aa]:n}=e(ja()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`,a=t?.enableSelector===`strict`;if(n.length>1&&i){let e=t?.ns,o=a?Array.isArray(e)?e:e?[e]:null:Array.isArray(e)?e:null;if(o&&(a?o:o.length>1?o.slice(1):[]).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var Na=e=>!ra(e)&&typeof e!=`boolean`&&typeof e!=`number`,Pa=class e extends Da{constructor(e,t={}){super(),oa([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=Ea.create(`translator`),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=Na(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.includes(n),o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Sa(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:ra(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.includes(a[0]))&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:ra(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||(i={}),t==null)return``;typeof t==`function`&&(t=Ma(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?Ma(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!ra(i.count),x=e.hasDefaultValue(i),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,C=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,w=b&&!i.ordinal&&i.count===0,T=w&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${C}`]||i.defaultValue,E=m;y&&!m&&x&&(E=T);let D=Na(E),O=Object.prototype.toString.apply(E);if(y&&E&&D&&!_.includes(O)&&!(ra(v)&&Array.isArray(E))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,E,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(E),t=e?[]:{},n=e?g:h;for(let e in E)if(Object.prototype.hasOwnProperty.call(E,e)){let r=`${n}${o}${e}`;x&&!m?t[e]=this.translate(r,{...i,defaultValue:Na(T)?T[e]:void 0,joinArrays:!1,ns:c}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=E[e])}m=t}}else if(y&&ra(v)&&Array.isArray(m))m=m.join(v),m&&(m=this.extendTranslation(m,t,i,r));else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=T),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&T!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,b&&!c?`${s}${this.pluralResolver.getSuffix(d,i.count,i)}`:s,c?T:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=x&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);w&&i[`defaultValue${this.options.pluralSeparator}zero`]&&!t.includes(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||T)})}):n(e,s,T))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=ra(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!ra(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=ra(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=ka.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return ra(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?Ma(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!ra(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(ra(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!this.checkedLoadedFor[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(this.checkedLoadedFor[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.startsWith(i)&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.startsWith(i)&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!ra(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith(`defaultValue`)&&e[t]!==void 0)return!0;return!1}},Fa=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ea.create(`languageUtils`)}getScriptPartFromCode(e){if(e=wa(e),!e||!e.includes(`-`))return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=wa(e),!e||!e.includes(`-`))return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(ra(e)&&e.includes(`-`)){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?!0:!e.includes(`-`)&&!r.includes(`-`)?!1:!!(e.includes(`-`)&&!r.includes(`-`)&&e.slice(0,e.indexOf(`-`))===r||e.startsWith(r)&&r.length>1))}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),ra(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return ra(e)&&(e.includes(`-`)||e.includes(`_`))?(this.options.load!==`languageOnly`&&i(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&i(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&i(this.getLanguagePartFromCode(e))):ra(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.includes(e)||i(this.formatLanguageCode(e))}),r}},Ia={zero:0,one:1,two:2,few:3,many:4,other:5},La={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},Ra=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Ea.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=wa(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),La;if(!e.match(/-|_/))return La;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule(`dev`,t)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule(`dev`,t)),n?n.resolvedOptions().pluralCategories.sort((e,t)=>Ia[e]-Ia[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},za=(e,t,n,r=`.`,i=!0)=>{let a=ma(e,t,n);return!a&&i&&ra(n)&&(a=Ca(e,n,r),a===void 0&&(a=Ca(t,n,r))),a},Ba=e=>e.replace(/\$/g,`$$$$`),Va=class{constructor(e={}){this.logger=Ea.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?va:t,this.escapeValue=n===void 0?!0:n,this.useRawValueToEscape=r===void 0?!1:r,this.prefix=i?ga(i):a||`{{`,this.suffix=o?ga(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u?ga(u):`-`,this.unescapeSuffix=this.unescapePrefix?``:l?ga(l):``,this.nestingPrefix=d?ga(d):f||ga(`$t(`),this.nestingSuffix=p?ga(p):m||ga(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_===void 0?!1:_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(!e.includes(this.formatSeparator)){let i=za(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(za(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp(),!this.escapeValue&&typeof e==`string`&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>Ba(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Ba(this.escape(e)):Ba(e)}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0)if(typeof l==`function`){let t=l(e,i,r);a=ra(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``;else !ra(a)&&!this.useRawValueToEscape&&(a=aa(a));let s=t.safeValue(a);if(e=e.replace(i[0],s),u?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(!e.includes(n))return e;let r=e.split(RegExp(`${ga(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.includes(this.prefix)&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!ra(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!ra(i))return i;ra(i)||(i=aa(i)),i||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),i=``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},Ha=e=>{let t=e.toLowerCase().trim(),n={};if(e.includes(`(`)){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].slice(0,-1);t===`currency`&&!i.includes(`:`)?n.currency||(n.currency=i.trim()):t===`relativetime`&&!i.includes(`:`)?n.range||(n.range=i.trim()):i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},Ua=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(wa(r),i),t[o]=s),s(n)}},Wa=e=>(t,n,r)=>e(wa(n),r)(t),Ga=class{constructor(e={}){this.logger=Ea.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?Ua:Wa;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Ua(t)}format(e,t,n,r={}){if(!t||e==null)return e;let i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf(`(`)>1&&!i[0].includes(`)`)&&i.find(e=>e.includes(`)`))){let e=i.findIndex(e=>e.includes(`)`));i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}return i.reduce((e,t)=>{let{formatName:i,formatOptions:a}=Ha(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}else this.logger.warn(`there was no format function for ${i}`);return e},e)}},Ka=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},qa=class extends Da{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Ea.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{fa(n.loaded,[i],a),Ka(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read(e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();ra(e)&&(e=this.languageUtils.toResolveHierarchy(e)),ra(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(!(n==null||n===``)){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},Ja=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),ra(e[1])&&(t.defaultValue=e[1]),ra(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Ya=e=>(ra(e.ns)&&(e.ns=[e.ns]),ra(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),ra(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes(`cimode`)&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),e),Xa=()=>{},Za=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},Qa=class e extends Da{constructor(e={},t){if(super(),this.options=Ya(e),this.services={},this.logger=Ea,this.modules={external:[]},Za(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(ra(e.ns)?e.defaultNS=e.ns:e.ns.includes(`translation`)||(e.defaultNS=e.ns[0]));let n=Ja();this.options={...n,...this.options,...Ya(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?Ea.init(r(this.modules.logger),this.options):Ea.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:Ga;let t=new Fa(this.options);this.store=new Oa(this.options.resources,this.options);let n=this.services;n.logger=Ea,n.resourceStore=this.store,n.languageUtils=t,n.pluralResolver=new Ra(t,{prepend:this.options.pluralSeparator}),e&&(n.formatter=r(e),n.formatter.init&&n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new Va(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new qa(r(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(n.languageDetector=r(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=r(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new Pa(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=Xa),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=ia(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=Xa){let n=t,r=ra(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&(e.includes(t)||e.push(t))})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=ia();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=Xa),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&ka.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&![`cimode`,`dev`].includes(e)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(![`cimode`,`dev`].includes(t)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=ia();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=ra(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(ra(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n,r){let i=r?.scopeNs,a=(e,t,...r)=>{let o;o=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(r)),o.lng=o.lng||a.lng,o.lngs=o.lngs||a.lngs;let s=o.ns!==void 0&&o.ns!==null;o.ns=o.ns||a.ns,o.keyPrefix!==``&&(o.keyPrefix=o.keyPrefix||n||a.keyPrefix);let c={...this.options,...o};Array.isArray(i)&&!s&&(c.ns=i),typeof o.keyPrefix==`function`&&(o.keyPrefix=Ma(o.keyPrefix,c));let l=this.options.keySeparator||`.`,u;return o.keyPrefix&&Array.isArray(e)?u=e.map(e=>(typeof e==`function`&&(e=Ma(e,c)),`${o.keyPrefix}${l}${e}`)):(typeof e==`function`&&(e=Ma(e,c)),u=o.keyPrefix?`${o.keyPrefix}${l}${e}`:e),this.t(u,o)};return ra(e)?a.lng=e:a.lngs=e,a.ns=t,a.keyPrefix=n,a}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=ia();return this.options.ns?(ra(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=ia();ra(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>!r.includes(e)&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new Fa(Ja());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=Xa){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new Oa(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...Ja().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new Va(n)}return a.translator=new Pa(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();Qa.createInstance,Qa.dir,Qa.init,Qa.loadResources,Qa.reloadResources,Qa.use,Qa.changeLanguage,Qa.getFixedT,Qa.t,Qa.exists,Qa.setDefaultNamespace,Qa.hasLoadedNamespace,Qa.loadNamespaces,Qa.loadLanguages;var $a=u(s(((e,t)=>{t.exports={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}}))()),eo=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function to(e){var t={type:`tag`,name:``,voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],($a.default[n[1]]||e.charAt(e.length-2)===`/`)&&(t.voidElement=!0),t.name.startsWith(`!--`))){var r=e.indexOf(`-->`);return{type:`comment`,comment:r===-1?``:e.slice(4,r)}}for(var i=new RegExp(eo),a=null;(a=i.exec(e))!==null;)if(a[0].trim())if(a[1]){var o=a[1].trim(),s=[o,``];o.indexOf(`=`)>-1&&(s=o.split(`=`)),t.attrs[s[0]]=s[1],i.lastIndex--}else a[2]&&(t.attrs[a[2]]=a[3].trim().substring(1,a[3].length-1));return t}var no=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,ro=/^\s*$/,io=Object.create(null);function ao(e,t){switch(t.type){case`text`:return e+t.content;case`tag`:return e+=`<`+t.name+(t.attrs?function(e){var t=[];for(var n in e)t.push(n+`="`+e[n]+`"`);return t.length?` `+t.join(` `):``}(t.attrs):``)+(t.voidElement?`/>`:`>`),t.voidElement?e:e+t.children.reduce(ao,``)+`</`+t.name+`>`;case`comment`:return e+`\x3C!--`+t.comment+`-->`}}var oo={parse:function(e,t){t||(t={}),t.components||(t.components=io);var n,r=[],i=[],a=-1,o=!1;if(e.indexOf(`<`)!==0){var s=e.indexOf(`<`);r.push({type:`text`,content:s===-1?e:e.substring(0,s)})}return e.replace(no,function(s,c){if(o){if(s!==`</`+n.name+`>`)return;o=!1}var l,u=s.charAt(1)!==`/`,d=s.startsWith(`\x3C!--`),f=c+s.length,p=e.charAt(f);if(d){var m=to(s);return a<0?(r.push(m),r):((l=i[a]).children.push(m),r)}if(u&&(a++,(n=to(s)).type===`tag`&&t.components[n.name]&&(n.type=`component`,o=!0),n.voidElement||o||!p||p===`<`||n.children.push({type:`text`,content:e.slice(f,e.indexOf(`<`,f))}),a===0&&r.push(n),(l=i[a-1])&&l.children.push(n),i[a]=n),(!u||n.voidElement)&&(a>-1&&(n.voidElement||n.name===s.slice(2,-1))&&(a--,n=a===-1?r:i[a]),!o&&p!==`<`&&p)){l=a===-1?r:i[a].children;var h=e.indexOf(`<`,f),g=e.slice(f,h===-1?void 0:h);ro.test(g)&&(g=` `),(h>-1&&a+l.length>=0||g!==` `)&&l.push({type:`text`,content:g})}}),r},stringify:function(e){return e.reduce(function(e,t){return e+ao(``,t)},``)}},so=(e,t,n,r)=>{let i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,`warn`,`react-i18next::`,!0);ho(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},co={},lo=(e,t,n,r)=>{ho(n)&&co[n]||(ho(n)&&(co[n]=new Date),so(e,t,n,r))},uo=(e,t)=>()=>{if(e.isInitialized)t();else{let n=()=>{setTimeout(()=>{e.off(`initialized`,n)},0),t()};e.on(`initialized`,n)}},fo=(e,t,n)=>{e.loadNamespaces(t,uo(e,n))},po=(e,t,n,r)=>{if(ho(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return fo(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,uo(e,r))},mo=(e,t,n={})=>!t.languages||!t.languages.length?(lo(t,`NO_LANGUAGES`,`i18n.languages were undefined or empty`,{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf(`languageChanging`)>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}),ho=e=>typeof e==`string`,go=e=>typeof e==`object`&&!!e,_o=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,vo={"&":`&`,"&":`&`,"<":`<`,"<":`<`,">":`>`,">":`>`,"'":`'`,"'":`'`,""":`"`,""":`"`," ":` `," ":` `,"©":`©`,"©":`©`,"®":`®`,"®":`®`,"…":`…`,"…":`…`,"/":`/`,"/":`/`},yo=e=>vo[e],bo=e=>e.replace(_o,yo),xo={bindI18n:`languageChanged`,bindI18nStore:``,transEmptyNodeValue:``,transSupportBasicHtmlNodes:!0,transWrapTextNodes:``,transKeepBasicHtmlNodesFor:[`br`,`strong`,`i`,`p`],useSuspense:!0,unescape:bo,transDefaultProps:void 0},So=(e={})=>{xo={...xo,...e}},Co=()=>xo,wo,To=e=>{wo=e},Eo=()=>wo,Do=(e,t)=>{if(!e)return!1;let n=e.props?.children??e.children;return t?n.length>0:!!n},Oo=e=>{if(!e)return[];let t=e.props?.children??e.children;return e.props?.i18nIsDynamicList?Ao(t):t},ko=e=>Array.isArray(e)&&e.every(y.isValidElement),Ao=e=>Array.isArray(e)?e:[e],jo=(e,t)=>{let n={...t};return n.props={...t.props,...e.props},n},Mo=e=>{let t={};if(!e)return t;let n=e=>{Ao(e).forEach(e=>{ho(e)||(Do(e)?n(Oo(e)):go(e)&&!(0,y.isValidElement)(e)&&Object.assign(t,e))})};return n(e),t},No=(e,t,n,r)=>{if(!e)return``;let i=``,a=Ao(e),o=t?.transSupportBasicHtmlNodes?t.transKeepBasicHtmlNodesFor??[]:[];return a.forEach((e,a)=>{if(ho(e)){i+=`${e}`;return}if((0,y.isValidElement)(e)){let{props:s,type:c}=e,l=Object.keys(s).length,u=o.indexOf(c)>-1,d=s.children;if(!d&&u&&!l){i+=`<${c}/>`;return}if(!d&&(!u||l)||s.i18nIsDynamicList){i+=`<${a}></${a}>`;return}if(u&&l<=1){let e=ho(d)?d:No(d,t,n,r);i+=`<${c}>${e}</${c}>`;return}let f=No(d,t,n,r);i+=`<${a}>${f}</${a}>`;return}if(e===null){so(n,`TRANS_NULL_VALUE`,`Passed in a null value as child`,{i18nKey:r});return}if(go(e)){let{format:t,...a}=e,o=Object.keys(a);if(o.length===1){let e=t?`${o[0]}, ${t}`:o[0];i+=`{{${e}}}`;return}so(n,`TRANS_INVALID_OBJ`,`Invalid child - Object should only have keys {{ value, format }} (format is optional).`,{i18nKey:r,child:e});return}so(n,`TRANS_INVALID_VAR`,`Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.`,{i18nKey:r,child:e})}),i},Po=(e,t=[],n={})=>{if(!e)return e;let r=Object.keys(n),i=[...t,...r],a=``,o=0;for(;o<e.length;)if(e[o]===`<`){let t=!1,n=e.slice(o).match(/^<\/(\d+|[a-zA-Z][a-zA-Z0-9_-]*)>/);if(n){let e=n[1];(/^\d+$/.test(e)||i.includes(e))&&(t=!0,a+=n[0],o+=n[0].length)}if(!t){let n=e.slice(o).match(/^<(\d+|[a-zA-Z][a-zA-Z0-9_-]*)(\s+[\w-]+(?:=(?:"[^"]*"|'[^']*'|[^\s>]+))?)*\s*(\/)?>/);if(n){let e=n[1];(/^\d+$/.test(e)||i.includes(e))&&(t=!0,a+=n[0],o+=n[0].length)}}t||(a+=`<`,o+=1)}else a+=e[o],o+=1;return a},Fo=(e,t,n,r,i,a,o)=>{if(n===``)return[];let s=i.transKeepBasicHtmlNodesFor||[],c=n&&new RegExp(s.map(e=>`<${e}`).join(`|`)).test(n);if(!e&&!t&&!c&&!o)return[n];let l=t??{},u=e=>{Ao(e).forEach(e=>{ho(e)||(Do(e)?u(Oo(e)):go(e)&&!(0,y.isValidElement)(e)&&Object.assign(l,e))})};u(e);let d=Po(n,s,l),f=oo.parse(`<0>${d}</0>`),p={...l,...a},m=(e,t,n)=>{let r=Oo(e),i=g(r,t.children,n);return ko(r)&&i.length===0||e.props?.i18nIsDynamicList?r:i},h=(e,t,n,r,i)=>{e.dummy?(e.children=t,n.push((0,y.cloneElement)(e,{key:r},i?void 0:t))):n.push(...y.Children.map([e],e=>{if(e.type===y.Fragment||e.props?.i18nIsDynamicList!==void 0){let n={key:r};return e&&e.props&&Object.keys(e.props).forEach(t=>{t===`children`||t===`i18nIsDynamicList`||(n[t]=e.props[t])}),(0,y.createElement)(e.type,n,i?null:t)}let n={key:r};return e&&e.props&&Object.keys(e.props).forEach(t=>{t===`ref`||t===`children`||(n[t]=e.props[t])}),(0,y.cloneElement)(e,n,i?null:t)}))},g=(e,n,a)=>{let l=Ao(e),u=Ao(n),d={};return u.reduce((e,n,u)=>{let f=n.children?.[0]?.content&&r.services.interpolator.interpolate(n.children[0].content,p,r.language);if(n.type===`tag`){let _=l[parseInt(n.name,10)];!_&&t&&(_=t[n.name]),a.length===1&&!_&&(_=a[0][n.name]),_||(_={});let v={...n.attrs};o&&Object.keys(v).forEach(e=>{let t=v[e];ho(t)&&(v[e]=bo(t))});let b=Object.keys(v).length===0?_:jo({props:v},_),x=(0,y.isValidElement)(b),S=x&&Do(n,!0)&&!n.voidElement,C=c&&go(b)&&b.dummy&&!x,w=go(t)&&Object.hasOwnProperty.call(t,n.name);if(ho(b)){let t=r.services.interpolator.interpolate(b,p,r.language);e.push(t)}else if(Do(b)||S)h(b,m(b,n,a),e,u);else if(C)h(b,g(l,n.children,a),e,u);else if(Number.isNaN(parseFloat(n.name)))if(w)h(b,m(b,n,a),e,u,n.voidElement);else if(i.transSupportBasicHtmlNodes&&s.indexOf(n.name)>-1)if(n.voidElement)e.push((0,y.createElement)(n.name,{key:`${n.name}-${u}`}));else{let t=d[n.name]||0;d[n.name]=t+1;let r,i=0;for(let e=0;e<l.length;e+=1){let a=l[e];if((0,y.isValidElement)(a)&&a.type===n.name){if(i===t){r=a;break}i+=1}}let o=g(r?Ao(Oo(r)):l,n.children,a);e.push((0,y.createElement)(n.name,{key:`${n.name}-${u}`},o))}else if(n.voidElement)e.push(`<${n.name} />`);else{let t=g(l,n.children,a);e.push(`<${n.name}>${t}</${n.name}>`)}else if(go(b)&&!x){let t=n.children[0]?f:null;t&&e.push(t)}else h(b,f,e,u,n.children.length!==1||!f)}else if(n.type===`text`){let t=i.transWrapTextNodes,a=typeof i.unescape==`function`?i.unescape:Co().unescape,s=o?a(r.services.interpolator.interpolate(n.content,p,r.language)):r.services.interpolator.interpolate(n.content,p,r.language);t?e.push((0,y.createElement)(t,{key:`${n.name}-${u}`},s)):e.push(s)}return e},[])};return Oo(g([{dummy:!0,children:e||[]}],f,Ao(e||[]))[0])},Io=(e,t,n)=>{let r=e.key||t,i=(0,y.cloneElement)(e,{key:r});if(!i.props||!i.props.children||n.indexOf(`${t}/>`)<0&&n.indexOf(`${t} />`)<0)return i;function a(){return(0,y.createElement)(y.Fragment,null,i)}return(0,y.createElement)(a,{key:r})},Lo=(e,t)=>e.map((e,n)=>Io(e,n,t)),Ro=(e,t)=>{let n={};return Object.keys(e).forEach(r=>{Object.assign(n,{[r]:Io(e[r],r,t)})}),n},zo=(e,t,n,r)=>e?Array.isArray(e)?Lo(e,t):go(e)?Ro(e,t):(lo(n,`TRANS_INVALID_COMPONENTS`,`<Trans /> "components" prop expects an object or array`,{i18nKey:r}),null):null,Bo=e=>!go(e)||Array.isArray(e)?!1:Object.keys(e).reduce((e,t)=>e&&Number.isNaN(Number.parseFloat(t)),!0);function Vo({children:e,count:t,parent:n,i18nKey:r,context:i,tOptions:a={},values:o,defaults:s,components:c,ns:l,i18n:u,t:d,shouldUnescape:f,...p}){let m=u||Eo();if(!m)return lo(m,`NO_I18NEXT_INSTANCE`,`Trans: You need to pass in an i18next instance using i18nextReactModule`,{i18nKey:r}),e;let h=d||m.t.bind(m)||(e=>e),g={...Co(),...m.options?.react},_=l||h.ns||m.options?.defaultNS;_=ho(_)?[_]:_||[`translation`];let{transDefaultProps:v}=g,b=v?.tOptions?{...v.tOptions,...a}:a,x=f??v?.shouldUnescape,S=v?.values?{...v.values,...o}:o,C=v?.components?{...v.components,...c}:c,w=No(e,g,m,r),T=s||b?.defaultValue||w||g.transEmptyNodeValue||(typeof r==`function`?Ma(r):r),{hashTransKey:E}=g,D=r||(E?E(w||T):w||T);o=m.options?.interpolation?.defaultVariables?S&&Object.keys(S).length>0?{...S,...m.options.interpolation.defaultVariables}:{...m.options.interpolation.defaultVariables}:S;let O=Mo(e);O&&typeof O.count==`number`&&t===void 0&&(t=O.count);let k=o||t!==void 0&&!m.options?.interpolation?.alwaysFormat||!e?b.interpolation:{interpolation:{...b.interpolation,prefix:`#$?`,suffix:`?$#`}},A={...b,context:i||b.context,count:t,...o,...k,defaultValue:T,ns:_},ee=D?h(D,A):T;ee===D&&T&&(ee=T);let j=zo(C,ee,m,r),M=j||e,N=null;Bo(j)&&(N=j,M=e);let te=Fo(M,N,ee,m,g,A,x),P=n??g.defaultTransParent;return P?(0,y.createElement)(P,p,te):te}var Ho={type:`3rdParty`,init(e){So(e.options.react),To(e)}},Uo=(0,y.createContext)(),Wo=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}};function Go({children:e,count:t,parent:n,i18nKey:r,context:i,tOptions:a={},values:o,defaults:s,components:c,ns:l,i18n:u,t:d,shouldUnescape:f,...p}){let{i18n:m,defaultNS:h}=(0,y.useContext)(Uo)||{},g=u||m||Eo(),_=d||g?.t.bind(g);return Vo({children:e,count:t,parent:n,i18nKey:r,context:i,tOptions:a,values:o,defaults:s,components:c,ns:l||_?.ns||h||g?.options?.defaultNS,i18n:g,t:d,shouldUnescape:f,...p})}var Ko=s((e=>{var t=f();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 d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),qo=s(((e,t)=>{t.exports=Ko()}))(),Jo={t:(e,t)=>{if(ho(t))return t;if(go(t)&&ho(t.defaultValue))return t.defaultValue;if(typeof e==`function`)return``;if(Array.isArray(e)){let t=e[e.length-1];return typeof t==`function`?``:t}return e},ready:!1},Yo=()=>()=>{},Xo=(e,t={})=>{let{i18n:n}=t,{i18n:r,defaultNS:i}=(0,y.useContext)(Uo)||{},a=n||r||Eo();a&&!a.reportNamespaces&&(a.reportNamespaces=new Wo),a||lo(a,`NO_I18NEXT_INSTANCE`,`useTranslation: You will need to pass in an i18next instance by using initReactI18next`);let o=(0,y.useMemo)(()=>({...Co(),...a?.options?.react,...t}),[a,t]),{useSuspense:s,keyPrefix:c}=o,l=e||i||a?.options?.defaultNS,u=ho(l)?[l]:l||[`translation`],d=(0,y.useMemo)(()=>u,u);a?.reportNamespaces?.addUsedNamespaces?.(d);let f=(0,y.useRef)(0),p=(0,y.useCallback)(e=>{if(!a)return Yo;let{bindI18n:t,bindI18nStore:n}=o,r=()=>{f.current+=1,e()};return t&&a.on(t,r),n&&a.store.on(n,r),()=>{t&&t.split(` `).forEach(e=>a.off(e,r)),n&&n.split(` `).forEach(e=>a.store.off(e,r))}},[a,o]),m=(0,y.useRef)(),h=(0,y.useCallback)(()=>{if(!a)return Jo;let e=!!(a.isInitialized||a.initializedStoreOnce)&&d.every(e=>mo(e,a,o)),n=t.lng||a.language,r=f.current,i=m.current;if(i&&i.ready===e&&i.lng===n&&i.keyPrefix===c&&i.revision===r)return i;let s={t:a.getFixedT(n,o.nsMode===`fallback`?d:d[0],c,{scopeNs:d}),ready:e,lng:n,keyPrefix:c,revision:r};return m.current=s,s},[a,d,c,o,t.lng]),[g,_]=(0,y.useState)(0),{t:v,ready:b}=(0,qo.useSyncExternalStore)(p,h,h);(0,y.useEffect)(()=>{if(a&&!b&&!s){let e=()=>_(e=>e+1);t.lng?po(a,t.lng,d,e):fo(a,d,e)}},[a,t.lng,d,b,s,g]);let x=a||{},S=(0,y.useRef)(null),C=(0,y.useRef)(),w=e=>{let t=Object.getOwnPropertyDescriptors(e);t.__original&&delete t.__original;let n=Object.create(Object.getPrototypeOf(e),t);if(!Object.prototype.hasOwnProperty.call(n,`__original`))try{Object.defineProperty(n,`__original`,{value:e,writable:!1,enumerable:!1,configurable:!1})}catch{}return n},T=(0,y.useMemo)(()=>{let e=x,t=e?.language,n=e;e&&(S.current&&S.current.__original===e&&C.current===t?n=S.current:(n=w(e),S.current=n,C.current=t));let r=!b&&!s?(...e)=>(lo(a,`USE_T_BEFORE_READY`,`useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t.`),v(...e)):v,i=[r,n,b];return i.t=r,i.i18n=n,i.ready=b,i},[v,x,b,x.resolvedLanguage,x.language,x.languages]);if(a&&s&&!b)throw new Promise(e=>{let n=()=>e();t.lng?po(a,t.lng,d,n):fo(a,d,n)});return T},Zo=s((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})),Qo=s(((e,t)=>{t.exports=Zo()})),I=Qo();function L({children:e,variant:t=`primary`,size:n=`md`,fullWidth:r=!1,loading:i=!1,className:a=``,disabled:o,...s}){let c=e!=null&&e!==!1;return(0,I.jsxs)(`button`,{className:[`btn`,`btn-${t}`,n===`sm`?`btn-sm`:``,r?`btn-full`:``,a].filter(Boolean).join(` `),disabled:o||i,...s,children:[i&&(0,I.jsx)(`span`,{className:`loading-spinner`,"aria-hidden":`true`}),c&&(0,I.jsx)(`span`,{children:e})]})}function $o({label:e,hint:t,error:n,rightElement:r,className:i=``,id:a,...o}){let s=(0,y.useId)(),c=a??s,l=t?`${c}-hint`:void 0,u=n?`${c}-error`:void 0,d=[o[`aria-describedby`],u,l].filter(Boolean).join(` `)||void 0;return(0,I.jsxs)(`div`,{className:`form-group`,children:[e&&(0,I.jsx)(`label`,{htmlFor:c,children:e}),(0,I.jsxs)(`div`,{style:{position:`relative`},children:[(0,I.jsx)(`input`,{id:c,className:`input ${i}`.trim(),"aria-invalid":!!n||o[`aria-invalid`],"aria-describedby":d,...o}),r&&(0,I.jsx)(`div`,{style:{position:`absolute`,right:8,top:`50%`,transform:`translateY(-50%)`},children:r})]}),t&&(0,I.jsx)(`div`,{id:l,className:`hint`,children:t}),n&&(0,I.jsx)(`div`,{id:u,className:`error-box`,children:n})]})}var es={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,focusable:`false`},ts={...es};function ns({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...es,width:e,height:e,...t,children:[(0,I.jsx)(`line`,{x1:`21`,x2:`14`,y1:`4`,y2:`4`}),(0,I.jsx)(`line`,{x1:`10`,x2:`3`,y1:`4`,y2:`4`}),(0,I.jsx)(`line`,{x1:`21`,x2:`12`,y1:`12`,y2:`12`}),(0,I.jsx)(`line`,{x1:`8`,x2:`3`,y1:`12`,y2:`12`}),(0,I.jsx)(`line`,{x1:`21`,x2:`16`,y1:`20`,y2:`20`}),(0,I.jsx)(`line`,{x1:`12`,x2:`3`,y1:`20`,y2:`20`}),(0,I.jsx)(`line`,{x1:`14`,x2:`14`,y1:`2`,y2:`6`}),(0,I.jsx)(`line`,{x1:`8`,x2:`8`,y1:`10`,y2:`14`}),(0,I.jsx)(`line`,{x1:`16`,x2:`16`,y1:`18`,y2:`22`})]})}function rs({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...es,width:e,height:e,...t,children:[(0,I.jsx)(`path`,{d:`m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4`}),(0,I.jsx)(`path`,{d:`m21 2-9.6 9.6`}),(0,I.jsx)(`circle`,{cx:`7.5`,cy:`15.5`,r:`5.5`})]})}function is({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...es,width:e,height:e,...t,children:[(0,I.jsx)(`path`,{d:`M12 8V4H8`}),(0,I.jsx)(`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`}),(0,I.jsx)(`path`,{d:`M2 14h2`}),(0,I.jsx)(`path`,{d:`M20 14h2`}),(0,I.jsx)(`path`,{d:`M15 13v2`}),(0,I.jsx)(`path`,{d:`M9 13v2`})]})}function as({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...es,width:e,height:e,...t,children:[(0,I.jsx)(`rect`,{x:`3`,y:`5`,width:`6`,height:`6`,rx:`1.5`}),(0,I.jsx)(`rect`,{x:`15`,y:`5`,width:`6`,height:`6`,rx:`1.5`}),(0,I.jsx)(`rect`,{x:`9`,y:`13`,width:`6`,height:`6`,rx:`1.5`}),(0,I.jsx)(`path`,{d:`M9 8h6`}),(0,I.jsx)(`path`,{d:`M12 11v2`}),(0,I.jsx)(`path`,{d:`M7.5 11v2`}),(0,I.jsx)(`path`,{d:`M16.5 11v2`})]})}function os({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...es,width:e,height:e,...t,children:[(0,I.jsx)(`rect`,{x:`3.5`,y:`3.5`,width:`5`,height:`5`,rx:`1.4`}),(0,I.jsx)(`rect`,{x:`15.5`,y:`3.5`,width:`5`,height:`5`,rx:`1.4`}),(0,I.jsx)(`rect`,{x:`3.5`,y:`15.5`,width:`5`,height:`5`,rx:`1.4`}),(0,I.jsx)(`rect`,{x:`15.5`,y:`15.5`,width:`5`,height:`5`,rx:`1.4`}),(0,I.jsx)(`path`,{d:`M8.5 8.5 10.75 10.75`}),(0,I.jsx)(`path`,{d:`M15.5 8.5 13.25 10.75`}),(0,I.jsx)(`path`,{d:`M8.5 15.5 10.75 13.25`}),(0,I.jsx)(`path`,{d:`M15.5 15.5 13.25 13.25`}),(0,I.jsx)(`circle`,{cx:`12`,cy:`12`,r:`1.6`,fill:`currentColor`,stroke:`none`})]})}function ss({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...es,width:e,height:e,...t,children:[(0,I.jsx)(`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`}),(0,I.jsx)(`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`}),(0,I.jsx)(`path`,{d:`M10 9H8`}),(0,I.jsx)(`path`,{d:`M16 13H8`}),(0,I.jsx)(`path`,{d:`M16 17H8`})]})}function cs({size:e=20,...t}){return(0,I.jsx)(`svg`,{...es,width:e,height:e,...t,children:(0,I.jsx)(`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`})})}function ls({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...es,width:e,height:e,...t,children:[(0,I.jsx)(`path`,{d:`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z`}),(0,I.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`})]})}function us({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...es,width:e,height:e,...t,children:[(0,I.jsx)(`path`,{d:`M12 22v-5`}),(0,I.jsx)(`path`,{d:`M9 8V2`}),(0,I.jsx)(`path`,{d:`M15 8V2`}),(0,I.jsx)(`path`,{d:`M6 8h12v4a6 6 0 0 1-12 0Z`})]})}function ds({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...es,width:e,height:e,...t,children:[(0,I.jsx)(`path`,{d:`M15 12h-5`}),(0,I.jsx)(`path`,{d:`M15 8h-5`}),(0,I.jsx)(`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`}),(0,I.jsx)(`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`})]})}function fs({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...es,width:e,height:e,...t,children:[(0,I.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,I.jsx)(`path`,{d:`M12 16v-4`}),(0,I.jsx)(`path`,{d:`M12 8h.01`})]})}function ps({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...es,width:e,height:e,...t,children:[(0,I.jsx)(`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`}),(0,I.jsx)(`path`,{d:`M21 3v5h-5`})]})}function ms({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...es,width:e,height:e,...t,children:[(0,I.jsx)(`path`,{d:`M12 15V3`}),(0,I.jsx)(`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}),(0,I.jsx)(`path`,{d:`m7 10 5 5 5-5`})]})}function hs({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...es,width:e,height:e,...t,children:[(0,I.jsx)(`path`,{d:`M3 6h18`}),(0,I.jsx)(`path`,{d:`M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6`}),(0,I.jsx)(`path`,{d:`M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2`}),(0,I.jsx)(`line`,{x1:`10`,x2:`10`,y1:`11`,y2:`17`}),(0,I.jsx)(`line`,{x1:`14`,x2:`14`,y1:`11`,y2:`17`})]})}function gs({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...es,width:e,height:e,...t,children:[(0,I.jsx)(`path`,{d:`M15 3h6v6`}),(0,I.jsx)(`path`,{d:`m21 3-7 7`}),(0,I.jsx)(`path`,{d:`M9 21H3v-6`}),(0,I.jsx)(`path`,{d:`m3 21 7-7`})]})}function _s({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...es,width:e,height:e,...t,children:[(0,I.jsx)(`path`,{d:`M4 14h6v6`}),(0,I.jsx)(`path`,{d:`m10 14-7 7`}),(0,I.jsx)(`path`,{d:`M20 10h-6V4`}),(0,I.jsx)(`path`,{d:`m14 10 7-7`})]})}function vs({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...es,width:e,height:e,...t,children:[(0,I.jsx)(`path`,{d:`M5 12h14`}),(0,I.jsx)(`path`,{d:`M12 5v14`})]})}function ys({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...es,width:e,height:e,...t,children:[(0,I.jsx)(`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`}),(0,I.jsx)(`path`,{d:`m15 5 4 4`})]})}function bs({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...es,width:e,height:e,...t,children:[(0,I.jsx)(`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z`}),(0,I.jsx)(`path`,{d:`M12 9v4`}),(0,I.jsx)(`path`,{d:`M12 17h.01`})]})}function xs({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...es,width:e,height:e,...t,children:[(0,I.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,I.jsx)(`path`,{d:`m9 12 2 2 4-4`})]})}function Ss({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...es,width:e,height:e,...t,children:[(0,I.jsx)(`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`}),(0,I.jsx)(`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`}),(0,I.jsx)(`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`}),(0,I.jsx)(`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`}),(0,I.jsx)(`path`,{d:`M12 12V8`})]})}function Cs({size:e=20,...t}){return(0,I.jsx)(`svg`,{...es,width:e,height:e,...t,children:(0,I.jsx)(`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`})})}function ws({size:e=20,...t}){return(0,I.jsx)(`svg`,{...es,width:e,height:e,...t,children:(0,I.jsx)(`path`,{d:`m18 15-6-6-6 6`})})}function Ts({size:e=20,...t}){return(0,I.jsx)(`svg`,{...es,width:e,height:e,...t,children:(0,I.jsx)(`path`,{d:`m6 9 6 6 6-6`})})}function Es({size:e=20,...t}){return(0,I.jsx)(`svg`,{...es,width:e,height:e,...t,children:(0,I.jsx)(`path`,{d:`m15 18-6-6 6-6`})})}function Ds({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...es,width:e,height:e,...t,children:[(0,I.jsx)(`path`,{d:`m21 21-4.34-4.34`}),(0,I.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`})]})}function Os({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...es,width:e,height:e,...t,children:[(0,I.jsx)(`path`,{d:`M18 6 6 18`}),(0,I.jsx)(`path`,{d:`m6 6 12 12`})]})}function ks({size:e=20,...t}){return(0,I.jsx)(`svg`,{...es,width:e,height:e,...t,children:(0,I.jsx)(`path`,{d:`M20 6 9 17l-5-5`})})}function As({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...es,width:e,height:e,...t,children:[(0,I.jsx)(`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`}),(0,I.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`})]})}function js({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...es,width:e,height:e,...t,children:[(0,I.jsx)(`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`}),(0,I.jsx)(`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`}),(0,I.jsx)(`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`}),(0,I.jsx)(`path`,{d:`m2 2 20 20`})]})}function Ms({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...es,width:e,height:e,...t,children:[(0,I.jsx)(`polyline`,{points:`22 12 16 12 14 15 10 15 8 12 2 12`}),(0,I.jsx)(`path`,{d:`M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`})]})}function Ns({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...es,width:e,height:e,...t,children:[(0,I.jsx)(`path`,{d:`m13.5 6.5-3.148-3.148a1.205 1.205 0 0 0-1.704 0L6.352 5.648a1.205 1.205 0 0 0 0 1.704L9.5 10.5`}),(0,I.jsx)(`path`,{d:`M16.5 7.5 19 5`}),(0,I.jsx)(`path`,{d:`m17.5 10.5 3.148 3.148a1.205 1.205 0 0 1 0 1.704l-2.296 2.296a1.205 1.205 0 0 1-1.704 0L13.5 14.5`}),(0,I.jsx)(`path`,{d:`M9 21a6 6 0 0 0-6-6`}),(0,I.jsx)(`path`,{d:`M9.352 10.648a1.205 1.205 0 0 0 0 1.704l2.296 2.296a1.205 1.205 0 0 0 1.704 0l4.296-4.296a1.205 1.205 0 0 0 0-1.704l-2.296-2.296a1.205 1.205 0 0 0-1.704 0z`})]})}function Ps({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...es,width:e,height:e,...t,children:[(0,I.jsx)(`line`,{x1:`10`,x2:`14`,y1:`2`,y2:`2`}),(0,I.jsx)(`line`,{x1:`12`,x2:`15`,y1:`14`,y2:`11`}),(0,I.jsx)(`circle`,{cx:`12`,cy:`14`,r:`8`})]})}function Fs({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...es,width:e,height:e,...t,children:[(0,I.jsx)(`path`,{d:`M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4`}),(0,I.jsx)(`path`,{d:`M9 18c-4.51 2-5-2-7-2`})]})}function Is({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...es,width:e,height:e,...t,children:[(0,I.jsx)(`path`,{d:`M15 3h6v6`}),(0,I.jsx)(`path`,{d:`M10 14 21 3`}),(0,I.jsx)(`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`})]})}function Ls({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...es,width:e,height:e,...t,children:[(0,I.jsx)(`path`,{d:`M12 7v14`}),(0,I.jsx)(`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`})]})}function Rs({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...es,width:e,height:e,...t,children:[(0,I.jsx)(`polyline`,{points:`16 18 22 12 16 6`}),(0,I.jsx)(`polyline`,{points:`8 6 2 12 8 18`})]})}function zs({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...ts,width:e,height:e,...t,children:[(0,I.jsx)(`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`}),(0,I.jsx)(`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`}),(0,I.jsx)(`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`}),(0,I.jsx)(`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`})]})}function Bs({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...ts,width:e,height:e,...t,children:[(0,I.jsx)(`line`,{x1:`21`,x2:`14`,y1:`4`,y2:`4`}),(0,I.jsx)(`line`,{x1:`10`,x2:`3`,y1:`4`,y2:`4`}),(0,I.jsx)(`line`,{x1:`21`,x2:`12`,y1:`12`,y2:`12`}),(0,I.jsx)(`line`,{x1:`8`,x2:`3`,y1:`12`,y2:`12`}),(0,I.jsx)(`line`,{x1:`21`,x2:`16`,y1:`20`,y2:`20`}),(0,I.jsx)(`line`,{x1:`12`,x2:`3`,y1:`20`,y2:`20`}),(0,I.jsx)(`line`,{x1:`14`,x2:`14`,y1:`2`,y2:`6`}),(0,I.jsx)(`line`,{x1:`8`,x2:`8`,y1:`10`,y2:`14`}),(0,I.jsx)(`line`,{x1:`16`,x2:`16`,y1:`18`,y2:`22`})]})}function Vs({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...ts,width:e,height:e,...t,children:[(0,I.jsx)(`path`,{d:`M12 22v-5`}),(0,I.jsx)(`path`,{d:`M9 8V2`}),(0,I.jsx)(`path`,{d:`M15 8V2`}),(0,I.jsx)(`path`,{d:`M6 8h12v4a6 6 0 0 1-12 0Z`})]})}function Hs({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...ts,width:e,height:e,...t,children:[(0,I.jsx)(`path`,{d:`m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7`}),(0,I.jsx)(`path`,{d:`M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8`}),(0,I.jsx)(`path`,{d:`M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4`}),(0,I.jsx)(`path`,{d:`M2 7h20`}),(0,I.jsx)(`path`,{d:`M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7`})]})}function Us({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...ts,width:e,height:e,...t,children:[(0,I.jsx)(`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`}),(0,I.jsx)(`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`}),(0,I.jsx)(`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`}),(0,I.jsx)(`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`}),(0,I.jsx)(`path`,{d:`M12 12V8`})]})}function Ws({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...ts,width:e,height:e,...t,children:[(0,I.jsx)(`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`}),(0,I.jsx)(`path`,{d:`m9 12 2 2 4-4`})]})}function Gs({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...ts,width:e,height:e,...t,children:[(0,I.jsx)(`path`,{d:`M2 21a8 8 0 0 1 13.292-6`}),(0,I.jsx)(`circle`,{cx:`10`,cy:`8`,r:`5`}),(0,I.jsx)(`path`,{d:`m16 19 2 2 4-4`})]})}function Ks({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...ts,width:e,height:e,...t,children:[(0,I.jsx)(`path`,{d:`m12 14 4-4`}),(0,I.jsx)(`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`})]})}function qs({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...ts,width:e,height:e,...t,children:[(0,I.jsx)(`path`,{d:`M15 12h-5`}),(0,I.jsx)(`path`,{d:`M15 8h-5`}),(0,I.jsx)(`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`}),(0,I.jsx)(`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`})]})}function Js({size:e=20,...t}){return(0,I.jsxs)(`svg`,{...ts,width:e,height:e,...t,children:[(0,I.jsx)(`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`}),(0,I.jsx)(`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`}),(0,I.jsx)(`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`}),(0,I.jsx)(`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`})]})}var Ys={wrap:`Select-module__wrap___8GKsa`,wrapFullWidth:`Select-module__wrapFullWidth___uQ1gt`,trigger:`Select-module__trigger___nKY0l`,triggerSm:`Select-module__triggerSm___0Ozlc`,triggerText:`Select-module__triggerText___zQEIp`,placeholder:`Select-module__placeholder___N04iW`,triggerIcon:`Select-module__triggerIcon___ipYKn`,dropdown:`Select-module__dropdown___6YdcD`,option:`Select-module__option___EKsSG`,optionActive:`Select-module__optionActive___y280o`,optionHighlighted:`Select-module__optionHighlighted___CPa3K`},Xs=8,Zs=6,Qs=240,$s=2010,ec=(e,t,n)=>Math.min(Math.max(e,t),n),tc=e=>{let t=e.getBoundingClientRect(),n=window.innerWidth,r=window.innerHeight,i=Math.min(t.width,Math.max(0,n-Xs*2)),a=ec(t.left,Xs,Math.max(Xs,n-i-Xs)),o=r-t.bottom-Xs-Zs,s=t.top-Xs-Zs,c=o>=Qs||o>=s?`down`:`up`,l=Math.max(0,Math.min(Qs,c===`down`?o:s));return c===`down`?{position:`fixed`,top:t.bottom+Zs,left:a,width:i,maxHeight:l,zIndex:$s}:{position:`fixed`,bottom:r-t.top+Zs,left:a,width:i,maxHeight:l,zIndex:$s}};function nc({value:e,options:t,onChange:n,placeholder:r,className:i,disabled:a=!1,ariaLabel:o,ariaLabelledBy:s,ariaDescribedBy:c,fullWidth:l=!0,size:u=`md`,id:d}){let f=(0,y.useId)(),p=d??f,m=`${p}-listbox`,[h,g]=(0,y.useState)(!1),[_,v]=(0,y.useState)(-1),b=(0,y.useRef)(null),x=(0,y.useRef)(null),C=(0,y.useRef)(null),[w,T]=(0,y.useState)(null),E=h&&!a;(0,y.useEffect)(()=>{if(!h||a)return;let e=e=>{let t=e.target;b.current?.contains(t)||x.current?.contains(t)||g(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[a,h]);let D=(0,y.useCallback)(()=>{b.current&&T(tc(b.current))},[]),O=(0,y.useCallback)(()=>{typeof window>`u`||(C.current!==null&&window.cancelAnimationFrame(C.current),C.current=window.requestAnimationFrame(()=>{C.current=null,D()}))},[D]);(0,y.useLayoutEffect)(()=>{if(!E){C.current!==null&&typeof window<`u`&&(window.cancelAnimationFrame(C.current),C.current=null);return}D();let e=()=>{O()},t=typeof ResizeObserver<`u`&&b.current?new ResizeObserver(()=>{O()}):null;return t&&b.current&&t.observe(b.current),window.addEventListener(`resize`,e),window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`resize`,e),window.removeEventListener(`scroll`,e,!0),t?.disconnect(),C.current!==null&&(window.cancelAnimationFrame(C.current),C.current=null)}},[E,O,D]);let k=(0,y.useMemo)(()=>t.findIndex(t=>t.value===e),[t,e]),A=_>=0?_:k>=0?k:t.length>0?0:-1,ee=k>=0?t[k]:void 0,j=ee?.label??r??``,M=!ee&&r,N=(0,y.useCallback)(e=>{let r=t[e];r&&(n(r.value),g(!1),v(e))},[n,t]),te=(0,y.useCallback)(e=>{t.length!==0&&v((A+e+t.length)%t.length)},[t.length,A]),P=(0,y.useCallback)(e=>{if(!a)switch(e.key){case`ArrowDown`:if(e.preventDefault(),!E){g(!0);return}te(1);return;case`ArrowUp`:if(e.preventDefault(),!E){g(!0);return}te(-1);return;case`Home`:if(!E||t.length===0)return;e.preventDefault(),v(0);return;case`End`:if(!E||t.length===0)return;e.preventDefault(),v(t.length-1);return;case`Enter`:case` `:if(e.preventDefault(),!E){g(!0);return}A>=0&&N(A);return;case`Escape`:if(!E)return;e.preventDefault(),g(!1);return;case`Tab`:E&&g(!1);return;default:return}},[N,a,E,te,t.length,A]);(0,y.useEffect)(()=>{!E||A<0||document.getElementById(`${p}-option-${A}`)?.scrollIntoView({block:`nearest`})},[E,A,p]);let F=E&&w?(0,I.jsx)(`div`,{ref:x,className:Ys.dropdown,id:m,role:`listbox`,"aria-label":o,style:w,children:t.map((t,n)=>{let r=t.value===e,i=n===A;return(0,I.jsx)(`button`,{id:`${p}-option-${n}`,type:`button`,role:`option`,"aria-selected":r,className:`${Ys.option} ${r?Ys.optionActive:``} ${i?Ys.optionHighlighted:``}`.trim(),onMouseEnter:()=>v(n),onKeyDown:P,onClick:()=>N(n),children:t.label},t.value)})}):null;return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`${Ys.wrap} ${l?Ys.wrapFullWidth:``} ${i??``}`,ref:b,children:(0,I.jsxs)(`button`,{id:p,type:`button`,className:`${Ys.trigger} ${u===`sm`?Ys.triggerSm:``}`.trim(),onClick:a?void 0:()=>g(e=>!e),onKeyDown:P,"aria-haspopup":`listbox`,"aria-expanded":E,"aria-controls":E?m:void 0,"aria-activedescendant":E&&A>=0?`${p}-option-${A}`:void 0,"aria-label":o,"aria-labelledby":s,"aria-describedby":c,disabled:a,children:[(0,I.jsx)(`span`,{className:`${Ys.triggerText} ${M?Ys.placeholder:``}`,children:j}),(0,I.jsx)(`span`,{className:Ys.triggerIcon,"aria-hidden":`true`,children:(0,I.jsx)(Ts,{size:14})})]})}),F&&(typeof document>`u`?F:(0,S.createPortal)(F,document.body))]})}var rc={root:`SelectionCheckbox-module__root___LiMQt`,disabled:`SelectionCheckbox-module__disabled___-T-uP`,input:`SelectionCheckbox-module__input___b-Hpm`,box:`SelectionCheckbox-module__box___FRD4m`,boxChecked:`SelectionCheckbox-module__boxChecked___4lydu`,label:`SelectionCheckbox-module__label___twhQj`};function ic({checked:e,onChange:t,label:n,ariaLabel:r,title:i,disabled:a=!1,className:o,labelClassName:s}){let c=[rc.root,a?rc.disabled:``,o].filter(Boolean).join(` `),l=[rc.box,e?rc.boxChecked:``].filter(Boolean).join(` `),u=[rc.label,s].filter(Boolean).join(` `);return(0,I.jsxs)(`label`,{className:c,title:i,children:[(0,I.jsx)(`input`,{className:rc.input,type:`checkbox`,checked:e,onChange:e=>{t(e.target.checked)},"aria-label":r,disabled:a}),(0,I.jsx)(`span`,{className:l,children:e?(0,I.jsx)(ks,{size:12}):null}),n?(0,I.jsx)(`div`,{className:u,children:n}):null]})}var ac=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},oc=(e=>e?ac(e):ac),sc=e=>e;function cc(e,t=sc){let n=y.useSyncExternalStore(e.subscribe,y.useCallback(()=>t(e.getState()),[e,t]),y.useCallback(()=>t(e.getInitialState()),[e,t]));return y.useDebugValue(n),n}var lc=e=>{let t=oc(e),n=e=>cc(t,e);return Object.assign(n,t),n},uc=(e=>e?lc(e):lc);function dc(){return`${Date.now()}-${Math.random().toString(36).substr(2,9)}`}var fc=e=>typeof e==`object`&&!!e&&!Array.isArray(e),pc=(e,t=``)=>e instanceof Error?e.message||t:typeof e==`string`?e||t:fc(e)&&typeof e.message==`string`&&e.message||t,mc=e=>e,hc=30*1e3,gc=8317,_c=`/v0/management`,vc=30*1e3,yc=[`x-cpa-version`],bc=[`x-cpa-build-date`],xc=[`x-cpa-support-plugin`],Sc=[`x-cpa-home-version`],Cc=[`x-cpa-home-build-date`],wc=[...Sc,...yc,`x-server-version`],Tc=[...Cc,...bc,`x-server-build-date`],Ec=60*1e3,Dc=10*1024*1024,Oc=`cli-proxy-auth`,kc=`cli-proxy-theme`,Ac=`cli-proxy-language`,jc=mc([`zh-CN`,`zh-TW`,`en`,`ru`]),Mc={"zh-CN":`language.chinese`,"zh-TW":`language.chinese_tw`,en:`language.english`,ru:`language.russian`},Nc=jc,Pc=3e3,Fc=uc(e=>({notifications:[],confirmation:{isOpen:!1,isLoading:!1,options:null},showNotification:(t,n=`info`,r=Pc)=>{let i=dc(),a={id:i,message:t,type:n,duration:r};e(e=>({notifications:[...e.notifications,a]})),r>0&&setTimeout(()=>{e(e=>({notifications:e.notifications.filter(e=>e.id!==i)}))},r)},removeNotification:t=>{e(e=>({notifications:e.notifications.filter(e=>e.id!==t)}))},clearAll:()=>{e({notifications:[]})},showConfirmation:t=>{e({confirmation:{isOpen:!0,isLoading:!1,options:t}})},hideConfirmation:()=>{e(e=>({confirmation:{...e.confirmation,isOpen:!1,options:null}}))},setConfirmationLoading:t=>{e(e=>({confirmation:{...e.confirmation,isLoading:t}}))}}));function Ic(e,t){let n;try{n=e()}catch{return}return{getItem:e=>{let r=e=>e===null?null:JSON.parse(e,t?.reviver),i=n.getItem(e)??null;return i instanceof Promise?i.then(r):r(i)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,t?.replacer)),removeItem:e=>n.removeItem(e)}}var Lc=e=>t=>{try{let n=e(t);return n instanceof Promise?n:{then(e){return Lc(e)(n)},catch(e){return this}}}catch(e){return{then(e){return this},catch(t){return Lc(t)(e)}}}},Rc=(e,t)=>(n,r,i)=>{let a={storage:Ic(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},o=!1,s=new Set,c=new Set,l=a.storage;if(!l)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)},r,i);let u=()=>{let e=a.partialize({...r()});return l.setItem(a.name,{state:e,version:a.version})},d=i.setState;i.setState=(e,t)=>(d(e,t),u());let f=e((...e)=>(n(...e),u()),r,i);i.getInitialState=()=>f;let p,m=()=>{if(!l)return;o=!1,s.forEach(e=>e(r()??f));let e=a.onRehydrateStorage?.call(a,r()??f)||void 0;return Lc(l.getItem.bind(l))(a.name).then(e=>{if(e)if(typeof e.version==`number`&&e.version!==a.version){if(a.migrate){let t=a.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error(`State loaded from storage couldn't be migrated since no migrate function was provided`)}else return[!1,e.state];return[!1,void 0]}).then(e=>{let[t,i]=e;if(p=a.merge(i,r()??f),n(p,!0),t)return u()}).then(()=>{e?.(p,void 0),p=r(),o=!0,c.forEach(e=>e(p))}).catch(t=>{e?.(void 0,t)})};return i.persist={setOptions:e=>{a={...a,...e},e.storage&&(l=e.storage)},clearStorage:()=>{l?.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>m(),hasHydrated:()=>o,onHydrate:e=>(s.add(e),()=>{s.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},a.skipHydration||m(),p||f},zc=()=>window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`,Bc=()=>zc()===`dark`?`dark`:`white`,Vc=e=>e===`dark`?`dark`:`light`,Hc=e=>e===`auto`?Bc():e===`white`?`white`:e,Uc=e=>{if(e===`dark`){document.documentElement.setAttribute(`data-theme`,`dark`);return}if(e===`white`){document.documentElement.setAttribute(`data-theme`,`white`);return}document.documentElement.removeAttribute(`data-theme`)},Wc=uc()(Rc((e,t)=>({theme:`auto`,resolvedTheme:`light`,setTheme:t=>{let n=Hc(t);Uc(n),e({theme:t,resolvedTheme:Vc(n)})},cycleTheme:()=>{let{theme:e,setTheme:n}=t(),r=[`light`,`white`,`dark`,`auto`],i=r[(r.indexOf(e)+1)%r.length];n(i)},initializeTheme:()=>{let{theme:n,setTheme:r}=t();if(r(n),!window.matchMedia)return()=>{};let i=window.matchMedia(`(prefers-color-scheme: dark)`),a=()=>{let{theme:n}=t();if(n===`auto`){let t=Bc();Uc(t),e({resolvedTheme:Vc(t)})}};return i.addEventListener(`change`,a),()=>i.removeEventListener(`change`,a)}}),{name:kc})),Gc={common:{login:`登录`,logout:`登出`,back:`返回`,cancel:`取消`,confirm:`确认`,leave:`离开`,stay:`继续编辑`,save:`保存`,delete:`删除`,edit:`编辑`,add:`添加`,update:`更新`,refresh:`刷新`,close:`关闭`,success:`成功`,error:`错误`,info:`信息`,warning:`警告`,loading:`加载中...`,connecting:`连接中...`,connected:`已连接`,disconnected:`未连接`,connecting_status:`连接中`,connected_status:`已连接`,disconnected_status:`未连接`,yes:`是`,no:`否`,not_set:`未设置`,optional:`可选`,required:`必填`,api_key:`密钥`,base_url:`地址`,prefix:`前缀`,proxy_url:`代理`,priority:`优先级`,alias:`别名`,failure:`失败`,unknown_error:`未知错误`,quota_update_required:`请更新 CPA 版本或检查更新`,quota_check_credential:`请检查凭证状态`,copy:`复制`,expand:`展开`,collapse:`收起`,status:`状态`,action:`操作`,custom_headers_label:`自定义请求头`,custom_headers_hint:`可选,设置需要附带到请求中的 HTTP 头,名称和值均不能为空。`,custom_headers_add:`添加请求头`,custom_headers_key_placeholder:`Header 名称,例如 X-Custom-Header`,custom_headers_value_placeholder:`Header 值`,model_name_placeholder:`模型名称,例如 claude-3-5-sonnet-20241022`,model_alias_placeholder:`模型别名 (可选)`,invalid_provider_index:`无效的提供商索引。`,unsaved_changes_title:`未保存的更改`,unsaved_changes_message:`你有未保存的更改,离开后将丢失这些更改。确定要离开吗?`},title:{main:`CLI Proxy API Management Center`,login:`CLI Proxy API Management Center`,abbr:`CPAMC`},splash:{title:`CLI Proxy API`,subtitle:`管理中心`},auto_login:{title:`正在自动登录...`,message:`正在使用本地保存的连接信息尝试连接服务器`},login:{subtitle:`请输入连接信息以访问管理界面`,connection_title:`连接地址`,connection_current:`当前地址`,connection_auto_hint:`系统将自动使用当前访问地址进行连接`,custom_connection_label:`自定义连接地址:`,custom_connection_placeholder:`例如: https://example.com:8317`,custom_connection_hint:`默认使用当前访问地址,若需要可手动输入其他地址。`,use_current_address:`使用当前地址`,remember_password_label:`记住密码`,management_key_label:`管理密钥:`,management_key_placeholder:`请输入管理密钥`,connect_button:`连接`,submit_button:`登录`,submitting:`连接中...`,error_title:`登录失败`,error_backend_detail:`后端返回`,error_required:`请填写完整的连接信息`,error_invalid:`连接失败,请检查服务地址、管理接口和管理密钥`,error_network:`网络连接失败,请检查网络或服务器地址`,error_timeout:`连接超时,服务器无响应`,error_unauthorized:`认证失败,管理密钥缺失或无效`,error_forbidden:`访问被拒绝,远程管理未启用、管理密钥未配置或 IP 被临时封禁`,error_not_found:`未找到 Management API,请确认服务地址指向 CLIProxyAPI 后端`,error_server:`后端处理管理接口时发生错误,请查看服务日志`,error_cors:`跨域请求被阻止,请检查服务器配置`,error_ssl:`SSL/TLS 证书验证失败`},header:{check_connection:`检查连接`,refresh_all:`刷新全部`,logout:`登出`},connection:{title:`连接信息`,server_address:`服务器地址:`,management_key:`管理密钥:`,status:`连接状态:`},nav:{dashboard:`仪表盘`,basic_settings:`基础设置`,api_keys:`API 密钥`,ai_providers:`AI 提供商`,auth_files:`认证文件`,oauth:`OAuth 登录`,quota_management:`配额管理`,plugins:`插件管理`,plugin_store:`插件商店`,config_management:`配置面板`,logs:`日志查看`,system_info:`中心信息`},nav_groups:{operate:`运行`,gateway:`网关`,observe:`观测`,plugin_pages:`插件`,control:`控制`},nav_meta:{dashboard:`运行总览`,ai_providers:`上游模型路由`,auth_files:`Auth 文件与凭证`,oauth:`OAuth 授权登录`,quota_management:`API Key 与限额`,plugins:`插件启停与配置`,plugin_store:`发现并安装插件`,logs:`请求追踪与排查`,config_management:`网关基础配置`,system_info:`运行与诊断信息`},dashboard:{title:`仪表盘`,subtitle:`欢迎使用 CLI Proxy API 管理中心`,openai_providers:`OpenAI 提供商`,quick_actions:`快捷操作`,current_config:`当前配置`,management_keys:`管理密钥`,provider_keys_detail:`G:{{gemini}} C:{{codex}} Cl:{{claude}} V:{{vertex}} O:{{openai}}`,oauth_credentials:`OAuth 凭证`,edit_settings:`编辑设置`,routing_strategy:`路由策略`,available_models:`可用模型`,available_models_desc:`所有提供商的模型总数`,welcome_back:`欢迎回来`,greeting_morning:`早上好`,greeting_afternoon:`下午好`,greeting_evening:`晚上好`,greeting_night:`夜深了`,caring_morning:`新的一天,准备大展身手吧。`,caring_afternoon:`稳步推进中,继续加油。`,caring_evening:`今天辛苦了,收尾工作做好哦。`,caring_night:`夜深了,别忘了早些休息。`,system_overview:`系统概览`},basic_settings:{title:`基础设置`,debug_title:`调试模式`,debug_enable:`启用调试模式`,proxy_title:`代理设置`,proxy_url_label:`代理 URL:`,proxy_url_placeholder:`例如: socks5://user:pass@127.0.0.1:1080/`,proxy_update:`更新`,proxy_clear:`清空`,retry_title:`请求重试`,retry_count_label:`重试次数:`,retry_update:`更新`,quota_title:`配额超出行为`,quota_switch_project:`自动切换项目`,quota_switch_preview:`切换到预览模型`,logging_title:`日志记录`,logging_to_file_enable:`启用日志记录到文件`,logs_max_total_size_title:`日志容量限制`,logs_max_total_size_label:`日志总大小上限 (MB):`,logs_max_total_size_hint:`设置为 0 表示不限制。`,logs_max_total_size_update:`更新`,request_log_title:`请求日志`,request_log_enable:`启用请求日志`,request_log_warning:`仅在需要排查问题时开启,日常请保持关闭。`,force_model_prefix_enable:`强制模型前缀`,ws_auth_title:`WebSocket 鉴权`,ws_auth_enable:`启用 /ws/* 鉴权`,routing_title:`路由策略`,routing_strategy_label:`路由策略:`,routing_strategy_hint:`round-robin 为轮询,fill-first 为优先填充。`,routing_strategy_update:`更新`,routing_strategy_round_robin:`round-robin (轮询)`,routing_strategy_fill_first:`fill-first (优先填充)`},api_keys:{title:`API 密钥管理`,proxy_auth_title:`代理服务认证密钥`,add_button:`添加密钥`,empty_title:`暂无API密钥`,empty_desc:`点击上方按钮添加第一个密钥`,item_title:`API密钥`,add_modal_title:`添加API密钥`,add_modal_key_label:`API密钥:`,add_modal_key_placeholder:`请输入API密钥`,edit_modal_title:`编辑API密钥`,edit_modal_key_label:`API密钥:`,delete_confirm:`确定要删除这个API密钥吗?`},auth_files:{title:`认证文件管理`,title_section:`认证文件`,description:`这里集中管理 CLI Proxy 支持的所有 JSON 认证文件(如 Qwen、Gemini、Vertex 等),上传后即可在运行时启用相应的 AI 服务。`,upload_button:`上传文件`,delete_all_button:`删除全部`,empty_title:`暂无认证文件`,empty_desc:`点击上方按钮上传第一个文件`,search_empty_title:`没有匹配的配置文件`,search_empty_desc:`请调整筛选条件或清空搜索关键字再试一次。`,file_size:`大小`,file_modified:`修改时间`,health_status_label:`健康状态`,health_status_healthy:`健康`,health_status_warning:`警告`,health_status_disabled:`已停用`,health_status_unknown:`未知`,health_status_no_message:`暂无状态说明`,last_refresh_label:`最近刷新`,refresh_not_available:`暂无`,refresh_just_now:`刚刚`,download_button:`下载`,delete_button:`删除`,delete_confirm:`确定要删除文件`,delete_all_confirm:`确定要删除所有认证文件吗?此操作不可恢复!`,delete_filtered_confirm:`确定要删除筛选出的 {{type}} 认证文件吗?此操作不可恢复!`,delete_problem_button:`删除问题凭证`,delete_problem_button_with_type:`删除 {{type}} 问题凭证`,delete_problem_confirm:`确定要删除所有有问题的认证文件吗?此操作不可恢复!`,delete_problem_filtered_confirm:`确定要删除筛选出的有问题的 {{type}} 认证文件吗?此操作不可恢复!`,delete_filtered_result_button:`删除筛选结果`,delete_filtered_result_confirm:`确定要删除当前筛选结果中的认证文件吗?此操作不可恢复!`,upload_error_json:`只能上传JSON文件`,upload_error_size:`文件大小不能超过 {{maxSize}}`,upload_success:`文件上传成功`,download_success:`文件下载成功`,delete_success:`文件删除成功`,delete_all_success:`成功删除`,delete_filtered_success:`成功删除 {{count}} 个 {{type}} 认证文件`,delete_filtered_partial:`{{type}} 认证文件删除完成,成功 {{success}} 个,失败 {{failed}} 个`,delete_filtered_none:`当前筛选类型 ({{type}}) 下没有可删除的认证文件`,delete_problem_success:`成功删除 {{count}} 个有问题的认证文件`,delete_problem_filtered_success:`成功删除 {{count}} 个有问题的 {{type}} 认证文件`,delete_problem_partial:`有问题认证文件删除完成,成功 {{success}} 个,失败 {{failed}} 个`,delete_problem_filtered_partial:`有问题的 {{type}} 认证文件删除完成,成功 {{success}} 个,失败 {{failed}} 个`,delete_problem_none:`当前没有可删除的有问题认证文件`,delete_problem_filtered_none:`当前筛选类型 ({{type}}) 下没有可删除的有问题认证文件`,delete_filtered_result_success:`成功删除 {{count}} 个筛选结果中的认证文件`,delete_filtered_result_partial:`筛选结果删除完成,成功 {{success}} 个,失败 {{failed}} 个`,delete_filtered_result_none:`当前筛选结果中没有可删除的认证文件`,files_count:`个文件`,pagination_prev:`上一页`,pagination_next:`下一页`,pagination_info:`第 {{current}} / {{total}} 页 · 共 {{count}} 个文件`,search_label:`搜索配置文件`,search_placeholder:`输入名称、类型或提供方关键字,支持 * 通配`,problem_filter_label:`问题筛选`,problem_filter_only:`仅显示有问题凭证`,disabled_filter_only:`仅显示已停用凭证`,display_options_label:`显示选项`,compact_mode_label:`简略模式`,sort_label:`排序`,sort_default:`默认`,sort_az:`A-Z 名称`,sort_priority:`优先级`,priority_display:`优先级`,page_size_label:`单页数量`,page_size_unit:`个/页`,view_mode_paged:`按页显示`,view_mode_all:`显示全部`,too_many_files_warning:`您的凭证总数过多,全部加载会导致页面卡顿,请保持单页浏览。`,filter_all:`全部`,filter_qwen:`Qwen`,filter_gemini:`Gemini`,filter_kimi:`Kimi`,filter_aistudio:`AIStudio`,filter_claude:`Claude`,filter_codex:`Codex`,filter_antigravity:`Antigravity`,filter_xai:`xAI`,filter_iflow:`iFlow`,filter_vertex:`Vertex`,filter_empty:`空文件`,filter_unknown:`其他`,type_qwen:`Qwen`,type_gemini:`Gemini`,type_kimi:`Kimi`,type_aistudio:`AIStudio`,type_claude:`Claude`,type_codex:`Codex`,type_antigravity:`Antigravity`,type_xai:`xAI`,type_iflow:`iFlow`,type_vertex:`Vertex`,type_empty:`空文件`,type_unknown:`其他`,type_virtual:`虚拟认证文件`,models_button:`模型`,models_title:`支持的模型`,models_loading:`正在加载模型列表...`,models_empty:`该凭证暂无可用模型`,models_empty_desc:`该认证凭证可能尚未被服务器加载或没有绑定任何模型`,models_unsupported:`当前版本不支持此功能`,models_unsupported_desc:`请更新 CLI Proxy API 到最新版本后重试`,models_excluded_badge:`已禁用`,models_excluded_hint:`此 OAuth 模型已被禁用`,status_toggle_label:`启用`,status_enabled_success:`已启用 "{{name}}"`,status_disabled_success:`已停用 "{{name}}"`,batch_status_success:`已成功更新 {{count}} 个文件`,batch_status_partial:`成功 {{success}} 个,失败 {{failed}} 个`,batch_delete_title:`删除选中文件`,batch_delete_confirm:`确定要删除 {{count}} 个文件吗?`,batch_selected:`已选 {{count}} 项`,batch_select_all:`全选`,batch_select_page:`全选当前页`,batch_select_filtered:`全选筛选结果`,batch_invert_page:`反选当前页`,batch_deselect:`取消选择`,batch_download:`下载选中`,batch_download_success:`已开始下载 {{count}} 个文件`,batch_download_partial:`下载完成:成功 {{success}} 个,失败 {{failed}} 个`,batch_enable:`启用`,batch_disable:`禁用`,prefix_proxy_button:`认证文件详情 / 编辑`,auth_field_editor_title:`认证文件详情 / 编辑 - {{name}}`,prefix_proxy_loading:`正在加载认证文件...`,prefix_proxy_info_label:`认证文件信息(info)`,prefix_proxy_source_label:`认证文件 JSON(预览)`,prefix_proxy_invalid_content_label:`下载内容(已截断)`,prefix_label:`前缀(prefix)`,proxy_url_label:`代理 URL(proxy_url)`,prefix_placeholder:``,proxy_url_placeholder:`socks5://username:password@proxy_ip:port/`,priority_label:`优先级(priority)`,priority_placeholder:`例如: 10 或 -1`,priority_hint:`仅支持整数;非法值会被忽略。数值越大优先级越高。`,codex_websockets_label:`WebSockets(websockets)`,codex_websockets_hint:`为该 Codex 凭证开启 Responses API 的 websocket 传输。`,excluded_models_label:`排除模型(excluded_models)`,excluded_models_placeholder:`用逗号或换行分隔,例如: model-a, gpt-5-*, *-preview`,excluded_models_hint:`保存为数组;会自动 trim、小写、去重并排序。`,disable_cooling_label:`禁用冷却(disable_cooling)`,disable_cooling_placeholder:`例如: true / false / 1 / 0`,disable_cooling_hint:`支持布尔值、0/非0 数字或字符串 true/false/1/0;无法解析时忽略。`,note_label:`备注(note)`,note_placeholder:`输入备注信息,例如:张三的账号`,note_hint:`可选,用于标记凭证用途或归属;留空则不写入。`,note_display:`备注`,headers_label:`自定义请求头(headers)`,headers_placeholder:`{
|
||
"Header-Name": "value"
|
||
}`,headers_hint:`以 JSON 对象格式输入自定义 HTTP 请求头,例如:{"X-My-Header": "value"}`,headers_invalid_json:`自定义请求头必须是有效的 JSON。`,headers_invalid_object:`自定义请求头必须是 JSON 对象。`,headers_invalid_value:`每个自定义请求头的值都必须是字符串。`,prefix_proxy_invalid_json:`该认证文件不是 JSON 对象,无法编辑字段。`,prefix_proxy_html_challenge:`下载到的是 HTML 验证页面,不是认证 JSON 对象。请重新认证或替换该认证文件后再编辑字段。`,prefix_proxy_saved_success:`已更新认证文件 "{{name}}"`,quota_refresh_single:`刷新额度`,quota_refresh_hint:`仅刷新该认证文件的额度`,quota_refresh_success:`已刷新 "{{name}}" 的额度`,quota_refresh_failed:`刷新 "{{name}}" 的额度失败:{{message}}`},antigravity_subscription:{subscription_label:`订阅`,plan_badge:`套餐 {{plan}}`,loading_short:`套餐...`,error_badge:`套餐错误`,load_failed:`订阅状态获取失败:{{message}}`,missing_auth_index:`认证文件缺少 auth_index`,empty_data:`暂无订阅数据`,plan_unknown:`未知`,plan_free:`免费版`,plan_pro:`Pro`,plan_ultra:`Ultra`,plan_ultra_lite:`Ultra Lite`},antigravity_quota:{title:`Antigravity 额度`,empty_title:`暂无 Antigravity 认证`,empty_desc:`上传 Antigravity 认证文件后即可查看额度。`,idle:`点击此处刷新额度`,loading:`正在加载额度...`,load_failed:`额度获取失败:{{message}}`,missing_auth_index:`认证文件缺少 auth_index`,missing_project_id:`Antigravity 凭证缺少 project_id。请重新登录或刷新凭证以发现项目。`,empty_models:`暂无额度数据`,plan_label:`套餐`,group_gemini_models:`Gemini 模型`,group_claude_gpt_models:`Claude 和 GPT 模型`,group_models_description:`此分组包含:{{models}}`,weekly_limit:`周限额`,daily_limit:`日限额`,five_hour_limit:`5 小时限额`,monthly_limit:`月限额`,quota_available:`额度可用`,remaining_percent:`剩余 {{percent}}%`,refreshes_in:`{{duration}} 后刷新`,refresh_available:`可刷新`,duration_day_hour:`{{days}} 天 {{hours}} 小时`,duration_hour_minute:`{{hours}} 小时 {{minutes}} 分钟`,duration_minute:`{{minutes}} 分钟`,duration_less_than_minute:`小于 1 分钟`,refresh_button:`刷新额度`,fetch_all:`获取全部`},claude_quota:{title:`Claude 额度`,empty_title:`暂无 Claude OAuth 认证`,empty_desc:`使用 Claude OAuth 登录后即可查看额度。`,idle:`点击此处刷新额度`,loading:`正在加载额度...`,load_failed:`额度获取失败:{{message}}`,missing_auth_index:`认证文件缺少 auth_index`,empty_windows:`暂无额度数据`,refresh_button:`刷新额度`,fetch_all:`获取全部`,five_hour:`5 小时限额`,seven_day:`7 天限额`,seven_day_oauth_apps:`7 天 OAuth 应用`,seven_day_opus:`7 天 Opus`,seven_day_sonnet:`7 天 Sonnet`,seven_day_cowork:`7 天 Cowork`,iguana_necktie:`Iguana Necktie`,extra_usage_label:`额外用量`,plan_label:`套餐`,plan_unknown:`未知`,plan_free:`免费版`,plan_pro:`专业版`,plan_max:`Max`,plan_max5:`Max 5x`,plan_max20:`Max 20x`,plan_team:`团队版`},codex_quota:{title:`Codex 额度`,empty_title:`暂无 Codex 认证`,empty_desc:`上传 Codex 认证文件后即可查看额度。`,idle:`点击此处刷新额度`,loading:`正在加载额度...`,load_failed:`额度获取失败:{{message}}`,missing_auth_index:`认证文件缺少 auth_index`,missing_account_id:`Codex 凭证缺少 ChatGPT 账号 ID`,empty_windows:`暂无额度数据`,no_access:`该凭证已无 Codex 访问权限(free)。`,refresh_button:`刷新额度`,fetch_all:`获取全部`,primary_window:`5 小时限额`,secondary_window:`周限额`,team_secondary_window:`月度限额`,code_review_primary_window:`代码审查 5 小时限额`,code_review_secondary_window:`代码审查周限额`,code_review_team_secondary_window:`代码审查月度限额`,additional_primary_window:`{{name}} 5 小时限额`,additional_secondary_window:`{{name}} 周限额`,additional_team_secondary_window:`{{name}} 月度限额`,plan_label:`套餐`,expires_label:`续期时间`,reset_credits_label:`主动重置次数`,reset_button:`重置额度`,reset_confirm_title:`重置 Codex 额度`,reset_confirm_message:`将消耗 1 次主动重置次数来重置 "{{name}}" 的 Codex 额度。是否继续?`,reset_confirm_button:`确认重置`,reset_success:`已重置 "{{name}}" 的 Codex 额度`,reset_failed:`重置 "{{name}}" 的 Codex 额度失败:{{message}}`,plan_plus:`Plus`,plan_team:`Team`,plan_free:`Free`,plan_pro:`Pro 20x`,plan_prolite:`Pro 5x`},kimi_quota:{title:`Kimi 额度`,empty_title:`暂无 Kimi 认证`,empty_desc:`上传 Kimi 认证文件后即可查看额度。`,idle:`点击此处刷新额度`,loading:`正在加载额度...`,load_failed:`额度获取失败:{{message}}`,missing_auth_index:`认证文件缺少 auth_index`,empty_data:`暂无额度数据`,refresh_button:`刷新额度`,fetch_all:`获取全部`,weekly_limit:`周限额`,limit_window:`{{duration}} 限额`,limit_index:`限额 #{{index}}`,reset_hint:`{{hint}} 后重置`},xai_quota:{title:`Grok 额度`,empty_title:`暂无 xAI/Grok 认证`,empty_desc:`使用 xAI OAuth 登录后即可查看 Grok 额度。`,idle:`点击此处刷新额度`,loading:`正在加载额度...`,load_failed:`额度获取失败:{{message}}`,missing_auth_index:`认证文件缺少 auth_index`,empty_data:`暂无额度数据`,refresh_button:`刷新额度`,fetch_all:`获取全部`,monthly_credits:`月度积分`,plan_label:`套餐`,plan_supergrok:`SuperGrok`,plan_supergrok_heavy:`SuperGrok Heavy`,pay_as_you_go_label:`按量付费`,pay_as_you_go_enabled:`已启用,封顶 {{cap}}`,pay_as_you_go_disabled:`未启用`},vertex_import:{title:`Vertex JSON 登录`,description:`上传 Google 服务账号 JSON,使用 CLI vertex-import 同步规则写入 auth-dir/vertex-<project>.json。`,location_label:`目标区域 (可选)`,location_placeholder:`us-central1`,location_hint:`留空表示使用默认区域 us-central1。`,file_label:`服务账号密钥 JSON`,file_hint:`仅支持 Google Cloud service account key JSON 文件,私钥会自动规范化。`,file_placeholder:`尚未选择文件`,choose_file:`选择文件`,import_button:`导入 Vertex 凭证`,file_required:`请先选择 .json 凭证文件`,success:`Vertex 凭证导入成功`,result_title:`凭证已保存`,result_project:`项目 ID`,result_email:`服务账号`,result_location:`区域`,result_file:`存储文件`},oauth_excluded:{title:`OAuth 模型禁用`,description:`按提供商分列展示,点击卡片编辑或删除;支持 * 通配符,范围跟随上方的配置文件过滤标签。`,add:`新增禁用`,add_title:`新增提供商模型禁用`,edit_title:`编辑 {{provider}} 的模型禁用`,refresh:`刷新`,refreshing:`刷新中...`,provider_label:`提供商`,provider_auto:`跟随当前过滤`,provider_placeholder:`例如 codex / openai`,provider_hint:`默认选中当前筛选的提供商,也可直接输入或选择其他名称。`,models_label:`禁用的模型`,models_loading:`正在加载模型列表...`,models_unsupported:`当前 CPA 版本不支持获取模型列表。`,models_loaded:`已加载 {{count}} 个模型,勾选要禁用的模型。`,no_models_available:`该提供商暂无可用模型列表。`,save:`保存/更新`,saving:`正在保存...`,save_success:`模型禁用已更新`,save_failed:`更新模型禁用失败`,delete:`删除提供商`,delete_confirm:`确定要删除 {{provider}} 的模型禁用吗?`,delete_success:`已删除该提供商的模型禁用`,delete_failed:`删除模型禁用失败`,deleting:`正在删除...`,no_models:`未配置禁用模型`,model_count:`禁用 {{count}} 个模型`,list_empty_all:`暂无任何提供商的模型禁用,点击“新增禁用”创建。`,list_empty_filtered:`当前筛选下没有禁用项,点击“新增禁用”添加。`,disconnected:`请先连接服务器以查看模型禁用`,load_failed:`加载模型禁用失败`,provider_required:`请先填写提供商名称`,scope_all:`当前范围:全局(显示所有提供商)`,scope_provider:`当前范围:{{provider}}`,upgrade_required:`当前 CPA 版本不支持 OAuth 模型禁用,请升级 CPA 版本`,upgrade_required_title:`需要升级 CPA 版本`,upgrade_required_desc:`当前服务器版本不支持获取 OAuth 模型禁用功能,请升级到最新版本的 CPA(CLI Proxy API)后重试。`},oauth_model_alias:{title:`OAuth 模型别名`,add:`新增别名`,add_title:`新增提供商模型别名`,provider_label:`提供商`,provider_placeholder:`例如 codex / vertex`,provider_hint:`默认选中当前筛选的提供商,也可直接输入或选择其他名称。`,model_source_loading:`正在加载模型列表...`,model_source_unsupported:`当前 CPA 版本不支持获取模型列表(仍可手动输入)。`,model_source_loaded:`已加载 {{count}} 个模型,可在“原模型名称”中下拉选择;也可手动输入。留空保存将删除该提供商记录;开启“保留原名”会在保留原模型名的同时新增别名。`,alias_label:`模型别名`,alias_name_placeholder:`原模型名称`,alias_placeholder:`别名 (必填)`,duplicate_alias:`同一提供商下的别名不能重复。`,alias_fork_label:`保留原名`,add_alias:`添加别名`,save:`保存/更新`,save_success:`模型别名已更新`,save_failed:`更新模型别名失败`,delete:`删除提供商`,delete_confirm:`确定要删除 {{provider}} 的模型别名吗?`,delete_link_title:`取消链接`,delete_link_confirm:`确定取消 <code>{{sourceModel}}</code>({{provider}})到别名 <code>{{alias}}</code> 的映射?`,delete_alias_title:`删除别名`,delete_alias_confirm:`确定删除别名 <code>{{alias}}</code> 并取消所有关联模型的映射?`,delete_success:`已删除该提供商的模型别名`,delete_failed:`删除模型别名失败`,no_models:`未配置模型别名`,model_count:`{{count}} 条别名`,list_empty_all:`暂无任何提供商的模型别名,点击“新增别名”创建。`,chart_title:`全部映射概览`,diagram_providers:`提供商`,diagram_source_models:`源模型`,diagram_aliases:`别名`,diagram_expand:`展开`,diagram_collapse:`收起`,diagram_add_alias:`添加别名`,diagram_rename:`重命名`,diagram_rename_alias_title:`重命名别名`,diagram_rename_alias_label:`新别名名称`,diagram_rename_placeholder:`输入别名名称...`,diagram_delete_link:`取消链接 {{provider}} / {{name}}`,diagram_delete_alias:`删除别名`,diagram_please_enter_alias:`请输入别名名称。`,diagram_alias_exists:`该别名已存在。`,diagram_add_alias_title:`添加别名`,diagram_add_alias_label:`别名名称`,diagram_add_placeholder:`输入新别名名称...`,diagram_rename_btn:`重命名`,diagram_add_btn:`添加`,diagram_settings:`设置`,diagram_settings_title:`别名设置 — {{alias}}`,diagram_settings_source_title:`源模型设置`,diagram_settings_empty:`该别名暂无映射。`,diagram_tap_hint:`触摸设备上:先点选源模型,再点选别名即可建立映射。`,view_mode:`视图模式`,view_mode_diagram:`概览`,view_mode_list:`管理`,provider_required:`请先填写提供商名称`,upgrade_required:`当前 CPA 版本不支持模型别名功能,请升级 CPA 版本`,upgrade_required_title:`需要升级 CPA 版本`,upgrade_required_desc:`当前服务器版本不支持 OAuth 模型别名功能,请升级到最新版本的 CPA(CLI Proxy API)后重试。`},auth_login:{codex_oauth_title:`Codex OAuth`,codex_oauth_button:`开始 Codex 登录`,codex_oauth_hint:`通过 OAuth 流程登录 Codex 服务,自动获取并保存认证文件。`,codex_oauth_url_label:`授权链接:`,codex_open_link:`打开链接`,codex_copy_link:`复制链接`,codex_oauth_status_waiting:`等待认证中...`,codex_oauth_status_success:`认证成功!`,codex_oauth_status_error:`认证失败:`,codex_oauth_start_error:`启动 Codex OAuth 失败:`,codex_oauth_polling_error:`检查认证状态失败:`,anthropic_oauth_title:`Anthropic OAuth`,anthropic_oauth_button:`开始 Anthropic 登录`,anthropic_oauth_hint:`通过 OAuth 流程登录 Anthropic (Claude) 服务,自动获取并保存认证文件。`,anthropic_oauth_url_label:`授权链接:`,anthropic_open_link:`打开链接`,anthropic_copy_link:`复制链接`,anthropic_oauth_status_waiting:`等待认证中...`,anthropic_oauth_status_success:`认证成功!`,anthropic_oauth_status_error:`认证失败:`,anthropic_oauth_start_error:`启动 Anthropic OAuth 失败:`,anthropic_oauth_polling_error:`检查认证状态失败:`,antigravity_oauth_title:`Antigravity OAuth`,antigravity_oauth_button:`开始 Antigravity 登录`,antigravity_oauth_hint:`通过 OAuth 流程登录 Antigravity(Google 账号)服务,自动获取并保存认证文件。`,antigravity_oauth_url_label:`授权链接:`,antigravity_open_link:`打开链接`,antigravity_copy_link:`复制链接`,antigravity_oauth_status_waiting:`等待认证中...`,antigravity_oauth_status_success:`认证成功!`,antigravity_oauth_status_error:`认证失败:`,antigravity_oauth_start_error:`启动 Antigravity OAuth 失败:`,antigravity_oauth_polling_error:`检查认证状态失败:`,kimi_oauth_title:`Kimi OAuth`,kimi_oauth_button:`开始 Kimi 登录`,kimi_oauth_hint:`通过设备授权流程登录 Kimi 服务,自动获取并保存认证文件。`,kimi_oauth_url_label:`授权链接:`,kimi_open_link:`打开链接`,kimi_copy_link:`复制链接`,kimi_oauth_status_waiting:`等待认证中...`,kimi_oauth_status_success:`认证成功!`,kimi_oauth_status_error:`认证失败:`,kimi_oauth_start_error:`启动 Kimi OAuth 失败:`,kimi_oauth_polling_error:`检查认证状态失败:`,xai_oauth_title:`xAI OAuth`,xai_oauth_button:`开始 xAI 登录`,xai_oauth_hint:`通过 OAuth 流程登录 xAI Grok 服务,自动获取并保存认证文件。`,xai_oauth_url_label:`授权链接:`,xai_open_link:`打开链接`,xai_copy_link:`复制链接`,xai_oauth_status_waiting:`等待认证中...`,xai_oauth_status_success:`认证成功!`,xai_oauth_status_error:`认证失败:`,xai_oauth_start_error:`启动 xAI OAuth 失败:`,xai_oauth_polling_error:`检查认证状态失败:`,xai_callback_label:`回调 URL 或授权码`,xai_callback_placeholder:`粘贴页面显示的 code,或完整 callback URL`,xai_callback_hint:`Grok 有时只在页面显示 code。可直接粘贴 code,系统会自动拼接为 http://127.0.0.1:56121/callback?... 后提交。`,xai_callback_required:`请先粘贴 Grok 页面显示的 code 或完整回调 URL。`,xai_callback_state_missing:`缺少本次 xAI 登录的 state,请重新开始 xAI 登录后再提交 code。`,oauth_callback_label:`回调 URL`,oauth_callback_placeholder:`http://localhost:1455/auth/callback?code=...&state=...`,oauth_callback_hint:`远程浏览器模式:当授权跳转到 http://localhost:... 后,复制完整 URL 并提交到这里。`,oauth_callback_button:`提交回调 URL`,oauth_callback_required:`请先粘贴完整的回调 URL。`,oauth_callback_success:`回调 URL 已提交,请继续等待认证。`,oauth_callback_error:`提交回调 URL 失败:`,oauth_callback_upgrade_hint:`请更新CLI Proxy API或检查连接`,oauth_callback_status_success:`回调 URL 已提交,等待认证中...`,oauth_callback_status_error:`回调 URL 提交失败:`,missing_state:`无法获取认证状态参数`,login_another_account:`登录另一个账号`,view_auth_files:`查看认证文件`,iflow_oauth_title:`iFlow OAuth`,iflow_oauth_button:`开始 iFlow 登录`,iflow_oauth_hint:`通过 OAuth 流程登录 iFlow 服务,自动获取并保存认证文件。`,iflow_oauth_url_label:`授权链接:`,iflow_open_link:`打开链接`,iflow_copy_link:`复制链接`,iflow_oauth_status_waiting:`等待认证中...`,iflow_oauth_status_success:`认证成功!`,iflow_oauth_status_error:`认证失败:`,iflow_oauth_start_error:`启动 iFlow OAuth 失败:`,iflow_oauth_polling_error:`检查认证状态失败:`,remote_access_disabled:`远程访问不支持此登录方式,请从本地 (localhost) 访问`},stats:{success:`成功`,failure:`失败`},status_bar:{success_short:`✓`,failure_short:`✗`,no_requests:`无请求`},service_health:{title:`服务健康监测`,window:`最近 7 天`,oldest:`最早`,newest:`最新`},logs:{title:`日志查看`,runtime_unknown:`当前运行端:识别中`,runtime_cpa:`当前运行端:CPA`,runtime_home:`当前运行端:Home`,refresh_button:`刷新日志`,clear_button:`清空日志`,fullscreen_button:`全屏显示`,exit_fullscreen_button:`退出全屏`,download_button:`下载日志`,error_log_button:`选择错误日志`,error_logs_modal_title:`错误请求日志`,error_logs_description:`请选择要打开或下载的错误请求日志文件(仅在关闭请求日志时生成)。`,error_logs_home_unavailable:`Home 模式下请在日志内容页查看数据库日志,错误请求日志列表仅适用于 CPA 文件日志。`,error_logs_request_log_enabled:`当前已开启请求日志,按接口约定错误请求日志列表会始终为空。关闭请求日志后再刷新即可查看。`,error_logs_empty:`暂无错误请求日志文件`,error_logs_load_error:`加载错误日志列表失败`,error_logs_size:`大小`,error_logs_modified:`最后修改`,error_logs_open:`打开`,error_logs_download:`下载`,error_log_view_title:`错误请求日志详情`,error_log_open_failed:`打开错误日志失败`,error_log_empty_content:`该错误日志没有内容`,error_log_copy_success:`错误日志内容已复制`,error_log_download_success:`错误日志下载成功`,request_log_download_title:`下载报文`,request_log_download_confirm:`是否要下载id为{{id}}的报文?`,request_log_download_success:`报文下载成功`,empty_title:`暂无日志记录`,empty_desc:`当启用"日志记录到文件"功能后,日志将显示在这里`,cpa_file_logging_required:`当前连接的是 CPA,日志查看需要先开启“日志记录到文件”。`,cpa_file_logging_required_title:`需要开启文件日志`,cpa_file_logging_required_desc:`CPA 的日志接口读取本地日志文件。请在配置中开启 logging-to-file 后再刷新查看。`,file_logging_required:`当前日志接口需要先开启“日志记录到文件”后才能读取文件日志。`,file_logging_required_title:`需要开启文件日志`,file_logging_required_desc:`当前日志接口读取本地日志文件。请在配置中开启 logging-to-file 后再刷新查看。`,home_clear_unavailable:`Home 日志来自数据库查询,当前不支持从这里清空。`,log_content:`日志内容`,loading:`正在加载日志...`,load_error:`加载日志失败`,clear_confirm:`确定要清空所有日志吗?此操作不可恢复!`,clear_success:`日志已清空`,download_success:`日志下载成功`,auto_refresh:`自动刷新`,auto_refresh_enabled:`自动刷新已开启`,auto_refresh_disabled:`自动刷新已关闭`,load_more_hint:`向上滚动加载更多`,hidden_lines:`已隐藏 {{count}} 行`,loaded_lines:`已载入 {{count}} 行`,filtered_lines:`已过滤 {{count}} 行`,hide_management_logs:`屏蔽 {{prefix}} 日志`,show_raw_logs:`显示原始日志`,show_raw_logs_hint:`直接显示原始日志文本,方便多行复制`,search_placeholder:`搜索日志内容或关键字`,filter_panel_title:`结构化筛选`,filter_panel_expand:`展开结构化筛选`,filter_panel_collapse:`收起结构化筛选`,filter_panel_active_count:`已选 {{count}} 项`,filter_method:`请求方法`,filter_status:`状态码`,filter_path:`路径`,filter_path_empty:`暂无可筛选路径`,filter_status_2xx:`2xx`,filter_status_3xx:`3xx`,filter_status_4xx:`4xx`,filter_status_5xx:`5xx`,clear_filters:`清空筛选`,search_empty_title:`未找到匹配的日志`,search_empty_desc:`尝试更换关键字或清空筛选条件。`,double_click_copy_hint:`双击复制日志原文`,copy_success:`已复制日志原文`,copy_failed:`复制失败`,lines:`行`,removed:`已过滤`,upgrade_required_title:`需要升级 CLI Proxy API`,upgrade_required_desc:`当前服务器版本不支持日志查看功能,请升级到最新版本的 CLI Proxy API 以使用此功能。`},config_management:JSON.parse(`{"title":"配置面板","editor_title":"配置文件","reload":"重新加载","reload_confirm_message":"重新加载将丢弃你当前未保存的修改,确定继续吗?","save":"保存","description":"通过可视化或者源文件方式编辑 config.yaml 配置文件","status_idle":"等待操作","status_loading":"加载配置中...","status_loading_short":"加载中","status_loaded":"配置已加载","status_loaded_short":"已加载","status_dirty":"有未保存的更改","status_dirty_short":"未保存","status_disconnected":"请先连接服务器以加载配置","status_disconnected_short":"未连接","status_load_failed":"加载失败","status_load_failed_short":"失败","status_saving":"正在保存配置...","status_saving_short":"保存中","status_saved":"配置保存完成","status_save_failed":"保存失败","save_success":"配置已保存","error_yaml_not_supported":"服务器未返回 YAML 格式,请确认 /config.yaml 接口可用","visual_mode_unavailable":"YAML 语法修复前无法使用可视化编辑","visual_mode_unavailable_short":"YAML错误","validation_blocked_short":"待修复","visual_mode_unavailable_detail":"当前配置存在无效 YAML,暂时无法使用可视化编辑:{{message}}","visual_mode_save_blocked":"请先修复 YAML 语法错误,再从可视化模式保存","visual_mode_latest_yaml_invalid":"服务端最新配置包含无效 YAML,请先切回源码模式检查后再保存可视化修改:{{message}}","editor_placeholder":"key: value","search_placeholder":"搜索配置内容...","search_button":"搜索","search_no_results":"无结果","search_prev":"上一个","search_next":"下一个","diff":{"title":"确认变更","current":"当前配置","modified":"修改后","confirm":"确认保存","no_changes":"未检测到变更"},"tabs":{"visual":"可视化编辑","source":"源文件编辑"},"visual":{"notice":"可视化模式覆盖常用字段,未覆盖的配置仍需在源文件模式中查看或编辑。","quick_jump":"快速跳转","mode":{"simple":"简单","full":"完整","label":"编辑模式","more_settings":"切换到完整模式,查看全部 {{total}} 个配置分区","validation_banner":"部分高级配置项存在校验错误,已阻止保存。请切换到完整模式进行修复。","switch_to_full":"切换完整模式"},"search":{"placeholder":"搜索配置项(标签或 YAML 键名)","no_results":"没有匹配的配置项"},"sections":{"connectivity":{"title":"接入与认证","description":"服务地址、端口、认证目录与 API 密钥"},"logging":{"title":"日志与诊断","description":"调试、日志输出与使用统计"},"advanced":{"title":"高级与实验","description":"请求头伪装、签名缓存、插件源等不常修改的设置","plugins_title":"插件","signature_title":"Antigravity 签名"},"server":{"title":"服务器配置","description":"基础服务器设置","host":"主机地址","port":"端口"},"tls":{"title":"TLS/SSL 配置","description":"HTTPS 安全连接设置","enable":"启用 TLS","enable_desc":"启用 HTTPS 安全连接","cert":"证书文件路径","key":"私钥文件路径"},"remote":{"title":"远程管理","description":"远程访问和控制面板设置","allow_remote":"允许远程访问","allow_remote_desc":"允许从其他主机访问管理接口","disable_panel":"禁用控制面板","disable_panel_desc":"禁用内置的 Web 控制面板","disable_auto_update_panel":"禁用面板自动更新","disable_auto_update_panel_desc":"首次缺失时仍可下载,但不再从 GitHub 后台自动更新","secret_key":"管理密钥","secret_key_placeholder":"设置管理密钥","panel_repo":"面板仓库"},"auth":{"title":"认证配置","description":"API 密钥与认证文件目录设置","auth_dir":"认证文件目录 (auth-dir)","auth_dir_hint":"存放认证文件的目录路径(支持 ~)"},"system":{"title":"系统配置","description":"调试、日志、统计与性能调试设置","debug":"调试模式","debug_desc":"启用详细的调试日志","commercial_mode":"商业模式","commercial_mode_desc":"禁用高开销中间件以支持高并发","logging_to_file":"写入日志文件","logging_to_file_desc":"将日志保存到文件","plugins_enabled":"启用插件系统","plugins_enabled_desc":"启用标准动态库插件加载;具体插件实例仍在插件管理页启停","plugin_store_sources":"第三方插件源","plugin_store_sources_desc":"追加插件商店 registry 源;内置官方源始终保留","plugin_store_sources_label":"插件源 registry URL (plugins.store-sources)","plugin_store_sources_placeholder":"https://example.com/cliproxy-plugins/registry.json","plugin_store_sources_hint":"每行一个 registry.json URL,保存时会过滤空行","logs_max_size":"日志文件大小限制 (MB)","error_logs_max_files":"错误日志保留文件数","usage_statistics_enabled":"启用内存用量统计","usage_statistics_enabled_desc":"启用内存中的请求用量聚合","redis_usage_retention":"Redis 用量队列保留秒数","redis_usage_retention_hint":"RESP 接口 LPOP/RPOP 用量队列的内存保留时间,最大 3600 秒","antigravity_signature_cache":"启用 Antigravity 签名缓存","antigravity_signature_cache_desc":"优先使用并校验缓存的 thinking block 签名","antigravity_signature_strict":"严格校验旁路签名","antigravity_signature_strict_desc":"仅在关闭签名缓存时生效,按完整 Claude protobuf 树校验"},"headers":{"title":"Header 默认值","description":"Claude 与 Codex OAuth 请求在客户端缺少 Header 时使用的默认值","claude_title":"Claude Header Defaults","codex_title":"Codex Header Defaults","user_agent":"User-Agent","package_version":"Package Version","runtime_version":"Runtime Version","os":"OS","arch":"Arch","timeout":"Timeout","stabilize_device":"稳定设备指纹","stabilize_device_desc":"固定 OS/Arch,并按凭据/API Key 稳定软件指纹","beta_features":"Beta Features","codex_identity_confuse":"Codex 身份混淆","codex_identity_confuse_desc":"在 fill-first 或会话粘性路由下,按所选认证重映射 Codex prompt_cache_key 与安装身份"},"network":{"title":"网络配置","description":"代理、重试和路由设置","proxy_url":"代理 URL","request_retry":"请求重试次数","max_retry_credentials":"最大重试凭据数","max_retry_credentials_hint":"留空表示不设置;设为 0 表示保留 legacy 行为,并尝试所有可用凭据。","max_retry_interval":"最大重试间隔 (秒)","auth_auto_refresh_workers":"认证自动刷新 Worker 数","auth_auto_refresh_workers_hint":"大于 0 时覆盖默认 Worker 数(16)","disable_image_generation":"禁用图像生成","disable_image_generation_hint":"false 为启用;true 为全部禁用;chat 仅禁用非图片端点注入","disable_image_generation_false":"false(启用)","disable_image_generation_true":"true(全部禁用)","disable_image_generation_chat":"chat(仅禁用聊天注入)","gpt_image_2_base_model":"GPT Image 2 基础模型","gpt_image_2_base_model_hint":"代理 gpt-image-2 图片请求时使用的主线模型;留空或非法时后端使用默认值","routing_strategy":"路由策略","routing_strategy_hint":"选择凭据选择策略","strategy_round_robin":"轮询 (Round Robin)","strategy_fill_first":"填充优先 (Fill First)","session_affinity_ttl":"会话粘性 TTL","force_model_prefix":"强制模型前缀","force_model_prefix_desc":"未带前缀的模型请求只使用无前缀凭据","passthrough_headers":"透传上游响应 Header","passthrough_headers_desc":"将过滤后的上游响应 Header 转发给下游客户端","disable_cooling":"禁用冷却调度","disable_cooling_desc":"全局禁用认证/模型失败后的冷却窗口","session_affinity":"会话粘性路由","ws_auth":"WebSocket 认证","ws_auth_desc":"启用 WebSocket 连接认证 (/v1/ws)"},"quota":{"title":"配额回退","description":"配额耗尽时的回退策略","switch_project":"切换项目","switch_project_desc":"配额耗尽时自动切换到其他项目","switch_preview_model":"切换预览模型","switch_preview_model_desc":"配额耗尽时切换到预览版本模型","antigravity_credits":"使用Antigravity Credits"},"streaming":{"title":"流式传输配置","description":"Keepalive 与 bootstrap 重试设置","keepalive_seconds":"Keepalive 秒数","keepalive_hint":"设置为 0 或留空表示禁用 keepalive","bootstrap_retries":"Bootstrap 重试次数","bootstrap_hint":"流式传输启动时(首包前)的重试次数","nonstream_keepalive":"非流式 Keepalive 间隔 (秒)","nonstream_keepalive_hint":"非流式响应时每隔 N 秒发送空行以防止空闲超时,设置为 0 或留空表示禁用","disabled":"已禁用"},"payload":{"title":"Payload 配置","description":"默认值、原始 JSON 规则、覆盖规则与过滤规则","default_rules":"默认规则","default_rules_desc":"当请求中未指定参数时,使用这些默认值","default_raw_rules":"默认 Raw 规则","default_raw_rules_desc":"当请求中未指定参数时,按原始 JSON 片段写入这些值,例如 true、123、\\"high\\" 或 {\\"type\\":\\"object\\"}","override_rules":"覆盖规则","override_rules_desc":"强制覆盖请求中的参数值","override_raw_rules":"覆盖 Raw 规则","override_raw_rules_desc":"始终按原始 JSON 片段覆盖参数值,适合 response_format、schema 等复杂字段","filter_rules":"过滤规则","filter_rules_desc":"通过 JSON Path 预过滤上游请求体,自动剔除不合规/冗余参数(Request Sanitization)"}},"api_keys":{"label":"API 密钥列表 (api-keys)","add":"添加 API 密钥","generate":"生成","empty":"暂无 API 密钥","hint":"每个条目代表一个 API 密钥(与 「API 密钥管理」 页面样式一致)","edit_title":"编辑 API 密钥","add_title":"添加 API 密钥","input_label":"API 密钥","input_placeholder":"粘贴你的 API 密钥","input_hint":"此处仅修改本地配置文件内容,不会自动同步到 API 密钥管理接口","error_empty":"请输入 API 密钥","error_invalid":"API 密钥包含无效字符"},"payload_rules":{"rule":"规则","models":"适用模型","model_name":"模型名称","provider_type":"供应商类型","add_model":"添加模型","params":"参数设置","remove_params":"移除参数","json_path":"JSON 路径 (如 temperature)","json_path_filter":"JSON 路径 (gjson/sjson),如 generationConfig.thinkingConfig.thinkingBudget","param_type":"参数类型","param_value":"参数值","add_param":"添加参数","no_rules":"暂无规则","add_rule":"添加规则","provider_default":"默认","provider_openai":"OpenAI","provider_openai_response":"OpenAI Response","provider_responses":"Responses","provider_gemini":"Gemini","provider_claude":"Claude","provider_codex":"Codex","provider_antigravity":"Antigravity","advanced":"高级","hide_advanced":"收起高级","from_protocol":"来源协议 (from-protocol)","headers":"请求 Header 匹配","header_name":"Header 名称","header_value":"Header 值","add_header":"添加 Header","match":"必须匹配 (match)","notMatch":"不得匹配 (not-match)","exist":"必须存在 (exist)","notExist":"不得存在 (not-exist)","condition_path":"匹配路径","condition_value":"匹配值","add_condition":"添加条件","value_type_string":"字符串","value_type_number":"数字","value_type_boolean":"布尔","value_type_json":"JSON","value_string":"字符串值","value_number":"数字值 (如 0.7)","value_boolean":"true 或 false","value_json":"JSON 值","value_raw_json":"原始 JSON 片段,如 true、123、\\"high\\" 或 {\\"type\\":\\"object\\"}","value_default":"值","boolean_true":"true","boolean_false":"false"},"validation":{"validation_blocked":"请先修复表单校验错误再保存","port_range":"请输入 1 到 65535 之间的有效端口","non_negative_integer":"请输入非负整数","payload_invalid_number":"请输入有效数字","payload_invalid_boolean":"请选择 true 或 false","payload_invalid_json":"请输入有效的 JSON"},"common":{"edit":"编辑","delete":"删除","cancel":"取消","update":"更新","add":"添加"}}}`),quota_management:{title:`配额管理`,description:`集中查看 OAuth 额度与剩余情况`,refresh_files:`刷新认证文件`,refresh_files_and_quota:`刷新认证文件&额度`,refresh_all_credentials:`刷新全部凭证`,card_idle_hint:`请使用顶部“刷新全部凭证”按钮获取最新额度。`},plugin_management:{title:`插件管理`,description:`查看已发现和已注册的插件,管理实例开关、配置字段和资源入口。`,refresh:`刷新`,load_failed:`加载插件失败`,config_load_failed:`读取插件配置失败`,config_not_found:`无法读取插件配置,后端未找到该插件。`,unsupported_backend:`当前后端未暴露插件管理 API。请使用包含插件管理接口的新后端构建,并重启服务。`,global_status:`全局状态`,global_enabled:`已启用`,global_disabled:`已停用`,global_disabled_hint:`当前 plugins.enabled 为 false,插件实例即使启用也不会生效。`,plugins_dir:`插件目录`,discovered:`发现插件`,effective:`生效插件`,search_placeholder:`搜索插件 ID、名称、作者或资源...`,search_label:`搜索插件`,no_plugins:`暂无插件`,no_plugins_desc:`未从插件目录或运行时注册表中发现插件。`,configured:`已配置`,not_configured:`未配置`,registered:`已注册`,not_registered:`未注册`,oauth:`OAuth`,status_effective:`生效中`,status_inactive:`未生效`,version_label:`版本`,author_label:`作者`,path_label:`路径`,edit_config:`编辑配置`,open_resource:`打开资源`,open_repository:`打开仓库`,config_title:`配置 {{name}}`,base_settings:`基础设置`,enabled:`启用`,enabled_hint:`控制 plugins.configs 中该插件实例的 enabled 字段。`,priority:`优先级`,config_fields:`配置字段`,no_config_fields:`该插件没有声明可视化配置字段。`,select_placeholder:`请选择`,array_item_placeholder:`输入数组项`,add_array_item:`添加数组项`,remove_array_item:`删除数组项`,delete_plugin:`删除`,delete_confirm_title:`删除插件`,delete_confirm_message:`确定删除 {{name}}({{id}})吗?这会移除本地插件文件和已保存配置。`,delete_success:`插件已删除`,delete_failed:`插件删除失败`,delete_restart_required:`已加载的插件需要重启后端后才能移除。`,toggle_success:`插件状态已更新`,toggle_failed:`插件状态更新失败`,runtime_pending:`插件变更已保存,但运行时状态仍在更新中。请稍后刷新或检查后端日志。`,save_success:`插件配置已保存`,save_failed:`插件配置保存失败`,validation_failed:`请先修复插件配置表单错误`,invalid_priority:`请输入整数优先级`,invalid_number:`请输入有效数字`,invalid_integer:`请输入有效整数`,invalid_json:`请输入有效 JSON`,expected_array:`请输入 JSON 数组`,expected_object:`请输入 JSON 对象`,invalid_enum:`请选择声明的枚举值`},plugin_store:{title:`插件商店`,description:`浏览插件注册表,为当前后端安装或更新插件。`,description_show_more:`展开描述`,description_show_less:`收起描述`,source_name:`来源:{{source}}`,cli_proxy_api_source:`CLIProxyAPI源`,refresh:`刷新`,retry:`重试`,load_failed:`插件商店加载失败`,unsupported_backend:`当前后端未暴露插件商店 API。请使用包含插件商店接口的新后端构建,并重启服务。`,registry_failed:`插件注册表请求失败`,global_status:`全局状态`,global_enabled:`已启用`,global_disabled:`已停用`,global_disabled_hint:`当前 plugins.enabled 为 false,已安装的插件不会生效。`,plugins_dir:`插件目录`,stat_available:`可用插件`,search_placeholder:`搜索插件 ID、名称、作者或标签...`,search_label:`搜索插件商店`,filter_label:`按安装状态筛选`,filter_all:`全部`,filter_installed:`已安装`,filter_not_installed:`未安装`,filter_updates:`可更新`,badge_installed:`已安装`,badge_update:`可更新`,badge_effective:`生效中`,version_arrow:`v{{from}} → v{{to}}`,install:`安装`,update:`更新`,manage:`管理`,install_confirm_title:`安装插件`,install_confirm_message:`将从插件注册表下载 {{target}} 并安装到本地插件目录,是否继续?`,update_confirm_title:`更新插件`,update_confirm_message:`将下载并安装 {{target}} 的最新版本,是否继续?`,install_success:`插件安装成功`,update_success:`插件更新成功`,install_failed:`插件安装失败`,update_failed:`插件更新失败`,status_pending:`插件文件已更新,但本地状态尚未刷新。请稍后刷新或检查后端日志。`,registration_pending:`插件文件已更新,但注册仍在进行中。请稍后刷新或检查后端日志。`,restart_required_notice:`需要重启服务才能加载新的插件版本`,restart_required_banner:`以下插件需重启服务后才能应用新版本:{{plugins}}`,open_repository:`打开仓库`,open_homepage:`打开主页`,no_plugins:`注册表为空`,no_plugins_desc:`插件注册表未返回任何插件。`,no_matches:`没有匹配的插件`,no_matches_desc:`当前搜索或筛选条件下没有插件。`,clear_filters:`清除筛选`,security_banner_title:`第三方插件以后端完整权限运行`,security_banner_text:`插件会在代理服务内部执行代码,可读取你的凭据与流量。请仅安装你信任的插件——尤其要警惕任何并非由官方组织 router-for-me 发布的插件。`,badge_untrusted:`第三方`,gate_title:`安装 {{name}}`,gate_title_update:`更新 {{name}}`,gate_warning:`如果你不阅读以下内容,可能会发生意料之外的危险后果。`,gate_effect_runs_code:`该插件将在您的代理后端内运行第三方未认证代码。系统无法对其行为进行隔离或审计,其具备访问您的敏感凭据、网络请求与响应数据的潜在权限。`,gate_effect_no_review:`本插件并非由官方组织 router-for-me 发布或审核。官方不对该插件的稳定性、安全性、合规性以及后续版本的任意行为变更承担任何明示或暗示的担保责任。`,gate_effect_restart:`安装会修改本地插件目录,并可能需要重启服务才能生效。`,gate_untrusted_alert:`该插件并非来自官方组织 router-for-me。请仅在你完全信任其作者与来源时继续。`,gate_repository_label:`仓库`,gate_source_label:`来源`,gate_step1_action:`我要安装此插件`,gate_step2_action:`我已阅读并理解上述风险`,gate_step3_prompt:`如需确认,请在下方输入框中键入 “{{token}}”`,gate_step3_action:`安装此插件`,gate_step3_hint:`请输入上方显示的完整标识以启用安装。`},plugin_resource:{title:`插件页面`,page_count:`{{count}} 个页面`,load_failed:`加载插件页面失败`,unavailable:`插件页面不可用`,not_found:`未找到插件页面`,not_found_desc:`该插件页面未在当前后端插件列表中声明。`,empty_src:`插件页面地址为空`,empty_src_desc:`该插件菜单未提供可嵌入的页面地址。`},system_info:{title:`管理中心信息`,about_title:`CLI Proxy API Management Center`,connection_status_title:`连接状态`,api_status_label:`API 状态:`,config_status_label:`配置状态:`,last_update_label:`最后更新:`,cache_data:`缓存数据`,real_time_data:`实时数据`,not_loaded:`未加载`,seconds_ago:`秒前`,models_title:`可用模型列表`,models_desc:`展示 /models 返回的模型,并自动使用服务器保存的 API Key 进行鉴权。`,models_loading:`正在加载可用模型...`,models_empty:`未从 /models 获取到模型数据`,models_error:`获取模型列表失败`,models_count:`可用模型 {{count}} 个`,version_check_title:`版本检查`,version_check_desc:`调用 /latest-version 接口比对服务器版本,提示是否有可用更新。`,version_current_label:`当前版本`,version_latest_label:`最新版本`,version_check_button:`检查更新`,version_check_idle:`点击检查更新`,version_checking:`正在检查最新版本...`,version_update_available:`有新版本可用:{{version}}`,version_is_latest:`当前已是最新版本`,version_check_error:`检查更新失败`,version_current_missing:`未获取到服务器版本号,暂无法比对`,version_unknown:`未知`,quick_links_title:`快捷链接`,quick_links_desc:`访问项目仓库和文档,获取帮助和更新。`,link_main_repo:`主程序仓库`,link_main_repo_desc:`CLI Proxy API 核心程序源代码`,link_webui_repo:`WebUI 仓库`,link_webui_repo_desc:`管理中心前端界面源代码`,link_docs:`使用教程`,link_docs_desc:`配置指南和使用说明`,clear_login_title:`本地登录信息`,clear_login_desc:`清理本地保存的登录信息并退出登录。`,clear_login_button:`清理登录信息`,clear_login_confirm:`确认清理本地登录信息并退出登录?`},notification:{debug_updated:`调试设置已更新`,proxy_updated:`代理设置已更新`,proxy_cleared:`代理设置已清空`,retry_updated:`重试设置已更新`,quota_switch_project_updated:`项目切换设置已更新`,quota_switch_preview_updated:`预览模型切换设置已更新`,logging_to_file_updated:`日志记录设置已更新`,logs_max_total_size_updated:`日志容量设置已更新`,request_log_updated:`请求日志设置已更新`,force_model_prefix_updated:`模型前缀设置已更新`,ws_auth_updated:`WebSocket 鉴权设置已更新`,routing_strategy_updated:`路由策略已更新`,login_storage_cleared:`本地登录信息已清理`,api_key_added:`API密钥添加成功`,api_key_updated:`API密钥更新成功`,api_key_deleted:`API密钥删除成功`,api_key_invalid_chars:`API密钥仅支持英文字母、数字和符号`,gemini_key_added:`Gemini密钥添加成功`,gemini_key_updated:`Gemini密钥更新成功`,gemini_key_deleted:`Gemini密钥删除成功`,gemini_multi_input_required:`请先输入至少一个Gemini密钥`,gemini_multi_failed:`Gemini密钥批量添加失败`,gemini_multi_summary:`Gemini批量添加完成:成功 {{success}},跳过 {{skipped}},失败 {{failed}}`,codex_config_added:`Codex配置添加成功`,codex_config_updated:`Codex配置更新成功`,codex_config_deleted:`Codex配置删除成功`,codex_base_url_required:`请填写Codex Base URL`,claude_config_added:`Claude配置添加成功`,claude_config_updated:`Claude配置更新成功`,claude_config_deleted:`Claude配置删除成功`,vertex_config_added:`Vertex配置添加成功`,vertex_config_updated:`Vertex配置更新成功`,vertex_config_deleted:`Vertex配置删除成功`,config_enabled:`配置已启用`,config_disabled:`配置已停用`,field_required:`必填字段不能为空`,openai_provider_required:`请填写提供商名称和Base URL`,openai_provider_added:`OpenAI提供商添加成功`,openai_provider_updated:`OpenAI提供商更新成功`,openai_provider_deleted:`OpenAI提供商删除成功`,openai_model_name_required:`请填写模型名称`,openai_test_url_required:`请先填写有效的 Base URL 以进行测试`,openai_test_key_required:`请至少填写一个 API 密钥以进行测试`,openai_test_model_required:`请选择要测试的模型`,data_refreshed:`数据刷新成功`,connection_required:`请先建立连接`,refresh_failed:`刷新失败`,update_failed:`更新失败`,add_failed:`添加失败`,delete_failed:`删除失败`,upload_failed:`上传失败`,download_failed:`下载失败`,login_failed:`登录失败`,please_enter:`请输入`,please_fill:`请填写`,provider_name_url:`提供商名称和Base URL`,api_key:`API密钥`,gemini_api_key:`Gemini API密钥`,codex_api_key:`Codex API密钥`,claude_api_key:`Claude API密钥`,commercial_mode_restart_required:`商业模式开关已变更,请重启服务后生效`,copy_failed:`复制失败`,link_copied:`已复制`},language:{switch:`语言`,chinese:`中文`,chinese_tw:`繁體中文(台灣)`,english:`English`,russian:`Русский`},theme:{switch:`主题`,light:`羊毛纸`,white:`纯白`,dark:`暗色`,switch_to_light:`切换到羊毛纸模式`,switch_to_dark:`切换到暗色模式`,auto:`跟随系统`},sidebar:{toggle_expand:`展开侧边栏`,toggle_collapse:`收起侧边栏`},footer:{api_version:`CLI Proxy API 版本`,build_date:`构建时间`,version:`管理中心版本`,author:`作者`},providersPage:{header:{title:`AI 提供商`,activeResources:`{{active}}/{{total}} 个活跃资源`,providerFamilies:`{{count}} 个提供商家族`,updatedAt:`更新于 {{time}}`,issueCount:`{{count}} 个问题`},actions:{refresh:`刷新`,syncing:`同步中`,new:`新建`,edit:`编辑`,view:`查看`,delete:`删除`,clear:`清空`,cancel:`取消`,save:`保存`,create:`创建`,enable:`启用`,disable:`停用`},categories:{title:`提供商`,activeCount:`{{active}}/{{total}} 活跃`},providerNames:{gemini:`Gemini`,codex:`Codex`,claude:`Claude`,vertex:`Vertex`,openaiCompatibility:`OpenAI 兼容`},table:{key:`密钥`,baseUrl:`服务地址`,prefix:`前缀`,models:`模型/请求头`,status:`状态`,actions:`操作`,metrics:{models:`模型`,keys:`密钥`,headers:`请求头`},websocketsTag:`WebSockets`,cloakTag:`Cloak`,empty:`尚未添加配置,点击右上角新建。`,filterPlaceholder:`搜索密钥、地址、前缀…`,description:`在 {{route}} 下管理资源`,providerIssue:`此提供商存在问题`},status:{active:`活跃`,disabled:`已停用`,notSet:`未设置`,none:`无`,notConfigured:`未配置`,defaultSuffix:`(默认)`},detail:{title:`详情`,metadataTitle:`元数据`,fields:{identifier:`标识`,baseUrl:`服务地址`,proxyUrl:`代理 URL`,prefix:`前缀`,models:`模型数`,headers:`请求头数`,authIndex:`Auth Index`,excludedModels:`排除模型数`,apiKeyEntries:`密钥条目数`}},form:{createEyebrow:`新建`,editEyebrow:`编辑`,name:`名称`,apiKey:`API 密钥`,apiKeyCreatePlaceholder:`输入 API 密钥`,apiKeyEditPlaceholder:`留空表示不修改`,baseUrl:`服务地址`,baseUrlRequiredHint:`此提供商要求填写服务地址`,proxyUrl:`代理 URL`,prefix:`前缀`,priority:`优先级`,disabled:`停用此条目`,disabledHint:`停用后不会被网关使用`,websockets:`启用 WebSockets`,testModel:`测试模型`,testModelClaudeHint:`仅用于连通性测试,不会被保存`,testModelAutoWith:`自动 · {{name}}`,testModelAutoEmpty:`自动(尚未添加模型)`,testModelCustom:`{{name}}(自定义)`,modelsSection:`自定义模型`,addModel:`添加模型`,headersSection:`请求头`,addHeader:`添加请求头`,headers:`请求头`,headersHint:`每行一条,格式 Key: Value`,excludedSection:`排除模型`,excludedHint:`每行一个模型名,匹配后将不会被路由到此提供商`,cloakSection:`Cloak 配置`,cloakMode:`模式`,cloakStrict:`严格模式`,cloakSensitiveWords:`敏感词(每行一个)`,apiKeyEntriesSection:`API 密钥条目`,apiKeyEntry:`密钥 #{{index}}`,addApiKeyEntry:`添加密钥条目`,showApiKey:`显示密钥`,hideApiKey:`隐藏密钥`,disableCooling:`禁用冷却调度`,disableCoolingHint:`仅对当前凭据或提供商禁用失败后的冷却窗口`,modelEntry:`模型 #{{index}}`,modelImage:`允许图片端点`,modelImageHint:`允许该模型用于 /v1/images/generations 和 /v1/images/edits`,thinkingConfig:`Thinking 配置(JSON)`,thinkingConfigHint:`可配置 levels、min、max、zero_allowed、dynamic_allowed`,cloakCacheUserId:`缓存 user_id`,cloakCacheUserIdHint:`按 API key 复用 Claude cloak 生成的 user_id`,experimentalCchSigning:`实验性 CCH 签名`,experimentalCchSigningHint:`对 cloaked Claude /v1/messages 最终请求体启用 CCH 签名`,validation:{nameRequired:`名称必填`,apiKeyRequired:`至少填写一个 API 密钥`,baseUrlRequired:`服务地址必填`}},delete:{title:`删除资源`,confirm:`确定要删除 {{name}} 吗?此操作不可撤销。`},toast:{created:`创建成功`,updated:`更新成功`,deleted:`删除成功`,enabled:`已启用`,disabled:`已停用`,toggleFailed:`更新状态失败`},unsavedChanges:{title:`确定丢弃未保存的修改吗?`,message:`当前表单还有未保存的修改,关闭后会被丢弃。`,discard:`丢弃修改`,keepEditing:`继续编辑`},connectivity:{test:`测试`,testAll:`全部测试`,success:`连通`,baseUrlRequired:`服务地址必填`,endpointInvalid:`服务地址不合法`,apiKeyRequired:`API 密钥必填`,modelRequired:`测试模型必填`,timeout:`请求超过 {{seconds}} 秒`,requestFailed:`请求失败`},discovery:{openButton:`从端点拉取`,searchPlaceholder:`搜索模型`,reload:`重新加载`,loading:`正在加载模型…`,empty:`端点未返回任何模型`,notLoaded:`点击重新加载以获取模型`,selectAll:`全选`,clearAll:`清空选择`,selectedCount:`{{selected}} / {{total}}`,alreadyAdded:`已添加`,close:`关闭`,apply:`应用 ({{count}})`},toolbar:{sortBy:`排序`,sort:{name:`名称`,priority:`优先级`,recentSuccess:`近期成功数`,directionAsc:`升序`,directionDesc:`降序`},filter:{allModels:`全部模型`,selectedModels:`{{selected}}/{{total}} 个模型`,selectAll:`全选`,clear:`清空`,empty:`暂无已配置模型`}},modelCatalog:{notLoaded:`未加载`}}},Kc={common:{login:`登入`,logout:`登出`,back:`返回`,cancel:`取消`,confirm:`確認`,leave:`離開`,stay:`繼續編輯`,save:`儲存`,delete:`刪除`,edit:`編輯`,add:`新增`,update:`更新`,refresh:`重新整理`,close:`關閉`,success:`成功`,error:`錯誤`,info:`資訊`,warning:`警告`,loading:`載入中...`,connecting:`連線中...`,connected:`已連線`,disconnected:`未連線`,connecting_status:`連線中`,connected_status:`已連線`,disconnected_status:`未連線`,yes:`是`,no:`否`,not_set:`未設定`,optional:`選填`,required:`必填`,api_key:`金鑰`,base_url:`位址`,prefix:`前綴`,proxy_url:`代理`,priority:`優先順序`,alias:`別名`,failure:`失敗`,unknown_error:`未知錯誤`,quota_update_required:`請更新 CPA 版本或檢查更新`,quota_check_credential:`請檢查憑證狀態`,copy:`複製`,expand:`展開`,collapse:`收起`,status:`狀態`,action:`操作`,custom_headers_label:`自訂請求標頭`,custom_headers_hint:`選填,設定需要附帶到請求中的 HTTP 標頭,名稱和值均不能為空。`,custom_headers_add:`新增請求標頭`,custom_headers_key_placeholder:`Header 名稱,例如 X-Custom-Header`,custom_headers_value_placeholder:`Header 值`,model_name_placeholder:`模型名稱,例如 claude-3-5-sonnet-20241022`,model_alias_placeholder:`模型別名(選填)`,invalid_provider_index:`無效的供應商索引。`,unsaved_changes_title:`未儲存的變更`,unsaved_changes_message:`你有未儲存的變更,離開後將遺失這些變更。確定要離開嗎?`},title:{main:`CLI Proxy API Management Center`,login:`CLI Proxy API Management Center`,abbr:`CPAMC`},splash:{title:`CLI Proxy API`,subtitle:`管理中心`},auto_login:{title:`正在自動登入...`,message:`正在使用本地儲存的連線資訊嘗試連線伺服器`},login:{subtitle:`請輸入連線資訊以存取管理介面`,connection_title:`連線位址`,connection_current:`目前位址`,connection_auto_hint:`系統將自動使用目前存取位址進行連線`,custom_connection_label:`自訂連線位址:`,custom_connection_placeholder:`例如: https://example.com:8317`,custom_connection_hint:`預設使用目前存取位址,若需要可手動輸入其他位址。`,use_current_address:`使用目前位址`,remember_password_label:`記住密碼`,management_key_label:`管理金鑰:`,management_key_placeholder:`請輸入管理金鑰`,connect_button:`連線`,submit_button:`登入`,submitting:`連線中...`,error_title:`登入失敗`,error_backend_detail:`後端返回`,error_required:`請填寫完整的連線資訊`,error_invalid:`連線失敗,請檢查服務位址、管理介面和管理金鑰`,error_network:`網路連線失敗,請檢查網路或伺服器位址`,error_timeout:`連線逾時,伺服器無回應`,error_unauthorized:`驗證失敗,管理金鑰缺失或無效`,error_forbidden:`存取被拒絕,遠端管理未啟用、管理金鑰未設定或 IP 被暫時封鎖`,error_not_found:`找不到 Management API,請確認服務位址指向 CLIProxyAPI 後端`,error_server:`後端處理管理介面時發生錯誤,請查看服務日誌`,error_cors:`跨域請求被阻擋,請檢查伺服器設定`,error_ssl:`SSL/TLS 憑證驗證失敗`},header:{check_connection:`檢查連線`,refresh_all:`全部重新整理`,logout:`登出`},connection:{title:`連線資訊`,server_address:`伺服器位址:`,management_key:`管理金鑰:`,status:`連線狀態:`},nav:{dashboard:`儀表板`,basic_settings:`基本設定`,api_keys:`API 金鑰`,ai_providers:`AI 供應商`,auth_files:`驗證檔案`,oauth:`OAuth 登入`,quota_management:`配額管理`,plugins:`插件管理`,plugin_store:`插件商店`,config_management:`設定面板`,logs:`記錄檢視`,system_info:`中心資訊`},nav_groups:{operate:`運行`,gateway:`閘道`,observe:`觀測`,plugin_pages:`插件`,control:`控制`},nav_meta:{dashboard:`運行總覽`,ai_providers:`上游模型路由`,auth_files:`Auth 檔案與憑證`,oauth:`OAuth 授權登入`,quota_management:`API Key 與限額`,plugins:`插件啟停與設定`,plugin_store:`探索並安裝插件`,logs:`請求追蹤與排查`,config_management:`閘道基礎設定`,system_info:`運行與診斷資訊`},dashboard:{title:`儀表板`,subtitle:`歡迎使用 CLI Proxy API 管理中心`,openai_providers:`OpenAI 供應商`,quick_actions:`快速操作`,current_config:`目前設定`,management_keys:`管理金鑰`,provider_keys_detail:`G:{{gemini}} C:{{codex}} Cl:{{claude}} V:{{vertex}} O:{{openai}}`,oauth_credentials:`OAuth 憑證`,edit_settings:`編輯設定`,routing_strategy:`路由策略`,available_models:`可用模型`,available_models_desc:`所有供應商的模型總數`,welcome_back:`歡迎回來`,greeting_morning:`早安`,greeting_afternoon:`午安`,greeting_evening:`晚安`,greeting_night:`夜深了`,caring_morning:`新的一天,準備大展身手吧。`,caring_afternoon:`穩步推進中,繼續加油。`,caring_evening:`今天辛苦了,收尾工作做好喔。`,caring_night:`夜深了,別忘了早點休息。`,system_overview:`系統概覽`},basic_settings:{title:`基本設定`,debug_title:`除錯模式`,debug_enable:`啟用除錯模式`,proxy_title:`代理設定`,proxy_url_label:`代理 URL:`,proxy_url_placeholder:`例如: socks5://user:pass@127.0.0.1:1080/`,proxy_update:`更新`,proxy_clear:`清空`,retry_title:`請求重試`,retry_count_label:`重試次數:`,retry_update:`更新`,quota_title:`配額超出行為`,quota_switch_project:`自動切換專案`,quota_switch_preview:`切換到預覽模型`,logging_title:`記錄`,logging_to_file_enable:`啟用記錄到檔案`,logs_max_total_size_title:`記錄容量限制`,logs_max_total_size_label:`記錄總大小上限(MB):`,logs_max_total_size_hint:`設定為 0 表示不限制。`,logs_max_total_size_update:`更新`,request_log_title:`請求記錄`,request_log_enable:`啟用請求記錄`,request_log_warning:`僅在需要排查問題時開啟,日常請保持關閉。`,force_model_prefix_enable:`強制模型前綴`,ws_auth_title:`WebSocket 驗證`,ws_auth_enable:`啟用 /ws/* 驗證`,routing_title:`路由策略`,routing_strategy_label:`路由策略:`,routing_strategy_hint:`round-robin 為輪詢,fill-first 為優先填充。`,routing_strategy_update:`更新`,routing_strategy_round_robin:`round-robin(輪詢)`,routing_strategy_fill_first:`fill-first(優先填充)`},api_keys:{title:`API 金鑰管理`,proxy_auth_title:`代理服務驗證金鑰`,add_button:`新增金鑰`,empty_title:`暫無 API 金鑰`,empty_desc:`點擊上方按鈕新增第一個金鑰`,item_title:`API 金鑰`,add_modal_title:`新增 API 金鑰`,add_modal_key_label:`API 金鑰:`,add_modal_key_placeholder:`請輸入 API 金鑰`,edit_modal_title:`編輯 API 金鑰`,edit_modal_key_label:`API 金鑰:`,delete_confirm:`確定要刪除這個 API 金鑰嗎?`},auth_files:{title:`驗證檔案管理`,title_section:`驗證檔案`,description:`這裡集中管理 CLI Proxy 支援的所有 JSON 驗證檔案(如 Qwen、Gemini、Vertex 等),上傳後即可在執行時啟用對應的 AI 服務。`,upload_button:`上傳檔案`,delete_all_button:`刪除全部`,empty_title:`暫無驗證檔案`,empty_desc:`點擊上方按鈕上傳第一個檔案`,search_empty_title:`沒有符合的設定檔`,search_empty_desc:`請調整篩選條件或清空搜尋關鍵字再試一次。`,file_size:`大小`,file_modified:`修改時間`,health_status_label:`健康狀態`,health_status_healthy:`健康`,health_status_warning:`警告`,health_status_disabled:`已停用`,health_status_unknown:`未知`,health_status_no_message:`暫無狀態說明`,last_refresh_label:`最近重新整理`,refresh_not_available:`暫無`,refresh_just_now:`剛剛`,download_button:`下載`,delete_button:`刪除`,delete_confirm:`確定要刪除檔案`,delete_all_confirm:`確定要刪除所有驗證檔案嗎?此操作無法還原!`,delete_filtered_confirm:`確定要刪除篩選出的 {{type}} 驗證檔案嗎?此操作無法還原!`,delete_problem_button:`刪除問題憑證`,delete_problem_button_with_type:`刪除 {{type}} 問題憑證`,delete_problem_confirm:`確定要刪除所有有問題的驗證檔案嗎?此操作無法還原!`,delete_problem_filtered_confirm:`確定要刪除篩選出的有問題的 {{type}} 驗證檔案嗎?此操作無法還原!`,delete_filtered_result_button:`刪除篩選結果`,delete_filtered_result_confirm:`確定要刪除目前篩選結果中的驗證檔案嗎?此操作無法還原!`,upload_error_json:`只能上傳 JSON 檔案`,upload_error_size:`檔案大小不能超過 {{maxSize}}`,upload_success:`檔案上傳成功`,download_success:`檔案下載成功`,delete_success:`檔案刪除成功`,delete_all_success:`成功刪除`,delete_filtered_success:`成功刪除 {{count}} 個 {{type}} 驗證檔案`,delete_filtered_partial:`{{type}} 驗證檔案刪除完成,成功 {{success}} 個,失敗 {{failed}} 個`,delete_filtered_none:`目前篩選類型({{type}})下沒有可刪除的驗證檔案`,delete_problem_success:`成功刪除 {{count}} 個有問題的驗證檔案`,delete_problem_filtered_success:`成功刪除 {{count}} 個有問題的 {{type}} 驗證檔案`,delete_problem_partial:`有問題驗證檔案刪除完成,成功 {{success}} 個,失敗 {{failed}} 個`,delete_problem_filtered_partial:`有問題的 {{type}} 驗證檔案刪除完成,成功 {{success}} 個,失敗 {{failed}} 個`,delete_problem_none:`目前沒有可刪除的有問題驗證檔案`,delete_problem_filtered_none:`目前篩選類型({{type}})下沒有可刪除的有問題驗證檔案`,delete_filtered_result_success:`成功刪除 {{count}} 個篩選結果中的驗證檔案`,delete_filtered_result_partial:`篩選結果刪除完成,成功 {{success}} 個,失敗 {{failed}} 個`,delete_filtered_result_none:`目前篩選結果中沒有可刪除的驗證檔案`,files_count:`個檔案`,pagination_prev:`上一頁`,pagination_next:`下一頁`,pagination_info:`第 {{current}} / {{total}} 頁 · 共 {{count}} 個檔案`,search_label:`搜尋設定檔`,search_placeholder:`輸入名稱、類型或供應方關鍵字,支援 * 萬用字元`,problem_filter_label:`問題篩選`,problem_filter_only:`僅顯示有問題憑證`,disabled_filter_only:`僅顯示已停用憑證`,display_options_label:`顯示選項`,compact_mode_label:`簡略模式`,sort_label:`排序`,sort_default:`預設`,sort_az:`A-Z 名稱`,sort_priority:`優先順序`,priority_display:`優先順序`,page_size_label:`單頁數量`,page_size_unit:`個/頁`,view_mode_paged:`分頁顯示`,view_mode_all:`顯示全部`,too_many_files_warning:`您的憑證總數過多,全部載入會導致頁面卡頓,請保持分頁瀏覽。`,filter_all:`全部`,filter_qwen:`Qwen`,filter_gemini:`Gemini`,filter_kimi:`Kimi`,filter_aistudio:`AIStudio`,filter_claude:`Claude`,filter_codex:`Codex`,filter_antigravity:`Antigravity`,filter_xai:`xAI`,filter_iflow:`iFlow`,filter_vertex:`Vertex`,filter_empty:`空檔案`,filter_unknown:`其他`,type_qwen:`Qwen`,type_gemini:`Gemini`,type_kimi:`Kimi`,type_aistudio:`AIStudio`,type_claude:`Claude`,type_codex:`Codex`,type_antigravity:`Antigravity`,type_xai:`xAI`,type_iflow:`iFlow`,type_vertex:`Vertex`,type_empty:`空檔案`,type_unknown:`其他`,type_virtual:`虛擬驗證檔案`,models_button:`模型`,models_title:`支援的模型`,models_loading:`正在載入模型清單...`,models_empty:`該憑證暫無可用模型`,models_empty_desc:`該驗證憑證可能尚未被伺服器載入或沒有綁定任何模型`,models_unsupported:`目前版本不支援此功能`,models_unsupported_desc:`請更新 CLI Proxy API 到最新版本後重試`,models_excluded_badge:`已停用`,models_excluded_hint:`此 OAuth 模型已被停用`,status_toggle_label:`啟用`,status_enabled_success:`已啟用「{{name}}」`,status_disabled_success:`已停用「{{name}}」`,batch_status_success:`已成功更新 {{count}} 個檔案`,batch_status_partial:`成功 {{success}} 個,失敗 {{failed}} 個`,batch_delete_title:`刪除已選檔案`,batch_delete_confirm:`確定要刪除 {{count}} 個檔案嗎?`,batch_selected:`已選 {{count}} 項`,batch_select_all:`全選`,batch_select_page:`全選目前頁`,batch_select_filtered:`全選篩選結果`,batch_invert_page:`反選目前頁`,batch_deselect:`取消選擇`,batch_download:`下載已選`,batch_download_success:`已開始下載 {{count}} 個檔案`,batch_download_partial:`下載完成:成功 {{success}} 個,失敗 {{failed}} 個`,batch_enable:`啟用`,batch_disable:`停用`,prefix_proxy_button:`驗證檔案詳情 / 編輯`,auth_field_editor_title:`驗證檔案詳情 / 編輯 - {{name}}`,prefix_proxy_loading:`正在載入驗證檔案...`,prefix_proxy_info_label:`驗證檔案資訊(info)`,prefix_proxy_source_label:`驗證檔案 JSON(預覽)`,prefix_proxy_invalid_content_label:`下載內容(已截斷)`,prefix_label:`前綴(prefix)`,proxy_url_label:`代理 URL(proxy_url)`,prefix_placeholder:``,proxy_url_placeholder:`socks5://username:password@proxy_ip:port/`,priority_label:`優先順序(priority)`,priority_placeholder:`例如: 10 或 -1`,priority_hint:`僅支援整數;無效值會被忽略。數值越大優先順序越高。`,codex_websockets_label:`WebSockets(websockets)`,codex_websockets_hint:`為該 Codex 憑證開啟 Responses API 的 websocket 傳輸。`,excluded_models_label:`排除模型(excluded_models)`,excluded_models_placeholder:`用逗號或換行分隔,例如: model-a, gpt-5-*, *-preview`,excluded_models_hint:`儲存為陣列;會自動 trim、小寫、去重並排序。`,disable_cooling_label:`停用冷卻(disable_cooling)`,disable_cooling_placeholder:`例如: true / false / 1 / 0`,disable_cooling_hint:`支援布林值、0/非0 數字或字串 true/false/1/0;無法解析時忽略。`,note_label:`備註(note)`,note_placeholder:`輸入備註資訊,例如:張三的帳號`,note_hint:`選填,用於標記憑證用途或歸屬;留空則不寫入。`,note_display:`備註`,headers_label:`自訂請求標頭(headers)`,headers_placeholder:`{
|
||
"Header-Name": "value"
|
||
}`,headers_hint:`以 JSON 物件格式輸入自訂 HTTP 請求標頭,例如:{"X-My-Header": "value"}`,headers_invalid_json:`自訂請求標頭必須是有效的 JSON。`,headers_invalid_object:`自訂請求標頭必須是 JSON 物件。`,headers_invalid_value:`每個自訂請求標頭的值都必須是字串。`,prefix_proxy_invalid_json:`該驗證檔案不是 JSON 物件,無法編輯欄位。`,prefix_proxy_html_challenge:`下載到的是 HTML 驗證頁面,不是驗證 JSON 物件。請重新驗證或替換該驗證檔案後再編輯欄位。`,prefix_proxy_saved_success:`已更新驗證檔案「{{name}}」`,quota_refresh_single:`重新整理配額`,quota_refresh_hint:`僅重新整理該驗證檔案的配額`,quota_refresh_success:`已重新整理「{{name}}」的配額`,quota_refresh_failed:`重新整理「{{name}}」的配額失敗:{{message}}`},antigravity_subscription:{subscription_label:`訂閱`,plan_badge:`方案 {{plan}}`,loading_short:`方案...`,error_badge:`方案錯誤`,load_failed:`訂閱狀態取得失敗:{{message}}`,missing_auth_index:`驗證檔案缺少 auth_index`,empty_data:`暫無訂閱資料`,plan_unknown:`未知`,plan_free:`免費版`,plan_pro:`Pro`,plan_ultra:`Ultra`,plan_ultra_lite:`Ultra Lite`},antigravity_quota:{title:`Antigravity 配額`,empty_title:`暫無 Antigravity 驗證`,empty_desc:`上傳 Antigravity 驗證檔案後即可查看配額。`,idle:`點擊此處重新整理配額`,loading:`正在載入配額...`,load_failed:`配額取得失敗:{{message}}`,missing_auth_index:`驗證檔案缺少 auth_index`,missing_project_id:`Antigravity 憑證缺少 project_id。請重新登入或重新整理憑證以探索專案。`,empty_models:`暫無配額資料`,plan_label:`方案`,group_gemini_models:`Gemini 模型`,group_claude_gpt_models:`Claude 與 GPT 模型`,group_models_description:`此分組包含:{{models}}`,weekly_limit:`週限額`,daily_limit:`日限額`,five_hour_limit:`5 小時限額`,monthly_limit:`月限額`,quota_available:`配額可用`,remaining_percent:`剩餘 {{percent}}%`,refreshes_in:`{{duration}} 後重新整理`,refresh_available:`可重新整理`,duration_day_hour:`{{days}} 天 {{hours}} 小時`,duration_hour_minute:`{{hours}} 小時 {{minutes}} 分鐘`,duration_minute:`{{minutes}} 分鐘`,duration_less_than_minute:`小於 1 分鐘`,refresh_button:`重新整理配額`,fetch_all:`取得全部`},claude_quota:{title:`Claude 配額`,empty_title:`暫無 Claude OAuth 驗證`,empty_desc:`使用 Claude OAuth 登入後即可查看配額。`,idle:`點擊此處重新整理配額`,loading:`正在載入配額...`,load_failed:`配額取得失敗:{{message}}`,missing_auth_index:`驗證檔案缺少 auth_index`,empty_windows:`暫無配額資料`,refresh_button:`重新整理配額`,fetch_all:`取得全部`,five_hour:`5 小時限額`,seven_day:`7 天限額`,seven_day_oauth_apps:`7 天 OAuth 應用`,seven_day_opus:`7 天 Opus`,seven_day_sonnet:`7 天 Sonnet`,seven_day_cowork:`7 天 Cowork`,iguana_necktie:`Iguana Necktie`,extra_usage_label:`額外用量`,plan_label:`方案`,plan_unknown:`未知`,plan_free:`免費版`,plan_pro:`專業版`,plan_max:`Max`,plan_max5:`Max 5x`,plan_max20:`Max 20x`,plan_team:`團隊版`},codex_quota:{title:`Codex 配額`,empty_title:`暫無 Codex 驗證`,empty_desc:`上傳 Codex 驗證檔案後即可查看配額。`,idle:`點擊此處重新整理配額`,loading:`正在載入配額...`,load_failed:`配額取得失敗:{{message}}`,missing_auth_index:`驗證檔案缺少 auth_index`,missing_account_id:`Codex 憑證缺少 ChatGPT 帳號 ID`,empty_windows:`暫無配額資料`,no_access:`該憑證已無 Codex 存取權限(free)。`,refresh_button:`重新整理配額`,fetch_all:`取得全部`,primary_window:`5 小時限額`,secondary_window:`週限額`,team_secondary_window:`月度限額`,code_review_primary_window:`程式碼審查 5 小時限額`,code_review_secondary_window:`程式碼審查週限額`,code_review_team_secondary_window:`程式碼審查月度限額`,additional_primary_window:`{{name}} 5 小時限額`,additional_secondary_window:`{{name}} 週限額`,additional_team_secondary_window:`{{name}} 月度限額`,plan_label:`方案`,expires_label:`續期時間`,reset_credits_label:`主動重置次數`,reset_button:`重置配額`,reset_confirm_title:`重置 Codex 配額`,reset_confirm_message:`將消耗 1 次主動重置次數來重置「{{name}}」的 Codex 配額。是否繼續?`,reset_confirm_button:`確認重置`,reset_success:`已重置「{{name}}」的 Codex 配額`,reset_failed:`重置「{{name}}」的 Codex 配額失敗:{{message}}`,plan_plus:`Plus`,plan_team:`Team`,plan_free:`Free`,plan_pro:`Pro 20x`,plan_prolite:`Pro 5x`},kimi_quota:{title:`Kimi 配額`,empty_title:`暫無 Kimi 驗證`,empty_desc:`上傳 Kimi 驗證檔案後即可查看配額。`,idle:`點擊此處重新整理配額`,loading:`正在載入配額...`,load_failed:`配額取得失敗:{{message}}`,missing_auth_index:`驗證檔案缺少 auth_index`,empty_data:`暫無配額資料`,refresh_button:`重新整理配額`,fetch_all:`取得全部`,weekly_limit:`週限額`,limit_window:`{{duration}} 限額`,limit_index:`限額 #{{index}}`,reset_hint:`{{hint}} 後重置`},xai_quota:{title:`Grok 配額`,empty_title:`暫無 xAI/Grok 驗證`,empty_desc:`使用 xAI OAuth 登入後即可查看 Grok 配額。`,idle:`點擊此處重新整理配額`,loading:`正在載入配額...`,load_failed:`配額取得失敗:{{message}}`,missing_auth_index:`驗證檔案缺少 auth_index`,empty_data:`暫無配額資料`,refresh_button:`重新整理配額`,fetch_all:`取得全部`,monthly_credits:`月度點數`,plan_label:`方案`,plan_supergrok:`SuperGrok`,plan_supergrok_heavy:`SuperGrok Heavy`,pay_as_you_go_label:`按量付費`,pay_as_you_go_enabled:`已啟用,封頂 {{cap}}`,pay_as_you_go_disabled:`未啟用`},vertex_import:{title:`Vertex JSON 登入`,description:`上傳 Google 服務帳號 JSON,使用 CLI vertex-import 同步規則寫入 auth-dir/vertex-<project>.json。`,location_label:`目標區域(選填)`,location_placeholder:`us-central1`,location_hint:`留空表示使用預設區域 us-central1。`,file_label:`服務帳號金鑰 JSON`,file_hint:`僅支援 Google Cloud service account key JSON 檔案,私鑰會自動規範化。`,file_placeholder:`尚未選擇檔案`,choose_file:`選擇檔案`,import_button:`匯入 Vertex 憑證`,file_required:`請先選擇 .json 憑證檔案`,success:`Vertex 憑證匯入成功`,result_title:`憑證已儲存`,result_project:`專案 ID`,result_email:`服務帳號`,result_location:`區域`,result_file:`儲存檔案`},oauth_excluded:{title:`OAuth 模型停用`,description:`按供應商分列展示,點擊卡片編輯或刪除;支援 * 萬用字元,範圍跟隨上方的設定檔篩選標籤。`,add:`新增停用`,add_title:`新增供應商模型停用`,edit_title:`編輯 {{provider}} 的模型停用`,refresh:`重新整理`,refreshing:`重新整理中...`,provider_label:`供應商`,provider_auto:`跟隨目前篩選`,provider_placeholder:`例如 codex / openai`,provider_hint:`預設選取目前篩選的供應商,也可直接輸入或選擇其他名稱。`,models_label:`停用的模型`,models_loading:`正在載入模型清單...`,models_unsupported:`目前 CPA 版本不支援取得模型清單。`,models_loaded:`已載入 {{count}} 個模型,勾選要停用的模型。`,no_models_available:`該供應商暫無可用模型清單。`,save:`儲存/更新`,saving:`正在儲存...`,save_success:`模型停用已更新`,save_failed:`更新模型停用失敗`,delete:`刪除供應商`,delete_confirm:`確定要刪除 {{provider}} 的模型停用嗎?`,delete_success:`已刪除該供應商的模型停用`,delete_failed:`刪除模型停用失敗`,deleting:`正在刪除...`,no_models:`未設定停用模型`,model_count:`停用 {{count}} 個模型`,list_empty_all:`暫無任何供應商的模型停用,點擊「新增停用」建立。`,list_empty_filtered:`目前篩選下沒有停用項,點擊「新增停用」新增。`,disconnected:`請先連線伺服器以查看模型停用`,load_failed:`載入模型停用失敗`,provider_required:`請先填寫供應商名稱`,scope_all:`目前範圍:全域(顯示所有供應商)`,scope_provider:`目前範圍:{{provider}}`,upgrade_required:`目前 CPA 版本不支援 OAuth 模型停用,請升級 CPA 版本`,upgrade_required_title:`需要升級 CPA 版本`,upgrade_required_desc:`目前伺服器版本不支援取得 OAuth 模型停用功能,請升級到最新版本的 CPA(CLI Proxy API)後重試。`},oauth_model_alias:{title:`OAuth 模型別名`,add:`新增別名`,add_title:`新增供應商模型別名`,provider_label:`供應商`,provider_placeholder:`例如 codex / vertex`,provider_hint:`預設選取目前篩選的供應商,也可直接輸入或選擇其他名稱。`,model_source_loading:`正在載入模型清單...`,model_source_unsupported:`目前 CPA 版本不支援取得模型清單(仍可手動輸入)。`,model_source_loaded:`已載入 {{count}} 個模型,可在「原模型名稱」中下拉選擇;也可手動輸入。留空儲存將刪除該供應商記錄;開啟「保留原名」會在保留原模型名的同時新增別名。`,alias_label:`模型別名`,alias_name_placeholder:`原模型名稱`,alias_placeholder:`別名(必填)`,duplicate_alias:`同一供應商下的別名不能重複。`,alias_fork_label:`保留原名`,add_alias:`新增別名`,save:`儲存/更新`,save_success:`模型別名已更新`,save_failed:`更新模型別名失敗`,delete:`刪除供應商`,delete_confirm:`確定要刪除 {{provider}} 的模型別名嗎?`,delete_link_title:`取消連結`,delete_link_confirm:`確定取消 <code>{{sourceModel}}</code>({{provider}})到別名 <code>{{alias}}</code> 的映射?`,delete_alias_title:`刪除別名`,delete_alias_confirm:`確定刪除別名 <code>{{alias}}</code> 並取消所有關聯模型的映射?`,delete_success:`已刪除該供應商的模型別名`,delete_failed:`刪除模型別名失敗`,no_models:`未設定模型別名`,model_count:`{{count}} 條別名`,list_empty_all:`暫無任何供應商的模型別名,點擊「新增別名」建立。`,chart_title:`全部映射概覽`,diagram_providers:`供應商`,diagram_source_models:`來源模型`,diagram_aliases:`別名`,diagram_expand:`展開`,diagram_collapse:`收起`,diagram_add_alias:`新增別名`,diagram_rename:`重新命名`,diagram_rename_alias_title:`重新命名別名`,diagram_rename_alias_label:`新別名名稱`,diagram_rename_placeholder:`輸入別名名稱...`,diagram_delete_link:`取消連結 {{provider}} / {{name}}`,diagram_delete_alias:`刪除別名`,diagram_please_enter_alias:`請輸入別名名稱。`,diagram_alias_exists:`該別名已存在。`,diagram_add_alias_title:`新增別名`,diagram_add_alias_label:`別名名稱`,diagram_add_placeholder:`輸入新別名名稱...`,diagram_rename_btn:`重新命名`,diagram_add_btn:`新增`,diagram_settings:`設定`,diagram_settings_title:`別名設定 — {{alias}}`,diagram_settings_source_title:`來源模型設定`,diagram_settings_empty:`該別名暫無映射。`,diagram_tap_hint:`觸控設備上:先點選來源模型,再點選別名即可建立映射。`,view_mode:`檢視模式`,view_mode_diagram:`概覽`,view_mode_list:`管理`,provider_required:`請先填寫供應商名稱`,upgrade_required:`目前 CPA 版本不支援模型別名功能,請升級 CPA 版本`,upgrade_required_title:`需要升級 CPA 版本`,upgrade_required_desc:`目前伺服器版本不支援 OAuth 模型別名功能,請升級到最新版本的 CPA(CLI Proxy API)後重試。`},auth_login:{codex_oauth_title:`Codex OAuth`,codex_oauth_button:`開始 Codex 登入`,codex_oauth_hint:`透過 OAuth 流程登入 Codex 服務,自動取得並儲存驗證檔案。`,codex_oauth_url_label:`授權連結:`,codex_open_link:`開啟連結`,codex_copy_link:`複製連結`,codex_oauth_status_waiting:`等待驗證中...`,codex_oauth_status_success:`驗證成功!`,codex_oauth_status_error:`驗證失敗:`,codex_oauth_start_error:`啟動 Codex OAuth 失敗:`,codex_oauth_polling_error:`檢查驗證狀態失敗:`,anthropic_oauth_title:`Anthropic OAuth`,anthropic_oauth_button:`開始 Anthropic 登入`,anthropic_oauth_hint:`透過 OAuth 流程登入 Anthropic(Claude)服務,自動取得並儲存驗證檔案。`,anthropic_oauth_url_label:`授權連結:`,anthropic_open_link:`開啟連結`,anthropic_copy_link:`複製連結`,anthropic_oauth_status_waiting:`等待驗證中...`,anthropic_oauth_status_success:`驗證成功!`,anthropic_oauth_status_error:`驗證失敗:`,anthropic_oauth_start_error:`啟動 Anthropic OAuth 失敗:`,anthropic_oauth_polling_error:`檢查驗證狀態失敗:`,antigravity_oauth_title:`Antigravity OAuth`,antigravity_oauth_button:`開始 Antigravity 登入`,antigravity_oauth_hint:`透過 OAuth 流程登入 Antigravity(Google 帳號)服務,自動取得並儲存驗證檔案。`,antigravity_oauth_url_label:`授權連結:`,antigravity_open_link:`開啟連結`,antigravity_copy_link:`複製連結`,antigravity_oauth_status_waiting:`等待驗證中...`,antigravity_oauth_status_success:`驗證成功!`,antigravity_oauth_status_error:`驗證失敗:`,antigravity_oauth_start_error:`啟動 Antigravity OAuth 失敗:`,antigravity_oauth_polling_error:`檢查驗證狀態失敗:`,kimi_oauth_title:`Kimi OAuth`,kimi_oauth_button:`開始 Kimi 登入`,kimi_oauth_hint:`透過裝置授權流程登入 Kimi 服務,自動取得並儲存驗證檔案。`,kimi_oauth_url_label:`授權連結:`,kimi_open_link:`開啟連結`,kimi_copy_link:`複製連結`,kimi_oauth_status_waiting:`等待驗證中...`,kimi_oauth_status_success:`驗證成功!`,kimi_oauth_status_error:`驗證失敗:`,kimi_oauth_start_error:`啟動 Kimi OAuth 失敗:`,kimi_oauth_polling_error:`檢查驗證狀態失敗:`,xai_oauth_title:`xAI OAuth`,xai_oauth_button:`開始 xAI 登入`,xai_oauth_hint:`透過 OAuth 流程登入 xAI Grok 服務,自動取得並儲存驗證檔案。`,xai_oauth_url_label:`授權連結:`,xai_open_link:`開啟連結`,xai_copy_link:`複製連結`,xai_oauth_status_waiting:`等待驗證中...`,xai_oauth_status_success:`驗證成功!`,xai_oauth_status_error:`驗證失敗:`,xai_oauth_start_error:`啟動 xAI OAuth 失敗:`,xai_oauth_polling_error:`檢查驗證狀態失敗:`,xai_callback_label:`回調 URL 或授權碼`,xai_callback_placeholder:`貼上頁面顯示的 code,或完整 callback URL`,xai_callback_hint:`Grok 有時只在頁面顯示 code。可直接貼上 code,系統會自動拼接為 http://127.0.0.1:56121/callback?... 後提交。`,xai_callback_required:`請先貼上 Grok 頁面顯示的 code 或完整回調 URL。`,xai_callback_state_missing:`缺少本次 xAI 登入的 state,請重新開始 xAI 登入後再提交 code。`,qwen_oauth_title:`Qwen OAuth`,qwen_oauth_button:`開始 Qwen 登入`,qwen_oauth_hint:`透過裝置授權流程登入 Qwen 服務,自動取得並儲存驗證檔案。`,qwen_oauth_url_label:`授權連結:`,qwen_open_link:`開啟連結`,qwen_copy_link:`複製連結`,qwen_oauth_status_waiting:`等待驗證中...`,qwen_oauth_status_success:`驗證成功!`,qwen_oauth_status_error:`驗證失敗:`,qwen_oauth_start_error:`啟動 Qwen OAuth 失敗:`,qwen_oauth_polling_error:`檢查驗證狀態失敗:`,oauth_callback_label:`回調 URL`,oauth_callback_placeholder:`http://localhost:1455/auth/callback?code=...&state=...`,oauth_callback_hint:`遠端瀏覽器模式:當授權跳轉到 http://localhost:... 後,複製完整 URL 並提交到這裡。`,oauth_callback_button:`提交回調 URL`,oauth_callback_required:`請先貼上完整的回調 URL。`,oauth_callback_success:`回調 URL 已提交,請繼續等待驗證。`,oauth_callback_error:`提交回調 URL 失敗:`,oauth_callback_upgrade_hint:`請更新 CLI Proxy API 或檢查連線`,oauth_callback_status_success:`回調 URL 已提交,等待驗證中...`,oauth_callback_status_error:`回調 URL 提交失敗:`,missing_state:`無法取得驗證狀態參數`,iflow_oauth_title:`iFlow OAuth`,iflow_oauth_button:`開始 iFlow 登入`,iflow_oauth_hint:`透過 OAuth 流程登入 iFlow 服務,自動取得並儲存驗證檔案。`,iflow_oauth_url_label:`授權連結:`,iflow_open_link:`開啟連結`,iflow_copy_link:`複製連結`,iflow_oauth_status_waiting:`等待驗證中...`,iflow_oauth_status_success:`驗證成功!`,iflow_oauth_status_error:`驗證失敗:`,iflow_oauth_start_error:`啟動 iFlow OAuth 失敗:`,iflow_oauth_polling_error:`檢查驗證狀態失敗:`,iflow_cookie_title:`iFlow Cookie 登入`,iflow_cookie_label:`Cookie 內容:`,iflow_cookie_placeholder:`填入 BXAuth 值,以 BXAuth= 開頭`,iflow_cookie_hint:`直接提交 Cookie 以完成登入(無需開啟授權連結),伺服器端將自動儲存憑證。`,iflow_cookie_key_hint:`提示:需在平台上先建立 Key。`,iflow_cookie_button:`提交 Cookie 登入`,iflow_cookie_status_success:`Cookie 登入成功,憑證已儲存。`,iflow_cookie_status_error:`Cookie 登入失敗:`,iflow_cookie_status_duplicate:`設定檔重複:`,iflow_cookie_start_error:`提交 Cookie 登入失敗:`,iflow_cookie_config_duplicate:`偵測到設定檔已存在(重複),如需重新儲存請先刪除原檔案後重試。`,iflow_cookie_required:`請先填寫 Cookie 內容`,iflow_cookie_result_title:`Cookie 登入結果`,iflow_cookie_result_email:`帳號`,iflow_cookie_result_expired:`到期時間`,iflow_cookie_result_path:`儲存路徑`,iflow_cookie_result_type:`類型`,remote_access_disabled:`遠端存取不支援此登入方式,請從本地(localhost)存取`},stats:{success:`成功`,failure:`失敗`},status_bar:{success_short:`✓`,failure_short:`✗`,no_requests:`無請求`},service_health:{title:`服務健康監測`,window:`最近 7 天`,oldest:`最早`,newest:`最新`},logs:{title:`記錄檢視`,runtime_unknown:`目前執行端:識別中`,runtime_cpa:`目前執行端:CPA`,runtime_home:`目前執行端:Home`,refresh_button:`重新整理記錄`,clear_button:`清空記錄`,fullscreen_button:`全螢幕顯示`,exit_fullscreen_button:`退出全螢幕`,download_button:`下載記錄`,error_log_button:`選擇錯誤記錄`,error_logs_modal_title:`錯誤請求記錄`,error_logs_description:`請選擇要開啟或下載的錯誤請求記錄檔案(僅在關閉請求記錄時產生)。`,error_logs_home_unavailable:`Home 模式下請在記錄內容頁查看資料庫記錄,錯誤請求記錄清單僅適用於 CPA 檔案記錄。`,error_logs_request_log_enabled:`目前已開啟請求記錄,按介面約定錯誤請求記錄清單會始終為空。關閉請求記錄後再重新整理即可查看。`,error_logs_empty:`暫無錯誤請求記錄檔案`,error_logs_load_error:`載入錯誤記錄清單失敗`,error_logs_size:`大小`,error_logs_modified:`最後修改`,error_logs_open:`開啟`,error_logs_download:`下載`,error_log_view_title:`錯誤請求記錄詳情`,error_log_open_failed:`開啟錯誤記錄失敗`,error_log_empty_content:`此錯誤記錄沒有內容`,error_log_copy_success:`錯誤記錄內容已複製`,error_log_download_success:`錯誤記錄下載成功`,request_log_download_title:`下載封包`,request_log_download_confirm:`是否要下載 id 為 {{id}} 的封包?`,request_log_download_success:`封包下載成功`,empty_title:`暫無記錄`,empty_desc:`當啟用「記錄到檔案」功能後,記錄將顯示在這裡`,cpa_file_logging_required:`目前連線的是 CPA,記錄檢視需要先開啟「記錄到檔案」。`,cpa_file_logging_required_title:`需要開啟檔案記錄`,cpa_file_logging_required_desc:`CPA 的記錄介面會讀取本機記錄檔。請在設定中開啟 logging-to-file 後再重新整理查看。`,file_logging_required:`目前記錄介面需要先開啟「記錄到檔案」後才能讀取檔案記錄。`,file_logging_required_title:`需要開啟檔案記錄`,file_logging_required_desc:`目前記錄介面會讀取本機記錄檔。請在設定中開啟 logging-to-file 後再重新整理查看。`,home_clear_unavailable:`Home 記錄來自資料庫查詢,目前不支援從這裡清空。`,log_content:`記錄內容`,loading:`正在載入記錄...`,load_error:`載入記錄失敗`,clear_confirm:`確定要清空所有記錄嗎?此操作無法還原!`,clear_success:`記錄已清空`,download_success:`記錄下載成功`,auto_refresh:`自動重新整理`,auto_refresh_enabled:`自動重新整理已開啟`,auto_refresh_disabled:`自動重新整理已關閉`,load_more_hint:`向上滾動載入更多`,hidden_lines:`已隱藏 {{count}} 行`,loaded_lines:`已載入 {{count}} 行`,filtered_lines:`已篩選 {{count}} 行`,hide_management_logs:`隱藏 {{prefix}} 記錄`,show_raw_logs:`顯示原始記錄`,show_raw_logs_hint:`直接顯示原始記錄文字,方便多行複製`,search_placeholder:`搜尋記錄內容或關鍵字`,filter_panel_title:`結構化篩選`,filter_panel_expand:`展開結構化篩選`,filter_panel_collapse:`收起結構化篩選`,filter_panel_active_count:`已選 {{count}} 項`,filter_method:`請求方法`,filter_status:`狀態碼`,filter_path:`路徑`,filter_path_empty:`暫無可篩選路徑`,filter_status_2xx:`2xx`,filter_status_3xx:`3xx`,filter_status_4xx:`4xx`,filter_status_5xx:`5xx`,clear_filters:`清空篩選`,search_empty_title:`未找到符合的記錄`,search_empty_desc:`嘗試更換關鍵字或清空篩選條件。`,double_click_copy_hint:`雙擊複製記錄原文`,copy_success:`已複製記錄原文`,copy_failed:`複製失敗`,lines:`行`,removed:`已篩選`,upgrade_required_title:`需要升級 CLI Proxy API`,upgrade_required_desc:`目前伺服器版本不支援記錄檢視功能,請升級到最新版本的 CLI Proxy API 以使用此功能。`},config_management:JSON.parse(`{"title":"設定面板","editor_title":"設定檔","reload":"重新載入","reload_confirm_message":"重新載入將捨棄你目前未儲存的修改,確定繼續嗎?","save":"儲存","description":"透過視覺化或原始檔方式編輯 config.yaml 設定檔","status_idle":"等待操作","status_loading":"載入設定中...","status_loading_short":"載入中","status_loaded":"設定已載入","status_loaded_short":"已載入","status_dirty":"有未儲存的變更","status_dirty_short":"未儲存","status_disconnected":"請先連線伺服器以載入設定","status_disconnected_short":"未連線","status_load_failed":"載入失敗","status_load_failed_short":"失敗","status_saving":"正在儲存設定...","status_saving_short":"儲存中","status_saved":"設定儲存完成","status_save_failed":"儲存失敗","save_success":"設定已儲存","error_yaml_not_supported":"伺服器未回傳 YAML 格式,請確認 /config.yaml 介面可用","visual_mode_unavailable":"YAML 語法修復前無法使用視覺化編輯","visual_mode_unavailable_short":"YAML 錯誤","validation_blocked_short":"待修復","visual_mode_unavailable_detail":"目前設定存在無效 YAML,暫時無法使用視覺化編輯:{{message}}","visual_mode_save_blocked":"請先修復 YAML 語法錯誤,再從視覺化模式儲存","visual_mode_latest_yaml_invalid":"伺服器最新設定包含無效 YAML,請先切回原始碼模式檢查後再儲存視覺化修改:{{message}}","editor_placeholder":"key: value","search_placeholder":"搜尋設定內容...","search_button":"搜尋","search_no_results":"無結果","search_prev":"上一個","search_next":"下一個","diff":{"title":"確認變更","current":"目前設定","modified":"修改後","confirm":"確認儲存","no_changes":"未偵測到變更"},"tabs":{"visual":"視覺化編輯","source":"原始檔編輯"},"visual":{"notice":"視覺化模式涵蓋常用欄位,未涵蓋的設定仍需在原始檔模式中查看或編輯。","quick_jump":"快速跳轉","mode":{"simple":"簡單","full":"完整","label":"編輯模式","more_settings":"切換到完整模式,檢視全部 {{total}} 個設定分區","validation_banner":"部分進階設定項存在驗證錯誤,已阻止儲存。請切換到完整模式進行修正。","switch_to_full":"切換完整模式"},"search":{"placeholder":"搜尋設定項(標籤或 YAML 鍵名)","no_results":"沒有符合的設定項"},"sections":{"connectivity":{"title":"接入與認證","description":"服務位址、連接埠、認證目錄與 API 金鑰"},"logging":{"title":"日誌與診斷","description":"除錯、日誌輸出與使用統計"},"advanced":{"title":"進階與實驗","description":"請求標頭偽裝、簽章快取、外掛來源等不常修改的設定","plugins_title":"外掛","signature_title":"Antigravity 簽章"},"server":{"title":"伺服器設定","description":"基本伺服器設定","host":"主機位址","port":"連接埠"},"tls":{"title":"TLS/SSL 設定","description":"HTTPS 安全連線設定","enable":"啟用 TLS","enable_desc":"啟用 HTTPS 安全連線","cert":"憑證檔案路徑","key":"私鑰檔案路徑"},"remote":{"title":"遠端管理","description":"遠端存取和控制面板設定","allow_remote":"允許遠端存取","allow_remote_desc":"允許從其他主機存取管理介面","disable_panel":"停用控制面板","disable_panel_desc":"停用內建的 Web 控制面板","disable_auto_update_panel":"停用面板自動更新","disable_auto_update_panel_desc":"首次缺失時仍可下載,但不再從 GitHub 背景自動更新","secret_key":"管理金鑰","secret_key_placeholder":"設定管理金鑰","panel_repo":"面板儲存庫"},"auth":{"title":"驗證設定","description":"API 金鑰與驗證檔案目錄設定","auth_dir":"驗證檔案目錄(auth-dir)","auth_dir_hint":"存放驗證檔案的目錄路徑(支援 ~)"},"system":{"title":"系統設定","description":"除錯、記錄、統計與效能調整設定","debug":"除錯模式","debug_desc":"啟用詳細的除錯記錄","commercial_mode":"商業模式","commercial_mode_desc":"停用高開銷中介軟體以支援高並行","logging_to_file":"寫入記錄檔","logging_to_file_desc":"將記錄儲存到檔案","plugins_enabled":"啟用插件系統","plugins_enabled_desc":"啟用標準動態庫插件載入;具體插件實例仍在插件管理頁啟停","plugin_store_sources":"第三方插件源","plugin_store_sources_desc":"追加插件商店 registry 源;內建官方源始終保留","plugin_store_sources_label":"插件源 registry URL(plugins.store-sources)","plugin_store_sources_placeholder":"https://example.com/cliproxy-plugins/registry.json","plugin_store_sources_hint":"每列一個 registry.json URL,儲存時會過濾空列","logs_max_size":"記錄檔大小限制(MB)","error_logs_max_files":"錯誤記錄保留檔案數","usage_statistics_enabled":"啟用記憶體用量統計","usage_statistics_enabled_desc":"啟用記憶體中的請求用量聚合","redis_usage_retention":"Redis 用量佇列保留秒數","redis_usage_retention_hint":"RESP 介面 LPOP/RPOP 用量佇列的記憶體保留時間,最大 3600 秒","antigravity_signature_cache":"啟用 Antigravity 簽名快取","antigravity_signature_cache_desc":"優先使用並校驗快取的 thinking block 簽名","antigravity_signature_strict":"嚴格校驗旁路簽名","antigravity_signature_strict_desc":"僅在關閉簽名快取時生效,按完整 Claude protobuf 樹校驗"},"headers":{"title":"Header 預設值","description":"Claude 與 Codex OAuth 請求在客戶端缺少 Header 時使用的預設值","claude_title":"Claude Header Defaults","codex_title":"Codex Header Defaults","user_agent":"User-Agent","package_version":"Package Version","runtime_version":"Runtime Version","os":"OS","arch":"Arch","timeout":"Timeout","stabilize_device":"穩定設備指紋","stabilize_device_desc":"固定 OS/Arch,並按憑證/API Key 穩定軟體指紋","beta_features":"Beta Features","codex_identity_confuse":"Codex 身分混淆","codex_identity_confuse_desc":"在 fill-first 或會話黏性路由下,按所選驗證重映射 Codex prompt_cache_key 與安裝身分"},"network":{"title":"網路設定","description":"代理、重試和路由設定","proxy_url":"代理 URL","request_retry":"請求重試次數","max_retry_credentials":"最大重試憑證數","max_retry_credentials_hint":"留空表示不設定;設為 0 表示保留 legacy 行為,並嘗試所有可用憑證。","max_retry_interval":"最大重試間隔(秒)","auth_auto_refresh_workers":"驗證自動刷新 Worker 數","auth_auto_refresh_workers_hint":"大於 0 時覆蓋預設 Worker 數(16)","disable_image_generation":"停用圖像生成","disable_image_generation_hint":"false 為啟用;true 為全部停用;chat 僅停用非圖片端點注入","disable_image_generation_false":"false(啟用)","disable_image_generation_true":"true(全部停用)","disable_image_generation_chat":"chat(僅停用聊天注入)","gpt_image_2_base_model":"GPT Image 2 基礎模型","gpt_image_2_base_model_hint":"代理 gpt-image-2 圖片請求時使用的主線模型;留空或非法時後端使用預設值","routing_strategy":"路由策略","routing_strategy_hint":"選擇憑證選擇策略","strategy_round_robin":"輪詢(Round Robin)","strategy_fill_first":"填充優先(Fill First)","session_affinity_ttl":"會話黏性 TTL","force_model_prefix":"強制模型前綴","force_model_prefix_desc":"未帶前綴的模型請求只使用無前綴憑證","passthrough_headers":"透傳上游回應 Header","passthrough_headers_desc":"將過濾後的上游回應 Header 轉發給下游客戶端","disable_cooling":"停用冷卻調度","disable_cooling_desc":"全域停用驗證/模型失敗後的冷卻視窗","session_affinity":"會話黏性路由","ws_auth":"WebSocket 驗證","ws_auth_desc":"啟用 WebSocket 連線驗證(/v1/ws)"},"quota":{"title":"配額回退","description":"配額耗盡時的回退策略","switch_project":"切換專案","switch_project_desc":"配額耗盡時自動切換到其他專案","switch_preview_model":"切換預覽模型","switch_preview_model_desc":"配額耗盡時切換到預覽版本模型","antigravity_credits":"使用Antigravity Credits"},"streaming":{"title":"串流傳輸設定","description":"Keepalive 與 bootstrap 重試設定","keepalive_seconds":"Keepalive 秒數","keepalive_hint":"設定為 0 或留空表示停用 keepalive","bootstrap_retries":"Bootstrap 重試次數","bootstrap_hint":"串流傳輸啟動時(首包前)的重試次數","nonstream_keepalive":"非串流 Keepalive 間隔(秒)","nonstream_keepalive_hint":"非串流回應時每隔 N 秒發送空行以防止閒置逾時,設定為 0 或留空表示停用","disabled":"已停用"},"payload":{"title":"Payload 設定","description":"預設值、原始 JSON 規則、覆寫規則與篩選規則","default_rules":"預設規則","default_rules_desc":"當請求中未指定參數時,使用這些預設值","default_raw_rules":"預設 Raw 規則","default_raw_rules_desc":"當請求中未指定參數時,按原始 JSON 片段寫入這些值,例如 true、123、\\"high\\" 或 {\\"type\\":\\"object\\"}","override_rules":"覆寫規則","override_rules_desc":"強制覆寫請求中的參數值","override_raw_rules":"覆寫 Raw 規則","override_raw_rules_desc":"始終按原始 JSON 片段覆寫參數值,適合 response_format、schema 等複雜欄位","filter_rules":"篩選規則","filter_rules_desc":"透過 JSON Path 預篩選上游請求體,自動剔除不合規/冗餘參數(Request Sanitization)"}},"api_keys":{"label":"API 金鑰清單(api-keys)","add":"新增 API 金鑰","generate":"產生","empty":"暫無 API 金鑰","hint":"每個條目代表一個 API 金鑰(與「API 金鑰管理」頁面樣式一致)","edit_title":"編輯 API 金鑰","add_title":"新增 API 金鑰","input_label":"API 金鑰","input_placeholder":"貼上你的 API 金鑰","input_hint":"此處僅修改本地設定檔內容,不會自動同步到 API 金鑰管理介面","error_empty":"請輸入 API 金鑰","error_invalid":"API 金鑰包含無效字元"},"payload_rules":{"rule":"規則","models":"適用模型","model_name":"模型名稱","provider_type":"供應商類型","add_model":"新增模型","params":"參數設定","remove_params":"移除參數","json_path":"JSON 路徑(如 temperature)","json_path_filter":"JSON 路徑(gjson/sjson),如 generationConfig.thinkingConfig.thinkingBudget","param_type":"參數類型","param_value":"參數值","add_param":"新增參數","no_rules":"暫無規則","add_rule":"新增規則","provider_default":"預設","provider_openai":"OpenAI","provider_openai_response":"OpenAI Response","provider_responses":"Responses","provider_gemini":"Gemini","provider_claude":"Claude","provider_codex":"Codex","provider_antigravity":"Antigravity","advanced":"進階","hide_advanced":"收起進階","from_protocol":"來源協議(from-protocol)","headers":"請求 Header 匹配","header_name":"Header 名稱","header_value":"Header 值","add_header":"新增 Header","match":"必須匹配(match)","notMatch":"不得匹配(not-match)","exist":"必須存在(exist)","notExist":"不得存在(not-exist)","condition_path":"匹配路徑","condition_value":"匹配值","add_condition":"新增條件","value_type_string":"字串","value_type_number":"數字","value_type_boolean":"布林","value_type_json":"JSON","value_string":"字串值","value_number":"數字值(如 0.7)","value_boolean":"true 或 false","value_json":"JSON 值","value_raw_json":"原始 JSON 片段,如 true、123、\\"high\\" 或 {\\"type\\":\\"object\\"}","value_default":"值","boolean_true":"true","boolean_false":"false"},"validation":{"validation_blocked":"請先修復表單驗證錯誤再儲存","port_range":"請輸入 1 到 65535 之間的有效連接埠","non_negative_integer":"請輸入非負整數","payload_invalid_number":"請輸入有效數字","payload_invalid_boolean":"請選擇 true 或 false","payload_invalid_json":"請輸入有效的 JSON"},"common":{"edit":"編輯","delete":"刪除","cancel":"取消","update":"更新","add":"新增"}}}`),quota_management:{title:`配額管理`,description:`集中查看 OAuth 配額與剩餘情況`,refresh_files:`重新整理驗證檔案`,refresh_files_and_quota:`重新整理驗證檔案&配額`,refresh_all_credentials:`重新整理全部憑證`,card_idle_hint:`請使用頂部「重新整理全部憑證」按鈕取得最新配額。`},plugin_management:{title:`插件管理`,description:`查看已發現和已註冊的插件,管理實例開關、設定欄位和資源入口。`,refresh:`重新整理`,load_failed:`載入插件失敗`,config_load_failed:`讀取插件設定失敗`,config_not_found:`無法讀取插件設定,後端未找到該插件。`,unsupported_backend:`目前後端未暴露插件管理 API。請使用包含插件管理介面的新版後端建置,並重新啟動服務。`,global_status:`全域狀態`,global_enabled:`已啟用`,global_disabled:`已停用`,global_disabled_hint:`目前 plugins.enabled 為 false,插件實例即使啟用也不會生效。`,plugins_dir:`插件目錄`,discovered:`發現插件`,effective:`生效插件`,search_placeholder:`搜尋插件 ID、名稱、作者或資源...`,search_label:`搜尋插件`,no_plugins:`暫無插件`,no_plugins_desc:`未從插件目錄或執行時註冊表中發現插件。`,configured:`已設定`,not_configured:`未設定`,registered:`已註冊`,not_registered:`未註冊`,oauth:`OAuth`,status_effective:`生效中`,status_inactive:`未生效`,version_label:`版本`,author_label:`作者`,path_label:`路徑`,edit_config:`編輯設定`,open_resource:`開啟資源`,open_repository:`開啟倉庫`,config_title:`設定 {{name}}`,base_settings:`基礎設定`,enabled:`啟用`,enabled_hint:`控制 plugins.configs 中該插件實例的 enabled 欄位。`,priority:`優先級`,config_fields:`設定欄位`,no_config_fields:`該插件沒有宣告可視化設定欄位。`,select_placeholder:`請選擇`,array_item_placeholder:`輸入陣列項目`,add_array_item:`新增陣列項目`,remove_array_item:`刪除陣列項目`,delete_plugin:`刪除`,delete_confirm_title:`刪除插件`,delete_confirm_message:`確定刪除 {{name}}({{id}})嗎?這會移除本機插件檔案和已儲存設定。`,delete_success:`插件已刪除`,delete_failed:`插件刪除失敗`,delete_restart_required:`已載入的插件需要重新啟動後端後才能移除。`,toggle_success:`插件狀態已更新`,toggle_failed:`插件狀態更新失敗`,runtime_pending:`插件變更已儲存,但執行時狀態仍在更新中。請稍後重新整理或檢查後端日誌。`,save_success:`插件設定已儲存`,save_failed:`插件設定儲存失敗`,validation_failed:`請先修復插件設定表單錯誤`,invalid_priority:`請輸入整數優先級`,invalid_number:`請輸入有效數字`,invalid_integer:`請輸入有效整數`,invalid_json:`請輸入有效 JSON`,expected_array:`請輸入 JSON 陣列`,expected_object:`請輸入 JSON 物件`,invalid_enum:`請選擇宣告的枚舉值`},plugin_store:{title:`插件商店`,description:`瀏覽插件註冊表,為目前後端安裝或更新插件。`,description_show_more:`展開描述`,description_show_less:`收起描述`,source_name:`來源:{{source}}`,cli_proxy_api_source:`CLIProxyAPI來源`,refresh:`重新整理`,retry:`重試`,load_failed:`插件商店載入失敗`,unsupported_backend:`目前後端未提供插件商店 API。請使用包含插件商店介面的新後端建置,並重新啟動服務。`,registry_failed:`插件註冊表請求失敗`,global_status:`全域狀態`,global_enabled:`已啟用`,global_disabled:`已停用`,global_disabled_hint:`目前 plugins.enabled 為 false,已安裝的插件不會生效。`,plugins_dir:`插件目錄`,stat_available:`可用插件`,search_placeholder:`搜尋插件 ID、名稱、作者或標籤...`,search_label:`搜尋插件商店`,filter_label:`依安裝狀態篩選`,filter_all:`全部`,filter_installed:`已安裝`,filter_not_installed:`未安裝`,filter_updates:`可更新`,badge_installed:`已安裝`,badge_update:`可更新`,badge_effective:`生效中`,version_arrow:`v{{from}} → v{{to}}`,install:`安裝`,update:`更新`,manage:`管理`,install_confirm_title:`安裝插件`,install_confirm_message:`將從插件註冊表下載 {{target}} 並安裝到本機插件目錄,是否繼續?`,update_confirm_title:`更新插件`,update_confirm_message:`將下載並安裝 {{target}} 的最新版本,是否繼續?`,install_success:`插件安裝成功`,update_success:`插件更新成功`,install_failed:`插件安裝失敗`,update_failed:`插件更新失敗`,status_pending:`插件檔案已更新,但本機狀態尚未重新整理。請稍後重新整理或檢查後端日誌。`,registration_pending:`插件檔案已更新,但註冊仍在進行中。請稍後重新整理或檢查後端日誌。`,restart_required_notice:`需要重新啟動服務才能載入新的插件版本`,restart_required_banner:`以下插件需重新啟動服務後才能套用新版本:{{plugins}}`,open_repository:`開啟儲存庫`,open_homepage:`開啟首頁`,no_plugins:`註冊表為空`,no_plugins_desc:`插件註冊表未回傳任何插件。`,no_matches:`沒有符合的插件`,no_matches_desc:`目前搜尋或篩選條件下沒有插件。`,clear_filters:`清除篩選`,security_banner_title:`第三方插件以後端完整權限執行`,security_banner_text:`插件會在代理服務內部執行程式碼,可讀取你的憑證與流量。請僅安裝你信任的插件——尤其要警惕任何並非由官方組織 router-for-me 發布的插件。`,badge_untrusted:`第三方`,gate_title:`安裝 {{name}}`,gate_title_update:`更新 {{name}}`,gate_warning:`如果你不閱讀以下內容,可能會發生意料之外的危險後果。`,gate_effect_runs_code:`該插件將在您的代理後端內執行第三方未認證程式碼。系統無法對其行為進行隔離或稽核,其具備存取您的敏感憑證、網路請求與回應資料的潛在權限。`,gate_effect_no_review:`本插件並非由官方組織 router-for-me 發布或審核。官方不對該插件的穩定性、安全性、合規性以及後續版本的任意行為變更承擔任何明示或暗示的擔保責任。`,gate_effect_restart:`安裝會修改本機插件目錄,並可能需要重新啟動服務才能生效。`,gate_untrusted_alert:`該插件並非來自官方組織 router-for-me。請僅在你完全信任其作者與來源時繼續。`,gate_repository_label:`儲存庫`,gate_source_label:`來源`,gate_step1_action:`我要安裝此插件`,gate_step2_action:`我已閱讀並理解上述風險`,gate_step3_prompt:`如需確認,請在下方輸入框中鍵入 “{{token}}”`,gate_step3_action:`安裝此插件`,gate_step3_hint:`請輸入上方顯示的完整識別碼以啟用安裝。`},plugin_resource:{title:`插件頁面`,page_count:`{{count}} 個頁面`,load_failed:`載入插件頁面失敗`,unavailable:`插件頁面不可用`,not_found:`找不到插件頁面`,not_found_desc:`目前後端插件清單未宣告此插件頁面。`,empty_src:`插件頁面位址為空`,empty_src_desc:`此插件選單未提供可嵌入的頁面位址。`},system_info:{title:`管理中心資訊`,about_title:`CLI Proxy API Management Center`,connection_status_title:`連線狀態`,api_status_label:`API 狀態:`,config_status_label:`設定狀態:`,last_update_label:`最後更新:`,cache_data:`快取資料`,real_time_data:`即時資料`,not_loaded:`未載入`,seconds_ago:`秒前`,models_title:`可用模型清單`,models_desc:`展示 /models 回傳的模型,並自動使用伺服器儲存的 API Key 進行驗證。`,models_loading:`正在載入可用模型...`,models_empty:`未從 /models 取得到模型資料`,models_error:`取得模型清單失敗`,models_count:`可用模型 {{count}} 個`,version_check_title:`版本檢查`,version_check_desc:`呼叫 /latest-version 介面比對伺服器版本,提示是否有可用更新。`,version_current_label:`目前版本`,version_latest_label:`最新版本`,version_check_button:`檢查更新`,version_check_idle:`點擊檢查更新`,version_checking:`正在檢查最新版本...`,version_update_available:`有新版本可用:{{version}}`,version_is_latest:`目前已是最新版本`,version_check_error:`檢查更新失敗`,version_current_missing:`未取得到伺服器版本號,暫無法比對`,version_unknown:`未知`,quick_links_title:`快速連結`,quick_links_desc:`存取專案儲存庫和文件,取得協助和更新。`,link_main_repo:`主程式儲存庫`,link_main_repo_desc:`CLI Proxy API 核心程式原始碼`,link_webui_repo:`WebUI 儲存庫`,link_webui_repo_desc:`管理中心前端介面原始碼`,link_docs:`使用教學`,link_docs_desc:`設定指南和使用說明`,clear_login_title:`本地登入資訊`,clear_login_desc:`清理本地儲存的登入資訊並登出。`,clear_login_button:`清理登入資訊`,clear_login_confirm:`確認清理本地登入資訊並登出?`},notification:{debug_updated:`除錯設定已更新`,proxy_updated:`代理設定已更新`,proxy_cleared:`代理設定已清空`,retry_updated:`重試設定已更新`,quota_switch_project_updated:`專案切換設定已更新`,quota_switch_preview_updated:`預覽模型切換設定已更新`,logging_to_file_updated:`記錄設定已更新`,logs_max_total_size_updated:`記錄容量設定已更新`,request_log_updated:`請求記錄設定已更新`,force_model_prefix_updated:`模型前綴設定已更新`,ws_auth_updated:`WebSocket 驗證設定已更新`,routing_strategy_updated:`路由策略已更新`,login_storage_cleared:`本地登入資訊已清理`,api_key_added:`API 金鑰新增成功`,api_key_updated:`API 金鑰更新成功`,api_key_deleted:`API 金鑰刪除成功`,api_key_invalid_chars:`API 金鑰僅支援英文字母、數字和符號`,gemini_key_added:`Gemini 金鑰新增成功`,gemini_key_updated:`Gemini 金鑰更新成功`,gemini_key_deleted:`Gemini 金鑰刪除成功`,gemini_multi_input_required:`請先輸入至少一個 Gemini 金鑰`,gemini_multi_failed:`Gemini 金鑰批次新增失敗`,gemini_multi_summary:`Gemini 批次新增完成:成功 {{success}},跳過 {{skipped}},失敗 {{failed}}`,codex_config_added:`Codex 設定新增成功`,codex_config_updated:`Codex 設定更新成功`,codex_config_deleted:`Codex 設定刪除成功`,codex_base_url_required:`請填寫 Codex Base URL`,claude_config_added:`Claude 設定新增成功`,claude_config_updated:`Claude 設定更新成功`,claude_config_deleted:`Claude 設定刪除成功`,vertex_config_added:`Vertex 設定新增成功`,vertex_config_updated:`Vertex 設定更新成功`,vertex_config_deleted:`Vertex 設定刪除成功`,config_enabled:`設定已啟用`,config_disabled:`設定已停用`,field_required:`必填欄位不能為空`,openai_provider_required:`請填寫供應商名稱和 Base URL`,openai_provider_added:`OpenAI 供應商新增成功`,openai_provider_updated:`OpenAI 供應商更新成功`,openai_provider_deleted:`OpenAI 供應商刪除成功`,openai_model_name_required:`請填寫模型名稱`,openai_test_url_required:`請先填寫有效的 Base URL 以進行測試`,openai_test_key_required:`請至少填寫一個 API 金鑰以進行測試`,openai_test_model_required:`請選擇要測試的模型`,data_refreshed:`資料重新整理成功`,connection_required:`請先建立連線`,refresh_failed:`重新整理失敗`,update_failed:`更新失敗`,add_failed:`新增失敗`,delete_failed:`刪除失敗`,upload_failed:`上傳失敗`,download_failed:`下載失敗`,login_failed:`登入失敗`,please_enter:`請輸入`,please_fill:`請填寫`,provider_name_url:`供應商名稱和 Base URL`,api_key:`API 金鑰`,gemini_api_key:`Gemini API 金鑰`,codex_api_key:`Codex API 金鑰`,claude_api_key:`Claude API 金鑰`,commercial_mode_restart_required:`商業模式開關已變更,請重啟服務後生效`,copy_failed:`複製失敗`,link_copied:`已複製`},language:{switch:`語言`,chinese:`簡體中文`,chinese_tw:`繁體中文(台灣)`,english:`英文`,russian:`俄文`},theme:{switch:`主題`,light:`羊毛紙`,white:`純白`,dark:`深色`,switch_to_light:`切換到羊毛紙模式`,switch_to_dark:`切換到深色模式`,auto:`跟隨系統`},sidebar:{toggle_expand:`展開側邊欄`,toggle_collapse:`收起側邊欄`},footer:{api_version:`CLI Proxy API 版本`,build_date:`建置時間`,version:`管理中心版本`,author:`作者`},providersPage:{header:{title:`AI 提供商`,activeResources:`{{active}}/{{total}} 個活躍資源`,providerFamilies:`{{count}} 個提供商家族`,updatedAt:`更新於 {{time}}`,issueCount:`{{count}} 個問題`},actions:{refresh:`重新整理`,syncing:`同步中`,new:`新增`,edit:`編輯`,view:`檢視`,delete:`刪除`,clear:`清空`,cancel:`取消`,save:`儲存`,create:`建立`,enable:`啟用`,disable:`停用`},categories:{title:`提供商`,activeCount:`{{active}}/{{total}} 活躍`},providerNames:{gemini:`Gemini`,codex:`Codex`,claude:`Claude`,vertex:`Vertex`,openaiCompatibility:`OpenAI 相容`},table:{key:`金鑰`,baseUrl:`服務位址`,prefix:`前綴`,models:`模型/請求標頭`,status:`狀態`,actions:`操作`,metrics:{models:`模型`,keys:`金鑰`,headers:`請求標頭`},websocketsTag:`WebSockets`,cloakTag:`Cloak`,empty:`尚未新增設定,點擊右上角新增。`,filterPlaceholder:`搜尋金鑰、位址、前綴…`,description:`在 {{route}} 下管理資源`,providerIssue:`此提供商存在問題`},status:{active:`活躍`,disabled:`已停用`,notSet:`未設定`,none:`無`,notConfigured:`未設定`,defaultSuffix:`(預設)`},detail:{title:`詳情`,metadataTitle:`元資料`,fields:{identifier:`識別碼`,baseUrl:`服務位址`,proxyUrl:`代理 URL`,prefix:`前綴`,models:`模型數`,headers:`請求標頭數`,authIndex:`Auth Index`,excludedModels:`排除模型數`,apiKeyEntries:`金鑰條目數`}},form:{createEyebrow:`新增`,editEyebrow:`編輯`,name:`名稱`,apiKey:`API 金鑰`,apiKeyCreatePlaceholder:`輸入 API 金鑰`,apiKeyEditPlaceholder:`留空表示不修改`,baseUrl:`服務位址`,baseUrlRequiredHint:`此提供商需要填寫服務位址`,proxyUrl:`代理 URL`,prefix:`前綴`,priority:`優先級`,disabled:`停用此條目`,disabledHint:`停用後不會被閘道使用`,websockets:`啟用 WebSockets`,testModel:`測試模型`,testModelClaudeHint:`僅用於連通性測試,不會被儲存`,testModelAutoWith:`自動 · {{name}}`,testModelAutoEmpty:`自動(尚未新增模型)`,testModelCustom:`{{name}}(自訂)`,modelsSection:`自訂模型`,addModel:`新增模型`,headersSection:`請求標頭`,addHeader:`新增請求標頭`,headers:`請求標頭`,headersHint:`每行一條,格式 Key: Value`,excludedSection:`排除模型`,excludedHint:`每行一個模型名稱,匹配後將不會被路由到此提供商`,cloakSection:`Cloak 設定`,cloakMode:`模式`,cloakStrict:`嚴格模式`,cloakSensitiveWords:`敏感詞(每行一個)`,apiKeyEntriesSection:`API 金鑰條目`,apiKeyEntry:`金鑰 #{{index}}`,addApiKeyEntry:`新增金鑰條目`,showApiKey:`顯示金鑰`,hideApiKey:`隱藏金鑰`,disableCooling:`停用冷卻調度`,disableCoolingHint:`僅對目前憑證或提供商停用失敗後的冷卻視窗`,modelEntry:`模型 #{{index}}`,modelImage:`允許圖片端點`,modelImageHint:`允許該模型用於 /v1/images/generations 和 /v1/images/edits`,thinkingConfig:`Thinking 設定(JSON)`,thinkingConfigHint:`可設定 levels、min、max、zero_allowed、dynamic_allowed`,cloakCacheUserId:`快取 user_id`,cloakCacheUserIdHint:`按 API key 複用 Claude cloak 產生的 user_id`,experimentalCchSigning:`實驗性 CCH 簽名`,experimentalCchSigningHint:`對 cloaked Claude /v1/messages 最終請求體啟用 CCH 簽名`,validation:{nameRequired:`名稱必填`,apiKeyRequired:`至少填寫一個 API 金鑰`,baseUrlRequired:`服務位址必填`}},delete:{title:`刪除資源`,confirm:`確定要刪除 {{name}} 嗎?此操作不可復原。`},toast:{created:`建立成功`,updated:`更新成功`,deleted:`刪除成功`,enabled:`已啟用`,disabled:`已停用`,toggleFailed:`更新狀態失敗`},unsavedChanges:{title:`確定捨棄未儲存的變更嗎?`,message:`目前表單還有尚未儲存的變更,關閉後會遺失。`,discard:`捨棄變更`,keepEditing:`繼續編輯`},connectivity:{test:`測試`,testAll:`全部測試`,success:`連通`,baseUrlRequired:`服務位址必填`,endpointInvalid:`服務位址不合法`,apiKeyRequired:`API 金鑰必填`,modelRequired:`測試模型必填`,timeout:`請求超過 {{seconds}} 秒`,requestFailed:`請求失敗`},discovery:{openButton:`從端點拉取`,searchPlaceholder:`搜尋模型`,reload:`重新載入`,loading:`正在載入模型…`,empty:`端點未回傳任何模型`,notLoaded:`點擊重新載入以取得模型`,selectAll:`全選`,clearAll:`清空選擇`,selectedCount:`{{selected}} / {{total}}`,alreadyAdded:`已新增`,close:`關閉`,apply:`套用 ({{count}})`},toolbar:{sortBy:`排序`,sort:{name:`名稱`,priority:`優先級`,recentSuccess:`近期成功數`,directionAsc:`升序`,directionDesc:`降序`},filter:{allModels:`全部模型`,selectedModels:`{{selected}}/{{total}} 個模型`,selectAll:`全選`,clear:`清空`,empty:`尚無已設定模型`}},modelCatalog:{notLoaded:`未載入`}}},qc={common:{login:`Login`,logout:`Logout`,back:`Back`,cancel:`Cancel`,confirm:`Confirm`,leave:`Leave`,stay:`Stay`,save:`Save`,delete:`Delete`,edit:`Edit`,add:`Add`,update:`Update`,refresh:`Refresh`,close:`Close`,success:`Success`,error:`Error`,info:`Info`,warning:`Warning`,loading:`Loading...`,connecting:`Connecting...`,connected:`Connected`,disconnected:`Disconnected`,connecting_status:`Connecting`,connected_status:`Connected`,disconnected_status:`Disconnected`,yes:`Yes`,no:`No`,not_set:`Not set`,optional:`Optional`,required:`Required`,api_key:`Key`,base_url:`Address`,prefix:`Prefix`,proxy_url:`Proxy`,priority:`Priority`,alias:`Alias`,failure:`Failure`,unknown_error:`Unknown error`,quota_update_required:`Please update the CPA version or check for updates`,quota_check_credential:`Please check the credential status`,copy:`Copy`,expand:`Expand`,collapse:`Collapse`,status:`Status`,action:`Action`,custom_headers_label:`Custom Headers`,custom_headers_hint:`Optional HTTP headers to send with the request. Leave blank to remove.`,custom_headers_add:`Add Header`,custom_headers_key_placeholder:`Header name, e.g. X-Custom-Header`,custom_headers_value_placeholder:`Header value`,model_name_placeholder:`Model name, e.g. claude-3-5-sonnet-20241022`,model_alias_placeholder:`Model alias (optional)`,invalid_provider_index:`Invalid provider index.`,unsaved_changes_title:`Unsaved changes`,unsaved_changes_message:`You have unsaved changes. Leaving now will discard them. Do you want to leave?`},title:{main:`CLI Proxy API Management Center`,login:`CLI Proxy API Management Center`,abbr:`CPAMC`},splash:{title:`CLI Proxy API`,subtitle:`Management Center`},auto_login:{title:`Auto Login in Progress...`,message:`Attempting to connect to server using locally saved connection information`},login:{subtitle:`Please enter connection information to access the management interface`,connection_title:`Connection Address`,connection_current:`Current URL`,connection_auto_hint:`The system will automatically use the current URL for connection`,custom_connection_label:`Custom Connection URL:`,custom_connection_placeholder:`Eg: https://example.com:8317`,custom_connection_hint:`By default the current URL is used. Override it here if needed.`,use_current_address:`Use Current URL`,remember_password_label:`Remember password`,management_key_label:`Management Key:`,management_key_placeholder:`Enter the management key`,connect_button:`Connect`,submit_button:`Login`,submitting:`Connecting...`,error_title:`Login Failed`,error_backend_detail:`Backend response`,error_required:`Please fill in complete connection information`,error_invalid:`Connection failed, please check the server address, Management API, and management key`,error_network:`Network connection failed, please check your network or server address`,error_timeout:`Connection timed out, server not responding`,error_unauthorized:`Authentication failed, management key is missing or invalid`,error_forbidden:`Access denied, remote management is disabled, the management key is not configured, or this IP is temporarily banned`,error_not_found:`Management API not found, confirm the server address points to the CLIProxyAPI backend`,error_server:`Backend failed while handling the management request, check the server logs`,error_cors:`Cross-origin request blocked, please check server configuration`,error_ssl:`SSL/TLS certificate verification failed`},header:{check_connection:`Check Connection`,refresh_all:`Refresh All`,logout:`Logout`},connection:{title:`Connection Information`,server_address:`Server Address:`,management_key:`Management Key:`,status:`Connection Status:`},nav:{dashboard:`Dashboard`,basic_settings:`Basic Settings`,api_keys:`API Keys`,ai_providers:`AI Providers`,auth_files:`Auth Files`,oauth:`OAuth Login`,quota_management:`Quota Management`,plugins:`Plugins`,plugin_store:`Plugin Store`,config_management:`Config Panel`,logs:`Logs Viewer`,system_info:`Management Center Info`},nav_groups:{operate:`Operate`,gateway:`Gateway`,observe:`Observe`,plugin_pages:`Plugins`,control:`Control`},nav_meta:{dashboard:`Operations overview`,ai_providers:`Upstream model routing`,auth_files:`Auth files & credentials`,oauth:`OAuth authorization`,quota_management:`API keys & limits`,plugins:`Plugin toggles & config`,plugin_store:`Discover & install plugins`,logs:`Request tracing`,config_management:`Gateway configuration`,system_info:`Runtime & diagnostics`},dashboard:{title:`Dashboard`,subtitle:`Welcome to CLI Proxy API Management Center`,openai_providers:`OpenAI Providers`,quick_actions:`Quick Actions`,current_config:`Current Configuration`,management_keys:`Management Keys`,provider_keys_detail:`G:{{gemini}} C:{{codex}} Cl:{{claude}} V:{{vertex}} O:{{openai}}`,oauth_credentials:`OAuth Credentials`,edit_settings:`Edit Settings`,routing_strategy:`Routing Strategy`,available_models:`Available Models`,available_models_desc:`Total models from all providers`,welcome_back:`Welcome Back`,greeting_morning:`Good Morning`,greeting_afternoon:`Good Afternoon`,greeting_evening:`Good Evening`,greeting_night:`Good Night`,caring_morning:`A fresh start — let's make today count.`,caring_afternoon:`Steady progress — you're doing great.`,caring_evening:`Wrapping up nicely — almost there.`,caring_night:`Burning the midnight oil? Don't forget to rest.`,system_overview:`System Overview`},basic_settings:{title:`Basic Settings`,debug_title:`Debug Mode`,debug_enable:`Enable Debug Mode`,proxy_title:`Proxy Settings`,proxy_url_label:`Proxy URL:`,proxy_url_placeholder:`e.g.: socks5://user:pass@127.0.0.1:1080/`,proxy_update:`Update`,proxy_clear:`Clear`,retry_title:`Request Retry`,retry_count_label:`Retry Count:`,retry_update:`Update`,quota_title:`Quota Exceeded Behavior`,quota_switch_project:`Auto Switch Project`,quota_switch_preview:`Switch to Preview Model`,logging_title:`Logging`,logging_to_file_enable:`Enable logging to file`,logs_max_total_size_title:`Log Size Limit`,logs_max_total_size_label:`Total log size cap (MB):`,logs_max_total_size_hint:`Set to 0 to disable the limit.`,logs_max_total_size_update:`Update`,request_log_title:`Request Logging`,request_log_enable:`Enable request logging`,request_log_warning:`Keep this off unless you need detailed troubleshooting.`,force_model_prefix_enable:`Force model prefix`,ws_auth_title:`WebSocket Authentication`,ws_auth_enable:`Require auth for /ws/*`,routing_title:`Routing Strategy`,routing_strategy_label:`Routing strategy:`,routing_strategy_hint:`round-robin cycles through keys; fill-first prioritizes the first available key.`,routing_strategy_update:`Update`,routing_strategy_round_robin:`round-robin (cycle)`,routing_strategy_fill_first:`fill-first (prioritize)`},api_keys:{title:`API Keys Management`,proxy_auth_title:`Proxy Service Authentication Keys`,add_button:`Add Key`,empty_title:`No API Keys`,empty_desc:`Click the button above to add the first key`,item_title:`API Key`,add_modal_title:`Add API Key`,add_modal_key_label:`API Key:`,add_modal_key_placeholder:`Please enter API key`,edit_modal_title:`Edit API Key`,edit_modal_key_label:`API Key:`,delete_confirm:`Are you sure you want to delete this API key?`},auth_files:{title:`Auth Files Management`,title_section:`Auth Files`,description:`Manage all CLI Proxy JSON auth files here (e.g. Qwen, Gemini, Vertex). Uploading a credential immediately enables the corresponding AI integration.`,upload_button:`Upload File`,delete_all_button:`Delete All`,empty_title:`No Auth Files`,empty_desc:`Click the button above to upload the first file`,search_empty_title:`No matching files`,search_empty_desc:`Try changing the filters or clearing the search box.`,file_size:`Size`,file_modified:`Modified`,health_status_label:`Health`,health_status_healthy:`Healthy`,health_status_warning:`Warning`,health_status_disabled:`Disabled`,health_status_unknown:`Unknown`,health_status_no_message:`No status message`,last_refresh_label:`Last Refresh`,refresh_not_available:`N/A`,refresh_just_now:`Just now`,download_button:`Download`,delete_button:`Delete`,delete_confirm:`Are you sure you want to delete file`,delete_all_confirm:`Are you sure you want to delete all auth files? This operation cannot be undone!`,delete_filtered_confirm:`Are you sure you want to delete all {{type}} auth files? This operation cannot be undone!`,delete_problem_button:`Delete Problem Files`,delete_problem_button_with_type:`Delete Problematic {{type}} Files`,delete_problem_confirm:`Are you sure you want to delete all problematic auth files? This operation cannot be undone!`,delete_problem_filtered_confirm:`Are you sure you want to delete all problematic {{type}} auth files? This operation cannot be undone!`,delete_filtered_result_button:`Delete filtered results`,delete_filtered_result_confirm:`Are you sure you want to delete auth files in the current filtered results? This operation cannot be undone!`,upload_error_json:`Only JSON files are allowed`,upload_error_size:`File size cannot exceed {{maxSize}}`,upload_success:`File uploaded successfully`,download_success:`File downloaded successfully`,delete_success:`File deleted successfully`,delete_all_success:`Successfully deleted`,delete_filtered_success:`Deleted {{count}} {{type}} auth files successfully`,delete_filtered_partial:`{{type}} auth files deletion finished: {{success}} succeeded, {{failed}} failed`,delete_filtered_none:`No deletable auth files under the current filter ({{type}})`,delete_problem_success:`Deleted {{count}} problematic auth files successfully`,delete_problem_filtered_success:`Deleted {{count}} problematic {{type}} auth files successfully`,delete_problem_partial:`Problematic auth files deletion finished: {{success}} succeeded, {{failed}} failed`,delete_problem_filtered_partial:`Problematic {{type}} auth files deletion finished: {{success}} succeeded, {{failed}} failed`,delete_problem_none:`No deletable problematic auth files under the current filter`,delete_problem_filtered_none:`No deletable problematic {{type}} auth files under the current filter`,delete_filtered_result_success:`Deleted {{count}} auth files from the filtered results successfully`,delete_filtered_result_partial:`Filtered result deletion finished: {{success}} succeeded, {{failed}} failed`,delete_filtered_result_none:`No deletable auth files in the current filtered results`,files_count:`files`,pagination_prev:`Previous`,pagination_next:`Next`,pagination_info:`Page {{current}} / {{total}} · {{count}} files`,search_label:`Search configs`,search_placeholder:`Filter by name, type, or provider. Use * as a wildcard`,problem_filter_label:`Problem Filter`,problem_filter_only:`Only show problematic credentials`,disabled_filter_only:`Only show disabled credentials`,display_options_label:`Display options`,compact_mode_label:`Compact mode`,sort_label:`Sort`,sort_default:`Default`,sort_az:`A-Z Name`,sort_priority:`Priority`,priority_display:`Priority`,page_size_label:`Per page`,page_size_unit:`items`,view_mode_paged:`Paged`,view_mode_all:`Show all`,too_many_files_warning:`Too many credentials. Showing all may cause performance issues, please use paged view.`,filter_all:`All`,filter_qwen:`Qwen`,filter_gemini:`Gemini`,filter_kimi:`Kimi`,filter_aistudio:`AIStudio`,filter_claude:`Claude`,filter_codex:`Codex`,filter_antigravity:`Antigravity`,filter_xai:`xAI`,filter_iflow:`iFlow`,filter_vertex:`Vertex`,filter_empty:`Empty`,filter_unknown:`Other`,type_qwen:`Qwen`,type_gemini:`Gemini`,type_kimi:`Kimi`,type_aistudio:`AIStudio`,type_claude:`Claude`,type_codex:`Codex`,type_antigravity:`Antigravity`,type_xai:`xAI`,type_iflow:`iFlow`,type_vertex:`Vertex`,type_empty:`Empty`,type_unknown:`Other`,type_virtual:`Virtual auth file`,models_button:`Models`,models_title:`Supported models`,models_loading:`Loading model list...`,models_empty:`No available models for this credential`,models_empty_desc:`This credential may not be loaded by the server yet, or no models are bound to it.`,models_unsupported:`This feature is not supported in the current version`,models_unsupported_desc:`Please update CLI Proxy API to the latest version and try again`,models_excluded_badge:`Disabled`,models_excluded_hint:`This OAuth model is disabled`,status_toggle_label:`Enabled`,status_enabled_success:`"{{name}}" enabled`,status_disabled_success:`"{{name}}" disabled`,batch_status_success:`{{count}} files updated successfully`,batch_status_partial:`{{success}} updated, {{failed}} failed`,batch_delete_title:`Delete Selected Files`,batch_delete_confirm:`Are you sure you want to delete {{count}} files?`,batch_selected:`{{count}} selected`,batch_select_all:`Select All`,batch_select_page:`Select page`,batch_select_filtered:`Select filtered`,batch_invert_page:`Invert page`,batch_deselect:`Deselect`,batch_download:`Download selected`,batch_download_success:`Started downloading {{count}} files`,batch_download_partial:`Download finished: {{success}} succeeded, {{failed}} failed`,batch_enable:`Enable`,batch_disable:`Disable`,prefix_proxy_button:`Auth File Details / Edit`,auth_field_editor_title:`Auth File Details / Edit - {{name}}`,prefix_proxy_loading:`Loading auth file...`,prefix_proxy_info_label:`Auth file info (info)`,prefix_proxy_source_label:`Auth file JSON (preview)`,prefix_proxy_invalid_content_label:`Downloaded content (truncated)`,prefix_label:`Prefix (prefix)`,proxy_url_label:`Proxy URL (proxy_url)`,prefix_placeholder:``,proxy_url_placeholder:`socks5://username:password@proxy_ip:port/`,priority_label:`Priority (priority)`,priority_placeholder:`e.g. 10 or -1`,priority_hint:`Integers only. Invalid values are ignored. Larger value means higher priority.`,codex_websockets_label:`WebSockets (websockets)`,codex_websockets_hint:`Enable Responses API websocket transport for this Codex credential.`,excluded_models_label:`Excluded models (excluded_models)`,excluded_models_placeholder:`Comma or newline separated, e.g. model-a, gpt-5-*, *-preview`,excluded_models_hint:`Saved as an array and normalized by trim/lowercase/dedup/sort.`,disable_cooling_label:`Disable cooling (disable_cooling)`,disable_cooling_placeholder:`e.g. true / false / 1 / 0`,disable_cooling_hint:`Supports booleans, numeric 0/non-0, and strings like true/false/1/0; unparseable values are ignored.`,note_label:`Note`,note_placeholder:`Enter a note, e.g.: John's account`,note_hint:`Optional. Used to describe the purpose or owner of this credential; leave empty to omit.`,note_display:`Note`,headers_label:`Custom Headers (headers)`,headers_placeholder:`{
|
||
"Header-Name": "value"
|
||
}`,headers_hint:`Enter custom HTTP headers as a JSON object, e.g., {"X-My-Header": "value"}`,headers_invalid_json:`Custom headers must be valid JSON.`,headers_invalid_object:`Custom headers must be a JSON object.`,headers_invalid_value:`Each custom header value must be a string.`,prefix_proxy_invalid_json:`This auth file is not a JSON object, so fields cannot be edited.`,prefix_proxy_html_challenge:`Downloaded content is an HTML challenge page, not an auth JSON object. Re-authenticate or replace this auth file before editing fields.`,prefix_proxy_saved_success:`Updated auth file "{{name}}" successfully`,quota_refresh_single:`Refresh quota`,quota_refresh_hint:`Refresh quota only for this credential`,quota_refresh_success:`Quota refreshed for "{{name}}"`,quota_refresh_failed:`Failed to refresh quota for "{{name}}": {{message}}`},antigravity_subscription:{subscription_label:`Subscription`,plan_badge:`Plan {{plan}}`,loading_short:`Plan...`,error_badge:`Plan error`,load_failed:`Subscription check failed: {{message}}`,missing_auth_index:`Auth file missing auth_index`,empty_data:`No subscription data available`,plan_unknown:`Unknown`,plan_free:`Free`,plan_pro:`Pro`,plan_ultra:`Ultra`,plan_ultra_lite:`Ultra Lite`},antigravity_quota:{title:`Antigravity Quota`,empty_title:`No Antigravity Auth Files`,empty_desc:`Upload an Antigravity credential to view remaining quota.`,idle:`Click here to refresh quota`,loading:`Loading quota...`,load_failed:`Failed to load quota: {{message}}`,missing_auth_index:`Auth file missing auth_index`,missing_project_id:`Antigravity credential missing project_id. Re-login or refresh the credential to discover the project.`,empty_models:`No quota data available`,plan_label:`Plan`,group_gemini_models:`Gemini models`,group_claude_gpt_models:`Claude and GPT models`,group_models_description:`Models in this group: {{models}}`,weekly_limit:`Weekly limit`,daily_limit:`Daily limit`,five_hour_limit:`5-hour limit`,monthly_limit:`Monthly limit`,quota_available:`Quota available`,remaining_percent:`{{percent}}% remaining`,refreshes_in:`Refreshes in {{duration}}`,refresh_available:`Refresh available`,duration_day_hour:`{{days}}d {{hours}}h`,duration_hour_minute:`{{hours}}h {{minutes}}m`,duration_minute:`{{minutes}}m`,duration_less_than_minute:`<1m`,refresh_button:`Refresh Quota`,fetch_all:`Fetch All`},claude_quota:{title:`Claude Quota`,empty_title:`No Claude OAuth Files`,empty_desc:`Log in with Claude OAuth to view quota.`,idle:`Click here to refresh quota`,loading:`Loading quota...`,load_failed:`Failed to load quota: {{message}}`,missing_auth_index:`Auth file missing auth_index`,empty_windows:`No quota data available`,refresh_button:`Refresh Quota`,fetch_all:`Fetch All`,five_hour:`5-hour limit`,seven_day:`7-day limit`,seven_day_oauth_apps:`7-day OAuth apps`,seven_day_opus:`7-day Opus`,seven_day_sonnet:`7-day Sonnet`,seven_day_cowork:`7-day Cowork`,iguana_necktie:`Iguana Necktie`,extra_usage_label:`Extra Usage`,plan_label:`Plan`,plan_unknown:`Unknown`,plan_free:`Free`,plan_pro:`Pro`,plan_max:`Max`,plan_max5:`Max 5x`,plan_max20:`Max 20x`,plan_team:`Team`},codex_quota:{title:`Codex Quota`,empty_title:`No Codex Auth Files`,empty_desc:`Upload a Codex credential to view quota.`,idle:`Click here to refresh quota`,loading:`Loading quota...`,load_failed:`Failed to load quota: {{message}}`,missing_auth_index:`Auth file missing auth_index`,missing_account_id:`Codex credential missing ChatGPT account ID`,empty_windows:`No quota data available`,no_access:`This credential has no Codex access (plan: free).`,refresh_button:`Refresh Quota`,fetch_all:`Fetch All`,primary_window:`5-hour limit`,secondary_window:`Weekly limit`,team_secondary_window:`Monthly limit`,code_review_primary_window:`Code review 5-hour limit`,code_review_secondary_window:`Code review weekly limit`,code_review_team_secondary_window:`Code review monthly limit`,additional_primary_window:`{{name}} 5-hour limit`,additional_secondary_window:`{{name}} weekly limit`,additional_team_secondary_window:`{{name}} monthly limit`,plan_label:`Plan`,expires_label:`Renewal time`,reset_credits_label:`Manual resets`,reset_button:`Reset quota`,reset_confirm_title:`Reset Codex quota`,reset_confirm_message:`This will consume 1 manual reset to reset the Codex quota for "{{name}}". Continue?`,reset_confirm_button:`Reset quota`,reset_success:`Reset Codex quota for "{{name}}"`,reset_failed:`Failed to reset Codex quota for "{{name}}": {{message}}`,plan_plus:`Plus`,plan_team:`Team`,plan_free:`Free`,plan_pro:`Pro 20x`,plan_prolite:`Pro 5x`},kimi_quota:{title:`Kimi Quota`,empty_title:`No Kimi Auth Files`,empty_desc:`Upload a Kimi credential to view remaining quota.`,idle:`Click here to refresh quota`,loading:`Loading quota...`,load_failed:`Failed to load quota: {{message}}`,missing_auth_index:`Auth file missing auth_index`,empty_data:`No quota data available`,refresh_button:`Refresh Quota`,fetch_all:`Fetch All`,weekly_limit:`Weekly limit`,limit_window:`{{duration}} limit`,limit_index:`Limit #{{index}}`,reset_hint:`resets in {{hint}}`},xai_quota:{title:`Grok Quota`,empty_title:`No xAI/Grok Auth Files`,empty_desc:`Log in with xAI OAuth to view Grok quota.`,idle:`Click here to refresh quota`,loading:`Loading quota...`,load_failed:`Failed to load quota: {{message}}`,missing_auth_index:`Auth file missing auth_index`,empty_data:`No quota data available`,refresh_button:`Refresh Quota`,fetch_all:`Fetch All`,monthly_credits:`Monthly credits`,plan_label:`Plan`,plan_supergrok:`SuperGrok`,plan_supergrok_heavy:`SuperGrok Heavy`,pay_as_you_go_label:`Pay as you go`,pay_as_you_go_enabled:`Enabled, cap {{cap}}`,pay_as_you_go_disabled:`Disabled`},vertex_import:{title:`Vertex JSON Login`,description:`Upload a Google service account JSON to store it as auth-dir/vertex-<project>.json using the same rules as the CLI vertex-import helper.`,location_label:`Region (optional)`,location_placeholder:`us-central1`,location_hint:`Leave empty to use the default region us-central1.`,file_label:`Service account key JSON`,file_hint:`Only Google Cloud service account key JSON files are accepted.`,file_placeholder:`No file selected`,choose_file:`Choose File`,import_button:`Import Vertex Credential`,file_required:`Select a .json credential file first`,success:`Vertex credential imported successfully`,result_title:`Credential saved`,result_project:`Project ID`,result_email:`Service account`,result_location:`Region`,result_file:`Persisted file`},oauth_excluded:{title:`OAuth Model Disablement`,description:`Per-provider model disablement is shown as cards; click a card to edit or delete. Wildcards * are supported and the scope follows the auth file filter.`,add:`Add Disablement`,add_title:`Add provider model disablement`,edit_title:`Edit model disablement for {{provider}}`,refresh:`Refresh`,refreshing:`Refreshing...`,provider_label:`Provider`,provider_auto:`Follow current filter`,provider_placeholder:`e.g. codex / openai`,provider_hint:`Defaults to the current filter; pick an existing provider or type a new name.`,models_label:`Models to disable`,models_loading:`Loading models...`,models_unsupported:`Current CPA version does not support fetching model lists.`,models_loaded:`{{count}} models loaded. Check the models to disable.`,no_models_available:`No models available for this provider.`,save:`Save/Update`,saving:`Saving...`,save_success:`Model disablement updated`,save_failed:`Failed to update model disablement`,delete:`Delete Provider`,delete_confirm:`Delete model disablement for {{provider}}?`,delete_success:`Provider model disablement removed`,delete_failed:`Failed to delete model disablement`,deleting:`Deleting...`,no_models:`No disabled models configured`,model_count:`{{count}} models disabled`,list_empty_all:`No provider model disablement yet; click “Add Disablement” to create one.`,list_empty_filtered:`No disabled items in this scope; click “Add Disablement” to add.`,disconnected:`Connect to the server to view model disablement`,load_failed:`Failed to load model disablement`,provider_required:`Please enter a provider first`,scope_all:`Scope: All providers`,scope_provider:`Scope: {{provider}}`,upgrade_required:`Current CPA version does not support OAuth model disablement. Please upgrade.`,upgrade_required_title:`Please upgrade CLI Proxy API`,upgrade_required_desc:`The current server version does not support fetching OAuth model disablement. Please upgrade to the latest CPA (CLI Proxy API) version and try again.`},oauth_model_alias:{title:`OAuth Model Aliases`,add:`Add Alias`,add_title:`Add provider model aliases`,provider_label:`Provider`,provider_placeholder:`e.g. codex / vertex`,provider_hint:`Defaults to the current filter; pick an existing provider or type a new name.`,model_source_loading:`Loading models...`,model_source_unsupported:`The current CPA version does not support fetching model lists (manual input still works).`,model_source_loaded:`{{count}} models loaded. Use the dropdown in 'Source model name', or type custom values. Saving an empty list removes that provider. Enable 'Keep original' to keep the original name while adding the alias.`,alias_label:`Model aliases`,alias_name_placeholder:`Source model name`,alias_placeholder:`Alias (required)`,duplicate_alias:`Each alias must be unique for this provider.`,alias_fork_label:`Keep original`,add_alias:`Add alias`,save:`Save/Update`,save_success:`Model aliases updated`,save_failed:`Failed to update model aliases`,delete:`Delete Provider`,delete_confirm:`Delete model aliases for {{provider}}?`,delete_link_title:`Unlink mapping`,delete_link_confirm:`Unlink mapping from <code>{{sourceModel}}</code> ({{provider}}) to alias <code>{{alias}}</code>?`,delete_alias_title:`Delete Alias`,delete_alias_confirm:`Delete alias <code>{{alias}}</code> and unmap all associated models?`,delete_success:`Model aliases removed`,delete_failed:`Failed to delete model aliases`,no_models:`No model aliases`,model_count:`{{count}} aliases`,list_empty_all:`No model aliases yet—use “Add Alias” to create one.`,chart_title:`All mappings overview`,diagram_providers:`Providers`,diagram_source_models:`Source Models`,diagram_aliases:`Aliases`,diagram_expand:`Expand`,diagram_collapse:`Collapse`,diagram_add_alias:`Add Alias`,diagram_rename:`Rename`,diagram_rename_alias_title:`Rename alias`,diagram_rename_alias_label:`New alias name`,diagram_rename_placeholder:`Enter alias name...`,diagram_delete_link:`Unlink from {{provider}} / {{name}}`,diagram_delete_alias:`Delete alias`,diagram_please_enter_alias:`Please enter an alias name.`,diagram_alias_exists:`This alias already exists.`,diagram_add_alias_title:`Add alias`,diagram_add_alias_label:`Alias name`,diagram_add_placeholder:`Enter new alias name...`,diagram_rename_btn:`Rename`,diagram_add_btn:`Add`,diagram_settings:`Settings`,diagram_settings_title:`Alias settings — {{alias}}`,diagram_settings_source_title:`Source model settings`,diagram_settings_empty:`No mappings for this alias yet.`,diagram_tap_hint:`On touch devices: tap a source model, then tap an alias to link.`,view_mode:`View mode`,view_mode_diagram:`Diagram`,view_mode_list:`List`,provider_required:`Please enter a provider first`,upgrade_required:`This feature requires a newer CLI Proxy API (CPA) version. Please upgrade.`,upgrade_required_title:`Please upgrade CLI Proxy API`,upgrade_required_desc:`The current server does not support the OAuth model aliases API. Please upgrade to the latest CLI Proxy API (CPA) version.`},auth_login:{codex_oauth_title:`Codex OAuth`,codex_oauth_button:`Start Codex Login`,codex_oauth_hint:`Login to Codex service through OAuth flow, automatically obtain and save authentication files.`,codex_oauth_url_label:`Authorization URL:`,codex_open_link:`Open Link`,codex_copy_link:`Copy Link`,codex_oauth_status_waiting:`Waiting for authentication...`,codex_oauth_status_success:`Authentication successful!`,codex_oauth_status_error:`Authentication failed:`,codex_oauth_start_error:`Failed to start Codex OAuth:`,codex_oauth_polling_error:`Failed to check authentication status:`,anthropic_oauth_title:`Anthropic OAuth`,anthropic_oauth_button:`Start Anthropic Login`,anthropic_oauth_hint:`Login to Anthropic (Claude) service through OAuth flow, automatically obtain and save authentication files.`,anthropic_oauth_url_label:`Authorization URL:`,anthropic_open_link:`Open Link`,anthropic_copy_link:`Copy Link`,anthropic_oauth_status_waiting:`Waiting for authentication...`,anthropic_oauth_status_success:`Authentication successful!`,anthropic_oauth_status_error:`Authentication failed:`,anthropic_oauth_start_error:`Failed to start Anthropic OAuth:`,anthropic_oauth_polling_error:`Failed to check authentication status:`,antigravity_oauth_title:`Antigravity OAuth`,antigravity_oauth_button:`Start Antigravity Login`,antigravity_oauth_hint:`Login to Antigravity service (Google account) through OAuth flow, automatically obtain and save authentication files.`,antigravity_oauth_url_label:`Authorization URL:`,antigravity_open_link:`Open Link`,antigravity_copy_link:`Copy Link`,antigravity_oauth_status_waiting:`Waiting for authentication...`,antigravity_oauth_status_success:`Authentication successful!`,antigravity_oauth_status_error:`Authentication failed:`,antigravity_oauth_start_error:`Failed to start Antigravity OAuth:`,antigravity_oauth_polling_error:`Failed to check authentication status:`,kimi_oauth_title:`Kimi OAuth`,kimi_oauth_button:`Start Kimi Login`,kimi_oauth_hint:`Login to Kimi service through OAuth device flow, automatically obtain and save authentication files.`,kimi_oauth_url_label:`Authorization URL:`,kimi_open_link:`Open Link`,kimi_copy_link:`Copy Link`,kimi_oauth_status_waiting:`Waiting for authentication...`,kimi_oauth_status_success:`Authentication successful!`,kimi_oauth_status_error:`Authentication failed:`,kimi_oauth_start_error:`Failed to start Kimi OAuth:`,kimi_oauth_polling_error:`Failed to check authentication status:`,xai_oauth_title:`xAI OAuth`,xai_oauth_button:`Start xAI Login`,xai_oauth_hint:`Login to xAI Grok through OAuth flow, automatically obtain and save authentication files.`,xai_oauth_url_label:`Authorization URL:`,xai_open_link:`Open Link`,xai_copy_link:`Copy Link`,xai_oauth_status_waiting:`Waiting for authentication...`,xai_oauth_status_success:`Authentication successful!`,xai_oauth_status_error:`Authentication failed:`,xai_oauth_start_error:`Failed to start xAI OAuth:`,xai_oauth_polling_error:`Failed to check authentication status:`,xai_callback_label:`Callback URL or code`,xai_callback_placeholder:`Paste the code shown by Grok, or the full callback URL`,xai_callback_hint:`Grok may only show a code on the page. Paste that code directly and the app will submit it as http://127.0.0.1:56121/callback?... automatically.`,xai_callback_required:`Please paste the code shown by Grok or the full callback URL first.`,xai_callback_state_missing:`Missing the state for this xAI login. Start xAI login again, then submit the code.`,oauth_callback_label:`Callback URL`,oauth_callback_placeholder:`http://localhost:1455/auth/callback?code=...&state=...`,oauth_callback_hint:`Remote browser mode: after the provider redirects to http://localhost:..., copy the full URL and submit it here.`,oauth_callback_button:`Submit Callback URL`,oauth_callback_required:`Please paste the full redirect URL first.`,oauth_callback_success:`Callback URL submitted. Continue waiting for authentication.`,oauth_callback_error:`Failed to submit callback URL:`,oauth_callback_upgrade_hint:`Please update CLI Proxy API or check the connection.`,oauth_callback_status_success:`Callback URL submitted, waiting for authentication...`,oauth_callback_status_error:`Callback URL submission failed:`,missing_state:`Unable to retrieve authentication state parameter`,login_another_account:`Log in another account`,view_auth_files:`View auth files`,iflow_oauth_title:`iFlow OAuth`,iflow_oauth_button:`Start iFlow Login`,iflow_oauth_hint:`Login to iFlow service through OAuth flow, automatically obtain and save authentication files.`,iflow_oauth_url_label:`Authorization URL:`,iflow_open_link:`Open Link`,iflow_copy_link:`Copy Link`,iflow_oauth_status_waiting:`Waiting for authentication...`,iflow_oauth_status_success:`Authentication successful!`,iflow_oauth_status_error:`Authentication failed:`,iflow_oauth_start_error:`Failed to start iFlow OAuth:`,iflow_oauth_polling_error:`Failed to check authentication status:`,remote_access_disabled:`This login method is not available for remote access. Please access from localhost.`},stats:{success:`Success`,failure:`Failure`},status_bar:{success_short:`✓`,failure_short:`✗`,no_requests:`No requests`},service_health:{title:`Service Health`,window:`Last 7 days`,oldest:`Oldest`,newest:`Latest`},logs:{title:`Logs Viewer`,runtime_unknown:`Current runtime: detecting`,runtime_cpa:`Current runtime: CPA`,runtime_home:`Current runtime: Home`,refresh_button:`Refresh Logs`,clear_button:`Clear Logs`,fullscreen_button:`Full Screen`,exit_fullscreen_button:`Exit Full Screen`,download_button:`Download Logs`,error_log_button:`Select Error Log`,error_logs_modal_title:`Error Request Logs`,error_logs_description:`Pick an error request log file to open or download (only generated when request logging is off).`,error_logs_home_unavailable:`In Home mode, use Log Content for database logs. Error request log files only apply to CPA file logs.`,error_logs_request_log_enabled:`Request logging is enabled, so this list will always be empty. Disable request logging and refresh to view error logs.`,error_logs_empty:`No error request log files found`,error_logs_load_error:`Failed to load error log list`,error_logs_size:`Size`,error_logs_modified:`Last modified`,error_logs_open:`Open`,error_logs_download:`Download`,error_log_view_title:`Error Request Log Details`,error_log_open_failed:`Failed to open error log`,error_log_empty_content:`This error log is empty`,error_log_copy_success:`Error log content copied`,error_log_download_success:`Error log downloaded successfully`,request_log_download_title:`Download Request Log`,request_log_download_confirm:`Download request log for ID {{id}}?`,request_log_download_success:`Request log downloaded successfully`,empty_title:`No Logs Available`,empty_desc:`When "Enable logging to file" is enabled, logs will be displayed here`,cpa_file_logging_required:`The connected runtime is CPA. Log viewing requires logging to file to be enabled first.`,cpa_file_logging_required_title:`File logging is required`,cpa_file_logging_required_desc:`CPA reads this log view from local log files. Enable logging-to-file in the config, then refresh.`,file_logging_required:`This logs endpoint requires logging to file before file logs can be read.`,file_logging_required_title:`File logging is required`,file_logging_required_desc:`This logs endpoint reads local log files. Enable logging-to-file in the config, then refresh.`,home_clear_unavailable:`Home logs come from database queries and cannot be cleared here.`,log_content:`Log Content`,loading:`Loading logs...`,load_error:`Failed to load logs`,clear_confirm:`Are you sure you want to clear all logs? This action cannot be undone!`,clear_success:`Logs cleared successfully`,download_success:`Logs downloaded successfully`,auto_refresh:`Auto Refresh`,auto_refresh_enabled:`Auto refresh enabled`,auto_refresh_disabled:`Auto refresh disabled`,load_more_hint:`Scroll up to load more`,hidden_lines:`Hidden: {{count}} lines`,loaded_lines:`Loaded: {{count}} lines`,filtered_lines:`Filtered: {{count}} lines`,hide_management_logs:`Hide {{prefix}} logs`,show_raw_logs:`Show Raw Logs`,show_raw_logs_hint:`Show original log text for easier multi-line copy`,search_placeholder:`Search logs by content or keyword`,filter_panel_title:`Structured Filters`,filter_panel_expand:`Expand structured filters`,filter_panel_collapse:`Collapse structured filters`,filter_panel_active_count:`{{count}} active`,filter_method:`Method`,filter_status:`Status`,filter_path:`Path`,filter_path_empty:`No path candidates`,filter_status_2xx:`2xx`,filter_status_3xx:`3xx`,filter_status_4xx:`4xx`,filter_status_5xx:`5xx`,clear_filters:`Clear Filters`,search_empty_title:`No matching logs found`,search_empty_desc:`Try a different keyword or clear the filters.`,double_click_copy_hint:`Double-click to copy raw log line`,copy_success:`Log copied to clipboard`,copy_failed:`Copy failed`,lines:`lines`,removed:`Filtered`,upgrade_required_title:`Please Upgrade CLI Proxy API`,upgrade_required_desc:`The current server version does not support the logs viewing feature. Please upgrade to the latest version of CLI Proxy API to use this feature.`},config_management:JSON.parse(`{"title":"Config Panel","editor_title":"Configuration File","reload":"Reload","reload_confirm_message":"Reloading will discard your unsaved changes. Do you want to continue?","save":"Save","description":"Edit config.yaml via visual editor or source file","status_idle":"Waiting for action","status_loading":"Loading configuration...","status_loading_short":"Loading","status_loaded":"Configuration loaded","status_loaded_short":"Loaded","status_dirty":"Unsaved changes","status_dirty_short":"Unsaved","status_disconnected":"Connect to the server to load the configuration","status_disconnected_short":"Disconnected","status_load_failed":"Load failed","status_load_failed_short":"Failed","status_saving":"Saving configuration...","status_saving_short":"Saving","status_saved":"Configuration saved","status_save_failed":"Save failed","save_success":"Configuration saved successfully","error_yaml_not_supported":"Server did not return YAML. Verify the /config.yaml endpoint is available.","visual_mode_unavailable":"Visual editor unavailable until YAML syntax is fixed","visual_mode_unavailable_short":"YAML issue","validation_blocked_short":"Fix errors","visual_mode_unavailable_detail":"Visual editor is unavailable because the configuration contains invalid YAML: {{message}}","visual_mode_save_blocked":"Cannot save from visual mode until the YAML syntax is fixed","visual_mode_latest_yaml_invalid":"The latest server configuration contains invalid YAML. Review it in source mode before saving visual changes: {{message}}","editor_placeholder":"key: value","search_placeholder":"Search config...","search_button":"Search","search_no_results":"No results","search_prev":"Previous","search_next":"Next","diff":{"title":"Review Changes","current":"Current","modified":"Modified","confirm":"Confirm Save","no_changes":"No changes detected"},"tabs":{"visual":"Visual Editor","source":"Source File Editor"},"visual":{"notice":"Visual mode covers common fields. Review or edit unsupported config.yaml entries in source mode.","quick_jump":"Quick Jump","mode":{"simple":"Simple","full":"Full","label":"Editor mode","more_settings":"Switch to full mode to see all {{total}} sections","validation_banner":"Some advanced settings have validation errors and are blocking save. Switch to full mode to fix them.","switch_to_full":"Switch to full mode"},"search":{"placeholder":"Search settings (label or YAML key)","no_results":"No matching settings"},"sections":{"connectivity":{"title":"Access & Authentication","description":"Server address, port, auth directory, and API keys"},"logging":{"title":"Logging & Diagnostics","description":"Debug, log output, and usage statistics"},"advanced":{"title":"Advanced & Experimental","description":"Header spoofing, signature cache, plugin sources, and other rarely changed settings","plugins_title":"Plugins","signature_title":"Antigravity Signature"},"server":{"title":"Server Configuration","description":"Basic server settings","host":"Host Address","port":"Port"},"tls":{"title":"TLS/SSL Configuration","description":"HTTPS secure connection settings","enable":"Enable TLS","enable_desc":"Enable HTTPS secure connection","cert":"Certificate File Path","key":"Private Key File Path"},"remote":{"title":"Remote Management","description":"Remote access and control panel settings","allow_remote":"Allow Remote Access","allow_remote_desc":"Allow management access from other hosts","disable_panel":"Disable Control Panel","disable_panel_desc":"Disable the built-in web control panel","disable_auto_update_panel":"Disable Panel Auto Updates","disable_auto_update_panel_desc":"Download the panel when first missing, but never auto-update it from GitHub","secret_key":"Management Key","secret_key_placeholder":"Set management key","panel_repo":"Panel Repository"},"auth":{"title":"Authentication Configuration","description":"API keys and authentication directory settings","auth_dir":"Auth Directory (auth-dir)","auth_dir_hint":"Directory path for authentication files (supports ~)"},"system":{"title":"System Configuration","description":"Debug, logging, statistics, and performance settings","debug":"Debug Mode","debug_desc":"Enable verbose debug logging","commercial_mode":"Commercial Mode","commercial_mode_desc":"Disable high-overhead middleware to support high concurrency","logging_to_file":"Log to File","logging_to_file_desc":"Save logs to files","plugins_enabled":"Enable Plugin System","plugins_enabled_desc":"Enable standard dynamic-library plugin loading; individual plugin instances are still managed on the Plugins page","plugin_store_sources":"Third-party Plugin Sources","plugin_store_sources_desc":"Append plugin-store registry sources; the built-in official source is always kept","plugin_store_sources_label":"Plugin source registry URL (plugins.store-sources)","plugin_store_sources_placeholder":"https://example.com/cliproxy-plugins/registry.json","plugin_store_sources_hint":"One registry.json URL per row. Empty rows are filtered on save","logs_max_size":"Log File Size Limit (MB)","error_logs_max_files":"Retained Error Log Files","usage_statistics_enabled":"Enable In-memory Usage Statistics","usage_statistics_enabled_desc":"Aggregate request usage statistics in memory","redis_usage_retention":"Redis Usage Queue Retention (seconds)","redis_usage_retention_hint":"In-memory retention for RESP LPOP/RPOP usage output, max 3600 seconds","antigravity_signature_cache":"Enable Antigravity Signature Cache","antigravity_signature_cache_desc":"Prefer and validate cached thinking-block signatures","antigravity_signature_strict":"Strict Bypass Signature Validation","antigravity_signature_strict_desc":"Only applies when the signature cache is disabled; validates the full Claude protobuf tree"},"headers":{"title":"Header Defaults","description":"Default headers for Claude and Codex OAuth requests when the client omits them","claude_title":"Claude Header Defaults","codex_title":"Codex Header Defaults","user_agent":"User-Agent","package_version":"Package Version","runtime_version":"Runtime Version","os":"OS","arch":"Arch","timeout":"Timeout","stabilize_device":"Stabilize Device Profile","stabilize_device_desc":"Pin OS/Arch and stabilize the software fingerprint per credential/API key","beta_features":"Beta Features","codex_identity_confuse":"Codex Identity Confuse","codex_identity_confuse_desc":"When fill-first routing or session affinity is used, remap Codex prompt_cache_key and installation identity for the selected auth"},"network":{"title":"Network Configuration","description":"Proxy, retry, and routing settings","proxy_url":"Proxy URL","request_retry":"Request Retry Count","max_retry_credentials":"Max Retry Credentials","max_retry_credentials_hint":"Leave empty to keep it unset. Set to 0 to preserve legacy behavior and try all available credentials.","max_retry_interval":"Max Retry Interval (seconds)","auth_auto_refresh_workers":"Auth Auto-refresh Workers","auth_auto_refresh_workers_hint":"When greater than 0, overrides the default worker count (16)","disable_image_generation":"Disable Image Generation","disable_image_generation_hint":"false enables it; true disables all image generation; chat only disables non-image endpoint injection","disable_image_generation_false":"false (enabled)","disable_image_generation_true":"true (disabled everywhere)","disable_image_generation_chat":"chat (disable chat injection only)","gpt_image_2_base_model":"GPT Image 2 Base Model","gpt_image_2_base_model_hint":"Mainline model used when proxying gpt-image-2 image requests; backend uses its default when empty or invalid","routing_strategy":"Routing Strategy","routing_strategy_hint":"Select credential selection strategy","strategy_round_robin":"Round Robin","strategy_fill_first":"Fill First","session_affinity_ttl":"Session Affinity TTL","force_model_prefix":"Force Model Prefix","force_model_prefix_desc":"Unprefixed model requests only use credentials without prefix","passthrough_headers":"Pass Through Upstream Headers","passthrough_headers_desc":"Forward filtered upstream response headers to downstream clients","disable_cooling":"Disable Cooling","disable_cooling_desc":"Globally disable auth/model cooldown windows after failures","session_affinity":"Session Affinity Routing","ws_auth":"WebSocket Authentication","ws_auth_desc":"Enable WebSocket authentication (/v1/ws)"},"quota":{"title":"Quota Fallback","description":"Fallback strategy when quota is exceeded","switch_project":"Switch Project","switch_project_desc":"Automatically switch to another project when quota is exceeded","switch_preview_model":"Switch to Preview Model","switch_preview_model_desc":"Switch to preview model version when quota is exceeded","antigravity_credits":"Use Antigravity Credits"},"streaming":{"title":"Streaming Configuration","description":"Keepalive and bootstrap retry settings","keepalive_seconds":"Keepalive Seconds","keepalive_hint":"Set to 0 or leave empty to disable keepalive","bootstrap_retries":"Bootstrap Retries","bootstrap_hint":"Number of retries during stream startup (before first byte)","nonstream_keepalive":"Non-stream Keepalive Interval (seconds)","nonstream_keepalive_hint":"Send blank lines every N seconds for non-streaming responses to prevent idle timeout, set to 0 or leave empty to disable","disabled":"Disabled"},"payload":{"title":"Payload Configuration","description":"Default values, raw JSON rules, override rules, and filter rules","default_rules":"Default Rules","default_rules_desc":"Use these default values when parameters are not specified in the request","default_raw_rules":"Default Raw Rules","default_raw_rules_desc":"When parameters are missing, write these values as raw JSON fragments such as true, 123, \\"high\\", or {\\"type\\":\\"object\\"}","override_rules":"Override Rules","override_rules_desc":"Force override parameter values in the request","override_raw_rules":"Override Raw Rules","override_raw_rules_desc":"Always overwrite parameter values as raw JSON fragments, useful for response_format, schemas, and other complex fields","filter_rules":"Filter Rules","filter_rules_desc":"Pre-filter upstream request body via JSON Path, automatically remove non-compliant/redundant parameters (Request Sanitization)"}},"api_keys":{"label":"API Keys List (api-keys)","add":"Add API Key","generate":"Generate","empty":"No API keys","hint":"Each entry represents an API key (consistent with 'API Key Management' page style)","edit_title":"Edit API Key","add_title":"Add API Key","input_label":"API Key","input_placeholder":"Paste your API key","input_hint":"This only modifies the local config file content, it will not sync to the API Key Management interface","error_empty":"Please enter an API key","error_invalid":"API key contains invalid characters"},"payload_rules":{"rule":"Rule","models":"Applicable Models","model_name":"Model Name","provider_type":"Provider Type","add_model":"Add Model","params":"Parameter Settings","remove_params":"Remove Parameters","json_path":"JSON Path (e.g., temperature)","json_path_filter":"JSON Path (gjson/sjson), e.g., generationConfig.thinkingConfig.thinkingBudget","param_type":"Parameter Type","param_value":"Parameter Value","add_param":"Add Parameter","no_rules":"No rules","add_rule":"Add Rule","provider_default":"Default","provider_openai":"OpenAI","provider_openai_response":"OpenAI Response","provider_responses":"Responses","provider_gemini":"Gemini","provider_claude":"Claude","provider_codex":"Codex","provider_antigravity":"Antigravity","advanced":"Advanced","hide_advanced":"Hide Advanced","from_protocol":"Source Protocol (from-protocol)","headers":"Request Header Matches","header_name":"Header Name","header_value":"Header Value","add_header":"Add Header","match":"Required Matches (match)","notMatch":"Forbidden Matches (not-match)","exist":"Required Paths (exist)","notExist":"Forbidden Paths (not-exist)","condition_path":"Match Path","condition_value":"Match Value","add_condition":"Add Condition","value_type_string":"String","value_type_number":"Number","value_type_boolean":"Boolean","value_type_json":"JSON","value_string":"String value","value_number":"Number value (e.g., 0.7)","value_boolean":"true or false","value_json":"JSON value","value_raw_json":"Raw JSON fragment, e.g. true, 123, \\"high\\", or {\\"type\\":\\"object\\"}","value_default":"Value","boolean_true":"true","boolean_false":"false"},"validation":{"validation_blocked":"Fix validation errors before saving","port_range":"Enter a valid port between 1 and 65535","non_negative_integer":"Enter a non-negative whole number","payload_invalid_number":"Enter a valid number","payload_invalid_boolean":"Choose true or false","payload_invalid_json":"Enter valid JSON"},"common":{"edit":"Edit","delete":"Delete","cancel":"Cancel","update":"Update","add":"Add"}}}`),quota_management:{title:`Quota Management`,description:`Monitor OAuth quota status for Antigravity, Codex, Claude, Kimi, and xAI credentials.`,refresh_files:`Refresh auth files`,refresh_files_and_quota:`Refresh files & quota`,refresh_all_credentials:`Refresh all credentials`,card_idle_hint:`Use the top "Refresh all credentials" button to fetch the latest quota data.`},plugin_management:{title:`Plugin Management`,description:`Review discovered and registered plugins, then manage instance toggles, config fields, and resource links.`,refresh:`Refresh`,load_failed:`Failed to load plugins`,config_load_failed:`Failed to read plugin config`,config_not_found:`Unable to read plugin config because the backend could not find this plugin.`,unsupported_backend:`The current backend does not expose the plugin management API. Use a newer backend build that includes plugin management endpoints, then restart the service.`,global_status:`Global status`,global_enabled:`Enabled`,global_disabled:`Disabled`,global_disabled_hint:`plugins.enabled is false, so enabled plugin instances will not become effective.`,plugins_dir:`Plugin directory`,discovered:`Discovered`,effective:`Effective`,search_placeholder:`Search plugin ID, name, author, or resource...`,search_label:`Search plugins`,no_plugins:`No plugins`,no_plugins_desc:`No plugins were found in the plugin directory or runtime registry.`,configured:`Configured`,not_configured:`Not configured`,registered:`Registered`,not_registered:`Not registered`,oauth:`OAuth`,status_effective:`Effective`,status_inactive:`Inactive`,version_label:`Version`,author_label:`Author`,path_label:`Path`,edit_config:`Edit config`,open_resource:`Open resource`,open_repository:`Open repository`,config_title:`Configure {{name}}`,base_settings:`Base settings`,enabled:`Enabled`,enabled_hint:`Controls the enabled field for this plugin instance under plugins.configs.`,priority:`Priority`,config_fields:`Config fields`,no_config_fields:`This plugin does not declare visual config fields.`,select_placeholder:`Select`,array_item_placeholder:`Enter array item`,add_array_item:`Add array item`,remove_array_item:`Remove array item`,delete_plugin:`Delete`,delete_confirm_title:`Delete plugin`,delete_confirm_message:`Delete {{name}} ({{id}})? This removes the local plugin file and saved config.`,delete_success:`Plugin deleted`,delete_failed:`Failed to delete plugin`,delete_restart_required:`The loaded plugin cannot be removed until the backend restarts.`,toggle_success:`Plugin status updated`,toggle_failed:`Failed to update plugin status`,runtime_pending:`Plugin change was saved, but the runtime state is still pending. Refresh later or check backend logs.`,save_success:`Plugin config saved`,save_failed:`Failed to save plugin config`,validation_failed:`Fix plugin config form errors first`,invalid_priority:`Enter an integer priority`,invalid_number:`Enter a valid number`,invalid_integer:`Enter a valid integer`,invalid_json:`Enter valid JSON`,expected_array:`Enter a JSON array`,expected_object:`Enter a JSON object`,invalid_enum:`Choose one of the declared enum values`},plugin_store:{title:`Plugin Store`,description:`Browse the plugin registry, then install or update plugins for the current backend.`,description_show_more:`Show more`,description_show_less:`Show less`,source_name:`Source: {{source}}`,cli_proxy_api_source:`CLIProxyAPI source`,refresh:`Refresh`,retry:`Retry`,load_failed:`Failed to load the plugin store`,unsupported_backend:`The current backend does not expose the plugin store API. Use a newer backend build that includes plugin store endpoints, then restart the service.`,registry_failed:`Failed to reach the plugin registry`,global_status:`Global status`,global_enabled:`Enabled`,global_disabled:`Disabled`,global_disabled_hint:`plugins.enabled is false, so installed plugins will not become effective.`,plugins_dir:`Plugin directory`,stat_available:`Available`,search_placeholder:`Search plugin ID, name, author, or tag...`,search_label:`Search plugin store`,filter_label:`Filter by install status`,filter_all:`All`,filter_installed:`Installed`,filter_not_installed:`Not installed`,filter_updates:`Updates`,badge_installed:`Installed`,badge_update:`Update available`,badge_effective:`Effective`,version_arrow:`v{{from}} → v{{to}}`,install:`Install`,update:`Update`,manage:`Manage`,install_confirm_title:`Install plugin`,install_confirm_message:`Download {{target}} from the plugin registry and install it into the local plugin directory?`,update_confirm_title:`Update plugin`,update_confirm_message:`Download and install the latest version of {{target}}?`,install_success:`Plugin installed`,update_success:`Plugin updated`,install_failed:`Failed to install plugin`,update_failed:`Failed to update plugin`,status_pending:`Plugin files were updated, but the local status has not refreshed yet. Refresh later or check backend logs.`,registration_pending:`Plugin files were updated, but registration is still pending. Refresh later or check backend logs.`,restart_required_notice:`Restart the service to load the new plugin version`,restart_required_banner:`Restart the service to apply the new version of: {{plugins}}`,open_repository:`Open repository`,open_homepage:`Open homepage`,no_plugins:`Registry is empty`,no_plugins_desc:`The plugin registry did not return any plugins.`,no_matches:`No matching plugins`,no_matches_desc:`No plugins match the current search or filter.`,clear_filters:`Clear filters`,security_banner_title:`Third-party plugins run with full backend access`,security_banner_text:`Plugins execute code inside the proxy service and can read your credentials and traffic. Only install plugins you trust — be especially careful with any plugin not published by the official router-for-me organization.`,badge_untrusted:`Third-party`,gate_title:`Install {{name}}`,gate_title_update:`Update {{name}}`,gate_warning:`Unexpected and harmful things can happen if you don't read this.`,gate_effect_runs_code:`This plugin will run uncertified third-party code inside your proxy backend. The system cannot isolate or audit its behavior, and it may have access to your sensitive credentials, network requests, and response data.`,gate_effect_no_review:`This plugin is not published or reviewed by the official router-for-me organization. The official organization makes no express or implied warranty for this plugin's stability, security, compliance, or any behavior changes in future versions.`,gate_effect_restart:`Installing it changes the local plugin directory and may require a service restart to take effect.`,gate_untrusted_alert:`This plugin is not from the official router-for-me organization. Only continue if you fully trust its author and source.`,gate_repository_label:`Repository`,gate_source_label:`Source`,gate_step1_action:`I want to install this plugin`,gate_step2_action:`I have read and understand these risks`,gate_step3_prompt:`To confirm, type "{{token}}" in the box below`,gate_step3_action:`Install this plugin`,gate_step3_hint:`Enter the exact identifier shown above to enable installation.`},plugin_resource:{title:`Plugin Page`,page_count:`{{count}} pages`,load_failed:`Failed to load plugin page`,unavailable:`Plugin page unavailable`,not_found:`Plugin page not found`,not_found_desc:`This plugin page is not declared by the current backend plugin list.`,empty_src:`Plugin page URL is empty`,empty_src_desc:`This plugin menu does not provide an embeddable page URL.`},system_info:{title:`Management Center Info`,about_title:`CLI Proxy API Management Center`,connection_status_title:`Connection Status`,api_status_label:`API Status:`,config_status_label:`Config Status:`,last_update_label:`Last Update:`,cache_data:`Cache Data`,real_time_data:`Real-time Data`,not_loaded:`Not Loaded`,seconds_ago:`seconds ago`,models_title:`Available Models`,models_desc:`Shows the /models response and uses saved API keys for auth automatically.`,models_loading:`Loading available models...`,models_empty:`No models returned by /models`,models_error:`Failed to load model list`,models_count:`{{count}} available models`,version_check_title:`Update Check`,version_check_desc:`Call the /latest-version endpoint to compare with the server version and see if an update is available.`,version_current_label:`Current version`,version_latest_label:`Latest version`,version_check_button:`Check for updates`,version_check_idle:`Click to check for updates`,version_checking:`Checking for the latest version...`,version_update_available:`An update is available: {{version}}`,version_is_latest:`You are on the latest version`,version_check_error:`Update check failed`,version_current_missing:`Server version is unavailable; cannot compare`,version_unknown:`Unknown`,quick_links_title:`Quick Links`,quick_links_desc:`Access project repositories and documentation for help and updates.`,link_main_repo:`Main Repository`,link_main_repo_desc:`CLI Proxy API core program source code`,link_webui_repo:`WebUI Repository`,link_webui_repo_desc:`Management Center frontend source code`,link_docs:`Documentation`,link_docs_desc:`Configuration tutorials and guides`,clear_login_title:`Local Login Data`,clear_login_desc:`Clear locally saved login data and sign out.`,clear_login_button:`Clear login data`,clear_login_confirm:`Clear local login data and sign out now?`},notification:{debug_updated:`Debug settings updated`,proxy_updated:`Proxy settings updated`,proxy_cleared:`Proxy settings cleared`,retry_updated:`Retry settings updated`,quota_switch_project_updated:`Project switch settings updated`,quota_switch_preview_updated:`Preview model switch settings updated`,logging_to_file_updated:`Logging settings updated`,logs_max_total_size_updated:`Log size limit updated`,request_log_updated:`Request logging setting updated`,force_model_prefix_updated:`Model prefix setting updated`,ws_auth_updated:`WebSocket authentication setting updated`,routing_strategy_updated:`Routing strategy updated`,login_storage_cleared:`Local login data cleared`,api_key_added:`API key added successfully`,api_key_updated:`API key updated successfully`,api_key_deleted:`API key deleted successfully`,api_key_invalid_chars:`API key can only contain letters, numbers, and symbols`,gemini_key_added:`Gemini key added successfully`,gemini_key_updated:`Gemini key updated successfully`,gemini_key_deleted:`Gemini key deleted successfully`,gemini_multi_input_required:`Please enter at least one Gemini key`,gemini_multi_failed:`Gemini bulk add failed`,gemini_multi_summary:`Gemini bulk add finished: {{success}} added, {{skipped}} skipped, {{failed}} failed`,codex_config_added:`Codex configuration added successfully`,codex_config_updated:`Codex configuration updated successfully`,codex_config_deleted:`Codex configuration deleted successfully`,codex_base_url_required:`Please enter the Codex Base URL`,claude_config_added:`Claude configuration added successfully`,claude_config_updated:`Claude configuration updated successfully`,claude_config_deleted:`Claude configuration deleted successfully`,vertex_config_added:`Vertex configuration added successfully`,vertex_config_updated:`Vertex configuration updated successfully`,vertex_config_deleted:`Vertex configuration deleted successfully`,config_enabled:`Configuration enabled`,config_disabled:`Configuration disabled`,field_required:`Required fields cannot be empty`,openai_provider_required:`Please fill in provider name and Base URL`,openai_provider_added:`OpenAI provider added successfully`,openai_provider_updated:`OpenAI provider updated successfully`,openai_provider_deleted:`OpenAI provider deleted successfully`,openai_model_name_required:`Model name is required`,openai_test_url_required:`Please provide a valid Base URL before testing`,openai_test_key_required:`Please add at least one API key before testing`,openai_test_model_required:`Please select a model to test`,data_refreshed:`Data refreshed successfully`,connection_required:`Please establish connection first`,refresh_failed:`Refresh failed`,update_failed:`Update failed`,add_failed:`Add failed`,delete_failed:`Delete failed`,upload_failed:`Upload failed`,download_failed:`Download failed`,login_failed:`Login failed`,please_enter:`Please enter`,please_fill:`Please fill`,provider_name_url:`provider name and Base URL`,api_key:`API key`,gemini_api_key:`Gemini API key`,codex_api_key:`Codex API key`,claude_api_key:`Claude API key`,commercial_mode_restart_required:`Commercial mode setting changed. Please restart the service for it to take effect`,copy_failed:`Copy failed`,link_copied:`Link copied to clipboard`},language:{switch:`Language`,chinese:`中文`,chinese_tw:`Traditional Chinese (Taiwan)`,english:`English`,russian:`Русский`},theme:{switch:`Theme`,light:`Wool Paper`,white:`Pure White`,dark:`Dark`,switch_to_light:`Switch to wool paper mode`,switch_to_dark:`Switch to dark mode`,auto:`Follow system`},sidebar:{toggle_expand:`Expand sidebar`,toggle_collapse:`Collapse sidebar`},footer:{api_version:`CLI Proxy API Version`,build_date:`Build Time`,version:`Management UI Version`,author:`Author`},providersPage:{header:{title:`AI Providers`,activeResources:`{{active}}/{{total}} active resources`,providerFamilies:`{{count}} provider families`,updatedAt:`Updated {{time}}`,issueCount:`{{count}} issues`},actions:{refresh:`Refresh`,syncing:`Syncing`,new:`New`,edit:`Edit`,view:`View`,delete:`Delete`,clear:`Clear`,cancel:`Cancel`,save:`Save`,create:`Create`,enable:`Enable`,disable:`Disable`},categories:{title:`Providers`,activeCount:`{{active}}/{{total}} active`},providerNames:{gemini:`Gemini`,codex:`Codex`,claude:`Claude`,vertex:`Vertex`,openaiCompatibility:`OpenAI Compatible`},table:{key:`Key`,baseUrl:`Base URL`,prefix:`Prefix`,models:`Models/Headers`,status:`Status`,actions:`Actions`,metrics:{models:`Models`,keys:`Keys`,headers:`Headers`},websocketsTag:`WebSockets`,cloakTag:`Cloak`,empty:`No resources yet, click "New" to add.`,filterPlaceholder:`Search keys, URLs, prefixes…`,description:`Manage resources under {{route}}`,providerIssue:`This provider has an issue`},status:{active:`Active`,disabled:`Disabled`,notSet:`Not set`,none:`None`,notConfigured:`Not configured`,defaultSuffix:`(default)`},detail:{title:`Details`,metadataTitle:`Metadata`,fields:{identifier:`Identifier`,baseUrl:`Base URL`,proxyUrl:`Proxy URL`,prefix:`Prefix`,models:`Models`,headers:`Headers`,authIndex:`Auth Index`,excludedModels:`Excluded models`,apiKeyEntries:`API key entries`}},form:{createEyebrow:`New`,editEyebrow:`Edit`,name:`Name`,apiKey:`API key`,apiKeyCreatePlaceholder:`Enter API key`,apiKeyEditPlaceholder:`Leave empty to keep unchanged`,baseUrl:`Base URL`,baseUrlRequiredHint:`Required for this provider`,proxyUrl:`Proxy URL`,prefix:`Prefix`,priority:`Priority`,disabled:`Disable this entry`,disabledHint:`Disabled entries won't be used by the gateway`,websockets:`Enable WebSockets`,testModel:`Test model`,testModelClaudeHint:`Used for connectivity testing only; not saved`,testModelAutoWith:`Auto · {{name}}`,testModelAutoEmpty:`Auto (no models added yet)`,testModelCustom:`{{name}} (custom)`,modelsSection:`Custom models`,addModel:`Add model`,headersSection:`Request headers`,addHeader:`Add header`,headers:`Headers`,headersHint:`One per line, format Key: Value`,excludedSection:`Excluded models`,excludedHint:`One model per line; matched models won't be routed`,cloakSection:`Cloak settings`,cloakMode:`Mode`,cloakStrict:`Strict mode`,cloakSensitiveWords:`Sensitive words (one per line)`,apiKeyEntriesSection:`API key entries`,apiKeyEntry:`Key #{{index}}`,addApiKeyEntry:`Add key entry`,showApiKey:`Show API key`,hideApiKey:`Hide API key`,disableCooling:`Disable cooling`,disableCoolingHint:`Disable failure cooldown windows only for this credential or provider`,modelEntry:`Model #{{index}}`,modelImage:`Allow image endpoints`,modelImageHint:`Allow this model on /v1/images/generations and /v1/images/edits`,thinkingConfig:`Thinking config (JSON)`,thinkingConfigHint:`Supports levels, min, max, zero_allowed, dynamic_allowed`,cloakCacheUserId:`Cache user_id`,cloakCacheUserIdHint:`Reuse the Claude cloak user_id per API key`,experimentalCchSigning:`Experimental CCH signing`,experimentalCchSigningHint:`Sign the final cloaked Claude /v1/messages body with CCH`,validation:{nameRequired:`Name is required`,apiKeyRequired:`At least one API key is required`,baseUrlRequired:`Base URL is required`}},delete:{title:`Delete resource`,confirm:`Delete {{name}}? This action cannot be undone.`},toast:{created:`Created`,updated:`Updated`,deleted:`Deleted`,enabled:`Enabled`,disabled:`Disabled`,toggleFailed:`Failed to update status`},unsavedChanges:{title:`Discard unsaved changes?`,message:`You have unsaved edits in this form. Closing will discard them.`,discard:`Discard changes`,keepEditing:`Keep editing`},connectivity:{test:`Test`,testAll:`Test all`,success:`Reachable`,baseUrlRequired:`Base URL is required`,endpointInvalid:`Endpoint URL is invalid`,apiKeyRequired:`API key is required`,modelRequired:`Test model is required`,timeout:`Timed out after {{seconds}}s`,requestFailed:`Request failed`},discovery:{openButton:`Fetch from endpoint`,searchPlaceholder:`Search models`,reload:`Reload`,loading:`Loading models…`,empty:`No models returned by the endpoint`,notLoaded:`Click Reload to fetch models`,selectAll:`Select all`,clearAll:`Clear selection`,selectedCount:`{{selected}} / {{total}}`,alreadyAdded:`Already added`,close:`Close`,apply:`Apply ({{count}})`},toolbar:{sortBy:`Sort by`,sort:{name:`Name`,priority:`Priority`,recentSuccess:`Recent success`,directionAsc:`Ascending`,directionDesc:`Descending`},filter:{allModels:`All models`,selectedModels:`{{selected}}/{{total}} models`,selectAll:`Select all`,clear:`Clear`,empty:`No models configured yet`}},modelCatalog:{notLoaded:`Not loaded`}}},Jc={common:{login:`Войти`,logout:`Выйти`,back:`Назад`,cancel:`Отмена`,confirm:`Подтвердить`,leave:`Уйти`,stay:`Остаться`,save:`Сохранить`,delete:`Удалить`,edit:`Редактировать`,add:`Добавить`,update:`Обновить`,refresh:`Обновить`,close:`Закрыть`,success:`Успешно`,error:`Ошибка`,info:`Информация`,warning:`Внимание`,loading:`Загрузка...`,connecting:`Подключение...`,connected:`Подключено`,disconnected:`Отключено`,connecting_status:`Подключение`,connected_status:`Подключено`,disconnected_status:`Отключено`,yes:`Да`,no:`Нет`,not_set:`Не задано`,optional:`Необязательно`,required:`Обязательно`,api_key:`Ключ`,base_url:`Адрес`,prefix:`Префикс`,proxy_url:`Прокси`,priority:`Приоритет`,alias:`Псевдоним`,failure:`Сбой`,unknown_error:`Неизвестная ошибка`,quota_update_required:`Пожалуйста, обновите CPA или проверьте наличие обновлений`,quota_check_credential:`Пожалуйста, проверьте статус учётных данных`,copy:`Копировать`,expand:`Развернуть`,collapse:`Свернуть`,status:`Статус`,action:`Действие`,custom_headers_label:`Пользовательские заголовки`,custom_headers_hint:`Необязательно — HTTP-заголовки для отправки с запросом. Оставьте пустым для удаления.`,custom_headers_add:`Добавить заголовок`,custom_headers_key_placeholder:`Имя заголовка, например X-Custom-Header`,custom_headers_value_placeholder:`Значение заголовка`,model_name_placeholder:`Имя модели, напр. claude-3-5-sonnet-20241022`,model_alias_placeholder:`Псевдоним модели (необязательно)`,invalid_provider_index:`Неверный индекс провайдера.`,unsaved_changes_title:`Несохранённые изменения`,unsaved_changes_message:`У вас есть несохранённые изменения. Если вы уйдёте, они будут потеряны. Выйти?`},title:{main:`Центр управления CLI Proxy API`,login:`Центр управления CLI Proxy API`,abbr:`CPAMC`},splash:{title:`CLI Proxy API`,subtitle:`Центр управления`},auto_login:{title:`Автовход...`,message:`Пытаемся подключиться к серверу, используя сохранённые данные`},login:{subtitle:`Введите данные подключения, чтобы получить доступ к панели управления`,connection_title:`Адрес подключения`,connection_current:`Текущий URL`,connection_auto_hint:`Система автоматически использует текущий URL для подключения`,custom_connection_label:`Пользовательский URL подключения:`,custom_connection_placeholder:`Напр.: https://example.com:8317`,custom_connection_hint:`По умолчанию используется текущий URL. При необходимости замените его.`,use_current_address:`Использовать текущий URL`,remember_password_label:`Запомнить пароль`,management_key_label:`Ключ управления:`,management_key_placeholder:`Введите ключ управления`,connect_button:`Подключиться`,submit_button:`Войти`,submitting:`Подключение...`,error_title:`Ошибка входа`,error_backend_detail:`Ответ сервера`,error_required:`Пожалуйста, заполните все данные подключения`,error_invalid:`Подключение не удалось, проверьте адрес сервера, Management API и ключ управления`,error_network:`Сетевая ошибка, проверьте подключение или адрес сервера`,error_timeout:`Время ожидания истекло, сервер не отвечает`,error_unauthorized:`Аутентификация не удалась, ключ управления отсутствует или неверен`,error_forbidden:`Доступ запрещён: удалённое управление отключено, ключ управления не настроен или IP временно заблокирован`,error_not_found:`Management API не найден, проверьте, что адрес указывает на backend CLIProxyAPI`,error_server:`Backend не смог обработать запрос управления, проверьте журналы сервера`,error_cors:`Блокировка CORS, проверьте конфигурацию сервера`,error_ssl:`Ошибка проверки SSL/TLS сертификата`},header:{check_connection:`Проверить подключение`,refresh_all:`Обновить всё`,logout:`Выйти`},connection:{title:`Информация о подключении`,server_address:`Адрес сервера:`,management_key:`Ключ управления:`,status:`Статус подключения:`},nav:{dashboard:`Панель`,basic_settings:`Основные настройки`,api_keys:`API ключи`,ai_providers:`Поставщики AI`,auth_files:`Файлы аутентификации`,oauth:`OAuth вход`,quota_management:`Управление квотами`,plugins:`Плагины`,plugin_store:`Магазин плагинов`,config_management:`Панель конфигурации`,logs:`Просмотр логов`,system_info:`Информация системы`},nav_groups:{operate:`Работа`,gateway:`Шлюз`,observe:`Наблюдение`,control:`Управление`},nav_meta:{dashboard:`Обзор работы`,ai_providers:`Маршрутизация моделей`,auth_files:`Файлы и учётные данные`,oauth:`Авторизация OAuth`,quota_management:`API ключи и лимиты`,plugins:`Переключатели и ресурсы плагинов`,plugin_store:`Поиск и установка плагинов`,logs:`Трассировка запросов`,config_management:`Базовая конфигурация шлюза`,system_info:`Состояние и диагностика`},dashboard:{title:`Панель управления`,subtitle:`Добро пожаловать в Центр управления CLI Proxy API`,openai_providers:`Поставщики OpenAI`,quick_actions:`Быстрые действия`,current_config:`Текущая конфигурация`,management_keys:`Ключи управления`,provider_keys_detail:`G:{{gemini}} C:{{codex}} Cl:{{claude}} V:{{vertex}} O:{{openai}}`,oauth_credentials:`Учётные данные OAuth`,edit_settings:`Изменить настройки`,routing_strategy:`Стратегия маршрутизации`,available_models:`Доступные модели`,available_models_desc:`Всего моделей от всех провайдеров`,welcome_back:`С возвращением`,greeting_morning:`Доброе утро`,greeting_afternoon:`Добрый день`,greeting_evening:`Добрый вечер`,greeting_night:`Доброй ночи`,caring_morning:`Новый день — начнём продуктивно.`,caring_afternoon:`Уверенный прогресс — отличная работа.`,caring_evening:`День подходит к концу — финальный рывок.`,caring_night:`Поздняя работа? Не забудьте отдохнуть.`,system_overview:`Обзор системы`},basic_settings:{title:`Основные настройки`,debug_title:`Режим отладки`,debug_enable:`Включить режим отладки`,proxy_title:`Настройки прокси`,proxy_url_label:`URL прокси:`,proxy_url_placeholder:`например: socks5://user:pass@127.0.0.1:1080/`,proxy_update:`Обновить`,proxy_clear:`Очистить`,retry_title:`Повтор запросов`,retry_count_label:`Количество повторов:`,retry_update:`Обновить`,quota_title:`Поведение при превышении квоты`,quota_switch_project:`Автоматически переключать проект`,quota_switch_preview:`Переключаться на preview-модель`,logging_title:`Журналирование`,logging_to_file_enable:`Включить журналирование в файл`,logs_max_total_size_title:`Лимит размера журналов`,logs_max_total_size_label:`Максимальный общий размер журналов (МБ):`,logs_max_total_size_hint:`Установите 0, чтобы отключить лимит.`,logs_max_total_size_update:`Обновить`,request_log_title:`Журналирование запросов`,request_log_enable:`Включить журналирование запросов`,request_log_warning:`Оставьте выключенным, если подробная диагностика не нужна.`,force_model_prefix_enable:`Включить принудительный префикс модели`,ws_auth_title:`Аутентификация WebSocket`,ws_auth_enable:`Требовать аутентификацию для /ws/*`,routing_title:`Стратегия маршрутизации`,routing_strategy_label:`Стратегия маршрутизации:`,routing_strategy_hint:`round-robin циклически перебирает ключи; fill-first отдаёт приоритет первому доступному ключу.`,routing_strategy_update:`Обновить`,routing_strategy_round_robin:`round-robin (цикл)`,routing_strategy_fill_first:`fill-first (приоритет)`},api_keys:{title:`Управление API-ключами`,proxy_auth_title:`Ключи аутентификации прокси-сервиса`,add_button:`Добавить ключ`,empty_title:`API-ключи отсутствуют`,empty_desc:`Нажмите кнопку выше, чтобы добавить первый ключ`,item_title:`API-ключ`,add_modal_title:`Добавление API-ключа`,add_modal_key_label:`API-ключ:`,add_modal_key_placeholder:`Введите API-ключ`,edit_modal_title:`Редактирование API-ключа`,edit_modal_key_label:`API-ключ:`,delete_confirm:`Удалить этот API-ключ?`},auth_files:JSON.parse(`{"title":"Управление файлами авторизации","title_section":"Файлы авторизации","description":"Управляйте всеми JSON-файлами авторизации CLI Proxy (например, Qwen, Gemini, Vertex). Загрузка учётных данных сразу включает соответствующую интеграцию AI.","upload_button":"Загрузить файл","delete_all_button":"Удалить всё","empty_title":"Файлы авторизации отсутствуют","empty_desc":"Нажмите кнопку выше, чтобы загрузить первый файл","search_empty_title":"Файлы не найдены","search_empty_desc":"Попробуйте изменить фильтры или очистить строку поиска.","file_size":"Размер","file_modified":"Изменён","health_status_label":"Состояние","health_status_healthy":"Нормально","health_status_warning":"Предупреждение","health_status_disabled":"Отключено","health_status_unknown":"Неизвестно","health_status_no_message":"Нет сообщения о статусе","last_refresh_label":"Последнее обновление","refresh_not_available":"Н/Д","refresh_just_now":"Только что","download_button":"Скачать","delete_button":"Удалить","delete_confirm":"Удалить файл","delete_all_confirm":"Удалить все файлы авторизации? Это действие нельзя отменить!","delete_filtered_confirm":"Удалить все файлы авторизации {{type}}? Это действие нельзя отменить!","delete_problem_button":"Удалить проблемные","delete_problem_button_with_type":"Удалить проблемные файлы {{type}}","delete_problem_confirm":"Удалить все проблемные файлы авторизации? Это действие нельзя отменить!","delete_problem_filtered_confirm":"Удалить все проблемные файлы авторизации {{type}}? Это действие нельзя отменить!","delete_filtered_result_button":"Удалить результаты фильтра","delete_filtered_result_confirm":"Удалить файлы авторизации из текущих результатов фильтра? Это действие нельзя отменить!","upload_error_json":"Допустимы только файлы JSON","upload_error_size":"Размер файла не может превышать {{maxSize}}","upload_success":"Файл успешно загружен","download_success":"Файл успешно скачан","delete_success":"Файл успешно удалён","delete_all_success":"Удаление завершено","delete_filtered_success":"Удалено файлов {{type}}: {{count}}","delete_filtered_partial":"Удаление файлов {{type}} завершено: успешных {{success}}, ошибок {{failed}}","delete_filtered_none":"Нет файлов {{type}} для удаления при текущем фильтре","delete_problem_success":"Удалено проблемных файлов авторизации: {{count}}","delete_problem_filtered_success":"Удалено проблемных файлов авторизации {{type}}: {{count}}","delete_problem_partial":"Удаление проблемных файлов авторизации завершено: успешных {{success}}, ошибок {{failed}}","delete_problem_filtered_partial":"Удаление проблемных файлов авторизации {{type}} завершено: успешных {{success}}, ошибок {{failed}}","delete_problem_none":"Нет проблемных файлов авторизации для удаления при текущем фильтре","delete_problem_filtered_none":"Нет проблемных файлов авторизации {{type}} для удаления при текущем фильтре","delete_filtered_result_success":"Удалено файлов авторизации из результатов фильтра: {{count}}","delete_filtered_result_partial":"Удаление результатов фильтра завершено: успешных {{success}}, ошибок {{failed}}","delete_filtered_result_none":"Нет файлов авторизации для удаления в текущих результатах фильтра","files_count":"файлов","pagination_prev":"Предыдущая","pagination_next":"Следующая","pagination_info":"Страница {{current}} / {{total}} · {{count}} файлов","search_label":"Поиск конфигов","search_placeholder":"Фильтр по имени, типу или провайдеру, поддерживается wildcard *","problem_filter_label":"Фильтр проблем","problem_filter_only":"Показывать только проблемные учётные данные","disabled_filter_only":"Показывать только отключённые учётные данные","display_options_label":"Параметры отображения","compact_mode_label":"Компактный режим","sort_label":"Сортировка","sort_default":"По умолчанию","sort_az":"A-Z Имя","sort_priority":"Приоритет","priority_display":"Приоритет","page_size_label":"На странице","page_size_unit":"элементов","view_mode_paged":"Постранично","view_mode_all":"Показать все","too_many_files_warning":"Слишком много учётных данных. Полный список может повлиять на производительность, используйте постраничный режим.","filter_all":"Все","filter_qwen":"Qwen","filter_gemini":"Gemini","filter_kimi":"Kimi","filter_aistudio":"AIStudio","filter_claude":"Claude","filter_codex":"Codex","filter_antigravity":"Antigravity","filter_xai":"xAI","filter_iflow":"iFlow","filter_vertex":"Vertex","filter_empty":"Пусто","filter_unknown":"Другое","type_qwen":"Qwen","type_gemini":"Gemini","type_kimi":"Kimi","type_aistudio":"AIStudio","type_claude":"Claude","type_codex":"Codex","type_antigravity":"Antigravity","type_xai":"xAI","type_iflow":"iFlow","type_vertex":"Vertex","type_empty":"Пусто","type_unknown":"Другое","type_virtual":"Виртуальный файл авторизации","models_button":"Модели","models_title":"Поддерживаемые модели","models_loading":"Загрузка списка моделей...","models_empty":"Для этих учётных данных нет доступных моделей","models_empty_desc":"Возможно, учётные данные ещё не загружены сервером или к ним не привязаны модели.","models_unsupported":"Функция не поддерживается в текущей версии","models_unsupported_desc":"Обновите CLI Proxy API до последней версии и повторите попытку","models_excluded_badge":"Отключена","models_excluded_hint":"Эта OAuth-модель отключена","status_toggle_label":"Включено","status_enabled_success":"\\"{{name}}\\" включён","status_disabled_success":"\\"{{name}}\\" отключён","batch_status_success":"{{count}} файлов обновлено","batch_status_partial":"{{success}} обновлено, {{failed}} не удалось","batch_delete_title":"Удалить выбранные файлы","batch_delete_confirm":"Удалить {{count}} файлов?","batch_selected":"{{count}} выбрано","batch_select_all":"Выбрать все","batch_select_page":"Выбрать страницу","batch_select_filtered":"Выбрать по фильтру","batch_invert_page":"Инвертировать страницу","batch_deselect":"Отменить","batch_download":"Скачать выбранные","batch_download_success":"Запущена загрузка {{count}} файлов","batch_download_partial":"Загрузка завершена: успешно {{success}}, ошибок {{failed}}","batch_enable":"Включить","batch_disable":"Отключить","prefix_proxy_button":"Просмотр / редактирование файла авторизации","auth_field_editor_title":"Просмотр / редактирование файла авторизации - {{name}}","prefix_proxy_loading":"Загрузка файла авторизации...","prefix_proxy_info_label":"Информация о файле авторизации (info)","prefix_proxy_source_label":"JSON файла авторизации (предпросмотр)","prefix_proxy_invalid_content_label":"Скачанное содержимое (сокращено)","prefix_label":"Префикс (prefix)","proxy_url_label":"URL прокси (proxy_url)","prefix_placeholder":"","proxy_url_placeholder":"socks5://username:password@proxy_ip:port/","priority_label":"Приоритет (priority)","priority_placeholder":"например: 10 или -1","priority_hint":"Только целые числа. Некорректные значения игнорируются. Чем больше число, тем выше приоритет.","codex_websockets_label":"WebSockets (websockets)","codex_websockets_hint":"Включает websocket-транспорт Responses API для этих учётных данных Codex.","excluded_models_label":"Исключённые модели (excluded_models)","excluded_models_placeholder":"Через запятую или с новой строки, например: model-a, gpt-5-*, *-preview","excluded_models_hint":"Сохраняется как массив; значения trim/нижний регистр/без дублей/с сортировкой.","disable_cooling_label":"Отключение охлаждения (disable_cooling)","disable_cooling_placeholder":"например: true / false / 1 / 0","disable_cooling_hint":"Поддерживает boolean, числа 0/не 0 и строки true/false/1/0; непарсируемые значения игнорируются.","note_label":"Заметка (note)","note_placeholder":"Введите заметку, например: аккаунт Ивана","note_hint":"Необязательно. Используется для описания назначения или владельца учётных данных; оставьте пустым, чтобы не записывать.","note_display":"Заметка","prefix_proxy_invalid_json":"Этот файл авторизации не является JSON-объектом, поэтому поля нельзя редактировать.","prefix_proxy_html_challenge":"Скачанное содержимое является HTML-страницей проверки, а не JSON-объектом авторизации. Повторно авторизуйтесь или замените файл перед редактированием полей.","prefix_proxy_saved_success":"Файл авторизации \\"{{name}}\\" успешно обновлён","card_tools_title":"Инструменты","quota_refresh_single":"Обновить квоту","quota_refresh_hint":"Обновить квоту только для этих учётных данных","quota_refresh_success":"Квота для \\"{{name}}\\" обновлена","quota_refresh_failed":"Не удалось обновить квоту для \\"{{name}}\\": {{message}}"}`),antigravity_subscription:{subscription_label:`Подписка`,plan_badge:`План {{plan}}`,loading_short:`План...`,error_badge:`Ошибка плана`,load_failed:`Не удалось проверить подписку: {{message}}`,missing_auth_index:`В файле авторизации отсутствует auth_index`,empty_data:`Данные подписки отсутствуют`,plan_unknown:`Неизвестно`,plan_free:`Free`,plan_pro:`Pro`,plan_ultra:`Ultra`,plan_ultra_lite:`Ultra Lite`},antigravity_quota:{title:`Квота Antigravity`,empty_title:`Файлы авторизации Antigravity отсутствуют`,empty_desc:`Загрузите учётные данные Antigravity, чтобы увидеть оставшуюся квоту.`,idle:`Не загружено. Нажмите "Обновить квоту".`,loading:`Загрузка квоты...`,load_failed:`Не удалось загрузить квоту: {{message}}`,missing_auth_index:`В файле авторизации отсутствует auth_index`,missing_project_id:`В учётных данных Antigravity отсутствует project_id. Войдите заново или обновите учётные данные, чтобы определить проект.`,empty_models:`Данные по квоте отсутствуют`,plan_label:`План`,group_gemini_models:`Модели Gemini`,group_claude_gpt_models:`Модели Claude и GPT`,group_models_description:`Модели в этой группе: {{models}}`,weekly_limit:`Недельный лимит`,daily_limit:`Дневной лимит`,five_hour_limit:`Лимит на 5 часов`,monthly_limit:`Месячный лимит`,quota_available:`Квота доступна`,remaining_percent:`Осталось {{percent}}%`,refreshes_in:`Обновится через {{duration}}`,refresh_available:`Можно обновить`,duration_day_hour:`{{days}} д {{hours}} ч`,duration_hour_minute:`{{hours}} ч {{minutes}} мин`,duration_minute:`{{minutes}} мин`,duration_less_than_minute:`<1 мин`,refresh_button:`Обновить квоту`,fetch_all:`Получить все`},claude_quota:{title:`Квота Claude`,empty_title:`Файлы авторизации Claude OAuth отсутствуют`,empty_desc:`Войдите через Claude OAuth, чтобы увидеть квоту.`,idle:`Не загружено. Нажмите "Обновить квоту".`,loading:`Загрузка квоты...`,load_failed:`Не удалось загрузить квоту: {{message}}`,missing_auth_index:`В файле авторизации отсутствует auth_index`,empty_windows:`Данные по квоте отсутствуют`,refresh_button:`Обновить квоту`,fetch_all:`Получить все`,five_hour:`Лимит на 5 часов`,seven_day:`Лимит на 7 дней`,seven_day_oauth_apps:`7 дней OAuth приложения`,seven_day_opus:`7 дней Opus`,seven_day_sonnet:`7 дней Sonnet`,seven_day_cowork:`7 дней Cowork`,iguana_necktie:`Iguana Necktie`,extra_usage_label:`Дополнительное использование`,plan_label:`План`,plan_unknown:`Неизвестно`,plan_free:`Free`,plan_pro:`Pro`,plan_max:`Max`,plan_max5:`Max 5x`,plan_max20:`Max 20x`,plan_team:`Team`},codex_quota:{title:`Квота Codex`,empty_title:`Файлы авторизации Codex отсутствуют`,empty_desc:`Загрузите учётные данные Codex, чтобы увидеть квоту.`,idle:`Не загружено. Нажмите "Обновить квоту".`,loading:`Загрузка квоты...`,load_failed:`Не удалось загрузить квоту: {{message}}`,missing_auth_index:`В файле авторизации отсутствует auth_index`,missing_account_id:`В учётных данных Codex отсутствует идентификатор аккаунта ChatGPT`,empty_windows:`Данные по квоте отсутствуют`,no_access:`У этих учётных данных нет доступа Codex (план: free).`,refresh_button:`Обновить квоту`,fetch_all:`Получить все`,primary_window:`Лимит на 5 часов`,secondary_window:`Недельный лимит`,team_secondary_window:`Месячный лимит`,code_review_primary_window:`Лимит code review на 5 часов`,code_review_secondary_window:`Недельный лимит code review`,code_review_team_secondary_window:`Месячный лимит code review`,additional_primary_window:`{{name}}: лимит на 5 часов`,additional_secondary_window:`{{name}}: недельный лимит`,additional_team_secondary_window:`{{name}}: месячный лимит`,plan_label:`Тариф`,expires_label:`Истекает`,plan_plus:`Plus`,plan_team:`Team`,plan_free:`Free`,plan_pro:`Pro 20x`,plan_prolite:`Pro 5x`},kimi_quota:{title:`Квота Kimi`,empty_title:`Файлы авторизации Kimi отсутствуют`,empty_desc:`Загрузите учётные данные Kimi, чтобы увидеть оставшуюся квоту.`,idle:`Не загружено. Нажмите "Обновить квоту".`,loading:`Загрузка квоты...`,load_failed:`Не удалось загрузить квоту: {{message}}`,missing_auth_index:`В файле авторизации отсутствует auth_index`,empty_data:`Данные по квоте отсутствуют`,refresh_button:`Обновить квоту`,fetch_all:`Получить все`,weekly_limit:`Недельный лимит`,limit_window:`Лимит {{duration}}`,limit_index:`Лимит #{{index}}`,reset_hint:`сброс через {{hint}}`},xai_quota:{title:`Квота Grok`,empty_title:`Файлы авторизации xAI/Grok отсутствуют`,empty_desc:`Войдите через xAI OAuth, чтобы увидеть квоту Grok.`,idle:`Не загружено. Нажмите "Обновить квоту".`,loading:`Загрузка квоты...`,load_failed:`Не удалось загрузить квоту: {{message}}`,missing_auth_index:`В файле авторизации отсутствует auth_index`,empty_data:`Данные по квоте отсутствуют`,refresh_button:`Обновить квоту`,fetch_all:`Получить все`,monthly_credits:`Месячные кредиты`,plan_label:`План`,plan_supergrok:`SuperGrok`,plan_supergrok_heavy:`SuperGrok Heavy`,pay_as_you_go_label:`Оплата по факту`,pay_as_you_go_enabled:`Включено, лимит {{cap}}`,pay_as_you_go_disabled:`Отключено`},vertex_import:{title:`Вход с Vertex JSON`,description:`Загрузите JSON ключа сервисного аккаунта Google, чтобы сохранить его как auth-dir/vertex-<project>.json по тем же правилам, что и помощник CLI vertex-import.`,location_label:`Регион (необязательно)`,location_placeholder:`us-central1`,location_hint:`Оставьте пустым, чтобы использовать регион us-central1 по умолчанию.`,file_label:`JSON ключ сервисного аккаунта`,file_hint:`Принимаются только JSON-файлы ключей сервисных аккаунтов Google Cloud.`,file_placeholder:`Файл не выбран`,choose_file:`Выбрать файл`,import_button:`Импортировать учётные данные Vertex`,file_required:`Сначала выберите файл учётных данных .json`,success:`Учётные данные Vertex успешно импортированы`,result_title:`Учётные данные сохранены`,result_project:`ID проекта`,result_email:`Сервисный аккаунт`,result_location:`Регион`,result_file:`Сохранённый файл`},oauth_excluded:{title:`Отключение OAuth-моделей`,description:`Отключения моделей по провайдерам отображаются карточками; нажмите карточку, чтобы изменить или удалить. Поддерживаются шаблоны *. Область зависит от фильтра файлов авторизации.`,add:`Добавить отключение`,add_title:`Добавление отключения моделей для провайдера`,edit_title:`Редактирование отключения моделей для {{provider}}`,refresh:`Обновить`,refreshing:`Обновляется...`,provider_label:`Провайдер`,provider_auto:`Следовать текущему фильтру`,provider_placeholder:`например: codex / openai`,provider_hint:`По умолчанию используется текущий фильтр; выберите существующего провайдера или введите новое имя.`,models_label:`Отключаемые модели`,models_loading:`Загрузка моделей...`,models_unsupported:`Текущая версия CPA не поддерживает загрузку списка моделей.`,models_loaded:`Загружено моделей: {{count}}. Отметьте модели, которые нужно отключить.`,no_models_available:`Для этого провайдера нет доступных моделей.`,save:`Сохранить/обновить`,saving:`Сохранение...`,save_success:`Отключение моделей обновлено`,save_failed:`Не удалось обновить отключение моделей`,delete:`Удалить провайдера`,delete_confirm:`Удалить отключение моделей для {{provider}}?`,delete_success:`Отключение моделей провайдера удалено`,delete_failed:`Не удалось удалить отключение моделей`,deleting:`Удаление...`,no_models:`Отключаемые модели не настроены`,model_count:`Отключено моделей: {{count}}`,list_empty_all:`Отключений моделей пока нет — используйте "Добавить отключение".`,list_empty_filtered:`В этой области нет отключённых моделей; нажмите "Добавить отключение".`,disconnected:`Подключитесь к серверу, чтобы просматривать отключение моделей`,load_failed:`Не удалось загрузить отключение моделей`,provider_required:`Сначала укажите провайдера`,scope_all:`Область: все провайдеры`,scope_provider:`Область: {{provider}}`,upgrade_required:`Текущая версия CPA не поддерживает отключение OAuth-моделей. Пожалуйста, обновите систему.`,upgrade_required_title:`Пожалуйста, обновите CLI Proxy API`,upgrade_required_desc:`Текущая версия сервера не поддерживает получение отключения OAuth-моделей. Обновите CPA (CLI Proxy API) до последней версии и повторите попытку.`},oauth_model_alias:{title:`Псевдонимы моделей OAuth`,add:`Добавить псевдоним`,add_title:`Добавление псевдонимов моделей провайдера`,provider_label:`Провайдер`,provider_placeholder:`например: codex / vertex`,provider_hint:`По умолчанию используется текущий фильтр; выберите существующего провайдера или введите новое имя.`,model_source_loading:`Загрузка моделей...`,model_source_unsupported:`Текущая версия CPA не поддерживает загрузку списка моделей (ручной ввод остаётся доступным).`,model_source_loaded:`Загружено моделей: {{count}}. Используйте выпадающий список "Исходная модель" или введите своё значение. Сохранение пустого списка удаляет провайдера. Включите "Сохранить оригинал", чтобы оставить исходное имя вместе с псевдонимом.`,alias_label:`Псевдонимы моделей`,alias_name_placeholder:`Исходное имя модели`,alias_placeholder:`Псевдоним (обязательно)`,duplicate_alias:`Каждый псевдоним этого провайдера должен быть уникальным.`,alias_fork_label:`Сохранить оригинал`,add_alias:`Добавить псевдоним`,save:`Сохранить/обновить`,save_success:`Псевдонимы моделей обновлены`,save_failed:`Не удалось обновить псевдонимы моделей`,delete:`Удалить провайдера`,delete_confirm:`Удалить псевдонимы моделей для {{provider}}?`,delete_link_title:`Убрать сопоставление`,delete_link_confirm:`Удалить сопоставление из <code>{{sourceModel}}</code> ({{provider}}) к псевдониму <code>{{alias}}</code>?`,delete_alias_title:`Удалить псевдоним`,delete_alias_confirm:`Удалить псевдоним <code>{{alias}}</code> и все связанные сопоставления?`,delete_success:`Псевдонимы моделей удалены`,delete_failed:`Не удалось удалить псевдонимы моделей`,no_models:`Псевдонимов нет`,model_count:`Количество псевдонимов: {{count}}`,list_empty_all:`Псевдонимы ещё не созданы — используйте "Добавить псевдоним".`,chart_title:`Обзор всех сопоставлений`,diagram_providers:`Провайдеры`,diagram_source_models:`Исходные модели`,diagram_aliases:`Псевдонимы`,diagram_expand:`Развернуть`,diagram_collapse:`Свернуть`,diagram_add_alias:`Добавить псевдоним`,diagram_rename:`Переименовать`,diagram_rename_alias_title:`Переименование псевдонима`,diagram_rename_alias_label:`Новое имя псевдонима`,diagram_rename_placeholder:`Введите имя псевдонима...`,diagram_delete_link:`Убрать связь {{provider}} / {{name}}`,diagram_delete_alias:`Удалить псевдоним`,diagram_please_enter_alias:`Введите имя псевдонима.`,diagram_alias_exists:`Этот псевдоним уже существует.`,diagram_add_alias_title:`Добавление псевдонима`,diagram_add_alias_label:`Имя псевдонима`,diagram_add_placeholder:`Введите новое имя псевдонима...`,diagram_rename_btn:`Переименовать`,diagram_add_btn:`Добавить`,diagram_settings:`Настройки`,diagram_settings_title:`Настройки псевдонима — {{alias}}`,diagram_settings_source_title:`Настройки исходной модели`,diagram_settings_empty:`Для этого псевдонима ещё нет сопоставлений.`,diagram_tap_hint:`На сенсорных устройствах: коснитесь исходной модели, затем псевдонима для связывания.`,view_mode:`Режим просмотра`,view_mode_diagram:`Диаграмма`,view_mode_list:`Список`,provider_required:`Сначала укажите провайдера`,upgrade_required:`Эта функция требует более новой версии CLI Proxy API (CPA). Обновите систему.`,upgrade_required_title:`Пожалуйста, обновите CLI Proxy API`,upgrade_required_desc:`Текущая версия сервера не поддерживает API псевдонимов моделей OAuth. Обновите CLI Proxy API (CPA) до последней версии.`},auth_login:{codex_oauth_title:`Codex OAuth`,codex_oauth_button:`Начать вход Codex`,codex_oauth_hint:`Выполните вход в сервис Codex через OAuth и автоматически получите/сохраните файлы авторизации.`,codex_oauth_url_label:`URL авторизации:`,codex_open_link:`Открыть ссылку`,codex_copy_link:`Скопировать ссылку`,codex_oauth_status_waiting:`Ожидание аутентификации...`,codex_oauth_status_success:`Аутентификация успешна!`,codex_oauth_status_error:`Ошибка аутентификации:`,codex_oauth_start_error:`Не удалось запустить Codex OAuth:`,codex_oauth_polling_error:`Не удалось проверить статус аутентификации:`,anthropic_oauth_title:`Anthropic OAuth`,anthropic_oauth_button:`Начать вход Anthropic`,anthropic_oauth_hint:`Выполните вход в сервис Anthropic (Claude) через OAuth и автоматически получите/сохраните файлы авторизации.`,anthropic_oauth_url_label:`URL авторизации:`,anthropic_open_link:`Открыть ссылку`,anthropic_copy_link:`Скопировать ссылку`,anthropic_oauth_status_waiting:`Ожидание аутентификации...`,anthropic_oauth_status_success:`Аутентификация успешна!`,anthropic_oauth_status_error:`Ошибка аутентификации:`,anthropic_oauth_start_error:`Не удалось запустить Anthropic OAuth:`,anthropic_oauth_polling_error:`Не удалось проверить статус аутентификации:`,antigravity_oauth_title:`Antigravity OAuth`,antigravity_oauth_button:`Начать вход Antigravity`,antigravity_oauth_hint:`Выполните вход в сервис Antigravity (Google) через OAuth и автоматически получите/сохраните файлы авторизации.`,antigravity_oauth_url_label:`URL авторизации:`,antigravity_open_link:`Открыть ссылку`,antigravity_copy_link:`Скопировать ссылку`,antigravity_oauth_status_waiting:`Ожидание аутентификации...`,antigravity_oauth_status_success:`Аутентификация успешна!`,antigravity_oauth_status_error:`Ошибка аутентификации:`,antigravity_oauth_start_error:`Не удалось запустить Antigravity OAuth:`,antigravity_oauth_polling_error:`Не удалось проверить статус аутентификации:`,kimi_oauth_title:`Kimi OAuth`,kimi_oauth_button:`Начать вход Kimi`,kimi_oauth_hint:`Выполните вход в сервис Kimi через поток авторизации устройства и автоматически получите/сохраните файлы авторизации.`,kimi_oauth_url_label:`URL авторизации:`,kimi_open_link:`Открыть ссылку`,kimi_copy_link:`Скопировать ссылку`,kimi_oauth_status_waiting:`Ожидание аутентификации...`,kimi_oauth_status_success:`Аутентификация успешна!`,kimi_oauth_status_error:`Ошибка аутентификации:`,kimi_oauth_start_error:`Не удалось запустить Kimi OAuth:`,kimi_oauth_polling_error:`Не удалось проверить статус аутентификации:`,xai_oauth_title:`xAI OAuth`,xai_oauth_button:`Начать вход xAI`,xai_oauth_hint:`Выполните вход в xAI Grok через OAuth и автоматически получите/сохраните файлы авторизации.`,xai_oauth_url_label:`URL авторизации:`,xai_open_link:`Открыть ссылку`,xai_copy_link:`Скопировать ссылку`,xai_oauth_status_waiting:`Ожидание аутентификации...`,xai_oauth_status_success:`Аутентификация успешна!`,xai_oauth_status_error:`Ошибка аутентификации:`,xai_oauth_start_error:`Не удалось запустить xAI OAuth:`,xai_oauth_polling_error:`Не удалось проверить статус аутентификации:`,xai_callback_label:`Callback URL или код`,xai_callback_placeholder:`Вставьте код со страницы Grok или полный callback URL`,xai_callback_hint:`Grok иногда показывает только код на странице. Вставьте этот код напрямую, приложение автоматически отправит его как http://127.0.0.1:56121/callback?...`,xai_callback_required:`Сначала вставьте код со страницы Grok или полный callback URL.`,xai_callback_state_missing:`Отсутствует state для этого входа xAI. Запустите вход xAI заново и затем отправьте код.`,oauth_callback_label:`Callback URL`,oauth_callback_placeholder:`http://localhost:1455/auth/callback?code=...&state=...`,oauth_callback_hint:`Режим удалённого браузера: после перенаправления провайдера на http://localhost:... скопируйте полный URL и отправьте его здесь.`,oauth_callback_button:`Отправить Callback URL`,oauth_callback_required:`Сначала вставьте полный URL перенаправления.`,oauth_callback_success:`Callback URL отправлен. Продолжайте ожидать аутентификацию.`,oauth_callback_error:`Не удалось отправить Callback URL:`,oauth_callback_upgrade_hint:`Обновите CLI Proxy API или проверьте подключение.`,oauth_callback_status_success:`Callback URL отправлен, ожидаем аутентификацию...`,oauth_callback_status_error:`Не удалось отправить Callback URL:`,missing_state:`Не удалось получить параметр состояния аутентификации`,login_another_account:`Войти в другой аккаунт`,view_auth_files:`Открыть файлы авторизации`,iflow_oauth_title:`iFlow OAuth`,iflow_oauth_button:`Начать вход iFlow`,iflow_oauth_hint:`Выполните вход в сервис iFlow через OAuth и автоматически получите/сохраните файлы авторизации.`,iflow_oauth_url_label:`URL авторизации:`,iflow_open_link:`Открыть ссылку`,iflow_copy_link:`Скопировать ссылку`,iflow_oauth_status_waiting:`Ожидание аутентификации...`,iflow_oauth_status_success:`Аутентификация успешна!`,iflow_oauth_status_error:`Ошибка аутентификации:`,iflow_oauth_start_error:`Не удалось запустить iFlow OAuth:`,iflow_oauth_polling_error:`Не удалось проверить статус аутентификации:`,remote_access_disabled:`Этот способ входа недоступен при удалённом доступе. Подключитесь с localhost.`},stats:{success:`Успех`,failure:`Сбой`},status_bar:{success_short:`✓`,failure_short:`✗`,no_requests:`Нет запросов`},service_health:{title:`Состояние сервиса`,window:`Последние 7 дней`,oldest:`Старые`,newest:`Новые`},logs:{title:`Просмотр журналов`,runtime_unknown:`Текущий режим: определяется`,runtime_cpa:`Текущий режим: CPA`,runtime_home:`Текущий режим: Home`,refresh_button:`Обновить журналы`,clear_button:`Очистить журналы`,fullscreen_button:`На весь экран`,exit_fullscreen_button:`Выйти из полноэкранного режима`,download_button:`Скачать журналы`,error_log_button:`Выбрать журнал ошибок`,error_logs_modal_title:`Журналы ошибок запросов`,error_logs_description:`Выберите файл журнала ошибок запроса, чтобы открыть или скачать его (создаётся только при отключённом журналировании запросов).`,error_logs_home_unavailable:`В режиме Home смотрите журналы базы данных на вкладке содержимого. Файлы ошибок запросов относятся только к файловым журналам CPA.`,error_logs_request_log_enabled:`Журналирование запросов включено, поэтому этот список всегда будет пустым. Отключите журналирование запросов и обновите список, чтобы просмотреть журналы ошибок.`,error_logs_empty:`Файлы журнала ошибок запросов не найдены`,error_logs_load_error:`Не удалось загрузить список журналов ошибок`,error_logs_size:`Размер`,error_logs_modified:`Изменён`,error_logs_open:`Открыть`,error_logs_download:`Скачать`,error_log_view_title:`Подробности журнала ошибок запроса`,error_log_open_failed:`Не удалось открыть журнал ошибок`,error_log_empty_content:`Этот журнал ошибок пуст`,error_log_copy_success:`Содержимое журнала ошибок скопировано`,error_log_download_success:`Журнал ошибок успешно скачан`,request_log_download_title:`Скачать журнал запросов`,request_log_download_confirm:`Скачать журнал запросов с идентификатором {{id}}?`,request_log_download_success:`Журнал запросов успешно скачан`,empty_title:`Журналы недоступны`,empty_desc:`Когда включена опция "Включить журналирование в файл", журналы появятся здесь`,cpa_file_logging_required:`Подключён режим CPA. Для просмотра журналов сначала включите запись журналов в файл.`,cpa_file_logging_required_title:`Требуется файловое журналирование`,cpa_file_logging_required_desc:`CPA читает этот журнал из локальных файлов. Включите logging-to-file в конфигурации и обновите страницу.`,file_logging_required:`Этот endpoint журналов требует включить запись журналов в файл перед чтением файловых журналов.`,file_logging_required_title:`Требуется файловое журналирование`,file_logging_required_desc:`Этот endpoint журналов читает локальные файлы. Включите logging-to-file в конфигурации и обновите страницу.`,home_clear_unavailable:`Журналы Home загружаются из базы данных и не могут быть очищены здесь.`,log_content:`Содержимое журнала`,loading:`Загрузка журналов...`,load_error:`Не удалось загрузить журналы`,clear_confirm:`Очистить все журналы? Действие нельзя отменить!`,clear_success:`Журналы успешно очищены`,download_success:`Журналы успешно скачаны`,auto_refresh:`Автообновление`,auto_refresh_enabled:`Автообновление включено`,auto_refresh_disabled:`Автообновление выключено`,load_more_hint:`Прокрутите вверх, чтобы загрузить ещё`,hidden_lines:`Скрыто: {{count}} строк`,loaded_lines:`Загружено: {{count}} строк`,filtered_lines:`Отфильтровано: {{count}} строк`,hide_management_logs:`Скрыть журналы {{prefix}}`,show_raw_logs:`Показать исходные журналы`,show_raw_logs_hint:`Показать текст журнала без обработки для удобного копирования в несколько строк`,search_placeholder:`Искать по содержимому или ключевым словам`,filter_panel_title:`Структурные фильтры`,filter_panel_expand:`Развернуть структурные фильтры`,filter_panel_collapse:`Свернуть структурные фильтры`,filter_panel_active_count:`Активно: {{count}}`,filter_method:`Метод`,filter_status:`Статус`,filter_path:`Путь`,filter_path_empty:`Нет доступных путей`,filter_status_2xx:`2xx`,filter_status_3xx:`3xx`,filter_status_4xx:`4xx`,filter_status_5xx:`5xx`,clear_filters:`Очистить фильтры`,search_empty_title:`Подходящих журналов не найдено`,search_empty_desc:`Попробуйте другой запрос или сбросьте фильтры.`,double_click_copy_hint:`Дважды нажмите, чтобы скопировать строку журнала`,copy_success:`Строка журнала скопирована`,copy_failed:`Не удалось скопировать`,lines:`строк`,removed:`Отфильтровано`,upgrade_required_title:`Обновите CLI Proxy API`,upgrade_required_desc:`Текущая версия сервера не поддерживает просмотр журналов. Обновите CLI Proxy API до последней версии, чтобы использовать эту функцию.`},config_management:JSON.parse(`{"title":"Панель конфигурации","editor_title":"Файл конфигурации","reload":"Перезагрузить","reload_confirm_message":"Перезагрузка отбросит ваши несохранённые изменения. Продолжить?","save":"Сохранить","description":"Редактируйте config.yaml через визуальный редактор или исходный файл","status_idle":"Ожидание действия","status_loading":"Загрузка конфигурации...","status_loading_short":"Загрузка","status_loaded":"Конфигурация загружена","status_loaded_short":"Загружено","status_dirty":"Есть несохранённые изменения","status_dirty_short":"Несохранено","status_disconnected":"Подключитесь к серверу, чтобы загрузить конфигурацию","status_disconnected_short":"Нет связи","status_load_failed":"Не удалось загрузить","status_load_failed_short":"Ошибка","status_saving":"Сохранение конфигурации...","status_saving_short":"Сохранение","status_saved":"Конфигурация сохранена","status_save_failed":"Не удалось сохранить","save_success":"Конфигурация успешно сохранена","error_yaml_not_supported":"Сервер не вернул YAML. Убедитесь, что доступна конечная точка /config.yaml.","visual_mode_unavailable":"Визуальный редактор недоступен, пока не исправлен синтаксис YAML","visual_mode_unavailable_short":"Ошибка YAML","validation_blocked_short":"Есть ошибки","visual_mode_unavailable_detail":"Визуальный редактор недоступен, потому что в конфигурации есть некорректный YAML: {{message}}","visual_mode_save_blocked":"Нельзя сохранять из визуального режима, пока не исправлен синтаксис YAML","visual_mode_latest_yaml_invalid":"Последняя конфигурация на сервере содержит некорректный YAML. Проверьте её в режиме исходника перед сохранением визуальных изменений: {{message}}","editor_placeholder":"key: value","search_placeholder":"Поиск по конфигурации...","search_button":"Поиск","search_no_results":"Нет результатов","search_prev":"Назад","search_next":"Вперёд","diff":{"title":"Обзор изменений","current":"Текущая","modified":"Изменённая","confirm":"Подтвердить","no_changes":"Изменений не обнаружено"},"tabs":{"visual":"Визуальный редактор","source":"Редактор файла"},"visual":{"notice":"Визуальный режим охватывает основные поля. Остальные параметры config.yaml по-прежнему нужно проверять или редактировать в режиме исходника.","quick_jump":"Быстрый переход","mode":{"simple":"Простой","full":"Полный","label":"Режим редактора","more_settings":"Переключитесь в полный режим, чтобы увидеть все разделы ({{total}})","validation_banner":"В некоторых дополнительных параметрах есть ошибки проверки, сохранение заблокировано. Переключитесь в полный режим, чтобы исправить их.","switch_to_full":"Перейти в полный режим"},"search":{"placeholder":"Поиск настроек (по названию или ключу YAML)","no_results":"Нет подходящих настроек"},"sections":{"connectivity":{"title":"Доступ и аутентификация","description":"Адрес сервера, порт, каталог аутентификации и ключи API"},"logging":{"title":"Логи и диагностика","description":"Отладка, вывод логов и статистика использования"},"advanced":{"title":"Дополнительно и эксперименты","description":"Подмена заголовков, кэш подписей, источники плагинов и другие редко изменяемые настройки","plugins_title":"Плагины","signature_title":"Подпись Antigravity"},"server":{"title":"Настройки сервера","description":"Базовые параметры сервера","host":"Адрес хоста","port":"Порт"},"tls":{"title":"Настройка TLS/SSL","description":"Параметры безопасного HTTPS-соединения","enable":"Включить TLS","enable_desc":"Включить безопасное HTTPS-соединение","cert":"Путь к сертификату","key":"Путь к закрытому ключу"},"remote":{"title":"Удалённое управление","description":"Настройки удалённого доступа и панели управления","allow_remote":"Разрешить удалённый доступ","allow_remote_desc":"Разрешить управление с других хостов","disable_panel":"Отключить панель","disable_panel_desc":"Отключить встроенную веб-панель управления","disable_auto_update_panel":"Отключить автообновление панели","disable_auto_update_panel_desc":"Скачивать панель при первом отсутствии, но не обновлять её автоматически с GitHub","secret_key":"Ключ управления","secret_key_placeholder":"Задайте ключ управления","panel_repo":"Репозиторий панели"},"auth":{"title":"Настройки аутентификации","description":"API-ключи и каталог аутентификации","auth_dir":"Каталог auth-dir","auth_dir_hint":"Путь к каталогу с файлами аутентификации (поддерживает ~)"},"system":{"title":"Системные настройки","description":"Отладка, журналирование, статистика и производительность","debug":"Режим отладки","debug_desc":"Включить подробные отладочные журналы","commercial_mode":"Коммерческий режим","commercial_mode_desc":"Отключить тяжёлое промежуточное ПО для поддержки высокой нагрузки","logging_to_file":"Журналировать в файл","logging_to_file_desc":"Сохранять журналы в файлы","plugins_enabled":"Включить систему плагинов","plugins_enabled_desc":"Включает загрузку стандартных dynamic-library плагинов; отдельные экземпляры управляются на странице плагинов","plugin_store_sources":"Сторонние источники плагинов","plugin_store_sources_desc":"Добавляет registry-источники магазина плагинов; встроенный официальный источник всегда сохраняется","plugin_store_sources_label":"URL registry источника плагинов (plugins.store-sources)","plugin_store_sources_placeholder":"https://example.com/cliproxy-plugins/registry.json","plugin_store_sources_hint":"Один URL registry.json в строке. Пустые строки отфильтровываются при сохранении","logs_max_size":"Максимальный размер файла журнала (МБ)","error_logs_max_files":"Файлов журнала ошибок","usage_statistics_enabled":"Включить статистику использования в памяти","usage_statistics_enabled_desc":"Агрегировать статистику использования запросов в памяти","redis_usage_retention":"Хранение очереди Redis usage (сек)","redis_usage_retention_hint":"Время хранения вывода RESP LPOP/RPOP в памяти, максимум 3600 секунд","antigravity_signature_cache":"Включить кэш подписей Antigravity","antigravity_signature_cache_desc":"Предпочитать и проверять кэшированные подписи thinking-блоков","antigravity_signature_strict":"Строгая проверка bypass-подписи","antigravity_signature_strict_desc":"Применяется только при отключённом кэше подписей; проверяет полное дерево Claude protobuf"},"headers":{"title":"Заголовки по умолчанию","description":"Заголовки по умолчанию для OAuth-запросов Claude и Codex, когда клиент их не отправил","claude_title":"Claude Header Defaults","codex_title":"Codex Header Defaults","user_agent":"User-Agent","package_version":"Package Version","runtime_version":"Runtime Version","os":"OS","arch":"Arch","timeout":"Timeout","stabilize_device":"Стабилизировать профиль устройства","stabilize_device_desc":"Фиксировать OS/Arch и стабилизировать программный отпечаток для учётных данных/API-ключа","beta_features":"Beta Features","codex_identity_confuse":"Codex identity-confuse","codex_identity_confuse_desc":"При fill-first routing или session affinity переопределяет Codex prompt_cache_key и installation identity под выбранную auth-запись"},"network":{"title":"Сетевые настройки","description":"Параметры прокси, повторов и маршрутизации","proxy_url":"URL прокси","request_retry":"Количество повторов запросов","max_retry_credentials":"Максимум учётных данных для повторов","max_retry_credentials_hint":"Оставьте пустым, чтобы не задавать поле. Значение 0 сохраняет legacy-поведение и позволяет перебрать все доступные учётные данные.","max_retry_interval":"Максимальный интервал повтора (сек)","auth_auto_refresh_workers":"Workers автообновления auth","auth_auto_refresh_workers_hint":"Если больше 0, переопределяет число workers по умолчанию (16)","disable_image_generation":"Отключить генерацию изображений","disable_image_generation_hint":"false включает; true отключает везде; chat отключает только инъекцию на не-image endpoints","disable_image_generation_false":"false (включено)","disable_image_generation_true":"true (отключено везде)","disable_image_generation_chat":"chat (только отключить chat-инъекцию)","gpt_image_2_base_model":"Базовая модель GPT Image 2","gpt_image_2_base_model_hint":"Основная модель для проксирования gpt-image-2 image-запросов; если пусто или неверно, backend использует значение по умолчанию","routing_strategy":"Стратегия маршрутизации","routing_strategy_hint":"Выберите стратегию подбора учётных данных","strategy_round_robin":"По кругу","strategy_fill_first":"Сначала заполнить","session_affinity_ttl":"TTL привязки сессии","force_model_prefix":"Принудительный префикс модели","force_model_prefix_desc":"Запросы к моделям без префикса используют только учётные данные без префикса","passthrough_headers":"Передавать upstream-заголовки","passthrough_headers_desc":"Передавать отфильтрованные upstream-заголовки ответа downstream-клиентам","disable_cooling":"Отключить cooldown","disable_cooling_desc":"Глобально отключить окна охлаждения auth/model после ошибок","session_affinity":"Маршрутизация с привязкой к сессии","ws_auth":"Аутентификация WebSocket","ws_auth_desc":"Включить аутентификацию WebSocket (/v1/ws)"},"quota":{"title":"Резерв по квоте","description":"Стратегия при превышении квоты","switch_project":"Переключить проект","switch_project_desc":"Автоматически переходить на другой проект при превышении квоты","switch_preview_model":"Переключить на preview-модель","switch_preview_model_desc":"Переключаться на preview-версию модели при превышении квоты","antigravity_credits":"Использовать Antigravity Credits"},"streaming":{"title":"Настройки стриминга","description":"Параметры keepalive и повторов запуска","keepalive_seconds":"Период keepalive (сек)","keepalive_hint":"Установите 0 или оставьте поле пустым, чтобы отключить keepalive","bootstrap_retries":"Повторы запуска","bootstrap_hint":"Количество попыток при запуске стрима (до первого байта)","nonstream_keepalive":"Интервал keepalive для нестиминговых ответов (сек)","nonstream_keepalive_hint":"Отправлять пустые строки каждые N секунд для нестиминговых ответов, чтобы избежать простоя; установите 0 или оставьте пустым для отключения","disabled":"Отключено"},"payload":{"title":"Настройки полезной нагрузки","description":"Значения по умолчанию, raw JSON-правила, правила переопределения и фильтрации","default_rules":"Правила по умолчанию","default_rules_desc":"Использовать эти значения, если параметр не указан в запросе","default_raw_rules":"Raw-правила по умолчанию","default_raw_rules_desc":"Если параметр отсутствует, записывать эти значения как raw JSON-фрагменты, например true, 123, \\"high\\" или {\\"type\\":\\"object\\"}","override_rules":"Правила переопределения","override_rules_desc":"Принудительно задавать значения параметров в запросе","override_raw_rules":"Raw-правила переопределения","override_raw_rules_desc":"Всегда перезаписывать значения как raw JSON-фрагменты; полезно для response_format, схем и других сложных полей","filter_rules":"Правила фильтрации","filter_rules_desc":"Предварительно фильтровать тело исходящего запроса через JSON Path, автоматически удалять несоответствующие или лишние параметры (санитизация запроса)"}},"api_keys":{"label":"Список API-ключей (api-keys)","add":"Добавить API-ключ","generate":"Сгенерировать","empty":"API-ключи отсутствуют","hint":"Каждая запись — это API-ключ (в том же стиле, что и на странице управления API-ключами)","edit_title":"Редактирование API-ключа","add_title":"Добавление API-ключа","input_label":"API-ключ","input_placeholder":"Вставьте API-ключ","input_hint":"Меняет только содержимое локального файла конфигурации, не синхронизируется с интерфейсом управления API-ключами","error_empty":"Введите API-ключ","error_invalid":"API-ключ содержит недопустимые символы"},"payload_rules":{"rule":"Правило","models":"Применимые модели","model_name":"Название модели","provider_type":"Тип провайдера","add_model":"Добавить модель","params":"Настройки параметров","remove_params":"Удалить параметры","json_path":"JSON Path (например, temperature)","json_path_filter":"JSON Path (gjson/sjson), например generationConfig.thinkingConfig.thinkingBudget","param_type":"Тип параметра","param_value":"Значение параметра","add_param":"Добавить параметр","no_rules":"Правил нет","add_rule":"Добавить правило","provider_default":"По умолчанию","provider_openai":"OpenAI","provider_openai_response":"OpenAI Response","provider_responses":"Responses","provider_gemini":"Gemini","provider_claude":"Claude","provider_codex":"Codex","provider_antigravity":"Antigravity","advanced":"Дополнительно","hide_advanced":"Скрыть дополнительно","from_protocol":"Исходный протокол (from-protocol)","headers":"Совпадения заголовков запроса","header_name":"Имя заголовка","header_value":"Значение заголовка","add_header":"Добавить заголовок","match":"Обязательные совпадения (match)","notMatch":"Запрещённые совпадения (not-match)","exist":"Обязательные пути (exist)","notExist":"Запрещённые пути (not-exist)","condition_path":"Путь условия","condition_value":"Значение условия","add_condition":"Добавить условие","value_type_string":"Строка","value_type_number":"Число","value_type_boolean":"Булево","value_type_json":"JSON","value_string":"Строковое значение","value_number":"Числовое значение (например, 0.7)","value_boolean":"true или false","value_json":"Значение JSON","value_raw_json":"Raw JSON-фрагмент, например true, 123, \\"high\\" или {\\"type\\":\\"object\\"}","value_default":"Значение","boolean_true":"true","boolean_false":"false"},"validation":{"validation_blocked":"Исправьте ошибки валидации перед сохранением","port_range":"Введите корректный порт от 1 до 65535","non_negative_integer":"Введите неотрицательное целое число","payload_invalid_number":"Введите корректное число","payload_invalid_boolean":"Выберите true или false","payload_invalid_json":"Введите корректный JSON"},"common":{"edit":"Изменить","delete":"Удалить","cancel":"Отменить","update":"Обновить","add":"Добавить"}}}`),quota_management:{title:`Управление квотами`,description:`Следите за статусом квот OAuth для учётных данных Antigravity, Codex, Claude, Kimi и xAI.`,refresh_files:`Обновить файлы авторизации`,refresh_files_and_quota:`Обновить файлы и квоты`,refresh_all_credentials:`Обновить все учётные данные`,card_idle_hint:`Используйте кнопку «Обновить все учётные данные» сверху, чтобы загрузить актуальные данные по квотам.`},plugin_management:{title:`Управление плагинами`,description:`Просматривайте найденные и зарегистрированные плагины, управляйте переключателями экземпляров, полями конфигурации и ссылками на ресурсы.`,refresh:`Обновить`,load_failed:`Не удалось загрузить плагины`,config_load_failed:`Не удалось прочитать конфигурацию плагина`,config_not_found:`Не удалось прочитать конфигурацию плагина: backend не нашёл этот плагин.`,unsupported_backend:`Текущий backend не предоставляет API управления плагинами. Используйте более новую сборку backend с эндпоинтами управления плагинами и перезапустите сервис.`,global_status:`Глобальный статус`,global_enabled:`Включено`,global_disabled:`Отключено`,global_disabled_hint:`plugins.enabled имеет значение false, поэтому включённые экземпляры плагинов не станут активными.`,plugins_dir:`Каталог плагинов`,discovered:`Найдено`,effective:`Активно`,search_placeholder:`Искать ID, имя, автора или ресурс плагина...`,search_label:`Поиск плагинов`,no_plugins:`Плагинов нет`,no_plugins_desc:`В каталоге плагинов и реестре времени выполнения плагины не найдены.`,configured:`Настроен`,not_configured:`Не настроен`,registered:`Зарегистрирован`,not_registered:`Не зарегистрирован`,oauth:`OAuth`,status_effective:`Активен`,status_inactive:`Неактивен`,version_label:`Версия`,author_label:`Автор`,path_label:`Путь`,edit_config:`Изменить конфиг`,open_resource:`Открыть ресурс`,open_repository:`Открыть репозиторий`,config_title:`Настроить {{name}}`,base_settings:`Базовые настройки`,enabled:`Включено`,enabled_hint:`Управляет полем enabled для этого экземпляра плагина в plugins.configs.`,priority:`Приоритет`,config_fields:`Поля конфигурации`,no_config_fields:`Этот плагин не объявляет визуальные поля конфигурации.`,select_placeholder:`Выберите`,array_item_placeholder:`Введите элемент массива`,add_array_item:`Добавить элемент массива`,remove_array_item:`Удалить элемент массива`,delete_plugin:`Удалить`,delete_confirm_title:`Удалить плагин`,delete_confirm_message:`Удалить {{name}} ({{id}})? Будут удалены локальный файл плагина и сохранённая конфигурация.`,delete_success:`Плагин удалён`,delete_failed:`Не удалось удалить плагин`,delete_restart_required:`Загруженный плагин можно удалить только после перезапуска backend.`,toggle_success:`Статус плагина обновлён`,toggle_failed:`Не удалось обновить статус плагина`,runtime_pending:`Изменение плагина сохранено, но состояние runtime ещё обновляется. Обновите страницу позже или проверьте логи backend.`,save_success:`Конфигурация плагина сохранена`,save_failed:`Не удалось сохранить конфигурацию плагина`,validation_failed:`Сначала исправьте ошибки формы конфигурации плагина`,invalid_priority:`Введите целочисленный приоритет`,invalid_number:`Введите корректное число`,invalid_integer:`Введите корректное целое число`,invalid_json:`Введите корректный JSON`,expected_array:`Введите JSON-массив`,expected_object:`Введите JSON-объект`,invalid_enum:`Выберите одно из объявленных значений enum`},plugin_store:{title:`Магазин плагинов`,description:`Просматривайте реестр плагинов, устанавливайте и обновляйте плагины для текущего бэкенда.`,description_show_more:`Показать больше`,description_show_less:`Свернуть`,source_name:`Источник: {{source}}`,cli_proxy_api_source:`Источник CLIProxyAPI`,refresh:`Обновить`,retry:`Повторить`,load_failed:`Не удалось загрузить магазин плагинов`,unsupported_backend:`Текущий бэкенд не предоставляет API магазина плагинов. Используйте новую сборку бэкенда с поддержкой магазина плагинов и перезапустите службу.`,registry_failed:`Не удалось обратиться к реестру плагинов`,global_status:`Глобальный статус`,global_enabled:`Включено`,global_disabled:`Отключено`,global_disabled_hint:`Параметр plugins.enabled выключен, поэтому установленные плагины не будут работать.`,plugins_dir:`Каталог плагинов`,stat_available:`Доступно`,search_placeholder:`Поиск по ID, названию, автору или тегу...`,search_label:`Поиск в магазине плагинов`,filter_label:`Фильтр по статусу установки`,filter_all:`Все`,filter_installed:`Установленные`,filter_not_installed:`Не установленные`,filter_updates:`Обновления`,badge_installed:`Установлен`,badge_update:`Доступно обновление`,badge_effective:`Активен`,version_arrow:`v{{from}} → v{{to}}`,install:`Установить`,update:`Обновить`,manage:`Управлять`,install_confirm_title:`Установка плагина`,install_confirm_message:`Скачать {{target}} из реестра плагинов и установить в локальный каталог плагинов?`,update_confirm_title:`Обновление плагина`,update_confirm_message:`Скачать и установить последнюю версию {{target}}?`,install_success:`Плагин установлен`,update_success:`Плагин обновлён`,install_failed:`Не удалось установить плагин`,update_failed:`Не удалось обновить плагин`,status_pending:`Файлы плагина обновлены, но локальный статус ещё не обновился. Обновите страницу позже или проверьте логи backend.`,registration_pending:`Файлы плагина обновлены, но регистрация ещё выполняется. Обновите страницу позже или проверьте логи backend.`,restart_required_notice:`Перезапустите службу, чтобы загрузить новую версию плагина`,restart_required_banner:`Перезапустите службу, чтобы применить новую версию: {{plugins}}`,open_repository:`Открыть репозиторий`,open_homepage:`Открыть сайт`,no_plugins:`Реестр пуст`,no_plugins_desc:`Реестр плагинов не вернул ни одного плагина.`,no_matches:`Нет подходящих плагинов`,no_matches_desc:`Нет плагинов, соответствующих текущему поиску или фильтру.`,clear_filters:`Сбросить фильтры`,security_banner_title:`Сторонние плагины работают с полным доступом к бэкенду`,security_banner_text:`Плагины выполняют код внутри прокси-сервиса и могут читать ваши учётные данные и трафик. Устанавливайте только плагины, которым доверяете, — особенно осторожно относитесь к плагинам, не опубликованным официальной организацией router-for-me.`,badge_untrusted:`Сторонний`,gate_title:`Установка {{name}}`,gate_title_update:`Обновление {{name}}`,gate_warning:`Если вы не прочитаете это, могут произойти неожиданные и опасные последствия.`,gate_effect_runs_code:`Этот плагин будет выполнять несертифицированный сторонний код внутри вашего прокси-бэкенда. Система не может изолировать или аудировать его поведение, и он может получить доступ к вашим конфиденциальным учётным данным, сетевым запросам и данным ответов.`,gate_effect_no_review:`Этот плагин не опубликован и не проверен официальной организацией router-for-me. Официальная организация не предоставляет никаких явных или подразумеваемых гарантий стабильности, безопасности, соответствия требованиям или любых изменений поведения в последующих версиях этого плагина.`,gate_effect_restart:`Установка изменяет локальный каталог плагинов и может потребовать перезапуска сервиса.`,gate_untrusted_alert:`Этот плагин не от официальной организации router-for-me. Продолжайте, только если полностью доверяете его автору и источнику.`,gate_repository_label:`Репозиторий`,gate_source_label:`Источник`,gate_step1_action:`Я хочу установить этот плагин`,gate_step2_action:`Я прочитал и понимаю эти риски`,gate_step3_prompt:`Для подтверждения введите «{{token}}» в поле ниже`,gate_step3_action:`Установить этот плагин`,gate_step3_hint:`Введите точный идентификатор, показанный выше, чтобы включить установку.`},system_info:{title:`Информация о центре управления`,about_title:`CLI Proxy API Management Center`,connection_status_title:`Статус подключения`,api_status_label:`Статус API:`,config_status_label:`Статус конфигурации:`,last_update_label:`Последнее обновление:`,cache_data:`Данные из кэша`,real_time_data:`Данные в реальном времени`,not_loaded:`Не загружено`,seconds_ago:`секунд назад`,models_title:`Доступные модели`,models_desc:`Показывает ответ /models и автоматически использует сохранённые API-ключи для авторизации.`,models_loading:`Загрузка доступных моделей...`,models_empty:`Сервис /models не вернул модели`,models_error:`Не удалось загрузить список моделей`,models_count:`Доступно моделей: {{count}}`,version_check_title:`Проверка обновлений`,version_check_desc:`Вызовите эндпоинт /latest-version, чтобы сравнить с версией сервера и узнать о доступных обновлениях.`,version_current_label:`Текущая версия`,version_latest_label:`Последняя версия`,version_check_button:`Проверить обновления`,version_check_idle:`Нажмите, чтобы проверить обновления`,version_checking:`Поиск последней версии...`,version_update_available:`Доступно обновление: {{version}}`,version_is_latest:`Установлена последняя версия`,version_check_error:`Не удалось проверить обновление`,version_current_missing:`Версия сервера недоступна; сравнение невозможно`,version_unknown:`Неизвестно`,quick_links_title:`Быстрые ссылки`,quick_links_desc:`Доступ к репозиториям проекта и документации для помощи и обновлений.`,link_main_repo:`Основной репозиторий`,link_main_repo_desc:`Исходный код основной программы CLI Proxy API`,link_webui_repo:`Репозиторий WebUI`,link_webui_repo_desc:`Исходный код фронтенда центра управления`,link_docs:`Документация`,link_docs_desc:`Учебные пособия и руководства по настройке`,clear_login_title:`Локальные данные входа`,clear_login_desc:`Очистите локально сохранённые данные входа и выполните выход.`,clear_login_button:`Очистить данные входа`,clear_login_confirm:`Очистить локальные данные входа и выйти?`},notification:{debug_updated:`Настройки отладки обновлены`,proxy_updated:`Настройки прокси обновлены`,proxy_cleared:`Настройки прокси очищены`,retry_updated:`Настройки повторов обновлены`,quota_switch_project_updated:`Настройки переключения проектов обновлены`,quota_switch_preview_updated:`Настройки переключения на preview-модель обновлены`,logging_to_file_updated:`Настройки журналирования обновлены`,logs_max_total_size_updated:`Лимит размера журналов обновлён`,request_log_updated:`Настройка журналирования запросов обновлена`,force_model_prefix_updated:`Настройка префикса модели обновлена`,ws_auth_updated:`Настройка аутентификации WebSocket обновлена`,routing_strategy_updated:`Стратегия маршрутизации обновлена`,login_storage_cleared:`Локальные данные входа очищены`,api_key_added:`API-ключ успешно добавлен`,api_key_updated:`API-ключ успешно обновлён`,api_key_deleted:`API-ключ успешно удалён`,api_key_invalid_chars:`API-ключ может содержать только буквы, цифры и символы`,gemini_key_added:`Ключ Gemini успешно добавлен`,gemini_key_updated:`Ключ Gemini успешно обновлён`,gemini_key_deleted:`Ключ Gemini успешно удалён`,gemini_multi_input_required:`Введите хотя бы один ключ Gemini`,gemini_multi_failed:`Пакетное добавление Gemini не удалось`,gemini_multi_summary:`Пакетное добавление Gemini завершено: добавлено {{success}}, пропущено {{skipped}}, ошибок {{failed}}`,codex_config_added:`Конфигурация Codex успешно добавлена`,codex_config_updated:`Конфигурация Codex успешно обновлена`,codex_config_deleted:`Конфигурация Codex успешно удалена`,codex_base_url_required:`Введите базовый URL Codex`,claude_config_added:`Конфигурация Claude успешно добавлена`,claude_config_updated:`Конфигурация Claude успешно обновлена`,claude_config_deleted:`Конфигурация Claude успешно удалена`,vertex_config_added:`Конфигурация Vertex успешно добавлена`,vertex_config_updated:`Конфигурация Vertex успешно обновлена`,vertex_config_deleted:`Конфигурация Vertex успешно удалена`,config_enabled:`Конфигурация включена`,config_disabled:`Конфигурация выключена`,field_required:`Обязательные поля не могут быть пустыми`,openai_provider_required:`Заполните имя провайдера и базовый URL`,openai_provider_added:`Провайдер OpenAI успешно добавлен`,openai_provider_updated:`Провайдер OpenAI успешно обновлён`,openai_provider_deleted:`Провайдер OpenAI успешно удалён`,openai_model_name_required:`Введите имя модели`,openai_test_url_required:`Укажите корректный базовый URL перед тестированием`,openai_test_key_required:`Добавьте хотя бы один API-ключ перед тестированием`,openai_test_model_required:`Выберите модель для теста`,data_refreshed:`Данные успешно обновлены`,connection_required:`Сначала установите подключение`,refresh_failed:`Не удалось обновить`,update_failed:`Не удалось обновить`,add_failed:`Не удалось добавить`,delete_failed:`Не удалось удалить`,upload_failed:`Не удалось загрузить`,download_failed:`Не удалось скачать`,login_failed:`Вход не выполнен`,please_enter:`Пожалуйста, введите`,please_fill:`Пожалуйста, заполните`,provider_name_url:`имя провайдера и базовый URL`,api_key:`API-ключ`,gemini_api_key:`API-ключ Gemini`,codex_api_key:`API-ключ Codex`,claude_api_key:`API-ключ Claude`,commercial_mode_restart_required:`Режим коммерческого использования изменён. Перезапустите сервис, чтобы применить изменения`,copy_failed:`Не удалось скопировать`,link_copied:`Ссылка скопирована в буфер обмена`},language:{switch:`Язык`,chinese:`中文`,chinese_tw:`繁體中文(台灣)`,english:`English`,russian:`Русский`},theme:{switch:`Тема`,light:`Шерстяная бумага`,white:`Чисто-белая`,dark:`Тёмная`,switch_to_light:`Переключиться на тему «Шерстяная бумага»`,switch_to_dark:`Переключиться на тёмную тему`,auto:`Следовать системе`},sidebar:{toggle_expand:`Развернуть боковую панель`,toggle_collapse:`Свернуть боковую панель`},footer:{api_version:`Версия CLI Proxy API`,build_date:`Время сборки`,version:`Версия интерфейса управления`,author:`Автор`},providersPage:{header:{title:`AI Провайдеры`,activeResources:`{{active}}/{{total}} активных`,providerFamilies:`{{count}} семейств`,updatedAt:`Обновлено {{time}}`,issueCount:`{{count}} проблем`},actions:{refresh:`Обновить`,syncing:`Синхронизация`,new:`Создать`,edit:`Изменить`,view:`Просмотр`,delete:`Удалить`,clear:`Очистить`,cancel:`Отмена`,save:`Сохранить`,create:`Создать`,enable:`Включить`,disable:`Отключить`},categories:{title:`Провайдеры`,activeCount:`{{active}}/{{total}} активных`},providerNames:{gemini:`Gemini`,codex:`Codex`,claude:`Claude`,vertex:`Vertex`,openaiCompatibility:`OpenAI-совместимый`},table:{key:`Ключ`,baseUrl:`Base URL`,prefix:`Префикс`,models:`Модели/Заголовки`,status:`Статус`,actions:`Действия`,metrics:{models:`Модели`,keys:`Ключи`,headers:`Заголовки`},websocketsTag:`WebSockets`,cloakTag:`Cloak`,empty:`Нет ресурсов, нажмите "Создать".`,filterPlaceholder:`Поиск по ключам, URL, префиксам…`,description:`Управление ресурсами {{route}}`,providerIssue:`Проблема с провайдером`},status:{active:`Активен`,disabled:`Отключён`,notSet:`Не задано`,none:`Нет`,notConfigured:`Не настроено`,defaultSuffix:`(по умолчанию)`},detail:{title:`Подробности`,metadataTitle:`Метаданные`,fields:{identifier:`Идентификатор`,baseUrl:`Base URL`,proxyUrl:`Proxy URL`,prefix:`Префикс`,models:`Моделей`,headers:`Заголовков`,authIndex:`Auth Index`,excludedModels:`Исключённых моделей`,apiKeyEntries:`API-ключей`}},form:{createEyebrow:`Создать`,editEyebrow:`Изменить`,name:`Название`,apiKey:`API-ключ`,apiKeyCreatePlaceholder:`Введите API-ключ`,apiKeyEditPlaceholder:`Оставьте пустым, чтобы не менять`,baseUrl:`Base URL`,baseUrlRequiredHint:`Обязательно для этого провайдера`,proxyUrl:`Proxy URL`,prefix:`Префикс`,priority:`Приоритет`,disabled:`Отключить эту запись`,disabledHint:`Отключённые записи не используются шлюзом`,websockets:`Включить WebSockets`,testModel:`Тестовая модель`,testModelClaudeHint:`Используется только для проверки соединения; не сохраняется`,testModelAutoWith:`Авто · {{name}}`,testModelAutoEmpty:`Авто (модели ещё не добавлены)`,testModelCustom:`{{name}} (своя)`,modelsSection:`Пользовательские модели`,addModel:`Добавить модель`,headersSection:`Заголовки запроса`,addHeader:`Добавить заголовок`,headers:`Заголовки`,headersHint:`По одному в строке, формат Key: Value`,excludedSection:`Исключённые модели`,excludedHint:`По одной модели в строке; совпавшие модели не будут направлены`,cloakSection:`Настройки Cloak`,cloakMode:`Режим`,cloakStrict:`Строгий режим`,cloakSensitiveWords:`Стоп-слова (по одному в строке)`,apiKeyEntriesSection:`API-ключи`,apiKeyEntry:`Ключ #{{index}}`,addApiKeyEntry:`Добавить ключ`,showApiKey:`Показать ключ API`,hideApiKey:`Скрыть ключ API`,disableCooling:`Отключить cooldown`,disableCoolingHint:`Отключает окна охлаждения после ошибок только для этой записи`,modelEntry:`Модель #{{index}}`,modelImage:`Разрешить image endpoints`,modelImageHint:`Разрешить модель для /v1/images/generations и /v1/images/edits`,thinkingConfig:`Thinking config (JSON)`,thinkingConfigHint:`Поддерживает levels, min, max, zero_allowed, dynamic_allowed`,cloakCacheUserId:`Кэшировать user_id`,cloakCacheUserIdHint:`Переиспользовать Claude cloak user_id для каждого API-ключа`,experimentalCchSigning:`Экспериментальная CCH-подпись`,experimentalCchSigningHint:`Подписывать финальное тело cloaked Claude /v1/messages через CCH`,validation:{nameRequired:`Название обязательно`,apiKeyRequired:`Нужен хотя бы один API-ключ`,baseUrlRequired:`Base URL обязателен`}},delete:{title:`Удалить ресурс`,confirm:`Удалить {{name}}? Действие необратимо.`},toast:{created:`Создано`,updated:`Обновлено`,deleted:`Удалено`,enabled:`Включено`,disabled:`Отключено`,toggleFailed:`Не удалось обновить статус`},unsavedChanges:{title:`Отменить несохранённые изменения?`,message:`В форме есть несохранённые изменения. При закрытии они будут потеряны.`,discard:`Отменить изменения`,keepEditing:`Продолжить`},connectivity:{test:`Проверить`,testAll:`Проверить все`,success:`Доступно`,baseUrlRequired:`Base URL обязателен`,endpointInvalid:`Некорректный адрес`,apiKeyRequired:`API-ключ обязателен`,modelRequired:`Нужна тестовая модель`,timeout:`Таймаут после {{seconds}} с`,requestFailed:`Запрос не выполнен`},discovery:{openButton:`Получить с конечной точки`,searchPlaceholder:`Поиск моделей`,reload:`Обновить`,loading:`Загрузка моделей…`,empty:`Конечная точка не вернула моделей`,notLoaded:`Нажмите Обновить, чтобы загрузить модели`,selectAll:`Выбрать все`,clearAll:`Снять выбор`,selectedCount:`{{selected}} / {{total}}`,alreadyAdded:`Уже добавлено`,close:`Закрыть`,apply:`Применить ({{count}})`},toolbar:{sortBy:`Сортировка`,sort:{name:`Имя`,priority:`Приоритет`,recentSuccess:`Недавние успехи`,directionAsc:`По возрастанию`,directionDesc:`По убыванию`},filter:{allModels:`Все модели`,selectedModels:`{{selected}}/{{total}} моделей`,selectAll:`Выбрать все`,clear:`Очистить`,empty:`Модели ещё не настроены`}},modelCatalog:{notLoaded:`Не загружено`}}},Yc=[`zh-tw`,`zh-hk`,`zh-mo`,`zh-hant`],Xc=e=>Nc.includes(e),Zc=e=>{try{let t=JSON.parse(e),n=t?.state?.language??t?.language??t;if(typeof n==`string`&&Xc(n))return n}catch{if(Xc(e))return e}return null},Qc=()=>{if(typeof window>`u`)return null;try{let e=localStorage.getItem(Ac);return e?Zc(e):null}catch{return null}},$c=()=>{if(typeof navigator>`u`)return`zh-CN`;let e=(navigator.languages?.[0]||navigator.language||`zh-CN`).toLowerCase();return Yc.some(t=>e.startsWith(t))?`zh-TW`:e.startsWith(`zh`)?`zh-CN`:e.startsWith(`ru`)?`ru`:`en`},el=()=>Qc()??$c();Qa.use(Ho).init({resources:{"zh-CN":{translation:Gc},"zh-TW":{translation:Kc},en:{translation:qc},ru:{translation:Jc}},lng:el(),fallbackLng:`zh-CN`,interpolation:{escapeValue:!1},react:{useSuspense:!1}});var tl=Qa,nl=uc()(Rc((e,t)=>({language:el(),setLanguage:t=>{Xc(t)&&(tl.changeLanguage(t),e({language:t}))},toggleLanguage:()=>{let{language:e,setLanguage:n}=t(),r=jc[(jc.indexOf(e)+1)%jc.length];n(r)}}),{name:Ac,merge:(e,t)=>{let n=e?.language;return typeof n==`string`&&Xc(n)?{...t,...e,language:n}:t}})),rl=`enc::v1::`,il=`cli-proxy-api-webui::secure-storage`,al=null;function ol(e){return new TextEncoder().encode(e)}function sl(e){return new TextDecoder().decode(e)}function cl(){if(al)return al;try{let e=window.location.host,t=navigator.userAgent;al=ol(`${il}|${e}|${t}`)}catch(e){console.warn(`Obfuscation fallback to simple key:`,e),al=ol(il)}return al}function ll(e,t){let n=new Uint8Array(e.length);for(let r=0;r<e.length;r++)n[r]=e[r]^t[r%t.length];return n}function ul(e){let t=``;for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function dl(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}function fl(e){if(!e)return e;try{let t=cl();return`${rl}${ul(ll(ol(e),t))}`}catch(t){return console.warn(`Obfuscation failed, fallback to plaintext:`,t),e}}function pl(e){if(!e||!e.startsWith(rl))return e;try{return sl(ll(dl(e.slice(9)),cl()))}catch(t){return console.warn(`Deobfuscation failed, return as-is:`,t),e}}function ml(e){return e?.startsWith(rl)||!1}var hl=new class{setItem(e,t,n={}){let r=n.obfuscate??n.encrypt??!0;if(t==null){this.removeItem(e);return}let i=JSON.stringify(t),a=r?fl(i):i;localStorage.setItem(e,a)}getItem(e,t={}){let n=t.obfuscate??t.encrypt??!0,r=localStorage.getItem(e);if(r===null)return null;try{let e=n?pl(r):r;return JSON.parse(e)}catch{try{return n&&ml(r)?pl(r):r}catch{return null}}}removeItem(e){localStorage.removeItem(e)}migratePlaintextKeys(e){e.forEach(e=>{let t=localStorage.getItem(e);if(!t||ml(t))return;let n=t;try{n=JSON.parse(t)}catch{n=t}try{this.setItem(e,n)}catch(t){console.warn(`Failed to migrate key "${e}":`,t)}})}};function gl(e,t){return function(){return e.apply(t,arguments)}}var{toString:_l}=Object.prototype,{getPrototypeOf:vl}=Object,{iterator:yl,toStringTag:bl}=Symbol,xl=(e=>t=>{let n=_l.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Sl=e=>(e=e.toLowerCase(),t=>xl(t)===e),Cl=e=>t=>typeof t===e,{isArray:wl}=Array,Tl=Cl(`undefined`);function El(e){return e!==null&&!Tl(e)&&e.constructor!==null&&!Tl(e.constructor)&&Al(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var Dl=Sl(`ArrayBuffer`);function Ol(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Dl(e.buffer),t}var kl=Cl(`string`),Al=Cl(`function`),jl=Cl(`number`),Ml=e=>typeof e==`object`&&!!e,Nl=e=>e===!0||e===!1,Pl=e=>{if(xl(e)!==`object`)return!1;let t=vl(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(bl in e)&&!(yl in e)},Fl=e=>{if(!Ml(e)||El(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Il=Sl(`Date`),Ll=Sl(`File`),Rl=e=>!!(e&&e.uri!==void 0),zl=e=>e&&e.getParts!==void 0,Bl=Sl(`Blob`),Vl=Sl(`FileList`),Hl=e=>Ml(e)&&Al(e.pipe);function Ul(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}}var Wl=Ul(),Gl=Wl.FormData===void 0?void 0:Wl.FormData,Kl=e=>{if(!e)return!1;if(Gl&&e instanceof Gl)return!0;let t=vl(e);if(!t||t===Object.prototype||!Al(e.append))return!1;let n=xl(e);return n===`formdata`||n===`object`&&Al(e.toString)&&e.toString()===`[object FormData]`},ql=Sl(`URLSearchParams`),[Jl,Yl,Xl,Zl]=[`ReadableStream`,`Request`,`Response`,`Headers`].map(Sl),Ql=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``);function $l(e,t,{allOwnKeys:n=!1}={}){if(e==null)return;let r,i;if(typeof e!=`object`&&(e=[e]),wl(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(El(e))return;let i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length,o;for(r=0;r<a;r++)o=i[r],t.call(null,e[o],o,e)}}function eu(e,t){if(El(e))return null;t=t.toLowerCase();let n=Object.keys(e),r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}var tu=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global,nu=e=>!Tl(e)&&e!==tu;function ru(){let{caseless:e,skipUndefined:t}=nu(this)&&this||{},n={},r=(r,i)=>{if(i===`__proto__`||i===`constructor`||i===`prototype`)return;let a=e&&eu(n,i)||i;Pl(n[a])&&Pl(r)?n[a]=ru(n[a],r):Pl(r)?n[a]=ru({},r):wl(r)?n[a]=r.slice():(!t||!Tl(r))&&(n[a]=r)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&$l(arguments[e],r);return n}var iu=(e,t,n,{allOwnKeys:r}={})=>($l(t,(t,r)=>{n&&Al(t)?Object.defineProperty(e,r,{value:gl(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),au=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),ou=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,`constructor`,{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,`super`,{value:t.prototype}),n&&Object.assign(e.prototype,n)},su=(e,t,n,r)=>{let i,a,o,s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&vl(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},cu=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},lu=e=>{if(!e)return null;if(wl(e))return e;let t=e.length;if(!jl(t))return null;let n=Array(t);for(;t-- >0;)n[t]=e[t];return n},uu=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&vl(Uint8Array)),du=(e,t)=>{let n=(e&&e[yl]).call(e),r;for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},fu=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},pu=Sl(`HTMLFormElement`),mu=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),hu=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),gu=Sl(`RegExp`),_u=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};$l(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},vu=e=>{_u(e,(t,n)=>{if(Al(e)&&[`arguments`,`caller`,`callee`].indexOf(n)!==-1)return!1;let r=e[n];if(Al(r)){if(t.enumerable=!1,`writable`in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)})}})},yu=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return wl(e)?r(e):r(String(e).split(t)),n},bu=()=>{},xu=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Su(e){return!!(e&&Al(e.append)&&e[bl]===`FormData`&&e[yl])}var Cu=e=>{let t=Array(10),n=(e,r)=>{if(Ml(e)){if(t.indexOf(e)>=0)return;if(El(e))return e;if(!(`toJSON`in e)){t[r]=e;let i=wl(e)?[]:{};return $l(e,(e,t)=>{let a=n(e,r+1);!Tl(a)&&(i[t]=a)}),t[r]=void 0,i}}return e};return n(e,0)},wu=Sl(`AsyncFunction`),Tu=e=>e&&(Ml(e)||Al(e))&&Al(e.then)&&Al(e.catch),Eu=((e,t)=>e?setImmediate:t?((e,t)=>(tu.addEventListener(`message`,({source:n,data:r})=>{n===tu&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),tu.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,Al(tu.postMessage)),R={isArray:wl,isArrayBuffer:Dl,isBuffer:El,isFormData:Kl,isArrayBufferView:Ol,isString:kl,isNumber:jl,isBoolean:Nl,isObject:Ml,isPlainObject:Pl,isEmptyObject:Fl,isReadableStream:Jl,isRequest:Yl,isResponse:Xl,isHeaders:Zl,isUndefined:Tl,isDate:Il,isFile:Ll,isReactNativeBlob:Rl,isReactNative:zl,isBlob:Bl,isRegExp:gu,isFunction:Al,isStream:Hl,isURLSearchParams:ql,isTypedArray:uu,isFileList:Vl,forEach:$l,merge:ru,extend:iu,trim:Ql,stripBOM:au,inherits:ou,toFlatObject:su,kindOf:xl,kindOfTest:Sl,endsWith:cu,toArray:lu,forEachEntry:du,matchAll:fu,isHTMLForm:pu,hasOwnProperty:hu,hasOwnProp:hu,reduceDescriptors:_u,freezeMethods:vu,toObjectSet:yu,toCamelCase:mu,noop:bu,toFiniteNumber:xu,findKey:eu,global:tu,isContextDefined:nu,isSpecCompliantForm:Su,toJSONObject:Cu,isAsyncFn:wu,isThenable:Tu,setImmediate:Eu,asap:typeof queueMicrotask<`u`?queueMicrotask.bind(tu):typeof process<`u`&&process.nextTick||Eu,isIterable:e=>e!=null&&Al(e[yl])},z=class e extends Error{static from(t,n,r,i,a,o){let s=new e(t.message,n||t.code,r,i,a);return s.cause=t,s.name=t.name,t.status!=null&&s.status==null&&(s.status=t.status),o&&Object.assign(s,o),s}constructor(e,t,n,r,i){super(e),Object.defineProperty(this,`message`,{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name=`AxiosError`,this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:R.toJSONObject(this.config),code:this.code,status:this.status}}};z.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,z.ERR_BAD_OPTION=`ERR_BAD_OPTION`,z.ECONNABORTED=`ECONNABORTED`,z.ETIMEDOUT=`ETIMEDOUT`,z.ERR_NETWORK=`ERR_NETWORK`,z.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,z.ERR_DEPRECATED=`ERR_DEPRECATED`,z.ERR_BAD_RESPONSE=`ERR_BAD_RESPONSE`,z.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,z.ERR_CANCELED=`ERR_CANCELED`,z.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,z.ERR_INVALID_URL=`ERR_INVALID_URL`,z.ERR_FORM_DATA_DEPTH_EXCEEDED=`ERR_FORM_DATA_DEPTH_EXCEEDED`;function Du(e){return R.isPlainObject(e)||R.isArray(e)}function Ou(e){return R.endsWith(e,`[]`)?e.slice(0,-2):e}function ku(e,t,n){return e?e.concat(t).map(function(e,t){return e=Ou(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function Au(e){return R.isArray(e)&&!e.some(Du)}var ju=R.toFlatObject(R,{},null,function(e){return/^is[A-Z]/.test(e)});function Mu(e,t,n){if(!R.isObject(e))throw TypeError(`target must be an object`);t=t||new FormData,n=R.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!R.isUndefined(t[e])});let r=n.metaTokens,i=n.visitor||d,a=n.dots,o=n.indexes,s=n.Blob||typeof Blob<`u`&&Blob,c=n.maxDepth===void 0?100:n.maxDepth,l=s&&R.isSpecCompliantForm(t);if(!R.isFunction(i))throw TypeError(`visitor must be a function`);function u(e){if(e===null)return``;if(R.isDate(e))return e.toISOString();if(R.isBoolean(e))return e.toString();if(!l&&R.isBlob(e))throw new z(`Blob is not supported. Use a Buffer instead.`);return R.isArrayBuffer(e)||R.isTypedArray(e)?l&&typeof Blob==`function`?new Blob([e]):Buffer.from(e):e}function d(e,n,i){let s=e;if(R.isReactNative(t)&&R.isReactNativeBlob(e))return t.append(ku(i,n,a),u(e)),!1;if(e&&!i&&typeof e==`object`){if(R.endsWith(n,`{}`))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(R.isArray(e)&&Au(e)||(R.isFileList(e)||R.endsWith(n,`[]`))&&(s=R.toArray(e)))return n=Ou(n),s.forEach(function(e,r){!(R.isUndefined(e)||e===null)&&t.append(o===!0?ku([n],r,a):o===null?n:n+`[]`,u(e))}),!1}return Du(e)?!0:(t.append(ku(i,n,a),u(e)),!1)}let f=[],p=Object.assign(ju,{defaultVisitor:d,convertValue:u,isVisitable:Du});function m(e,n,r=0){if(!R.isUndefined(e)){if(r>c)throw new z(`Object is too deeply nested (`+r+` levels). Max depth: `+c,z.ERR_FORM_DATA_DEPTH_EXCEEDED);if(f.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));f.push(e),R.forEach(e,function(e,a){(!(R.isUndefined(e)||e===null)&&i.call(t,e,R.isString(a)?a.trim():a,n,p))===!0&&m(e,n?n.concat(a):[a],r+1)}),f.pop()}}if(!R.isObject(e))throw TypeError(`data must be an object`);return m(e),t}function Nu(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function Pu(e,t){this._pairs=[],e&&Mu(e,this,t)}var Fu=Pu.prototype;Fu.append=function(e,t){this._pairs.push([e,t])},Fu.toString=function(e){let t=e?function(t){return e.call(this,t,Nu)}:Nu;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)};function Iu(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`)}function Lu(e,t,n){if(!t)return e;let r=n&&n.encode||Iu,i=R.isFunction(n)?{serialize:n}:n,a=i&&i.serialize,o;if(o=a?a(t,i):R.isURLSearchParams(t)?t.toString():new Pu(t,i).toString(r),o){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+o}return e}var Ru=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){R.forEach(this.handlers,function(t){t!==null&&e(t)})}},zu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Bu={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<`u`?URLSearchParams:Pu,FormData:typeof FormData<`u`?FormData:null,Blob:typeof Blob<`u`?Blob:null},protocols:[`http`,`https`,`file`,`blob`,`url`,`data`]},Vu=c({hasBrowserEnv:()=>Hu,hasStandardBrowserEnv:()=>Wu,hasStandardBrowserWebWorkerEnv:()=>Gu,navigator:()=>Uu,origin:()=>Ku}),Hu=typeof window<`u`&&typeof document<`u`,Uu=typeof navigator==`object`&&navigator||void 0,Wu=Hu&&(!Uu||[`ReactNative`,`NativeScript`,`NS`].indexOf(Uu.product)<0),Gu=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`,Ku=Hu&&window.location.href||`http://localhost`,qu={...Vu,...Bu};function Ju(e,t){return Mu(e,new qu.classes.URLSearchParams,{visitor:function(e,t,n,r){return qu.isNode&&R.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)},...t})}function Yu(e){return R.matchAll(/\w+|\[(\w*)]/g,e).map(e=>e[0]===`[]`?``:e[1]||e[0])}function Xu(e){let t={},n=Object.keys(e),r,i=n.length,a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function Zu(e){function t(e,n,r,i){let a=e[i++];if(a===`__proto__`)return!0;let o=Number.isFinite(+a),s=i>=e.length;return a=!a&&R.isArray(r)?r.length:a,s?(R.hasOwnProp(r,a)?r[a]=R.isArray(r[a])?r[a].concat(n):[r[a],n]:r[a]=n,!o):((!r[a]||!R.isObject(r[a]))&&(r[a]=[]),t(e,n,r[a],i)&&R.isArray(r[a])&&(r[a]=Xu(r[a])),!o)}if(R.isFormData(e)&&R.isFunction(e.entries)){let n={};return R.forEachEntry(e,(e,r)=>{t(Yu(e),r,n,0)}),n}return null}var Qu=(e,t)=>e!=null&&R.hasOwnProp(e,t)?e[t]:void 0;function $u(e,t,n){if(R.isString(e))try{return(t||JSON.parse)(e),R.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}var ed={transitional:zu,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=R.isObject(e);if(i&&R.isHTMLForm(e)&&(e=new FormData(e)),R.isFormData(e))return r?JSON.stringify(Zu(e)):e;if(R.isArrayBuffer(e)||R.isBuffer(e)||R.isStream(e)||R.isFile(e)||R.isBlob(e)||R.isReadableStream(e))return e;if(R.isArrayBufferView(e))return e.buffer;if(R.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let a;if(i){let t=Qu(this,`formSerializer`);if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return Ju(e,t).toString();if((a=R.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let n=Qu(this,`env`),r=n&&n.FormData;return Mu(a?{"files[]":e}:e,r&&new r,t)}}return i||r?(t.setContentType(`application/json`,!1),$u(e)):e}],transformResponse:[function(e){let t=Qu(this,`transitional`)||ed.transitional,n=t&&t.forcedJSONParsing,r=Qu(this,`responseType`),i=r===`json`;if(R.isResponse(e)||R.isReadableStream(e))return e;if(e&&R.isString(e)&&(n&&!r||i)){let n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,Qu(this,`parseReviver`))}catch(e){if(n)throw e.name===`SyntaxError`?z.from(e,z.ERR_BAD_RESPONSE,this,null,Qu(this,`response`)):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:qu.classes.FormData,Blob:qu.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}};R.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`],e=>{ed.headers[e]={}});var td=R.toObjectSet([`age`,`authorization`,`content-length`,`content-type`,`etag`,`expires`,`from`,`host`,`if-modified-since`,`if-unmodified-since`,`last-modified`,`location`,`max-forwards`,`proxy-authorization`,`referer`,`retry-after`,`user-agent`]),nd=e=>{let t={},n,r,i;return e&&e.split(`
|
||
`).forEach(function(e){i=e.indexOf(`:`),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!(!n||t[n]&&td[n])&&(n===`set-cookie`?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+`, `+r:r)}),t},rd=Symbol(`internals`),id=/[^\x09\x20-\x7E\x80-\xFF]/g;function ad(e){let t=0,n=e.length;for(;t<n;){let n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;n>t;){let t=e.charCodeAt(n-1);if(t!==9&&t!==32)break;--n}return t===0&&n===e.length?e:e.slice(t,n)}function od(e){return e&&String(e).trim().toLowerCase()}function sd(e){return ad(e.replace(id,``))}function cd(e){return e===!1||e==null?e:R.isArray(e)?e.map(cd):sd(String(e))}function ld(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}var ud=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function dd(e,t,n,r,i){if(R.isFunction(r))return r.call(this,t,n);if(i&&(t=n),R.isString(t)){if(R.isString(r))return t.indexOf(r)!==-1;if(R.isRegExp(r))return r.test(t)}}function fd(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function pd(e,t){let n=R.toCamelCase(` `+t);[`get`,`set`,`has`].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}var md=class{constructor(e){e&&this.set(e)}set(e,t,n){let r=this;function i(e,t,n){let i=od(t);if(!i)throw Error(`header name must be a non-empty string`);let a=R.findKey(r,i);(!a||r[a]===void 0||n===!0||n===void 0&&r[a]!==!1)&&(r[a||t]=cd(e))}let a=(e,t)=>R.forEach(e,(e,n)=>i(e,n,t));if(R.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(R.isString(e)&&(e=e.trim())&&!ud(e))a(nd(e),t);else if(R.isObject(e)&&R.isIterable(e)){let n={},r,i;for(let t of e){if(!R.isArray(t))throw TypeError(`Object iterator must return a key-value pair`);n[i=t[0]]=(r=n[i])?R.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}a(n,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=od(e),e){let n=R.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(t===!0)return ld(e);if(R.isFunction(t))return t.call(this,e,n);if(R.isRegExp(t))return t.exec(e);throw TypeError(`parser must be boolean|regexp|function`)}}}has(e,t){if(e=od(e),e){let n=R.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||dd(this,this[n],n,t)))}return!1}delete(e,t){let n=this,r=!1;function i(e){if(e=od(e),e){let i=R.findKey(n,e);i&&(!t||dd(n,n[i],i,t))&&(delete n[i],r=!0)}}return R.isArray(e)?e.forEach(i):i(e),r}clear(e){let t=Object.keys(this),n=t.length,r=!1;for(;n--;){let i=t[n];(!e||dd(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let t=this,n={};return R.forEach(this,(r,i)=>{let a=R.findKey(n,i);if(a){t[a]=cd(r),delete t[i];return}let o=e?fd(i):String(i).trim();o!==i&&delete t[i],t[o]=cd(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return R.forEach(this,(n,r)=>{n!=null&&n!==!1&&(t[r]=e&&R.isArray(n)?n.join(`, `):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+`: `+t).join(`
|
||
`)}getSetCookie(){return this.get(`set-cookie`)||[]}get[Symbol.toStringTag](){return`AxiosHeaders`}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[rd]=this[rd]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=od(e);t[r]||(pd(n,e),t[r]=!0)}return R.isArray(e)?e.forEach(r):r(e),this}};md.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),R.reduceDescriptors(md.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),R.freezeMethods(md);function hd(e,t){let n=this||ed,r=t||n,i=md.from(r.headers),a=r.data;return R.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function gd(e){return!!(e&&e.__CANCEL__)}var _d=class extends z{constructor(e,t,n){super(e??`canceled`,z.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}};function vd(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new z(`Request failed with status code `+n.status,[z.ERR_BAD_REQUEST,z.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function yd(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||``}function bd(e,t){e=e||10;let n=Array(e),r=Array(e),i=0,a=0,o;return t=t===void 0?1e3:t,function(s){let c=Date.now(),l=r[a];o||(o=c),n[i]=s,r[i]=c;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;let f=l&&c-l;return f?Math.round(d*1e3/f):void 0}}function xd(e,t){let n=0,r=1e3/t,i,a,o=(t,r=Date.now())=>{n=r,i=null,a&&(clearTimeout(a),a=null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-n;s>=r?o(e,t):(i=e,a||(a=setTimeout(()=>{a=null,o(i)},r-s)))},()=>i&&o(i)]}var Sd=(e,t,n=3)=>{let r=0,i=bd(50,250);return xd(n=>{let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=o==null?a:Math.min(a,o),c=Math.max(0,s-r),l=i(c);r=Math.max(r,s),e({loaded:s,total:o,progress:o?s/o:void 0,bytes:c,rate:l||void 0,estimated:l&&o?(o-s)/l:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0})},n)},Cd=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},wd=e=>(...t)=>R.asap(()=>e(...t)),Td=qu.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,qu.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(qu.origin),qu.navigator&&/(msie|trident)/i.test(qu.navigator.userAgent)):()=>!0,Ed=qu.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let s=[`${e}=${encodeURIComponent(t)}`];R.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),R.isString(r)&&s.push(`path=${r}`),R.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push(`secure`),R.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join(`; `)},read(e){if(typeof document>`u`)return null;let t=document.cookie.match(RegExp(`(?:^|; )`+e+`=([^;]*)`));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,``,Date.now()-864e5,`/`)}}:{write(){},read(){return null},remove(){}};function Dd(e){return typeof e==`string`?/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e):!1}function Od(e,t){return t?e.replace(/\/?\/$/,``)+`/`+t.replace(/^\/+/,``):e}function kd(e,t,n){let r=!Dd(t);return e&&(r||n===!1)?Od(e,t):t}var Ad=e=>e instanceof md?{...e}:e;function jd(e,t){t=t||{};let n=Object.create(null);Object.defineProperty(n,`hasOwnProperty`,{value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(e,t,n,r){return R.isPlainObject(e)&&R.isPlainObject(t)?R.merge.call({caseless:r},e,t):R.isPlainObject(t)?R.merge({},t):R.isArray(t)?t.slice():t}function i(e,t,n,i){if(!R.isUndefined(t))return r(e,t,n,i);if(!R.isUndefined(e))return r(void 0,e,n,i)}function a(e,t){if(!R.isUndefined(t))return r(void 0,t)}function o(e,t){if(!R.isUndefined(t))return r(void 0,t);if(!R.isUndefined(e))return r(void 0,e)}function s(n,i,a){if(R.hasOwnProp(t,a))return r(n,i);if(R.hasOwnProp(e,a))return r(void 0,n)}let c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:s,headers:(e,t,n)=>i(Ad(e),Ad(t),n,!0)};return R.forEach(Object.keys({...e,...t}),function(r){if(r===`__proto__`||r===`constructor`||r===`prototype`)return;let a=R.hasOwnProp(c,r)?c[r]:i,o=a(R.hasOwnProp(e,r)?e[r]:void 0,R.hasOwnProp(t,r)?t[r]:void 0,r);R.isUndefined(o)&&a!==s||(n[r]=o)}),n}var Md=e=>{let t=jd({},e),n=e=>R.hasOwnProp(t,e)?t[e]:void 0,r=n(`data`),i=n(`withXSRFToken`),a=n(`xsrfHeaderName`),o=n(`xsrfCookieName`),s=n(`headers`),c=n(`auth`),l=n(`baseURL`),u=n(`allowAbsoluteUrls`),d=n(`url`);if(t.headers=s=md.from(s),t.url=Lu(kd(l,d,u),e.params,e.paramsSerializer),c&&s.set(`Authorization`,`Basic `+btoa((c.username||``)+`:`+(c.password?unescape(encodeURIComponent(c.password)):``))),R.isFormData(r)){if(qu.hasStandardBrowserEnv||qu.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(R.isFunction(r.getHeaders)){let e=r.getHeaders(),t=[`content-type`,`content-length`];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&s.set(e,n)})}}if(qu.hasStandardBrowserEnv&&(R.isFunction(i)&&(i=i(t)),i===!0||i==null&&Td(t.url))){let e=a&&o&&Ed.read(o);e&&s.set(a,e)}return t},Nd=typeof XMLHttpRequest<`u`&&function(e){return new Promise(function(t,n){let r=Md(e),i=r.data,a=md.from(r.headers).normalize(),{responseType:o,onUploadProgress:s,onDownloadProgress:c}=r,l,u,d,f,p;function m(){f&&f(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener(`abort`,l)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function g(){if(!h)return;let r=md.from(`getAllResponseHeaders`in h&&h.getAllResponseHeaders());vd(function(e){t(e),m()},function(e){n(e),m()},{data:!o||o===`text`||o===`json`?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:r,config:e,request:h}),h=null}`onloadend`in h?h.onloadend=g:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf(`file:`)===0)||setTimeout(g)},h.onabort=function(){h&&(n(new z(`Request aborted`,z.ECONNABORTED,e,h)),h=null)},h.onerror=function(t){let r=new z(t&&t.message?t.message:`Network Error`,z.ERR_NETWORK,e,h);r.event=t||null,n(r),h=null},h.ontimeout=function(){let t=r.timeout?`timeout of `+r.timeout+`ms exceeded`:`timeout exceeded`,i=r.transitional||zu;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new z(t,i.clarifyTimeoutError?z.ETIMEDOUT:z.ECONNABORTED,e,h)),h=null},i===void 0&&a.setContentType(null),`setRequestHeader`in h&&R.forEach(a.toJSON(),function(e,t){h.setRequestHeader(t,e)}),R.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),o&&o!==`json`&&(h.responseType=r.responseType),c&&([d,p]=Sd(c,!0),h.addEventListener(`progress`,d)),s&&h.upload&&([u,f]=Sd(s),h.upload.addEventListener(`progress`,u),h.upload.addEventListener(`loadend`,f)),(r.cancelToken||r.signal)&&(l=t=>{h&&(n(!t||t.type?new _d(null,e,h):t),h.abort(),h=null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener(`abort`,l)));let _=yd(r.url);if(_&&qu.protocols.indexOf(_)===-1){n(new z(`Unsupported protocol `+_+`:`,z.ERR_BAD_REQUEST,e));return}h.send(i||null)})},Pd=(e,t)=>{let{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n=new AbortController,r,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof z?t:new _d(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new z(`timeout of ${t}ms exceeded`,z.ETIMEDOUT))},t),o=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener(`abort`,i)}),e=null)};e.forEach(e=>e.addEventListener(`abort`,i));let{signal:s}=n;return s.unsubscribe=()=>R.asap(o),s}},Fd=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},Id=async function*(e,t){for await(let n of Ld(e))yield*Fd(n,t)},Ld=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},Rd=(e,t,n,r)=>{let i=Id(e,t),a=0,o,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{let{done:t,value:r}=await i.next();if(t){s(),e.close();return}let o=r.byteLength;n&&n(a+=o),e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel(e){return s(e),i.return()}},{highWaterMark:2})},zd=64*1024,{isFunction:Bd}=R,Vd=(({Request:e,Response:t})=>({Request:e,Response:t}))(R.global),{ReadableStream:Hd,TextEncoder:Ud}=R.global,Wd=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Gd=e=>{e=R.merge.call({skipUndefined:!0},Vd,e);let{fetch:t,Request:n,Response:r}=e,i=t?Bd(t):typeof fetch==`function`,a=Bd(n),o=Bd(r);if(!i)return!1;let s=i&&Bd(Hd),c=i&&(typeof Ud==`function`?(e=>t=>e.encode(t))(new Ud):async e=>new Uint8Array(await new n(e).arrayBuffer())),l=a&&s&&Wd(()=>{let e=!1,t=new n(qu.origin,{body:new Hd,method:`POST`,get duplex(){return e=!0,`half`}}),r=t.headers.has(`Content-Type`);return t.body!=null&&t.body.cancel(),e&&!r}),u=o&&s&&Wd(()=>R.isReadableStream(new r(``).body)),d={stream:u&&(e=>e.body)};i&&[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(e=>{!d[e]&&(d[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new z(`Response type '${e}' is not supported`,z.ERR_NOT_SUPPORT,n)})});let f=async e=>{if(e==null)return 0;if(R.isBlob(e))return e.size;if(R.isSpecCompliantForm(e))return(await new n(qu.origin,{method:`POST`,body:e}).arrayBuffer()).byteLength;if(R.isArrayBufferView(e)||R.isArrayBuffer(e))return e.byteLength;if(R.isURLSearchParams(e)&&(e+=``),R.isString(e))return(await c(e)).byteLength},p=async(e,t)=>R.toFiniteNumber(e.getContentLength())??f(t);return async e=>{let{url:i,method:o,data:s,signal:c,cancelToken:f,timeout:m,onDownloadProgress:h,onUploadProgress:g,responseType:_,headers:v,withCredentials:y=`same-origin`,fetchOptions:b}=Md(e),x=t||fetch;_=_?(_+``).toLowerCase():`text`;let S=Pd([c,f&&f.toAbortSignal()],m),C=null,w=S&&S.unsubscribe&&(()=>{S.unsubscribe()}),T;try{if(g&&l&&o!==`get`&&o!==`head`&&(T=await p(v,s))!==0){let e=new n(i,{method:`POST`,body:s,duplex:`half`}),t;if(R.isFormData(s)&&(t=e.headers.get(`content-type`))&&v.setContentType(t),e.body){let[t,n]=Cd(T,Sd(wd(g)));s=Rd(e.body,zd,t,n)}}R.isString(y)||(y=y?`include`:`omit`);let t=a&&`credentials`in n.prototype;if(R.isFormData(s)){let e=v.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&v.delete(`content-type`)}let c={...b,signal:S,method:o.toUpperCase(),headers:v.normalize().toJSON(),body:s,duplex:`half`,credentials:t?y:void 0};C=a&&new n(i,c);let f=await(a?x(C,b):x(i,c)),m=u&&(_===`stream`||_===`response`);if(u&&(h||m&&w)){let e={};[`status`,`statusText`,`headers`].forEach(t=>{e[t]=f[t]});let t=R.toFiniteNumber(f.headers.get(`content-length`)),[n,i]=h&&Cd(t,Sd(wd(h),!0))||[];f=new r(Rd(f.body,zd,n,()=>{i&&i(),w&&w()}),e)}_=_||`text`;let E=await d[R.findKey(d,_)||`text`](f,e);return!m&&w&&w(),await new Promise((t,n)=>{vd(t,n,{data:E,headers:md.from(f.headers),status:f.status,statusText:f.statusText,config:e,request:C})})}catch(t){throw w&&w(),t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)?Object.assign(new z(`Network Error`,z.ERR_NETWORK,e,C,t&&t.response),{cause:t.cause||t}):z.from(t,t&&t.code,e,C,t&&t.response)}}},Kd=new Map,qd=e=>{let t=e&&e.env||{},{fetch:n,Request:r,Response:i}=t,a=[r,i,n],o=a.length,s,c,l=Kd;for(;o--;)s=a[o],c=l.get(s),c===void 0&&l.set(s,c=o?new Map:Gd(t)),l=c;return c};qd();var Jd={http:null,xhr:Nd,fetch:{get:qd}};R.forEach(Jd,(e,t)=>{if(e){try{Object.defineProperty(e,`name`,{value:t})}catch{}Object.defineProperty(e,`adapterName`,{value:t})}});var Yd=e=>`- ${e}`,Xd=e=>R.isFunction(e)||e===null||e===!1;function Zd(e,t){e=R.isArray(e)?e:[e];let{length:n}=e,r,i,a={};for(let o=0;o<n;o++){r=e[o];let n;if(i=r,!Xd(r)&&(i=Jd[(n=String(r)).toLowerCase()],i===void 0))throw new z(`Unknown adapter '${n}'`);if(i&&(R.isFunction(i)||(i=i.get(t))))break;a[n||`#`+o]=i}if(!i){let e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`));throw new z(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since :
|
||
`+e.map(Yd).join(`
|
||
`):` `+Yd(e[0]):`as no adapter specified`),`ERR_NOT_SUPPORT`)}return i}var Qd={getAdapter:Zd,adapters:Jd};function $d(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new _d(null,e)}function ef(e){return $d(e),e.headers=md.from(e.headers),e.data=hd.call(e,e.transformRequest),[`post`,`put`,`patch`].indexOf(e.method)!==-1&&e.headers.setContentType(`application/x-www-form-urlencoded`,!1),Qd.getAdapter(e.adapter||ed.adapter,e)(e).then(function(t){return $d(e),t.data=hd.call(e,e.transformResponse,t),t.headers=md.from(t.headers),t},function(t){return gd(t)||($d(e),t&&t.response&&(t.response.data=hd.call(e,e.transformResponse,t.response),t.response.headers=md.from(t.response.headers))),Promise.reject(t)})}var tf=`1.15.2`,nf={};[`object`,`boolean`,`number`,`function`,`string`,`symbol`].forEach((e,t)=>{nf[e]=function(n){return typeof n===e||`a`+(t<1?`n `:` `)+e}});var rf={};nf.transitional=function(e,t,n){function r(e,t){return`[Axios v`+tf+`] Transitional option '`+e+`'`+t+(n?`. `+n:``)}return(n,i,a)=>{if(e===!1)throw new z(r(i,` has been removed`+(t?` in `+t:``)),z.ERR_DEPRECATED);return t&&!rf[i]&&(rf[i]=!0,console.warn(r(i,` has been deprecated since v`+t+` and will be removed in the near future`))),e?e(n,i,a):!0}},nf.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function af(e,t,n){if(typeof e!=`object`)throw new z(`options must be an object`,z.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-- >0;){let a=r[i],o=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(o){let t=e[a],n=t===void 0||o(t,a,e);if(n!==!0)throw new z(`option `+a+` must be `+n,z.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new z(`Unknown option `+a,z.ERR_BAD_OPTION)}}var of={assertOptions:af,validators:nf},sf=of.validators,cf=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Ru,response:new Ru}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let n=(()=>{if(!t.stack)return``;let e=t.stack.indexOf(`
|
||
`);return e===-1?``:t.stack.slice(e+1)})();try{if(!e.stack)e.stack=n;else if(n){let t=n.indexOf(`
|
||
`),r=t===-1?-1:n.indexOf(`
|
||
`,t+1),i=r===-1?``:n.slice(r+1);String(e.stack).endsWith(i)||(e.stack+=`
|
||
`+n)}}catch{}}throw e}}_request(e,t){typeof e==`string`?(t=t||{},t.url=e):t=e||{},t=jd(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&of.assertOptions(n,{silentJSONParsing:sf.transitional(sf.boolean),forcedJSONParsing:sf.transitional(sf.boolean),clarifyTimeoutError:sf.transitional(sf.boolean),legacyInterceptorReqResOrdering:sf.transitional(sf.boolean)},!1),r!=null&&(R.isFunction(r)?t.paramsSerializer={serialize:r}:of.assertOptions(r,{encode:sf.function,serialize:sf.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),of.assertOptions(t,{baseUrl:sf.spelling(`baseURL`),withXsrfToken:sf.spelling(`withXSRFToken`)},!0),t.method=(t.method||this.defaults.method||`get`).toLowerCase();let a=i&&R.merge(i.common,i[t.method]);i&&R.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`common`],e=>{delete i[e]}),t.headers=md.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s=s&&e.synchronous;let n=t.transitional||zu;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[ef.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=o.length;let f=t;for(;u<d;){let e=o[u++],t=o[u++];try{f=e(f)}catch(e){t.call(this,e);break}}try{l=ef.call(this,f)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return e=jd(this.defaults,e),Lu(kd(e.baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};R.forEach([`delete`,`get`,`head`,`options`],function(e){cf.prototype[e]=function(t,n){return this.request(jd(n||{},{method:e,url:t,data:(n||{}).data}))}}),R.forEach([`post`,`put`,`patch`],function(e){function t(t){return function(n,r,i){return this.request(jd(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}cf.prototype[e]=t(),cf.prototype[e+`Form`]=t(!0)});var lf=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new _d(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function uf(e){return function(t){return e.apply(null,t)}}function df(e){return R.isObject(e)&&e.isAxiosError===!0}var ff={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ff).forEach(([e,t])=>{ff[t]=e});function pf(e){let t=new cf(e),n=gl(cf.prototype.request,t);return R.extend(n,cf.prototype,t,{allOwnKeys:!0}),R.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return pf(jd(e,t))},n}var mf=pf(ed);mf.Axios=cf,mf.CanceledError=_d,mf.CancelToken=lf,mf.isCancel=gd,mf.VERSION=tf,mf.toFormData=Mu,mf.AxiosError=z,mf.Cancel=mf.CanceledError,mf.all=function(e){return Promise.all(e)},mf.spread=uf,mf.isAxiosError=df,mf.mergeConfig=jd,mf.AxiosHeaders=md,mf.formToJSON=e=>Zu(R.isHTMLForm(e)?new FormData(e):e),mf.getAdapter=Qd.getAdapter,mf.HttpStatusCode=ff,mf.default=mf;var hf=e=>{let t=(e||``).trim();return t?(t=t.replace(/\/?v0\/management\/?$/i,``),t=t.replace(/\/+$/i,``),/^https?:\/\//i.test(t)||(t=`http://${t}`),t):``},gf=e=>{let t=hf(e);return t?`${t}${_c}`:``},_f=()=>{try{let{protocol:e,hostname:t,port:n}=window.location;return hf(`${e}//${t}${n?`:${n}`:``}`)}catch(e){return console.warn(`Failed to detect api base from location, fallback to default`,e),hf(`http://localhost:${gc}`)}};function vf(e){"@babel/helpers - typeof";return vf=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},vf(e)}function yf(e,t){if(vf(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(vf(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function bf(e){var t=yf(e,`string`);return vf(t)==`symbol`?t:t+``}function xf(e,t,n){return(t=bf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var B=new class{constructor(){xf(this,`instance`,void 0),xf(this,`apiBase`,``),xf(this,`managementKey`,``),this.instance=mf.create({timeout:vc,headers:{"Content-Type":`application/json`}}),this.setupInterceptors()}setConfig(e){this.apiBase=gf(e.apiBase),this.managementKey=e.managementKey,e.timeout?this.instance.defaults.timeout=e.timeout:this.instance.defaults.timeout=vc}readHeader(e,t){if(!e)return null;let n=e=>{if(e==null)return null;if(Array.isArray(e)){let t=e.find(e=>e!=null&&String(e).trim());return t===void 0?null:String(t)}return String(e)||null},r=e.get;if(typeof r==`function`)for(let i of t){let t=n(r.call(e,i));if(t)return t}let i=typeof e.entries==`function`?Array.from(e.entries()):Object.entries(e),a=Object.fromEntries(i.map(([e,t])=>[String(e).toLowerCase(),t]));for(let e of t){let t=n(a[e.toLowerCase()]);if(t)return t}return null}readBooleanHeader(e,t){let n=this.readHeader(e,t);if(n===null)return null;let r=n.trim().toLowerCase();return[`1`,`true`,`yes`,`on`].includes(r)?!0:[`0`,`false`,`no`,`off`].includes(r)?!1:null}setupInterceptors(){this.instance.interceptors.request.use(e=>(e.baseURL=this.apiBase,e.url&&(e.url=e.url.replace(/\/generative-language-api-key\b/g,`/gemini-api-key`)),this.managementKey&&(e.headers.Authorization=`Bearer ${this.managementKey}`),e),e=>Promise.reject(this.handleError(e))),this.instance.interceptors.response.use(e=>{let t=e.headers,n=this.readHeader(t,Sc),r=this.readHeader(t,Cc),i=this.readHeader(t,yc),a=this.readHeader(t,bc),o=n||i||this.readHeader(t,wc),s=r||a||this.readHeader(t,Tc),c=this.readBooleanHeader(t,xc),l=n||r?`home`:i||a?`cpa`:null;return(o||s||l)&&window.dispatchEvent(new CustomEvent(`server-version-update`,{detail:{version:o||null,buildDate:s||null,runtimeKind:l}})),c!==null&&window.dispatchEvent(new CustomEvent(`server-plugin-support-update`,{detail:{supportsPlugin:c}})),e},e=>Promise.reject(this.handleError(e)))}handleError(e){if(mf.isAxiosError(e)){let t=e.response?.data,n=fc(t)?t:null,r=n?.error,i=typeof r==`string`?r:fc(r)&&typeof r.message==`string`?r.message:typeof n?.message==`string`?n.message:e.message||`Request failed`,a=Error(i);return a.name=`ApiError`,a.status=e.response?.status,a.code=e.code,a.details=t,a.data=t,e.response?.status===401&&window.dispatchEvent(new Event(`unauthorized`)),a}let t=e instanceof Error?e.message:typeof e==`string`?e:`Unknown error occurred`,n=Error(t);return n.name=`ApiError`,n}async get(e,t){return(await this.instance.get(e,t)).data}async post(e,t,n){return(await this.instance.post(e,t,n)).data}async put(e,t,n){return(await this.instance.put(e,t,n)).data}async patch(e,t,n){return(await this.instance.patch(e,t,n)).data}async delete(e,t){return(await this.instance.delete(e,t)).data}async getRaw(e,t){return this.instance.get(e,t)}async postForm(e,t,n){return(await this.instance.post(e,t,{...n,headers:{...n?.headers||{},"Content-Type":`multipart/form-data`}})).data}async requestRaw(e){return this.instance.request(e)}},Sf={checkLatest:()=>B.get(`/latest-version`),async detectRuntimeKind(){try{let e=await B.get(`/nodes`);return fc(e)&&Array.isArray(e.nodes)?`home`:`unknown`}catch(e){let t=fc(e)?e.status:void 0;return t===404||t===405?`cpa`:`unknown`}}};function Cf(e){return e?Array.isArray(e)?e.reduce((e,t)=>{let n=t?.key?.trim(),r=t?.value?.trim();return n&&r!=null&&r!==``&&(e[n]=r),e},{}):Object.entries(e).reduce((e,[t,n])=>{let r=t?.trim(),i=typeof n==`string`?n.trim():n;return r&&i!=null&&i!==``&&(e[r]=String(i)),e},{}):{}}function wf(e,t){if(!e)return!1;let n=t.toLowerCase();return Object.keys(e).some(e=>e.toLowerCase()===n)}var Tf=e=>typeof e==`boolean`?e:void 0,Ef=e=>fc(e)?e:void 0,Df=e=>Array.isArray(e)?e.map(e=>{if(e==null)return null;if(typeof e==`string`){let t=e.trim();return t?{name:t}:null}if(!fc(e))return null;let t=e.name;if(!t)return null;let n=e.alias,r=e.priority,i=e[`test-model`],a=Tf(e.image),o=Ef(e.thinking),s={name:String(t)};if(n&&n!==t&&(s.alias=String(n)),r!==void 0){let e=Number(r);Number.isFinite(e)&&(s.priority=e)}return i&&(s.testModel=String(i)),a!==void 0&&(s.image=a),o&&(s.thinking=o),s}).filter(Boolean):[],Of=e=>{if(!e||typeof e!=`object`)return;let t=Cf(e);return Object.keys(t).length?t:void 0},kf=e=>{let t=Array.isArray(e)?e:typeof e==`string`?e.split(/[\n,]/):[],n=new Set,r=[];return t.forEach(e=>{let t=String(e??``).trim();if(!t)return;let i=t.toLowerCase();n.has(i)||(n.add(i),r.push(t))}),r},Af=e=>e==null?void 0:String(e).trim()||void 0,jf=e=>e==null?void 0:String(e).trim()||void 0,Mf=e=>{if(e==null)return null;let t=fc(e)?e:null,n=t?.[`api-key`]??(typeof e==`string`?e:``),r=String(n||``).trim();if(!r)return null;let i=t?.[`proxy-url`],a=jf(t?.[`auth-index`]),o={apiKey:r,proxyUrl:i?String(i):void 0};return a&&(o.authIndex=a),o},Nf=e=>{if(e==null)return null;let t=fc(e)?e:null,n=t?.[`api-key`]??(typeof e==`string`?e:``),r=String(n||``).trim();if(!r)return null;let i={apiKey:r},a=t?.priority;if(a!=null&&String(a).trim()!==``){let e=Number(a);Number.isFinite(e)&&(i.priority=e)}let o=Af(t?.prefix);o&&(i.prefix=o);let s=t?.[`base-url`],c=t?.[`proxy-url`];s&&(i.baseUrl=String(s));let l=Tf(t?.websockets);l!==void 0&&(i.websockets=l),c&&(i.proxyUrl=String(c));let u=Tf(t?.[`disable-cooling`]);u!==void 0&&(i.disableCooling=u);let d=Of(t?.headers);d&&(i.headers=d);let f=Df(t?.models);f.length&&(i.models=f);let p=kf(t?.[`excluded-models`]);p.length&&(i.excludedModels=p);let m=jf(t?.[`auth-index`]);m&&(i.authIndex=m);let h=t?.cloak;if(fc(h)){let e={},t=h.mode;typeof t==`string`&&t.trim()&&(e.mode=t.trim());let n=Tf(h[`strict-mode`]);n!==void 0&&(e.strictMode=n);let r=kf(h[`sensitive-words`]);r.length&&(e.sensitiveWords=r);let a=Tf(h[`cache-user-id`]);a!==void 0&&(e.cacheUserId=a),Object.keys(e).length&&(i.cloak=e)}let g=Tf(t?.[`experimental-cch-signing`]);return g!==void 0&&(i.experimentalCchSigning=g),i},Pf=e=>{if(e==null)return null;let t=fc(e)?e:null,n=t?.[`api-key`];!n&&typeof e==`string`&&(n=e);let r=String(n||``).trim();if(!r)return null;let i={apiKey:r},a=t?.priority;if(a!=null&&String(a).trim()!==``){let e=Number(a);Number.isFinite(e)&&(i.priority=e)}let o=Af(t?.prefix);o&&(i.prefix=o);let s=t?.[`base-url`];s&&(i.baseUrl=String(s));let c=t?.[`proxy-url`];c&&(i.proxyUrl=String(c));let l=Tf(t?.[`disable-cooling`]);l!==void 0&&(i.disableCooling=l);let u=Df(t?.models);u.length&&(i.models=u);let d=Of(t?.headers);d&&(i.headers=d);let f=kf(t?.[`excluded-models`]);f.length&&(i.excludedModels=f);let p=jf(t?.[`auth-index`]);return p&&(i.authIndex=p),i},Ff=e=>{if(!fc(e))return null;let t=e.name,n=e[`base-url`];if(!t||!n)return null;let r=Array.isArray(e[`api-key-entries`])?e[`api-key-entries`].map(e=>Mf(e)).filter(Boolean):[],i=Of(e.headers),a=Df(e.models),o=e.priority,s=e[`test-model`],c={name:String(t),baseUrl:String(n),apiKeyEntries:r},l=Tf(e.disabled);l!==void 0&&(c.disabled=l);let u=Tf(e[`disable-cooling`]);u!==void 0&&(c.disableCooling=u);let d=Af(e.prefix);d&&(c.prefix=d),i&&(c.headers=i),a.length&&(c.models=a),o!==void 0&&(c.priority=Number(o)),s&&(c.testModel=String(s));let f=jf(e[`auth-index`]);return f&&(c.authIndex=f),c},If=e=>{if(!fc(e))return;let t=e[`oauth-excluded-models`]??e.items??e;if(!fc(t))return;let n={};return Object.entries(t).forEach(([e,t])=>{let r=String(e||``).trim();if(!r)return;let i=kf(t);n[r.toLowerCase()]=i}),n},Lf=e=>{let t={raw:fc(e)?e:{}};if(!fc(e))return t;t.debug=Tf(e.debug);let n=e[`proxy-url`];t.proxyUrl=typeof n==`string`?n:n==null?void 0:String(n);let r=e[`request-retry`];if(typeof r==`number`&&Number.isFinite(r))t.requestRetry=r;else if(typeof r==`string`&&r.trim()!==``){let e=Number(r);Number.isFinite(e)&&(t.requestRetry=e)}let i=e[`quota-exceeded`];fc(i)&&(t.quotaExceeded={switchProject:Tf(i[`switch-project`]),switchPreviewModel:Tf(i[`switch-preview-model`]),antigravityCredits:Tf(i[`antigravity-credits`])}),t.requestLog=Tf(e[`request-log`]),t.loggingToFile=Tf(e[`logging-to-file`]);let a=e[`logs-max-total-size-mb`];if(typeof a==`number`&&Number.isFinite(a))t.logsMaxTotalSizeMb=a;else if(typeof a==`string`&&a.trim()!==``){let e=Number(a);Number.isFinite(e)&&(t.logsMaxTotalSizeMb=e)}t.wsAuth=Tf(e[`ws-auth`]),t.forceModelPrefix=Tf(e[`force-model-prefix`]);let o=e.routing,s=fc(o)?o.strategy:void 0;s!=null&&(t.routingStrategy=String(s));let c=e[`api-keys`];Array.isArray(c)&&(t.apiKeys=c.map(e=>String(e)).filter(e=>e.trim()!==``));let l=e[`gemini-api-key`];Array.isArray(l)&&(t.geminiApiKeys=l.map(e=>Pf(e)).filter(Boolean));let u=e[`codex-api-key`];Array.isArray(u)&&(t.codexApiKeys=u.map(e=>Nf(e)).filter(Boolean));let d=e[`claude-api-key`];Array.isArray(d)&&(t.claudeApiKeys=d.map(e=>Nf(e)).filter(Boolean));let f=e[`vertex-api-key`];Array.isArray(f)&&(t.vertexApiKeys=f.map(e=>Nf(e)).filter(Boolean));let p=e[`openai-compatibility`];Array.isArray(p)&&(t.openaiCompatibility=p.map(e=>Ff(e)).filter(Boolean));let m=If(e[`oauth-excluded-models`]);return m&&(t.oauthExcludedModels=m),t},Rf={async getConfig(){return Lf(await B.get(`/config`))},getRawConfig:()=>B.get(`/config`),updateDebug:e=>B.put(`/debug`,{value:e}),updateProxyUrl:e=>B.put(`/proxy-url`,{value:e}),clearProxyUrl:()=>B.delete(`/proxy-url`),updateRequestRetry:e=>B.put(`/request-retry`,{value:e}),updateSwitchProject:e=>B.put(`/quota-exceeded/switch-project`,{value:e}),updateSwitchPreviewModel:e=>B.put(`/quota-exceeded/switch-preview-model`,{value:e}),updateRequestLog:e=>B.put(`/request-log`,{value:e}),updateLoggingToFile:e=>B.put(`/logging-to-file`,{value:e}),async getLogsMaxTotalSizeMb(){let e=(await B.get(`/logs-max-total-size-mb`))?.[`logs-max-total-size-mb`]??0,t=Number(e);return Number.isFinite(t)?t:0},updateLogsMaxTotalSizeMb:e=>B.put(`/logs-max-total-size-mb`,{value:e}),updateWsAuth:e=>B.put(`/ws-auth`,{value:e}),async getForceModelPrefix(){return!!((await B.get(`/force-model-prefix`))?.[`force-model-prefix`]??!1)},updateForceModelPrefix:e=>B.put(`/force-model-prefix`,{value:e}),async getRoutingStrategy(){let e=(await B.get(`/routing/strategy`))?.strategy;return typeof e==`string`?e:`round-robin`},updateRoutingStrategy:e=>B.put(`/routing/strategy`,{value:e})},zf=0,Bf=null,Vf=[`debug`,`proxy-url`,`request-retry`,`quota-exceeded`,`request-log`,`logging-to-file`,`logs-max-total-size-mb`,`ws-auth`,`force-model-prefix`,`routing/strategy`,`api-keys`,`gemini-api-key`,`codex-api-key`,`claude-api-key`,`vertex-api-key`,`openai-compatibility`,`oauth-excluded-models`],Hf=(e,t)=>{if(e)switch(t){case`debug`:return e.debug;case`proxy-url`:return e.proxyUrl;case`request-retry`:return e.requestRetry;case`quota-exceeded`:return e.quotaExceeded;case`request-log`:return e.requestLog;case`logging-to-file`:return e.loggingToFile;case`logs-max-total-size-mb`:return e.logsMaxTotalSizeMb;case`ws-auth`:return e.wsAuth;case`force-model-prefix`:return e.forceModelPrefix;case`routing/strategy`:return e.routingStrategy;case`api-keys`:return e.apiKeys;case`gemini-api-key`:return e.geminiApiKeys;case`codex-api-key`:return e.codexApiKeys;case`claude-api-key`:return e.claudeApiKeys;case`vertex-api-key`:return e.vertexApiKeys;case`openai-compatibility`:return e.openaiCompatibility;case`oauth-excluded-models`:return e.oauthExcludedModels;default:return t?e.raw?.[t]:void 0}},Uf=uc((e,t)=>({config:null,cache:new Map,loading:!1,error:null,fetchConfig:(async(n,r=!1)=>{let{cache:i,isCacheValid:a}=t(),o=n||`__full__`;if(!r&&a(n)){let e=i.get(o);if(e)return e.data}if(!r&&n&&a()){let e=i.get(`__full__`);if(e?.data)return Hf(e.data,n)}if(Bf){let e=await Bf.promise;return n?Hf(e,n):e}e({loading:!0,error:null});let s=zf+=1;try{let t=Rf.getConfig();Bf={id:s,promise:t};let r=await t,a=Date.now();if(s!==zf)return n?Hf(r,n):r;let o=new Map(i);return o.set(`__full__`,{data:r,timestamp:a}),Vf.forEach(e=>{let t=Hf(r,e);t!==void 0&&o.set(e,{data:t,timestamp:a})}),e({config:r,cache:o,loading:!1}),n?Hf(r,n):r}catch(t){let n=t instanceof Error?t.message:typeof t==`string`?t:`Failed to fetch config`;throw s===zf&&e({error:n||`Failed to fetch config`,loading:!1}),t}finally{Bf?.id===s&&(Bf=null)}}),updateConfigValue:(n,r)=>{e(e=>{let t={...e.config?.raw||{}};t[n]=r;let i={...e.config||{},raw:t};switch(n){case`debug`:i.debug=r;break;case`proxy-url`:i.proxyUrl=r;break;case`request-retry`:i.requestRetry=r;break;case`quota-exceeded`:i.quotaExceeded=r;break;case`request-log`:i.requestLog=r;break;case`logging-to-file`:i.loggingToFile=r;break;case`logs-max-total-size-mb`:i.logsMaxTotalSizeMb=r;break;case`ws-auth`:i.wsAuth=r;break;case`force-model-prefix`:i.forceModelPrefix=r;break;case`routing/strategy`:i.routingStrategy=r;break;case`api-keys`:i.apiKeys=r;break;case`gemini-api-key`:i.geminiApiKeys=r;break;case`codex-api-key`:i.codexApiKeys=r;break;case`claude-api-key`:i.claudeApiKeys=r;break;case`vertex-api-key`:i.vertexApiKeys=r;break;case`openai-compatibility`:i.openaiCompatibility=r;break;case`oauth-excluded-models`:i.oauthExcludedModels=r;break;default:break}return{config:i}}),t().clearCache(n)},clearCache:n=>{let{cache:r}=t(),i=new Map(r);if(n){i.delete(n),i.delete(`__full__`),zf+=1,Bf=null,e({cache:i,loading:!1,error:null});return}else i.clear();zf+=1,Bf=null,e({config:null,cache:i,loading:!1,error:null})},isCacheValid:e=>{let{cache:n}=t(),r=e||`__full__`,i=n.get(r);return i?Date.now()-i.timestamp<hc:!1}})),Wf=[{id:`gpt`,label:`GPT`,patterns:[/gpt/i,/\bo\d\b/i,/\bo\d+\.?/i,/\bchatgpt/i]},{id:`claude`,label:`Claude`,patterns:[/claude/i]},{id:`gemini`,label:`Gemini`,patterns:[/gemini/i,/\bgai\b/i]},{id:`kimi`,label:`Kimi`,patterns:[/kimi/i]},{id:`qwen`,label:`Qwen`,patterns:[/qwen/i]},{id:`glm`,label:`GLM`,patterns:[/glm/i,/chatglm/i]},{id:`grok`,label:`Grok`,patterns:[/grok/i]},{id:`deepseek`,label:`DeepSeek`,patterns:[/deepseek/i]},{id:`minimax`,label:`MiniMax`,patterns:[/minimax/i,/abab/i]}],Gf=e=>{for(let t of Wf)if(t.patterns.some(t=>t.test(e)))return t.id;return null};function Kf(e,{dedupe:t=!1}={}){let n=e=>{if(typeof e==`string`)return{name:e};if(!fc(e))return null;let t=e.id||e.name||e.model||e.value;if(!t)return null;let n=e.alias||e.display_name||e.displayName,r=e.description||e.note||e.comment,i={name:String(t)};return n&&n!==t&&(i.alias=String(n)),r&&(i.description=String(r)),i},r=[];Array.isArray(e)?r=e.map(n):fc(e)&&(Array.isArray(e.data)?r=e.data.map(n):Array.isArray(e.models)&&(r=e.models.map(n)));let i=r.filter(Boolean);if(!t)return i;let a=new Set;return i.filter(e=>{let t=(e?.name||``).toLowerCase();return!t||a.has(t)?!1:(a.add(t),!0)})}function qf(e=[],{otherLabel:t=`Other`}={}){let n=Wf.map(e=>({id:e.id,label:e.label,items:[]})),r={id:`other`,label:t,items:[]};e.forEach(e=>{let t=Gf(`${(e?.name||``).toString()} ${(e?.alias||``).toString()}`.toLowerCase()),i=t?n.find(e=>e.id===t):null;i?i.items.push(e):r.items.push(e)});let i=n.filter(e=>e.items.length>0);return r.items.length&&i.push(r),i}var Jf=e=>{if(e==null)return{bodyText:``,body:null};if(typeof e==`string`){let t=e,n=t.trim();if(!n)return{bodyText:t,body:null};try{return{bodyText:t,body:JSON.parse(n)}}catch{return{bodyText:t,body:t}}}try{return{bodyText:JSON.stringify(e),body:e}}catch{return{bodyText:String(e),body:e}}},Yf=e=>{let t=e.statusCode,n=e.body,r=e.bodyText,i=``;if(fc(n)){let e=n.error;fc(e)&&typeof e.message==`string`?i=e.message:typeof e==`string`&&(i=e),!i&&typeof n.message==`string`&&(i=n.message)}else typeof n==`string`&&(i=n);return!i&&r&&(i=r),t&&i?`${t} ${i}`.trim():t?`HTTP ${t}`:i||`Request failed`},Xf={request:async(e,t)=>{let n=await B.post(`/api-call`,e,t),r=Number(n?.status_code??0),i=n?.header??{},{bodyText:a,body:o}=Jf(n?.body);return{statusCode:r,header:i,bodyText:a,body:o}}},Zf=`https://api.anthropic.com`,Qf=`https://generativelanguage.googleapis.com`,$f=`2023-06-01`,ep=new Map,tp=new Map,np=(e,t,n)=>`${e}||${Object.entries(t).sort(([e],[t])=>e.toLowerCase().localeCompare(t.toLowerCase())).map(([e,t])=>`${e}:${t}`).join(`|`)}||auth=${n??``}`,rp=e=>{let t=hf(e);if(!t)return``;let n=t.replace(/\/+$/g,``);return/\/models$/i.test(n)?n:`${n}/models`},ip=e=>{let t=hf(e);if(!t)return``;let n=t.replace(/\/+$/g,``);return/\/v1\/models$/i.test(n)?n:/\/v1$/i.test(n)?`${n}/models`:`${n}/v1/models`},ap=e=>{let t=(hf(e)||Zf).replace(/\/+$/g,``);return t=t.replace(/\/v1\/models$/i,``),t=t.replace(/\/v1(?:\/.*)?$/i,``),`${t}/v1/models`},op=e=>{let t=(hf(e)||Qf).replace(/\/+$/g,``);return t=t.replace(/\/v1beta\/models$/i,``),t=t.replace(/\/v1beta(?:\/.*)?$/i,``),`${t}/v1beta/models`},sp=e=>{let t=String(e??``).trim();return t?t.replace(/^\/?models\//i,``):``},cp=(e,t)=>{let n=t.toLowerCase();return Object.keys(e).some(e=>e.toLowerCase()===n)},lp=e=>{let t=Object.entries(e).find(([e])=>e.toLowerCase()===`authorization`);if(!t)return``;let n=String(t[1]??``).trim();return n&&n.match(/^Bearer\s+(.+)$/i)?.[1]?.trim()||``},up={async fetchModels(e,t,n={}){let r=ip(e);if(!r)throw Error(`Invalid base url`);let i={...n};t&&!cp(i,`authorization`)&&(i.Authorization=`Bearer ${t}`);let a=await mf.get(r,{headers:Object.keys(i).length?i:void 0});return Kf(a.data?.data??a.data?.models??a.data,{dedupe:!0})},async fetchV1ModelsViaApiCall(e,t,n={},r){let i=ip(e);if(!i)throw Error(`Invalid base url`);let a=r?.trim()||void 0,o={...n};t&&!cp(o,`authorization`)?o.Authorization=`Bearer ${t}`:a&&!cp(o,`authorization`)&&(o.Authorization=`Bearer $TOKEN$`);let s=await Xf.request({authIndex:a,method:`GET`,url:i,header:Object.keys(o).length?o:void 0});if(s.statusCode<200||s.statusCode>=300)throw Error(Yf(s));return Kf(s.body??s.bodyText,{dedupe:!0})},async fetchModelsViaApiCall(e,t,n={},r){let i=rp(e);if(!i)throw Error(`Invalid base url`);let a=r?.trim()||void 0,o={...n};t&&!cp(o,`authorization`)?o.Authorization=`Bearer ${t}`:a&&!cp(o,`authorization`)&&(o.Authorization=`Bearer $TOKEN$`);let s=await Xf.request({authIndex:a,method:`GET`,url:i,header:Object.keys(o).length?o:void 0});if(s.statusCode<200||s.statusCode>=300)throw Error(Yf(s));return Kf(s.body??s.bodyText,{dedupe:!0})},buildV1ModelsEndpoint(e){return ip(e)},buildClaudeModelsEndpoint(e){return ap(e)},buildGeminiModelsEndpoint(e){return op(e)},async fetchClaudeModelsViaApiCall(e,t,n={},r){let i=ap(e);if(!i)throw Error(`Invalid base url`);let a=r?.trim()||void 0,o={...n},s=String(t??``).trim();!s&&!cp(o,`x-api-key`)&&(s=lp(o)),s&&!cp(o,`x-api-key`)?o[`x-api-key`]=s:a&&!cp(o,`x-api-key`)&&(o[`x-api-key`]=`$TOKEN$`),cp(o,`anthropic-version`)||(o[`anthropic-version`]=$f);let c=np(i,o,a),l=ep.get(c);if(l)return l;let u=(async()=>{let e=await Xf.request({authIndex:a,method:`GET`,url:i,header:Object.keys(o).length?o:void 0});if(e.statusCode<200||e.statusCode>=300)throw Error(Yf(e));return Kf(e.body??e.bodyText,{dedupe:!0})})();ep.set(c,u);try{return await u}finally{ep.delete(c)}},async fetchGeminiModelsViaApiCall(e,t,n={},r){let i=op(e);if(!i)throw Error(`Invalid base url`);let a=r?.trim()||void 0,o={...n},s=String(t??``).trim();s&&!cp(o,`x-goog-api-key`)?o[`x-goog-api-key`]=s:a&&!cp(o,`x-goog-api-key`)&&(o[`x-goog-api-key`]=`$TOKEN$`);let c=np(i,o,a),l=tp.get(c);if(l)return l;let u=(async()=>{let e=new Set,t=[],n=``;for(let r=0;r<20;r+=1){let r=new URL(i);n&&r.searchParams.set(`pageToken`,n);let s=await Xf.request({authIndex:a,method:`GET`,url:r.toString(),header:Object.keys(o).length?o:void 0});if(s.statusCode<200||s.statusCode>=300)throw Error(Yf(s));let c=s.body??s.bodyText;Kf(c,{dedupe:!1}).forEach(n=>{let r=sp(n.name),i=(r||``).toLowerCase();if(!i||e.has(i))return;e.add(i);let a={...n,name:r};a.alias&&a.alias.trim()===r&&(a.alias=void 0),t.push(a)});let l=fc(c)&&typeof c.nextPageToken==`string`?c.nextPageToken:``;if(!l)break;n=l}return t})();tp.set(c,u);try{return await u}finally{tp.delete(c)}}},dp=uc((e,t)=>({models:[],loading:!1,error:null,cache:null,fetchModels:async(n,r,i=!1)=>{let{cache:a,isCacheValid:o}=t(),s=r?.trim()||``;if(!i&&o(n,s)&&a)return e({models:a.data,error:null}),a.data;e({loading:!0,error:null});try{let t=await up.fetchModels(n,s||void 0);return e({models:t,loading:!1,cache:{data:t,timestamp:Date.now(),apiBase:n,apiKey:s}}),t}catch(t){throw e({error:t instanceof Error?t.message:typeof t==`string`?t:`Failed to fetch models`,loading:!1,models:[]}),t}},clearCache:()=>{e({cache:null,models:[]})},isCacheValid:(e,n)=>{let{cache:r}=t();if(!r||r.apiBase!==e)return!1;let i=n?.trim()||``;return(r.apiKey||``)===i?Date.now()-r.timestamp<hc:!1}})),fp=null,pp=async()=>{try{return await Sf.detectRuntimeKind()}catch(e){return console.warn(`Runtime kind detection failed:`,e),`unknown`}},mp=uc()(Rc((e,t)=>({isAuthenticated:!1,apiBase:``,managementKey:``,rememberPassword:!1,serverVersion:null,serverBuildDate:null,serverRuntimeKind:`unknown`,supportsPlugin:!1,connectionStatus:`disconnected`,connectionError:null,restoreSession:()=>fp||(fp=(async()=>{hl.migratePlaintextKeys([`apiBase`,`apiUrl`,`managementKey`]);let n=localStorage.getItem(`isLoggedIn`)===`true`,r=hl.getItem(`apiBase`)||hl.getItem(`apiUrl`,{encrypt:!0}),i=hl.getItem(`managementKey`),{apiBase:a,managementKey:o,rememberPassword:s}=t(),c=hf(a||r||_f()),l=o||i||``,u=s||!!o||!!i;if(e({apiBase:c,managementKey:l,rememberPassword:u}),B.setConfig({apiBase:c,managementKey:l}),n&&c&&l)try{return await t().login({apiBase:c,managementKey:l,rememberPassword:u}),!0}catch(e){return console.warn(`Auto login failed:`,e),!1}return!1})(),fp),login:async n=>{let r=hf(n.apiBase),i=n.managementKey.trim(),a=n.rememberPassword??t().rememberPassword??!1;try{e({connectionStatus:`connecting`,serverVersion:null,serverBuildDate:null,serverRuntimeKind:`unknown`,supportsPlugin:!1}),dp.getState().clearCache(),B.setConfig({apiBase:r,managementKey:i}),await Uf.getState().fetchConfig(void 0,!0);let t=await pp();e({isAuthenticated:!0,apiBase:r,managementKey:i,rememberPassword:a,connectionStatus:`connected`,connectionError:null,...t===`unknown`?{}:{serverRuntimeKind:t}}),a?localStorage.setItem(`isLoggedIn`,`true`):localStorage.removeItem(`isLoggedIn`)}catch(t){throw e({connectionStatus:`error`,connectionError:(t instanceof Error?t.message:typeof t==`string`?t:`Connection failed`)||`Connection failed`}),t}},logout:()=>{fp=null,Uf.getState().clearCache(),dp.getState().clearCache(),e({isAuthenticated:!1,apiBase:``,managementKey:``,serverVersion:null,serverBuildDate:null,serverRuntimeKind:`unknown`,supportsPlugin:!1,connectionStatus:`disconnected`,connectionError:null}),localStorage.removeItem(`isLoggedIn`)},checkAuth:async()=>{let{managementKey:n,apiBase:r}=t();if(!n||!r)return!1;try{B.setConfig({apiBase:r,managementKey:n}),e({supportsPlugin:!1}),await Uf.getState().fetchConfig();let t=await pp();return e({isAuthenticated:!0,connectionStatus:`connected`,...t===`unknown`?{}:{serverRuntimeKind:t}}),!0}catch{return e({isAuthenticated:!1,connectionStatus:`error`,supportsPlugin:!1}),!1}},updateServerVersion:(t,n,r)=>{e(e=>({serverVersion:t||null,serverBuildDate:n||null,serverRuntimeKind:r||e.serverRuntimeKind}))},updateServerRuntimeKind:t=>{e({serverRuntimeKind:t})},updateServerPluginSupport:t=>{e({supportsPlugin:t})},updateConnectionStatus:(t,n=null)=>{e({connectionStatus:t,connectionError:n})}}),{name:Oc,storage:Ic(()=>({getItem:e=>{let t=hl.getItem(e);return t?JSON.stringify(t):null},setItem:(e,t)=>{hl.setItem(e,JSON.parse(t))},removeItem:e=>{hl.removeItem(e)}})),partialize:e=>({apiBase:e.apiBase,...e.rememberPassword?{managementKey:e.managementKey}:{},rememberPassword:e.rememberPassword,serverVersion:e.serverVersion,serverBuildDate:e.serverBuildDate,serverRuntimeKind:e.serverRuntimeKind})}));typeof window<`u`&&(window.addEventListener(`unauthorized`,()=>{mp.getState().logout()}),window.addEventListener(`server-version-update`,(e=>{let t=e.detail||{},n=t.runtimeKind===`cpa`||t.runtimeKind===`home`?t.runtimeKind:null;mp.getState().updateServerVersion(t.version||null,t.buildDate||null,n)})),window.addEventListener(`server-plugin-support-update`,(e=>{mp.getState().updateServerPluginSupport(e.detail?.supportsPlugin===!0)})));var hp=(e,t)=>typeof e==`function`?e(t):e,gp=uc(e=>({antigravityQuota:{},claudeQuota:{},codexQuota:{},kimiQuota:{},xaiQuota:{},setAntigravityQuota:t=>e(e=>({antigravityQuota:hp(t,e.antigravityQuota)})),setClaudeQuota:t=>e(e=>({claudeQuota:hp(t,e.claudeQuota)})),setCodexQuota:t=>e(e=>({codexQuota:hp(t,e.codexQuota)})),setKimiQuota:t=>e(e=>({kimiQuota:hp(t,e.kimiQuota)})),setXaiQuota:t=>e(e=>({xaiQuota:hp(t,e.xaiQuota)})),clearQuotaCache:()=>e({antigravityQuota:{},claudeQuota:{},codexQuota:{},kimiQuota:{},xaiQuota:{}})})),_p={container:`LoginPage-module__container___bHtIX`,brandPanel:`LoginPage-module__brandPanel___kKUR5`,brandContent:`LoginPage-module__brandContent___ZEhbk`,brandWord:`LoginPage-module__brandWord___3DkwD`,brandFadeIn:`LoginPage-module__brandFadeIn___tpmGl`,formPanel:`LoginPage-module__formPanel___Nrtrt`,formContent:`LoginPage-module__formContent___H8fD-`,logo:`LoginPage-module__logo___ASmao`,loginCard:`LoginPage-module__loginCard___OgP-R`,loginHeader:`LoginPage-module__loginHeader___3kAvs`,titleRow:`LoginPage-module__titleRow___9h914`,title:`LoginPage-module__title___I-LuY`,subtitle:`LoginPage-module__subtitle___Q41SH`,languageSelect:`LoginPage-module__languageSelect___KUNwV`,connectionBox:`LoginPage-module__connectionBox___B5--X`,label:`LoginPage-module__label___2fkY-`,value:`LoginPage-module__value___JFrYC`,hint:`LoginPage-module__hint___bcz4d`,toggleAdvanced:`LoginPage-module__toggleAdvanced___4aKnv`,toggleLabel:`LoginPage-module__toggleLabel___C3t9M`,errorBox:`LoginPage-module__errorBox___wX1tT`,splashContent:`LoginPage-module__splashContent___Cc3DZ`,splashEnter:`LoginPage-module__splashEnter___K-Jk9`,splashLogo:`LoginPage-module__splashLogo___yzbbw`,splashLogoPulse:`LoginPage-module__splashLogoPulse___DIteW`,splashTitle:`LoginPage-module__splashTitle___G-HEP`,splashSubtitle:`LoginPage-module__splashSubtitle___BYSQi`,splashLoader:`LoginPage-module__splashLoader___SdvUl`,splashLoaderBar:`LoginPage-module__splashLoaderBar___lyVXw`,splashLoading:`LoginPage-module__splashLoading___jAaFC`};function vp(e,t){let n=e,r=typeof n.status==`number`?n.status:void 0,i=typeof n.code==`string`?n.code:void 0,a=e instanceof Error?e.message:typeof n.message==`string`?n.message:typeof e==`string`?e:``,o=e=>{if(!r)return e;let n=`Request failed with status code ${r}`,i=a.trim();return`HTTP ${r}: ${e}${i&&i!==n?` (${t(`login.error_backend_detail`)}: ${i})`:``}`};return r===401?o(t(`login.error_unauthorized`)):r===403?o(t(`login.error_forbidden`)):r===404?o(t(`login.error_not_found`)):r&&r>=500?o(t(`login.error_server`)):i===`ECONNABORTED`||a.toLowerCase().includes(`timeout`)?t(`login.error_timeout`):i===`ERR_NETWORK`||a.toLowerCase().includes(`network error`)?t(`login.error_network`):i===`ERR_CERT_AUTHORITY_INVALID`||a.toLowerCase().includes(`certificate`)?t(`login.error_ssl`):a.toLowerCase().includes(`cors`)||a.toLowerCase().includes(`cross-origin`)?t(`login.error_cors`):o(t(`login.error_invalid`))}function yp(){let{t:e}=Xo(),t=nr(),n=$n(),{showNotification:r}=Fc(),i=nl(e=>e.language),a=nl(e=>e.setLanguage),o=mp(e=>e.isAuthenticated),s=mp(e=>e.login),c=mp(e=>e.restoreSession),l=mp(e=>e.apiBase),u=mp(e=>e.managementKey),d=mp(e=>e.rememberPassword),[f,p]=(0,y.useState)(``),[m,h]=(0,y.useState)(``),[g,_]=(0,y.useState)(!1),[v,b]=(0,y.useState)(!1),[S,C]=(0,y.useState)(!1),[w,T]=(0,y.useState)(!1),[E,D]=(0,y.useState)(!0),[O,k]=(0,y.useState)(!1),[A,ee]=(0,y.useState)(``),j=(0,y.useMemo)(()=>_f(),[]),M=(0,y.useMemo)(()=>jc.map(t=>({value:t,label:e(Mc[t])})),[e]),N=(0,y.useCallback)(e=>{Xc(e)&&a(e)},[a]);(0,y.useEffect)(()=>{(async()=>{try{await c()?(k(!0),setTimeout(()=>{t(n.state?.from?.pathname||`/`,{replace:!0})},1500)):(p(l||j),h(u||``),C(d||!!u))}finally{D(!1)}})()},[]);let te=(0,y.useCallback)(async()=>{if(!m.trim()){ee(e(`login.error_required`));return}let n=f?hf(f):j;T(!0),ee(``);try{await s({apiBase:n,managementKey:m.trim(),rememberPassword:S}),r(e(`common.connected_status`),`success`),t(`/`,{replace:!0})}catch(t){let n=vp(t,e);ee(n),r(`${e(`notification.login_failed`)}: ${n}`,`error`)}finally{T(!1)}},[f,j,s,m,t,S,r,e]),P=(0,y.useCallback)(e=>{e.key===`Enter`&&!w&&(e.preventDefault(),te())},[w,te]);if(o&&!E&&!O)return(0,I.jsx)(Ur,{to:n.state?.from?.pathname||`/`,replace:!0});let F=E||O;return(0,I.jsxs)(`div`,{className:_p.container,children:[(0,I.jsx)(`div`,{className:_p.brandPanel,children:(0,I.jsxs)(`div`,{className:_p.brandContent,children:[(0,I.jsx)(`span`,{className:_p.brandWord,children:`CLI`}),(0,I.jsx)(`span`,{className:_p.brandWord,children:`PROXY`}),(0,I.jsx)(`span`,{className:_p.brandWord,children:`API`})]})}),(0,I.jsx)(`div`,{className:_p.formPanel,children:F?(0,I.jsxs)(`div`,{className:_p.splashContent,children:[(0,I.jsx)(`img`,{src:x,alt:`CPAMC`,className:_p.splashLogo}),(0,I.jsx)(`h1`,{className:_p.splashTitle,children:e(`splash.title`)}),(0,I.jsx)(`p`,{className:_p.splashSubtitle,children:e(`splash.subtitle`)}),(0,I.jsx)(`div`,{className:_p.splashLoader,children:(0,I.jsx)(`div`,{className:_p.splashLoaderBar})})]}):(0,I.jsxs)(`div`,{className:_p.formContent,children:[(0,I.jsx)(`img`,{src:x,alt:`Logo`,className:_p.logo}),(0,I.jsxs)(`div`,{className:_p.loginCard,children:[(0,I.jsxs)(`div`,{className:_p.loginHeader,children:[(0,I.jsxs)(`div`,{className:_p.titleRow,children:[(0,I.jsx)(`div`,{className:_p.title,children:e(`title.login`)}),(0,I.jsx)(nc,{className:_p.languageSelect,value:i,options:M,onChange:N,fullWidth:!1,ariaLabel:e(`language.switch`)})]}),(0,I.jsx)(`div`,{className:_p.subtitle,children:e(`login.subtitle`)})]}),(0,I.jsxs)(`div`,{className:_p.connectionBox,children:[(0,I.jsx)(`div`,{className:_p.label,children:e(`login.connection_current`)}),(0,I.jsx)(`div`,{className:_p.value,children:f||j}),(0,I.jsx)(`div`,{className:_p.hint,children:e(`login.connection_auto_hint`)})]}),(0,I.jsx)(`div`,{className:_p.toggleAdvanced,children:(0,I.jsx)(ic,{checked:g,onChange:_,ariaLabel:e(`login.custom_connection_label`),label:e(`login.custom_connection_label`),labelClassName:_p.toggleLabel})}),g&&(0,I.jsx)($o,{label:e(`login.custom_connection_label`),placeholder:e(`login.custom_connection_placeholder`),value:f,onChange:e=>p(e.target.value),hint:e(`login.custom_connection_hint`)}),(0,I.jsx)($o,{autoFocus:!0,label:e(`login.management_key_label`),placeholder:e(`login.management_key_placeholder`),type:v?`text`:`password`,name:`cpa-management-key`,autoComplete:`current-password`,value:m,onChange:e=>h(e.target.value),onKeyDown:P,rightElement:(0,I.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>b(e=>!e),"aria-label":v?e(`login.hide_key`,{defaultValue:`隐藏密钥`}):e(`login.show_key`,{defaultValue:`显示密钥`}),title:v?e(`login.hide_key`,{defaultValue:`隐藏密钥`}):e(`login.show_key`,{defaultValue:`显示密钥`}),children:v?(0,I.jsx)(js,{size:16}):(0,I.jsx)(As,{size:16})})}),(0,I.jsx)(`div`,{className:_p.toggleAdvanced,children:(0,I.jsx)(ic,{checked:S,onChange:C,ariaLabel:e(`login.remember_password_label`),label:e(`login.remember_password_label`),labelClassName:_p.toggleLabel})}),(0,I.jsx)(L,{fullWidth:!0,onClick:te,loading:w,children:e(w?`login.submitting`:`login.submit_button`)}),A&&(0,I.jsx)(`div`,{className:_p.errorBox,children:A})]})]})})]})}var bp=300;function xp(){let{t:e}=Xo(),{notifications:t,removeNotification:n}=Fc(),[r,i]=(0,y.useState)([]),a=(0,y.useRef)([]);(0,y.useEffect)(()=>{let e=a.current,n=new Set(e.map(e=>e.id)),r=new Set(t.map(e=>e.id)),o=t.filter(e=>!n.has(e.id)),s=new Set(e.filter(e=>!r.has(e.id)).map(e=>e.id));i(e=>{let t=e.map(e=>s.has(e.id)?{...e,isExiting:!0}:e);return o.forEach(e=>{t.find(t=>t.id===e.id)||t.push({...e,isExiting:!1})}),t=t.filter(e=>r.has(e.id)||e.isExiting),t}),s.size>0&&setTimeout(()=>{i(e=>e.filter(e=>!s.has(e.id)))},bp),a.current=t},[t]);let o=e=>{i(t=>t.map(t=>t.id===e?{...t,isExiting:!0}:t)),setTimeout(()=>{n(e)},bp)};return r.length?(0,I.jsx)(`div`,{className:`notification-container`,children:r.map(t=>(0,I.jsxs)(`div`,{className:`notification ${t.type} ${t.isExiting?`exiting`:`entering`}`,children:[(0,I.jsx)(`div`,{className:`message`,children:t.message}),(0,I.jsx)(`button`,{type:`button`,className:`close-btn`,onClick:()=>o(t.id),"aria-label":e(`common.close`),children:(0,I.jsx)(Os,{size:16})})]},t.id))}):null}var Sp=`modal-open`,Cp=0,wp={scrollY:0,contentScrollTop:0,contentEl:null,bodyPosition:``,bodyTop:``,bodyLeft:``,bodyRight:``,bodyWidth:``,bodyOverflow:``,htmlOverflow:``},Tp=()=>{if(typeof document>`u`)return null;let e=document.querySelector(`.content`);return e instanceof HTMLElement?e:null};function Ep(){if(!(typeof document>`u`)){if(Cp===0){let e=document.body,t=document.documentElement,n=Tp();wp.scrollY=window.scrollY||window.pageYOffset||t.scrollTop||0,wp.contentEl=n,wp.contentScrollTop=n?.scrollTop??0,wp.bodyPosition=e.style.position,wp.bodyTop=e.style.top,wp.bodyLeft=e.style.left,wp.bodyRight=e.style.right,wp.bodyWidth=e.style.width,wp.bodyOverflow=e.style.overflow,wp.htmlOverflow=t.style.overflow,e.classList.add(Sp),t.classList.add(Sp),e.style.position=`fixed`,e.style.top=`-${wp.scrollY}px`,e.style.left=`0`,e.style.right=`0`,e.style.width=`100%`,e.style.overflow=`hidden`,t.style.overflow=`hidden`}Cp+=1}}function Dp(){if(!(typeof document>`u`)&&(Cp=Math.max(0,Cp-1),Cp===0)){let e=document.body,t=document.documentElement,n=wp.scrollY,r=wp.contentScrollTop,i=wp.contentEl;e.classList.remove(Sp),t.classList.remove(Sp),e.style.position=wp.bodyPosition,e.style.top=wp.bodyTop,e.style.left=wp.bodyLeft,e.style.right=wp.bodyRight,e.style.width=wp.bodyWidth,e.style.overflow=wp.bodyOverflow,t.style.overflow=wp.htmlOverflow,i&&i.scrollTo({top:r,left:0,behavior:`auto`}),window.scrollTo({top:n,left:0,behavior:`auto`}),wp.scrollY=0,wp.contentScrollTop=0,wp.contentEl=null}}var Op=[`a[href]`,`button:not([disabled])`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex="-1"])`].join(`,`),kp=350;function Ap({open:e,title:t,onClose:n,footer:r,width:i=520,className:a,closeDisabled:o=!1,children:s}){let{t:c}=Xo(),l=(0,y.useId)(),[u,d]=(0,y.useState)(!1),[f,p]=(0,y.useState)(!1),m=(0,y.useRef)(null),h=(0,y.useRef)(null),g=(0,y.useRef)(null),_=(0,y.useRef)(null),v=(0,y.useCallback)(()=>h.current?Array.from(h.current.querySelectorAll(Op)).filter(e=>!e.hasAttribute(`disabled`)&&e.tabIndex!==-1):[],[]),b=(0,y.useCallback)(e=>{m.current===null&&(p(!0),m.current=window.setTimeout(()=>{d(!1),p(!1),m.current=null,e&&n()},kp))},[n]);(0,y.useEffect)(()=>{let t=!1;return e?(m.current!==null&&(window.clearTimeout(m.current),m.current=null),queueMicrotask(()=>{t||(d(!0),p(!1))})):u&&queueMicrotask(()=>{t||b(!1)}),()=>{t=!0}},[e,u,b]);let x=(0,y.useCallback)(()=>{b(!0)},[b]);(0,y.useEffect)(()=>()=>{m.current!==null&&window.clearTimeout(m.current)},[]);let C=e||u;if((0,y.useEffect)(()=>{if(C)return Ep(),()=>Dp()},[C]),(0,y.useEffect)(()=>{if(!e)return;_.current=document.activeElement instanceof HTMLElement?document.activeElement:null;let t=window.setTimeout(()=>{(v()[0]??g.current??h.current)?.focus()},0);return()=>{window.clearTimeout(t)}},[v,e]),(0,y.useEffect)(()=>{e||u||(_.current?.focus(),_.current=null)},[u,e]),(0,y.useEffect)(()=>{if(!e)return;let t=e=>{if(e.key===`Escape`){if(o)return;e.preventDefault(),x();return}if(e.key!==`Tab`)return;let t=v();if(t.length===0){e.preventDefault(),h.current?.focus();return}let n=t[0],r=t[t.length-1],i=document.activeElement;if(e.shiftKey){(i===n||i===h.current)&&(e.preventDefault(),r.focus());return}i===r&&(e.preventDefault(),n.focus())};return document.addEventListener(`keydown`,t),()=>document.removeEventListener(`keydown`,t)},[o,v,x,e]),!e&&!u)return null;let w=(0,I.jsx)(`div`,{className:`modal-overlay ${f?`modal-overlay-closing`:`modal-overlay-entering`}`,children:(0,I.jsxs)(`div`,{ref:h,className:`modal ${f?`modal-closing`:`modal-entering`}${a?` ${a}`:``}`,style:{width:i,maxWidth:`100%`},role:`dialog`,"aria-modal":`true`,"aria-labelledby":t?l:void 0,tabIndex:-1,children:[(0,I.jsx)(`button`,{ref:g,type:`button`,className:`modal-close-floating`,onClick:o?void 0:x,"aria-label":c(`common.close`),disabled:o,children:(0,I.jsx)(Os,{size:20})}),(0,I.jsx)(`div`,{className:`modal-header`,children:(0,I.jsx)(`div`,{className:`modal-title`,id:t?l:void 0,children:t})}),(0,I.jsx)(`div`,{className:`modal-body`,children:s}),r&&(0,I.jsx)(`div`,{className:`modal-footer`,children:r})]})});return typeof document>`u`?w:(0,S.createPortal)(w,document.body)}function jp(){let{t:e}=Xo(),t=Fc(e=>e.confirmation),n=Fc(e=>e.hideConfirmation),r=Fc(e=>e.setConfirmationLoading),{isOpen:i,isLoading:a,options:o}=t;if(!i||!o)return null;let{title:s,message:c,onConfirm:l,onCancel:u,confirmText:d,cancelText:f,variant:p=`primary`}=o,m=async()=>{try{r(!0),await l(),n()}catch(e){console.error(`Confirmation action failed:`,e)}finally{r(!1)}},h=()=>{a||(u&&u(),n())};return(0,I.jsxs)(Ap,{open:i,onClose:h,title:s,closeDisabled:a,children:[typeof c==`string`?(0,I.jsx)(`p`,{style:{margin:`1rem 0`},children:c}):(0,I.jsx)(`div`,{style:{margin:`1rem 0`},children:c}),(0,I.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:`1rem`,marginTop:`2rem`},children:[(0,I.jsx)(L,{variant:`ghost`,onClick:h,disabled:a,children:f||e(`common.cancel`)}),(0,I.jsx)(L,{variant:p,onClick:m,loading:a,children:d||e(`common.confirm`)})]})]})}function Mp(e){let t;return()=>(t===void 0&&(t=e()),t)}var Np=e=>e,Pp=e=>e*1e3,Fp=e=>e/1e3,Ip=e=>Array.isArray(e)&&typeof e[0]==`number`,Lp={value:null,addProjectionMetrics:null},Rp={layout:0,mainThread:0,waapi:0},zp=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},Bp=e=>e!==null;function Vp(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(Bp),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var Hp=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}};function Up(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var Wp=e=>e.startsWith(`--`);function Gp(e,t,n){Wp(t)?e.style.setProperty(t,n):e.style[t]=n}var Kp={};function qp(e,t){let n=Mp(e);return()=>Kp[t]??n()}var Jp=qp(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),Yp=qp(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Xp=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Zp={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Xp([0,.65,.55,1]),circOut:Xp([.55,0,1,.45]),backIn:Xp([.31,.01,.66,-.59]),backOut:Xp([.33,1.53,.69,.99])};function Qp(e,t){if(e)return typeof e==`function`?Yp()?zp(e,t):`ease-out`:Ip(e)?Xp(e):Array.isArray(e)?e.map(e=>Qp(e,t)||Zp.easeOut):Zp[e]}function $p(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=Qp(s,i);Array.isArray(d)&&(u.easing=d),Lp.value&&Rp.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return Lp.value&&p.finished.finally(()=>{Rp.waapi--}),p}function em(e){return typeof e==`function`&&`applyToOptions`in e}function tm({type:e,...t}){return em(e)&&Yp()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease=`easeOut`),t)}var nm=class extends Hp{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=tm(e);this.animation=$p(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=Vp(r,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(e):Gp(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return Fp(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+Fp(e)}get time(){return Fp(Number(this.animation.currentTime)||0)}set time(e){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Pp(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&Jp()?(this.animation.timeline=e,Np):t(this)}},rm=class{constructor(e){this.stop=()=>this.runAll(`stop`),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e){let t=this.animations.map(t=>t.attachTimeline(e));return()=>{t.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll(`time`)}set time(e){this.setAll(`time`,e)}get speed(){return this.getAll(`speed`)}set speed(e){this.setAll(`speed`,e)}get state(){return this.getAll(`state`)}get startTime(){return this.getAll(`startTime`)}get duration(){return im(this.animations,`duration`)}get iterationDuration(){return im(this.animations,`iterationDuration`)}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll(`play`)}pause(){this.runAll(`pause`)}cancel(){this.runAll(`cancel`)}complete(){this.runAll(`complete`)}};function im(e,t){let n=0;for(let r=0;r<e.length;r++){let i=e[r][t];i!==null&&i>n&&(n=i)}return n}var am=class extends rm{then(e,t){return this.finished.finally(e).then(()=>{})}},om=new WeakMap,sm=(e,t=``)=>`${e}:${t}`;function cm(e){let t=om.get(e)||new Map;return om.set(e,t),t}function lm(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function um(e,t){let n=e?.[t]??e?.default??e;return n===e?n:lm(n,e)}var dm=new Set(`borderWidth.borderTopWidth.borderRightWidth.borderBottomWidth.borderLeftWidth.borderRadius.borderTopLeftRadius.borderTopRightRadius.borderBottomRightRadius.borderBottomLeftRadius.width.maxWidth.height.maxHeight.top.right.bottom.left.inset.insetBlock.insetBlockStart.insetBlockEnd.insetInline.insetInlineStart.insetInlineEnd.padding.paddingTop.paddingRight.paddingBottom.paddingLeft.paddingBlock.paddingBlockStart.paddingBlockEnd.paddingInline.paddingInlineStart.paddingInlineEnd.margin.marginTop.marginRight.marginBottom.marginLeft.marginBlock.marginBlockStart.marginBlockEnd.marginInline.marginInlineStart.marginInlineEnd.fontSize.backgroundPositionX.backgroundPositionY`.split(`.`));function fm(e,t){for(let n=0;n<e.length;n++)typeof e[n]==`number`&&dm.has(t)&&(e[n]=e[n]+`px`)}function pm(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}function mm(e,t){let n=window.getComputedStyle(e);return Wp(t)?n.getPropertyValue(t):n[t]}function hm(e,t,n,r){if(e==null)return[];let i=pm(e,r),a=i.length,o=[];for(let e=0;e<a;e++){let r=i[e],s={...n};typeof s.delay==`function`&&(s.delay=s.delay(e,a));for(let e in t){let n=t[e];Array.isArray(n)||(n=[n]);let i={...um(s,e)};i.duration&&(i.duration=Pp(i.duration)),i.delay&&(i.delay=Pp(i.delay));let a=cm(r),c=sm(e,i.pseudoElement||``),l=a.get(c);l&&l.stop(),o.push({map:a,key:c,unresolvedKeyframes:n,options:{...i,element:r,name:e,allowFlatten:!s.type&&!s.ease}})}}for(let e=0;e<o.length;e++){let{unresolvedKeyframes:t,options:n}=o[e],{element:r,name:i,pseudoElement:a}=n;!a&&t[0]===null&&(t[0]=mm(r,i)),Up(t),fm(t,i),!a&&t.length<2&&t.unshift(mm(r,i)),n.keyframes=t}let s=[];for(let e=0;e<o.length;e++){let{map:t,key:n,options:r}=o[e],i=new nm(r);t.set(n,i),i.finished.finally(()=>t.delete(n)),s.push(i)}return s}var gm=(e=>{function t(t,n,r){return new am(hm(t,n,r,e))}return t})(),_m=(0,y.createContext)(null),vm={current:{status:`current`,isCurrentLayer:!0,isAnimating:!1},stacked:{status:`stacked`,isCurrentLayer:!1,isAnimating:!1},exiting:{status:`exiting`,isCurrentLayer:!1,isAnimating:!1}};function ym(){return(0,y.useContext)(_m)}var bm=.36,xm=.22,Sm=28,Cm=12,wm=.15,Tm=.44,Em=100,Dm=-22,Om=100,km=-22,Am=.96,jm=.5,Mm=`-20px 0 36px rgba(0, 0, 0, 0.20)`,Nm=e=>1-(1-e)**4,Pm=e=>e*e,Fm=e=>1-(1-e)**3,Im=()=>typeof window<`u`&&window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches,Lm=e=>`translate3d(0px, ${e}px, 0px)`,Rm=(e,t,n=1)=>n===1?`translate3d(${e}%, ${t}px, 0px)`:`translate3d(${e}%, ${t}px, 0px) scale(${n})`,zm=e=>{e&&(e.style.removeProperty(`transform`),e.style.removeProperty(`opacity`),e.style.removeProperty(`box-shadow`))};function Bm({render:e,getRouteOrder:t,getTransitionVariant:n,scrollContainerRef:r}){let i=$n(),a=(0,y.useRef)(null),o=(0,y.useRef)(null),s=(0,y.useRef)(`forward`),c=(0,y.useRef)(`vertical`),l=(0,y.useRef)(0),u=(0,y.useRef)(0),d=(0,y.useRef)(new Map),f=(0,y.useRef)(null),[p,m]=(0,y.useState)(!1),[h,g]=(0,y.useState)(()=>[{key:i.key,location:i,status:`current`}]),_=h.find(e=>e.status===`current`)??h[h.length-1],v=_?.key??i.key,b=_?.location.pathname,x=(0,y.useCallback)(()=>r?.current?r.current:typeof document>`u`?null:document.scrollingElement,[r]);return(0,y.useLayoutEffect)(()=>{if(p||i.key===v||b===i.pathname)return;let e=x()?.scrollTop??0;l.current=e,d.current.set(v,e),u.current=d.current.get(i.key)??0;let r=e=>{if(!t||!e)return null;let n=t(e);return typeof n==`number`&&n>=0?n:null},a=r(b),o=r(i.pathname),_=n?n(b??``,i.pathname):`vertical`,y=a===null||o===null||a===o||o>a?`forward`:`backward`;_===`ios`&&h.some(e=>e.key===i.key)&&(y=`backward`),s.current=y,c.current=_;let S=(()=>{if(_!==`ios`||y!==`backward`)return!1;let e=e=>e.split(`/`).filter(Boolean).filter(e=>e.length>0),t=e(b??``),n=e(i.pathname);return!t.length||!n.length?!1:t[0]===n[0]&&n.length===1})();g(e=>{let t=c.current,n=s.current,r=e.findIndex(e=>e.status===`current`),a=r>=0?r:e.length-1,o=e[a],l=e.filter((e,t)=>t!==a).map(e=>({...e,status:`stacked`})),u={key:i.key,location:i,status:`current`};if(!o)return f.current=[u],[u];if(t===`ios`){if(n===`forward`){let e={...o,status:`exiting`},t={...o,status:`stacked`};return f.current=[...l,t,u],[...l,e,u]}let t=e.findIndex(e=>e.key===i.key);if(t!==-1){let n=e.slice(0,t+1).map((e,n)=>{let r=n===t;return{...e,location:r?i:e.location,status:r?`current`:`stacked`}});if(S)return f.current=n,n;let r={...o,status:`exiting`};return f.current=n,[...n,r]}}if(S)return f.current=[u],[u];let d={...o,status:`exiting`};return f.current=[u],[d,u]}),m(!0)},[p,i,v,b,t,n,x,h]),(0,y.useLayoutEffect)(()=>{if(!p||!a.current)return;let e=a.current,t=o.current,n=c.current;zm(e),zm(t);let r=x(),i=l.current,d=u.current;r&&i!==d&&r.scrollTo({top:d,left:0,behavior:`auto`});let h=s.current===`forward`,_=h?Sm:-Sm,v=h?-Cm:Cm,y=d-i,b=Im(),S=[],C=!1,w=!1,T=()=>{if(w)return;w=!0;let n=f.current;f.current=null,g(e=>n??e.filter(e=>e.status!==`exiting`)),m(!1),zm(e),zm(t)};if(b)t&&(t.style.transform=n===`ios`?Rm(0,y):Lm(y),S.push(gm(t,{opacity:[1,0]},{duration:wm,ease:Fm}))),e.style.opacity=`0`,S.push(gm(e,{opacity:[0,1]},{duration:wm,ease:Fm}));else if(n===`ios`){let n=h?Dm:Om,r=h?Em:km,i=h?Am:1,a=h?jm:1,o=h?1:Am,s=h?1:jm;t&&(t.style.transform=Rm(0,y,1),t.style.opacity=`1`),e.style.transform=Rm(r,0,o),e.style.opacity=String(s);let c=h?e:t;c&&(c.style.boxShadow=Mm),t&&S.push(gm(t,{transform:[Rm(0,y,1),Rm(n,y,i)],opacity:[1,a]},{duration:Tm,ease:Fm})),S.push(gm(e,{transform:[Rm(r,0,o),Rm(0,0,1)],opacity:[s,1]},{duration:Tm,ease:Fm}))}else t&&(t.style.transform=Lm(y),S.push(gm(t,{transform:[Lm(y),Lm(y+v)],opacity:[1,0]},{duration:xm,ease:Pm}))),e.style.transform=Lm(_),e.style.opacity=`0`,S.push(gm(e,{transform:[Lm(_),Lm(0)],opacity:[0,1]},{duration:bm,ease:Nm}));return S.length?Promise.all(S.map(e=>e.finished.catch(()=>void 0))).then(()=>{C||T()}):T(),()=>{C=!0,S.forEach(e=>e.stop())}},[p,x]),(0,I.jsx)(`div`,{className:`page-transition${p?` page-transition--animating`:``}`,children:(()=>{let t=h.findIndex(e=>e.status===`current`),n=t===-1?h.length-1:t,r=h.slice(0,n).map((e,t)=>({layer:e,index:t})).reverse().find(({layer:e})=>e.status===`stacked`)?.index;return h.map((t,n)=>{let i=t.status===`stacked`&&n===r;return(0,I.jsx)(`div`,{className:[`page-transition__layer`,t.status===`exiting`?`page-transition__layer--exit`:``,t.status===`stacked`?`page-transition__layer--stacked`:``,i?`page-transition__layer--stacked-keep`:``].filter(Boolean).join(` `),"aria-hidden":t.status!==`current`,inert:t.status!==`current`,ref:t.status===`exiting`?o:t.status===`current`?a:void 0,children:(0,I.jsx)(_m.Provider,{value:{...vm[t.status],isAnimating:p},children:e(t.location)})},t.key)})})()})}var Vm={qwen:{light:{bg:`#ede5fd`,text:`#5530c7`},dark:{bg:`#36208a`,text:`#b5a3f0`}},gemini:{light:{bg:`#e3f2fd`,text:`#1565c0`},dark:{bg:`#0d47a1`,text:`#64b5f6`}},aistudio:{light:{bg:`#f0f2f5`,text:`#2f343c`},dark:{bg:`#373c42`,text:`#cfd3db`}},claude:{light:{bg:`#fbece4`,text:`#c05621`},dark:{bg:`#5e2c14`,text:`#e8a882`}},codex:{light:{bg:`#eae7ff`,text:`#3538d4`},dark:{bg:`#262395`,text:`#b5b0ff`}},kimi:{light:{bg:`#dce8ff`,text:`#0560cf`},dark:{bg:`#003880`,text:`#70b5ff`}},antigravity:{light:{bg:`#e0f7fa`,text:`#006064`},dark:{bg:`#004d40`,text:`#80deea`}},xai:{light:{bg:`#f3f4f6`,text:`#111827`,border:`1px solid #d1d5db`},dark:{bg:`#111827`,text:`#f9fafb`,border:`1px solid #374151`}},iflow:{light:{bg:`#f5e3fc`,text:`#9025c8`},dark:{bg:`#521490`,text:`#d49cf5`}},vertex:{light:{bg:`#e4edfd`,text:`#2b5fbc`},dark:{bg:`#1a3d80`,text:`#89b3f7`}},empty:{light:{bg:`#f5f5f5`,text:`#616161`},dark:{bg:`#424242`,text:`#bdbdbd`}},unknown:{light:{bg:`#f0f0f0`,text:`#666666`,border:`1px dashed #999999`},dark:{bg:`#3a3a3a`,text:`#aaaaaa`,border:`1px dashed #666666`}}},Hm=[`https://daily-cloudcode-pa.googleapis.com/v1internal:retrieveUserQuotaSummary`,`https://daily-cloudcode-pa.sandbox.googleapis.com/v1internal:retrieveUserQuotaSummary`,`https://cloudcode-pa.googleapis.com/v1internal:retrieveUserQuotaSummary`],Um=`https://daily-cloudcode-pa.googleapis.com/v1internal:loadCodeAssist`,Wm={Authorization:`Bearer $TOKEN$`,"Content-Type":`application/json`,"User-Agent":`antigravity/cli/1.0.8 darwin/arm64`},Gm=`https://api.anthropic.com/api/oauth/profile`,Km=`https://api.anthropic.com/api/oauth/usage`,qm={Authorization:`Bearer $TOKEN$`,"Content-Type":`application/json`,"anthropic-beta":`oauth-2025-04-20`},Jm=[{key:`five_hour`,id:`five-hour`,labelKey:`claude_quota.five_hour`},{key:`seven_day`,id:`seven-day`,labelKey:`claude_quota.seven_day`},{key:`seven_day_oauth_apps`,id:`seven-day-oauth-apps`,labelKey:`claude_quota.seven_day_oauth_apps`},{key:`seven_day_opus`,id:`seven-day-opus`,labelKey:`claude_quota.seven_day_opus`},{key:`seven_day_sonnet`,id:`seven-day-sonnet`,labelKey:`claude_quota.seven_day_sonnet`},{key:`seven_day_cowork`,id:`seven-day-cowork`,labelKey:`claude_quota.seven_day_cowork`},{key:`iguana_necktie`,id:`iguana-necktie`,labelKey:`claude_quota.iguana_necktie`}],Ym=`https://chatgpt.com/backend-api/wham/usage`,Xm=`https://chatgpt.com/backend-api/wham/rate-limit-reset-credits/consume`,Zm={Authorization:`Bearer $TOKEN$`,"Content-Type":`application/json`,"User-Agent":`codex_cli_rs/0.76.0 (Debian 13.0.0; x86_64) WindowsTerminal`},Qm=`https://api.kimi.com/coding/v1/usages`,$m={Authorization:`Bearer $TOKEN$`},eh=`https://cli-chat-proxy.grok.com/v1/billing`,th={Authorization:`Bearer $TOKEN$`},nh=e=>typeof e==`number`&&Number.isFinite(e)?e.toString():typeof e==`string`&&e.trim()||null;function rh(e){return typeof e==`string`?e.trim()||null:typeof e==`number`&&Number.isFinite(e)?e.toString():null}function ih(e){if(typeof e==`number`&&Number.isFinite(e))return e;if(typeof e==`string`){let t=e.trim();if(!t)return null;let n=Number(t);return Number.isFinite(n)?n:null}return null}function ah(e){let t=ih(e);if(t!==null)return t;if(typeof e==`string`){let t=e.trim();if(!t)return null;if(t.endsWith(`%`)){let e=Number(t.slice(0,-1));return Number.isFinite(e)?e/100:null}}return null}function oh(e){let t=rh(e);return t?t.toLowerCase():null}function sh(e){let t=e.trim();if(!t)return null;try{let e=t.replace(/-/g,`+`).replace(/_/g,`/`),n=e.padEnd(Math.ceil(e.length/4)*4,`=`);if(typeof window<`u`&&typeof window.atob==`function`)return window.atob(n);if(typeof atob==`function`)return atob(n)}catch{return null}return null}function ch(e){if(!e)return null;if(typeof e==`object`)return Array.isArray(e)?null:e;if(typeof e!=`string`)return null;let t=e.trim();if(!t)return null;try{let e=JSON.parse(t);if(e&&typeof e==`object`)return e}catch{}let n=t.split(`.`);if(n.length<2)return null;let r=sh(n[1]);if(!r)return null;try{let e=JSON.parse(r);if(e&&typeof e==`object`)return e}catch{return null}return null}function lh(e){let t=e=>{if(e==null)return null;if(typeof e==`string`){let t=e.trim();if(!t)return null;try{let e=JSON.parse(t);if(e&&typeof e==`object`&&!Array.isArray(e))return e}catch{return null}return null}return typeof e==`object`&&!Array.isArray(e)?e:null},n=t(e);return n?`models`in n?n:t(n.body)||n:null}function uh(e){if(e==null)return null;if(typeof e==`string`){let t=e.trim();if(!t)return null;try{return JSON.parse(t)}catch{return null}}return typeof e==`object`?e:null}function dh(e){if(e==null)return null;if(typeof e==`string`){let t=e.trim();if(!t)return null;try{return JSON.parse(t)}catch{return null}}return typeof e==`object`?e:null}function fh(e){if(e==null)return null;if(typeof e==`string`){let t=e.trim();if(!t)return null;try{return JSON.parse(t)}catch{return null}}return typeof e==`object`?e:null}function ph(e){if(e==null)return null;if(typeof e==`string`){let t=e.trim();if(!t)return null;try{return JSON.parse(t)}catch{return null}}return typeof e==`object`?e:null}var mh=e=>!e||typeof e!=`object`||Array.isArray(e)?null:e,hh=e=>{let t=ch(e);return t?mh(t[`https://api.openai.com/auth`])??t:null};function gh(e){let t=ch(e);return t?rh(t.chatgpt_account_id??t.chatgptAccountId):null}function _h(e){let t=e&&typeof e.metadata==`object`&&e.metadata!==null?e.metadata:null,n=e&&typeof e.attributes==`object`&&e.attributes!==null?e.attributes:null,r=[e.id_token,t?.id_token,n?.id_token];for(let e of r){let t=gh(e);if(t)return t}return null}function vh(e){let t=e&&typeof e.metadata==`object`&&e.metadata!==null?e.metadata:null,n=e&&typeof e.attributes==`object`&&e.attributes!==null?e.attributes:null,r=e&&typeof e.id_token==`object`&&e.id_token!==null?e.id_token:null,i=t&&typeof t.id_token==`object`&&t.id_token!==null?t.id_token:null,a=[e.plan_type,e.planType,e.plan_type,e.planType,e.id_token,r?.plan_type,r?.planType,t?.plan_type,t?.planType,t?.id_token,i?.plan_type,i?.planType,n?.plan_type,n?.planType,n?.id_token];for(let e of a){let t=oh(e);if(t)return t}return null}var yh=e=>{let t=ih(e);if(t===0)return null;if(t!==null)return t;let n=rh(e);return!n||n===`0`?null:n};function bh(e){let t=mh(e.metadata),n=mh(e.attributes),r=hh(e.id_token),i=hh(t?.id_token),a=hh(n?.id_token),o=mh(e.subscription),s=mh(t?.subscription),c=mh(n?.subscription),l=[e.chatgpt_subscription_active_until,e.chatgptSubscriptionActiveUntil,e.subscription_active_until,e.subscriptionActiveUntil,o?.active_until,o?.activeUntil,r?.chatgpt_subscription_active_until,r?.chatgptSubscriptionActiveUntil,t?.chatgpt_subscription_active_until,t?.chatgptSubscriptionActiveUntil,t?.subscription_active_until,t?.subscriptionActiveUntil,s?.active_until,s?.activeUntil,i?.chatgpt_subscription_active_until,i?.chatgptSubscriptionActiveUntil,n?.chatgpt_subscription_active_until,n?.chatgptSubscriptionActiveUntil,n?.subscription_active_until,n?.subscriptionActiveUntil,c?.active_until,c?.activeUntil,a?.chatgpt_subscription_active_until,a?.chatgptSubscriptionActiveUntil];for(let e of l){let t=yh(e);if(t!==null)return t}return null}function xh(e){if(!e)return`-`;let t=new Date(e);return Number.isNaN(t.getTime())?`-`:t.toLocaleString(void 0,{month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,hour12:!1})}function Sh(e){if(!e)return`-`;let t=new Date(e*1e3);return Number.isNaN(t.getTime())?`-`:t.toLocaleString(void 0,{month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,hour12:!1})}function Ch(e){if(!e)return`-`;let t=ih(e.reset_at??e.resetAt);if(t!==null&&t>0)return Sh(t);let n=ih(e.reset_after_seconds??e.resetAfterSeconds);return n!==null&&n>0?Sh(Math.floor(Date.now()/1e3+n)):`-`}function wh(e,t){let n=Error(e);return t!==void 0&&(n.status=t),n}function Th(e){if(typeof e==`object`&&e&&`status`in e){let t=e.status;if(typeof t==`number`&&Number.isFinite(t))return t;let n=Number(t);if(Number.isFinite(n)&&n>0)return n}}function Eh(e,t){return t?e(`kimi_quota.reset_hint`,{hint:t}):``}function Dh(e){let t=e.provider??e.type??``,n=String(t).trim().toLowerCase().replace(/_/g,`-`);return n===`x-ai`||n===`grok`?`xai`:n}function Oh(e){return Dh(e)===`antigravity`}function kh(e){return Dh(e)===`claude`}function Ah(e){return Dh(e)===`codex`}function jh(e){return Dh(e)===`kimi`}function Mh(e){return Dh(e)===`xai`}function Nh(e){let t=e.disabled;return typeof t==`boolean`?t:typeof t==`number`?t!==0:typeof t==`string`?t.trim().toLowerCase()===`true`:!1}var Ph=new Map([[`5h`,0],[`five-hour`,0],[`five_hour`,0],[`weekly`,1],[`week`,1]]);function Fh(e,t){return e.trim().toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)||t}function Ih(e){let t=e.window?.toLowerCase();return t?Ph.get(t)??2**53-1:2**53-1}function Lh(e){return(Array.isArray(e.groups)?e.groups:[]).map((e,t)=>{let n=rh(e.displayName??e.display_name)??`Quota Group ${t+1}`,r=Fh(n,`quota-group-${t+1}`),i=(Array.isArray(e.buckets)?e.buckets:[]).map((e,t)=>{let n=ah(e.remainingFraction??e.remaining_fraction);if(n===null)return null;let i=rh(e.window)??void 0,a=rh(e.bucketId??e.bucket_id)??`${r}-${i??`bucket-${t+1}`}`;return{id:a,label:rh(e.displayName??e.display_name)??a,window:i,remainingFraction:n,resetTime:rh(e.resetTime??e.reset_time)??void 0,description:rh(e.description)??void 0}}).filter(e=>e!==null).sort((e,t)=>{let n=Ih(e)-Ih(t);return n===0?e.label.localeCompare(t.label):n});return i.length===0?null:{id:r,label:n,description:rh(e.description)??void 0,buckets:i}}).filter(e=>e!==null)}function Rh(e){if(typeof e==`number`&&Number.isFinite(e))return Math.floor(e);if(typeof e==`string`){let t=Number(e.trim());return Number.isFinite(t)?Math.floor(t):null}return null}function zh(e){for(let t of[`reset_at`,`resetAt`,`reset_time`,`resetTime`]){let n=e[t];if(typeof n==`string`&&n.trim())try{let e=n.replace(/(\.\d{6})\d+/,`$1`),t=new Date(e);if(Number.isNaN(t.getTime()))continue;let r=Date.now(),i=t.getTime()-r;if(i<=0)return;let a=Math.floor(i/6e4),o=Math.floor(a/60),s=a%60;return o>0&&s>0?`${o}h ${s}m`:o>0?`${o}h`:s>0?`${s}m`:`<1m`}catch{continue}}for(let t of[`reset_in`,`resetIn`,`ttl`]){let n=Rh(e[t]);if(n!==null&&n>0){let e=Math.floor(n/3600),t=Math.floor(n%3600/60);return e>0&&t>0?`${e}h ${t}m`:e>0?`${e}h`:t>0?`${t}m`:`<1m`}}}function Bh(e,t){let n=typeof t==`string`?t.trim().toUpperCase():``;return n===`MINUTES`?e%60==0?`${e/60}h`:`${e}m`:n===`HOURS`?`${e}h`:n===`DAYS`?`${e}d`:`${e}s`}function Vh(e,t,n,r){for(let n of[`name`,`title`,`scope`]){let r=e[n]??t[n];if(typeof r==`string`&&r.trim())return{label:r.trim()}}let i=Rh(n.duration)??Rh(e.duration)??Rh(t.duration),a=n.timeUnit??e.timeUnit??t.timeUnit;return i!==null&&i>0?{labelKey:`kimi_quota.limit_window`,labelParams:{duration:Bh(i,a)}}:{labelKey:`kimi_quota.limit_index`,labelParams:{index:r+1}}}function Hh(e,t){let n=Rh(e.limit),r=Rh(e.used);if(r===null){let t=Rh(e.remaining);t!==null&&n!==null&&(r=n-t)}if(r===null&&n===null)return null;let i=typeof e.name==`string`&&e.name.trim()||typeof e.title==`string`&&e.title.trim();return{...i?{label:i}:t,used:r??0,limit:n??0,resetHint:zh(e)}}function Uh(e){let t=[],n=e.usage;if(n&&typeof n==`object`){let e=Hh(n,{labelKey:`kimi_quota.weekly_limit`});e&&t.push({id:`summary`,...e})}let r=e.limits;return Array.isArray(r)&&r.forEach((e,n)=>{let r=e.detail&&typeof e.detail==`object`?e.detail:e,i=Hh(r,Vh(e,r,e.window&&typeof e.window==`object`?e.window:{},n));i&&t.push({id:`limit-${n}`,...i})}),t}var Wh=JSON.stringify({metadata:{ideType:`ANTIGRAVITY`}}),Gh=new Map([[`free-tier`,`free`],[`g1-pro-tier`,`pro`],[`g1-ultra-tier`,`ultra`],[`g1-ultra-lite-tier`,`ultra-lite`]]),Kh=e=>typeof e==`object`&&!!e&&!Array.isArray(e),qh=e=>{if(!Kh(e))return null;let t=e;return{id:rh(t.id),name:rh(t.name)}},Jh=e=>typeof e==`number`&&Number.isFinite(e)?e:rh(e),Yh=e=>Array.isArray(e)?e.filter(Kh).map(e=>({creditType:rh(e.creditType??e.credit_type),creditAmount:Jh(e.creditAmount??e.credit_amount),minimumCreditAmountForUsage:Jh(e.minimumCreditAmountForUsage??e.minimum_credit_amount_for_usage)})).filter(e=>e.creditType||e.creditAmount!==null):[],Xh=e=>e?Gh.get(e)??`unknown`:`unknown`,Zh=e=>{let t=lh(e);if(!t)return null;let n=t.currentTier??t.current_tier,r=t.paidTier??t.paid_tier,i=qh(n),a=qh(r),o=a?.id?a:i;if(!o?.id&&!o?.name)return null;let s=Kh(r)?r.availableCredits??r.available_credits:void 0;return{plan:Xh(o.id),tierId:o.id,tierName:o.name,source:a?.id?`paid`:`current`,currentTier:i,paidTier:a,availableCredits:Yh(s)}},Qh={async get(e){let t=await Xf.request({authIndex:e,method:`POST`,url:Um,header:{...Wm},data:Wh});if(t.statusCode<200||t.statusCode>=300)throw wh(Yf(t),t.statusCode);return Zh(t.body??t.bodyText)}},$h=15*1e3,eg={getUsage:()=>B.get(`/api-key-usage`,{timeout:$h})},tg={async fetchConfigYaml(){let e=(await B.getRaw(`/config.yaml`,{responseType:`text`,headers:{Accept:`application/yaml, text/yaml, text/plain`}})).data;return typeof e==`string`?e:e==null?``:String(e)},async saveConfigYaml(e){await B.put(`/config.yaml`,e,{headers:{"Content-Type":`application/yaml`,Accept:`application/json, text/plain, */*`}})}},ng={async list(){let e=await B.get(`/api-keys`),t=e[`api-keys`]??e.apiKeys;return Array.isArray(t)?t.map(e=>String(e)):[]},replace:e=>B.put(`/api-keys`,e),update:(e,t)=>B.patch(`/api-keys`,{index:e,value:t}),delete:e=>B.delete(`/api-keys?index=${e}`)},rg=e=>e&&Object.keys(e).length?e:void 0,ig=[`auth-index`],ag=[`api-key`,`priority`,`prefix`,`base-url`,`proxy-url`,`headers`,`models`,`excluded-models`,`disable-cooling`],og=ag,sg=[...ag,`websockets`],cg=[...ag,`cloak`,`experimental-cch-signing`],lg=[`api-key`,`priority`,`prefix`,`base-url`,`proxy-url`,`headers`,`models`,`excluded-models`],ug=[`name`,`priority`,`disabled`,`prefix`,`base-url`,`api-key-entries`,`headers`,`models`,`test-model`,`disable-cooling`],dg=[`name`,`alias`,`priority`,`test-model`],fg=[...dg,`image`,`thinking`],pg=[`api-key`,`proxy-url`],mg=[`mode`,`strict-mode`,`sensitive-words`,`cache-user-id`],hg=(e,t)=>{for(let n of t){let t=e[n];if(t==null)continue;let r=String(t).trim();if(r)return r}return``},gg=e=>{let t=hg(e,[`api-key`]);return t?`${t}\u0000${hg(e,[`base-url`])}`:``},_g=e=>hg(e,[`name`]),vg=e=>hg(e,[`name`]),yg=e=>hg(e,[`api-key`]),bg=(e,t)=>{let n=fc(e)?{...e}:{};return[...t,...ig].forEach(e=>{delete n[e]}),n},xg=(e,t,n)=>{let r=bg(e,n);return Object.entries(t).forEach(([e,t])=>{t!==void 0&&(r[e]=t)}),r},Sg=(e,t,n,r,i,a=!0)=>{let o=i(n);if(o)for(let n=0;n<e.length;n+=1){let r=e[n];if(!(!r||t.has(n))&&i(r)===o)return t.add(n),r}if(a){let n=e[r];if(n&&!t.has(r))return t.add(r),n}},Cg=(e,t,n,r,i=!0)=>{let a=Array.isArray(e)?e.map(e=>fc(e)?e:void 0):[],o=new Set;return t.map((e,t)=>xg(Sg(a,o,e,t,r,i),e,n))},wg=(e,t)=>{if(!fc(e))return[];let n=e[t];return Array.isArray(n)?n:[]},Tg=(e,t,n=dg)=>Array.isArray(t)?Cg(fc(e)?e.models:void 0,t.filter(fc),n,vg,!1):void 0,Eg=(e,t,n)=>{let r=xg(e,t,n),i=Tg(e,t.models);return i&&(r.models=i),fc(t.cloak)&&(r.cloak=xg(fc(e)?e.cloak:void 0,t.cloak,mg)),r},Dg=(e,t)=>{let n=xg(e,t,ug),r=fc(e)?e[`api-key-entries`]:void 0,i=t[`api-key-entries`];Array.isArray(i)&&(n[`api-key-entries`]=Cg(r,i.filter(fc),pg,yg));let a=Tg(e,t.models,fg);return a&&(n.models=a),n},Og=async(e,t,n,r,i)=>{let a=wg(await B.get(`/config`),e),o=t.map(e=>n(e)),s=Array.isArray(a)?a.map(e=>fc(e)?e:void 0):[],c=new Set;return o.map((e,t)=>r(Sg(s,c,e,t,i),e))},kg=(e,t)=>{if(!fc(e))return[];let n=e[t];return Array.isArray(n)?n:[]},Ag=(e,t)=>{let n=new URLSearchParams;return n.set(`api-key`,e.trim()),n.set(`base-url`,(t??``).trim()),`?${n.toString()}`},jg=(e,t=!1)=>Array.isArray(e)?e.map(e=>{if(!e?.name)return null;let n={name:e.name};return e.alias&&e.alias!==e.name&&(n.alias=e.alias),e.priority!==void 0&&(n.priority=e.priority),e.testModel&&(n[`test-model`]=e.testModel),t&&(e.image&&(n.image=!0),e.thinking&&(n.thinking=e.thinking)),n}).filter(Boolean):void 0,Mg=e=>{let t={"api-key":e.apiKey};return e.proxyUrl&&(t[`proxy-url`]=e.proxyUrl),t},Ng=e=>{let t={"api-key":e.apiKey};e.priority!==void 0&&(t.priority=e.priority),e.prefix?.trim()&&(t.prefix=e.prefix.trim()),e.baseUrl&&(t[`base-url`]=e.baseUrl),e.websockets!==void 0&&(t.websockets=e.websockets),e.proxyUrl&&(t[`proxy-url`]=e.proxyUrl),e.disableCooling&&(t[`disable-cooling`]=!0);let n=rg(e.headers);n&&(t.headers=n);let r=jg(e.models);if(r&&r.length&&(t.models=r),e.excludedModels&&e.excludedModels.length&&(t[`excluded-models`]=e.excludedModels),e.cloak){let n={},r=e.cloak.mode?.trim();r&&(n.mode=r),e.cloak.strictMode!==void 0&&(n[`strict-mode`]=e.cloak.strictMode),e.cloak.sensitiveWords&&e.cloak.sensitiveWords.length&&(n[`sensitive-words`]=e.cloak.sensitiveWords),e.cloak.cacheUserId&&(n[`cache-user-id`]=!0),Object.keys(n).length&&(t.cloak=n)}return e.experimentalCchSigning&&(t[`experimental-cch-signing`]=!0),t},Pg=e=>Array.isArray(e)?e.map(e=>{let t=typeof e?.name==`string`?e.name.trim():``,n=typeof e?.alias==`string`?e.alias.trim():``;return!t||!n?null:{name:t,alias:n}}).filter(Boolean):void 0,Fg=e=>{let t={"api-key":e.apiKey};e.priority!==void 0&&(t.priority=e.priority),e.prefix?.trim()&&(t.prefix=e.prefix.trim()),e.baseUrl&&(t[`base-url`]=e.baseUrl),e.proxyUrl&&(t[`proxy-url`]=e.proxyUrl);let n=rg(e.headers);n&&(t.headers=n);let r=Pg(e.models);return r&&r.length&&(t.models=r),e.excludedModels&&e.excludedModels.length&&(t[`excluded-models`]=e.excludedModels),t},Ig=e=>{let t={"api-key":e.apiKey};e.priority!==void 0&&(t.priority=e.priority),e.prefix?.trim()&&(t.prefix=e.prefix.trim()),e.baseUrl&&(t[`base-url`]=e.baseUrl),e.proxyUrl&&(t[`proxy-url`]=e.proxyUrl),e.disableCooling&&(t[`disable-cooling`]=!0);let n=rg(e.headers);n&&(t.headers=n);let r=jg(e.models);return r&&r.length&&(t.models=r),e.excludedModels&&e.excludedModels.length&&(t[`excluded-models`]=e.excludedModels),t},Lg=e=>{let t={name:e.name,"base-url":e.baseUrl,"api-key-entries":Array.isArray(e.apiKeyEntries)?e.apiKeyEntries.map(e=>Mg(e)):[]};e.prefix?.trim()&&(t.prefix=e.prefix.trim()),e.disabled!==void 0&&(t.disabled=e.disabled);let n=rg(e.headers);n&&(t.headers=n);let r=jg(e.models,!0);return r&&r.length&&(t.models=r),e.priority!==void 0&&(t.priority=e.priority),e.testModel&&(t[`test-model`]=e.testModel),e.disableCooling&&(t[`disable-cooling`]=!0),t},Rg={async getGeminiKeys(){return kg(await B.get(`/gemini-api-key`),`gemini-api-key`).map(e=>Pf(e)).filter(Boolean)},saveGeminiKeys:async e=>B.put(`/gemini-api-key`,await Og(`gemini-api-key`,e,Ig,(e,t)=>Eg(e,t,og),gg)),deleteGeminiKey:(e,t)=>B.delete(`/gemini-api-key${Ag(e,t)}`),async getCodexConfigs(){return kg(await B.get(`/codex-api-key`),`codex-api-key`).map(e=>Nf(e)).filter(Boolean)},saveCodexConfigs:async e=>B.put(`/codex-api-key`,await Og(`codex-api-key`,e,Ng,(e,t)=>Eg(e,t,sg),gg)),deleteCodexConfig:(e,t)=>B.delete(`/codex-api-key${Ag(e,t)}`),async getClaudeConfigs(){return kg(await B.get(`/claude-api-key`),`claude-api-key`).map(e=>Nf(e)).filter(Boolean)},saveClaudeConfigs:async e=>B.put(`/claude-api-key`,await Og(`claude-api-key`,e,Ng,(e,t)=>Eg(e,t,cg),gg)),deleteClaudeConfig:(e,t)=>B.delete(`/claude-api-key${Ag(e,t)}`),async getVertexConfigs(){return kg(await B.get(`/vertex-api-key`),`vertex-api-key`).map(e=>Nf(e)).filter(Boolean)},saveVertexConfigs:async e=>B.put(`/vertex-api-key`,await Og(`vertex-api-key`,e,Fg,(e,t)=>Eg(e,t,lg),gg)),deleteVertexConfig:(e,t)=>B.delete(`/vertex-api-key${Ag(e,t)}`),async getOpenAIProviders(){return kg(await B.get(`/openai-compatibility`),`openai-compatibility`).map(e=>Ff(e)).filter(Boolean)},saveOpenAIProviders:async e=>B.put(`/openai-compatibility`,await Og(`openai-compatibility`,e,Lg,Dg,_g)),updateOpenAIProviderDisabled:(e,t)=>B.patch(`/openai-compatibility`,{index:e,value:{disabled:t}}),deleteOpenAIProvider:e=>B.delete(`/openai-compatibility?index=${encodeURIComponent(String(e))}`)},zg={"anti-gravity":`antigravity`,grok:`xai`,"x-ai":`xai`,"x.ai":`xai`},Bg=e=>{let t=e.trim().toLowerCase().replace(/_/g,`-`);return zg[t]??t},Vg=/^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2})(\.(\d+))?(Z|[+-]\d{2}:\d{2})?$/i;function Hg(e){let t=e.trim();if(!t)return``;let n=t.match(Vg);if(!n)return t;let[,r,,i=``,a=``]=n;return i.length<=3?t:`${r}.${i.slice(0,3)}${a}`}function Ug(e){if(typeof e==`number`&&Number.isFinite(e))return e;if(e instanceof Date)return e.getTime();if(typeof e!=`string`)return NaN;let t=e.trim();if(!t)return NaN;let n=Hg(t),r=Date.parse(n);if(!Number.isNaN(r))return r;if(n!==t){let e=Date.parse(t);if(!Number.isNaN(e))return e}return NaN}function Wg(e){let t=Ug(e);return Number.isFinite(t)?new Date(t):null}var Gg=`AUTH_FILE_INVALID_JSON_OBJECT`,Kg=e=>{if(!(!e||typeof e!=`object`)&&`status`in e)return e.status},qg=e=>{let t=new Set,n=[];return e.forEach(e=>{let r=String(e??``).trim();!r||t.has(r)||(t.add(r),n.push(r))}),n},Jg=e=>Array.isArray(e)?qg(e.map(e=>String(e??``))):[],Yg=e=>Array.isArray(e)?e.reduce((e,t)=>{if(!t||typeof t!=`object`)return e;let n=t,r=String(n.name??``).trim(),i=typeof n.error==`string`?n.error.trim():typeof n.message==`string`?n.message.trim():``;return!r&&!i||e.push({name:r,error:i||`Unknown error`}),e},[]):[],Xg=(e,t)=>{let n=Yg(e?.failed),r=Jg(e?.files),i=e?.uploaded===void 0&&n.length===0;return{status:e?.status??(n.length>0?`partial`:`ok`),uploaded:e?.uploaded??(i?t.length:0),files:r.length?r:i?[...t]:[],failed:n}},Zg=(e,t)=>{let n=Yg(e?.failed),r=Jg(e?.files),i=e?.deleted===void 0&&n.length===0;return{status:e?.status??(n.length>0?`partial`:`ok`),deleted:e?.deleted??(i?t.length:0),files:r.length?r:i?[...t]:[],failed:n}},Qg=(e,t)=>{let n=e[t];return typeof n==`string`?n.trim():``},$g=e=>{let t=[e.modtime,e.updated_at,e.last_refresh];for(let e of t){if(typeof e==`number`&&Number.isFinite(e))return e<0xe8d4a51000?e*1e3:e;if(typeof e==`string`){let t=e.trim();if(!t)continue;let n=Number(t);if(Number.isFinite(n))return n<0xe8d4a51000?n*1e3:n;let r=Ug(t);if(!Number.isNaN(r))return r}}return 0},e_=e=>e.runtime_only===!0,t_=e=>e==null?!1:typeof e==`string`?e.trim().length>0:Array.isArray(e)?e.length>0:!0,n_=e=>Object.values(e).reduce((e,t)=>e+ +!!t_(t),0),r_=e=>{let t=0;return Qg(e,`source`).toLowerCase()===`file`&&(t+=32),Qg(e,`path`)&&(t+=16),e_(e)||(t+=8),e.disabled!==!0&&(t+=4),$g(e)>0&&(t+=2),t},i_=(e,t)=>{let n=r_(t)-r_(e);if(n!==0)return n;let r=$g(t)-$g(e);if(r!==0)return r;let i=n_(t)-n_(e);return i===0?0:i},a_=e=>{let[t,...n]=[...e].sort(i_),r={...t};return n.forEach(e=>{Object.entries(e).forEach(([e,t])=>{!t_(r[e])&&t_(t)&&(r[e]=t)})}),r},o_=e=>{let t=Array.isArray(e?.files)?e.files:[],n=new Map;t.forEach(e=>{let t=Qg(e,`name`)||JSON.stringify(e),r=n.get(t);if(r){r.push(e);return}n.set(t,[e])});let r=Array.from(n.values()).map(a_);return r.sort((e,t)=>Qg(e,`name`).localeCompare(Qg(t,`name`),void 0,{sensitivity:`accent`})),{...e,files:r,total:r.length}},s_=e=>{let t=e.trim(),n;try{n=JSON.parse(t)}catch{throw Error(Gg)}if(!n||typeof n!=`object`||Array.isArray(n))throw Error(Gg);return{...n}},c_=async(e,t)=>{let n=new File([t],e,{type:`application/json`});await f_.upload(n)},l_=e=>{if(!e||typeof e!=`object`)return{};let t=e,n=t[`oauth-excluded-models`]??t.items??e;if(!n||typeof n!=`object`)return{};let r={};return Object.entries(n).forEach(([e,t])=>{let n=Bg(String(e??``));if(!n)return;let i=Array.isArray(t)?t:typeof t==`string`?t.split(/[\n,]+/):[],a=r[n]??[],o=new Set(a.map(e=>e.toLowerCase()));i.forEach(e=>{let t=String(e??``).trim();if(!t)return;let n=t.toLowerCase();o.has(n)||(o.add(n),a.push(t))}),r[n]=a}),r},u_=e=>{if(!e||typeof e!=`object`)return{};let t=e,n=t[`oauth-model-alias`]??t.items??e;if(!n||typeof n!=`object`)return{};let r={};return Object.entries(n).forEach(([e,t])=>{let n=Bg(String(e??``));if(!n||!Array.isArray(t))return;let i=r[n]??[],a=new Set(i.map(e=>e.alias.toLowerCase()));t.map(e=>{if(!e||typeof e!=`object`)return null;let t=e,n=String(t.name??t.id??t.model??``).trim(),r=String(t.alias??``).trim();if(!n||!r)return null;let i=t.fork===!0;return i?{name:n,alias:r,fork:i}:{name:n,alias:r}}).filter(Boolean).forEach(e=>{let t=e,n=t.alias.toLowerCase();a.has(n)||(a.add(n),i.push(t))}),i.length&&(r[n]=i)}),r},d_=`/oauth-model-alias`,f_={list:async()=>o_(await B.get(`/auth-files`)),setStatus:(e,t)=>B.patch(`/auth-files/status`,{name:e,disabled:t}),patchFields:(e,t)=>B.patch(`/auth-files/fields`,{name:e,...t}),uploadFiles:async e=>{let t=e.map(e=>e.name);if(t.length===0)return{status:`ok`,uploaded:0,files:[],failed:[]};let n=new FormData;return e.forEach(e=>{n.append(`file`,e,e.name)}),Xg(await B.postForm(`/auth-files`,n),t)},upload:e=>f_.uploadFiles([e]),deleteFiles:async e=>{let t=qg(e);return t.length===0?{status:`ok`,deleted:0,files:[],failed:[]}:Zg(await B.delete(`/auth-files`,{data:{names:t}}),t)},deleteFile:e=>f_.deleteFiles([e]),deleteAll:()=>B.delete(`/auth-files`,{params:{all:!0}}),downloadText:async e=>(await B.getRaw(`/auth-files/download?name=${encodeURIComponent(e)}`,{responseType:`blob`})).data.text(),async downloadJsonObject(e){return s_(await f_.downloadText(e))},saveText:(e,t)=>c_(e,t),saveJsonObject:(e,t)=>c_(e,JSON.stringify(t)),async getOauthExcludedModels(){return l_(await B.get(`/oauth-excluded-models`))},saveOauthExcludedModels:(e,t)=>B.patch(`/oauth-excluded-models`,{provider:Bg(e),models:t}),deleteOauthExcludedEntry:e=>B.delete(`/oauth-excluded-models?provider=${encodeURIComponent(Bg(e))}`),replaceOauthExcludedModels:e=>B.put(`/oauth-excluded-models`,l_(e)),async getOauthModelAlias(){return u_(await B.get(d_))},saveOauthModelAlias:async(e,t)=>{let n=Bg(String(e??``)),r=u_({[n]:t})[n]??[];await B.patch(d_,{channel:n,aliases:r})},deleteOauthModelAlias:async e=>{let t=Bg(String(e??``));try{await B.patch(d_,{channel:t,aliases:[]})}catch(e){if(Kg(e)!==405)throw e;await B.delete(`${d_}?channel=${encodeURIComponent(t)}`)}},async getModelsForAuthFile(e){let t=await B.get(`/auth-files/models?name=${encodeURIComponent(e)}`),n=t.models??t.models;return Array.isArray(n)?n:[]},async getModelDefinitions(e){let t=Bg(String(e??``));if(!t)return[];let n=await B.get(`/model-definitions/${encodeURIComponent(t)}`),r=n.models??n.models;return Array.isArray(r)?r:[]}},p_=[`codex`,`anthropic`,`antigravity`,`xai`],m_={startAuth:e=>{let t={};return p_.includes(e)&&(t.is_webui=!0),B.get(`/${e}-auth-url`,{params:Object.keys(t).length?t:void 0})},getAuthStatus:e=>B.get(`/get-auth-status`,{params:{state:e}}),submitCallback:(e,t)=>B.post(`/oauth-callback`,{provider:e,redirect_url:t})},h_=e=>typeof e==`string`?e.trim():``,g_=e=>{let t=Number(e);return Number.isFinite(t)?t:void 0},__=e=>e===!0||typeof e==`string`&&e.trim().toLowerCase()===`true`,v_=e=>{let t=g_(e);return t!==void 0&&t>0?t:void 0},y_=e=>Array.isArray(e.logs)?e.logs.filter(e=>fc(e)):[],b_=e=>{if(typeof e==`number`&&Number.isFinite(e))return e;let t=h_(e);if(!t)return 0;let n=Number(t);if(Number.isFinite(n))return n;let r=Date.parse(t);return Number.isFinite(r)?Math.floor(r/1e3):0},x_=e=>h_(e.timestamp)||h_(e.created_at),S_=e=>{let t=Array.isArray(e.lines)?e.lines.filter(e=>typeof e==`string`):[],n=b_(e[`latest-timestamp`]),r=Number(e[`line-count`]);return{lines:t,lineCount:Number.isFinite(r)?r:t.length,latestAfter:n>0?n:void 0,nextCursor:h_(e[`next-cursor`])||void 0,cursorReset:__(e[`cursor-reset`]),logBackendKind:`file`}},C_=e=>{let t=y_(e),n=[...t].reverse(),r=n.map(e=>e.line).filter(e=>typeof e==`string`&&e.length>0),i=n.reduce((e,t)=>{let n=h_(t.request_id),r=h_(t.home_ip);return n&&r&&(e[n]=r),e},{}),a=t.reduce((e,t)=>{let n=x_(t);if(!n)return e;if(!e)return n;let r=Date.parse(e),i=Date.parse(n);return!Number.isFinite(r)||!Number.isFinite(i)?e:i>r?n:e},void 0),o=Number(e.total),s=Number(e.limit),c=Number(e.offset);return{lines:r,lineCount:Number.isFinite(o)?o:r.length,latestAfter:a,logBackendKind:`home-db`,requestLogHomeIpById:i,total:Number.isFinite(o)?o:void 0,limit:Number.isFinite(s)?s:void 0,offset:Number.isFinite(c)?c:void 0}},w_=e=>fc(e)?Array.isArray(e.logs)?C_(e):Array.isArray(e.lines)?S_(e):{lines:[],lineCount:0,logBackendKind:`unknown`}:{lines:[],lineCount:0,logBackendKind:`unknown`},T_=async(e,t)=>{let n=v_(t.limit),r=v_(e.limit)??n,i=g_(e.total),a=g_(e.offset)??g_(t.offset)??0,o=y_(e);if(n===void 0||r===void 0||i===void 0)return e;let s=Math.min(n,Math.max(i-a,0));if(o.length>=s)return{...e,logs:o,limit:o.length,offset:a};let c=s-o.length,l=a+o.length,u=[],d=0;for(;d<c&&l+d<i;){let e=Math.min(r,c-d);u.push({offset:l+d,limit:e}),d+=e}return(await Promise.all(u.map(async({offset:e,limit:n})=>{let r=await B.get(`/logs`,{params:{...t,limit:n,offset:e},timeout:Ec});return!fc(r)||!Array.isArray(r.logs)?[]:y_(r)}))).forEach(e=>o.push(...e)),{...e,logs:o,limit:o.length,offset:a}},E_={async fetchLogs(e={}){let t=await B.get(`/logs`,{params:e,timeout:Ec});return fc(t)&&Array.isArray(t.logs)?w_(await T_(t,e)):w_(t)},clearLogs:()=>B.delete(`/logs`),fetchErrorLogs:()=>B.get(`/request-error-logs`,{timeout:Ec}),downloadErrorLog:e=>B.getRaw(`/request-error-logs/${encodeURIComponent(e)}`,{responseType:`blob`,timeout:Ec}),downloadRequestLogById:(e,t)=>B.getRaw(`/request-log-by-id/${encodeURIComponent(e)}`,{params:t?{home_ip:t}:void 0,responseType:`blob`,timeout:Ec})},D_=e=>e==null?``:String(e),O_=e=>e===!0,k_=e=>{if(!fc(e))return null;let t=D_(e.name).trim();if(!t)return null;let n=Array.isArray(e.enum_values)?e.enum_values.map(e=>D_(e)).filter(Boolean):[];return{name:t,type:D_(e.type).trim()||`string`,enumValues:n,description:D_(e.description).trim()}},A_=e=>Array.isArray(e)?e.map(e=>k_(e)).filter(Boolean):[],j_=e=>{if(!fc(e))return null;let t=D_(e.name).trim(),n=D_(e.version).trim(),r=D_(e.author).trim(),i=D_(e.github_repository).trim(),a=D_(e.logo).trim(),o=A_(e.config_fields);return!t&&!n&&!r&&!i&&!a&&o.length===0?null:{name:t,version:n,author:r,githubRepository:i,logo:a,configFields:o}},M_=e=>{if(!fc(e))return null;let t=D_(e.path).trim(),n=D_(e.menu).trim();return!t&&!n?null:{path:t,menu:n,description:D_(e.description).trim()}},N_=e=>Array.isArray(e)?e.map(e=>M_(e)).filter(Boolean):[],P_=e=>{if(!fc(e))return null;let t=D_(e.id).trim();if(!t)return null;let n=j_(e.metadata),r=A_(e.config_fields);return{id:t,path:D_(e.path).trim(),configured:O_(e.configured),registered:O_(e.registered),enabled:e.enabled!==!1,effectiveEnabled:O_(e.effective_enabled),supportsOAuth:O_(e.supports_oauth),logo:D_(e.logo||n?.logo).trim(),configFields:r.length>0?r:n?.configFields??[],menus:N_(e.menus),metadata:n}},F_=e=>{let t=fc(e)?e:{},n=Array.isArray(t.plugins)?t.plugins.map(e=>P_(e)).filter(Boolean):[];return{pluginsEnabled:O_(t.plugins_enabled),pluginsDir:D_(t.plugins_dir).trim()||`plugins`,plugins:n}},I_=e=>fc(e)?{...e}:{},L_=e=>{let t=fc(e)?e:{};return{status:D_(t.status).trim(),id:D_(t.id).trim(),path:D_(t.path).trim(),fileDeleted:O_(t.file_deleted),configuredRemoved:O_(t.configured_removed),restartRequired:O_(t.restart_required)}},R_=e=>{if(!fc(e))return null;let t=D_(e.id).trim();if(!t)return null;let n=D_(e.source_id).trim(),r=D_(e.store_id).trim()||(n?`${n}/${t}`:t),i=Array.isArray(e.tags)?e.tags.map(e=>D_(e).trim()).filter(Boolean):[];return{storeId:r,sourceId:n,sourceName:D_(e.source_name).trim(),sourceUrl:D_(e.source_url).trim(),id:t,name:D_(e.name).trim(),description:D_(e.description).trim(),author:D_(e.author).trim(),version:D_(e.version).trim(),repository:D_(e.repository).trim(),logo:D_(e.logo).trim(),homepage:D_(e.homepage).trim(),license:D_(e.license).trim(),tags:i,installed:O_(e.installed),installedVersion:D_(e.installed_version).trim(),path:D_(e.path).trim(),configured:O_(e.configured),registered:O_(e.registered),enabled:O_(e.enabled),effectiveEnabled:O_(e.effective_enabled),updateAvailable:O_(e.update_available)}},z_=e=>{if(!fc(e))return null;let t=D_(e.id).trim(),n=D_(e.url).trim();return!t&&!n?null:{id:t,name:D_(e.name).trim(),url:n}},B_=e=>{let t=fc(e)?e:{},n=Array.isArray(t.plugins)?t.plugins.map(e=>R_(e)).filter(Boolean):[],r=Array.isArray(t.sources)?t.sources.map(e=>z_(e)).filter(Boolean):[];return{pluginsEnabled:O_(t.plugins_enabled),pluginsDir:D_(t.plugins_dir).trim()||`plugins`,sources:r,plugins:n}},V_=e=>{let t=fc(e)?e:{};return{status:D_(t.status).trim(),sourceId:D_(t.source_id).trim(),sourceName:D_(t.source_name).trim(),sourceUrl:D_(t.source_url).trim(),id:D_(t.id).trim(),version:D_(t.version).trim(),path:D_(t.path).trim(),pluginsEnabled:O_(t.plugins_enabled),restartRequired:O_(t.restart_required)}},H_={async list(){return F_(await B.get(`/plugins`))},updateEnabled:(e,t)=>B.patch(`/plugins/${encodeURIComponent(e)}/enabled`,{enabled:t}),async deletePlugin(e){return L_(await B.delete(`/plugins/${encodeURIComponent(e)}`))},async getConfig(e){return I_(await B.get(`/plugins/${encodeURIComponent(e)}/config`))},putConfig:(e,t)=>B.put(`/plugins/${encodeURIComponent(e)}/config`,t),patchConfig:(e,t)=>B.patch(`/plugins/${encodeURIComponent(e)}/config`,t)},U_={async list(){return B_(await B.get(`/plugin-store`))},async install(e,t){let n=`/plugin-store/${encodeURIComponent(e)}/install`,r=t?`?${new URLSearchParams({source:t}).toString()}`:``;return V_(await B.post(`${n}${r}`))}},W_={importCredential:(e,t)=>{let n=new FormData;return n.append(`file`,e),t&&n.append(`location`,t),B.postForm(`/vertex/import`,n)}},G_=e=>{if(!Array.isArray(e))return[];let t=new Set,n=[];return e.forEach(e=>{let r=typeof e==`object`&&e&&!Array.isArray(e)?e:null,i=typeof e==`string`?e:r?r[`api-key`]??r.apiKey??r.key??r.Key:``,a=String(i??``).trim();!a||t.has(a)||(t.add(a),n.push(a))}),n};function K_(){let e=mp(e=>e.apiBase),t=Uf(e=>e.config?.apiKeys),n=(0,y.useRef)([]);return(0,y.useEffect)(()=>{n.current=[]},[e,t]),(0,y.useCallback)(async({force:e=!1}={})=>{if(e&&(n.current=[]),n.current.length)return n.current;let r=G_(t);if(r.length)return n.current=r,r;try{let e=G_(await ng.list());return e.length&&(n.current=e),e}catch{return[]}},[t])}function q_(e){let t=String(e||``).trim();if(!t)return``;let n=t.length<4?1:2,r=t.slice(0,n),i=t.slice(-n),a=Math.max(10-n*2,1);return`${r}${`*`.repeat(a)}${i}`}function J_(e){if(e===0)return`0 B`;let t=[`B`,`KB`,`MB`,`GB`],n=1024,r=Math.floor(Math.log(e)/Math.log(n));return`${(e/n**+r).toFixed(2)} ${t[r]}`}function Y_(e,t){if(e==null||e===``)return``;let n=typeof e==`number`?e:Number(e),r=(()=>{if(!Number.isFinite(n)||Number.isNaN(n))return Wg(e)??new Date(String(e));let t=Math.abs(n);return t<1e11?new Date(n*1e3):t<0x5af3107a4000?new Date(n):t<0x16345785d8a0000?new Date(Math.round(n/1e3)):new Date(Math.round(n/1e6))})();return Number.isNaN(r.getTime())?``:t?r.toLocaleString(t):r.toLocaleString()}function X_(e){if(e==null||e===``)return null;let t=typeof e==`number`?new Date(e<0xe8d4a51000?e*1e3:e):Wg(e)??new Date(String(e));return Number.isNaN(t.getTime())?null:t}function Z_(e,t){let n=X_(e);return n?t?n.toLocaleDateString(t):n.toLocaleDateString():``}function Q_(e,t){let n=X_(e);return n?t?n.toLocaleString(t):n.toLocaleString():``}var $_={dashboard:`DashboardPage-module__dashboard___c-JEy`,backgroundOrbs:`DashboardPage-module__backgroundOrbs___ZlInx`,orb1:`DashboardPage-module__orb1___msZV4`,orbFloat:`DashboardPage-module__orbFloat___zdYrn`,orb2:`DashboardPage-module__orb2___rkxwt`,hero:`DashboardPage-module__hero___4gtI-`,heroEnter:`DashboardPage-module__heroEnter___LNodk`,heroWatermark:`DashboardPage-module__heroWatermark___eoPCs`,watermarkEnter:`DashboardPage-module__watermarkEnter___4r-VK`,heroContent:`DashboardPage-module__heroContent___rRgSn`,heroGreeting:`DashboardPage-module__heroGreeting___LkC-3`,fadeSlideUp:`DashboardPage-module__fadeSlideUp___svgeE`,heroTitle:`DashboardPage-module__heroTitle___583C6`,heroCaring:`DashboardPage-module__heroCaring___4RIkE`,heroMeta:`DashboardPage-module__heroMeta___-2WgN`,dateTimeBlock:`DashboardPage-module__dateTimeBlock___nv-GA`,time:`DashboardPage-module__time___r-JWY`,date:`DashboardPage-module__date___fd2-M`,connectionPill:`DashboardPage-module__connectionPill___Jf-zm`,statusDot:`DashboardPage-module__statusDot___4w7W-`,connected:`DashboardPage-module__connected___CeELY`,connecting:`DashboardPage-module__connecting___j03PZ`,pulse:`DashboardPage-module__pulse___GLJju`,disconnected:`DashboardPage-module__disconnected___3l11q`,pillText:`DashboardPage-module__pillText___HO7gg`,buildDate:`DashboardPage-module__buildDate___zr4hY`,statsSection:`DashboardPage-module__statsSection___E5LH9`,sectionHeading:`DashboardPage-module__sectionHeading___j2-4e`,bentoGrid:`DashboardPage-module__bentoGrid___L3GMN`,bentoCard:`DashboardPage-module__bentoCard___fZ0NR`,cardEnter:`DashboardPage-module__cardEnter___TzYj-`,bentoLarge:`DashboardPage-module__bentoLarge___OI8ha`,bentoValue:`DashboardPage-module__bentoValue___4z4aG`,bentoIcon:`DashboardPage-module__bentoIcon___yMz7f`,bentoContent:`DashboardPage-module__bentoContent___7qrNg`,bentoLabel:`DashboardPage-module__bentoLabel___s0-b2`,bentoSublabel:`DashboardPage-module__bentoSublabel___LRcJB`,configSection:`DashboardPage-module__configSection___G0W4F`,configPillGrid:`DashboardPage-module__configPillGrid___Ie76m`,configPill:`DashboardPage-module__configPill___C2Adr`,configPillWide:`DashboardPage-module__configPillWide___2Bkpx`,configPillLabel:`DashboardPage-module__configPillLabel___eK-LR`,configPillValue:`DashboardPage-module__configPillValue___k6VI3`,on:`DashboardPage-module__on___kqLdD`,off:`DashboardPage-module__off___gkz6F`,configPillMono:`DashboardPage-module__configPillMono___pEsgq`,configBadge:`DashboardPage-module__configBadge___TrJTP`,configBadgeRoundRobin:`DashboardPage-module__configBadgeRoundRobin___wgPLB`,configBadgeFillFirst:`DashboardPage-module__configBadgeFillFirst___N5vai`,configBadgeUnknown:`DashboardPage-module__configBadgeUnknown___Jo3zP`,viewMoreLink:`DashboardPage-module__viewMoreLink___wKvoJ`};function ev(){let e=new Date().getHours();return e>=5&&e<12?`morning`:e>=12&&e<17?`afternoon`:e>=17&&e<21?`evening`:`night`}function tv(){let{t:e,i18n:t}=Xo(),n=mp(e=>e.connectionStatus),r=mp(e=>e.serverVersion),i=mp(e=>e.serverBuildDate),a=mp(e=>e.apiBase),o=Uf(e=>e.config),s=Uf(e=>e.fetchConfig),c=dp(e=>e.models),l=dp(e=>e.loading),u=dp(e=>e.fetchModels),[d,f]=(0,y.useState)(null),[p,m]=(0,y.useState)(!1),[h,g]=(0,y.useState)(ev),[_,v]=(0,y.useState)(()=>new Date);(0,y.useEffect)(()=>{let e=setInterval(()=>{g(ev()),v(new Date)},6e4);return()=>clearInterval(e)},[]);let b=K_(),x=(0,y.useCallback)(async()=>{if(!(n!==`connected`||!a))try{let e=(await b())[0];await u(a,e)}catch{}},[n,a,b,u]);(0,y.useEffect)(()=>{if(n!==`connected`)return;let e=!1;return s().catch(()=>void 0),x(),(async()=>{m(!0);try{let t=await f_.list();e||f(t.files.length)}catch{e||f(null)}finally{m(!1)}})(),()=>{e=!0}},[n,s,x]);let S=!o,C=o?{gemini:o.geminiApiKeys?.length??0,codex:o.codexApiKeys?.length??0,claude:o.claudeApiKeys?.length??0,vertex:o.vertexApiKeys?.length??0,openai:o.openaiCompatibility?.length??0}:null,w=C?Object.values(C).reduce((e,t)=>e+t,0):0,T=[{label:e(`dashboard.management_keys`),value:o?o.apiKeys?.length??0:`-`,icon:(0,I.jsx)(rs,{size:24}),path:`/config`,loading:S,sublabel:e(`nav.config_management`)},{label:e(`nav.ai_providers`),value:C?w:`-`,icon:(0,I.jsx)(is,{size:24}),path:`/ai-providers`,loading:S,sublabel:C?e(`dashboard.provider_keys_detail`,{gemini:C.gemini,codex:C.codex,claude:C.claude,vertex:C.vertex,openai:C.openai}):void 0},{label:e(`nav.auth_files`),value:d??`-`,icon:(0,I.jsx)(ss,{size:24}),path:`/auth-files`,loading:p&&d===null,sublabel:e(`dashboard.oauth_credentials`)},{label:e(`dashboard.available_models`),value:l?`-`:c.length,icon:(0,I.jsx)(Ns,{size:24}),path:`/system`,loading:l,sublabel:e(`dashboard.available_models_desc`)}],E=o?.routingStrategy?.trim()||``,D=E?E===`round-robin`?e(`basic_settings.routing_strategy_round_robin`):E===`fill-first`?e(`basic_settings.routing_strategy_fill_first`):E:`-`,O=E?E===`round-robin`?$_.configBadgeRoundRobin:E===`fill-first`?$_.configBadgeFillFirst:$_.configBadgeUnknown:$_.configBadgeUnknown,k=`dashboard.greeting_${h}`,A=`dashboard.caring_${h}`,ee=_.toLocaleDateString(t.language,{weekday:`long`,year:`numeric`,month:`long`,day:`numeric`}),j=_.toLocaleTimeString(t.language,{hour:`2-digit`,minute:`2-digit`}),M=Z_(i,t.language);return(0,I.jsxs)(`div`,{className:$_.dashboard,children:[(0,I.jsxs)(`div`,{className:$_.backgroundOrbs,"aria-hidden":`true`,children:[(0,I.jsx)(`div`,{className:$_.orb1}),(0,I.jsx)(`div`,{className:$_.orb2})]}),(0,I.jsxs)(`section`,{className:$_.hero,children:[(0,I.jsx)(`span`,{className:$_.heroWatermark,"aria-hidden":`true`,children:`OVERVIEW`}),(0,I.jsxs)(`div`,{className:$_.heroContent,children:[(0,I.jsx)(`span`,{className:$_.heroGreeting,children:e(k)}),(0,I.jsx)(`h1`,{className:$_.heroTitle,children:e(`dashboard.welcome_back`)}),(0,I.jsx)(`p`,{className:$_.heroCaring,children:e(A)})]}),(0,I.jsxs)(`div`,{className:$_.heroMeta,children:[(0,I.jsxs)(`div`,{className:$_.dateTimeBlock,children:[(0,I.jsx)(`span`,{className:$_.time,children:j}),(0,I.jsx)(`span`,{className:$_.date,children:ee})]}),(0,I.jsxs)(`div`,{className:$_.connectionPill,children:[(0,I.jsx)(`span`,{className:`${$_.statusDot} ${n===`connected`?$_.connected:n===`connecting`?$_.connecting:$_.disconnected}`}),(0,I.jsx)(`span`,{className:$_.pillText,children:r?`v${r.trim().replace(/^[vV]+/,``)}`:e(n===`connected`?`common.connected`:n===`connecting`?`common.connecting`:`common.disconnected`)})]}),M&&(0,I.jsx)(`span`,{className:$_.buildDate,children:M})]})]}),(0,I.jsxs)(`section`,{className:$_.statsSection,children:[(0,I.jsx)(`h2`,{className:$_.sectionHeading,children:e(`dashboard.system_overview`)}),(0,I.jsx)(`div`,{className:$_.bentoGrid,children:T.map((e,t)=>(0,I.jsxs)(Li,{to:e.path,className:`${$_.bentoCard} ${t===0?$_.bentoLarge:``}`,style:{animationDelay:`${t*80}ms`},children:[(0,I.jsx)(`div`,{className:$_.bentoIcon,children:e.icon}),(0,I.jsxs)(`div`,{className:$_.bentoContent,children:[(0,I.jsx)(`span`,{className:$_.bentoValue,children:e.loading?`...`:e.value}),(0,I.jsx)(`span`,{className:$_.bentoLabel,children:e.label}),e.sublabel&&!e.loading&&(0,I.jsx)(`span`,{className:$_.bentoSublabel,children:e.sublabel})]})]},e.path))})]}),o&&(0,I.jsxs)(`section`,{className:$_.configSection,children:[(0,I.jsx)(`h2`,{className:$_.sectionHeading,children:e(`dashboard.current_config`)}),(0,I.jsxs)(`div`,{className:$_.configPillGrid,children:[(0,I.jsxs)(`div`,{className:$_.configPill,children:[(0,I.jsx)(`span`,{className:$_.configPillLabel,children:e(`basic_settings.debug_enable`)}),(0,I.jsx)(`span`,{className:`${$_.configPillValue} ${o.debug?$_.on:$_.off}`,children:o.debug?e(`common.yes`):e(`common.no`)})]}),(0,I.jsxs)(`div`,{className:$_.configPill,children:[(0,I.jsx)(`span`,{className:$_.configPillLabel,children:e(`basic_settings.logging_to_file_enable`)}),(0,I.jsx)(`span`,{className:`${$_.configPillValue} ${o.loggingToFile?$_.on:$_.off}`,children:o.loggingToFile?e(`common.yes`):e(`common.no`)})]}),(0,I.jsxs)(`div`,{className:$_.configPill,children:[(0,I.jsx)(`span`,{className:$_.configPillLabel,children:e(`basic_settings.retry_count_label`)}),(0,I.jsx)(`span`,{className:$_.configPillValue,children:o.requestRetry??0})]}),(0,I.jsxs)(`div`,{className:$_.configPill,children:[(0,I.jsx)(`span`,{className:$_.configPillLabel,children:e(`basic_settings.ws_auth_enable`)}),(0,I.jsx)(`span`,{className:`${$_.configPillValue} ${o.wsAuth?$_.on:$_.off}`,children:o.wsAuth?e(`common.yes`):e(`common.no`)})]}),(0,I.jsxs)(`div`,{className:$_.configPill,children:[(0,I.jsx)(`span`,{className:$_.configPillLabel,children:e(`dashboard.routing_strategy`)}),(0,I.jsx)(`span`,{className:`${$_.configBadge} ${O}`,children:D})]}),o.proxyUrl&&(0,I.jsxs)(`div`,{className:`${$_.configPill} ${$_.configPillWide}`,children:[(0,I.jsx)(`span`,{className:$_.configPillLabel,children:e(`basic_settings.proxy_url_label`)}),(0,I.jsx)(`span`,{className:$_.configPillMono,children:o.proxyUrl})]})]}),(0,I.jsxs)(Li,{to:`/config`,className:$_.viewMoreLink,children:[e(`dashboard.edit_settings`),` →`]})]})]})}var nv=null,rv=async()=>{nv&&await nv()},iv=(e,t=!0)=>{let n=(0,y.useRef)(null);(0,y.useEffect)(()=>{let r=n.current;if(n.current=e??null,!t||!e){r&&nv===r&&(nv=null);return}return nv=e,()=>{nv===e&&(nv=null)}},[t,e])},av={skeleton:`Skeleton-module__skeleton___XePp7`,shimmer:`Skeleton-module__shimmer___vu211`};function ov({width:e,height:t,rounded:n,className:r,style:i,...a}){let o={...i,width:e??i?.width,height:t??i?.height,borderRadius:n??i?.borderRadius};return(0,I.jsx)(`div`,{className:[av.skeleton,r].filter(Boolean).join(` `),style:o,"aria-hidden":`true`,...a})}function sv(e,t){let n=(0,y.useRef)(null);(0,y.useEffect)(()=>{n.current=e},[e]),(0,y.useEffect)(()=>{if(t===null)return;let e=setInterval(()=>{n.current?.()},t);return()=>clearInterval(e)},[t])}var cv=20,lv=600*1e3,uv=e=>{let t=typeof e==`number`?e:Number(e);return Number.isFinite(t)?t:0};function dv(e){if(typeof e==`number`)return Number.isFinite(e)?e:0;if(typeof e==`string`){let t=e.trim();if(!t)return 0;let n=Number(t);return Number.isFinite(n)?n:0}return 0}function fv(e,t){return`${String(e??``).trim()}|${String(t??``).trim()}`}function pv(e){return typeof e==`number`&&Number.isFinite(e)?e.toString():typeof e==`string`&&e.trim()||null}function mv(e){return Array.isArray(e)?e.slice(-cv).map(e=>{let t=e&&typeof e==`object`?e:{},n=typeof t.time==`string`?t.time:void 0;return{...n?{time:n}:{},success:uv(t.success),failed:uv(t.failed)}}):[]}function hv(e){if(!e||typeof e!=`object`||Array.isArray(e))return{success:0,failed:0,recentRequests:[]};let t=e;return{success:dv(t.success),failed:dv(t.failed),recentRequests:mv(t.recent_requests??t.recentRequests)}}function gv(e){let t=e.map(e=>mv(e)).filter(e=>e.length>0);if(t.length===0)return[];let n=Math.min(cv,Math.max(...t.map(e=>e.length))),r=Array.from({length:n},()=>({success:0,failed:0}));return t.forEach(e=>{let t=e.slice(-n),i=n-t.length;t.forEach((e,t)=>{let n=r[i+t];n.success+=e.success,n.failed+=e.failed,!n.time&&e.time&&(n.time=e.time)})}),r}function _v(e){return mv(e).reduce((e,t)=>({success:e.success+t.success,failure:e.failure+t.failed}),{success:0,failure:0})}function vv(e){let t=mv(e),n=Math.max(0,cv-t.length),r=[...Array.from({length:n},()=>({success:0,failed:0})),...t.slice(-cv)],i=Date.now()-cv*lv,a=[],o=[],s=0,c=0;r.forEach((e,t)=>{let n=e.success,r=e.failed,l=n+r;s+=n,c+=r,l===0?a.push(`idle`):r===0?a.push(`success`):n===0?a.push(`failure`):a.push(`mixed`);let u=i+t*lv;o.push({success:n,failure:r,rate:l>0?n/l:-1,startTime:u,endTime:u+lv})});let l=s+c;return{blocks:a,blockDetails:o,successRate:l>0?s/l*100:100,totalSuccess:s,totalFailure:c}}var yv=24e4,bv=new Map,xv=bv,Sv=0,Cv=null,wv=e=>String(e??``).trim().toLowerCase(),Tv=e=>{if(!e||typeof e!=`object`||Array.isArray(e))return bv;let t=new Map;return Object.entries(e).forEach(([e,n])=>{let r=wv(e);if(!r||!n||typeof n!=`object`||Array.isArray(n))return;let i=new Map;Object.entries(n).forEach(([e,t])=>{i.set(e,hv(t))}),t.set(r,i)}),t},Ev=async()=>(Cv||(Cv=eg.getUsage().then(e=>{let t=Tv(e);return xv=t,Sv=Date.now(),t}).finally(()=>{Cv=null})),Cv);function Dv(e={}){let t=e.enabled??!0,[n,r]=(0,y.useState)(xv),[i,a]=(0,y.useState)(!1),o=(0,y.useCallback)(async(e={})=>{if(!t)return bv;let n=Sv>0&&Date.now()-Sv<yv;if(!e.force&&n)return r(xv),xv;a(!0);try{let e=await Ev();return r(e),e}catch{return Sv>0&&r(xv),xv}finally{a(!1)}},[t]),s=(0,y.useCallback)(async()=>o({force:!0}),[o]);return(0,y.useEffect)(()=>{if(!t){r(bv);return}o().catch(()=>{})},[t,o]),sv(()=>{s().catch(()=>{})},t?yv:null),{usageByProvider:t?n:bv,isLoading:t?i:!1,loadRecentRequests:o,refreshRecentRequests:s}}var Ov=`*`,kv=`https://generativelanguage.googleapis.com`,Av=e=>Array.isArray(e)&&e.some(e=>String(e??``).trim()===Ov),jv=e=>Array.isArray(e)?e.filter(e=>String(e??``).trim()!==Ov):[],Mv=e=>[...jv(e),Ov],Nv=e=>jv(e),Pv=(e,t=``)=>{let n=String(e||``).trim();return n?(n=n.replace(/\/?v0\/management\/?$/i,``),n=n.replace(/\/+$/g,``),/^https?:\/\//i.test(n)||(n=`http://${n}`),n):t},Fv=e=>{let t=String(e||``).trim().replace(/^\/+/g,``).replace(/:generateContent$/i,``);return t?/^(models|tunedModels)\//i.test(t)?t.split(`/`).map(encodeURIComponent).join(`/`):`models/${encodeURIComponent(t)}`:``},Iv=e=>{let t=Pv(e);return t?t.endsWith(`/chat/completions`)?t:`${t}/chat/completions`:``},Lv=e=>{let t=Pv(e);return t?/\/v1\/responses$/i.test(t)?t:/\/v1\/models$/i.test(t)?t.replace(/\/models$/i,`/responses`):/\/v1$/i.test(t)?`${t}/responses`:`${t}/v1/responses`:``},Rv=e=>{let t=Pv(e,`https://api.anthropic.com`);return t?t.endsWith(`/v1/messages`)?t:t.endsWith(`/v1`)?`${t}/messages`:`${t}/v1/messages`:``},zv=(e,t)=>{let n=Fv(t);if(!n)return``;let r=Pv(e,kv);if(!r)return``;if(/:generateContent$/i.test(r))return r;let i=r.replace(/\/+$/g,``);return/\/v1beta\/models$/i.test(i)?i=i.replace(/\/models$/i,``):/\/v1beta$/i.test(i)||(i=i.replace(/\/v1beta(?:\/.*)?$/i,``),i=`${i}/v1beta`),`${i}/${n}:generateContent`},Bv={success:0,failed:0,recentRequests:[]},Vv=e=>String(e??``).trim().toLowerCase(),Hv=(e,t,n,r)=>{if(!String(n??``).trim())return Bv;let i=Vv(t),a=fv(r,n);return e.get(i)?.get(a)??Bv},Uv=(e,t,n,r)=>Hv(e,t,n,r).recentRequests;function Wv(e,t,n,r){return vv(Uv(e,t,n,r))}function Gv(e,t,n,r){let i=Hv(e,t,n,r);return{success:i.success,failure:i.failed}}function Kv(e,t,n,r){return _v(Uv(e,t,n,r))}var qv=(e,t)=>e.apiKeyEntries?.length?gv(e.apiKeyEntries.map(n=>Uv(t,e.name,n.apiKey,e.baseUrl))):[];function Jv(e,t){return _v(qv(e,t))}function Yv(e,t){return(e.apiKeyEntries||[]).reduce((n,r)=>{let i=Hv(t,e.name,r.apiKey,e.baseUrl);return{success:n.success+i.success,failure:n.failure+i.failed}},{success:0,failure:0})}function Xv(e,t){return vv(qv(e,t))}var Zv={card:`ProviderHeaderCard-module__card___-vito`,row:`ProviderHeaderCard-module__row___8x7Kv`,titleArea:`ProviderHeaderCard-module__titleArea___wB2EB`,title:`ProviderHeaderCard-module__title___gZU4U`,subtitle:`ProviderHeaderCard-module__subtitle___ahXHM`,actions:`ProviderHeaderCard-module__actions___mjRJJ`,btn:`ProviderHeaderCard-module__btn___V-Ldg`,btnOutline:`ProviderHeaderCard-module__btnOutline___P7piG`,btnPrimary:`ProviderHeaderCard-module__btnPrimary___-U6YA`,chips:`ProviderHeaderCard-module__chips___kt9b-`,chip:`ProviderHeaderCard-module__chip___U2QSK`,chipPrimary:`ProviderHeaderCard-module__chipPrimary___u8TVQ`,chipAmber:`ProviderHeaderCard-module__chipAmber___1vTiO`,spin:`ProviderHeaderCard-module__spin___JVOx1`,"pwc-spin":`ProviderHeaderCard-module__pwc-spin___Ehj71`,pwcSpin:`ProviderHeaderCard-module__pwc-spin___Ehj71`,btnIcon:`ProviderHeaderCard-module__btnIcon___zQlLw`};function Qv({totalActive:e,totalResources:t,providerFamilies:n,updatedAtLabel:r,isFetching:i=!1,isNewDisabled:a=!1,newLabel:o,onRefresh:s,onNew:c}){let{t:l}=Xo();return(0,I.jsxs)(`section`,{className:Zv.card,children:[(0,I.jsxs)(`div`,{className:Zv.row,children:[(0,I.jsx)(`div`,{className:Zv.titleArea,children:(0,I.jsx)(`h1`,{className:Zv.title,children:l(`providersPage.header.title`)})}),(0,I.jsxs)(`div`,{className:Zv.actions,children:[(0,I.jsxs)(`button`,{type:`button`,className:`${Zv.btn} ${Zv.btnOutline}`,onClick:s,disabled:i,"aria-label":l(i?`providersPage.actions.syncing`:`providersPage.actions.refresh`),children:[(0,I.jsx)(`span`,{className:`${Zv.btnIcon} ${i?Zv.spin:``}`.trim(),children:i?(0,I.jsx)(Cs,{size:16}):(0,I.jsx)(ps,{size:16})}),(0,I.jsx)(`span`,{children:l(i?`providersPage.actions.syncing`:`providersPage.actions.refresh`)})]}),(0,I.jsxs)(`button`,{type:`button`,className:`${Zv.btn} ${Zv.btnPrimary}`,onClick:c,disabled:a,children:[(0,I.jsx)(vs,{size:16}),(0,I.jsx)(`span`,{children:o??l(`providersPage.actions.new`)})]})]})]}),(0,I.jsxs)(`div`,{className:Zv.chips,children:[(0,I.jsx)(`span`,{className:`${Zv.chip} ${Zv.chipPrimary}`,children:l(`providersPage.header.activeResources`,{active:e,total:t})}),(0,I.jsx)(`span`,{className:Zv.chip,children:l(`providersPage.header.providerFamilies`,{count:n})}),(0,I.jsx)(`span`,{className:Zv.chip,children:l(`providersPage.header.updatedAt`,{time:r})})]})]})}var $v=`data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eClaude%3c/title%3e%3cpath%20d='M4.709%2015.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0%2011.784l.055-.352.48-.321.686.06%201.52.103%202.278.158%201.652.097%202.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686%201.908%201.476%202.491%201.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97%202.97%200%2001-.104-.729L6.283.134%206.696%200l.996.134.42.364.62%201.414%201.002%202.229%201.555%203.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286%201.851-.559%202.903-.364%201.942h.212l.243-.242.985-1.306%201.652-2.064.73-.82.85-.904.547-.431h1.033l.76%201.129-.34%201.166-1.064%201.347-.881%201.142-1.264%201.7-.79%201.36.073.11.188-.02%202.856-.606%201.543-.28%201.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061%201.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093%201.068%202.006%201.81%202.509%202.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649%202.345%203.521.122%201.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674%207.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434%201.967-2.18%202.945-1.726%201.845-.414.164-.717-.37.067-.662.401-.589%202.388-3.036%201.44-1.882.93-1.086-.006-.158h-.055L4.132%2018.56l-1.13.146-.487-.456.061-.746.231-.243%201.908-1.312-.006.006z'%20fill='%23D97757'%20fill-rule='nonzero'%3e%3c/path%3e%3c/svg%3e`,ey=`data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCodex%3c/title%3e%3cpath%20d='M19.503%200H4.496A4.496%204.496%200%20000%204.496v15.007A4.496%204.496%200%20004.496%2024h15.007A4.496%204.496%200%200024%2019.503V4.496A4.496%204.496%200%200019.503%200z'%20fill='%23fff'%3e%3c/path%3e%3cpath%20d='M9.064%203.344a4.578%204.578%200%20012.285-.312c1%20.115%201.891.54%202.673%201.275.01.01.024.017.037.021a.09.09%200%2000.043%200%204.55%204.55%200%20013.046.275l.047.022.116.057a4.581%204.581%200%20012.188%202.399c.209.51.313%201.041.315%201.595a4.24%204.24%200%2001-.134%201.223.123.123%200%2000.03.115c.594.607.988%201.33%201.183%202.17.289%201.425-.007%202.71-.887%203.854l-.136.166a4.548%204.548%200%2001-2.201%201.388.123.123%200%2000-.081.076c-.191.551-.383%201.023-.74%201.494-.9%201.187-2.222%201.846-3.711%201.838-1.187-.006-2.239-.44-3.157-1.302a.107.107%200%2000-.105-.024c-.388.125-.78.143-1.204.138a4.441%204.441%200%2001-1.945-.466%204.544%204.544%200%2001-1.61-1.335c-.152-.202-.303-.392-.414-.617a5.81%205.81%200%2001-.37-.961%204.582%204.582%200%2001-.014-2.298.124.124%200%2000.006-.056.085.085%200%2000-.027-.048%204.467%204.467%200%2001-1.034-1.651%203.896%203.896%200%2001-.251-1.192%205.189%205.189%200%2001.141-1.6c.337-1.112.982-1.985%201.933-2.618.212-.141.413-.251.601-.33.215-.089.43-.164.646-.227a.098.098%200%2000.065-.066%204.51%204.51%200%2001.829-1.615%204.535%204.535%200%20011.837-1.388zm3.482%2010.565a.637.637%200%20000%201.272h3.636a.637.637%200%20100-1.272h-3.636zM8.462%209.23a.637.637%200%2000-1.106.631l1.272%202.224-1.266%202.136a.636.636%200%20101.095.649l1.454-2.455a.636.636%200%2000.005-.64L8.462%209.23z'%20fill='url(%23lobe-icons-codex-fill)'%3e%3c/path%3e%3cdefs%3e%3clinearGradient%20gradientUnits='userSpaceOnUse'%20id='lobe-icons-codex-fill'%20x1='12'%20x2='12'%20y1='3'%20y2='21'%3e%3cstop%20stop-color='%23B1A7FF'%3e%3c/stop%3e%3cstop%20offset='.5'%20stop-color='%237A9DFF'%3e%3c/stop%3e%3cstop%20offset='1'%20stop-color='%233941FF'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e`,ty=`data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eGemini%3c/title%3e%3cpath%20d='M20.616%2010.835a14.147%2014.147%200%2001-4.45-3.001%2014.111%2014.111%200%2001-3.678-6.452.503.503%200%2000-.975%200%2014.134%2014.134%200%2001-3.679%206.452%2014.155%2014.155%200%2001-4.45%203.001c-.65.28-1.318.505-2.002.678a.502.502%200%20000%20.975c.684.172%201.35.397%202.002.677a14.147%2014.147%200%20014.45%203.001%2014.112%2014.112%200%20013.679%206.453.502.502%200%2000.975%200c.172-.685.397-1.351.677-2.003a14.145%2014.145%200%20013.001-4.45%2014.113%2014.113%200%20016.453-3.678.503.503%200%20000-.975%2013.245%2013.245%200%2001-2.003-.678z'%20fill='%233186FF'%3e%3c/path%3e%3cpath%20d='M20.616%2010.835a14.147%2014.147%200%2001-4.45-3.001%2014.111%2014.111%200%2001-3.678-6.452.503.503%200%2000-.975%200%2014.134%2014.134%200%2001-3.679%206.452%2014.155%2014.155%200%2001-4.45%203.001c-.65.28-1.318.505-2.002.678a.502.502%200%20000%20.975c.684.172%201.35.397%202.002.677a14.147%2014.147%200%20014.45%203.001%2014.112%2014.112%200%20013.679%206.453.502.502%200%2000.975%200c.172-.685.397-1.351.677-2.003a14.145%2014.145%200%20013.001-4.45%2014.113%2014.113%200%20016.453-3.678.503.503%200%20000-.975%2013.245%2013.245%200%2001-2.003-.678z'%20fill='url(%23lobe-icons-gemini-fill-0)'%3e%3c/path%3e%3cpath%20d='M20.616%2010.835a14.147%2014.147%200%2001-4.45-3.001%2014.111%2014.111%200%2001-3.678-6.452.503.503%200%2000-.975%200%2014.134%2014.134%200%2001-3.679%206.452%2014.155%2014.155%200%2001-4.45%203.001c-.65.28-1.318.505-2.002.678a.502.502%200%20000%20.975c.684.172%201.35.397%202.002.677a14.147%2014.147%200%20014.45%203.001%2014.112%2014.112%200%20013.679%206.453.502.502%200%2000.975%200c.172-.685.397-1.351.677-2.003a14.145%2014.145%200%20013.001-4.45%2014.113%2014.113%200%20016.453-3.678.503.503%200%20000-.975%2013.245%2013.245%200%2001-2.003-.678z'%20fill='url(%23lobe-icons-gemini-fill-1)'%3e%3c/path%3e%3cpath%20d='M20.616%2010.835a14.147%2014.147%200%2001-4.45-3.001%2014.111%2014.111%200%2001-3.678-6.452.503.503%200%2000-.975%200%2014.134%2014.134%200%2001-3.679%206.452%2014.155%2014.155%200%2001-4.45%203.001c-.65.28-1.318.505-2.002.678a.502.502%200%20000%20.975c.684.172%201.35.397%202.002.677a14.147%2014.147%200%20014.45%203.001%2014.112%2014.112%200%20013.679%206.453.502.502%200%2000.975%200c.172-.685.397-1.351.677-2.003a14.145%2014.145%200%20013.001-4.45%2014.113%2014.113%200%20016.453-3.678.503.503%200%20000-.975%2013.245%2013.245%200%2001-2.003-.678z'%20fill='url(%23lobe-icons-gemini-fill-2)'%3e%3c/path%3e%3cdefs%3e%3clinearGradient%20gradientUnits='userSpaceOnUse'%20id='lobe-icons-gemini-fill-0'%20x1='7'%20x2='11'%20y1='15.5'%20y2='12'%3e%3cstop%20stop-color='%2308B962'%3e%3c/stop%3e%3cstop%20offset='1'%20stop-color='%2308B962'%20stop-opacity='0'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20gradientUnits='userSpaceOnUse'%20id='lobe-icons-gemini-fill-1'%20x1='8'%20x2='11.5'%20y1='5.5'%20y2='11'%3e%3cstop%20stop-color='%23F94543'%3e%3c/stop%3e%3cstop%20offset='1'%20stop-color='%23F94543'%20stop-opacity='0'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20gradientUnits='userSpaceOnUse'%20id='lobe-icons-gemini-fill-2'%20x1='3.5'%20x2='17.5'%20y1='13.5'%20y2='12'%3e%3cstop%20stop-color='%23FABC12'%3e%3c/stop%3e%3cstop%20offset='.46'%20stop-color='%23FABC12'%20stop-opacity='0'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e`,ny=`data:image/svg+xml,%3csvg%20fill='%23000000'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eOpenAI%3c/title%3e%3cpath%20d='M21.55%2010.004a5.416%205.416%200%2000-.478-4.501c-1.217-2.09-3.662-3.166-6.05-2.66A5.59%205.59%200%200010.831%201C8.39.995%206.224%202.546%205.473%204.838A5.553%205.553%200%20001.76%207.496a5.487%205.487%200%2000.691%206.5%205.416%205.416%200%2000.477%204.502c1.217%202.09%203.662%203.165%206.05%202.66A5.586%205.586%200%200013.168%2023c2.443.006%204.61-1.546%205.361-3.84a5.553%205.553%200%20003.715-2.66%205.488%205.488%200%2000-.693-6.497v.001zm-8.381%2011.558a4.199%204.199%200%2001-2.675-.954c.034-.018.093-.05.132-.074l4.44-2.53a.71.71%200%2000.364-.623v-6.176l1.877%201.069c.02.01.033.029.036.05v5.115c-.003%202.274-1.87%204.118-4.174%204.123zM4.192%2017.78a4.059%204.059%200%2001-.498-2.763c.032.02.09.055.131.078l4.44%202.53c.225.13.504.13.73%200l5.42-3.088v2.138a.068.068%200%2001-.027.057L9.9%2019.288c-1.999%201.136-4.552.46-5.707-1.51h-.001zM3.023%208.216A4.15%204.15%200%20015.198%206.41l-.002.151v5.06a.711.711%200%2000.364.624l5.42%203.087-1.876%201.07a.067.067%200%2001-.063.005l-4.489-2.559c-1.995-1.14-2.679-3.658-1.53-5.63h.001zm15.417%203.54l-5.42-3.088L14.896%207.6a.067.067%200%2001.063-.006l4.489%202.557c1.998%201.14%202.683%203.662%201.529%205.633a4.163%204.163%200%2001-2.174%201.807V12.38a.71.71%200%2000-.363-.623zm1.867-2.773a6.04%206.04%200%2000-.132-.078l-4.44-2.53a.731.731%200%2000-.729%200l-5.42%203.088V7.325a.068.068%200%2001.027-.057L14.1%204.713c2-1.137%204.555-.46%205.707%201.513.487.833.664%201.809.499%202.757h.001zm-11.741%203.81l-1.877-1.068a.065.065%200%2001-.036-.051V6.559c.001-2.277%201.873-4.122%204.181-4.12.976%200%201.92.338%202.671.954-.034.018-.092.05-.131.073l-4.44%202.53a.71.71%200%2000-.365.623l-.003%206.173v.002zm1.02-2.168L12%209.25l2.414%201.375v2.75L12%2014.75l-2.415-1.375v-2.75z'%3e%3c/path%3e%3c/svg%3e`,ry=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20width='24px'%20height='24px'%3e%3cpath%20d='M20,13.89A.77.77,0,0,0,19,13.73l-7,5.14v.22a.72.72,0,1,1,0,1.43v0a.74.74,0,0,0,.45-.15l7.41-5.47A.76.76,0,0,0,20,13.89Z'%20style='fill:%23669df6'/%3e%3cpath%20d='M12,20.52a.72.72,0,0,1,0-1.43h0v-.22L5,13.73a.76.76,0,0,0-1,.16.74.74,0,0,0,.16,1l7.41,5.47a.73.73,0,0,0,.44.15v0Z'%20style='fill:%23aecbfa'/%3e%3cpath%20d='M12,18.34a1.47,1.47,0,1,0,1.47,1.47A1.47,1.47,0,0,0,12,18.34Zm0,2.18a.72.72,0,1,1,.72-.71A.71.71,0,0,1,12,20.52Z'%20style='fill:%234285f4'/%3e%3cpath%20d='M6,6.11a.76.76,0,0,1-.75-.75V3.48a.76.76,0,1,1,1.51,0V5.36A.76.76,0,0,1,6,6.11Z'%20style='fill:%23aecbfa'/%3e%3ccircle%20cx='5.98'%20cy='12'%20r='0.76'%20style='fill:%23aecbfa'/%3e%3ccircle%20cx='5.98'%20cy='9.79'%20r='0.76'%20style='fill:%23aecbfa'/%3e%3ccircle%20cx='5.98'%20cy='7.57'%20r='0.76'%20style='fill:%23aecbfa'/%3e%3cpath%20d='M18,8.31a.76.76,0,0,1-.75-.76V5.67a.75.75,0,1,1,1.5,0V7.55A.75.75,0,0,1,18,8.31Z'%20style='fill:%234285f4'/%3e%3ccircle%20cx='18.02'%20cy='12.01'%20r='0.76'%20style='fill:%234285f4'/%3e%3ccircle%20cx='18.02'%20cy='9.76'%20r='0.76'%20style='fill:%234285f4'/%3e%3ccircle%20cx='18.02'%20cy='3.48'%20r='0.76'%20style='fill:%234285f4'/%3e%3cpath%20d='M12,15a.76.76,0,0,1-.75-.75V12.34a.76.76,0,0,1,1.51,0v1.89A.76.76,0,0,1,12,15Z'%20style='fill:%23669df6'/%3e%3ccircle%20cx='12'%20cy='16.45'%20r='0.76'%20style='fill:%23669df6'/%3e%3ccircle%20cx='12'%20cy='10.14'%20r='0.76'%20style='fill:%23669df6'/%3e%3ccircle%20cx='12'%20cy='7.92'%20r='0.76'%20style='fill:%23669df6'/%3e%3cpath%20d='M15,10.54a.76.76,0,0,1-.75-.75V7.91a.76.76,0,1,1,1.51,0V9.79A.76.76,0,0,1,15,10.54Z'%20style='fill:%234285f4'/%3e%3ccircle%20cx='15.01'%20cy='5.69'%20r='0.76'%20style='fill:%234285f4'/%3e%3ccircle%20cx='15.01'%20cy='14.19'%20r='0.76'%20style='fill:%234285f4'/%3e%3ccircle%20cx='15.01'%20cy='11.97'%20r='0.76'%20style='fill:%234285f4'/%3e%3ccircle%20cx='8.99'%20cy='14.19'%20r='0.76'%20style='fill:%23aecbfa'/%3e%3ccircle%20cx='8.99'%20cy='7.92'%20r='0.76'%20style='fill:%23aecbfa'/%3e%3ccircle%20cx='8.99'%20cy='5.69'%20r='0.76'%20style='fill:%23aecbfa'/%3e%3cpath%20d='M9,12.73A.76.76,0,0,1,8.24,12V10.1a.75.75,0,1,1,1.5,0V12A.75.75,0,0,1,9,12.73Z'%20style='fill:%23aecbfa'/%3e%3c/svg%3e`,iy={gemini:{src:ty},claude:{src:$v},codex:{src:ey},vertex:{src:ry},openaiCompatibility:{src:ny,invertOnDark:!0}},ay={aside:`ProviderCategoryList-module__aside___PBIjb`,eyebrow:`ProviderCategoryList-module__eyebrow___oNTkj`,list:`ProviderCategoryList-module__list___i2RZA`,item:`ProviderCategoryList-module__item___WRCng`,active:`ProviderCategoryList-module__active___MLw6R`,itemLeft:`ProviderCategoryList-module__itemLeft___z9fEi`,logo:`ProviderCategoryList-module__logo___8TKKa`,logoInvertOnDark:`ProviderCategoryList-module__logoInvertOnDark___4YQXt`,itemText:`ProviderCategoryList-module__itemText___YV93M`,itemTitle:`ProviderCategoryList-module__itemTitle___tWmJK`,itemSubtitle:`ProviderCategoryList-module__itemSubtitle___hUfT0`,badge:`ProviderCategoryList-module__badge___mYck8`,badgeAmber:`ProviderCategoryList-module__badgeAmber___n2AT5`};function oy({groups:e,activeBrand:t,onSelect:n}){let{t:r}=Xo();return(0,I.jsxs)(`aside`,{className:ay.aside,children:[(0,I.jsx)(`p`,{className:ay.eyebrow,children:r(`providersPage.categories.title`)}),(0,I.jsx)(`div`,{className:ay.list,children:e.map(e=>{let i=e.id===t,a=e.resources.filter(e=>!e.flags.isPlaceholder),o=a.length,s=a.filter(e=>!e.disabled).length,c=iy[e.id];return(0,I.jsxs)(`button`,{type:`button`,className:`${ay.item} ${i?ay.active:``}`,onClick:()=>n(e.id),"aria-current":i?`page`:void 0,children:[(0,I.jsxs)(`span`,{className:ay.itemLeft,children:[c?(0,I.jsx)(`img`,{src:c.src,alt:``,"aria-hidden":`true`,className:`${ay.logo} ${c.invertOnDark?ay.logoInvertOnDark:``}`}):null,(0,I.jsxs)(`span`,{className:ay.itemText,children:[(0,I.jsx)(`span`,{className:ay.itemTitle,children:r(`providersPage.providerNames.${e.id}`)}),(0,I.jsx)(`span`,{className:ay.itemSubtitle,children:r(`providersPage.categories.activeCount`,{active:s,total:o})})]})]}),(0,I.jsx)(`span`,{className:`${ay.badge} ${o===0?ay.badgeAmber:``}`,children:o})]},e.id)})})]})}var sy={wrap:`Table-module__wrap___BoMJd`,scroll:`Table-module__scroll___hyI-i`,table:`Table-module__table___2tzS9`,head:`Table-module__head___exzqF`,alignRight:`Table-module__alignRight___sq06f`,body:`Table-module__body___7J59-`,row:`Table-module__row___jJz3d`,selected:`Table-module__selected___-MWZq`};function cy({children:e,cols:t,className:n,...r}){let i=[sy.table,n].filter(Boolean).join(` `);return(0,I.jsx)(`div`,{className:sy.wrap,children:(0,I.jsx)(`div`,{className:sy.scroll,children:(0,I.jsxs)(`table`,{className:i,...r,children:[t?(0,I.jsx)(`colgroup`,{children:t}):null,e]})})})}function ly({children:e,className:t,...n}){return(0,I.jsx)(`thead`,{className:[sy.head,t].filter(Boolean).join(` `),...n,children:e})}function uy({children:e,className:t,...n}){return(0,I.jsx)(`tbody`,{className:[sy.body,t].filter(Boolean).join(` `),...n,children:e})}function dy({children:e,className:t,selected:n,...r}){return(0,I.jsx)(`tr`,{className:[sy.row,n?sy.selected:null,t].filter(Boolean).join(` `),...r,children:e})}function fy({children:e,className:t,alignRight:n,...r}){return(0,I.jsx)(`th`,{className:[n?sy.alignRight:null,t].filter(Boolean).join(` `)||void 0,...r,children:e})}function py({children:e,className:t,alignRight:n,...r}){return(0,I.jsx)(`td`,{className:[n?sy.alignRight:null,t].filter(Boolean).join(` `)||void 0,...r,children:e})}var my={root:`ToggleSwitch-module__root___IUqKD`,labelLeft:`ToggleSwitch-module__labelLeft___Pc6fJ`,label:`ToggleSwitch-module__label___4iQkR`,disabled:`ToggleSwitch-module__disabled___GNGHj`,track:`ToggleSwitch-module__track___zFtXx`,thumb:`ToggleSwitch-module__thumb___gQ45C`};function hy({checked:e,onChange:t,label:n,ariaLabel:r,disabled:i=!1,labelPosition:a=`right`}){return(0,I.jsxs)(`label`,{className:[my.root,a===`left`?my.labelLeft:``,i?my.disabled:``].filter(Boolean).join(` `),children:[(0,I.jsx)(`input`,{type:`checkbox`,checked:e,onChange:e=>{t(e.target.checked)},disabled:i,"aria-label":r}),(0,I.jsx)(`span`,{className:my.track,children:(0,I.jsx)(`span`,{className:my.thumb})}),n&&(0,I.jsx)(`span`,{className:my.label,children:n})]})}var gy={},_y=[{r:239,g:68,b:68},{r:250,g:204,b:21},{r:34,g:197,b:94}];function vy(e){let t=Math.max(0,Math.min(1,e)),n=t<.5?0:1,r=n===0?t*2:(t-.5)*2,i=_y[n],a=_y[n+1];return`rgb(${Math.round(i.r+(a.r-i.r)*r)}, ${Math.round(i.g+(a.g-i.g)*r)}, ${Math.round(i.b+(a.b-i.b)*r)})`}function yy(e){let t=new Date(e);return`${t.getHours().toString().padStart(2,`0`)}:${t.getMinutes().toString().padStart(2,`0`)}`}function by(e){let t=e.toFixed(1);return`${t.endsWith(`.0`)?t.slice(0,-2):t}%`}function xy({statusData:e,styles:t}){let{t:n}=Xo(),r=t||gy,[i,a]=(0,y.useState)(null),o=(0,y.useRef)(null),s=e.totalSuccess+e.totalFailure>0,c=s?e.successRate>=90?r.statusRateHigh:e.successRate>=50?r.statusRateMedium:r.statusRateLow:``;(0,y.useEffect)(()=>{if(i===null)return;let e=e=>{o.current&&!o.current.contains(e.target)&&a(null)};return document.addEventListener(`pointerdown`,e),()=>document.removeEventListener(`pointerdown`,e)},[i]);let l=(0,y.useCallback)((e,t)=>{e.pointerType===`mouse`&&a(t)},[]),u=(0,y.useCallback)(e=>{e.pointerType===`mouse`&&a(null)},[]),d=(0,y.useCallback)((e,t)=>{e.pointerType===`touch`&&(e.preventDefault(),a(e=>e===t?null:t))},[]),f=(e,t)=>e<=2?r.statusTooltipLeft:e>=t-3?r.statusTooltipRight:``,p=(t,i)=>{let a=t.success+t.failure,o=f(i,e.blockDetails.length),s=`${yy(t.startTime)} – ${yy(t.endTime)}`;return(0,I.jsxs)(`div`,{className:`${r.statusTooltip} ${o}`,children:[(0,I.jsx)(`span`,{className:r.tooltipTime,children:s}),a>0?(0,I.jsxs)(`span`,{className:r.tooltipStats,children:[(0,I.jsxs)(`span`,{className:r.tooltipSuccess,children:[n(`status_bar.success_short`),` `,t.success]}),(0,I.jsxs)(`span`,{className:r.tooltipFailure,children:[n(`status_bar.failure_short`),` `,t.failure]}),(0,I.jsxs)(`span`,{className:r.tooltipRate,children:[`(`,(t.rate*100).toFixed(1),`%)`]})]}):(0,I.jsx)(`span`,{className:r.tooltipStats,children:n(`status_bar.no_requests`)})]})};return(0,I.jsxs)(`div`,{className:r.statusBar,children:[(0,I.jsx)(`div`,{className:r.statusBlocks,ref:o,children:e.blockDetails.map((e,t)=>{let n=e.rate===-1,a=n?void 0:{backgroundColor:vy(e.rate)},o=i===t;return(0,I.jsxs)(`div`,{className:`${r.statusBlockWrapper} ${o?r.statusBlockActive:``}`,onPointerEnter:e=>l(e,t),onPointerLeave:u,onPointerDown:e=>d(e,t),children:[(0,I.jsx)(`div`,{className:`${r.statusBlock} ${n?r.statusBlockIdle:``}`,style:a}),o&&p(e,t)]},t)})}),(0,I.jsx)(`span`,{className:`${r.statusRate} ${c}`,children:s?by(e.successRate):`--`})]})}var Sy={primaryCell:`ProviderResourceTable-module__primaryCell___fLp9r`,primaryName:`ProviderResourceTable-module__primaryName___dfYeV`,primarySub:`ProviderResourceTable-module__primarySub___QABoS`,baseUrl:`ProviderResourceTable-module__baseUrl___FNjG7`,chip:`ProviderResourceTable-module__chip___U7kQV`,metricsCell:`ProviderResourceTable-module__metricsCell___1OlzF`,metric:`ProviderResourceTable-module__metric___aEHez`,metricLabel:`ProviderResourceTable-module__metricLabel___t8rAu`,metricValue:`ProviderResourceTable-module__metricValue___VTEWB`,flagTag:`ProviderResourceTable-module__flagTag___2i4Y4`,statusBadge:`ProviderResourceTable-module__statusBadge___dk8Hi`,statusCell:`ProviderResourceTable-module__statusCell___8599N`,stats:`ProviderResourceTable-module__stats___73Ql1`,statPill:`ProviderResourceTable-module__statPill___-ANv0`,statSuccess:`ProviderResourceTable-module__statSuccess___LrHac`,statFailure:`ProviderResourceTable-module__statFailure___yGMe3`,statusActive:`ProviderResourceTable-module__statusActive___Zw5FB`,statusDisabled:`ProviderResourceTable-module__statusDisabled___BKP-G`,actions:`ProviderResourceTable-module__actions___4j-hn`,toggleWrap:`ProviderResourceTable-module__toggleWrap___1u1Vz`,iconBtn:`ProviderResourceTable-module__iconBtn___RYOTP`,iconBtnDanger:`ProviderResourceTable-module__iconBtnDanger___OCat1`},Cy={statusBar:`providerStatusBar-module__statusBar___CO-2Q`,statusBlocks:`providerStatusBar-module__statusBlocks___GUtae`,statusBlockWrapper:`providerStatusBar-module__statusBlockWrapper___7PmJZ`,statusBlock:`providerStatusBar-module__statusBlock___Bo-Dp`,statusBlockActive:`providerStatusBar-module__statusBlockActive___FgyJm`,statusBlockIdle:`providerStatusBar-module__statusBlockIdle___SNDuL`,statusTooltip:`providerStatusBar-module__statusTooltip___pI78F`,statusTooltipLeft:`providerStatusBar-module__statusTooltipLeft___ZskB1`,statusTooltipRight:`providerStatusBar-module__statusTooltipRight___Ajuc0`,tooltipTime:`providerStatusBar-module__tooltipTime___u6zEq`,tooltipStats:`providerStatusBar-module__tooltipStats___uvspI`,tooltipSuccess:`providerStatusBar-module__tooltipSuccess___km1zF`,tooltipFailure:`providerStatusBar-module__tooltipFailure___rNWH9`,tooltipRate:`providerStatusBar-module__tooltipRate___YZaf1`,statusRate:`providerStatusBar-module__statusRate___gq06G`,statusRateHigh:`providerStatusBar-module__statusRateHigh___Q976x`,statusRateMedium:`providerStatusBar-module__statusRateMedium___ExaLs`,statusRateLow:`providerStatusBar-module__statusRateLow___iNJnD`},wy=[`18%`,`18%`,`6%`,`14%`,`24%`,`20%`],Ty=(e,t)=>e.brand===`openaiCompatibility`?Xv(e.raw,t):Wv(t,e.brand,e.apiKey??void 0,e.baseUrl??void 0),Ey=(e,t)=>e.brand===`openaiCompatibility`?Yv(e.raw,t):Gv(t,e.brand,e.apiKey??void 0,e.baseUrl??void 0);function Dy({resources:e,selectedId:t,disableMutations:n,usageByProvider:r,onView:i,onEdit:a,onDelete:o,onToggleDisabled:s}){let{t:c}=Xo(),l=(e,t,n)=>(0,I.jsxs)(`span`,{className:Sy.metric,children:[(0,I.jsx)(`span`,{className:Sy.metricLabel,children:t}),(0,I.jsx)(`span`,{className:Sy.metricValue,children:n})]},e),u=(e,t)=>(0,I.jsx)(`span`,{className:Sy.flagTag,children:t},e),d=e=>{let t=[];return e.brand===`openaiCompatibility`?t.push(l(`models`,c(`providersPage.table.metrics.models`),e.modelCount),l(`keys`,c(`providersPage.table.metrics.keys`),e.apiKeyEntryCount),l(`headers`,c(`providersPage.table.metrics.headers`),e.headerCount)):(t.push(l(`models`,c(`providersPage.table.metrics.models`),e.modelCount),l(`headers`,c(`providersPage.table.metrics.headers`),e.headerCount)),e.brand===`codex`&&e.flags.websockets&&t.push(u(`ws`,c(`providersPage.table.websocketsTag`))),e.brand===`claude`&&e.flags.cloakEnabled&&t.push(u(`cloak`,c(`providersPage.table.cloakTag`)))),(0,I.jsx)(`div`,{className:Sy.metricsCell,children:t})},f=e=>e.disabled?(0,I.jsxs)(`span`,{className:`${Sy.statusBadge} ${Sy.statusDisabled}`,children:[(0,I.jsx)(bs,{size:14}),c(`providersPage.status.disabled`)]}):(0,I.jsxs)(`span`,{className:`${Sy.statusBadge} ${Sy.statusActive}`,children:[(0,I.jsx)(xs,{size:14}),c(`providersPage.status.active`)]}),p=e=>{if(e.brand===`openaiCompatibility`){let t=e.apiKeyEntryCount>1?` · +${e.apiKeyEntryCount-1}`:``;return(0,I.jsxs)(`div`,{className:Sy.primaryCell,children:[(0,I.jsx)(`span`,{className:Sy.primaryName,children:e.name??e.identifier}),(0,I.jsx)(`span`,{className:Sy.primarySub,children:(e.apiKeyPreview??`—`)+t})]})}return(0,I.jsxs)(`div`,{className:Sy.primaryCell,children:[(0,I.jsx)(`span`,{className:Sy.primaryName,children:e.apiKeyPreview??`—`}),e.authIndex?(0,I.jsxs)(`span`,{className:Sy.primarySub,children:[`auth: `,e.authIndex]}):null]})},m=e=>e.brand===`claude`&&!e.baseUrl?(0,I.jsxs)(`span`,{className:Sy.baseUrl,children:[`https://api.anthropic.com `,c(`providersPage.status.defaultSuffix`)]}):(0,I.jsx)(`span`,{className:Sy.baseUrl,children:e.baseUrl??c(`providersPage.status.notSet`)});return(0,I.jsxs)(cy,{cols:wy.map((e,t)=>(0,I.jsx)(`col`,{style:{width:e}},t)),children:[(0,I.jsx)(ly,{children:(0,I.jsxs)(dy,{children:[(0,I.jsx)(fy,{children:c(`providersPage.table.key`)}),(0,I.jsx)(fy,{children:c(`providersPage.table.baseUrl`)}),(0,I.jsx)(fy,{children:c(`providersPage.table.prefix`)}),(0,I.jsx)(fy,{children:c(`providersPage.table.models`)}),(0,I.jsx)(fy,{children:c(`providersPage.table.status`)}),(0,I.jsx)(fy,{alignRight:!0,children:c(`providersPage.table.actions`)})]})}),(0,I.jsx)(uy,{children:e.map(e=>(0,I.jsxs)(dy,{selected:e.id===t,children:[(0,I.jsx)(py,{children:p(e)}),(0,I.jsx)(py,{children:m(e)}),(0,I.jsx)(py,{children:e.prefix?(0,I.jsx)(`span`,{className:Sy.chip,children:e.prefix}):(0,I.jsx)(`span`,{className:Sy.baseUrl,children:c(`providersPage.status.none`)})}),(0,I.jsx)(py,{children:d(e)}),(0,I.jsx)(py,{children:(0,I.jsxs)(`div`,{className:Sy.statusCell,children:[f(e),r?(0,I.jsxs)(I.Fragment,{children:[(()=>{let t=Ey(e,r);return(0,I.jsxs)(`div`,{className:Sy.stats,children:[(0,I.jsxs)(`span`,{className:`${Sy.statPill} ${Sy.statSuccess}`,children:[c(`stats.success`),`: `,t.success]}),(0,I.jsxs)(`span`,{className:`${Sy.statPill} ${Sy.statFailure}`,children:[c(`stats.failure`),`: `,t.failure]})]})})(),(0,I.jsx)(xy,{statusData:Ty(e,r),styles:Cy})]}):null]})}),(0,I.jsx)(py,{alignRight:!0,children:(0,I.jsxs)(`div`,{className:Sy.actions,children:[s?(0,I.jsx)(`span`,{className:Sy.toggleWrap,onClick:e=>e.stopPropagation(),children:(0,I.jsx)(hy,{checked:!e.disabled,disabled:n,onChange:t=>s(e,!t),ariaLabel:e.disabled?c(`providersPage.actions.enable`):c(`providersPage.actions.disable`)})}):null,(0,I.jsx)(`button`,{type:`button`,className:Sy.iconBtn,"aria-label":c(`providersPage.actions.view`),title:c(`providersPage.actions.view`),onClick:t=>{t.stopPropagation(),i(e)},children:(0,I.jsx)(As,{size:16})}),(0,I.jsx)(`button`,{type:`button`,className:Sy.iconBtn,"aria-label":c(`providersPage.actions.edit`),title:c(`providersPage.actions.edit`),disabled:n,onClick:t=>{t.stopPropagation(),a(e)},children:(0,I.jsx)(ys,{size:16})}),(0,I.jsx)(`button`,{type:`button`,className:`${Sy.iconBtn} ${Sy.iconBtnDanger}`,"aria-label":c(`providersPage.actions.delete`),title:c(`providersPage.actions.delete`),disabled:n,onClick:t=>{t.stopPropagation(),o(e)},children:(0,I.jsx)(hs,{size:16})})]})})]},e.id))})]})}var Oy={root:`ProviderResourceToolbar-module__root___3OtVO`,sortGroup:`ProviderResourceToolbar-module__sortGroup___Owd8u`,label:`ProviderResourceToolbar-module__label___Xpn6H`,dirBtn:`ProviderResourceToolbar-module__dirBtn___Si6-Q`,filterGroup:`ProviderResourceToolbar-module__filterGroup___GCSLL`,filterTrigger:`ProviderResourceToolbar-module__filterTrigger___7nyg5`,filterPanel:`ProviderResourceToolbar-module__filterPanel___By-o1`,filterToolbar:`ProviderResourceToolbar-module__filterToolbar___rAN5t`,filterToolbarBtn:`ProviderResourceToolbar-module__filterToolbarBtn___H8kEF`,filterEmpty:`ProviderResourceToolbar-module__filterEmpty___YoLaV`,filterList:`ProviderResourceToolbar-module__filterList___bLUS8`,filterItem:`ProviderResourceToolbar-module__filterItem___ayJYT`,filterItemLabel:`ProviderResourceToolbar-module__filterItemLabel___WgP0a`};function ky({sortBy:e,sortDir:t,onSortBy:n,onSortDir:r,availableModels:i,selectedModels:a,onSelectedModelsChange:o}){let{t:s}=Xo(),[c,l]=(0,y.useState)(!1),u=(0,y.useRef)(null),d=(0,y.useMemo)(()=>[{value:`name`,label:s(`providersPage.toolbar.sort.name`)},{value:`priority`,label:s(`providersPage.toolbar.sort.priority`)},{value:`recent-success`,label:s(`providersPage.toolbar.sort.recentSuccess`)}],[s]);(0,y.useEffect)(()=>{if(!c)return;let e=e=>{u.current&&!u.current.contains(e.target)&&l(!1)};return document.addEventListener(`pointerdown`,e),()=>document.removeEventListener(`pointerdown`,e)},[c]);let f=e=>{let t=new Set(a);t.has(e)?t.delete(e):t.add(e),o(t)},p=()=>o(new Set(i)),m=()=>o(new Set),h=a.size===0?s(`providersPage.toolbar.filter.allModels`):s(`providersPage.toolbar.filter.selectedModels`,{selected:a.size,total:i.length});return(0,I.jsxs)(`div`,{className:Oy.root,children:[(0,I.jsxs)(`div`,{className:Oy.sortGroup,children:[(0,I.jsx)(`span`,{className:Oy.label,children:s(`providersPage.toolbar.sortBy`)}),(0,I.jsx)(nc,{value:e,options:d,onChange:e=>n(e),ariaLabel:s(`providersPage.toolbar.sortBy`),size:`sm`}),(0,I.jsx)(`button`,{type:`button`,className:Oy.dirBtn,onClick:()=>r(t===`asc`?`desc`:`asc`),"aria-label":s(t===`asc`?`providersPage.toolbar.sort.directionAsc`:`providersPage.toolbar.sort.directionDesc`),title:s(t===`asc`?`providersPage.toolbar.sort.directionAsc`:`providersPage.toolbar.sort.directionDesc`),children:t===`asc`?(0,I.jsx)(ws,{size:14}):(0,I.jsx)(Ts,{size:14})})]}),(0,I.jsxs)(`div`,{className:Oy.filterGroup,ref:u,children:[(0,I.jsxs)(`button`,{type:`button`,className:Oy.filterTrigger,onClick:()=>l(e=>!e),disabled:i.length===0,children:[(0,I.jsx)(ns,{size:14}),(0,I.jsx)(`span`,{children:h}),(0,I.jsx)(Ts,{size:12})]}),c?(0,I.jsxs)(`div`,{className:Oy.filterPanel,children:[(0,I.jsxs)(`div`,{className:Oy.filterToolbar,children:[(0,I.jsx)(`button`,{type:`button`,className:Oy.filterToolbarBtn,onClick:p,disabled:i.length===0,children:s(`providersPage.toolbar.filter.selectAll`)}),(0,I.jsx)(`button`,{type:`button`,className:Oy.filterToolbarBtn,onClick:m,disabled:a.size===0,children:s(`providersPage.toolbar.filter.clear`)})]}),i.length===0?(0,I.jsx)(`div`,{className:Oy.filterEmpty,children:s(`providersPage.toolbar.filter.empty`)}):(0,I.jsx)(`ul`,{className:Oy.filterList,children:i.map(e=>(0,I.jsx)(`li`,{className:Oy.filterItem,children:(0,I.jsx)(ic,{checked:a.has(e),onChange:()=>f(e),label:(0,I.jsx)(`span`,{className:Oy.filterItemLabel,children:e})})},e))})]}):null]})]})}var Ay={panel:`ProviderResourcePanel-module__panel___CMeiX`,header:`ProviderResourcePanel-module__header___Ud2jP`,headerMain:`ProviderResourcePanel-module__headerMain___aGFKi`,headerToolbarRow:`ProviderResourcePanel-module__headerToolbarRow___lBCoP`,titleArea:`ProviderResourcePanel-module__titleArea___SIpoX`,titleRow:`ProviderResourcePanel-module__titleRow___T1AfI`,logo:`ProviderResourcePanel-module__logo___7eyxv`,logoInvertOnDark:`ProviderResourcePanel-module__logoInvertOnDark___yeOZu`,title:`ProviderResourcePanel-module__title___Zw2Hc`,searchWrap:`ProviderResourcePanel-module__searchWrap___95CD5`,searchInput:`ProviderResourcePanel-module__searchInput___TA7QZ`,searchIcon:`ProviderResourcePanel-module__searchIcon___u6sCR`,empty:`ProviderResourcePanel-module__empty___1gkyi`,emptyAction:`ProviderResourcePanel-module__emptyAction___EzR3x`};function jy({group:e,filter:t,onFilterChange:n,filteredResources:r,selectedId:i,disableMutations:a,usageByProvider:o,toolbarControls:s,onView:c,onEdit:l,onDelete:u,onToggleDisabled:d,onCreate:f}){let{t:p}=Xo(),m=iy[e.id],h=r.filter(e=>!e.flags.isPlaceholder);return(0,I.jsxs)(`section`,{className:Ay.panel,children:[(0,I.jsxs)(`div`,{className:Ay.header,children:[(0,I.jsxs)(`div`,{className:Ay.headerMain,children:[(0,I.jsx)(`div`,{className:Ay.titleArea,children:(0,I.jsxs)(`div`,{className:Ay.titleRow,children:[m?(0,I.jsx)(`img`,{src:m.src,alt:``,"aria-hidden":`true`,className:`${Ay.logo} ${m.invertOnDark?Ay.logoInvertOnDark:``}`}):null,(0,I.jsx)(`h2`,{className:Ay.title,children:p(`providersPage.providerNames.${e.id}`)})]})}),(0,I.jsxs)(`div`,{className:Ay.searchWrap,children:[(0,I.jsx)(`span`,{className:Ay.searchIcon,"aria-hidden":`true`,children:(0,I.jsx)(Ds,{size:16})}),(0,I.jsx)(`input`,{type:`search`,className:Ay.searchInput,value:t,onChange:e=>n(e.target.value),placeholder:p(`providersPage.table.filterPlaceholder`)})]})]}),s?(0,I.jsx)(`div`,{className:Ay.headerToolbarRow,children:(0,I.jsx)(ky,{sortBy:s.sortBy,sortDir:s.sortDir,onSortBy:s.onSortBy,onSortDir:s.onSortDir,availableModels:s.availableModels,selectedModels:s.selectedModels,onSelectedModelsChange:s.onSelectedModelsChange},e.id)}):null]}),h.length===0?(0,I.jsxs)(`div`,{className:Ay.empty,children:[(0,I.jsx)(`div`,{children:p(`providersPage.table.empty`)}),(0,I.jsx)(`div`,{className:Ay.emptyAction,children:(0,I.jsxs)(`button`,{type:`button`,onClick:f,style:{display:`inline-flex`,alignItems:`center`,gap:6,padding:`7px 13px`,borderRadius:`var(--radius-md)`,border:`1px solid var(--border-color)`,background:`var(--bg-primary)`,cursor:`pointer`,fontSize:14},children:[(0,I.jsx)(vs,{size:16}),(0,I.jsx)(`span`,{children:p(`providersPage.actions.new`)})]})})]}):(0,I.jsx)(Dy,{resources:r,selectedId:i,disableMutations:a,usageByProvider:o,onView:c,onEdit:l,onDelete:u,onToggleDisabled:d})]})}var My={overlay:`Sheet-module__overlay___z8D5E`,entering:`Sheet-module__entering___-FNfE`,exiting:`Sheet-module__exiting___q7zPi`,content:`Sheet-module__content___ITPBZ`,sizeMd:`Sheet-module__sizeMd___ziRMr`,sizeLg:`Sheet-module__sizeLg___32pg7`,sizeXl:`Sheet-module__sizeXl___AvWCt`,header:`Sheet-module__header___cUB1H`,eyebrow:`Sheet-module__eyebrow___Duxhe`,title:`Sheet-module__title___1-JZS`,description:`Sheet-module__description___Xg2Ae`,body:`Sheet-module__body___Aso8V`,footer:`Sheet-module__footer___kLZWM`,closeBtn:`Sheet-module__closeBtn___s0cgQ`},Ny=280,Py={md:My.sizeMd,lg:My.sizeLg,xl:My.sizeXl};function Fy({open:e,onClose:t,size:n=`md`,eyebrow:r,title:i,description:a,footer:o,closeDisabled:s=!1,className:c,ariaLabel:l,confirmClose:u,children:d}){let{t:f}=Xo(),p=(0,y.useId)(),m=(0,y.useId)(),[h,g]=(0,y.useState)(!1),[_,v]=(0,y.useState)(!1),b=(0,y.useRef)(null),x=(0,y.useRef)(null),C=(0,y.useRef)(null),w=(0,y.useRef)(null),T=(0,y.useCallback)(()=>x.current?Array.from(x.current.querySelectorAll(Op)).filter(e=>!e.hasAttribute(`disabled`)&&e.tabIndex!==-1):[],[]),E=(0,y.useCallback)(e=>{b.current===null&&(v(!0),b.current=window.setTimeout(()=>{g(!1),v(!1),b.current=null,e&&t()},Ny))},[t]);(0,y.useEffect)(()=>{let t=!1;return e?(b.current!==null&&(window.clearTimeout(b.current),b.current=null),queueMicrotask(()=>{t||(g(!0),v(!1))})):h&&queueMicrotask(()=>{t||E(!1)}),()=>{t=!0}},[e,h,E]);let D=(0,y.useCallback)(async()=>{if(u)try{if(await u()===!1)return}catch{return}E(!0)},[u,E]);(0,y.useEffect)(()=>()=>{b.current!==null&&window.clearTimeout(b.current)},[]);let O=e||h;if((0,y.useEffect)(()=>{if(O)return Ep(),()=>Dp()},[O]),(0,y.useEffect)(()=>{if(!e)return;w.current=document.activeElement instanceof HTMLElement?document.activeElement:null;let t=window.setTimeout(()=>{(T()[0]??C.current??x.current)?.focus()},0);return()=>window.clearTimeout(t)},[T,e]),(0,y.useEffect)(()=>{e||h||(w.current?.focus(),w.current=null)},[h,e]),(0,y.useEffect)(()=>{if(!e)return;let t=e=>{if(e.key===`Escape`){if(s)return;e.preventDefault(),D();return}if(e.key!==`Tab`)return;let t=T();if(t.length===0){e.preventDefault(),x.current?.focus();return}let n=t[0],r=t[t.length-1],i=document.activeElement;if(e.shiftKey){(i===n||i===x.current)&&(e.preventDefault(),r.focus());return}i===r&&(e.preventDefault(),n.focus())};return document.addEventListener(`keydown`,t),()=>document.removeEventListener(`keydown`,t)},[s,T,D,e]),!e&&!h)return null;let k=_?My.exiting:My.entering,A=(0,I.jsx)(`div`,{className:`${My.overlay} ${k}`.trim(),role:`presentation`,onMouseDown:e=>{s||e.target===e.currentTarget&&D()},children:(0,I.jsxs)(`div`,{ref:x,className:[My.content,Py[n],k,c].filter(Boolean).join(` `),role:`dialog`,"aria-modal":`true`,"aria-labelledby":i?p:void 0,"aria-describedby":a?m:void 0,"aria-label":!i&&l?l:void 0,tabIndex:-1,onMouseDown:e=>e.stopPropagation(),children:[(0,I.jsx)(`button`,{ref:C,type:`button`,className:My.closeBtn,onClick:s?void 0:D,disabled:s,"aria-label":f(`common.close`),children:(0,I.jsx)(Os,{size:18})}),(r||i||a)&&(0,I.jsxs)(`div`,{className:My.header,children:[r?(0,I.jsx)(`div`,{className:My.eyebrow,children:r}):null,i?(0,I.jsx)(`h2`,{id:p,className:My.title,children:i}):null,a?(0,I.jsx)(`p`,{id:m,className:My.description,children:a}):null]}),(0,I.jsx)(`div`,{className:My.body,children:d}),o?(0,I.jsx)(`div`,{className:My.footer,children:o}):null]})});return typeof document>`u`?A:(0,S.createPortal)(A,document.body)}var Iy={gemini:{id:`gemini`,supportsName:!1,supportsApiKey:!0,supportsDisabled:!0,supportsBaseUrl:!0,baseUrlRequired:!1,supportsProxyUrl:!0,supportsPrefix:!0,supportsModels:!0,supportsHeaders:!0,supportsExcludedModels:!0,supportsPriority:!0,supportsTestModel:!0,supportsWebsockets:!1,supportsCloak:!1,supportsApiKeyEntries:!1,sheetSize:`md`},codex:{id:`codex`,supportsName:!1,supportsApiKey:!0,supportsDisabled:!0,supportsBaseUrl:!0,baseUrlRequired:!0,supportsProxyUrl:!0,supportsPrefix:!0,supportsModels:!0,supportsHeaders:!0,supportsExcludedModels:!0,supportsPriority:!0,supportsTestModel:!0,supportsWebsockets:!0,supportsCloak:!1,supportsApiKeyEntries:!1,sheetSize:`md`},claude:{id:`claude`,supportsName:!1,supportsApiKey:!0,supportsDisabled:!0,supportsBaseUrl:!0,baseUrlRequired:!1,supportsProxyUrl:!0,supportsPrefix:!0,supportsModels:!0,supportsHeaders:!0,supportsExcludedModels:!0,supportsPriority:!0,supportsTestModel:!0,supportsWebsockets:!1,supportsCloak:!0,supportsApiKeyEntries:!1,sheetSize:`md`},vertex:{id:`vertex`,supportsName:!1,supportsApiKey:!0,supportsDisabled:!0,supportsBaseUrl:!0,baseUrlRequired:!1,supportsProxyUrl:!0,supportsPrefix:!0,supportsModels:!0,supportsHeaders:!0,supportsExcludedModels:!0,supportsPriority:!0,supportsTestModel:!1,supportsWebsockets:!1,supportsCloak:!1,supportsApiKeyEntries:!1,sheetSize:`md`},openaiCompatibility:{id:`openaiCompatibility`,supportsName:!0,supportsApiKey:!1,supportsDisabled:!0,supportsBaseUrl:!0,baseUrlRequired:!0,supportsProxyUrl:!1,supportsPrefix:!0,supportsModels:!0,supportsHeaders:!0,supportsExcludedModels:!1,supportsPriority:!0,supportsTestModel:!0,supportsWebsockets:!1,supportsCloak:!1,supportsApiKeyEntries:!0,sheetSize:`lg`}},Ly=[`gemini`,`codex`,`claude`,`vertex`,`openaiCompatibility`],Ry={root:`Collapsible-module__root___pblku`,summary:`Collapsible-module__summary___9zX-c`,summaryLabel:`Collapsible-module__summaryLabel___G6Rv3`,summaryHint:`Collapsible-module__summaryHint___zzQq-`,chevron:`Collapsible-module__chevron___L6d3B`,content:`Collapsible-module__content___rwqsf`,contentFlush:`Collapsible-module__contentFlush___WXXdd`};function zy({label:e,hint:t,defaultOpen:n=!1,open:r,onToggle:i,flush:a,children:o,className:s,...c}){let[l,u]=(0,y.useState)(n),d=r??l,f=[Ry.root,s].filter(Boolean).join(` `),p=a?Ry.contentFlush:Ry.content;return(0,I.jsxs)(`details`,{className:f,open:d,onToggle:e=>{r===void 0&&u(e.currentTarget.open),i?.(e)},...c,children:[(0,I.jsxs)(`summary`,{className:Ry.summary,children:[(0,I.jsxs)(`span`,{className:Ry.summaryLabel,children:[(0,I.jsx)(`span`,{children:e}),t?(0,I.jsx)(`span`,{className:Ry.summaryHint,children:t}):null]}),(0,I.jsx)(`span`,{className:Ry.chevron,"aria-hidden":`true`,children:(0,I.jsx)(Ts,{size:16})})]}),(0,I.jsx)(`div`,{className:p,children:o})]})}var By=3e4,Vy=`2023-06-01`,Hy={state:`idle`,message:``},Uy=(e,t)=>{let n=pc(e);return typeof e==`object`&&e&&`code`in e&&String(e.code)===`ECONNABORTED`||n.toLowerCase().includes(`timeout`)?t.timeout(By/1e3):n||t.requestFailed},Wy=(e,t)=>{let n=(e??``).trim();if(n)return n;for(let e of t){let t=(e.name??``).trim();if(t)return t}return``},Gy=e=>{let t=Object.entries(e).find(([e])=>e.toLowerCase()===`authorization`)?.[1];if(!t)return``;let n=String(t).match(/^Bearer\s+(.+)$/i);return n?n[1].trim():``};function Ky(e,t){let{brand:n,baseUrl:r,testModel:i,models:a,formHeaders:o,apiKeyEntries:s,apiKey:c,fallbackApiKey:l,authIndex:u}=e,d=s?.length??0,[f,p]=(0,y.useState)(()=>Array.from({length:d},()=>Hy)),[m,h]=(0,y.useState)(Hy),[g,_]=(0,y.useState)(Hy),[v,b]=(0,y.useState)(Hy),[x,S]=(0,y.useState)(0),C=(0,y.useMemo)(()=>(s??[]).map(e=>[e.apiKey??``,e.existingApiKey??``,e.authIndex??``,e.proxyUrl??``].join(`||`)),[s]),w=(0,y.useRef)(C);(0,y.useEffect)(()=>{let e=w.current,t=C;w.current=t,p(n=>{let r=t.length,i=n.length!==r,a=n.slice(0,r);for(;a.length<r;)a.push(Hy);for(let n=0;n<r;n++)e[n]!==void 0&&e[n]!==t[n]&&a[n].state!==`idle`&&(a[n]=Hy,i=!0);return i?a:n})},[C]);let T=(0,y.useMemo)(()=>{let e=o.map(e=>`${e.key}:${e.value}`).join(`|`),t=a.map(e=>`${e.name}:${e.alias??``}`).join(`|`);return[r,(i??``).trim(),c??``,l??``,u??``,e,t].join(`||`)},[c,u,r,l,i,o,a]),E=(0,y.useRef)(T);(0,y.useEffect)(()=>{E.current!==T&&(E.current=T,p(e=>e.map(()=>Hy)),h(Hy),_(Hy),b(Hy))},[T]);let D=(0,y.useCallback)((e,t)=>{p(n=>{let r=[...n];return r[e]=t,r})},[]),O=(0,y.useCallback)(async e=>{if(n!==`openaiCompatibility`)return!1;let c=r.trim();if(!c)return D(e,{state:`error`,message:t.baseUrlRequired}),!1;let l=Iv(c);if(!l)return D(e,{state:`error`,message:t.endpointInvalid}),!1;let d=s?.[e],f=(d?.apiKey??``).trim()||(d?.existingApiKey??``).trim(),p=(d?.authIndex??``).trim()||(u??``).trim()||void 0;if(!f&&!p)return D(e,{state:`error`,message:t.apiKeyRequired}),!1;let m=Wy(i,a);if(!m)return D(e,{state:`error`,message:t.modelRequired}),!1;let h={"Content-Type":`application/json`,...Cf(o)};wf(h,`authorization`)||(f?h.Authorization=`Bearer ${f}`:p&&(h.Authorization=`Bearer $TOKEN$`)),D(e,{state:`loading`,message:``}),S(e=>e+1);try{let t=await Xf.request({authIndex:p,method:`POST`,url:l,header:h,data:JSON.stringify({model:m,messages:[{role:`user`,content:`Hi`}],stream:!1,max_tokens:5})},{timeout:By});if(t.statusCode<200||t.statusCode>=300)throw Error(Yf(t));return D(e,{state:`success`,message:``}),!0}catch(n){return D(e,{state:`error`,message:Uy(n,t)}),!1}finally{S(e=>e-1)}},[s,u,r,n,o,t,a,i,D]),k=(0,y.useCallback)(async()=>{if(n!==`openaiCompatibility`)return;let e=s??[];e.length&&await Promise.all(e.map((e,t)=>O(t)))},[s,n,O]),A=(0,y.useCallback)(async()=>{if(n!==`codex`)return;let e=r.trim();if(!e){h({state:`error`,message:t.baseUrlRequired});return}let s=Lv(e);if(!s){h({state:`error`,message:t.endpointInvalid});return}let d=Wy(i,a);if(!d){h({state:`error`,message:t.modelRequired});return}let f=Cf(o),p=(c??``).trim(),m=(l??``).trim(),g=wf(f,`authorization`),_=p||m,v=(u??``).trim()||void 0;if(!_&&!g&&!v){h({state:`error`,message:t.apiKeyRequired});return}let y={"Content-Type":`application/json`,...f};wf(y,`authorization`)||(_?y.Authorization=`Bearer ${_}`:v&&(y.Authorization=`Bearer $TOKEN$`)),h({state:`loading`,message:``}),S(e=>e+1);try{let e=await Xf.request({authIndex:v,method:`POST`,url:s,header:y,data:JSON.stringify({model:d,input:`Hi`,stream:!1})},{timeout:By});if(e.statusCode<200||e.statusCode>=300)throw Error(Yf(e));h({state:`success`,message:``})}catch(e){h({state:`error`,message:Uy(e,t)})}finally{S(e=>e-1)}},[c,u,r,n,l,o,t,a,i]),ee=(0,y.useCallback)(async()=>{if(n!==`gemini`)return;let e=Wy(i,a);if(!e){_({state:`error`,message:t.modelRequired});return}let s=zv(r??``,e);if(!s){_({state:`error`,message:t.endpointInvalid});return}let d=Cf(o),f=(c??``).trim(),p=(l??``).trim(),m=wf(d,`x-goog-api-key`),h=f||p,g=(u??``).trim()||void 0;if(!h&&!m&&!g){_({state:`error`,message:t.apiKeyRequired});return}let v={"Content-Type":`application/json`,...d};wf(v,`x-goog-api-key`)||(h?v[`x-goog-api-key`]=h:g&&(v[`x-goog-api-key`]=`$TOKEN$`)),_({state:`loading`,message:``}),S(e=>e+1);try{let e=await Xf.request({authIndex:g,method:`POST`,url:s,header:v,data:JSON.stringify({contents:[{parts:[{text:`Hi`}]}],generationConfig:{maxOutputTokens:8}})},{timeout:By});if(e.statusCode<200||e.statusCode>=300)throw Error(Yf(e));_({state:`success`,message:``})}catch(e){_({state:`error`,message:Uy(e,t)})}finally{S(e=>e-1)}},[c,u,r,n,l,o,t,a,i]),j=(0,y.useCallback)(async()=>{if(n!==`claude`)return;let e=Rv(r??``);if(!e){b({state:`error`,message:t.endpointInvalid});return}let s=Wy(i,a);if(!s){b({state:`error`,message:t.modelRequired});return}let d=Cf(o),f=(c??``).trim(),p=(l??``).trim(),m=Gy(d),h=wf(d,`x-api-key`),g=f||p||m,_=(u??``).trim()||void 0;if(!g&&!h&&!_){b({state:`error`,message:t.apiKeyRequired});return}let v={"Content-Type":`application/json`,...d};wf(v,`anthropic-version`)||(v[`anthropic-version`]=Vy),!h&&g?v[`x-api-key`]=g:!h&&_&&(v[`x-api-key`]=`$TOKEN$`),b({state:`loading`,message:``}),S(e=>e+1);try{let t=await Xf.request({authIndex:_,method:`POST`,url:e,header:v,data:JSON.stringify({model:s,max_tokens:8,messages:[{role:`user`,content:`Hi`}]})},{timeout:By});if(t.statusCode<200||t.statusCode>=300)throw Error(Yf(t));b({state:`success`,message:``})}catch(e){b({state:`error`,message:Uy(e,t)})}finally{S(e=>e-1)}},[c,u,r,n,l,o,t,a,i]);return{openaiStatuses:f,codexStatus:m,geminiStatus:g,claudeStatus:v,isTestingAny:x>0,runOpenAIKey:O,runOpenAIAllKeys:k,runCodex:A,runGemini:ee,runClaude:j}}var qy=[`gemini`,`codex`,`claude`,`openaiCompatibility`],Jy=e=>qy.includes(e);function Yy(e){let{brand:t,baseUrl:n,formHeaders:r,apiKeyEntries:i,apiKey:a,fallbackApiKey:o,authIndex:s}=e,c=Jy(t),[l,u]=(0,y.useState)(!1),[d,f]=(0,y.useState)(null),[p,m]=(0,y.useState)([]),[h,g]=(0,y.useState)(!1),_=(0,y.useCallback)(async()=>{if(c){u(!0),f(null);try{let e=Cf(r),c=(s??``).trim()||void 0,l=[];if(t===`gemini`){let t=(a??``).trim()||(o??``).trim();l=await up.fetchGeminiModelsViaApiCall(n,t,e,c)}else if(t===`codex`){let t=(a??``).trim()||(o??``).trim();l=await up.fetchV1ModelsViaApiCall(n,t,e,c)}else if(t===`claude`){let t=(a??``).trim()||(o??``).trim();l=await up.fetchClaudeModelsViaApiCall(n,t,e,c)}else if(t===`openaiCompatibility`){let t=(i??[]).find(e=>(e.apiKey??``).trim()||(e.existingApiKey??``).trim()||(e.authIndex??``).trim()),r=(t?.apiKey??``).trim()||(t?.existingApiKey??``).trim(),a=(t?.authIndex??``).trim()||c;try{l=await up.fetchModelsViaApiCall(n,r,e,a)}catch(e){try{l=await up.fetchModelsViaApiCall(n)}catch{throw e}}}m(l??[]),g(!0)}catch(e){m([]),f(pc(e)||`Failed to fetch models`),g(!0)}finally{u(!1)}}},[c,a,i,s,n,t,o,r]),v=(0,y.useCallback)(()=>{m([]),f(null),u(!1),g(!1)},[]),b=(0,y.useMemo)(()=>{let e=r.map(e=>`${e.key}:${e.value}`).join(`|`),t=(i??[]).map(e=>`${e.apiKey??``}::${e.existingApiKey??``}::${e.authIndex??``}`).join(`|`);return[n,a??``,o??``,s??``,e,t].join(`||`)},[a,i,s,n,o,r]),x=(0,y.useRef)(b);return(0,y.useEffect)(()=>{x.current!==b&&(x.current=b,v())},[b,v]),{available:c,loading:l,error:d,models:p,hasFetched:h,fetch:_,reset:v}}var V={form:`sharedForm-module__form___PT91R`,section:`sharedForm-module__section___i8OOd`,sectionTitle:`sharedForm-module__sectionTitle___82MzD`,sectionDesc:`sharedForm-module__sectionDesc___pBlrt`,field:`sharedForm-module__field___67Fow`,label:`sharedForm-module__label___sL6bS`,labelHint:`sharedForm-module__labelHint___M7UU6`,input:`sharedForm-module__input___5xUXx`,passwordInput:`sharedForm-module__passwordInput___rSuUg`,textarea:`sharedForm-module__textarea___CdY6q`,checkboxRow:`sharedForm-module__checkboxRow___-oiND`,checkboxBox:`sharedForm-module__checkboxBox___eIVJQ`,checkboxText:`sharedForm-module__checkboxText___LnhPu`,fieldRow:`sharedForm-module__fieldRow___FmfR-`,divider:`sharedForm-module__divider___hp8lX`,errorBox:`sharedForm-module__errorBox___tj-8g`,dl:`sharedForm-module__dl___fU3jy`,dt:`sharedForm-module__dt___WtuBR`,dd:`sharedForm-module__dd___xdoZu`,detailHeader:`sharedForm-module__detailHeader___Gwp7N`,entryCard:`sharedForm-module__entryCard___4UpBh`,entryCardHeader:`sharedForm-module__entryCardHeader___9w6Nq`,entryCardHeaderRight:`sharedForm-module__entryCardHeaderRight___XQk-H`,entriesToolbar:`sharedForm-module__entriesToolbar___ZMhPO`,entriesToolbarSplit:`sharedForm-module__entriesToolbarSplit___ZVvqH`,connectivityRow:`sharedForm-module__connectivityRow___yytvW`,connectivityBtn:`sharedForm-module__connectivityBtn___xuFLs`,connectivityBtnGhost:`sharedForm-module__connectivityBtnGhost___Ks4Ys`,connectivityError:`sharedForm-module__connectivityError___MLzpW`,connectivityHintSuccess:`sharedForm-module__connectivityHintSuccess___bCB6B`,statusIcon:`sharedForm-module__statusIcon___Qo3og`,statusIconLoading:`sharedForm-module__statusIconLoading___Jr4Oi`,spin:`sharedForm-module__spin___ebAKO`,statusIconSuccess:`sharedForm-module__statusIconSuccess___XeAnb`,statusIconError:`sharedForm-module__statusIconError___1-Uh3`,discoveryPanel:`sharedForm-module__discoveryPanel___AhjnU`,discoveryToolbar:`sharedForm-module__discoveryToolbar___pxuM6`,discoverySearchWrap:`sharedForm-module__discoverySearchWrap___6FqGI`,discoverySearchIcon:`sharedForm-module__discoverySearchIcon___ygwRw`,discoverySearch:`sharedForm-module__discoverySearch___18P-i`,discoveryEmpty:`sharedForm-module__discoveryEmpty___yCmmN`,discoveryBatchRow:`sharedForm-module__discoveryBatchRow___RSSTs`,discoveryBatchLabel:`sharedForm-module__discoveryBatchLabel___pHhDl`,discoveryCount:`sharedForm-module__discoveryCount___nHCkA`,discoveryList:`sharedForm-module__discoveryList___UmHOn`,discoveryItem:`sharedForm-module__discoveryItem___K7Etw`,discoveryItemExisting:`sharedForm-module__discoveryItemExisting___OZBJe`,discoveryName:`sharedForm-module__discoveryName___PQCDn`,discoveryAddedTag:`sharedForm-module__discoveryAddedTag___HJanN`,discoveryFooter:`sharedForm-module__discoveryFooter___Is7iL`,discoveryApplyBtn:`sharedForm-module__discoveryApplyBtn___Iu3oS`,passwordField:`sharedForm-module__passwordField___XUXUd`,passwordToggle:`sharedForm-module__passwordToggle___uGvUz`,entriesList:`sharedForm-module__entriesList___-jY7O`,removeBtn:`sharedForm-module__removeBtn___iEUNe`,addBtn:`sharedForm-module__addBtn___O-Vjb`,footerBtn:`sharedForm-module__footerBtn___DyIZY`,footerBtnGhost:`sharedForm-module__footerBtnGhost___6XhK0`,footerBtnOutline:`sharedForm-module__footerBtnOutline___mplFu`,footerBtnPrimary:`sharedForm-module__footerBtnPrimary___RbN5Y`,apiKeyEntriesSection:`sharedForm-module__apiKeyEntriesSection___BiWv-`,apiKeyEntriesLabel:`sharedForm-module__apiKeyEntriesLabel___k7lKa`,apiKeyEntryList:`sharedForm-module__apiKeyEntryList___sun97`,apiKeyEntryCard:`sharedForm-module__apiKeyEntryCard___uW3Az`,apiKeyEntryIndex:`sharedForm-module__apiKeyEntryIndex___0Vn5O`,apiKeyEntryKey:`sharedForm-module__apiKeyEntryKey___nFskf`,apiKeyEntryProxy:`sharedForm-module__apiKeyEntryProxy___o-PFf`,apiKeyEntryStats:`sharedForm-module__apiKeyEntryStats___DWlE3`,apiKeyEntryStat:`sharedForm-module__apiKeyEntryStat___pC-og`,apiKeyEntryStatSuccess:`sharedForm-module__apiKeyEntryStatSuccess___PbODP`,apiKeyEntryStatFailure:`sharedForm-module__apiKeyEntryStatFailure___0l7My`};function Xy({loading:e,error:t,models:n,hasFetched:r,existingNames:i,mutating:a,onApply:o,onReload:s,onClose:c}){let{t:l}=Xo(),[u,d]=(0,y.useState)(``),[f,p]=(0,y.useState)(new Set),m=(0,y.useMemo)(()=>{let e=u.trim().toLowerCase();return e?n.filter(t=>`${t.name} ${t.alias??``}`.toLowerCase().includes(e)):n},[n,u]),h=(0,y.useMemo)(()=>m.filter(e=>!i.has(e.name)),[m,i]),g=h.length>0&&h.every(e=>f.has(e.name)),_=e=>{p(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})};return(0,I.jsxs)(`div`,{className:V.discoveryPanel,children:[(0,I.jsxs)(`div`,{className:V.discoveryToolbar,children:[(0,I.jsxs)(`div`,{className:V.discoverySearchWrap,children:[(0,I.jsx)(`span`,{className:V.discoverySearchIcon,"aria-hidden":`true`,children:(0,I.jsx)(Ds,{size:14})}),(0,I.jsx)(`input`,{type:`search`,className:V.discoverySearch,value:u,onChange:e=>d(e.target.value),placeholder:l(`providersPage.discovery.searchPlaceholder`)})]}),(0,I.jsxs)(`button`,{type:`button`,className:V.connectivityBtn,onClick:s,disabled:e,"aria-label":l(`providersPage.discovery.reload`),children:[e?(0,I.jsx)(`span`,{className:`${V.statusIcon} ${V.statusIconLoading}`,children:(0,I.jsx)(Cs,{size:14})}):(0,I.jsx)(ps,{size:14}),(0,I.jsx)(`span`,{children:l(`providersPage.discovery.reload`)})]})]}),e&&!n.length?(0,I.jsx)(`div`,{className:V.discoveryEmpty,children:l(`providersPage.discovery.loading`)}):t?(0,I.jsx)(`div`,{className:V.connectivityError,children:t}):r&&!n.length?(0,I.jsx)(`div`,{className:V.discoveryEmpty,children:l(`providersPage.discovery.empty`)}):n.length?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:V.discoveryBatchRow,children:[(0,I.jsx)(ic,{checked:g,onChange:()=>{p(g?new Set:new Set(h.map(e=>e.name)))},disabled:h.length===0,label:(0,I.jsx)(`span`,{className:V.discoveryBatchLabel,children:l(g?`providersPage.discovery.clearAll`:`providersPage.discovery.selectAll`)})}),(0,I.jsx)(`span`,{className:V.discoveryCount,children:l(`providersPage.discovery.selectedCount`,{selected:f.size,total:h.length})})]}),(0,I.jsx)(`ul`,{className:V.discoveryList,children:m.map(e=>{let t=i.has(e.name);return(0,I.jsx)(`li`,{className:t?`${V.discoveryItem} ${V.discoveryItemExisting}`:V.discoveryItem,children:t?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:V.discoveryName,children:e.name}),(0,I.jsx)(`span`,{className:V.discoveryAddedTag,children:l(`providersPage.discovery.alreadyAdded`)})]}):(0,I.jsx)(ic,{checked:f.has(e.name),onChange:()=>_(e.name),label:(0,I.jsx)(`span`,{className:V.discoveryName,children:e.name})})},e.name)})})]}):(0,I.jsx)(`div`,{className:V.discoveryEmpty,children:l(`providersPage.discovery.notLoaded`)}),(0,I.jsxs)(`div`,{className:V.discoveryFooter,children:[(0,I.jsx)(`button`,{type:`button`,className:V.connectivityBtnGhost,onClick:c,disabled:a,children:l(`providersPage.discovery.close`)}),(0,I.jsx)(`button`,{type:`button`,className:V.discoveryApplyBtn,onClick:()=>{let e=n.filter(e=>f.has(e.name)&&!i.has(e.name));e.length&&(o(e),p(new Set))},disabled:a||f.size===0,children:l(`providersPage.discovery.apply`,{count:f.size})})]})]})}var Zy=()=>({key:``,value:``}),Qy=()=>({name:``,alias:``}),$y=()=>({apiKey:``,proxyUrl:``}),eb=e=>(e??[]).filter(e=>e.trim()!==`*`),tb=e=>!e||Object.keys(e).length===0?``:JSON.stringify(e,null,2);function nb(e,t,n){if(n===`create`||!t)return{apiKey:``,name:``,baseUrl:``,proxyUrl:``,prefix:``,disabled:!1,disableCooling:!1,priority:void 0,models:[Qy()],headers:[Zy()],excludedModelsText:``,websockets:e===`codex`?!1:void 0,cloak:e===`claude`?{mode:``,strictMode:!1,sensitiveWordsText:``,cacheUserId:!1}:void 0,experimentalCchSigning:e===`claude`?!1:void 0,testModel:e===`openaiCompatibility`||e===`codex`||e===`claude`||e===`gemini`?``:void 0,apiKeyEntries:e===`openaiCompatibility`?[$y()]:void 0};let r=t.raw;if(e===`openaiCompatibility`){let e=r;return{apiKey:``,name:e.name??``,baseUrl:e.baseUrl??``,proxyUrl:``,prefix:e.prefix??``,disabled:e.disabled===!0,disableCooling:e.disableCooling===!0,priority:e.priority,models:e.models?.length?e.models.map(e=>({name:e.name,alias:e.alias??``,priority:e.priority,testModel:e.testModel,image:e.image===!0,thinkingJson:tb(e.thinking)})):[Qy()],headers:e.headers?Object.entries(e.headers).map(([e,t])=>({key:e,value:String(t)})):[Zy()],excludedModelsText:``,testModel:e.testModel??``,apiKeyEntries:e.apiKeyEntries?.length?e.apiKeyEntries.map(e=>({apiKey:``,existingApiKey:e.apiKey,proxyUrl:e.proxyUrl??``,authIndex:e.authIndex})):[$y()]}}let i=r,a=Av(i.excludedModels),o=eb(i.excludedModels);return{apiKey:``,name:``,baseUrl:i.baseUrl??``,proxyUrl:i.proxyUrl??``,prefix:i.prefix??``,disabled:a,disableCooling:i.disableCooling===!0,priority:i.priority,models:i.models?.length?i.models.map(e=>({name:e.name,alias:e.alias??``,priority:e.priority,testModel:e.testModel})):[Qy()],headers:i.headers?Object.entries(i.headers).map(([e,t])=>({key:e,value:String(t)})):[Zy()],excludedModelsText:o.join(`
|
||
`),websockets:e===`codex`?i.websockets===!0:void 0,cloak:e===`claude`?{mode:i.cloak?.mode??``,strictMode:i.cloak?.strictMode===!0,sensitiveWordsText:i.cloak?.sensitiveWords?.join(`
|
||
`)??``,cacheUserId:i.cloak?.cacheUserId===!0}:void 0,experimentalCchSigning:e===`claude`?i.experimentalCchSigning===!0:void 0,testModel:e===`codex`||e===`claude`||e===`gemini`?``:void 0}}function rb({state:e}){return e===`loading`?(0,I.jsx)(`span`,{className:`${V.statusIcon} ${V.statusIconLoading}`,children:(0,I.jsx)(Cs,{size:14})}):e===`success`?(0,I.jsx)(`span`,{className:`${V.statusIcon} ${V.statusIconSuccess}`,children:(0,I.jsx)(xs,{size:14})}):e===`error`?(0,I.jsx)(`span`,{className:`${V.statusIcon} ${V.statusIconError}`,children:(0,I.jsx)(bs,{size:14})}):null}function ib({brand:e,resource:t,mode:n,mutating:r,formId:i,onSubmit:a,onDirtyChange:o}){let{t:s}=Xo(),c=Iy[e],l=(0,y.useId)(),[u,d]=(0,y.useState)(()=>nb(e,t,n)),[f]=(0,y.useState)(()=>JSON.stringify(nb(e,t,n))),[p,m]=(0,y.useState)(null),[h,g]=(0,y.useState)(new Set),[_,v]=(0,y.useState)(!1),b=e=>{g(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},x=(0,y.useMemo)(()=>JSON.stringify(u)!==f,[u,f]);(0,y.useEffect)(()=>{o?.(x)},[x,o]);let S=(0,y.useMemo)(()=>n!==`edit`||!t||e===`openaiCompatibility`?``:t.raw?.apiKey??``,[e,n,t]),C=(0,y.useMemo)(()=>n!==`edit`||!t?``:t.raw?.authIndex??``,[n,t]),w=(0,y.useMemo)(()=>({baseUrlRequired:s(`providersPage.connectivity.baseUrlRequired`),endpointInvalid:s(`providersPage.connectivity.endpointInvalid`),apiKeyRequired:s(`providersPage.connectivity.apiKeyRequired`),modelRequired:s(`providersPage.connectivity.modelRequired`),timeout:e=>s(`providersPage.connectivity.timeout`,{seconds:e}),requestFailed:s(`providersPage.connectivity.requestFailed`)}),[s]),T=Ky({brand:e,baseUrl:u.baseUrl,testModel:u.testModel,models:u.models,formHeaders:u.headers,apiKeyEntries:u.apiKeyEntries,apiKey:u.apiKey,fallbackApiKey:S,authIndex:C},w),E=Yy({brand:e,baseUrl:u.baseUrl,formHeaders:u.headers,apiKeyEntries:u.apiKeyEntries,apiKey:u.apiKey,fallbackApiKey:S,authIndex:C}),[D,O]=(0,y.useState)(!1),k=(0,y.useMemo)(()=>{let e=new Set;return u.models.forEach(t=>{let n=(t.name??``).trim();n&&e.add(n)}),e},[u.models]),A=(0,y.useMemo)(()=>{let e=new Set,t=[];u.models.forEach(n=>{let r=(n.name??``).trim();!r||e.has(r)||(e.add(r),t.push(r))});let n=t[0],r=[{value:``,label:n?s(`providersPage.form.testModelAutoWith`,{name:n}):s(`providersPage.form.testModelAutoEmpty`)}];t.forEach(e=>r.push({value:e,label:e}));let i=(u.testModel??``).trim();return i&&!e.has(i)&&r.push({value:i,label:s(`providersPage.form.testModelCustom`,{name:i})}),r},[u.models,u.testModel,s]),ee=()=>{O(!0),!E.loading&&!E.hasFetched&&E.fetch()},j=()=>{O(!1)},M=e=>{e.length&&d(t=>{let n=new Set,r=[];t.models.forEach(e=>{let t=(e.name??``).trim();if(t){if(n.has(t))return;n.add(t)}r.push(e)});let i=r.findIndex(e=>!(e.name??``).trim()&&!(e.alias??``).trim());return i!==-1&&r.splice(i,1),e.forEach(e=>{let t=e.name.trim();!t||n.has(t)||(n.add(t),r.push({name:t,alias:(e.alias??``).trim()}))}),{...t,models:r}})},N=(e,t)=>{d(n=>({...n,[e]:t}))},te=(e,t)=>{d(n=>({...n,cloak:{...n.cloak??{mode:``,strictMode:!1,sensitiveWordsText:``,cacheUserId:!1},[e]:t}}))},P=()=>c.supportsName&&!u.name.trim()?s(`providersPage.form.validation.nameRequired`):c.supportsApiKey&&n===`create`&&!u.apiKey.trim()?s(`providersPage.form.validation.apiKeyRequired`):c.baseUrlRequired&&!u.baseUrl.trim()?s(`providersPage.form.validation.baseUrlRequired`):null,F=async e=>{e.preventDefault();let t=P();if(t){m(t);return}try{m(null),await a(u)}catch(e){m(e instanceof Error?e.message:String(e))}},ne=(0,y.useMemo)(()=>u.headers.length?u.headers:[Zy()],[u.headers]),re=(0,y.useMemo)(()=>u.models.length?u.models:[Qy()],[u.models]),ie=(0,y.useMemo)(()=>u.apiKeyEntries&&u.apiKeyEntries.length?u.apiKeyEntries:[$y()],[u.apiKeyEntries]),ae=u.apiKeyEntries??[],oe=e===`gemini`||e===`codex`||e===`claude`||e===`openaiCompatibility`,se=e===`openaiCompatibility`,ce=e===`codex`?{status:T.codexStatus,run:T.runCodex}:e===`gemini`?{status:T.geminiStatus,run:T.runGemini}:e===`claude`?{status:T.claudeStatus,run:T.runClaude}:null,le=e=>{g(t=>{if(!t.size)return t;let n=new Set;return t.forEach(t=>{t<e?n.add(t):t>e&&n.add(t-1)}),n}),N(`apiKeyEntries`,ae.filter((t,n)=>n!==e))},ue=(e,t)=>{N(`models`,re.map((n,r)=>r===e?{...n,...t}:n))},de=e=>{N(`models`,re.filter((t,n)=>n!==e))};return(0,I.jsxs)(`form`,{id:i,className:V.form,onSubmit:F,noValidate:!0,children:[(0,I.jsxs)(`div`,{className:V.section,children:[c.supportsName?(0,I.jsxs)(`div`,{className:V.field,children:[(0,I.jsx)(`label`,{className:V.label,htmlFor:`${l}-name`,children:s(`providersPage.form.name`)}),(0,I.jsx)(`input`,{id:`${l}-name`,className:V.input,value:u.name,onChange:e=>N(`name`,e.target.value),disabled:r})]}):null,c.supportsApiKey?(0,I.jsxs)(`div`,{className:V.field,children:[(0,I.jsx)(`label`,{className:V.label,htmlFor:`${l}-apiKey`,children:s(`providersPage.form.apiKey`)}),(0,I.jsxs)(`div`,{className:V.passwordField,children:[(0,I.jsx)(`input`,{id:`${l}-apiKey`,className:V.passwordInput,type:_?`text`:`password`,value:u.apiKey,onChange:e=>N(`apiKey`,e.target.value),autoComplete:`new-password`,"data-1p-ignore":`true`,"data-lpignore":`true`,"data-bwignore":`true`,placeholder:s(n===`edit`?`providersPage.form.apiKeyEditPlaceholder`:`providersPage.form.apiKeyCreatePlaceholder`),disabled:r}),(0,I.jsx)(`button`,{type:`button`,className:V.passwordToggle,onClick:()=>v(e=>!e),disabled:r,"aria-label":s(_?`providersPage.form.hideApiKey`:`providersPage.form.showApiKey`),title:s(_?`providersPage.form.hideApiKey`:`providersPage.form.showApiKey`),children:_?(0,I.jsx)(js,{size:16}):(0,I.jsx)(As,{size:16})})]})]}):null,c.supportsBaseUrl?(0,I.jsxs)(`div`,{className:V.field,children:[(0,I.jsxs)(`label`,{className:V.label,htmlFor:`${l}-baseUrl`,children:[s(`providersPage.form.baseUrl`),c.baseUrlRequired?(0,I.jsxs)(`span`,{className:V.labelHint,children:[` `,`· `,s(`providersPage.form.baseUrlRequiredHint`)]}):null]}),(0,I.jsx)(`input`,{id:`${l}-baseUrl`,className:V.input,value:u.baseUrl,onChange:e=>N(`baseUrl`,e.target.value),placeholder:`https://api.example.com`,disabled:r})]}):null,c.supportsProxyUrl?(0,I.jsxs)(`div`,{className:V.field,children:[(0,I.jsx)(`label`,{className:V.label,htmlFor:`${l}-proxy`,children:s(`providersPage.form.proxyUrl`)}),(0,I.jsx)(`input`,{id:`${l}-proxy`,className:V.input,value:u.proxyUrl,onChange:e=>N(`proxyUrl`,e.target.value),placeholder:`http://127.0.0.1:7890`,disabled:r})]}):null,c.supportsPrefix?(0,I.jsxs)(`div`,{className:V.fieldRow,children:[(0,I.jsxs)(`div`,{className:V.field,children:[(0,I.jsx)(`label`,{className:V.label,htmlFor:`${l}-prefix`,children:s(`providersPage.form.prefix`)}),(0,I.jsx)(`input`,{id:`${l}-prefix`,className:V.input,value:u.prefix,onChange:e=>N(`prefix`,e.target.value),disabled:r})]}),c.supportsPriority?(0,I.jsxs)(`div`,{className:V.field,children:[(0,I.jsx)(`label`,{className:V.label,htmlFor:`${l}-prio`,children:s(`providersPage.form.priority`)}),(0,I.jsx)(`input`,{id:`${l}-prio`,type:`number`,className:V.input,value:u.priority??``,onChange:e=>N(`priority`,e.target.value===``?void 0:Number(e.target.value)),disabled:r})]}):null]}):null,c.supportsTestModel?(0,I.jsxs)(`div`,{className:V.field,children:[(0,I.jsxs)(`label`,{className:V.label,htmlFor:`${l}-testModel`,children:[s(`providersPage.form.testModel`),e===`codex`||e===`claude`||e===`gemini`?(0,I.jsxs)(`span`,{className:V.labelHint,children:[` `,`· `,s(`providersPage.form.testModelClaudeHint`)]}):null]}),(0,I.jsx)(nc,{id:`${l}-testModel`,value:u.testModel??``,options:A,onChange:e=>N(`testModel`,e),disabled:r,ariaLabel:s(`providersPage.form.testModel`)}),ce?(0,I.jsxs)(`div`,{className:V.connectivityRow,children:[(0,I.jsxs)(`button`,{type:`button`,className:V.connectivityBtn,disabled:r||T.isTestingAny,onClick:()=>void ce.run(),children:[ce.status.state===`loading`?(0,I.jsx)(`span`,{className:`${V.statusIcon} ${V.statusIconLoading}`,children:(0,I.jsx)(Cs,{size:14})}):null,(0,I.jsx)(`span`,{children:s(`providersPage.connectivity.test`)})]}),(0,I.jsx)(rb,{state:ce.status.state}),ce.status.state===`success`?(0,I.jsx)(`span`,{className:V.connectivityHintSuccess,children:s(`providersPage.connectivity.success`)}):null]}):null,ce?.status.state===`error`?(0,I.jsx)(`div`,{className:V.connectivityError,children:ce.status.message}):null]}):null,c.supportsWebsockets?(0,I.jsxs)(`label`,{className:V.checkboxRow,children:[(0,I.jsx)(`input`,{type:`checkbox`,className:V.checkboxBox,checked:u.websockets??!1,disabled:r,onChange:e=>N(`websockets`,e.target.checked)}),(0,I.jsx)(`span`,{className:V.checkboxText,children:(0,I.jsx)(`span`,{children:s(`providersPage.form.websockets`)})})]}):null,c.supportsDisabled?(0,I.jsxs)(`label`,{className:V.checkboxRow,children:[(0,I.jsx)(`input`,{type:`checkbox`,className:V.checkboxBox,checked:u.disabled,disabled:r,onChange:e=>N(`disabled`,e.target.checked)}),(0,I.jsxs)(`span`,{className:V.checkboxText,children:[(0,I.jsx)(`span`,{children:s(`providersPage.form.disabled`)}),(0,I.jsx)(`small`,{children:s(`providersPage.form.disabledHint`)})]})]}):null,oe?(0,I.jsxs)(`label`,{className:V.checkboxRow,children:[(0,I.jsx)(`input`,{type:`checkbox`,className:V.checkboxBox,checked:u.disableCooling??!1,disabled:r,onChange:e=>N(`disableCooling`,e.target.checked)}),(0,I.jsxs)(`span`,{className:V.checkboxText,children:[(0,I.jsx)(`span`,{children:s(`providersPage.form.disableCooling`)}),(0,I.jsx)(`small`,{children:s(`providersPage.form.disableCoolingHint`)})]})]}):null]}),c.supportsApiKeyEntries&&u.apiKeyEntries?(0,I.jsx)(zy,{label:s(`providersPage.form.apiKeyEntriesSection`),hint:`${ie.filter(e=>e.apiKey.trim()||e.existingApiKey?.trim()).length}`,defaultOpen:!0,children:(0,I.jsxs)(`div`,{className:V.entriesList,children:[(0,I.jsxs)(`div`,{className:`${V.entriesToolbar} ${V.entriesToolbarSplit}`,children:[(0,I.jsxs)(`button`,{type:`button`,className:V.addBtn,disabled:r,onClick:()=>N(`apiKeyEntries`,[...ae,$y()]),children:[(0,I.jsx)(vs,{size:12}),(0,I.jsx)(`span`,{children:s(`providersPage.form.addApiKeyEntry`)})]}),(0,I.jsxs)(`button`,{type:`button`,className:V.connectivityBtn,disabled:r||T.isTestingAny,onClick:()=>void T.runOpenAIAllKeys(),children:[T.isTestingAny?(0,I.jsx)(`span`,{className:`${V.statusIcon} ${V.statusIconLoading}`,children:(0,I.jsx)(Cs,{size:14})}):null,(0,I.jsx)(`span`,{children:s(`providersPage.connectivity.testAll`)})]})]}),[...ie].reverse().map((e,t)=>{let n=ie.length-1-t,i=T.openaiStatuses[n]??{state:`idle`,message:``};return(0,I.jsxs)(`div`,{className:V.entryCard,children:[(0,I.jsxs)(`div`,{className:V.entryCardHeader,children:[(0,I.jsx)(`span`,{children:s(`providersPage.form.apiKeyEntry`,{index:n+1})}),(0,I.jsxs)(`div`,{className:V.entryCardHeaderRight,children:[(0,I.jsx)(rb,{state:i.state}),(0,I.jsxs)(`button`,{type:`button`,className:V.connectivityBtnGhost,disabled:r||i.state===`loading`,onClick:()=>void T.runOpenAIKey(n),children:[i.state===`loading`?(0,I.jsx)(`span`,{className:`${V.statusIcon} ${V.statusIconLoading}`,children:(0,I.jsx)(Cs,{size:14})}):null,(0,I.jsx)(`span`,{children:s(`providersPage.connectivity.test`)})]}),(0,I.jsx)(`button`,{type:`button`,className:V.removeBtn,disabled:r||ae.length===0,onClick:()=>le(n),children:(0,I.jsx)(Os,{size:12})})]})]}),(0,I.jsxs)(`div`,{className:V.field,children:[(0,I.jsx)(`label`,{className:V.label,children:s(`providersPage.form.apiKey`)}),(0,I.jsxs)(`div`,{className:V.passwordField,children:[(0,I.jsx)(`input`,{className:V.passwordInput,type:h.has(n)?`text`:`password`,value:e.apiKey,onChange:e=>N(`apiKeyEntries`,ie.map((t,r)=>r===n?{...t,apiKey:e.target.value}:t)),autoComplete:`new-password`,"data-1p-ignore":`true`,"data-lpignore":`true`,"data-bwignore":`true`,disabled:r,placeholder:e.existingApiKey?s(`providersPage.form.apiKeyEditPlaceholder`):s(`providersPage.form.apiKeyCreatePlaceholder`)}),(0,I.jsx)(`button`,{type:`button`,className:V.passwordToggle,onClick:()=>b(n),disabled:r,"aria-label":h.has(n)?s(`providersPage.form.hideApiKey`):s(`providersPage.form.showApiKey`),title:h.has(n)?s(`providersPage.form.hideApiKey`):s(`providersPage.form.showApiKey`),children:h.has(n)?(0,I.jsx)(js,{size:16}):(0,I.jsx)(As,{size:16})})]})]}),(0,I.jsxs)(`div`,{className:V.field,children:[(0,I.jsx)(`label`,{className:V.label,children:s(`providersPage.form.proxyUrl`)}),(0,I.jsx)(`input`,{className:V.input,value:e.proxyUrl,onChange:e=>N(`apiKeyEntries`,ie.map((t,r)=>r===n?{...t,proxyUrl:e.target.value}:t)),disabled:r,placeholder:`http://127.0.0.1:7890`})]}),i.state===`error`?(0,I.jsx)(`div`,{className:V.connectivityError,children:i.message}):null]},n)})]})}):null,c.supportsHeaders?(0,I.jsx)(zy,{label:s(`providersPage.form.headersSection`),children:(0,I.jsxs)(`div`,{className:V.entriesList,children:[ne.map((e,t)=>(0,I.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr auto`,gap:8},children:[(0,I.jsx)(`input`,{className:V.input,placeholder:`X-Custom-Header`,value:e.key,onChange:e=>N(`headers`,ne.map((n,r)=>r===t?{...n,key:e.target.value}:n)),disabled:r}),(0,I.jsx)(`input`,{className:V.input,placeholder:`value`,value:e.value,onChange:e=>N(`headers`,ne.map((n,r)=>r===t?{...n,value:e.target.value}:n)),disabled:r}),(0,I.jsx)(`button`,{type:`button`,className:V.removeBtn,disabled:r||ne.length<=1,onClick:()=>N(`headers`,ne.filter((e,n)=>n!==t)),children:(0,I.jsx)(Os,{size:12})})]},t)),(0,I.jsxs)(`button`,{type:`button`,className:V.addBtn,disabled:r,onClick:()=>N(`headers`,[...ne,Zy()]),children:[(0,I.jsx)(vs,{size:12}),(0,I.jsx)(`span`,{children:s(`providersPage.form.addHeader`)})]})]})}):null,c.supportsModels?(0,I.jsx)(zy,{label:s(`providersPage.form.modelsSection`),children:(0,I.jsxs)(`div`,{className:V.entriesList,children:[E.available?(0,I.jsx)(`div`,{className:V.entriesToolbar,children:(0,I.jsxs)(`button`,{type:`button`,className:V.connectivityBtn,onClick:ee,disabled:r,children:[(0,I.jsx)(ms,{size:14}),(0,I.jsx)(`span`,{children:s(`providersPage.discovery.openButton`)})]})}):null,E.available&&D?(0,I.jsx)(Xy,{loading:E.loading,error:E.error,models:E.models,hasFetched:E.hasFetched,existingNames:k,mutating:r,onApply:e=>{M(e)},onReload:()=>void E.fetch(),onClose:j}):null,re.map((e,t)=>se?(0,I.jsxs)(`div`,{className:V.entryCard,children:[(0,I.jsxs)(`div`,{className:V.entryCardHeader,children:[(0,I.jsx)(`span`,{children:s(`providersPage.form.modelEntry`,{index:t+1})}),(0,I.jsx)(`button`,{type:`button`,className:V.removeBtn,disabled:r||re.length<=1,onClick:()=>de(t),children:(0,I.jsx)(Os,{size:12})})]}),(0,I.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr`,gap:8},children:[(0,I.jsx)(`input`,{className:V.input,placeholder:`model-name`,value:e.name,onChange:e=>ue(t,{name:e.target.value}),disabled:r}),(0,I.jsx)(`input`,{className:V.input,placeholder:`alias (optional)`,value:e.alias??``,onChange:e=>ue(t,{alias:e.target.value}),disabled:r})]}),(0,I.jsxs)(`label`,{className:V.checkboxRow,children:[(0,I.jsx)(`input`,{type:`checkbox`,className:V.checkboxBox,checked:e.image===!0,disabled:r,onChange:e=>ue(t,{image:e.target.checked})}),(0,I.jsxs)(`span`,{className:V.checkboxText,children:[(0,I.jsx)(`span`,{children:s(`providersPage.form.modelImage`)}),(0,I.jsx)(`small`,{children:s(`providersPage.form.modelImageHint`)})]})]}),(0,I.jsxs)(`div`,{className:V.field,children:[(0,I.jsxs)(`label`,{className:V.label,children:[s(`providersPage.form.thinkingConfig`),(0,I.jsxs)(`span`,{className:V.labelHint,children:[` `,`· `,s(`providersPage.form.thinkingConfigHint`)]})]}),(0,I.jsx)(`textarea`,{className:V.textarea,rows:4,value:e.thinkingJson??``,onChange:e=>ue(t,{thinkingJson:e.target.value}),disabled:r,placeholder:`{"levels":["low","medium","high"]}`})]})]},t):(0,I.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr auto`,gap:8},children:[(0,I.jsx)(`input`,{className:V.input,placeholder:`model-name`,value:e.name,onChange:e=>ue(t,{name:e.target.value}),disabled:r}),(0,I.jsx)(`input`,{className:V.input,placeholder:`alias (optional)`,value:e.alias??``,onChange:e=>ue(t,{alias:e.target.value}),disabled:r}),(0,I.jsx)(`button`,{type:`button`,className:V.removeBtn,disabled:r||re.length<=1,onClick:()=>de(t),children:(0,I.jsx)(Os,{size:12})})]},t)),(0,I.jsxs)(`button`,{type:`button`,className:V.addBtn,disabled:r,onClick:()=>N(`models`,[...re,Qy()]),children:[(0,I.jsx)(vs,{size:12}),(0,I.jsx)(`span`,{children:s(`providersPage.form.addModel`)})]})]})}):null,c.supportsExcludedModels?(0,I.jsx)(zy,{label:s(`providersPage.form.excludedSection`),children:(0,I.jsxs)(`div`,{className:V.field,children:[(0,I.jsx)(`span`,{className:V.labelHint,children:s(`providersPage.form.excludedHint`)}),(0,I.jsx)(`textarea`,{className:V.textarea,rows:4,value:u.excludedModelsText,onChange:e=>N(`excludedModelsText`,e.target.value),disabled:r,placeholder:`model-1
|
||
model-2`})]})}):null,c.supportsCloak&&u.cloak?(0,I.jsx)(zy,{label:s(`providersPage.form.cloakSection`),children:(0,I.jsxs)(`div`,{className:V.section,children:[(0,I.jsxs)(`div`,{className:V.field,children:[(0,I.jsx)(`label`,{className:V.label,children:s(`providersPage.form.cloakMode`)}),(0,I.jsx)(`input`,{className:V.input,value:u.cloak.mode,onChange:e=>te(`mode`,e.target.value),placeholder:`auto / always / never`,disabled:r})]}),(0,I.jsxs)(`label`,{className:V.checkboxRow,children:[(0,I.jsx)(`input`,{type:`checkbox`,className:V.checkboxBox,checked:u.cloak.strictMode,disabled:r,onChange:e=>te(`strictMode`,e.target.checked)}),(0,I.jsx)(`span`,{className:V.checkboxText,children:(0,I.jsx)(`span`,{children:s(`providersPage.form.cloakStrict`)})})]}),(0,I.jsxs)(`label`,{className:V.checkboxRow,children:[(0,I.jsx)(`input`,{type:`checkbox`,className:V.checkboxBox,checked:u.cloak.cacheUserId,disabled:r,onChange:e=>te(`cacheUserId`,e.target.checked)}),(0,I.jsxs)(`span`,{className:V.checkboxText,children:[(0,I.jsx)(`span`,{children:s(`providersPage.form.cloakCacheUserId`)}),(0,I.jsx)(`small`,{children:s(`providersPage.form.cloakCacheUserIdHint`)})]})]}),(0,I.jsxs)(`label`,{className:V.checkboxRow,children:[(0,I.jsx)(`input`,{type:`checkbox`,className:V.checkboxBox,checked:u.experimentalCchSigning??!1,disabled:r,onChange:e=>N(`experimentalCchSigning`,e.target.checked)}),(0,I.jsxs)(`span`,{className:V.checkboxText,children:[(0,I.jsx)(`span`,{children:s(`providersPage.form.experimentalCchSigning`)}),(0,I.jsx)(`small`,{children:s(`providersPage.form.experimentalCchSigningHint`)})]})]}),(0,I.jsxs)(`div`,{className:V.field,children:[(0,I.jsx)(`label`,{className:V.label,children:s(`providersPage.form.cloakSensitiveWords`)}),(0,I.jsx)(`textarea`,{className:V.textarea,rows:3,value:u.cloak.sensitiveWordsText,onChange:e=>te(`sensitiveWordsText`,e.target.value),disabled:r})]})]})}):null,p?(0,I.jsx)(`div`,{className:V.errorBox,children:p}):null]})}function ab({resource:e,usageByProvider:t}){let{t:n}=Xo(),r=[[`identifier`,e.identifier],[`baseUrl`,e.baseUrl??n(`providersPage.status.notSet`)],[`proxyUrl`,e.proxyUrl??n(`providersPage.status.notSet`)],[`prefix`,e.prefix??n(`providersPage.status.none`)],[`models`,String(e.modelCount)],[`headers`,String(e.headerCount)]],i=[[`authIndex`,e.authIndex??n(`providersPage.status.notSet`)],[`excludedModels`,String(e.excludedModelCount)],[`apiKeyEntries`,String(e.apiKeyEntryCount)]],a=e.brand===`openaiCompatibility`?e.raw:null,o=a?.apiKeyEntries??[];return(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:V.detailHeader,children:(0,I.jsx)(`div`,{className:V.sectionTitle,children:e.name??e.identifier})}),(0,I.jsx)(`dl`,{className:V.dl,children:r.map(([e,t])=>(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{className:V.dt,children:n(`providersPage.detail.fields.${e}`)}),(0,I.jsx)(`dd`,{className:V.dd,children:t})]},e))}),a&&o.length>0?(0,I.jsxs)(`div`,{className:V.apiKeyEntriesSection,children:[(0,I.jsxs)(`div`,{className:V.apiKeyEntriesLabel,children:[n(`providersPage.form.apiKeyEntriesSection`),`: `,o.length]}),(0,I.jsx)(`div`,{className:V.apiKeyEntryList,children:o.map((e,n)=>{let r=t?Gv(t,a.name,e.apiKey,a.baseUrl):{success:0,failure:0};return(0,I.jsxs)(`div`,{className:V.apiKeyEntryCard,children:[(0,I.jsx)(`span`,{className:V.apiKeyEntryIndex,children:n+1}),(0,I.jsx)(`span`,{className:V.apiKeyEntryKey,children:q_(e.apiKey)}),e.proxyUrl?(0,I.jsx)(`span`,{className:V.apiKeyEntryProxy,children:e.proxyUrl}):null,(0,I.jsxs)(`div`,{className:V.apiKeyEntryStats,children:[(0,I.jsxs)(`span`,{className:`${V.apiKeyEntryStat} ${V.apiKeyEntryStatSuccess}`,children:[(0,I.jsx)(ks,{size:12}),` `,r.success]}),(0,I.jsxs)(`span`,{className:`${V.apiKeyEntryStat} ${V.apiKeyEntryStatFailure}`,children:[(0,I.jsx)(Os,{size:12}),` `,r.failure]})]})]},`${e.apiKey}-${n}`)})})]}):null,(0,I.jsx)(`div`,{style:{marginTop:16},children:(0,I.jsx)(zy,{label:n(`providersPage.detail.metadataTitle`),children:(0,I.jsx)(`dl`,{className:V.dl,children:i.map(([e,t])=>(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{className:V.dt,children:n(`providersPage.detail.fields.${e}`)}),(0,I.jsx)(`dd`,{className:V.dd,children:t})]},e))})})})]})}function ob({state:e,onClose:t,onSwitchToEdit:n,workbench:r,onCreated:i,onUpdated:a,mutationDisabled:o=!1,usageByProvider:s,ref:c}){let{t:l}=Xo(),{showConfirmation:u}=Fc(),d=(0,y.useId)(),[f,p]=(0,y.useState)(!1),[m,h]=(0,y.useState)(!1);(0,y.useEffect)(()=>{h(!1)},[e.brand,e.mode,e.resource?.id,e.open]);let g=(0,y.useCallback)(e=>{h(e)},[]),_=Iy[e.brand],v=e.mode===`create`||e.mode===`edit`,b=f||o,x=b||e.mode===`edit`&&!m,S=(0,y.useCallback)(()=>!v||!m||f?Promise.resolve(!0):new Promise(e=>{u({title:l(`providersPage.unsavedChanges.title`),message:l(`providersPage.unsavedChanges.message`),variant:`danger`,confirmText:l(`providersPage.unsavedChanges.discard`),cancelText:l(`providersPage.unsavedChanges.keepEditing`),onConfirm:()=>e(!0),onCancel:()=>e(!1)})}),[m,v,u,f,l]);(0,y.useImperativeHandle)(c,()=>({confirmDiscardIfDirty:S}),[S]);let C=(0,y.useCallback)(()=>{S().then(e=>{e&&t()})},[S,t]),w=e.mode===`create`?`${l(`providersPage.form.createEyebrow`)} · ${l(`providersPage.providerNames.${e.brand}`)}`:e.mode===`edit`?`${l(`providersPage.form.editEyebrow`)} · ${l(`providersPage.providerNames.${e.brand}`)}`:`${l(`providersPage.detail.title`)} · ${l(`providersPage.providerNames.${e.brand}`)}`,T=(0,y.useCallback)(async t=>{if(!o){p(!0);try{await r.createProvider(e.brand,t),i()}finally{p(!1)}}},[o,i,e.brand,r]),E=(0,y.useCallback)(async t=>{if(!(!e.resource||o||!m)){p(!0);try{await r.updateProvider(e.resource,t),a()}finally{p(!1)}}},[m,o,a,e.resource,r]),D=()=>{if(e.mode===`detail`)return e.resource?(0,I.jsx)(ab,{resource:e.resource,usageByProvider:s}):null;let t=`${e.brand}:${e.resource?.id??`new`}:${e.mode}`;return(0,I.jsx)(ib,{brand:e.brand,resource:e.resource,mode:e.mode,mutating:b,formId:d,onSubmit:e.mode===`create`?T:E,onDirtyChange:g},t)},O=e.mode===`detail`?e.resource&&!e.resource.flags.isPlaceholder?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`button`,{type:`button`,className:`${V.footerBtn} ${V.footerBtnGhost}`,onClick:t,children:l(`providersPage.actions.cancel`)}),(0,I.jsxs)(`button`,{type:`button`,className:`${V.footerBtn} ${V.footerBtnPrimary}`,onClick:n,disabled:b,children:[(0,I.jsx)(ys,{size:14}),l(`providersPage.actions.edit`)]})]}):(0,I.jsx)(`button`,{type:`button`,className:`${V.footerBtn} ${V.footerBtnPrimary}`,onClick:t,children:l(`providersPage.actions.cancel`)}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`button`,{type:`button`,className:`${V.footerBtn} ${V.footerBtnGhost}`,onClick:C,disabled:f,children:l(`providersPage.actions.cancel`)}),(0,I.jsxs)(`button`,{type:`submit`,form:d,className:`${V.footerBtn} ${V.footerBtnPrimary}`,disabled:x,children:[f?(0,I.jsx)(Cs,{size:14}):null,e.mode===`create`?l(`providersPage.actions.create`):l(`providersPage.actions.save`)]})]});return(0,I.jsx)(Fy,{open:e.open,onClose:t,size:_.sheetSize,eyebrow:e.mode===`detail`?l(`providersPage.detail.title`):e.mode===`create`?l(`providersPage.form.createEyebrow`):l(`providersPage.form.editEyebrow`),title:w,description:l(`providersPage.table.description`,{route:`/ai-providers/${e.brand===`openaiCompatibility`?`openai`:e.brand}`}),footer:O,closeDisabled:f,confirmClose:S,children:D()})}var sb=e=>e?Object.keys(e).length:0,cb=e=>{let t=new Set;return(e??[]).forEach(e=>{let n=(e?.name??``).trim();n&&t.add(n)}),Array.from(t)},lb=e=>typeof e==`number`&&Number.isFinite(e)?e:0,ub=(e,t,n)=>`${e}:${t}:${n||`item`}`,db=e=>{let t=String(e??``).trim();return t?t.length<=12?t:t.slice(0,8):``};function fb(e,t,n){let r=t.apiKey??``,i=Av(t.excludedModels),a={};e===`codex`&&(a.websockets=t.websockets===!0),e===`claude`&&(a.cloakEnabled=!!t.cloak?.mode?.trim());let o={brand:e,apiKey:r,baseUrl:t.baseUrl,index:n};return{id:ub(e,n,db(r)),brand:e,originalIndex:n,name:null,identifier:q_(r)||`#${n+1}`,apiKeyPreview:r?q_(r):null,apiKey:r||null,authIndex:t.authIndex??null,baseUrl:t.baseUrl??null,proxyUrl:t.proxyUrl??null,prefix:t.prefix??null,modelCount:t.models?.length??0,models:cb(t.models),priority:lb(t.priority),headerCount:sb(t.headers),excludedModelCount:jv(t.excludedModels).length,apiKeyEntryCount:0,disabled:i,flags:a,selector:o,raw:t}}function pb(e,t){return fb(`gemini`,e,t)}function mb(e,t){return fb(`codex`,e,t)}function hb(e,t){return fb(`claude`,e,t)}function gb(e,t){return fb(`vertex`,e,t)}function _b(e,t){let n=(e.name??``).trim(),r=e.apiKeyEntries?.[0],i=r?.apiKey?q_(r.apiKey):null;return{id:ub(`openaiCompatibility`,t,db(n)||`#${t}`),brand:`openaiCompatibility`,originalIndex:t,name:n||null,identifier:n||`#${t+1}`,apiKeyPreview:i,apiKey:null,authIndex:e.authIndex??null,baseUrl:e.baseUrl??null,proxyUrl:null,prefix:e.prefix??null,modelCount:e.models?.length??0,models:cb(e.models),priority:lb(e.priority),headerCount:sb(e.headers),excludedModelCount:0,apiKeyEntryCount:e.apiKeyEntries?.length??0,disabled:e.disabled===!0,flags:{},selector:{brand:`openaiCompatibility`,name:n,index:t},raw:e}}var vb=e=>e.split(/[\n,]+/).map(e=>e.trim()).filter(Boolean),yb=e=>{let t={};return e.forEach(e=>{let n=e.key.trim();n&&(t[n]=e.value)}),t},bb=e=>{let t=(e??``).trim();if(!t)return;let n=JSON.parse(t);if(!n||typeof n!=`object`||Array.isArray(n))throw Error(`Thinking config must be a JSON object`);return n},xb=(e,t,n)=>{let r=vb(e).filter(e=>e!==`*`);return n===`openaiCompatibility`?r.length?r:void 0:t?Mv(r):r.length?r:void 0},Sb=(e,t,n)=>{let r=yb(t.headers),i=t.models.map(e=>({name:e.name.trim(),alias:e.alias?.trim()||void 0,priority:e.priority,testModel:e.testModel})).filter(e=>e.name),a=xb(t.excludedModelsText,t.disabled,e),o={apiKey:t.apiKey.trim().length>0?t.apiKey.trim():n?.apiKey??``,priority:t.priority,prefix:t.prefix.trim()||void 0,baseUrl:t.baseUrl.trim()||void 0,proxyUrl:t.proxyUrl.trim()||void 0,models:i.length?i:void 0,headers:Object.keys(r).length?r:void 0,excludedModels:a,disableCooling:t.disableCooling===!0,authIndex:n?.authIndex};return e===`codex`&&t.websockets!==void 0&&(o.websockets=t.websockets),e===`claude`&&t.cloak&&(o.cloak={mode:t.cloak.mode.trim()||void 0,strictMode:t.cloak.strictMode,sensitiveWords:vb(t.cloak.sensitiveWordsText),cacheUserId:t.cloak.cacheUserId===!0}),e===`claude`&&(o.experimentalCchSigning=t.experimentalCchSigning===!0),o},Cb=(e,t)=>{let n=yb(e.headers),r=e.models.map(e=>({name:e.name.trim(),alias:e.alias?.trim()||void 0,priority:e.priority,testModel:e.testModel,image:e.image===!0,thinking:bb(e.thinkingJson)})).filter(e=>e.name),i=e.apiKeyEntries?.map((e,n)=>{let r=e.existingApiKey?.trim()||t?.apiKeyEntries?.[n]?.apiKey?.trim()||``;return{apiKey:e.apiKey.trim()||r,proxyUrl:e.proxyUrl.trim()||void 0,authIndex:e.authIndex?.trim()||void 0}}).filter(e=>e.apiKey)??[];return{...t??{},name:e.name.trim(),baseUrl:e.baseUrl.trim(),prefix:e.prefix.trim()||void 0,apiKeyEntries:i,disabled:e.disabled,disableCooling:e.disableCooling===!0,headers:Object.keys(n).length?n:void 0,models:r.length?r:void 0,priority:e.priority,testModel:e.testModel?.trim()||void 0}};function wb(){let e=mp(e=>e.connectionStatus),t=Uf(e=>e.config),n=Uf(e=>e.fetchConfig),r=Uf(e=>e.updateConfigValue),i=Uf(e=>e.isCacheValid),[a,o]=(0,y.useState)(()=>!i()),[s,c]=(0,y.useState)(!1),[l,u]=(0,y.useState)(null),[d,f]=(0,y.useState)(!1),[p,m]=(0,y.useState)(()=>new Date().toISOString()),h=(0,y.useRef)(!1),g=e===`connected`,_=(0,y.useCallback)(async()=>{c(!0),u(null);try{let[e,t,i]=await Promise.allSettled([n(void 0,!0),Rg.getVertexConfigs(),Rg.getOpenAIProviders()]);if(e.status!==`fulfilled`)throw e.reason;t.status===`fulfilled`&&r(`vertex-api-key`,t.value||[]),i.status===`fulfilled`&&r(`openai-compatibility`,i.value||[]),m(new Date().toISOString())}catch(e){u(pc(e)||`Failed to load providers`)}finally{o(!1),c(!1)}},[n,r]),v=(0,y.useCallback)(()=>{m(new Date().toISOString())},[]);(0,y.useEffect)(()=>{h.current||g&&(h.current=!0,_().catch(()=>{}))},[g,_]);let b=(0,y.useMemo)(()=>t?{fetchedAt:p,groups:Ly.map(e=>{let n=[];switch(e){case`gemini`:n=(t.geminiApiKeys??[]).map((e,t)=>pb(e,t));break;case`codex`:n=(t.codexApiKeys??[]).map((e,t)=>mb(e,t));break;case`claude`:n=(t.claudeApiKeys??[]).map((e,t)=>hb(e,t));break;case`vertex`:n=(t.vertexApiKeys??[]).map((e,t)=>gb(e,t));break;case`openaiCompatibility`:n=(t.openaiCompatibility??[]).map((e,t)=>_b(e,t));break}return{id:e,resources:n}})}:null,[t,p]),x=(0,y.useCallback)(async e=>{await Rg.saveGeminiKeys(e),r(`gemini-api-key`,e)},[r]),S=(0,y.useCallback)(async e=>{await Rg.saveCodexConfigs(e),r(`codex-api-key`,e)},[r]),C=(0,y.useCallback)(async e=>{await Rg.saveClaudeConfigs(e),r(`claude-api-key`,e)},[r]),w=(0,y.useCallback)(async e=>{await Rg.saveVertexConfigs(e),r(`vertex-api-key`,e)},[r]),T=(0,y.useCallback)(async e=>{await Rg.saveOpenAIProviders(e),r(`openai-compatibility`,e)},[r]),E=(0,y.useCallback)(async(e,n)=>{f(!0);try{if(e===`gemini`){let e=[...t?.geminiApiKeys??[]];e.push(Sb(`gemini`,n)),await x(e)}else if(e===`codex`){let e=[...t?.codexApiKeys??[]];e.push(Sb(`codex`,n)),await S(e)}else if(e===`claude`){let e=[...t?.claudeApiKeys??[]];e.push(Sb(`claude`,n)),await C(e)}else if(e===`vertex`){let e=[...t?.vertexApiKeys??[]];e.push(Sb(`vertex`,n)),await w(e)}else if(e===`openaiCompatibility`){let e=[...t?.openaiCompatibility??[]];e.push(Cb(n)),await T(e)}v()}finally{f(!1)}},[t,C,S,x,T,w,v]),D=(0,y.useCallback)(async(e,n)=>{f(!0);try{let r=e.brand,i=e.originalIndex;if(r===`gemini`){let e=[...t?.geminiApiKeys??[]],r=e[i];e[i]=Sb(`gemini`,n,r),await x(e)}else if(r===`codex`){let e=[...t?.codexApiKeys??[]],r=e[i];e[i]=Sb(`codex`,n,r),await S(e)}else if(r===`claude`){let e=[...t?.claudeApiKeys??[]],r=e[i];e[i]=Sb(`claude`,n,r),await C(e)}else if(r===`vertex`){let e=[...t?.vertexApiKeys??[]],r=e[i];e[i]=Sb(`vertex`,n,r),await w(e)}else if(r===`openaiCompatibility`){let e=[...t?.openaiCompatibility??[]],r=e[i];e[i]=Cb(n,r),await T(e)}v()}finally{f(!1)}},[t,C,S,x,T,w,v]),O=(0,y.useCallback)(async e=>{f(!0);try{let n=e.selector;n.brand===`gemini`?(await Rg.deleteGeminiKey(n.apiKey,n.baseUrl),r(`gemini-api-key`,(t?.geminiApiKeys??[]).filter((e,t)=>t!==n.index))):n.brand===`codex`?(await Rg.deleteCodexConfig(n.apiKey,n.baseUrl),r(`codex-api-key`,(t?.codexApiKeys??[]).filter((e,t)=>t!==n.index))):n.brand===`claude`?(await Rg.deleteClaudeConfig(n.apiKey,n.baseUrl),r(`claude-api-key`,(t?.claudeApiKeys??[]).filter((e,t)=>t!==n.index))):n.brand===`vertex`?(await Rg.deleteVertexConfig(n.apiKey,n.baseUrl),r(`vertex-api-key`,(t?.vertexApiKeys??[]).filter((e,t)=>t!==n.index))):n.brand===`openaiCompatibility`&&(await Rg.deleteOpenAIProvider(n.index),r(`openai-compatibility`,(t?.openaiCompatibility??[]).filter((e,t)=>t!==n.index))),v()}finally{f(!1)}},[t,v,r]),k=(0,y.useCallback)(async(e,n)=>{f(!0);try{let i=e.brand,a=e.originalIndex;if(i===`gemini`){let e=[...t?.geminiApiKeys??[]],r=e[a];if(!r)return;let i=n?Mv(r.excludedModels):Nv(r.excludedModels);e[a]={...r,excludedModels:i},await x(e)}else if(i===`codex`||i===`claude`||i===`vertex`){let e=[...t?.[i===`codex`?`codexApiKeys`:i===`claude`?`claudeApiKeys`:`vertexApiKeys`]??[]],r=e[a];if(!r)return;let o=n?Mv(r.excludedModels):Nv(r.excludedModels);e[a]={...r,excludedModels:o},i===`codex`?await S(e):i===`claude`?await C(e):await w(e)}else if(i===`openaiCompatibility`){await Rg.updateOpenAIProviderDisabled(a,n);let e=[...t?.openaiCompatibility??[]],i=e[a];i&&(e[a]={...i,disabled:n},r(`openai-compatibility`,e))}v()}finally{f(!1)}},[t,C,S,x,w,v,r]);return{connected:g,isPending:a,isFetching:s,isError:!!l,errorMessage:l,snapshot:b,refetch:_,createProvider:E,updateProvider:D,deleteProvider:O,toggleDisabled:k,mutating:d,refreshSnapshot:v}}var Tb=[`name`,`priority`,`recent-success`],Eb=[`asc`,`desc`],Db=`providersPage.uiState`,Ob=`gemini`,kb={filter:``,sortBy:`name`,sortDir:`asc`,selectedModels:[]},Ab=new Set(Ly),jb=new Set(Tb),Mb=new Set(Eb),Nb=e=>typeof e==`string`&&Ab.has(e),Pb=e=>typeof e==`string`&&jb.has(e),Fb=e=>typeof e==`string`&&Mb.has(e),Ib=e=>{if(!Array.isArray(e))return[];let t=new Set;return e.forEach(e=>{if(typeof e!=`string`)return;let n=e.trim();n&&t.add(n)}),Array.from(t)},Lb=e=>fc(e)?{filter:typeof e.filter==`string`?e.filter:``,sortBy:Pb(e.sortBy)?e.sortBy:`name`,sortDir:Fb(e.sortDir)?e.sortDir:`asc`,selectedModels:Ib(e.selectedModels)}:{...kb},Rb=()=>({activeBrand:Ob,filtersByBrand:{}}),zb=(e,t)=>e.filtersByBrand[t]??kb,Bb=()=>{if(typeof window>`u`)return Rb();try{let e=window.localStorage.getItem(Db);if(!e)return Rb();let t=JSON.parse(e);if(!fc(t))return Rb();let n=fc(t.filtersByBrand)?t.filtersByBrand:{},r={};return Ly.forEach(e=>{let t=n[e];t!==void 0&&(r[e]=Lb(t))}),{activeBrand:Nb(t.activeBrand)?t.activeBrand:Ob,filtersByBrand:r}}catch{return Rb()}},Vb=e=>{if(!(typeof window>`u`))try{window.localStorage.setItem(Db,JSON.stringify(e))}catch{}},Hb={page:`ProvidersWorkbenchPage-module__page___b5s-a`,layout:`ProvidersWorkbenchPage-module__layout___MCNil`,modelCatalogSlot:`ProvidersWorkbenchPage-module__modelCatalogSlot___bAD6H`},Ub=(e,t)=>{try{let n=new Date(e);return Number.isNaN(n.getTime())?e:new Intl.DateTimeFormat(t,{dateStyle:`medium`,timeStyle:`short`}).format(n)}catch{return e}},Wb=(e,t)=>t?[e.identifier,e.name,e.authIndex,e.apiKeyPreview,e.apiKey,e.baseUrl,e.proxyUrl,e.prefix].filter(Boolean).map(e=>String(e).toLowerCase()).some(e=>e.includes(t)):!0,Gb=e=>(e.name??e.identifier??e.apiKeyPreview??``).toLowerCase(),Kb=(e,t)=>e.brand===`openaiCompatibility`?Jv(e.raw,t).success:Kv(t,e.brand,e.apiKey??void 0,e.baseUrl??void 0).success;function qb(){let{t:e,i18n:t}=Xo(),n=mp(e=>e.connectionStatus),{showNotification:r,showConfirmation:i}=Fc(),a=ym(),o=a?a.status===`current`:!0,s=wb(),[c,l]=(0,y.useState)(Bb),[u,d]=(0,y.useState)({open:!1,brand:`gemini`,mode:`detail`,resource:null}),f=(0,y.useRef)(null),{usageByProvider:p,refreshRecentRequests:m}=Dv({enabled:n===`connected`}),h=(0,y.useCallback)(async()=>{await Promise.allSettled([s.refetch(),m().catch(()=>void 0)])},[m,s]);iv(h,o);let g=n!==`connected`||s.mutating,_=(0,y.useCallback)(e=>{l(t=>{let n=e(t);return Vb(n),n})},[]),v=(0,y.useCallback)(e=>{_(t=>t.activeBrand===e?t:{...t,activeBrand:e})},[_]),b=(0,y.useCallback)(e=>{_(t=>{let n=t.activeBrand,r=zb(t,n);return{...t,filtersByBrand:{...t.filtersByBrand,[n]:{...r,...e}}}})},[_]),x=(0,y.useMemo)(()=>s.snapshot?.groups??[],[s.snapshot]),S=c.activeBrand,C=zb(c,S),w=C.filter,T=C.sortBy,E=C.sortDir,D=x.find(e=>e.id===S)??x[0]??null,O=(0,y.useMemo)(()=>{if(!D)return[];let e=w.trim().toLowerCase();return D.resources.filter(t=>Wb(t,e))},[D,w]),k=(0,y.useMemo)(()=>{if(!D)return[];let e=new Set;return D.resources.forEach(t=>{t.models.forEach(t=>e.add(t))}),Array.from(e).sort()},[D]),A=(0,y.useMemo)(()=>{if(k.length===0)return new Set;let e=new Set(k);return new Set(C.selectedModels.filter(t=>e.has(t)))},[C.selectedModels,k]),ee=(0,y.useMemo)(()=>{let e=O;return A.size>0&&(e=e.filter(e=>e.models.some(e=>A.has(e)))),[...e].sort((e,t)=>{let n=0;return n=T===`name`?Gb(e).localeCompare(Gb(t)):T===`priority`?e.priority-t.priority:Kb(e,p)-Kb(t,p),n===0&&(n=e.originalIndex-t.originalIndex),E===`asc`?n:-n})},[O,T,E,A,p]),j=(0,y.useMemo)(()=>{if(D)return{sortBy:T,sortDir:E,onSortBy:e=>b({sortBy:e}),onSortDir:e=>b({sortDir:e}),availableModels:k,selectedModels:A,onSelectedModelsChange:e=>b({selectedModels:Array.from(e).sort((e,t)=>e.localeCompare(t))})}},[D,k,T,E,A,b]),M=(0,y.useMemo)(()=>x.reduce((e,t)=>e+t.resources.filter(e=>!e.flags.isPlaceholder).length,0),[x]),N=(0,y.useMemo)(()=>x.reduce((e,t)=>e+t.resources.filter(e=>!e.disabled&&!e.flags.isPlaceholder).length,0),[x]),te=(0,y.useMemo)(()=>x.filter(e=>e.resources.some(e=>!e.flags.isPlaceholder)).length,[x]),P=s.snapshot?Ub(s.snapshot.fetchedAt,t.language):e(`providersPage.modelCatalog.notLoaded`),F=(0,y.useCallback)(()=>{d({open:!0,brand:S,mode:`create`,resource:null})},[S]),ne=(0,y.useCallback)(e=>{d({open:!0,brand:e.brand,mode:`detail`,resource:e})},[]),re=(0,y.useCallback)(e=>{d({open:!0,brand:e.brand,mode:`edit`,resource:e})},[]),ie=(0,y.useCallback)(()=>{d(e=>({...e,open:!1}))},[]),ae=(0,y.useCallback)(t=>{let n=t.name??t.apiKeyPreview??t.identifier??``;i({title:e(`providersPage.delete.title`),message:e(`providersPage.delete.confirm`,{name:n}),variant:`danger`,confirmText:e(`providersPage.actions.delete`),onConfirm:async()=>{try{await s.deleteProvider(t),r(e(`providersPage.toast.deleted`),`success`)}catch(t){let n=t instanceof Error?t.message:String(t);r(`${e(`notification.delete_failed`)}: ${n}`,`error`)}}})},[i,r,e,s]),oe=(0,y.useCallback)(async(t,n)=>{try{await s.toggleDisabled(t,n),r(e(n?`providersPage.toast.disabled`:`providersPage.toast.enabled`),`success`)}catch(t){let n=t instanceof Error?t.message:String(t);r(`${e(`providersPage.toast.toggleFailed`)}: ${n}`,`error`)}},[r,e,s]),se=(0,y.useCallback)(()=>{r(e(`providersPage.toast.created`),`success`),ie()},[ie,r,e]),ce=(0,y.useCallback)(()=>{r(e(`providersPage.toast.updated`),`success`),ie()},[ie,r,e]);return!s.snapshot&&s.isPending?(0,I.jsxs)(`div`,{className:Hb.page,children:[(0,I.jsx)(ov,{height:120}),(0,I.jsxs)(`div`,{className:Hb.layout,children:[(0,I.jsx)(ov,{height:420}),(0,I.jsx)(ov,{height:420})]})]}):D?(0,I.jsxs)(`div`,{className:Hb.page,children:[(0,I.jsx)(Qv,{totalActive:N,totalResources:M,providerFamilies:te,updatedAtLabel:P,isFetching:s.isFetching,isNewDisabled:g,newLabel:e(`providersPage.actions.new`),onRefresh:()=>void h(),onNew:F}),(0,I.jsxs)(`div`,{className:Hb.layout,children:[(0,I.jsx)(oy,{groups:x,activeBrand:D.id,onSelect:e=>{let t=u.open&&u.brand!==e;(t&&f.current?f.current.confirmDiscardIfDirty():Promise.resolve(!0)).then(n=>{n&&(v(e),t&&ie())})}}),(0,I.jsx)(jy,{group:D,filter:w,onFilterChange:e=>b({filter:e}),filteredResources:ee,selectedId:u.open?u.resource?.id??null:null,disableMutations:g,usageByProvider:p,toolbarControls:j,onView:ne,onEdit:re,onDelete:ae,onToggleDisabled:oe,onCreate:F})]}),(0,I.jsx)(ob,{ref:f,state:u,onClose:ie,onSwitchToEdit:()=>{d(e=>e.resource?{...e,mode:`edit`}:e)},workbench:s,onCreated:se,onUpdated:ce,mutationDisabled:g,usageByProvider:p})]}):(0,I.jsx)(`div`,{className:Hb.page,children:(0,I.jsx)(Qv,{totalActive:0,totalResources:0,providerFamilies:0,updatedAtLabel:P,isFetching:s.isFetching,onRefresh:()=>void h(),onNew:()=>{},isNewDisabled:!0})})}function Jb(e,t,n){(0,y.useLayoutEffect)(()=>{if(typeof window>`u`)return;let r=n?e.current:null;if(!r){document.documentElement.style.removeProperty(t);return}let i=()=>{let e=r.getBoundingClientRect().height;document.documentElement.style.setProperty(t,`${e}px`)};i(),window.addEventListener(`resize`,i);let a=typeof ResizeObserver>`u`?null:new ResizeObserver(i);return a?.observe(r),()=>{a?.disconnect(),window.removeEventListener(`resize`,i),document.documentElement.style.removeProperty(t)}},[e,t,n])}function Yb({title:e,extra:t,children:n,className:r}){return(0,I.jsxs)(`div`,{className:r?`card ${r}`:`card`,children:[(e||t)&&(0,I.jsxs)(`div`,{className:`card-header`,children:[(0,I.jsx)(`div`,{className:`title`,children:e}),t]}),n]})}function Xb({title:e,description:t,action:n}){return(0,I.jsxs)(`div`,{className:`empty-state`,children:[(0,I.jsxs)(`div`,{className:`empty-content`,children:[(0,I.jsx)(`div`,{className:`empty-icon`,"aria-hidden":`true`,children:(0,I.jsx)(Ms,{size:20})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:`empty-title`,children:e}),t&&(0,I.jsx)(`div`,{className:`empty-desc`,children:t})]})]}),n&&(0,I.jsx)(`div`,{className:`empty-action`,children:n})]})}async function Zb(e){try{if(typeof navigator<`u`&&navigator.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0}catch{}try{if(typeof document>`u`||!document.body)return!1;let t=document.activeElement,n=document.createElement(`textarea`);n.value=e,n.setAttribute(`readonly`,``),n.style.position=`fixed`,n.style.opacity=`0`,n.style.pointerEvents=`none`,n.style.left=`-9999px`,n.style.top=`0`,n.style.width=`1px`,n.style.height=`1px`,n.style.padding=`0`,n.style.border=`0`,document.body.appendChild(n),n.focus(),n.select(),n.setSelectionRange(0,n.value.length);let r=document.execCommand(`copy`);if(document.body.removeChild(n),t?.focus)try{t.focus()}catch{}return r}catch{return!1}}var Qb=`data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3c!--%20Generator:%20visioncortex%20VTracer%200.6.4%20--%3e%3csvg%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20width='64'%20height='59'%3e%3cpath%20d='M0,0%20L8,0%20L14,4%20L19,14%20L27,40%20L32,50%20L36,54%20L35,59%20L30,59%20L22,52%20L11,35%20L6,33%20L-1,34%20L-6,39%20L-14,52%20L-22,59%20L-28,59%20L-27,53%20L-22,47%20L-17,34%20L-10,12%20L-5,3%20Z%20'%20fill='%233789F9'%20transform='translate(28,0)'/%3e%3cpath%20d='M0,0%20L8,0%20L14,4%20L19,14%20L25,35%20L21,34%20L16,29%20L11,26%20L7,20%20L7,18%20L2,16%20L-3,15%20L-8,18%20L-12,19%20L-9,9%20L-4,2%20Z%20'%20fill='%236D80D8'%20transform='translate(28,0)'/%3e%3cpath%20d='M0,0%20L8,0%20L14,4%20L19,14%20L20,19%20L13,15%20L10,12%20L3,10%20L-1,8%20L-7,7%20L-4,2%20Z%20'%20fill='%23D78240'%20transform='translate(28,0)'/%3e%3cpath%20d='M0,0%20L5,1%20L10,4%20L12,9%20L1,8%20L-5,13%20L-10,21%20L-13,26%20L-16,26%20L-9,5%20L-4,2%20Z%20M6,7%20Z%20'%20fill='%233294CC'%20transform='translate(25,14)'/%3e%3cpath%20d='M0,0%20L5,2%20L10,10%20L12,18%20L5,14%20L1,10%20L0,4%20L-3,3%20L0,2%20Z%20'%20fill='%23E45C49'%20transform='translate(36,1)'/%3e%3cpath%20d='M0,0%20L9,1%20L12,3%20L12,5%20L7,6%20L4,8%20L-1,11%20L-5,12%20L-2,2%20Z%20'%20fill='%2390AE64'%20transform='translate(21,7)'/%3e%3cpath%20d='M0,0%20L5,1%20L5,4%20L-2,7%20L-7,11%20L-11,10%20L-9,5%20L-4,2%20Z%20'%20fill='%2353A89A'%20transform='translate(25,14)'/%3e%3cpath%20d='M0,0%20L5,0%20L16,9%20L17,13%20L12,12%20L8,9%20L8,7%20L4,5%20L0,2%20Z%20'%20fill='%23B5677D'%20transform='translate(33,11)'/%3e%3cpath%20d='M0,0%20L6,0%20L14,6%20L19,11%20L23,12%20L22,15%20L15,12%20L10,8%20L10,6%20L4,5%20Z%20'%20fill='%23778998'%20transform='translate(27,12)'/%3e%3cpath%20d='M0,0%20L4,2%20L-11,17%20L-12,14%20L-5,4%20Z%20'%20fill='%233390DF'%20transform='translate(26,21)'/%3e%3cpath%20d='M0,0%20L2,1%20L-4,5%20L-9,9%20L-13,13%20L-14,10%20L-13,7%20L-6,4%20L-3,1%20Z%20'%20fill='%233FA1B7'%20transform='translate(27,18)'/%3e%3cpath%20d='M0,0%20L4,0%20L9,5%20L13,6%20L12,9%20L5,6%20L0,2%20Z%20'%20fill='%238277BB'%20transform='translate(37,18)'/%3e%3cpath%20d='M0,0%20L5,1%20L7,6%20L-2,5%20Z%20M1,4%20Z%20'%20fill='%234989CF'%20transform='translate(30,17)'/%3e%3cpath%20d='M0,0%20L5,1%20L2,3%20L-3,6%20L-7,7%20L-6,3%20Z%20'%20fill='%2371B774'%20transform='translate(23,12)'/%3e%3cpath%20d='M0,0%20L7,1%20L9,7%20L5,6%20L0,1%20Z%20'%20fill='%236687E9'%20transform='translate(44,28)'/%3e%3cpath%20d='M0,0%20L7,0%20L5,1%20L5,3%20L8,4%20L4,5%20L-2,4%20Z%20'%20fill='%23C7AF38'%20transform='translate(23,3)'/%3e%3cpath%20d='M0,0%20L8,0%20L8,3%20L4,4%20L-4,3%20Z%20'%20fill='%23EF842A'%20transform='translate(28,0)'/%3e%3cpath%20d='M0,0%20L7,4%20L7,6%20L10,6%20L11,10%20L4,6%20L0,2%20Z%20'%20fill='%23CD5D67'%20transform='translate(37,9)'/%3e%3cpath%20d='M0,0%20L5,2%20L9,8%20L8,11%20L2,3%20L0,2%20Z%20'%20fill='%23F35241'%20transform='translate(36,1)'/%3e%3cpath%20d='M0,0%20L8,2%20L9,6%20L4,5%20L0,2%20Z%20'%20fill='%23A667A2'%20transform='translate(41,18)'/%3e%3cpath%20d='M0,0%20L9,1%20L8,3%20L-2,3%20Z%20'%20fill='%23A4B34C'%20transform='translate(21,7)'/%3e%3cpath%20d='M0,0%20L2,0%20L7,5%20L8,7%20L3,6%20L0,2%20Z%20'%20fill='%23617FCF'%20transform='translate(35,18)'/%3e%3cpath%20d='M0,0%20L5,2%20L8,7%20L4,5%20L0,2%20Z%20'%20fill='%239D7784'%20transform='translate(33,11)'/%3e%3cpath%20d='M0,0%20L6,2%20L6,4%20L0,3%20Z%20'%20fill='%23BC7F59'%20transform='translate(31,7)'/%3e%3c/svg%3e`,$b=`data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eGrok%3c/title%3e%3cpath%20d='M9.27%2015.29l7.978-5.897c.391-.29.95-.177%201.137.272.98%202.369.542%205.215-1.41%207.169-1.951%201.954-4.667%202.382-7.149%201.406l-2.711%201.257c3.889%202.661%208.611%202.003%2011.562-.953%202.341-2.344%203.066-5.539%202.388-8.42l.006.007c-.983-4.232.242-5.924%202.75-9.383.06-.082.12-.164.179-.248l-3.301%203.305v-.01L9.267%2015.292M7.623%2016.723c-2.792-2.67-2.31-6.801.071-9.184%201.761-1.763%204.647-2.483%207.166-1.425l2.705-1.25a7.808%207.808%200%2000-1.829-1A8.975%208.975%200%20005.984%205.83c-2.533%202.536-3.33%206.436-1.962%209.764%201.022%202.487-.653%204.246-2.34%206.022-.599.63-1.199%201.259-1.682%201.925l7.62-6.815'%3e%3c/path%3e%3c/svg%3e`,ex=`data:image/svg+xml,%3csvg%20fill='%23ffffff'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eGrok%3c/title%3e%3cpath%20d='M9.27%2015.29l7.978-5.897c.391-.29.95-.177%201.137.272.98%202.369.542%205.215-1.41%207.169-1.951%201.954-4.667%202.382-7.149%201.406l-2.711%201.257c3.889%202.661%208.611%202.003%2011.562-.953%202.341-2.344%203.066-5.539%202.388-8.42l.006.007c-.983-4.232.242-5.924%202.75-9.383.06-.082.12-.164.179-.248l-3.301%203.305v-.01L9.267%2015.292M7.623%2016.723c-2.792-2.67-2.31-6.801.071-9.184%201.761-1.763%204.647-2.483%207.166-1.425l2.705-1.25a7.808%207.808%200%2000-1.829-1A8.975%208.975%200%20005.984%205.83c-2.533%202.536-3.33%206.436-1.962%209.764%201.022%202.487-.653%204.246-2.34%206.022-.599.63-1.199%201.259-1.682%201.925l7.62-6.815'%3e%3c/path%3e%3c/svg%3e`,tx=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%3e%3cdefs%3e%3cfilter%20id='master_svg0_278_51503'%20filterUnits='objectBoundingBox'%20color-interpolation-filters='sRGB'%20x='0'%20y='0'%20width='1'%20height='1'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='BackgroundImageFix'%20result='shape'/%3e%3cfeGaussianBlur%20in='BackgroundImageFix'%20stdDeviation='1.3333334922790527'/%3e%3cfeComposite%20in2='SourceAlpha'%20operator='in'%20result='effect1_foregroundBlur'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_foregroundBlur'%20result='shape'/%3e%3c/filter%3e%3clinearGradient%20x1='0.07353696972131729'%20y1='0.12899449467658997'%20x2='0.9907095821060244'%20y2='0.9383787344260006'%20id='master_svg1_93_40276'%3e%3cstop%20offset='0%25'%20stop-color='%235C5CFF'%20stop-opacity='1'/%3e%3cstop%20offset='100%25'%20stop-color='%23AE5CFF'%20stop-opacity='1'/%3e%3c/linearGradient%3e%3c/defs%3e%3cg%3e%3cg%20filter='url(%23master_svg0_278_51503)'%3e%3crect%20x='0'%20y='0'%20width='32'%20height='32'%20rx='16'%20fill='%23F0F2F5'%20fill-opacity='0'/%3e%3c/g%3e%3cg%3e%3cg%3e%3cpath%20d='M31.843111328125,14.751C31.315411328125,7.18121,25.497411328125,1.04691,17.966011328125,0.119698C10.434711328125,-0.807512,3.302541328125,3.73244,0.954596328125,10.9482C0.345662328125,12.8248,1.732821328125,14.751,3.705641328125,14.751C4.950051328125,14.7517,6.055631328125,13.9569,6.451401328125,12.7772C7.497331328125,9.65101,10.504411328125,3.91401,18.482011328125,3.91401Q29.445911328125,3.91401,31.843111328125,14.751ZM9.127681328125,17.3314L9.127681328125,13.0862Q9.127681328125,13.0022,9.144081328125,12.9198Q9.160481328125,12.8373,9.192641328125,12.7597Q9.224801328125,12.682,9.271501328125,12.6122Q9.318191328125,12.5423,9.377621328125,12.4828Q9.437051328125,12.4234,9.506931328125,12.3767Q9.576811328125,12.33,9.654461328125,12.2979Q9.732111328125,12.2657,9.814541328125,12.2493Q9.896971328125,12.2329,9.981021328125,12.2329L11.049211328125,12.2329Q11.133211328125,12.2329,11.215711328125,12.2493Q11.298111328125,12.2657,11.375811328125,12.2979Q11.453411328125,12.33,11.523311328125,12.3767Q11.593211328125,12.4234,11.652611328125,12.4828Q11.712011328125,12.5423,11.758711328125,12.6122Q11.805411328125,12.682,11.837611328125,12.7597Q11.869711328125,12.8373,11.886111328125,12.9198Q11.902511328125,13.0022,11.902511328125,13.0862L11.902511328125,17.3314Q11.902511328125,17.4154,11.886111328125,17.4978Q11.869711328125,17.5803,11.837611328125,17.6579Q11.805411328125,17.7356,11.758711328125,17.8055Q11.712011328125,17.8753,11.652611328125,17.9348Q11.593211328125,17.9942,11.523311328125,18.0409Q11.453411328125,18.0876,11.375811328125,18.1197Q11.298111328125,18.1519,11.215711328125,18.1683Q11.133211328125,18.1847,11.049211328125,18.1847L9.981021328125,18.1847Q9.896971328125,18.1847,9.814541328125,18.1683Q9.732111328125,18.1519,9.654461328125,18.1197Q9.576811328125,18.0876,9.506931328125,18.0409Q9.437051328125,17.9942,9.377621328125,17.9348Q9.318191328125,17.8753,9.271501328125,17.8055Q9.224801328125,17.7356,9.192641328125,17.6579Q9.160481328125,17.5803,9.144081328125,17.4978Q9.127681328125,17.4154,9.127681328125,17.3314ZM17.273611328125,17.3295C17.272611328125,17.8015,17.654911328125,18.1847,18.126911328125,18.1847L19.408411328125,18.1847C19.879011328125,18.1847,20.260711328125,17.8038,20.261811328125,17.3332L20.266411328125,15.2107L20.266411328125,15.2069L20.261811328125,13.0844C20.260711328125,12.6138,19.879011328125,12.2329,19.408411328125,12.2329L18.126911328125,12.2329C17.654911328125,12.2329,17.272611328125,12.6161,17.273611328125,13.0881L17.278211328125,15.2069L17.278211328125,15.2107L17.273611328125,17.3295ZM13.574711328125,28.0523C21.552211328125,28.0523,24.559311328125,22.3153,25.605811328125,19.1897C26.001411328125,18.0098,27.107111328125,17.215,28.351511328125,17.2158C30.323811328125,17.2158,31.711511328125,19.1416,31.102611328125,21.0181C30.552411328125,22.7189,29.716211328125,24.3134,28.629811328125,25.733L30.137611328125,30.2235L24.775211328125,29.3432C14.645911328125,36.0484,1.048779328125,29.3346,0.214111328125,17.2158Q2.611231328125,28.0523,13.574711328125,28.0523Z'%20fill-rule='evenodd'%20fill='url(%23master_svg1_93_40276)'%20fill-opacity='1'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e`,nx=`data:image/svg+xml,%3csvg%20fill='%23FFFFFF'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eKimi%3c/title%3e%3cpath%20d='M19.738%205.776c.163-.209.306-.4.457-.585.07-.087.064-.153-.004-.244-.655-.861-.717-1.817-.34-2.787.283-.73.909-1.072%201.674-1.145.477-.045.945.004%201.379.236.57.305.902.77%201.01%201.412.086.512.07%201.012-.075%201.508-.257.878-.888%201.333-1.753%201.448-.718.096-1.446.108-2.17.157-.056.004-.113%200-.178%200z'%20fill='%23FFFFFF'%3e%3c/path%3e%3cpath%20d='M17.962%201.844h-4.326l-3.425%207.81H5.369V1.878H1.5V22h3.87v-8.477h6.824a3.025%203.025%200%20002.743-1.75V22h3.87v-8.477a3.87%203.87%200%2000-3.588-3.86v-.01h-2.125a3.94%203.94%200%20002.323-2.12l2.545-5.689z'%3e%3c/path%3e%3c/svg%3e`,rx=`data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eKimi%3c/title%3e%3cpath%20d='M19.738%205.776c.163-.209.306-.4.457-.585.07-.087.064-.153-.004-.244-.655-.861-.717-1.817-.34-2.787.283-.73.909-1.072%201.674-1.145.477-.045.945.004%201.379.236.57.305.902.77%201.01%201.412.086.512.07%201.012-.075%201.508-.257.878-.888%201.333-1.753%201.448-.718.096-1.446.108-2.17.157-.056.004-.113%200-.178%200z'%20fill='%23027AFF'%3e%3c/path%3e%3cpath%20d='M17.962%201.844h-4.326l-3.425%207.81H5.369V1.878H1.5V22h3.87v-8.477h6.824a3.025%203.025%200%20002.743-1.75V22h3.87v-8.477a3.87%203.87%200%2000-3.588-3.86v-.01h-2.125a3.94%203.94%200%20002.323-2.12l2.545-5.689z'%3e%3c/path%3e%3c/svg%3e`,ix=`data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eQwen%3c/title%3e%3cpath%20d='M12.604%201.34c.393.69.784%201.382%201.174%202.075a.18.18%200%2000.157.091h5.552c.174%200%20.322.11.446.327l1.454%202.57c.19.337.24.478.024.837-.26.43-.513.864-.76%201.3l-.367.658c-.106.196-.223.28-.04.512l2.652%204.637c.172.301.111.494-.043.77-.437.785-.882%201.564-1.335%202.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099%200%2000-.081.05%20575.097%20575.097%200%2001-2.705%204.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537%200%2001-.465-.271l-1.335-2.323a.09.09%200%2000-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543%200%2001-.002-.54l1.207-2.12a.198.198%200%20000-.197%20550.951%20550.951%200%2001-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625%201.387-2.436.132-.234.304-.334.584-.335a338.3%20338.3%200%20012.589-.001.124.124%200%2000.107-.063l2.806-4.895a.488.488%200%2001.422-.246c.524-.001%201.053%200%201.583-.006L11.704%201c.341-.003.724.032.9.34zm-3.432.403a.06.06%200%2000-.052.03L6.254%206.788a.157.157%200%2001-.135.078H3.253c-.056%200-.07.025-.041.074l5.81%2010.156c.025.042.013.062-.034.063l-2.795.015a.218.218%200%2000-.2.116l-1.32%202.31c-.044.078-.021.118.068.118l5.716.008c.046%200%20.08.02.104.061l1.403%202.454c.046.081.092.082.139%200l5.006-8.76.783-1.382a.055.055%200%2001.096%200l1.424%202.53a.122.122%200%2000.107.062l2.763-.02a.04.04%200%2000.035-.02.041.041%200%20000-.04l-2.9-5.086a.108.108%200%20010-.113l.293-.507%201.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059%200-.073-.026-.043-.077l1.434-2.505a.107.107%200%20000-.114L9.225%201.774a.06.06%200%2000-.053-.031zm6.29%208.02c.046%200%20.058.02.034.06l-.832%201.465-2.613%204.585a.056.056%200%2001-.05.029.058.058%200%2001-.05-.029L8.498%209.841c-.02-.034-.01-.052.028-.054l.216-.012%206.722-.012z'%20fill='url(%23lobe-icons-qwen-fill)'%20fill-rule='nonzero'%3e%3c/path%3e%3cdefs%3e%3clinearGradient%20id='lobe-icons-qwen-fill'%20x1='0%25'%20x2='100%25'%20y1='0%25'%20y2='0%25'%3e%3cstop%20offset='0%25'%20stop-color='%236336E7'%20stop-opacity='.84'%3e%3c/stop%3e%3cstop%20offset='100%25'%20stop-color='%236F69F7'%20stop-opacity='.84'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e`,ax=new Set([`antigravity`,`claude`,`codex`,`kimi`,`xai`]),ox=[`vertex`,`aistudio`,`antigravity`,`xai`,`claude`,`codex`,`kimi`],sx=new Set([`all`,`unknown`,`empty`]),cx=/^[+-]?\d+$/,lx=new Set([`true`,`1`,`yes`,`y`,`on`]),ux=new Set([`false`,`0`,`no`,`n`,`off`]),dx={qwen:{light:{bg:`#ede5fd`,text:`#5530c7`},dark:{bg:`#36208a`,text:`#b5a3f0`}},kimi:{light:{bg:`#dce8ff`,text:`#0560cf`},dark:{bg:`#003880`,text:`#70b5ff`}},gemini:{light:{bg:`#e3f2fd`,text:`#1565c0`},dark:{bg:`#0d47a1`,text:`#64b5f6`}},aistudio:{light:{bg:`#f0f2f5`,text:`#2f343c`},dark:{bg:`#373c42`,text:`#cfd3db`}},claude:{light:{bg:`#fbece4`,text:`#c05621`},dark:{bg:`#5e2c14`,text:`#e8a882`}},codex:{light:{bg:`#eae7ff`,text:`#3538d4`},dark:{bg:`#262395`,text:`#b5b0ff`}},antigravity:{light:{bg:`#e0f7fa`,text:`#006064`},dark:{bg:`#004d40`,text:`#80deea`}},xai:{light:{bg:`#f3f4f6`,text:`#111827`,border:`1px solid #d1d5db`},dark:{bg:`#111827`,text:`#f9fafb`,border:`1px solid #374151`}},iflow:{light:{bg:`#f5e3fc`,text:`#9025c8`},dark:{bg:`#521490`,text:`#d49cf5`}},vertex:{light:{bg:`#e4edfd`,text:`#2b5fbc`},dark:{bg:`#1a3d80`,text:`#89b3f7`}},empty:{light:{bg:`#f5f5f5`,text:`#616161`},dark:{bg:`#424242`,text:`#bdbdbd`}},unknown:{light:{bg:`#f0f0f0`,text:`#666666`,border:`1px dashed #999999`},dark:{bg:`#3a3a3a`,text:`#aaaaaa`,border:`1px dashed #666666`}}},fx={antigravity:Qb,aistudio:ty,claude:$v,codex:ey,gemini:ty,xai:{light:$b,dark:ex},iflow:tx,kimi:{light:rx,dark:nx},qwen:ix,vertex:ry},px=e=>Math.min(30,Math.max(3,Math.round(e))),mx=(e,t,n)=>t===404?e(`common.quota_update_required`):t===403?e(`common.quota_check_credential`):n,hx=Bg,gx=e=>{let t=new Set;Array.from(e).forEach(e=>{let n=hx(String(e??``));!n||sx.has(n)||t.add(n)});let n=new Set(ox.map(e=>hx(e))),r=Array.from(t).filter(e=>!n.has(e)).sort((e,t)=>e.localeCompare(t));return[...ox,...r]},_x=e=>{let t=e.status_message??e.statusMessage;return typeof t==`string`?t.trim():t==null?``:String(t).trim()},vx=e=>_x(e).length>0,yx=(e,t)=>{let n=hx(t),r=`auth_files.filter_${n}`,i=e(r);return i===r?n===`iflow`?`iFlow`:t.charAt(0).toUpperCase()+t.slice(1):i},bx=(e,t)=>{let n=dx[hx(e)]||dx.unknown;return t===`dark`&&n.dark?n.dark:n.light},xx=(e,t)=>{let n=fx[hx(e)];return n?typeof n==`string`?n:t===`dark`?n.dark:n.light:null},Sx=e=>{if(typeof e==`number`)return Number.isInteger(e)?e:void 0;if(typeof e!=`string`)return;let t=e.trim();if(!t||!cx.test(t))return;let n=Number.parseInt(t,10);return Number.isSafeInteger(n)?n:void 0},Cx=e=>{if(typeof e==`boolean`)return e;if(typeof e==`number`&&Number.isFinite(e))return e!==0;if(typeof e!=`string`)return;let t=e.trim().toLowerCase();if(t){if(lx.has(t))return!0;if(ux.has(t))return!1}},wx=e=>Cx(e.websockets??e.websocket)??!1,Tx=(e,t)=>{let n={...e};return delete n.websocket,n.websockets=t,n};function Ex(e){let t=e.runtime_only??e.runtimeOnly;return typeof t==`boolean`?t:typeof t==`string`?t.trim().toLowerCase()===`true`:!1}var Dx=e=>{let t=e.modtime??e.modified;if(!t)return`-`;let n=Number(t),r=Number.isFinite(n)&&!Number.isNaN(n)?new Date(n<0xe8d4a51000?n*1e3:n):Wg(t)??new Date(String(t));return Number.isNaN(r.getTime())?`-`:r.toLocaleString()},Ox=(e,t,n)=>(n[hx(t)]||n[t]||[]).some(t=>{if(t.includes(`*`)){let n=t.split(`*`).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`.*`);return RegExp(`^${n}$`,`i`).test(e)}return t.toLowerCase()===e.toLowerCase()});function kx({size:e=20,className:t=``}){return(0,I.jsx)(`div`,{className:`loading-spinner${t?` ${t}`:``}`,style:{width:e,height:e,borderWidth:e/7},role:`status`,"aria-live":`polite`})}var Ax={container:`QuotaPage-module__container___CkTNE`,pageHeader:`QuotaPage-module__pageHeader___7RVAE`,pageTitle:`QuotaPage-module__pageTitle___c6BF7`,description:`QuotaPage-module__description___qDPuI`,headerActions:`QuotaPage-module__headerActions___Jfu3A`,titleWrapper:`QuotaPage-module__titleWrapper___lHVCF`,countBadge:`QuotaPage-module__countBadge___tuPLs`,errorBox:`QuotaPage-module__errorBox___Ub2Qs`,pageSizeSelect:`QuotaPage-module__pageSizeSelect___1AaaU`,statsInfo:`QuotaPage-module__statsInfo___coFxw`,antigravityGrid:`QuotaPage-module__antigravityGrid___d29-f`,claudeGrid:`QuotaPage-module__claudeGrid___g3N0r`,codexGrid:`QuotaPage-module__codexGrid___gQjcK`,kimiGrid:`QuotaPage-module__kimiGrid___-9u7J`,xaiGrid:`QuotaPage-module__xaiGrid___OJdA2`,antigravityControls:`QuotaPage-module__antigravityControls___jdhuf`,claudeControls:`QuotaPage-module__claudeControls___CJ9XX`,codexControls:`QuotaPage-module__codexControls___ZabMA`,kimiControls:`QuotaPage-module__kimiControls___3WNBe`,xaiControls:`QuotaPage-module__xaiControls___PNfIL`,antigravityControl:`QuotaPage-module__antigravityControl___Z2Ti6`,claudeControl:`QuotaPage-module__claudeControl___4J9Tz`,codexControl:`QuotaPage-module__codexControl___P4r4g`,kimiControl:`QuotaPage-module__kimiControl___5rxbt`,xaiControl:`QuotaPage-module__xaiControl___wPP0E`,viewModeToggle:`QuotaPage-module__viewModeToggle___BHo1O`,viewModeButton:`QuotaPage-module__viewModeButton___jjKnb`,viewModeButtonActive:`QuotaPage-module__viewModeButtonActive___LGwRk`,refreshAllButton:`QuotaPage-module__refreshAllButton___c9-I-`,claudeCard:`QuotaPage-module__claudeCard___z9zBZ`,antigravityCard:`QuotaPage-module__antigravityCard___0jKaG`,codexCard:`QuotaPage-module__codexCard___2xhZX`,kimiCard:`QuotaPage-module__kimiCard___WWvTD`,xaiCard:`QuotaPage-module__xaiCard___l41eR`,quotaSection:`QuotaPage-module__quotaSection___Yb6bk`,quotaRow:`QuotaPage-module__quotaRow___uNjD0`,antigravityQuotaGroup:`QuotaPage-module__antigravityQuotaGroup___gtcPR`,antigravityQuotaGroupHeader:`QuotaPage-module__antigravityQuotaGroupHeader___0SHVL`,antigravityQuotaGroupTitle:`QuotaPage-module__antigravityQuotaGroupTitle___2aARm`,antigravityQuotaGroupDescription:`QuotaPage-module__antigravityQuotaGroupDescription___rBbc9`,quotaRowHeader:`QuotaPage-module__quotaRowHeader___jr9zd`,quotaModel:`QuotaPage-module__quotaModel___-3mcR`,quotaBar:`QuotaPage-module__quotaBar___ATY20`,quotaBarFill:`QuotaPage-module__quotaBarFill___arMGf`,quotaBarFillHigh:`QuotaPage-module__quotaBarFillHigh___yfdzz`,quotaBarFillMedium:`QuotaPage-module__quotaBarFillMedium___PbU2j`,quotaBarFillLow:`QuotaPage-module__quotaBarFillLow___1dvgT`,quotaMeta:`QuotaPage-module__quotaMeta___2Gr-S`,quotaPercent:`QuotaPage-module__quotaPercent___dwFKN`,quotaReset:`QuotaPage-module__quotaReset___AQC0c`,quotaAmount:`QuotaPage-module__quotaAmount___liJkK`,quotaMessage:`QuotaPage-module__quotaMessage___tXEKQ`,quotaMessageAction:`QuotaPage-module__quotaMessageAction___lCJz4`,quotaCardActions:`QuotaPage-module__quotaCardActions___neob1`,quotaResetCreditButton:`QuotaPage-module__quotaResetCreditButton___850uQ`,quotaRefreshButton:`QuotaPage-module__quotaRefreshButton___y1YAz`,quotaError:`QuotaPage-module__quotaError___rIKP-`,quotaWarning:`QuotaPage-module__quotaWarning___phfIc`,codexPlan:`QuotaPage-module__codexPlan___cNsir`,codexPlanItem:`QuotaPage-module__codexPlanItem___zPoYp`,codexPlanLabel:`QuotaPage-module__codexPlanLabel___NR4tn`,codexPlanValue:`QuotaPage-module__codexPlanValue___TZDzO`,codexPlanSeparator:`QuotaPage-module__codexPlanSeparator___dHG-Q`,premiumPlanValue:`QuotaPage-module__premiumPlanValue___7ouKX`,fileCard:`QuotaPage-module__fileCard___7ZTk-`,cardHeader:`QuotaPage-module__cardHeader___vBGld`,typeBadge:`QuotaPage-module__typeBadge___ubtCA`,fileName:`QuotaPage-module__fileName___ATlvN`,pagination:`QuotaPage-module__pagination___W2eGv`,pageInfo:`QuotaPage-module__pageInfo___yNU7E`,warningOverlay:`QuotaPage-module__warningOverlay___lVjB7`,warningModal:`QuotaPage-module__warningModal___2pPNd`};function jx({percent:e,highThreshold:t,mediumThreshold:n}){let r=e===null?null:((e,t,n)=>Math.min(n,Math.max(t,e)))(e,0,100),i=r===null?Ax.quotaBarFillMedium:r>=t?Ax.quotaBarFillHigh:r>=n?Ax.quotaBarFillMedium:Ax.quotaBarFillLow,a=Math.round((r??0)*100)/100;return(0,I.jsx)(`div`,{className:Ax.quotaBar,children:(0,I.jsx)(`div`,{className:`${Ax.quotaBarFill} ${i}`,style:{width:`${a}%`}})})}function Mx({item:e,quota:t,resolvedTheme:n,i18nPrefix:r,cardIdleMessageKey:i,cardClassName:a,defaultType:o,canRefresh:s=!1,onRefresh:c,resetQuotaAction:l,renderQuotaItems:u}){let{t:d}=Xo(),f=e.type||e.provider||o,p=Vm[f]||Vm.unknown,m=n===`dark`&&p.dark?p.dark:p.light,h=t?.status??`idle`,g=h===`loading`,_=Nx(d,t?.errorStatus,t?.error||d(`common.unknown_error`)),v=c?`${r}.idle`:i??`${r}.idle`,y=e=>{let t=`auth_files.filter_${e}`,n=d(t);return n===t?e.toLowerCase()===`iflow`?`iFlow`:e.charAt(0).toUpperCase()+e.slice(1):n};return(0,I.jsxs)(`div`,{className:`${Ax.fileCard} ${a}`,children:[(0,I.jsxs)(`div`,{className:Ax.cardHeader,children:[(0,I.jsx)(`span`,{className:Ax.typeBadge,style:{backgroundColor:m.bg,color:m.text,...m.border?{border:m.border}:{}},children:y(f)}),(0,I.jsx)(`span`,{className:Ax.fileName,children:e.name})]}),(0,I.jsx)(`div`,{className:Ax.quotaSection,children:g?(0,I.jsx)(`div`,{className:Ax.quotaMessage,children:d(`${r}.loading`)}):h===`idle`?c?(0,I.jsx)(`button`,{type:`button`,className:`${Ax.quotaMessage} ${Ax.quotaMessageAction}`,onClick:c,disabled:!s,children:d(v)}):(0,I.jsx)(`div`,{className:Ax.quotaMessage,children:d(v)}):h===`error`?(0,I.jsx)(`div`,{className:Ax.quotaError,children:d(`${r}.load_failed`,{message:_})}):t?u(t,d,{styles:Ax,QuotaProgressBar:jx}):(0,I.jsx)(`div`,{className:Ax.quotaMessage,children:d(v)})}),(l||c&&h!==`idle`)&&(0,I.jsxs)(`div`,{className:Ax.quotaCardActions,children:[l,c&&h!==`idle`&&(0,I.jsxs)(L,{type:`button`,variant:`secondary`,size:`sm`,className:Ax.quotaRefreshButton,onClick:c,disabled:!s||g,loading:g,title:d(`auth_files.quota_refresh_hint`),children:[!g&&(0,I.jsx)(ps,{size:14}),d(`auth_files.quota_refresh_single`)]})]})]})}var Nx=(e,t,n)=>t===404?e(`common.quota_update_required`):t===403?e(`common.quota_check_credential`):n;function Px(e){let{t}=Xo(),n=gp(e.storeSelector),r=gp(t=>t[e.storeSetter]),i=(0,y.useRef)(!1),a=(0,y.useRef)(0);return{quota:n,loadQuota:(0,y.useCallback)(async(n,o,s)=>{if(i.current)return;i.current=!0;let c=++a.current;s(!0,o);try{if(n.length===0)return;r(t=>{let r={...t};return n.forEach(t=>{r[t.name]=e.buildLoadingState()}),r});let i=await Promise.all(n.map(async n=>{try{let r=await e.fetchQuota(n,t);return{name:n.name,status:`success`,data:r}}catch(e){let r=e instanceof Error?e.message:t(`common.unknown_error`),i=Th(e);return{name:n.name,status:`error`,error:r,errorStatus:i}}}));if(c!==a.current)return;r(n=>{let r={...n};return i.forEach(n=>{n.status===`success`?r[n.name]=e.buildSuccessState(n.data):r[n.name]=e.buildErrorState(n.error||t(`common.unknown_error`),n.errorStatus)}),r})}finally{c===a.current&&(s(!1),i.current=!1)}},[e,r,t])}}function Fx(e,t=16){let[n,r]=(0,y.useState)(1),[i,a]=(0,y.useState)(null),o=(0,y.useCallback)(e=>{a(e)},[]);return(0,y.useEffect)(()=>{if(!i)return;let n=()=>{let n=i.clientWidth,a=e+t,o=Math.floor((n+t)/a);r(Math.max(1,o))};n();let a=new ResizeObserver(()=>{n()});return a.observe(i),()=>a.disconnect()},[i,e,t]),[n,o]}var Ix=25,Lx=30,Rx=(e,t=6)=>{let[n,r]=(0,y.useState)(1),[i,a]=(0,y.useState)(t),[o,s]=(0,y.useState)(!1),[c,l]=(0,y.useState)(null),u=(0,y.useMemo)(()=>Math.max(1,Math.ceil(e.length/i)),[e.length,i]),d=(0,y.useMemo)(()=>Math.min(n,u),[n,u]);return{pageSize:i,totalPages:u,currentPage:d,pageItems:(0,y.useMemo)(()=>{let t=(d-1)*i;return e.slice(t,t+i)},[e,d,i]),setPageSize:(0,y.useCallback)(e=>{a(e),r(1)},[]),goToPrev:(0,y.useCallback)(()=>{r(e=>Math.max(1,e-1))},[]),goToNext:(0,y.useCallback)(()=>{r(e=>Math.min(u,e+1))},[u]),loading:o,loadingScope:c,setLoading:(0,y.useCallback)((e,t)=>{s(e),l(e?t??null:null)},[])}};function zx({config:e,files:t,loading:n,disabled:r}){let{t:i}=Xo(),a=Wc(e=>e.resolvedTheme),o=Fc(e=>e.showNotification),s=Fc(e=>e.showConfirmation),c=gp(t=>t[e.storeSetter]),[l,u]=Fx(380),[d,f]=(0,y.useState)(`paged`),[p,m]=(0,y.useState)(!1),[h,g]=(0,y.useState)(null),_=(0,y.useMemo)(()=>t.filter(t=>e.filterFn(t)),[t,e]),v=_.length<=Lx,b=d===`all`&&!v?`paged`:d,{pageSize:x,totalPages:S,currentPage:C,pageItems:w,setPageSize:T,goToPrev:E,goToNext:D,loading:O,setLoading:k}=Rx(_);(0,y.useEffect)(()=>{if(v||d!==`all`)return;let e=!1;return queueMicrotask(()=>{e||(f(`paged`),m(!0))}),()=>{e=!0}},[v,d]),(0,y.useEffect)(()=>{T(b===`all`?Math.max(1,_.length):Math.min(l*3,Ix))},[b,l,_.length,T]);let{quota:A,loadQuota:ee}=Px(e),j=(0,y.useRef)(!1),M=(0,y.useRef)(n),N=(0,y.useCallback)(()=>{j.current=!0,rv()},[]);(0,y.useEffect)(()=>{let e=M.current;if(M.current=n,!j.current||n||!e)return;j.current=!1;let t=b===`all`?`all`:`page`,r=b===`all`?_:w;r.length!==0&&ee(r,t,k)},[n,b,_,w,ee,k]),(0,y.useEffect)(()=>{if(!n){if(_.length===0){c({});return}c(e=>{let t={};return _.forEach(n=>{let r=e[n.name];r&&(t[n.name]=r)}),t})}},[_,n,c]);let te=(0,y.useCallback)(async t=>{if(!(r||t.disabled)&&A[t.name]?.status!==`loading`){c(n=>({...n,[t.name]:e.buildLoadingState()}));try{let n=await e.fetchQuota(t,i);c(r=>({...r,[t.name]:e.buildSuccessState(n)})),o(i(`auth_files.quota_refresh_success`,{name:t.name}),`success`)}catch(n){let r=n instanceof Error?n.message:i(`common.unknown_error`),a=Th(n);c(n=>({...n,[t.name]:e.buildErrorState(r,a)})),o(i(`auth_files.quota_refresh_failed`,{name:t.name,message:r}),`error`)}}},[e,r,A,c,o,i]),P=(0,y.useCallback)(t=>{let n=e.resetQuota;n&&(r||t.disabled||A[t.name]?.status!==`loading`&&h!==t.name&&s({title:i(`codex_quota.reset_confirm_title`),message:i(`codex_quota.reset_confirm_message`,{name:t.name}),confirmText:i(`codex_quota.reset_confirm_button`),variant:`primary`,onConfirm:async()=>{g(t.name);try{let r=await n(t,i);c(n=>({...n,[t.name]:e.buildSuccessState(r)})),o(i(`codex_quota.reset_success`,{name:t.name}),`success`)}catch(e){let n=e instanceof Error?e.message:i(`common.unknown_error`);o(i(`codex_quota.reset_failed`,{name:t.name,message:n}),`error`)}finally{g(e=>e===t.name?null:e)}}}))},[e,r,A,h,c,s,o,i]),F=(0,I.jsxs)(`div`,{className:Ax.titleWrapper,children:[(0,I.jsx)(`span`,{children:i(`${e.i18nPrefix}.title`)}),_.length>0&&(0,I.jsx)(`span`,{className:Ax.countBadge,children:_.length})]}),ne=O||n;return(0,I.jsxs)(Yb,{title:F,extra:(0,I.jsxs)(`div`,{className:Ax.headerActions,children:[(0,I.jsxs)(`div`,{className:Ax.viewModeToggle,children:[(0,I.jsx)(L,{variant:`secondary`,size:`sm`,className:`${Ax.viewModeButton} ${b===`paged`?Ax.viewModeButtonActive:``}`,onClick:()=>f(`paged`),children:i(`auth_files.view_mode_paged`)}),(0,I.jsx)(L,{variant:`secondary`,size:`sm`,className:`${Ax.viewModeButton} ${b===`all`?Ax.viewModeButtonActive:``}`,onClick:()=>{_.length>Lx?m(!0):f(`all`)},children:i(`auth_files.view_mode_all`)})]}),(0,I.jsxs)(L,{variant:`secondary`,size:`sm`,className:Ax.refreshAllButton,onClick:N,disabled:r||ne,loading:ne,title:i(`quota_management.refresh_all_credentials`),"aria-label":i(`quota_management.refresh_all_credentials`),children:[!ne&&(0,I.jsx)(ps,{size:16}),i(`quota_management.refresh_all_credentials`)]})]}),children:[_.length===0?(0,I.jsx)(Xb,{title:i(`${e.i18nPrefix}.empty_title`),description:i(`${e.i18nPrefix}.empty_desc`)}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{ref:u,className:e.gridClassName,children:w.map(t=>{let n=A[t.name],o=h===t.name,s=!r&&!t.disabled&&n?.status!==`loading`,c=n!==void 0&&!!e.canResetQuota?.(n),l=e.resetQuota&&c?(0,I.jsxs)(L,{type:`button`,variant:`secondary`,size:`sm`,className:Ax.quotaResetCreditButton,onClick:()=>P(t),disabled:!s||o,loading:o,title:i(`codex_quota.reset_button`),"aria-label":i(`codex_quota.reset_button`),children:[!o&&(0,I.jsx)(ps,{size:14}),i(`codex_quota.reset_button`)]}):void 0;return(0,I.jsx)(Mx,{item:t,quota:n,resolvedTheme:a,i18nPrefix:e.i18nPrefix,cardIdleMessageKey:e.cardIdleMessageKey,cardClassName:e.cardClassName,defaultType:e.type,canRefresh:s&&!o,onRefresh:()=>void te(t),resetQuotaAction:l,renderQuotaItems:e.renderQuotaItems},t.name)})}),_.length>x&&b===`paged`&&(0,I.jsxs)(`div`,{className:Ax.pagination,children:[(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:E,disabled:C<=1,children:i(`auth_files.pagination_prev`)}),(0,I.jsx)(`div`,{className:Ax.pageInfo,children:i(`auth_files.pagination_info`,{current:C,total:S,count:_.length})}),(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:D,disabled:C>=S,children:i(`auth_files.pagination_next`)})]})]}),p&&(0,I.jsx)(`div`,{className:Ax.warningOverlay,onClick:()=>m(!1),children:(0,I.jsxs)(`div`,{className:Ax.warningModal,onClick:e=>e.stopPropagation(),children:[(0,I.jsx)(`p`,{children:i(`auth_files.too_many_files_warning`)}),(0,I.jsx)(L,{variant:`primary`,size:`sm`,onClick:()=>m(!1),children:i(`common.confirm`)})]})})]})}var Bx=70,Vx=30,Hx=async e=>{let t=rh(e.project_id??e.projectId);if(t)return t;let n=e.metadata&&typeof e.metadata==`object`&&e.metadata!==null?e.metadata:null,r=n?rh(n.project_id??n.projectId):null;if(r)return r;let i=e.attributes&&typeof e.attributes==`object`&&e.attributes!==null?e.attributes:null,a=i?rh(i.project_id??i.projectId??i.gemini_virtual_project):null;if(a)return a;try{let t=(await f_.downloadText(e.name)).trim();if(!t)return``;let n=JSON.parse(t),r=rh(n.project_id??n.projectId);if(r)return r;let i=n.installed&&typeof n.installed==`object`&&n.installed!==null?n.installed:null,a=i?rh(i.project_id??i.projectId):null;if(a)return a;let o=n.web&&typeof n.web==`object`&&n.web!==null?n.web:null,s=o?rh(o.project_id??o.projectId):null;if(s)return s}catch{return``}return``},Ux=e=>{if(!e)return null;let t=Object.entries(e).find(([e])=>e.toLowerCase()===`date`)?.[1]?.[0];if(!t)return null;let n=new Date(t).getTime();return Number.isNaN(n)?null:n-Date.now()},Wx=async(e,t)=>{let n=nh(e.auth_index??e.authIndex);if(!n)throw Error(t(`antigravity_quota.missing_auth_index`));let r=await Hx(e);if(!r)throw Error(t(`antigravity_quota.missing_project_id`));let i=JSON.stringify({project:r}),a=Qh.get(n).then(Gx).catch(()=>null),o=``,s,c,l=!1;for(let e of Hm)try{let r=await Xf.request({authIndex:n,method:`POST`,url:e,header:{...Wm},data:i});if(r.statusCode<200||r.statusCode>=300){o=Yf(r),s=r.statusCode,(r.statusCode===403||r.statusCode===404)&&(c??(c=r.statusCode));continue}l=!0;let u=lh(r.body??r.bodyText);if(!u||!Array.isArray(u.groups)){o=t(`antigravity_quota.empty_models`);continue}let d=Lh(u);if(d.length===0){o=t(`antigravity_quota.empty_models`);continue}return{groups:d,subscription:await a,serverTimeOffsetMs:Ux(r.header)}}catch(e){o=e instanceof Error?e.message:t(`common.unknown_error`);let n=Th(e);n&&(s=n,(n===403||n===404)&&(c??(c=n)))}if(l)return{groups:[],subscription:await a,serverTimeOffsetMs:null};throw wh(o||t(`common.unknown_error`),c??s)},Gx=e=>e?{plan:e.plan,tierName:e.tierName,tierId:e.tierId}:null,Kx=(e,t)=>{let n={codeFiveHour:{id:`five-hour`,labelKey:`codex_quota.primary_window`},codeWeekly:{id:`weekly`,labelKey:`codex_quota.secondary_window`},codeMonthly:{id:`monthly`,labelKey:`codex_quota.team_secondary_window`},codeReviewFiveHour:{id:`code-review-five-hour`,labelKey:`codex_quota.code_review_primary_window`},codeReviewWeekly:{id:`code-review-weekly`,labelKey:`codex_quota.code_review_secondary_window`},codeReviewMonthly:{id:`code-review-monthly`,labelKey:`codex_quota.code_review_team_secondary_window`}},r=e.rate_limit??e.rateLimit??void 0,i=e.code_review_rate_limit??e.codeReviewRateLimit??void 0,a=e.additional_rate_limits??e.additionalRateLimits??[],o=[],s=(e,t,n,r,i,a,s)=>{if(!i)return;let c=Ch(i),l=ih(i.used_percent??i.usedPercent)??((a||s===!1)&&c!==`-`?100:null);o.push({id:e,label:t,labelKey:n,labelParams:r,usedPercent:l,resetLabel:c})},c=e=>e?ih(e.limit_window_seconds??e.limitWindowSeconds):null,l=e=>{let t=c(e);return t!==null&&t>=2419200&&t<=2678400},u=(e,t,n)=>l(e)?n:t,d=r?.limit_reached??r?.limitReached,f=r?.allowed,p=(e,t)=>{let n=t?.allowOrderFallback??!0,r=e?.primary_window??e?.primaryWindow??null,i=e?.secondary_window??e?.secondaryWindow??null,a=[r,i],o=null,s=null;for(let e of a){if(!e)continue;let t=c(e);t===18e3&&!o?o=e:(t===604800||l(e))&&!s&&(s=e)}return n&&(o||(o=r&&r!==s?r:null),s||(s=i&&i!==o?i:null)),{fiveHourWindow:o,weeklyWindow:s}},m=p(r);s(n.codeFiveHour.id,t(n.codeFiveHour.labelKey),n.codeFiveHour.labelKey,void 0,m.fiveHourWindow,d,f);let h=u(m.weeklyWindow,n.codeWeekly,n.codeMonthly);s(h.id,t(h.labelKey),h.labelKey,void 0,m.weeklyWindow,d,f);let g=p(i),_=i?.limit_reached??i?.limitReached,v=i?.allowed;s(n.codeReviewFiveHour.id,t(n.codeReviewFiveHour.labelKey),n.codeReviewFiveHour.labelKey,void 0,g.fiveHourWindow,_,v);let y=u(g.weeklyWindow,n.codeReviewWeekly,n.codeReviewMonthly);s(y.id,t(y.labelKey),y.labelKey,void 0,g.weeklyWindow,_,v);let b=e=>e.trim().toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``);return Array.isArray(a)&&a.forEach((e,n)=>{let r=e?.rate_limit??e?.rateLimit??null;if(!r)return;let i=rh(e?.limit_name??e?.limitName)??rh(e?.metered_feature??e?.meteredFeature)??`additional-${n+1}`,a=b(i)||`additional-${n+1}`,o=r.primary_window??r.primaryWindow??null,c=r.secondary_window??r.secondaryWindow??null,l=r.limit_reached??r.limitReached,d=r.allowed;s(`${a}-five-hour-${n}`,t(`codex_quota.additional_primary_window`,{name:i}),`codex_quota.additional_primary_window`,{name:i},o,l,d);let f=u(c,{id:`weekly`,labelKey:`codex_quota.additional_secondary_window`},{id:`monthly`,labelKey:`codex_quota.additional_team_secondary_window`});s(`${a}-${f.id}-${n}`,t(f.labelKey,{name:i}),f.labelKey,{name:i},c,l,d)}),o},qx=async(e,t)=>{let n=nh(e.auth_index??e.authIndex);if(!n)throw Error(t(`codex_quota.missing_auth_index`));let r=vh(e),i=bh(e),a=_h(e),o={...Zm};a&&(o[`Chatgpt-Account-Id`]=a);let s=await Xf.request({authIndex:n,method:`GET`,url:Ym,header:o});if(s.statusCode<200||s.statusCode>=300)throw wh(Yf(s),s.statusCode);let c=dh(s.body??s.bodyText);if(!c)throw Error(t(`codex_quota.empty_windows`));let l=oh(c.plan_type??c.planType),u=c.rate_limit_reset_credits??c.rateLimitResetCredits??null,d=ih(u?.available_count??u?.availableCount);return{planType:l??r,subscriptionActiveUntil:i,rateLimitResetCreditsAvailableCount:d,windows:Kx(c,t)}},Jx=()=>typeof globalThis.crypto?.randomUUID==`function`?globalThis.crypto.randomUUID():`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,e=>{let t=Math.floor(Math.random()*16);return(e===`x`?t:t&3|8).toString(16)}),Yx=async(e,t)=>{let n=nh(e.auth_index??e.authIndex);if(!n)throw Error(t(`codex_quota.missing_auth_index`));let r=_h(e),i={...Zm};r&&(i[`Chatgpt-Account-Id`]=r);let a=await Xf.request({authIndex:n,method:`POST`,url:Xm,header:i,data:JSON.stringify({redeem_request_id:Jx()})});if(a.statusCode<200||a.statusCode>=300)throw wh(Yf(a),a.statusCode)},Xx=async(e,t)=>(await Yx(e,t),qx(e,t)),Zx=(e,t)=>{let n=Math.max(1,Math.ceil(t/6e4)),r=Math.floor(n/1440),i=Math.floor(n%1440/60),a=n%60;return r>0?e(`antigravity_quota.duration_day_hour`,{days:r,hours:i}):i>0?e(`antigravity_quota.duration_hour_minute`,{hours:i,minutes:a}):a>0?e(`antigravity_quota.duration_minute`,{minutes:a}):e(`antigravity_quota.duration_less_than_minute`)},Qx=(e,t,n)=>{if(!e)return`-`;let r=new Date(e).getTime();if(Number.isNaN(r))return`-`;let i=r-n;return i<=0?t(`antigravity_quota.refresh_available`):t(`antigravity_quota.refreshes_in`,{duration:Zx(t,i)})},$x=new Map([[`gemini models`,`group_gemini_models`],[`claude and gpt models`,`group_claude_gpt_models`]]),eS=new Map([[`weekly limit`,`weekly_limit`],[`daily limit`,`daily_limit`],[`5 hour limit`,`five_hour_limit`],[`5-hour limit`,`five_hour_limit`],[`five hour limit`,`five_hour_limit`],[`monthly limit`,`monthly_limit`]]),tS=e=>e.trim().toLowerCase().replace(/\s+/g,` `),nS=(e,t,n)=>{let r=t.get(tS(e));return r?n(`antigravity_quota.${r}`):e},rS=(e,t)=>{if(!e)return;let n=e.match(/^models within this group:\s*(.+)$/i);return n?t(`antigravity_quota.group_models_description`,{models:n[1].trim()}):e},iS=(e,t)=>e?e.plan===`free`?t(`antigravity_subscription.plan_free`):e.plan===`pro`?t(`antigravity_subscription.plan_pro`):e.plan===`ultra`?t(`antigravity_subscription.plan_ultra`):e.plan===`ultra-lite`?t(`antigravity_subscription.plan_ultra_lite`):e.tierName||e.tierId||(e.plan===`unknown`?t(`antigravity_subscription.plan_unknown`):null):null,aS=(e,t,n)=>{let{styles:r,QuotaProgressBar:i}=n,{createElement:a,Fragment:o}=y.default,s=e.groups??[],c=[],l=iS(e.subscription,t),u=e.subscription?.plan?.toLowerCase()??``,d=u===`ultra`||u===`ultra-lite`;if(l&&c.push(a(`div`,{key:`plan`,className:r.codexPlan},a(`span`,{className:r.codexPlanItem},a(`span`,{className:r.codexPlanLabel},t(`antigravity_quota.plan_label`)),a(`span`,{className:d?r.premiumPlanValue:r.codexPlanValue},l)))),s.length===0)return c.push(a(`div`,{key:`empty`,className:r.quotaMessage},t(`antigravity_quota.empty_models`))),a(o,null,...c);let f=Date.now()+(e.serverTimeOffsetMs??0);return c.push(...s.map(e=>{let n=nS(e.label,$x,t),o=rS(e.description,t);return a(`div`,{key:e.id,className:r.antigravityQuotaGroup},a(`div`,{className:r.antigravityQuotaGroupHeader},a(`span`,{className:r.antigravityQuotaGroupTitle},n),o?a(`span`,{className:r.antigravityQuotaGroupDescription},o):null),...e.buckets.map(e=>{let n=Math.max(0,Math.min(1,e.remainingFraction))*100,o=e.remainingFraction===1?t(`antigravity_quota.quota_available`):t(`antigravity_quota.remaining_percent`,{percent:Math.round(n)}),s=Qx(e.resetTime,t,f),c=nS(e.label,eS,t),l=rS(e.description,t);return a(`div`,{key:e.id,className:r.quotaRow},a(`div`,{className:r.quotaRowHeader},a(`span`,{className:r.quotaModel,title:l},c),a(`div`,{className:r.quotaMeta},a(`span`,{className:r.quotaPercent},o),a(`span`,{className:r.quotaReset},s))),a(i,{percent:n,highThreshold:Bx,mediumThreshold:Vx}))}))})),a(o,null,...c)},oS=new Set([`pro`,`prolite`,`pro-lite`,`pro_lite`]),sS=(e,t,n)=>{let{styles:r,QuotaProgressBar:i}=n,{createElement:a,Fragment:o}=y.default,s=e.windows??[],c=e.planType??null,l=e.subscriptionActiveUntil??null,u=e.rateLimitResetCreditsAvailableCount??null,d=(e=>{let n=oh(e);return n?n===`pro`?t(`codex_quota.plan_pro`):oS.has(n)&&n!==`pro`?t(`codex_quota.plan_prolite`):n===`plus`?t(`codex_quota.plan_plus`):n===`team`?t(`codex_quota.plan_team`):n===`free`?t(`codex_quota.plan_free`):e||n:null})(c),f=oS.has(oh(c)??``),p=l?Q_(l):``,m=[];if(d||p||u!==null){let e=f?r.premiumPlanValue:r.codexPlanValue,n=[],i=(e,t,i,o=r.codexPlanValue)=>{n.push(a(`span`,{key:e,className:r.codexPlanItem},a(`span`,{className:r.codexPlanLabel},t),a(`span`,{className:o},i)))};d&&i(`plan-type`,t(`codex_quota.plan_label`),d,e),p&&i(`subscription-expiry`,t(`codex_quota.expires_label`),p),u!==null&&i(`reset-credits`,t(`codex_quota.reset_credits_label`),u.toString()),m.push(a(`div`,{key:`plan`,className:r.codexPlan},...n))}return s.length===0?(m.push(a(`div`,{key:`empty`,className:r.quotaMessage},t(`codex_quota.empty_windows`))),a(o,null,...m)):(m.push(...s.map(e=>{let n=e.usedPercent,o=n===null?null:Math.max(0,Math.min(100,n)),s=o===null?null:Math.max(0,Math.min(100,100-o)),c=s===null?`--`:`${Math.round(s)}%`,l=e.labelKey?t(e.labelKey,e.labelParams):e.label;return a(`div`,{key:e.id,className:r.quotaRow},a(`div`,{className:r.quotaRowHeader},a(`span`,{className:r.quotaModel},l),a(`div`,{className:r.quotaMeta},a(`span`,{className:r.quotaPercent},c),a(`span`,{className:r.quotaReset},e.resetLabel))),a(i,{percent:s,highThreshold:Bx,mediumThreshold:Vx}))})),a(o,null,...m))},cS=(e,t)=>{let n=[];for(let{key:r,id:i,labelKey:a}of Jm){let o=e[r];if(!o||typeof o!=`object`||!(`utilization`in o))continue;let s=o,c=ih(s.utilization),l=xh(s.resets_at);n.push({id:i,label:t(a),labelKey:a,usedPercent:c,resetLabel:l})}return n},lS=e=>{if(e!=null){if(typeof e==`boolean`)return e;if(typeof e==`number`)return e!==0;if(typeof e==`string`){let t=e.trim().toLowerCase();if([`true`,`1`,`yes`,`y`,`on`].includes(t))return!0;if([`false`,`0`,`no`,`n`,`off`].includes(t))return!1}}},uS=e=>{if(e==null)return null;if(typeof e==`string`){let t=e.trim();if(!t)return null;try{return JSON.parse(t)}catch{return null}}return typeof e==`object`?e:null},dS=e=>{if(!e)return null;let t=lS(e.account?.has_claude_max);if(t)return`plan_max`;let n=lS(e.account?.has_claude_pro);if(n)return`plan_pro`;let r=rh(e.organization?.organization_type)?.toLowerCase(),i=rh(e.organization?.subscription_status)?.toLowerCase();return r===`claude_team`&&i===`active`?`plan_team`:t===!1&&n===!1?`plan_free`:null},fS={type:`claude`,i18nPrefix:`claude_quota`,cardIdleMessageKey:`quota_management.card_idle_hint`,filterFn:e=>kh(e)&&!Nh(e),fetchQuota:async(e,t)=>{let n=nh(e.auth_index??e.authIndex);if(!n)throw Error(t(`claude_quota.missing_auth_index`));let[r,i]=await Promise.allSettled([Xf.request({authIndex:n,method:`GET`,url:Km,header:{...qm}}),Xf.request({authIndex:n,method:`GET`,url:Gm,header:{...qm}})]);if(r.status===`rejected`)throw r.reason;let a=r.value;if(a.statusCode<200||a.statusCode>=300)throw wh(Yf(a),a.statusCode);let o=uh(a.body??a.bodyText);if(!o)throw Error(t(`claude_quota.empty_windows`));let s=cS(o,t),c=i.status===`fulfilled`&&i.value.statusCode>=200&&i.value.statusCode<300?dS(uS(i.value.body??i.value.bodyText)):null;return{windows:s,extraUsage:o.extra_usage,planType:c}},storeSelector:e=>e.claudeQuota,storeSetter:`setClaudeQuota`,buildLoadingState:()=>({status:`loading`,windows:[]}),buildSuccessState:e=>({status:`success`,windows:e.windows,extraUsage:e.extraUsage,planType:e.planType}),buildErrorState:(e,t)=>({status:`error`,windows:[],error:e,errorStatus:t}),cardClassName:Ax.claudeCard,controlsClassName:Ax.claudeControls,controlClassName:Ax.claudeControl,gridClassName:Ax.claudeGrid,renderQuotaItems:(e,t,n)=>{let{styles:r,QuotaProgressBar:i}=n,{createElement:a,Fragment:o}=y.default,s=e.windows??[],c=e.extraUsage??null,l=e.planType??null,u=[];if(l&&u.push(a(`div`,{key:`plan`,className:r.codexPlan},a(`span`,{className:r.codexPlanLabel},t(`claude_quota.plan_label`)),a(`span`,{className:r.codexPlanValue},t(`claude_quota.${l}`)))),c&&c.is_enabled){let e=`$${(c.used_credits/100).toFixed(2)} / $${(c.monthly_limit/100).toFixed(2)}`;u.push(a(`div`,{key:`extra`,className:r.codexPlan},a(`span`,{className:r.codexPlanLabel},t(`claude_quota.extra_usage_label`)),a(`span`,{className:r.codexPlanValue},e)))}return s.length===0?(u.push(a(`div`,{key:`empty`,className:r.quotaMessage},t(`claude_quota.empty_windows`))),a(o,null,...u)):(u.push(...s.map(e=>{let n=e.usedPercent,o=n===null?null:Math.max(0,Math.min(100,n)),s=o===null?null:Math.max(0,Math.min(100,100-o)),c=s===null?`--`:`${Math.round(s)}%`,l=e.labelKey?t(e.labelKey):e.label;return a(`div`,{key:e.id,className:r.quotaRow},a(`div`,{className:r.quotaRowHeader},a(`span`,{className:r.quotaModel},l),a(`div`,{className:r.quotaMeta},a(`span`,{className:r.quotaPercent},c),a(`span`,{className:r.quotaReset},e.resetLabel))),a(i,{percent:s,highThreshold:Bx,mediumThreshold:Vx}))})),a(o,null,...u))}},pS={type:`antigravity`,i18nPrefix:`antigravity_quota`,cardIdleMessageKey:`quota_management.card_idle_hint`,filterFn:e=>Oh(e)&&!Nh(e),fetchQuota:Wx,storeSelector:e=>e.antigravityQuota,storeSetter:`setAntigravityQuota`,buildLoadingState:()=>({status:`loading`,groups:[],subscription:null,serverTimeOffsetMs:null}),buildSuccessState:e=>({status:`success`,groups:e.groups,subscription:e.subscription,serverTimeOffsetMs:e.serverTimeOffsetMs}),buildErrorState:(e,t)=>({status:`error`,groups:[],subscription:null,serverTimeOffsetMs:null,error:e,errorStatus:t}),cardClassName:Ax.antigravityCard,controlsClassName:Ax.antigravityControls,controlClassName:Ax.antigravityControl,gridClassName:Ax.antigravityGrid,renderQuotaItems:aS},mS={type:`codex`,i18nPrefix:`codex_quota`,cardIdleMessageKey:`quota_management.card_idle_hint`,filterFn:e=>Ah(e)&&!Nh(e),fetchQuota:qx,resetQuota:Xx,canResetQuota:e=>(e.rateLimitResetCreditsAvailableCount??0)>0,storeSelector:e=>e.codexQuota,storeSetter:`setCodexQuota`,buildLoadingState:()=>({status:`loading`,windows:[]}),buildSuccessState:e=>({status:`success`,windows:e.windows,planType:e.planType,subscriptionActiveUntil:e.subscriptionActiveUntil,rateLimitResetCreditsAvailableCount:e.rateLimitResetCreditsAvailableCount}),buildErrorState:(e,t)=>({status:`error`,windows:[],error:e,errorStatus:t}),cardClassName:Ax.codexCard,controlsClassName:Ax.codexControls,controlClassName:Ax.codexControl,gridClassName:Ax.codexGrid,renderQuotaItems:sS},hS=async(e,t)=>{let n=nh(e.auth_index??e.authIndex);if(!n)throw Error(t(`kimi_quota.missing_auth_index`));let r=await Xf.request({authIndex:n,method:`GET`,url:Qm,header:{...$m}});if(r.statusCode<200||r.statusCode>=300)throw wh(Yf(r),r.statusCode);let i=fh(r.body??r.bodyText);if(!i)throw Error(t(`kimi_quota.empty_data`));return Uh(i)},gS=(e,t,n)=>{let{styles:r,QuotaProgressBar:i}=n,{createElement:a}=y.default,o=e.rows??[];return o.length===0?a(`div`,{className:r.quotaMessage},t(`kimi_quota.empty_data`)):o.map(e=>{let n=e.limit,o=e.used,s=n>0?Math.max(0,Math.min(100,Math.round((n-o)/n*100))):o>0?0:null,c=s===null?`--`:`${s}%`,l=e.labelKey?t(e.labelKey,e.labelParams??{}):e.label??``,u=Eh(t,e.resetHint);return a(`div`,{key:e.id,className:r.quotaRow},a(`div`,{className:r.quotaRowHeader},a(`span`,{className:r.quotaModel},l),a(`div`,{className:r.quotaMeta},a(`span`,{className:r.quotaPercent},c),n>0?a(`span`,{className:r.quotaAmount},`${o} / ${n}`):null,u?a(`span`,{className:r.quotaReset},u):null)),a(i,{percent:s,highThreshold:Bx,mediumThreshold:Vx}))})},_S=e=>e==null?null:ih(typeof e==`object`&&!Array.isArray(e)?e.val:e),vS=e=>{if(!e||typeof e!=`object`)return null;let t=_S(e.monthlyLimit??e.monthly_limit),n=_S(e.used),r=_S(e.onDemandCap??e.on_demand_cap),i=rh(e.billingPeriodStart??e.billing_period_start)??void 0,a=rh(e.billingPeriodEnd??e.billing_period_end)??void 0;return t===null&&n===null&&r===null&&!a?null:{monthlyLimitCents:t,usedCents:n,onDemandCapCents:r,billingPeriodStart:i,billingPeriodEnd:a,usedPercent:t!==null&&t>0&&n!==null?n/t*100:null}},yS=async(e,t)=>{let n=nh(e.auth_index??e.authIndex);if(!n)throw Error(t(`xai_quota.missing_auth_index`));let r=await Xf.request({authIndex:n,method:`GET`,url:eh,header:{...th}});if(r.statusCode<200||r.statusCode>=300)throw wh(Yf(r),r.statusCode);let i=vS(ph(r.body??r.bodyText)?.config);if(!i)throw Error(t(`xai_quota.empty_data`));return i},bS=e=>e===null?`--`:new Intl.NumberFormat(void 0,{style:`currency`,currency:`USD`}).format(e/100),xS=e=>{let t=bS(e.monthlyLimitCents!==null&&e.usedCents!==null?Math.max(0,e.monthlyLimitCents-e.usedCents):null),n=bS(e.monthlyLimitCents);return e.monthlyLimitCents===null?t:`${t} / ${n}`},SS=15e3,CS=15e4,wS=e=>e===SS?{labelKey:`plan_supergrok`,premium:!1}:e===CS?{labelKey:`plan_supergrok_heavy`,premium:!0}:null,TS=(e,t,n)=>{let{styles:r,QuotaProgressBar:i}=n,{createElement:a,Fragment:o}=y.default,s=e.billing;if(!s)return a(`div`,{className:r.quotaMessage},t(`xai_quota.empty_data`));let c=s.usedPercent===null?null:Math.max(0,Math.min(100,s.usedPercent)),l=c===null?null:Math.max(0,Math.min(100,100-c)),u=l===null?`--`:`${Math.round(l)}%`,d=xS(s),f=xh(s.billingPeriodEnd),p=s.onDemandCapCents??0,m=wS(s.monthlyLimitCents),h=p>0?t(`xai_quota.pay_as_you_go_enabled`,{cap:bS(p)}):t(`xai_quota.pay_as_you_go_disabled`);return a(o,null,m?a(`div`,{key:`plan`,className:r.codexPlan},a(`span`,{className:r.codexPlanLabel},t(`xai_quota.plan_label`)),a(`span`,{className:m.premium?r.premiumPlanValue:r.codexPlanValue},t(`xai_quota.${m.labelKey}`))):null,a(`div`,{key:`pay-as-you-go`,className:r.codexPlan},a(`span`,{className:r.codexPlanLabel},t(`xai_quota.pay_as_you_go_label`)),a(`span`,{className:r.codexPlanValue},h)),a(`div`,{key:`monthly-credits`,className:r.quotaRow},a(`div`,{className:r.quotaRowHeader},a(`span`,{className:r.quotaModel},t(`xai_quota.monthly_credits`)),a(`div`,{className:r.quotaMeta},a(`span`,{className:r.quotaPercent},u),a(`span`,{className:r.quotaAmount},d),a(`span`,{className:r.quotaReset},f))),a(i,{percent:l,highThreshold:Bx,mediumThreshold:Vx})))},ES={type:`kimi`,i18nPrefix:`kimi_quota`,cardIdleMessageKey:`quota_management.card_idle_hint`,filterFn:e=>jh(e)&&!Nh(e),fetchQuota:hS,storeSelector:e=>e.kimiQuota,storeSetter:`setKimiQuota`,buildLoadingState:()=>({status:`loading`,rows:[]}),buildSuccessState:e=>({status:`success`,rows:e}),buildErrorState:(e,t)=>({status:`error`,rows:[],error:e,errorStatus:t}),cardClassName:Ax.kimiCard,controlsClassName:Ax.kimiControls,controlClassName:Ax.kimiControl,gridClassName:Ax.kimiGrid,renderQuotaItems:gS},DS={type:`xai`,i18nPrefix:`xai_quota`,cardIdleMessageKey:`quota_management.card_idle_hint`,filterFn:e=>Mh(e)&&!Nh(e),fetchQuota:yS,storeSelector:e=>e.xaiQuota,storeSetter:`setXaiQuota`,buildLoadingState:()=>({status:`loading`,billing:null}),buildSuccessState:e=>({status:`success`,billing:e}),buildErrorState:(e,t)=>({status:`error`,billing:null,error:e,errorStatus:t}),cardClassName:Ax.xaiCard,controlsClassName:Ax.xaiControls,controlClassName:Ax.xaiControl,gridClassName:Ax.xaiGrid,renderQuotaItems:TS},H={container:`AuthFilesPage-module__container___u1c4k`,pageHeader:`AuthFilesPage-module__pageHeader___DVV58`,pageTitle:`AuthFilesPage-module__pageTitle___1TOZn`,description:`AuthFilesPage-module__description___N3RjR`,headerActions:`AuthFilesPage-module__headerActions___j0ROO`,titleWrapper:`AuthFilesPage-module__titleWrapper___PLYyj`,countBadge:`AuthFilesPage-module__countBadge___DQWug`,errorBox:`AuthFilesPage-module__errorBox___A9vF2`,filterSection:`AuthFilesPage-module__filterSection___qQ3Zo`,filterRail:`AuthFilesPage-module__filterRail___YRraq`,filterAllIconWrap:`AuthFilesPage-module__filterAllIconWrap___jMF1r`,filterAllIcon:`AuthFilesPage-module__filterAllIcon___mqchB`,filterContent:`AuthFilesPage-module__filterContent___xfK-G`,filterTags:`AuthFilesPage-module__filterTags___A24A3`,filterTag:`AuthFilesPage-module__filterTag___-YnCU`,filterTagActive:`AuthFilesPage-module__filterTagActive___Rnbcs`,filterTagIconWrap:`AuthFilesPage-module__filterTagIconWrap___pN6-v`,filterTagLabel:`AuthFilesPage-module__filterTagLabel___pP8yh`,filterTagIcon:`AuthFilesPage-module__filterTagIcon___j068V`,filterTagIconFallback:`AuthFilesPage-module__filterTagIconFallback___4ALgn`,filterTagText:`AuthFilesPage-module__filterTagText___b9X07`,filterTagCount:`AuthFilesPage-module__filterTagCount___RxSVk`,filterControlsPanel:`AuthFilesPage-module__filterControlsPanel___V-IZn`,filterControls:`AuthFilesPage-module__filterControls___PfZDU`,filterSearchItem:`AuthFilesPage-module__filterSearchItem___G3Ly6`,filterItem:`AuthFilesPage-module__filterItem___Kko4o`,filterToggleItem:`AuthFilesPage-module__filterToggleItem___m2sGr`,filterToggleGroup:`AuthFilesPage-module__filterToggleGroup___TdMH-`,filterToggleCard:`AuthFilesPage-module__filterToggleCard___N4oxi`,filterToggle:`AuthFilesPage-module__filterToggle___mi9Sd`,filterToggleLabel:`AuthFilesPage-module__filterToggleLabel___5rAlu`,searchInput:`AuthFilesPage-module__searchInput___-3dd7`,searchIcon:`AuthFilesPage-module__searchIcon___td5EK`,pageSizeSelect:`AuthFilesPage-module__pageSizeSelect___yEBvp`,fileGrid:`AuthFilesPage-module__fileGrid___ajvi5`,fileGridQuotaManaged:`AuthFilesPage-module__fileGridQuotaManaged___kOhRx`,fileGridCompact:`AuthFilesPage-module__fileGridCompact___meaAl`,antigravityGrid:`AuthFilesPage-module__antigravityGrid___N7Got`,codexGrid:`AuthFilesPage-module__codexGrid___vLB3H`,antigravityControls:`AuthFilesPage-module__antigravityControls___gn3rt`,antigravityControl:`AuthFilesPage-module__antigravityControl___rQ8wo`,codexControls:`AuthFilesPage-module__codexControls___Clxl6`,codexControl:`AuthFilesPage-module__codexControl___E7Mtk`,antigravityCard:`AuthFilesPage-module__antigravityCard___rt36l`,claudeCard:`AuthFilesPage-module__claudeCard___L-dIs`,codexCard:`AuthFilesPage-module__codexCard___FiEQ6`,kimiCard:`AuthFilesPage-module__kimiCard___zWq5C`,xaiCard:`AuthFilesPage-module__xaiCard___EW-0Z`,quotaSection:`AuthFilesPage-module__quotaSection___hXy5f`,quotaRow:`AuthFilesPage-module__quotaRow___P2dUi`,antigravityQuotaGroup:`AuthFilesPage-module__antigravityQuotaGroup___-1dZn`,antigravityQuotaGroupHeader:`AuthFilesPage-module__antigravityQuotaGroupHeader___0XV-S`,antigravityQuotaGroupTitle:`AuthFilesPage-module__antigravityQuotaGroupTitle___Wv00F`,antigravityQuotaGroupDescription:`AuthFilesPage-module__antigravityQuotaGroupDescription___efR87`,quotaRowHeader:`AuthFilesPage-module__quotaRowHeader___IKu7H`,quotaModel:`AuthFilesPage-module__quotaModel___huwv6`,quotaBar:`AuthFilesPage-module__quotaBar___ex7am`,quotaBarFill:`AuthFilesPage-module__quotaBarFill___KqH7M`,quotaBarFillHigh:`AuthFilesPage-module__quotaBarFillHigh___F8WGP`,quotaBarFillMedium:`AuthFilesPage-module__quotaBarFillMedium___ae0Pi`,quotaBarFillLow:`AuthFilesPage-module__quotaBarFillLow___dX4lb`,quotaMeta:`AuthFilesPage-module__quotaMeta___HcbUH`,quotaPercent:`AuthFilesPage-module__quotaPercent___6J9UR`,quotaReset:`AuthFilesPage-module__quotaReset___bmEse`,quotaAmount:`AuthFilesPage-module__quotaAmount___k3Wx6`,quotaMessage:`AuthFilesPage-module__quotaMessage___1w3oM`,quotaMessageAction:`AuthFilesPage-module__quotaMessageAction___9r9cq`,quotaResetCreditButton:`AuthFilesPage-module__quotaResetCreditButton___nOyaf`,quotaCardActions:`AuthFilesPage-module__quotaCardActions___jIyFS`,quotaError:`AuthFilesPage-module__quotaError___dEV4B`,quotaWarning:`AuthFilesPage-module__quotaWarning___G1Tvc`,codexPlan:`AuthFilesPage-module__codexPlan___4IbAU`,codexPlanItem:`AuthFilesPage-module__codexPlanItem___MGwEH`,codexPlanLabel:`AuthFilesPage-module__codexPlanLabel___RZN4K`,codexPlanValue:`AuthFilesPage-module__codexPlanValue___Z0Kgr`,codexPlanSeparator:`AuthFilesPage-module__codexPlanSeparator___t84wX`,premiumPlanValue:`AuthFilesPage-module__premiumPlanValue___9WyhU`,subscriptionBadgePremium:`AuthFilesPage-module__subscriptionBadgePremium___VRQC9`,fileCard:`AuthFilesPage-module__fileCard___j9Jtq`,fileCardSelected:`AuthFilesPage-module__fileCardSelected___9i7m1`,fileCardDisabled:`AuthFilesPage-module__fileCardDisabled___hbSbQ`,providerAvatar:`AuthFilesPage-module__providerAvatar___4xnYu`,cardHeaderContent:`AuthFilesPage-module__cardHeaderContent___rh9WP`,cardMeta:`AuthFilesPage-module__cardMeta___H6kAQ`,healthStatusMessage:`AuthFilesPage-module__healthStatusMessage___KKfW-`,subscriptionError:`AuthFilesPage-module__subscriptionError___xaqEd`,cardInsights:`AuthFilesPage-module__cardInsights___ci5AY`,cardSelection:`AuthFilesPage-module__cardSelection___wOE11`,cardActions:`AuthFilesPage-module__cardActions___mJgkW`,fileCardCompact:`AuthFilesPage-module__fileCardCompact___u9yZu`,fileCardMain:`AuthFilesPage-module__fileCardMain___6JwC7`,cardHeader:`AuthFilesPage-module__cardHeader___uJMtL`,providerAvatarImage:`AuthFilesPage-module__providerAvatarImage___QL5oK`,providerAvatarFallback:`AuthFilesPage-module__providerAvatarFallback___H9Mgn`,cardBadgeRow:`AuthFilesPage-module__cardBadgeRow___SeOzZ`,typeBadge:`AuthFilesPage-module__typeBadge___Dtm6A`,stateBadge:`AuthFilesPage-module__stateBadge___Cq7id`,subscriptionBadge:`AuthFilesPage-module__subscriptionBadge___vP30K`,fileName:`AuthFilesPage-module__fileName___DZ39s`,cardActionsMain:`AuthFilesPage-module__cardActionsMain___9Lsw7`,primaryActionButton:`AuthFilesPage-module__primaryActionButton___ex-Us`,cardUtilityActions:`AuthFilesPage-module__cardUtilityActions___LX5uj`,iconButton:`AuthFilesPage-module__iconButton___XT5TY`,statusToggle:`AuthFilesPage-module__statusToggle___H8bxD`,statusToggleLabel:`AuthFilesPage-module__statusToggleLabel___Wdwo7`,fileCardLayout:`AuthFilesPage-module__fileCardLayout___HRpBj`,stateBadgeActive:`AuthFilesPage-module__stateBadgeActive___Fo6ts`,stateBadgeWarning:`AuthFilesPage-module__stateBadgeWarning___vMjci`,stateBadgeDisabled:`AuthFilesPage-module__stateBadgeDisabled___uB-Ra`,stateBadgeVirtual:`AuthFilesPage-module__stateBadgeVirtual___Ig7fr`,subscriptionBadgeLoading:`AuthFilesPage-module__subscriptionBadgeLoading___MOER-`,subscriptionBadgeFree:`AuthFilesPage-module__subscriptionBadgeFree___rJzzo`,subscriptionBadgePaid:`AuthFilesPage-module__subscriptionBadgePaid___0lu-a`,subscriptionBadgeUnknown:`AuthFilesPage-module__subscriptionBadgeUnknown___PxvCn`,subscriptionBadgeError:`AuthFilesPage-module__subscriptionBadgeError___VmSzr`,cardMetaCompact:`AuthFilesPage-module__cardMetaCompact___h-CkT`,metaLabel:`AuthFilesPage-module__metaLabel___4mGPs`,metaValue:`AuthFilesPage-module__metaValue___VKbWa`,metaItem:`AuthFilesPage-module__metaItem___f62C0`,priorityBadge:`AuthFilesPage-module__priorityBadge___vHY0g`,priorityValue:`AuthFilesPage-module__priorityValue___cH2dN`,noteText:`AuthFilesPage-module__noteText___xsgqc`,noteLabel:`AuthFilesPage-module__noteLabel___DrD8k`,noteValue:`AuthFilesPage-module__noteValue___-wZpH`,subscriptionSubtitle:`AuthFilesPage-module__subscriptionSubtitle___oUyH9`,subscriptionSubtitleLabel:`AuthFilesPage-module__subscriptionSubtitleLabel___ZCx0J`,subscriptionSubtitleValue:`AuthFilesPage-module__subscriptionSubtitleValue___CRebG`,sortSelect:`AuthFilesPage-module__sortSelect___4fEjm`,messageIcon:`AuthFilesPage-module__messageIcon___X3Cwx`,cardInsightsCompact:`AuthFilesPage-module__cardInsightsCompact___y0Q4G`,cardStats:`AuthFilesPage-module__cardStats___JQ4ig`,cardStatsCompact:`AuthFilesPage-module__cardStatsCompact___gRvUT`,statPill:`AuthFilesPage-module__statPill___wFsBu`,statLabel:`AuthFilesPage-module__statLabel___x0iKO`,statValue:`AuthFilesPage-module__statValue___0Cyg5`,statSuccess:`AuthFilesPage-module__statSuccess___mh8iR`,statFailure:`AuthFilesPage-module__statFailure___ivDGu`,statusPanel:`AuthFilesPage-module__statusPanel___jxcFi`,statusPanelCompact:`AuthFilesPage-module__statusPanelCompact___qla9F`,statusPanelLabel:`AuthFilesPage-module__statusPanelLabel___D3k8N`,statusBar:`AuthFilesPage-module__statusBar___n-3Gp`,statusBlocks:`AuthFilesPage-module__statusBlocks___DpQaY`,statusBlockWrapper:`AuthFilesPage-module__statusBlockWrapper___XCgvC`,statusRate:`AuthFilesPage-module__statusRate___LZm5e`,statusBlock:`AuthFilesPage-module__statusBlock___RPMAs`,statusBlockActive:`AuthFilesPage-module__statusBlockActive___pjNyd`,statusBlockIdle:`AuthFilesPage-module__statusBlockIdle___6Uc0C`,statusTooltip:`AuthFilesPage-module__statusTooltip___skNaB`,statusTooltipLeft:`AuthFilesPage-module__statusTooltipLeft___ZK0OM`,statusTooltipRight:`AuthFilesPage-module__statusTooltipRight___MrcVP`,tooltipTime:`AuthFilesPage-module__tooltipTime___6rx7A`,tooltipStats:`AuthFilesPage-module__tooltipStats___rDF8h`,tooltipSuccess:`AuthFilesPage-module__tooltipSuccess___DygUj`,tooltipFailure:`AuthFilesPage-module__tooltipFailure___Som0h`,tooltipRate:`AuthFilesPage-module__tooltipRate___gbhZZ`,statusRateHigh:`AuthFilesPage-module__statusRateHigh___seYyb`,statusRateMedium:`AuthFilesPage-module__statusRateMedium___aNblo`,statusRateLow:`AuthFilesPage-module__statusRateLow___BxxBi`,prefixProxyEditor:`AuthFilesPage-module__prefixProxyEditor___QyoN1`,prefixProxyLoading:`AuthFilesPage-module__prefixProxyLoading___pipJw`,prefixProxyError:`AuthFilesPage-module__prefixProxyError___HNtOZ`,prefixProxyJsonWrapper:`AuthFilesPage-module__prefixProxyJsonWrapper___j237Y`,prefixProxyLabel:`AuthFilesPage-module__prefixProxyLabel___IJHtd`,prefixProxyTextarea:`AuthFilesPage-module__prefixProxyTextarea___wcym6`,prefixProxyInvalidContentPreview:`AuthFilesPage-module__prefixProxyInvalidContentPreview___WnKvR`,prefixProxyFields:`AuthFilesPage-module__prefixProxyFields___da72p`,prefixProxyTextareaInvalid:`AuthFilesPage-module__prefixProxyTextareaInvalid___CNpvm`,modelsActionButton:`AuthFilesPage-module__modelsActionButton___-ihP6`,modelsActionIconWrap:`AuthFilesPage-module__modelsActionIconWrap___KD-87`,actionButtonLabel:`AuthFilesPage-module__actionButtonLabel___B0RSa`,actionIcon:`AuthFilesPage-module__actionIcon___F2TRI`,pagination:`AuthFilesPage-module__pagination___Hwpg2`,batchActionContainer:`AuthFilesPage-module__batchActionContainer___qPwxN`,batchActionBar:`AuthFilesPage-module__batchActionBar___YEJju`,batchActionLeft:`AuthFilesPage-module__batchActionLeft___g851y`,batchActionRight:`AuthFilesPage-module__batchActionRight___NDPeh`,batchSelectionText:`AuthFilesPage-module__batchSelectionText___rSTLk`,pageInfo:`AuthFilesPage-module__pageInfo___Fkfbg`,excludedList:`AuthFilesPage-module__excludedList___9OGiS`,excludedItem:`AuthFilesPage-module__excludedItem___J3Xxa`,excludedInfo:`AuthFilesPage-module__excludedInfo___0hKQa`,excludedProvider:`AuthFilesPage-module__excludedProvider___6pkYz`,excludedModels:`AuthFilesPage-module__excludedModels___QdpJB`,excludedActions:`AuthFilesPage-module__excludedActions___jP49M`,providerField:`AuthFilesPage-module__providerField___end0y`,providerTagList:`AuthFilesPage-module__providerTagList___dCCYW`,providerTag:`AuthFilesPage-module__providerTag___RADdc`,providerTagActive:`AuthFilesPage-module__providerTagActive___j4vQJ`,aliasChartSection:`AuthFilesPage-module__aliasChartSection___uS-yX`,aliasChartHeader:`AuthFilesPage-module__aliasChartHeader___ABhkk`,aliasChartTitle:`AuthFilesPage-module__aliasChartTitle___OSz75`,aliasChart:`AuthFilesPage-module__aliasChart___XbONn`,cardExtraButtons:`AuthFilesPage-module__cardExtraButtons___P-fL4`,viewModeSwitch:`AuthFilesPage-module__viewModeSwitch___CxLpP`,mappingRow:`AuthFilesPage-module__mappingRow___b1MBs`,mappingSeparator:`AuthFilesPage-module__mappingSeparator___Wx18F`,mappingFork:`AuthFilesPage-module__mappingFork___nRhwu`,detailContent:`AuthFilesPage-module__detailContent___K3wet`,jsonContent:`AuthFilesPage-module__jsonContent___5lYBo`,formGroup:`AuthFilesPage-module__formGroup___1YGlp`,textarea:`AuthFilesPage-module__textarea___IAg4a`,hint:`AuthFilesPage-module__hint___YExGS`,modelsList:`AuthFilesPage-module__modelsList___KKhRE`,modelItem:`AuthFilesPage-module__modelItem___VMfPD`,modelId:`AuthFilesPage-module__modelId___4wMUh`,modelDisplayName:`AuthFilesPage-module__modelDisplayName___znKrk`,modelType:`AuthFilesPage-module__modelType___B0C7D`,modelItemExcluded:`AuthFilesPage-module__modelItemExcluded___I5sBn`,modelExcludedBadge:`AuthFilesPage-module__modelExcludedBadge___FyRdH`,excludedCheckList:`AuthFilesPage-module__excludedCheckList___8T3-H`,excludedCheckItem:`AuthFilesPage-module__excludedCheckItem___2z42k`,excludedCheckLabel:`AuthFilesPage-module__excludedCheckLabel___tg4BJ`,excludedCheckDisplayName:`AuthFilesPage-module__excludedCheckDisplayName___Cno8d`};function OS({percent:e,highThreshold:t,mediumThreshold:n}){let r=e===null?null:((e,t,n)=>Math.min(n,Math.max(t,e)))(e,0,100),i=r===null?H.quotaBarFillMedium:r>=t?H.quotaBarFillHigh:r>=n?H.quotaBarFillMedium:H.quotaBarFillLow,a=Math.round((r??0)*100)/100;return(0,I.jsx)(`div`,{className:H.quotaBar,children:(0,I.jsx)(`div`,{className:`${H.quotaBarFill} ${i}`,style:{width:`${a}%`}})})}var kS=e=>{throw Error(`Unsupported quota type: ${e}`)},AS=e=>e===`antigravity`?pS:e===`claude`?fS:e===`codex`?mS:e===`kimi`?ES:e===`xai`?DS:kS(e);function jS(e){let{file:t,quotaType:n,disableControls:r}=e,{t:i}=Xo(),a=Fc(e=>e.showNotification),o=Fc(e=>e.showConfirmation),[s,c]=(0,y.useState)(!1),l=gp(e=>n===`antigravity`?e.antigravityQuota[t.name]:n===`claude`?e.claudeQuota[t.name]:n===`codex`?e.codexQuota[t.name]:n===`kimi`?e.kimiQuota[t.name]:n===`xai`?e.xaiQuota[t.name]:kS(n)),u=gp(e=>n===`antigravity`?e.setAntigravityQuota:n===`claude`?e.setClaudeQuota:n===`codex`?e.setCodexQuota:n===`kimi`?e.setKimiQuota:n===`xai`?e.setXaiQuota:kS(n)),d=(0,y.useCallback)(async()=>{if(r||Ex(t)||t.disabled||l?.status===`loading`)return;let e=AS(n);u(n=>({...n,[t.name]:e.buildLoadingState()}));try{let n=await e.fetchQuota(t,i);u(r=>({...r,[t.name]:e.buildSuccessState(n)})),a(i(`auth_files.quota_refresh_success`,{name:t.name}),`success`)}catch(n){let r=n instanceof Error?n.message:i(`common.unknown_error`),o=Th(n);u(n=>({...n,[t.name]:e.buildErrorState(r,o)})),a(i(`auth_files.quota_refresh_failed`,{name:t.name,message:r}),`error`)}},[r,t,l?.status,n,a,i,u]),f=(0,y.useCallback)(()=>{if(r||Ex(t)||t.disabled||l?.status===`loading`||s)return;let e=AS(n),d=e.resetQuota;d&&o({title:i(`codex_quota.reset_confirm_title`),message:i(`codex_quota.reset_confirm_message`,{name:t.name}),confirmText:i(`codex_quota.reset_confirm_button`),variant:`primary`,onConfirm:async()=>{c(!0);try{let n=await d(t,i);u(r=>({...r,[t.name]:e.buildSuccessState(n)})),a(i(`codex_quota.reset_success`,{name:t.name}),`success`)}catch(e){let n=e instanceof Error?e.message:i(`common.unknown_error`);a(i(`codex_quota.reset_failed`,{name:t.name,message:n}),`error`)}finally{c(!1)}}})},[r,t,l?.status,n,s,o,a,i,u]),p=AS(n),m=l?.status??`idle`,h=!r&&!t.disabled&&!s,g=h&&m!==`loading`,_=l!==void 0&&!!p.canResetQuota?.(l),v=p.resetQuota&&_?(0,I.jsxs)(L,{type:`button`,variant:`secondary`,size:`sm`,className:H.quotaResetCreditButton,onClick:()=>f(),disabled:!g,loading:s,title:i(`codex_quota.reset_button`),"aria-label":i(`codex_quota.reset_button`),children:[!s&&(0,I.jsx)(ps,{size:14}),i(`codex_quota.reset_button`)]}):void 0,b=mx(i,l?.errorStatus,l?.error||i(`common.unknown_error`));return(0,I.jsxs)(`div`,{className:H.quotaSection,children:[m===`loading`?(0,I.jsx)(`div`,{className:H.quotaMessage,children:i(`${p.i18nPrefix}.loading`)}):m===`idle`?(0,I.jsx)(`button`,{type:`button`,className:`${H.quotaMessage} ${H.quotaMessageAction}`,onClick:()=>void d(),disabled:!h,children:i(`${p.i18nPrefix}.idle`)}):m===`error`?(0,I.jsx)(`div`,{className:H.quotaError,children:i(`${p.i18nPrefix}.load_failed`,{message:b})}):l?p.renderQuotaItems(l,i,{styles:H,QuotaProgressBar:OS}):(0,I.jsx)(`div`,{className:H.quotaMessage,children:i(`${p.i18nPrefix}.idle`)}),m!==`idle`&&v&&(0,I.jsx)(`div`,{className:H.quotaCardActions,children:v})]})}var MS=new Set([`ok`,`healthy`,`ready`,`success`,`available`]),NS=e=>{let t=Dh(e);return ax.has(t)?t:null};function PS(e){let{t}=Xo(),{file:n,compact:r,selected:i,resolvedTheme:a,disableControls:o,deleting:s,statusUpdating:c,quotaFilterType:l,statusBarCache:u,onShowModels:d,onDownload:f,onOpenPrefixProxyEditor:p,onDelete:m,onToggleStatus:h,onToggleSelect:g}=e,_=mv(n.recent_requests??n.recentRequests),v={success:dv(n.success),failure:dv(n.failed)},y=Ex(n),b=hx(String(n.type??n.provider??`unknown`)),x=!y||b===`aistudio`,S=bx(b,a),C=yx(t,b),w=xx(b,a),T=l&&NS(n)===l?l:null,E=!!T&&!y&&!r,D=T===`antigravity`?H.antigravityCard:T===`claude`?H.claudeCard:T===`codex`?H.codexCard:T===`kimi`?H.kimiCard:T===`xai`?H.xaiCard:``,O=pv(n.auth_index??n.authIndex),k=O&&u.get(O)||vv(_),A=_x(n),ee=!!A&&!MS.has(A.toLowerCase()),j=Sx(n.priority??n.priority),M=typeof n.note==`string`?n.note.trim():``,N=y?t(`auth_files.type_virtual`)||`虚拟认证文件`:n.disabled?t(`auth_files.health_status_disabled`):t(ee?`auth_files.health_status_warning`:A?`auth_files.health_status_healthy`:`auth_files.status_toggle_label`),te=y?H.stateBadgeVirtual:n.disabled?H.stateBadgeDisabled:ee?H.stateBadgeWarning:H.stateBadgeActive;return(0,I.jsx)(`div`,{className:`${H.fileCard} ${r?H.fileCardCompact:``} ${D} ${i?H.fileCardSelected:``} ${n.disabled?H.fileCardDisabled:``}`,children:(0,I.jsx)(`div`,{className:H.fileCardLayout,children:(0,I.jsxs)(`div`,{className:H.fileCardMain,children:[(0,I.jsxs)(`div`,{className:H.cardHeader,children:[!y&&(0,I.jsx)(ic,{checked:i,onChange:()=>g(n.name),className:H.cardSelection,"aria-label":t(i?`auth_files.batch_deselect`:`auth_files.batch_select_all`),title:t(i?`auth_files.batch_deselect`:`auth_files.batch_select_all`)}),(0,I.jsx)(`div`,{className:H.providerAvatar,style:{backgroundColor:S.bg,color:S.text,...S.border?{border:S.border}:{}},children:w?(0,I.jsx)(`img`,{src:w,alt:``,className:H.providerAvatarImage}):(0,I.jsx)(`span`,{className:H.providerAvatarFallback,children:C.slice(0,1).toUpperCase()})}),(0,I.jsxs)(`div`,{className:H.cardHeaderContent,children:[(0,I.jsxs)(`div`,{className:H.cardBadgeRow,children:[(0,I.jsx)(`span`,{className:H.typeBadge,style:{backgroundColor:S.bg,color:S.text,...S.border?{border:S.border}:{}},children:C}),(0,I.jsx)(`span`,{className:`${H.stateBadge} ${te}`,children:N})]}),(0,I.jsx)(`span`,{className:H.fileName,title:n.name,children:n.name}),!r&&M&&(0,I.jsxs)(`div`,{className:H.noteText,title:M,children:[(0,I.jsx)(`span`,{className:H.noteLabel,children:t(`auth_files.note_display`)}),(0,I.jsx)(`span`,{className:H.noteValue,children:M})]})]})]}),(0,I.jsxs)(`div`,{className:`${H.cardMeta} ${r?H.cardMetaCompact:``}`,children:[(0,I.jsxs)(`div`,{className:H.metaItem,children:[(0,I.jsx)(`span`,{className:H.metaLabel,children:t(`auth_files.file_size`)}),(0,I.jsx)(`span`,{className:H.metaValue,children:n.size?J_(n.size):`-`})]}),(0,I.jsxs)(`div`,{className:H.metaItem,children:[(0,I.jsx)(`span`,{className:H.metaLabel,children:t(`auth_files.file_modified`)}),(0,I.jsx)(`span`,{className:H.metaValue,children:Dx(n)})]}),j!==void 0&&(0,I.jsxs)(`div`,{className:`${H.metaItem} ${H.priorityBadge}`,children:[(0,I.jsx)(`span`,{className:H.metaLabel,children:t(`auth_files.priority_display`)}),(0,I.jsx)(`span`,{className:`${H.metaValue} ${H.priorityValue}`,children:j})]})]}),A&&ee&&(0,I.jsxs)(`div`,{className:H.healthStatusMessage,title:A,children:[(0,I.jsx)(fs,{className:H.messageIcon,size:14}),(0,I.jsx)(`span`,{children:A})]}),(0,I.jsxs)(`div`,{className:`${H.cardInsights} ${r?H.cardInsightsCompact:``}`,children:[(0,I.jsxs)(`div`,{className:`${H.cardStats} ${r?H.cardStatsCompact:``}`,children:[(0,I.jsxs)(`div`,{className:`${H.statPill} ${H.statSuccess}`,children:[(0,I.jsx)(`span`,{className:H.statLabel,children:t(`stats.success`)}),(0,I.jsx)(`span`,{className:H.statValue,children:v.success})]}),(0,I.jsxs)(`div`,{className:`${H.statPill} ${H.statFailure}`,children:[(0,I.jsx)(`span`,{className:H.statLabel,children:t(`stats.failure`)}),(0,I.jsx)(`span`,{className:H.statValue,children:v.failure})]})]}),(0,I.jsxs)(`div`,{className:`${H.statusPanel} ${r?H.statusPanelCompact:``}`,children:[(0,I.jsx)(`div`,{className:H.statusPanelLabel,children:(0,I.jsx)(`span`,{children:t(`auth_files.health_status_label`)})}),(0,I.jsx)(xy,{statusData:k,styles:H})]}),E&&T&&(0,I.jsx)(jS,{file:n,quotaType:T,disableControls:o})]}),(0,I.jsxs)(`div`,{className:H.cardActions,children:[(0,I.jsxs)(`div`,{className:H.cardActionsMain,children:[x&&(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:()=>d(n),className:`${H.primaryActionButton} ${H.modelsActionButton}`,title:t(`auth_files.models_button`,{defaultValue:`模型`}),disabled:o,children:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:H.modelsActionIconWrap,children:(0,I.jsx)(as,{className:H.actionIcon,size:16})}),(0,I.jsx)(`span`,{className:H.actionButtonLabel,children:t(`auth_files.models_button`,{defaultValue:`模型`})})]})}),!y&&(0,I.jsxs)(`div`,{className:H.cardUtilityActions,children:[(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:()=>f(n.name),className:H.iconButton,title:t(`auth_files.download_button`),disabled:o,children:(0,I.jsx)(ms,{className:H.actionIcon,size:16})}),(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:()=>p(n),className:H.iconButton,title:t(`auth_files.prefix_proxy_button`),disabled:o,children:(0,I.jsx)(ls,{className:H.actionIcon,size:16})}),(0,I.jsx)(L,{variant:`danger`,size:`sm`,onClick:()=>m(n.name),className:H.iconButton,title:t(`auth_files.delete_button`),disabled:o||s===n.name,children:s===n.name?(0,I.jsx)(kx,{size:14}):(0,I.jsx)(hs,{className:H.actionIcon,size:16})})]})]}),!y&&(0,I.jsxs)(`div`,{className:H.statusToggle,children:[(0,I.jsx)(`span`,{className:H.statusToggleLabel,children:t(`auth_files.status_toggle_label`)}),(0,I.jsx)(hy,{ariaLabel:t(`auth_files.status_toggle_label`),checked:!n.disabled,disabled:o||c[n.name]===!0,onChange:e=>h(n,e)})]})]})]})})})}function FS(e){let{t}=Xo(),{open:n,fileName:r,fileType:i,loading:a,error:o,models:s,excluded:c,onClose:l,onCopyText:u}=e;return(0,I.jsx)(Ap,{open:n,onClose:l,title:t(`auth_files.models_title`,{defaultValue:`支持的模型`})+` - ${r}`,footer:(0,I.jsx)(L,{variant:`secondary`,onClick:l,children:t(`common.close`)}),children:a?(0,I.jsx)(`div`,{className:H.hint,children:t(`auth_files.models_loading`,{defaultValue:`正在加载模型列表...`})}):o===`unsupported`?(0,I.jsx)(Xb,{title:t(`auth_files.models_unsupported`,{defaultValue:`当前版本不支持此功能`}),description:t(`auth_files.models_unsupported_desc`,{defaultValue:`请更新 CLI Proxy API 到最新版本后重试`})}):s.length===0?(0,I.jsx)(Xb,{title:t(`auth_files.models_empty`,{defaultValue:`该凭证暂无可用模型`}),description:t(`auth_files.models_empty_desc`,{defaultValue:`该认证凭证可能尚未被服务器加载或没有绑定任何模型`})}):(0,I.jsx)(`div`,{className:H.modelsList,children:s.map(e=>{let n=Ox(e.id,i,c);return(0,I.jsxs)(`div`,{className:`${H.modelItem} ${n?H.modelItemExcluded:``}`,onClick:()=>{u(e.id)},title:n?t(`auth_files.models_excluded_hint`,{defaultValue:`此 OAuth 模型已被禁用`}):t(`common.copy`,{defaultValue:`点击复制`}),children:[(0,I.jsx)(`span`,{className:H.modelId,children:e.id}),e.display_name&&e.display_name!==e.id&&(0,I.jsx)(`span`,{className:H.modelDisplayName,children:e.display_name}),e.type&&(0,I.jsx)(`span`,{className:H.modelType,children:e.type}),n&&(0,I.jsx)(`span`,{className:H.modelExcludedBadge,children:t(`auth_files.models_excluded_badge`,{defaultValue:`已禁用`})})]},e.id)})})})}function IS(e){let{t}=Xo(),{disableControls:n,editor:r,updatedText:i,dirty:a,onClose:o,onCopyText:s,onSave:c,onChange:l}=e,u=(e=>{if(!e)return``;try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}})(i),d=r?.invalidContentPreview??``;return(0,I.jsx)(Ap,{open:!!r,onClose:o,closeDisabled:r?.saving===!0,width:720,title:r?.fileName?t(`auth_files.auth_field_editor_title`,{name:r.fileName}):t(`auth_files.prefix_proxy_button`),footer:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(L,{variant:`secondary`,onClick:o,disabled:r?.saving===!0,children:t(a?`common.cancel`:`common.close`)}),(0,I.jsx)(L,{variant:`secondary`,onClick:()=>{i&&s(i)},disabled:r?.saving===!0||!i,children:t(`common.copy`)}),(0,I.jsx)(L,{onClick:c,loading:r?.saving===!0,disabled:n||r?.saving===!0||!a||!r?.json||!!(r?.headersTouched&&r.headersError),children:t(`common.save`)})]}),children:r&&(0,I.jsx)(`div`,{className:H.prefixProxyEditor,children:r.loading?(0,I.jsxs)(`div`,{className:H.prefixProxyLoading,children:[(0,I.jsx)(kx,{size:14}),(0,I.jsx)(`span`,{children:t(`auth_files.prefix_proxy_loading`)})]}):(0,I.jsxs)(I.Fragment,{children:[r.error&&(0,I.jsx)(`div`,{className:H.prefixProxyError,children:r.error}),(0,I.jsxs)(`div`,{className:H.prefixProxyJsonWrapper,children:[(0,I.jsx)(`label`,{className:H.prefixProxyLabel,children:t(`auth_files.prefix_proxy_info_label`)}),(0,I.jsx)(`textarea`,{className:H.prefixProxyTextarea,rows:8,readOnly:!0,value:r.fileInfoText})]}),(0,I.jsxs)(`div`,{className:H.prefixProxyJsonWrapper,children:[(0,I.jsx)(`label`,{className:H.prefixProxyLabel,children:r.json?t(`auth_files.prefix_proxy_source_label`):t(`auth_files.prefix_proxy_invalid_content_label`)}),r.json?(0,I.jsx)(`textarea`,{className:H.prefixProxyTextarea,rows:10,readOnly:!0,value:u}):(0,I.jsx)(`pre`,{className:H.prefixProxyInvalidContentPreview,children:d})]}),r.json&&(0,I.jsxs)(`div`,{className:H.prefixProxyFields,children:[(0,I.jsx)($o,{label:t(`auth_files.prefix_label`),value:r.prefix,disabled:n||r.saving||!r.json,onChange:e=>l(`prefix`,e.target.value)}),(0,I.jsx)($o,{label:t(`auth_files.proxy_url_label`),value:r.proxyUrl,placeholder:t(`auth_files.proxy_url_placeholder`),disabled:n||r.saving||!r.json,onChange:e=>l(`proxyUrl`,e.target.value)}),(0,I.jsx)($o,{label:t(`auth_files.priority_label`),value:r.priority,placeholder:t(`auth_files.priority_placeholder`),hint:t(`auth_files.priority_hint`),disabled:n||r.saving||!r.json,onChange:e=>l(`priority`,e.target.value)}),r.providerKey===`codex`&&(0,I.jsxs)(`div`,{className:`form-group`,children:[(0,I.jsx)(`label`,{children:t(`auth_files.codex_websockets_label`)}),(0,I.jsx)(hy,{checked:r.websockets,onChange:e=>l(`websockets`,e),disabled:n||r.saving||!r.json,ariaLabel:t(`auth_files.codex_websockets_label`)}),(0,I.jsx)(`div`,{className:`hint`,children:t(`auth_files.codex_websockets_hint`)})]}),(0,I.jsxs)(`div`,{className:`form-group`,children:[(0,I.jsx)(`label`,{children:t(`auth_files.headers_label`)}),(0,I.jsx)(`textarea`,{className:`input ${r.headersError?H.prefixProxyTextareaInvalid:``}`,value:r.headersText,placeholder:t(`auth_files.headers_placeholder`),rows:4,"aria-invalid":!!r.headersError,disabled:n||r.saving||!r.json,onChange:e=>l(`headersText`,e.target.value)}),r.headersError&&(0,I.jsx)(`div`,{className:`error-box`,children:r.headersError}),(0,I.jsx)(`div`,{className:`hint`,children:t(`auth_files.headers_hint`)})]}),(0,I.jsx)($o,{label:t(`auth_files.note_label`),value:r.note,placeholder:t(`auth_files.note_placeholder`),hint:t(`auth_files.note_hint`),disabled:n||r.saving||!r.json,onChange:e=>l(`note`,e.target.value)})]})]})})})}function LS(e){let{t}=Xo(),{disableControls:n,excludedError:r,excluded:i,onAdd:a,onEdit:o,onDelete:s}=e;return(0,I.jsx)(Yb,{title:t(`oauth_excluded.title`),extra:(0,I.jsx)(L,{size:`sm`,onClick:a,disabled:n||r===`unsupported`,children:t(`oauth_excluded.add`)}),children:r===`unsupported`?(0,I.jsx)(Xb,{title:t(`oauth_excluded.upgrade_required_title`),description:t(`oauth_excluded.upgrade_required_desc`)}):Object.keys(i).length===0?(0,I.jsx)(Xb,{title:t(`oauth_excluded.list_empty_all`)}):(0,I.jsx)(`div`,{className:H.excludedList,children:Object.entries(i).map(([e,n])=>(0,I.jsxs)(`div`,{className:H.excludedItem,children:[(0,I.jsxs)(`div`,{className:H.excludedInfo,children:[(0,I.jsx)(`div`,{className:H.excludedProvider,children:e}),(0,I.jsx)(`div`,{className:H.excludedModels,children:n?.length?t(`oauth_excluded.model_count`,{count:n.length}):t(`oauth_excluded.no_models`)})]}),(0,I.jsxs)(`div`,{className:H.excludedActions,children:[(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:()=>o(e),children:t(`common.edit`)}),(0,I.jsx)(L,{variant:`danger`,size:`sm`,onClick:()=>s(e),children:t(`oauth_excluded.delete`)})]})]},e))})})}var U={scrollContainer:`ModelMappingDiagram-module__scrollContainer___CVtMl`,tapHint:`ModelMappingDiagram-module__tapHint___WVg9j`,container:`ModelMappingDiagram-module__container___5GMeJ`,connections:`ModelMappingDiagram-module__connections___-pgzq`,column:`ModelMappingDiagram-module__column___Guf-v`,providers:`ModelMappingDiagram-module__providers___n0NN6`,sources:`ModelMappingDiagram-module__sources___N646E`,aliases:`ModelMappingDiagram-module__aliases___zg5ma`,columnHeader:`ModelMappingDiagram-module__columnHeader___QAC6y`,item:`ModelMappingDiagram-module__item___KBTKp`,dropTarget:`ModelMappingDiagram-module__dropTarget___dAYPB`,selected:`ModelMappingDiagram-module__selected___r3Gyz`,providerItem:`ModelMappingDiagram-module__providerItem___4PZQM`,providerLabel:`ModelMappingDiagram-module__providerLabel___E2vNu`,collapseBtn:`ModelMappingDiagram-module__collapseBtn___RXanB`,chevronDown:`ModelMappingDiagram-module__chevronDown___AP7zK`,chevronRight:`ModelMappingDiagram-module__chevronRight___bbMVy`,providerGroup:`ModelMappingDiagram-module__providerGroup___5JNQu`,sourceItem:`ModelMappingDiagram-module__sourceItem___TjDG6`,aliasItem:`ModelMappingDiagram-module__aliasItem___h6w7D`,dragging:`ModelMappingDiagram-module__dragging___lhx9y`,dot:`ModelMappingDiagram-module__dot___AOWIN`,dotLeft:`ModelMappingDiagram-module__dotLeft___BKXAm`,providerBadge:`ModelMappingDiagram-module__providerBadge___cRzux`,itemName:`ModelMappingDiagram-module__itemName___MjfSv`,itemCount:`ModelMappingDiagram-module__itemCount___B-gtl`,contextMenu:`ModelMappingDiagram-module__contextMenu___VHX-s`,menuItem:`ModelMappingDiagram-module__menuItem___e-LvI`,danger:`ModelMappingDiagram-module__danger___klXxM`,menuDivider:`ModelMappingDiagram-module__menuDivider___XtoCo`,settingsEmpty:`ModelMappingDiagram-module__settingsEmpty___N0gFF`,settingsList:`ModelMappingDiagram-module__settingsList___ovuWo`,settingsRow:`ModelMappingDiagram-module__settingsRow___wH-TW`,settingsNames:`ModelMappingDiagram-module__settingsNames___QDn9j`,settingsSource:`ModelMappingDiagram-module__settingsSource___Hz9zo`,settingsAlias:`ModelMappingDiagram-module__settingsAlias___Ov9zt`,settingsArrow:`ModelMappingDiagram-module__settingsArrow___SKvFd`,settingsActions:`ModelMappingDiagram-module__settingsActions___PYXMU`,settingsLabel:`ModelMappingDiagram-module__settingsLabel___R--i-`,settingsDelete:`ModelMappingDiagram-module__settingsDelete___PDG7z`};function RS({providerNodes:e,collapsedProviders:t,getProviderColor:n,providerGroupHeights:r={},providerRefs:i,onToggleCollapse:a,onContextMenu:o,label:s,expandLabel:c,collapseLabel:l}){return(0,I.jsxs)(`div`,{className:`${U.column} ${U.providers}`,onContextMenu:e=>{e.preventDefault(),e.stopPropagation(),o(e,`background`)},children:[(0,I.jsx)(`div`,{className:U.columnHeader,children:s}),e.map(({provider:e,sources:s})=>{let u=t.has(e),d=u?void 0:r[e];return(0,I.jsx)(`div`,{className:U.providerGroup,style:d?{height:d}:void 0,children:(0,I.jsxs)(`div`,{ref:t=>{t?i.current?.set(e,t):i.current?.delete(e)},className:`${U.item} ${U.providerItem}`,style:{borderLeftColor:n(e)},onContextMenu:t=>{t.preventDefault(),t.stopPropagation(),o(t,`provider`,e)},children:[(0,I.jsx)(`button`,{type:`button`,className:U.collapseBtn,onClick:()=>a(e),"aria-label":u?c:l,title:u?c:l,children:(0,I.jsx)(`span`,{className:u?U.chevronRight:U.chevronDown})}),(0,I.jsx)(`span`,{className:U.providerLabel,style:{color:n(e)},children:e}),(0,I.jsx)(`span`,{className:U.itemCount,children:s.length})]})},e)})]})}function zS({providerNodes:e,collapsedProviders:t,sourceRefs:n,getProviderColor:r,selectedSourceId:i,onSelectSource:a,draggedSource:o,dropTargetSource:s,draggable:c,onDragStart:l,onDragEnd:u,onDragOver:d,onDragLeave:f,onDrop:p,onContextMenu:m,label:h}){return(0,I.jsxs)(`div`,{className:`${U.column} ${U.sources}`,onContextMenu:e=>{e.preventDefault(),e.stopPropagation(),m(e,`background`)},children:[(0,I.jsx)(`div`,{className:U.columnHeader,children:h}),e.flatMap(({provider:e,sources:h})=>t.has(e)?[]:h.map(e=>(0,I.jsxs)(`div`,{ref:t=>{t?n.current?.set(e.id,t):n.current?.delete(e.id)},className:`${U.item} ${U.sourceItem} ${o?.id===e.id?U.dragging:``} ${s===e.id?U.dropTarget:``} ${i===e.id?U.selected:``}`,onClick:()=>a?.(e),draggable:c,onDragStart:t=>l(t,e),onDragEnd:u,onDragOver:t=>d(t,e),onDragLeave:f,onDrop:t=>p(t,e),onContextMenu:t=>{t.preventDefault(),t.stopPropagation(),m(t,`source`,e.id)},children:[(0,I.jsx)(`span`,{className:U.itemName,title:e.name,children:e.name}),(0,I.jsx)(`div`,{className:U.dot,style:{background:r(e.provider),opacity:e.aliases.length>0?1:.3}})]},e.id)))]})}function BS({aliasNodes:e,aliasRefs:t,dropTargetAlias:n,draggedAlias:r,selectedAlias:i,onSelectAlias:a,draggable:o,onDragStart:s,onDragEnd:c,onDragOver:l,onDragLeave:u,onDrop:d,onContextMenu:f,label:p}){return(0,I.jsxs)(`div`,{className:`${U.column} ${U.aliases}`,onContextMenu:e=>{e.preventDefault(),e.stopPropagation(),f(e,`background`)},children:[(0,I.jsx)(`div`,{className:U.columnHeader,children:p}),e.map(e=>(0,I.jsxs)(`div`,{ref:n=>{n?t.current?.set(e.id,n):t.current?.delete(e.id)},className:`${U.item} ${U.aliasItem} ${n===e.alias?U.dropTarget:``} ${r===e.alias?U.dragging:``} ${i===e.alias?U.selected:``}`,onClick:()=>a?.(e.alias),draggable:o,onDragStart:t=>s(t,e.alias),onDragEnd:c,onDragOver:t=>l(t,e.alias),onDragLeave:u,onDrop:t=>d(t,e.alias),onContextMenu:t=>{t.preventDefault(),t.stopPropagation(),f(t,`alias`,e.alias)},children:[(0,I.jsx)(`div`,{className:`${U.dot} ${U.dotLeft}`}),(0,I.jsx)(`span`,{className:U.itemName,title:e.alias,children:e.alias}),(0,I.jsx)(`span`,{className:U.itemCount,children:e.sources.length})]},e.id))]})}function VS({contextMenu:e,t,onRequestClose:n,onAddAlias:r,onRenameAlias:i,onOpenAliasSettings:a,onDeleteAlias:o,onEditProvider:s,onDeleteProvider:c,onOpenSourceSettings:l}){let u=(0,y.useRef)(null);if((0,y.useEffect)(()=>{if(!e)return;let t=e=>{u.current?.contains(e.target)||n()};return document.addEventListener(`mousedown`,t),()=>document.removeEventListener(`mousedown`,t)},[e,n]),!e)return null;let{type:d,data:f}=e;return(0,S.createPortal)((0,I.jsxs)(`div`,{ref:u,className:U.contextMenu,style:{top:e.y,left:e.x},onClick:e=>e.stopPropagation(),children:[d===`background`&&(0,I.jsx)(`div`,{className:U.menuItem,onClick:r,children:(0,I.jsx)(`span`,{children:t(`oauth_model_alias.diagram_add_alias`)})}),d===`alias`&&(f?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:U.menuItem,onClick:()=>i(f),children:(0,I.jsx)(`span`,{children:t(`oauth_model_alias.diagram_rename`)})}),(0,I.jsx)(`div`,{className:U.menuItem,onClick:()=>a(f),children:(0,I.jsx)(`span`,{children:t(`oauth_model_alias.diagram_settings`)})}),(0,I.jsx)(`div`,{className:U.menuDivider}),(0,I.jsx)(`div`,{className:`${U.menuItem} ${U.danger}`,onClick:()=>o(f),children:(0,I.jsx)(`span`,{children:t(`oauth_model_alias.diagram_delete_alias`)})})]}):null),d===`provider`&&(f?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:U.menuItem,onClick:()=>s(f),children:(0,I.jsx)(`span`,{children:t(`common.edit`)})}),(0,I.jsx)(`div`,{className:U.menuDivider}),(0,I.jsx)(`div`,{className:`${U.menuItem} ${U.danger}`,onClick:()=>c(f),children:(0,I.jsx)(`span`,{children:t(`oauth_model_alias.delete`)})})]}):null),d===`source`&&(f?(0,I.jsx)(`div`,{className:U.menuItem,onClick:()=>l(f),children:(0,I.jsx)(`span`,{children:t(`oauth_model_alias.diagram_settings`)})}):null)]}),document.body)}function HS({open:e,t,value:n,error:r,onChange:i,onClose:a,onSubmit:o}){return(0,I.jsx)(Ap,{open:e,onClose:a,title:t(`oauth_model_alias.diagram_rename_alias_title`),width:400,footer:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(L,{variant:`secondary`,onClick:a,children:t(`common.cancel`)}),(0,I.jsx)(L,{onClick:o,children:t(`oauth_model_alias.diagram_rename_btn`)})]}),children:(0,I.jsx)($o,{label:t(`oauth_model_alias.diagram_rename_alias_label`),value:n,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key===`Enter`&&o()},error:r,placeholder:t(`oauth_model_alias.diagram_rename_placeholder`),autoFocus:!0})})}function US({open:e,t,value:n,error:r,onChange:i,onClose:a,onSubmit:o}){return(0,I.jsx)(Ap,{open:e,onClose:a,title:t(`oauth_model_alias.diagram_add_alias_title`),width:400,footer:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(L,{variant:`secondary`,onClick:a,children:t(`common.cancel`)}),(0,I.jsx)(L,{onClick:o,children:t(`oauth_model_alias.diagram_add_btn`)})]}),children:(0,I.jsx)($o,{label:t(`oauth_model_alias.diagram_add_alias_label`),value:n,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key===`Enter`&&o()},error:r,placeholder:t(`oauth_model_alias.diagram_add_placeholder`),autoFocus:!0})})}function WS({open:e,t,alias:n,aliasNodes:r,onClose:i,onToggleFork:a,onUnlink:o}){return(0,I.jsx)(Ap,{open:e,onClose:i,title:t(`oauth_model_alias.diagram_settings_title`,{alias:n??``}),width:720,footer:(0,I.jsx)(L,{variant:`secondary`,onClick:i,children:t(`common.close`)}),children:n?(()=>{let e=r.find(e=>e.alias===n);return!e||e.sources.length===0?(0,I.jsx)(`div`,{className:U.settingsEmpty,children:t(`oauth_model_alias.diagram_settings_empty`)}):(0,I.jsx)(`div`,{className:U.settingsList,children:e.sources.map(e=>{let r=e.aliases.find(e=>e.alias===n)?.fork===!0;return(0,I.jsxs)(`div`,{className:U.settingsRow,children:[(0,I.jsxs)(`div`,{className:U.settingsNames,children:[(0,I.jsx)(`span`,{className:U.settingsSource,children:e.name}),(0,I.jsx)(`span`,{className:U.settingsArrow,children:`→`}),(0,I.jsx)(`span`,{className:U.settingsAlias,children:n})]}),(0,I.jsxs)(`div`,{className:U.settingsActions,children:[(0,I.jsx)(`span`,{className:U.settingsLabel,children:t(`oauth_model_alias.alias_fork_label`)}),(0,I.jsx)(hy,{checked:r,onChange:t=>a(e.provider,e.name,n,t),ariaLabel:t(`oauth_model_alias.alias_fork_label`)}),(0,I.jsx)(`button`,{type:`button`,className:U.settingsDelete,onClick:()=>o(e.provider,e.name,n),"aria-label":t(`oauth_model_alias.diagram_delete_link`,{provider:e.provider,name:e.name}),title:t(`oauth_model_alias.diagram_delete_link`,{provider:e.provider,name:e.name}),children:(0,I.jsx)(hs,{size:14})})]})]},e.id)})})})():null})}function GS({open:e,t,source:n,onClose:r,onToggleFork:i,onUnlink:a}){return(0,I.jsx)(Ap,{open:e,onClose:r,title:t(`oauth_model_alias.diagram_settings_source_title`),width:720,footer:(0,I.jsx)(L,{variant:`secondary`,onClick:r,children:t(`common.close`)}),children:n?n.aliases.length===0?(0,I.jsx)(`div`,{className:U.settingsEmpty,children:t(`oauth_model_alias.diagram_settings_empty`)}):(0,I.jsx)(`div`,{className:U.settingsList,children:n.aliases.map(e=>(0,I.jsxs)(`div`,{className:U.settingsRow,children:[(0,I.jsxs)(`div`,{className:U.settingsNames,children:[(0,I.jsx)(`span`,{className:U.settingsSource,children:n.name}),(0,I.jsx)(`span`,{className:U.settingsArrow,children:`→`}),(0,I.jsx)(`span`,{className:U.settingsAlias,children:e.alias})]}),(0,I.jsxs)(`div`,{className:U.settingsActions,children:[(0,I.jsx)(`span`,{className:U.settingsLabel,children:t(`oauth_model_alias.alias_fork_label`)}),(0,I.jsx)(hy,{checked:e.fork===!0,onChange:t=>i(n.provider,n.name,e.alias,t),ariaLabel:t(`oauth_model_alias.alias_fork_label`)}),(0,I.jsx)(`button`,{type:`button`,className:U.settingsDelete,onClick:()=>a(n.provider,n.name,e.alias),"aria-label":t(`oauth_model_alias.diagram_delete_link`,{provider:n.provider,name:n.name}),title:t(`oauth_model_alias.diagram_delete_link`,{provider:n.provider,name:n.name}),children:(0,I.jsx)(hs,{size:14})})]})]},`${n.id}-${e.alias}`))}):null})}var KS=[`#8b8680`,`#10b981`,`#f59e0b`,`#c65746`,`#8b5cf6`,`#ec4899`,`#06b6d4`,`#84cc16`];function qS(e){return KS[e.split(``).reduce((e,t)=>e+t.charCodeAt(0),0)%KS.length]}var JS=(0,y.forwardRef)(function({modelAlias:e,allProviderModels:t={},onUpdate:n,onDeleteLink:r,onToggleFork:i,onRenameAlias:a,onDeleteAlias:o,onEditProvider:s,onDeleteProvider:c,className:l},u){let{t:d}=Xo(),f=Wc(e=>e.resolvedTheme)===`dark`,p=(0,y.useMemo)(()=>typeof window>`u`||window.matchMedia===void 0?!1:window.matchMedia(`(any-pointer: coarse)`).matches&&!window.matchMedia(`(any-pointer: fine)`).matches,[]),m=(0,y.useRef)(null),[h,g]=(0,y.useState)([]),[_,v]=(0,y.useState)(null),[b,x]=(0,y.useState)(null),[S,C]=(0,y.useState)(null),[w,T]=(0,y.useState)(null),[E,D]=(0,y.useState)(null),[O,k]=(0,y.useState)(null),[A,ee]=(0,y.useState)([]),[j,M]=(0,y.useState)(null),[N,te]=(0,y.useState)(new Set),[P,F]=(0,y.useState)({}),[ne,re]=(0,y.useState)(null),[ie,ae]=(0,y.useState)(``),[oe,se]=(0,y.useState)(``),[ce,le]=(0,y.useState)(!1),[ue,de]=(0,y.useState)(``),[fe,pe]=(0,y.useState)(``),[me,he]=(0,y.useState)(null),[ge,_e]=(0,y.useState)(null),{aliasNodes:ve,providerNodes:ye}=(0,y.useMemo)(()=>{let n=new Map,r=new Set;Object.entries(e).forEach(([e,t])=>{(t??[]).forEach(t=>{let i=(t?.name||``).trim(),a=(t?.alias||``).trim();if(!i||!a)return;let o=`${e.toLowerCase()}::${i.toLowerCase()}`;n.has(o)||n.set(o,{provider:e,name:i,aliases:new Map}),n.get(o).aliases.set(a,t?.fork===!0),r.add(a)})}),Object.entries(t).forEach(([e,t])=>{(t??[]).forEach(t=>{let r=(t.id||``).trim();if(!r)return;let i=`${e.toLowerCase()}::${r.toLowerCase()}`;n.has(i)||n.set(i,{provider:e,name:r,aliases:new Map})})});let i=Array.from(n.entries()).map(([e,t])=>({id:e,provider:t.provider,name:t.name,aliases:Array.from(t.aliases.entries()).map(([e,t])=>({alias:e,fork:t}))})).sort((e,t)=>e.provider===t.provider?e.name.localeCompare(t.name):e.provider.localeCompare(t.provider));A.forEach(e=>r.add(e));let a=Array.from(r).map(e=>({id:e,alias:e,sources:i.filter(t=>t.aliases.some(t=>t.alias===e))})).sort((e,t)=>t.sources.length===e.sources.length?e.alias.localeCompare(t.alias):t.sources.length-e.sources.length),o=new Map;return i.forEach(e=>{o.has(e.provider)||o.set(e.provider,[]),o.get(e.provider).push(e)}),{aliasNodes:a,providerNodes:Array.from(o.entries()).map(([e,t])=>({provider:e,sources:t})).sort((e,t)=>e.provider.localeCompare(t.provider))}},[e,t,A]),be=(0,y.useRef)(new Map),xe=(0,y.useRef)(new Map),Se=(0,y.useRef)(new Map),Ce=e=>{te(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},we=(0,y.useCallback)(()=>{if(!m.current)return;let e=m.current.getBoundingClientRect(),t=[],n={},r=(e,t,n,r)=>`M ${e} ${t} C ${e+(n-e)*.5} ${t}, ${n-(n-e)*.5} ${r}, ${n} ${r}`;ye.forEach(({provider:i,sources:a})=>{if(N.has(i))return;if(a.length>0){let e=xe.current.get(a[0].id),t=xe.current.get(a[a.length-1].id);if(e&&t){let r=Math.max(0,Math.round(t.getBoundingClientRect().bottom-e.getBoundingClientRect().top));r>0&&(n[i]=r)}}let o=be.current.get(i);if(!o)return;let s=o.getBoundingClientRect(),c=s.right-e.left,l=s.top+s.height/2-e.top,u=qS(i);a.forEach(n=>{let a=xe.current.get(n.id);if(!a)return;let o=a.getBoundingClientRect(),s=o.left-e.left,d=o.top+o.height/2-e.top;t.push({id:`provider-${i}-source-${n.id}`,path:r(c,l,s,d),color:u})}),a.forEach(n=>{!n.aliases||n.aliases.length===0||n.aliases.forEach(i=>{let a=xe.current.get(n.id),o=Se.current.get(i.alias);if(!a||!o)return;let s=a.getBoundingClientRect(),c=o.getBoundingClientRect(),l=s.right-e.left,d=s.top+s.height/2-e.top,f=c.left-e.left,p=c.top+c.height/2-e.top;t.push({id:`${n.id}-${i.alias}`,path:r(l,d,f,p),color:u})})})}),g(t),F(e=>{let t=Object.keys(e),r=Object.keys(n);if(t.length!==r.length)return n;for(let t of r)if(!(t in e)||e[t]!==n[t])return n;return e})},[ye,N]);(0,y.useImperativeHandle)(u,()=>({collapseAll:()=>te(new Set(ye.map(e=>e.provider))),refreshLayout:()=>we()}),[ye,we]),(0,y.useLayoutEffect)(()=>{let e=requestAnimationFrame(we);return window.addEventListener(`resize`,we),()=>{cancelAnimationFrame(e),window.removeEventListener(`resize`,we)}},[we,ve]),(0,y.useLayoutEffect)(()=>{let e=requestAnimationFrame(we);return()=>cancelAnimationFrame(e)},[P,we]),(0,y.useEffect)(()=>{if(!m.current||typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>we());return e.observe(m.current),()=>e.disconnect()},[we]);let Te=(e,t)=>{D(null),k(null),v(t),e.dataTransfer.setData(`text/plain`,t.id),e.dataTransfer.effectAllowed=`link`},Ee=(e,t)=>{!_||_.aliases.some(e=>e.alias===t)||(e.preventDefault(),e.dataTransfer.dropEffect=`link`,C(t))},De=()=>{C(null)},Oe=(e,t)=>{e.preventDefault(),_&&!_.aliases.some(e=>e.alias===t)&&n&&n(_.provider,_.name,t),v(null),C(null)},ke=(e,t)=>{D(null),k(null),x(t),e.dataTransfer.setData(`text/plain`,t),e.dataTransfer.effectAllowed=`link`},Ae=(e,t)=>{!b||t.aliases.some(e=>e.alias===b)||(e.preventDefault(),e.dataTransfer.dropEffect=`link`,T(t.id))},je=()=>{T(null)},Me=(e,t)=>{e.preventDefault(),b&&!t.aliases.some(e=>e.alias===b)&&n&&n(t.provider,t.name,b),x(null),T(null)},Ne=(e,t,n)=>{e.preventDefault(),e.stopPropagation(),M({x:e.clientX,y:e.clientY,type:t,data:n})},Pe=()=>M(null),Fe=(0,y.useCallback)(e=>{if(!e)return null;for(let{sources:t}of ye){let n=t.find(t=>t.id===e);if(n)return n}return null},[ye]),Ie=e=>{if(n){if(E===e.id){D(null);return}if(O){n(e.provider,e.name,O),D(null),k(null);return}D(e.id),k(null)}},Le=e=>{if(n){if(O===e){k(null);return}if(E){let t=Fe(E);t&&n(t.provider,t.name,e),D(null),k(null);return}k(e),D(null)}},Re=(e,t,n)=>{r&&r(e,t,n)},ze=(e,t,n,r)=>{i&&i(e,t,n,r)};return(0,I.jsxs)(`div`,{className:[U.scrollContainer,l].filter(Boolean).join(` `),children:[p&&n&&(0,I.jsx)(`div`,{className:U.tapHint,children:d(`oauth_model_alias.diagram_tap_hint`)}),(0,I.jsxs)(`div`,{className:U.container,ref:m,onContextMenu:e=>{e.preventDefault(),e.stopPropagation(),Ne(e,`background`)},children:[(0,I.jsx)(`svg`,{className:U.connections,children:h.map(e=>(0,I.jsx)(`path`,{d:e.path,stroke:e.color,strokeOpacity:f?.4:.3},e.id))}),(0,I.jsx)(RS,{providerNodes:ye,collapsedProviders:N,getProviderColor:qS,providerGroupHeights:P,providerRefs:be,onToggleCollapse:Ce,onContextMenu:(e,t,n)=>Ne(e,t,n),label:d(`oauth_model_alias.diagram_providers`),expandLabel:d(`oauth_model_alias.diagram_expand`),collapseLabel:d(`oauth_model_alias.diagram_collapse`)}),(0,I.jsx)(zS,{providerNodes:ye,collapsedProviders:N,sourceRefs:xe,getProviderColor:qS,selectedSourceId:p?E:null,onSelectSource:p?Ie:void 0,draggedSource:_,dropTargetSource:w,draggable:!!n,onDragStart:Te,onDragEnd:()=>{v(null),C(null)},onDragOver:Ae,onDragLeave:je,onDrop:Me,onContextMenu:(e,t,n)=>Ne(e,t,n),label:d(`oauth_model_alias.diagram_source_models`)}),(0,I.jsx)(BS,{aliasNodes:ve,aliasRefs:Se,dropTargetAlias:S,draggedAlias:b,selectedAlias:p?O:null,onSelectAlias:p?Le:void 0,draggable:!!n,onDragStart:ke,onDragEnd:()=>{x(null),T(null)},onDragOver:Ee,onDragLeave:De,onDrop:Oe,onContextMenu:(e,t,n)=>Ne(e,t,n),label:d(`oauth_model_alias.diagram_aliases`)})]}),(0,I.jsx)(VS,{contextMenu:j,t:d,onRequestClose:()=>M(null),onAddAlias:()=>{Pe(),le(!0),de(``),pe(``)},onRenameAlias:e=>{Pe(),re({oldAlias:e}),ae(e),se(``)},onOpenAliasSettings:e=>{M(null),he(e)},onDeleteAlias:e=>{Pe();let t=ve.find(t=>t.alias===e);t&&(t.sources.length===0?ee(t=>t.filter(t=>t!==e)):o&&o(e))},onEditProvider:e=>{M(null),s?.(e)},onDeleteProvider:e=>{M(null),c?.(e)},onOpenSourceSettings:e=>{M(null),_e(e)}}),(0,I.jsx)(HS,{open:!!ne,t:d,value:ie,error:oe,onChange:e=>{ae(e),se(``)},onClose:()=>re(null),onSubmit:()=>{let e=ie.trim();if(!e){se(d(`oauth_model_alias.diagram_please_enter_alias`));return}if(e===ne?.oldAlias){re(null);return}if(ve.some(t=>t.alias===e)){se(d(`oauth_model_alias.diagram_alias_exists`));return}a&&ne&&a(ne.oldAlias,e),A.includes(ne?.oldAlias??``)&&ee(t=>t.map(t=>t===ne?.oldAlias?e:t)),re(null)}}),(0,I.jsx)(US,{open:ce,t:d,value:ue,error:fe,onChange:e=>{de(e),pe(``)},onClose:()=>le(!1),onSubmit:()=>{let e=ue.trim();if(!e){pe(d(`oauth_model_alias.diagram_please_enter_alias`));return}if(ve.some(t=>t.alias===e)){pe(d(`oauth_model_alias.diagram_alias_exists`));return}ee(t=>[...t,e]),le(!1)}}),(0,I.jsx)(WS,{open:!!me,t:d,alias:me,aliasNodes:ve,onClose:()=>he(null),onToggleFork:ze,onUnlink:Re}),(0,I.jsx)(GS,{open:!!ge,t:d,source:Fe(ge),onClose:()=>_e(null),onToggleFork:ze,onUnlink:Re})]})});function YS(e){let{t}=Xo(),n=(0,y.useRef)(null),{disableControls:r,viewMode:i,onViewModeChange:a,onAdd:o,onEditProvider:s,onDeleteProvider:c,modelAliasError:l,modelAlias:u,allProviderModels:d,onUpdate:f,onDeleteLink:p,onToggleFork:m,onRenameAlias:h,onDeleteAlias:g}=e;return(0,I.jsx)(Yb,{title:t(`oauth_model_alias.title`),extra:(0,I.jsxs)(`div`,{className:H.cardExtraButtons,children:[(0,I.jsxs)(`div`,{className:H.viewModeSwitch,children:[(0,I.jsx)(L,{variant:i===`list`?`secondary`:`ghost`,size:`sm`,onClick:()=>a(`list`),disabled:r||l===`unsupported`,children:t(`oauth_model_alias.view_mode_list`)}),(0,I.jsx)(L,{variant:i===`diagram`?`secondary`:`ghost`,size:`sm`,onClick:()=>a(`diagram`),disabled:r||l===`unsupported`,children:t(`oauth_model_alias.view_mode_diagram`)})]}),(0,I.jsx)(L,{size:`sm`,onClick:o,disabled:r||l===`unsupported`,children:t(`oauth_model_alias.add`)})]}),children:l===`unsupported`?(0,I.jsx)(Xb,{title:t(`oauth_model_alias.upgrade_required_title`),description:t(`oauth_model_alias.upgrade_required_desc`)}):i===`diagram`?Object.keys(u).length===0?(0,I.jsx)(Xb,{title:t(`oauth_model_alias.list_empty_all`)}):(0,I.jsxs)(`div`,{className:H.aliasChartSection,children:[(0,I.jsxs)(`div`,{className:H.aliasChartHeader,children:[(0,I.jsx)(`h4`,{className:H.aliasChartTitle,children:t(`oauth_model_alias.chart_title`)}),(0,I.jsx)(L,{variant:`ghost`,size:`sm`,onClick:()=>n.current?.collapseAll(),disabled:r||l===`unsupported`,title:t(`oauth_model_alias.diagram_collapse`),"aria-label":t(`oauth_model_alias.diagram_collapse`),children:(0,I.jsx)(ws,{size:16})})]}),(0,I.jsx)(JS,{ref:n,modelAlias:u,allProviderModels:d,onUpdate:f,onDeleteLink:p,onToggleFork:m,onRenameAlias:h,onDeleteAlias:g,onEditProvider:s,onDeleteProvider:c,className:H.aliasChart})]}):Object.keys(u).length===0?(0,I.jsx)(Xb,{title:t(`oauth_model_alias.list_empty_all`)}):(0,I.jsx)(`div`,{className:H.excludedList,children:Object.entries(u).map(([e,n])=>(0,I.jsxs)(`div`,{className:H.excludedItem,children:[(0,I.jsxs)(`div`,{className:H.excludedInfo,children:[(0,I.jsx)(`div`,{className:H.excludedProvider,children:e}),(0,I.jsx)(`div`,{className:H.excludedModels,children:n?.length?t(`oauth_model_alias.model_count`,{count:n.length}):t(`oauth_model_alias.no_models`)})]}),(0,I.jsxs)(`div`,{className:H.excludedActions,children:[(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:()=>s(e),children:t(`common.edit`)}),(0,I.jsx)(L,{variant:`danger`,size:`sm`,onClick:()=>c(e),children:t(`oauth_model_alias.delete`)})]})]},e))})})}function XS({filename:e,blob:t,revokeDelayMs:n=1e3}){let r=window.URL.createObjectURL(t),i=document.createElement(`a`);i.href=r,i.download=e,i.rel=`noopener`,i.style.display=`none`,document.body.appendChild(i),i.click(),window.setTimeout(()=>{window.URL.revokeObjectURL(r),i.remove()},n)}function ZS(){let{t:e}=Xo(),{showNotification:t,showConfirmation:n}=Fc(),[r,i]=(0,y.useState)([]),[a,o]=(0,y.useState)(!0),[s,c]=(0,y.useState)(``),[l,u]=(0,y.useState)(!1),[d,f]=(0,y.useState)(null),[p,m]=(0,y.useState)(!1),[h,g]=(0,y.useState)({}),[_,v]=(0,y.useState)(!1),[b,x]=(0,y.useState)(new Set),S=(0,y.useRef)(null),C=(0,y.useRef)(!1),w=b.size,T=(0,y.useCallback)(e=>{x(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),E=(0,y.useCallback)(e=>{let t=e.filter(e=>!Ex(e)).map(e=>e.name);t.length!==0&&x(e=>{let n=new Set(e);return t.forEach(e=>n.add(e)),n})},[]),D=(0,y.useCallback)(e=>{let t=e.filter(e=>!Ex(e)).map(e=>e.name);t.length!==0&&x(e=>{let n=new Set(e);return t.forEach(e=>{n.has(e)?n.delete(e):n.add(e)}),n})},[]),O=(0,y.useCallback)(()=>{x(new Set)},[]),k=(0,y.useCallback)(e=>{let t=Array.from(new Set(e.map(e=>e.trim()).filter(Boolean)));if(t.length===0)return;let n=new Set(t);i(e=>e.filter(e=>!n.has(e.name))),x(e=>{if(e.size===0)return e;let t=!1,r=new Set;return e.forEach(e=>{n.has(e)?t=!0:r.add(e)}),t?r:e})},[]);(0,y.useEffect)(()=>{if(b.size===0)return;let e=new Set(r.map(e=>e.name));x(t=>{let n=!1,r=new Set;return t.forEach(t=>{e.has(t)?r.add(t):n=!0}),n?r:t})},[r,b.size]);let A=(0,y.useCallback)(async()=>{o(!0),c(``);try{i((await f_.list())?.files||[])}catch(t){c(t instanceof Error?t.message:e(`notification.refresh_failed`))}finally{o(!1)}},[e]),ee=(0,y.useCallback)(()=>{S.current?.click()},[]),j=(0,y.useCallback)(async n=>{let r=n.target.files;if(!r||r.length===0)return;let i=Array.from(r),a=[],o=[],s=[];if(i.forEach(e=>{if(!e.name.endsWith(`.json`)){o.push(e.name);return}if(e.size>10485760){s.push(e.name);return}a.push(e)}),o.length>0&&t(e(`auth_files.upload_error_json`),`error`),s.length>0&&t(e(`auth_files.upload_error_size`,{maxSize:J_(Dc)}),`error`),a.length===0){n.target.value=``;return}u(!0);try{let n=await f_.uploadFiles(a),r=n.uploaded;if(r>0){let i=a.length>1?` (${r}/${a.length})`:``;t(`${e(`auth_files.upload_success`)}${i}`,n.failed.length?`warning`:`success`),await A()}if(n.failed.length>0){let r=n.failed.map(e=>`${e.name}: ${e.error}`).join(`; `);t(`${e(`notification.upload_failed`)}: ${r}`,`error`)}}catch(n){let r=n instanceof Error?n.message:`Unknown error`;t(`${e(`notification.upload_failed`)}: ${r}`,`error`)}finally{u(!1),n.target.value=``}},[A,t,e]),M=(0,y.useCallback)(r=>{n({title:e(`auth_files.delete_title`,{defaultValue:`Delete File`}),message:`${e(`auth_files.delete_confirm`)} "${r}" ?`,variant:`danger`,confirmText:e(`common.confirm`),onConfirm:async()=>{f(r);try{let n=await f_.deleteFile(r);t(e(`auth_files.delete_success`),`success`),k(n.files.length>0?n.files:[r])}catch(n){let r=n instanceof Error?n.message:``;t(`${e(`notification.delete_failed`)}: ${r}`,`error`)}finally{f(null)}}})},[k,n,t,e]),N=(0,y.useCallback)(a=>{let{filter:o,problemOnly:s,disabledOnly:c,onResetFilterToAll:l,onResetProblemOnly:u,onResetDisabledOnly:d}=a,f=o!==`all`,p=s===!0,h=c===!0,g=f?yx(e,o):e(`auth_files.filter_all`),_=e(`auth_files.delete_all_confirm`);h?_=e(`auth_files.delete_filtered_result_confirm`):p?_=f?e(`auth_files.delete_problem_filtered_confirm`,{type:g}):e(`auth_files.delete_problem_confirm`):f&&(_=e(`auth_files.delete_filtered_confirm`,{type:g})),n({title:e(`auth_files.delete_all_title`,{defaultValue:`Delete All Files`}),message:_,variant:`danger`,confirmText:e(`common.confirm`),onConfirm:async()=>{m(!0);try{if(!f&&!p&&!h)await f_.deleteAll(),t(e(`auth_files.delete_all_success`),`success`),i(e=>e.filter(e=>Ex(e))),O();else{let n=r.filter(e=>!(Ex(e)||f&&hx(String(e.type??e.provider??``))!==o||p&&!vx(e)||h&&e.disabled!==!0));if(n.length===0){let n=e(`auth_files.delete_filtered_none`,{type:g});h?n=e(`auth_files.delete_filtered_result_none`):p&&(n=f?e(`auth_files.delete_problem_filtered_none`,{type:g}):e(`auth_files.delete_problem_none`)),t(n,`info`),m(!1);return}let i=await f_.deleteFiles(n.map(e=>e.name)),a=i.deleted,s=i.failed.length;k(i.files),s===0&&h?t(e(`auth_files.delete_filtered_result_success`,{count:a}),`success`):s===0&&p?t(f?e(`auth_files.delete_problem_filtered_success`,{count:a,type:g}):e(`auth_files.delete_problem_success`,{count:a}),`success`):s===0?t(e(`auth_files.delete_filtered_success`,{count:a,type:g}),`success`):t(h?e(`auth_files.delete_filtered_result_partial`,{success:a,failed:s}):p?f?e(`auth_files.delete_problem_filtered_partial`,{success:a,failed:s,type:g}):e(`auth_files.delete_problem_partial`,{success:a,failed:s}):e(`auth_files.delete_filtered_partial`,{success:a,failed:s,type:g}),`warning`),f&&l(),p&&u(),h&&d()}}catch(n){let r=n instanceof Error?n.message:``;t(`${e(`notification.delete_failed`)}: ${r}`,`error`)}finally{m(!1)}}})},[k,O,r,n,t,e]),te=(0,y.useCallback)(async n=>{try{let r=await B.getRaw(`/auth-files/download?name=${encodeURIComponent(n)}`,{responseType:`blob`});XS({filename:n,blob:new Blob([r.data])}),t(e(`auth_files.download_success`),`success`)}catch(n){let r=n instanceof Error?n.message:``;t(`${e(`notification.download_failed`)}: ${r}`,`error`)}},[t,e]),P=(0,y.useCallback)(async(n,r)=>{let a=n.name,o=!r,s=n.disabled===!0;g(e=>({...e,[a]:!0})),i(e=>e.map(e=>e.name===a?{...e,disabled:o}:e));try{let n=await f_.setStatus(a,o);i(e=>e.map(e=>e.name===a?{...e,disabled:n.disabled}:e)),t(e(r?`auth_files.status_enabled_success`:`auth_files.status_disabled_success`,{name:a}),`success`)}catch(n){let r=n instanceof Error?n.message:``;i(e=>e.map(e=>e.name===a?{...e,disabled:s}:e)),t(`${e(`notification.update_failed`)}: ${r}`,`error`)}finally{g(e=>{if(!e[a])return e;let t={...e};return delete t[a],t})}},[t,e]),F=(0,y.useCallback)(async(n,a)=>{if(C.current)return;let o=Array.from(new Set(n));if(o.length===0||o.some(e=>h[e]===!0))return;let s=new Map(r.filter(e=>o.includes(e.name)).map(e=>[e.name,e.disabled===!0])),c=new Set(s.keys()),l=Array.from(c);if(l.length===0)return;let u=!a;C.current=!0,v(!0),g(e=>{let t={...e};return l.forEach(e=>{t[e]=!0}),t}),i(e=>e.map(e=>c.has(e.name)?{...e,disabled:u}:e));try{let n=await Promise.allSettled(l.map(e=>f_.setStatus(e,u))),r=0,a=0,o=new Set,c=new Map;n.forEach((e,t)=>{let n=l[t];e.status===`fulfilled`?(r++,c.set(n,e.value.disabled)):(a++,o.add(n))}),i(e=>e.map(e=>o.has(e.name)?{...e,disabled:s.get(e.name)===!0}:c.has(e.name)?{...e,disabled:c.get(e.name)}:e)),a===0?t(e(`auth_files.batch_status_success`,{count:r}),`success`):t(e(`auth_files.batch_status_partial`,{success:r,failed:a}),`warning`),O()}finally{C.current=!1,v(!1),g(e=>{let t={...e};return l.forEach(e=>{delete t[e]}),t})}},[O,r,t,h,e]);return{files:r,selectedFiles:b,selectionCount:w,loading:a,error:s,uploading:l,deleting:d,deletingAll:p,statusUpdating:h,batchStatusUpdating:_,fileInputRef:S,loadFiles:A,handleUploadClick:ee,handleFileChange:j,handleDelete:M,handleDeleteAll:N,handleDownload:te,handleStatusToggle:P,toggleSelect:T,selectAllVisible:E,invertVisibleSelection:D,deselectAll:O,batchDownload:(0,y.useCallback)(async n=>{let r=Array.from(new Set(n));if(r.length===0)return;let i=0,a=0;for(let e of r)try{let t=await B.getRaw(`/auth-files/download?name=${encodeURIComponent(e)}`,{responseType:`blob`});XS({filename:e,blob:new Blob([t.data])}),i++}catch{a++}a===0?t(e(`auth_files.batch_download_success`,{count:i}),`success`):t(e(`auth_files.batch_download_partial`,{success:i,failed:a}),`warning`)},[t,e]),batchSetStatus:F,batchDelete:(0,y.useCallback)(r=>{let i=Array.from(new Set(r));i.length!==0&&n({title:e(`auth_files.batch_delete_title`),message:e(`auth_files.batch_delete_confirm`,{count:i.length}),variant:`danger`,confirmText:e(`common.confirm`),onConfirm:async()=>{try{let n=await f_.deleteFiles(i);k(n.files),n.failed.length===0?t(`${e(`auth_files.delete_all_success`)} (${n.deleted})`,`success`):t(e(`auth_files.delete_filtered_partial`,{success:n.deleted,failed:n.failed.length,type:e(`auth_files.filter_all`)}),`warning`)}catch(n){let r=n instanceof Error?n.message:``;t(`${e(`notification.delete_failed`)}: ${r}`,`error`)}}})},[k,n,t,e])}}function QS(){let{t:e}=Xo(),t=Fc(e=>e.showNotification),[n,r]=(0,y.useState)(!1),[i,a]=(0,y.useState)(!1),[o,s]=(0,y.useState)([]),[c,l]=(0,y.useState)(``),[u,d]=(0,y.useState)(``),[f,p]=(0,y.useState)(null),m=(0,y.useRef)(new Map),h=(0,y.useCallback)(()=>{r(!1)},[]);return{modelsModalOpen:n,modelsLoading:i,modelsList:o,modelsFileName:c,modelsFileType:u,modelsError:f,showModels:(0,y.useCallback)(async n=>{l(n.name),d(n.type||``),s([]),p(null),r(!0);let i=m.current.get(n.name);if(i){s(i),a(!1);return}a(!0);try{let e=await f_.getModelsForAuthFile(n.name);m.current.set(n.name,e),s(e)}catch(n){let r=n instanceof Error?n.message:``;r.includes(`404`)||r.includes(`not found`)||r.includes(`Not Found`)?p(`unsupported`):t(`${e(`notification.load_failed`)}: ${r}`,`error`)}finally{a(!1)}},[t,e]),closeModelsModal:h}}function $S(e){let{viewMode:t,files:n}=e,{t:r}=Xo(),{showNotification:i,showConfirmation:a}=Fc(),[o,s]=(0,y.useState)({}),[c,l]=(0,y.useState)(null),[u,d]=(0,y.useState)({}),[f,p]=(0,y.useState)(null),[m,h]=(0,y.useState)({}),g=(0,y.useRef)(!1),_=(0,y.useRef)(!1),v=(0,y.useMemo)(()=>{let e=new Set;return Object.keys(u).forEach(t=>{let n=t.trim().toLowerCase();n&&e.add(n)}),n.forEach(t=>{if(typeof t.type==`string`){let n=t.type.trim().toLowerCase();n&&e.add(n)}if(typeof t.provider==`string`){let n=t.provider.trim().toLowerCase();n&&e.add(n)}}),Array.from(e)},[n,u]);(0,y.useEffect)(()=>{if(t!==`diagram`)return;let e=!1;return(async()=>{if(v.length===0){e||h({});return}let t=await Promise.all(v.map(async e=>{try{return{provider:e,models:await f_.getModelDefinitions(e)}}catch{return{provider:e,models:[]}}}));if(e)return;let n={};t.forEach(({provider:e,models:t})=>{t.length>0&&(n[e]=t)}),h(n)})(),()=>{e=!0}},[v,t]);let b=(0,y.useCallback)(async()=>{try{let e=await f_.getOauthExcludedModels();g.current=!1,s(e||{}),l(null)}catch(e){if((typeof e==`object`&&e&&`status`in e?e.status:void 0)===404){s({}),l(`unsupported`),g.current||(g.current=!0,i(r(`oauth_excluded.upgrade_required`),`warning`));return}}},[i,r]),x=(0,y.useCallback)(async()=>{try{let e=await f_.getOauthModelAlias();_.current=!1,d(e||{}),p(null)}catch(e){if((typeof e==`object`&&e&&`status`in e?e.status:void 0)===404){d({}),p(`unsupported`),_.current||(_.current=!0,i(r(`oauth_model_alias.upgrade_required`),`warning`));return}}},[i,r]);return{excluded:o,excludedError:c,modelAlias:u,modelAliasError:f,allProviderModels:m,providerList:v,loadExcluded:b,loadModelAlias:x,deleteExcluded:(0,y.useCallback)(e=>{let t=e.trim()||e;a({title:r(`oauth_excluded.delete_title`,{defaultValue:`Delete Exclusion`}),message:r(`oauth_excluded.delete_confirm`,{provider:t}),variant:`danger`,confirmText:r(`common.confirm`),onConfirm:async()=>{let t=hx(e);if(!t){i(r(`oauth_excluded.provider_required`),`error`);return}try{await f_.deleteOauthExcludedEntry(t),await b(),i(r(`oauth_excluded.delete_success`),`success`)}catch(e){try{let e=await f_.getOauthExcludedModels(),n={};Object.entries(e).forEach(([e,r])=>{hx(e)!==t&&(n[e]=r)}),await f_.replaceOauthExcludedModels(n),await b(),i(r(`oauth_excluded.delete_success`),`success`)}catch(t){let n=t instanceof Error?t.message:e instanceof Error?e.message:``;i(`${r(`oauth_excluded.delete_failed`)}: ${n}`,`error`)}}}})},[b,a,i,r]),deleteModelAlias:(0,y.useCallback)(e=>{a({title:r(`oauth_model_alias.delete_title`,{defaultValue:`Delete Mappings`}),message:r(`oauth_model_alias.delete_confirm`,{provider:e}),variant:`danger`,confirmText:r(`common.confirm`),onConfirm:async()=>{try{await f_.deleteOauthModelAlias(e),await x(),i(r(`oauth_model_alias.delete_success`),`success`)}catch(e){let t=e instanceof Error?e.message:``;i(`${r(`oauth_model_alias.delete_failed`)}: ${t}`,`error`)}}})},[x,a,i,r]),handleMappingUpdate:(0,y.useCallback)(async(e,t,n)=>{if(!e||!t||!n)return;let a=hx(e);if(!a)return;let o=Object.keys(u).find(e=>hx(e)===a),s=(o?u[o]:null)??[],c=t.trim(),l=n.trim(),d=c.toLowerCase(),f=l.toLowerCase();if(s.some(e=>(e.name??``).trim().toLowerCase()===d&&(e.alias??``).trim().toLowerCase()===f))return;let p=[...s,{name:c,alias:l,fork:!0}];try{await f_.saveOauthModelAlias(a,p),await x(),i(r(`oauth_model_alias.save_success`),`success`)}catch(e){let t=e instanceof Error?e.message:``;i(`${r(`oauth_model_alias.save_failed`)}: ${t}`,`error`)}},[x,u,i,r]),handleDeleteLink:(0,y.useCallback)((e,t,n)=>{let o=t.trim(),s=n.trim();!e||!o||!s||a({title:r(`oauth_model_alias.delete_link_title`,{defaultValue:`Unlink mapping`}),message:(0,I.jsx)(Go,{i18nKey:`oauth_model_alias.delete_link_confirm`,values:{provider:e,sourceModel:o,alias:s},components:{code:(0,I.jsx)(`code`,{})}}),variant:`danger`,confirmText:r(`common.confirm`),onConfirm:async()=>{let t=hx(e),n=Object.keys(u).find(e=>hx(e)===t),a=(n?u[n]:null)??[],c=o.toLowerCase(),l=s.toLowerCase(),d=a.filter(e=>(e.name??``).trim().toLowerCase()!==c||(e.alias??``).trim().toLowerCase()!==l);if(d.length!==a.length)try{d.length===0?await f_.deleteOauthModelAlias(t):await f_.saveOauthModelAlias(t,d),await x(),i(r(`oauth_model_alias.save_success`),`success`)}catch(e){let t=e instanceof Error?e.message:``;i(`${r(`oauth_model_alias.save_failed`)}: ${t}`,`error`)}}})},[x,u,a,i,r]),handleToggleFork:(0,y.useCallback)(async(e,t,n,a)=>{let o=hx(e);if(!o)return;let s=Object.keys(u).find(e=>hx(e)===o),c=(s?u[s]:null)??[],l=t.trim().toLowerCase(),d=n.trim().toLowerCase(),f=!1,p=c.map(e=>{let t=(e.name??``).trim().toLowerCase(),n=(e.alias??``).trim().toLowerCase();return t===l&&n===d?(f=!0,a?{...e,fork:!0}:{name:e.name,alias:e.alias}):e});if(f)try{await f_.saveOauthModelAlias(o,p),await x(),i(r(`oauth_model_alias.save_success`),`success`)}catch(e){let t=e instanceof Error?e.message:``;i(`${r(`oauth_model_alias.save_failed`)}: ${t}`,`error`)}},[x,u,i,r]),handleRenameAlias:(0,y.useCallback)(async(e,t)=>{let n=e.trim(),a=t.trim();if(!n||!a||n===a)return;let o=n.toLowerCase(),s=Object.entries(u).filter(([e,t])=>t.some(e=>(e.alias??``).trim().toLowerCase()===o));if(s.length===0)return;let c=!1,l=``;try{let e=(await Promise.allSettled(s.map(([e,t])=>{let n=t.map(e=>(e.alias??``).trim().toLowerCase()===o?{...e,alias:a}:e);return f_.saveOauthModelAlias(e,n)}))).filter(e=>e.status===`rejected`);if(e.length>0){c=!0;let t=e[0].reason;l=t instanceof Error?t.message:String(t??``)}}finally{await x()}c?i(l?`${r(`oauth_model_alias.save_failed`)}: ${l}`:r(`oauth_model_alias.save_failed`),`error`):i(r(`oauth_model_alias.save_success`),`success`)},[x,u,i,r]),handleDeleteAlias:(0,y.useCallback)(e=>{let t=e.trim();if(!t)return;let n=t.toLowerCase(),o=Object.entries(u).filter(([e,t])=>t.some(e=>(e.alias??``).trim().toLowerCase()===n));o.length!==0&&a({title:r(`oauth_model_alias.delete_alias_title`,{defaultValue:`Delete Alias`}),message:(0,I.jsx)(Go,{i18nKey:`oauth_model_alias.delete_alias_confirm`,values:{alias:t},components:{code:(0,I.jsx)(`code`,{})}}),variant:`danger`,confirmText:r(`common.confirm`),onConfirm:async()=>{let e=!1,t=``;try{let r=(await Promise.allSettled(o.map(([e,t])=>{let r=t.filter(e=>(e.alias??``).trim().toLowerCase()!==n);return r.length===0?f_.deleteOauthModelAlias(e):f_.saveOauthModelAlias(e,r)}))).filter(e=>e.status===`rejected`);if(r.length>0){e=!0;let n=r[0].reason;t=n instanceof Error?n.message:String(n??``)}}finally{await x()}e?i(t?`${r(`oauth_model_alias.delete_failed`)}: ${t}`:r(`oauth_model_alias.delete_failed`),`error`):i(r(`oauth_model_alias.delete_success`),`success`)}})},[x,u,a,i,r])}}var eC=e=>!!e&&typeof e==`object`&&!Array.isArray(e),tC=e=>eC(e)?Object.values(e).every(e=>typeof e==`string`)?null:`auth_files.headers_invalid_value`:`auth_files.headers_invalid_object`,nC=e=>{if(!e.trim())return{value:null,errorKey:null};let t;try{t=JSON.parse(e)}catch{return{value:null,errorKey:`auth_files.headers_invalid_json`}}let n=tC(t);return n?{value:null,errorKey:n}:{value:t,errorKey:null}},rC=e=>typeof e==`string`?e.trim():``,iC=1e3,aC=e=>{let t=e.trim();return t?t.length<=iC?t:`${t.slice(0,iC)}\n...`:``},oC=(e,t)=>({loading:!1,error:t(sC(e)),rawText:e,originalText:e,invalidContentPreview:aC(e)}),sC=e=>{let t=e.trimStart().slice(0,4096).toLowerCase(),n=t.startsWith(`<!doctype html`)||t.startsWith(`<html`)||t.includes(`<head`)||t.includes(`<body`),r=t.includes(`cf_chl`)||t.includes(`__cf_chl_tk`)||t.includes(`challenge-platform`)||t.includes(`cloudflare`);return n||r?`auth_files.prefix_proxy_html_challenge`:`auth_files.prefix_proxy_invalid_json`},cC=e=>!!(e&&Object.keys(e).length>0),lC=e=>eC(e)?Object.entries(e).reduce((e,[t,n])=>{if(typeof n!=`string`)return e;let r=t.trim(),i=n.trim();return!r||!i||(e[r]=i),e},{}):{},uC=(e,t)=>{let n={},r=new Set(Object.keys(t));return Object.entries(t).forEach(([t,r])=>{e[t]!==r&&(n[t]=r)}),Object.keys(e).forEach(e=>{r.has(e)||(n[e]=``)}),Object.keys(n).length>0?n:void 0},dC=(e,t)=>{if(!t)return;let n=lC(e.headers);Object.entries(t).forEach(([e,t])=>{let r=e.trim();if(!r)return;let i=t.trim();if(!i){delete n[r];return}n[r]=i}),Object.keys(n).length>0?e.headers=n:delete e.headers},fC=(e,t)=>{let n=e.json??{},r={},i=rC(n.prefix),a=e.prefix.trim();a!==i&&(r.prefix=a);let o=rC(n.proxy_url),s=e.proxyUrl.trim();s!==o&&(r.proxy_url=s);let c=Sx(n.priority),l=e.priority.trim(),u=Sx(l);if(l?u!==void 0&&(u===0?c!==void 0&&c!==0&&(r.priority=0):u!==c&&(r.priority=u)):c!==void 0&&c!==0&&(r.priority=0),e.noteTouched){let t=rC(n.note),i=e.note.trim();i!==t&&(r.note=i)}if(e.providerKey===`codex`&&e.websocketsTouched){let t=wx(n),i=!!e.websockets;i!==t&&(r.websockets=i)}if(e.headersTouched){let{value:i,errorKey:a}=nC(e.headersText);if(a)throw Error(t(a));let o=uC(lC(n.headers),lC(i??{}));o&&(r.headers=o)}return r},pC=(e,t)=>{if(!e?.json)return e?.rawText??``;let n=fC(e,t),r={...e.json};return n.prefix!==void 0&&(n.prefix?r.prefix=n.prefix:delete r.prefix),n.proxy_url!==void 0&&(n.proxy_url?r.proxy_url=n.proxy_url:delete r.proxy_url),n.priority!==void 0&&(n.priority===0?delete r.priority:r.priority=n.priority),n.note!==void 0&&(n.note?r.note=n.note:`note`in r&&delete r.note),dC(r,n.headers),n.websockets!==void 0&&(r=Tx(r,n.websockets)),JSON.stringify(r)};function mC(e){let{disableControls:t,loadFiles:n}=e,{t:r}=Xo(),i=Fc(e=>e.showNotification),[a,o]=(0,y.useState)(null),s=!!(a?.headersTouched&&a.headersError),c=a&&!s?pC(a,e=>r(e)):``,l=cC(a?.json&&!s?fC(a,e=>r(e)):null);return{prefixProxyEditor:a,prefixProxyUpdatedText:c,prefixProxyDirty:l,openPrefixProxyEditor:async e=>{let n=e.name,s=hx(String(e.type??e.provider??``));if(!t){if(a?.fileName===n){o(null);return}o({fileName:n,fileInfoText:JSON.stringify(e,null,2),loading:!0,saving:!1,error:null,originalText:``,rawText:``,invalidContentPreview:``,json:null,providerKey:s,prefix:``,proxyUrl:``,priority:``,websockets:!1,websocketsTouched:!1,note:``,noteTouched:!1,headersText:``,headersTouched:!1,headersError:null});try{let t=await f_.downloadText(n),i=t.trim(),a;try{a=JSON.parse(i)}catch{o(e=>!e||e.fileName!==n?e:{...e,...oC(t,e=>r(e))});return}if(!a||typeof a!=`object`||Array.isArray(a)){o(e=>!e||e.fileName!==n?e:{...e,...oC(t,e=>r(e))});return}let s={...a},c=JSON.stringify(s),l=hx(String(s.type??s.provider??e.type??e.provider??``)),u=typeof s.prefix==`string`?s.prefix:``,d=typeof s.proxy_url==`string`?s.proxy_url:``,f=Sx(s.priority),p=l===`codex`?wx(s):!1,m=typeof s.note==`string`?s.note:``,h=s.headers,g=``,_=null;if(h!==void 0){g=JSON.stringify(h,null,2);let{errorKey:e}=nC(g);_=e?r(e):null}o(e=>!e||e.fileName!==n?e:{...e,loading:!1,originalText:c,rawText:c,invalidContentPreview:``,json:s,providerKey:l,prefix:u,proxyUrl:d,priority:f===void 0?``:String(f),websockets:p,websocketsTouched:!1,note:m,noteTouched:!1,headersText:g,headersTouched:!1,headersError:_,error:null})}catch(e){let t=e instanceof Error?e.message:r(`notification.download_failed`);o(e=>!e||e.fileName!==n?e:{...e,loading:!1,error:t,rawText:``}),i(`${r(`notification.download_failed`)}: ${t}`,`error`)}}},closePrefixProxyEditor:()=>{o(null)},handlePrefixProxyChange:(e,t)=>{o(n=>{if(!n)return n;if(e===`prefix`)return{...n,prefix:String(t)};if(e===`proxyUrl`)return{...n,proxyUrl:String(t)};if(e===`priority`)return{...n,priority:String(t)};if(e===`websockets`)return{...n,websockets:!!t,websocketsTouched:!0};if(e===`note`)return{...n,note:String(t),noteTouched:!0};if(e===`headersText`){let e=String(t),{errorKey:i}=nC(e);return{...n,headersText:e,headersTouched:!0,headersError:i?r(i):null}}return n})},handlePrefixProxySave:async()=>{if(!a?.json||!l)return;let e=a.fileName,t;try{t=fC(a,e=>r(e))}catch(e){i(e instanceof Error?e.message:`Invalid format`,`error`);return}if(cC(t)){o(t=>!t||t.fileName!==e?t:{...t,saving:!0});try{await f_.patchFields(e,t),i(r(`auth_files.prefix_proxy_saved_success`,{name:e}),`success`),await n(),o(null)}catch(t){let n=t instanceof Error?t.message:``;i(`${r(`notification.update_failed`)}: ${n}`,`error`),o(t=>!t||t.fileName!==e?t:{...t,saving:!1})}}}}}function hC(e){return(0,y.useMemo)(()=>{let t=new Map;return e.forEach(e=>{let n=pv(e.auth_index??e.authIndex);n&&t.set(n,vv(mv(e.recent_requests??e.recentRequests)))}),t},[e])}var gC=[`default`,`az`,`priority`],_C=`authFilesPage.uiState`,vC=`authFilesPage.compactMode`,yC=new Set(gC),bC=e=>typeof e==`string`&&yC.has(e),xC=e=>{if(!e)return null;let t=e.getItem(_C);if(!t)return null;let n=JSON.parse(t);return n&&typeof n==`object`?n:null},SC=()=>{if(typeof window>`u`)return null;try{return xC(window.localStorage)??xC(window.sessionStorage)}catch{return null}},CC=e=>{if(!(typeof window>`u`)){try{window.localStorage.setItem(_C,JSON.stringify(e))}catch{}try{window.sessionStorage.removeItem(_C)}catch{}}},wC=()=>{if(typeof window>`u`)return null;try{let e=window.localStorage.getItem(vC);return e===null?null:JSON.parse(e)===!0}catch{return null}},TC=e=>{if(!(typeof window>`u`))try{window.localStorage.setItem(vC,JSON.stringify(e))}catch{}},EC=e=>1-(1-e)**4,DC=e=>e**3,OC=`translateX(-50%)`,kC=`translateX(-50%) translateY(56px)`,AC=9,jC=12,MC=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),NC=e=>{if(!e.includes(`*`))return null;let t=e.split(`*`).map(MC).join(`.*`);return new RegExp(t,`i`)};function PC(){let{t:e}=Xo(),t=Fc(e=>e.showNotification),n=mp(e=>e.connectionStatus),r=Wc(e=>e.resolvedTheme),i=ym(),a=i?i.status===`current`:!0,o=nr(),[s,c]=(0,y.useState)(`all`),[l,u]=(0,y.useState)(!1),[d,f]=(0,y.useState)(!1),[p,m]=(0,y.useState)(!1),[h,g]=(0,y.useState)(``),[_,v]=(0,y.useState)(1),[b,x]=(0,y.useState)({regular:AC,compact:jC}),[C,w]=(0,y.useState)(`9`),[T,E]=(0,y.useState)(`list`),[D,O]=(0,y.useState)(`default`),[k,A]=(0,y.useState)(!1),[ee,j]=(0,y.useState)(!1),M=(0,y.useRef)(null),N=(0,y.useRef)(null),te=(0,y.useRef)(0),P=(0,y.useRef)(0),{files:F,selectedFiles:ne,selectionCount:re,loading:ie,error:ae,uploading:oe,deleting:se,deletingAll:ce,statusUpdating:le,batchStatusUpdating:ue,fileInputRef:de,loadFiles:fe,handleUploadClick:pe,handleFileChange:me,handleDelete:he,handleDeleteAll:ge,handleDownload:_e,handleStatusToggle:ve,toggleSelect:ye,selectAllVisible:be,invertVisibleSelection:xe,deselectAll:Se,batchDownload:Ce,batchSetStatus:we,batchDelete:Te}=ZS(),Ee=hC(F),{excluded:De,excludedError:Oe,modelAlias:ke,modelAliasError:Ae,allProviderModels:je,loadExcluded:Me,loadModelAlias:Ne,deleteExcluded:Pe,deleteModelAlias:Fe,handleMappingUpdate:Ie,handleDeleteLink:Le,handleToggleFork:Re,handleRenameAlias:ze,handleDeleteAlias:Be}=$S({viewMode:T,files:F}),{modelsModalOpen:Ve,modelsLoading:He,modelsList:Ue,modelsFileName:We,modelsFileType:Ge,modelsError:Ke,showModels:qe,closeModelsModal:Je}=QS(),{prefixProxyEditor:Ye,prefixProxyUpdatedText:Xe,prefixProxyDirty:Ze,openPrefixProxyEditor:Qe,closePrefixProxyEditor:$e,handlePrefixProxyChange:et,handlePrefixProxySave:tt}=mC({disableControls:n!==`connected`,loadFiles:fe}),nt=n!==`connected`,rt=hx(String(s)),it=ax.has(rt)?rt:null,at=p?b.compact:b.regular;(0,y.useEffect)(()=>{let e=wC();typeof e==`boolean`&&m(e);let t=SC();if(t){typeof t.filter==`string`&&t.filter.trim()&&c(hx(t.filter)),typeof t.problemOnly==`boolean`&&u(t.problemOnly),typeof t.disabledOnly==`boolean`&&f(t.disabledOnly),typeof e!=`boolean`&&typeof t.compactMode==`boolean`&&m(t.compactMode),typeof t.search==`string`&&g(t.search),typeof t.page==`number`&&Number.isFinite(t.page)&&v(Math.max(1,Math.round(t.page)));let n=typeof t.pageSize==`number`&&Number.isFinite(t.pageSize)?px(t.pageSize):null;x({regular:typeof t.regularPageSize==`number`&&Number.isFinite(t.regularPageSize)?px(t.regularPageSize):n??AC,compact:typeof t.compactPageSize==`number`&&Number.isFinite(t.compactPageSize)?px(t.compactPageSize):n??jC}),bC(t.sortMode)&&O(t.sortMode)}j(!0)},[]),(0,y.useEffect)(()=>{ee&&(CC({filter:s,problemOnly:l,disabledOnly:d,compactMode:p,search:h,page:_,pageSize:at,regularPageSize:b.regular,compactPageSize:b.compact,sortMode:D}),TC(p))},[p,d,s,_,at,b,l,h,D,ee]),(0,y.useEffect)(()=>{w(String(at))},[at]);let ot=(0,y.useCallback)(e=>{x(t=>p?{...t,compact:e}:{...t,regular:e})},[p]),st=e=>{let t=e.trim();if(!t){w(String(at));return}let n=Number(t);if(!Number.isFinite(n)){w(String(at));return}let r=px(n);ot(r),w(String(r)),v(1)},ct=e=>{let t=e.currentTarget.value;w(t);let n=t.trim();if(!n)return;let r=Number(n);if(!Number.isFinite(r))return;let i=Math.round(r);i<3||i>30||(ot(i),v(1))},lt=(0,y.useCallback)(e=>{!bC(e)||e===D||(O(e),v(1))},[D]),ut=(0,y.useCallback)(async()=>{await Promise.all([fe(),Me(),Ne()])},[fe,Me,Ne]);iv(ut),(0,y.useEffect)(()=>{a&&(fe(),Me(),Ne())},[a,fe,Me,Ne]),sv(()=>{fe().catch(()=>{})},a?24e4:null);let dt=(0,y.useMemo)(()=>{let e=new Set([`all`]);return F.forEach(t=>{let n=hx(String(t.type??t.provider??``));n&&e.add(n)}),Array.from(e)},[F]),ft=(0,y.useMemo)(()=>F.filter(e=>!(l&&!vx(e)||d&&e.disabled!==!0)),[d,F,l]),pt=(0,y.useMemo)(()=>[{value:`default`,label:e(`auth_files.sort_default`)},{value:`az`,label:e(`auth_files.sort_az`)},{value:`priority`,label:e(`auth_files.sort_priority`)}],[e]),mt=(0,y.useMemo)(()=>{let e={all:ft.length};return ft.forEach(t=>{let n=hx(String(t.type??t.provider??``));n&&(e[n]=(e[n]||0)+1)}),e},[ft]),ht=h.trim(),gt=(0,y.useMemo)(()=>NC(ht),[ht]),_t=(0,y.useMemo)(()=>{let e=ht.toLowerCase();return ft.filter(t=>{let n=hx(String(t.type??t.provider??``)),r=rt===`all`||n===rt,i=!ht||[t.name,t.type,t.provider].some(t=>{let n=(t||``).toString();return gt?gt.test(n):n.toLowerCase().includes(e)});return r&&i})},[ft,rt,ht,gt]),vt=(0,y.useMemo)(()=>{let e=[..._t];return D===`default`?e.sort((e,t)=>{let n=hx(String(e.provider??e.type??`unknown`)),r=hx(String(t.provider??t.type??`unknown`)),i=n.localeCompare(r);return i===0?e.name.localeCompare(t.name):i}):D===`az`?e.sort((e,t)=>e.name.localeCompare(t.name)):D===`priority`&&e.sort((e,t)=>{let n=Sx(e.priority)??0;return(Sx(t.priority)??0)-n}),e},[_t,D]),yt=Math.max(1,Math.ceil(vt.length/at)),bt=Math.min(_,yt),xt=(bt-1)*at,St=(0,y.useMemo)(()=>vt.slice(xt,xt+at),[at,vt,xt]),Ct=(0,y.useMemo)(()=>St.filter(e=>!Ex(e)),[St]),wt=(0,y.useMemo)(()=>vt.filter(e=>!Ex(e)),[vt]),Tt=(0,y.useMemo)(()=>Array.from(ne),[ne]),Et=(0,y.useMemo)(()=>Tt.some(e=>le[e]===!0),[Tt,le]),Dt=nt||Tt.length===0||ue||Et,Ot=(0,y.useCallback)(async n=>{let r=await Zb(n);t(r?e(`notification.link_copied`,{defaultValue:`Copied to clipboard`}):e(`notification.copy_failed`,{defaultValue:`Copy failed`}),r?`success`:`error`)},[t,e]),kt=(0,y.useCallback)(e=>{let t=(e||(s===`all`?``:String(s))).trim(),n=new URLSearchParams;t&&n.set(`provider`,t);let r=n.toString();o(`/auth-files/oauth-excluded${r?`?${r}`:``}`,{state:{fromAuthFiles:!0}})},[s,o]),At=(0,y.useCallback)(e=>{let t=(e||(s===`all`?``:String(s))).trim(),n=new URLSearchParams;t&&n.set(`provider`,t);let r=n.toString();o(`/auth-files/oauth-model-alias${r?`?${r}`:``}`,{state:{fromAuthFiles:!0}})},[s,o]);Jb(M,`--auth-files-action-bar-height`,k),(0,y.useEffect)(()=>{P.current=re,re>0&&A(!0)},[re]),(0,y.useLayoutEffect)(()=>{if(!k)return;let e=re,t=te.current,n=M.current;n&&(N.current?.stop(),N.current=null,e>0&&t===0?N.current=gm(n,{transform:[kC,OC],opacity:[0,1]},{duration:.28,ease:EC,onComplete:()=>{n.style.transform=OC,n.style.opacity=`1`}}):e===0&&t>0&&(N.current=gm(n,{transform:[OC,kC],opacity:[1,0]},{duration:.22,ease:DC,onComplete:()=>{P.current===0&&A(!1)}})),te.current=e)},[k,re]),(0,y.useEffect)(()=>()=>{N.current?.stop(),N.current=null},[]);let jt=()=>(0,I.jsx)(`div`,{className:H.filterRail,children:(0,I.jsx)(`div`,{className:H.filterTags,children:dt.map(t=>{let n=rt===t,i=xx(t,r),a=t===`all`?{bg:`var(--bg-tertiary)`,text:`var(--text-primary)`}:bx(t,r),o={"--filter-color":a.text,"--filter-surface":a.bg,"--filter-active-text":r===`dark`?`#111827`:`#ffffff`};return(0,I.jsxs)(`button`,{className:`${H.filterTag} ${n?H.filterTagActive:``}`,style:o,onClick:()=>{c(t),v(1)},children:[(0,I.jsxs)(`span`,{className:H.filterTagLabel,children:[t===`all`?(0,I.jsx)(`span`,{className:`${H.filterTagIconWrap} ${H.filterAllIconWrap}`,children:(0,I.jsx)(os,{className:H.filterAllIcon,size:16})}):(0,I.jsx)(`span`,{className:H.filterTagIconWrap,children:i?(0,I.jsx)(`img`,{src:i,alt:``,className:H.filterTagIcon}):(0,I.jsx)(`span`,{className:H.filterTagIconFallback,children:yx(e,t).slice(0,1).toUpperCase()})}),(0,I.jsx)(`span`,{className:H.filterTagText,children:yx(e,t)})]}),(0,I.jsx)(`span`,{className:H.filterTagCount,children:mt[t]??0})]},t)})})}),Mt=(0,I.jsxs)(`div`,{className:H.titleWrapper,children:[(0,I.jsx)(`span`,{children:e(`auth_files.title_section`)}),F.length>0&&(0,I.jsx)(`span`,{className:H.countBadge,children:F.length})]}),Nt=d?e(`auth_files.delete_filtered_result_button`):l?rt===`all`?e(`auth_files.delete_problem_button`):e(`auth_files.delete_problem_button_with_type`,{type:yx(e,rt)}):rt===`all`?e(`auth_files.delete_all_button`):`${e(`common.delete`)} ${yx(e,rt)}`;return(0,I.jsxs)(`div`,{className:H.container,children:[(0,I.jsxs)(`div`,{className:H.pageHeader,children:[(0,I.jsx)(`h1`,{className:H.pageTitle,children:e(`auth_files.title`)}),(0,I.jsx)(`p`,{className:H.description,children:e(`auth_files.description`)})]}),(0,I.jsxs)(Yb,{title:Mt,extra:(0,I.jsxs)(`div`,{className:H.headerActions,children:[(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:ut,disabled:ie,children:e(`common.refresh`)}),(0,I.jsx)(L,{size:`sm`,onClick:pe,disabled:nt||oe,loading:oe,children:e(`auth_files.upload_button`)}),(0,I.jsx)(L,{variant:`danger`,size:`sm`,onClick:()=>ge({filter:s,problemOnly:l,disabledOnly:d,onResetFilterToAll:()=>c(`all`),onResetProblemOnly:()=>u(!1),onResetDisabledOnly:()=>f(!1)}),disabled:nt||ie||ce,loading:ce,children:Nt}),(0,I.jsx)(`input`,{ref:de,type:`file`,accept:`.json,application/json`,multiple:!0,style:{display:`none`},onChange:me})]}),children:[ae&&(0,I.jsx)(`div`,{className:H.errorBox,children:ae}),(0,I.jsxs)(`div`,{className:H.filterSection,children:[jt(),(0,I.jsxs)(`div`,{className:H.filterContent,children:[(0,I.jsx)(`div`,{className:H.filterControlsPanel,children:(0,I.jsxs)(`div`,{className:H.filterControls,children:[(0,I.jsxs)(`div`,{className:`${H.filterItem} ${H.filterSearchItem}`,children:[(0,I.jsx)(`label`,{children:e(`auth_files.search_label`)}),(0,I.jsx)($o,{className:H.searchInput,value:h,onChange:e=>{g(e.target.value),v(1)},placeholder:e(`auth_files.search_placeholder`),rightElement:(0,I.jsx)(Ds,{className:H.searchIcon,size:18})})]}),(0,I.jsxs)(`div`,{className:H.filterItem,children:[(0,I.jsx)(`label`,{children:e(`auth_files.page_size_label`)}),(0,I.jsx)(`input`,{className:H.pageSizeSelect,type:`number`,min:3,max:30,step:1,value:C,onChange:ct,onBlur:e=>st(e.currentTarget.value),onKeyDown:e=>{e.key===`Enter`&&e.currentTarget.blur()}})]}),(0,I.jsxs)(`div`,{className:H.filterItem,children:[(0,I.jsx)(`label`,{children:e(`auth_files.sort_label`)}),(0,I.jsx)(nc,{className:H.sortSelect,value:D,options:pt,onChange:lt,ariaLabel:e(`auth_files.sort_label`),fullWidth:!0})]}),(0,I.jsxs)(`div`,{className:`${H.filterItem} ${H.filterToggleItem}`,children:[(0,I.jsx)(`label`,{children:e(`auth_files.display_options_label`)}),(0,I.jsxs)(`div`,{className:H.filterToggleGroup,children:[(0,I.jsx)(`div`,{className:H.filterToggleCard,children:(0,I.jsx)(hy,{checked:l,onChange:e=>{u(e),v(1)},ariaLabel:e(`auth_files.problem_filter_only`),label:(0,I.jsx)(`span`,{className:H.filterToggleLabel,children:e(`auth_files.problem_filter_only`)})})}),(0,I.jsx)(`div`,{className:H.filterToggleCard,children:(0,I.jsx)(hy,{checked:d,onChange:e=>{f(e),v(1)},ariaLabel:e(`auth_files.disabled_filter_only`),label:(0,I.jsx)(`span`,{className:H.filterToggleLabel,children:e(`auth_files.disabled_filter_only`)})})}),(0,I.jsx)(`div`,{className:H.filterToggleCard,children:(0,I.jsx)(hy,{checked:p,onChange:e=>m(e),ariaLabel:e(`auth_files.compact_mode_label`),label:(0,I.jsx)(`span`,{className:H.filterToggleLabel,children:e(`auth_files.compact_mode_label`)})})})]})]})]})}),ie?(0,I.jsx)(`div`,{className:H.hint,children:e(`common.loading`)}):St.length===0?(0,I.jsx)(Xb,{title:e(`auth_files.search_empty_title`),description:e(`auth_files.search_empty_desc`)}):(0,I.jsx)(`div`,{className:`${H.fileGrid} ${it?H.fileGridQuotaManaged:``} ${p?H.fileGridCompact:``}`,children:St.map(e=>(0,I.jsx)(PS,{file:e,compact:p,selected:ne.has(e.name),resolvedTheme:r,disableControls:nt,deleting:se,statusUpdating:le,quotaFilterType:it,statusBarCache:Ee,onShowModels:qe,onDownload:_e,onOpenPrefixProxyEditor:Qe,onDelete:he,onToggleStatus:ve,onToggleSelect:ye},e.name))}),!ie&&vt.length>at&&(0,I.jsxs)(`div`,{className:H.pagination,children:[(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:()=>v(Math.max(1,bt-1)),disabled:bt<=1,children:e(`auth_files.pagination_prev`)}),(0,I.jsx)(`div`,{className:H.pageInfo,children:e(`auth_files.pagination_info`,{current:bt,total:yt,count:vt.length})}),(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:()=>v(Math.min(yt,bt+1)),disabled:bt>=yt,children:e(`auth_files.pagination_next`)})]})]})]})]}),(0,I.jsx)(LS,{disableControls:nt,excludedError:Oe,excluded:De,onAdd:()=>kt(),onEdit:kt,onDelete:Pe}),(0,I.jsx)(YS,{disableControls:nt,viewMode:T,onViewModeChange:E,onAdd:()=>At(),onEditProvider:At,onDeleteProvider:Fe,modelAliasError:Ae,modelAlias:ke,allProviderModels:je,onUpdate:Ie,onDeleteLink:Le,onToggleFork:Re,onRenameAlias:ze,onDeleteAlias:Be}),(0,I.jsx)(FS,{open:Ve,fileName:We,fileType:Ge,loading:He,error:Ke,models:Ue,excluded:De,onClose:Je,onCopyText:Ot}),(0,I.jsx)(IS,{disableControls:nt,editor:Ye,updatedText:Xe,dirty:Ze,onClose:$e,onCopyText:Ot,onSave:tt,onChange:et}),k&&typeof document<`u`?(0,S.createPortal)((0,I.jsx)(`div`,{className:H.batchActionContainer,ref:M,children:(0,I.jsxs)(`div`,{className:H.batchActionBar,children:[(0,I.jsxs)(`div`,{className:H.batchActionLeft,children:[(0,I.jsx)(`span`,{className:H.batchSelectionText,children:e(`auth_files.batch_selected`,{count:re})}),(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:()=>be(St),disabled:Ct.length===0,children:e(`auth_files.batch_select_page`)}),(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:()=>be(vt),disabled:wt.length===0,children:e(`auth_files.batch_select_filtered`)}),(0,I.jsx)(L,{variant:`ghost`,size:`sm`,onClick:()=>xe(St),disabled:Ct.length===0,children:e(`auth_files.batch_invert_page`)}),(0,I.jsx)(L,{variant:`ghost`,size:`sm`,onClick:Se,children:e(`auth_files.batch_deselect`)})]}),(0,I.jsxs)(`div`,{className:H.batchActionRight,children:[(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:()=>void Ce(Tt),disabled:nt||Tt.length===0,children:e(`auth_files.batch_download`)}),(0,I.jsx)(L,{size:`sm`,onClick:()=>we(Tt,!0),disabled:Dt,children:e(`auth_files.batch_enable`)}),(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:()=>we(Tt,!1),disabled:Dt,children:e(`auth_files.batch_disable`)}),(0,I.jsx)(L,{variant:`danger`,size:`sm`,onClick:()=>Te(Tt),disabled:nt||Tt.length===0,children:e(`common.delete`)})]})]})}),document.body):null]})}function FC({label:e,value:t,onChange:n,options:r,placeholder:i,disabled:a,hint:o,error:s,className:c=``,wrapperClassName:l=``,wrapperStyle:u,id:d,rightElement:f}){let[p,m]=(0,y.useState)(!1),[h,g]=(0,y.useState)(-1),_=(0,y.useRef)(null),v=r.map(e=>typeof e==`string`?{value:e,label:e}:{value:e.value,label:e.label||e.value}).filter(e=>{let n=t.toLowerCase();return e.value.toLowerCase().includes(n)||e.label&&e.label.toLowerCase().includes(n)});(0,y.useEffect)(()=>{let e=e=>{_.current&&!_.current.contains(e.target)&&m(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]);let b=e=>{n(e.target.value),m(!0),g(-1)},x=e=>{n(e),m(!1)};return(0,I.jsxs)(`div`,{className:`form-group ${l}`,ref:_,style:u,children:[e&&(0,I.jsx)(`label`,{htmlFor:d,children:e}),(0,I.jsxs)(`div`,{style:{position:`relative`},children:[(0,I.jsx)(`input`,{id:d,className:`input ${c}`.trim(),value:t,onChange:b,onFocus:()=>m(!0),onKeyDown:e=>{if(!a)if(e.key===`ArrowDown`){if(e.preventDefault(),!p){m(!0);return}g(e=>e<v.length-1?e+1:e)}else e.key===`ArrowUp`?(e.preventDefault(),g(e=>e>0?e-1:0)):e.key===`Enter`?p&&h>=0&&h<v.length?(e.preventDefault(),x(v[h].value)):p&&(e.preventDefault(),m(!1)):(e.key===`Escape`||e.key===`Tab`)&&m(!1)},placeholder:i,disabled:a,autoComplete:`off`,style:{paddingRight:32}}),(0,I.jsxs)(`div`,{style:{position:`absolute`,right:8,top:`50%`,transform:`translateY(-50%)`,display:`flex`,alignItems:`center`,pointerEvents:a?`none`:`auto`,cursor:`pointer`,height:`100%`},onClick:()=>!a&&m(!p),children:[f,(0,I.jsx)(Ts,{size:16,style:{opacity:.5,marginLeft:4}})]}),p&&v.length>0&&!a&&(0,I.jsx)(`div`,{className:`autocomplete-dropdown`,style:{position:`absolute`,top:`calc(100% + 4px)`,left:0,right:0,zIndex:1e3,backgroundColor:`var(--bg-secondary)`,border:`1px solid var(--border-color)`,borderRadius:`var(--radius-md)`,maxHeight:200,overflowY:`auto`,boxShadow:`0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)`},children:v.map((e,t)=>(0,I.jsxs)(`div`,{onClick:()=>x(e.value),style:{padding:`8px 12px`,cursor:`pointer`,backgroundColor:t===h?`var(--bg-tertiary)`:`transparent`,color:`var(--text-primary)`,display:`flex`,flexDirection:`column`,fontSize:`0.9rem`},onMouseEnter:()=>g(t),children:[(0,I.jsx)(`span`,{style:{fontWeight:500},children:e.value}),e.label&&e.label!==e.value&&(0,I.jsx)(`span`,{style:{fontSize:`0.85em`,color:`var(--text-secondary)`},children:e.label})]},`${e.value}-${t}`))})]}),o&&(0,I.jsx)(`div`,{className:`hint`,children:o}),s&&(0,I.jsx)(`div`,{className:`error-box`,children:s})]})}var IC={container:`SecondaryScreenShell-module__container___9DAwq`,topBar:`SecondaryScreenShell-module__topBar___vHzq4`,topBarTitle:`SecondaryScreenShell-module__topBarTitle___Q8LCy`,backButton:`SecondaryScreenShell-module__backButton___d6Zgy`,backIcon:`SecondaryScreenShell-module__backIcon___R8Iyn`,backText:`SecondaryScreenShell-module__backText___CODk7`,rightSlot:`SecondaryScreenShell-module__rightSlot___ZvWJR`,loadingState:`SecondaryScreenShell-module__loadingState___4Jbsa`,content:`SecondaryScreenShell-module__content___nVk3R`,contentWithFloatingAction:`SecondaryScreenShell-module__contentWithFloatingAction___4gXgb`,floatingActionContainer:`SecondaryScreenShell-module__floatingActionContainer___sSKk-`,floatingActionSurface:`SecondaryScreenShell-module__floatingActionSurface___Wfab-`},LC=(0,y.forwardRef)(function({title:e,onBack:t,backLabel:n=`Back`,backAriaLabel:r,rightAction:i,hideTopBarBackButton:a=!1,hideTopBarRightAction:o=!1,floatingAction:s,isLoading:c=!1,loadingLabel:l=`Loading...`,className:u=``,contentClassName:d=``,children:f},p){let m=[IC.container,u].filter(Boolean).join(` `),h=[IC.content,s?IC.contentWithFloatingAction:``,d].filter(Boolean).join(` `),g=typeof e==`string`?e:void 0,_=r??n,v=ym(),b=v?v.isCurrentLayer:!0,x=!!s&&b,C=(0,y.useRef)(null);return(0,y.useLayoutEffect)(()=>{if(!x)return;let e=C.current;if(!e)return;let t=()=>{let t=e.getBoundingClientRect().height;document.documentElement.style.setProperty(`--secondary-shell-floating-action-height`,`${t}px`)};t(),window.addEventListener(`resize`,t);let n=typeof ResizeObserver>`u`?null:new ResizeObserver(t);return n?.observe(e),()=>{n?.disconnect(),window.removeEventListener(`resize`,t),document.documentElement.style.removeProperty(`--secondary-shell-floating-action-height`)}},[x]),(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:m,ref:p,children:[(0,I.jsxs)(`div`,{className:IC.topBar,children:[t&&!a?(0,I.jsxs)(L,{variant:`ghost`,size:`sm`,onClick:t,className:IC.backButton,"aria-label":_,children:[(0,I.jsx)(`span`,{className:IC.backIcon,children:(0,I.jsx)(Es,{size:18})}),(0,I.jsx)(`span`,{className:IC.backText,children:n})]}):(0,I.jsx)(`div`,{}),(0,I.jsx)(`div`,{className:IC.topBarTitle,title:g,children:e}),(0,I.jsx)(`div`,{className:IC.rightSlot,children:o?null:i})]}),c?(0,I.jsxs)(`div`,{className:IC.loadingState,children:[(0,I.jsx)(kx,{size:16}),(0,I.jsx)(`span`,{children:l})]}):(0,I.jsx)(`div`,{className:h,children:f})]}),x&&typeof document<`u`?(0,S.createPortal)((0,I.jsx)(`div`,{className:IC.floatingActionContainer,children:(0,I.jsx)(`div`,{className:IC.floatingActionSurface,ref:C,children:s})}),document.body):null]})}),RC=28,zC=90,BC=1.2;function VC({enabled:e=!0,edgeSize:t=RC,threshold:n=zC,onBack:r}){let i=(0,y.useRef)(null),a=(0,y.useRef)(null);return(0,y.useEffect)(()=>{if(!e)return;let o=i.current;if(!o)return;let s=()=>{a.current=null},c=e=>{let t=a.current;if(!t?.active||e.pointerId!==t.pointerId)return;let n=e.clientX-t.startX,r=e.clientY-t.startY;Math.abs(r)>Math.abs(n)*BC&&s()},l=e=>{let t=a.current;if(!t?.active||e.pointerId!==t.pointerId)return;let i=e.clientX-t.startX,o=e.clientY-t.startY,c=Math.abs(i)>Math.abs(o)*BC;s(),i>=n&&c&&r()},u=e=>{let t=a.current;t?.active&&e.pointerId===t.pointerId&&s()},d=e=>{e.pointerType===`touch`&&e.isPrimary&&(e.clientX>t||(a.current={pointerId:e.pointerId,startX:e.clientX,startY:e.clientY,active:!0}))};return o.addEventListener(`pointerdown`,d,{passive:!0}),window.addEventListener(`pointermove`,c,{passive:!0}),window.addEventListener(`pointerup`,l,{passive:!0}),window.addEventListener(`pointercancel`,u,{passive:!0}),()=>{o.removeEventListener(`pointerdown`,d),window.removeEventListener(`pointermove`,c),window.removeEventListener(`pointerup`,l),window.removeEventListener(`pointercancel`,u)}},[t,e,r,n]),i}var HC={pageContent:`AuthFilesOAuthExcludedEditPage-module__pageContent___42nA2`,settingsCard:`AuthFilesOAuthExcludedEditPage-module__settingsCard___EE-1z`,settingsHeader:`AuthFilesOAuthExcludedEditPage-module__settingsHeader___Jm0RO`,settingsHeaderTitle:`AuthFilesOAuthExcludedEditPage-module__settingsHeaderTitle___nOj9w`,settingsHeaderHint:`AuthFilesOAuthExcludedEditPage-module__settingsHeaderHint___EzQSN`,settingsSection:`AuthFilesOAuthExcludedEditPage-module__settingsSection___ozndx`,settingsRow:`AuthFilesOAuthExcludedEditPage-module__settingsRow___z6QPQ`,settingsInfo:`AuthFilesOAuthExcludedEditPage-module__settingsInfo___lRYwp`,settingsLabel:`AuthFilesOAuthExcludedEditPage-module__settingsLabel___KbPgc`,settingsDesc:`AuthFilesOAuthExcludedEditPage-module__settingsDesc___6LSPN`,settingsControl:`AuthFilesOAuthExcludedEditPage-module__settingsControl___luVcd`,tagList:`AuthFilesOAuthExcludedEditPage-module__tagList___Is0Fd`,tag:`AuthFilesOAuthExcludedEditPage-module__tag___fyrKv`,tagActive:`AuthFilesOAuthExcludedEditPage-module__tagActive___EkiBG`,modelsHint:`AuthFilesOAuthExcludedEditPage-module__modelsHint___Rm6l4`,loadingModels:`AuthFilesOAuthExcludedEditPage-module__loadingModels___-9Wy6`,modelList:`AuthFilesOAuthExcludedEditPage-module__modelList___6ebAr`,modelItem:`AuthFilesOAuthExcludedEditPage-module__modelItem___v0y1o`,modelText:`AuthFilesOAuthExcludedEditPage-module__modelText___50mQC`,modelId:`AuthFilesOAuthExcludedEditPage-module__modelId___Z2Ylu`,modelDisplayName:`AuthFilesOAuthExcludedEditPage-module__modelDisplayName___ATlA5`,emptyModels:`AuthFilesOAuthExcludedEditPage-module__emptyModels___kAuwa`};function UC(){let{t:e}=Xo(),t=nr(),n=$n(),{showNotification:r}=Fc(),i=mp(e=>e.connectionStatus)!==`connected`,[a,o]=Gi(),s=a.get(`provider`)??``,[c,l]=(0,y.useState)(s),[u,d]=(0,y.useState)([]),[f,p]=(0,y.useState)({}),[m,h]=(0,y.useState)({}),[g,_]=(0,y.useState)(!0),[v,b]=(0,y.useState)(!1),[x,S]=(0,y.useState)(new Set),[C,w]=(0,y.useState)([]),[T,E]=(0,y.useState)(!1),[D,O]=(0,y.useState)(null),[k,A]=(0,y.useState)(!1);(0,y.useEffect)(()=>{l(s)},[s]);let ee=(0,y.useMemo)(()=>{let e=new Set;return Object.keys(f).forEach(t=>e.add(t)),Object.keys(m).forEach(t=>e.add(t)),u.forEach(t=>{typeof t.type==`string`&&e.add(t.type),typeof t.provider==`string`&&e.add(t.provider)}),gx(e)},[f,u,m]),j=(0,y.useMemo)(()=>hx(c),[c]),M=(0,y.useMemo)(()=>j?Object.prototype.hasOwnProperty.call(f,j):!1,[f,j]),N=(0,y.useMemo)(()=>M?e(`oauth_excluded.edit_title`,{provider:c.trim()||j}):e(`oauth_excluded.add_title`),[M,c,j,e]),te=(0,y.useCallback)(()=>{if(n.state?.fromAuthFiles){t(-1);return}t(`/auth-files`,{replace:!0})},[n.state,t]),P=VC({onBack:te});(0,y.useEffect)(()=>{let e=e=>{e.key===`Escape`&&te()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[te]),(0,y.useEffect)(()=>{let e=!1;return(async()=>{_(!0),b(!1);try{let[t,n,r]=await Promise.allSettled([f_.list(),f_.getOauthExcludedModels(),f_.getOauthModelAlias()]);if(e)return;if(t.status===`fulfilled`&&d(t.value?.files??[]),r.status===`fulfilled`&&h(r.value??{}),n.status===`fulfilled`){p(n.value??{});return}let i=n.status===`rejected`?n.reason:null;if((typeof i==`object`&&i&&`status`in i?i.status:void 0)===404){b(!0);return}}finally{e||_(!1)}})().catch(()=>{e||_(!1)}),()=>{e=!0}},[]),(0,y.useEffect)(()=>{if(!j){S(new Set);return}let e=f[j]??[];S(new Set(e))},[f,j]),(0,y.useEffect)(()=>{if(!j||v){w([]),O(null),E(!1);return}let t=!1;return E(!0),O(null),f_.getModelDefinitions(j).then(e=>{t||w(e)}).catch(n=>{if(t)return;let i=typeof n==`object`&&n&&`status`in n?n.status:void 0;if(i===400||i===404){w([]),O(`unsupported`);return}let a=n instanceof Error?n.message:``;r(`${e(`notification.load_failed`)}: ${a}`,`error`)}).finally(()=>{t||E(!1)}),()=>{t=!0}},[v,j,r,e]);let F=(0,y.useCallback)(e=>{l(e);let t=new URLSearchParams(a),n=e.trim();n?t.set(`provider`,n):t.delete(`provider`),o(t,{replace:!0})},[a,o]),ne=(0,y.useCallback)((e,t)=>{S(n=>{let r=new Set(n);return t?r.add(e):r.delete(e),r})},[]),re=(0,y.useCallback)(async()=>{let t=hx(c);if(!t){r(e(`oauth_excluded.provider_required`),`error`);return}let n=[...x];A(!0);try{n.length?await f_.saveOauthExcludedModels(t,n):M&&await f_.deleteOauthExcludedEntry(t),r(e(`oauth_excluded.save_success`),`success`),te()}catch(t){let n=t instanceof Error?t.message:``;r(`${e(`oauth_excluded.save_failed`)}: ${n}`,`error`)}finally{A(!1)}},[te,M,c,x,r,e]),ie=!i&&!k&&!v;return(0,I.jsx)(LC,{ref:P,title:N,onBack:te,backLabel:e(`common.back`),backAriaLabel:e(`common.back`),contentClassName:HC.pageContent,rightAction:(0,I.jsx)(L,{size:`sm`,onClick:re,loading:k,disabled:!ie,children:e(`oauth_excluded.save`)}),isLoading:g,loadingLabel:e(`common.loading`),children:v?(0,I.jsx)(Yb,{children:(0,I.jsx)(Xb,{title:e(`oauth_excluded.upgrade_required_title`),description:e(`oauth_excluded.upgrade_required_desc`)})}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(Yb,{className:HC.settingsCard,children:[(0,I.jsxs)(`div`,{className:HC.settingsHeader,children:[(0,I.jsxs)(`div`,{className:HC.settingsHeaderTitle,children:[(0,I.jsx)(fs,{size:16}),(0,I.jsx)(`span`,{children:e(`oauth_excluded.title`)})]}),(0,I.jsx)(`div`,{className:HC.settingsHeaderHint,children:e(`oauth_excluded.description`)})]}),(0,I.jsxs)(`div`,{className:HC.settingsSection,children:[(0,I.jsxs)(`div`,{className:HC.settingsRow,children:[(0,I.jsxs)(`div`,{className:HC.settingsInfo,children:[(0,I.jsx)(`div`,{className:HC.settingsLabel,children:e(`oauth_excluded.provider_label`)}),(0,I.jsx)(`div`,{className:HC.settingsDesc,children:e(`oauth_excluded.provider_hint`)})]}),(0,I.jsx)(`div`,{className:HC.settingsControl,children:(0,I.jsx)(FC,{id:`oauth-excluded-provider`,placeholder:e(`oauth_excluded.provider_placeholder`),value:c,onChange:F,options:ee,disabled:i||k,wrapperStyle:{marginBottom:0}})})]}),ee.length>0&&(0,I.jsx)(`div`,{className:HC.tagList,children:ee.map(t=>{let n=hx(c)===hx(t);return(0,I.jsx)(`button`,{type:`button`,className:`${HC.tag} ${n?HC.tagActive:``}`,onClick:()=>F(t),disabled:i||k,children:yx(e,t)},t)})})]})]}),(0,I.jsxs)(Yb,{className:HC.settingsCard,children:[(0,I.jsxs)(`div`,{className:HC.settingsHeader,children:[(0,I.jsx)(`div`,{className:HC.settingsHeaderTitle,children:e(`oauth_excluded.models_label`)}),j&&(0,I.jsx)(`div`,{className:HC.modelsHint,children:T?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(kx,{size:14}),(0,I.jsx)(`span`,{children:e(`oauth_excluded.models_loading`)})]}):D===`unsupported`?(0,I.jsx)(`span`,{children:e(`oauth_excluded.models_unsupported`)}):C.length>0?(0,I.jsx)(`span`,{children:e(`oauth_excluded.models_loaded`,{count:C.length})}):(0,I.jsx)(`span`,{children:e(`oauth_excluded.no_models_available`)})})]}),T?(0,I.jsxs)(`div`,{className:HC.loadingModels,children:[(0,I.jsx)(kx,{size:16}),(0,I.jsx)(`span`,{children:e(`common.loading`)})]}):C.length>0?(0,I.jsx)(`div`,{className:HC.modelList,children:C.map(e=>(0,I.jsx)(ic,{checked:x.has(e.id),disabled:i||k,onChange:t=>ne(e.id,t),className:HC.modelItem,labelClassName:HC.modelText,label:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:HC.modelId,children:e.id}),e.display_name&&e.display_name!==e.id&&(0,I.jsx)(`span`,{className:HC.modelDisplayName,children:e.display_name})]})},e.id))}):j?(0,I.jsx)(`div`,{className:HC.emptyModels,children:e(D===`unsupported`?`oauth_excluded.models_unsupported`:`oauth_excluded.no_models_available`)}):(0,I.jsx)(`div`,{className:HC.emptyModels,children:e(`oauth_excluded.provider_required`)})]})]})})}var WC={pageContent:`AuthFilesOAuthModelAliasEditPage-module__pageContent___mxGSP`,settingsCard:`AuthFilesOAuthModelAliasEditPage-module__settingsCard___4uMxA`,settingsHeader:`AuthFilesOAuthModelAliasEditPage-module__settingsHeader___h4vIs`,settingsHeaderTitle:`AuthFilesOAuthModelAliasEditPage-module__settingsHeaderTitle___GExPS`,settingsHeaderHint:`AuthFilesOAuthModelAliasEditPage-module__settingsHeaderHint___C94bR`,settingsSection:`AuthFilesOAuthModelAliasEditPage-module__settingsSection___JQr18`,settingsRow:`AuthFilesOAuthModelAliasEditPage-module__settingsRow___qzQdL`,settingsInfo:`AuthFilesOAuthModelAliasEditPage-module__settingsInfo___Jt7Ub`,settingsLabel:`AuthFilesOAuthModelAliasEditPage-module__settingsLabel___v6dmL`,settingsDesc:`AuthFilesOAuthModelAliasEditPage-module__settingsDesc___TgK3P`,settingsControl:`AuthFilesOAuthModelAliasEditPage-module__settingsControl___nSl-3`,tagList:`AuthFilesOAuthModelAliasEditPage-module__tagList___OxNTF`,tag:`AuthFilesOAuthModelAliasEditPage-module__tag___sULm6`,tagActive:`AuthFilesOAuthModelAliasEditPage-module__tagActive___CcyFC`,mappingsHeader:`AuthFilesOAuthModelAliasEditPage-module__mappingsHeader___wddAp`,mappingsTitle:`AuthFilesOAuthModelAliasEditPage-module__mappingsTitle___QywAa`,modelsHint:`AuthFilesOAuthModelAliasEditPage-module__modelsHint___nQAc7`,mappingsBody:`AuthFilesOAuthModelAliasEditPage-module__mappingsBody___jOz-S`,mappingRow:`AuthFilesOAuthModelAliasEditPage-module__mappingRow___NTr41`,mappingSeparator:`AuthFilesOAuthModelAliasEditPage-module__mappingSeparator___dN9rZ`,mappingAliasInput:`AuthFilesOAuthModelAliasEditPage-module__mappingAliasInput___iG0V3`,mappingFork:`AuthFilesOAuthModelAliasEditPage-module__mappingFork___4pAg3`},GC=()=>({id:dc(),name:``,alias:``,fork:!0}),KC=e=>!Array.isArray(e)||e.length===0?[GC()]:e.map(e=>({id:dc(),name:e.name??``,alias:e.alias??``,fork:!!e.fork}));function qC(){let{t:e}=Xo(),t=nr(),n=$n(),{showNotification:r}=Fc(),i=mp(e=>e.connectionStatus)!==`connected`,[a,o]=Gi(),s=a.get(`provider`)??``,[c,l]=(0,y.useState)(s),[u,d]=(0,y.useState)([]),[f,p]=(0,y.useState)({}),[m,h]=(0,y.useState)({}),[g,_]=(0,y.useState)(!0),[v,b]=(0,y.useState)(!1),[x,S]=(0,y.useState)([GC()]),[C,w]=(0,y.useState)([]),[T,E]=(0,y.useState)(!1),[D,O]=(0,y.useState)(null),[k,A]=(0,y.useState)(!1);(0,y.useEffect)(()=>{l(s)},[s]);let ee=(0,y.useMemo)(()=>{let e=new Set;return Object.keys(f).forEach(t=>e.add(t)),Object.keys(m).forEach(t=>e.add(t)),u.forEach(t=>{typeof t.type==`string`&&e.add(t.type),typeof t.provider==`string`&&e.add(t.provider)}),gx(e)},[f,u,m]),j=(0,y.useMemo)(()=>hx(c),[c]),M=(0,y.useMemo)(()=>j?Object.prototype.hasOwnProperty.call(m,j):!1,[m,j]),N=(0,y.useMemo)(()=>e(`oauth_model_alias.add_title`),[e]),te=(0,y.useMemo)(()=>c.trim()?T?e(`oauth_model_alias.model_source_loading`):D===`unsupported`?e(`oauth_model_alias.model_source_unsupported`):e(`oauth_model_alias.model_source_loaded`,{count:C.length}):e(`oauth_model_alias.provider_hint`),[D,C.length,T,c,e]),P=(0,y.useCallback)(()=>{if(n.state?.fromAuthFiles){t(-1);return}t(`/auth-files`,{replace:!0})},[n.state,t]),F=VC({onBack:P});(0,y.useEffect)(()=>{let e=e=>{e.key===`Escape`&&P()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[P]),(0,y.useEffect)(()=>{let e=!1;return(async()=>{_(!0),b(!1);try{let[t,n,r]=await Promise.allSettled([f_.list(),f_.getOauthExcludedModels(),f_.getOauthModelAlias()]);if(e)return;if(t.status===`fulfilled`&&d(t.value?.files??[]),n.status===`fulfilled`&&p(n.value??{}),r.status===`fulfilled`){h(r.value??{});return}let i=r.status===`rejected`?r.reason:null;if((typeof i==`object`&&i&&`status`in i?i.status:void 0)===404){b(!0);return}}finally{e||_(!1)}})().catch(()=>{e||_(!1)}),()=>{e=!0}},[]),(0,y.useEffect)(()=>{if(!j){S([GC()]);return}S(KC(m[j]??[]))},[m,j]),(0,y.useEffect)(()=>{if(!j||v){w([]),O(null),E(!1);return}let t=!1;return E(!0),O(null),f_.getModelDefinitions(j).then(e=>{t||w(e)}).catch(n=>{if(t)return;let i=typeof n==`object`&&n&&`status`in n?n.status:void 0;if(i===400||i===404){w([]),O(`unsupported`);return}let a=n instanceof Error?n.message:``;r(`${e(`notification.load_failed`)}: ${a}`,`error`)}).finally(()=>{t||E(!1)}),()=>{t=!0}},[v,j,r,e]);let ne=(0,y.useCallback)(e=>{l(e);let t=new URLSearchParams(a),n=e.trim();n?t.set(`provider`,n):t.delete(`provider`),o(t,{replace:!0})},[a,o]),re=(0,y.useCallback)((e,t,n)=>{S(r=>r.map((r,i)=>i===e?{...r,[t]:n}:r))},[]),ie=(0,y.useCallback)(()=>{S(e=>[...e,GC()])},[]),ae=(0,y.useCallback)(e=>{S(t=>{let n=t.filter((t,n)=>n!==e);return n.length?n:[GC()]})},[]),oe=(0,y.useCallback)(async()=>{let t=hx(c);if(!t){r(e(`oauth_model_alias.provider_required`),`error`);return}let n=new Set,i=!1,a=x.map(e=>{let t=String(e.name??``).trim(),r=String(e.alias??``).trim();if(!t||!r)return null;let a=r.toLowerCase();return n.has(a)?(i=!0,null):(n.add(a),e.fork?{name:t,alias:r,fork:!0}:{name:t,alias:r})}).filter(Boolean);if(i){r(e(`oauth_model_alias.duplicate_alias`),`error`);return}A(!0);try{a.length?await f_.saveOauthModelAlias(t,a):M&&await f_.deleteOauthModelAlias(t),r(e(`oauth_model_alias.save_success`),`success`),P()}catch(t){let n=t instanceof Error?t.message:``;r(`${e(`oauth_model_alias.save_failed`)}: ${n}`,`error`)}finally{A(!1)}},[P,M,x,c,r,e]),se=!i&&!k&&!v;return(0,I.jsx)(LC,{ref:F,title:N,onBack:P,backLabel:e(`common.back`),backAriaLabel:e(`common.back`),contentClassName:WC.pageContent,rightAction:(0,I.jsx)(L,{size:`sm`,onClick:oe,loading:k,disabled:!se,children:e(`oauth_model_alias.save`)}),isLoading:g,loadingLabel:e(`common.loading`),children:v?(0,I.jsx)(Yb,{children:(0,I.jsx)(Xb,{title:e(`oauth_model_alias.upgrade_required_title`),description:e(`oauth_model_alias.upgrade_required_desc`)})}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(Yb,{className:WC.settingsCard,children:[(0,I.jsxs)(`div`,{className:WC.settingsHeader,children:[(0,I.jsxs)(`div`,{className:WC.settingsHeaderTitle,children:[(0,I.jsx)(fs,{size:16}),(0,I.jsx)(`span`,{children:e(`oauth_model_alias.title`)})]}),(0,I.jsx)(`div`,{className:WC.settingsHeaderHint,children:te})]}),(0,I.jsxs)(`div`,{className:WC.settingsSection,children:[(0,I.jsxs)(`div`,{className:WC.settingsRow,children:[(0,I.jsxs)(`div`,{className:WC.settingsInfo,children:[(0,I.jsx)(`div`,{className:WC.settingsLabel,children:e(`oauth_model_alias.provider_label`)}),(0,I.jsx)(`div`,{className:WC.settingsDesc,children:e(`oauth_model_alias.provider_hint`)})]}),(0,I.jsx)(`div`,{className:WC.settingsControl,children:(0,I.jsx)(FC,{id:`oauth-model-alias-provider`,placeholder:e(`oauth_model_alias.provider_placeholder`),value:c,onChange:ne,options:ee,disabled:i||k,wrapperStyle:{marginBottom:0}})})]}),ee.length>0&&(0,I.jsx)(`div`,{className:WC.tagList,children:ee.map(t=>{let n=hx(c)===hx(t);return(0,I.jsx)(`button`,{type:`button`,className:`${WC.tag} ${n?WC.tagActive:``}`,onClick:()=>ne(t),disabled:i||k,children:yx(e,t)},t)})})]})]}),(0,I.jsxs)(Yb,{className:WC.settingsCard,children:[(0,I.jsxs)(`div`,{className:WC.mappingsHeader,children:[(0,I.jsx)(`div`,{className:WC.mappingsTitle,children:e(`oauth_model_alias.alias_label`)}),(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:ie,disabled:i||k||v,children:e(`oauth_model_alias.add_alias`)})]}),(0,I.jsx)(`div`,{className:WC.mappingsBody,children:x.map((t,n)=>(0,I.jsxs)(`div`,{className:WC.mappingRow,children:[(0,I.jsx)(FC,{wrapperStyle:{flex:1,marginBottom:0},placeholder:e(`oauth_model_alias.alias_name_placeholder`),value:t.name,onChange:e=>re(n,`name`,e),disabled:i||k,options:C.map(e=>({value:e.id,label:e.display_name&&e.display_name!==e.id?e.display_name:void 0}))}),(0,I.jsx)(`span`,{className:WC.mappingSeparator,children:`→`}),(0,I.jsx)(`input`,{className:`input ${WC.mappingAliasInput}`,placeholder:e(`oauth_model_alias.alias_placeholder`),value:t.alias,onChange:e=>re(n,`alias`,e.target.value),disabled:i||k}),(0,I.jsx)(`div`,{className:WC.mappingFork,children:(0,I.jsx)(hy,{label:e(`oauth_model_alias.alias_fork_label`),labelPosition:`left`,checked:!!t.fork,onChange:e=>re(n,`fork`,e),disabled:i||k})}),(0,I.jsx)(L,{variant:`ghost`,size:`sm`,onClick:()=>ae(n),disabled:i||k||x.length<=1,title:e(`common.delete`),"aria-label":e(`common.delete`),children:(0,I.jsx)(Os,{size:14})})]},t.id))})]})]})})}var JC={container:`OAuthPage-module__container___LCCdH`,cardTitle:`OAuthPage-module__cardTitle___yFaP0`,cardTitleIcon:`OAuthPage-module__cardTitleIcon___eAnql`,pageTitle:`OAuthPage-module__pageTitle___BQQ2z`,content:`OAuthPage-module__content___Phg9V`,cardContent:`OAuthPage-module__cardContent___1sXLA`,cardHint:`OAuthPage-module__cardHint___ttOpd`,cardHintSecondary:`OAuthPage-module__cardHintSecondary___tWM17`,oauthSection:`OAuthPage-module__oauthSection___1olLq`,oauthGrid:`OAuthPage-module__oauthGrid___wjAyh`,oauthCard:`OAuthPage-module__oauthCard___CYTnC`,oauthStatus:`OAuthPage-module__oauthStatus___h7bbL`,success:`OAuthPage-module__success___UHta0`,error:`OAuthPage-module__error___057CD`,waiting:`OAuthPage-module__waiting___CbNSk`,callbackSection:`OAuthPage-module__callbackSection___8kA31`,callbackActions:`OAuthPage-module__callbackActions___wtkMI`,authUrlBox:`OAuthPage-module__authUrlBox___Iu1d4`,authUrlLabel:`OAuthPage-module__authUrlLabel___mYFJB`,authUrlValue:`OAuthPage-module__authUrlValue___axvUJ`,authUrlActions:`OAuthPage-module__authUrlActions___venPj`,successActions:`OAuthPage-module__successActions___wHpp9`,geminiProjectField:`OAuthPage-module__geminiProjectField___g456A`,formItem:`OAuthPage-module__formItem___Bgt9S`,formItemLabel:`OAuthPage-module__formItemLabel___QZFrG`,filePicker:`OAuthPage-module__filePicker___NmFjy`,fileName:`OAuthPage-module__fileName___9ZbQI`,fileNamePlaceholder:`OAuthPage-module__fileNamePlaceholder___WHjj4`,connectionBox:`OAuthPage-module__connectionBox___Gwo4r`,connectionLabel:`OAuthPage-module__connectionLabel___cJMrf`,keyValueList:`OAuthPage-module__keyValueList___lEOY0`,keyValueItem:`OAuthPage-module__keyValueItem___XOwWB`,keyValueKey:`OAuthPage-module__keyValueKey___WF-VN`,keyValueValue:`OAuthPage-module__keyValueValue___m2I-C`};function YC(e){if(fc(e))return typeof e.status==`number`?e.status:void 0}var XC=[{id:`codex`,titleKey:`auth_login.codex_oauth_title`,hintKey:`auth_login.codex_oauth_hint`,urlLabelKey:`auth_login.codex_oauth_url_label`,icon:ey},{id:`anthropic`,titleKey:`auth_login.anthropic_oauth_title`,hintKey:`auth_login.anthropic_oauth_hint`,urlLabelKey:`auth_login.anthropic_oauth_url_label`,icon:$v},{id:`antigravity`,titleKey:`auth_login.antigravity_oauth_title`,hintKey:`auth_login.antigravity_oauth_hint`,urlLabelKey:`auth_login.antigravity_oauth_url_label`,icon:Qb},{id:`kimi`,titleKey:`auth_login.kimi_oauth_title`,hintKey:`auth_login.kimi_oauth_hint`,urlLabelKey:`auth_login.kimi_oauth_url_label`,icon:{light:rx,dark:nx}},{id:`xai`,titleKey:`auth_login.xai_oauth_title`,hintKey:`auth_login.xai_oauth_hint`,urlLabelKey:`auth_login.xai_oauth_url_label`,icon:{light:$b,dark:ex}}],ZC=[`codex`,`anthropic`,`antigravity`,`xai`],QC=`http://127.0.0.1:56121/callback`,$C=5e3,ew=e=>e.replace(`-`,`_`),tw=(e,t)=>`auth_login.${ew(e)}_${t}`,nw=(e,t)=>typeof e==`string`?e:e[t],rw=e=>{try{return new URL(e),!0}catch{return!1}},iw=e=>{let t=e.trim();if(!t)return null;let n=t.indexOf(`?`),r=t.indexOf(`#`),i=n>=0?t.slice(n+1):r>=0?t.slice(r+1):t;return/(^|[&#?])(code|state|error)=/i.test(i)?new URLSearchParams(i.replace(/^[?#]/,``)):null},aw=e=>{let t=e.trim();return(t.match(/\bcode\s*[:=]\s*([^\s&]+)/i)?.[1]??t).trim()},ow=(e,t)=>{let n=e.trim();if(!n)return null;if(rw(n))return n;let r=iw(n);if(r){let e=r.get(`code`)?.trim(),n=r.get(`error`)?.trim(),i=r.get(`error_description`)?.trim(),a=r.get(`state`)?.trim()||t?.trim();if(!a)return null;let o=new URL(QC);return o.searchParams.set(`state`,a),e&&o.searchParams.set(`code`,e),n&&o.searchParams.set(`error`,n),i&&o.searchParams.set(`error_description`,i),o.toString()}let i=aw(n),a=t?.trim();if(!i||!a)return null;let o=new URL(QC);return o.searchParams.set(`code`,i),o.searchParams.set(`state`,a),o.toString()},sw=(e,t,n)=>e===`xai`?ow(t,n):t.trim();function cw(){let{t:e}=Xo(),t=nr(),{showNotification:n}=Fc(),r=Wc(e=>e.resolvedTheme),[i,a]=(0,y.useState)({}),[o,s]=(0,y.useState)({fileName:``,location:``,loading:!1}),c=(0,y.useRef)({}),l=(0,y.useRef)({}),u=(0,y.useRef)(null),d=(0,y.useCallback)(()=>{Object.values(c.current).forEach(e=>{e!==void 0&&window.clearInterval(e)}),Object.values(l.current).forEach(e=>{e!==void 0&&window.clearTimeout(e)}),c.current={},l.current={}},[]);(0,y.useEffect)(()=>()=>{d()},[d]);let f=(e,t)=>{a(n=>({...n,[e]:{...n[e]??{},...t}}))},p=e=>{let t=c.current[e];t!==void 0&&(window.clearInterval(t),delete c.current[e])},m=e=>{let t=l.current[e];t!==void 0&&(window.clearTimeout(t),delete l.current[e])},h=e=>{p(e),m(e)},g=e=>{h(e),a(t=>({...t,[e]:{}}))},_=e=>{p(e),m(e),f(e,{url:void 0,state:void 0,status:`success`,error:void 0,polling:!1,callbackUrl:``,callbackSubmitting:!1,callbackStatus:void 0,callbackError:void 0}),l.current[e]=window.setTimeout(()=>{g(e)},$C)},v=(t,r)=>{p(t);let i=window.setInterval(async()=>{try{let a=await m_.getAuthStatus(r);a.status===`ok`?(_(t),n(e(tw(t,`oauth_status_success`)),`success`)):a.status===`error`&&(f(t,{status:`error`,error:a.error,polling:!1}),n(`${e(tw(t,`oauth_status_error`))} ${a.error||``}`,`error`),window.clearInterval(i),delete c.current[t])}catch(e){f(t,{status:`error`,error:pc(e),polling:!1}),window.clearInterval(i),delete c.current[t]}},3e3);c.current[t]=i},b=async t=>{h(t),f(t,{url:void 0,state:void 0,status:`waiting`,polling:!0,error:void 0,callbackStatus:void 0,callbackError:void 0,callbackUrl:``});try{let r=await m_.startAuth(t);if(!r.state){let i=e(`auth_login.missing_state`);f(t,{url:r.url,state:void 0,status:`error`,error:i,polling:!1}),n(i,`error`);return}f(t,{url:r.url,state:r.state,status:`waiting`,polling:!0}),v(t,r.state)}catch(r){let i=pc(r);f(t,{status:`error`,error:i,polling:!1}),n(`${e(tw(t,`oauth_start_error`))}${i?` ${i}`:``}`,`error`)}},x=async t=>{if(!t)return;let r=await Zb(t);n(e(r?`notification.link_copied`:`notification.copy_failed`),r?`success`:`error`)},S=async t=>{let r=(i[t]?.callbackUrl||``).trim();if(!r){n(e(t===`xai`?`auth_login.xai_callback_required`:`auth_login.oauth_callback_required`),`warning`);return}let a=sw(t,r,i[t]?.state);if(!a){n(e(t===`xai`?`auth_login.xai_callback_state_missing`:`auth_login.missing_state`),`warning`);return}f(t,{callbackSubmitting:!0,callbackStatus:void 0,callbackError:void 0});try{await m_.submitCallback(t,a),f(t,{callbackSubmitting:!1,callbackStatus:`success`}),n(e(`auth_login.oauth_callback_success`),`success`)}catch(r){let i=YC(r),a=pc(r),o=i===404?e(`auth_login.oauth_callback_upgrade_hint`,{defaultValue:`Please update CLI Proxy API or check the connection.`}):a||void 0;f(t,{callbackSubmitting:!1,callbackStatus:`error`,callbackError:o}),n(o?`${e(`auth_login.oauth_callback_error`)} ${o}`:e(`auth_login.oauth_callback_error`),`error`)}};return(0,I.jsxs)(`div`,{className:JC.container,children:[(0,I.jsx)(`h1`,{className:JC.pageTitle,children:e(`nav.oauth`,{defaultValue:`OAuth`})}),(0,I.jsxs)(`div`,{className:JC.content,children:[XC.map(n=>{let a=i[n.id]||{},o=ZC.includes(n.id)&&!!a.url,s=a.status===`success`?e(`auth_login.login_another_account`):e(tw(n.id,`oauth_button`)),c=[`status-badge`,a.status===`success`?`success`:``,a.status===`error`?`error`:``].filter(Boolean).join(` `);return(0,I.jsx)(`div`,{children:(0,I.jsx)(Yb,{title:(0,I.jsxs)(`span`,{className:JC.cardTitle,children:[(0,I.jsx)(`img`,{src:nw(n.icon,r),alt:``,className:JC.cardTitleIcon}),e(n.titleKey)]}),extra:(0,I.jsx)(L,{onClick:()=>b(n.id),loading:a.polling,children:s}),children:(0,I.jsxs)(`div`,{className:JC.cardContent,children:[(0,I.jsx)(`div`,{className:JC.cardHint,children:e(n.hintKey)}),a.url&&(0,I.jsxs)(`div`,{className:JC.authUrlBox,children:[(0,I.jsx)(`div`,{className:JC.authUrlLabel,children:e(n.urlLabelKey)}),(0,I.jsx)(`div`,{className:JC.authUrlValue,children:a.url}),(0,I.jsxs)(`div`,{className:JC.authUrlActions,children:[(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:()=>x(a.url),children:e(tw(n.id,`copy_link`))}),(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:()=>window.open(a.url,`_blank`,`noopener,noreferrer`),children:e(tw(n.id,`open_link`))})]})]}),o&&(0,I.jsxs)(`div`,{className:JC.callbackSection,children:[(0,I.jsx)($o,{label:e(n.id===`xai`?`auth_login.xai_callback_label`:`auth_login.oauth_callback_label`),hint:e(n.id===`xai`?`auth_login.xai_callback_hint`:`auth_login.oauth_callback_hint`),value:a.callbackUrl||``,onChange:e=>f(n.id,{callbackUrl:e.target.value,callbackStatus:void 0,callbackError:void 0}),placeholder:e(n.id===`xai`?`auth_login.xai_callback_placeholder`:`auth_login.oauth_callback_placeholder`)}),(0,I.jsx)(`div`,{className:JC.callbackActions,children:(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:()=>S(n.id),loading:a.callbackSubmitting,children:e(`auth_login.oauth_callback_button`)})}),a.callbackStatus===`success`&&a.status===`waiting`&&(0,I.jsx)(`div`,{className:`status-badge success`,children:e(`auth_login.oauth_callback_status_success`)}),a.callbackStatus===`error`&&(0,I.jsxs)(`div`,{className:`status-badge error`,children:[e(`auth_login.oauth_callback_status_error`),` `,a.callbackError||``]})]}),a.status&&a.status!==`idle`&&(0,I.jsx)(`div`,{className:c,children:a.status===`success`?e(tw(n.id,`oauth_status_success`)):a.status===`error`?`${e(tw(n.id,`oauth_status_error`))} ${a.error||``}`:e(tw(n.id,`oauth_status_waiting`))}),a.status===`success`&&(0,I.jsx)(`div`,{className:JC.successActions,children:(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:()=>t(`/auth-files`),children:e(`auth_login.view_auth_files`)})})]})})},n.id)}),(0,I.jsx)(Yb,{title:(0,I.jsxs)(`span`,{className:JC.cardTitle,children:[(0,I.jsx)(`img`,{src:ry,alt:``,className:JC.cardTitleIcon}),e(`vertex_import.title`)]}),extra:(0,I.jsx)(L,{onClick:async()=>{if(!o.file){let t=e(`vertex_import.file_required`);s(e=>({...e,error:t})),n(t,`warning`);return}let t=o.location.trim();s(e=>({...e,loading:!0,error:void 0,result:void 0}));try{let r=await W_.importCredential(o.file,t||void 0),i={projectId:r.project_id,email:r.email,location:r.location,authFile:r[`auth-file`]??r.auth_file};s(e=>({...e,loading:!1,result:i})),n(e(`vertex_import.success`),`success`)}catch(t){let r=pc(t);s(t=>({...t,loading:!1,error:r||e(`notification.upload_failed`)})),n(r?`${e(`notification.upload_failed`)}: ${r}`:e(`notification.upload_failed`),`error`)}},loading:o.loading,children:e(`vertex_import.import_button`)}),children:(0,I.jsxs)(`div`,{className:JC.cardContent,children:[(0,I.jsx)(`div`,{className:JC.cardHint,children:e(`vertex_import.description`)}),(0,I.jsx)($o,{label:e(`vertex_import.location_label`),hint:e(`vertex_import.location_hint`),value:o.location,onChange:e=>s(t=>({...t,location:e.target.value})),placeholder:e(`vertex_import.location_placeholder`)}),(0,I.jsxs)(`div`,{className:JC.formItem,children:[(0,I.jsx)(`label`,{className:JC.formItemLabel,children:e(`vertex_import.file_label`)}),(0,I.jsxs)(`div`,{className:JC.filePicker,children:[(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:()=>{u.current?.click()},children:e(`vertex_import.choose_file`)}),(0,I.jsx)(`div`,{className:`${JC.fileName} ${o.fileName?``:JC.fileNamePlaceholder}`.trim(),children:o.fileName||e(`vertex_import.file_placeholder`)})]}),(0,I.jsx)(`div`,{className:JC.cardHintSecondary,children:e(`vertex_import.file_hint`)}),(0,I.jsx)(`input`,{ref:u,type:`file`,accept:`.json,application/json`,style:{display:`none`},onChange:t=>{let r=t.target.files?.[0];if(r){if(!r.name.endsWith(`.json`)){n(e(`vertex_import.file_required`),`warning`),t.target.value=``;return}s(e=>({...e,file:r,fileName:r.name,error:void 0,result:void 0})),t.target.value=``}}})]}),o.error&&(0,I.jsx)(`div`,{className:`status-badge error`,children:o.error}),o.result&&(0,I.jsxs)(`div`,{className:JC.connectionBox,children:[(0,I.jsx)(`div`,{className:JC.connectionLabel,children:e(`vertex_import.result_title`)}),(0,I.jsxs)(`div`,{className:JC.keyValueList,children:[o.result.projectId&&(0,I.jsxs)(`div`,{className:JC.keyValueItem,children:[(0,I.jsx)(`span`,{className:JC.keyValueKey,children:e(`vertex_import.result_project`)}),(0,I.jsx)(`span`,{className:JC.keyValueValue,children:o.result.projectId})]}),o.result.email&&(0,I.jsxs)(`div`,{className:JC.keyValueItem,children:[(0,I.jsx)(`span`,{className:JC.keyValueKey,children:e(`vertex_import.result_email`)}),(0,I.jsx)(`span`,{className:JC.keyValueValue,children:o.result.email})]}),o.result.location&&(0,I.jsxs)(`div`,{className:JC.keyValueItem,children:[(0,I.jsx)(`span`,{className:JC.keyValueKey,children:e(`vertex_import.result_location`)}),(0,I.jsx)(`span`,{className:JC.keyValueValue,children:o.result.location})]}),o.result.authFile&&(0,I.jsxs)(`div`,{className:JC.keyValueItem,children:[(0,I.jsx)(`span`,{className:JC.keyValueKey,children:e(`vertex_import.result_file`)}),(0,I.jsx)(`span`,{className:JC.keyValueValue,children:o.result.authFile})]})]})]})]})})]})]})}function lw(){let{t:e}=Xo(),t=mp(e=>e.connectionStatus),[n,r]=(0,y.useState)([]),[i,a]=(0,y.useState)(!0),[o,s]=(0,y.useState)(``),c=t!==`connected`,l=(0,y.useCallback)(async()=>{a(!0),s(``);try{r((await f_.list())?.files||[])}catch(t){s(t instanceof Error?t.message:e(`notification.refresh_failed`))}finally{a(!1)}},[e]);return iv(l),(0,y.useEffect)(()=>{l()},[l]),(0,I.jsxs)(`div`,{className:Ax.container,children:[(0,I.jsxs)(`div`,{className:Ax.pageHeader,children:[(0,I.jsx)(`h1`,{className:Ax.pageTitle,children:e(`quota_management.title`)}),(0,I.jsx)(`p`,{className:Ax.description,children:e(`quota_management.description`)})]}),o&&(0,I.jsx)(`div`,{className:Ax.errorBox,children:o}),(0,I.jsx)(zx,{config:fS,files:n,loading:i,disabled:c}),(0,I.jsx)(zx,{config:pS,files:n,loading:i,disabled:c}),(0,I.jsx)(zx,{config:mS,files:n,loading:i,disabled:c}),(0,I.jsx)(zx,{config:DS,files:n,loading:i,disabled:c}),(0,I.jsx)(zx,{config:ES,files:n,loading:i,disabled:c})]})}var uw=`plugin-resources-refresh`,dw=()=>{window.dispatchEvent(new Event(uw))},fw=e=>e.metadata?.name.trim()||e.id,pw=(e,t)=>`/plugin-pages/${encodeURIComponent(e)}/${t}`,mw=(e,t)=>{let n=e.trim();if(!n)return``;if(/^(https?:|data:|blob:)/i.test(n)||!n.startsWith(`/`))return n;let r=hf(t);return r?`${r}${n}`:n},hw=e=>{let t=e.trim();return t?/^https?:\/\//i.test(t)?t:`https://github.com/${t.replace(/^\/+/,``)}`:``},gw=`https://github.com/router-for-me/`,_w=`official`,vw=e=>{let t=e.trim();if(!t)return``;let[n=``,r=``]=(/^https?:\/\/[^/]+\/(.+)$/i.exec(t)?.[1]??t).replace(/^\/+/,``).split(`/`);return n?r?`${n}/${r.replace(/\.git$/i,``)}`:n:``},yw=e=>hw(e).toLowerCase().startsWith(gw),bw=e=>yw(e.repository),xw=e=>e.sourceId.trim().toLowerCase()===`official`||e.sourceName.trim().toLowerCase()===_w,Sw=e=>vw(e.repository)||e.id,Cw=e=>e.flatMap(e=>{if(!e.effectiveEnabled)return[];let t=fw(e),n=e.logo||e.metadata?.logo||``;return e.menus.map((r,i)=>{let a=r.path.trim();if(!a)return null;let o=r.menu.trim();return{pluginID:e.id,pluginTitle:t,pluginLogo:n,menuIndex:i,menu:{...r,path:a},label:o||t,description:r.description.trim()||t,route:pw(e.id,i)}}).filter(e=>!!e)}),ww={page:`PluginResourcePage-module__page___Worp1`,frame:`PluginResourcePage-module__frame___vFTLX`,stateShell:`PluginResourcePage-module__stateShell___mvcAO`,statusPanel:`PluginResourcePage-module__statusPanel___hLEe6`},Tw=(e,t)=>fc(e)&&e.status===t,Ew=(e=``)=>{try{return decodeURIComponent(e)}catch{return e}},Dw=(e=``)=>{let t=Number.parseInt(e,10);return Number.isInteger(t)&&t>=0?t:-1};function Ow(){let{t:e}=Xo(),t=or(),n=mp(e=>e.connectionStatus),r=mp(e=>e.apiBase),[i,a]=(0,y.useState)(null),[o,s]=(0,y.useState)(!0),[c,l]=(0,y.useState)(``),u=n===`connected`,d=(0,y.useMemo)(()=>Ew(t.pluginId),[t.pluginId]),f=(0,y.useMemo)(()=>Dw(t.menuIndex),[t.menuIndex]),p=(0,y.useCallback)(async()=>{if(!u){s(!1),l(e(`notification.connection_required`));return}s(!0),l(``);try{a(await H_.list())}catch(t){l(Tw(t,404)?e(`plugin_management.unsupported_backend`):pc(t,e(`plugin_resource.load_failed`)))}finally{s(!1)}},[u,e]);iv(p,u),(0,y.useEffect)(()=>{p()},[p]),(0,y.useEffect)(()=>(window.addEventListener(uw,p),()=>{window.removeEventListener(uw,p)}),[p]);let m=(0,y.useMemo)(()=>Cw(i?.plugins??[]).find(e=>e.pluginID===d&&e.menuIndex===f),[i?.plugins,f,d]),h=m?mw(m.menu.path,r):``;return(0,I.jsx)(`div`,{className:ww.page,children:o?(0,I.jsx)(`div`,{className:ww.stateShell,children:(0,I.jsx)(`div`,{className:ww.statusPanel,children:e(`common.loading`)})}):c?(0,I.jsx)(`div`,{className:ww.stateShell,children:(0,I.jsx)(Xb,{title:e(`plugin_resource.unavailable`),description:c})}):m?h?(0,I.jsx)(`iframe`,{className:ww.frame,src:h,title:m.label,referrerPolicy:`no-referrer`,allow:`clipboard-read; clipboard-write`}):(0,I.jsx)(`div`,{className:ww.stateShell,children:(0,I.jsx)(Xb,{title:e(`plugin_resource.empty_src`),description:e(`plugin_resource.empty_src_desc`)})}):(0,I.jsx)(`div`,{className:ww.stateShell,children:(0,I.jsx)(Xb,{title:e(`plugin_resource.not_found`),description:e(`plugin_resource.not_found_desc`)})})})}var kw=15e3,Aw=500,jw=e=>new Promise(t=>{window.setTimeout(t,e)});async function Mw(e,t,n=kw,r=Aw){let i=Date.now()+n,a=await H_.list();for(;;){let n=a.plugins.find(t=>t.id===e)??null;if(n&&t(n,a))return{response:a,plugin:n,timedOut:!1};if(Date.now()>=i)return{response:a,plugin:n,timedOut:!0};await jw(Math.min(r,Math.max(0,i-Date.now()))),a=await H_.list()}}async function Nw(e,t,n,r=kw,i=Aw){let a=Date.now()+r,o=await U_.list();for(;;){let r=o.plugins.find(n=>n.id===e&&(!t||n.sourceId===t))??null;if(r&&n(r,o))return{response:o,plugin:r,timedOut:!1};if(Date.now()>=a)return{response:o,plugin:r,timedOut:!0};await jw(Math.min(i,Math.max(0,a-Date.now()))),o=await U_.list()}}var W={page:`PluginsPage-module__page___CvQ2C`,pageHeader:`PluginsPage-module__pageHeader___QAQJM`,title:`PluginsPage-module__title___kbWp2`,description:`PluginsPage-module__description___rS8P3`,errorBox:`PluginsPage-module__errorBox___CXInm`,warningBox:`PluginsPage-module__warningBox___XGq99`,statusBar:`PluginsPage-module__statusBar___-NeAi`,statusPill:`PluginsPage-module__statusPill___KsCzj`,statusDot:`PluginsPage-module__statusDot___sWBOV`,statusDotOn:`PluginsPage-module__statusDotOn___7cgF3`,statusDotOff:`PluginsPage-module__statusDotOff___biyeH`,statusLabel:`PluginsPage-module__statusLabel___OJVc7`,statusValue:`PluginsPage-module__statusValue___wqQgp`,statusPathValue:`PluginsPage-module__statusPathValue___SCblH`,statusDivider:`PluginsPage-module__statusDivider___fJexN`,toolbar:`PluginsPage-module__toolbar___-cit2`,pluginList:`PluginsPage-module__pluginList___Jk4FJ`,pluginRow:`PluginsPage-module__pluginRow___-y4iX`,logoBox:`PluginsPage-module__logoBox___9Hy-r`,pluginInfo:`PluginsPage-module__pluginInfo___ODdnV`,pluginName:`PluginsPage-module__pluginName___uX3d7`,pluginId:`PluginsPage-module__pluginId___SjbKJ`,pluginMeta:`PluginsPage-module__pluginMeta___xa89L`,metaItem:`PluginsPage-module__metaItem___05Mg9`,metaPath:`PluginsPage-module__metaPath___JUDWR`,metaDot:`PluginsPage-module__metaDot___FpFyv`,badgeRow:`PluginsPage-module__badgeRow___USdlO`,badge:`PluginsPage-module__badge___2k1PE`,badgeSuccess:`PluginsPage-module__badgeSuccess___1yPJW`,badgeWarning:`PluginsPage-module__badgeWarning___ADHL9`,badgeMuted:`PluginsPage-module__badgeMuted___f-Gd9`,rowActions:`PluginsPage-module__rowActions___LvMkv`,iconLink:`PluginsPage-module__iconLink___ofzv1`,skeletonRow:`PluginsPage-module__skeletonRow___BCdYy`,skeletonAvatar:`PluginsPage-module__skeletonAvatar___qfNzu`,skeletonPulse:`PluginsPage-module__skeletonPulse___FskV9`,skeletonText:`PluginsPage-module__skeletonText___PKTOA`,skeletonLine:`PluginsPage-module__skeletonLine___91eQ6`,sheetFooter:`PluginsPage-module__sheetFooter___IZQM-`,configForm:`PluginsPage-module__configForm___acXwo`,formSection:`PluginsPage-module__formSection___J8eP4`,fieldRow:`PluginsPage-module__fieldRow___-q2Wa`,fieldText:`PluginsPage-module__fieldText___KkAH-`,fieldLabel:`PluginsPage-module__fieldLabel___3on7I`,fieldDescription:`PluginsPage-module__fieldDescription___JEDFJ`,fieldHint:`PluginsPage-module__fieldHint___MyVVK`,formField:`PluginsPage-module__formField___-MDet`,textarea:`PluginsPage-module__textarea___DVGj3`,arrayEditor:`PluginsPage-module__arrayEditor___K9xc4`,arrayItemRow:`PluginsPage-module__arrayItemRow___d7Z4j`,arrayInput:`PluginsPage-module__arrayInput___nJqhY`,arrayActions:`PluginsPage-module__arrayActions___uqVHA`,iconButton:`PluginsPage-module__iconButton___LZwkO`,fieldError:`PluginsPage-module__fieldError___ekayR`,emptyConfig:`PluginsPage-module__emptyConfig___lkfig`};function Pw({src:e}){let[t,n]=(0,y.useState)(!1);return e&&!t?(0,I.jsx)(`img`,{src:e,alt:``,onError:()=>n(!0)}):(0,I.jsx)(us,{size:18})}var Fw=(e,t)=>fc(e)&&e.status===t,Iw=e=>fc(e)&&e.restart_required===!0,Lw=e=>fc(e)&&(Iw(e.details)||Iw(e.data)),Rw=e=>e.type.trim().toLowerCase(),zw=e=>{if(e==null)return``;if(typeof e==`string`)return e;if(typeof e==`number`||typeof e==`boolean`)return String(e);try{return JSON.stringify(e)}catch{return String(e)}},Bw=(e,t)=>{let n=Rw(e);return n===`boolean`?t===!0:n===`array`?Array.isArray(t)?t.length>0?t.map(e=>zw(e)):[``]:t==null?[``]:[zw(t)]:t==null?``:n===`object`?JSON.stringify(t,null,2):String(t)},Vw=(e,t)=>{let n=typeof t.enabled==`boolean`?t.enabled:e.enabled,r=typeof t.priority==`number`||typeof t.priority==`string`?String(t.priority):`0`,i={};return e.configFields.forEach(e=>{i[e.name]=Bw(e,t[e.name])}),{enabled:n,priority:r,values:i,errors:{}}},Hw=(e,t,n,r,i)=>{try{let a=JSON.parse(e);if(t===`array`&&!Array.isArray(a)){i[n]=r(`plugin_management.expected_array`);return}if(t===`object`&&!fc(a)){i[n]=r(`plugin_management.expected_object`);return}return a}catch{i[n]=r(`plugin_management.invalid_json`);return}},Uw=(e,t,n,r)=>{let i={},a={...n},o=e.priority.trim();return a.enabled=e.enabled,o?/^-?\d+$/.test(o)?a.priority=Number.parseInt(o,10):i.priority=r(`plugin_management.invalid_priority`):a.priority=0,t.forEach(t=>{let n=Rw(t),o=e.values[t.name];if(n===`boolean`){a[t.name]=o===!0;return}if(n===`array`){let e=Array.isArray(o)?o.map(e=>e.trim()).filter(Boolean):[];e.length===0?delete a[t.name]:a[t.name]=e;return}let s=typeof o==`string`?o.trim():``;if(!s){delete a[t.name];return}if(n===`enum`){if(t.enumValues.length>0&&!t.enumValues.includes(s)){i[t.name]=r(`plugin_management.invalid_enum`);return}a[t.name]=s;return}if(n===`number`){let e=Number(s);if(!Number.isFinite(e)){i[t.name]=r(`plugin_management.invalid_number`);return}a[t.name]=e;return}if(n===`integer`){if(!/^-?\d+$/.test(s)){i[t.name]=r(`plugin_management.invalid_integer`);return}a[t.name]=Number.parseInt(s,10);return}if(n===`object`){let e=Hw(s,n,t.name,r,i);if(i[t.name])return;a[t.name]=e;return}a[t.name]=s}),{nextConfig:a,errors:i}};function Ww(){let{t:e}=Xo(),t=nr(),n=mp(e=>e.connectionStatus),r=mp(e=>e.apiBase),i=Uf(e=>e.clearCache),a=Fc(e=>e.showNotification),o=Fc(e=>e.showConfirmation),[s,c]=(0,y.useState)(null),[l,u]=(0,y.useState)(``),[d,f]=(0,y.useState)(!0),[p,m]=(0,y.useState)(``),[h,g]=(0,y.useState)(null),[_,v]=(0,y.useState)({}),[b,x]=(0,y.useState)(null),[S,C]=(0,y.useState)(``),[w,T]=(0,y.useState)(``),[E,D]=(0,y.useState)(``),O=(0,y.useRef)(0),k=n===`connected`,A=(0,y.useCallback)(async()=>{if(!k){f(!1),m(e(`notification.connection_required`));return}f(!0),m(``);try{c(await H_.list())}catch(t){m(Fw(t,404)?e(`plugin_management.unsupported_backend`):pc(t,e(`plugin_management.load_failed`)))}finally{f(!1)}},[k,e]),ee=(0,y.useCallback)(async(e,t)=>{let n=await Mw(e,(e,n)=>t?!n.pluginsEnabled||e.registered&&e.effectiveEnabled:!e.effectiveEnabled);return c(n.response),t&&!n.response.pluginsEnabled?`globalDisabled`:n.timedOut?`timeout`:`ready`},[]);iv(A,k),(0,y.useEffect)(()=>{A()},[A]);let j=(0,y.useMemo)(()=>{let e=s?.plugins??[];return{discovered:e.length,registered:e.filter(e=>e.registered).length,configured:e.filter(e=>e.configured).length,effective:e.filter(e=>e.effectiveEnabled).length}},[s?.plugins]),M=(0,y.useMemo)(()=>{let e=l.trim().toLowerCase(),t=s?.plugins??[];return e?t.filter(t=>[t.id,t.path,t.metadata?.name,t.metadata?.author,t.metadata?.version,t.metadata?.githubRepository,...t.menus.map(e=>`${e.menu} ${e.path} ${e.description}`)].filter(Boolean).join(` `).toLowerCase().includes(e)):t},[s?.plugins,l]),N=(0,y.useCallback)(e=>mw(e,r),[r]),te=async t=>{if(E||S||w)return;let n=O.current+1;O.current=n,D(t.id),g(t),v({}),x(null);try{let e=await H_.getConfig(t.id);if(O.current!==n)return;v(e),x(Vw(t,e))}catch(t){if(O.current!==n)return;g(null),v({}),x(null),a(Fw(t,404)?e(`plugin_management.config_not_found`):`${e(`plugin_management.config_load_failed`)}: ${pc(t,e(`plugin_management.config_load_failed`))}`,`error`)}finally{O.current===n&&D(``)}},P=()=>{S||E||w||(g(null),v({}),x(null))},F=e=>{x(t=>t&&e(t))},ne=async(t,n)=>{if(!w){C(t.id);try{await H_.updateEnabled(t.id,n),i();let r=await ee(t.id,n);r===`ready`?(dw(),a(e(`plugin_management.toggle_success`),`success`)):a(e(r===`globalDisabled`?`plugin_management.global_disabled_hint`:`plugin_management.runtime_pending`),`warning`)}catch(t){a(`${e(`plugin_management.toggle_failed`)}: ${pc(t,e(`plugin_management.toggle_failed`))}`,`error`)}finally{C(``)}}},re=t=>{if(!k||S||E||w)return;let n=fw(t);o({title:e(`plugin_management.delete_confirm_title`),message:e(`plugin_management.delete_confirm_message`,{name:n,id:t.id}),variant:`danger`,confirmText:e(`plugin_management.delete_plugin`),onConfirm:async()=>{T(t.id),C(t.id);try{let n=await H_.deletePlugin(t.id);i(),h?.id===t.id&&(g(null),v({}),x(null)),await A(),dw(),a(e(`plugin_management.delete_success`),`success`),n.restartRequired&&a(e(`plugin_management.delete_restart_required`),`warning`)}catch(t){let n=Lw(t),r=e(n?`plugin_management.delete_restart_required`:`plugin_management.delete_failed`);a(`${e(`plugin_management.delete_failed`)}: ${pc(t,r)}`,n?`warning`:`error`)}finally{T(``),C(``)}}})},ie=async()=>{if(!h||!b||E||S||w)return;let{nextConfig:t,errors:n}=Uw(b,h.configFields,_,e);if(Object.keys(n).length>0){x({...b,errors:n}),a(e(`plugin_management.validation_failed`),`warning`);return}C(h.id);try{await H_.putConfig(h.id,t),i();let n=typeof t.enabled==`boolean`&&t.enabled!==h.enabled?await ee(h.id,t.enabled===!0):await A().then(()=>`ready`);n===`ready`&&dw(),g(null),v({}),x(null),n===`ready`?a(e(`plugin_management.save_success`),`success`):a(e(n===`globalDisabled`?`plugin_management.global_disabled_hint`:`plugin_management.runtime_pending`),`warning`)}catch(t){a(`${e(`plugin_management.save_failed`)}: ${pc(t,e(`plugin_management.save_failed`))}`,`error`)}finally{C(``)}},ae=e=>t=>{let n=t.target.value;F(t=>({...t,values:{...t.values,[e]:n},errors:{...t.errors,[e]:``}}))},oe=(e,t)=>{F(n=>({...n,values:{...n.values,[e]:t},errors:{...n.errors,[e]:``}}))},se=(e,t)=>{F(n=>{let r=n.values[e],i=Array.isArray(r)?r:[``];return{...n,values:{...n.values,[e]:t(i)},errors:{...n.errors,[e]:``}}})},ce=e=>{let t=e.target.value;F(e=>({...e,priority:t,errors:{...e.errors,priority:``}}))},le=t=>{if(!b)return null;let n=Rw(t),r=b.values[t.name],i=typeof r==`string`?r:``,a=b.errors[t.name];if(n===`boolean`)return(0,I.jsxs)(`div`,{className:W.fieldRow,children:[(0,I.jsxs)(`div`,{className:W.fieldText,children:[(0,I.jsx)(`div`,{className:W.fieldLabel,children:t.name}),t.description?(0,I.jsx)(`div`,{className:W.fieldDescription,children:t.description}):null]}),(0,I.jsx)(hy,{checked:r===!0,onChange:e=>oe(t.name,e),ariaLabel:t.name})]},t.name);if(n===`enum`&&t.enumValues.length>0)return(0,I.jsxs)(`div`,{className:W.formField,children:[(0,I.jsx)(`label`,{htmlFor:`plugin-field-${t.name}`,children:t.name}),(0,I.jsx)(nc,{id:`plugin-field-${t.name}`,value:i,options:t.enumValues.map(e=>({value:e,label:e})),onChange:e=>F(n=>({...n,values:{...n.values,[t.name]:e},errors:{...n.errors,[t.name]:``}})),placeholder:e(`plugin_management.select_placeholder`)}),t.description?(0,I.jsx)(`div`,{className:W.fieldHint,children:t.description}):null,a?(0,I.jsx)(`div`,{className:W.fieldError,children:a}):null]},t.name);if(n===`array`){let n=Array.isArray(r)&&r.length>0?r:[``];return(0,I.jsxs)(`div`,{className:W.formField,children:[(0,I.jsx)(`div`,{className:W.fieldLabel,children:t.name}),(0,I.jsx)(`div`,{className:W.arrayEditor,children:n.map((n,r)=>(0,I.jsxs)(`div`,{className:W.arrayItemRow,children:[(0,I.jsx)(`input`,{className:W.arrayInput,"aria-label":`${t.name} ${r+1}`,value:n,onChange:e=>se(t.name,t=>t.map((t,n)=>n===r?e.target.value:t)),placeholder:e(`plugin_management.array_item_placeholder`)}),(0,I.jsxs)(`div`,{className:W.arrayActions,children:[(0,I.jsx)(L,{type:`button`,variant:`ghost`,size:`sm`,className:W.iconButton,onClick:()=>se(t.name,e=>[...e.slice(0,r+1),``,...e.slice(r+1)]),title:e(`plugin_management.add_array_item`),"aria-label":e(`plugin_management.add_array_item`),children:(0,I.jsx)(vs,{size:16})}),(0,I.jsx)(L,{type:`button`,variant:`ghost`,size:`sm`,className:W.iconButton,onClick:()=>se(t.name,e=>e.length<=1?[``]:e.filter((e,t)=>t!==r)),title:e(`plugin_management.remove_array_item`),"aria-label":e(`plugin_management.remove_array_item`),children:(0,I.jsx)(hs,{size:16})})]})]},`${t.name}-${r}`))}),t.description?(0,I.jsx)(`div`,{className:W.fieldHint,children:t.description}):null,a?(0,I.jsx)(`div`,{className:W.fieldError,children:a}):null]},t.name)}return n===`object`?(0,I.jsxs)(`div`,{className:W.formField,children:[(0,I.jsx)(`label`,{htmlFor:`plugin-field-${t.name}`,children:t.name}),(0,I.jsx)(`textarea`,{id:`plugin-field-${t.name}`,className:W.textarea,value:i,onChange:ae(t.name),placeholder:`{}`,spellCheck:!1}),t.description?(0,I.jsx)(`div`,{className:W.fieldHint,children:t.description}):null,a?(0,I.jsx)(`div`,{className:W.fieldError,children:a}):null]},t.name):(0,I.jsx)($o,{id:`plugin-field-${t.name}`,label:t.name,value:i,onChange:ae(t.name),inputMode:n===`integer`||n===`number`?`decimal`:void 0,hint:t.description||void 0,error:a||void 0},t.name)},ue=!!(h&&S===h.id);return(0,I.jsxs)(`div`,{className:W.page,children:[(0,I.jsxs)(`div`,{className:W.pageHeader,children:[(0,I.jsx)(`h1`,{className:W.title,children:e(`plugin_management.title`)}),(0,I.jsx)(`p`,{className:W.description,children:e(`plugin_management.description`)})]}),p?(0,I.jsx)(`div`,{className:W.errorBox,children:p}):null,s&&!s.pluginsEnabled?(0,I.jsx)(`div`,{className:W.warningBox,children:e(`plugin_management.global_disabled_hint`)}):null,s?(0,I.jsxs)(`div`,{className:W.statusBar,children:[(0,I.jsxs)(`div`,{className:W.statusPill,children:[(0,I.jsx)(`span`,{className:`${W.statusDot} ${s.pluginsEnabled?W.statusDotOn:W.statusDotOff}`}),(0,I.jsx)(`span`,{className:W.statusLabel,children:e(`plugin_management.global_status`)}),(0,I.jsx)(`span`,{className:W.statusValue,children:s.pluginsEnabled?e(`plugin_management.global_enabled`):e(`plugin_management.global_disabled`)})]}),(0,I.jsx)(`span`,{className:W.statusDivider}),(0,I.jsxs)(`div`,{className:W.statusPill,children:[(0,I.jsx)(`span`,{className:W.statusLabel,children:e(`plugin_management.plugins_dir`)}),(0,I.jsx)(`span`,{className:`${W.statusValue} ${W.statusPathValue}`,title:s.pluginsDir||`plugins`,children:s.pluginsDir||`plugins`})]}),(0,I.jsx)(`span`,{className:W.statusDivider}),(0,I.jsxs)(`div`,{className:W.statusPill,children:[(0,I.jsx)(`span`,{className:W.statusLabel,children:e(`plugin_management.discovered`)}),(0,I.jsx)(`span`,{className:W.statusValue,children:j.discovered})]}),(0,I.jsx)(`span`,{className:W.statusDivider}),(0,I.jsxs)(`div`,{className:W.statusPill,children:[(0,I.jsx)(`span`,{className:W.statusLabel,children:e(`plugin_management.effective`)}),(0,I.jsxs)(`span`,{className:W.statusValue,children:[j.effective,`/`,j.registered]})]})]}):null,(0,I.jsxs)(`div`,{className:W.toolbar,children:[(0,I.jsx)($o,{type:`search`,value:l,onChange:e=>u(e.target.value),placeholder:e(`plugin_management.search_placeholder`),"aria-label":e(`plugin_management.search_label`),rightElement:(0,I.jsx)(Ds,{size:16})}),(0,I.jsxs)(L,{variant:`secondary`,size:`sm`,onClick:A,disabled:!k||d||!!(S||w),loading:d,children:[(0,I.jsx)(ps,{size:16}),e(`plugin_management.refresh`)]}),(0,I.jsxs)(L,{variant:`secondary`,size:`sm`,onClick:()=>t(`/plugin-store`),children:[(0,I.jsx)(Hs,{size:16}),e(`plugin_store.title`)]})]}),d?(0,I.jsx)(`div`,{className:W.pluginList,children:Array.from({length:4},(e,t)=>(0,I.jsxs)(`div`,{className:W.skeletonRow,children:[(0,I.jsx)(`div`,{className:W.skeletonAvatar}),(0,I.jsxs)(`div`,{className:W.skeletonText,children:[(0,I.jsx)(`div`,{className:W.skeletonLine}),(0,I.jsx)(`div`,{className:W.skeletonLine})]})]},t))}):M.length===0?(0,I.jsx)(Xb,{title:e(`plugin_management.no_plugins`),description:e(`plugin_management.no_plugins_desc`),action:(0,I.jsxs)(L,{variant:`secondary`,size:`sm`,onClick:A,disabled:!k,children:[(0,I.jsx)(ps,{size:16}),e(`plugin_management.refresh`)]})}):(0,I.jsx)(`div`,{className:W.pluginList,children:M.map(t=>{let n=N(t.logo||t.metadata?.logo||``),r=t.metadata?.githubRepository.trim(),i=E===t.id,a=w===t.id,o=!!(S||E||w),s=t.metadata?.version,c=t.metadata?.author;return(0,I.jsxs)(`article`,{className:W.pluginRow,children:[(0,I.jsx)(`div`,{className:W.logoBox,"aria-hidden":`true`,children:(0,I.jsx)(Pw,{src:n})}),(0,I.jsxs)(`div`,{className:W.pluginInfo,children:[(0,I.jsxs)(`div`,{className:W.pluginName,children:[(0,I.jsx)(`h2`,{children:fw(t)}),(0,I.jsxs)(`div`,{className:W.badgeRow,children:[(0,I.jsx)(`span`,{className:t.effectiveEnabled?W.badgeSuccess:W.badgeMuted,children:t.effectiveEnabled?e(`plugin_management.status_effective`):e(`plugin_management.status_inactive`)}),(0,I.jsx)(`span`,{className:t.registered?W.badge:W.badgeWarning,children:t.registered?e(`plugin_management.registered`):e(`plugin_management.not_registered`)}),(0,I.jsx)(`span`,{className:t.configured?W.badge:W.badgeMuted,children:t.configured?e(`plugin_management.configured`):e(`plugin_management.not_configured`)}),t.supportsOAuth?(0,I.jsx)(`span`,{className:W.badge,children:e(`plugin_management.oauth`)}):null]})]}),(0,I.jsx)(`span`,{className:W.pluginId,children:t.id}),s||c||t.path?(0,I.jsxs)(`div`,{className:W.pluginMeta,children:[s?(0,I.jsx)(`span`,{className:W.metaItem,children:(0,I.jsx)(`strong`,{children:s})}):null,s&&c?(0,I.jsx)(`span`,{className:W.metaDot,"aria-hidden":`true`}):null,c?(0,I.jsx)(`span`,{className:W.metaItem,children:c}):null,(s||c)&&t.path?(0,I.jsx)(`span`,{className:W.metaDot,"aria-hidden":`true`}):null,t.path?(0,I.jsx)(`span`,{className:`${W.metaItem} ${W.metaPath}`,title:t.path,children:t.path}):null]}):null]}),(0,I.jsxs)(`div`,{className:W.rowActions,children:[(0,I.jsx)(hy,{checked:t.enabled,onChange:e=>ne(t,e),disabled:!k||o,ariaLabel:e(`plugin_management.enabled`)}),(0,I.jsxs)(L,{variant:`secondary`,size:`sm`,onClick:()=>te(t),disabled:!k||o,loading:i,children:[(0,I.jsx)(ls,{size:14}),e(`plugin_management.edit_config`)]}),(0,I.jsxs)(L,{variant:`danger`,size:`sm`,onClick:()=>re(t),disabled:!k||o,loading:a,title:e(`plugin_management.delete_plugin`),"aria-label":e(`plugin_management.delete_plugin`),children:[(0,I.jsx)(hs,{size:14}),e(`plugin_management.delete_plugin`)]}),r?(0,I.jsx)(`a`,{className:W.iconLink,href:r,target:`_blank`,rel:`noreferrer`,title:e(`plugin_management.open_repository`),"aria-label":e(`plugin_management.open_repository`),children:(0,I.jsx)(Fs,{size:14})}):null]})]},t.id)})}),(0,I.jsx)(Fy,{open:!!(h&&b),onClose:P,size:`lg`,title:h?e(`plugin_management.config_title`,{name:fw(h)}):e(`plugin_management.edit_config`),description:h?.id,closeDisabled:ue,footer:(0,I.jsxs)(`div`,{className:W.sheetFooter,children:[(0,I.jsx)(L,{variant:`secondary`,onClick:P,disabled:ue,children:e(`common.cancel`)}),(0,I.jsx)(L,{onClick:ie,loading:ue,children:e(`common.save`)})]}),children:b&&h?(0,I.jsxs)(`div`,{className:W.configForm,children:[(0,I.jsxs)(`section`,{className:W.formSection,children:[(0,I.jsx)(`h3`,{children:e(`plugin_management.base_settings`)}),(0,I.jsxs)(`div`,{className:W.fieldRow,children:[(0,I.jsxs)(`div`,{className:W.fieldText,children:[(0,I.jsx)(`div`,{className:W.fieldLabel,children:e(`plugin_management.enabled`)}),(0,I.jsx)(`div`,{className:W.fieldDescription,children:e(`plugin_management.enabled_hint`)})]}),(0,I.jsx)(hy,{checked:b.enabled,onChange:e=>F(t=>({...t,enabled:e})),ariaLabel:e(`plugin_management.enabled`)})]}),(0,I.jsx)($o,{label:e(`plugin_management.priority`),value:b.priority,onChange:ce,inputMode:`numeric`,error:b.errors.priority||void 0})]}),(0,I.jsxs)(`section`,{className:W.formSection,children:[(0,I.jsx)(`h3`,{children:e(`plugin_management.config_fields`)}),h.configFields.length>0?h.configFields.map(e=>le(e)):(0,I.jsx)(`div`,{className:W.emptyConfig,children:e(`plugin_management.no_config_fields`)})]})]}):null})]})}var Gw={gateModal:`PluginInstallGateModal-module__gateModal___ue7KG`,identity:`PluginInstallGateModal-module__identity___cMUhh`,logoBox:`PluginInstallGateModal-module__logoBox___if1mL`,name:`PluginInstallGateModal-module__name___EUXHi`,slug:`PluginInstallGateModal-module__slug___nUy93`,repoLink:`PluginInstallGateModal-module__repoLink___YkOrf`,source:`PluginInstallGateModal-module__source___nEQCo`,warningBanner:`PluginInstallGateModal-module__warningBanner___NeGNY`,effects:`PluginInstallGateModal-module__effects___3sPvx`,untrustedAlert:`PluginInstallGateModal-module__untrustedAlert___qDVbK`,untrustedText:`PluginInstallGateModal-module__untrustedText___oIwKQ`,originGrid:`PluginInstallGateModal-module__originGrid___YoESL`,confirmBlock:`PluginInstallGateModal-module__confirmBlock___L2Vcd`,confirmPrompt:`PluginInstallGateModal-module__confirmPrompt___zS8uB`,confirmHint:`PluginInstallGateModal-module__confirmHint___ZYG8r`};function Kw({src:e}){let[t,n]=(0,y.useState)(!1);return e&&!t?(0,I.jsx)(`img`,{src:e,alt:``,onError:()=>n(!0)}):(0,I.jsx)(us,{size:26})}function qw({open:e,entry:t,isUpdate:n,installing:r,onClose:i,onConfirm:a}){let{t:o}=Xo(),s=mp(e=>e.apiBase),[c,l]=(0,y.useState)(1),[u,d]=(0,y.useState)(``),[f,p]=(0,y.useState)(!1);if(e!==f&&(p(e),e&&(l(1),d(``))),!t)return null;let m=t.name||t.id,h=vw(t.repository),g=hw(t.repository),_=h||t.id,v=Sw(t),b=mw(t.logo,s),x=t.sourceName||t.sourceUrl,S=xw(t)?o(`plugin_store.cli_proxy_api_source`):x,C=u.trim()===v,w=()=>{r||i()},T=async()=>{try{await a()}catch{}},E=(0,I.jsxs)(`div`,{className:Gw.identity,children:[(0,I.jsx)(`div`,{className:Gw.logoBox,"aria-hidden":`true`,children:(0,I.jsx)(Kw,{src:b})}),(0,I.jsx)(`h3`,{className:Gw.name,children:m}),g?(0,I.jsxs)(`a`,{className:Gw.repoLink,href:g,target:`_blank`,rel:`noreferrer`,title:o(`plugin_store.open_repository`),"aria-label":o(`plugin_store.open_repository`),children:[(0,I.jsx)(`span`,{children:_}),(0,I.jsx)(Is,{size:12})]}):(0,I.jsx)(`p`,{className:Gw.slug,children:_}),S?(0,I.jsx)(`p`,{className:Gw.source,children:o(`plugin_store.source_name`,{source:S})}):null]}),D,O;return c===1?(D=E,O=(0,I.jsx)(L,{variant:`secondary`,fullWidth:!0,onClick:()=>l(2),children:o(`plugin_store.gate_step1_action`)})):c===2?(D=(0,I.jsxs)(I.Fragment,{children:[E,(0,I.jsxs)(`div`,{className:Gw.warningBanner,children:[(0,I.jsx)(bs,{size:18}),(0,I.jsx)(`span`,{children:o(`plugin_store.gate_warning`)})]}),(0,I.jsxs)(`ul`,{className:Gw.effects,children:[(0,I.jsx)(`li`,{children:o(`plugin_store.gate_effect_runs_code`)}),(0,I.jsx)(`li`,{children:o(`plugin_store.gate_effect_no_review`)}),(0,I.jsx)(`li`,{children:o(`plugin_store.gate_effect_restart`)})]}),(0,I.jsxs)(`div`,{className:Gw.untrustedAlert,children:[(0,I.jsx)(`p`,{className:Gw.untrustedText,children:o(`plugin_store.gate_untrusted_alert`)}),(0,I.jsxs)(`dl`,{className:Gw.originGrid,children:[(0,I.jsx)(`dt`,{children:o(`plugin_store.gate_repository_label`)}),(0,I.jsx)(`dd`,{children:h||t.repository||`—`}),(0,I.jsx)(`dt`,{children:o(`plugin_store.gate_source_label`)}),(0,I.jsx)(`dd`,{children:S||`—`})]})]})]}),O=(0,I.jsx)(L,{variant:`secondary`,fullWidth:!0,onClick:()=>l(3),children:o(`plugin_store.gate_step2_action`)})):(D=(0,I.jsxs)(I.Fragment,{children:[E,(0,I.jsxs)(`div`,{className:Gw.confirmBlock,children:[(0,I.jsx)(`label`,{className:Gw.confirmPrompt,htmlFor:`plugin-gate-confirm`,children:o(`plugin_store.gate_step3_prompt`,{token:v})}),(0,I.jsx)($o,{id:`plugin-gate-confirm`,value:u,onChange:e=>d(e.target.value),autoComplete:`off`,spellCheck:!1,disabled:r,"aria-label":o(`plugin_store.gate_step3_prompt`,{token:v})}),(0,I.jsx)(`p`,{className:Gw.confirmHint,children:o(`plugin_store.gate_step3_hint`)})]})]}),O=(0,I.jsx)(L,{variant:`danger`,fullWidth:!0,onClick:T,disabled:!C||r,loading:r,children:o(`plugin_store.gate_step3_action`)})),(0,I.jsx)(Ap,{open:e,onClose:w,title:o(n?`plugin_store.gate_title_update`:`plugin_store.gate_title`,{name:m}),closeDisabled:r,footer:O,width:520,className:Gw.gateModal,children:D})}var Jw={page:`PluginStorePage-module__page___rN2vB`,pageHeader:`PluginStorePage-module__pageHeader___a5hmM`,title:`PluginStorePage-module__title___QkQ1O`,description:`PluginStorePage-module__description___r173b`,errorBox:`PluginStorePage-module__errorBox___wObm5`,warningBox:`PluginStorePage-module__warningBox___m3Ra1`,securityBanner:`PluginStorePage-module__securityBanner___OtvY-`,securityBannerText:`PluginStorePage-module__securityBannerText___eDLQ1`,statusBar:`PluginStorePage-module__statusBar___b8rzI`,statusPill:`PluginStorePage-module__statusPill___AN7oF`,statusDot:`PluginStorePage-module__statusDot___llMK6`,statusDotOn:`PluginStorePage-module__statusDotOn___cQMJQ`,statusDotOff:`PluginStorePage-module__statusDotOff___auyTL`,statusLabel:`PluginStorePage-module__statusLabel___0CDXB`,statusValue:`PluginStorePage-module__statusValue___Buecx`,statusPathValue:`PluginStorePage-module__statusPathValue___gU-aN`,statusDivider:`PluginStorePage-module__statusDivider___0N7N9`,toolbar:`PluginStorePage-module__toolbar___Z-Caf`,filterChips:`PluginStorePage-module__filterChips___IS9vp`,filterChip:`PluginStorePage-module__filterChip___GUJrG`,filterChipActive:`PluginStorePage-module__filterChipActive___ej1JK`,filterChipCount:`PluginStorePage-module__filterChipCount___YmS7u`,cardGrid:`PluginStorePage-module__cardGrid___fnYwp`,card:`PluginStorePage-module__card___T-2ZC`,cardHeader:`PluginStorePage-module__cardHeader___ApM1k`,logoBox:`PluginStorePage-module__logoBox___h82gm`,cardTitleBlock:`PluginStorePage-module__cardTitleBlock___6IWjb`,cardTitle:`PluginStorePage-module__cardTitle___iD68r`,cardId:`PluginStorePage-module__cardId___W5pBu`,cardBadges:`PluginStorePage-module__cardBadges___mWJO0`,badge:`PluginStorePage-module__badge___4g24a`,badgeSuccess:`PluginStorePage-module__badgeSuccess___wg0Ot`,badgeWarning:`PluginStorePage-module__badgeWarning___xHNML`,badgeUntrusted:`PluginStorePage-module__badgeUntrusted___Wjoz1`,cardDesc:`PluginStorePage-module__cardDesc___jQ-NX`,cardDescBlock:`PluginStorePage-module__cardDescBlock___yUsqR`,cardDescExpanded:`PluginStorePage-module__cardDescExpanded___A3Tfg`,cardDescToggle:`PluginStorePage-module__cardDescToggle___zYFf8`,cardMeta:`PluginStorePage-module__cardMeta___vVo9C`,metaItem:`PluginStorePage-module__metaItem___kRo15`,metaDot:`PluginStorePage-module__metaDot___MB3Eg`,tagRow:`PluginStorePage-module__tagRow___E6-yD`,tag:`PluginStorePage-module__tag___HqCio`,cardFooter:`PluginStorePage-module__cardFooter___2L0tU`,cardActions:`PluginStorePage-module__cardActions___Ks10I`,cardLinks:`PluginStorePage-module__cardLinks___SkIwi`,iconLink:`PluginStorePage-module__iconLink___Bv605`,skeletonCard:`PluginStorePage-module__skeletonCard___QXKVq`,skeletonHeader:`PluginStorePage-module__skeletonHeader___joNtm`,skeletonAvatar:`PluginStorePage-module__skeletonAvatar___bmFWM`,skeletonPulse:`PluginStorePage-module__skeletonPulse___TfDaw`,skeletonText:`PluginStorePage-module__skeletonText___JE5Eo`,skeletonLine:`PluginStorePage-module__skeletonLine___Nyb3e`,skeletonBody:`PluginStorePage-module__skeletonBody___Zy7HX`},Yw=e=>fc(e)&&typeof e.status==`number`?e.status:void 0,Xw=e=>{if(!fc(e)||!fc(e.details))return``;let t=e.details.message;return typeof t==`string`?t.trim():``},Zw=2,Qw=e=>e.name||e.id,$w=e=>e.storeId||e.id,eT=e=>`plugin-store-desc-${encodeURIComponent(e)}`;function tT({src:e}){let[t,n]=(0,y.useState)(!1);return e&&!t?(0,I.jsx)(`img`,{src:e,alt:``,onError:()=>n(!0)}):(0,I.jsx)(us,{size:18})}function nT(){let{t:e}=Xo(),t=nr(),n=mp(e=>e.connectionStatus),r=mp(e=>e.apiBase),i=Uf(e=>e.clearCache),a=Fc(e=>e.showNotification),o=Fc(e=>e.showConfirmation),[s,c]=(0,y.useState)(null),[l,u]=(0,y.useState)(!0),[d,f]=(0,y.useState)(null),[p,m]=(0,y.useState)(``),[h,g]=(0,y.useState)(`all`),[_,v]=(0,y.useState)(``),[b,x]=(0,y.useState)([]),[S,C]=(0,y.useState)([]),[w,T]=(0,y.useState)([]),E=(0,y.useRef)({}),[D,O]=(0,y.useState)(!1),[k,A]=(0,y.useState)(null),[ee,j]=(0,y.useState)(!1),M=n===`connected`,N=(0,y.useCallback)(async()=>{if(!M){u(!1),f({kind:`generic`,message:e(`notification.connection_required`)});return}u(!0),f(null);try{c(await U_.list())}catch(t){let n=Yw(t);if(n===404)f({kind:`unsupported`,message:e(`plugin_store.unsupported_backend`)});else if(n===502){let n=Xw(t);f({kind:`registry`,message:n?`${e(`plugin_store.registry_failed`)}: ${n}`:e(`plugin_store.registry_failed`)})}else f({kind:`generic`,message:pc(t,e(`plugin_store.load_failed`))})}finally{u(!1)}},[M,e]);iv(N,M),(0,y.useEffect)(()=>{N()},[N]);let te=(0,y.useMemo)(()=>{let e=s?.plugins??[],t=e.filter(e=>e.installed).length;return{total:e.length,installed:t,notInstalled:e.length-t,updates:e.filter(e=>e.installed&&e.updateAvailable).length}},[s?.plugins]),P=(0,y.useMemo)(()=>{let e=(s?.plugins??[]).filter(e=>h===`installed`?e.installed:h===`notInstalled`?!e.installed:h===`updates`?e.installed&&e.updateAvailable:!0),t=p.trim().toLowerCase();return t?e.filter(e=>[e.id,e.name,e.description,e.author,e.repository,e.sourceName,e.sourceUrl,e.license,...e.tags].filter(Boolean).join(` `).toLowerCase().includes(t)):e},[s?.plugins,p,h]),F=[{key:`all`,label:e(`plugin_store.filter_all`),count:te.total},{key:`installed`,label:e(`plugin_store.filter_installed`),count:te.installed},{key:`notInstalled`,label:e(`plugin_store.filter_not_installed`),count:te.notInstalled},{key:`updates`,label:e(`plugin_store.filter_updates`),count:te.updates}],ne=b.map(e=>{let t=s?.plugins.find(t=>$w(t)===e);return t?Qw(t):e}),re=!!p.trim()||h!==`all`,ie=(0,y.useMemo)(()=>new Set(S),[S]),ae=(0,y.useMemo)(()=>new Set(w),[w]),oe=(0,y.useCallback)((e,t)=>{t?E.current[e]=t:delete E.current[e]},[]),se=(0,y.useCallback)(()=>{let e=Object.entries(E.current).filter(([,e])=>{if(!e)return!1;let t=window.getComputedStyle(e),n=Number.parseFloat(t.lineHeight);return!Number.isFinite(n)||n<=0?e.scrollHeight>e.clientHeight+1:e.scrollHeight>n*Zw+1}).map(([e])=>e);T(t=>t.length===e.length&&t.every(t=>e.includes(t))?t:e)},[]);(0,y.useEffect)(()=>{let e=window.requestAnimationFrame(se);return()=>{window.cancelAnimationFrame(e)}},[se,P]),(0,y.useEffect)(()=>{let e=()=>{window.requestAnimationFrame(se)};return window.addEventListener(`resize`,e),()=>{window.removeEventListener(`resize`,e)}},[se]);let ce=(0,y.useCallback)(e=>{C(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[]),le=(0,y.useCallback)(async(t,n)=>{let r=$w(t),o=n?`plugin_store.update_failed`:`plugin_store.install_failed`;v(r);try{let o=await U_.install(t.id,t.sourceId||void 0);i();let s=o.sourceId||t.sourceId,l=await Nw(t.id,s,e=>e.installed&&e.configured);if(c(l.response),l.timedOut||!l.plugin?.installed||!l.plugin.configured){a(e(`plugin_store.status_pending`),`warning`);return}if(o.restartRequired){x(e=>e.includes(r)?e:[...e,r]),a(e(n?`plugin_store.update_success`:`plugin_store.install_success`),`success`),a(e(`plugin_store.restart_required_notice`),`warning`);return}if(!l.response.pluginsEnabled){a(e(n?`plugin_store.update_success`:`plugin_store.install_success`),`success`),a(e(`plugin_store.global_disabled_hint`),`warning`);return}if(l.plugin.enabled){let n=await Nw(t.id,s,e=>e.registered&&e.effectiveEnabled);if(c(n.response),n.timedOut||!n.plugin?.registered||!n.plugin.effectiveEnabled){a(e(`plugin_store.registration_pending`),`warning`);return}dw()}a(e(n?`plugin_store.update_success`:`plugin_store.install_success`),`success`)}catch(t){throw a(`${e(o)}: ${pc(t,e(o))}`,`error`),t}finally{v(``)}},[i,a,e]),ue=t=>{let n=t.installed&&t.updateAvailable;if(!bw(t)){A(t),j(n),O(!0);return}let r=Qw(t),i=t.version?`${r} v${t.version}`:r;o({title:e(n?`plugin_store.update_confirm_title`:`plugin_store.install_confirm_title`),message:e(n?`plugin_store.update_confirm_message`:`plugin_store.install_confirm_message`,{target:i}),confirmText:e(n?`plugin_store.update`:`plugin_store.install`),variant:`primary`,onConfirm:()=>le(t,n)})},de=(0,y.useCallback)(async()=>{k&&(await le(k,ee),O(!1))},[k,ee,le]),fe=(0,y.useCallback)(()=>O(!1),[]),pe=n=>{let i=$w(n),a=mw(n.logo,r),o=hw(n.repository),s=/^https?:\/\//i.test(n.homepage)?n.homepage:``,c=n.installed&&n.updateAvailable,l=bw(n),u=c&&n.installedVersion&&n.version?e(`plugin_store.version_arrow`,{from:n.installedVersion,to:n.version}):n.installed&&n.installedVersion?`v${n.installedVersion}`:n.version?`v${n.version}`:``,d=xw(n)?e(`plugin_store.cli_proxy_api_source`):n.sourceName,f=[u,d?e(`plugin_store.source_name`,{source:d}):``,n.author,n.license].filter(Boolean),p=_===i,m=!!_,h=ie.has(i),g=ae.has(i),v=eT(i);return(0,I.jsxs)(`article`,{className:Jw.card,children:[(0,I.jsxs)(`div`,{className:Jw.cardHeader,children:[(0,I.jsx)(`div`,{className:Jw.logoBox,"aria-hidden":`true`,children:(0,I.jsx)(tT,{src:a})}),(0,I.jsxs)(`div`,{className:Jw.cardTitleBlock,children:[(0,I.jsx)(`h2`,{className:Jw.cardTitle,children:Qw(n)}),(0,I.jsx)(`span`,{className:Jw.cardId,children:n.id})]}),(0,I.jsxs)(`div`,{className:Jw.cardBadges,children:[l?null:(0,I.jsxs)(`span`,{className:Jw.badgeUntrusted,children:[(0,I.jsx)(bs,{size:11}),e(`plugin_store.badge_untrusted`)]}),c?(0,I.jsx)(`span`,{className:Jw.badgeWarning,children:e(`plugin_store.badge_update`)}):n.installed?(0,I.jsx)(`span`,{className:Jw.badgeSuccess,children:e(`plugin_store.badge_installed`)}):null,n.installed&&n.effectiveEnabled?(0,I.jsx)(`span`,{className:Jw.badge,children:e(`plugin_store.badge_effective`)}):null]})]}),n.description?(0,I.jsxs)(`div`,{className:Jw.cardDescBlock,children:[(0,I.jsx)(`p`,{id:v,ref:e=>oe(i,e),className:`${Jw.cardDesc} ${h?Jw.cardDescExpanded:``}`,children:n.description}),g?(0,I.jsx)(`button`,{type:`button`,className:Jw.cardDescToggle,onClick:()=>ce(i),"aria-expanded":h,"aria-controls":v,children:e(h?`plugin_store.description_show_less`:`plugin_store.description_show_more`)}):null]}):null,f.length>0?(0,I.jsx)(`div`,{className:Jw.cardMeta,children:f.map((e,t)=>(0,I.jsxs)(`span`,{className:Jw.metaItem,children:[t>0?(0,I.jsx)(`span`,{className:Jw.metaDot,"aria-hidden":`true`}):null,t===0&&u?(0,I.jsx)(`strong`,{children:e}):e]},`${i}-meta-${t}`))}):null,n.tags.length>0?(0,I.jsx)(`div`,{className:Jw.tagRow,children:n.tags.map(e=>(0,I.jsx)(`span`,{className:Jw.tag,children:e},`${i}-tag-${e}`))}):null,(0,I.jsxs)(`div`,{className:Jw.cardFooter,children:[(0,I.jsx)(`div`,{className:Jw.cardActions,children:n.installed?(0,I.jsxs)(I.Fragment,{children:[n.updateAvailable?(0,I.jsxs)(L,{size:`sm`,onClick:()=>ue(n),disabled:!M||m&&!p,loading:p,children:[(0,I.jsx)(ps,{size:14}),e(`plugin_store.update`)]}):null,(0,I.jsxs)(L,{variant:`secondary`,size:`sm`,onClick:()=>t(`/plugins`),children:[(0,I.jsx)(ls,{size:14}),e(`plugin_store.manage`)]})]}):(0,I.jsxs)(L,{size:`sm`,onClick:()=>ue(n),disabled:!M||m&&!p,loading:p,children:[(0,I.jsx)(ms,{size:14}),e(`plugin_store.install`)]})}),(0,I.jsxs)(`div`,{className:Jw.cardLinks,children:[o?(0,I.jsx)(`a`,{className:Jw.iconLink,href:o,target:`_blank`,rel:`noreferrer`,title:e(`plugin_store.open_repository`),"aria-label":e(`plugin_store.open_repository`),children:(0,I.jsx)(Fs,{size:14})}):null,s?(0,I.jsx)(`a`,{className:Jw.iconLink,href:s,target:`_blank`,rel:`noreferrer`,title:e(`plugin_store.open_homepage`),"aria-label":e(`plugin_store.open_homepage`),children:(0,I.jsx)(Is,{size:14})}):null]})]})]},i)};return(0,I.jsxs)(`div`,{className:Jw.page,children:[(0,I.jsxs)(`div`,{className:Jw.pageHeader,children:[(0,I.jsx)(`h1`,{className:Jw.title,children:e(`plugin_store.title`)}),(0,I.jsx)(`p`,{className:Jw.description,children:e(`plugin_store.description`)})]}),(0,I.jsxs)(`div`,{className:Jw.securityBanner,role:`note`,children:[(0,I.jsx)(cs,{size:20}),(0,I.jsxs)(`div`,{className:Jw.securityBannerText,children:[(0,I.jsx)(`strong`,{children:e(`plugin_store.security_banner_title`)}),(0,I.jsx)(`p`,{children:e(`plugin_store.security_banner_text`)})]})]}),d?(0,I.jsxs)(`div`,{className:Jw.errorBox,children:[(0,I.jsx)(`span`,{children:d.message}),d.kind===`unsupported`?null:(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:N,disabled:l,children:e(`plugin_store.retry`)})]}):null,s&&!s.pluginsEnabled?(0,I.jsx)(`div`,{className:Jw.warningBox,children:e(`plugin_store.global_disabled_hint`)}):null,ne.length>0?(0,I.jsx)(`div`,{className:Jw.warningBox,children:e(`plugin_store.restart_required_banner`,{plugins:ne.join(`, `)})}):null,s?(0,I.jsxs)(`div`,{className:Jw.statusBar,children:[(0,I.jsxs)(`div`,{className:Jw.statusPill,children:[(0,I.jsx)(`span`,{className:`${Jw.statusDot} ${s.pluginsEnabled?Jw.statusDotOn:Jw.statusDotOff}`}),(0,I.jsx)(`span`,{className:Jw.statusLabel,children:e(`plugin_store.global_status`)}),(0,I.jsx)(`span`,{className:Jw.statusValue,children:s.pluginsEnabled?e(`plugin_store.global_enabled`):e(`plugin_store.global_disabled`)})]}),(0,I.jsx)(`span`,{className:Jw.statusDivider}),(0,I.jsxs)(`div`,{className:Jw.statusPill,children:[(0,I.jsx)(`span`,{className:Jw.statusLabel,children:e(`plugin_store.plugins_dir`)}),(0,I.jsx)(`span`,{className:`${Jw.statusValue} ${Jw.statusPathValue}`,title:s.pluginsDir||`plugins`,children:s.pluginsDir||`plugins`})]}),(0,I.jsx)(`span`,{className:Jw.statusDivider}),(0,I.jsxs)(`div`,{className:Jw.statusPill,children:[(0,I.jsx)(`span`,{className:Jw.statusLabel,children:e(`plugin_store.stat_available`)}),(0,I.jsx)(`span`,{className:Jw.statusValue,children:te.total})]})]}):null,(0,I.jsxs)(`div`,{className:Jw.toolbar,children:[(0,I.jsx)($o,{type:`search`,value:p,onChange:e=>m(e.target.value),placeholder:e(`plugin_store.search_placeholder`),"aria-label":e(`plugin_store.search_label`),rightElement:(0,I.jsx)(Ds,{size:16})}),(0,I.jsxs)(L,{variant:`secondary`,size:`sm`,onClick:N,disabled:!M||l,loading:l,children:[(0,I.jsx)(ps,{size:16}),e(`plugin_store.refresh`)]})]}),(0,I.jsx)(`div`,{className:Jw.filterChips,role:`group`,"aria-label":e(`plugin_store.filter_label`),children:F.map(e=>(0,I.jsxs)(`button`,{type:`button`,className:`${Jw.filterChip} ${h===e.key?Jw.filterChipActive:``}`,onClick:()=>g(e.key),"aria-pressed":h===e.key,children:[e.label,(0,I.jsx)(`span`,{className:Jw.filterChipCount,children:e.count})]},e.key))}),l?(0,I.jsx)(`div`,{className:Jw.cardGrid,children:Array.from({length:6},(e,t)=>(0,I.jsxs)(`div`,{className:Jw.skeletonCard,children:[(0,I.jsxs)(`div`,{className:Jw.skeletonHeader,children:[(0,I.jsx)(`div`,{className:Jw.skeletonAvatar}),(0,I.jsxs)(`div`,{className:Jw.skeletonText,children:[(0,I.jsx)(`div`,{className:Jw.skeletonLine}),(0,I.jsx)(`div`,{className:Jw.skeletonLine})]})]}),(0,I.jsx)(`div`,{className:Jw.skeletonBody})]},t))}):P.length===0?d?null:te.total===0?(0,I.jsx)(Xb,{title:e(`plugin_store.no_plugins`),description:e(`plugin_store.no_plugins_desc`),action:(0,I.jsxs)(L,{variant:`secondary`,size:`sm`,onClick:N,disabled:!M,children:[(0,I.jsx)(ps,{size:16}),e(`plugin_store.refresh`)]})}):(0,I.jsx)(Xb,{title:e(`plugin_store.no_matches`),description:e(`plugin_store.no_matches_desc`),action:re?(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:()=>{m(``),g(`all`)},children:e(`plugin_store.clear_filters`)}):void 0}):(0,I.jsx)(`div`,{className:Jw.cardGrid,children:P.map(e=>pe(e))}),(0,I.jsx)(qw,{open:D,entry:k,isUpdate:ee,installing:k?_===$w(k):!1,onClose:fe,onConfirm:de})]})}var rT=Symbol.for(`yaml.alias`),iT=Symbol.for(`yaml.document`),aT=Symbol.for(`yaml.map`),oT=Symbol.for(`yaml.pair`),sT=Symbol.for(`yaml.scalar`),cT=Symbol.for(`yaml.seq`),lT=Symbol.for(`yaml.node.type`),uT=e=>!!e&&typeof e==`object`&&e[lT]===rT,dT=e=>!!e&&typeof e==`object`&&e[lT]===iT,fT=e=>!!e&&typeof e==`object`&&e[lT]===aT,pT=e=>!!e&&typeof e==`object`&&e[lT]===oT,mT=e=>!!e&&typeof e==`object`&&e[lT]===sT,hT=e=>!!e&&typeof e==`object`&&e[lT]===cT;function gT(e){if(e&&typeof e==`object`)switch(e[lT]){case aT:case cT:return!0}return!1}function _T(e){if(e&&typeof e==`object`)switch(e[lT]){case rT:case aT:case sT:case cT:return!0}return!1}var vT=e=>(mT(e)||gT(e))&&!!e.anchor,yT=Symbol(`break visit`),bT=Symbol(`skip children`),xT=Symbol(`remove node`);function ST(e,t){let n=ET(t);dT(e)?CT(null,e.contents,n,Object.freeze([e]))===xT&&(e.contents=null):CT(null,e,n,Object.freeze([]))}ST.BREAK=yT,ST.SKIP=bT,ST.REMOVE=xT;function CT(e,t,n,r){let i=DT(e,t,n,r);if(_T(i)||pT(i))return OT(e,r,i),CT(e,i,n,r);if(typeof i!=`symbol`){if(gT(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=CT(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===yT)return yT;else i===xT&&(t.items.splice(e,1),--e)}}else if(pT(t)){r=Object.freeze(r.concat(t));let e=CT(`key`,t.key,n,r);if(e===yT)return yT;e===xT&&(t.key=null);let i=CT(`value`,t.value,n,r);if(i===yT)return yT;i===xT&&(t.value=null)}}return i}async function wT(e,t){let n=ET(t);dT(e)?await TT(null,e.contents,n,Object.freeze([e]))===xT&&(e.contents=null):await TT(null,e,n,Object.freeze([]))}wT.BREAK=yT,wT.SKIP=bT,wT.REMOVE=xT;async function TT(e,t,n,r){let i=await DT(e,t,n,r);if(_T(i)||pT(i))return OT(e,r,i),TT(e,i,n,r);if(typeof i!=`symbol`){if(gT(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=await TT(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===yT)return yT;else i===xT&&(t.items.splice(e,1),--e)}}else if(pT(t)){r=Object.freeze(r.concat(t));let e=await TT(`key`,t.key,n,r);if(e===yT)return yT;e===xT&&(t.key=null);let i=await TT(`value`,t.value,n,r);if(i===yT)return yT;i===xT&&(t.value=null)}}return i}function ET(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function DT(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(fT(t))return n.Map?.(e,t,r);if(hT(t))return n.Seq?.(e,t,r);if(pT(t))return n.Pair?.(e,t,r);if(mT(t))return n.Scalar?.(e,t,r);if(uT(t))return n.Alias?.(e,t,r)}function OT(e,t,n){let r=t[t.length-1];if(gT(r))r.items[e]=n;else if(pT(r))e===`key`?r.key=n:r.value=n;else if(dT(r))r.contents=n;else{let e=uT(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var kT={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},AT=e=>e.replace(/[!,[\]{}]/g,e=>kT[e]),jT=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags);break}return t}add(t,n){this.atNextDocument&&(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),this.atNextDocument=!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+AT(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&_T(e.contents)){let t={};ST(e.contents,(e,n)=>{_T(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)i===`!!`&&a===`tag:yaml.org,2002:`||(!e||r.some(e=>e.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
|
||
`)}};jT.defaultYaml={explicit:!1,version:`1.2`},jT.defaultTags={"!!":`tag:yaml.org,2002:`};function MT(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function NT(e){let t=new Set;return ST(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function PT(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function FT(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??(i=NT(e));let a=PT(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(mT(t.node)||gT(t.node)))t.node.anchor=t.anchor;else{let t=Error(`Failed to resolve repeated object (this should not happen)`);throw t.source=e,t}}},sourceObjects:r}}function IT(e,t,n,r){if(r&&typeof r==`object`)if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=IT(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=IT(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=IT(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=IT(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}return e.call(t,n,r)}function LT(e,t,n){if(Array.isArray(e))return e.map((e,t)=>LT(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!vT(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!n?.keep?Number(e):e}var RT=class{constructor(e){Object.defineProperty(this,lT,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!dT(e))throw TypeError(`A document argument is required`);let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=LT(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?IT(i,{"":o},``,o):o}},zT=class extends RT{constructor(e){super(rT),this.source=e,Object.defineProperty(this,`tag`,{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],ST(e,{Node:(e,t)=>{(uT(t)||vT(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}return r}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:r,maxAliasCount:i}=t,a=this.resolve(r,t);if(!a){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}let o=n.get(a);if(o||(LT(a,null,t),o=n.get(a)),o?.res===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=BT(r,a,n)),o.count*o.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`);return o.res}toString(e,t,n){let r=`*${this.source}`;if(e){if(MT(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function BT(e,t,n){if(uT(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}else if(gT(t)){let r=0;for(let i of t.items){let t=BT(e,i,n);t>r&&(r=t)}return r}else if(pT(t)){let r=BT(e,t.key,n),i=BT(e,t.value,n);return Math.max(r,i)}return 1}var VT=e=>!e||typeof e!=`function`&&typeof e!=`object`,HT=class extends RT{constructor(e){super(sT),this.value=e}toJSON(e,t){return t?.keep?this.value:LT(this.value,e,t)}toString(){return String(this.value)}};HT.BLOCK_FOLDED=`BLOCK_FOLDED`,HT.BLOCK_LITERAL=`BLOCK_LITERAL`,HT.PLAIN=`PLAIN`,HT.QUOTE_DOUBLE=`QUOTE_DOUBLE`,HT.QUOTE_SINGLE=`QUOTE_SINGLE`;var UT=`tag:yaml.org,2002:`;function WT(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}function GT(e,t,n){if(dT(e)&&(e=e.contents),_T(e))return e;if(pT(e)){let t=n.schema[aT].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e==`object`){if(c=s.get(e),c)return c.anchor??(c.anchor=i(e)),new zT(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=UT+t.slice(2));let l=WT(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new HT(e);return c&&(c.node=t),t}l=e instanceof Map?o[aT]:Symbol.iterator in Object(e)?o[cT]:o[aT]}a&&(a(l),delete n.onTagObj);let u=l?.createNode?l.createNode(n.schema,e,n):typeof l?.nodeClass?.from==`function`?l.nodeClass.from(n.schema,e,n):new HT(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}function KT(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(typeof n==`number`&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=new Map([[n,r]])}return GT(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:new Map})}var qT=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done,JT=class extends RT{constructor(e,t){super(e),Object.defineProperty(this,`schema`,{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>_T(t)||pT(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(qT(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(gT(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,KT(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(gT(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return r.length===0?!t&&mT(i)?i.value:i:gT(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!pT(t))return!1;let n=t.value;return n==null||e&&mT(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let r=this.get(t,!0);return gT(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let e=this.get(n,!0);if(gT(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,KT(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}},YT=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function XT(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var ZT=(e,t,n)=>e.endsWith(`
|
||
`)?XT(n,t):n.includes(`
|
||
`)?`
|
||
`+XT(n,t):(e.endsWith(` `)?``:` `)+n,QT=`flow`,$T=`block`,eE=`quoted`;function tE(e,t,n=`flow`,{indentAtStart:r,lineWidth:i=80,minContentWidth:a=20,onFold:o,onOverflow:s}={}){if(!i||i<0)return e;i<a&&(a=0);let c=Math.max(1+a,1+i-t.length);if(e.length<=c)return e;let l=[],u={},d=i-t.length;typeof r==`number`&&(r>i-Math.max(2,a)?l.push(0):d=i-r);let f,p,m=!1,h=-1,g=-1,_=-1;n===`block`&&(h=nE(e,h,t.length),h!==-1&&(d=h+c));for(let r;r=e[h+=1];){if(n===`quoted`&&r===`\\`){switch(g=h,e[h+1]){case`x`:h+=3;break;case`u`:h+=5;break;case`U`:h+=9;break;default:h+=1}_=h}if(r===`
|
||
`)n===`block`&&(h=nE(e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r===` `&&p&&p!==` `&&p!==`
|
||
`&&p!==` `){let t=e[h+1];t&&t!==` `&&t!==`
|
||
`&&t!==` `&&(f=h)}if(h>=d)if(f)l.push(f),d=f+c,f=void 0;else if(n===`quoted`){for(;p===` `||p===` `;)p=r,r=e[h+=1],m=!0;let t=h>_+1?h-2:g-1;if(u[t])return e;l.push(t),u[t]=!0,d=t+c,f=void 0}else m=!0}p=r}if(m&&s&&s(),l.length===0)return e;o&&o();let v=e.slice(0,l[0]);for(let r=0;r<l.length;++r){let i=l[r],a=l[r+1]||e.length;i===0?v=`\n${t}${e.slice(0,a)}`:(n===`quoted`&&u[i]&&(v+=`${e[i]}\\`),v+=`\n${t}${e.slice(i+1,a)}`)}return v}function nE(e,t,n){let r=t,i=t+1,a=e[i];for(;a===` `||a===` `;)if(t<i+n)a=e[++t];else{do a=e[++t];while(a&&a!==`
|
||
`);r=t,i=t+1,a=e[i]}return r}var rE=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),iE=e=>/^(%|---|\.\.\.)/m.test(e);function aE(e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let t=0,n=0;t<i;++t)if(e[t]===`
|
||
`){if(t-n>r)return!0;if(n=t+1,i-n<=r)return!1}return!0}function oE(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(iE(e)?` `:``),o=``,s=0;for(let e=0,t=n[e];t;t=n[++e])if(t===` `&&n[e+1]===`\\`&&n[e+2]===`n`&&(o+=n.slice(s,e)+`\\ `,e+=1,s=e,t=`\\`),t===`\\`)switch(n[e+1]){case`u`:{o+=n.slice(s,e);let t=n.substr(e+2,4);switch(t){case`0000`:o+=`\\0`;break;case`0007`:o+=`\\a`;break;case`000b`:o+=`\\v`;break;case`001b`:o+=`\\e`;break;case`0085`:o+=`\\N`;break;case`00a0`:o+=`\\_`;break;case`2028`:o+=`\\L`;break;case`2029`:o+=`\\P`;break;default:t.substr(0,2)===`00`?o+=`\\x`+t.substr(2):o+=n.substr(e,6)}e+=5,s=e+1}break;case`n`:if(r||n[e+2]===`"`||n.length<i)e+=1;else{for(o+=n.slice(s,e)+`
|
||
|
||
`;n[e+2]===`\\`&&n[e+3]===`n`&&n[e+4]!==`"`;)o+=`
|
||
`,e+=2;o+=a,n[e+2]===` `&&(o+=`\\`),e+=1,s=e+1}break;default:e+=1}return o=s?o+n.slice(s):n,r?o:tE(o,a,eE,rE(t,!1))}function sE(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
|
||
`)||/[ \t]\n|\n[ \t]/.test(e))return oE(e,t);let n=t.indent||(iE(e)?` `:``),r=`'`+e.replace(/'/g,`''`).replace(/\n+/g,`$&\n${n}`)+`'`;return t.implicitKey?r:tE(r,n,QT,rE(t,!1))}function cE(e,t){let{singleQuote:n}=t.options,r;if(n===!1)r=oE;else{let t=e.includes(`"`),i=e.includes(`'`);r=t&&!i?sE:i&&!t?oE:n?sE:oE}return r(e,t)}var lE;try{lE=RegExp(`(^|(?<!
|
||
))
|
||
+(?!
|
||
|$)`,`g`)}catch{lE=/\n+(?!\n|$)/g}function uE({comment:e,type:t,value:n},r,i,a){let{blockQuote:o,commentString:s,lineWidth:c}=r.options;if(!o||/\n[\t ]+$/.test(n))return cE(n,r);let l=r.indent||(r.forceBlockIndent||iE(n)?` `:``),u=o===`literal`?!0:o===`folded`||t===HT.BLOCK_FOLDED?!1:t===HT.BLOCK_LITERAL?!0:!aE(n,c,l.length);if(!n)return u?`|
|
||
`:`>
|
||
`;let d,f;for(f=n.length;f>0;--f){let e=n[f-1];if(e!==`
|
||
`&&e!==` `&&e!==` `)break}let p=n.substring(f),m=p.indexOf(`
|
||
`);m===-1?d=`-`:n===p||m!==p.length-1?(d=`+`,a&&a()):d=``,p&&(n=n.slice(0,-p.length),p[p.length-1]===`
|
||
`&&(p=p.slice(0,-1)),p=p.replace(lE,`$&${l}`));let h=!1,g,_=-1;for(g=0;g<n.length;++g){let e=n[g];if(e===` `)h=!0;else if(e===`
|
||
`)_=g;else break}let v=n.substring(0,_<g?_+1:g);v&&(n=n.substring(v.length),v=v.replace(/\n+/g,`$&${l}`));let y=(h?l?`2`:`1`:``)+d;if(e&&(y+=` `+s(e.replace(/ ?[\r\n]+/g,` `)),i&&i()),!u){let e=n.replace(/\n+/g,`
|
||
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\n+/g,`$&${l}`),i=!1,a=rE(r,!0);o!==`folded`&&t!==HT.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=tE(`${v}${e}${p}`,l,$T,a);if(!i)return`>${y}\n${l}${s}`}return n=n.replace(/\n+/g,`$&${l}`),`|${y}\n${l}${v}${n}${p}`}function dE(e,t,n,r){let{type:i,value:a}=e,{actualString:o,implicitKey:s,indent:c,indentStep:l,inFlow:u}=t;if(s&&a.includes(`
|
||
`)||u&&/[[\]{},]/.test(a))return cE(a,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return s||u||!a.includes(`
|
||
`)?cE(a,t):uE(e,t,n,r);if(!s&&!u&&i!==HT.PLAIN&&a.includes(`
|
||
`))return uE(e,t,n,r);if(iE(a)){if(c===``)return t.forceBlockIndent=!0,uE(e,t,n,r);if(s&&c===l)return cE(a,t)}let d=a.replace(/\n+/g,`$&\n${c}`);if(o){let e=e=>e.default&&e.tag!==`tag:yaml.org,2002:str`&&e.test?.test(d),{compat:n,tags:r}=t.doc.schema;if(r.some(e)||n?.some(e))return cE(a,t)}return s?d:tE(d,c,QT,rE(t,!1))}function fE(e,t,n,r){let{implicitKey:i,inFlow:a}=t,o=typeof e.value==`string`?e:Object.assign({},e,{value:String(e.value)}),{type:s}=e;s!==HT.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(s=HT.QUOTE_DOUBLE);let c=e=>{switch(e){case HT.BLOCK_FOLDED:case HT.BLOCK_LITERAL:return i||a?cE(o.value,t):uE(o,t,n,r);case HT.QUOTE_DOUBLE:return oE(o.value,t);case HT.QUOTE_SINGLE:return sE(o.value,t);case HT.PLAIN:return dE(o,t,n,r);default:return null}},l=c(s);if(l===null){let{defaultKeyType:e,defaultStringType:n}=t.options,r=i&&e||n;if(l=c(r),l===null)throw Error(`Unsupported default string type ${r}`)}return l}function pE(e,t){let n=Object.assign({blockQuote:!0,commentString:YT,defaultKeyType:null,defaultStringType:`PLAIN`,directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:`false`,flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:`null`,simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:`true`,verifyAliasOrder:!0},e.schema.toStringOptions,t),r;switch(n.collectionStyle){case`block`:r=!1;break;case`flow`:r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?` `:``,indent:``,indentStep:typeof n.indent==`number`?` `.repeat(n.indent):` `,inFlow:r,options:n}}function mE(e,t){if(t.tag){let n=e.filter(e=>e.tag===t.tag);if(n.length>0)return n.find(e=>e.format===t.format)??n[0]}let n,r;if(mT(t)){r=t.value;let i=e.filter(e=>e.identify?.(r));if(i.length>1){let e=i.filter(e=>e.test);e.length>0&&(i=e)}n=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else r=t,n=e.find(e=>e.nodeClass&&r instanceof e.nodeClass);if(!n){let e=r?.constructor?.name??(r===null?`null`:typeof r);throw Error(`Tag not resolved for ${e} value`)}return n}function hE(e,t,{anchors:n,doc:r}){if(!r.directives)return``;let i=[],a=(mT(e)||gT(e))&&e.anchor;a&&MT(a)&&(n.add(a),i.push(`&${a}`));let o=e.tag??(t.default?null:t.tag);return o&&i.push(r.directives.tagString(o)),i.join(` `)}function gE(e,t,n,r){if(pT(e))return e.toString(t,n,r);if(uT(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError(`Cannot stringify circular structure without alias nodes`);t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i,a=_T(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??(i=mE(t.doc.schema.tags,a));let o=hE(a,i,t);o.length>0&&(t.indentAtStart=(t.indentAtStart??0)+o.length+1);let s=typeof i.stringify==`function`?i.stringify(a,t,n,r):mT(a)?fE(a,t,n,r):a.toString(t,n,r);return o?mT(a)||s[0]===`{`||s[0]===`[`?`${o} ${s}`:`${o}\n${t.indent}${s}`:s}function _E({key:e,value:t},n,r,i){let{allNullValues:a,doc:o,indent:s,indentStep:c,options:{commentString:l,indentSeq:u,simpleKeys:d}}=n,f=_T(e)&&e.comment||null;if(d){if(f)throw Error(`With simple keys, key nodes cannot have comments`);if(gT(e)||!_T(e)&&typeof e==`object`)throw Error(`With simple keys, collection cannot be used as a key value`)}let p=!d&&(!e||f&&t==null&&!n.inFlow||gT(e)||(mT(e)?e.type===HT.BLOCK_FOLDED||e.type===HT.BLOCK_LITERAL:typeof e==`object`));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=gE(e,n,()=>m=!0,()=>h=!0);if(!p&&!n.inFlow&&g.length>1024){if(d)throw Error(`With simple keys, single line scalar must not span more than 1024 characters`);p=!0}if(n.inFlow){if(a||t==null)return m&&r&&r(),g===``?`?`:p?`? ${g}`:g}else if(a&&!d||t==null&&p)return g=`? ${g}`,f&&!m?g+=ZT(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=ZT(g,n.indent,l(f))),g=`? ${g}\n${s}:`):(g=`${g}:`,f&&(g+=ZT(g,n.indent,l(f))));let _,v,y;_T(t)?(_=!!t.spaceBefore,v=t.commentBefore,y=t.comment):(_=!1,v=null,y=null,t&&typeof t==`object`&&(t=o.createNode(t))),n.implicitKey=!1,!p&&!f&&mT(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&hT(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=gE(t,n,()=>b=!0,()=>h=!0),S=` `;if(f||_||v){if(S=_?`
|
||
`:``,v){let e=l(v);S+=`\n${XT(e,n.indent)}`}x===``&&!n.inFlow?S===`
|
||
`&&y&&(S=`
|
||
|
||
`):S+=`\n${n.indent}`}else if(!p&&gT(t)){let e=x[0],r=x.indexOf(`
|
||
`),i=r!==-1,a=n.inFlow??t.flow??t.items.length===0;if(i||!a){let t=!1;if(i&&(e===`&`||e===`!`)){let n=x.indexOf(` `);e===`&`&&n!==-1&&n<r&&x[n+1]===`!`&&(n=x.indexOf(` `,n+1)),(n===-1||r<n)&&(t=!0)}t||(S=`\n${n.indent}`)}}else (x===``||x[0]===`
|
||
`)&&(S=``);return g+=S+x,n.inFlow?b&&r&&r():y&&!b?g+=ZT(g,n.indent,l(y)):h&&i&&i(),g}function vE(e,t){(e===`debug`||e===`warn`)&&console.warn(t)}var yE=`<<`,bE={identify:e=>e===yE||typeof e==`symbol`&&e.description===yE,default:`key`,tag:`tag:yaml.org,2002:merge`,test:/^<<$/,resolve:()=>Object.assign(new HT(Symbol(yE)),{addToJSMap:SE}),stringify:()=>yE},xE=(e,t)=>(bE.identify(t)||mT(t)&&(!t.type||t.type===HT.PLAIN)&&bE.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===bE.tag&&e.default);function SE(e,t,n){if(n=e&&uT(n)?n.resolve(e.doc):n,hT(n))for(let r of n.items)CE(e,t,r);else if(Array.isArray(n))for(let r of n)CE(e,t,r);else CE(e,t,n)}function CE(e,t,n){let r=e&&uT(n)?n.resolve(e.doc):n;if(!fT(r))throw Error(`Merge sources must be maps or map aliases`);let i=r.toJSON(null,e,Map);for(let[e,n]of i)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}function wE(e,t,{key:n,value:r}){if(_T(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(xE(e,n))SE(e,t,r);else{let i=LT(n,``,e);if(t instanceof Map)t.set(i,LT(r,i,e));else if(t instanceof Set)t.add(i);else{let a=TE(n,i,e),o=LT(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function TE(e,t,n){if(t===null)return``;if(typeof t!=`object`)return String(t);if(_T(e)&&n?.doc){let t=pE(n.doc,{});t.anchors=new Set;for(let e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;let r=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(r);e.length>40&&(e=e.substring(0,36)+`..."`),vE(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}function EE(e,t,n){return new DE(GT(e,void 0,n),GT(t,void 0,n))}var DE=class e{constructor(e,t=null){Object.defineProperty(this,lT,{value:oT}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return _T(n)&&(n=n.clone(t)),_T(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return wE(t,t?.mapAsMap?new Map:{},this)}toString(e,t,n){return e?.doc?_E(this,e,t,n):JSON.stringify(this)}};function OE(e,t,n){return(t.inFlow??e.flow?AE:kE)(e,t,n)}function kE({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:a,onChompKeep:o,onComment:s}){let{indent:c,options:{commentString:l}}=n,u=Object.assign({},n,{indent:a,type:null}),d=!1,f=[];for(let e=0;e<t.length;++e){let i=t[e],o=null;if(_T(i))!d&&i.spaceBefore&&f.push(``),jE(n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(pT(i)){let e=_T(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push(``),jE(n,f,e.commentBefore,d))}d=!1;let s=gE(i,u,()=>o=null,()=>d=!0);o&&(s+=ZT(s,a,l(o))),d&&o&&(d=!1),f.push(r+s)}let p;if(f.length===0)p=i.start+i.end;else{p=f[0];for(let e=1;e<f.length;++e){let t=f[e];p+=t?`\n${c}${t}`:`
|
||
`}}return e?(p+=`
|
||
`+XT(l(e),c),s&&s()):d&&o&&o(),p}function AE({items:e},t,{flowChars:n,itemIndent:r}){let{indent:i,indentStep:a,flowCollectionPadding:o,options:{commentString:s}}=t;r+=a;let c=Object.assign({},t,{indent:r,inFlow:!0,type:null}),l=!1,u=0,d=[];for(let n=0;n<e.length;++n){let i=e[n],a=null;if(_T(i))i.spaceBefore&&d.push(``),jE(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(pT(i)){let e=_T(i.key)?i.key:null;e&&(e.spaceBefore&&d.push(``),jE(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=_T(i.value)?i.value:null;n?(n.comment&&(a=n.comment),n.commentBefore&&(l=!0)):i.value==null&&e?.comment&&(a=e.comment)}a&&(l=!0);let o=gE(i,c,()=>a=null);l||(l=d.length>u||o.includes(`
|
||
`)),n<e.length-1?o+=`,`:t.options.trailingComma&&(t.options.lineWidth>0&&(l||(l=d.reduce((e,t)=>e+t.length+2,2)+(o.length+2)>t.options.lineWidth)),l&&(o+=`,`)),a&&(o+=ZT(o,r,s(a))),d.push(o),u=d.length}let{start:f,end:p}=n;if(d.length===0)return f+p;if(!l){let e=d.reduce((e,t)=>e+t.length+2,2);l=t.options.lineWidth>0&&e>t.options.lineWidth}if(l){let e=f;for(let t of d)e+=t?`\n${a}${i}${t}`:`
|
||
`;return`${e}\n${i}${p}`}else return`${f}${o}${d.join(` `)}${o}${p}`}function jE({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,``)),r){let i=XT(t(r),e);n.push(i.trimStart())}}function ME(e,t){let n=mT(t)?t.value:t;for(let r of e)if(pT(r)&&(r.key===t||r.key===n||mT(r.key)&&r.key.value===n))return r}var NE=class extends JT{static get tagName(){return`tag:yaml.org,2002:map`}constructor(e){super(aT,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:i}=n,a=new this(e),o=(e,o)=>{if(typeof i==`function`)o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;(o!==void 0||r)&&a.items.push(EE(e,o,n))};if(t instanceof Map)for(let[e,n]of t)o(e,n);else if(t&&typeof t==`object`)for(let e of Object.keys(t))o(e,t[e]);return typeof e.sortMapEntries==`function`&&a.items.sort(e.sortMapEntries),a}add(e,t){let n;n=pT(e)?e:!e||typeof e!=`object`||!(`key`in e)?new DE(e,e?.value):new DE(e.key,e.value);let r=ME(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error(`Key ${n.key} already set`);mT(r.value)&&VT(n.value)?r.value.value=n.value:r.value=n.value}else if(i){let e=this.items.findIndex(e=>i(n,e)<0);e===-1?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){let t=ME(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=ME(this.items,e)?.value;return(!t&&mT(n)?n.value:n)??void 0}has(e){return!!ME(this.items,e)}set(e,t){this.add(new DE(e,t),!0)}toJSON(e,t,n){let r=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(r);for(let e of this.items)wE(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!pT(e))throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),OE(this,e,{blockItemPrefix:``,flowChars:{start:`{`,end:`}`},itemIndent:e.indent||``,onChompKeep:n,onComment:t})}},PE={collection:`map`,default:!0,nodeClass:NE,tag:`tag:yaml.org,2002:map`,resolve(e,t){return fT(e)||t(`Expected a mapping for this tag`),e},createNode:(e,t,n)=>NE.from(e,t,n)},FE=class extends JT{static get tagName(){return`tag:yaml.org,2002:seq`}constructor(e){super(cT,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=IE(e);return typeof t==`number`?this.items.splice(t,1).length>0:!1}get(e,t){let n=IE(e);if(typeof n!=`number`)return;let r=this.items[n];return!t&&mT(r)?r.value:r}has(e){let t=IE(e);return typeof t==`number`&&t<this.items.length}set(e,t){let n=IE(e);if(typeof n!=`number`)throw Error(`Expected a valid index, not ${e}.`);let r=this.items[n];mT(r)&&VT(t)?r.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let r=0;for(let e of this.items)n.push(LT(e,String(r++),t));return n}toString(e,t,n){return e?OE(this,e,{blockItemPrefix:`- `,flowChars:{start:`[`,end:`]`},itemIndent:(e.indent||``)+` `,onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let a of t){if(typeof r==`function`){let n=t instanceof Set?a:String(e++);a=r.call(t,n,a)}i.items.push(GT(a,void 0,n))}}return i}};function IE(e){let t=mT(e)?e.value:e;return t&&typeof t==`string`&&(t=Number(t)),typeof t==`number`&&Number.isInteger(t)&&t>=0?t:null}var LE={collection:`seq`,default:!0,nodeClass:FE,tag:`tag:yaml.org,2002:seq`,resolve(e,t){return hT(e)||t(`Expected a sequence for this tag`),e},createNode:(e,t,n)=>FE.from(e,t,n)},RE={identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify(e,t,n,r){return t=Object.assign({actualString:!0},t),fE(e,t,n,r)}},zE={identify:e=>e==null,createNode:()=>new HT(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new HT(null),stringify:({source:e},t)=>typeof e==`string`&&zE.test.test(e)?e:t.options.nullStr},BE={identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new HT(e[0]===`t`||e[0]===`T`),stringify({source:e,value:t},n){return e&&BE.test.test(e)&&t===(e[0]===`t`||e[0]===`T`)?e:t?n.options.trueStr:n.options.falseStr}};function VE({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r==`bigint`)return String(r);let i=typeof r==`number`?r:Number(r);if(!isFinite(i))return isNaN(i)?`.nan`:i<0?`-.inf`:`.inf`;let a=Object.is(r,-0)?`-0`:JSON.stringify(r);if(!e&&t&&(!n||n===`tag:yaml.org,2002:float`)&&/^\d/.test(a)){let e=a.indexOf(`.`);e<0&&(e=a.length,a+=`.`);let n=t-(a.length-e-1);for(;n-- >0;)a+=`0`}return a}var HE={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()===`nan`?NaN:e[0]===`-`?-1/0:1/0,stringify:VE},UE={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`EXP`,test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():VE(e)}},WE={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new HT(parseFloat(e)),n=e.indexOf(`.`);return n!==-1&&e[e.length-1]===`0`&&(t.minFractionDigits=e.length-n-1),t},stringify:VE},GE=e=>typeof e==`bigint`||Number.isInteger(e),KE=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function qE(e,t,n){let{value:r}=e;return GE(r)&&r>=0?n+r.toString(t):VE(e)}var JE={identify:e=>GE(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^0o[0-7]+$/,resolve:(e,t,n)=>KE(e,2,8,n),stringify:e=>qE(e,8,`0o`)},YE={identify:GE,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>KE(e,0,10,n),stringify:VE},XE={identify:e=>GE(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>KE(e,2,16,n),stringify:e=>qE(e,16,`0x`)},ZE=[PE,LE,RE,zE,BE,JE,YE,XE,HE,UE,WE];function QE(e){return typeof e==`bigint`||Number.isInteger(e)}var $E=({value:e})=>JSON.stringify(e),eD=[{identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify:$E},{identify:e=>e==null,createNode:()=>new HT(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^null$/,resolve:()=>null,stringify:$E},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^true$|^false$/,resolve:e=>e===`true`,stringify:$E},{identify:QE,default:!0,tag:`tag:yaml.org,2002:int`,test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>QE(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:$E}],tD=[PE,LE].concat(eD,{default:!0,tag:``,test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}}),nD={identify:e=>e instanceof Uint8Array,default:!1,tag:`tag:yaml.org,2002:binary`,resolve(e,t){if(typeof atob==`function`){let t=atob(e.replace(/[\n\r]/g,``)),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}else return t(`This environment does not support reading binary tags; either Buffer or atob is required`),e},stringify({comment:e,type:t,value:n},r,i,a){if(!n)return``;let o=n,s;if(typeof btoa==`function`){let e=``;for(let t=0;t<o.length;++t)e+=String.fromCharCode(o[t]);s=btoa(e)}else throw Error(`This environment does not support writing binary tags; either Buffer or btoa is required`);if(t??(t=HT.BLOCK_LITERAL),t!==HT.QUOTE_DOUBLE){let e=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),n=Math.ceil(s.length/e),i=Array(n);for(let t=0,r=0;t<n;++t,r+=e)i[t]=s.substr(r,e);s=i.join(t===HT.BLOCK_LITERAL?`
|
||
`:` `)}return fE({comment:e,type:t,value:s},r,i,a)}};function rD(e,t){if(hT(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!pT(r)){if(fT(r)){r.items.length>1&&t(`Each pair must have its own sequence indicator`);let e=r.items[0]||new DE(new HT(null));if(r.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${r.commentBefore}\n${e.key.commentBefore}`:r.commentBefore),r.comment){let t=e.value??e.key;t.comment=t.comment?`${r.comment}\n${t.comment}`:r.comment}r=e}e.items[n]=pT(r)?r:new DE(r)}}else t(`Expected a sequence for this tag`);return e}function iD(e,t,n){let{replacer:r}=n,i=new FE(e);i.tag=`tag:yaml.org,2002:pairs`;let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){typeof r==`function`&&(e=r.call(t,String(a++),e));let o,s;if(Array.isArray(e))if(e.length===2)o=e[0],s=e[1];else throw TypeError(`Expected [key, value] tuple: ${e}`);else if(e&&e instanceof Object){let t=Object.keys(e);if(t.length===1)o=t[0],s=e[o];else throw TypeError(`Expected tuple with one key, not ${t.length} keys`)}else o=e;i.items.push(EE(o,s,n))}return i}var aD={collection:`seq`,default:!1,tag:`tag:yaml.org,2002:pairs`,resolve:rD,createNode:iD},oD=class e extends FE{constructor(){super(),this.add=NE.prototype.add.bind(this),this.delete=NE.prototype.delete.bind(this),this.get=NE.prototype.get.bind(this),this.has=NE.prototype.has.bind(this),this.set=NE.prototype.set.bind(this),this.tag=e.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t?.onCreate&&t.onCreate(n);for(let e of this.items){let r,i;if(pT(e)?(r=LT(e.key,``,t),i=LT(e.value,r,t)):r=LT(e,``,t),n.has(r))throw Error(`Ordered maps must not include duplicate keys`);n.set(r,i)}return n}static from(e,t,n){let r=iD(e,t,n),i=new this;return i.items=r.items,i}};oD.tag=`tag:yaml.org,2002:omap`;var sD={collection:`seq`,identify:e=>e instanceof Map,nodeClass:oD,default:!1,tag:`tag:yaml.org,2002:omap`,resolve(e,t){let n=rD(e,t),r=[];for(let{key:e}of n.items)mT(e)&&(r.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):r.push(e.value));return Object.assign(new oD,n)},createNode:(e,t,n)=>oD.from(e,t,n)};function cD({value:e,source:t},n){return t&&(e?lD:uD).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var lD={identify:e=>e===!0,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new HT(!0),stringify:cD},uD={identify:e=>e===!1,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new HT(!1),stringify:cD},dD={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()===`nan`?NaN:e[0]===`-`?-1/0:1/0,stringify:VE},fD={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`EXP`,test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,``)),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():VE(e)}},pD={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new HT(parseFloat(e.replace(/_/g,``))),n=e.indexOf(`.`);if(n!==-1){let r=e.substring(n+1).replace(/_/g,``);r[r.length-1]===`0`&&(t.minFractionDigits=r.length)}return t},stringify:VE},mD=e=>typeof e==`bigint`||Number.isInteger(e);function hD(e,t,n,{intAsBigInt:r}){let i=e[0];if((i===`-`||i===`+`)&&(t+=1),e=e.substring(t).replace(/_/g,``),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}let t=BigInt(e);return i===`-`?BigInt(-1)*t:t}let a=parseInt(e,n);return i===`-`?-1*a:a}function gD(e,t,n){let{value:r}=e;if(mD(r)){let e=r.toString(t);return r<0?`-`+n+e.substr(1):n+e}return VE(e)}var _D={identify:mD,default:!0,tag:`tag:yaml.org,2002:int`,format:`BIN`,test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>hD(e,2,2,n),stringify:e=>gD(e,2,`0b`)},vD={identify:mD,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>hD(e,1,8,n),stringify:e=>gD(e,8,`0`)},yD={identify:mD,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>hD(e,0,10,n),stringify:VE},bD={identify:mD,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>hD(e,2,16,n),stringify:e=>gD(e,16,`0x`)},xD=class e extends NE{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=pT(e)?e:e&&typeof e==`object`&&`key`in e&&`value`in e&&e.value===null?new DE(e.key,null):new DE(e,null),ME(this.items,t.key)||this.items.push(t)}get(e,t){let n=ME(this.items,e);return!t&&pT(n)?mT(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!=`boolean`)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=ME(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new DE(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw Error(`Set items must all have null values`)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)typeof r==`function`&&(e=r.call(t,e,e)),i.items.push(EE(e,null,n));return i}};xD.tag=`tag:yaml.org,2002:set`;var SD={collection:`map`,identify:e=>e instanceof Set,nodeClass:xD,default:!1,tag:`tag:yaml.org,2002:set`,createNode:(e,t,n)=>xD.from(e,t,n),resolve(e,t){if(fT(e)){if(e.hasAllNullValues(!0))return Object.assign(new xD,e);t(`Set items must all have null values`)}else t(`Expected a mapping for this tag`);return e}};function CD(e,t){let n=e[0],r=n===`-`||n===`+`?e.substring(1):e,i=e=>t?BigInt(e):Number(e),a=r.replace(/_/g,``).split(`:`).reduce((e,t)=>e*i(60)+i(t),i(0));return n===`-`?i(-1)*a:a}function wD(e){let{value:t}=e,n=e=>e;if(typeof t==`bigint`)n=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return VE(e);let r=``;t<0&&(r=`-`,t*=n(-1));let i=n(60),a=[t%i];return t<60?a.unshift(0):(t=(t-a[0])/i,a.unshift(t%i),t>=60&&(t=(t-a[0])/i,a.unshift(t))),r+a.map(e=>String(e).padStart(2,`0`)).join(`:`).replace(/000000\d*$/,``)}var TD={identify:e=>typeof e==`bigint`||Number.isInteger(e),default:!0,tag:`tag:yaml.org,2002:int`,format:`TIME`,test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>CD(e,n),stringify:wD},ED={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`TIME`,test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>CD(e,!1),stringify:wD},DD={identify:e=>e instanceof Date,default:!0,tag:`tag:yaml.org,2002:timestamp`,test:RegExp(`^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$`),resolve(e){let t=e.match(DD.test);if(!t)throw Error(`!!timestamp expects a date, starting with yyyy-mm-dd`);let[,n,r,i,a,o,s]=t.map(Number),c=t[7]?Number((t[7]+`00`).substr(1,3)):0,l=Date.UTC(n,r-1,i,a||0,o||0,s||0,c),u=t[8];if(u&&u!==`Z`){let e=CD(u,!1);Math.abs(e)<30&&(e*=60),l-=6e4*e}return new Date(l)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,``)??``},OD=[PE,LE,RE,zE,lD,uD,_D,vD,yD,bD,dD,fD,pD,nD,bE,sD,aD,SD,TD,ED,DD],kD=new Map([[`core`,ZE],[`failsafe`,[PE,LE,RE]],[`json`,tD],[`yaml11`,OD],[`yaml-1.1`,OD]]),AD={binary:nD,bool:BE,float:WE,floatExp:UE,floatNaN:HE,floatTime:ED,int:YE,intHex:XE,intOct:JE,intTime:TD,map:PE,merge:bE,null:zE,omap:sD,pairs:aD,seq:LE,set:SD,timestamp:DD},jD={"tag:yaml.org,2002:binary":nD,"tag:yaml.org,2002:merge":bE,"tag:yaml.org,2002:omap":sD,"tag:yaml.org,2002:pairs":aD,"tag:yaml.org,2002:set":SD,"tag:yaml.org,2002:timestamp":DD};function MD(e,t,n){let r=kD.get(t);if(r&&!e)return n&&!r.includes(bE)?r.concat(bE):r.slice();let i=r;if(!i)if(Array.isArray(e))i=[];else{let e=Array.from(kD.keys()).filter(e=>e!==`yaml11`).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}if(Array.isArray(e))for(let t of e)i=i.concat(t);else typeof e==`function`&&(i=e(i.slice()));return n&&(i=i.concat(bE)),i.reduce((e,t)=>{let n=typeof t==`string`?AD[t]:t;if(!n){let e=JSON.stringify(t),n=Object.keys(AD).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown custom tag ${e}; use one of ${n}`)}return e.includes(n)||e.push(n),e},[])}var ND=(e,t)=>e.key<t.key?-1:+(e.key>t.key),PD=class e{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:r,schema:i,sortMapEntries:a,toStringDefaults:o}){this.compat=Array.isArray(e)?MD(e,`compat`):e?MD(null,e):null,this.name=typeof i==`string`&&i||`core`,this.knownTags=r?jD:{},this.tags=MD(t,this.name,n),this.toStringOptions=o??null,Object.defineProperty(this,aT,{value:PE}),Object.defineProperty(this,sT,{value:RE}),Object.defineProperty(this,cT,{value:LE}),this.sortMapEntries=typeof a==`function`?a:a===!0?ND:null}clone(){let t=Object.create(e.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function FD(e,t){let n=[],r=t.directives===!0;if(t.directives!==!1&&e.directives){let t=e.directives.toString(e);t?(n.push(t),r=!0):e.directives.docStart&&(r=!0)}r&&n.push(`---`);let i=pE(e,t),{commentString:a}=i.options;if(e.commentBefore){n.length!==1&&n.unshift(``);let t=a(e.commentBefore);n.unshift(XT(t,``))}let o=!1,s=null;if(e.contents){if(_T(e.contents)){if(e.contents.spaceBefore&&r&&n.push(``),e.contents.commentBefore){let t=a(e.contents.commentBefore);n.push(XT(t,``))}i.forceBlockIndent=!!e.comment,s=e.contents.comment}let t=s?void 0:()=>o=!0,c=gE(e.contents,i,()=>s=null,t);s&&(c+=ZT(c,``,a(s))),(c[0]===`|`||c[0]===`>`)&&n[n.length-1]===`---`?n[n.length-1]=`--- ${c}`:n.push(c)}else n.push(gE(e.contents,i));if(e.directives?.docEnd)if(e.comment){let t=a(e.comment);t.includes(`
|
||
`)?(n.push(`...`),n.push(XT(t,``))):n.push(`... ${t}`)}else n.push(`...`);else{let t=e.comment;t&&o&&(t=t.replace(/^\n+/,``)),t&&((!o||s)&&n[n.length-1]!==``&&n.push(``),n.push(XT(a(t),``)))}return n.join(`
|
||
`)+`
|
||
`}var ID=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,lT,{value:iT});let r=null;typeof t==`function`||Array.isArray(t)?r=t:n===void 0&&t&&(n=t,t=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:`warn`,prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:`1.2`},n);this.options=i;let{version:a}=i;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new jT({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[lT]:{value:iT}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=_T(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){LD(this.contents)&&this.contents.add(e)}addIn(e,t){LD(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=NT(this);e.anchor=!t||n.has(t)?PT(t||`a`,n):t}return new zT(e.anchor)}createNode(e,t,n){let r;if(typeof t==`function`)e=t.call({"":e},``,e),r=t;else if(Array.isArray(t)){let e=t.filter(e=>typeof e==`number`||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),r=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:i,anchorPrefix:a,flow:o,keepUndefined:s,onTagObj:c,tag:l}=n??{},{onAnchor:u,setAnchors:d,sourceObjects:f}=FT(this,a||`a`),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=GT(e,l,p);return o&&gT(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new DE(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return LD(this.contents)?this.contents.delete(e):!1}deleteIn(e){return qT(e)?this.contents==null?!1:(this.contents=null,!0):LD(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return gT(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return qT(e)?!t&&mT(this.contents)?this.contents.value:this.contents:gT(this.contents)?this.contents.getIn(e,t):void 0}has(e){return gT(this.contents)?this.contents.has(e):!1}hasIn(e){return qT(e)?this.contents!==void 0:gT(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=KT(this.schema,[e],t):LD(this.contents)&&this.contents.set(e,t)}setIn(e,t){qT(e)?this.contents=t:this.contents==null?this.contents=KT(this.schema,Array.from(e),t):LD(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e==`number`&&(e=String(e));let n;switch(e){case`1.1`:this.directives?this.directives.yaml.version=`1.1`:this.directives=new jT({version:`1.1`}),n={resolveKnownTags:!1,schema:`yaml-1.1`};break;case`1.2`:case`next`:this.directives?this.directives.yaml.version=e:this.directives=new jT({version:e}),n={resolveKnownTags:!0,schema:`core`};break;case null:this.directives&&delete this.directives,n=null;break;default:{let t=JSON.stringify(e);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new PD(Object.assign(n,t));else throw Error(`With a null YAML version, the { schema: Schema } option is required`)}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:a}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r==`number`?r:100},s=LT(this.contents,t??``,o);if(typeof i==`function`)for(let{count:e,res:t}of o.anchors.values())i(t,e);return typeof a==`function`?IT(a,{"":s},``,s):s}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error(`Document with errors cannot be stringified`);if(`indent`in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw Error(`"indent" option must be a positive integer, not ${t}`)}return FD(this,e)}};function LD(e){if(gT(e))return!0;throw Error(`Expected a YAML collection as document contents`)}var RD=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},zD=class extends RD{constructor(e,t,n){super(`YAMLParseError`,e,t,n)}},BD=class extends RD{constructor(e,t,n){super(`YAMLWarning`,e,t,n)}},VD=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(e=>t.linePos(e));let{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let a=i-1,o=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,``);if(a>=60&&o.length>80){let e=Math.min(a-39,o.length-79);o=`…`+o.substring(e),a-=e-1}if(o.length>80&&(o=o.substring(0,79)+`…`),r>1&&/^ *$/.test(o.substring(0,a))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+`…
|
||
`),o=n+o}if(/[^ ]/.test(o)){let e=1,t=n.linePos[1];t?.line===r&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-a)));let s=` `.repeat(a)+`^`.repeat(e);n.message+=`:\n\n${o}\n${s}\n`}};function HD(e,{flow:t,indicator:n,next:r,offset:i,onError:a,parentIndent:o,startOnNewline:s}){let c=!1,l=s,u=s,d=``,f=``,p=!1,m=!1,h=null,g=null,_=null,v=null,y=null,b=null,x=null;for(let i of e)switch(m&&(i.type!==`space`&&i.type!==`newline`&&i.type!==`comma`&&a(i.offset,`MISSING_CHAR`,`Tags and anchors must be separated from the next token by white space`),m=!1),h&&(l&&i.type!==`comment`&&i.type!==`newline`&&a(h,`TAB_AS_INDENT`,`Tabs are not allowed as indentation`),h=null),i.type){case`space`:!t&&(n!==`doc-start`||r?.type!==`flow-collection`)&&i.source.includes(` `)&&(h=i),u=!0;break;case`comment`:{u||a(i,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`);let e=i.source.substring(1)||` `;d?d+=f+e:d=e,f=``,l=!1;break}case`newline`:l?d?d+=i.source:(!b||n!==`seq-item-ind`)&&(c=!0):f+=i.source,l=!0,p=!0,(g||_)&&(v=i),u=!0;break;case`anchor`:g&&a(i,`MULTIPLE_ANCHORS`,`A node can have at most one anchor`),i.source.endsWith(`:`)&&a(i.offset+i.source.length-1,`BAD_ALIAS`,`Anchor ending in : is ambiguous`,!0),g=i,x??(x=i.offset),l=!1,u=!1,m=!0;break;case`tag`:_&&a(i,`MULTIPLE_TAGS`,`A node can have at most one tag`),_=i,x??(x=i.offset),l=!1,u=!1,m=!0;break;case n:(g||_)&&a(i,`BAD_PROP_ORDER`,`Anchors and tags must be after the ${i.source} indicator`),b&&a(i,`UNEXPECTED_TOKEN`,`Unexpected ${i.source} in ${t??`collection`}`),b=i,l=n===`seq-item-ind`||n===`explicit-key-ind`,u=!1;break;case`comma`:if(t){y&&a(i,`UNEXPECTED_TOKEN`,`Unexpected , in ${t}`),y=i,l=!1,u=!1;break}default:a(i,`UNEXPECTED_TOKEN`,`Unexpected ${i.type} token`),l=!1,u=!1}let S=e[e.length-1],C=S?S.offset+S.source.length:i;return m&&r&&r.type!==`space`&&r.type!==`newline`&&r.type!==`comma`&&(r.type!==`scalar`||r.source!==``)&&a(r.offset,`MISSING_CHAR`,`Tags and anchors must be separated from the next token by white space`),h&&(l&&h.indent<=o||r?.type===`block-map`||r?.type===`block-seq`)&&a(h,`TAB_AS_INDENT`,`Tabs are not allowed as indentation`),{comma:y,found:b,spaceBefore:c,comment:d,hasNewline:p,anchor:g,tag:_,newlineAfterProp:v,end:C,start:x??C}}function UD(e){if(!e)return null;switch(e.type){case`alias`:case`scalar`:case`double-quoted-scalar`:case`single-quoted-scalar`:if(e.source.includes(`
|
||
`))return!0;if(e.end){for(let t of e.end)if(t.type===`newline`)return!0}return!1;case`flow-collection`:for(let t of e.items){for(let e of t.start)if(e.type===`newline`)return!0;if(t.sep){for(let e of t.sep)if(e.type===`newline`)return!0}if(UD(t.key)||UD(t.value))return!0}return!1;default:return!0}}function WD(e,t,n){if(t?.type===`flow-collection`){let r=t.end[0];r.indent===e&&(r.source===`]`||r.source===`}`)&&UD(t)&&n(r,`BAD_INDENT`,`Flow end indicator should be more indented than parent`,!0)}}function GD(e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r==`function`?r:(e,t)=>e===t||mT(e)&&mT(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}var KD=`All mapping items must start at the same column`;function qD({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new(a?.nodeClass??NE)(n.schema);n.atRoot&&(n.atRoot=!1);let s=r.offset,c=null;for(let a of r.items){let{start:l,key:u,sep:d,value:f}=a,p=HD(l,{indicator:`explicit-key-ind`,next:u??d?.[0],offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0}),m=!p.found;if(m){if(u&&(u.type===`block-seq`?i(s,`BLOCK_AS_IMPLICIT_KEY`,`A block sequence may not be used as an implicit map key`):`indent`in u&&u.indent!==r.indent&&i(s,`BAD_INDENT`,KD)),!p.anchor&&!p.tag&&!d){c=p.end,p.comment&&(o.comment?o.comment+=`
|
||
`+p.comment:o.comment=p.comment);continue}(p.newlineAfterProp||UD(u))&&i(u??l[l.length-1],`MULTILINE_IMPLICIT_KEY`,`Implicit keys need to be on a single line`)}else p.found?.indent!==r.indent&&i(s,`BAD_INDENT`,KD);n.atKey=!0;let h=p.end,g=u?e(n,u,p,i):t(n,h,l,null,p,i);n.schema.compat&&WD(r.indent,u,i),n.atKey=!1,GD(n,o.items,g)&&i(h,`DUPLICATE_KEY`,`Map keys must be unique`);let _=HD(d??[],{indicator:`map-value-ind`,next:f,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!u||u.type===`block-scalar`});if(s=_.end,_.found){m&&(f?.type===`block-map`&&!_.hasNewline&&i(s,`BLOCK_AS_IMPLICIT_KEY`,`Nested mappings are not allowed in compact mappings`),n.options.strict&&p.start<_.found.offset-1024&&i(g.range,`KEY_OVER_1024_CHARS`,`The : indicator must be at most 1024 chars after the start of an implicit block mapping key`));let c=f?e(n,f,_,i):t(n,s,d,null,_,i);n.schema.compat&&WD(r.indent,f,i),s=c.range[2];let l=new DE(g,c);n.options.keepSourceTokens&&(l.srcToken=a),o.items.push(l)}else{m&&i(g.range,`MISSING_CHAR`,`Implicit map keys need to be followed by map values`),_.comment&&(g.comment?g.comment+=`
|
||
`+_.comment:g.comment=_.comment);let e=new DE(g);n.options.keepSourceTokens&&(e.srcToken=a),o.items.push(e)}}return c&&c<s&&i(c,`IMPOSSIBLE`,`Map comment with trailing content`),o.range=[r.offset,s,c??s],o}function JD({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new(a?.nodeClass??FE)(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let s=r.offset,c=null;for(let{start:a,value:l}of r.items){let u=HD(a,{indicator:`seq-item-ind`,next:l,offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!u.found)if(u.anchor||u.tag||l)l?.type===`block-seq`?i(u.end,`BAD_INDENT`,`All sequence items must start at the same column`):i(s,`MISSING_CHAR`,`Sequence item without - indicator`);else{c=u.end,u.comment&&(o.comment=u.comment);continue}let d=l?e(n,l,u,i):t(n,u.end,a,null,u,i);n.schema.compat&&WD(r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function YD(e,t,n,r){let i=``;if(e){let a=!1,o=``;for(let s of e){let{source:e,type:c}=s;switch(c){case`space`:a=!0;break;case`comment`:{n&&!a&&r(s,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`);let t=e.substring(1)||` `;i?i+=o+t:i=t,o=``;break}case`newline`:i&&(o+=e),a=!0;break;default:r(s,`UNEXPECTED_TOKEN`,`Unexpected ${c} at node end`)}t+=e.length}}return{comment:i,offset:t}}var XD=`Block collections are not allowed within flow collections`,ZD=e=>e&&(e.type===`block-map`||e.type===`block-seq`);function QD({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=r.start.source===`{`,s=o?`flow map`:`flow sequence`,c=new(a?.nodeClass??(o?NE:FE))(n.schema);c.flow=!0;let l=n.atRoot;l&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let u=r.offset+r.start.source.length;for(let a=0;a<r.items.length;++a){let l=r.items[a],{start:d,key:f,sep:p,value:m}=l,h=HD(d,{flow:s,indicator:`explicit-key-ind`,next:f??p?.[0],offset:u,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!h.found){if(!h.anchor&&!h.tag&&!p&&!m){a===0&&h.comma?i(h.comma,`UNEXPECTED_TOKEN`,`Unexpected , in ${s}`):a<r.items.length-1&&i(h.start,`UNEXPECTED_TOKEN`,`Unexpected empty item in ${s}`),h.comment&&(c.comment?c.comment+=`
|
||
`+h.comment:c.comment=h.comment),u=h.end;continue}!o&&n.options.strict&&UD(f)&&i(f,`MULTILINE_IMPLICIT_KEY`,`Implicit keys of flow sequence pairs need to be on a single line`)}if(a===0)h.comma&&i(h.comma,`UNEXPECTED_TOKEN`,`Unexpected , in ${s}`);else if(h.comma||i(h.start,`MISSING_CHAR`,`Missing , between ${s} items`),h.comment){let e=``;loop:for(let t of d)switch(t.type){case`comma`:case`space`:break;case`comment`:e=t.source.substring(1);break loop;default:break loop}if(e){let t=c.items[c.items.length-1];pT(t)&&(t=t.value??t.key),t.comment?t.comment+=`
|
||
`+e:t.comment=e,h.comment=h.comment.substring(e.length+1)}}if(!o&&!p&&!h.found){let r=m?e(n,m,h,i):t(n,h.end,p,null,h,i);c.items.push(r),u=r.range[2],ZD(m)&&i(r.range,`BLOCK_IN_FLOW`,XD)}else{n.atKey=!0;let a=h.end,g=f?e(n,f,h,i):t(n,a,d,null,h,i);ZD(f)&&i(g.range,`BLOCK_IN_FLOW`,XD),n.atKey=!1;let _=HD(p??[],{flow:s,indicator:`map-value-ind`,next:m,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(_.found){if(!o&&!h.found&&n.options.strict){if(p)for(let e of p){if(e===_.found)break;if(e.type===`newline`){i(e,`MULTILINE_IMPLICIT_KEY`,`Implicit keys of flow sequence pairs need to be on a single line`);break}}h.start<_.found.offset-1024&&i(_.found,`KEY_OVER_1024_CHARS`,`The : indicator must be at most 1024 chars after the start of an implicit flow sequence key`)}}else m&&(`source`in m&&m.source?.[0]===`:`?i(m,`MISSING_CHAR`,`Missing space after : in ${s}`):i(_.start,`MISSING_CHAR`,`Missing , or : between ${s} items`));let v=m?e(n,m,_,i):_.found?t(n,_.end,p,null,_,i):null;v?ZD(m)&&i(v.range,`BLOCK_IN_FLOW`,XD):_.comment&&(g.comment?g.comment+=`
|
||
`+_.comment:g.comment=_.comment);let y=new DE(g,v);if(n.options.keepSourceTokens&&(y.srcToken=l),o){let e=c;GD(n,e.items,g)&&i(a,`DUPLICATE_KEY`,`Map keys must be unique`),e.items.push(y)}else{let e=new NE(n.schema);e.flow=!0,e.items.push(y);let t=(v??g).range;e.range=[g.range[0],t[1],t[2]],c.items.push(e)}u=v?v.range[2]:_.end}}let d=o?`}`:`]`,[f,...p]=r.end,m=u;if(f?.source===d)m=f.offset+f.source.length;else{let e=s[0].toUpperCase()+s.substring(1),t=l?`${e} must end with a ${d}`:`${e} in block collection must be sufficiently indented and end with a ${d}`;i(u,l?`MISSING_CHAR`:`BAD_INDENT`,t),f&&f.source.length!==1&&p.unshift(f)}if(p.length>0){let e=YD(p,m,n.options.strict,i);e.comment&&(c.comment?c.comment+=`
|
||
`+e.comment:c.comment=e.comment),c.range=[r.offset,m,e.offset]}else c.range=[r.offset,m,m];return c}function $D(e,t,n,r,i,a){let o=n.type===`block-map`?qD(e,t,n,r,a):n.type===`block-seq`?JD(e,t,n,r,a):QD(e,t,n,r,a),s=o.constructor;return i===`!`||i===s.tagName?(o.tag=s.tagName,o):(i&&(o.tag=i),o)}function eO(e,t,n,r,i){let a=r.tag,o=a?t.directives.tagName(a.source,e=>i(a,`TAG_RESOLVE_FAILED`,e)):null;if(n.type===`block-seq`){let{anchor:e,newlineAfterProp:t}=r,n=e&&a?e.offset>a.offset?e:a:e??a;n&&(!t||t.offset<n.offset)&&i(n,`MISSING_CHAR`,`Missing newline after block sequence props`)}let s=n.type===`block-map`?`map`:n.type===`block-seq`?`seq`:n.start.source===`{`?`map`:`seq`;if(!a||!o||o===`!`||o===NE.tagName&&s===`map`||o===FE.tagName&&s===`seq`)return $D(e,t,n,i,o);let c=t.schema.tags.find(e=>e.tag===o&&e.collection===s);if(!c){let r=t.schema.knownTags[o];if(r?.collection===s)t.schema.tags.push(Object.assign({},r,{default:!1})),c=r;else return r?i(a,`BAD_COLLECTION_TYPE`,`${r.tag} used for ${s} collection, but expects ${r.collection??`scalar`}`,!0):i(a,`TAG_RESOLVE_FAILED`,`Unresolved tag: ${o}`,!0),$D(e,t,n,i,o)}let l=$D(e,t,n,i,o,c),u=c.resolve?.(l,e=>i(a,`TAG_RESOLVE_FAILED`,e),t.options)??l,d=_T(u)?u:new HT(u);return d.range=l.range,d.tag=o,c?.format&&(d.format=c.format),d}function tO(e,t,n){let r=t.offset,i=nO(t,e.options.strict,n);if(!i)return{value:``,type:null,comment:``,range:[r,r,r]};let a=i.mode===`>`?HT.BLOCK_FOLDED:HT.BLOCK_LITERAL,o=t.source?rO(t.source):[],s=o.length;for(let e=o.length-1;e>=0;--e){let t=o[e][1];if(t===``||t===`\r`)s=e;else break}if(s===0){let e=i.chomp===`+`&&o.length>0?`
|
||
`.repeat(Math.max(1,o.length-1)):``,n=r+i.length;return t.source&&(n+=t.source.length),{value:e,type:a,comment:i.comment,range:[r,n,n]}}let c=t.indent+i.indent,l=t.offset+i.length,u=0;for(let t=0;t<s;++t){let[r,a]=o[t];if(a===``||a===`\r`)i.indent===0&&r.length>c&&(c=r.length);else{r.length<c&&n(l+r.length,`MISSING_CHAR`,`Block scalars with more-indented leading empty lines must use an explicit indentation indicator`),i.indent===0&&(c=r.length),u=t,c===0&&!e.atRoot&&n(l,`BAD_INDENT`,`Block scalar values in collections must be indented`);break}l+=r.length+a.length+1}for(let e=o.length-1;e>=s;--e)o[e][0].length>c&&(s=e+1);let d=``,f=``,p=!1;for(let e=0;e<u;++e)d+=o[e][0].slice(c)+`
|
||
`;for(let e=u;e<s;++e){let[t,r]=o[e];l+=t.length+r.length+1;let s=r[r.length-1]===`\r`;if(s&&(r=r.slice(0,-1)),r&&t.length<c){let e=`Block scalar lines must not be less indented than their ${i.indent?`explicit indentation indicator`:`first line`}`;n(l-r.length-(s?2:1),`BAD_INDENT`,e),t=``}a===HT.BLOCK_LITERAL?(d+=f+t.slice(c)+r,f=`
|
||
`):t.length>c||r[0]===` `?(f===` `?f=`
|
||
`:!p&&f===`
|
||
`&&(f=`
|
||
|
||
`),d+=f+t.slice(c)+r,f=`
|
||
`,p=!0):r===``?f===`
|
||
`?d+=`
|
||
`:f=`
|
||
`:(d+=f+r,f=` `,p=!1)}switch(i.chomp){case`-`:break;case`+`:for(let e=s;e<o.length;++e)d+=`
|
||
`+o[e][0].slice(c);d[d.length-1]!==`
|
||
`&&(d+=`
|
||
`);break;default:d+=`
|
||
`}let m=r+i.length+t.source.length;return{value:d,type:a,comment:i.comment,range:[r,m,m]}}function nO({offset:e,props:t},n,r){if(t[0].type!==`block-scalar-header`)return r(t[0],`IMPOSSIBLE`,`Block scalar header not found`),null;let{source:i}=t[0],a=i[0],o=0,s=``,c=-1;for(let t=1;t<i.length;++t){let n=i[t];if(!s&&(n===`-`||n===`+`))s=n;else{let r=Number(n);!o&&r?o=r:c===-1&&(c=e+t)}}c!==-1&&r(c,`UNEXPECTED_TOKEN`,`Block scalar header includes extra characters: ${i}`);let l=!1,u=``,d=i.length;for(let e=1;e<t.length;++e){let i=t[e];switch(i.type){case`space`:l=!0;case`newline`:d+=i.source.length;break;case`comment`:n&&!l&&r(i,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`),d+=i.source.length,u=i.source.substring(1);break;case`error`:r(i,`UNEXPECTED_TOKEN`,i.message),d+=i.source.length;break;default:{r(i,`UNEXPECTED_TOKEN`,`Unexpected token in block scalar header: ${i.type}`);let e=i.source;e&&typeof e==`string`&&(d+=e.length)}}}return{mode:a,indent:o,chomp:s,comment:u,length:d}}function rO(e){let t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),i=[r?.[1]?[r[1],n.slice(r[1].length)]:[``,n]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}function iO(e,t,n){let{offset:r,type:i,source:a,end:o}=e,s,c,l=(e,t,i)=>n(r+e,t,i);switch(i){case`scalar`:s=HT.PLAIN,c=aO(a,l);break;case`single-quoted-scalar`:s=HT.QUOTE_SINGLE,c=oO(a,l);break;case`double-quoted-scalar`:s=HT.QUOTE_DOUBLE,c=cO(a,l);break;default:return n(e,`UNEXPECTED_TOKEN`,`Expected a flow scalar value, but found: ${i}`),{value:``,type:null,comment:``,range:[r,r+a.length,r+a.length]}}let u=r+a.length,d=YD(o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function aO(e,t){let n=``;switch(e[0]){case` `:n=`a tab character`;break;case`,`:n=`flow indicator character ,`;break;case`%`:n=`directive indicator character %`;break;case`|`:case`>`:n=`block scalar indicator ${e[0]}`;break;case`@`:case"`":n=`reserved character ${e[0]}`;break}return n&&t(0,`BAD_SCALAR_START`,`Plain value cannot start with ${n}`),sO(e)}function oO(e,t){return(e[e.length-1]!==`'`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing 'quote`),sO(e.slice(1,-1)).replace(/''/g,`'`)}function sO(e){let t,n;try{t=RegExp(`(.*?)(?<![ ])[ ]*\r?
|
||
`,`sy`),n=RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
||
`,`sy`)}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=t.exec(e);if(!r)return e;let i=r[1],a=` `,o=t.lastIndex;for(n.lastIndex=o;r=n.exec(e);)r[1]===``?a===`
|
||
`?i+=a:a=`
|
||
`:(i+=a+r[1],a=` `),o=n.lastIndex;let s=/[ \t]*(.*)/sy;return s.lastIndex=o,r=s.exec(e),i+a+(r?.[1]??``)}function cO(e,t){let n=``;for(let r=1;r<e.length-1;++r){let i=e[r];if(!(i===`\r`&&e[r+1]===`
|
||
`))if(i===`
|
||
`){let{fold:t,offset:i}=lO(e,r);n+=t,r=i}else if(i===`\\`){let i=e[++r],a=uO[i];if(a)n+=a;else if(i===`
|
||
`)for(i=e[r+1];i===` `||i===` `;)i=e[++r+1];else if(i===`\r`&&e[r+1]===`
|
||
`)for(i=e[++r+1];i===` `||i===` `;)i=e[++r+1];else if(i===`x`||i===`u`||i===`U`){let a={x:2,u:4,U:8}[i];n+=dO(e,r+1,a,t),r+=a}else{let i=e.substr(r-1,2);t(r-1,`BAD_DQ_ESCAPE`,`Invalid escape sequence ${i}`),n+=i}}else if(i===` `||i===` `){let t=r,a=e[r+1];for(;a===` `||a===` `;)a=e[++r+1];a!==`
|
||
`&&!(a===`\r`&&e[r+2]===`
|
||
`)&&(n+=r>t?e.slice(t,r+1):i)}else n+=i}return(e[e.length-1]!==`"`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing "quote`),n}function lO(e,t){let n=``,r=e[t+1];for(;(r===` `||r===` `||r===`
|
||
`||r===`\r`)&&!(r===`\r`&&e[t+2]!==`
|
||
`);)r===`
|
||
`&&(n+=`
|
||
`),t+=1,r=e[t+1];return n||(n=` `),{fold:n,offset:t}}var uO={0:`\0`,a:`\x07`,b:`\b`,e:`\x1B`,f:`\f`,n:`
|
||
`,r:`\r`,t:` `,v:`\v`,N:`
`,_:`\xA0`,L:`\u2028`,P:`\u2029`," ":` `,'"':`"`,"/":`/`,"\\":`\\`," ":` `};function dO(e,t,n,r){let i=e.substr(t,n),a=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(a)){let i=e.substr(t-2,n+2);return r(t-2,`BAD_DQ_ESCAPE`,`Invalid escape sequence ${i}`),i}return String.fromCodePoint(a)}function fO(e,t,n,r){let{value:i,type:a,comment:o,range:s}=t.type===`block-scalar`?tO(e,t,r):iO(t,e.options.strict,r),c=n?e.directives.tagName(n.source,e=>r(n,`TAG_RESOLVE_FAILED`,e)):null,l;l=e.options.stringKeys&&e.atKey?e.schema[sT]:c?pO(e.schema,i,c,n,r):t.type===`scalar`?mO(e,i,t,r):e.schema[sT];let u;try{let a=l.resolve(i,e=>r(n??t,`TAG_RESOLVE_FAILED`,e),e.options);u=mT(a)?a:new HT(a)}catch(e){let a=e instanceof Error?e.message:String(e);r(n??t,`TAG_RESOLVE_FAILED`,a),u=new HT(i)}return u.range=s,u.source=i,a&&(u.type=a),c&&(u.tag=c),l.format&&(u.format=l.format),o&&(u.comment=o),u}function pO(e,t,n,r,i){if(n===`!`)return e[sT];let a=[];for(let t of e.tags)if(!t.collection&&t.tag===n)if(t.default&&t.test)a.push(t);else return t;for(let e of a)if(e.test?.test(t))return e;let o=e.knownTags[n];return o&&!o.collection?(e.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(r,`TAG_RESOLVE_FAILED`,`Unresolved tag: ${n}`,n!==`tag:yaml.org,2002:str`),e[sT])}function mO({atKey:e,directives:t,schema:n},r,i,a){let o=n.tags.find(t=>(t.default===!0||e&&t.default===`key`)&&t.test?.test(r))||n[sT];if(n.compat){let e=n.compat.find(e=>e.default&&e.test?.test(r))??n[sT];o.tag!==e.tag&&a(i,`TAG_RESOLVE_FAILED`,`Value may be parsed as either ${t.tagString(o.tag)} or ${t.tagString(e.tag)}`,!0)}return o}function hO(e,t,n){if(t){n??(n=t.length);for(let r=n-1;r>=0;--r){let n=t[r];switch(n.type){case`space`:case`comment`:case`newline`:e-=n.source.length;continue}for(n=t[++r];n?.type===`space`;)e+=n.source.length,n=t[++r];break}}return e}var gO={composeNode:_O,composeEmptyNode:vO};function _O(e,t,n,r){let i=e.atKey,{spaceBefore:a,comment:o,anchor:s,tag:c}=n,l,u=!0;switch(t.type){case`alias`:l=yO(e,t,r),(s||c)&&r(t,`ALIAS_PROPS`,`An alias node must not specify any properties`);break;case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:case`block-scalar`:l=fO(e,t,c,r),s&&(l.anchor=s.source.substring(1));break;case`block-map`:case`block-seq`:case`flow-collection`:try{l=eO(gO,e,t,n,r),s&&(l.anchor=s.source.substring(1))}catch(e){r(t,`RESOURCE_EXHAUSTION`,e instanceof Error?e.message:String(e))}break;default:r(t,`UNEXPECTED_TOKEN`,t.type===`error`?t.message:`Unsupported token (type: ${t.type})`),u=!1}return l??(l=vO(e,t.offset,void 0,null,n,r)),s&&l.anchor===``&&r(s,`BAD_ALIAS`,`Anchor cannot be an empty string`),i&&e.options.stringKeys&&(!mT(l)||typeof l.value!=`string`||l.tag&&l.tag!==`tag:yaml.org,2002:str`)&&r(c??t,`NON_STRING_KEY`,`With stringKeys, all keys must be strings`),a&&(l.spaceBefore=!0),o&&(t.type===`scalar`&&t.source===``?l.comment=o:l.commentBefore=o),e.options.keepSourceTokens&&u&&(l.srcToken=t),l}function vO(e,t,n,r,{spaceBefore:i,comment:a,anchor:o,tag:s,end:c},l){let u=fO(e,{type:`scalar`,offset:hO(t,n,r),indent:-1,source:``},s,l);return o&&(u.anchor=o.source.substring(1),u.anchor===``&&l(o,`BAD_ALIAS`,`Anchor cannot be an empty string`)),i&&(u.spaceBefore=!0),a&&(u.comment=a,u.range[2]=c),u}function yO({options:e},{offset:t,source:n,end:r},i){let a=new zT(n.substring(1));a.source===``&&i(t,`BAD_ALIAS`,`Alias cannot be an empty string`),a.source.endsWith(`:`)&&i(t+n.length-1,`BAD_ALIAS`,`Alias ending in : is ambiguous`,!0);let o=t+n.length,s=YD(r,o,e.strict,i);return a.range=[t,o,s.offset],s.comment&&(a.comment=s.comment),a}function bO(e,t,{offset:n,start:r,value:i,end:a},o){let s=new ID(void 0,Object.assign({_directives:t},e)),c={atKey:!1,atRoot:!0,directives:s.directives,options:s.options,schema:s.schema},l=HD(r,{indicator:`doc-start`,next:i??a?.[0],offset:n,onError:o,parentIndent:0,startOnNewline:!0});l.found&&(s.directives.docStart=!0,i&&(i.type===`block-map`||i.type===`block-seq`)&&!l.hasNewline&&o(l.end,`MISSING_CHAR`,`Block collection cannot start on same line with directives-end marker`)),s.contents=i?_O(c,i,l,o):vO(c,l.end,r,null,l,o);let u=s.contents.range[2],d=YD(a,u,!1,o);return d.comment&&(s.comment=d.comment),s.range=[n,u,d.offset],s}function xO(e){if(typeof e==`number`)return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];let{offset:t,source:n}=e;return[t,t+(typeof n==`string`?n.length:1)]}function SO(e){let t=``,n=!1,r=!1;for(let i=0;i<e.length;++i){let a=e[i];switch(a[0]){case`#`:t+=(t===``?``:r?`
|
||
|
||
`:`
|
||
`)+(a.substring(1)||` `),n=!0,r=!1;break;case`%`:e[i+1]?.[0]!==`#`&&(i+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}var CO=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=xO(e);r?this.warnings.push(new BD(i,t,n)):this.errors.push(new zD(i,t,n))},this.directives=new jT({version:e.version||`1.2`}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=SO(this.prelude);if(n){let i=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${n}`:n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(gT(i)&&!i.flow&&i.items.length>0){let e=i.items[0];pT(e)&&(e=e.key);let t=e.commentBefore;e.commentBefore=t?`${n}\n${t}`:n}else{let e=i.commentBefore;i.commentBefore=e?`${n}\n${e}`:n}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:SO(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){switch(e.type){case`directive`:this.directives.add(e.source,(t,n,r)=>{let i=xO(e);i[0]+=t,this.onError(i,`BAD_DIRECTIVE`,n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case`document`:{let t=bO(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,`MISSING_CHAR`,`Missing directives-end/doc-start indicator line`),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case`byte-order-mark`:case`space`:break;case`comment`:case`newline`:this.prelude.push(e.source);break;case`error`:{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new zD(xO(e),`UNEXPECTED_TOKEN`,t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case`doc-end`:{if(!this.doc){this.errors.push(new zD(xO(e),`UNEXPECTED_TOKEN`,`Unexpected doc-end without preceding document`));break}this.doc.directives.docEnd=!0;let t=YD(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new zD(xO(e),`UNEXPECTED_TOKEN`,`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let e=new ID(void 0,Object.assign({_directives:this.directives},this.options));this.atDirectives&&this.onError(t,`MISSING_CHAR`,`Missing directives-end indicator line`),e.range=[0,t,t],this.decorate(e,!1),yield e}}},wO=Symbol(`break visit`),TO=Symbol(`skip children`),EO=Symbol(`remove item`);function DO(e,t){`type`in e&&e.type===`document`&&(e={start:e.start,value:e.value}),OO(Object.freeze([]),e,t)}DO.BREAK=wO,DO.SKIP=TO,DO.REMOVE=EO,DO.itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n?.[e];if(t&&`items`in t)n=t.items[r];else return}return n},DO.parentCollection=(e,t)=>{let n=DO.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&&`items`in i)return i;throw Error(`Parent collection not found`)};function OO(e,t,n){let r=n(t,e);if(typeof r==`symbol`)return r;for(let i of[`key`,`value`]){let a=t[i];if(a&&`items`in a){for(let t=0;t<a.items.length;++t){let r=OO(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r==`number`)t=r-1;else if(r===wO)return wO;else r===EO&&(a.items.splice(t,1),--t)}typeof r==`function`&&i===`key`&&(r=r(t,e))}}return typeof r==`function`?r(t,e):r}function kO(e){switch(e){case``:return`byte-order-mark`;case``:return`doc-mode`;case``:return`flow-error-end`;case``:return`scalar`;case`---`:return`doc-start`;case`...`:return`doc-end`;case``:case`
|
||
`:case`\r
|
||
`:return`newline`;case`-`:return`seq-item-ind`;case`?`:return`explicit-key-ind`;case`:`:return`map-value-ind`;case`{`:return`flow-map-start`;case`}`:return`flow-map-end`;case`[`:return`flow-seq-start`;case`]`:return`flow-seq-end`;case`,`:return`comma`}switch(e[0]){case` `:case` `:return`space`;case`#`:return`comment`;case`%`:return`directive-line`;case`*`:return`alias`;case`&`:return`anchor`;case`!`:return`tag`;case`'`:return`single-quoted-scalar`;case`"`:return`double-quoted-scalar`;case`|`:case`>`:return`block-scalar-header`}return null}function AO(e){switch(e){case void 0:case` `:case`
|
||
`:case`\r`:case` `:return!0;default:return!1}}var jO=new Set(`0123456789ABCDEFabcdef`),MO=new Set(`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()`),NO=new Set(`,[]{}`),PO=new Set(` ,[]{}
|
||
\r `),FO=e=>!e||PO.has(e),IO=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer=``,this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!=`string`)throw TypeError(`source is not a string`);this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??`stream`;for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===` `||t===` `;)t=this.buffer[++e];return!t||t===`#`||t===`
|
||
`?!0:t===`\r`?this.buffer[e+1]===`
|
||
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;t===` `;)t=this.buffer[++n+e];if(t===`\r`){let t=this.buffer[n+e+1];if(t===`
|
||
`||!t&&!this.atEnd)return e+n+1}return t===`
|
||
`||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t===`-`||t===`.`){let t=this.buffer.substr(e,3);if((t===`---`||t===`...`)&&AO(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!=`number`||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
|
||
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]===`\r`&&--e,this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case`stream`:return yield*this.parseStream();case`line-start`:return yield*this.parseLineStart();case`block-start`:return yield*this.parseBlockStart();case`doc`:return yield*this.parseDocument();case`flow`:return yield*this.parseFlowCollection();case`quoted-scalar`:return yield*this.parseQuotedScalar();case`block-scalar`:return yield*this.parseBlockScalar();case`plain-scalar`:return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext(`stream`);if(e[0]===``&&(yield*this.pushCount(1),e=e.substring(1)),e[0]===`%`){let t=e.length,n=e.indexOf(`#`);for(;n!==-1;){let r=e[n-1];if(r===` `||r===` `){t=n-1;break}else n=e.indexOf(`#`,n+1)}for(;;){let n=e[t-1];if(n===` `||n===` `)--t;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(),`stream`}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),`stream`}return yield``,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext(`line-start`);if(e===`-`||e===`.`){if(!this.atEnd&&!this.hasChars(4))return this.setNext(`line-start`);let e=this.peek(3);if((e===`---`||e===`...`)&&AO(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,e===`---`?`doc`:`stream`}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!AO(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext(`block-start`);if((e===`-`||e===`?`||e===`:`)&&AO(t)){let e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,yield*this.parseBlockStart()}return`doc`}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext(`doc`);let t=yield*this.pushIndicators();switch(e[t]){case`#`:yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),`doc`;case`*`:return yield*this.pushUntil(FO),`doc`;case`"`:case`'`:return yield*this.parseQuotedScalar();case`|`:case`>`:return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let r=this.getLine();if(r===null)return this.setNext(`flow`);if((n!==-1&&n<this.indentNext&&r[0]!==`#`||n===0&&(r.startsWith(`---`)||r.startsWith(`...`))&&AO(r[3]))&&!(n===this.indentNext-1&&this.flowLevel===1&&(r[0]===`]`||r[0]===`}`)))return this.flowLevel=0,yield``,yield*this.parseLineStart();let i=0;for(;r[i]===`,`;)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),r[i]){case void 0:return`flow`;case`#`:return yield*this.pushCount(r.length-i),`flow`;case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),this.flowKey=!0,--this.flowLevel,this.flowLevel?`flow`:`doc`;case`*`:return yield*this.pushUntil(FO),`flow`;case`"`:case`'`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||AO(e)||e===`,`)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),`flow`}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e===`'`)for(;t!==-1&&this.buffer[t+1]===`'`;)t=this.buffer.indexOf(`'`,t+2);else for(;t!==-1;){let e=0;for(;this.buffer[t-1-e]===`\\`;)e+=1;if(e%2==0)break;t=this.buffer.indexOf(`"`,t+1)}let n=this.buffer.substring(0,t),r=n.indexOf(`
|
||
`,this.pos);if(r!==-1){for(;r!==-1;){let e=this.continueScalar(r+1);if(e===-1)break;r=n.indexOf(`
|
||
`,e)}r!==-1&&(t=r-(n[r-1]===`\r`?2:1))}if(t===-1){if(!this.atEnd)return this.setNext(`quoted-scalar`);t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?`flow`:`doc`}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t===`+`)this.blockScalarKeep=!0;else if(t>`0`&&t<=`9`)this.blockScalarIndent=Number(t)-1;else if(t!==`-`)break}return yield*this.pushUntil(e=>AO(e)||e===`#`)}*parseBlockScalar(){let e=this.pos-1,t=0,n;loop:for(let r=this.pos;n=this.buffer[r];++r)switch(n){case` `:t+=1;break;case`
|
||
`:e=r,t=0;break;case`\r`:{let e=this.buffer[r+1];if(!e&&!this.atEnd)return this.setNext(`block-scalar`);if(e===`
|
||
`)break}default:break loop}if(!n&&!this.atEnd)return this.setNext(`block-scalar`);if(t>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=t:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let t=this.continueScalar(e+1);if(t===-1)break;e=this.buffer.indexOf(`
|
||
`,t)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext(`block-scalar`);e=this.buffer.length}}let r=e+1;for(n=this.buffer[r];n===` `;)n=this.buffer[++r];if(n===` `){for(;n===` `||n===` `||n===`\r`||n===`
|
||
`;)n=this.buffer[++r];e=r-1}else if(!this.blockScalarKeep)do{let n=e-1,r=this.buffer[n];r===`\r`&&(r=this.buffer[--n]);let i=n;for(;r===` `;)r=this.buffer[--n];if(r===`
|
||
`&&n>=this.pos&&n+1+t>i)e=n;else break}while(!0);return yield``,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,r;for(;r=this.buffer[++n];)if(r===`:`){let r=this.buffer[n+1];if(AO(r)||e&&NO.has(r))break;t=n}else if(AO(r)){let i=this.buffer[n+1];if(r===`\r`&&(i===`
|
||
`?(n+=1,r=`
|
||
`,i=this.buffer[n+1]):t=n),i===`#`||e&&NO.has(i))break;if(r===`
|
||
`){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&NO.has(r))break;t=n}return!r&&!this.atEnd?this.setNext(`plain-scalar`):(yield``,yield*this.pushToIndex(t+1,!0),e?`flow`:`doc`)}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield``),0)}*pushIndicators(){switch(this.charAt(0)){case`!`:return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case`&`:return(yield*this.pushUntil(FO))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case`-`:case`?`:case`:`:{let e=this.flowLevel>0,t=this.charAt(1);if(AO(t)||e&&NO.has(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)===`<`){let e=this.pos+2,t=this.buffer[e];for(;!AO(t)&&t!==`>`;)t=this.buffer[++e];return yield*this.pushToIndex(t===`>`?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(MO.has(t))t=this.buffer[++e];else if(t===`%`&&jO.has(this.buffer[e+1])&&jO.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
|
||
`?yield*this.pushCount(1):e===`\r`&&this.charAt(1)===`
|
||
`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n===` `||e&&n===` `);let r=t-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=t),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},LO=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}};function RO(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function zO(e){for(let t=0;t<e.length;++t)switch(e[t].type){case`space`:case`comment`:case`newline`:break;default:return t}return-1}function BO(e){switch(e?.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:case`flow-collection`:return!0;default:return!1}}function VO(e){switch(e.type){case`document`:return e.start;case`block-map`:{let t=e.items[e.items.length-1];return t.sep??t.start}case`block-seq`:return e.items[e.items.length-1].start;default:return[]}}function HO(e){if(e.length===0)return[];let t=e.length;loop:for(;--t>=0;)switch(e[t].type){case`doc-start`:case`explicit-key-ind`:case`map-value-ind`:case`seq-item-ind`:case`newline`:break loop}for(;e[++t]?.type===`space`;);return e.splice(t,e.length)}function UO(e){if(e.start.type===`flow-seq-start`)for(let t of e.items)t.sep&&!t.value&&!RO(t.start,`explicit-key-ind`)&&!RO(t.sep,`map-value-ind`)&&(t.key&&(t.value=t.key),delete t.key,BO(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}var WO=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source=``,this.type=``,this.lexer=new IO,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=kO(e);if(!t){let t=`Not a YAML token: ${e}`;yield*this.pop({type:`error`,offset:this.offset,message:t,source:e}),this.offset+=e.length}else if(t===`scalar`)this.atNewLine=!1,this.atScalar=!0,this.type=`scalar`;else{switch(this.type=t,yield*this.step(),t){case`newline`:this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case`space`:this.atNewLine&&e[0]===` `&&(this.indent+=e.length);break;case`explicit-key-ind`:case`map-value-ind`:case`seq-item-ind`:this.atNewLine&&(this.indent+=e.length);break;case`doc-mode`:case`flow-error-end`:return;default:this.atNewLine=!1}this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type===`doc-end`&&e?.type!==`doc-end`){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:`doc-end`,offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case`document`:return yield*this.document(e);case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return yield*this.scalar(e);case`block-scalar`:return yield*this.blockScalar(e);case`block-map`:return yield*this.blockMap(e);case`block-seq`:return yield*this.blockSequence(e);case`flow-collection`:return yield*this.flowCollection(e);case`doc-end`:return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type:`error`,offset:this.offset,source:``,message:`Tried to pop an empty stack`};else if(this.stack.length===0)yield t;else{let e=this.peek(1);switch(t.type===`block-scalar`?t.indent=`indent`in e?e.indent:0:t.type===`flow-collection`&&e.type===`document`&&(t.indent=0),t.type===`flow-collection`&&UO(t),e.type){case`document`:e.value=t;break;case`block-scalar`:e.props.push(t);break;case`block-map`:{let n=e.items[e.items.length-1];if(n.value){e.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case`block-seq`:{let n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case`flow-collection`:{let n=e.items[e.items.length-1];!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((e.type===`document`||e.type===`block-map`||e.type===`block-seq`)&&(t.type===`block-map`||t.type===`block-seq`)){let n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&zO(n.start)===-1&&(t.indent===0||n.start.every(e=>e.type!==`comment`||e.indent<t.indent))&&(e.type===`document`?e.end=n.start:e.items.push({start:n.start}),t.items.splice(-1,1))}}}*stream(){switch(this.type){case`directive-line`:yield{type:`directive`,offset:this.offset,source:this.source};return;case`byte-order-mark`:case`space`:case`comment`:case`newline`:yield this.sourceToken;return;case`doc-mode`:case`doc-start`:{let e={type:`document`,offset:this.offset,start:[]};this.type===`doc-start`&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:`error`,offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case`doc-start`:zO(e.start)===-1?e.start.push(this.sourceToken):(yield*this.pop(),yield*this.step());return;case`anchor`:case`tag`:case`space`:case`comment`:case`newline`:e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);t?this.stack.push(t):yield{type:`error`,offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type===`map-value-ind`){let t=HO(VO(this.peek(2))),n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];let r={type:`block-map`,offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case`space`:case`comment`:case`newline`:e.props.push(this.sourceToken);return;case`scalar`:if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf(`
|
||
`)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
|
||
`,e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(this.onKeyLine=!1,t.value){let n=`end`in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type===`comment`?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){Array.prototype.push.apply(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,r=n&&(t.sep||t.explicitKey)&&this.type!==`seq-item-ind`,i=[];if(r&&t.sep&&!t.value){let n=[];for(let r=0;r<t.sep.length;++r){let i=t.sep[r];switch(i.type){case`newline`:n.push(r);break;case`space`:break;case`comment`:i.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(i=t.sep.splice(n[1]))}switch(this.type){case`anchor`:case`tag`:r||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`explicit-key-ind`:!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):r||t.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case`map-value-ind`:if(t.explicitKey)if(!t.sep)if(RO(t.start,`newline`))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=HO(t.start);this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(RO(t.sep,`map-value-ind`))this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(BO(t.key)&&!RO(t.sep,`newline`)){let e=HO(t.start),n=t.key,r=t.sep;r.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:r}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken);else t.sep?t.value||r?e.items.push({start:i,key:null,sep:[this.sourceToken]}):RO(t.sep,`map-value-ind`)?this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:{let n=this.flowScalar(this.type);r||t.value?(e.items.push({start:i,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0);return}default:{let r=this.startBlockValue(e);if(r){if(r.type===`block-seq`){if(!t.explicitKey&&t.sep&&!RO(t.sep,`newline`)){yield*this.pop({type:`error`,offset:this.offset,message:`Unexpected block-seq-ind on same line with key`,source:this.source});return}}else n&&e.items.push({start:i});this.stack.push(r);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(t.value){let n=`end`in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type===`comment`?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){Array.prototype.push.apply(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case`anchor`:case`tag`:if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case`seq-item-ind`:if(this.indent!==e.indent)break;t.value||RO(t.start,`seq-item-ind`)?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let t=this.startBlockValue(e);if(t){this.stack.push(t);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type===`flow-error-end`){let e;do yield*this.pop(),e=this.peek(1);while(e?.type===`flow-collection`)}else if(e.end.length===0){switch(this.type){case`comma`:case`explicit-key-ind`:!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case`map-value-ind`:!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case`space`:case`comment`:case`newline`:case`anchor`:case`tag`:!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:{let n=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]});return}case`flow-map-end`:case`flow-seq-end`:e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let t=this.peek(2);if(t.type===`block-map`&&(this.type===`map-value-ind`&&t.indent===e.indent||this.type===`newline`&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type===`map-value-ind`&&t.type!==`flow-collection`){let n=HO(VO(t));UO(e);let r=e.end.splice(1,e.end.length);r.push(this.sourceToken);let i={type:`block-map`,offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf(`
|
||
`)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
|
||
`,e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return this.flowScalar(this.type);case`block-scalar-header`:return{type:`block-scalar`,offset:this.offset,indent:this.indent,props:[this.sourceToken],source:``};case`flow-map-start`:case`flow-seq-start`:return{type:`flow-collection`,offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case`seq-item-ind`:return{type:`block-seq`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case`explicit-key-ind`:{this.onKeyLine=!0;let t=HO(VO(e));return t.push(this.sourceToken),{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case`map-value-ind`:{this.onKeyLine=!0;let t=HO(VO(e));return{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!==`comment`||this.indent<=t?!1:e.every(e=>e.type===`newline`||e.type===`space`)}*documentEnd(e){this.type!==`doc-mode`&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case`comma`:case`doc-start`:case`doc-end`:case`flow-seq-end`:case`flow-map-end`:case`map-value-ind`:yield*this.pop(),yield*this.step();break;case`newline`:this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop())}}};function GO(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new LO||null,prettyErrors:t}}function KO(e,t={}){let{lineCounter:n,prettyErrors:r}=GO(t),i=new WO(n?.addNewLine),a=new CO(t),o=null;for(let t of a.compose(i.parse(e),!0,e.length))if(!o)o=t;else if(o.options.logLevel!==`silent`){o.errors.push(new zD(t.range.slice(0,2),`MULTIPLE_DOCS`,`Source contains multiple documents; please use YAML.parseAllDocuments()`));break}return r&&n&&(o.errors.forEach(VD(e,n)),o.warnings.forEach(VD(e,n))),o}function qO(e,t,n){let r;typeof t==`function`?r=t:n===void 0&&t&&typeof t==`object`&&(n=t);let i=KO(e,n);if(!i)return null;if(i.warnings.forEach(e=>vE(i.options.logLevel,e)),i.errors.length>0){if(i.options.logLevel!==`silent`)throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}var JO={section:`ConfigSection-module__section___36A5y`,header:`ConfigSection-module__header___9y9kI`,titleRow:`ConfigSection-module__titleRow___MDqPS`,indexBadge:`ConfigSection-module__indexBadge___BNk-6`,iconBadge:`ConfigSection-module__iconBadge___608--`,headingGroup:`ConfigSection-module__headingGroup___iqK3P`,title:`ConfigSection-module__title___fNwM-`,description:`ConfigSection-module__description___uM2Zw`,content:`ConfigSection-module__content___RBAGw`},YO=(0,y.forwardRef)(function({title:e,description:t,indexLabel:n,icon:r,className:i,children:a,...o},s){return(0,I.jsxs)(`section`,{ref:s,className:[JO.section,i].filter(Boolean).join(` `),...o,children:[(0,I.jsxs)(`header`,{className:JO.header,children:[(0,I.jsxs)(`div`,{className:JO.titleRow,children:[n?(0,I.jsx)(`span`,{className:JO.indexBadge,children:n}):null,r?(0,I.jsx)(`span`,{className:JO.iconBadge,children:r}):null]}),(0,I.jsxs)(`div`,{className:JO.headingGroup,children:[(0,I.jsx)(`h2`,{className:JO.title,children:e}),t?(0,I.jsx)(`p`,{className:JO.description,children:t}):null]})]}),(0,I.jsx)(`div`,{className:JO.content,children:a})]})});function XO(e){let[t,n]=(0,y.useState)(()=>window.matchMedia(e).matches);return(0,y.useEffect)(()=>{let t=window.matchMedia(e),r=e=>{n(e.matches)};return r({matches:t.matches}),t.addEventListener(`change`,r),()=>t.removeEventListener(`change`,r)},[e]),t}var G={visualEditor:`VisualConfigEditor-module__visualEditor___qt8bb`,expandableInputWrapper:`VisualConfigEditor-module__expandableInputWrapper___k5rpc`,expandableTextarea:`VisualConfigEditor-module__expandableTextarea___OVvmN`,expandableToggle:`VisualConfigEditor-module__expandableToggle___M5mBU`,expandableInputExpanded:`VisualConfigEditor-module__expandableInputExpanded___9zfyv`,overview:`VisualConfigEditor-module__overview___OzHQc`,overviewHeader:`VisualConfigEditor-module__overviewHeader___A8kWa`,overviewMeta:`VisualConfigEditor-module__overviewMeta___SM8ZF`,overviewPill:`VisualConfigEditor-module__overviewPill___eXq54`,overviewPillWarning:`VisualConfigEditor-module__overviewPillWarning___ruscj`,modeSwitch:`VisualConfigEditor-module__modeSwitch___RaXgu`,modeButton:`VisualConfigEditor-module__modeButton___4q91-`,modeButtonActive:`VisualConfigEditor-module__modeButtonActive___2l-EB`,searchBox:`VisualConfigEditor-module__searchBox___5Hbe-`,searchControl:`VisualConfigEditor-module__searchControl___qs3dO`,searchIcon:`VisualConfigEditor-module__searchIcon___SSFNZ`,searchResults:`VisualConfigEditor-module__searchResults___LmzzD`,searchResultItem:`VisualConfigEditor-module__searchResultItem___WXj4b`,searchResultItemActive:`VisualConfigEditor-module__searchResultItemActive___D4PcP`,searchResultLabel:`VisualConfigEditor-module__searchResultLabel___C-XH4`,searchResultQualifier:`VisualConfigEditor-module__searchResultQualifier___L6ySy`,searchResultSection:`VisualConfigEditor-module__searchResultSection___2Ncbv`,searchEmpty:`VisualConfigEditor-module__searchEmpty___SfISJ`,fieldAnchor:`VisualConfigEditor-module__fieldAnchor___b8GES`,fieldHighlightActive:`VisualConfigEditor-module__fieldHighlightActive___N9bvD`,cfgFieldHighlight:`VisualConfigEditor-module__cfgFieldHighlight___tprRG`,simpleView:`VisualConfigEditor-module__simpleView___2aSgt`,simpleForm:`VisualConfigEditor-module__simpleForm___fP8sP`,simpleField:`VisualConfigEditor-module__simpleField___PKRxy`,simpleBanner:`VisualConfigEditor-module__simpleBanner___IrwOV`,simpleBannerAction:`VisualConfigEditor-module__simpleBannerAction___Qu19P`,simpleMore:`VisualConfigEditor-module__simpleMore___8Wff6`,workspace:`VisualConfigEditor-module__workspace___gqLDP`,mobileSectionNav:`VisualConfigEditor-module__mobileSectionNav___d-TWK`,mobileSectionNavScroller:`VisualConfigEditor-module__mobileSectionNavScroller___VGXz-`,mobileSectionNavButton:`VisualConfigEditor-module__mobileSectionNavButton___mR9BT`,mobileSectionNavButtonActive:`VisualConfigEditor-module__mobileSectionNavButtonActive___ug6e6`,mobileSectionNavIndex:`VisualConfigEditor-module__mobileSectionNavIndex___eVeF8`,mobileSectionNavLabel:`VisualConfigEditor-module__mobileSectionNavLabel___oOjqs`,mobileSectionNavBadge:`VisualConfigEditor-module__mobileSectionNavBadge___Gp-uW`,sidebar:`VisualConfigEditor-module__sidebar___SiTqL`,sidebarRail:`VisualConfigEditor-module__sidebarRail___aktyQ`,navList:`VisualConfigEditor-module__navList___Z7CyL`,navButton:`VisualConfigEditor-module__navButton___EtGL7`,navButtonActive:`VisualConfigEditor-module__navButtonActive___oMl0Y`,navIndex:`VisualConfigEditor-module__navIndex___NEFe2`,navMain:`VisualConfigEditor-module__navMain___JoJFq`,navHeadingRow:`VisualConfigEditor-module__navHeadingRow___ulXXL`,navLabelWrap:`VisualConfigEditor-module__navLabelWrap___3-6B4`,navIcon:`VisualConfigEditor-module__navIcon___ZGr7m`,navLabel:`VisualConfigEditor-module__navLabel___-reRP`,navBadge:`VisualConfigEditor-module__navBadge___UKNbs`,sections:`VisualConfigEditor-module__sections___UAac4`,sectionGrid:`VisualConfigEditor-module__sectionGrid___KHy6p`,sectionStack:`VisualConfigEditor-module__sectionStack___nY-l7`,divider:`VisualConfigEditor-module__divider___RHNc6`,toggleRow:`VisualConfigEditor-module__toggleRow___Lb65M`,toggleCopy:`VisualConfigEditor-module__toggleCopy___IC6RU`,toggleTitle:`VisualConfigEditor-module__toggleTitle___ep81q`,toggleDescription:`VisualConfigEditor-module__toggleDescription___DrJw5`,fieldShell:`VisualConfigEditor-module__fieldShell___Q-UC-`,fieldLabel:`VisualConfigEditor-module__fieldLabel___B0C9J`,fieldControl:`VisualConfigEditor-module__fieldControl___bzi3y`,fieldHint:`VisualConfigEditor-module__fieldHint___lA9jH`,inlinePill:`VisualConfigEditor-module__inlinePill___qI2DE`,subsection:`VisualConfigEditor-module__subsection___wLWRY`,subsectionHeader:`VisualConfigEditor-module__subsectionHeader___OAu1N`,subsectionTitle:`VisualConfigEditor-module__subsectionTitle___9spj4`,subsectionDescription:`VisualConfigEditor-module__subsectionDescription___Cy1zr`,blockHeaderRow:`VisualConfigEditor-module__blockHeaderRow___bw0Ek`,blockStack:`VisualConfigEditor-module__blockStack___skL7x`,ruleCard:`VisualConfigEditor-module__ruleCard___PtDhf`,ruleCardHeader:`VisualConfigEditor-module__ruleCardHeader___MYRwJ`,ruleCardTitle:`VisualConfigEditor-module__ruleCardTitle___tshgp`,blockLabel:`VisualConfigEditor-module__blockLabel___NjEEm`,actionRow:`VisualConfigEditor-module__actionRow___XLzbJ`,emptyState:`VisualConfigEditor-module__emptyState___A7-n3`,stringList:`VisualConfigEditor-module__stringList___lQQGc`,stringListRow:`VisualConfigEditor-module__stringListRow___4k2cz`,payloadRuleModelRow:`VisualConfigEditor-module__payloadRuleModelRow___VKBv1`,payloadRuleModelRowProtocolFirst:`VisualConfigEditor-module__payloadRuleModelRowProtocolFirst___OaJ2F`,payloadModelGroup:`VisualConfigEditor-module__payloadModelGroup___7fsJd`,payloadModelAdvanced:`VisualConfigEditor-module__payloadModelAdvanced___y09Hm`,payloadAdvancedGrid:`VisualConfigEditor-module__payloadAdvancedGrid___THpAJ`,payloadHeaderRow:`VisualConfigEditor-module__payloadHeaderRow___8x4ed`,payloadRuleParamRow:`VisualConfigEditor-module__payloadRuleParamRow___KZJW-`,payloadRuleRawParamRow:`VisualConfigEditor-module__payloadRuleRawParamRow___7PtrY`,payloadRuleParamGroup:`VisualConfigEditor-module__payloadRuleParamGroup___1QLNQ`,payloadJsonInput:`VisualConfigEditor-module__payloadJsonInput___ewOqz`,payloadParamError:`VisualConfigEditor-module__payloadParamError___wGWdg`,payloadFilterModelRow:`VisualConfigEditor-module__payloadFilterModelRow___MeP9-`,payloadRowActionButton:`VisualConfigEditor-module__payloadRowActionButton___8Fdka`,apiKeyModalInputRow:`VisualConfigEditor-module__apiKeyModalInputRow___08QmU`},ZO=()=>typeof globalThis.crypto?.randomUUID==`function`?globalThis.crypto.randomUUID():`${Date.now().toString(36)}_${Math.random().toString(36).slice(2,10)}`,QO={host:``,port:``,tlsEnable:!1,tlsCert:``,tlsKey:``,rmAllowRemote:!1,rmSecretKey:``,rmDisableControlPanel:!1,rmDisableAutoUpdatePanel:!1,rmPanelRepo:``,authDir:``,apiKeysText:``,pluginsEnabled:!1,pluginStoreSources:[],debug:!1,commercialMode:!1,loggingToFile:!1,logsMaxTotalSizeMb:``,errorLogsMaxFiles:``,usageStatisticsEnabled:!1,redisUsageQueueRetentionSeconds:``,proxyUrl:``,forceModelPrefix:!1,passthroughHeaders:!1,requestRetry:``,maxRetryCredentials:``,maxRetryInterval:``,disableCooling:!1,disableImageGeneration:`false`,gptImage2BaseModel:``,authAutoRefreshWorkers:``,quotaSwitchProject:!0,quotaSwitchPreviewModel:!0,quotaAntigravityCredits:!1,routingStrategy:`round-robin`,routingSessionAffinity:!1,routingSessionAffinityTTL:``,wsAuth:!1,antigravitySignatureCacheEnabled:!0,antigravitySignatureBypassStrict:!1,claudeHeaderUserAgent:``,claudeHeaderPackageVersion:``,claudeHeaderRuntimeVersion:``,claudeHeaderOs:``,claudeHeaderArch:``,claudeHeaderTimeout:``,claudeHeaderStabilizeDeviceProfile:!1,codexHeaderUserAgent:``,codexHeaderBetaFeatures:``,codexIdentityConfuse:!1,payloadDefaultRules:[],payloadDefaultRawRules:[],payloadOverrideRules:[],payloadOverrideRawRules:[],payloadFilterRules:[],streaming:{keepaliveSeconds:``,bootstrapRetries:``,nonstreamKeepaliveInterval:``}};function $O(e){return typeof e!=`object`||!e||Array.isArray(e)?null:e}function ek(e){if(typeof e==`string`)return e.trim()||null;let t=$O(e);if(!t)return null;let n=[t[`api-key`],t.apiKey,t.key,t.Key];for(let e of n)if(typeof e==`string`){let t=e.trim();if(t)return t}return null}function tk(e){if(!Array.isArray(e))return``;let t=[];for(let n of e){let e=ek(n);e&&t.push(e)}return t.join(`
|
||
`)}function nk(e){if(Object.prototype.hasOwnProperty.call(e,`api-keys`))return tk(e[`api-keys`]);let t=$O($O($O(e.auth)?.providers)?.[`config-api-key`]);return t?Object.prototype.hasOwnProperty.call(t,`api-key-entries`)?tk(t[`api-key-entries`]):tk(t[`api-keys`]):``}function rk(e,t){return e.hasIn(t)}function ik(e,t){fT(e.getIn(t,!0))||e.setIn(t,e.createNode({}))}function ak(e,t){let n=e.getIn(t,!0);fT(n)&&n.items.length===0&&e.deleteIn(t)}function ok(e,t,n){if(n){e.setIn(t,!0);return}rk(e,t)&&e.setIn(t,!1)}function sk(e,t,n,r){return rk(e,t)||n.has(r)}function ck(e,t,n){let r=typeof n==`string`?n:``;if(r.trim()!==``){e.setIn(t,r);return}rk(e,t)&&e.setIn(t,``)}function lk(e,t,n){let r=n.map(e=>e.trim()).filter(Boolean);if(r.length>0){e.setIn(t,r);return}rk(e,t)&&e.deleteIn(t)}function uk(e,t,n){let r=(typeof n==`string`?n:``).trim();if(r===``){rk(e,t)&&e.deleteIn(t);return}if(!/^-?\d+$/.test(r))return;let i=Number(r);if(Number.isFinite(i)){e.setIn(t,i);return}}function dk(e,t,n){if(n===`chat`){e.setIn(t,`chat`);return}if(n===`true`){e.setIn(t,!0);return}rk(e,t)&&e.setIn(t,!1)}var fk=[`payloadDefaultRules`,`payloadDefaultRawRules`,`payloadOverrideRules`,`payloadOverrideRawRules`,`payloadFilterRules`];function pk(e){return fk.some(t=>e.has(t))}function mk(e){let t=e.trim();if(t)return/^-?\d+$/.test(t)&&Number(t)>=0?void 0:`non_negative_integer`}function hk(e){let t=e.trim();if(!t)return;if(!/^\d+$/.test(t))return`port_range`;let n=Number(t);return n>=1&&n<=65535?void 0:`port_range`}function gk(e){return{port:hk(e.port),errorLogsMaxFiles:mk(e.errorLogsMaxFiles),logsMaxTotalSizeMb:mk(e.logsMaxTotalSizeMb),redisUsageQueueRetentionSeconds:mk(e.redisUsageQueueRetentionSeconds),requestRetry:mk(e.requestRetry),maxRetryCredentials:mk(e.maxRetryCredentials),maxRetryInterval:mk(e.maxRetryInterval),authAutoRefreshWorkers:mk(e.authAutoRefreshWorkers),"streaming.keepaliveSeconds":mk(e.streaming.keepaliveSeconds),"streaming.bootstrapRetries":mk(e.streaming.bootstrapRetries),"streaming.nonstreamKeepaliveInterval":mk(e.streaming.nonstreamKeepaliveInterval)}}function _k(e){let t=e.value.trim();switch(e.valueType){case`number`:{if(!t)return`payload_invalid_number`;let e=Number(t);return Number.isFinite(e)?void 0:`payload_invalid_number`}case`boolean`:{let e=t.toLowerCase();return e===`true`||e===`false`?void 0:`payload_invalid_boolean`}case`json`:if(!t)return`payload_invalid_json`;try{JSON.parse(e.value);return}catch{return`payload_invalid_json`}default:return}}function vk(e){return e.some(e=>e.params.some(e=>!!_k(e))||e.models.some(e=>(e.match??[]).some(e=>!!_k(e))||(e.notMatch??[]).some(e=>!!_k(e))))}function yk(e){return typeof structuredClone==`function`?structuredClone(e):JSON.parse(JSON.stringify(e))}function bk(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(!r||!i||r.id!==i.id||r.name!==i.name||r.protocol!==i.protocol||r.fromProtocol!==i.fromProtocol||!Sk(r.headers,i.headers)||!xk(r.match??[],i.match??[])||!xk(r.notMatch??[],i.notMatch??[])||!Ck(r.exist,i.exist)||!Ck(r.notExist,i.notExist))return!1}return!0}function xk(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(!r||!i||r.id!==i.id||r.path!==i.path||r.valueType!==i.valueType||r.value!==i.value)return!1}return!0}function Sk(e,t){let n=e??[],r=t??[];if(n===r)return!0;if(n.length!==r.length)return!1;for(let e=0;e<n.length;e+=1){let t=n[e],i=r[e];if(!t||!i||t.id!==i.id||t.name!==i.name||t.value!==i.value)return!1}return!0}function Ck(e,t){let n=e??[],r=t??[];if(n===r)return!0;if(n.length!==r.length)return!1;for(let e=0;e<n.length;e+=1)if(n[e]!==r[e])return!1;return!0}function wk(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(!r||!i||r.id!==i.id||!bk(r.models,i.models)||!xk(r.params,i.params))return!1}return!0}function Tk(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(!r||!i||r.id!==i.id||!bk(r.models,i.models)||r.params.length!==i.params.length)return!1;for(let e=0;e<r.params.length;e+=1)if(r.params[e]!==i.params[e])return!1}return!0}function Ek(e){if(typeof e==`number`)return{valueType:`number`,value:String(e)};if(typeof e==`boolean`)return{valueType:`boolean`,value:String(e)};if(e===null||typeof e==`object`)try{return{valueType:`json`,value:JSON.stringify(e,null,2)??`null`}}catch{return{valueType:`json`,value:String(e)}}return{valueType:`string`,value:String(e??``)}}function Dk(e){if(typeof e==`string`)return e;try{return JSON.stringify(e,null,2)??``}catch{return String(e??``)}}function Ok(e){if(typeof e==`string`)return e.trim()?e:void 0}function kk(e){if(e===!0)return`true`;if(typeof e==`string`){let t=e.trim().toLowerCase();if(t===`true`)return`true`;if(t===`chat`)return`chat`}return`false`}function Ak(e,t){let n=$O(e);return n?Object.entries(n).map(([e,n],r)=>({id:`${t}-header-${r}`,name:e,value:String(n??``)})):[]}function jk(e,t){if(!Array.isArray(e))return[];let n=[];return e.forEach((e,r)=>{let i=$O(e);if(!i){typeof e==`string`&&n.push({id:`${t}-condition-${r}-0`,path:e,valueType:`string`,value:``});return}Object.entries(i).forEach(([e,i],a)=>{let o=Ek(i);n.push({id:`${t}-condition-${r}-${a}`,path:e,valueType:o.valueType,value:o.value})})}),n}function Mk(e){return Array.isArray(e)?e.map(e=>String(e??``).trim()).filter(Boolean):[]}function Nk(e){rk(e,[`auth`,`providers`,`config-api-key`,`api-key-entries`])&&e.deleteIn([`auth`,`providers`,`config-api-key`,`api-key-entries`]),rk(e,[`auth`,`providers`,`config-api-key`,`api-keys`])&&e.deleteIn([`auth`,`providers`,`config-api-key`,`api-keys`]),ak(e,[`auth`,`providers`,`config-api-key`]),ak(e,[`auth`,`providers`]),ak(e,[`auth`])}function Pk(e,t){return Array.isArray(e)?e.map((e,n)=>{let r=$O(e),i=typeof e==`string`?e:r?.name??r?.id??``,a=typeof i==`string`?i:String(i??``),o=`${t}-${n}`;return{id:o,name:a,protocol:Ok(r?.protocol),fromProtocol:Ok(r?.[`from-protocol`]),headers:Ak(r?.headers,o),match:jk(r?.match,`${o}-match`),notMatch:jk(r?.[`not-match`],`${o}-not-match`),exist:Mk(r?.exist),notExist:Mk(r?.[`not-exist`])}}):[]}function Fk(e){return Array.isArray(e)?e.map((e,t)=>{let n=$O(e)??{},r=Pk(n.models,`model-${t}`),i=$O(n.params),a=i?Object.entries(i).map(([e,n],r)=>{let i=Ek(n);return{id:`param-${t}-${r}`,path:e,valueType:i.valueType,value:i.value}}):[];return{id:`payload-rule-${t}`,models:r,params:a}}):[]}function Ik(e){return Array.isArray(e)?e.map((e,t)=>{let n=$O(e)??{},r=Pk(n.models,`filter-model-${t}`),i=n.params,a=Array.isArray(i)?i.map(String):[];return{id:`payload-filter-rule-${t}`,models:r,params:a}}):[]}function Lk(e){return Array.isArray(e)?e.map((e,t)=>{let n=$O(e)??{},r=Pk(n.models,`raw-model-${t}`),i=$O(n.params),a=i?Object.entries(i).map(([e,n],r)=>({id:`raw-param-${t}-${r}`,path:e,valueType:`json`,value:Dk(n)})):[];return{id:`payload-raw-rule-${t}`,models:r,params:a}}):[]}function Rk(e){if(e.valueType===`number`){let t=Number(e.value);return Number.isFinite(t)?t:e.value}if(e.valueType===`boolean`)return e.value===`true`;if(e.valueType===`json`)try{return JSON.parse(e.value)}catch{return e.value}return e.value}function zk(e){let t={};for(let n of e??[]){let e=n.name.trim();e&&(t[e]=n.value)}return t}function Bk(e){let t=[];for(let n of e??[]){let e=n.path.trim();e&&t.push({[e]:Rk(n)})}return t}function Vk(e){return(e??[]).map(e=>e.trim()).filter(Boolean)}function Hk(e){return(e||[]).filter(e=>e.name?.trim()).map(e=>{let t={name:e.name.trim()};e.protocol&&(t.protocol=e.protocol),e.fromProtocol&&(t[`from-protocol`]=e.fromProtocol);let n=zk(e.headers);Object.keys(n).length&&(t.headers=n);let r=Bk(e.match);r.length&&(t.match=r);let i=Bk(e.notMatch);i.length&&(t[`not-match`]=i);let a=Vk(e.exist);a.length&&(t.exist=a);let o=Vk(e.notExist);return o.length&&(t[`not-exist`]=o),t})}function Uk(e){return e.map(e=>{let t=Hk(e.models),n={};for(let t of e.params||[])t.path?.trim()&&(n[t.path.trim()]=Rk(t));return{models:t,params:n}}).filter(e=>e.models.length>0)}function Wk(e){return e.map(e=>({models:Hk(e.models),params:(Array.isArray(e.params)?e.params:[]).map(e=>String(e).trim()).filter(Boolean)})).filter(e=>e.models.length>0)}function Gk(e){return e.map(e=>{let t=Hk(e.models),n={};for(let t of e.params||[])t.path?.trim()&&(n[t.path.trim()]=t.value);return{models:t,params:n}}).filter(e=>e.models.length>0)}function Kk(){let e=yk(QO);return{visualValues:e,baselineValues:yk(e),dirtyFields:new Set,visualParseError:null}}function qk(e,t){let n={...e,...t};return t.streaming&&(n.streaming={...e.streaming,...t.streaming}),n}function Jk(e,t,n,r){let i=new Set(e),a=(e,t)=>{t?i.delete(e):i.add(e)};if(`rmDisableAutoUpdatePanel.errorLogsMaxFiles.usageStatisticsEnabled.redisUsageQueueRetentionSeconds.pluginsEnabled.passthroughHeaders.disableCooling.disableImageGeneration.gptImage2BaseModel.authAutoRefreshWorkers.antigravitySignatureCacheEnabled.antigravitySignatureBypassStrict.claudeHeaderUserAgent.claudeHeaderPackageVersion.claudeHeaderRuntimeVersion.claudeHeaderOs.claudeHeaderArch.claudeHeaderTimeout.claudeHeaderStabilizeDeviceProfile.codexHeaderUserAgent.codexHeaderBetaFeatures.codexIdentityConfuse.host.port.tlsEnable.tlsCert.tlsKey.rmAllowRemote.rmSecretKey.rmDisableControlPanel.rmPanelRepo.authDir.apiKeysText.debug.commercialMode.loggingToFile.logsMaxTotalSizeMb.proxyUrl.forceModelPrefix.requestRetry.maxRetryCredentials.maxRetryInterval.wsAuth.quotaSwitchProject.quotaSwitchPreviewModel.quotaAntigravityCredits.routingStrategy.routingSessionAffinity.routingSessionAffinityTTL`.split(`.`).forEach(e=>{Object.prototype.hasOwnProperty.call(t,e)&&a(e,n[e]===r[e])}),Object.prototype.hasOwnProperty.call(t,`pluginStoreSources`)&&a(`pluginStoreSources`,Ck(n.pluginStoreSources,r.pluginStoreSources)),Object.prototype.hasOwnProperty.call(t,`payloadDefaultRules`)&&a(`payloadDefaultRules`,wk(n.payloadDefaultRules,r.payloadDefaultRules)),Object.prototype.hasOwnProperty.call(t,`payloadDefaultRawRules`)&&a(`payloadDefaultRawRules`,wk(n.payloadDefaultRawRules,r.payloadDefaultRawRules)),Object.prototype.hasOwnProperty.call(t,`payloadOverrideRules`)&&a(`payloadOverrideRules`,wk(n.payloadOverrideRules,r.payloadOverrideRules)),Object.prototype.hasOwnProperty.call(t,`payloadOverrideRawRules`)&&a(`payloadOverrideRawRules`,wk(n.payloadOverrideRawRules,r.payloadOverrideRawRules)),Object.prototype.hasOwnProperty.call(t,`payloadFilterRules`)&&a(`payloadFilterRules`,Tk(n.payloadFilterRules,r.payloadFilterRules)),t.streaming){let e=t.streaming;Object.prototype.hasOwnProperty.call(e,`keepaliveSeconds`)&&a(`streaming.keepaliveSeconds`,n.streaming.keepaliveSeconds===r.streaming.keepaliveSeconds),Object.prototype.hasOwnProperty.call(e,`bootstrapRetries`)&&a(`streaming.bootstrapRetries`,n.streaming.bootstrapRetries===r.streaming.bootstrapRetries),Object.prototype.hasOwnProperty.call(e,`nonstreamKeepaliveInterval`)&&a(`streaming.nonstreamKeepaliveInterval`,n.streaming.nonstreamKeepaliveInterval===r.streaming.nonstreamKeepaliveInterval)}return i}function Yk(e,t){switch(t.type){case`load_success`:return{visualValues:t.values,baselineValues:yk(t.values),dirtyFields:new Set,visualParseError:null};case`load_error`:return{...e,visualParseError:t.error};case`set_values`:{let n=qk(e.visualValues,t.values),r=Jk(e.dirtyFields,t.values,n,e.baselineValues);return{...e,visualValues:n,dirtyFields:r}}default:return e}}function Xk(){let[e,t]=(0,y.useReducer)(Yk,void 0,Kk),{visualValues:n,visualParseError:r,dirtyFields:i}=e;return{visualValues:n,visualDirty:i.size>0,visualParseError:r,visualValidationErrors:(0,y.useMemo)(()=>gk(n),[n]),visualHasPayloadValidationErrors:(0,y.useMemo)(()=>vk(n.payloadDefaultRules)||vk(n.payloadDefaultRawRules)||vk(n.payloadOverrideRules)||vk(n.payloadOverrideRawRules),[n.payloadDefaultRules,n.payloadDefaultRawRules,n.payloadOverrideRules,n.payloadOverrideRawRules]),loadVisualValuesFromYaml:(0,y.useCallback)(e=>{try{let n=KO(e);if(n.errors.length>0)throw Error(n.errors[0]?.message??`Invalid YAML`);let r=$O(qO(e)||{})??{},i=$O(r.tls),a=$O(r[`remote-management`]),o=$O(r[`quota-exceeded`]),s=$O(r.routing),c=$O(r.payload),l=$O(r.streaming),u=$O(r.plugins),d=$O(r.codex),f=$O(r[`claude-header-defaults`]),p=$O(r[`codex-header-defaults`]);return t({type:`load_success`,values:{host:typeof r.host==`string`?r.host:``,port:String(r.port??``),tlsEnable:!!i?.enable,tlsCert:typeof i?.cert==`string`?i.cert:``,tlsKey:typeof i?.key==`string`?i.key:``,rmAllowRemote:!!a?.[`allow-remote`],rmSecretKey:typeof a?.[`secret-key`]==`string`?a[`secret-key`]:``,rmDisableControlPanel:!!a?.[`disable-control-panel`],rmDisableAutoUpdatePanel:!!a?.[`disable-auto-update-panel`],rmPanelRepo:typeof a?.[`panel-github-repository`]==`string`?a[`panel-github-repository`]:typeof a?.[`panel-repo`]==`string`?a[`panel-repo`]:``,authDir:typeof r[`auth-dir`]==`string`?r[`auth-dir`]:``,apiKeysText:nk(r),pluginsEnabled:!!u?.enabled,pluginStoreSources:Mk(u?.[`store-sources`]),debug:!!r.debug,commercialMode:!!r[`commercial-mode`],loggingToFile:!!r[`logging-to-file`],logsMaxTotalSizeMb:String(r[`logs-max-total-size-mb`]??``),errorLogsMaxFiles:String(r[`error-logs-max-files`]??``),usageStatisticsEnabled:!!r[`usage-statistics-enabled`],redisUsageQueueRetentionSeconds:String(r[`redis-usage-queue-retention-seconds`]??``),proxyUrl:typeof r[`proxy-url`]==`string`?r[`proxy-url`]:``,forceModelPrefix:!!r[`force-model-prefix`],passthroughHeaders:!!r[`passthrough-headers`],requestRetry:String(r[`request-retry`]??``),maxRetryCredentials:String(r[`max-retry-credentials`]??``),maxRetryInterval:String(r[`max-retry-interval`]??``),disableCooling:!!r[`disable-cooling`],disableImageGeneration:kk(r[`disable-image-generation`]),gptImage2BaseModel:typeof r[`gpt-image-2-base-model`]==`string`?r[`gpt-image-2-base-model`]:``,authAutoRefreshWorkers:String(r[`auth-auto-refresh-workers`]??``),wsAuth:!!r[`ws-auth`],antigravitySignatureCacheEnabled:!!(r[`antigravity-signature-cache-enabled`]??!0),antigravitySignatureBypassStrict:!!r[`antigravity-signature-bypass-strict`],claudeHeaderUserAgent:typeof f?.[`user-agent`]==`string`?f[`user-agent`]:``,claudeHeaderPackageVersion:typeof f?.[`package-version`]==`string`?f[`package-version`]:``,claudeHeaderRuntimeVersion:typeof f?.[`runtime-version`]==`string`?f[`runtime-version`]:``,claudeHeaderOs:typeof f?.os==`string`?f.os:``,claudeHeaderArch:typeof f?.arch==`string`?f.arch:``,claudeHeaderTimeout:typeof f?.timeout==`string`?f.timeout:``,claudeHeaderStabilizeDeviceProfile:!!f?.[`stabilize-device-profile`],codexHeaderUserAgent:typeof p?.[`user-agent`]==`string`?p[`user-agent`]:``,codexHeaderBetaFeatures:typeof p?.[`beta-features`]==`string`?p[`beta-features`]:``,codexIdentityConfuse:!!d?.[`identity-confuse`],quotaSwitchProject:!!(o?.[`switch-project`]??!0),quotaSwitchPreviewModel:!!(o?.[`switch-preview-model`]??!0),quotaAntigravityCredits:!!(o?.[`antigravity-credits`]??!1),routingStrategy:s?.strategy===`fill-first`?`fill-first`:`round-robin`,routingSessionAffinity:!!(s?.[`session-affinity`]??s?.sessionAffinity??s?.sessionAffinity),routingSessionAffinityTTL:typeof s?.[`session-affinity-ttl`]==`string`?s[`session-affinity-ttl`]:typeof s?.sessionAffinityTTL==`string`||typeof s?.sessionAffinityTTL==`string`?s.sessionAffinityTTL:``,payloadDefaultRules:Fk(c?.default),payloadDefaultRawRules:Lk(c?.[`default-raw`]),payloadOverrideRules:Fk(c?.override),payloadOverrideRawRules:Lk(c?.[`override-raw`]),payloadFilterRules:Ik(c?.filter),streaming:{keepaliveSeconds:String(l?.[`keepalive-seconds`]??``),bootstrapRetries:String(l?.[`bootstrap-retries`]??``),nonstreamKeepaliveInterval:String(r[`nonstream-keepalive-interval`]??``)}}}),{ok:!0}}catch(e){let n=e instanceof Error?e.message:`Invalid YAML`;return t({type:`load_error`,error:n}),{ok:!1,error:n}}},[]),applyVisualChangesToYaml:(0,y.useCallback)(e=>{try{let t=KO(e);if(t.errors.length>0)return e;fT(t.contents)||(t.contents=t.createNode({}));let r=n;ck(t,[`host`],r.host),uk(t,[`port`],r.port),(rk(t,[`tls`])||r.tlsEnable||r.tlsCert.trim()||r.tlsKey.trim())&&(ik(t,[`tls`]),ok(t,[`tls`,`enable`],r.tlsEnable),ck(t,[`tls`,`cert`],r.tlsCert),ck(t,[`tls`,`key`],r.tlsKey),ak(t,[`tls`])),(rk(t,[`remote-management`])||r.rmAllowRemote||r.rmSecretKey.trim()||r.rmDisableControlPanel||r.rmDisableAutoUpdatePanel||r.rmPanelRepo.trim())&&(ik(t,[`remote-management`]),ok(t,[`remote-management`,`allow-remote`],r.rmAllowRemote),ck(t,[`remote-management`,`secret-key`],r.rmSecretKey),ok(t,[`remote-management`,`disable-control-panel`],r.rmDisableControlPanel),ok(t,[`remote-management`,`disable-auto-update-panel`],r.rmDisableAutoUpdatePanel),ck(t,[`remote-management`,`panel-github-repository`],r.rmPanelRepo),rk(t,[`remote-management`,`panel-repo`])&&t.deleteIn([`remote-management`,`panel-repo`]),ak(t,[`remote-management`])),ck(t,[`auth-dir`],r.authDir);let a=r.apiKeysText.split(`
|
||
`).map(e=>e.trim()).filter(Boolean);if(a.length>0?t.setIn([`api-keys`],a):rk(t,[`api-keys`])&&t.deleteIn([`api-keys`]),Nk(t),(rk(t,[`plugins`])||r.pluginsEnabled||r.pluginStoreSources.length>0||sk(t,[`plugins`,`enabled`],i,`pluginsEnabled`)||sk(t,[`plugins`,`store-sources`],i,`pluginStoreSources`))&&(ik(t,[`plugins`]),ok(t,[`plugins`,`enabled`],r.pluginsEnabled),(r.pluginStoreSources.length>0||sk(t,[`plugins`,`store-sources`],i,`pluginStoreSources`))&&lk(t,[`plugins`,`store-sources`],r.pluginStoreSources),ak(t,[`plugins`])),ok(t,[`debug`],r.debug),ok(t,[`commercial-mode`],r.commercialMode),ok(t,[`logging-to-file`],r.loggingToFile),uk(t,[`logs-max-total-size-mb`],r.logsMaxTotalSizeMb),uk(t,[`error-logs-max-files`],r.errorLogsMaxFiles),ok(t,[`usage-statistics-enabled`],r.usageStatisticsEnabled),uk(t,[`redis-usage-queue-retention-seconds`],r.redisUsageQueueRetentionSeconds),ck(t,[`proxy-url`],r.proxyUrl),ok(t,[`force-model-prefix`],r.forceModelPrefix),ok(t,[`passthrough-headers`],r.passthroughHeaders),uk(t,[`request-retry`],r.requestRetry),uk(t,[`max-retry-credentials`],r.maxRetryCredentials),uk(t,[`max-retry-interval`],r.maxRetryInterval),ok(t,[`disable-cooling`],r.disableCooling),dk(t,[`disable-image-generation`],r.disableImageGeneration),(r.gptImage2BaseModel.trim()||sk(t,[`gpt-image-2-base-model`],i,`gptImage2BaseModel`))&&ck(t,[`gpt-image-2-base-model`],r.gptImage2BaseModel),uk(t,[`auth-auto-refresh-workers`],r.authAutoRefreshWorkers),ok(t,[`ws-auth`],r.wsAuth),(rk(t,[`antigravity-signature-cache-enabled`])||!r.antigravitySignatureCacheEnabled)&&t.setIn([`antigravity-signature-cache-enabled`],r.antigravitySignatureCacheEnabled),ok(t,[`antigravity-signature-bypass-strict`],r.antigravitySignatureBypassStrict),(rk(t,[`claude-header-defaults`])||r.claudeHeaderUserAgent.trim()||r.claudeHeaderPackageVersion.trim()||r.claudeHeaderRuntimeVersion.trim()||r.claudeHeaderOs.trim()||r.claudeHeaderArch.trim()||r.claudeHeaderTimeout.trim()||r.claudeHeaderStabilizeDeviceProfile)&&(ik(t,[`claude-header-defaults`]),ck(t,[`claude-header-defaults`,`user-agent`],r.claudeHeaderUserAgent),ck(t,[`claude-header-defaults`,`package-version`],r.claudeHeaderPackageVersion),ck(t,[`claude-header-defaults`,`runtime-version`],r.claudeHeaderRuntimeVersion),ck(t,[`claude-header-defaults`,`os`],r.claudeHeaderOs),ck(t,[`claude-header-defaults`,`arch`],r.claudeHeaderArch),ck(t,[`claude-header-defaults`,`timeout`],r.claudeHeaderTimeout),ok(t,[`claude-header-defaults`,`stabilize-device-profile`],r.claudeHeaderStabilizeDeviceProfile),ak(t,[`claude-header-defaults`])),(rk(t,[`codex-header-defaults`])||r.codexHeaderUserAgent.trim()||r.codexHeaderBetaFeatures.trim())&&(ik(t,[`codex-header-defaults`]),ck(t,[`codex-header-defaults`,`user-agent`],r.codexHeaderUserAgent),ck(t,[`codex-header-defaults`,`beta-features`],r.codexHeaderBetaFeatures),ak(t,[`codex-header-defaults`])),(rk(t,[`codex`])||r.codexIdentityConfuse||sk(t,[`codex`,`identity-confuse`],i,`codexIdentityConfuse`))&&(ik(t,[`codex`]),ok(t,[`codex`,`identity-confuse`],r.codexIdentityConfuse),ak(t,[`codex`])),rk(t,[`quota-exceeded`])||!r.quotaSwitchProject||!r.quotaSwitchPreviewModel||sk(t,[`quota-exceeded`,`antigravity-credits`],i,`quotaAntigravityCredits`)){ik(t,[`quota-exceeded`]);let e=sk(t,[`quota-exceeded`,`antigravity-credits`],i,`quotaAntigravityCredits`);t.setIn([`quota-exceeded`,`switch-project`],r.quotaSwitchProject),t.setIn([`quota-exceeded`,`switch-preview-model`],r.quotaSwitchPreviewModel),e&&t.setIn([`quota-exceeded`,`antigravity-credits`],r.quotaAntigravityCredits),ak(t,[`quota-exceeded`])}(rk(t,[`routing`])||r.routingStrategy!==`round-robin`||r.routingSessionAffinity||r.routingSessionAffinityTTL.trim())&&(ik(t,[`routing`]),t.setIn([`routing`,`strategy`],r.routingStrategy),ok(t,[`routing`,`session-affinity`],r.routingSessionAffinity),ck(t,[`routing`,`session-affinity-ttl`],r.routingSessionAffinityTTL),ak(t,[`routing`]));let o=typeof r.streaming?.keepaliveSeconds==`string`?r.streaming.keepaliveSeconds:``,s=typeof r.streaming?.bootstrapRetries==`string`?r.streaming.bootstrapRetries:``,c=typeof r.streaming?.nonstreamKeepaliveInterval==`string`?r.streaming.nonstreamKeepaliveInterval:``;return(rk(t,[`streaming`])||o.trim()||s.trim())&&(ik(t,[`streaming`]),uk(t,[`streaming`,`keepalive-seconds`],o),uk(t,[`streaming`,`bootstrap-retries`],s),ak(t,[`streaming`])),uk(t,[`nonstream-keepalive-interval`],c),pk(i)&&(ik(t,[`payload`]),r.payloadDefaultRules.length>0?t.setIn([`payload`,`default`],Uk(r.payloadDefaultRules)):rk(t,[`payload`,`default`])&&t.deleteIn([`payload`,`default`]),r.payloadDefaultRawRules.length>0?t.setIn([`payload`,`default-raw`],Gk(r.payloadDefaultRawRules)):rk(t,[`payload`,`default-raw`])&&t.deleteIn([`payload`,`default-raw`]),r.payloadOverrideRules.length>0?t.setIn([`payload`,`override`],Uk(r.payloadOverrideRules)):rk(t,[`payload`,`override`])&&t.deleteIn([`payload`,`override`]),r.payloadOverrideRawRules.length>0?t.setIn([`payload`,`override-raw`],Gk(r.payloadOverrideRawRules)):rk(t,[`payload`,`override-raw`])&&t.deleteIn([`payload`,`override-raw`]),r.payloadFilterRules.length>0?t.setIn([`payload`,`filter`],Wk(r.payloadFilterRules)):rk(t,[`payload`,`filter`])&&t.deleteIn([`payload`,`filter`]),ak(t,[`payload`])),t.toString({indent:2,lineWidth:120,minContentWidth:0})}catch{return e}},[i,n]),setVisualValues:(0,y.useCallback)(e=>{t({type:`set_values`,values:e})},[])}}var Zk=[{value:``,labelKey:`config_management.visual.payload_rules.provider_default`,defaultLabel:`Default`},{value:`openai`,labelKey:`config_management.visual.payload_rules.provider_openai`,defaultLabel:`OpenAI`},{value:`openai-response`,labelKey:`config_management.visual.payload_rules.provider_openai_response`,defaultLabel:`OpenAI Response`},{value:`gemini`,labelKey:`config_management.visual.payload_rules.provider_gemini`,defaultLabel:`Gemini`},{value:`claude`,labelKey:`config_management.visual.payload_rules.provider_claude`,defaultLabel:`Claude`},{value:`codex`,labelKey:`config_management.visual.payload_rules.provider_codex`,defaultLabel:`Codex`},{value:`antigravity`,labelKey:`config_management.visual.payload_rules.provider_antigravity`,defaultLabel:`Antigravity`}],Qk=[{value:`string`,labelKey:`config_management.visual.payload_rules.value_type_string`,defaultLabel:`String`},{value:`number`,labelKey:`config_management.visual.payload_rules.value_type_number`,defaultLabel:`Number`},{value:`boolean`,labelKey:`config_management.visual.payload_rules.value_type_boolean`,defaultLabel:`Boolean`},{value:`json`,labelKey:`config_management.visual.payload_rules.value_type_json`,defaultLabel:`JSON`}];function $k(e){return e?/^[\x21-\x7E]+$/.test(e):!1}var eA=30;function tA({value:e,placeholder:t,ariaLabel:n,disabled:r,className:i,onChange:a}){let{t:o}=Xo(),[s,c]=(0,y.useState)(!0),l=(0,y.useRef)(null),u=(0,y.useCallback)(e=>{e.style.height=`auto`,e.style.height=`${e.scrollHeight}px`},[]);return(0,y.useLayoutEffect)(()=>{!s&&l.current&&u(l.current)},[s,e,u]),s?(0,I.jsxs)(`div`,{className:G.expandableInputWrapper,children:[(0,I.jsx)(`input`,{className:`input ${i??``}`,placeholder:t,"aria-label":n,value:e,onChange:e=>a(e.target.value.replace(/[\r\n]/g,``)),disabled:r}),e.length>eA&&(0,I.jsx)(`button`,{type:`button`,className:G.expandableToggle,disabled:r,onClick:()=>{c(!1),requestAnimationFrame(()=>{l.current?.focus()})},title:o(`common.expand`),"aria-label":o(`common.expand`),children:`▼`})]}):(0,I.jsxs)(`div`,{className:`${G.expandableInputWrapper} ${G.expandableInputExpanded}`,children:[(0,I.jsx)(`textarea`,{ref:l,className:`input ${G.expandableTextarea} ${i??``}`,placeholder:t,"aria-label":n,value:e,onChange:e=>{a(e.target.value.replace(/[\r\n]/g,``))},disabled:r,rows:2}),(0,I.jsx)(`button`,{type:`button`,className:G.expandableToggle,disabled:r,onClick:()=>c(!0),title:o(`common.collapse`),"aria-label":o(`common.collapse`),children:`▲`})]})}function nA(e,t){if(t)return e(`config_management.visual.validation.${t}`)}function rA(e,t){let n=Zk.map(t=>({value:t.value,label:e(t.labelKey,{defaultValue:t.defaultLabel})})),r=new Set(n.map(e=>e.value));for(let e of t)for(let t of e.models){let e=t.protocol;!e||!e.trim()||r.has(e)||(r.add(e),n.push({value:e,label:e}))}return n}var iA=(0,y.memo)(function({value:e,disabled:t,onChange:n}){let{t:r}=Xo(),i=Fc(e=>e.showNotification),a=(0,y.useMemo)(()=>e.split(`
|
||
`).map(e=>e.trim()).filter(Boolean),[e]),[o,s]=(0,y.useState)(()=>a.map(()=>ZO())),c=(0,y.useMemo)(()=>o.length===a.length?o:o.length>a.length?o.slice(0,a.length):[...o,...Array.from({length:a.length-o.length},()=>ZO())],[o,a.length]),l=(0,y.useId)(),u=`${l}-hint`,d=`${l}-error`,[f,p]=(0,y.useState)(!1),[m,h]=(0,y.useState)(null),[g,_]=(0,y.useState)(``),[v,b]=(0,y.useState)(``);function x(){let e=new Uint8Array(17);return crypto.getRandomValues(e),`sk-`+Array.from(e,e=>`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`[e%62]).join(``)}let S=()=>{h(null),_(``),b(``),p(!0)},C=e=>{let t=c.findIndex(t=>t===e);h(e),_(a[t]??``),b(``),p(!0)},w=()=>{p(!1),_(``),h(null),b(``)},T=e=>{n(e.join(`
|
||
`))},E=e=>{let t=c.findIndex(t=>t===e);t<0||(s(c.filter(t=>t!==e)),T(a.filter((e,n)=>n!==t)))},D=()=>{let e=g.trim();if(!e){b(r(`config_management.visual.api_keys.error_empty`));return}if(!$k(e)){b(r(`config_management.visual.api_keys.error_invalid`));return}let t=m?c.findIndex(e=>e===m):-1,n=m===null?[...a,e]:a.map((n,r)=>r===t?e:n);m===null&&s([...c,ZO()]),T(n),w()},O=async e=>{let t=await Zb(e);i(r(t?`notification.link_copied`:`notification.copy_failed`),t?`success`:`error`)};return(0,I.jsxs)(`div`,{className:`form-group`,style:{marginBottom:0},children:[(0,I.jsxs)(`div`,{className:G.blockHeaderRow,children:[(0,I.jsx)(`label`,{style:{margin:0},children:r(`config_management.visual.api_keys.label`)}),(0,I.jsx)(L,{size:`sm`,onClick:S,disabled:t,children:r(`config_management.visual.api_keys.add`)})]}),a.length===0?(0,I.jsx)(`div`,{className:G.emptyState,children:r(`config_management.visual.api_keys.empty`)}):(0,I.jsx)(`div`,{className:`item-list`,style:{marginTop:4},children:a.map((e,n)=>(0,I.jsxs)(`div`,{className:`item-row`,children:[(0,I.jsxs)(`div`,{className:`item-meta`,children:[(0,I.jsxs)(`div`,{className:`pill`,children:[`#`,n+1]}),(0,I.jsx)(`div`,{className:`item-title`,children:r(`config_management.visual.api_keys.input_label`)}),(0,I.jsx)(`div`,{className:`item-subtitle`,children:q_(String(e||``))})]}),(0,I.jsxs)(`div`,{className:`item-actions`,children:[(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:()=>O(e),disabled:t,children:r(`common.copy`)}),(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:()=>C(c[n]??``),disabled:t,children:r(`config_management.visual.common.edit`)}),(0,I.jsx)(L,{variant:`danger`,size:`sm`,onClick:()=>E(c[n]??``),disabled:t,children:r(`config_management.visual.common.delete`)})]})]},c[n]??`${e}-${n}`))}),(0,I.jsx)(`div`,{className:`hint`,children:r(`config_management.visual.api_keys.hint`)}),(0,I.jsx)(Ap,{open:f,onClose:w,title:r(m===null?`config_management.visual.api_keys.add_title`:`config_management.visual.api_keys.edit_title`),footer:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(L,{variant:`secondary`,onClick:w,disabled:t,children:r(`config_management.visual.common.cancel`)}),(0,I.jsx)(L,{onClick:D,disabled:t,children:r(m===null?`config_management.visual.common.add`:`config_management.visual.common.update`)})]}),children:(0,I.jsxs)(`div`,{className:`form-group`,children:[(0,I.jsx)(`label`,{htmlFor:l,children:r(`config_management.visual.api_keys.input_label`)}),(0,I.jsxs)(`div`,{className:G.apiKeyModalInputRow,children:[(0,I.jsx)(`input`,{id:l,className:`input`,placeholder:r(`config_management.visual.api_keys.input_placeholder`),value:g,onChange:e=>_(e.target.value),disabled:t,"aria-describedby":v?`${d} ${u}`:u,"aria-invalid":!!v}),(0,I.jsx)(L,{type:`button`,variant:`secondary`,size:`sm`,onClick:()=>{_(x()),b(``)},disabled:t,children:r(`config_management.visual.api_keys.generate`)})]}),(0,I.jsx)(`div`,{id:u,className:`hint`,children:r(`config_management.visual.api_keys.input_hint`)}),v&&(0,I.jsx)(`div`,{id:d,className:`error-box`,children:v})]})})]})}),aA=(0,y.memo)(function({value:e,disabled:t,placeholder:n,inputAriaLabel:r,onChange:i}){let{t:a}=Xo(),o=e.length?e:[],[s,c]=(0,y.useState)(()=>o.map(()=>ZO())),l=(0,y.useMemo)(()=>s.length===o.length?s:s.length>o.length?s.slice(0,o.length):[...s,...Array.from({length:o.length-s.length},()=>ZO())],[s,o.length]),u=(e,t)=>i(o.map((n,r)=>r===e?t:n)),d=()=>{c([...l,ZO()]),i([...o,``])},f=e=>{c(l.filter((t,n)=>n!==e)),i(o.filter((t,n)=>n!==e))};return(0,I.jsxs)(`div`,{className:G.stringList,children:[o.map((e,i)=>(0,I.jsxs)(`div`,{className:G.stringListRow,children:[(0,I.jsx)(tA,{placeholder:n,ariaLabel:r??n,value:e,onChange:e=>u(i,e),disabled:t}),(0,I.jsx)(L,{variant:`ghost`,size:`sm`,onClick:()=>f(i),disabled:t,children:a(`config_management.visual.common.delete`)})]},l[i]??`item-${i}`)),(0,I.jsx)(`div`,{className:G.actionRow,children:(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:d,disabled:t,children:a(`config_management.visual.common.add`)})})]})});function oA(e){return!!(e.fromProtocol||(e.headers?.length??0)>0||(e.match?.length??0)>0||(e.notMatch?.length??0)>0||(e.exist?.length??0)>0||(e.notExist?.length??0)>0)}var sA=(0,y.memo)(function({value:e,disabled:t,protocolFirst:n=!1,rawJsonValues:r=!1,onChange:i}){let{t:a}=Xo(),o=e,s=(0,y.useMemo)(()=>rA(a,o),[o,a]),c=(0,y.useMemo)(()=>[{value:``,label:a(`config_management.visual.payload_rules.provider_default`)},{value:`openai`,label:a(`config_management.visual.payload_rules.provider_openai`)},{value:`responses`,label:a(`config_management.visual.payload_rules.provider_responses`)},{value:`gemini`,label:a(`config_management.visual.payload_rules.provider_gemini`)},{value:`claude`,label:a(`config_management.visual.payload_rules.provider_claude`)}],[a]),l=(0,y.useMemo)(()=>Qk.map(e=>({value:e.value,label:a(e.labelKey,{defaultValue:e.defaultLabel})})),[a]),u=(0,y.useMemo)(()=>[{value:`true`,label:a(`config_management.visual.payload_rules.boolean_true`)},{value:`false`,label:a(`config_management.visual.payload_rules.boolean_false`)}],[a]),[d,f]=(0,y.useState)({}),p=()=>i([...o,{id:ZO(),models:[],params:[]}]),m=e=>i(o.filter((t,n)=>n!==e)),h=(e,t)=>i(o.map((n,r)=>r===e?{...n,...t}:n)),g=e=>{let t=o[e],n={id:ZO(),name:``,protocol:void 0};h(e,{models:[...t.models,n]})},_=(e,t)=>{let n=o[e];h(e,{models:n.models.filter((e,n)=>n!==t)})},v=(e,t,n)=>{let r=o[e];h(e,{models:r.models.map((e,r)=>r===t?{...e,...n}:e)})},b=(e,t)=>{f(n=>({...n,[e]:!(n[e]??t)}))},x=(e,t)=>{let n=o[e].models[t];v(e,t,{headers:[...n.headers??[],{id:ZO(),name:``,value:``}]})},S=(e,t,n,r)=>{let i=o[e].models[t];v(e,t,{headers:(i.headers??[]).map((e,t)=>t===n?{...e,...r}:e)})},C=(e,t,n)=>{let r=o[e].models[t];v(e,t,{headers:(r.headers??[]).filter((e,t)=>t!==n)})},w=(e,t,n)=>{let r=o[e].models[t];v(e,t,{[n]:[...r[n]??[],{id:ZO(),path:``,valueType:`string`,value:``}]})},T=(e,t,n,r,i)=>{let a=o[e].models[t];v(e,t,{[n]:(a[n]??[]).map((e,t)=>t===r?{...e,...i}:e)})},E=(e,t,n,r)=>{let i=o[e].models[t];v(e,t,{[n]:(i[n]??[]).filter((e,t)=>t!==r)})},D=e=>{let t=o[e],n={id:ZO(),path:``,valueType:r?`json`:`string`,value:``};h(e,{params:[...t.params,n]})},O=(e,t)=>{let n=o[e];h(e,{params:n.params.filter((e,n)=>n!==t)})},k=(e,t,n)=>{let r=o[e];h(e,{params:r.params.map((e,r)=>r===t?{...e,...n}:e)})},A=e=>{switch(e){case`string`:return a(`config_management.visual.payload_rules.value_string`);case`number`:return a(`config_management.visual.payload_rules.value_number`);case`boolean`:return a(`config_management.visual.payload_rules.value_boolean`);case`json`:return a(`config_management.visual.payload_rules.value_json`);default:return a(`config_management.visual.payload_rules.value_default`)}},ee=e=>nA(a,_k(r?{...e,valueType:`json`}:e)),j=(e,n,r,i,o)=>o.valueType===`boolean`?(0,I.jsx)(nc,{value:o.value.toLowerCase()===`true`||o.value.toLowerCase()===`false`?o.value.toLowerCase():``,options:u,placeholder:a(`config_management.visual.payload_rules.value_boolean`),disabled:t,ariaLabel:a(`config_management.visual.payload_rules.condition_value`),onChange:t=>T(e,n,r,i,{value:t})}):o.valueType===`json`?(0,I.jsx)(`textarea`,{className:`input ${G.payloadJsonInput}`,placeholder:A(o.valueType),"aria-label":a(`config_management.visual.payload_rules.condition_value`),value:o.value,onChange:t=>T(e,n,r,i,{value:t.target.value}),disabled:t}):(0,I.jsx)(tA,{placeholder:A(o.valueType),ariaLabel:a(`config_management.visual.payload_rules.condition_value`),value:o.value,onChange:t=>T(e,n,r,i,{value:t}),disabled:t}),M=(e,n,i)=>r?(0,I.jsx)(`textarea`,{className:`input ${G.payloadJsonInput}`,placeholder:a(`config_management.visual.payload_rules.value_raw_json`),"aria-label":a(`config_management.visual.payload_rules.param_value`),value:i.value,onChange:t=>k(e,n,{value:t.target.value,valueType:`json`}),disabled:t}):i.valueType===`boolean`?(0,I.jsx)(nc,{value:i.value.toLowerCase()===`true`||i.value.toLowerCase()===`false`?i.value.toLowerCase():``,options:u,placeholder:a(`config_management.visual.payload_rules.value_boolean`),disabled:t,ariaLabel:a(`config_management.visual.payload_rules.param_value`),onChange:t=>k(e,n,{value:t})}):i.valueType===`json`?(0,I.jsx)(`textarea`,{className:`input ${G.payloadJsonInput}`,placeholder:A(i.valueType),"aria-label":a(`config_management.visual.payload_rules.param_value`),value:i.value,onChange:t=>k(e,n,{value:t.target.value}),disabled:t}):(0,I.jsx)(tA,{placeholder:A(i.valueType),ariaLabel:a(`config_management.visual.payload_rules.param_value`),value:i.value,onChange:t=>k(e,n,{value:t}),disabled:t});return(0,I.jsxs)(`div`,{className:G.blockStack,children:[o.map((e,i)=>(0,I.jsxs)(`div`,{className:G.ruleCard,children:[(0,I.jsxs)(`div`,{className:G.ruleCardHeader,children:[(0,I.jsxs)(`div`,{className:G.ruleCardTitle,children:[a(`config_management.visual.payload_rules.rule`),` `,i+1]}),(0,I.jsx)(L,{variant:`ghost`,size:`sm`,onClick:()=>m(i),disabled:t,children:a(`config_management.visual.common.delete`)})]}),(0,I.jsxs)(`div`,{className:G.blockStack,children:[(0,I.jsx)(`div`,{className:G.blockLabel,children:a(`config_management.visual.payload_rules.models`)}),(e.models.length?e.models:[]).map((e,r)=>{let o=oA(e),u=d[e.id]??o;return(0,I.jsxs)(`div`,{className:G.payloadModelGroup,children:[(0,I.jsxs)(`div`,{className:[G.payloadRuleModelRow,n?G.payloadRuleModelRowProtocolFirst:``].filter(Boolean).join(` `),children:[n?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(nc,{value:e.protocol??``,options:s,disabled:t,ariaLabel:a(`config_management.visual.payload_rules.provider_type`),onChange:e=>v(i,r,{protocol:e||void 0})}),(0,I.jsx)(tA,{placeholder:a(`config_management.visual.payload_rules.model_name`),ariaLabel:a(`config_management.visual.payload_rules.model_name`),value:e.name,onChange:e=>v(i,r,{name:e}),disabled:t})]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(tA,{placeholder:a(`config_management.visual.payload_rules.model_name`),ariaLabel:a(`config_management.visual.payload_rules.model_name`),value:e.name,onChange:e=>v(i,r,{name:e}),disabled:t}),(0,I.jsx)(nc,{value:e.protocol??``,options:s,disabled:t,ariaLabel:a(`config_management.visual.payload_rules.provider_type`),onChange:e=>v(i,r,{protocol:e||void 0})})]}),(0,I.jsx)(L,{variant:`secondary`,size:`sm`,className:G.payloadRowActionButton,onClick:()=>b(e.id,o),disabled:t,children:a(u?`config_management.visual.payload_rules.hide_advanced`:`config_management.visual.payload_rules.advanced`)}),(0,I.jsx)(L,{variant:`ghost`,size:`sm`,className:G.payloadRowActionButton,onClick:()=>_(i,r),disabled:t,children:a(`config_management.visual.common.delete`)})]}),u?(0,I.jsxs)(`div`,{className:G.payloadModelAdvanced,children:[(0,I.jsx)(`div`,{className:G.payloadAdvancedGrid,children:(0,I.jsxs)(`div`,{className:G.fieldShell,children:[(0,I.jsx)(`label`,{className:G.fieldLabel,children:a(`config_management.visual.payload_rules.from_protocol`)}),(0,I.jsx)(nc,{value:e.fromProtocol??``,options:c,disabled:t,ariaLabel:a(`config_management.visual.payload_rules.from_protocol`),onChange:e=>v(i,r,{fromProtocol:e||void 0})})]})}),(0,I.jsxs)(`div`,{className:G.blockStack,children:[(0,I.jsx)(`div`,{className:G.blockLabel,children:a(`config_management.visual.payload_rules.headers`)}),(e.headers??[]).map((e,n)=>(0,I.jsxs)(`div`,{className:G.payloadHeaderRow,children:[(0,I.jsx)(tA,{placeholder:a(`config_management.visual.payload_rules.header_name`),ariaLabel:a(`config_management.visual.payload_rules.header_name`),value:e.name,onChange:e=>S(i,r,n,{name:e}),disabled:t}),(0,I.jsx)(tA,{placeholder:a(`config_management.visual.payload_rules.header_value`),ariaLabel:a(`config_management.visual.payload_rules.header_value`),value:e.value,onChange:e=>S(i,r,n,{value:e}),disabled:t}),(0,I.jsx)(L,{variant:`ghost`,size:`sm`,className:G.payloadRowActionButton,onClick:()=>C(i,r,n),disabled:t,children:a(`config_management.visual.common.delete`)})]},e.id)),(0,I.jsx)(`div`,{className:G.actionRow,children:(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:()=>x(i,r),disabled:t,children:a(`config_management.visual.payload_rules.add_header`)})})]}),[`match`,`notMatch`].map(n=>(0,I.jsxs)(`div`,{className:G.blockStack,children:[(0,I.jsx)(`div`,{className:G.blockLabel,children:a(`config_management.visual.payload_rules.${n}`)}),(e[n]??[]).map((e,o)=>{let s=nA(a,_k(e));return(0,I.jsxs)(`div`,{className:G.payloadRuleParamGroup,children:[(0,I.jsxs)(`div`,{className:G.payloadRuleParamRow,children:[(0,I.jsx)(tA,{placeholder:a(`config_management.visual.payload_rules.condition_path`),ariaLabel:a(`config_management.visual.payload_rules.condition_path`),value:e.path,onChange:e=>T(i,r,n,o,{path:e}),disabled:t}),(0,I.jsx)(nc,{value:e.valueType,options:l,disabled:t,ariaLabel:a(`config_management.visual.payload_rules.param_type`),onChange:t=>T(i,r,n,o,{valueType:t,value:t===`boolean`?`true`:t===`json`&&e.value.trim()===``?`{}`:e.value})}),j(i,r,n,o,e),(0,I.jsx)(L,{variant:`ghost`,size:`sm`,className:G.payloadRowActionButton,onClick:()=>E(i,r,n,o),disabled:t,children:a(`config_management.visual.common.delete`)})]}),s?(0,I.jsx)(`div`,{className:`error-box ${G.payloadParamError}`,children:s}):null]},e.id)}),(0,I.jsx)(`div`,{className:G.actionRow,children:(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:()=>w(i,r,n),disabled:t,children:a(`config_management.visual.payload_rules.add_condition`)})})]},n)),(0,I.jsxs)(`div`,{className:G.payloadAdvancedGrid,children:[(0,I.jsxs)(`div`,{className:G.blockStack,children:[(0,I.jsx)(`div`,{className:G.blockLabel,children:a(`config_management.visual.payload_rules.exist`)}),(0,I.jsx)(aA,{value:e.exist??[],disabled:t,placeholder:a(`config_management.visual.payload_rules.condition_path`),inputAriaLabel:a(`config_management.visual.payload_rules.condition_path`),onChange:e=>v(i,r,{exist:e})})]}),(0,I.jsxs)(`div`,{className:G.blockStack,children:[(0,I.jsx)(`div`,{className:G.blockLabel,children:a(`config_management.visual.payload_rules.notExist`)}),(0,I.jsx)(aA,{value:e.notExist??[],disabled:t,placeholder:a(`config_management.visual.payload_rules.condition_path`),inputAriaLabel:a(`config_management.visual.payload_rules.condition_path`),onChange:e=>v(i,r,{notExist:e})})]})]})]}):null]},e.id)}),(0,I.jsx)(`div`,{className:G.actionRow,children:(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:()=>g(i),disabled:t,children:a(`config_management.visual.payload_rules.add_model`)})})]}),(0,I.jsxs)(`div`,{className:G.blockStack,children:[(0,I.jsx)(`div`,{className:G.blockLabel,children:a(`config_management.visual.payload_rules.params`)}),(e.params.length?e.params:[]).map((e,n)=>{let o=ee(e);return(0,I.jsxs)(`div`,{className:G.payloadRuleParamGroup,children:[(0,I.jsxs)(`div`,{className:[G.payloadRuleParamRow,r?G.payloadRuleRawParamRow:``].filter(Boolean).join(` `),children:[(0,I.jsx)(tA,{placeholder:a(`config_management.visual.payload_rules.json_path`),ariaLabel:a(`config_management.visual.payload_rules.json_path`),value:e.path,onChange:e=>k(i,n,{path:e}),disabled:t}),r?null:(0,I.jsx)(nc,{value:e.valueType,options:l,disabled:t,ariaLabel:a(`config_management.visual.payload_rules.param_type`),onChange:t=>k(i,n,{valueType:t,value:t===`boolean`?`true`:t===`json`&&e.value.trim()===``?`{}`:e.value})}),M(i,n,e),(0,I.jsx)(L,{variant:`ghost`,size:`sm`,className:G.payloadRowActionButton,onClick:()=>O(i,n),disabled:t,children:a(`config_management.visual.common.delete`)})]}),o&&(0,I.jsx)(`div`,{className:`error-box ${G.payloadParamError}`,children:o})]},e.id)}),(0,I.jsx)(`div`,{className:G.actionRow,children:(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:()=>D(i),disabled:t,children:a(`config_management.visual.payload_rules.add_param`)})})]})]},e.id)),o.length===0&&(0,I.jsx)(`div`,{className:G.emptyState,children:a(`config_management.visual.payload_rules.no_rules`)}),(0,I.jsx)(`div`,{className:G.actionRow,children:(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:p,disabled:t,children:a(`config_management.visual.payload_rules.add_rule`)})})]})}),cA=(0,y.memo)(function({value:e,disabled:t,onChange:n}){let{t:r}=Xo(),i=e,a=(0,y.useMemo)(()=>rA(r,i),[i,r]),o=()=>n([...i,{id:ZO(),models:[],params:[]}]),s=e=>n(i.filter((t,n)=>n!==e)),c=(e,t)=>n(i.map((n,r)=>r===e?{...n,...t}:n)),l=e=>{let t=i[e],n={id:ZO(),name:``,protocol:void 0};c(e,{models:[...t.models,n]})},u=(e,t)=>{let n=i[e];c(e,{models:n.models.filter((e,n)=>n!==t)})},d=(e,t,n)=>{let r=i[e];c(e,{models:r.models.map((e,r)=>r===t?{...e,...n}:e)})};return(0,I.jsxs)(`div`,{className:G.blockStack,children:[i.map((e,n)=>(0,I.jsxs)(`div`,{className:G.ruleCard,children:[(0,I.jsxs)(`div`,{className:G.ruleCardHeader,children:[(0,I.jsxs)(`div`,{className:G.ruleCardTitle,children:[r(`config_management.visual.payload_rules.rule`),` `,n+1]}),(0,I.jsx)(L,{variant:`ghost`,size:`sm`,onClick:()=>s(n),disabled:t,children:r(`config_management.visual.common.delete`)})]}),(0,I.jsxs)(`div`,{className:G.blockStack,children:[(0,I.jsx)(`div`,{className:G.blockLabel,children:r(`config_management.visual.payload_rules.models`)}),e.models.map((e,i)=>(0,I.jsxs)(`div`,{className:G.payloadFilterModelRow,children:[(0,I.jsx)(tA,{placeholder:r(`config_management.visual.payload_rules.model_name`),ariaLabel:r(`config_management.visual.payload_rules.model_name`),value:e.name,onChange:e=>d(n,i,{name:e}),disabled:t}),(0,I.jsx)(nc,{value:e.protocol??``,options:a,disabled:t,ariaLabel:r(`config_management.visual.payload_rules.provider_type`),onChange:e=>d(n,i,{protocol:e||void 0})}),(0,I.jsx)(L,{variant:`ghost`,size:`sm`,className:G.payloadRowActionButton,onClick:()=>u(n,i),disabled:t,children:r(`config_management.visual.common.delete`)})]},e.id)),(0,I.jsx)(`div`,{className:G.actionRow,children:(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:()=>l(n),disabled:t,children:r(`config_management.visual.payload_rules.add_model`)})})]}),(0,I.jsxs)(`div`,{className:G.blockStack,children:[(0,I.jsx)(`div`,{className:G.blockLabel,children:r(`config_management.visual.payload_rules.remove_params`)}),(0,I.jsx)(aA,{value:e.params,disabled:t,placeholder:r(`config_management.visual.payload_rules.json_path_filter`),inputAriaLabel:r(`config_management.visual.payload_rules.json_path_filter`),onChange:e=>c(n,{params:e})})]})]},e.id)),i.length===0&&(0,I.jsx)(`div`,{className:G.emptyState,children:r(`config_management.visual.payload_rules.no_rules`)}),(0,I.jsx)(`div`,{className:G.actionRow,children:(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:o,disabled:t,children:r(`config_management.visual.payload_rules.add_rule`)})})]})}),lA=e=>`cfg-field-${e}`,K=e=>`config_management.visual.${e}`,uA=[{fieldId:`host`,sectionId:`connectivity`,labelKey:K(`sections.server.host`),yamlKeys:[`host`]},{fieldId:`port`,sectionId:`connectivity`,labelKey:K(`sections.server.port`),yamlKeys:[`port`]},{fieldId:`authDir`,sectionId:`connectivity`,labelKey:K(`sections.auth.auth_dir`),hintKey:K(`sections.auth.auth_dir_hint`),yamlKeys:[`auth-dir`]},{fieldId:`apiKeys`,sectionId:`connectivity`,labelKey:K(`api_keys.label`),yamlKeys:[`api-keys`],keywords:[`api key`,`apikey`,`token`]},{fieldId:`tlsEnable`,sectionId:`connectivity`,labelKey:K(`sections.tls.enable`),hintKey:K(`sections.tls.enable_desc`),yamlKeys:[`tls`],keywords:[`tls`,`ssl`,`https`]},{fieldId:`tlsCert`,sectionId:`connectivity`,labelKey:K(`sections.tls.cert`),yamlKeys:[`tls`,`cert`],keywords:[`tls`,`ssl`,`certificate`]},{fieldId:`tlsKey`,sectionId:`connectivity`,labelKey:K(`sections.tls.key`),yamlKeys:[`tls`,`key`],keywords:[`tls`,`ssl`,`private key`]},{fieldId:`rmAllowRemote`,sectionId:`connectivity`,labelKey:K(`sections.remote.allow_remote`),hintKey:K(`sections.remote.allow_remote_desc`),yamlKeys:[`remote-management`,`allow-remote`]},{fieldId:`rmDisableControlPanel`,sectionId:`connectivity`,labelKey:K(`sections.remote.disable_panel`),yamlKeys:[`remote-management`,`disable-control-panel`]},{fieldId:`rmDisableAutoUpdatePanel`,sectionId:`connectivity`,labelKey:K(`sections.remote.disable_auto_update_panel`),yamlKeys:[`remote-management`,`disable-auto-update-panel`]},{fieldId:`rmSecretKey`,sectionId:`connectivity`,labelKey:K(`sections.remote.secret_key`),yamlKeys:[`remote-management`,`secret-key`]},{fieldId:`rmPanelRepo`,sectionId:`connectivity`,labelKey:K(`sections.remote.panel_repo`),yamlKeys:[`remote-management`,`panel-github-repository`]},{fieldId:`proxyUrl`,sectionId:`network`,labelKey:K(`sections.network.proxy_url`),yamlKeys:[`proxy-url`]},{fieldId:`requestRetry`,sectionId:`network`,labelKey:K(`sections.network.request_retry`),yamlKeys:[`request-retry`]},{fieldId:`maxRetryCredentials`,sectionId:`network`,labelKey:K(`sections.network.max_retry_credentials`),hintKey:K(`sections.network.max_retry_credentials_hint`),yamlKeys:[`max-retry-credentials`]},{fieldId:`maxRetryInterval`,sectionId:`network`,labelKey:K(`sections.network.max_retry_interval`),yamlKeys:[`max-retry-interval`]},{fieldId:`authAutoRefreshWorkers`,sectionId:`network`,labelKey:K(`sections.network.auth_auto_refresh_workers`),hintKey:K(`sections.network.auth_auto_refresh_workers_hint`),yamlKeys:[`auth-auto-refresh-workers`]},{fieldId:`routingStrategy`,sectionId:`network`,labelKey:K(`sections.network.routing_strategy`),hintKey:K(`sections.network.routing_strategy_hint`),yamlKeys:[`routing`,`strategy`],keywords:[`round-robin`,`fill-first`]},{fieldId:`disableImageGeneration`,sectionId:`network`,labelKey:K(`sections.network.disable_image_generation`),hintKey:K(`sections.network.disable_image_generation_hint`),yamlKeys:[`disable-image-generation`]},{fieldId:`gptImage2BaseModel`,sectionId:`network`,labelKey:K(`sections.network.gpt_image_2_base_model`),hintKey:K(`sections.network.gpt_image_2_base_model_hint`),yamlKeys:[`gpt-image-2-base-model`]},{fieldId:`routingSessionAffinityTTL`,sectionId:`network`,labelKey:K(`sections.network.session_affinity_ttl`),yamlKeys:[`routing`,`session-affinity-ttl`]},{fieldId:`forceModelPrefix`,sectionId:`network`,labelKey:K(`sections.network.force_model_prefix`),hintKey:K(`sections.network.force_model_prefix_desc`),yamlKeys:[`force-model-prefix`]},{fieldId:`passthroughHeaders`,sectionId:`network`,labelKey:K(`sections.network.passthrough_headers`),hintKey:K(`sections.network.passthrough_headers_desc`),yamlKeys:[`passthrough-headers`]},{fieldId:`disableCooling`,sectionId:`network`,labelKey:K(`sections.network.disable_cooling`),hintKey:K(`sections.network.disable_cooling_desc`),yamlKeys:[`disable-cooling`]},{fieldId:`routingSessionAffinity`,sectionId:`network`,labelKey:K(`sections.network.session_affinity`),yamlKeys:[`routing`,`session-affinity`]},{fieldId:`wsAuth`,sectionId:`network`,labelKey:K(`sections.network.ws_auth`),hintKey:K(`sections.network.ws_auth_desc`),yamlKeys:[`ws-auth`],keywords:[`websocket`]},{fieldId:`debug`,sectionId:`logging`,labelKey:K(`sections.system.debug`),hintKey:K(`sections.system.debug_desc`),yamlKeys:[`debug`]},{fieldId:`commercialMode`,sectionId:`logging`,labelKey:K(`sections.system.commercial_mode`),hintKey:K(`sections.system.commercial_mode_desc`),yamlKeys:[`commercial-mode`]},{fieldId:`loggingToFile`,sectionId:`logging`,labelKey:K(`sections.system.logging_to_file`),hintKey:K(`sections.system.logging_to_file_desc`),yamlKeys:[`logging-to-file`]},{fieldId:`logsMaxTotalSizeMb`,sectionId:`logging`,labelKey:K(`sections.system.logs_max_size`),yamlKeys:[`logs-max-total-size-mb`]},{fieldId:`errorLogsMaxFiles`,sectionId:`logging`,labelKey:K(`sections.system.error_logs_max_files`),yamlKeys:[`error-logs-max-files`]},{fieldId:`redisUsageQueueRetentionSeconds`,sectionId:`logging`,labelKey:K(`sections.system.redis_usage_retention`),hintKey:K(`sections.system.redis_usage_retention_hint`),yamlKeys:[`redis-usage-queue-retention-seconds`]},{fieldId:`usageStatisticsEnabled`,sectionId:`logging`,labelKey:K(`sections.system.usage_statistics_enabled`),hintKey:K(`sections.system.usage_statistics_enabled_desc`),yamlKeys:[`usage-statistics-enabled`]},{fieldId:`quotaSwitchProject`,sectionId:`quota`,labelKey:K(`sections.quota.switch_project`),hintKey:K(`sections.quota.switch_project_desc`),yamlKeys:[`quota-exceeded`,`switch-project`]},{fieldId:`quotaSwitchPreviewModel`,sectionId:`quota`,labelKey:K(`sections.quota.switch_preview_model`),hintKey:K(`sections.quota.switch_preview_model_desc`),yamlKeys:[`quota-exceeded`,`switch-preview-model`]},{fieldId:`quotaAntigravityCredits`,sectionId:`quota`,labelKey:K(`sections.quota.antigravity_credits`),yamlKeys:[`quota-exceeded`,`antigravity-credits`]},{fieldId:`streamingKeepaliveSeconds`,sectionId:`streaming`,labelKey:K(`sections.streaming.keepalive_seconds`),hintKey:K(`sections.streaming.keepalive_hint`),yamlKeys:[`streaming`,`keepalive-seconds`]},{fieldId:`streamingBootstrapRetries`,sectionId:`streaming`,labelKey:K(`sections.streaming.bootstrap_retries`),hintKey:K(`sections.streaming.bootstrap_hint`),yamlKeys:[`streaming`,`bootstrap-retries`]},{fieldId:`streamingNonstreamKeepalive`,sectionId:`streaming`,labelKey:K(`sections.streaming.nonstream_keepalive`),hintKey:K(`sections.streaming.nonstream_keepalive_hint`),yamlKeys:[`streaming`,`nonstream-keepalive-interval`]},{fieldId:`pluginsEnabled`,sectionId:`advanced`,labelKey:K(`sections.system.plugins_enabled`),hintKey:K(`sections.system.plugins_enabled_desc`),yamlKeys:[`plugins`]},{fieldId:`pluginStoreSources`,sectionId:`advanced`,labelKey:K(`sections.system.plugin_store_sources`),hintKey:K(`sections.system.plugin_store_sources_hint`),yamlKeys:[`plugins`,`store-sources`]},{fieldId:`antigravitySignatureCacheEnabled`,sectionId:`advanced`,labelKey:K(`sections.system.antigravity_signature_cache`),hintKey:K(`sections.system.antigravity_signature_cache_desc`),yamlKeys:[`antigravity-signature-cache-enabled`]},{fieldId:`antigravitySignatureBypassStrict`,sectionId:`advanced`,labelKey:K(`sections.system.antigravity_signature_strict`),hintKey:K(`sections.system.antigravity_signature_strict_desc`),yamlKeys:[`antigravity-signature-bypass-strict`]},{fieldId:`claudeHeaderUserAgent`,sectionId:`advanced`,labelKey:K(`sections.headers.user_agent`),qualifierKey:K(`sections.headers.claude_title`),yamlKeys:[`claude-header-defaults`,`user-agent`],keywords:[`claude`]},{fieldId:`claudeHeaderPackageVersion`,sectionId:`advanced`,labelKey:K(`sections.headers.package_version`),qualifierKey:K(`sections.headers.claude_title`),yamlKeys:[`claude-header-defaults`,`package-version`],keywords:[`claude`]},{fieldId:`claudeHeaderRuntimeVersion`,sectionId:`advanced`,labelKey:K(`sections.headers.runtime_version`),qualifierKey:K(`sections.headers.claude_title`),yamlKeys:[`claude-header-defaults`,`runtime-version`],keywords:[`claude`]},{fieldId:`claudeHeaderOs`,sectionId:`advanced`,labelKey:K(`sections.headers.os`),qualifierKey:K(`sections.headers.claude_title`),yamlKeys:[`claude-header-defaults`,`os`],keywords:[`claude`]},{fieldId:`claudeHeaderArch`,sectionId:`advanced`,labelKey:K(`sections.headers.arch`),qualifierKey:K(`sections.headers.claude_title`),yamlKeys:[`claude-header-defaults`,`arch`],keywords:[`claude`]},{fieldId:`claudeHeaderTimeout`,sectionId:`advanced`,labelKey:K(`sections.headers.timeout`),qualifierKey:K(`sections.headers.claude_title`),yamlKeys:[`claude-header-defaults`,`timeout`],keywords:[`claude`]},{fieldId:`claudeHeaderStabilizeDeviceProfile`,sectionId:`advanced`,labelKey:K(`sections.headers.stabilize_device`),qualifierKey:K(`sections.headers.claude_title`),hintKey:K(`sections.headers.stabilize_device_desc`),yamlKeys:[`claude-header-defaults`,`stabilize-device-profile`],keywords:[`claude`]},{fieldId:`codexHeaderUserAgent`,sectionId:`advanced`,labelKey:K(`sections.headers.user_agent`),qualifierKey:K(`sections.headers.codex_title`),yamlKeys:[`codex-header-defaults`,`user-agent`],keywords:[`codex`]},{fieldId:`codexHeaderBetaFeatures`,sectionId:`advanced`,labelKey:K(`sections.headers.beta_features`),qualifierKey:K(`sections.headers.codex_title`),yamlKeys:[`codex-header-defaults`,`beta-features`],keywords:[`codex`]},{fieldId:`codexIdentityConfuse`,sectionId:`advanced`,labelKey:K(`sections.headers.codex_identity_confuse`),qualifierKey:K(`sections.headers.codex_title`),hintKey:K(`sections.headers.codex_identity_confuse_desc`),yamlKeys:[`codex-header-defaults`,`identity-confuse`],keywords:[`codex`]},{fieldId:`payloadDefaultRules`,sectionId:`payload`,labelKey:K(`sections.payload.default_rules`),hintKey:K(`sections.payload.default_rules_desc`),keywords:[`payload`,`rule`]},{fieldId:`payloadDefaultRawRules`,sectionId:`payload`,labelKey:K(`sections.payload.default_raw_rules`),hintKey:K(`sections.payload.default_raw_rules_desc`),keywords:[`payload`,`rule`,`json`]},{fieldId:`payloadOverrideRules`,sectionId:`payload`,labelKey:K(`sections.payload.override_rules`),hintKey:K(`sections.payload.override_rules_desc`),keywords:[`payload`,`rule`]},{fieldId:`payloadOverrideRawRules`,sectionId:`payload`,labelKey:K(`sections.payload.override_raw_rules`),hintKey:K(`sections.payload.override_raw_rules_desc`),keywords:[`payload`,`rule`,`json`]},{fieldId:`payloadFilterRules`,sectionId:`payload`,labelKey:K(`sections.payload.filter_rules`),hintKey:K(`sections.payload.filter_rules_desc`),keywords:[`payload`,`rule`,`filter`]}],dA=8;function fA(e,t){let n=e.trim().toLowerCase();if(!n)return[];let r=[];for(let e of uA){let i=t(e.labelKey).toLowerCase(),a=e.qualifierKey?t(e.qualifierKey).toLowerCase():``,o=e.hintKey?t(e.hintKey).toLowerCase():``,s=(e.yamlKeys??[]).join(` `).toLowerCase(),c=(e.keywords??[]).join(` `).toLowerCase(),l=1/0;i.startsWith(n)?l=0:i.includes(n)?l=1:a.includes(n)||c.includes(n)?l=2:s.includes(n)?l=3:o.includes(n)&&(l=4),Number.isFinite(l)&&r.push({entry:e,score:l})}return r.sort((e,t)=>e.score-t.score),r.slice(0,dA).map(e=>e.entry)}var pA=`config-management:editor-mode`;function mA(e,t){if(t)return e(`config_management.visual.validation.${t}`)}function hA({title:e,description:t,checked:n,disabled:r,onChange:i}){return(0,I.jsxs)(`div`,{className:G.toggleRow,children:[(0,I.jsxs)(`div`,{className:G.toggleCopy,children:[(0,I.jsx)(`div`,{className:G.toggleTitle,children:e}),t?(0,I.jsx)(`div`,{className:G.toggleDescription,children:t}):null]}),(0,I.jsx)(hy,{checked:n,onChange:i,disabled:r,ariaLabel:e})]})}function gA({children:e}){return(0,I.jsx)(`div`,{className:G.sectionGrid,children:e})}function _A({children:e}){return(0,I.jsx)(`div`,{className:G.sectionStack,children:e})}function vA(){return(0,I.jsx)(`div`,{className:G.divider})}function yA({fieldId:e,children:t}){return(0,I.jsx)(`div`,{id:lA(e),className:G.fieldAnchor,children:t})}function bA({title:e,description:t,children:n}){return(0,I.jsxs)(`div`,{className:G.subsection,children:[(0,I.jsxs)(`div`,{className:G.subsectionHeader,children:[(0,I.jsx)(`h3`,{className:G.subsectionTitle,children:e}),t?(0,I.jsx)(`p`,{className:G.subsectionDescription,children:t}):null]}),n]})}function xA({label:e,labelId:t,htmlFor:n,hint:r,hintId:i,error:a,errorId:o,children:s}){return(0,I.jsxs)(`div`,{className:G.fieldShell,children:[(0,I.jsx)(`label`,{id:t,htmlFor:n,className:G.fieldLabel,children:e}),s,a?(0,I.jsx)(`div`,{id:o,className:`error-box`,children:a}):null,r?(0,I.jsx)(`div`,{id:i,className:G.fieldHint,children:r}):null]})}function SA({values:e,validationErrors:t,hasPayloadValidationErrors:n=!1,disabled:r=!1,onChange:i}){let{t:a}=Xo(),o=ym(),s=o?o.isCurrentLayer:!0,c=XO(`(max-width: 768px)`),l=(0,y.useId)(),u=`${l}-hint`,d=(0,y.useId)(),f=`${d}-hint`,p=(0,y.useId)(),m=`${p}-hint`,h=`${p}-error`,g=(0,y.useId)(),_=`${g}-hint`,v=`${g}-error`,[b,x]=(0,y.useState)(()=>localStorage.getItem(pA)===`full`?`full`:`simple`),[S,C]=(0,y.useState)(`connectivity`),w=(0,y.useRef)({}),T=(0,y.useRef)(null),E=(0,y.useRef)({}),[D,O]=(0,y.useState)(``),[k,A]=(0,y.useState)(!1),[ee,j]=(0,y.useState)(0),M=(0,y.useId)(),N=(0,y.useRef)(null),[te,P]=(0,y.useState)(null),F=(0,y.useRef)(null),ne=(0,y.useRef)(null),re=(0,y.useRef)(null),ie=(0,y.useRef)(null),ae=(0,y.useCallback)(e=>{x(e),localStorage.setItem(pA,e)},[]),oe=(0,y.useMemo)(()=>fA(D,a),[D,a]),se=k&&!!D.trim(),ce=oe.length>0?Math.min(Math.max(ee,0),oe.length-1):-1,le=(0,y.useCallback)(e=>{A(!1),ae(`full`),C(e.sectionId),P({fieldId:e.fieldId,sectionId:e.sectionId})},[ae]);(0,y.useEffect)(()=>{if(b!==`full`||!te||F.current===te)return;F.current=te;let{fieldId:t,sectionId:n}=te,r=(t===`tlsCert`||t===`tlsKey`)&&!e.tlsEnable?`tlsEnable`:t,i=document.getElementById(lA(r));if(!i){w.current[n]?.scrollIntoView({block:`nearest`,inline:`start`});return}let a=i.closest(`details`)??i.querySelector(`details`);a&&!a.open&&(a.open=!0),re.current!==null&&(clearTimeout(re.current),ie.current?.classList.remove(G.fieldHighlightActive)),w.current[n]?.scrollIntoView({block:`nearest`,inline:`start`}),requestAnimationFrame(()=>{i.scrollIntoView({behavior:`smooth`,block:`center`,inline:`nearest`}),i.classList.add(G.fieldHighlightActive)}),ie.current=i,re.current=window.setTimeout(()=>{i.classList.remove(G.fieldHighlightActive),re.current=null,ie.current=null},1800)},[b,te,e.tlsEnable]),(0,y.useEffect)(()=>()=>{re.current!==null&&clearTimeout(re.current)},[]),(0,y.useEffect)(()=>{if(!k)return;let e=e=>{ne.current&&!ne.current.contains(e.target)&&A(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[k]),(0,y.useEffect)(()=>{!se||ce<0||(N.current?.querySelector(`[data-result-index="${ce}"]`))?.scrollIntoView({block:`nearest`})},[ce,se]);let ue=e.streaming.keepaliveSeconds===``||e.streaming.keepaliveSeconds===`0`,de=e.streaming.nonstreamKeepaliveInterval===``||e.streaming.nonstreamKeepaliveInterval===`0`,fe=mA(a,t?.port),pe=mA(a,t?.logsMaxTotalSizeMb),me=mA(a,t?.errorLogsMaxFiles),he=mA(a,t?.redisUsageQueueRetentionSeconds),ge=mA(a,t?.requestRetry),_e=mA(a,t?.maxRetryCredentials),ve=mA(a,t?.maxRetryInterval),ye=mA(a,t?.authAutoRefreshWorkers),be=mA(a,t?.[`streaming.keepaliveSeconds`]),xe=mA(a,t?.[`streaming.bootstrapRetries`]),Se=mA(a,t?.[`streaming.nonstreamKeepaliveInterval`]),Ce=(0,y.useCallback)(e=>i({apiKeysText:e}),[i]),we=(0,y.useCallback)(e=>i({pluginStoreSources:e}),[i]),Te=(0,y.useCallback)(e=>i({payloadDefaultRules:e}),[i]),Ee=(0,y.useCallback)(e=>i({payloadDefaultRawRules:e}),[i]),De=(0,y.useCallback)(e=>i({payloadOverrideRules:e}),[i]),Oe=(0,y.useCallback)(e=>i({payloadOverrideRawRules:e}),[i]),ke=(0,y.useCallback)(e=>i({payloadFilterRules:e}),[i]),Ae=(0,y.useMemo)(()=>[{value:`false`,label:a(`config_management.visual.sections.network.disable_image_generation_false`)},{value:`true`,label:a(`config_management.visual.sections.network.disable_image_generation_true`)},{value:`chat`,label:a(`config_management.visual.sections.network.disable_image_generation_chat`)}],[a]),je=(0,y.useCallback)(e=>e.reduce((e,n)=>e+ +!!t?.[n],0),[t]),Me=(0,y.useMemo)(()=>[{id:`connectivity`,title:a(`config_management.visual.sections.connectivity.title`),icon:rs,errorCount:je([`port`])},{id:`network`,title:a(`config_management.visual.sections.network.title`),icon:Ss,errorCount:je([`requestRetry`,`maxRetryCredentials`,`maxRetryInterval`,`authAutoRefreshWorkers`])},{id:`logging`,title:a(`config_management.visual.sections.logging.title`),icon:ds,errorCount:je([`errorLogsMaxFiles`,`logsMaxTotalSizeMb`,`redisUsageQueueRetentionSeconds`])},{id:`quota`,title:a(`config_management.visual.sections.quota.title`),icon:Ps,errorCount:0},{id:`streaming`,title:a(`config_management.visual.sections.streaming.title`),icon:Ns,errorCount:je([`streaming.keepaliveSeconds`,`streaming.bootstrapRetries`,`streaming.nonstreamKeepaliveInterval`])},{id:`advanced`,title:a(`config_management.visual.sections.advanced.title`),icon:cs,errorCount:0},{id:`payload`,title:a(`config_management.visual.sections.payload.title`),icon:Rs,errorCount:+!!n}],[je,n,a]),Ne=Me.some(e=>e.errorCount>0)||n,Pe=Object.keys(t??{}).some(e=>e!==`port`&&!!t?.[e])||n,Fe=n?`payload-errors`:`payload-ok`,Ie=Me.find(e=>e.id===S)??Me[0];(0,y.useEffect)(()=>{if(b!==`full`||!s||typeof IntersectionObserver>`u`)return;let e=new IntersectionObserver(e=>{let t=e.filter(e=>e.isIntersecting).sort((e,t)=>t.intersectionRatio-e.intersectionRatio);t.length!==0&&C(t[0].target.id)},{rootMargin:`-18% 0px -58% 0px`,threshold:[.12,.3,.55]});for(let t of Me){let n=w.current[t.id];n&&e.observe(n)}return()=>e.disconnect()},[s,b,Me]),(0,y.useEffect)(()=>{if(b!==`full`||!s||!c)return;let e=T.current,t=E.current[S];if(!e||!t)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=e.scrollLeft+(r.left-n.left)-(e.clientWidth-r.width)/2,a=Math.max(e.scrollWidth-e.clientWidth,0),o=Math.min(Math.max(i,0),a);e.scrollTo({left:o,behavior:`smooth`})},[S,s,c,b]);let Le=(0,y.useCallback)(e=>{C(e),w.current[e]?.scrollIntoView({behavior:`smooth`,block:`nearest`,inline:`start`})},[]),Re=(0,I.jsx)(yA,{fieldId:`host`,children:(0,I.jsx)($o,{label:a(`config_management.visual.sections.server.host`),placeholder:`0.0.0.0`,value:e.host,onChange:e=>i({host:e.target.value}),disabled:r})}),ze=(0,I.jsx)(yA,{fieldId:`port`,children:(0,I.jsx)($o,{label:a(`config_management.visual.sections.server.port`),type:`number`,placeholder:`8317`,value:e.port,onChange:e=>i({port:e.target.value}),disabled:r,error:fe})}),Be=(0,I.jsx)(yA,{fieldId:`proxyUrl`,children:(0,I.jsx)($o,{label:a(`config_management.visual.sections.network.proxy_url`),placeholder:`socks5://user:pass@127.0.0.1:1080/`,value:e.proxyUrl,onChange:e=>i({proxyUrl:e.target.value}),disabled:r})}),Ve=(0,I.jsx)(yA,{fieldId:`apiKeys`,children:(0,I.jsx)(`div`,{className:G.subsection,children:(0,I.jsx)(iA,{value:e.apiKeysText,disabled:r,onChange:Ce})})}),He=(0,I.jsx)(yA,{fieldId:`debug`,children:(0,I.jsx)(hA,{title:a(`config_management.visual.sections.system.debug`),description:a(`config_management.visual.sections.system.debug_desc`),checked:e.debug,disabled:r,onChange:e=>i({debug:e})})}),Ue=(0,I.jsx)(yA,{fieldId:`loggingToFile`,children:(0,I.jsx)(hA,{title:a(`config_management.visual.sections.system.logging_to_file`),description:a(`config_management.visual.sections.system.logging_to_file_desc`),checked:e.loggingToFile,disabled:r,onChange:e=>i({loggingToFile:e})})}),We=(0,I.jsx)(yA,{fieldId:`quotaSwitchProject`,children:(0,I.jsx)(hA,{title:a(`config_management.visual.sections.quota.switch_project`),description:a(`config_management.visual.sections.quota.switch_project_desc`),checked:e.quotaSwitchProject,disabled:r,onChange:e=>i({quotaSwitchProject:e})})}),Ge=(0,I.jsx)(yA,{fieldId:`quotaSwitchPreviewModel`,children:(0,I.jsx)(hA,{title:a(`config_management.visual.sections.quota.switch_preview_model`),description:a(`config_management.visual.sections.quota.switch_preview_model_desc`),checked:e.quotaSwitchPreviewModel,disabled:r,onChange:e=>i({quotaSwitchPreviewModel:e})})}),Ke=(0,I.jsx)(`div`,{className:G.navList,children:Me.map((e,t)=>{let n=e.icon;return(0,I.jsxs)(`button`,{type:`button`,className:`${G.navButton} ${S===e.id?G.navButtonActive:``}`,onClick:()=>Le(e.id),children:[(0,I.jsx)(`span`,{className:G.navIndex,children:String(t+1).padStart(2,`0`)}),(0,I.jsx)(`span`,{className:G.navMain,children:(0,I.jsxs)(`span`,{className:G.navHeadingRow,children:[(0,I.jsxs)(`span`,{className:G.navLabelWrap,children:[(0,I.jsx)(`span`,{className:G.navIcon,children:(0,I.jsx)(n,{size:14})}),(0,I.jsx)(`span`,{className:G.navLabel,children:e.title})]}),e.errorCount>0?(0,I.jsx)(`span`,{className:G.navBadge,"aria-hidden":`true`,children:e.errorCount}):null]})})]},e.id)})});return(0,I.jsxs)(`div`,{className:G.visualEditor,children:[(0,I.jsxs)(`div`,{className:G.overview,children:[(0,I.jsxs)(`div`,{className:G.overviewHeader,children:[(0,I.jsxs)(`div`,{className:G.modeSwitch,role:`group`,"aria-label":a(`config_management.visual.mode.label`),children:[(0,I.jsxs)(`button`,{type:`button`,className:`${G.modeButton} ${b===`simple`?G.modeButtonActive:``}`,onClick:()=>ae(`simple`),"aria-pressed":b===`simple`,children:[(0,I.jsx)(ns,{size:14}),a(`config_management.visual.mode.simple`)]}),(0,I.jsx)(`button`,{type:`button`,className:`${G.modeButton} ${b===`full`?G.modeButtonActive:``}`,onClick:()=>ae(`full`),"aria-pressed":b===`full`,children:a(`config_management.visual.mode.full`)})]}),(0,I.jsxs)(`div`,{className:G.overviewMeta,children:[b===`full`&&Ie?(0,I.jsx)(`span`,{className:G.overviewPill,children:Ie.title}):null,Ne?(0,I.jsx)(`span`,{className:`${G.overviewPill} ${G.overviewPillWarning}`,children:a(`config_management.visual.validation.validation_blocked`)}):null]})]}),(0,I.jsxs)(`div`,{className:G.searchBox,ref:ne,children:[(0,I.jsx)($o,{className:G.searchControl,placeholder:a(`config_management.visual.search.placeholder`),"aria-label":a(`config_management.visual.search.placeholder`),role:`combobox`,"aria-autocomplete":`list`,"aria-expanded":se,"aria-controls":se?M:void 0,"aria-activedescendant":se&&ce>=0?`${M}-opt-${ce}`:void 0,value:D,onChange:e=>{O(e.target.value),A(!0),j(0)},onFocus:()=>A(!0),onKeyDown:e=>{if(!e.nativeEvent.isComposing){if(e.key===`Escape`){A(!1);return}if(e.key===`ArrowDown`){if(e.preventDefault(),!se){A(!0);return}if(oe.length===0)return;j((ce+1)%oe.length);return}if(e.key===`ArrowUp`){if(e.preventDefault(),!se){A(!0);return}if(oe.length===0)return;j(ce<=0?oe.length-1:ce-1);return}e.key===`Enter`&&se&&oe.length>0&&(e.preventDefault(),le(oe[ce]??oe[0]))}},rightElement:(0,I.jsx)(`span`,{className:G.searchIcon,"aria-hidden":`true`,children:(0,I.jsx)(Ds,{size:16})})}),se?(0,I.jsx)(`div`,{className:G.searchResults,role:`listbox`,id:M,"aria-label":a(`config_management.visual.search.placeholder`),ref:N,children:oe.length>0?oe.map((e,t)=>(0,I.jsxs)(`button`,{type:`button`,role:`option`,id:`${M}-opt-${t}`,"data-result-index":t,tabIndex:-1,"aria-selected":t===ce,className:`${G.searchResultItem} ${t===ce?G.searchResultItemActive:``}`,onMouseEnter:()=>j(t),onClick:()=>le(e),children:[(0,I.jsxs)(`span`,{className:G.searchResultLabel,children:[a(e.labelKey),e.qualifierKey?(0,I.jsx)(`span`,{className:G.searchResultQualifier,children:a(e.qualifierKey)}):null]}),(0,I.jsx)(`span`,{className:G.searchResultSection,children:a(`config_management.visual.sections.${e.sectionId}.title`)})]},e.fieldId)):(0,I.jsx)(`div`,{className:G.searchEmpty,children:a(`config_management.visual.search.no_results`)})}):null]})]}),b===`simple`?(0,I.jsxs)(`div`,{className:G.simpleView,children:[Pe?(0,I.jsxs)(`div`,{className:G.simpleBanner,role:`alert`,children:[(0,I.jsx)(`span`,{children:a(`config_management.visual.mode.validation_banner`)}),(0,I.jsx)(`button`,{type:`button`,className:G.simpleBannerAction,onClick:()=>ae(`full`),children:a(`config_management.visual.mode.switch_to_full`)})]}):null,(0,I.jsxs)(`div`,{className:G.simpleForm,children:[(0,I.jsx)(`div`,{className:G.simpleField,children:Re}),(0,I.jsx)(`div`,{className:G.simpleField,children:ze}),Ve,(0,I.jsx)(`div`,{className:G.simpleField,children:Be}),He,Ue,We,Ge]}),(0,I.jsx)(`button`,{type:`button`,className:G.simpleMore,onClick:()=>ae(`full`),children:a(`config_management.visual.mode.more_settings`,{total:Me.length})})]}):(0,I.jsxs)(`div`,{className:G.workspace,children:[c?(0,I.jsx)(`div`,{className:G.mobileSectionNav,children:(0,I.jsx)(`div`,{ref:T,className:G.mobileSectionNavScroller,"aria-label":a(`config_management.visual.quick_jump`,{defaultValue:`快速跳转`}),children:Me.map((e,t)=>(0,I.jsxs)(`button`,{ref:t=>{E.current[e.id]=t},type:`button`,className:`${G.mobileSectionNavButton} ${S===e.id?G.mobileSectionNavButtonActive:``}`,onClick:()=>Le(e.id),children:[(0,I.jsx)(`span`,{className:G.mobileSectionNavIndex,children:String(t+1).padStart(2,`0`)}),(0,I.jsx)(`span`,{className:G.mobileSectionNavLabel,children:e.title}),e.errorCount>0?(0,I.jsx)(`span`,{className:G.mobileSectionNavBadge,"aria-hidden":`true`,children:e.errorCount}):null]},e.id))})}):null,(0,I.jsx)(`aside`,{className:G.sidebar,children:(0,I.jsx)(`div`,{className:G.sidebarRail,children:Ke})}),(0,I.jsxs)(`div`,{className:G.sections,children:[(0,I.jsx)(YO,{id:`connectivity`,ref:e=>{w.current.connectivity=e},indexLabel:`01`,icon:(0,I.jsx)(rs,{size:16}),title:a(`config_management.visual.sections.connectivity.title`),description:a(`config_management.visual.sections.connectivity.description`),children:(0,I.jsxs)(_A,{children:[(0,I.jsxs)(gA,{children:[Re,ze]}),(0,I.jsx)(yA,{fieldId:`authDir`,children:(0,I.jsx)($o,{label:a(`config_management.visual.sections.auth.auth_dir`),placeholder:`~/.cli-proxy-api`,value:e.authDir,onChange:e=>i({authDir:e.target.value}),disabled:r,hint:a(`config_management.visual.sections.auth.auth_dir_hint`)})}),Ve,(0,I.jsx)(zy,{label:a(`config_management.visual.sections.tls.title`),hint:a(`config_management.visual.sections.tls.description`),defaultOpen:!1,children:(0,I.jsxs)(_A,{children:[(0,I.jsx)(yA,{fieldId:`tlsEnable`,children:(0,I.jsx)(hA,{title:a(`config_management.visual.sections.tls.enable`),description:a(`config_management.visual.sections.tls.enable_desc`),checked:e.tlsEnable,disabled:r,onChange:e=>i({tlsEnable:e})})}),e.tlsEnable?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(vA,{}),(0,I.jsxs)(gA,{children:[(0,I.jsx)(yA,{fieldId:`tlsCert`,children:(0,I.jsx)($o,{label:a(`config_management.visual.sections.tls.cert`),placeholder:`/path/to/cert.pem`,value:e.tlsCert,onChange:e=>i({tlsCert:e.target.value}),disabled:r})}),(0,I.jsx)(yA,{fieldId:`tlsKey`,children:(0,I.jsx)($o,{label:a(`config_management.visual.sections.tls.key`),placeholder:`/path/to/key.pem`,value:e.tlsKey,onChange:e=>i({tlsKey:e.target.value}),disabled:r})})]})]}):null]})}),(0,I.jsx)(zy,{label:a(`config_management.visual.sections.remote.title`),hint:a(`config_management.visual.sections.remote.description`),defaultOpen:!1,children:(0,I.jsxs)(_A,{children:[(0,I.jsxs)(gA,{children:[(0,I.jsx)(yA,{fieldId:`rmAllowRemote`,children:(0,I.jsx)(hA,{title:a(`config_management.visual.sections.remote.allow_remote`),description:a(`config_management.visual.sections.remote.allow_remote_desc`),checked:e.rmAllowRemote,disabled:r,onChange:e=>i({rmAllowRemote:e})})}),(0,I.jsx)(yA,{fieldId:`rmDisableControlPanel`,children:(0,I.jsx)(hA,{title:a(`config_management.visual.sections.remote.disable_panel`),description:a(`config_management.visual.sections.remote.disable_panel_desc`),checked:e.rmDisableControlPanel,disabled:r,onChange:e=>i({rmDisableControlPanel:e})})}),(0,I.jsx)(yA,{fieldId:`rmDisableAutoUpdatePanel`,children:(0,I.jsx)(hA,{title:a(`config_management.visual.sections.remote.disable_auto_update_panel`),description:a(`config_management.visual.sections.remote.disable_auto_update_panel_desc`),checked:e.rmDisableAutoUpdatePanel,disabled:r,onChange:e=>i({rmDisableAutoUpdatePanel:e})})})]}),(0,I.jsxs)(gA,{children:[(0,I.jsx)(yA,{fieldId:`rmSecretKey`,children:(0,I.jsx)($o,{label:a(`config_management.visual.sections.remote.secret_key`),type:`password`,placeholder:a(`config_management.visual.sections.remote.secret_key_placeholder`),value:e.rmSecretKey,onChange:e=>i({rmSecretKey:e.target.value}),disabled:r})}),(0,I.jsx)(yA,{fieldId:`rmPanelRepo`,children:(0,I.jsx)($o,{label:a(`config_management.visual.sections.remote.panel_repo`),placeholder:`https://github.com/router-for-me/Cli-Proxy-API-Management-Center`,value:e.rmPanelRepo,onChange:e=>i({rmPanelRepo:e.target.value}),disabled:r})})]})]})})]})}),(0,I.jsx)(YO,{id:`network`,ref:e=>{w.current.network=e},indexLabel:`02`,icon:(0,I.jsx)(Ss,{size:16}),title:a(`config_management.visual.sections.network.title`),description:a(`config_management.visual.sections.network.description`),children:(0,I.jsxs)(_A,{children:[(0,I.jsxs)(gA,{children:[Be,(0,I.jsx)(yA,{fieldId:`requestRetry`,children:(0,I.jsx)($o,{label:a(`config_management.visual.sections.network.request_retry`),type:`number`,placeholder:`3`,value:e.requestRetry,onChange:e=>i({requestRetry:e.target.value}),disabled:r,error:ge})}),(0,I.jsx)(yA,{fieldId:`maxRetryCredentials`,children:(0,I.jsx)($o,{label:a(`config_management.visual.sections.network.max_retry_credentials`),type:`number`,placeholder:`0`,value:e.maxRetryCredentials,onChange:e=>i({maxRetryCredentials:e.target.value}),disabled:r,hint:a(`config_management.visual.sections.network.max_retry_credentials_hint`),error:_e})}),(0,I.jsx)(yA,{fieldId:`maxRetryInterval`,children:(0,I.jsx)($o,{label:a(`config_management.visual.sections.network.max_retry_interval`),type:`number`,placeholder:`30`,value:e.maxRetryInterval,onChange:e=>i({maxRetryInterval:e.target.value}),disabled:r,error:ve})}),(0,I.jsx)(yA,{fieldId:`authAutoRefreshWorkers`,children:(0,I.jsx)($o,{label:a(`config_management.visual.sections.network.auth_auto_refresh_workers`),type:`number`,placeholder:`16`,value:e.authAutoRefreshWorkers,onChange:e=>i({authAutoRefreshWorkers:e.target.value}),disabled:r,hint:a(`config_management.visual.sections.network.auth_auto_refresh_workers_hint`),error:ye})}),(0,I.jsx)(yA,{fieldId:`routingStrategy`,children:(0,I.jsx)(xA,{label:a(`config_management.visual.sections.network.routing_strategy`),labelId:l,hint:a(`config_management.visual.sections.network.routing_strategy_hint`),hintId:u,children:(0,I.jsx)(nc,{value:e.routingStrategy,options:[{value:`round-robin`,label:a(`config_management.visual.sections.network.strategy_round_robin`)},{value:`fill-first`,label:a(`config_management.visual.sections.network.strategy_fill_first`)}],id:`${l}-select`,disabled:r,ariaLabelledBy:l,ariaDescribedBy:u,onChange:e=>i({routingStrategy:e})})})}),(0,I.jsx)(yA,{fieldId:`disableImageGeneration`,children:(0,I.jsx)(xA,{label:a(`config_management.visual.sections.network.disable_image_generation`),labelId:d,hint:a(`config_management.visual.sections.network.disable_image_generation_hint`),hintId:f,children:(0,I.jsx)(nc,{value:e.disableImageGeneration,options:Ae,id:`${d}-select`,disabled:r,ariaLabelledBy:d,ariaDescribedBy:f,onChange:e=>i({disableImageGeneration:e})})})}),(0,I.jsx)(yA,{fieldId:`gptImage2BaseModel`,children:(0,I.jsx)($o,{label:a(`config_management.visual.sections.network.gpt_image_2_base_model`),placeholder:`gpt-5.4-mini`,value:e.gptImage2BaseModel,onChange:e=>i({gptImage2BaseModel:e.target.value}),disabled:r,hint:a(`config_management.visual.sections.network.gpt_image_2_base_model_hint`)})}),(0,I.jsx)(yA,{fieldId:`routingSessionAffinityTTL`,children:(0,I.jsx)($o,{label:a(`config_management.visual.sections.network.session_affinity_ttl`),placeholder:`1h`,value:e.routingSessionAffinityTTL,onChange:e=>i({routingSessionAffinityTTL:e.target.value}),disabled:r})})]}),(0,I.jsxs)(gA,{children:[(0,I.jsx)(yA,{fieldId:`forceModelPrefix`,children:(0,I.jsx)(hA,{title:a(`config_management.visual.sections.network.force_model_prefix`),description:a(`config_management.visual.sections.network.force_model_prefix_desc`),checked:e.forceModelPrefix,disabled:r,onChange:e=>i({forceModelPrefix:e})})}),(0,I.jsx)(yA,{fieldId:`passthroughHeaders`,children:(0,I.jsx)(hA,{title:a(`config_management.visual.sections.network.passthrough_headers`),description:a(`config_management.visual.sections.network.passthrough_headers_desc`),checked:e.passthroughHeaders,disabled:r,onChange:e=>i({passthroughHeaders:e})})}),(0,I.jsx)(yA,{fieldId:`disableCooling`,children:(0,I.jsx)(hA,{title:a(`config_management.visual.sections.network.disable_cooling`),description:a(`config_management.visual.sections.network.disable_cooling_desc`),checked:e.disableCooling,disabled:r,onChange:e=>i({disableCooling:e})})}),(0,I.jsx)(yA,{fieldId:`routingSessionAffinity`,children:(0,I.jsx)(hA,{title:a(`config_management.visual.sections.network.session_affinity`),checked:e.routingSessionAffinity,disabled:r,onChange:e=>i({routingSessionAffinity:e})})}),(0,I.jsx)(yA,{fieldId:`wsAuth`,children:(0,I.jsx)(hA,{title:a(`config_management.visual.sections.network.ws_auth`),description:a(`config_management.visual.sections.network.ws_auth_desc`),checked:e.wsAuth,disabled:r,onChange:e=>i({wsAuth:e})})})]})]})}),(0,I.jsx)(YO,{id:`logging`,ref:e=>{w.current.logging=e},indexLabel:`03`,icon:(0,I.jsx)(ds,{size:16}),title:a(`config_management.visual.sections.logging.title`),description:a(`config_management.visual.sections.logging.description`),children:(0,I.jsxs)(_A,{children:[(0,I.jsxs)(gA,{children:[He,(0,I.jsx)(yA,{fieldId:`commercialMode`,children:(0,I.jsx)(hA,{title:a(`config_management.visual.sections.system.commercial_mode`),description:a(`config_management.visual.sections.system.commercial_mode_desc`),checked:e.commercialMode,disabled:r,onChange:e=>i({commercialMode:e})})}),Ue]}),(0,I.jsxs)(gA,{children:[(0,I.jsx)(yA,{fieldId:`logsMaxTotalSizeMb`,children:(0,I.jsx)($o,{label:a(`config_management.visual.sections.system.logs_max_size`),type:`number`,placeholder:`0`,value:e.logsMaxTotalSizeMb,onChange:e=>i({logsMaxTotalSizeMb:e.target.value}),disabled:r,error:pe})}),(0,I.jsx)(yA,{fieldId:`errorLogsMaxFiles`,children:(0,I.jsx)($o,{label:a(`config_management.visual.sections.system.error_logs_max_files`),type:`number`,placeholder:`10`,value:e.errorLogsMaxFiles,onChange:e=>i({errorLogsMaxFiles:e.target.value}),disabled:r,error:me})}),(0,I.jsx)(yA,{fieldId:`redisUsageQueueRetentionSeconds`,children:(0,I.jsx)($o,{label:a(`config_management.visual.sections.system.redis_usage_retention`),type:`number`,placeholder:`60`,value:e.redisUsageQueueRetentionSeconds,onChange:e=>i({redisUsageQueueRetentionSeconds:e.target.value}),disabled:r,hint:a(`config_management.visual.sections.system.redis_usage_retention_hint`),error:he})})]}),(0,I.jsx)(gA,{children:(0,I.jsx)(yA,{fieldId:`usageStatisticsEnabled`,children:(0,I.jsx)(hA,{title:a(`config_management.visual.sections.system.usage_statistics_enabled`),description:a(`config_management.visual.sections.system.usage_statistics_enabled_desc`),checked:e.usageStatisticsEnabled,disabled:r,onChange:e=>i({usageStatisticsEnabled:e})})})})]})}),(0,I.jsx)(YO,{id:`quota`,ref:e=>{w.current.quota=e},indexLabel:`04`,icon:(0,I.jsx)(Ps,{size:16}),title:a(`config_management.visual.sections.quota.title`),description:a(`config_management.visual.sections.quota.description`),children:(0,I.jsxs)(gA,{children:[We,Ge,(0,I.jsx)(yA,{fieldId:`quotaAntigravityCredits`,children:(0,I.jsx)(hA,{title:a(`config_management.visual.sections.quota.antigravity_credits`),checked:e.quotaAntigravityCredits,disabled:r,onChange:e=>i({quotaAntigravityCredits:e})})})]})}),(0,I.jsx)(YO,{id:`streaming`,ref:e=>{w.current.streaming=e},indexLabel:`05`,icon:(0,I.jsx)(Ns,{size:16}),title:a(`config_management.visual.sections.streaming.title`),description:a(`config_management.visual.sections.streaming.description`),children:(0,I.jsxs)(_A,{children:[(0,I.jsxs)(gA,{children:[(0,I.jsx)(yA,{fieldId:`streamingKeepaliveSeconds`,children:(0,I.jsx)(xA,{label:a(`config_management.visual.sections.streaming.keepalive_seconds`),htmlFor:p,hint:a(`config_management.visual.sections.streaming.keepalive_hint`),hintId:m,error:be,errorId:h,children:(0,I.jsxs)(`div`,{className:G.fieldControl,children:[(0,I.jsx)(`input`,{id:p,className:`input`,type:`number`,placeholder:`0`,value:e.streaming.keepaliveSeconds,onChange:t=>i({streaming:{...e.streaming,keepaliveSeconds:t.target.value}}),disabled:r}),ue?(0,I.jsx)(`span`,{className:G.inlinePill,children:a(`config_management.visual.sections.streaming.disabled`)}):null]})})}),(0,I.jsx)(yA,{fieldId:`streamingBootstrapRetries`,children:(0,I.jsx)($o,{label:a(`config_management.visual.sections.streaming.bootstrap_retries`),type:`number`,placeholder:`1`,value:e.streaming.bootstrapRetries,onChange:t=>i({streaming:{...e.streaming,bootstrapRetries:t.target.value}}),disabled:r,hint:a(`config_management.visual.sections.streaming.bootstrap_hint`),error:xe})})]}),(0,I.jsx)(gA,{children:(0,I.jsx)(yA,{fieldId:`streamingNonstreamKeepalive`,children:(0,I.jsx)(xA,{label:a(`config_management.visual.sections.streaming.nonstream_keepalive`),htmlFor:g,hint:a(`config_management.visual.sections.streaming.nonstream_keepalive_hint`),hintId:_,error:Se,errorId:v,children:(0,I.jsxs)(`div`,{className:G.fieldControl,children:[(0,I.jsx)(`input`,{id:g,className:`input`,type:`number`,placeholder:`0`,value:e.streaming.nonstreamKeepaliveInterval,onChange:t=>i({streaming:{...e.streaming,nonstreamKeepaliveInterval:t.target.value}}),disabled:r}),de?(0,I.jsx)(`span`,{className:G.inlinePill,children:a(`config_management.visual.sections.streaming.disabled`)}):null]})})})})]})}),(0,I.jsx)(YO,{id:`advanced`,ref:e=>{w.current.advanced=e},indexLabel:`06`,icon:(0,I.jsx)(cs,{size:16}),title:a(`config_management.visual.sections.advanced.title`),description:a(`config_management.visual.sections.advanced.description`),children:(0,I.jsxs)(_A,{children:[(0,I.jsx)(zy,{label:a(`config_management.visual.sections.advanced.plugins_title`),defaultOpen:!1,children:(0,I.jsxs)(_A,{children:[(0,I.jsx)(gA,{children:(0,I.jsx)(yA,{fieldId:`pluginsEnabled`,children:(0,I.jsx)(hA,{title:a(`config_management.visual.sections.system.plugins_enabled`),description:a(`config_management.visual.sections.system.plugins_enabled_desc`),checked:e.pluginsEnabled,disabled:r,onChange:e=>i({pluginsEnabled:e})})})}),(0,I.jsx)(yA,{fieldId:`pluginStoreSources`,children:(0,I.jsx)(bA,{title:a(`config_management.visual.sections.system.plugin_store_sources`),description:a(`config_management.visual.sections.system.plugin_store_sources_desc`),children:(0,I.jsxs)(`div`,{className:G.fieldShell,children:[(0,I.jsx)(`label`,{className:G.fieldLabel,children:a(`config_management.visual.sections.system.plugin_store_sources_label`)}),(0,I.jsx)(aA,{value:e.pluginStoreSources,disabled:r,placeholder:a(`config_management.visual.sections.system.plugin_store_sources_placeholder`),inputAriaLabel:a(`config_management.visual.sections.system.plugin_store_sources_label`),onChange:we}),(0,I.jsx)(`div`,{className:G.fieldHint,children:a(`config_management.visual.sections.system.plugin_store_sources_hint`)})]})})})]})}),(0,I.jsx)(zy,{label:a(`config_management.visual.sections.advanced.signature_title`),defaultOpen:!1,children:(0,I.jsxs)(gA,{children:[(0,I.jsx)(yA,{fieldId:`antigravitySignatureCacheEnabled`,children:(0,I.jsx)(hA,{title:a(`config_management.visual.sections.system.antigravity_signature_cache`),description:a(`config_management.visual.sections.system.antigravity_signature_cache_desc`),checked:e.antigravitySignatureCacheEnabled,disabled:r,onChange:e=>i({antigravitySignatureCacheEnabled:e})})}),(0,I.jsx)(yA,{fieldId:`antigravitySignatureBypassStrict`,children:(0,I.jsx)(hA,{title:a(`config_management.visual.sections.system.antigravity_signature_strict`),description:a(`config_management.visual.sections.system.antigravity_signature_strict_desc`),checked:e.antigravitySignatureBypassStrict,disabled:r,onChange:e=>i({antigravitySignatureBypassStrict:e})})})]})}),(0,I.jsx)(zy,{label:a(`config_management.visual.sections.headers.title`),hint:a(`config_management.visual.sections.headers.description`),defaultOpen:!1,children:(0,I.jsxs)(_A,{children:[(0,I.jsx)(`div`,{className:G.subsectionHeader,children:(0,I.jsx)(`h3`,{className:G.subsectionTitle,children:a(`config_management.visual.sections.headers.claude_title`)})}),(0,I.jsxs)(gA,{children:[(0,I.jsx)(yA,{fieldId:`claudeHeaderUserAgent`,children:(0,I.jsx)($o,{label:a(`config_management.visual.sections.headers.user_agent`),placeholder:`claude-cli/2.1.44 (external, sdk-cli)`,value:e.claudeHeaderUserAgent,onChange:e=>i({claudeHeaderUserAgent:e.target.value}),disabled:r})}),(0,I.jsx)(yA,{fieldId:`claudeHeaderPackageVersion`,children:(0,I.jsx)($o,{label:a(`config_management.visual.sections.headers.package_version`),placeholder:`0.74.0`,value:e.claudeHeaderPackageVersion,onChange:e=>i({claudeHeaderPackageVersion:e.target.value}),disabled:r})}),(0,I.jsx)(yA,{fieldId:`claudeHeaderRuntimeVersion`,children:(0,I.jsx)($o,{label:a(`config_management.visual.sections.headers.runtime_version`),placeholder:`v24.3.0`,value:e.claudeHeaderRuntimeVersion,onChange:e=>i({claudeHeaderRuntimeVersion:e.target.value}),disabled:r})}),(0,I.jsx)(yA,{fieldId:`claudeHeaderOs`,children:(0,I.jsx)($o,{label:a(`config_management.visual.sections.headers.os`),placeholder:`MacOS`,value:e.claudeHeaderOs,onChange:e=>i({claudeHeaderOs:e.target.value}),disabled:r})}),(0,I.jsx)(yA,{fieldId:`claudeHeaderArch`,children:(0,I.jsx)($o,{label:a(`config_management.visual.sections.headers.arch`),placeholder:`arm64`,value:e.claudeHeaderArch,onChange:e=>i({claudeHeaderArch:e.target.value}),disabled:r})}),(0,I.jsx)(yA,{fieldId:`claudeHeaderTimeout`,children:(0,I.jsx)($o,{label:a(`config_management.visual.sections.headers.timeout`),placeholder:`600`,value:e.claudeHeaderTimeout,onChange:e=>i({claudeHeaderTimeout:e.target.value}),disabled:r})})]}),(0,I.jsx)(gA,{children:(0,I.jsx)(yA,{fieldId:`claudeHeaderStabilizeDeviceProfile`,children:(0,I.jsx)(hA,{title:a(`config_management.visual.sections.headers.stabilize_device`),description:a(`config_management.visual.sections.headers.stabilize_device_desc`),checked:e.claudeHeaderStabilizeDeviceProfile,disabled:r,onChange:e=>i({claudeHeaderStabilizeDeviceProfile:e})})})}),(0,I.jsx)(vA,{}),(0,I.jsx)(`div`,{className:G.subsectionHeader,children:(0,I.jsx)(`h3`,{className:G.subsectionTitle,children:a(`config_management.visual.sections.headers.codex_title`)})}),(0,I.jsxs)(gA,{children:[(0,I.jsx)(yA,{fieldId:`codexHeaderUserAgent`,children:(0,I.jsx)($o,{label:a(`config_management.visual.sections.headers.user_agent`),placeholder:`codex_cli_rs/0.114.0 (Mac OS 14.2.0; x86_64) vscode/1.111.0`,value:e.codexHeaderUserAgent,onChange:e=>i({codexHeaderUserAgent:e.target.value}),disabled:r})}),(0,I.jsx)(yA,{fieldId:`codexHeaderBetaFeatures`,children:(0,I.jsx)($o,{label:a(`config_management.visual.sections.headers.beta_features`),placeholder:`multi_agent`,value:e.codexHeaderBetaFeatures,onChange:e=>i({codexHeaderBetaFeatures:e.target.value}),disabled:r})})]}),(0,I.jsx)(gA,{children:(0,I.jsx)(yA,{fieldId:`codexIdentityConfuse`,children:(0,I.jsx)(hA,{title:a(`config_management.visual.sections.headers.codex_identity_confuse`),description:a(`config_management.visual.sections.headers.codex_identity_confuse_desc`),checked:e.codexIdentityConfuse,disabled:r,onChange:e=>i({codexIdentityConfuse:e})})})})]})})]})}),(0,I.jsx)(YO,{id:`payload`,ref:e=>{w.current.payload=e},indexLabel:`07`,icon:(0,I.jsx)(Rs,{size:16}),title:a(`config_management.visual.sections.payload.title`),description:a(`config_management.visual.sections.payload.description`),children:(0,I.jsxs)(_A,{children:[(0,I.jsx)(yA,{fieldId:`payloadDefaultRules`,children:(0,I.jsx)(zy,{label:a(`config_management.visual.sections.payload.default_rules`),hint:a(`config_management.visual.sections.payload.default_rules_desc`),defaultOpen:n,children:(0,I.jsx)(sA,{value:e.payloadDefaultRules,disabled:r,onChange:Te})},`payloadDefaultRules-${Fe}`)}),(0,I.jsx)(yA,{fieldId:`payloadDefaultRawRules`,children:(0,I.jsx)(zy,{label:a(`config_management.visual.sections.payload.default_raw_rules`),hint:a(`config_management.visual.sections.payload.default_raw_rules_desc`),defaultOpen:n,children:(0,I.jsx)(sA,{value:e.payloadDefaultRawRules,disabled:r,rawJsonValues:!0,onChange:Ee})},`payloadDefaultRawRules-${Fe}`)}),(0,I.jsx)(yA,{fieldId:`payloadOverrideRules`,children:(0,I.jsx)(zy,{label:a(`config_management.visual.sections.payload.override_rules`),hint:a(`config_management.visual.sections.payload.override_rules_desc`),defaultOpen:n,children:(0,I.jsx)(sA,{value:e.payloadOverrideRules,disabled:r,protocolFirst:!0,onChange:De})},`payloadOverrideRules-${Fe}`)}),(0,I.jsx)(yA,{fieldId:`payloadOverrideRawRules`,children:(0,I.jsx)(zy,{label:a(`config_management.visual.sections.payload.override_raw_rules`),hint:a(`config_management.visual.sections.payload.override_raw_rules_desc`),defaultOpen:n,children:(0,I.jsx)(sA,{value:e.payloadOverrideRawRules,disabled:r,protocolFirst:!0,rawJsonValues:!0,onChange:Oe})},`payloadOverrideRawRules-${Fe}`)}),(0,I.jsx)(yA,{fieldId:`payloadFilterRules`,children:(0,I.jsx)(zy,{label:a(`config_management.visual.sections.payload.filter_rules`),hint:a(`config_management.visual.sections.payload.filter_rules_desc`),defaultOpen:n,children:(0,I.jsx)(cA,{value:e.payloadFilterRules,disabled:r,onChange:ke})},`payloadFilterRules-${Fe}`)})]})})]})]})]})}function CA(e){if(e<768)return!1;for(let t=0,n=MA.length;;){let r=t+n>>1;if(e<MA[r])n=r;else if(e>=NA[r])t=r+1;else return!0;if(t==n)return!1}}function wA(e){return e>=127462&&e<=127487}function TA(e,t,n=!0,r=!0){return(n?EA:DA)(e,t,r)}function EA(e,t,n){if(t==e.length)return t;t&&kA(e.charCodeAt(t))&&AA(e.charCodeAt(t-1))&&t--;let r=OA(e,t);for(t+=jA(r);t<e.length;){let i=OA(e,t);if(r==PA||i==PA||n&&CA(i))t+=jA(i),r=i;else if(wA(i)){let n=0,r=t-2;for(;r>=0&&wA(OA(e,r));)n++,r-=2;if(n%2==0)break;t+=2}else break}return t}function DA(e,t,n){for(;t>0;){let r=EA(e,t-2,n);if(r<t)return r;t--}return 0}function OA(e,t){let n=e.charCodeAt(t);if(!AA(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return kA(r)?(n-55296<<10)+(r-56320)+65536:n}function kA(e){return e>=56320&&e<57344}function AA(e){return e>=55296&&e<56320}function jA(e){return e<65536?1:2}var MA,NA,PA,FA=o((()=>{MA=[],NA=[],(()=>{let e=`lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o`.split(`,`).map(e=>e?parseInt(e,36):1);for(let t=0,n=0;t<e.length;t++)(t%2?NA:MA).push(n+=e[t])})(),PA=8205}));function IA(e){let t=-1;for(let n of e)t+=n.length+1;return t}function LA(e,t,n=0,r=1e9){for(let i=0,a=0,o=!0;a<e.length&&i<=r;a++){let s=e[a],c=i+s.length;c>=n&&(c>r&&(s=s.slice(0,r-i)),i<n&&(s=s.slice(n-i)),o?(t[t.length-1]+=s,o=!1):t.push(s)),i=c+1}return t}function RA(e,t,n){return LA(e,[``],t,n)}function zA(e,t,n){return t=Math.max(0,Math.min(e.length,t)),[t,Math.max(t,Math.min(e.length,n))]}function BA(e,t,n=!0,r=!0){return TA(e,t,n,r)}function VA(e){return e>=56320&&e<57344}function HA(e){return e>=55296&&e<56320}function UA(e,t){let n=e.charCodeAt(t);if(!HA(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return VA(r)?(n-55296<<10)+(r-56320)+65536:n}function WA(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}function GA(e){return e<65536?1:2}function KA(e,t,n,r=!1){if(t==0&&n<=0)return;let i=e.length-2;i>=0&&n<=0&&n==e[i+1]?e[i]+=t:i>=0&&t==0&&e[i]==0?e[i+1]+=n:r?(e[i]+=t,e[i+1]+=n):e.push(t,n)}function qA(e,t,n){if(n.length==0)return;let r=t.length-2>>1;if(r<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<r;)e.push(Dj.empty);e.push(n)}}function JA(e,t,n){let r=e.inserted;for(let i=0,a=0,o=0;o<e.sections.length;){let s=e.sections[o++],c=e.sections[o++];if(c<0)i+=s,a+=s;else{let l=i,u=a,d=Dj.empty;for(;l+=s,u+=c,c&&r&&(d=d.append(r[o-2>>1])),!(n||o==e.sections.length||e.sections[o+1]<0);)s=e.sections[o++],c=e.sections[o++];t(i,l,a,u,d),i=l,a=u}}}function YA(e,t,n,r=!1){let i=[],a=r?[]:null,o=new Rj(e),s=new Rj(t);for(let e=-1;;)if(o.done&&s.len||s.done&&o.len)throw Error(`Mismatched change set lengths`);else if(o.ins==-1&&s.ins==-1){let e=Math.min(o.len,s.len);KA(i,e,-1),o.forward(e),s.forward(e)}else if(s.ins>=0&&(o.ins<0||e==o.i||o.off==0&&(s.len<o.len||s.len==o.len&&!n))){let t=s.len;for(KA(i,s.ins,-1);t;){let n=Math.min(o.len,t);o.ins>=0&&e<o.i&&o.len<=n&&(KA(i,0,o.ins),a&&qA(a,i,o.text),e=o.i),o.forward(n),t-=n}s.next()}else if(o.ins>=0){let t=0,n=o.len;for(;n;)if(s.ins==-1){let e=Math.min(n,s.len);t+=e,n-=e,s.forward(e)}else if(s.ins==0&&s.len<n)n-=s.len,s.next();else break;KA(i,t,e<o.i?o.ins:0),a&&e<o.i&&qA(a,i,o.text),e=o.i,o.forward(o.len-n)}else if(o.done&&s.done)return a?Lj.createSet(i,a):Ij.create(i);else throw Error(`Mismatched change set lengths`)}function XA(e,t,n=!1){let r=[],i=n?[]:null,a=new Rj(e),o=new Rj(t);for(let e=!1;;)if(a.done&&o.done)return i?Lj.createSet(r,i):Ij.create(r);else if(a.ins==0)KA(r,a.len,0,e),a.next();else if(o.len==0&&!o.done)KA(r,0,o.ins,e),i&&qA(i,r,o.text),o.next();else if(a.done||o.done)throw Error(`Mismatched change set lengths`);else{let t=Math.min(a.len2,o.len),n=r.length;if(a.ins==-1){let n=o.ins==-1?-1:o.off?0:o.ins;KA(r,t,n,e),i&&n&&qA(i,r,o.text)}else o.ins==-1?(KA(r,a.off?0:a.len,t,e),i&&qA(i,r,a.textBit(t))):(KA(r,a.off?0:a.len,o.off?0:o.ins,e),i&&!o.off&&qA(i,r,o.text));e=(a.ins>t||o.ins>=0&&o.len>t)&&(e||r.length>n),a.forward2(t),o.forward(t)}}function ZA(e,t){for(let n of e.ranges)if(n.to>t)throw RangeError(`Selection points outside of document`)}function QA(e,t){return e==t||e.length==t.length&&e.every((e,n)=>e===t[n])}function $A(e,t,n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function ej(e,t){let n=!1;for(let r of t)ij(e,r)&1&&(n=!0);return n}function tj(e,t,n){let r=n.map(t=>e[t.id]),i=n.map(e=>e.type),a=r.filter(e=>!(e&1)),o=e[t.id]>>1;function s(e){let n=[];for(let t=0;t<r.length;t++){let a=aj(e,r[t]);if(i[t]==2)for(let e of a)n.push(e);else n.push(a)}return t.combine(n)}return{create(e){for(let t of r)ij(e,t);return e.values[o]=s(e),1},update(e,n){if(!ej(e,a))return 0;let r=s(e);return t.compare(r,e.values[o])?0:(e.values[o]=r,1)},reconfigure(e,i){let a=ej(e,r),c=i.config.facets[t.id],l=i.facet(t);if(c&&!a&&QA(n,c))return e.values[o]=l,0;let u=s(e);return t.compare(u,l)?(e.values[o]=l,0):(e.values[o]=u,1)}}}function nj(e){return t=>new Kj(t,e)}function rj(e,t,n){let r=[[],[],[],[],[]],i=new Map;function a(e,o){let s=i.get(e);if(s!=null){if(s<=o)return;let t=r[s].indexOf(e);t>-1&&r[s].splice(t,1),e instanceof Jj&&n.delete(e.compartment)}if(i.set(e,o),Array.isArray(e))for(let t of e)a(t,o);else if(e instanceof Jj){if(n.has(e.compartment))throw RangeError(`Duplicate use of compartment in extensions`);let r=t.get(e.compartment)||e.inner;n.set(e.compartment,r),a(r,o)}else if(e instanceof Kj)a(e.inner,e.prec);else if(e instanceof Uj)r[o].push(e),e.provides&&a(e.provides,o);else if(e instanceof Vj)r[o].push(e),e.facet.extensions&&a(e.facet.extensions,Wj.default);else{let t=e.extension;if(!t)throw Error(`Unrecognized extension value in extension set (${e}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);a(t,o)}}return a(e,Wj.default),r.reduce((e,t)=>e.concat(t))}function ij(e,t){if(t&1)return 2;let n=t>>1,r=e.status[n];if(r==4)throw Error(`Cyclic dependency between fields and/or facets`);if(r&2)return r;e.status[n]=4;let i=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|i}function aj(e,t){return t&1?e.config.staticValues[t>>1]:e.values[t>>1]}function oj(e,t){let n=[];for(let r=0,i=0;;){let a,o;if(r<e.length&&(i==t.length||t[i]>=e[r]))a=e[r++],o=e[r++];else if(i<t.length)a=t[i++],o=t[i++];else return n;!n.length||n[n.length-1]<a?n.push(a,o):n[n.length-1]<o&&(n[n.length-1]=o)}}function sj(e,t,n){let r,i,a;return n?(r=t.changes,i=Lj.empty(t.changes.length),a=e.changes.compose(t.changes)):(r=t.changes.map(e.changes),i=e.changes.mapDesc(t.changes,!0),a=e.changes.compose(r)),{changes:a,selection:t.selection?t.selection.map(i):e.selection?.map(r),effects:oM.mapEffects(e.effects,r).concat(oM.mapEffects(t.effects,i)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function cj(e,t,n){let r=t.selection,i=fj(t.annotations);return t.userEvent&&(i=i.concat(sM.userEvent.of(t.userEvent))),{changes:t.changes instanceof Lj?t.changes:Lj.of(t.changes||[],n,e.facet(Qj)),selection:r&&(r instanceof q?r:q.single(r.anchor,r.head)),effects:fj(t.effects),annotations:i,scrollIntoView:!!t.scrollIntoView}}function lj(e,t,n){let r=cj(e,t.length?t[0]:{},e.doc.length);t.length&&t[0].filter===!1&&(n=!1);for(let i=1;i<t.length;i++){t[i].filter===!1&&(n=!1);let a=!!t[i].sequential;r=sj(r,cj(e,t[i],a?r.changes.newLength:e.doc.length),a)}let i=sM.create(e,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return dj(n?uj(i):i)}function uj(e){let t=e.startState,n=!0;for(let r of t.facet($j)){let t=r(e);if(t===!1){n=!1;break}Array.isArray(t)&&(n=n===!0?t:oj(n,t))}if(n!==!0){let r,i;if(n===!1)i=e.changes.invertedDesc,r=Lj.empty(t.doc.length);else{let t=e.changes.filter(n);r=t.changes,i=t.filtered.mapDesc(t.changes).invertedDesc}e=sM.create(t,r,e.selection&&e.selection.map(i),oM.mapEffects(e.effects,i),e.annotations,e.scrollIntoView)}let r=t.facet(eM);for(let n=r.length-1;n>=0;n--){let i=r[n](e);e=i instanceof sM?i:Array.isArray(i)&&i.length==1&&i[0]instanceof sM?i[0]:lj(t,fj(i),!1)}return e}function dj(e){let t=e.startState,n=t.facet(tM),r=e;for(let i=n.length-1;i>=0;i--){let a=n[i](e);a&&Object.keys(a).length&&(r=sj(r,cj(t,a,e.changes.newLength),!0))}return r==e?e:sM.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}function fj(e){return e==null?cM:Array.isArray(e)?e:[e]}function pj(e){if(dM)return dM.test(e);for(let t=0;t<e.length;t++){let n=e[t];if(/\w/.test(n)||n>``&&(n.toUpperCase()!=n.toLowerCase()||uM.test(n)))return!0}return!1}function mj(e){return t=>{if(!/\S/.test(t))return lM.Space;if(pj(t))return lM.Word;for(let n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return lM.Word;return lM.Other}}function hj(e,t,n={}){let r={};for(let t of e)for(let e of Object.keys(t)){let i=t[e],a=r[e];if(a===void 0)r[e]=i;else if(!(a===i||i===void 0))if(Object.hasOwnProperty.call(n,e))r[e]=n[e](a,i);else throw Error(`Config merge conflict for field `+e)}for(let e in t)r[e]===void 0&&(r[e]=t[e]);return r}function gj(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}function _j(e){if(e.length>1)for(let t=e[0],n=1;n<e.length;n++){let r=e[n];if(gj(t,r)>0)return e.slice().sort(gj);t=r}return e}function vj(e,t,n){let r=new Map;for(let t of e)for(let e=0;e<t.chunk.length;e++)t.chunk[e].maxPoint<=0&&r.set(t.chunk[e],t.chunkPos[e]);let i=new Set;for(let e of t)for(let t=0;t<e.chunk.length;t++){let a=r.get(e.chunk[t]);a!=null&&(n?n.mapPos(a):a)==e.chunkPos[t]&&!n?.touchesRange(a,a+e.chunk[t].length)&&i.add(e.chunk[t])}return i}function yj(e,t){for(let n=e[t];;){let r=(t<<1)+1;if(r>=e.length)break;let i=e[r];if(r+1<e.length&&i.compare(e[r+1])>=0&&(i=e[r+1],r++),n.compare(i)<0)break;e[r]=n,e[t]=i,t=r}}function bj(e,t,n,r,i,a){e.goto(t),n.goto(r);let o=r+i,s=r,c=r-t;for(;;){let t=e.to+c-n.to,r=t||e.endSide-n.endSide,i=r<0?e.to+c:n.to,l=Math.min(i,o);if(e.point||n.point?e.point&&n.point&&(e.point==n.point||e.point.eq(n.point))&&xj(e.activeForPoint(e.to),n.activeForPoint(n.to))||a.comparePoint(s,l,e.point,n.point):l>s&&!xj(e.active,n.active)&&a.compareRange(s,l,e.active,n.active),i>o)break;(t||e.openEnd!=n.openEnd)&&a.boundChange&&a.boundChange(i),s=i,r<=0&&e.next(),r>=0&&n.next()}}function xj(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n]&&!e[n].eq(t[n]))return!1;return!0}function Sj(e,t){for(let n=t,r=e.length-1;n<r;n++)e[n]=e[n+1];e.pop()}function Cj(e,t,n){for(let n=e.length-1;n>=t;n--)e[n+1]=e[n];e[t]=n}function wj(e,t){let n=-1,r=1e9;for(let i=0;i<t.length;i++)(t[i]-r||e[i].endSide-e[n].endSide)<0&&(n=i,r=t[i]);return n}function Tj(e,t,n=e.length){let r=0;for(let i=0;i<n&&i<e.length;)e.charCodeAt(i)==9?(r+=t-r%t,i++):(r++,i=BA(e,i));return r}function Ej(e,t,n,r){for(let r=0,i=0;;){if(i>=t)return r;if(r==e.length)break;i+=e.charCodeAt(r)==9?n-i%n:1,r=BA(e,r)}return r===!0?-1:e.length}var Dj,Oj,kj,Aj,jj,Mj,Nj,Pj,Fj,Ij,Lj,Rj,zj,q,Bj,J,Vj,Hj,Uj,Wj,Gj,Kj,qj,Jj,Yj,Xj,Zj,Qj,$j,eM,tM,nM,rM,iM,aM,oM,sM,cM,lM,uM,dM,fM,pM,mM,hM,gM,_M,vM,yM,bM,xM=o((()=>{FA(),Dj=class e{lineAt(e){if(e<0||e>this.length)throw RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=zA(this,e,t);let r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),kj.from(r,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=zA(this,e,t);let n=[];return this.decompose(e,t,n,0),kj.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new Aj(this),i=new Aj(e);for(let e=t,a=t;;){if(r.next(e),i.next(e),e=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(a+=r.value.length,r.done||a>=n)return!0}}iter(e=1){return new Aj(this,e)}iterRange(e,t=this.length){return new jj(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t??(t=this.lines+1);let r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new Mj(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(t){if(t.length==0)throw RangeError(`A document must have at least one line`);return t.length==1&&!t[0]?e.empty:t.length<=32?new Oj(t):kj.from(Oj.split(t,[]))}},Oj=class e extends Dj{constructor(e,t=IA(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.text[i],o=r+a.length;if((t?n:o)>=e)return new Nj(r,o,n,a);r=o+1,n++}}decompose(t,n,r,i){let a=t<=0&&n>=this.length?this:new e(RA(this.text,t,n),Math.min(n,this.length)-Math.max(0,t));if(i&1){let t=r.pop(),n=LA(a.text,t.text.slice(),0,a.length);if(n.length<=32)r.push(new e(n,t.length+a.length));else{let t=n.length>>1;r.push(new e(n.slice(0,t)),new e(n.slice(t)))}}else r.push(a)}replace(t,n,r){if(!(r instanceof e))return super.replace(t,n,r);[t,n]=zA(this,t,n);let i=LA(this.text,LA(r.text,RA(this.text,0,t)),n),a=this.length+r.length-(n-t);return i.length<=32?new e(i,a):kj.from(e.split(i,[]),a)}sliceString(e,t=this.length,n=`
|
||
`){[e,t]=zA(this,e,t);let r=``;for(let i=0,a=0;i<=t&&a<this.text.length;a++){let o=this.text[a],s=i+o.length;i>e&&a&&(r+=n),e<s&&t>i&&(r+=o.slice(Math.max(0,e-i),t-i)),i=s+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(t,n){let r=[],i=-1;for(let a of t)r.push(a),i+=a.length+1,r.length==32&&(n.push(new e(r,i)),r=[],i=-1);return i>-1&&n.push(new e(r,i)),n}},kj=class e extends Dj{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.children[i],o=r+a.length,s=n+a.lines-1;if((t?s:o)>=e)return a.lineInner(e,t,n,r);r=o+1,n=s+1}}decompose(e,t,n,r){for(let i=0,a=0;a<=t&&i<this.children.length;i++){let o=this.children[i],s=a+o.length;if(e<=s&&t>=a){let i=r&(a<=e|(s>=t?2:0));a>=e&&s<=t&&!i?n.push(o):o.decompose(e-a,t-a,n,i)}a=s+1}}replace(t,n,r){if([t,n]=zA(this,t,n),r.lines<this.lines)for(let i=0,a=0;i<this.children.length;i++){let o=this.children[i],s=a+o.length;if(t>=a&&n<=s){let c=o.replace(t-a,n-a,r),l=this.lines-o.lines+c.lines;if(c.lines<l>>4&&c.lines>l>>6){let a=this.children.slice();return a[i]=c,new e(a,this.length-(n-t)+r.length)}return super.replace(a,s,c)}a=s+1}return super.replace(t,n,r)}sliceString(e,t=this.length,n=`
|
||
`){[e,t]=zA(this,e,t);let r=``;for(let i=0,a=0;i<this.children.length&&a<=t;i++){let o=this.children[i],s=a+o.length;a>e&&i&&(r+=n),e<s&&t>a&&(r+=o.sliceString(e-a,t-a,n)),a=s+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(t,n){if(!(t instanceof e))return 0;let r=0,[i,a,o,s]=n>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;i+=n,a+=n){if(i==o||a==s)return r;let e=this.children[i],c=t.children[a];if(e!=c)return r+e.scanIdentical(c,n);r+=e.length+1}}static from(t,n=t.reduce((e,t)=>e+t.length+1,-1)){let r=0;for(let e of t)r+=e.lines;if(r<32){let e=[];for(let n of t)n.flatten(e);return new Oj(e,n)}let i=Math.max(32,r>>5),a=i<<1,o=i>>1,s=[],c=0,l=-1,u=[];function d(t){let n;if(t.lines>a&&t instanceof e)for(let e of t.children)d(e);else t.lines>o&&(c>o||!c)?(f(),s.push(t)):t instanceof Oj&&c&&(n=u[u.length-1])instanceof Oj&&t.lines+n.lines<=32?(c+=t.lines,l+=t.length+1,u[u.length-1]=new Oj(n.text.concat(t.text),n.length+1+t.length)):(c+t.lines>i&&f(),c+=t.lines,l+=t.length+1,u.push(t))}function f(){c!=0&&(s.push(u.length==1?u[0]:e.from(u,l)),l=-1,c=u.length=0)}for(let e of t)d(e);return f(),s.length==1?s[0]:new e(s,n)}},Dj.empty=new Oj([``],0),Aj=class{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value=``,this.nodes=[e],this.offsets=[t>0?1:(e instanceof Oj?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],a=i>>1,o=r instanceof Oj?r.text.length:r.children.length;if(a==(t>0?o:0)){if(n==0)return this.done=!0,this.value=``,this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((i&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=`
|
||
`,this;e--}else if(r instanceof Oj){let i=r.text[a+(t<0?-1:0)];if(this.offsets[n]+=t,i.length>Math.max(0,e))return this.value=e==0?i:t>0?i.slice(e):i.slice(0,i.length-e),this;e-=i.length}else{let i=r.children[a+(t<0?-1:0)];e>i.length?(e-=i.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(i),this.offsets.push(t>0?1:(i instanceof Oj?i.text.length:i.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}},jj=class{constructor(e,t,n){this.value=``,this.done=!1,this.cursor=new Aj(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value=``,this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=``}},Mj=class{constructor(e){this.inner=e,this.afterBreak=!0,this.value=``,this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value=``,this.afterBreak=!1):t?(this.done=!0,this.value=``):n?this.afterBreak?this.value=``:(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}},typeof Symbol<`u`&&(Dj.prototype[Symbol.iterator]=function(){return this.iter()},Aj.prototype[Symbol.iterator]=jj.prototype[Symbol.iterator]=Mj.prototype[Symbol.iterator]=function(){return this}),Nj=class{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}},Pj=/\r\n?|\n/,Fj=(function(e){return e[e.Simple=0]=`Simple`,e[e.TrackDel=1]=`TrackDel`,e[e.TrackBefore=2]=`TrackBefore`,e[e.TrackAfter=3]=`TrackAfter`,e})(Fj||(Fj={})),Ij=class e{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,r=0;t<this.sections.length;){let i=this.sections[t++],a=this.sections[t++];a<0?(e(n,r,i),r+=i):r+=a,n+=i}}iterChangedRanges(e,t=!1){JA(this,e,t)}get invertedDesc(){let t=[];for(let e=0;e<this.sections.length;){let n=this.sections[e++],r=this.sections[e++];r<0?t.push(n,r):t.push(r,n)}return new e(t)}composeDesc(e){return this.empty?e:e.empty?this:XA(this,e)}mapDesc(e,t=!1){return e.empty?this:YA(this,e,t)}mapPos(e,t=-1,n=Fj.Simple){let r=0,i=0;for(let a=0;a<this.sections.length;){let o=this.sections[a++],s=this.sections[a++],c=r+o;if(s<0){if(c>e)return i+(e-r);i+=o}else{if(n!=Fj.Simple&&c>=e&&(n==Fj.TrackDel&&r<e&&c>e||n==Fj.TrackBefore&&r<e||n==Fj.TrackAfter&&c>e))return null;if(c>e||c==e&&t<0&&!o)return e==r||t<0?i:i+s;i+=s}r=c}if(e>r)throw RangeError(`Position ${e} is out of range for changeset of length ${r}`);return i}touchesRange(e,t=e){for(let n=0,r=0;n<this.sections.length&&r<=t;){let i=this.sections[n++],a=this.sections[n++],o=r+i;if(a>=0&&r<=t&&o>=e)return r<e&&o>t?`cover`:!0;r=o}return!1}toString(){let e=``;for(let t=0;t<this.sections.length;){let n=this.sections[t++],r=this.sections[t++];e+=(e?` `:``)+n+(r>=0?`:`+r:``)}return e}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(e=>typeof e!=`number`))throw RangeError(`Invalid JSON representation of ChangeDesc`);return new e(t)}static create(t){return new e(t)}},Lj=class e extends Ij{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw RangeError(`Applying change set to a document with the wrong length`);return JA(this,(t,n,r,i,a)=>e=e.replace(r,r+(n-t),a),!1),e}mapDesc(e,t=!1){return YA(this,e,t,!0)}invert(t){let n=this.sections.slice(),r=[];for(let e=0,i=0;e<n.length;e+=2){let a=n[e],o=n[e+1];if(o>=0){n[e]=o,n[e+1]=a;let s=e>>1;for(;r.length<s;)r.push(Dj.empty);r.push(a?t.slice(i,i+a):Dj.empty)}i+=a}return new e(n,r)}compose(e){return this.empty?e:e.empty?this:XA(this,e,!0)}map(e,t=!1){return e.empty?this:YA(this,e,t,!0)}iterChanges(e,t=!1){JA(this,e,t)}get desc(){return Ij.create(this.sections)}filter(t){let n=[],r=[],i=[],a=new Rj(this);done:for(let e=0,o=0;;){let s=e==t.length?1e9:t[e++];for(;o<s||o==s&&a.len==0;){if(a.done)break done;let e=Math.min(a.len,s-o);KA(i,e,-1);let t=a.ins==-1?-1:a.off==0?a.ins:0;KA(n,e,t),t>0&&qA(r,n,a.text),a.forward(e),o+=e}let c=t[e++];for(;o<c;){if(a.done)break done;let e=Math.min(a.len,c-o);KA(n,e,-1),KA(i,e,a.ins==-1?-1:a.off==0?a.ins:0),a.forward(e),o+=e}}return{changes:new e(n,r),filtered:Ij.create(i)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],r=this.sections[t+1];r<0?e.push(n):r==0?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(t,n,r){let i=[],a=[],o=0,s=null;function c(t=!1){if(!t&&!i.length)return;o<n&&KA(i,n-o,-1);let r=new e(i,a);s=s?s.compose(r.map(s)):r,i=[],a=[],o=0}function l(t){if(Array.isArray(t))for(let e of t)l(e);else if(t instanceof e){if(t.length!=n)throw RangeError(`Mismatched change set length (got ${t.length}, expected ${n})`);c(),s=s?s.compose(t.map(s)):t}else{let{from:e,to:s=e,insert:l}=t;if(e>s||e<0||s>n)throw RangeError(`Invalid change range ${e} to ${s} (in doc of length ${n})`);let u=l?typeof l==`string`?Dj.of(l.split(r||Pj)):l:Dj.empty,d=u.length;if(e==s&&d==0)return;e<o&&c(),e>o&&KA(i,e-o,-1),KA(i,s-e,d),qA(a,i,u),o=s}}return l(t),c(!s),s}static empty(t){return new e(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw RangeError(`Invalid JSON representation of ChangeSet`);let n=[],r=[];for(let e=0;e<t.length;e++){let i=t[e];if(typeof i==`number`)n.push(i,-1);else if(!Array.isArray(i)||typeof i[0]!=`number`||i.some((e,t)=>t&&typeof e!=`string`))throw RangeError(`Invalid JSON representation of ChangeSet`);else if(i.length==1)n.push(i[0],0);else{for(;r.length<e;)r.push(Dj.empty);r[e]=Dj.of(i.slice(1)),n.push(i[0],r[e].length)}}return new e(n,r)}static createSet(t,n){return new e(t,n)}},Rj=class{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?Dj.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?Dj.empty:t[n].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}},zj=class e{constructor(e,t,n){this.from=e,this.to=t,this.flags=n}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(t,n=-1){let r,i;return this.empty?r=i=t.mapPos(this.from,n):(r=t.mapPos(this.from,1),i=t.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new e(r,i,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return q.range(e,t);let n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return q.range(this.anchor,n)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!=`number`||typeof e.head!=`number`)throw RangeError(`Invalid JSON representation for SelectionRange`);return q.range(e.anchor,e.head)}static create(t,n,r){return new e(t,n,r)}},q=class e{constructor(e,t){this.ranges=e,this.mainIndex=t}map(t,n=-1){return t.empty?this:e.create(this.ranges.map(e=>e.map(t,n)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new e([this.main],0)}addRange(t,n=!0){return e.create([t].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(t,n=this.mainIndex){let r=this.ranges.slice();return r[n]=t,e.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||typeof t.main!=`number`||t.main>=t.ranges.length)throw RangeError(`Invalid JSON representation for EditorSelection`);return new e(t.ranges.map(e=>zj.fromJSON(e)),t.main)}static single(t,n=t){return new e([e.range(t,n)],0)}static create(t,n=0){if(t.length==0)throw RangeError(`A selection needs at least one range`);for(let r=0,i=0;i<t.length;i++){let a=t[i];if(a.empty?a.from<=r:a.from<r)return e.normalized(t.slice(),n);r=a.to}return new e(t,n)}static cursor(e,t=0,n,r){return zj.create(e,e,(t==0?0:t<0?8:16)|(n==null?7:Math.min(6,n))|(r??16777215)<<6)}static range(e,t,n,r){let i=(n??16777215)<<6|(r==null?7:Math.min(6,r));return t<e?zj.create(t,e,48|i):zj.create(e,t,(t>e?8:0)|i)}static normalized(t,n=0){let r=t[n];t.sort((e,t)=>e.from-t.from),n=t.indexOf(r);for(let r=1;r<t.length;r++){let i=t[r],a=t[r-1];if(i.empty?i.from<=a.to:i.from<a.to){let o=a.from,s=Math.max(i.to,a.to);r<=n&&n--,t.splice(--r,2,i.anchor>i.head?e.range(s,o):e.range(o,s))}}return new e(t,n)}},Bj=0,J=class e{constructor(e,t,n,r,i){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=r,this.id=Bj++,this.default=e([]),this.extensions=typeof i==`function`?i(this):i}get reader(){return this}static define(t={}){return new e(t.combine||(e=>e),t.compareInput||((e,t)=>e===t),t.compare||(t.combine?(e,t)=>e===t:QA),!!t.static,t.enables)}of(e){return new Vj([],this,0,e)}compute(e,t){if(this.isStatic)throw Error(`Can't compute a static facet`);return new Vj(e,this,1,t)}computeN(e,t){if(this.isStatic)throw Error(`Can't compute a static facet`);return new Vj(e,this,2,t)}from(e,t){return t||(t=e=>e),this.compute([e],n=>t(n.field(e)))}},Vj=class{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=Bj++}dynamicSlot(e){let t=this.value,n=this.facet.compareInput,r=this.id,i=e[r]>>1,a=this.type==2,o=!1,s=!1,c=[];for(let t of this.dependencies)t==`doc`?o=!0:t==`selection`?s=!0:(e[t.id]??1)&1||c.push(e[t.id]);return{create(e){return e.values[i]=t(e),1},update(e,r){if(o&&r.docChanged||s&&(r.docChanged||r.selection)||ej(e,c)){let r=t(e);if(a?!$A(r,e.values[i],n):!n(r,e.values[i]))return e.values[i]=r,1}return 0},reconfigure:(e,o)=>{let s,c=o.config.address[r];if(c!=null){let r=aj(o,c);if(this.dependencies.every(t=>t instanceof J?o.facet(t)===e.facet(t):t instanceof Uj?o.field(t,!1)==e.field(t,!1):!0)||(a?$A(s=t(e),r,n):n(s=t(e),r)))return e.values[i]=r,0}else s=t(e);return e.values[i]=s,1}}}},Hj=J.define({static:!0}),Uj=class e{constructor(e,t,n,r,i){this.id=e,this.createF=t,this.updateF=n,this.compareF=r,this.spec=i,this.provides=void 0}static define(t){let n=new e(Bj++,t.create,t.update,t.compare||((e,t)=>e===t),t);return t.provide&&(n.provides=t.provide(n)),n}create(e){return(e.facet(Hj).find(e=>e.field==this)?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,n)=>{let r=e.values[t],i=this.updateF(r,n);return this.compareF(r,i)?0:(e.values[t]=i,1)},reconfigure:(e,n)=>{let r=e.facet(Hj),i=n.facet(Hj),a;return(a=r.find(e=>e.field==this))&&a!=i.find(e=>e.field==this)?(e.values[t]=a.create(e),1):n.config.address[this.id]==null?(e.values[t]=this.create(e),1):(e.values[t]=n.field(this),0)}}}init(e){return[this,Hj.of({field:this,create:e})]}get extension(){return this}},Wj={lowest:4,low:3,default:2,high:1,highest:0},Gj={highest:nj(Wj.highest),high:nj(Wj.high),default:nj(Wj.default),low:nj(Wj.low),lowest:nj(Wj.lowest)},Kj=class{constructor(e,t){this.inner=e,this.prec=t}},qj=class e{of(e){return new Jj(this,e)}reconfigure(t){return e.reconfigure.of({compartment:this,extension:t})}get(e){return e.config.compartments.get(this)}},Jj=class{constructor(e,t){this.compartment=e,this.inner=t}},Yj=class e{constructor(e,t,n,r,i,a){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=r,this.staticValues=i,this.facets=a,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(t,n,r){let i=[],a=Object.create(null),o=new Map;for(let e of rj(t,n,o))e instanceof Uj?i.push(e):(a[e.facet.id]||(a[e.facet.id]=[])).push(e);let s=Object.create(null),c=[],l=[];for(let e of i)s[e.id]=l.length<<1,l.push(t=>e.slot(t));let u=r?.config.facets;for(let e in a){let t=a[e],n=t[0].facet,i=u&&u[e]||[];if(t.every(e=>e.type==0))if(s[n.id]=c.length<<1|1,QA(i,t))c.push(r.facet(n));else{let e=n.combine(t.map(e=>e.value));c.push(r&&n.compare(e,r.facet(n))?r.facet(n):e)}else{for(let e of t)e.type==0?(s[e.id]=c.length<<1|1,c.push(e.value)):(s[e.id]=l.length<<1,l.push(t=>e.dynamicSlot(t)));s[n.id]=l.length<<1,l.push(e=>tj(e,n,t))}}return new e(t,o,l.map(e=>e(s)),s,c,a)}},Xj=J.define(),Zj=J.define({combine:e=>e.some(e=>e),static:!0}),Qj=J.define({combine:e=>e.length?e[0]:void 0,static:!0}),$j=J.define(),eM=J.define(),tM=J.define(),nM=J.define({combine:e=>e.length?e[0]:!1}),rM=class{constructor(e,t){this.type=e,this.value=t}static define(){return new iM}},iM=class{of(e){return new rM(this,e)}},aM=class{constructor(e){this.map=e}of(e){return new oM(this,e)}},oM=class e{constructor(e,t){this.type=e,this.value=t}map(t){let n=this.type.map(this.value,t);return n===void 0?void 0:n==this.value?this:new e(this.type,n)}is(e){return this.type==e}static define(e={}){return new aM(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let r of e){let e=r.map(t);e&&n.push(e)}return n}},oM.reconfigure=oM.define(),oM.appendConfig=oM.define(),sM=class e{constructor(t,n,r,i,a,o){this.startState=t,this.changes=n,this.selection=r,this.effects=i,this.annotations=a,this.scrollIntoView=o,this._doc=null,this._state=null,r&&ZA(r,n.newLength),a.some(t=>t.type==e.time)||(this.annotations=a.concat(e.time.of(Date.now())))}static create(t,n,r,i,a,o){return new e(t,n,r,i,a,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let n=this.annotation(e.userEvent);return!!(n&&(n==t||n.length>t.length&&n.slice(0,t.length)==t&&n[t.length]==`.`))}},sM.time=rM.define(),sM.userEvent=rM.define(),sM.addToHistory=rM.define(),sM.remote=rM.define(),cM=[],lM=(function(e){return e[e.Word=0]=`Word`,e[e.Space=1]=`Space`,e[e.Other=2]=`Other`,e})(lM||(lM={})),uM=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;try{dM=RegExp(`[\\p{Alphabetic}\\p{Number}_]`,`u`)}catch{}fM=class e{constructor(e,t,n,r,i,a){this.config=e,this.doc=t,this.selection=n,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=i,a&&(a._state=this);for(let e=0;e<this.config.dynamicSlots.length;e++)ij(this,e<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(n==null){if(t)throw RangeError(`Field is not present in this state`);return}return ij(this,n),aj(this,n)}update(...e){return lj(this,e,!0)}applyTransaction(t){let n=this.config,{base:r,compartments:i}=n;for(let e of t.effects)e.is(qj.reconfigure)?(n&&(i=new Map,n.compartments.forEach((e,t)=>i.set(t,e)),n=null),i.set(e.value.compartment,e.value.extension)):e.is(oM.reconfigure)?(n=null,r=e.value):e.is(oM.appendConfig)&&(n=null,r=fj(r).concat(e.value));let a;n?a=t.startState.values.slice():(n=Yj.resolve(r,i,this),a=new e(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(e,t)=>t.reconfigure(e,this),null).values);let o=t.startState.facet(Zj)?t.newSelection:t.newSelection.asSingle();new e(n,t.newDoc,o,a,(e,n)=>n.update(e,t),t)}replaceSelection(e){return typeof e==`string`&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:q.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),r=this.changes(n.changes),i=[n.range],a=fj(n.effects);for(let n=1;n<t.ranges.length;n++){let o=e(t.ranges[n]),s=this.changes(o.changes),c=s.map(r);for(let e=0;e<n;e++)i[e]=i[e].map(c);let l=r.mapDesc(s,!0);i.push(o.range.map(l)),r=r.compose(c),a=oM.mapEffects(a,c).concat(oM.mapEffects(fj(o.effects),l))}return{changes:r,selection:q.create(i,t.mainIndex),effects:a}}changes(t=[]){return t instanceof Lj?t:Lj.of(t,this.doc.length,this.facet(e.lineSeparator))}toText(t){return Dj.of(t.split(this.facet(e.lineSeparator)||Pj))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(ij(this,t),aj(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let r=e[n];r instanceof Uj&&this.config.address[r.id]!=null&&(t[n]=r.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(t,n={},r){if(!t||typeof t.doc!=`string`)throw RangeError(`Invalid JSON representation for EditorState`);let i=[];if(r){for(let e in r)if(Object.prototype.hasOwnProperty.call(t,e)){let n=r[e],a=t[e];i.push(n.init(e=>n.spec.fromJSON(a,e)))}}return e.create({doc:t.doc,selection:q.fromJSON(t.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(t={}){let n=Yj.resolve(t.extensions||[],new Map),r=t.doc instanceof Dj?t.doc:Dj.of((t.doc||``).split(n.staticFacet(e.lineSeparator)||Pj)),i=t.selection?t.selection instanceof q?t.selection:q.single(t.selection.anchor,t.selection.head):q.single(0);return ZA(i,r.length),n.staticFacet(Zj)||(i=i.asSingle()),new e(n,r,i,n.dynamicSlots.map(()=>null),(e,t)=>t.create(e),null)}get tabSize(){return this.facet(e.tabSize)}get lineBreak(){return this.facet(e.lineSeparator)||`
|
||
`}get readOnly(){return this.facet(nM)}phrase(t,...n){for(let n of this.facet(e.phrases))if(Object.prototype.hasOwnProperty.call(n,t)){t=n[t];break}return n.length&&(t=t.replace(/\$(\$|\d*)/g,(e,t)=>{if(t==`$`)return`$`;let r=+(t||1);return!r||r>n.length?e:n[r-1]})),t}languageDataAt(e,t,n=-1){let r=[];for(let i of this.facet(Xj))for(let a of i(this,t,n))Object.prototype.hasOwnProperty.call(a,e)&&r.push(a[e]);return r}charCategorizer(e){return mj(this.languageDataAt(`wordChars`,e).join(``))}wordAt(e){let{text:t,from:n,length:r}=this.doc.lineAt(e),i=this.charCategorizer(e),a=e-n,o=e-n;for(;a>0;){let e=BA(t,a,!1);if(i(t.slice(e,a))!=lM.Word)break;a=e}for(;o<r;){let e=BA(t,o);if(i(t.slice(o,e))!=lM.Word)break;o=e}return a==o?null:q.range(a+n,o+n)}},fM.allowMultipleSelections=Zj,fM.tabSize=J.define({combine:e=>e.length?e[0]:4}),fM.lineSeparator=Qj,fM.readOnly=nM,fM.phrases=J.define({compare(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length==r.length&&n.every(n=>e[n]==t[n])}}),fM.languageData=Xj,fM.changeFilter=$j,fM.transactionFilter=eM,fM.transactionExtender=tM,qj.reconfigure=oM.define(),pM=class{eq(e){return this==e}range(e,t=e){return mM.create(e,t,this)}},pM.prototype.startSide=pM.prototype.endSide=0,pM.prototype.point=!1,pM.prototype.mapMode=Fj.TrackDel,mM=class e{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(t,n,r){return new e(t,n,r)}},hM=class e{constructor(e,t,n,r){this.from=e,this.to=t,this.value=n,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,r=0){let i=n?this.to:this.from;for(let a=r,o=i.length;;){if(a==o)return a;let r=a+o>>1,s=i[r]-e||(n?this.value[r].endSide:this.value[r].startSide)-t;if(r==a)return s>=0?a:o;s>=0?o=r:a=r+1}}between(e,t,n,r){for(let i=this.findIndex(t,-1e9,!0),a=this.findIndex(n,1e9,!1,i);i<a;i++)if(r(this.from[i]+e,this.to[i]+e,this.value[i])===!1)return!1}map(t,n){let r=[],i=[],a=[],o=-1,s=-1;for(let e=0;e<this.value.length;e++){let c=this.value[e],l=this.from[e]+t,u=this.to[e]+t,d,f;if(l==u){let e=n.mapPos(l,c.startSide,c.mapMode);if(e==null||(d=f=e,c.startSide!=c.endSide&&(f=n.mapPos(l,c.endSide),f<d)))continue}else if(d=n.mapPos(l,c.startSide),f=n.mapPos(u,c.endSide),d>f||d==f&&c.startSide>0&&c.endSide<=0)continue;(f-d||c.endSide-c.startSide)<0||(o<0&&(o=d),c.point&&(s=Math.max(s,f-d)),r.push(c),i.push(d-o),a.push(f-o))}return{mapped:r.length?new e(i,a,r,s):null,pos:o}}},gM=class e{constructor(e,t,n,r){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=r}static create(t,n,r,i){return new e(t,n,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(t){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:a=this.length}=t,o=t.filter;if(n.length==0&&!o)return this;if(r&&(n=n.slice().sort(gj)),this.isEmpty)return n.length?e.of(n):this;let s=new vM(this,null,-1).goto(0),c=0,l=[],u=new _M;for(;s.value||c<n.length;)if(c<n.length&&(s.from-n[c].from||s.startSide-n[c].value.startSide)>=0){let e=n[c++];u.addInner(e.from,e.to,e.value)||l.push(e)}else s.rangeIndex==1&&s.chunkIndex<this.chunk.length&&(c==n.length||this.chunkEnd(s.chunkIndex)<n[c].from)&&(!o||i>this.chunkEnd(s.chunkIndex)||a<this.chunkPos[s.chunkIndex])&&u.addChunk(this.chunkPos[s.chunkIndex],this.chunk[s.chunkIndex])?s.nextChunk():((!o||i>s.to||a<s.from||o(s.from,s.to,s.value))&&(u.addInner(s.from,s.to,s.value)||l.push(mM.create(s.from,s.to,s.value))),s.next());return u.finishInner(this.nextLayer.isEmpty&&!l.length?e.empty:this.nextLayer.update({add:l,filter:o,filterFrom:i,filterTo:a}))}map(t){if(t.empty||this.isEmpty)return this;let n=[],r=[],i=-1;for(let e=0;e<this.chunk.length;e++){let a=this.chunkPos[e],o=this.chunk[e],s=t.touchesRange(a,a+o.length);if(s===!1)i=Math.max(i,o.maxPoint),n.push(o),r.push(t.mapPos(a));else if(s===!0){let{mapped:e,pos:s}=o.map(a,t);e&&(i=Math.max(i,e.maxPoint),n.push(e),r.push(s))}}let a=this.nextLayer.map(t);return n.length==0?a:new e(r,n,a||e.empty,i)}between(e,t,n){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let i=this.chunkPos[r],a=this.chunk[r];if(t>=i&&e<=i+a.length&&a.between(i,e-i,t-i,n)===!1)return}this.nextLayer.between(e,t,n)}}iter(e=0){return yM.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return yM.from(e).goto(t)}static compare(e,t,n,r,i=-1){let a=e.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),o=t.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),s=vj(a,o,n),c=new bM(a,s,i),l=new bM(o,s,i);n.iterGaps((e,t,n)=>bj(c,e,l,t,n,r)),n.empty&&n.length==0&&bj(c,0,l,0,0,r)}static eq(e,t,n=0,r){r??(r=999999999);let i=e.filter(e=>!e.isEmpty&&t.indexOf(e)<0),a=t.filter(t=>!t.isEmpty&&e.indexOf(t)<0);if(i.length!=a.length)return!1;if(!i.length)return!0;let o=vj(i,a),s=new bM(i,o,0).goto(n),c=new bM(a,o,0).goto(n);for(;;){if(s.to!=c.to||!xj(s.active,c.active)||s.point&&(!c.point||!s.point.eq(c.point)))return!1;if(s.to>r)return!0;s.next(),c.next()}}static spans(e,t,n,r,i=-1){let a=new bM(e,null,i).goto(t),o=t,s=a.openStart;for(;;){let e=Math.min(a.to,n);if(a.point){let n=a.activeForPoint(a.to),i=a.pointFrom<t?n.length+1:a.point.startSide<0?n.length:Math.min(n.length,s);r.point(o,e,a.point,n,i,a.pointRank),s=Math.min(a.openEnd(e),n.length)}else e>o&&(r.span(o,e,a.active,s),s=a.openEnd(e));if(a.to>n)return s+(a.point&&a.to>n?1:0);o=a.to,a.next()}}static of(e,t=!1){let n=new _M;for(let r of e instanceof mM?[e]:t?_j(e):e)n.add(r.from,r.to,r.value);return n.finish()}static join(t){if(!t.length)return e.empty;let n=t[t.length-1];for(let r=t.length-2;r>=0;r--)for(let i=t[r];i!=e.empty;i=i.nextLayer)n=new e(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}},gM.empty=new gM([],[],null,-1),gM.empty.nextLayer=gM.empty,_M=class e{finishChunk(e){this.chunks.push(new hM(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(t,n,r){this.addInner(t,n,r)||(this.nextLayer||(this.nextLayer=new e)).add(t,n,r)}addInner(e,t,n){let r=e-this.lastTo||n.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw Error("Ranges must be added sorted by `from` position and `startSide`");return r<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(gM.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=gM.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}},vM=class{constructor(e,t,n,r=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){let t=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(t)||this.layer.chunkEnd(this.chunkIndex)<e||t.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}},yM=class e{constructor(e){this.heap=e}static from(t,n=null,r=-1){let i=[];for(let e=0;e<t.length;e++)for(let a=t[e];!a.isEmpty;a=a.nextLayer)a.maxPoint>=r&&i.push(new vM(a,n,r,e));return i.length==1?i[0]:new e(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)yj(this.heap,e);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)yj(this.heap,e);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),yj(this.heap,0)}}},bM=class{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=yM.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){Sj(this.active,e),Sj(this.activeTo,e),Sj(this.activeRank,e),this.minActive=wj(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:r,rank:i}=this.cursor;for(;t<this.activeRank.length&&(i-this.activeRank[t]||r-this.activeTo[t])>0;)t++;Cj(this.active,t,n),Cj(this.activeTo,t,r),Cj(this.activeRank,t,i),e&&Cj(e,t,this.cursor.from),this.minActive=wj(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&Sj(n,r)}else if(!this.cursor.value){this.to=this.endSide=1e9;break}else if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let e=this.cursor.value;if(!e.point)this.addActive(n),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=e,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=e.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}}if(n){this.openStart=0;for(let t=n.length-1;t>=0&&n[t]<e;t--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}}})),SM,CM,wM,TM,EM,DM,OM,kM=o((()=>{SM=`ͼ`,CM=typeof Symbol>`u`?`__`+SM:Symbol.for(SM),wM=typeof Symbol>`u`?`__styleSet`+Math.floor(Math.random()*1e8):Symbol(`styleSet`),TM=typeof globalThis<`u`?globalThis:typeof window<`u`?window:{},EM=class{constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function i(e,t,a,o){let s=[],c=/^@(\w+)\b/.exec(e[0]),l=c&&c[1]==`keyframes`;if(c&&t==null)return a.push(e[0]+`;`);for(let n in t){let o=t[n];if(/&/.test(n))i(n.split(/,\s*/).map(t=>e.map(e=>t.replace(/&/,e))).reduce((e,t)=>e.concat(t)),o,a);else if(o&&typeof o==`object`){if(!c)throw RangeError(`The value of a property (`+n+`) should be a primitive value.`);i(r(n),o,s,l)}else o!=null&&s.push(n.replace(/_.*/,``).replace(/[A-Z]/g,e=>`-`+e.toLowerCase())+`: `+o+`;`)}(s.length||l)&&a.push((n&&!c&&!o?e.map(n):e).join(`, `)+` {`+s.join(` `)+`}`)}for(let t in e)i(r(t),e[t],this.rules)}getRules(){return this.rules.join(`
|
||
`)}static newName(){let e=TM[CM]||1;return TM[CM]=e+1,SM+e.toString(36)}static mount(e,t,n){let r=e[wM],i=n&&n.nonce;r?i&&r.setNonce(i):r=new OM(e,i),r.mount(Array.isArray(t)?t:[t],e)}},DM=new Map,OM=class{constructor(e,t){let n=e.ownerDocument||e,r=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let t=DM.get(n);if(t)return e[wM]=t;this.sheet=new r.CSSStyleSheet,DM.set(n,this)}else this.styleTag=n.createElement(`style`),t&&this.styleTag.setAttribute(`nonce`,t);this.modules=[],e[wM]=this}mount(e,t){let n=this.sheet,r=0,i=0;for(let t=0;t<e.length;t++){let a=e[t],o=this.modules.indexOf(a);if(o<i&&o>-1&&(this.modules.splice(o,1),i--,o=-1),o==-1){if(this.modules.splice(i++,0,a),n)for(let e=0;e<a.rules.length;e++)n.insertRule(a.rules[e],r++)}else{for(;i<o;)r+=this.modules[i++].rules.length;r+=a.rules.length,i++}}if(n)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let e=``;for(let t=0;t<this.modules.length;t++)e+=this.modules[t].getRules()+`
|
||
`;this.styleTag.textContent=e;let n=t.head||t;this.styleTag.parentNode!=n&&n.insertBefore(this.styleTag,n.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute(`nonce`)!=e&&this.styleTag.setAttribute(`nonce`,e)}}}));function AM(e){var t=!(NM&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||PM&&e.shiftKey&&e.key&&e.key.length==1||e.key==`Unidentified`)&&e.key||(e.shiftKey?MM:jM)[e.keyCode]||e.key||`Unidentified`;return t==`Esc`&&(t=`Escape`),t==`Del`&&(t=`Delete`),t==`Left`&&(t=`ArrowLeft`),t==`Up`&&(t=`ArrowUp`),t==`Right`&&(t=`ArrowRight`),t==`Down`&&(t=`ArrowDown`),t}var jM,MM,NM,PM,FM,IM=o((()=>{for(jM={8:`Backspace`,9:`Tab`,10:`Enter`,12:`NumLock`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,44:`PrintScreen`,45:`Insert`,46:`Delete`,59:`;`,61:`=`,91:`Meta`,92:`Meta`,106:`*`,107:`+`,108:`,`,109:`-`,110:`.`,111:`/`,144:`NumLock`,145:`ScrollLock`,160:`Shift`,161:`Shift`,162:`Control`,163:`Control`,164:`Alt`,165:`Alt`,173:`-`,186:`;`,187:`=`,188:`,`,189:`-`,190:`.`,191:`/`,192:"`",219:`[`,220:`\\`,221:`]`,222:`'`},MM={48:`)`,49:`!`,50:`@`,51:`#`,52:`$`,53:`%`,54:`^`,55:`&`,56:`*`,57:`(`,59:`:`,61:`+`,173:`_`,186:`:`,187:`+`,188:`<`,189:`_`,190:`>`,191:`?`,192:`~`,219:`{`,220:`|`,221:`}`,222:`"`},NM=typeof navigator<`u`&&/Mac/.test(navigator.platform),PM=typeof navigator<`u`&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),FM=0;FM<10;FM++)jM[48+FM]=jM[96+FM]=String(FM);for(FM=1;FM<=24;FM++)jM[FM+111]=`F`+FM;for(FM=65;FM<=90;FM++)jM[FM]=String.fromCharCode(FM+32),MM[FM]=String.fromCharCode(FM);for(var e in jM)MM.hasOwnProperty(e)||(MM[e]=jM[e])}));function LM(){var e=arguments[0];typeof e==`string`&&(e=document.createElement(e));var t=1,n=arguments[1];if(n&&typeof n==`object`&&n.nodeType==null&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];typeof i==`string`?e.setAttribute(r,i):i!=null&&(e[r]=i)}t++}for(;t<arguments.length;t++)RM(e,arguments[t]);return e}function RM(e,t){if(typeof t==`string`)e.appendChild(document.createTextNode(t));else if(t!=null)if(t.nodeType!=null)e.appendChild(t);else if(Array.isArray(t))for(var n=0;n<t.length;n++)RM(e,t[n]);else throw RangeError(`Unsupported child node: `+t)}var zM=o((()=>{}));function BM(e){let t;return t=e.nodeType==11?e.getSelection?e:e.ownerDocument:e,t.getSelection()}function VM(e,t){return t?e==t||e.contains(t.nodeType==1?t:t.parentNode):!1}function HM(e,t){if(!t.anchorNode)return!1;try{return VM(e,t.anchorNode)}catch{return!1}}function UM(e){return e.nodeType==3?tN(e,0,e.nodeValue.length).getClientRects():e.nodeType==1?e.getClientRects():[]}function WM(e,t,n,r){return n?qM(e,t,n,r,-1)||qM(e,t,n,r,1):!1}function GM(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t}function KM(e){return e.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function qM(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:JM(e))){if(e.nodeName==`DIV`)return!1;let n=e.parentNode;if(!n||n.nodeType!=1)return!1;t=GM(e)+(i<0?0:1),e=n}else if(e.nodeType==1){if(e=e.childNodes[t+(i<0?-1:0)],e.nodeType==1&&e.contentEditable==`false`)return!1;t=i<0?JM(e):0}else return!1}}function JM(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function YM(e,t){let n=t?e.left:e.right;return{left:n,right:n,top:e.top,bottom:e.bottom}}function XM(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function ZM(e,t){let n=t.width/e.offsetWidth,r=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(t.width-e.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(t.height-e.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function QM(e,t,n,r,i,a,o,s){let c=e.ownerDocument,l=c.defaultView||window;for(let u=e,d=!1;u&&!d;)if(u.nodeType==1){let e,f=u==c.body,p=1,m=1;if(f)e=XM(l);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(d=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let t=u.getBoundingClientRect();({scaleX:p,scaleY:m}=ZM(u,t)),e={left:t.left,right:t.left+u.clientWidth*p,top:t.top,bottom:t.top+u.clientHeight*m}}let h=0,g=0;if(i==`nearest`)t.top<e.top?(g=t.top-(e.top+o),n>0&&t.bottom>e.bottom+g&&(g=t.bottom-e.bottom+o)):t.bottom>e.bottom&&(g=t.bottom-e.bottom+o,n<0&&t.top-g<e.top&&(g=t.top-(e.top+o)));else{let r=t.bottom-t.top,a=e.bottom-e.top;g=(i==`center`&&r<=a?t.top+r/2-a/2:i==`start`||i==`center`&&n<0?t.top-o:t.bottom-a+o)-e.top}if(r==`nearest`?t.left<e.left?(h=t.left-(e.left+a),n>0&&t.right>e.right+h&&(h=t.right-e.right+a)):t.right>e.right&&(h=t.right-e.right+a,n<0&&t.left<e.left+h&&(h=t.left-(e.left+a))):h=(r==`center`?t.left+(t.right-t.left)/2-(e.right-e.left)/2:r==`start`==s?t.left-a:t.right-(e.right-e.left)+a)-e.left,h||g)if(f)l.scrollBy(h,g);else{let e=0,n=0;if(g){let e=u.scrollTop;u.scrollTop+=g/m,n=(u.scrollTop-e)*m}if(h){let t=u.scrollLeft;u.scrollLeft+=h/p,e=(u.scrollLeft-t)*p}t={left:t.left-e,top:t.top-n,right:t.right-e,bottom:t.bottom-n},e&&Math.abs(e-h)<1&&(r=`nearest`),n&&Math.abs(n-g)<1&&(i=`nearest`)}if(f)break;(t.top<e.top||t.bottom>e.bottom||t.left<e.left||t.right>e.right)&&(t={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)}),u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function $M(e){let t=e.ownerDocument,n,r;for(let i=e.parentNode;i&&!(i==t.body||n&&r);)if(i.nodeType==1)!r&&i.scrollHeight>i.clientHeight&&(r=i),!n&&i.scrollWidth>i.clientWidth&&(n=i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;return{x:n,y:r}}function eN(e){if(e.setActive)return e.setActive();if(pI)return e.focus(pI);let t=[];for(let n=e;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(e.focus(pI==null?{get preventScroll(){return pI={preventScroll:!0},!0}}:void 0),!pI){pI=!1;for(let e=0;e<t.length;){let n=t[e++],r=t[e++],i=t[e++];n.scrollTop!=r&&(n.scrollTop=r),n.scrollLeft!=i&&(n.scrollLeft=i)}}}function tN(e,t,n=t){let r=mI||(mI=document.createRange());return r.setEnd(e,n),r.setStart(e,t),r}function nN(e,t,n,r){let i={key:t,code:t,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let a=new KeyboardEvent(`keydown`,i);a.synthetic=!0,e.dispatchEvent(a);let o=new KeyboardEvent(`keyup`,i);return o.synthetic=!0,e.dispatchEvent(o),a.defaultPrevented||o.defaultPrevented}function rN(e){for(;e;){if(e&&(e.nodeType==9||e.nodeType==11&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}function iN(e){for(;e.attributes.length;)e.removeAttributeNode(e.attributes[0])}function aN(e,t){let n=t.focusNode,r=t.focusOffset;if(!n||t.anchorNode!=n||t.anchorOffset!=r)return!1;for(r=Math.min(r,JM(n));;)if(r){if(n.nodeType!=1)return!1;let e=n.childNodes[r-1];e.contentEditable==`false`?r--:(n=e,r=JM(n))}else if(n==e)return!0;else r=GM(n),n=n.parentNode}function oN(e){return e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}function sN(e,t){for(let n=e,r=t;;)if(n.nodeType==3&&r>0)return{node:n,offset:r};else if(n.nodeType==1&&r>0){if(n.contentEditable==`false`)return null;n=n.childNodes[r-1],r=JM(n)}else if(n.parentNode&&!KM(n))r=GM(n),n=n.parentNode;else return null}function cN(e,t){for(let n=e,r=t;;)if(n.nodeType==3&&r<n.nodeValue.length)return{node:n,offset:r};else if(n.nodeType==1&&r<n.childNodes.length){if(n.contentEditable==`false`)return null;n=n.childNodes[r],r=0}else if(n.parentNode&&!KM(n))r=GM(n)+1,n=n.parentNode;else return null}function lN(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}function uN(e,t,n,r,i,a,o,s,c){let{children:l}=e,u=l.length?l[t]:null,d=a.length?a[a.length-1]:null,f=d?d.breakAfter:o;if(!(t==r&&u&&!o&&!f&&a.length<2&&u.merge(n,i,a.length?d:null,n==0,s,c))){if(r<l.length){let e=l[r];e&&(i<e.length||e.breakAfter&&d?.breakAfter)?(t==r&&(e=e.split(i),i=0),!f&&d&&e.merge(0,i,d,!0,0,c)?a[a.length-1]=e:((i||e.children.length&&!e.children[0].length)&&e.merge(0,i,null,!1,0,c),a.push(e))):e?.breakAfter&&(d?d.breakAfter=1:o=1),r++}for(u&&(u.breakAfter=o,n>0&&(!o&&a.length&&u.merge(n,u.length,a[0],!1,s,0)?u.breakAfter=a.shift().breakAfter:(n<u.length||u.children.length&&u.children[u.children.length-1].length==0)&&u.merge(n,u.length,null,!1,s,0),t++));t<r&&a.length;)if(l[r-1].become(a[a.length-1]))r--,a.pop(),c=a.length?0:s;else if(l[t].become(a[0]))t++,a.shift(),s=a.length?0:c;else break;!a.length&&t&&r<l.length&&!l[t-1].breakAfter&&l[r].merge(0,0,l[t-1],!1,s,c)&&t--,(t<r||a.length)&&e.replaceChildren(t,r,a)}}function dN(e,t,n,r,i,a){let o=e.childCursor(),{i:s,off:c}=o.findPos(n,1),{i:l,off:u}=o.findPos(t,-1),d=t-n;for(let e of r)d+=e.length;e.length+=d,uN(e,l,u,s,c,r,0,i,a)}function fN(e,t,n){let r=e.nodeValue.length;t>r&&(t=r);let i=t,a=t,o=0;t==0&&n<0||t==r&&n>=0?Y.chrome||Y.gecko||(t?(i--,o=1):a<r&&(a++,o=-1)):n<0?i--:a<r&&a++;let s=tN(e,i,a).getClientRects();if(!s.length)return null;let c=s[(o?o<0:n>=0)?0:s.length-1];return Y.safari&&!o&&c.width==0&&(c=Array.prototype.find.call(s,e=>e.width)||c),o?YM(c,o<0):c||null}function pN(e,t){let n=e.dom,{children:r}=e,i=0;for(let e=0;i<r.length;i++){let a=r[i],o=e+a.length;if(!(o==e&&a.getSide()<=0)){if(t>e&&t<o&&a.dom.parentNode==n)return a.domAtPos(t-e);if(t<=e)break;e=o}}for(let e=i;e>0;e--){let t=r[e-1];if(t.dom.parentNode==n)return t.domAtPos(t.length)}for(let e=i;e<r.length;e++){let t=r[e];if(t.dom.parentNode==n)return t.domAtPos(0)}return new hI(n,0)}function mN(e,t,n){let r,{children:i}=e;n>0&&t instanceof xI&&i.length&&(r=i[i.length-1])instanceof xI&&r.mark.eq(t.mark)?mN(r,t.children[0],n-1):(i.push(t),t.setParent(e)),e.length+=t.length}function hN(e,t,n){let r=null,i=-1,a=null,o=-1;function s(e,t){for(let c=0,l=0;c<e.children.length&&l<=t;c++){let u=e.children[c],d=l+u.length;d>=t&&(u.children.length?s(u,t-l):(!a||a.isHidden&&(n>0||_N(a,u)))&&(d>t||l==d&&u.getSide()>0)?(a=u,o=t-l):(l<t||l==d&&u.getSide()<0&&!u.isHidden)&&(r=u,i=t-l)),l=d}}s(e,t);let c=(n<0?r:a)||r||a;return c?c.coordsAt(Math.max(0,c==r?i:o),n):gN(e)}function gN(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let n=UM(t);return n[n.length-1]||null}function _N(e,t){let n=e.coordsAt(0,1),r=t.coordsAt(0,1);return n&&r&&r.top<n.bottom}function vN(e,t){for(let n in e)n==`class`&&t.class?t.class+=` `+e.class:n==`style`&&t.style?t.style+=`;`+e.style:t[n]=e[n];return t}function yN(e,t,n){if(e==t)return!0;e||(e=wI),t||(t=wI);let r=Object.keys(e),i=Object.keys(t);if(r.length-(n&&r.indexOf(n)>-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let a of r)if(a!=n&&(i.indexOf(a)==-1||e[a]!==t[a]))return!1;return!0}function bN(e,t,n){let r=!1;if(t)for(let i in t)n&&i in n||(r=!0,i==`style`?e.style.cssText=``:e.removeAttribute(i));if(n)for(let i in n)t&&t[i]==n[i]||(r=!0,i==`style`?e.style.cssText=n[i]:e.setAttribute(i,n[i]));return r}function xN(e){let t=Object.create(null);for(let n=0;n<e.attributes.length;n++){let r=e.attributes[n];t[r.name]=r.value}return t}function SN(e,t=!1){let{inclusiveStart:n,inclusiveEnd:r}=e;return n??(n=e.inclusive),r??(r=e.inclusive),{start:n??t,end:r??t}}function CN(e,t){return e==t||!!(e&&t&&e.compare(t))}function wN(e,t,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=e?n[i]=Math.max(n[i],t):n.push(e,t)}function TN(e,t){for(let n of t)e=new xI(n,[e],e.length);return e}function EN(e){let t=[];for(let n=0;n<e.length;n++)t.push(1<<e[n]);return t}function DN(e){return e<=247?zI[e]:1424<=e&&e<=1524?2:1536<=e&&e<=1785?BI[e-1536]:1774<=e&&e<=2220?4:8192<=e&&e<=8204?256:64336<=e&&e<=65023?4:1}function ON(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!ON(r.inner,i.inner))return!1}return!0}function kN(e,t,n,r,i){for(let a=0;a<=r.length;a++){let o=a?r[a-1].to:t,s=a<r.length?r[a].from:n,c=a?256:i;for(let t=o,n=c,r=c;t<s;t++){let i=DN(e.charCodeAt(t));i==512?i=n:i==8&&r==4&&(i=16),GI[t]=i==4?2:i,i&7&&(r=i),n=i}for(let e=o,t=c,r=c;e<s;e++){let i=GI[e];if(i==128)e<s-1&&t==GI[e+1]&&t&24?i=GI[e]=t:GI[e]=256;else if(i==64){let i=e+1;for(;i<s&&GI[i]==64;)i++;let a=e&&t==8||i<n&&GI[i]==8?r==1?1:8:256;for(let t=e;t<i;t++)GI[t]=a;e=i-1}else i==8&&r==1&&(GI[e]=1);t=i,i&7&&(r=i)}}}function AN(e,t,n,r,i){let a=i==1?2:1;for(let o=0,s=0,c=0;o<=r.length;o++){let l=o?r[o-1].to:t,u=o<r.length?r[o].from:n;for(let t=l,n,r,o;t<u;t++)if(r=VI[n=e.charCodeAt(t)])if(r<0){for(let e=s-3;e>=0;e-=3)if(HI[e+1]==-r){let n=HI[e+2],r=n&2?i:n&4?n&1?a:i:0;r&&(GI[t]=GI[HI[e]]=r),s=e;break}}else if(HI.length==189)break;else HI[s++]=t,HI[s++]=n,HI[s++]=c;else if((o=GI[t])==2||o==1){let e=o==i;c=+!e;for(let t=s-3;t>=0;t-=3){let n=HI[t+2];if(n&2)break;if(e)HI[t+2]|=2;else{if(n&4)break;HI[t+2]|=4}}}}}function jN(e,t,n,r){for(let i=0,a=r;i<=n.length;i++){let o=i?n[i-1].to:e,s=i<n.length?n[i].from:t;for(let c=o;c<s;){let o=GI[c];if(o==256){let o=c+1;for(;;)if(o==s){if(i==n.length)break;o=n[i++].to,s=i<n.length?n[i].from:t}else if(GI[o]==256)o++;else break;let l=a==1,u=l==((o<t?GI[o]:r)==1)?l?1:2:r;for(let t=o,r=i,a=r?n[r-1].to:e;t>c;)t==a&&(t=n[--r].from,a=r?n[r-1].to:e),GI[--t]=u;c=o}else a=o,c++}}}function MN(e,t,n,r,i,a,o){let s=r%2?2:1;if(r%2==i%2)for(let c=t,l=0;c<n;){let t=!0,u=!1;if(l==a.length||c<a[l].from){let e=GI[c];e!=s&&(t=!1,u=e==16)}let d=!t&&s==1?[]:null,f=t?r:r+1,p=c;run:for(;;)if(l<a.length&&p==a[l].from){if(u)break run;let m=a[l];if(!t)for(let e=m.to,t=l+1;;){if(e==n)break run;if(t<a.length&&a[t].from==e)e=a[t++].to;else if(GI[e]==s)break run;else break}l++,d?d.push(m):(m.from>c&&o.push(new WI(c,m.from,f)),NN(e,m.direction==LI==!(f%2)?r:r+1,i,m.inner,m.from,m.to,o),c=m.to),p=m.to}else if(p==n||(t?GI[p]!=s:GI[p]==s))break;else p++;d?MN(e,c,p,r+1,i,d,o):c<p&&o.push(new WI(c,p,f)),c=p}else for(let c=n,l=a.length;c>t;){let n=!0,u=!1;if(!l||c>a[l-1].to){let e=GI[c-1];e!=s&&(n=!1,u=e==16)}let d=!n&&s==1?[]:null,f=n?r:r+1,p=c;run:for(;;)if(l&&p==a[l-1].to){if(u)break run;let m=a[--l];if(!n)for(let e=m.from,n=l;;){if(e==t)break run;if(n&&a[n-1].to==e)e=a[--n].from;else if(GI[e-1]==s)break run;else break}d?d.push(m):(m.to<c&&o.push(new WI(m.to,c,f)),NN(e,m.direction==LI==!(f%2)?r:r+1,i,m.inner,m.from,m.to,o),c=m.from),p=m.from}else if(p==t||(n?GI[p-1]!=s:GI[p-1]==s))break;else p--;d?MN(e,p,c,r+1,i,d,o):p<c&&o.push(new WI(p,c,f)),c=p}}function NN(e,t,n,r,i,a,o){let s=t%2?2:1;kN(e,i,a,r,s),AN(e,i,a,r,s),jN(i,a,r,s),MN(e,i,a,t,n,r,o)}function PN(e,t,n){if(!e)return[new WI(0,0,+(t==RI))];if(t==LI&&!n.length&&!UI.test(e))return FN(e.length);if(n.length)for(;e.length>GI.length;)GI[GI.length]=256;let r=[],i=t==LI?0:1;return NN(e,i,i,n,0,e.length,r),r}function FN(e){return[new WI(0,e,0)]}function IN(e,t,n,r,i){let a=r.head-e.from,o=WI.find(t,a,r.bidiLevel??-1,r.assoc),s=t[o],c=s.side(i,n);if(a==c){let e=o+=i?1:-1;if(e<0||e>=t.length)return null;s=t[o=e],a=s.side(!i,n),c=s.side(i,n)}let l=BA(e.text,a,s.forward(i,n));(l<s.from||l>s.to)&&(l=c),KI=e.text.slice(Math.min(a,l),Math.max(a,l));let u=o==(i?t.length-1:0)?null:t[o+(i?1:-1)];return u&&l==c&&u.level+ +!i<s.level?q.cursor(u.side(!i,n)+e.from,u.forward(i,n)?1:-1,u.level):q.cursor(l+e.from,s.forward(i,n)?-1:1,s.level)}function LN(e,t,n){for(let r=t;r<n;r++){let t=DN(e.charCodeAt(r));if(t==1)return LI;if(t==2||t==4)return RI}return LI}function RN(e,t,n){let r=e.facet(XI);r.length?r[0](t):window.onerror&&window.onerror(String(t),n,void 0,void 0,t)||(n?console.error(n+`:`,t):console.error(t))}function zN(e,t){let n=e.state.facet(vL);if(!n.length)return n;let r=n.map(t=>t instanceof Function?t(e):t),i=[];return gM.spans(r,t.from,t.to,{point(){},span(e,n,r,a){let o=e-t.from,s=n-t.from,c=i;for(let e=r.length-1;e>=0;e--,a--){let n=r[e].spec.bidiIsolate,i;if(n??(n=LN(t.text,o,s)),a>0&&c.length&&(i=c[c.length-1]).to==o&&i.direction==n)i.to=s,c=i.inner;else{let e={from:o,to:s,direction:n,inner:[]};c.push(e),c=e.inner}}}}),i}function BN(e){let t=0,n=0,r=0,i=0;for(let a of e.state.facet(yL)){let o=a(e);o&&(o.left!=null&&(t=Math.max(t,o.left)),o.right!=null&&(n=Math.max(n,o.right)),o.top!=null&&(r=Math.max(r,o.top)),o.bottom!=null&&(i=Math.max(i,o.bottom)))}return{left:t,right:n,top:r,bottom:i}}function VN(e){return e.node.nodeType==1&&e.node.firstChild&&(e.offset==0||e.node.childNodes[e.offset-1].contentEditable==`false`)&&(e.offset==e.node.childNodes.length||e.node.childNodes[e.offset].contentEditable==`false`)}function HN(e,t){let n=e.observer.selectionRange;if(!n.focusNode)return null;let r=sN(n.focusNode,n.focusOffset),i=cN(n.focusNode,n.focusOffset),a=r||i;if(i&&r&&i.node!=r.node){let t=_I.get(i.node);if(!t||t instanceof bI&&t.text!=i.node.nodeValue)a=i;else if(e.docView.lastCompositionAfterCursor){let e=_I.get(r.node);!e||e instanceof bI&&e.text!=r.node.nodeValue||(a=i)}}if(e.docView.lastCompositionAfterCursor=a!=r,!a)return null;let o=t-a.offset;return{from:o,to:o+a.node.nodeValue.length,node:a.node}}function UN(e,t,n){let r=HN(e,n);if(!r)return null;let{node:i,from:a,to:o}=r,s=i.nodeValue;if(/[\n\r]/.test(s)||e.state.doc.sliceString(r.from,r.to)!=s)return null;let c=t.invertedDesc,l=new xL(c.mapPos(a),c.mapPos(o),a,o),u=[];for(let t=i.parentNode;;t=t.parentNode){let n=_I.get(t);if(n instanceof xI)u.push({node:t,deco:n.mark});else if(n instanceof jI||t.nodeName==`DIV`&&t.parentNode==e.contentDOM)return{range:l,text:i,marks:u,line:t};else if(t!=e.contentDOM)u.push({node:t,deco:new OI({inclusive:!0,attributes:xN(t),tagName:t.tagName.toLowerCase()})});else return null}}function WN(e,t){return e.nodeType==1?(t&&e.childNodes[t-1].contentEditable==`false`?1:0)|(t<e.childNodes.length&&e.childNodes[t].contentEditable==`false`?2:0):0}function GN(e,t,n){let r=new wL;return gM.compare(e,t,n,r),r.changes}function KN(e,t){for(let n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable==`false`)return!0;return!1}function qN(e,t){let n=!1;return t&&e.iterChangedRanges((e,r)=>{e<t.to&&r>t.from&&(n=!0)}),n}function JN(e,t,n=1){let r=e.charCategorizer(t),i=e.doc.lineAt(t),a=t-i.from;if(i.length==0)return q.cursor(t);a==0?n=1:a==i.length&&(n=-1);let o=a,s=a;n<0?o=BA(i.text,a,!1):s=BA(i.text,a);let c=r(i.text.slice(o,s));for(;o>0;){let e=BA(i.text,o,!1);if(r(i.text.slice(e,o))!=c)break;o=e}for(;s<i.length;){let e=BA(i.text,s);if(r(i.text.slice(s,e))!=c)break;s=e}return q.range(o+i.from,s+i.from)}function YN(e,t){return t.left>e?t.left-e:Math.max(0,e-t.right)}function XN(e,t){return t.top>e?t.top-e:Math.max(0,e-t.bottom)}function ZN(e,t){return e.top<t.bottom-1&&e.bottom>t.top+1}function QN(e,t){return t<e.top?{top:t,left:e.left,right:e.right,bottom:e.bottom}:e}function $N(e,t){return t>e.bottom?{top:e.top,left:e.left,right:e.right,bottom:t}:e}function eP(e,t,n){let r,i,a,o,s=!1,c,l,u,d;for(let f=e.firstChild;f;f=f.nextSibling){let e=UM(f);for(let p=0;p<e.length;p++){let m=e[p];i&&ZN(i,m)&&(m=QN($N(m,i.bottom),i.top));let h=YN(t,m),g=XN(n,m);if(h==0&&g==0)return f.nodeType==3?tP(f,t,n):eP(f,t,n);(!r||o>g||o==g&&a>h)&&(r=f,i=m,a=h,o=g,s=h?t<m.left?p>0:p<e.length-1:!0),h==0?n>m.bottom&&(!u||u.bottom<m.bottom)?(c=f,u=m):n<m.top&&(!d||d.top>m.top)&&(l=f,d=m):u&&ZN(u,m)?u=$N(u,m.bottom):d&&ZN(d,m)&&(d=QN(d,m.top))}}if(u&&u.bottom>=n?(r=c,i=u):d&&d.top<=n&&(r=l,i=d),!r)return{node:e,offset:0};let f=Math.max(i.left,Math.min(i.right,t));return r.nodeType==3?tP(r,f,n):s&&r.contentEditable!=`false`?eP(r,f,n):{node:e,offset:Array.prototype.indexOf.call(e.childNodes,r)+ +(t>=(i.left+i.right)/2)}}function tP(e,t,n){let r=e.nodeValue.length,i=-1,a=1e9,o=0;for(let s=0;s<r;s++){let r=tN(e,s,s+1).getClientRects();for(let c=0;c<r.length;c++){let l=r[c];if(l.top==l.bottom)continue;o||(o=t-l.left);let u=(l.top>n?l.top-n:n-l.bottom)-1;if(l.left-1<=t&&l.right+1>=t&&u<a){let n=t>=(l.left+l.right)/2,r=n;if(Y.chrome||Y.gecko){let t=tN(e,s).getBoundingClientRect();Math.abs(t.left-l.right)<.1&&(r=!n)}if(u<=0)return{node:e,offset:s+ +!!r};i=s+ +!!r,a=u}}}return{node:e,offset:i>-1?i:o>0?e.nodeValue.length:0}}function nP(e,t,n,r=-1){let i=e.contentDOM.getBoundingClientRect(),a=i.top+e.viewState.paddingTop,o,{docHeight:s}=e.viewState,{x:c,y:l}=t,u=l-a;if(u<0)return 0;if(u>s)return e.state.doc.length;for(let t=e.viewState.heightOracle.textHeight/2,i=!1;o=e.elementAtHeight(u),o.type!=EI.Text;)for(;u=r>0?o.bottom+t:o.top-t,!(u>=0&&u<=s);){if(i)return n?null:0;i=!0,r=-r}l=a+u;let d=o.from;if(d<e.viewport.from)return e.viewport.from==0?0:n?null:rP(e,i,o,c,l);if(d>e.viewport.to)return e.viewport.to==e.state.doc.length?e.state.doc.length:n?null:rP(e,i,o,c,l);let f=e.dom.ownerDocument,p=e.root.elementFromPoint?e.root:f,m=p.elementFromPoint(c,l);m&&!e.contentDOM.contains(m)&&(m=null),m||(c=Math.max(i.left+1,Math.min(i.right-1,c)),m=p.elementFromPoint(c,l),m&&!e.contentDOM.contains(m)&&(m=null));let h,g=-1;if(m&&e.docView.nearest(m)?.isEditable!=0){if(f.caretPositionFromPoint){let e=f.caretPositionFromPoint(c,l);e&&({offsetNode:h,offset:g}=e)}else if(f.caretRangeFromPoint){let e=f.caretRangeFromPoint(c,l);e&&({startContainer:h,startOffset:g}=e)}h&&(!e.contentDOM.contains(h)||Y.safari&&aP(h,g,c)||Y.chrome&&oP(h,g,c))&&(h=void 0),h&&(g=Math.min(JM(h),g))}if(!h||!e.docView.dom.contains(h)){let t=jI.find(e.docView,d);if(!t)return u>o.top+o.height/2?o.to:o.from;({node:h,offset:g}=eP(t.dom,c,l))}let _=e.docView.nearest(h);if(!_)return null;if(_.isWidget&&_.dom?.nodeType==1){let e=_.dom.getBoundingClientRect();return t.y<e.top||t.y<=e.bottom&&t.x<=(e.left+e.right)/2?_.posAtStart:_.posAtEnd}else return _.localPosFromDOM(h,g)+_.posAtStart}function rP(e,t,n,r,i){let a=Math.round((r-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&n.height>e.defaultLineHeight*1.5){let t=e.viewState.heightOracle.textHeight,r=Math.floor((i-n.top-(e.defaultLineHeight-t)*.5)/t);a+=r*e.viewState.heightOracle.lineLength}let o=e.state.sliceDoc(n.from,n.to);return n.from+Ej(o,a,e.state.tabSize)}function iP(e,t,n){let r,i=e;if(e.nodeType!=3||t!=(r=e.nodeValue.length))return!1;for(;;){let e=i.nextSibling;if(e){if(e.nodeName==`BR`)break;return!1}else{let e=i.parentNode;if(!e||e.nodeName==`DIV`)break;i=e}}return tN(e,r-1,r).getBoundingClientRect().right>n}function aP(e,t,n){return iP(e,t,n)}function oP(e,t,n){if(t!=0)return iP(e,t,n);for(let t=e;;){let e=t.parentNode;if(!e||e.nodeType!=1||e.firstChild!=t)return!1;if(e.classList.contains(`cm-line`))break;t=e}return n-(e.nodeType==1?e.getBoundingClientRect():tN(e,0,Math.max(e.nodeValue.length,1)).getBoundingClientRect()).left>5}function sP(e,t,n){let r=e.lineBlockAt(t);if(Array.isArray(r.type)){let e;for(let i of r.type){if(i.from>t)break;if(!(i.to<t)){if(i.from<t&&i.to>t)return i;(!e||i.type==EI.Text&&(e.type!=i.type||(n<0?i.from<t:i.to>t)))&&(e=i)}}return e||r}return r}function cP(e,t,n,r){let i=sP(e,t.head,t.assoc||-1),a=!r||i.type!=EI.Text||!(e.lineWrapping||i.widgetLineBreaks)?null:e.coordsAtPos(t.assoc<0&&t.head>i.from?t.head-1:t.head);if(a){let t=e.dom.getBoundingClientRect(),r=e.textDirectionAt(i.from),o=e.posAtCoords({x:n==(r==II.LTR)?t.right-1:t.left+1,y:(a.top+a.bottom)/2});if(o!=null)return q.cursor(o,n?-1:1)}return q.cursor(n?i.to:i.from,n?-1:1)}function lP(e,t,n,r){let i=e.state.doc.lineAt(t.head),a=e.bidiSpans(i),o=e.textDirectionAt(i.from);for(let s=t,c=null;;){let t=IN(i,a,o,s,n),l=KI;if(!t){if(i.number==(n?e.state.doc.lines:1))return s;l=`
|
||
`,i=e.state.doc.line(i.number+(n?1:-1)),a=e.bidiSpans(i),t=e.visualLineSide(i,!n)}if(!c){if(!r)return t;c=r(l)}else if(!c(l))return s;s=t}}function uP(e,t,n){let r=e.state.charCategorizer(t),i=r(n);return e=>{let t=r(e);return i==lM.Space&&(i=t),i==t}}function dP(e,t,n,r){let i=t.head,a=n?1:-1;if(i==(n?e.state.doc.length:0))return q.cursor(i,t.assoc);let o=t.goalColumn,s,c=e.contentDOM.getBoundingClientRect(),l=e.coordsAtPos(i,t.assoc||-1),u=e.documentTop;if(l)o??(o=l.left-c.left),s=a<0?l.top:l.bottom;else{let t=e.viewState.lineBlockAt(i);o??(o=Math.min(c.right-c.left,e.defaultCharacterWidth*(i-t.from))),s=(a<0?t.top:t.bottom)+u}let d=c.left+o,f=r??e.viewState.heightOracle.textHeight>>1;for(let t=0;;t+=10){let n=s+(f+t)*a,r=nP(e,{x:d,y:n},!1,a);if(n<c.top||n>c.bottom||(a<0?r<i:r>i)){let t=e.docView.coordsForChar(r),i=!t||n<t.top?-1:1;return q.cursor(r,i,void 0,o)}}}function fP(e,t,n){for(;;){let r=0;for(let i of e)i.between(t-1,t+1,(e,i,a)=>{if(t>e&&t<i){let a=r||n||(t-e<i-t?-1:1);t=a<0?e:i,r=a}});if(!r)return t}}function pP(e,t){let n=null;for(let r=0;r<t.ranges.length;r++){let i=t.ranges[r],a=null;if(i.empty){let t=fP(e,i.from,0);t!=i.from&&(a=q.cursor(t,-1))}else{let t=fP(e,i.from,-1),n=fP(e,i.to,1);(t!=i.from||n!=i.to)&&(a=q.range(i.from==i.anchor?t:n,i.from==i.head?t:n))}a&&(n||(n=t.ranges.slice()),n[r]=a)}return n?q.create(n,t.mainIndex):t}function mP(e,t,n){let r=fP(e.state.facet(_L).map(t=>t(e)),n.from,t.head>n.from?-1:1);return r==n.from?n:q.cursor(r,r<n.from?1:-1)}function hP(e,t,n){for(;;){if(!t||n<JM(t))return!1;if(t==e)return!0;n=GM(t)+1,t=t.parentNode}}function gP(e,t){let n;for(;!(e==t||!e);e=e.nextSibling){let t=_I.get(e);if(!(t?.isWidget||e.cmIgnore))return!1;t&&(n||(n=[])).push(t)}if(n){for(let e of n)if(e.overrideDOMText?.length)return!1}return!0}function _P(e,t){let n,{newSel:r}=t,i=e.state.selection.main,a=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:r,to:o}=t.bounds,s=i.from,c=null;(a===8||Y.android&&t.text.length<o-r)&&(s=i.to,c=`end`);let l=bP(e.state.doc.sliceString(r,o,TL),t.text,s-r,c);l&&(Y.chrome&&a==13&&l.toB==l.from+2&&t.text.slice(l.from,l.toB)==TL+TL&&l.toB--,n={from:r+l.from,to:r+l.toA,insert:Dj.of(t.text.slice(l.from,l.toB).split(TL))})}else r&&(!e.hasFocus&&e.state.facet(cL)||r.main.eq(i))&&(r=null);if(!n&&!r)return!1;if(!n&&t.typeOver&&!i.empty&&r&&r.main.empty?n={from:i.from,to:i.to,insert:e.state.doc.slice(i.from,i.to)}:(Y.mac||Y.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&e.contentDOM.getAttribute(`autocorrect`)==`off`?(r&&n.insert.length==2&&(r=q.single(r.main.anchor-1,r.main.head-1)),n={from:n.from,to:n.to,insert:Dj.of([n.insert.toString().replace(`.`,` `)])}):n&&n.from>=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:e.state.doc.slice(i.from,n.from).append(n.insert).append(e.state.doc.slice(n.to,i.to))}:e.state.doc.lineAt(i.from).to<i.to&&e.docView.lineHasWidget(i.to)&&e.inputState.insertingTextAt>Date.now()-50?n={from:i.from,to:i.to,insert:e.state.toText(e.inputState.insertingText)}:Y.chrome&&n&&n.from==n.to&&n.from==i.head&&n.insert.toString()==`
|
||
`&&e.lineWrapping&&(r&&(r=q.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:Dj.of([` `])}),n)return vP(e,n,r,a);if(r&&!r.main.eq(i)){let t=!1,n=`select`;return e.inputState.lastSelectionTime>Date.now()-50&&(e.inputState.lastSelectionOrigin==`select`&&(t=!0),n=e.inputState.lastSelectionOrigin,n==`select.pointer`&&(r=pP(e.state.facet(_L).map(t=>t(e)),r))),e.dispatch({selection:r,scrollIntoView:t,userEvent:n}),!0}else return!1}function vP(e,t,n,r=-1){if(Y.ios&&e.inputState.flushIOSKey(t))return!0;let i=e.state.selection.main;if(Y.android&&(t.to==i.to&&(t.from==i.from||t.from==i.from-1&&e.state.sliceDoc(t.from,i.from)==` `)&&t.insert.length==1&&t.insert.lines==2&&nN(e.contentDOM,`Enter`,13)||(t.from==i.from-1&&t.to==i.to&&t.insert.length==0||r==8&&t.insert.length<t.to-t.from&&t.to>i.head)&&nN(e.contentDOM,`Backspace`,8)||t.from==i.from&&t.to==i.to+1&&t.insert.length==0&&nN(e.contentDOM,`Delete`,46)))return!0;let a=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let o,s=()=>o||(o=yP(e,t,n));return e.state.facet(QI).some(n=>n(e,t.from,t.to,a,s))||e.dispatch(s()),!0}function yP(e,t,n){let r,i=e.state,a=i.selection.main,o=-1;if(t.from==t.to&&t.from<a.from||t.from>a.to){let n=t.from<a.from?-1:1,r=n<0?a.from:a.to,s=fP(i.facet(_L).map(t=>t(e)),r,n);t.from==s&&(o=s)}if(o>-1)r={changes:t,selection:q.cursor(t.from+t.insert.length,-1)};else if(t.from>=a.from&&t.to<=a.to&&t.to-t.from>=(a.to-a.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let n=a.from<t.from?i.sliceDoc(a.from,t.from):``,o=a.to>t.to?i.sliceDoc(t.to,a.to):``;r=i.replaceSelection(e.state.toText(n+t.insert.sliceString(0,void 0,e.state.lineBreak)+o))}else{let o=i.changes(t),s=n&&n.main.to<=o.newLength?n.main:void 0;if(i.selection.ranges.length>1&&(e.inputState.composing>=0||e.inputState.compositionPendingChange)&&t.to<=a.to+10&&t.to>=a.to-10){let c=e.state.sliceDoc(t.from,t.to),l,u=n&&HN(e,n.main.head);if(u){let e=t.insert.length-(t.to-t.from);l={from:u.from,to:u.to-e}}else l=e.state.doc.lineAt(a.head);let d=a.to-t.to;r=i.changeByRange(n=>{if(n.from==a.from&&n.to==a.to)return{changes:o,range:s||n.map(o)};let r=n.to-d,u=r-c.length;if(e.state.sliceDoc(u,r)!=c||r>=l.from&&u<=l.to)return{range:n};let f=i.changes({from:u,to:r,insert:t.insert}),p=n.to-a.to;return{changes:f,range:s?q.range(Math.max(0,s.anchor+p),Math.max(0,s.head+p)):n.map(f)}})}else r={changes:o,selection:s&&i.selection.replaceRange(s)}}let s=`input.type`;return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,s+=`.compose`,e.inputState.compositionFirstChange&&(s+=`.start`,e.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:s,scrollIntoView:!0})}function bP(e,t,n,r){let i=Math.min(e.length,t.length),a=0;for(;a<i&&e.charCodeAt(a)==t.charCodeAt(a);)a++;if(a==i&&e.length==t.length)return null;let o=e.length,s=t.length;for(;o>0&&s>0&&e.charCodeAt(o-1)==t.charCodeAt(s-1);)o--,s--;if(r==`end`){let e=Math.max(0,a-Math.min(o,s));n-=o+e-a}if(o<a&&e.length<t.length){let e=n<=a&&n>=o?a-n:0;a-=e,s=a+(s-o),o=a}else if(s<a){let e=n<=a&&n>=s?a-n:0;a-=e,o=a+(o-s),s=a}return{from:a,toA:o,toB:s}}function xP(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}=e.observer.selectionRange;return n&&(t.push(new DL(n,r)),(i!=n||a!=r)&&t.push(new DL(i,a))),t}function SP(e,t){if(e.length==0)return null;let n=e[0].pos,r=e.length==2?e[1].pos:n;return n>-1&&r>-1?q.single(n+t,r+t):null}function CP(e,t){return(n,r)=>{try{return t.call(e,r,n)}catch(e){RN(n.state,e)}}}function wP(e){let t=Object.create(null);function n(e){return t[e]||(t[e]={observers:[],handlers:[]})}for(let t of e){let e=t.spec,r=e&&e.plugin.domEventHandlers,i=e&&e.plugin.domEventObservers;if(r)for(let e in r){let i=r[e];i&&n(e).handlers.push(CP(t.value,i))}if(i)for(let e in i){let r=i[e];r&&n(e).observers.push(CP(t.value,r))}}for(let e in FL)n(e).handlers.push(FL[e]);for(let e in IL)n(e).observers.push(IL[e]);return t}function TP(e){return Math.max(0,e)*.7+8}function EP(e,t){return Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))}function DP(e,t){let n=e.state.facet(qI);return n.length?n[0](t):Y.mac?t.metaKey:t.ctrlKey}function OP(e,t){let n=e.state.facet(JI);return n.length?n[0](t):Y.mac?!t.altKey:!t.ctrlKey}function kP(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=BM(e.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let e=0;e<i.length;e++){let n=i[e];if(n.left<=t.clientX&&n.right>=t.clientX&&n.top<=t.clientY&&n.bottom>=t.clientY)return!0}return!1}function AP(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target,r;n!=e.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=_I.get(n))&&r.ignoreEvent(t))return!1;return!0}function jP(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement(`textarea`));n.style.cssText=`position: fixed; left: -10000px; top: 10px`,n.focus(),setTimeout(()=>{e.focus(),n.remove(),NP(e,n.value)},50)}function MP(e,t,n){for(let r of e.facet(t))n=r(n,e);return n}function NP(e,t){t=MP(e.state,eL,t);let{state:n}=e,r,i=1,a=n.toText(t),o=a.lines==n.selection.ranges.length;if(UL!=null&&n.selection.ranges.every(e=>e.empty)&&UL==a.toString()){let e=-1;r=n.changeByRange(r=>{let s=n.doc.lineAt(r.from);if(s.from==e)return{range:r};e=s.from;let c=n.toText((o?a.line(i++).text:t)+n.lineBreak);return{changes:{from:s.from,insert:c},range:q.cursor(r.from+c.length)}})}else r=o?n.changeByRange(e=>{let t=a.line(i++);return{changes:{from:e.from,to:e.to,insert:t.text},range:q.cursor(e.from+t.length)}}):n.replaceSelection(a);e.dispatch(r,{userEvent:`input.paste`,scrollIntoView:!0})}function PP(e,t,n,r){if(r==1)return q.cursor(t,n);if(r==2)return JN(e.state,t,n);{let n=jI.find(e.docView,t),r=e.state.doc.lineAt(n?n.posAtEnd:t),i=n?n.posAtStart:r.from,a=n?n.posAtEnd:r.to;return a<e.state.doc.length&&a==r.to&&a++,q.range(i,a)}}function FP(e,t,n,r){let i=jI.find(e.docView,t);if(!i)return 1;let a=t-i.posAtStart;if(a==0)return 1;if(a==i.length)return-1;let o=i.coordsAt(a,-1);if(o&&RL(n,r,o))return-1;let s=i.coordsAt(a,1);return s&&RL(n,r,s)?1:o&&o.bottom>=r?-1:1}function IP(e,t){let n=e.posAtCoords({x:t.clientX,y:t.clientY},!1);return{pos:n,bias:FP(e,n,t.clientX,t.clientY)}}function LP(e){if(!zL)return e.detail;let t=BL,n=HL;return BL=e,HL=Date.now(),VL=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(VL+1)%3:1}function RP(e,t){let n=IP(e,t),r=LP(t),i=e.state.selection;return{update(e){e.docChanged&&(n.pos=e.changes.mapPos(n.pos),i=i.map(e.changes))},get(t,a,o){let s=IP(e,t),c,l=PP(e,s.pos,s.bias,r);if(n.pos!=s.pos&&!a){let t=PP(e,n.pos,n.bias,r),i=Math.min(t.from,l.from),a=Math.max(t.to,l.to);l=i<l.from?q.range(i,a):q.range(a,i)}return a?i.replaceRange(i.main.extend(l.from,l.to)):o&&r==1&&i.ranges.length>1&&(c=zP(i,s.pos))?c:o?i.addRange(l):q.create([l])}}}function zP(e,t){for(let n=0;n<e.ranges.length;n++){let{from:r,to:i}=e.ranges[n];if(r<=t&&i>=t)return q.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-+(e.mainIndex>n))}return null}function BP(e,t,n,r){if(n=MP(e.state,eL,n),!n)return;let i=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:a}=e.inputState,o=r&&a&&OP(e,t)?{from:a.from,to:a.to}:null,s={from:i,insert:n},c=e.state.changes(o?[o,s]:s);e.focus(),e.dispatch({changes:c,selection:{anchor:c.mapPos(i,-1),head:c.mapPos(i,1)},userEvent:o?`move.drop`:`input.drop`}),e.inputState.draggedContent=null}function VP(e,t){let n=e.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement(`textarea`));r.style.cssText=`position: fixed; left: -10000px; top: 10px`,r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout(()=>{r.remove(),e.focus()},50)}function HP(e){let t=[],n=[],r=!1;for(let r of e.selection.ranges)r.empty||(t.push(e.sliceDoc(r.from,r.to)),n.push(r));if(!t.length){let i=-1;for(let{from:r}of e.selection.ranges){let a=e.doc.lineAt(r);a.number>i&&(t.push(a.text),n.push({from:a.from,to:Math.min(e.doc.length,a.to+1)})),i=a.number}r=!0}return{text:MP(e,tL,t.join(e.lineBreak)),ranges:n,linewise:r}}function UP(e,t){let n=[];for(let r of e.facet($I)){let i=r(e,t);i&&n.push(i)}return n.length?e.update({effects:n,annotations:WL.of(!0)}):null}function WP(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=UP(e.state,t);n?e.dispatch(n):e.update([])}},10)}function GP(e){GL.has(e)||(GL.add(e),e.addEventListener(`copy`,()=>{}),e.addEventListener(`cut`,()=>{}))}function KP(){qL=!1}function qP(e,t){return e==t?e:(e.constructor!=t.constructor&&(qL=!0),t)}function JP(e,t){let n,r;e[t]==null&&(n=e[t-1])instanceof nR&&(r=e[t+1])instanceof nR&&e.splice(t-1,3,new nR(n.length+1+r.length))}function YP(e,t,n){let r=new oR;return gM.compare(e,t,n,r,0),r.changes}function XP(e,t){let n=e.getBoundingClientRect(),r=e.ownerDocument,i=r.defaultView||window,a=Math.max(0,n.left),o=Math.min(i.innerWidth,n.right),s=Math.max(0,n.top),c=Math.min(i.innerHeight,n.bottom);for(let t=e.parentNode;t&&t!=r.body;)if(t.nodeType==1){let n=t,r=window.getComputedStyle(n);if((n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)&&r.overflow!=`visible`){let r=n.getBoundingClientRect();a=Math.max(a,r.left),o=Math.min(o,r.right),s=Math.max(s,r.top),c=Math.min(t==e.parentNode?i.innerHeight:c,r.bottom)}t=r.position==`absolute`||r.position==`fixed`?n.offsetParent:n.parentNode}else if(t.nodeType==11)t=t.host;else break;return{left:a-n.left,right:Math.max(a,o)-n.left,top:s-(n.top+t),bottom:Math.max(s,c)-(n.top+t)}}function ZP(e){let t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView||window;return t.left<n.innerWidth&&t.right>0&&t.top<n.innerHeight&&t.bottom>0}function QP(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}function $P(e,t,n){let r=[],i=e,a=0;return gM.spans(n,e,t,{span(){},point(e,t){e>i&&(r.push({from:i,to:e}),a+=e-i),i=t}},20),i<t&&(r.push({from:i,to:t}),a+=t-i),{total:a,ranges:r}}function eF({total:e,ranges:t},n){if(n<=0)return t[0].from;if(n>=1)return t[t.length-1].to;let r=Math.floor(e*n);for(let e=0;;e++){let{from:n,to:i}=t[e],a=i-n;if(r<=a)return n+r;r-=a}}function tF(e,t){let n=0;for(let{from:r,to:i}of e.ranges){if(t<=i){n+=t-r;break}n+=i-r}return n/e.total}function nF(e,t){for(let n of e)if(t(n))return n}function rF(e,t){if(t.scale==1)return e;let n=t.toDOM(e.top),r=t.toDOM(e.bottom);return new XL(e.from,e.length,n,r-n,Array.isArray(e._content)?e._content.map(e=>rF(e,t)):e._content)}function iF(e,t,n){return new EM(t,{finish(t){return/&/.test(t)?t.replace(/&\w*/,t=>{if(t==`&`)return e;if(!n||!n[t])throw RangeError(`Unsupported selector: ${t}`);return n[t]}):e+` `+t}})}function aF(e,t,n){for(;t;){let r=_I.get(t);if(r&&r.parent==e)return r;let i=t.parentNode;t=i==e.dom?n>0?t.nextSibling:t.previousSibling:i}return null}function oF(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,a=t.endOffset,o=e.docView.domAtPos(e.state.selection.main.anchor);return WM(o.node,o.offset,i,a)&&([n,r,i,a]=[i,a,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}}function sF(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return oF(e,n)}let n=null;function r(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.contentDOM.addEventListener(`beforeinput`,r,!0),e.dom.ownerDocument.execCommand(`indent`),e.contentDOM.removeEventListener(`beforeinput`,r,!0),n?oF(e,n):null}function cF(e,t,n){for(let r=e.state.facet(t),i=r.length-1;i>=0;i--){let t=r[i],a=typeof t==`function`?t(e):t;a&&vN(a,n)}return n}function lF(e,t){let n=e.split(/-(?!$)/),r=n[n.length-1];r==`Space`&&(r=` `);let i,a,o,s;for(let e=0;e<n.length-1;++e){let r=n[e];if(/^(cmd|meta|m)$/i.test(r))s=!0;else if(/^a(lt)?$/i.test(r))i=!0;else if(/^(c|ctrl|control)$/i.test(r))a=!0;else if(/^s(hift)?$/i.test(r))o=!0;else if(/^mod$/i.test(r))t==`mac`?s=!0:a=!0;else throw Error(`Unrecognized modifier name: `+r)}return i&&(r=`Alt-`+r),a&&(r=`Ctrl-`+r),s&&(r=`Meta-`+r),o&&(r=`Shift-`+r),r}function uF(e,t,n){return t.altKey&&(e=`Alt-`+e),t.ctrlKey&&(e=`Ctrl-`+e),t.metaKey&&(e=`Meta-`+e),n!==!1&&t.shiftKey&&(e=`Shift-`+e),e}function dF(e){let t=e.facet(kR),n=AR.get(t);return n||AR.set(t,n=pF(t.reduce((e,t)=>e.concat(t),[]))),n}function fF(e,t,n){return mF(dF(e.state),t,e,n)}function pF(e,t=DR){let n=Object.create(null),r=Object.create(null),i=(e,t)=>{let n=r[e];if(n==null)r[e]=t;else if(n!=t)throw Error(`Key binding `+e+` is used both as a regular binding and as a multi-stroke prefix`)},a=(e,r,a,o,s)=>{let c=n[e]||(n[e]=Object.create(null)),l=r.split(/ (?!$)/).map(e=>lF(e,t));for(let t=1;t<l.length;t++){let n=l.slice(0,t).join(` `);i(n,!0),c[n]||(c[n]={preventDefault:!0,stopPropagation:!1,run:[t=>{let r=jR={view:t,prefix:n,scope:e};return setTimeout(()=>{jR==r&&(jR=null)},MR),!0}]})}let u=l.join(` `);i(u,!1);let d=c[u]||(c[u]={preventDefault:!1,stopPropagation:!1,run:(c._any?.run)?.slice()||[]});a&&d.run.push(a),o&&(d.preventDefault=!0),s&&(d.stopPropagation=!0)};for(let r of e){let e=r.scope?r.scope.split(` `):[`editor`];if(r.any)for(let t of e){let e=n[t]||(n[t]=Object.create(null));e._any||(e._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:i}=r;for(let t in e)e[t].run.push(e=>i(e,NR))}let i=r[t]||r.key;if(i)for(let t of e)a(t,i,r.run,r.preventDefault,r.stopPropagation),r.shift&&a(t,`Shift-`+i,r.shift,r.preventDefault,r.stopPropagation)}return n}function mF(e,t,n,r){NR=t;let i=AM(t),a=GA(UA(i,0))==i.length&&i!=` `,o=``,s=!1,c=!1,l=!1;jR&&jR.view==n&&jR.scope==r&&(o=jR.prefix+` `,ML.indexOf(t.keyCode)<0&&(c=!0,jR=null));let u=new Set,d=e=>{if(e){for(let t of e.run)if(!u.has(t)&&(u.add(t),t(n)))return e.stopPropagation&&(l=!0),!0;e.preventDefault&&(e.stopPropagation&&(l=!0),c=!0)}return!1},f=e[r],p,m;return f&&(d(f[o+uF(i,t,!a)])?s=!0:a&&(t.altKey||t.metaKey||t.ctrlKey)&&!(Y.windows&&t.ctrlKey&&t.altKey)&&!(Y.mac&&t.altKey&&!(t.ctrlKey||t.metaKey))&&(p=jM[t.keyCode])&&p!=i?(d(f[o+uF(p,t,!0)])||t.shiftKey&&(m=MM[t.keyCode])!=i&&m!=p&&d(f[o+uF(m,t,!1)]))&&(s=!0):a&&t.shiftKey&&d(f[o+uF(i,t,!0)])&&(s=!0),!s&&d(f._any)&&(s=!0)),c&&(s=!0),s&&l&&t.stopPropagation(),NR=null,s}function hF(e){let t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==II.LTR?t.left:t.right-e.scrollDOM.clientWidth*e.scaleX)-e.scrollDOM.scrollLeft*e.scaleX,top:t.top-e.scrollDOM.scrollTop*e.scaleY}}function gF(e,t,n,r){let i=e.coordsAtPos(t,n*2);if(!i)return r;let a=e.dom.getBoundingClientRect(),o=(i.top+i.bottom)/2,s=e.posAtCoords({x:a.left+1,y:o}),c=e.posAtCoords({x:a.right-1,y:o});return s==null||c==null?r:{from:Math.max(r.from,Math.min(s,c)),to:Math.min(r.to,Math.max(s,c))}}function _F(e,t,n){if(n.to<=e.viewport.from||n.from>=e.viewport.to)return[];let r=Math.max(n.from,e.viewport.from),i=Math.min(n.to,e.viewport.to),a=e.textDirection==II.LTR,o=e.contentDOM,s=o.getBoundingClientRect(),c=hF(e),l=o.querySelector(`.cm-line`),u=l&&window.getComputedStyle(l),d=s.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),f=s.right-(u?parseInt(u.paddingRight):0),p=sP(e,r,1),m=sP(e,i,-1),h=p.type==EI.Text?p:null,g=m.type==EI.Text?m:null;if(h&&(e.lineWrapping||p.widgetLineBreaks)&&(h=gF(e,r,1,h)),g&&(e.lineWrapping||m.widgetLineBreaks)&&(g=gF(e,i,-1,g)),h&&g&&h.from==g.from&&h.to==g.to)return v(y(n.from,n.to,h));{let t=h?y(n.from,null,h):b(p,!1),r=g?y(null,n.to,g):b(m,!0),i=[];return(h||p).to<(g||m).from-(h&&g?1:0)||p.widgetLineBreaks>1&&t.bottom+e.defaultLineHeight/2<r.top?i.push(_(d,t.bottom,f,r.top)):t.bottom<r.top&&e.elementAtHeight((t.bottom+r.top)/2).type==EI.Text&&(t.bottom=r.top=(t.bottom+r.top)/2),v(t).concat(i).concat(v(r))}function _(e,n,r,i){return new PR(t,e-c.left,n-c.top,r-e,i-n)}function v({top:e,bottom:t,horizontal:n}){let r=[];for(let i=0;i<n.length;i+=2)r.push(_(n[i],e,n[i+1],t));return r}function y(t,n,r){let i=1e9,o=-1e9,s=[];function c(t,n,c,l,u){let p=e.coordsAtPos(t,t==r.to?-2:2),m=e.coordsAtPos(c,c==r.from?2:-2);!p||!m||(i=Math.min(p.top,m.top,i),o=Math.max(p.bottom,m.bottom,o),u==II.LTR?s.push(a&&n?d:p.left,a&&l?f:m.right):s.push(!a&&l?d:m.left,!a&&n?f:p.right))}let l=t??r.from,u=n??r.to;for(let r of e.visibleRanges)if(r.to>l&&r.from<u)for(let i=Math.max(r.from,l),a=Math.min(r.to,u);;){let r=e.state.doc.lineAt(i);for(let o of e.bidiSpans(r)){let e=o.from+r.from,s=o.to+r.from;if(e>=a)break;s>i&&c(Math.max(e,i),t==null&&e<=l,Math.min(s,a),n==null&&s>=u,o.dir)}if(i=r.to+1,i>=a)break}return s.length==0&&c(l,t==null,u,n==null,e.textDirection),{top:i,bottom:o,horizontal:s}}function b(e,t){let n=s.top+(t?e.top:e.bottom);return{top:n,bottom:n,horizontal:[]}}}function vF(e,t){return e.constructor==t.constructor&&e.eq(t)}function yF(e){return[dL.define(t=>new FR(t,e)),IR.of(e)]}function bF(e={}){return[LR.of(e),RR,zR,BR,rL.of(!0)]}function xF(e){return e.startState.facet(LR)!=e.state.facet(LR)}function SF(e,t){t.style.animationDuration=e.facet(LR).cursorBlinkRate+`ms`}function CF(){return[HR,UR]}function wF(e,t,n,r,i){t.lastIndex=0;for(let a=e.iterRange(n,r),o=n,s;!a.next().done;o+=a.value.length)if(!a.lineBreak)for(;s=t.exec(a.value);)i(o+s.index,s)}function TF(e,t){let n=e.visibleRanges;if(n.length==1&&n[0].from==e.viewport.from&&n[0].to==e.viewport.to)return n;let r=[];for(let{from:i,to:a}of n)i=Math.max(e.state.doc.lineAt(i).from,i-t),a=Math.min(e.state.doc.lineAt(a).to,a+t),r.length&&r[r.length-1].to>=i?r[r.length-1].to=a:r.push({from:i,to:a});return r}function EF(){if(JR==null&&typeof document<`u`&&document.body){let e=document.body.style;JR=(e.tabSize??e.MozTabSize)!=null}return JR||!1}function DF(e={}){return[YR.of(e),OF()]}function OF(){return XR||(XR=dL.fromClass(class{constructor(e){this.view=e,this.decorations=DI.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(e.state.facet(YR)),this.decorations=this.decorator.createDeco(e)}makeDecorator(e){return new WR({regexp:e.specialChars,decoration:(t,n,r)=>{let{doc:i}=n.state,a=UA(t[0],0);if(a==9){let e=i.lineAt(r),t=n.state.tabSize,a=Tj(e.text,t,r-e.from);return DI.replace({widget:new $R((t-a%t)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[a]||(this.decorationCache[a]=DI.replace({widget:new QR(e,a)}))},boundary:e.replaceTabs?void 0:/[^]/})}update(e){let t=e.state.facet(YR);e.startState.facet(YR)==t?this.decorations=this.decorator.updateDeco(e,this.decorations):(this.decorator=this.makeDecorator(t),this.decorations=this.decorator.createDeco(e.view))}},{decorations:e=>e.decorations}))}function kF(e){return e>=32?ZR:e==10?``:String.fromCharCode(9216+e)}function AF(){return tz}function jF(e){let t=dL.fromClass(class{constructor(t){this.view=t,this.placeholder=e?DI.set([DI.widget({widget:new nz(e),side:1}).range(0)]):DI.none}get decorations(){return this.view.state.doc.length?DI.none:this.placeholder}},{decorations:e=>e.decorations});return typeof e==`string`?[t,X.contentAttributes.of({"aria-placeholder":e})]:t}function MF(e,t,n){let r=Math.min(t.line,n.line),i=Math.max(t.line,n.line),a=[];if(t.off>rz||n.off>rz||t.col<0||n.col<0){let o=Math.min(t.off,n.off),s=Math.max(t.off,n.off);for(let t=r;t<=i;t++){let n=e.doc.line(t);n.length<=s&&a.push(q.range(n.from+o,n.to+s))}}else{let o=Math.min(t.col,n.col),s=Math.max(t.col,n.col);for(let t=r;t<=i;t++){let n=e.doc.line(t),r=Ej(n.text,o,e.tabSize,!0);if(r<0)a.push(q.cursor(n.to));else{let t=Ej(n.text,s,e.tabSize);a.push(q.range(n.from+r,n.from+t))}}}return a}function NF(e,t){let n=e.coordsAtPos(e.viewport.from);return n?Math.round(Math.abs((n.left-t)/e.defaultCharacterWidth)):-1}function PF(e,t){let n=e.posAtCoords({x:t.clientX,y:t.clientY},!1),r=e.state.doc.lineAt(n),i=n-r.from,a=i>rz?-1:i==r.length?NF(e,t.clientX):Tj(r.text,e.state.tabSize,n-r.from);return{line:r.number,col:a,off:i}}function FF(e,t){let n=PF(e,t),r=e.state.selection;return n?{update(e){if(e.docChanged){let t=e.changes.mapPos(e.startState.doc.line(n.line).from),i=e.state.doc.lineAt(t);n={line:i.number,col:n.col,off:Math.min(n.off,i.length)},r=r.map(e.changes)}},get(t,i,a){let o=PF(e,t);if(!o)return r;let s=MF(e.state,n,o);return s.length?a?q.create(s.concat(r.ranges)):q.create(s):r}}:null}function IF(e){let t=e?.eventFilter||(e=>e.altKey&&e.button==0);return X.mouseSelectionStyle.of((e,n)=>t(n)?FF(e,n):null)}function LF(e={}){let[t,n]=iz[e.key||`Alt`],r=dL.fromClass(class{constructor(e){this.view=e,this.isDown=!1}set(e){this.isDown!=e&&(this.isDown=e,this.view.update([]))}},{eventObservers:{keydown(e){this.set(e.keyCode==t||n(e))},keyup(e){(e.keyCode==t||!n(e))&&this.set(!1)},mousemove(e){this.set(n(e))}}});return[r,X.contentAttributes.of(e=>e.plugin(r)?.isDown?az:null)]}function RF(e){let t=e.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:t.clientHeight,right:t.clientWidth}}function zF(e,t){let n=parseInt(e.style.left,10);(isNaN(n)||Math.abs(t-n)>1)&&(e.style.left=t+`px`)}function BF(e,t){let{left:n,right:r,top:i,bottom:a}=e.getBoundingClientRect(),o;if(o=e.querySelector(`.cm-tooltip-arrow`)){let e=o.getBoundingClientRect();i=Math.min(e.top,i),a=Math.max(e.bottom,a)}return t.clientX>=n-vz&&t.clientX<=r+vz&&t.clientY>=i-vz&&t.clientY<=a+vz}function VF(e,t,n,r,i,a){let o=e.scrollDOM.getBoundingClientRect(),s=e.documentTop+e.documentPadding.top+e.contentHeight;if(o.left>r||o.right<r||o.top>i||Math.min(o.bottom,s)<i)return!1;let c=e.posAtCoords({x:r,y:i},!1);return c>=t&&c<=n}function HF(e,t={}){let n=oM.define(),r=Uj.define({create(){return[]},update(e,r){if(e.length&&(t.hideOnChange&&(r.docChanged||r.selection)?e=[]:t.hideOn&&(e=e.filter(e=>!t.hideOn(r,e))),r.docChanged)){let t=[];for(let n of e){let e=r.changes.mapPos(n.pos,-1,Fj.TrackDel);if(e!=null){let i=Object.assign(Object.create(null),n);i.pos=e,i.end!=null&&(i.end=r.changes.mapPos(i.end)),t.push(i)}}e=t}for(let t of r.effects)t.is(n)&&(e=t.value),t.is(yz)&&(e=[]);return e},provide:e=>mz.from(e)});return{active:r,extension:[r,dL.define(i=>new _z(i,e,r,n,t.hoverTime||300)),gz]}}function UF(e,t){let n=e.plugin(uz);if(!n)return null;let r=n.manager.tooltips.indexOf(t);return r<0?null:n.manager.tooltipViews[r]}function WF(e,t){let n=e.plugin(xz),r=n?n.specs.indexOf(t):-1;return r>-1?n.panels[r]:null}function GF(e){let t=e.nextSibling;return e.remove(),t}function KF(e){return[qF(),Oz.of({...Dz,...e})]}function qF(e){let t=[Az];return e&&e.fixed===!1&&t.push(kz.of(!0)),t}function JF(e){return Array.isArray(e)?e:[e]}function YF(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}function XF(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].compare(t[n]))return!1;return!0}function ZF(e,t){return e.state.facet(Iz).formatNumber(t,e.state)}function QF(e={}){return[Iz.of(e),qF(),Rz]}function $F(e){let t=9;for(;t<e;)t=t*10+9;return t}function eI(){return Bz}var tI,nI,rI,iI,aI,oI,sI,cI,lI,uI,dI,Y,fI,pI,mI,hI,gI,_I,vI,yI,bI,xI,SI,CI,wI,TI,EI,DI,OI,kI,AI,jI,MI,NI,PI,FI,II,LI,RI,zI,BI,VI,HI,UI,WI,GI,KI,qI,JI,YI,XI,ZI,QI,$I,eL,tL,nL,rL,iL,aL,oL,sL,cL,lL,uL,dL,fL,pL,mL,hL,gL,_L,vL,yL,bL,xL,SL,CL,wL,TL,EL,DL,OL,kL,AL,jL,ML,NL,PL,FL,IL,LL,RL,zL,BL,VL,HL,UL,WL,GL,KL,qL,JL,YL,XL,ZL,QL,$L,eR,tR,nR,rR,iR,aR,oR,sR,cR,lR,uR,dR,fR,pR,mR,hR,gR,_R,vR,yR,bR,xR,SR,CR,X,wR,TR,ER,DR,OR,kR,AR,jR,MR,NR,PR,FR,IR,LR,RR,zR,BR,VR,HR,UR,WR,GR,KR,qR,JR,YR,XR,ZR,QR,$R,ez,tz,nz,rz,iz,az,oz,sz,cz,lz,uz,dz,fz,pz,mz,hz,gz,_z,vz,yz,bz,xz,Sz,Cz,wz,Tz,Ez,Dz,Oz,kz,Az,jz,Mz,Nz,Pz,Fz,Iz,Lz,Rz,zz,Bz,Vz=o((()=>{xM(),kM(),IM(),tI=typeof navigator<`u`?navigator:{userAgent:``,vendor:``,platform:``},nI=typeof document<`u`?document:{documentElement:{style:{}}},rI=/Edge\/(\d+)/.exec(tI.userAgent),iI=/MSIE \d/.test(tI.userAgent),aI=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(tI.userAgent),oI=!!(iI||aI||rI),sI=!oI&&/gecko\/(\d+)/i.test(tI.userAgent),cI=!oI&&/Chrome\/(\d+)/.exec(tI.userAgent),lI=`webkitFontSmoothing`in nI.documentElement.style,uI=!oI&&/Apple Computer/.test(tI.vendor),dI=uI&&(/Mobile\/\w+/.test(tI.userAgent)||tI.maxTouchPoints>2),Y={mac:dI||/Mac/.test(tI.platform),windows:/Win/.test(tI.platform),linux:/Linux|X11/.test(tI.platform),ie:oI,ie_version:iI?nI.documentMode||6:aI?+aI[1]:rI?+rI[1]:0,gecko:sI,gecko_version:sI?+(/Firefox\/(\d+)/.exec(tI.userAgent)||[0,0])[1]:0,chrome:!!cI,chrome_version:cI?+cI[1]:0,ios:dI,android:/Android\b/.test(tI.userAgent),webkit:lI,webkit_version:lI?+(/\bAppleWebKit\/(\d+)/.exec(tI.userAgent)||[0,0])[1]:0,safari:uI,safari_version:uI?+(/\bVersion\/(\d+(\.\d+)?)/.exec(tI.userAgent)||[0,0])[1]:0,tabSize:nI.documentElement.style.tabSize==null?`-moz-tab-size`:`tab-size`},fI=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?JM(t):0),n,Math.min(e.focusOffset,n?JM(n):0))}set(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}},pI=null,Y.safari&&Y.safari_version>=26&&(pI=!1),hI=class e{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(t,n){return new e(t.parentNode,GM(t),n)}static after(t,n){return new e(t.parentNode,GM(t)+1,n)}},gI=[],_I=class e{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let t=this.posAtStart;for(let n of this.children){if(n==e)return t;t+=n.length+n.breakAfter}throw RangeError(`Invalid child in posBefore`)}posAfter(e){return this.posBefore(e)+e.length}sync(t,n){if(this.flags&2){let r=this.dom,i=null,a;for(let o of this.children){if(o.flags&7){if(!o.dom&&(a=i?i.nextSibling:r.firstChild)){let t=e.get(a);(!t||!t.parent&&t.canReuseDOM(o))&&o.reuseDOM(a)}o.sync(t,n),o.flags&=-8}if(a=i?i.nextSibling:r.firstChild,n&&!n.written&&n.node==r&&a!=o.dom&&(n.written=!0),o.dom.parentNode==r)for(;a&&a!=o.dom;)a=lN(a);else r.insertBefore(o.dom,a);i=o.dom}for(a=i?i.nextSibling:r.firstChild,a&&n&&n.node==r&&(n.written=!0);a;)a=lN(a)}else if(this.flags&1)for(let e of this.children)e.flags&7&&(e.sync(t,n),e.flags&=-8)}reuseDOM(e){}localPosFromDOM(t,n){let r;if(t==this.dom)r=this.dom.childNodes[n];else{let e=JM(t)==0?0:n==0?-1:1;for(;;){let n=t.parentNode;if(n==this.dom)break;e==0&&n.firstChild!=n.lastChild&&(e=t==n.firstChild?-1:1),t=n}r=e<0?t:t.nextSibling}if(r==this.dom.firstChild)return 0;for(;r&&!e.get(r);)r=r.nextSibling;if(!r)return this.length;for(let e=0,t=0;;e++){let n=this.children[e];if(n.dom==r)return t;t+=n.length+n.breakAfter}}domBoundsAround(e,t,n=0){let r=-1,i=-1,a=-1,o=-1;for(let s=0,c=n,l=n;s<this.children.length;s++){let n=this.children[s],u=c+n.length;if(c<e&&u>t)return n.domBoundsAround(e,t,c);if(u>=e&&r==-1&&(r=s,i=c),c>t&&n.dom.parentNode==this.dom){a=s,o=l;break}l=u,c=u+n.breakAfter}return{from:i,to:o<0?n+this.length:o,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:a<this.children.length&&a>=0?this.children[a].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),t.flags&1)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,n=gI){this.markDirty();for(let r=e;r<t;r++){let e=this.children[r];e.parent==this&&n.indexOf(e)<0&&e.destroy()}n.length<250?this.children.splice(e,t-e,...n):this.children=[].concat(this.children.slice(0,e),n,this.children.slice(t));for(let e=0;e<n.length;e++)n[e].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new vI(this.children,e,this.children.length)}childPos(e,t=1){return this.childCursor().findPos(e,t)}toString(){let e=this.constructor.name.replace(`View`,``);return e+(this.children.length?`(`+this.children.join()+`)`:this.length?`[`+(e==`Text`?this.text:this.length)+`]`:``)+(this.breakAfter?`#`:``)}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,t,n,r,i,a){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!((this.flags|e.flags)&8)}getSide(){return 0}destroy(){for(let e of this.children)e.parent==this&&e.destroy();this.parent=null}},_I.prototype.breakAfter=0,vI=class{constructor(e,t,n){this.children=e,this.pos=t,this.i=n,this.off=0}findPos(e,t=1){for(;;){if(e>this.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}},yI=256,bI=class e extends _I{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(t,n,r){return this.flags&8||r&&(!(r instanceof e)||this.length-(n-t)+r.length>yI||r.flags&8)?!1:(this.text=this.text.slice(0,t)+(r?r.text:``)+this.text.slice(n),this.markDirty(),!0)}split(t){let n=new e(this.text.slice(t));return this.text=this.text.slice(0,t),this.markDirty(),n.flags|=this.flags&8,n}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new hI(this.dom,e)}domBoundsAround(e,t,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return fN(this.dom,e,t)}},xI=class e extends _I{constructor(e,t=[],n=0){super(),this.mark=e,this.children=t,this.length=n;for(let e of t)e.setParent(this)}setAttrs(e){if(iN(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(t,n,r,i,a,o){return r&&(!(r instanceof e&&r.mark.eq(this.mark))||t&&a<=0||n<this.length&&o<=0)?!1:(dN(this,t,n,r?r.children.slice():[],a-1,o-1),this.markDirty(),!0)}split(t){let n=[],r=0,i=-1,a=0;for(let e of this.children){let o=r+e.length;o>t&&n.push(r<t?e.split(t-r):e),i<0&&r>=t&&(i=a),r=o,a++}let o=this.length-t;return this.length=t,i>-1&&(this.children.length=i,this.markDirty()),new e(this.mark,n,o)}domAtPos(e){return pN(this,e)}coordsAt(e,t){return hN(this,e,t)}},SI=class e extends _I{static create(t,n,r){return new e(t,n,r)}constructor(e,t,n){super(),this.widget=e,this.length=t,this.side=n,this.prevWidget=null}split(t){let n=e.create(this.widget,this.length-t,this.side);return this.length-=t,n}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable=`false`))}getSide(){return this.side}merge(t,n,r,i,a,o){return r&&(!(r instanceof e)||!this.widget.compare(r.widget)||t>0&&a<=0||n<this.length&&o<=0)?!1:(this.length=t+(r?r.length:0)+(this.length-n),!0)}become(t){return t instanceof e&&t.side==this.side&&this.widget.constructor==t.widget.constructor?(this.widget.compare(t.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=t.widget,this.length=t.length,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(this.length==0)return Dj.empty;let e=this;for(;e.parent;)e=e.parent;let{view:t}=e,n=t&&t.state.doc,r=this.posAtStart;return n?n.slice(r,r+this.length):Dj.empty}domAtPos(e){return(this.length?e==0:this.side>0)?hI.before(this.dom):hI.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let n=this.widget.coordsAt(this.dom,e,t);if(n)return n;let r=this.dom.getClientRects(),i=null;if(!r.length)return null;let a=this.side?this.side<0:e>0;for(let t=a?r.length-1:0;i=r[t],!(e>0?t==0:t==r.length-1||i.top<i.bottom);t+=a?-1:1);return YM(i,!a)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}},CI=class e extends _I{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(t){return t instanceof e&&t.side==this.side}split(){return new e(this.side)}sync(){if(!this.dom){let e=document.createElement(`img`);e.className=`cm-widgetBuffer`,e.setAttribute(`aria-hidden`,`true`),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?hI.before(this.dom):hI.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Dj.empty}get isHidden(){return!0}},bI.prototype.children=SI.prototype.children=CI.prototype.children=gI,wI=Object.create(null),TI=class{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}},EI=(function(e){return e[e.Text=0]=`Text`,e[e.WidgetBefore=1]=`WidgetBefore`,e[e.WidgetAfter=2]=`WidgetAfter`,e[e.WidgetRange=3]=`WidgetRange`,e})(EI||(EI={})),DI=class extends pM{constructor(e,t,n,r){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=r}get heightRelevant(){return!1}static mark(e){return new OI(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new AI(e,t,t,n,e.widget||null,!1)}static replace(e){let t=!!e.block,n,r;if(e.isBlockGap)n=-5e8,r=4e8;else{let{start:i,end:a}=SN(e,t);n=(i?t?-3e8:-1:5e8)-1,r=(a?t?2e8:1:-6e8)+1}return new AI(e,n,r,t,e.widget||null,!0)}static line(e){return new kI(e)}static set(e,t=!1){return gM.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}},DI.none=gM.empty,OI=class e extends DI{constructor(e){let{start:t,end:n}=SN(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||`span`,this.class=e.class||``,this.attrs=e.attributes||null}eq(t){return this==t||t instanceof e&&this.tagName==t.tagName&&(this.class||this.attrs?.class)==(t.class||t.attrs?.class)&&yN(this.attrs,t.attrs,`class`)}range(e,t=e){if(e>=t)throw RangeError(`Mark decorations may not be empty`);return super.range(e,t)}},OI.prototype.point=!1,kI=class e extends DI{constructor(e){super(-2e8,-2e8,null,e)}eq(t){return t instanceof e&&this.spec.class==t.spec.class&&yN(this.spec.attributes,t.spec.attributes)}range(e,t=e){if(t!=e)throw RangeError(`Line decoration ranges must be zero-length`);return super.range(e,t)}},kI.prototype.mapMode=Fj.TrackBefore,kI.prototype.point=!0,AI=class e extends DI{constructor(e,t,n,r,i,a){super(t,n,i,e),this.block=r,this.isReplace=a,this.mapMode=r?t<=0?Fj.TrackBefore:Fj.TrackAfter:Fj.TrackDel}get type(){return this.startSide==this.endSide?this.startSide<=0?EI.WidgetBefore:EI.WidgetAfter:EI.WidgetRange}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof e&&CN(this.widget,t.widget)&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw RangeError(`Invalid range for replacement decoration`);if(!this.isReplace&&t!=e)throw RangeError(`Widget decorations can only have zero-length ranges`);return super.range(e,t)}},AI.prototype.point=!0,jI=class e extends _I{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(t,n,r,i,a,o){if(r){if(!(r instanceof e))return!1;this.dom||r.transferDOM(this)}return i&&this.setDeco(r?r.attrs:null),dN(this,t,n,r?r.children.slice():[],a,o),!0}split(t){let n=new e;if(n.breakAfter=this.breakAfter,this.length==0)return n;let{i:r,off:i}=this.childPos(t);i&&(n.append(this.children[r].split(i),0),this.children[r].merge(i,this.children[r].length,null,!1,0,0),r++);for(let e=r;e<this.children.length;e++)n.append(this.children[e],0);for(;r>0&&this.children[r-1].length==0;)this.children[--r].destroy();return this.children.length=r,this.markDirty(),this.length=t,n}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){yN(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){mN(this,e,t)}addLineDeco(e){let t=e.spec.attributes,n=e.spec.class;t&&(this.attrs=vN(t,this.attrs||{})),n&&(this.attrs=vN({class:n},this.attrs||{}))}domAtPos(e){return pN(this,e)}reuseDOM(e){e.nodeName==`DIV`&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?this.flags&4&&(iN(this.dom),this.dom.className=`cm-line`,this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement(`div`)),this.dom.className=`cm-line`,this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(bN(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add(`cm-line`),this.prevAttrs=void 0),super.sync(e,t);let n=this.dom.lastChild;for(;n&&_I.get(n)instanceof xI;)n=n.lastChild;if(!n||!this.length||n.nodeName!=`BR`&&_I.get(n)?.isEditable==0&&(!Y.ios||!this.children.some(e=>e instanceof bI))){let e=document.createElement(`BR`);e.cmIgnore=!0,this.dom.appendChild(e)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let n of this.children){if(!(n instanceof bI)||/[^ -~]/.test(n.text))return null;let r=UM(n.dom);if(r.length!=1)return null;e+=r[0].width,t=r[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let n=hN(this,e,t);if(!this.children.length&&n&&this.parent){let{heightOracle:e}=this.parent.view.viewState,t=n.bottom-n.top;if(Math.abs(t-e.lineHeight)<2&&e.textHeight<t){let r=(t-e.textHeight)/2;return{top:n.top+r,bottom:n.bottom-r,left:n.left,right:n.left}}}return n}become(t){return t instanceof e&&this.children.length==0&&t.children.length==0&&yN(this.attrs,t.attrs)&&this.breakAfter==t.breakAfter}covers(){return!0}static find(t,n){for(let r=0,i=0;r<t.children.length;r++){let a=t.children[r],o=i+a.length;if(o>=n){if(a instanceof e)return a;if(o>n)break}i=o+a.breakAfter}return null}},MI=class e extends _I{constructor(e,t,n){super(),this.widget=e,this.length=t,this.deco=n,this.breakAfter=0,this.prevWidget=null}merge(t,n,r,i,a,o){return r&&(!(r instanceof e)||!this.widget.compare(r.widget)||t>0&&a<=0||n<this.length&&o<=0)?!1:(this.length=t+(r?r.length:0)+(this.length-n),!0)}domAtPos(e){return e==0?hI.before(this.dom):hI.after(this.dom,e==this.length)}split(t){let n=this.length-t;this.length=t;let r=new e(this.widget,n,this.deco);return r.breakAfter=this.breakAfter,r}get children(){return gI}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable=`false`))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):Dj.empty}domBoundsAround(){return null}become(t){return t instanceof e&&t.widget.constructor==this.widget.constructor?(t.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=t.widget,this.length=t.length,this.deco=t.deco,this.breakAfter=t.breakAfter,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,t){return this.widget.coordsAt(this.dom,e,t)||(this.widget instanceof NI?null:YM(this.dom.getBoundingClientRect(),this.length?e==0:t<=0))}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:t,endSide:n}=this.deco;return t==n?!1:e<0?t<0:n>0}},NI=class extends TI{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement(`div`);return e.className=`cm-gap`,this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+`px`,!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}},PI=class e{constructor(e,t,n,r){this.doc=e,this.pos=t,this.end=n,this.disallowBlockEffectsFor=r,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text=``,this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof MI&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new jI),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(TN(new CI(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof MI)&&this.getLine()}buildText(e,t,n){for(;e>0;){if(this.textOff==this.text.length){let{value:t,lineBreak:n,done:r}=this.cursor.next(this.skip);if(this.skip=0,r)throw Error(`Ran out of text content when drawing inline views`);if(n){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=t,this.textOff=0}let r=Math.min(this.text.length-this.textOff,e),i=Math.min(r,512);this.flushBuffer(t.slice(t.length-n)),this.getLine().append(TN(new bI(this.text.slice(this.textOff,this.textOff+i)),t),n),this.atCursorPos=!0,this.textOff+=i,e-=i,n=r<=i?0:t.length}}span(e,t,n,r){this.buildText(t-e,n,r),this.pos=t,this.openStart<0&&(this.openStart=r)}point(e,t,n,r,i,a){if(this.disallowBlockEffectsFor[a]&&n instanceof AI){if(n.block)throw RangeError(`Block decorations may not be specified via plugins`);if(t>this.doc.lineAt(this.pos).to)throw RangeError(`Decorations that replace line breaks may not be specified via plugins`)}let o=t-e;if(n instanceof AI)if(n.block)n.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new MI(n.widget||FI.block,o,n));else{let a=SI.create(n.widget||FI.inline,o,o?0:n.startSide),s=this.atCursorPos&&!a.isEditable&&i<=r.length&&(e<t||n.startSide>0),c=!a.isEditable&&(e<t||i>r.length||n.startSide<=0),l=this.getLine();this.pendingBuffer==2&&!s&&!a.isEditable&&(this.pendingBuffer=0),this.flushBuffer(r),s&&(l.append(TN(new CI(1),r),i),i=r.length+Math.max(0,i-r.length)),l.append(TN(a,r),i),this.atCursorPos=c,this.pendingBuffer=c?e<t||i>r.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);o&&(this.textOff+o<=this.text.length?this.textOff+=o:(this.skip+=o-(this.text.length-this.textOff),this.text=``,this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=i)}static build(t,n,r,i,a){let o=new e(t,n,r,a);return o.openEnd=gM.spans(i,n,r,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}},FI=class extends TI{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}},FI.inline=new FI(`span`),FI.block=new FI(`div`),II=(function(e){return e[e.LTR=0]=`LTR`,e[e.RTL=1]=`RTL`,e})(II||(II={})),LI=II.LTR,RI=II.RTL,zI=EN(`88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008`),BI=EN(`4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333`),VI=Object.create(null),HI=[];for(let e of[`()`,`[]`,`{}`]){let t=e.charCodeAt(0),n=e.charCodeAt(1);VI[t]=n,VI[n]=-t}UI=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/,WI=class{get dir(){return this.level%2?RI:LI}constructor(e,t,n){this.from=e,this.to=t,this.level=n}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,n,r){let i=-1;for(let a=0;a<e.length;a++){let o=e[a];if(o.from<=t&&o.to>=t){if(o.level==n)return a;(i<0||(r==0?e[i].level>o.level:r<0?o.from<t:o.to>t))&&(i=a)}}if(i<0)throw RangeError(`Index out of range`);return i}},GI=[],KI=``,qI=J.define(),JI=J.define(),YI=J.define(),XI=J.define(),ZI=J.define(),QI=J.define(),$I=J.define(),eL=J.define(),tL=J.define(),nL=J.define({combine:e=>e.some(e=>e)}),rL=J.define({combine:e=>e.some(e=>e)}),iL=J.define(),aL=class e{constructor(e,t=`nearest`,n=`nearest`,r=5,i=5,a=!1){this.range=e,this.y=t,this.x=n,this.yMargin=r,this.xMargin=i,this.isSnapshot=a}map(t){return t.empty?this:new e(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(t){return this.range.to<=t.doc.length?this:new e(q.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}},oL=oM.define({map:(e,t)=>e.map(t)}),sL=oM.define(),cL=J.define({combine:e=>e.length?e[0]:!0}),lL=0,uL=J.define({combine(e){return e.filter((t,n)=>{for(let r=0;r<n;r++)if(e[r].plugin==t.plugin)return!1;return!0})}}),dL=class e{constructor(e,t,n,r,i){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=r,this.baseExtensions=i(this),this.extension=this.baseExtensions.concat(uL.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(uL.of({plugin:this,arg:e}))}static define(t,n){let{eventHandlers:r,eventObservers:i,provide:a,decorations:o}=n||{};return new e(lL++,t,r,i,e=>{let t=[];return o&&t.push(hL.of(t=>{let n=t.plugin(e);return n?o(n):DI.none})),a&&t.push(a(e)),t})}static fromClass(t,n){return e.define((e,n)=>new t(e,n),n)}},fL=class{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(!this.value){if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){RN(e.state,t,`CodeMirror plugin crashed`),this.deactivate()}}else if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(RN(e.state,t,`CodeMirror plugin crashed`),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}return this}destroy(e){if(this.value?.destroy)try{this.value.destroy()}catch(t){RN(e.state,t,`CodeMirror plugin crashed`)}}deactivate(){this.spec=this.value=null}},pL=J.define(),mL=J.define(),hL=J.define(),gL=J.define(),_L=J.define(),vL=J.define(),yL=J.define(),bL=J.define(),xL=class e{constructor(e,t,n,r){this.fromA=e,this.toA=t,this.fromB=n,this.toB=r}join(t){return new e(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let r=e[t-1];if(!(r.fromA>n.toA)){if(r.toA<n.fromA)break;n=n.join(r),e.splice(t-1,1)}}return e.splice(t,0,n),e}static extendWithRanges(t,n){if(n.length==0)return t;let r=[];for(let i=0,a=0,o=0,s=0;;i++){let c=i==t.length?null:t[i],l=o-s,u=c?c.fromB:1e9;for(;a<n.length&&n[a]<u;){let t=n[a],i=n[a+1],o=Math.max(s,t),c=Math.min(u,i);if(o<=c&&new e(o+l,c+l,o,c).addToSet(r),i>u)break;a+=2}if(!c)return r;new e(c.fromA,c.toA,c.fromB,c.toB).addToSet(r),o=c.toA,s=c.toB}}},SL=class e{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=Lj.empty(this.startState.doc.length);for(let e of n)this.changes=this.changes.compose(e.changes);let r=[];this.changes.iterChangedRanges((e,t,n,i)=>r.push(new xL(e,t,n,i))),this.changedRanges=r}static create(t,n,r){return new e(t,n,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}},CL=class extends _I{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=DI.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new jI],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new xL(0,0,0,e.state.doc.length)],0,null)}update(e){let t=e.changedRanges;this.minWidth>0&&t.length&&(t.every(({fromA:e,toA:t})=>t<this.minWidthFrom||e>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let n=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(this.domChanged?.newSel?n=this.domChanged.newSel.head:!qN(e.changes,this.hasComposition)&&!e.selectionSet&&(n=e.state.selection.main.head));let r=n>-1?UN(this.view,e.changes,n):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:n,to:r}=this.hasComposition;t=new xL(n,r,e.changes.mapPos(n,-1),e.changes.mapPos(r,1)).addToSet(t.slice())}this.hasComposition=r?{from:r.range.fromB,to:r.range.toB}:null,(Y.ie||Y.chrome)&&!r&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let i=this.decorations,a=GN(i,this.updateDeco(),e.changes);return t=xL.extendWithRanges(t,a),!(this.flags&7)&&t.length==0?!1:(this.updateInner(t,e.startState.doc.length,r),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,n){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,n);let{observer:r}=this.view;r.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+`px`,this.dom.style.flexBasis=this.minWidth?this.minWidth+`px`:``;let e=Y.chrome||Y.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,e),this.flags&=-8,e&&(e.written||r.selectionRange.focusNode!=e.node)&&(this.forceSelection=!0),this.dom.style.height=``}),this.markedForComposition.forEach(e=>e.flags&=-9);let i=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let e of this.children)e instanceof MI&&e.widget instanceof NI&&i.push(e.dom);r.updateGaps(i)}updateChildren(e,t,n){let r=n?n.range.addToSet(e.slice()):e,i=this.childCursor(t);for(let e=r.length-1;;e--){let t=e>=0?r[e]:null;if(!t)break;let{fromA:a,toA:o,fromB:s,toB:c}=t,l,u,d,f;if(n&&n.range.fromB<c&&n.range.toB>s){let e=PI.build(this.view.state.doc,s,n.range.fromB,this.decorations,this.dynamicDecorationMap),t=PI.build(this.view.state.doc,n.range.toB,c,this.decorations,this.dynamicDecorationMap);u=e.breakAtStart,d=e.openStart,f=t.openEnd;let r=this.compositionView(n);t.breakAtStart?r.breakAfter=1:t.content.length&&r.merge(r.length,r.length,t.content[0],!1,t.openStart,0)&&(r.breakAfter=t.content[0].breakAfter,t.content.shift()),e.content.length&&r.merge(0,0,e.content[e.content.length-1],!0,0,e.openEnd)&&e.content.pop(),l=e.content.concat(r).concat(t.content)}else ({content:l,breakAtStart:u,openStart:d,openEnd:f}=PI.build(this.view.state.doc,s,c,this.decorations,this.dynamicDecorationMap));let{i:p,off:m}=i.findPos(o,1),{i:h,off:g}=i.findPos(a,-1);uN(this,h,g,p,m,l,u,d,f)}n&&this.fixCompositionDOM(n)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let e of t.effects)e.is(sL)&&(this.editContextFormatting=e.value)}compositionView(e){let t=new bI(e.text.nodeValue);t.flags|=8;for(let{deco:n}of e.marks)t=new xI(n,[t],t.length);let n=new jI;return n.append(t,0),n}fixCompositionDOM(e){let t=(e,t)=>{t.flags|=8|!!t.children.some(e=>e.flags&7),this.markedForComposition.add(t);let n=_I.get(e);n&&n!=t&&(n.dom=null),t.setDOM(e)},n=this.childPos(e.range.fromB,1),r=this.children[n.i];t(e.line,r);for(let i=e.marks.length-1;i>=-1;i--)n=r.childPos(n.off,1),r=r.children[n.i],t(i>=0?e.marks[i].node:e.text,r)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let n=this.view.root.activeElement,r=n==this.dom,i=!r&&!(this.view.state.facet(cL)||this.dom.tabIndex>-1)&&HM(this.dom,this.view.observer.selectionRange)&&!(n&&this.dom.contains(n));if(!(r||t||i))return;let a=this.forceSelection;this.forceSelection=!1;let o=this.view.state.selection.main,s=this.moveToLine(this.domAtPos(o.anchor)),c=o.empty?s:this.moveToLine(this.domAtPos(o.head));if(Y.gecko&&o.empty&&!this.hasComposition&&VN(s)){let e=document.createTextNode(``);this.view.observer.ignore(()=>s.node.insertBefore(e,s.node.childNodes[s.offset]||null)),s=c=new hI(e,0),a=!0}let l=this.view.observer.selectionRange;(a||!l.focusNode||(!WM(s.node,s.offset,l.anchorNode,l.anchorOffset)||!WM(c.node,c.offset,l.focusNode,l.focusOffset))&&!this.suppressWidgetCursorChange(l,o))&&(this.view.observer.ignore(()=>{Y.android&&Y.chrome&&this.dom.contains(l.focusNode)&&KN(l.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let e=BM(this.view.root);if(e)if(o.empty){if(Y.gecko){let e=WN(s.node,s.offset);if(e&&e!=3){let t=(e==1?sN:cN)(s.node,s.offset);t&&(s=new hI(t.node,t.offset))}}e.collapse(s.node,s.offset),o.bidiLevel!=null&&e.caretBidiLevel!==void 0&&(e.caretBidiLevel=o.bidiLevel)}else if(e.extend){e.collapse(s.node,s.offset);try{e.extend(c.node,c.offset)}catch{}}else{let t=document.createRange();o.anchor>o.head&&([s,c]=[c,s]),t.setEnd(c.node,c.offset),t.setStart(s.node,s.offset),e.removeAllRanges(),e.addRange(t)}i&&this.view.root.activeElement==this.dom&&(this.dom.blur(),n&&n.focus())}),this.view.observer.setSelectionRange(s,c)),this.impreciseAnchor=s.precise?null:new hI(l.anchorNode,l.anchorOffset),this.impreciseHead=c.precise?null:new hI(l.focusNode,l.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&WM(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=BM(e.root),{anchorNode:r,anchorOffset:i}=e.observer.selectionRange;if(!n||!t.empty||!t.assoc||!n.modify)return;let a=jI.find(this,t.head);if(!a)return;let o=a.posAtStart;if(t.head==o||t.head==o+a.length)return;let s=this.coordsAt(t.head,-1),c=this.coordsAt(t.head,1);if(!s||!c||s.bottom>c.top)return;let l=this.domAtPos(t.head+t.assoc);n.collapse(l.node,l.offset),n.modify(`move`,t.assoc<0?`forward`:`backward`,`lineboundary`),e.observer.readSelectionRange();let u=e.observer.selectionRange;e.docView.posFromDOM(u.anchorNode,u.anchorOffset)!=t.from&&n.collapse(r,i)}moveToLine(e){let t=this.dom,n;if(e.node!=t)return e;for(let r=e.offset;!n&&r<t.childNodes.length;r++){let e=_I.get(t.childNodes[r]);e instanceof jI&&(n=e.domAtPos(0))}for(let r=e.offset-1;!n&&r>=0;r--){let e=_I.get(t.childNodes[r]);e instanceof jI&&(n=e.domAtPos(e.length))}return n?new hI(n.node,n.offset,!0):e}nearest(e){for(let t=e;t;){let e=_I.get(t);if(e&&e.rootView==this)return e;t=t.parentNode}return null}posFromDOM(e,t){let n=this.nearest(e);if(!n)throw RangeError(`Trying to find position for a DOM position outside of the document`);return n.localPosFromDOM(e,t)+n.posAtStart}domAtPos(e){let{i:t,off:n}=this.childCursor().findPos(e,-1);for(;t<this.children.length-1;){let e=this.children[t];if(n<e.length||e instanceof jI)break;t++,n=0}return this.children[t].domAtPos(n)}coordsAt(e,t){let n=null,r=0;for(let i=this.length,a=this.children.length-1;a>=0;a--){let o=this.children[a],s=i-o.breakAfter,c=s-o.length;if(s<e)break;if(c<=e&&(c<e||o.covers(-1))&&(s>e||o.covers(1))&&(!n||o instanceof jI&&!(n instanceof jI&&t>=0)))n=o,r=c;else if(n&&c==e&&s==e&&o instanceof MI&&Math.abs(t)<2){if(o.deco.startSide<0)break;a&&(n=null)}i=c}return n?n.coordsAt(e-r,t):null}coordsForChar(e){let{i:t,off:n}=this.childPos(e,1),r=this.children[t];if(!(r instanceof jI))return null;for(;r.children.length;){let{i:e,off:t}=r.childPos(n,1);for(;;e++){if(e==r.children.length)return null;if((r=r.children[e]).length)break}n=t}if(!(r instanceof bI))return null;let i=BA(r.text,n);if(i==n)return null;let a=tN(r.dom,n,i).getClientRects();for(let e=0;e<a.length;e++){let t=a[e];if(e==a.length-1||t.top<t.bottom&&t.left<t.right)return t}return null}measureVisibleLineHeights(e){let t=[],{from:n,to:r}=e,i=this.view.contentDOM.clientWidth,a=i>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,o=-1,s=this.view.textDirection==II.LTR;for(let e=0,c=0;c<this.children.length;c++){let l=this.children[c],u=e+l.length;if(u>r)break;if(e>=n){let n=l.dom.getBoundingClientRect();if(t.push(n.height),a){let t=l.dom.lastChild,r=t?UM(t):[];if(r.length){let t=r[r.length-1],a=s?t.right-n.left:n.right-t.left;a>o&&(o=a,this.minWidth=i,this.minWidthFrom=e,this.minWidthTo=u)}}}e=u+l.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction==`rtl`?II.RTL:II.LTR}measureTextSize(){for(let e of this.children)if(e instanceof jI){let t=e.measureTextSize();if(t)return t}let e=document.createElement(`div`),t,n,r;return e.className=`cm-line`,e.style.width=`99999px`,e.style.position=`absolute`,e.textContent=`abc def ghi jkl mno pqr stu`,this.view.observer.ignore(()=>{this.dom.appendChild(e);let i=UM(e.firstChild)[0];t=e.getBoundingClientRect().height,n=i?i.width/27:7,r=i?i.height:t,e.remove()}),{lineHeight:t,charWidth:n,textHeight:r}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new vI(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,r=0;;r++){let i=r==t.viewports.length?null:t.viewports[r],a=i?i.from-1:this.length;if(a>n){let r=(t.lineBlockAt(a).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(DI.replace({widget:new NI(r),block:!0,inclusive:!0,isBlockGap:!0}).range(n,a))}if(!i)break;n=i.to+1}return DI.set(e)}updateDeco(){let e=1,t=this.view.state.facet(hL).map(t=>(this.dynamicDecorationMap[e++]=typeof t==`function`)?t(this.view):t),n=!1,r=this.view.state.facet(gL).map((e,t)=>{let r=typeof e==`function`;return r&&(n=!0),r?e(this.view):e});for(r.length&&(this.dynamicDecorationMap[e++]=n,t.push(gM.join(r))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;return this.decorations}scrollIntoView(e){if(e.isSnapshot){let t=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=t.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let t of this.view.state.facet(iL))try{if(t(this.view,e.range,e))return!0}catch(e){RN(this.view.state,e,`scroll handler`)}let{range:t}=e,n=this.coordsAt(t.head,t.empty?t.assoc:t.head>t.anchor?-1:1),r;if(!n)return;!t.empty&&(r=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(n={left:Math.min(n.left,r.left),top:Math.min(n.top,r.top),right:Math.max(n.right,r.right),bottom:Math.max(n.bottom,r.bottom)});let i=BN(this.view),a={left:n.left-i.left,top:n.top-i.top,right:n.right+i.right,bottom:n.bottom+i.bottom},{offsetWidth:o,offsetHeight:s}=this.view.scrollDOM;QM(this.view.scrollDOM,a,t.head<t.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,o),-o),Math.max(Math.min(e.yMargin,s),-s),this.view.textDirection==II.LTR)}lineHasWidget(e){let{i:t}=this.childCursor().findPos(e);if(t==this.children.length)return!1;let n=e=>e instanceof SI||e.children.some(n);return n(this.children[t])}},wL=class{constructor(){this.changes=[]}compareRange(e,t){wN(e,t,this.changes)}comparePoint(e,t){wN(e,t,this.changes)}boundChange(e){wN(e,e,this.changes)}},TL=``,EL=class{constructor(e,t){this.points=e,this.text=``,this.lineSeparator=t.facet(fM.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=TL}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let r=e;;){this.findPointBefore(n,r);let e=this.text.length;this.readNode(r);let i=r.nextSibling;if(i==t)break;let a=_I.get(r),o=_I.get(i);(a&&o?a.breakAfter:(a?a.breakAfter:KM(r))||KM(i)&&(r.nodeName!=`BR`||r.cmIgnore)&&this.text.length>e)&&!gP(i,t)&&this.lineBreak(),r=i}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let i=-1,a=1,o;if(this.lineSeparator?(i=t.indexOf(this.lineSeparator,n),a=this.lineSeparator.length):(o=r.exec(t))&&(i=o.index,a=o[0].length),this.append(t.slice(n,i<0?t.length:i)),i<0)break;if(this.lineBreak(),a>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=a-1);n=i+a}}readNode(e){if(e.cmIgnore)return;let t=_I.get(e),n=t&&t.overrideDOMText;if(n!=null){this.findPointInside(e,n.length);for(let e=n.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName==`BR`?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(e.nodeType==3?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(hP(e,n.node,n.offset)?t:0))}},DL=class{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}},OL=class{constructor(e,t,n,r){this.typeOver=r,this.bounds=null,this.text=``,this.domChanged=t>-1;let{impreciseHead:i,impreciseAnchor:a}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,n,0))){let t=i||a?[]:xP(e),n=new EL(t,e.state);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=SP(t,this.bounds.from)}else{let t=e.observer.selectionRange,n=i&&i.node==t.focusNode&&i.offset==t.focusOffset||!VM(e.contentDOM,t.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),r=a&&a.node==t.anchorNode&&a.offset==t.anchorOffset||!VM(e.contentDOM,t.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset),o=e.viewport;if((Y.ios||Y.chrome)&&e.state.selection.main.empty&&n!=r&&(o.from>0||o.to<e.state.doc.length)){let t=Math.min(n,r),i=Math.max(n,r),a=o.from-t,s=o.to-i;(a==0||a==1||t==0)&&(s==0||s==-1||i==e.state.doc.length)&&(n=0,r=e.state.doc.length)}e.inputState.composing>-1&&e.state.selection.ranges.length>1?this.newSel=e.state.selection.replaceRange(q.range(r,n)):this.newSel=q.single(r,n)}}},kL=class{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText=``,this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,Y.safari&&e.contentDOM.addEventListener(`input`,()=>null),Y.gecko&&GP(e.contentDOM.ownerDocument)}handleEvent(e){!AP(this.view,e)||this.ignoreDuringComposition(e)||e.type==`keydown`&&this.keydown(e)||(this.view.updateState==0?this.runHandlers(e.type,e):Promise.resolve().then(()=>this.runHandlers(e.type,e)))}runHandlers(e,t){let n=this.handlers[e];if(n){for(let e of n.observers)e(this.view,t);for(let e of n.handlers){if(t.defaultPrevented)break;if(e(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=wP(e),n=this.handlers,r=this.view.contentDOM;for(let e in t)if(e!=`scroll`){let i=!t[e].handlers.length,a=n[e];a&&i!=!a.handlers.length&&(r.removeEventListener(e,this.handleEvent),a=null),a||r.addEventListener(e,this.handleEvent,{passive:i})}for(let e in n)e!=`scroll`&&!t[e]&&r.removeEventListener(e,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&ML.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),Y.android&&Y.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return Y.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=AL.find(t=>t.keyCode==e.keyCode))&&!e.ctrlKey||jL.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key==`Enter`&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,nN(this.view.contentDOM,t.key,t.keyCode,t instanceof KeyboardEvent?t:void 0))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:Y.safari&&!Y.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}},AL=[{key:`Backspace`,keyCode:8,inputType:`deleteContentBackward`},{key:`Enter`,keyCode:13,inputType:`insertParagraph`},{key:`Enter`,keyCode:13,inputType:`insertLineBreak`},{key:`Delete`,keyCode:46,inputType:`deleteContentForward`}],jL=`dthko`,ML=[16,17,18,20,91,92,224,225],NL=6,PL=class{constructor(e,t,n,r){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=$M(e.contentDOM),this.atoms=e.state.facet(_L).map(t=>t(e));let i=e.contentDOM.ownerDocument;i.addEventListener(`mousemove`,this.move=this.move.bind(this)),i.addEventListener(`mouseup`,this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(fM.allowMultipleSelections)&&DP(e,t),this.dragging=kP(e,t)&&LP(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&EP(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,n=0,r=0,i=0,a=this.view.win.innerWidth,o=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:i,bottom:o}=this.scrollParents.y.getBoundingClientRect());let s=BN(this.view);e.clientX-s.left<=r+NL?t=-TP(r-e.clientX):e.clientX+s.right>=a-NL&&(t=TP(e.clientX-a)),e.clientY-s.top<=i+NL?n=-TP(i-e.clientY):e.clientY+s.bottom>=o-NL&&(n=TP(e.clientY-o)),this.setScrollSpeed(t,n)}up(e){this.dragging??this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener(`mousemove`,this.move),e.removeEventListener(`mouseup`,this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:t}=this,n=pP(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!n.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:n,userEvent:`select.pointer`}),this.mustSelect=!1}update(e){e.transactions.some(e=>e.isUserEvent(`input.type`))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}},FL=Object.create(null),IL=Object.create(null),LL=Y.ie&&Y.ie_version<15||Y.ios&&Y.webkit_version<604,IL.scroll=e=>{e.inputState.lastScrollTop=e.scrollDOM.scrollTop,e.inputState.lastScrollLeft=e.scrollDOM.scrollLeft},FL.keydown=(e,t)=>(e.inputState.setSelectionOrigin(`select`),t.keyCode==27&&e.inputState.tabFocusMode!=0&&(e.inputState.tabFocusMode=Date.now()+2e3),!1),IL.touchstart=(e,t)=>{e.inputState.lastTouchTime=Date.now(),e.inputState.setSelectionOrigin(`select.pointer`)},IL.touchmove=e=>{e.inputState.setSelectionOrigin(`select.pointer`)},FL.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of e.state.facet(YI))if(n=r(e,t),n)break;if(!n&&t.button==0&&(n=RP(e,t)),n){let r=!e.hasFocus;e.inputState.startMouseSelection(new PL(e,t,n,r)),r&&e.observer.ignore(()=>{eN(e.contentDOM);let t=e.root.activeElement;t&&!t.contains(e.contentDOM)&&t.blur()});let i=e.inputState.mouseSelection;if(i)return i.start(t),i.dragging===!1}else e.inputState.setSelectionOrigin(`select.pointer`);return!1},RL=(e,t,n)=>t>=n.top&&t<=n.bottom&&e>=n.left&&e<=n.right,zL=Y.ie&&Y.ie_version<=11,BL=null,VL=0,HL=0,FL.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let r=e.docView.nearest(t.target);if(r&&r.isWidget){let e=r.posAtStart,t=e+r.length;(e>=n.to||t<=n.from)&&(n=q.range(e,t))}}let{inputState:r}=e;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData(`Text`,MP(e.state,tL,e.state.sliceDoc(n.from,n.to))),t.dataTransfer.effectAllowed=`copyMove`),!1},FL.dragend=e=>(e.inputState.draggedContent=null,!1),FL.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,a=()=>{++i==n.length&&BP(e,t,r.filter(e=>e!=null).join(e.state.lineBreak),!1)};for(let e=0;e<n.length;e++){let t=new FileReader;t.onerror=a,t.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(r[e]=t.result),a()},t.readAsText(n[e])}return!0}else{let n=t.dataTransfer.getData(`Text`);if(n)return BP(e,t,n,!0),!0}return!1},FL.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=LL?null:t.clipboardData;return n?(NP(e,n.getData(`text/plain`)||n.getData(`text/uri-list`)),!0):(jP(e),!1)},UL=null,FL.copy=FL.cut=(e,t)=>{let{text:n,ranges:r,linewise:i}=HP(e.state);if(!n&&!i)return!1;UL=i?n:null,t.type==`cut`&&!e.state.readOnly&&e.dispatch({changes:r,scrollIntoView:!0,userEvent:`delete.cut`});let a=LL?null:t.clipboardData;return a?(a.clearData(),a.setData(`text/plain`,n),!0):(VP(e,n),!1)},WL=rM.define(),IL.focus=e=>{e.inputState.lastFocusTime=Date.now(),!e.scrollDOM.scrollTop&&(e.inputState.lastScrollTop||e.inputState.lastScrollLeft)&&(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),WP(e)},IL.blur=e=>{e.observer.clearSelectionRange(),WP(e)},IL.compositionstart=IL.compositionupdate=e=>{e.observer.editContext||(e.inputState.compositionFirstChange??(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0))},IL.compositionend=e=>{e.observer.editContext||(e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,Y.chrome&&Y.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])},50))},IL.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},FL.beforeinput=(e,t)=>{if((t.inputType==`insertText`||t.inputType==`insertCompositionText`)&&(e.inputState.insertingText=t.data,e.inputState.insertingTextAt=Date.now()),t.inputType==`insertReplacementText`&&e.observer.editContext){let n=t.dataTransfer?.getData(`text/plain`),r=t.getTargetRanges();if(n&&r.length){let t=r[0];return vP(e,{from:e.posAtDOM(t.startContainer,t.startOffset),to:e.posAtDOM(t.endContainer,t.endOffset),insert:e.state.toText(n)},null),!0}}let n;if(Y.chrome&&Y.android&&(n=AL.find(e=>e.inputType==t.inputType))&&(e.observer.delayAndroidKey(n.key,n.keyCode),n.key==`Backspace`||n.key==`Delete`)){let t=window.visualViewport?.height||0;setTimeout(()=>{(window.visualViewport?.height||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}return Y.ios&&t.inputType==`deleteContentForward`&&e.observer.flushSoon(),Y.safari&&t.inputType==`insertText`&&e.inputState.composing>=0&&setTimeout(()=>IL.compositionend(e,t),20),!1},GL=new Set,KL=[`pre-wrap`,`normal`,`pre-line`,`break-spaces`],qL=!1,JL=class{constructor(e){this.lineWrapping=e,this.doc=Dj.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return KL.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];r<0?n++:this.heightSamples[Math.floor(r*10)]||(t=!0,this.heightSamples[Math.floor(r*10)]=!0)}return t}refresh(e,t,n,r,i,a){let o=KL.indexOf(e)>-1,s=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=o;if(this.lineWrapping=o,this.lineHeight=t,this.charWidth=n,this.textHeight=r,this.lineLength=i,s){this.heightSamples={};for(let e=0;e<a.length;e++){let t=a[e];t<0?e++:this.heightSamples[Math.floor(t*10)]=!0}}return s}},YL=class{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}},XL=class e{constructor(e,t,n,r,i){this.from=e,this.length=t,this.top=n,this.height=r,this._content=i}get type(){return typeof this._content==`number`?EI.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof AI?this._content.widget:null}get widgetLineBreaks(){return typeof this._content==`number`?this._content:0}join(t){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(t._content)?t._content:[t]);return new e(this.from,this.length+t.length,this.top,this.height+t.height,n)}},ZL=(function(e){return e[e.ByPos=0]=`ByPos`,e[e.ByHeight=1]=`ByHeight`,e[e.ByPosNoHeight=2]=`ByPosNoHeight`,e})(ZL||(ZL={})),QL=.001,$L=class e{constructor(e,t,n=2){this.length=e,this.height=t,this.flags=n}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>QL&&(qL=!0),this.height=e)}replace(t,n,r){return e.of(r)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,r){let i=this,a=n.doc;for(let o=r.length-1;o>=0;o--){let{fromA:s,toA:c,fromB:l,toB:u}=r[o],d=i.lineAt(s,ZL.ByPosNoHeight,n.setDoc(t),0,0),f=d.to>=c?d:i.lineAt(c,ZL.ByPosNoHeight,n,0,0);for(u+=f.to-c,c=f.to;o>0&&d.from<=r[o-1].toA;)s=r[o-1].fromA,l=r[o-1].fromB,o--,s<d.from&&(d=i.lineAt(s,ZL.ByPosNoHeight,n,0,0));l+=d.from-s,s=d.from;let p=aR.build(n.setDoc(a),e,l,u);i=qP(i,i.replace(s,c,p))}return i.updateHeight(n,0)}static empty(){return new tR(0,0)}static of(t){if(t.length==1)return t[0];let n=0,r=t.length,i=0,a=0;for(;;)if(n==r)if(i>a*2){let e=t[n-1];e.break?t.splice(--n,1,e.left,null,e.right):t.splice(--n,1,e.left,e.right),r+=1+e.break,i-=e.size}else if(a>i*2){let e=t[r];e.break?t.splice(r,1,e.left,null,e.right):t.splice(r,1,e.left,e.right),r+=2+e.break,a-=e.size}else break;else if(i<a){let e=t[n++];e&&(i+=e.size)}else{let e=t[--r];e&&(a+=e.size)}let o=0;return t[n-1]==null?(o=1,n--):t[n]??(o=1,r++),new rR(e.of(t.slice(0,n)),o,e.of(t.slice(r)))}},$L.prototype.size=1,eR=class extends $L{constructor(e,t,n){super(e,t),this.deco=n}blockAt(e,t,n,r){return new XL(r,this.length,n,this.height,this.deco||0)}lineAt(e,t,n,r,i){return this.blockAt(0,n,r,i)}forEachLine(e,t,n,r,i,a){e<=i+this.length&&t>=i&&a(this.blockAt(0,n,r,i))}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more&&this.setHeight(r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}},tR=class e extends eR{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,n,r){return new XL(r,this.length,n,this.height,this.breaks)}replace(t,n,r){let i=r[0];return r.length==1&&(i instanceof e||i instanceof nR&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof nR?i=new e(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):$L.of(r)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more?this.setHeight(r.heights[r.index++]):(n||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:``}${this.widgetHeight?`:`+this.widgetHeight:``})`}},nR=class e extends $L{constructor(e){super(e,0)}heightMetrics(e,t){let n=e.doc.lineAt(t).number,r=e.doc.lineAt(t+this.length).number,i=r-n+1,a,o=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*i);a=t/i,this.length>i+1&&(o=(this.height-t)/(this.length-i-1))}else a=this.height/i;return{firstLine:n,lastLine:r,perLine:a,perChar:o}}blockAt(e,t,n,r){let{firstLine:i,lastLine:a,perLine:o,perChar:s}=this.heightMetrics(t,r);if(t.lineWrapping){let i=r+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length)),a=t.doc.lineAt(i),c=o+a.length*s,l=Math.max(n,e-c/2);return new XL(a.from,a.length,l,c,0)}else{let r=Math.max(0,Math.min(a-i,Math.floor((e-n)/o))),{from:s,length:c}=t.doc.line(i+r);return new XL(s,c,n+o*r,o,0)}}lineAt(e,t,n,r,i){if(t==ZL.ByHeight)return this.blockAt(e,n,r,i);if(t==ZL.ByPosNoHeight){let{from:t,to:r}=n.doc.lineAt(e);return new XL(t,r-t,0,0,0)}let{firstLine:a,perLine:o,perChar:s}=this.heightMetrics(n,i),c=n.doc.lineAt(e),l=o+c.length*s,u=c.number-a,d=r+o*u+s*(c.from-i-u);return new XL(c.from,c.length,Math.max(r,Math.min(d,r+this.height-l)),l,0)}forEachLine(e,t,n,r,i,a){e=Math.max(e,i),t=Math.min(t,i+this.length);let{firstLine:o,perLine:s,perChar:c}=this.heightMetrics(n,i);for(let l=e,u=r;l<=t;){let t=n.doc.lineAt(l);if(l==e){let n=t.number-o;u+=s*n+c*(e-i-n)}let r=s+c*t.length;a(new XL(t.from,t.length,u,r,0)),u+=r,l=t.to+1}}replace(t,n,r){let i=this.length-n;if(i>0){let t=r[r.length-1];t instanceof e?r[r.length-1]=new e(t.length+i):r.push(null,new e(i-1))}if(t>0){let n=r[0];n instanceof e?r[0]=new e(t+n.length):r.unshift(new e(t-1),null)}return $L.of(r)}decomposeLeft(t,n){n.push(new e(t-1),null)}decomposeRight(t,n){n.push(null,new e(this.length-t-1))}updateHeight(t,n=0,r=!1,i){let a=n+this.length;if(i&&i.from<=n+this.length&&i.more){let r=[],o=Math.max(n,i.from),s=-1;for(i.from>n&&r.push(new e(i.from-n-1).updateHeight(t,n));o<=a&&i.more;){let e=t.doc.lineAt(o).length;r.length&&r.push(null);let n=i.heights[i.index++];s==-1?s=n:Math.abs(n-s)>=QL&&(s=-2);let a=new tR(e,n);a.outdated=!1,r.push(a),o+=e+1}o<=a&&r.push(null,new e(a-o).updateHeight(t,o));let c=$L.of(r);return(s<0||Math.abs(c.height-this.height)>=QL||Math.abs(s-this.heightMetrics(t,n).perLine)>=QL)&&(qL=!0),qP(this,c)}else (r||this.outdated)&&(this.setHeight(t.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}},rR=class extends $L{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return this.flags&1}blockAt(e,t,n,r){let i=n+this.left.height;return e<i?this.left.blockAt(e,t,n,r):this.right.blockAt(e,t,i,r+this.left.length+this.break)}lineAt(e,t,n,r,i){let a=r+this.left.height,o=i+this.left.length+this.break,s=t==ZL.ByHeight?e<a:e<o,c=s?this.left.lineAt(e,t,n,r,i):this.right.lineAt(e,t,n,a,o);if(this.break||(s?c.to<o:c.from>o))return c;let l=t==ZL.ByPosNoHeight?ZL.ByPosNoHeight:ZL.ByPos;return s?c.join(this.right.lineAt(o,l,n,a,o)):this.left.lineAt(o,l,n,r,i).join(c)}forEachLine(e,t,n,r,i,a){let o=r+this.left.height,s=i+this.left.length+this.break;if(this.break)e<s&&this.left.forEachLine(e,t,n,r,i,a),t>=s&&this.right.forEachLine(e,t,n,o,s,a);else{let c=this.lineAt(s,ZL.ByPos,n,r,i);e<c.from&&this.left.forEachLine(e,c.from-1,n,r,i,a),c.to>=e&&c.from<=t&&a(c),t>c.to&&this.right.forEachLine(c.to+1,t,n,o,s,a)}}replace(e,t,n){let r=this.left.length+this.break;if(t<r)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));let i=[];e>0&&this.decomposeLeft(e,i);let a=i.length;for(let e of n)i.push(e);if(e>0&&JP(i,a-1),t<this.length){let e=i.length;this.decomposeRight(t,i),JP(i,e)}return $L.of(i)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(n++,e>=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<r&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?$L.of(this.break?[e,null,t]:[e,t]):(this.left=qP(this.left,e),this.right=qP(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,r){let{left:i,right:a}=this,o=t+i.length+this.break,s=null;return r&&r.from<=t+i.length&&r.more?s=i=i.updateHeight(e,t,n,r):i.updateHeight(e,t,n),r&&r.from<=o+a.length&&r.more?s=a=a.updateHeight(e,o,n,r):a.updateHeight(e,o,n),s?this.balanced(i,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?` `:`-`)+this.right}},iR=5,aR=class e{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof tR?n.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new tR(e-this.pos,-1)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e<t||n.heightRelevant){let r=n.widget?n.widget.estimatedHeight:0,i=n.widget?n.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);let a=t-e;n.block?this.addBlock(new eR(a,r,n)):(a||i||r>=iR)&&this.addLineDeco(r,i,a)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new tR(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let n=new nR(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof tR)return e;let t=new tR(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos+=e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let r=this.ensureLine();r.length+=n,r.collapsed+=n,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=t,this.writtenTo=this.pos+=n}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof tR)&&!this.isCovered?this.nodes.push(new tR(0,-1)):(this.writtenTo<this.pos||t==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let n=e;for(let e of this.nodes)e instanceof tR&&e.updateHeight(this.oracle,n),n+=e?e.length:1;return this.nodes}static build(t,n,r,i){let a=new e(r,t);return gM.spans(n,r,i,a,0),a.finish(r)}},oR=class{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,r){(e<t||n&&n.heightRelevant||r&&r.heightRelevant)&&wN(e,t,this.changes,5)}},sR=class{constructor(e,t,n,r){this.from=e,this.to=t,this.size=n,this.displaySize=r}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.size!=i.size)return!1}return!0}draw(e,t){return DI.replace({widget:new cR(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}},cR=class extends TI{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement(`div`);return this.vertical?e.style.height=this.size+`px`:(e.style.width=this.size+`px`,e.style.height=`2px`,e.style.display=`inline-block`),e}get estimatedHeight(){return this.vertical?this.size:-1}},lR=class{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=dR,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=II.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let t=e.facet(mL).some(e=>typeof e!=`function`&&e.class==`cm-lineWrapping`);this.heightOracle=new JL(t),this.stateDeco=e.facet(hL).filter(e=>typeof e!=`function`),this.heightMap=$L.empty().applyChanges(this.stateDeco,Dj.empty,this.heightOracle.setDoc(e.doc),[new xL(0,0,0,e.doc.length)]);for(let e=0;e<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());e++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=DI.set(this.lineGaps.map(e=>e.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let r=n?t.head:t.anchor;if(!e.some(({from:e,to:t})=>r>=e&&r<=t)){let{from:t,to:n}=this.lineBlockAt(r);e.push(new uR(t,n))}}return this.viewports=e.sort((e,t)=>e.from-t.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?dR:new fR(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(rF(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=this.state.facet(hL).filter(e=>typeof e!=`function`);let r=e.changedRanges,i=xL.extendWithRanges(r,YP(n,this.stateDeco,e?e.changes:Lj.empty(this.state.doc.length))),a=this.heightMap.height,o=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);KP(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),i),(this.heightMap.height!=a||qL)&&(e.flags|=2),o?(this.scrollAnchorPos=e.changes.mapPos(o.from,-1),this.scrollAnchorHeight=o.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=a);let s=i.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<s.from||t.range.head>s.to)||!this.viewportIsAppropriate(s))&&(s=this.getViewport(0,t));let c=s.from!=this.viewport.from||s.to!=this.viewport.to;this.viewport=s,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(rL)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,n=window.getComputedStyle(t),r=this.heightOracle,i=n.whiteSpace;this.defaultTextDirection=n.direction==`rtl`?II.RTL:II.LTR;let a=this.heightOracle.mustRefreshForWrapping(i),o=t.getBoundingClientRect(),s=a||this.mustMeasureContent||this.contentDOMHeight!=o.height;this.contentDOMHeight=o.height,this.mustMeasureContent=!1;let c=0,l=0;if(o.width&&o.height){let{scaleX:e,scaleY:n}=ZM(t,o);(e>.005&&Math.abs(this.scaleX-e)>.005||n>.005&&Math.abs(this.scaleY-n)>.005)&&(this.scaleX=e,this.scaleY=n,c|=16,a=s=!0)}let u=(parseInt(n.paddingTop)||0)*this.scaleY,d=(parseInt(n.paddingBottom)||0)*this.scaleY;(this.paddingTop!=u||this.paddingBottom!=d)&&(this.paddingTop=u,this.paddingBottom=d,c|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(s=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=16);let f=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=f&&(this.scrollAnchorHeight=-1,this.scrollTop=f),this.scrolledToBottom=oN(e.scrollDOM);let p=(this.printing?QP:XP)(t,this.paddingTop),m=p.top-this.pixelViewport.top,h=p.bottom-this.pixelViewport.bottom;this.pixelViewport=p;let g=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(g!=this.inView&&(this.inView=g,g&&(s=!0)),!this.inView&&!this.scrollTarget&&!ZP(e.dom))return 0;let _=o.width;if((this.contentDOMWidth!=_||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=o.width,this.editorHeight=e.scrollDOM.clientHeight,c|=16),s){let t=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(t)&&(a=!0),a||r.lineWrapping&&Math.abs(_-this.contentDOMWidth)>r.charWidth){let{lineHeight:n,charWidth:o,textHeight:s}=e.docView.measureTextSize();a=n>0&&r.refresh(i,n,o,s,Math.max(5,_/o),t),a&&(e.docView.minWidth=0,c|=16)}m>0&&h>0?l=Math.max(m,h):m<0&&h<0&&(l=Math.min(m,h)),KP();for(let n of this.viewports){let i=n.from==this.viewport.from?t:e.docView.measureVisibleLineHeights(n);this.heightMap=(a?$L.empty().applyChanges(this.stateDeco,Dj.empty,this.heightOracle,[new xL(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,a,new YL(n.from,i))}qL&&(c|=2)}let v=!this.viewportIsAppropriate(this.viewport,l)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return v&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(l,this.scrollTarget),c|=this.updateForViewport()),(c&2||v)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,i=this.heightOracle,{visibleTop:a,visibleBottom:o}=this,s=new uR(r.lineAt(a-n*1e3,ZL.ByHeight,i,0,0).from,r.lineAt(o+(1-n)*1e3,ZL.ByHeight,i,0,0).to);if(t){let{head:e}=t.range;if(e<s.from||e>s.to){let n=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),a=r.lineAt(e,ZL.ByPos,i,0,0),o;o=t.y==`center`?(a.top+a.bottom)/2-n/2:t.y==`start`||t.y==`nearest`&&e<s.from?a.top:a.bottom-n,s=new uR(r.lineAt(o-1e3/2,ZL.ByHeight,i,0,0).from,r.lineAt(o+n+1e3/2,ZL.ByHeight,i,0,0).to)}}return s}mapViewport(e,t){let n=t.mapPos(e.from,-1),r=t.mapPos(e.to,1);return new uR(this.heightMap.lineAt(n,ZL.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,ZL.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(e,ZL.ByPos,this.heightOracle,0,0),{bottom:i}=this.heightMap.lineAt(t,ZL.ByPos,this.heightOracle,0,0),{visibleTop:a,visibleBottom:o}=this;return(e==0||r<=a-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||i>=o+Math.max(10,Math.min(n,250)))&&r>a-2*1e3&&i<o+2*1e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let r of e)t.touchesRange(r.from,r.to)||n.push(new sR(t.mapPos(r.from),t.mapPos(r.to),r.size,r.displaySize));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,r=n?1e4:2e3,i=r>>1,a=r<<1;if(this.defaultTextDirection!=II.LTR&&!n)return[];let o=[],s=(r,a,c,l)=>{if(a-r<i)return;let u=this.state.selection.main,d=[u.from];u.empty||d.push(u.to);for(let e of d)if(e>r&&e<a){s(r,e-10,c,l),s(e+10,a,c,l);return}let f=nF(e,e=>e.from>=c.from&&e.to<=c.to&&Math.abs(e.from-r)<i&&Math.abs(e.to-a)<i&&!d.some(t=>e.from<t&&e.to>t));if(!f){if(a<c.to&&t&&n&&t.visibleRanges.some(e=>e.from<=a&&e.to>=a)){let e=t.moveToLineBoundary(q.cursor(a),!1,!0).head;e>r&&(a=e)}let e=this.gapSize(c,r,a,l);f=new sR(r,a,e,n||e<2e6?e:2e6)}o.push(f)},c=t=>{if(t.length<a||t.type!=EI.Text)return;let i=$P(t.from,t.to,this.stateDeco);if(i.total<a)return;let o=this.scrollTarget?this.scrollTarget.range.head:null,c,l;if(n){let e=r/this.heightOracle.lineLength*this.heightOracle.lineHeight,n,a;if(o!=null){let r=tF(i,o),s=((this.visibleBottom-this.visibleTop)/2+e)/t.height;n=r-s,a=r+s}else n=(this.visibleTop-t.top-e)/t.height,a=(this.visibleBottom-t.top+e)/t.height;c=eF(i,n),l=eF(i,a)}else{let n=i.total*this.heightOracle.charWidth,a=r*this.heightOracle.charWidth,s=0;if(n>2e6)for(let n of e)n.from>=t.from&&n.from<t.to&&n.size!=n.displaySize&&n.from*this.heightOracle.charWidth+s<this.pixelViewport.left&&(s=n.size-n.displaySize);let u=this.pixelViewport.left+s,d=this.pixelViewport.right+s,f,p;if(o!=null){let e=tF(i,o),t=((d-u)/2+a)/n;f=e-t,p=e+t}else f=(u-a)/n,p=(d+a)/n;c=eF(i,f),l=eF(i,p)}c>t.from&&s(t.from,c,t,i),l<t.to&&s(l,t.to,t,i)};for(let e of this.viewportLines)Array.isArray(e.type)?e.type.forEach(c):c(e);return o}gapSize(e,t,n,r){let i=tF(r,n)-tF(r,t);return this.heightOracle.lineWrapping?e.height*i:r.total*this.heightOracle.charWidth*i}updateLineGaps(e){sR.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=DI.set(e.map(e=>e.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let n=[];gM.spans(t,this.viewport.from,this.viewport.to,{span(e,t){n.push({from:e,to:t})},point(){}},20);let r=0;if(n.length!=this.visibleRanges.length)r=12;else for(let t=0;t<n.length&&!(r&8);t++){let i=this.visibleRanges[t],a=n[t];(i.from!=a.from||i.to!=a.to)&&(r|=4,e&&e.mapPos(i.from,-1)==a.from&&e.mapPos(i.to,1)==a.to||(r|=8))}return this.visibleRanges=n,r}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||rF(this.heightMap.lineAt(e,ZL.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||rF(this.heightMap.lineAt(this.scaler.fromDOM(e),ZL.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return rF(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}},uR=class{constructor(e,t){this.from=e,this.to=t}},dR={toDOM(e){return e},fromDOM(e){return e},scale:1,eq(e){return e==this}},fR=class e{constructor(e,t,n){let r=0,i=0,a=0;this.viewports=n.map(({from:n,to:i})=>{let a=t.lineAt(n,ZL.ByPos,e,0,0).top,o=t.lineAt(i,ZL.ByPos,e,0,0).bottom;return r+=o-a,{from:n,to:i,top:a,bottom:o,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(t.height-r);for(let e of this.viewports)e.domTop=a+(e.top-i)*this.scale,a=e.domBottom=e.domTop+(e.bottom-e.top),i=e.bottom}toDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.top)return r+(e-n)*this.scale;if(e<=i.bottom)return i.domTop+(e-i.top);n=i.bottom,r=i.domBottom}}fromDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.domTop)return n+(e-r)/this.scale;if(e<=i.domBottom)return i.top+(e-i.domTop);n=i.bottom,r=i.domBottom}}eq(t){return t instanceof e?this.scale==t.scale&&this.viewports.length==t.viewports.length&&this.viewports.every((e,n)=>e.from==t.viewports[n].from&&e.to==t.viewports[n].to):!1}},pR=J.define({combine:e=>e.join(` `)}),mR=J.define({combine:e=>e.indexOf(!0)>-1}),hR=EM.newName(),gR=EM.newName(),_R=EM.newName(),vR={"&light":`.`+gR,"&dark":`.`+_R},yR=iF(`.`+hR,{"&":{position:`relative !important`,boxSizing:`border-box`,"&.cm-focused":{outline:`1px dotted #212121`},display:`flex !important`,flexDirection:`column`},".cm-scroller":{display:`flex !important`,alignItems:`flex-start !important`,fontFamily:`monospace`,lineHeight:1.4,height:`100%`,overflowX:`auto`,position:`relative`,zIndex:0,overflowAnchor:`none`},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:`block`,whiteSpace:`pre`,wordWrap:`normal`,boxSizing:`border-box`,minHeight:`100%`,padding:`4px 0`,outline:`none`,"&[contenteditable=true]":{WebkitUserModify:`read-write-plaintext-only`}},".cm-lineWrapping":{whiteSpace_fallback:`pre-wrap`,whiteSpace:`break-spaces`,wordBreak:`break-word`,overflowWrap:`anywhere`,flexShrink:1},"&light .cm-content":{caretColor:`black`},"&dark .cm-content":{caretColor:`white`},".cm-line":{display:`block`,padding:`0 2px 0 6px`},".cm-layer":{position:`absolute`,left:0,top:0,contain:`size style`,"& > *":{position:`absolute`}},"&light .cm-selectionBackground":{background:`#d9d9d9`},"&dark .cm-selectionBackground":{background:`#222`},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:`#d7d4f0`},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:`#233`},".cm-cursorLayer":{pointerEvents:`none`},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:`steps(1) cm-blink 1.2s infinite`},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:`1.2px solid black`,marginLeft:`-0.6px`,pointerEvents:`none`},".cm-cursor":{display:`none`},"&dark .cm-cursor":{borderLeftColor:`#ddd`},".cm-dropCursor":{position:`absolute`},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:`block`},".cm-iso":{unicodeBidi:`isolate`},".cm-announced":{position:`fixed`,top:`-10000px`},"@media print":{".cm-announced":{display:`none`}},"&light .cm-activeLine":{backgroundColor:`#cceeff44`},"&dark .cm-activeLine":{backgroundColor:`#99eeff33`},"&light .cm-specialChar":{color:`red`},"&dark .cm-specialChar":{color:`#f78`},".cm-gutters":{flexShrink:0,display:`flex`,height:`100%`,boxSizing:`border-box`,zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:`#f5f5f5`,color:`#6c6c6c`,border:`0px solid #ddd`,"&.cm-gutters-before":{borderRightWidth:`1px`},"&.cm-gutters-after":{borderLeftWidth:`1px`}},"&dark .cm-gutters":{backgroundColor:`#333338`,color:`#ccc`},".cm-gutter":{display:`flex !important`,flexDirection:`column`,flexShrink:0,boxSizing:`border-box`,minHeight:`100%`,overflow:`hidden`},".cm-gutterElement":{boxSizing:`border-box`},".cm-lineNumbers .cm-gutterElement":{padding:`0 3px 0 5px`,minWidth:`20px`,textAlign:`right`,whiteSpace:`nowrap`},"&light .cm-activeLineGutter":{backgroundColor:`#e2f2ff`},"&dark .cm-activeLineGutter":{backgroundColor:`#222227`},".cm-panels":{boxSizing:`border-box`,position:`sticky`,left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:`#f5f5f5`,color:`black`},"&light .cm-panels-top":{borderBottom:`1px solid #ddd`},"&light .cm-panels-bottom":{borderTop:`1px solid #ddd`},"&dark .cm-panels":{backgroundColor:`#333338`,color:`white`},".cm-dialog":{padding:`2px 19px 4px 6px`,position:`relative`,"& label":{fontSize:`80%`}},".cm-dialog-close":{position:`absolute`,top:`3px`,right:`4px`,backgroundColor:`inherit`,border:`none`,font:`inherit`,fontSize:`14px`,padding:`0`},".cm-tab":{display:`inline-block`,overflow:`hidden`,verticalAlign:`bottom`},".cm-widgetBuffer":{verticalAlign:`text-top`,height:`1em`,width:0,display:`inline`},".cm-placeholder":{color:`#888`,display:`inline-block`,verticalAlign:`top`,userSelect:`none`},".cm-highlightSpace":{backgroundImage:`radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)`,backgroundPosition:`center`},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:`auto 100%`,backgroundPosition:`right 90%`,backgroundRepeat:`no-repeat`},".cm-trailingSpace":{backgroundColor:`#ff332255`},".cm-button":{verticalAlign:`middle`,color:`inherit`,fontSize:`70%`,padding:`.2em 1em`,borderRadius:`1px`},"&light .cm-button":{backgroundImage:`linear-gradient(#eff1f5, #d9d9df)`,border:`1px solid #888`,"&:active":{backgroundImage:`linear-gradient(#b4b4b4, #d0d3d6)`}},"&dark .cm-button":{backgroundImage:`linear-gradient(#393939, #111)`,border:`1px solid #888`,"&:active":{backgroundImage:`linear-gradient(#111, #333)`}},".cm-textfield":{verticalAlign:`middle`,color:`inherit`,fontSize:`70%`,border:`1px solid silver`,padding:`.2em .5em`},"&light .cm-textfield":{backgroundColor:`white`},"&dark .cm-textfield":{border:`1px solid #555`,backgroundColor:`inherit`}},vR),bR={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},xR=Y.ie&&Y.ie_version<=11,SR=class{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new fI,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let e of t)this.queue.push(e);(Y.ie&&Y.ie_version<=11||Y.ios&&e.composing)&&t.some(e=>e.type==`childList`&&e.removedNodes.length||e.type==`characterData`&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&Y.android&&e.constructor.EDIT_CONTEXT!==!1&&!(Y.chrome&&Y.chrome_version<126)&&(this.editContext=new CR(e),e.state.facet(cL)&&(e.contentDOM.editContext=this.editContext.editContext)),xR&&(this.onCharData=e=>{this.queue.push({target:e.target,type:`characterData`,oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia(`print`)),typeof ResizeObserver==`function`&&(this.resizeScroll=new ResizeObserver(()=>{this.view.docView?.lastUpdate<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver==`function`&&(this.intersection=new IntersectionObserver(e=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent(`Event`)))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent(`Event`))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers(`scroll`,e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type==`change`||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,r=this.selectionRange;if(n.state.facet(cL)?n.root.activeElement!=this.dom:!HM(this.dom,r))return;let i=r.anchorNode&&n.docView.nearest(r.anchorNode);if(i&&i.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(Y.ie&&Y.ie_version<=11||Y.android&&Y.chrome)&&!n.state.selection.main.empty&&r.focusNode&&WM(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=BM(e.root);if(!t)return!1;let n=Y.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&sF(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let r=HM(this.dom,n);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&aN(this.dom,n)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(n),r&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let n=this.dom;n;)if(n.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(n),n=n.assignedSlot||n.parentNode;else if(n.nodeType==11)n=n.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let e of this.scrollTargets)e.removeEventListener(`scroll`,this.onScroll);for(let e of this.scrollTargets=t)e.addEventListener(`scroll`,this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,bR),xR&&this.dom.addEventListener(`DOMCharacterDataModified`,this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),xR&&this.dom.removeEventListener(`DOMCharacterDataModified`,this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){if(!this.delayedAndroidKey){let e=()=>{let e=this.delayedAndroidKey;e&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&e.force&&nN(this.dom,e.key,e.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}(!this.delayedAndroidKey||e==`Enter`)&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!this.delayedAndroidKey?.force})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,r=!1;for(let i of e){let e=this.readMutation(i);e&&(e.typeOver&&(r=!0),t==-1?{from:t,to:n}=e:(t=Math.min(e.from,t),n=Math.max(e.to,n)))}return{from:t,to:n,typeOver:r}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),r=this.selectionChanged&&HM(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new OL(this.view,e,t,n);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,r=_P(this.view,t);return this.view.state==n&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),r}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type==`attributes`),e.type==`attributes`&&(t.flags|=4),e.type==`childList`){let n=aF(t,e.previousSibling||e.target.previousSibling,-1),r=aF(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}else if(e.type==`characterData`)return{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue};else return null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener(`resize`,this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener(`change`,this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener(`beforeprint`,this.onPrint),e.addEventListener(`scroll`,this.onScroll),e.document.addEventListener(`selectionchange`,this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener(`scroll`,this.onScroll),e.removeEventListener(`resize`,this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener(`change`,this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener(`beforeprint`,this.onPrint),e.document.removeEventListener(`selectionchange`,this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(cL)!=e.state.facet(cL)&&(e.view.contentDOM.editContext=e.state.facet(cL)?this.editContext.editContext:null))}destroy(){var e,t,n;this.stop(),(e=this.intersection)==null||e.disconnect(),(t=this.gapIntersection)==null||t.disconnect(),(n=this.resizeScroll)==null||n.disconnect();for(let e of this.scrollTargets)e.removeEventListener(`scroll`,this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}},CR=class{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=n=>{let r=e.state.selection.main,{anchor:i,head:a}=r,o=this.toEditorPos(n.updateRangeStart),s=this.toEditorPos(n.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:n.updateRangeStart,editorBase:o,drifted:!1});let c=s-o>n.text.length;o==this.from&&i<this.from?o=i:s==this.to&&i>this.to&&(s=i);let l=bP(e.state.sliceDoc(o,s),n.text,(c?r.from:r.to)-o,c?`end`:null);if(!l){let t=q.single(this.toEditorPos(n.selectionStart),this.toEditorPos(n.selectionEnd));t.main.eq(r)||e.dispatch({selection:t,userEvent:`select`});return}let u={from:l.from+o,to:l.toA+o,insert:Dj.of(n.text.slice(l.from,l.toB).split(`
|
||
`))};if((Y.mac||Y.android)&&u.from==a-1&&/^\. ?$/.test(n.text)&&e.contentDOM.getAttribute(`autocorrect`)==`off`&&(u={from:o,to:s,insert:Dj.of([n.text.replace(`.`,` `)])}),this.pendingContextChange=u,!e.state.readOnly){let t=this.to-this.from+(u.to-u.from+u.insert.length);vP(e,u,q.single(this.toEditorPos(n.selectionStart,t),this.toEditorPos(n.selectionEnd,t)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),u.from<u.to&&!u.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,n.updateRangeStart-1),Math.min(t.text.length,n.updateRangeStart+1)))&&this.handlers.compositionend(n)},this.handlers.characterboundsupdate=n=>{let r=[],i=null;for(let t=this.toEditorPos(n.rangeStart),a=this.toEditorPos(n.rangeEnd);t<a;t++){let n=e.coordsForChar(t);i=n&&new DOMRect(n.left,n.top,n.right-n.left,n.bottom-n.top)||i||new DOMRect,r.push(i)}t.updateCharacterBounds(n.rangeStart,r)},this.handlers.textformatupdate=t=>{let n=[];for(let e of t.getTextFormats()){let t=e.underlineStyle,r=e.underlineThickness;if(!/none/i.test(t)&&!/none/i.test(r)){let i=this.toEditorPos(e.rangeStart),a=this.toEditorPos(e.rangeEnd);if(i<a){let e=`text-decoration: underline ${/^[a-z]/.test(t)?t+` `:t==`Dashed`?`dashed `:t==`Squiggle`?`wavy `:``}${/thin/i.test(r)?1:2}px`;n.push(DI.mark({attributes:{style:e}}).range(i,a))}}}e.dispatch({effects:sL.of(DI.set(n))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:t}=this.composing;this.composing=null,t&&this.reset(e.state)}};for(let e in this.handlers)t.addEventListener(e,this.handlers[e]);this.measureReq={read:e=>{this.editContext.updateControlBounds(e.contentDOM.getBoundingClientRect());let t=BM(e.root);t&&t.rangeCount&&this.editContext.updateSelectionBounds(t.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,r=this.pendingContextChange;return e.changes.iterChanges((i,a,o,s,c)=>{if(n)return;let l=c.length-(a-i);if(r&&a>=r.to)if(r.from==i&&r.to==a&&r.insert.eq(c)){r=this.pendingContextChange=null,t+=l,this.to+=l;return}else r=null,this.revertPending(e.state);if(i+=t,a+=t,a<=this.from)this.from+=l,this.to+=l;else if(i<this.to){if(i<this.from||a>this.to||this.to-this.from+c.length>3e4){n=!0;return}this.editContext.updateText(this.toContextPos(i),this.toContextPos(a),c.toString()),this.to+=l}t+=l}),r&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange,n=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(n.from,n.to)&&e.transactions.some(e=>!e.isUserEvent(`input.type`)&&e.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),r=this.toContextPos(t.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(n,r)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>1e4*3)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}},X=class e{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement(`div`),this.scrollDOM=document.createElement(`div`),this.scrollDOM.tabIndex=-1,this.scrollDOM.className=`cm-scroller`,this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement(`div`),this.announceDOM.className=`cm-announced`,this.announceDOM.setAttribute(`aria-live`,`polite`),this.dom=document.createElement(`div`),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:t}=e;this.dispatchTransactions=e.dispatchTransactions||t&&(e=>e.forEach(e=>t(e,this)))||(e=>this.update(e)),this.dispatch=this.dispatch.bind(this),this._root=e.root||rN(e.parent)||document,this.viewState=new lR(e.state||fM.create(e)),e.scrollTo&&e.scrollTo.is(oL)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(uL).map(e=>new fL(e));for(let e of this.plugins)e.update(this);this.observer=new SR(this),this.inputState=new kL(this),this.inputState.ensureHandlers(this.plugins),this.docView=new CL(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),document.fonts?.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let t=e.length==1&&e[0]instanceof sM?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw Error(`Calls to EditorView.update are not allowed while an update is in progress`);let t=!1,n=!1,r,i=this.state;for(let t of e){if(t.startState!=i)throw RangeError(`Trying to update state with a transaction that doesn't start from the previous state.`);i=t.state}if(this.destroyed){this.viewState.state=i;return}let a=this.hasFocus,o=0,s=null;e.some(e=>e.annotation(WL))?(this.inputState.notifiedFocused=a,o=1):a!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=a,s=UP(i,a),s||(o=1));let c=this.observer.delayedAndroidKey,l=null;if(c?(this.observer.clearDelayedAndroidKey(),l=this.observer.readChange(),(l&&!this.state.doc.eq(i.doc)||!this.state.selection.eq(i.selection))&&(l=null)):this.observer.clear(),i.facet(fM.phrases)!=this.state.facet(fM.phrases))return this.setState(i);r=SL.create(this,i,e),r.flags|=o;let u=this.viewState.scrollTarget;try{this.updateState=2;for(let t of e){if(u&&(u=u.map(t.changes)),t.scrollIntoView){let{main:e}=t.state.selection;u=new aL(e.empty?e:q.cursor(e.head,e.head>e.anchor?-1:1))}for(let e of t.effects)e.is(oL)&&(u=e.value.clip(this.state))}this.viewState.update(r,u),this.bidiCache=ER.update(this.bidiCache,r.changes),r.empty||(this.updatePlugins(r),this.inputState.update(r)),t=this.docView.update(r),this.state.facet(bL)!=this.styleModules&&this.mountStyles(),n=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(e=>e.isUserEvent(`select.pointer`)))}finally{this.updateState=0}if(r.startState.facet(pR)!=r.state.facet(pR)&&(this.viewState.mustMeasureContent=!0),(t||n||u||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!r.empty)for(let e of this.state.facet(ZI))try{e(r)}catch(e){RN(this.state,e,`update listener`)}(s||l)&&Promise.resolve().then(()=>{s&&this.state==s.startState&&this.dispatch(s),l&&!_P(this,l)&&c.force&&nN(this.contentDOM,c.key,c.keyCode)})}setState(e){if(this.updateState!=0)throw Error(`Calls to EditorView.setState are not allowed while an update is in progress`);if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new lR(e),this.plugins=e.facet(uL).map(e=>new fL(e)),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView.destroy(),this.docView=new CL(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(uL),n=e.state.facet(uL);if(t!=n){let r=[];for(let i of n){let n=t.indexOf(i);if(n<0)r.push(new fL(i));else{let t=this.plugins[n];t.mustUpdate=e,r.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e<this.plugins.length;e++)this.plugins[e].update(this);t!=n&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(e){RN(this.state,e,`doc view update listener`)}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.scrollDOM,r=n.scrollTop*this.scaleY,{scrollAnchorPos:i,scrollAnchorHeight:a}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let e=0;;e++){if(a<0)if(oN(n))i=-1,a=this.viewState.heightMap.height;else{let e=this.viewState.scrollAnchorAt(r);i=e.from,a=e.top}this.updateState=1;let o=this.viewState.measure(this);if(!o&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(e>5){console.warn(this.measureRequests.length?`Measure loop restarted more than 5 times`:`Viewport failed to stabilize`);break}let s=[];o&4||([this.measureRequests,s]=[s,this.measureRequests]);let c=s.map(e=>{try{return e.read(this)}catch(e){return RN(this.state,e),TR}}),l=SL.create(this,this.state,[]),u=!1;l.flags|=o,t?t.flags|=o:t=l,this.updateState=2,l.empty||(this.updatePlugins(l),this.inputState.update(l),this.updateAttrs(),u=this.docView.update(l),u&&this.docViewUpdate());for(let e=0;e<s.length;e++)if(c[e]!=TR)try{let t=s[e];t.write&&t.write(c[e],this)}catch(e){RN(this.state,e)}if(u&&this.docView.updateSelection(!0),!l.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,a=-1;continue}else{let e=(i<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(i).top)-a;if(e>1||e<-1){r+=e,n.scrollTop=r/this.scaleY,a=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(ZI))e(t)}get themeClasses(){return hR+` `+(this.state.facet(mR)?_R:gR)+` `+this.state.facet(pR)}updateAttrs(){let e=cF(this,pL,{class:`cm-editor`+(this.hasFocus?` cm-focused `:` `)+this.themeClasses}),t={spellcheck:`false`,autocorrect:`off`,autocapitalize:`off`,writingsuggestions:`false`,translate:`no`,contenteditable:this.state.facet(cL)?`true`:`false`,class:`cm-content`,style:`${Y.tabSize}: ${this.state.tabSize}`,role:`textbox`,"aria-multiline":`true`};this.state.readOnly&&(t[`aria-readonly`]=`true`),cF(this,mL,t);let n=this.observer.ignore(()=>{let n=bN(this.contentDOM,this.contentAttrs,t),r=bN(this.dom,this.editorAttrs,e);return n||r});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(t){let n=!0;for(let r of t)for(let t of r.effects)if(t.is(e.announce)){n&&(this.announceDOM.textContent=``),n=!1;let e=this.announceDOM.appendChild(document.createElement(`div`));e.textContent=t.value}}mountStyles(){this.styleModules=this.state.facet(bL);let t=this.state.facet(e.cspNonce);EM.mount(this.root,this.styleModules.concat(yR).reverse(),t?{nonce:t}:void 0)}readMeasured(){if(this.updateState==2)throw Error(`Reading the editor layout isn't allowed during an update`);this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(t===void 0||t&&t.plugin!=e)&&this.pluginMap.set(e,t=this.plugins.find(t=>t.plugin==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return mP(this,e,lP(this,e,t,n))}moveByGroup(e,t){return mP(this,e,lP(this,e,t,t=>uP(this,e.head,t)))}visualLineSide(e,t){let n=this.bidiSpans(e),r=this.textDirectionAt(e.from),i=n[t?n.length-1:0];return q.cursor(i.side(t,r)+e.from,i.forward(!t,r)?1:-1)}moveToLineBoundary(e,t,n=!0){return cP(this,e,t,n)}moveVertically(e,t,n){return mP(this,e,dP(this,e,t,n))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),nP(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.docView.coordsAt(e,t);if(!n||n.left==n.right)return n;let r=this.state.doc.lineAt(e),i=this.bidiSpans(r),a=i[WI.find(i,e-r.from,-1,t)];return YM(n,a.dir==II.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(nL)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>wR)return FN(e.length);let t=this.textDirectionAt(e.from),n;for(let r of this.bidiCache)if(r.from==e.from&&r.dir==t&&(r.fresh||ON(r.isolates,n=zN(this,e))))return r.order;n||(n=zN(this,e));let r=PN(e.text,t,n);return this.bidiCache.push(new ER(e.from,e.to,t,n,!0,r)),r}get hasFocus(){return(this.dom.ownerDocument.hasFocus()||Y.safari&&this.inputState?.lastContextMenu>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{eN(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return oL.of(new aL(typeof e==`number`?q.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return oL.of(new aL(q.cursor(n.from),`start`,`start`,n.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e==`boolean`?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return dL.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return dL.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=EM.newName(),r=[pR.of(n),bL.of(iF(`.${n}`,e))];return t&&t.dark&&r.push(mR.of(!0)),r}static baseTheme(e){return Gj.lowest(bL.of(iF(`.`+hR,e,vR)))}static findFromDOM(e){let t=e.querySelector(`.cm-content`);return(t&&_I.get(t)||_I.get(e))?.rootView?.view||null}},X.styleModule=bL,X.inputHandler=QI,X.clipboardInputFilter=eL,X.clipboardOutputFilter=tL,X.scrollHandler=iL,X.focusChangeEffect=$I,X.perLineTextDirection=nL,X.exceptionSink=XI,X.updateListener=ZI,X.editable=cL,X.mouseSelectionStyle=YI,X.dragMovesSelection=JI,X.clickAddsSelectionRange=qI,X.decorations=hL,X.outerDecorations=gL,X.atomicRanges=_L,X.bidiIsolatedRanges=vL,X.scrollMargins=yL,X.darkTheme=mR,X.cspNonce=J.define({combine:e=>e.length?e[0]:``}),X.contentAttributes=mL,X.editorAttributes=pL,X.lineWrapping=X.contentAttributes.of({class:`cm-lineWrapping`}),X.announce=oM.define(),wR=4096,TR={},ER=class e{constructor(e,t,n,r,i,a){this.from=e,this.to=t,this.dir=n,this.isolates=r,this.fresh=i,this.order=a}static update(t,n){if(n.empty&&!t.some(e=>e.fresh))return t;let r=[],i=t.length?t[t.length-1].dir:II.LTR;for(let a=Math.max(0,t.length-10);a<t.length;a++){let o=t[a];o.dir==i&&!n.touchesRange(o.from,o.to)&&r.push(new e(n.mapPos(o.from,1),n.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return r}},DR=Y.mac?`mac`:Y.windows?`win`:Y.linux?`linux`:`key`,OR=Gj.default(X.domEventHandlers({keydown(e,t){return mF(dF(t.state),e,t,`editor`)}})),kR=J.define({enables:OR}),AR=new WeakMap,jR=null,MR=4e3,NR=null,PR=class e{constructor(e,t,n,r,i){this.className=e,this.left=t,this.top=n,this.width=r,this.height=i}draw(){let e=document.createElement(`div`);return e.className=this.className,this.adjust(e),e}update(e,t){return t.className==this.className?(this.adjust(e),!0):!1}adjust(e){e.style.left=this.left+`px`,e.style.top=this.top+`px`,this.width!=null&&(e.style.width=this.width+`px`),e.style.height=this.height+`px`}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(t,n,r){if(r.empty){let i=t.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let a=hF(t);return[new e(n,i.left-a.left,i.top-a.top,null,i.bottom-i.top)]}else return _F(t,n,r)}},FR=class{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement(`div`)),this.dom.classList.add(`cm-layer`),t.above&&this.dom.classList.add(`cm-layer-above`),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute(`aria-hidden`,`true`),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(IR)!=e.state.facet(IR)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,n=e.facet(IR);for(;t<n.length&&n[t]!=this.layer;)t++;this.dom.style.zIndex=String((this.layer.above?150:-1)-t)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:t}=this.view;(e!=this.scaleX||t!=this.scaleY)&&(this.scaleX=e,this.scaleY=t,this.dom.style.transform=`scale(${1/e}, ${1/t})`)}draw(e){if(e.length!=this.drawn.length||e.some((e,t)=>!vF(e,this.drawn[t]))){let t=this.dom.firstChild,n=0;for(let r of e)r.update&&t&&r.constructor&&this.drawn[n].constructor&&r.update(t,this.drawn[n])?(t=t.nextSibling,n++):this.dom.insertBefore(r.draw(),t);for(;t;){let e=t.nextSibling;t.remove(),t=e}this.drawn=e,Y.safari&&Y.safari_version>=26&&(this.dom.style.display=this.dom.firstChild?``:`none`)}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}},IR=J.define(),LR=J.define({combine(e){return hj(e,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}}),RR=yF({above:!0,markers(e){let{state:t}=e,n=t.facet(LR),r=[];for(let i of t.selection.ranges){let a=i==t.selection.main;if(i.empty||n.drawRangeCursor){let t=a?`cm-cursor cm-cursor-primary`:`cm-cursor cm-cursor-secondary`,n=i.empty?i:q.cursor(i.head,i.head>i.anchor?-1:1);for(let i of PR.forRange(e,t,n))r.push(i)}}return r},update(e,t){e.transactions.some(e=>e.selection)&&(t.style.animationName=t.style.animationName==`cm-blink`?`cm-blink2`:`cm-blink`);let n=xF(e);return n&&SF(e.state,t),e.docChanged||e.selectionSet||n},mount(e,t){SF(t.state,e)},class:`cm-cursorLayer`}),zR=yF({above:!1,markers(e){return e.state.selection.ranges.map(t=>t.empty?[]:PR.forRange(e,`cm-selectionBackground`,t)).reduce((e,t)=>e.concat(t))},update(e,t){return e.docChanged||e.selectionSet||e.viewportChanged||xF(e)},class:`cm-selectionLayer`}),BR=Gj.highest(X.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:`transparent !important`},caretColor:`transparent !important`},".cm-content":{caretColor:`transparent !important`,"& :focus":{caretColor:`initial !important`,"&::selection, & ::selection":{backgroundColor:`Highlight !important`}}}})),VR=oM.define({map(e,t){return e==null?null:t.mapPos(e)}}),HR=Uj.define({create(){return null},update(e,t){return e!=null&&(e=t.changes.mapPos(e)),t.effects.reduce((e,t)=>t.is(VR)?t.value:e,e)}}),UR=dL.fromClass(class{constructor(e){this.view=e,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(e){var t;let n=e.state.field(HR);n==null?this.cursor!=null&&((t=this.cursor)==null||t.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement(`div`)),this.cursor.className=`cm-dropCursor`),(e.startState.field(HR)!=n||e.docChanged||e.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:e}=this,t=e.state.field(HR),n=t!=null&&e.coordsAtPos(t);if(!n)return null;let r=e.scrollDOM.getBoundingClientRect();return{left:n.left-r.left+e.scrollDOM.scrollLeft*e.scaleX,top:n.top-r.top+e.scrollDOM.scrollTop*e.scaleY,height:n.bottom-n.top}}drawCursor(e){if(this.cursor){let{scaleX:t,scaleY:n}=this.view;e?(this.cursor.style.left=e.left/t+`px`,this.cursor.style.top=e.top/n+`px`,this.cursor.style.height=e.height/n+`px`):this.cursor.style.left=`-100000px`}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(e){this.view.state.field(HR)!=e&&this.view.dispatch({effects:VR.of(e)})}},{eventObservers:{dragover(e){this.setDropPos(this.view.posAtCoords({x:e.clientX,y:e.clientY}))},dragleave(e){(e.target==this.view.contentDOM||!this.view.contentDOM.contains(e.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}}),WR=class{constructor(e){let{regexp:t,decoration:n,decorate:r,boundary:i,maxLength:a=1e3}=e;if(!t.global)throw RangeError(`The regular expression given to MatchDecorator should have its 'g' flag set`);if(this.regexp=t,r)this.addMatch=(e,t,n,i)=>r(i,n,n+e[0].length,e,t);else if(typeof n==`function`)this.addMatch=(e,t,r,i)=>{let a=n(e,t,r);a&&i(r,r+e[0].length,a)};else if(n)this.addMatch=(e,t,r,i)=>i(r,r+e[0].length,n);else throw RangeError(`Either 'decorate' or 'decoration' should be provided to MatchDecorator`);this.boundary=i,this.maxLength=a}createDeco(e){let t=new _M,n=t.add.bind(t);for(let{from:t,to:r}of TF(e,this.maxLength))wF(e.state.doc,this.regexp,t,r,(t,r)=>this.addMatch(r,e,t,n));return t.finish()}updateDeco(e,t){let n=1e9,r=-1;return e.docChanged&&e.changes.iterChanges((t,i,a,o)=>{o>=e.view.viewport.from&&a<=e.view.viewport.to&&(n=Math.min(a,n),r=Math.max(o,r))}),e.viewportMoved||r-n>1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,t.map(e.changes),n,r):t}updateRange(e,t,n,r){for(let i of e.visibleRanges){let a=Math.max(i.from,n),o=Math.min(i.to,r);if(o>=a){let n=e.state.doc.lineAt(a),r=n.to<o?e.state.doc.lineAt(o):n,s=Math.max(i.from,n.from),c=Math.min(i.to,r.to);if(this.boundary){for(;a>n.from;a--)if(this.boundary.test(n.text[a-1-n.from])){s=a;break}for(;o<r.to;o++)if(this.boundary.test(r.text[o-r.from])){c=o;break}}let l=[],u,d=(e,t,n)=>l.push(n.range(e,t));if(n==r)for(this.regexp.lastIndex=s-n.from;(u=this.regexp.exec(n.text))&&u.index<c-n.from;)this.addMatch(u,e,u.index+n.from,d);else wF(e.state.doc,this.regexp,s,c,(t,n)=>this.addMatch(n,e,t,d));t=t.update({filterFrom:s,filterTo:c,filter:(e,t)=>e<s||t>c,add:l})}}return t}},GR=/x/.unicode==null?`g`:`gu`,KR=RegExp(`[\0-\b
|
||
--\u2028\u2029-]`,GR),qR={0:`null`,7:`bell`,8:`backspace`,10:`newline`,11:`vertical tab`,13:`carriage return`,27:`escape`,8203:`zero width space`,8204:`zero width non-joiner`,8205:`zero width joiner`,8206:`left-to-right mark`,8207:`right-to-left mark`,8232:`line separator`,8237:`left-to-right override`,8238:`right-to-left override`,8294:`left-to-right isolate`,8295:`right-to-left isolate`,8297:`pop directional isolate`,8233:`paragraph separator`,65279:`zero width no-break space`,65532:`object replacement`},JR=null,YR=J.define({combine(e){let t=hj(e,{render:null,specialChars:KR,addSpecialChars:null});return(t.replaceTabs=!EF())&&(t.specialChars=RegExp(` |`+t.specialChars.source,GR)),t.addSpecialChars&&(t.specialChars=RegExp(t.specialChars.source+`|`+t.addSpecialChars.source,GR)),t}}),XR=null,ZR=`•`,QR=class extends TI{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=kF(this.code),n=e.state.phrase(`Control character`)+` `+(qR[this.code]||`0x`+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,n,t);if(r)return r;let i=document.createElement(`span`);return i.textContent=t,i.title=n,i.setAttribute(`aria-label`,n),i.className=`cm-specialChar`,i}ignoreEvent(){return!1}},$R=class extends TI{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement(`span`);return e.textContent=` `,e.className=`cm-tab`,e.style.width=this.width+`px`,e}ignoreEvent(){return!1}},ez=DI.line({class:`cm-activeLine`}),tz=dL.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.docChanged||e.selectionSet)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=-1,n=[];for(let r of e.state.selection.ranges){let i=e.lineBlockAt(r.head);i.from>t&&(n.push(ez.range(i.from)),t=i.from)}return DI.set(n)}},{decorations:e=>e.decorations}),nz=class extends TI{constructor(e){super(),this.content=e}toDOM(e){let t=document.createElement(`span`);return t.className=`cm-placeholder`,t.style.pointerEvents=`none`,t.appendChild(typeof this.content==`string`?document.createTextNode(this.content):typeof this.content==`function`?this.content(e):this.content.cloneNode(!0)),t.setAttribute(`aria-hidden`,`true`),t}coordsAt(e){let t=e.firstChild?UM(e.firstChild):[];if(!t.length)return null;let n=window.getComputedStyle(e.parentNode),r=YM(t[0],n.direction!=`rtl`),i=parseInt(n.lineHeight);return r.bottom-r.top>i*1.5?{left:r.left,right:r.right,top:r.top,bottom:r.top+i}:r}ignoreEvent(){return!1}},rz=2e3,iz={Alt:[18,e=>!!e.altKey],Control:[17,e=>!!e.ctrlKey],Shift:[16,e=>!!e.shiftKey],Meta:[91,e=>!!e.metaKey]},az={style:`cursor: crosshair`},oz=`-10000px`,sz=class{constructor(e,t,n,r){this.facet=t,this.createTooltipView=n,this.removeTooltipView=r,this.input=e.state.facet(t),this.tooltips=this.input.filter(e=>e);let i=null;this.tooltipViews=this.tooltips.map(e=>i=n(e,i))}update(e,t){var n;let r=e.state.facet(this.facet),i=r.filter(e=>e);if(r===this.input){for(let t of this.tooltipViews)t.update&&t.update(e);return!1}let a=[],o=t?[]:null;for(let n=0;n<i.length;n++){let r=i[n],s=-1;if(r){for(let e=0;e<this.tooltips.length;e++){let t=this.tooltips[e];t&&t.create==r.create&&(s=e)}if(s<0)a[n]=this.createTooltipView(r,n?a[n-1]:null),o&&(o[n]=!!r.above);else{let r=a[n]=this.tooltipViews[s];o&&(o[n]=t[s]),r.update&&r.update(e)}}}for(let e of this.tooltipViews)a.indexOf(e)<0&&(this.removeTooltipView(e),(n=e.destroy)==null||n.call(e));return t&&(o.forEach((e,n)=>t[n]=e),t.length=o.length),this.input=r,this.tooltips=i,this.tooltipViews=a,!0}},cz=J.define({combine:e=>({position:Y.ios?`absolute`:e.find(e=>e.position)?.position||`fixed`,parent:e.find(e=>e.parent)?.parent||null,tooltipSpace:e.find(e=>e.tooltipSpace)?.tooltipSpace||RF})}),lz=new WeakMap,uz=dL.fromClass(class{constructor(e){this.view=e,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let t=e.state.facet(cz);this.position=t.position,this.parent=t.parent,this.classes=e.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver==`function`?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new sz(e,pz,(e,t)=>this.createTooltip(e,t),e=>{this.resizeObserver&&this.resizeObserver.unobserve(e.dom),e.dom.remove()}),this.above=this.manager.tooltips.map(e=>!!e.above),this.intersectionObserver=typeof IntersectionObserver==`function`?new IntersectionObserver(e=>{Date.now()>this.lastTransaction-50&&e.length>0&&e[e.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),e.win.addEventListener(`resize`,this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement(`div`),this.container.style.position=`relative`,this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let e of this.manager.tooltipViews)this.intersectionObserver.observe(e.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(e){e.transactions.length&&(this.lastTransaction=Date.now());let t=this.manager.update(e,this.above);t&&this.observeIntersection();let n=t||e.geometryChanged,r=e.state.facet(cz);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let e of this.manager.tooltipViews)e.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let e of this.manager.tooltipViews)this.container.appendChild(e.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(e,t){let n=e.create(this.view),r=t?t.dom:null;if(n.dom.classList.add(`cm-tooltip`),e.arrow&&!n.dom.querySelector(`.cm-tooltip > .cm-tooltip-arrow`)){let e=document.createElement(`div`);e.className=`cm-tooltip-arrow`,n.dom.appendChild(e)}return n.dom.style.position=this.position,n.dom.style.top=oz,n.dom.style.left=`0px`,this.container.insertBefore(n.dom,r),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var e,t,n;this.view.win.removeEventListener(`resize`,this.measureSoon);for(let t of this.manager.tooltipViews)t.dom.remove(),(e=t.destroy)==null||e.call(t);this.parent&&this.container.remove(),(t=this.resizeObserver)==null||t.disconnect(),(n=this.intersectionObserver)==null||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let e=1,t=1,n=!1;if(this.position==`fixed`&&this.manager.tooltipViews.length){let{dom:e}=this.manager.tooltipViews[0];if(Y.safari){let t=e.getBoundingClientRect();n=Math.abs(t.top+1e4)>1||Math.abs(t.left)>1}else n=!!e.offsetParent&&e.offsetParent!=this.container.ownerDocument.body}if(n||this.position==`absolute`)if(this.parent){let n=this.parent.getBoundingClientRect();n.width&&n.height&&(e=n.width/this.parent.offsetWidth,t=n.height/this.parent.offsetHeight)}else ({scaleX:e,scaleY:t}=this.view.viewState);let r=this.view.scrollDOM.getBoundingClientRect(),i=BN(this.view);return{visible:{left:r.left+i.left,top:r.top+i.top,right:r.right-i.right,bottom:r.bottom-i.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((e,t)=>{let n=this.manager.tooltipViews[t];return n.getCoords?n.getCoords(e.pos):this.view.coordsAtPos(e.pos)}),size:this.manager.tooltipViews.map(({dom:e})=>e.getBoundingClientRect()),space:this.view.state.facet(cz).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:n}}writeMeasure(e){if(e.makeAbsolute){this.madeAbsolute=!0,this.position=`absolute`;for(let e of this.manager.tooltipViews)e.dom.style.position=`absolute`}let{visible:t,space:n,scaleX:r,scaleY:i}=e,a=[];for(let o=0;o<this.manager.tooltips.length;o++){let s=this.manager.tooltips[o],c=this.manager.tooltipViews[o],{dom:l}=c,u=e.pos[o],d=e.size[o];if(!u||s.clip!==!1&&(u.bottom<=Math.max(t.top,n.top)||u.top>=Math.min(t.bottom,n.bottom)||u.right<Math.max(t.left,n.left)-.1||u.left>Math.min(t.right,n.right)+.1)){l.style.top=oz;continue}let f=s.arrow?c.dom.querySelector(`.cm-tooltip-arrow`):null,p=f?7:0,m=d.right-d.left,h=lz.get(c)??d.bottom-d.top,g=c.offset||fz,_=this.view.textDirection==II.LTR,v=d.width>n.right-n.left?_?n.left:n.right-d.width:_?Math.max(n.left,Math.min(u.left-(f?14:0)+g.x,n.right-m)):Math.min(Math.max(n.left,u.left-m+(f?14:0)-g.x),n.right-m),y=this.above[o];!s.strictSide&&(y?u.top-h-p-g.y<n.top:u.bottom+h+p+g.y>n.bottom)&&y==n.bottom-u.bottom>u.top-n.top&&(y=this.above[o]=!y);let b=(y?u.top-n.top:n.bottom-u.bottom)-p;if(b<h&&c.resize!==!1){if(b<this.view.defaultLineHeight){l.style.top=oz;continue}lz.set(c,h),l.style.height=(h=b)/i+`px`}else l.style.height&&(l.style.height=``);let x=y?u.top-h-p-g.y:u.bottom+p+g.y,S=v+m;if(c.overlap!==!0)for(let e of a)e.left<S&&e.right>v&&e.top<x+h&&e.bottom>x&&(x=y?e.top-h-2-p:e.bottom+p+2);if(this.position==`absolute`?(l.style.top=(x-e.parent.top)/i+`px`,zF(l,(v-e.parent.left)/r)):(l.style.top=x/i+`px`,zF(l,v/r)),f){let e=u.left+(_?g.x:-g.x)-(v+14-7);f.style.left=e/r+`px`}c.overlap!==!0&&a.push({left:v,top:x,right:S,bottom:x+h}),l.classList.toggle(`cm-tooltip-above`,y),l.classList.toggle(`cm-tooltip-below`,!y),c.positioned&&c.positioned(e.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let e of this.manager.tooltipViews)e.dom.style.top=oz}},{eventObservers:{scroll(){this.maybeMeasure()}}}),dz=X.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:`border-box`},"&light .cm-tooltip":{border:`1px solid #bbb`,backgroundColor:`#f5f5f5`},"&light .cm-tooltip-section:not(:first-child)":{borderTop:`1px solid #bbb`},"&dark .cm-tooltip":{backgroundColor:`#333338`,color:`white`},".cm-tooltip-arrow":{height:`7px`,width:`14px`,position:`absolute`,zIndex:-1,overflow:`hidden`,"&:before, &:after":{content:`''`,position:`absolute`,width:0,height:0,borderLeft:`7px solid transparent`,borderRight:`7px solid transparent`},".cm-tooltip-above &":{bottom:`-7px`,"&:before":{borderTop:`7px solid #bbb`},"&:after":{borderTop:`7px solid #f5f5f5`,bottom:`1px`}},".cm-tooltip-below &":{top:`-7px`,"&:before":{borderBottom:`7px solid #bbb`},"&:after":{borderBottom:`7px solid #f5f5f5`,top:`1px`}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:`#333338`,borderBottomColor:`#333338`},"&:after":{borderTopColor:`transparent`,borderBottomColor:`transparent`}}}),fz={x:0,y:0},pz=J.define({enables:[uz,dz]}),mz=J.define({combine:e=>e.reduce((e,t)=>e.concat(t),[])}),hz=class e{static create(t){return new e(t)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement(`div`),this.dom.classList.add(`cm-tooltip-hover`),this.manager=new sz(e,mz,(e,t)=>this.createHostedView(e,t),e=>e.dom.remove())}createHostedView(e,t){let n=e.create(this.view);return n.dom.classList.add(`cm-tooltip-section`),this.dom.insertBefore(n.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&n.mount&&n.mount(this.view),n}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)(e=t.destroy)==null||e.call(t)}passProp(e){let t;for(let n of this.manager.tooltipViews){let r=n[e];if(r!==void 0){if(t===void 0)t=r;else if(t!==r)return}}return t}get offset(){return this.passProp(`offset`)}get getCoords(){return this.passProp(`getCoords`)}get overlap(){return this.passProp(`overlap`)}get resize(){return this.passProp(`resize`)}},gz=pz.compute([mz],e=>{let t=e.facet(mz);return t.length===0?null:{pos:Math.min(...t.map(e=>e.pos)),end:Math.max(...t.map(e=>e.end??e.pos)),create:hz.create,above:t[0].above,arrow:t.some(e=>e.arrow)}}),_z=class{constructor(e,t,n,r,i){this.view=e,this.source=t,this.field=n,this.setHover=r,this.hoverTime=i,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener(`mouseleave`,this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener(`mousemove`,this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:t}=this,n=e.docView.nearest(t.target);if(!n)return;let r,i=1;if(n instanceof SI)r=n.posAtStart;else{if(r=e.posAtCoords(t),r==null)return;let n=e.coordsAtPos(r);if(!n||t.y<n.top||t.y>n.bottom||t.x<n.left-e.defaultCharacterWidth||t.x>n.right+e.defaultCharacterWidth)return;let a=e.bidiSpans(e.state.doc.lineAt(r)).find(e=>e.from<=r&&e.to>=r),o=a&&a.dir==II.RTL?-1:1;i=t.x<n.left?-o:o}let a=this.source(e,r,i);if(a?.then){let t=this.pending={pos:r};a.then(n=>{this.pending==t&&(this.pending=null,n&&!(Array.isArray(n)&&!n.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(n)?n:[n])}))},t=>RN(e.state,t,`hover tooltip`))}else a&&!(Array.isArray(a)&&!a.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(a)?a:[a])})}get tooltip(){let e=this.view.plugin(uz),t=e?e.manager.tooltips.findIndex(e=>e.create==hz.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:t,tooltip:n}=this;if(t.length&&n&&!BF(n.dom,e)||this.pending){let{pos:n}=t[0]||this.pending,r=t[0]?.end??n;(n==r?this.view.posAtCoords(this.lastMove)!=n:!VF(this.view,n,r,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:t}=this;t&&t.dom.contains(e.relatedTarget)?this.watchTooltipLeave(t.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=n=>{e.removeEventListener(`mouseleave`,t),this.active.length&&!this.view.dom.contains(n.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener(`mouseleave`,t)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener(`mouseleave`,this.mouseleave),this.view.dom.removeEventListener(`mousemove`,this.mousemove)}},vz=4,yz=oM.define(),bz=J.define({combine(e){let t,n;for(let r of e)t=t||r.topContainer,n=n||r.bottomContainer;return{topContainer:t,bottomContainer:n}}}),xz=dL.fromClass(class{constructor(e){this.input=e.state.facet(Cz),this.specs=this.input.filter(e=>e),this.panels=this.specs.map(t=>t(e));let t=e.state.facet(bz);this.top=new Sz(e,!0,t.topContainer),this.bottom=new Sz(e,!1,t.bottomContainer),this.top.sync(this.panels.filter(e=>e.top)),this.bottom.sync(this.panels.filter(e=>!e.top));for(let e of this.panels)e.dom.classList.add(`cm-panel`),e.mount&&e.mount()}update(e){let t=e.state.facet(bz);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new Sz(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new Sz(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=e.state.facet(Cz);if(n!=this.input){let t=n.filter(e=>e),r=[],i=[],a=[],o=[];for(let n of t){let t=this.specs.indexOf(n),s;t<0?(s=n(e.view),o.push(s)):(s=this.panels[t],s.update&&s.update(e)),r.push(s),(s.top?i:a).push(s)}this.specs=t,this.panels=r,this.top.sync(i),this.bottom.sync(a);for(let e of o)e.dom.classList.add(`cm-panel`),e.mount&&e.mount()}else for(let t of this.panels)t.update&&t.update(e)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:e=>X.scrollMargins.of(t=>{let n=t.plugin(e);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})}),Sz=class{constructor(e,t,n){this.view=e,this.top=t,this.container=n,this.dom=void 0,this.classes=``,this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement(`div`),this.dom.className=this.top?`cm-panels cm-panels-top`:`cm-panels cm-panels-bottom`,this.dom.style[this.top?`top`:`bottom`]=`0`;let e=this.container||this.view.dom;e.insertBefore(this.dom,this.top?e.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=GF(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=GF(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(` `))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(` `))e&&this.container.classList.add(e)}}},Cz=J.define({enables:xz}),wz=class extends pM{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}},wz.prototype.elementClass=``,wz.prototype.toDOM=void 0,wz.prototype.mapMode=Fj.TrackBefore,wz.prototype.startSide=wz.prototype.endSide=-1,wz.prototype.point=!0,Tz=J.define(),Ez=J.define(),Dz={class:``,renderEmptyElements:!1,elementStyle:``,markers:()=>gM.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:`before`},Oz=J.define(),kz=J.define({combine:e=>e.some(e=>e)}),Az=dL.fromClass(class{constructor(e){this.view=e,this.domAfter=null,this.prevViewport=e.viewport,this.dom=document.createElement(`div`),this.dom.className=`cm-gutters cm-gutters-before`,this.dom.setAttribute(`aria-hidden`,`true`),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+`px`,this.gutters=e.state.facet(Oz).map(t=>new Mz(e,t)),this.fixed=!e.state.facet(kz);for(let e of this.gutters)e.config.side==`after`?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position=`sticky`),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement(`div`),this.domAfter.className=`cm-gutters cm-gutters-after`,this.domAfter.setAttribute(`aria-hidden`,`true`),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+`px`,this.domAfter.style.position=this.fixed?`sticky`:``,this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(e){if(this.updateGutters(e)){let t=this.prevViewport,n=e.view.viewport,r=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}if(e.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+`px`;this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(kz)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?`sticky`:``,this.domAfter&&(this.domAfter.style.position=this.fixed?`sticky`:``)),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=gM.iter(this.view.state.facet(Tz),this.view.viewport.from),r=[],i=this.gutters.map(e=>new jz(e,this.view.viewport,-this.view.documentPadding.top));for(let e of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(e.type)){let t=!0;for(let a of e.type)if(a.type==EI.Text&&t){YF(n,r,a.from);for(let e of i)e.line(this.view,a,r);t=!1}else if(a.widget)for(let e of i)e.widget(this.view,a)}else if(e.type==EI.Text){YF(n,r,e.from);for(let t of i)t.line(this.view,e,r)}else if(e.widget)for(let t of i)t.widget(this.view,e);for(let e of i)e.finish();e&&(this.view.scrollDOM.insertBefore(this.dom,t),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(e){let t=e.startState.facet(Oz),n=e.state.facet(Oz),r=e.docChanged||e.heightChanged||e.viewportChanged||!gM.eq(e.startState.facet(Tz),e.state.facet(Tz),e.view.viewport.from,e.view.viewport.to);if(t==n)for(let t of this.gutters)t.update(e)&&(r=!0);else{r=!0;let i=[];for(let r of n){let n=t.indexOf(r);n<0?i.push(new Mz(this.view,r)):(this.gutters[n].update(e),i.push(this.gutters[n]))}for(let e of this.gutters)e.dom.remove(),i.indexOf(e)<0&&e.destroy();for(let e of i)e.config.side==`after`?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.gutters=i}return r}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:e=>X.scrollMargins.of(t=>{let n=t.plugin(e);if(!n||n.gutters.length==0||!n.fixed)return null;let r=n.dom.offsetWidth*t.scaleX,i=n.domAfter?n.domAfter.offsetWidth*t.scaleX:0;return t.textDirection==II.LTR?{left:r,right:i}:{right:r,left:i}})}),jz=class{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=gM.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:r}=this,i=(t.top-this.height)/e.scaleY,a=t.height/e.scaleY;if(this.i==r.elements.length){let t=new Nz(e,a,i,n);r.elements.push(t),r.dom.appendChild(t.dom)}else r.elements[this.i].update(e,a,i,n);this.height=t.bottom,this.i++}line(e,t,n){let r=[];YF(this.cursor,r,t.from),n.length&&(r=r.concat(n));let i=this.gutter.config.lineMarker(e,t,r);i&&r.unshift(i);let a=this.gutter;r.length==0&&!a.config.renderEmptyElements||this.addElement(e,t,r)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t),r=n?[n]:null;for(let n of e.state.facet(Ez)){let i=n(e,t.widget,t);i&&(r||(r=[])).push(i)}r&&this.addElement(e,t,r)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}},Mz=class{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement(`div`),this.dom.className=`cm-gutter`+(this.config.class?` `+this.config.class:``);for(let n in t.domEventHandlers)this.dom.addEventListener(n,r=>{let i=r.target,a;if(i!=this.dom&&this.dom.contains(i)){for(;i.parentNode!=this.dom;)i=i.parentNode;let e=i.getBoundingClientRect();a=(e.top+e.bottom)/2}else a=r.clientY;let o=e.lineBlockAtHeight(a-e.documentTop);t.domEventHandlers[n](e,o,r)&&r.preventDefault()});this.markers=JF(t.markers(e)),t.initialSpacer&&(this.spacer=new Nz(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+=`visibility: hidden; pointer-events: none`)}update(e){let t=this.markers;if(this.markers=JF(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let t=this.config.updateSpacer(this.spacer.markers[0],e);t!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[t])}let n=e.view.viewport;return!gM.eq(this.markers,t,n.from,n.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}},Nz=class{constructor(e,t,n,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement(`div`),this.dom.className=`cm-gutterElement`,this.update(e,t,n,r)}update(e,t,n,r){this.height!=t&&(this.height=t,this.dom.style.height=t+`px`),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+`px`:``),XF(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,t){let n=`cm-gutterElement`,r=this.dom.firstChild;for(let i=0,a=0;;){let o=a,s=i<t.length?t[i++]:null,c=!1;if(s){let e=s.elementClass;e&&(n+=` `+e);for(let e=a;e<this.markers.length;e++)if(this.markers[e].compare(s)){o=e,c=!0;break}}else o=this.markers.length;for(;a<o;){let e=this.markers[a++];if(e.toDOM){e.destroy(r);let t=r.nextSibling;r.remove(),r=t}}if(!s)break;s.toDOM&&(c?r=r.nextSibling:this.dom.insertBefore(s.toDOM(e),r)),c&&a++}this.dom.className=n,this.markers=t}destroy(){this.setMarkers(null,[])}},Pz=J.define(),Fz=J.define(),Iz=J.define({combine(e){return hj(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let n=Object.assign({},e);for(let e in t){let r=n[e],i=t[e];n[e]=r?(e,t,n)=>r(e,t,n)||i(e,t,n):i}return n}})}}),Lz=class extends wz{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}},Rz=Oz.compute([Iz],e=>({class:`cm-lineNumbers`,renderEmptyElements:!1,markers(e){return e.state.facet(Pz)},lineMarker(e,t,n){return n.some(e=>e.toDOM)?null:new Lz(ZF(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,n)=>{for(let r of e.state.facet(Fz)){let i=r(e,t,n);if(i)return i}return null},lineMarkerChange:e=>e.startState.facet(Iz)!=e.state.facet(Iz),initialSpacer(e){return new Lz(ZF(e,$F(e.state.doc.lines)))},updateSpacer(e,t){let n=ZF(t.view,$F(t.view.state.doc.lines));return n==e.number?e:new Lz(n)},domEventHandlers:e.facet(Iz).domEventHandlers,side:`before`})),zz=new class extends wz{constructor(){super(...arguments),this.elementClass=`cm-activeLineGutter`}},Bz=Tz.compute([`selection`],e=>{let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.head).from;i>n&&(n=i,t.push(zz.range(i)))}return gM.of(t)})}));function Hz(e,t,n,r){switch(e){case-2:return n<t;case-1:return r>=t&&n<t;case 0:return n<t&&r>t;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function Uz(e,t,n,r){for(;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to<t);){let t=!r&&e instanceof pB&&e.index<0?null:e.parent;if(!t)return e;e=t}let i=r?0:cB.IgnoreOverlays;if(r)for(let r=e,a=r.parent;a;r=a,a=r.parent)r instanceof pB&&r.index<0&&a.enter(t,n,i)?.from!=r.from&&(e=a);for(;;){let r=e.enter(t,n,i);if(!r)return e;e=r}}function Wz(e,t,n,r){let i=e.cursor(),a=[];if(!i.firstChild())return a;if(n!=null){for(let e=!1;!e;)if(e=i.type.is(n),!i.nextSibling())return a}for(;;){if(r!=null&&i.type.is(r))return a;if(i.type.is(t)&&a.push(i.node),!i.nextSibling())return r==null?a:[]}}function Gz(e,t,n=t.length-1){for(let r=e;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}function Kz(e){if(!e.length)return null;let t=0,n=e[0];for(let r=1;r<e.length;r++){let i=e[r];(i.from>n.from||i.to<n.to)&&(n=i,t=r)}let r=n instanceof pB&&n.index<0?null:n.parent,i=e.slice();return r?i[t]=r:i.splice(t,1),new gB(i,n)}function qz(e,t,n){let r=e.resolveInner(t,n),i=null;for(let e=r instanceof pB?r:r.context.parent;e;e=e.parent)if(e.index<0){let a=e.parent;(i||(i=[r])).push(a.resolve(t,n)),e=a}else{let a=nB.get(e.tree);if(a&&a.overlay&&a.overlay[0].from<=t&&a.overlay[a.overlay.length-1].to>=t){let o=new pB(a.tree,a.overlay[0].from+e.from,-1,e);(i||(i=[r])).push(Uz(o,t,n,!1))}}return i?Kz(i):r}function Jz(e){return e.children.some(e=>e instanceof dB||!e.type.isAnonymous||Jz(e))}function Yz(e){let{buffer:t,nodeSet:n,maxBufferLength:r=Qz,reused:i=[],minRepeatType:a=n.types.length}=e,o=Array.isArray(t)?new uB(t,t.length):t,s=n.types,c=0,l=0;function u(e,t,_,v,y,b){let{id:x,start:S,end:C,size:w}=o,T=l,E=c;if(w<0)if(o.next(),w==-1){let t=i[x];_.push(t),v.push(S-e);return}else if(w==-3){c=x;return}else if(w==-4){l=x;return}else throw RangeError(`Unrecognized record size: ${w}`);let D=s[x],O,k,A=S-e;if(C-S<=r&&(k=h(o.pos-t,y))){let t=new Uint16Array(k.size-k.skip),r=o.pos-k.size,i=t.length;for(;o.pos>r;)i=g(k.start,t,i);O=new dB(t,C-k.start,n),A=k.start-e}else{let e=o.pos-w;o.next();let t=[],n=[],i=x>=a?x:-1,s=0,c=C;for(;o.pos>e;)i>=0&&o.id==i&&o.size>=0?(o.end<=c-r&&(p(t,n,S,s,o.end,c,i,T,E),s=t.length,c=o.end),o.next()):b>2500?d(S,e,t,n):u(S,e,t,n,i,b+1);if(i>=0&&s>0&&s<t.length&&p(t,n,S,s,S,c,i,T,E),t.reverse(),n.reverse(),i>-1&&s>0){let e=f(D,E);O=Zz(D,t,n,0,t.length,0,C-S,e,e)}else O=m(D,t,n,C-S,T-C,E)}_.push(O),v.push(A)}function d(e,t,i,a){let s=[],c=0,l=-1;for(;o.pos>t;){let{id:e,start:t,end:n,size:i}=o;if(i>4)o.next();else if(l>-1&&t<l)break;else l<0&&(l=n-r),s.push(e,t,n),c++,o.next()}if(c){let t=new Uint16Array(c*4),r=s[s.length-2];for(let e=s.length-3,n=0;e>=0;e-=3)t[n++]=s[e],t[n++]=s[e+1]-r,t[n++]=s[e+2]-r,t[n++]=n;i.push(new dB(t,s[2]-r,n)),a.push(r-e)}}function f(e,t){return(n,r,i)=>{let a=0,o=n.length-1,s,c;if(o>=0&&(s=n[o])instanceof lB){if(!o&&s.type==e&&s.length==i)return s;(c=s.prop(tB.lookAhead))&&(a=r[o]+s.length+c)}return m(e,n,r,i,a,t)}}function p(e,t,r,i,a,o,s,c,l){let u=[],d=[];for(;e.length>i;)u.push(e.pop()),d.push(t.pop()+r-a);e.push(m(n.types[s],u,d,o-a,c-o,l)),t.push(a-r)}function m(e,t,n,r,i,a,o){if(a){let e=[tB.contextHash,a];o=o?[e].concat(o):[e]}if(i>25){let e=[tB.lookAhead,i];o=o?[e].concat(o):[e]}return new lB(e,t,n,r,o)}function h(e,t){let n=o.fork(),i=0,s=0,c=0,l=n.end-r,u={size:0,start:0,skip:0};scan:for(let r=n.pos-e;n.pos>r;){let e=n.size;if(n.id==t&&e>=0){u.size=i,u.start=s,u.skip=c,c+=4,i+=4,n.next();continue}let o=n.pos-e;if(e<0||o<r||n.start<l)break;let d=n.id>=a?4:0,f=n.start;for(n.next();n.pos>o;){if(n.size<0)if(n.size==-3||n.size==-4)d+=4;else break scan;else n.id>=a&&(d+=4);n.next()}s=f,i+=e,c+=d}return(t<0||i==e)&&(u.size=i,u.start=s,u.skip=c),u.size>4?u:void 0}function g(e,t,n){let{id:r,start:i,end:s,size:u}=o;if(o.next(),u>=0&&r<a){let a=n;if(u>4){let r=o.pos-(u-4);for(;o.pos>r;)n=g(e,t,n)}t[--n]=a,t[--n]=s-e,t[--n]=i-e,t[--n]=r}else u==-3?c=r:u==-4&&(l=r);return n}let _=[],v=[];for(;o.pos>0;)u(e.start||0,e.bufferStart||0,_,v,-1,0);let y=e.length??(_.length?v[0]+_[0].length:0);return new lB(s[e.topID],_.reverse(),v.reverse(),y)}function Xz(e,t){if(!e.isAnonymous||t instanceof dB||t.type!=e)return 1;let n=vB.get(t);if(n==null){n=1;for(let r of t.children){if(r.type!=e||!(r instanceof lB)){n=1;break}n+=Xz(e,r)}vB.set(t,n)}return n}function Zz(e,t,n,r,i,a,o,s,c){let l=0;for(let n=r;n<i;n++)l+=Xz(e,t[n]);let u=Math.ceil(l*1.5/8),d=[],f=[];function p(t,n,r,i,o){for(let s=r;s<i;){let r=s,l=n[s],m=Xz(e,t[s]);for(s++;s<i;s++){let n=Xz(e,t[s]);if(m+n>=u)break;m+=n}if(s==r+1){if(m>u){let e=t[r];p(e.children,e.positions,0,e.children.length,n[r]+o);continue}d.push(t[r])}else{let i=n[s-1]+t[s-1].length-l;d.push(Zz(e,t,n,r,s,l,i,null,c))}f.push(l+o-a)}}return p(t,n,r,i,0),(s||c)(d,f,o)}var Qz,$z,eB,tB,nB,rB,iB,aB,oB,sB,cB,lB,uB,dB,fB,pB,mB,hB,gB,_B,vB,yB,bB,xB,SB=o((()=>{Qz=1024,$z=0,eB=class{constructor(e,t){this.from=e,this.to=t}},tB=class{constructor(e={}){this.id=$z++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw Error(`This node type doesn't define a deserialize function`)}),this.combine=e.combine||null}add(e){if(this.perNode)throw RangeError(`Can't add per-node props to node types`);return typeof e!=`function`&&(e=iB.match(e)),t=>{let n=e(t);return n===void 0?null:[this,n]}}},tB.closedBy=new tB({deserialize:e=>e.split(` `)}),tB.openedBy=new tB({deserialize:e=>e.split(` `)}),tB.group=new tB({deserialize:e=>e.split(` `)}),tB.isolate=new tB({deserialize:e=>{if(e&&e!=`rtl`&&e!=`ltr`&&e!=`auto`)throw RangeError(`Invalid value for isolate: `+e);return e||`auto`}}),tB.contextHash=new tB({perNode:!0}),tB.lookAhead=new tB({perNode:!0}),tB.mounted=new tB({perNode:!0}),nB=class{constructor(e,t,n){this.tree=e,this.overlay=t,this.parser=n}static get(e){return e&&e.props&&e.props[tB.mounted.id]}},rB=Object.create(null),iB=class e{constructor(e,t,n,r=0){this.name=e,this.props=t,this.id=n,this.flags=r}static define(t){let n=t.props&&t.props.length?Object.create(null):rB,r=!!t.top|(t.skipped?2:0)|(t.error?4:0)|(t.name==null?8:0),i=new e(t.name||``,n,t.id,r);if(t.props){for(let e of t.props)if(Array.isArray(e)||(e=e(i)),e){if(e[0].perNode)throw RangeError(`Can't store a per-node prop on a node type`);n[e[0].id]=e[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e==`string`){if(this.name==e)return!0;let t=this.prop(tB.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let r of n.split(` `))t[r]=e[n];return e=>{for(let n=e.prop(tB.group),r=-1;r<(n?n.length:0);r++){let i=t[r<0?e.name:n[r]];if(i)return i}}}},iB.none=new iB(``,Object.create(null),0,8),aB=class e{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw RangeError(`Node type ids should correspond to array positions when creating a node set`)}extend(...t){let n=[];for(let e of this.types){let r=null;for(let n of t){let t=n(e);if(t){r||(r=Object.assign({},e.props));let n=t[1],i=t[0];i.combine&&i.id in r&&(n=i.combine(r[i.id],n)),r[i.id]=n}}n.push(r?new iB(e.name,r,e.id,e.flags):e)}return new e(n)}},oB=new WeakMap,sB=new WeakMap,(function(e){e[e.ExcludeBuffers=1]=`ExcludeBuffers`,e[e.IncludeAnonymous=2]=`IncludeAnonymous`,e[e.IgnoreMounts=4]=`IgnoreMounts`,e[e.IgnoreOverlays=8]=`IgnoreOverlays`})(cB||(cB={})),lB=class e{constructor(e,t,n,r,i){if(this.type=e,this.children=t,this.positions=n,this.length=r,this.props=null,i&&i.length){this.props=Object.create(null);for(let[e,t]of i)this.props[typeof e==`number`?e:e.id]=t}}toString(){let e=nB.get(this);if(e&&!e.overlay)return e.tree.toString();let t=``;for(let e of this.children){let n=e.toString();n&&(t&&(t+=`,`),t+=n)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?`(`+t+`)`:``):t}cursor(e=0){return new _B(this.topNode,e)}cursorAt(e,t=0,n=0){let r=new _B(oB.get(this)||this.topNode);return r.moveTo(e,t),oB.set(this,r._tree),r}get topNode(){return new pB(this,0,0,null)}resolve(e,t=0){let n=Uz(oB.get(this)||this.topNode,e,t,!1);return oB.set(this,n),n}resolveInner(e,t=0){let n=Uz(sB.get(this)||this.topNode,e,t,!0);return sB.set(this,n),n}resolveStack(e,t=0){return qz(this,e,t)}iterate(e){let{enter:t,leave:n,from:r=0,to:i=this.length}=e,a=e.mode||0,o=(a&cB.IncludeAnonymous)>0;for(let e=this.cursor(a|cB.IncludeAnonymous);;){let a=!1;if(e.from<=i&&e.to>=r&&(!o&&e.type.isAnonymous||t(e)!==!1)){if(e.firstChild())continue;a=!0}for(;a&&n&&(o||!e.type.isAnonymous)&&n(e),!e.nextSibling();){if(!e.parent())return;a=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(t={}){return this.children.length<=8?this:Zz(iB.none,this.children,this.positions,0,this.children.length,0,this.length,(t,n,r)=>new e(this.type,t,n,r,this.propValues),t.makeTree||((t,n,r)=>new e(iB.none,t,n,r)))}static build(e){return Yz(e)}},lB.empty=new lB(iB.none,[],[],0),uB=class e{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new e(this.buffer,this.index)}},dB=class e{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return iB.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(`,`)}childString(e){let t=this.buffer[e],n=this.buffer[e+3],r=this.set.types[t],i=r.name;if(/\W/.test(i)&&!r.isError&&(i=JSON.stringify(i)),e+=4,n==e)return i;let a=[];for(;e<n;)a.push(this.childString(e)),e=this.buffer[e+3];return i+`(`+a.join(`,`)+`)`}findChild(e,t,n,r,i){let{buffer:a}=this,o=-1;for(let s=e;s!=t&&!(Hz(i,r,a[s+1],a[s+2])&&(o=s,n>0));s=a[s+3]);return o}slice(t,n,r){let i=this.buffer,a=new Uint16Array(n-t),o=0;for(let e=t,s=0;e<n;){a[s++]=i[e++],a[s++]=i[e++]-r;let n=a[s++]=i[e++]-r;a[s++]=i[e++]-t,o=Math.max(o,n)}return new e(a,o,this.set)}},fB=class{cursor(e=0){return new _B(this,e)}getChild(e,t=null,n=null){let r=Wz(this,e,t,n);return r.length?r[0]:null}getChildren(e,t=null,n=null){return Wz(this,e,t,n)}resolve(e,t=0){return Uz(this,e,t,!1)}resolveInner(e,t=0){return Uz(this,e,t,!0)}matchContext(e){return Gz(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let e=t.lastChild;if(!e||e.to!=t.to)break;e.type.isError&&e.from==e.to?(n=t,t=e.prevSibling):t=e}return n}get node(){return this}get next(){return this.parent}},pB=class e extends fB{constructor(e,t,n,r){super(),this._tree=e,this.from=t,this.index=n,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(t,n,r,i,a=0){for(let o=this;;){for(let{children:s,positions:c}=o._tree,l=n>0?s.length:-1;t!=l;t+=n){let l=s[t],u=c[t]+o.from;if(Hz(i,r,u,u+l.length)){if(l instanceof dB){if(a&cB.ExcludeBuffers)continue;let e=l.findChild(0,l.buffer.length,n,r-u,i);if(e>-1)return new hB(new mB(o,l,t,u),null,e)}else if(a&cB.IncludeAnonymous||!l.type.isAnonymous||Jz(l)){let s;if(!(a&cB.IgnoreMounts)&&(s=nB.get(l))&&!s.overlay)return new e(s.tree,u,t,o);let c=new e(l,u,t,o);return a&cB.IncludeAnonymous||!c.type.isAnonymous?c:c.nextChild(n<0?l.children.length-1:0,n,r,i)}}}if(a&cB.IncludeAnonymous||!o.type.isAnonymous||(t=o.index>=0?o.index+n:n<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(t,n,r=0){let i;if(!(r&cB.IgnoreOverlays)&&(i=nB.get(this._tree))&&i.overlay){let r=t-this.from;for(let{from:t,to:a}of i.overlay)if((n>0?t<=r:t<r)&&(n<0?a>=r:a>r))return new e(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}},mB=class{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}},hB=class e extends fB{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(t,n,r){let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],t,n-this.context.start,r);return a<0?null:new e(this.context,this,a)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(t,n,r=0){if(r&cB.ExcludeBuffers)return null;let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,t-this.context.start,n);return a<0?null:new e(this.context,this,a)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:t}=this.context,n=t.buffer[this.index+3];return n<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new e(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new e(this.context,this._parent,t.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,r=this.index+4,i=n.buffer[this.index+3];if(i>r){let a=n.buffer[this.index+1];e.push(n.slice(r,i,a)),t.push(0)}return new lB(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}},gB=class{constructor(e,t){this.heads=e,this.node=t}get next(){return Kz(this.heads)}},_B=class{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof pB)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:n,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=n+r.buffer[e+1],this.to=n+r.buffer[e+2],!0}yield(e){return e?e instanceof pB?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:r}=this.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,n);return i<0?!1:(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?n&cB.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&cB.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&cB.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let e=n<0?0:this.stack[n]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(e)}return n<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let e=0;e<this.index;e++)if(r.buffer.buffer[e+3]<this.index)return!1;({index:t,parent:n}=r)}else ({index:t,_parent:n}=this._tree);for(;n;{index:t,_parent:n}=n)if(t>-1)for(let r=t+e,i=e<0?-1:n._tree.children.length;r!=i;r+=e){let e=n._tree.children[r];if(this.mode&cB.IncludeAnonymous||e instanceof dB||!e.type.isAnonymous||Jz(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)scan:for(let r=this.index,i=this.stack.length;i>=0;){for(let a=e;a;a=a._parent)if(a.index==r){if(r==this.index)return a;t=a,n=i+1;break scan}r=this.stack[--i]}for(let e=n;e<this.stack.length;e++)t=new hB(this.buffer,t,this.stack[e]);return this.bufferNode=new hB(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let r=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){n++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&t&&t(this),r=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,r=!0}}}matchContext(e){if(!this.buffer)return Gz(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let r=e.length-1,i=this.stack.length-1;r>=0;i--){if(i<0)return Gz(this._tree,e,r);let a=n[t.buffer[this.stack[i]]];if(!a.isAnonymous){if(e[r]&&e[r]!=a.name)return!1;r--}}return!0}},vB=new WeakMap,yB=class e{constructor(e,t,n,r,i=!1,a=!1){this.from=e,this.to=t,this.tree=n,this.offset=r,this.open=!!i|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(t,n=[],r=!1){let i=[new e(0,t.length,t,0,!1,r)];for(let e of n)e.to>t.length&&i.push(e);return i}static applyChanges(t,n,r=128){if(!n.length)return t;let i=[],a=1,o=t.length?t[0]:null;for(let s=0,c=0,l=0;;s++){let u=s<n.length?n[s]:null,d=u?u.fromA:1e9;if(d-c>=r)for(;o&&o.from<d;){let n=o;if(c>=n.from||d<=n.to||l){let t=Math.max(n.from,c)-l,r=Math.min(n.to,d)-l;n=t>=r?null:new e(t,r,n.tree,n.offset+l,s>0,!!u)}if(n&&i.push(n),o.to>d)break;o=a<t.length?t[a++]:null}if(!u)break;c=u.toA,l=u.toA-u.toB}return i}},bB=class{startParse(e,t,n){return typeof e==`string`&&(e=new xB(e)),n=n?n.length?n.map(e=>new eB(e.from,e.to)):[new eB(0,0)]:[new eB(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let r=this.startParse(e,t,n);for(;;){let e=r.advance();if(e)return e}}},xB=class{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}},new tB({perNode:!0})}));function CB(e,t){return e.length==t.length&&e.every((e,n)=>e==t[n])}function wB(e){let t=[[]];for(let n=0;n<e.length;n++)for(let r=0,i=t.length;r<i;r++)t.push(t[r].concat(e[n]));return t.sort((e,t)=>t.length-e.length)}function TB(e){let t=Object.create(null);for(let n in e){let r=e[n];Array.isArray(r)||(r=[r]);for(let e of n.split(` `))if(e){let n=[],i=2,a=e;for(let t=0;;){if(a==`...`&&t>0&&t+3==e.length){i=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!r)throw RangeError(`Invalid path: `+e);if(n.push(r[0]==`*`?``:r[0][0]==`"`?JSON.parse(r[0]):r[0]),t+=r[0].length,t==e.length)break;let o=e[t++];if(t==e.length&&o==`!`){i=0;break}if(o!=`/`)throw RangeError(`Invalid path: `+e);a=e.slice(t)}let o=n.length-1,s=n[o];if(!s)throw RangeError(`Invalid path: `+e);t[s]=new FB(r,i,o>0?n.slice(0,o):null).sort(t[s])}}return PB.add(t)}function EB(e,t){let n=Object.create(null);for(let t of e)if(!Array.isArray(t.tag))n[t.tag.id]=t.class;else for(let e of t.tag)n[e.id]=t.class;let{scope:r,all:i=null}=t||{};return{style:e=>{let t=i;for(let r of e)for(let e of r.set){let r=n[e.id];if(r){t=t?t+` `+r:r;break}}return t},scope:r}}function DB(e,t){let n=null;for(let r of e){let e=r.style(t);e&&(n=n?n+` `+e:e)}return n}function OB(e,t,n,r=0,i=e.length){let a=new IB(r,Array.isArray(t)?t:[t],n);a.highlightRange(e.cursor(),r,i,``,a.highlighters),a.flush(i)}function kB(e){let t=e.type.prop(PB);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}var AB,jB,MB,NB,PB,FB,IB,Z,LB,RB,zB,BB,VB,HB,UB,WB,GB,KB,qB,JB,YB,XB,Q,ZB=o((()=>{SB(),AB=0,jB=class e{constructor(e,t,n,r){this.name=e,this.set=t,this.base=n,this.modified=r,this.id=AB++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(t,n){let r=typeof t==`string`?t:`?`;if(t instanceof e&&(n=t),n?.base)throw Error(`Can not derive from a modified tag`);let i=new e(r,[],null,[]);if(i.set.push(i),n)for(let e of n.set)i.set.push(e);return i}static defineModifier(e){let t=new NB(e);return e=>e.modified.indexOf(t)>-1?e:NB.get(e.base||e,e.modified.concat(t).sort((e,t)=>e.id-t.id))}},MB=0,NB=class e{constructor(e){this.name=e,this.instances=[],this.id=MB++}static get(t,n){if(!n.length)return t;let r=n[0].instances.find(e=>e.base==t&&CB(n,e.modified));if(r)return r;let i=[],a=new jB(t.name,i,t,n);for(let e of n)e.instances.push(a);let o=wB(n);for(let n of t.set)if(!n.modified.length)for(let t of o)i.push(e.get(n,t));return a}},PB=new tB({combine(e,t){let n,r,i;for(;e||t;){if(!e||t&&e.depth>=t.depth?(i=t,t=t.next):(i=e,e=e.next),n&&n.mode==i.mode&&!i.context&&!n.context)continue;let a=new FB(i.tags,i.mode,i.context);n?n.next=a:r=a,n=a}return r}}),FB=class{constructor(e,t,n,r){this.tags=e,this.mode=t,this.context=n,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}},FB.empty=new FB([],2,null),IB=class{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=``}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,r,i){let{type:a,from:o,to:s}=e;if(o>=n||s<=t)return;a.isTop&&(i=this.highlighters.filter(e=>!e.scope||e.scope(a)));let c=r,l=kB(e)||FB.empty,u=DB(i,l.tags);if(u&&(c&&(c+=` `),c+=u,l.mode==1&&(r+=(r?` `:``)+u)),this.startSpan(Math.max(t,o),c),l.opaque)return;let d=e.tree&&e.tree.prop(tB.mounted);if(d&&d.overlay){let a=e.node.enter(d.overlay[0].from+o,1),l=this.highlighters.filter(e=>!e.scope||e.scope(d.tree.type)),u=e.firstChild();for(let f=0,p=o;;f++){let m=f<d.overlay.length?d.overlay[f]:null,h=m?m.from+o:s,g=Math.max(t,p),_=Math.min(n,h);if(g<_&&u)for(;e.from<_&&(this.highlightRange(e,g,_,r,i),this.startSpan(Math.min(_,e.to),c),!(e.to>=h||!e.nextSibling())););if(!m||h>n)break;p=m.to+o,p>t&&(this.highlightRange(a.cursor(),Math.max(t,m.from+o),Math.min(n,p),``,l),this.startSpan(Math.min(n,p),c))}u&&e.parent()}else if(e.firstChild()){d&&(r=``);do{if(e.to<=t)continue;if(e.from>=n)break;this.highlightRange(e,t,n,r,i),this.startSpan(Math.min(n,e.to),c)}while(e.nextSibling());e.parent()}}},Z=jB.define,LB=Z(),RB=Z(),zB=Z(RB),BB=Z(RB),VB=Z(),HB=Z(VB),UB=Z(VB),WB=Z(),GB=Z(WB),KB=Z(),qB=Z(),JB=Z(),YB=Z(JB),XB=Z(),Q={comment:LB,lineComment:Z(LB),blockComment:Z(LB),docComment:Z(LB),name:RB,variableName:Z(RB),typeName:zB,tagName:Z(zB),propertyName:BB,attributeName:Z(BB),className:Z(RB),labelName:Z(RB),namespace:Z(RB),macroName:Z(RB),literal:VB,string:HB,docString:Z(HB),character:Z(HB),attributeValue:Z(HB),number:UB,integer:Z(UB),float:Z(UB),bool:Z(VB),regexp:Z(VB),escape:Z(VB),color:Z(VB),url:Z(VB),keyword:KB,self:Z(KB),null:Z(KB),atom:Z(KB),unit:Z(KB),modifier:Z(KB),operatorKeyword:Z(KB),controlKeyword:Z(KB),definitionKeyword:Z(KB),moduleKeyword:Z(KB),operator:qB,derefOperator:Z(qB),arithmeticOperator:Z(qB),logicOperator:Z(qB),bitwiseOperator:Z(qB),compareOperator:Z(qB),updateOperator:Z(qB),definitionOperator:Z(qB),typeOperator:Z(qB),controlOperator:Z(qB),punctuation:JB,separator:Z(JB),bracket:YB,angleBracket:Z(YB),squareBracket:Z(YB),paren:Z(YB),brace:Z(YB),content:WB,heading:GB,heading1:Z(GB),heading2:Z(GB),heading3:Z(GB),heading4:Z(GB),heading5:Z(GB),heading6:Z(GB),contentSeparator:Z(WB),list:Z(WB),quote:Z(WB),emphasis:Z(WB),strong:Z(WB),link:Z(WB),monospace:Z(WB),strikethrough:Z(WB),inserted:Z(),deleted:Z(),changed:Z(),invalid:Z(),meta:XB,documentMeta:Z(XB),annotation:Z(XB),processingInstruction:Z(XB),definition:jB.defineModifier(`definition`),constant:jB.defineModifier(`constant`),function:jB.defineModifier(`function`),standard:jB.defineModifier(`standard`),local:jB.defineModifier(`local`),special:jB.defineModifier(`special`)};for(let e in Q){let t=Q[e];t instanceof jB&&(t.name=e)}EB([{tag:Q.link,class:`tok-link`},{tag:Q.heading,class:`tok-heading`},{tag:Q.emphasis,class:`tok-emphasis`},{tag:Q.strong,class:`tok-strong`},{tag:Q.keyword,class:`tok-keyword`},{tag:Q.atom,class:`tok-atom`},{tag:Q.bool,class:`tok-bool`},{tag:Q.url,class:`tok-url`},{tag:Q.labelName,class:`tok-labelName`},{tag:Q.inserted,class:`tok-inserted`},{tag:Q.deleted,class:`tok-deleted`},{tag:Q.literal,class:`tok-literal`},{tag:Q.string,class:`tok-string`},{tag:Q.number,class:`tok-number`},{tag:[Q.regexp,Q.escape,Q.special(Q.string)],class:`tok-string2`},{tag:Q.variableName,class:`tok-variableName`},{tag:Q.local(Q.variableName),class:`tok-variableName tok-local`},{tag:Q.definition(Q.variableName),class:`tok-variableName tok-definition`},{tag:Q.special(Q.variableName),class:`tok-variableName2`},{tag:Q.definition(Q.propertyName),class:`tok-propertyName tok-definition`},{tag:Q.typeName,class:`tok-typeName`},{tag:Q.namespace,class:`tok-namespace`},{tag:Q.className,class:`tok-className`},{tag:Q.macroName,class:`tok-macroName`},{tag:Q.propertyName,class:`tok-propertyName`},{tag:Q.operator,class:`tok-operator`},{tag:Q.comment,class:`tok-comment`},{tag:Q.meta,class:`tok-meta`},{tag:Q.invalid,class:`tok-invalid`},{tag:Q.punctuation,class:`tok-punctuation`}])}));function QB(e){return J.define({combine:e?t=>t.concat(e):void 0})}function $B(e,t,n){let r=e.facet(ZV),i=eV(e).topNode;if(!r||r.allowsNesting)for(let e=i;e;e=e.enter(t,n,cB.ExcludeBuffers))e.type.isTop&&(i=e);return i}function eV(e){let t=e.field(HV.state,!1);return t?t.tree:lB.empty}function tV(e,t,n){return yB.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}function nV(e){let t=e.facet(eH);return t.charCodeAt(0)==9?e.tabSize*t.length:t.length}function rV(e,t){let n=``,r=e.tabSize,i=e.facet(eH)[0];if(i==` `){for(;t>=r;)n+=` `,t-=r;i=` `}for(let e=0;e<t;e++)n+=i;return n}function iV(e,t){e instanceof fM&&(e=new tH(e));for(let n of e.state.facet($V)){let r=n(e,t);if(r!==void 0)return r}let n=eV(e.state);return n.length>=t?aV(e,n,t):null}function aV(e,t,n){let r=t.resolveStack(n),i=t.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(i!=r.node){let e=[];for(let t=i;t&&!(t.from<r.node.from||t.to>r.node.to||t.from==r.node.from&&t.type==r.node.type);t=t.parent)e.push(t);for(let t=e.length-1;t>=0;t--)r={node:e[t],next:r}}return oV(r,e,n)}function oV(e,t,n){for(let r=e;r;r=r.next){let e=cV(r.node);if(e)return e(rH.create(t,n,r))}return 0}function sV(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}function cV(e){let t=e.type.prop(nH);if(t)return t;let n=e.firstChild,r;if(n&&(r=n.type.prop(tB.closedBy))){let t=e.lastChild,n=t&&r.indexOf(t.name)>-1;return e=>pV(e,!0,1,void 0,n&&!sV(e)?t.from:void 0)}return e.parent==null?lV:null}function lV(){return 0}function uV(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}function dV(e){let t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;let i=e.options.simulateBreak,a=e.state.doc.lineAt(n.from),o=i==null||i<=a.from?a.to:Math.min(a.to,i);for(let e=n.to;;){let i=t.childAfter(e);if(!i||i==r)return null;if(!i.type.isSkipped){if(i.from>=o)return null;let e=/^ */.exec(a.text.slice(n.to-a.from))[0].length;return{from:n.from,to:n.to+e}}e=i.to}}function fV({closing:e,align:t=!0,units:n=1}){return r=>pV(r,t,n,e)}function pV(e,t,n,r,i){let a=e.textAfter,o=a.match(/^\s*/)[0].length,s=r&&a.slice(o,o+r.length)==r||i==e.pos+o,c=t?dV(e):null;return c?s?e.column(c.from):e.column(c.to):e.baseIndent+(s?0:e.unit*n)}function mV(){return fM.transactionFilter.of(e=>{if(!e.docChanged||!e.isUserEvent(`input.type`)&&!e.isUserEvent(`input.complete`))return e;let t=e.startState.languageDataAt(`indentOnInput`,e.startState.selection.main.head);if(!t.length)return e;let n=e.newDoc,{head:r}=e.newSelection.main,i=n.lineAt(r);if(r>i.from+iH)return e;let a=n.sliceString(i.from,r);if(!t.some(e=>e.test(a)))return e;let{state:o}=e,s=-1,c=[];for(let{head:e}of o.selection.ranges){let t=o.doc.lineAt(e);if(t.from==s)continue;s=t.from;let n=iV(o,t.from);if(n==null)continue;let r=/^\s*/.exec(t.text)[0],i=rV(o,n);r!=i&&c.push({from:t.from,to:t.from+r.length,insert:i})}return c.length?[e,{changes:c,sequential:!0}]:e})}function hV(e){let t=e.firstChild,n=e.lastChild;return t&&t.to<n.from?{from:t.to,to:n.type.isError?e.to:n.from}:null}function gV(e,t,n){let r=eV(e);if(r.length<n)return null;let i=r.resolveStack(n,1),a=null;for(let o=i;o;o=o.next){let i=o.node;if(i.to<=n||i.from>n)continue;if(a&&i.from<t)break;let s=i.type.prop(oH);if(s&&(i.to<r.length-50||r.length==e.doc.length||!_V(i))){let r=s(i,e);r&&r.from<=n&&r.from>=t&&r.to>n&&(a=r)}}return a}function _V(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}function vV(e,t,n){for(let r of e.facet(aH)){let i=r(e,t,n);if(i)return i}return gV(e,t,n)}function yV(e,t){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);return n>=r?void 0:{from:n,to:r}}function bV(e){let t=[];for(let{head:n}of e.state.selection.ranges)t.some(e=>e.from<=n&&e.to>=n)||t.push(e.lineBlockAt(n));return t}function xV(e,t,n=t){let r=!1;return e.between(t,n,(e,i)=>{e<n&&i>t&&(r=!0)}),r?e.update({filterFrom:t,filterTo:n,filter:(e,r)=>e>=n||r<=t}):e}function SV(e,t,n){var r;let i=null;return(r=e.field(lH,!1))==null||r.between(t,n,(e,t)=>{(!i||i.from>e)&&(i={from:e,to:t})}),i}function CV(e,t,n){let r=!1;return e.between(t,t,(e,i)=>{e==t&&i==n&&(r=!0)}),r}function wV(e,t){return e.field(lH,!1)?t:t.concat(oM.appendConfig.of(EV()))}function TV(e,t,n=!0){let r=e.state.doc.lineAt(t.from).number,i=e.state.doc.lineAt(t.to).number;return X.announce.of(`${e.state.phrase(n?`Folded lines`:`Unfolded lines`)} ${r} ${e.state.phrase(`to`)} ${i}.`)}function EV(e){let t=[lH,xH];return e&&t.push(gH.of(e)),t}function DV(e,t){let{state:n}=e,r=n.facet(gH),i=t=>{let n=e.lineBlockAt(e.posAtDOM(t.target)),r=SV(e.state,n.from,n.to);r&&e.dispatch({effects:cH.of(r)}),t.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(e,i,t);let a=document.createElement(`span`);return a.textContent=r.placeholderText,a.setAttribute(`aria-label`,n.phrase(`folded code`)),a.title=n.phrase(`unfold`),a.className=`cm-foldPlaceholder`,a.onclick=i,a}function OV(e={}){let t={...yH,...e},n=new bH(t,!0),r=new bH(t,!1),i=dL.fromClass(class{constructor(e){this.from=e.viewport.from,this.markers=this.buildMarkers(e)}update(e){(e.docChanged||e.viewportChanged||e.startState.facet(ZV)!=e.state.facet(ZV)||e.startState.field(lH,!1)!=e.state.field(lH,!1)||eV(e.startState)!=eV(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}buildMarkers(e){let t=new _M;for(let i of e.viewportLineBlocks){let a=SV(e.state,i.from,i.to)?r:vV(e.state,i.from,i.to)?n:null;a&&t.add(i.from,i.from,a)}return t.finish()}}),{domEventHandlers:a}=t;return[i,KF({class:`cm-foldGutter`,markers(e){return e.plugin(i)?.markers||gM.empty},initialSpacer(){return new bH(t,!1)},domEventHandlers:{...a,click:(e,t,n)=>{if(a.click&&a.click(e,t,n))return!0;let r=SV(e.state,t.from,t.to);if(r)return e.dispatch({effects:cH.of(r)}),!0;let i=vV(e.state,t.from,t.to);return i?(e.dispatch({effects:sH.of(i)}),!0):!1}}}),EV()]}function kV(e){let t=e.facet(CH);return t.length?t:e.facet(wH)}function AV(e,t){let n=[EH],r;return e instanceof SH&&(e.module&&n.push(X.styleModule.of(e.module)),r=e.themeType),t?.fallback?n.push(wH.of(e)):r?n.push(CH.computeN([X.darkTheme],t=>t.facet(X.darkTheme)==(r==`dark`)?[e]:[])):n.push(CH.of(e)),n}function jV(e){let t=[],n=e.matched?MH:NH;return t.push(n.range(e.start.from,e.start.to)),e.end&&t.push(n.range(e.end.from,e.end.to)),t}function MV(e={}){return[jH.of(e),PH]}function NV(e,t,n){let r=e.prop(t<0?tB.openedBy:tB.closedBy);if(r)return r;if(e.name.length==1){let r=n.indexOf(e.name);if(r>-1&&r%2==+(t<0))return[n[r+t]]}return null}function PV(e){let t=e.type.prop(FH);return t?t(e.node):e}function FV(e,t,n,r={}){let i=r.maxScanDistance||kH,a=r.brackets||AH,o=eV(e),s=o.resolveInner(t,n);for(let r=s;r;r=r.parent){let i=NV(r.type,n,a);if(i&&r.from<r.to){let o=PV(r);if(o&&(n>0?t>=o.from&&t<o.to:t>o.from&&t<=o.to))return IV(e,t,n,r,o,i,a)}}return LV(e,t,n,o,s.type,i,a)}function IV(e,t,n,r,i,a,o){let s=r.parent,c={from:i.from,to:i.to},l=0,u=s?.cursor();if(u&&(n<0?u.childBefore(r.from):u.childAfter(r.to)))do if(n<0?u.to<=r.from:u.from>=r.to){if(l==0&&a.indexOf(u.type.name)>-1&&u.from<u.to){let e=PV(u);return{start:c,end:e?{from:e.from,to:e.to}:void 0,matched:!0}}else if(NV(u.type,n,o))l++;else if(NV(u.type,-n,o)){if(l==0){let e=PV(u);return{start:c,end:e&&e.from<e.to?{from:e.from,to:e.to}:void 0,matched:!1}}l--}}while(n<0?u.prevSibling():u.nextSibling());return{start:c,matched:!1}}function LV(e,t,n,r,i,a,o){let s=n<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),c=o.indexOf(s);if(c<0||c%2==0!=n>0)return null;let l={from:n<0?t-1:t,to:n>0?t+1:t},u=e.doc.iterRange(t,n>0?e.doc.length:0),d=0;for(let e=0;!u.next().done&&e<=a;){let a=u.value;n<0&&(e+=a.length);let s=t+e*n;for(let e=n>0?0:a.length-1,t=n>0?a.length:-1;e!=t;e+=n){let t=o.indexOf(a[e]);if(!(t<0||r.resolveInner(s+e,1).type!=i))if(t%2==0==n>0)d++;else if(d==1)return{start:l,end:{from:s+e,to:s+e+1},matched:t>>1==c>>1};else d--}n>0&&(e+=a.length)}return u.done?{start:l,matched:!1}:null}function RV(e,t){RH.indexOf(e)>-1||(RH.push(e),console.warn(t))}function zV(e,t){let n=[];for(let r of t.split(` `)){let t=[];for(let n of r.split(`.`)){let r=e[n]||Q[n];r?typeof r==`function`?t.length?t=t.map(r):RV(n,`Modifier ${n} used at start of tag`):t.length?RV(n,`Tag ${n} used as modifier`):t=Array.isArray(r)?r:[r]:RV(n,`Unknown highlighting tag ${n}`)}for(let e of t)n.push(e)}if(!n.length)return 0;let r=t.replace(/ /g,`_`),i=r+` `+n.map(e=>e.id),a=zH[i];if(a)return a.id;let o=zH[i]=iB.define({id:LH.length,name:r,props:[TB({[r]:n})]});return LH.push(o),o.id}var BV,VV,HV,UV,WV,GV,KV,qV,JV,YV,XV,ZV,QV,$V,eH,tH,nH,rH,iH,aH,oH,sH,cH,lH,uH,dH,fH,pH,mH,hH,gH,_H,vH,yH,bH,xH,SH,CH,wH,TH,EH,DH,OH,kH,AH,jH,MH,NH,PH,FH,IH,LH,RH,zH,BH,VH=o((()=>{SB(),xM(),Vz(),ZB(),kM(),BV=new tB,VV=new tB,HV=class{constructor(e,t,n=[],r=``){this.data=e,this.name=r,fM.prototype.hasOwnProperty(`tree`)||Object.defineProperty(fM.prototype,`tree`,{get(){return eV(this)}}),this.parser=t,this.extension=[ZV.of(this),fM.languageData.of((e,t,n)=>{let r=$B(e,t,n),i=r.type.prop(BV);if(!i)return[];let a=e.facet(i),o=r.type.prop(VV);if(o){let i=r.resolve(t-r.from,n);for(let t of o)if(t.test(i,e)){let n=e.facet(t.facet);return t.type==`replace`?n:n.concat(a)}}return a})].concat(n)}isActiveAt(e,t,n=-1){return $B(e,t,n).type.prop(BV)==this.data}findRegions(e){let t=e.facet(ZV);if(t?.data==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],r=(e,t)=>{if(e.prop(BV)==this.data){n.push({from:t,to:t+e.length});return}let i=e.prop(tB.mounted);if(i){if(i.tree.prop(BV)==this.data){if(i.overlay)for(let e of i.overlay)n.push({from:e.from+t,to:e.to+t});else n.push({from:t,to:t+e.length});return}else if(i.overlay){let e=n.length;if(r(i.tree,i.overlay[0].from+t),n.length>e)return}}for(let n=0;n<e.children.length;n++){let i=e.children[n];i instanceof lB&&r(i,e.positions[n]+t)}};return r(eV(e),0),n}get allowsNesting(){return!0}},HV.setState=oM.define(),UV=class e extends HV{constructor(e,t,n){super(e,t,[],n),this.parser=t}static define(t){let n=QB(t.languageData);return new e(n,t.parser.configure({props:[BV.add(e=>e.isTop?n:void 0)]}),t.name)}configure(t,n){return new e(this.data,this.parser.configure(t),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}},WV=class{constructor(e){this.doc=e,this.cursorPos=0,this.string=``,this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}},GV=null,KV=class e{constructor(e,t,n=[],r,i,a,o,s){this.parser=e,this.state=t,this.fragments=n,this.tree=r,this.treeLen=i,this.viewport=a,this.skipped=o,this.scheduleOn=s,this.parse=null,this.tempSkipped=[]}static create(t,n,r){return new e(t,n,[],lB.empty,0,r,[],null)}startParse(){return this.parser.startParse(new WV(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=lB.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{if(typeof e==`number`){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let n=this.parse.advance();if(n)if(this.fragments=this.withoutTempSkipped(yB.addTree(n,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=this.parse.stoppedAt??this.state.doc.length,this.tree=n,this.parse=null,this.treeLen<(t??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(yB.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=GV;GV=this;try{return e()}finally{GV=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=tV(e,t.from,t.to);return e}changes(t,n){let{fragments:r,tree:i,treeLen:a,viewport:o,skipped:s}=this;if(this.takeTree(),!t.empty){let e=[];if(t.iterChangedRanges((t,n,r,i)=>e.push({fromA:t,toA:n,fromB:r,toB:i})),r=yB.applyChanges(r,e),i=lB.empty,a=0,o={from:t.mapPos(o.from,-1),to:t.mapPos(o.to,1)},this.skipped.length){s=[];for(let e of this.skipped){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);n<r&&s.push({from:n,to:r})}}}return new e(this.parser,n,r,i,a,o,s,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let t=0;t<this.skipped.length;t++){let{from:n,to:r}=this.skipped[t];n<e.to&&r>e.from&&(this.fragments=tV(this.fragments,n,r),this.skipped.splice(t--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends bB{createParse(t,n,r){let i=r[0].from,a=r[r.length-1].to;return{parsedPos:i,advance(){let t=GV;if(t){for(let e of r)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=a,new lB(iB.none,[],[],a-i)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return GV}},qV=class e{constructor(e){this.context=e,this.tree=e.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(t.changes,t.state),r=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new e(n)}static init(t){let n=Math.min(3e3,t.doc.length),r=KV.create(t.facet(ZV).parser,t,{from:0,to:n});return r.work(20,n)||r.takeTree(),new e(r)}},HV.state=Uj.define({create:qV.init,update(e,t){for(let e of t.effects)if(e.is(HV.setState))return e.value;return t.startState.facet(ZV)==t.state.facet(ZV)?e.apply(t):qV.init(t.state)}}),JV=e=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)},typeof requestIdleCallback<`u`&&(JV=e=>{let t=-1,n=setTimeout(()=>{t=requestIdleCallback(e,{timeout:400})},100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)}),YV=typeof navigator<`u`&&navigator.scheduling?.isInputPending?()=>navigator.scheduling.isInputPending():null,XV=dL.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(HV.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(HV.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=JV(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:r}}=this.view,i=n.field(HV.state);if(i.tree==i.context.tree&&i.context.isDone(r+1e5))return;let a=Date.now()+Math.min(this.chunkBudget,100,e&&!YV?Math.max(25,e.timeRemaining()-5):1e9),o=i.context.treeLen<r&&n.doc.length>r+1e3,s=i.context.work(()=>YV&&YV()||Date.now()>a,r+(o?0:1e5));this.chunkBudget-=Date.now()-t,(s||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:HV.setState.of(new qV(i.context))})),this.chunkBudget>0&&!(s&&!o)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(e=>RN(this.view.state,e)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),ZV=J.define({combine(e){return e.length?e[0]:null},enables:e=>[HV.state,XV,X.contentAttributes.compute([e],t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}})]}),QV=class{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}},$V=J.define(),eH=J.define({combine:e=>{if(!e.length)return` `;let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some(e=>e!=t[0]))throw Error(`Invalid indent unit: `+JSON.stringify(e[0]));return t}}),tH=class{constructor(e,t={}){this.state=e,this.options=t,this.unit=nV(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:i}=this.options;return r!=null&&r>=n.from&&r<=n.to?i&&r==e?{text:``,from:e}:(t<0?r<e:r<=e)?{text:n.text.slice(r-n.from),from:r}:{text:n.text.slice(0,r-n.from),from:n.from}:n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return``;let{text:n,from:r}=this.lineAt(e,t);return n.slice(e-r,Math.min(n.length,e+100-r))}column(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.countColumn(n,e-r),a=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return a>-1&&(i+=a-this.countColumn(n,n.search(/\S|$/))),i}countColumn(e,t=e.length){return Tj(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.options.overrideIndentation;if(i){let e=i(r);if(e>-1)return e}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}},nH=new tB,rH=class e extends tH{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(t,n,r){return new e(t,n,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(uV(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return oV(this.context.next,this.base,this.pos)}},iH=200,aH=J.define(),oH=new tB,sH=oM.define({map:yV}),cH=oM.define({map:yV}),lH=Uj.define({create(){return DI.none},update(e,t){t.isUserEvent(`delete`)&&t.changes.iterChangedRanges((t,n)=>e=xV(e,t,n)),e=e.map(t.changes);for(let n of t.effects)if(n.is(sH)&&!CV(e,n.value.from,n.value.to)){let{preparePlaceholder:r}=t.state.facet(gH),i=r?DI.replace({widget:new vH(r(t.state,n.value))}):_H;e=e.update({add:[i.range(n.value.from,n.value.to)]})}else n.is(cH)&&(e=e.update({filter:(e,t)=>n.value.from!=e||n.value.to!=t,filterFrom:n.value.from,filterTo:n.value.to}));return t.selection&&(e=xV(e,t.selection.main.head)),e},provide:e=>X.decorations.from(e),toJSON(e,t){let n=[];return e.between(0,t.doc.length,(e,t)=>{n.push(e,t)}),n},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw RangeError(`Invalid JSON for fold state`);let t=[];for(let n=0;n<e.length;){let r=e[n++],i=e[n++];if(typeof r!=`number`||typeof i!=`number`)throw RangeError(`Invalid JSON for fold state`);t.push(_H.range(r,i))}return DI.set(t,!0)}}),uH=e=>{for(let t of bV(e)){let n=vV(e.state,t.from,t.to);if(n)return e.dispatch({effects:wV(e.state,[sH.of(n),TV(e,n)])}),!0}return!1},dH=e=>{if(!e.state.field(lH,!1))return!1;let t=[];for(let n of bV(e)){let r=SV(e.state,n.from,n.to);r&&t.push(cH.of(r),TV(e,r,!1))}return t.length&&e.dispatch({effects:t}),t.length>0},fH=e=>{let{state:t}=e,n=[];for(let r=0;r<t.doc.length;){let i=e.lineBlockAt(r),a=vV(t,i.from,i.to);a&&n.push(sH.of(a)),r=(a?e.lineBlockAt(a.to):i).to+1}return n.length&&e.dispatch({effects:wV(e.state,n)}),!!n.length},pH=e=>{let t=e.state.field(lH,!1);if(!t||!t.size)return!1;let n=[];return t.between(0,e.state.doc.length,(e,t)=>{n.push(cH.of({from:e,to:t}))}),e.dispatch({effects:n}),!0},mH=[{key:`Ctrl-Shift-[`,mac:`Cmd-Alt-[`,run:uH},{key:`Ctrl-Shift-]`,mac:`Cmd-Alt-]`,run:dH},{key:`Ctrl-Alt-[`,run:fH},{key:`Ctrl-Alt-]`,run:pH}],hH={placeholderDOM:null,preparePlaceholder:null,placeholderText:`…`},gH=J.define({combine(e){return hj(e,hH)}}),_H=DI.replace({widget:new class extends TI{toDOM(e){return DV(e,null)}}}),vH=class extends TI{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return DV(e,this.value)}},yH={openText:`⌄`,closedText:`›`,markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1},bH=class extends wz{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement(`span`);return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?`Fold line`:`Unfold line`),t}},xH=X.baseTheme({".cm-foldPlaceholder":{backgroundColor:`#eee`,border:`1px solid #ddd`,color:`#888`,borderRadius:`.2em`,margin:`0 1px`,padding:`0 1px`,cursor:`pointer`},".cm-foldGutter span":{padding:`0 1px`,cursor:`pointer`}}),SH=class e{constructor(e,t){this.specs=e;let n;function r(e){let t=EM.newName();return(n||(n=Object.create(null)))[`.`+t]=e,t}let i=typeof t.all==`string`?t.all:t.all?r(t.all):void 0,a=t.scope;this.scope=a instanceof HV?e=>e.prop(BV)==a.data:a?e=>e==a:void 0,this.style=EB(e.map(e=>({tag:e.tag,class:e.class||r(Object.assign({},e,{tag:null}))})),{all:i}).style,this.module=n?new EM(n):null,this.themeType=t.themeType}static define(t,n){return new e(t,n||{})}},CH=J.define(),wH=J.define({combine(e){return e.length?[e[0]]:null}}),TH=class{constructor(e){this.markCache=Object.create(null),this.tree=eV(e.state),this.decorations=this.buildDeco(e,kV(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=eV(e.state),n=kV(e.state),r=n!=kV(e.startState),{viewport:i}=e.view,a=e.changes.mapPos(this.decoratedTo,1);t.length<i.to&&!r&&t.type==this.tree.type&&a>=i.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=a):(t!=this.tree||e.viewportChanged||r)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=i.to)}buildDeco(e,t){if(!t||!this.tree.length)return DI.none;let n=new _M;for(let{from:r,to:i}of e.visibleRanges)OB(this.tree,t,(e,t,r)=>{n.add(e,t,this.markCache[r]||(this.markCache[r]=DI.mark({class:r})))},r,i);return n.finish()}},EH=Gj.high(dL.fromClass(TH,{decorations:e=>e.decorations})),DH=SH.define([{tag:Q.meta,color:`#404740`},{tag:Q.link,textDecoration:`underline`},{tag:Q.heading,textDecoration:`underline`,fontWeight:`bold`},{tag:Q.emphasis,fontStyle:`italic`},{tag:Q.strong,fontWeight:`bold`},{tag:Q.strikethrough,textDecoration:`line-through`},{tag:Q.keyword,color:`#708`},{tag:[Q.atom,Q.bool,Q.url,Q.contentSeparator,Q.labelName],color:`#219`},{tag:[Q.literal,Q.inserted],color:`#164`},{tag:[Q.string,Q.deleted],color:`#a11`},{tag:[Q.regexp,Q.escape,Q.special(Q.string)],color:`#e40`},{tag:Q.definition(Q.variableName),color:`#00f`},{tag:Q.local(Q.variableName),color:`#30a`},{tag:[Q.typeName,Q.namespace],color:`#085`},{tag:Q.className,color:`#167`},{tag:[Q.special(Q.variableName),Q.macroName],color:`#256`},{tag:Q.definition(Q.propertyName),color:`#00c`},{tag:Q.comment,color:`#940`},{tag:Q.invalid,color:`#f00`}]),OH=X.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:`#328c8252`},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:`#bb555544`}}),kH=1e4,AH=`()[]{}`,jH=J.define({combine(e){return hj(e,{afterCursor:!0,brackets:AH,maxScanDistance:kH,renderMatch:jV})}}),MH=DI.mark({class:`cm-matchingBracket`}),NH=DI.mark({class:`cm-nonmatchingBracket`}),PH=[Uj.define({create(){return DI.none},update(e,t){if(!t.docChanged&&!t.selection)return e;let n=[],r=t.state.facet(jH);for(let e of t.state.selection.ranges){if(!e.empty)continue;let i=FV(t.state,e.head,-1,r)||e.head>0&&FV(t.state,e.head-1,1,r)||r.afterCursor&&(FV(t.state,e.head,1,r)||e.head<t.state.doc.length&&FV(t.state,e.head+1,-1,r));i&&(n=n.concat(r.renderMatch(i,t.state)))}return DI.set(n,!0)},provide:e=>X.decorations.from(e)}),OH],FH=new tB,IH=Object.create(null),LH=[iB.none],RH=[],zH=Object.create(null),BH=Object.create(null);for(let[e,t]of[[`variable`,`variableName`],[`variable-2`,`variableName.special`],[`string-2`,`string.special`],[`def`,`variableName.definition`],[`tag`,`tagName`],[`attribute`,`attributeName`],[`type`,`typeName`],[`builtin`,`variableName.standard`],[`qualifier`,`modifier`],[`error`,`invalid`],[`header`,`heading`],[`property`,`propertyName`]])BH[e]=zV(IH,t);II.RTL,II.LTR}));kM(),ZB();var HH=class e{constructor(e,t,n,r){this.fromA=e,this.toA=t,this.fromB=n,this.toB=r}offset(t,n=t){return new e(this.fromA+t,this.toA+t,this.fromB+n,this.toB+n)}};function UH(e,t,n,r,i,a){if(e==r)return[];let o=$H(e,t,n,r,i,a),s=eU(e,t+o,n,r,i+o,a);t+=o,n-=s,i+=o,a-=s;let c=n-t,l=a-i;if(!c||!l)return[new HH(t,n,i,a)];if(c>l){let o=e.slice(t,n).indexOf(r.slice(i,a));if(o>-1)return[new HH(t,t+o,i,i),new HH(t+o+l,n,a,a)]}else if(l>c){let o=r.slice(i,a).indexOf(e.slice(t,n));if(o>-1)return[new HH(t,t,i,i+o),new HH(n,n,i+o+c,a)]}if(c==1||l==1)return[new HH(t,n,i,a)];let u=nU(e,t,n,r,i,a);if(u){let[o,s,c]=u;return UH(e,t,o,r,i,s).concat(UH(e,o+c,n,r,s+c,a))}return qH(e,t,n,r,i,a)}var WH=1e9,GH=0,KH=!1;function qH(e,t,n,r,i,a){let o=n-t,s=a-i;if(WH<1e9&&Math.min(o,s)>WH*16||GH>0&&Date.now()>GH)return Math.min(o,s)>WH*64?[new HH(t,n,i,a)]:rU(e,t,n,r,i,a);let c=Math.ceil((o+s)/2);YH.reset(c),XH.reset(c);let l=(n,a)=>e.charCodeAt(t+n)==r.charCodeAt(i+a),u=(t,i)=>e.charCodeAt(n-t-1)==r.charCodeAt(a-i-1),d=(o-s)%2==0?null:XH,f=d?null:YH;for(let p=0;p<c;p++){if(p>WH||GH>0&&!(p&63)&&Date.now()>GH)return rU(e,t,n,r,i,a);let m=YH.advance(p,o,s,c,d,!1,l)||XH.advance(p,o,s,c,f,!0,u);if(m)return ZH(e,t,n,t+m[0],r,i,a,i+m[1])}return[new HH(t,n,i,a)]}var JH=class{constructor(){this.vec=[]}reset(e){this.len=e<<1;for(let e=0;e<this.len;e++)this.vec[e]=-1;this.vec[e+1]=0,this.start=this.end=0}advance(e,t,n,r,i,a,o){for(let s=-e+this.start;s<=e-this.end;s+=2){let c=r+s,l=s==-e||s!=e&&this.vec[c-1]<this.vec[c+1]?this.vec[c+1]:this.vec[c-1]+1,u=l-s;for(;l<t&&u<n&&o(l,u);)l++,u++;if(this.vec[c]=l,l>t)this.end+=2;else if(u>n)this.start+=2;else if(i){let e=r+(t-n)-s;if(e>=0&&e<this.len&&i.vec[e]!=-1)if(a){let n=i.vec[e];if(n>=t-l)return[n,r+n-e]}else{let n=t-i.vec[e];if(l>=n)return[l,u]}}}return null}},YH=new JH,XH=new JH;function ZH(e,t,n,r,i,a,o,s){let c=!1;return!vU(e,r)&&++r==n&&(c=!0),!vU(i,s)&&++s==o&&(c=!0),c?[new HH(t,n,a,o)]:UH(e,t,r,i,a,s).concat(UH(e,r,n,i,s,o))}function QH(e,t){let n=1,r=Math.min(e,t);for(;n<r;)n<<=1;return n}function $H(e,t,n,r,i,a){if(t==n||t==a||e.charCodeAt(t)!=r.charCodeAt(i))return 0;let o=QH(n-t,a-i);for(let s=t,c=i;;){let i=s+o,l=c+o;if(i>n||l>a||e.slice(s,i)!=r.slice(c,l)){if(o==1)return s-t-+!vU(e,s);o>>=1}else if(i==n||l==a)return i-t;else s=i,c=l}}function eU(e,t,n,r,i,a){if(t==n||i==a||e.charCodeAt(n-1)!=r.charCodeAt(a-1))return 0;let o=QH(n-t,a-i);for(let s=n,c=a;;){let a=s-o,l=c-o;if(a<t||l<i||e.slice(a,s)!=r.slice(l,c)){if(o==1)return n-s-+!vU(e,s);o>>=1}else if(a==t||l==i)return n-a;else s=a,c=l}}function tU(e,t,n,r,i,a,o,s){let c=r.slice(i,a),l=null;for(;;){if(l||o<s)return l;for(let s=t+o;;){vU(e,s)||s++;let u=s+o;if(vU(e,u)||(u+=u==s+1?1:-1),u>=n)break;let d=e.slice(s,u),f=-1;for(;(f=c.indexOf(d,f+1))!=-1;){let o=$H(e,u,n,r,i+f+d.length,a),c=eU(e,t,s,r,i,i+f),p=d.length+o+c;(!l||l[2]<p)&&(l=[s-c,i+f-c,p])}s=u}if(s<0)return l;o>>=1}}function nU(e,t,n,r,i,a){let o=n-t,s=a-i;if(o<s){let o=nU(r,i,a,e,t,n);return o&&[o[1],o[0],o[2]]}return o<4||s*2<o?null:tU(e,t,n,r,i,a,Math.floor(o/4),-1)}function rU(e,t,n,r,i,a){KH=!0;let o=n-t,s=a-i,c;if(o<s){let s=tU(r,i,a,e,t,n,Math.floor(o/6),50);c=s&&[s[1],s[0],s[2]]}else c=tU(e,t,n,r,i,a,Math.floor(s/6),50);if(!c)return[new HH(t,n,i,a)];let[l,u,d]=c;return UH(e,t,l,r,i,u).concat(UH(e,l+d,n,r,u+d,a))}function iU(e,t){for(let n=1;n<e.length;n++){let r=e[n-1],i=e[n];r.toA>i.fromA-t&&r.toB>i.fromB-t&&(e[n-1]=new HH(r.fromA,i.toA,r.fromB,i.toB),e.splice(n--,1))}}function aU(e,t,n){for(;;){iU(n,1);let r=!1;for(let i=0;i<n.length;i++){let a=n[i],o,s;(o=$H(e,a.fromA,a.toA,t,a.fromB,a.toB))&&(a=n[i]=new HH(a.fromA+o,a.toA,a.fromB+o,a.toB)),(s=eU(e,a.fromA,a.toA,t,a.fromB,a.toB))&&(a=n[i]=new HH(a.fromA,a.toA-s,a.fromB,a.toB-s));let c=a.toA-a.fromA,l=a.toB-a.fromB;if(c&&l)continue;let u=a.fromA-(i?n[i-1].toA:0),d=(i<n.length-1?n[i+1].fromA:e.length)-a.toA;if(!u||!d)continue;let f=c?e.slice(a.fromA,a.toA):t.slice(a.fromB,a.toB);u<=f.length&&e.slice(a.fromA-u,a.fromA)==f.slice(f.length-u)?(n[i]=new HH(a.fromA-u,a.toA-u,a.fromB-u,a.toB-u),r=!0):d<=f.length&&e.slice(a.toA,a.toA+d)==f.slice(0,d)&&(n[i]=new HH(a.fromA+d,a.toA+d,a.fromB+d,a.toB+d),r=!0)}if(!r)break}return n}function oU(e,t,n){for(let r=0,i=0;i<e.length;i++){let a=e[i],o=a.toA-a.fromA,s=a.toB-a.fromB;if(o&&s||o>3||s>3){let c=i==e.length-1?t.length:e[i+1].fromA,l=a.fromA-r,u=c-a.toA,d=pU(t,a.fromA,l),f=fU(t,a.toA,u),p=a.fromA-d,m=f-a.toA;if((!o||!s)&&p&&m){let l=Math.max(o,s),[u,h,g]=o?[t,a.fromA,a.toA]:[n,a.fromB,a.toB];l>p&&t.slice(d,a.fromA)==u.slice(g-p,g)?(a=e[i]=new HH(d,d+o,a.fromB-p,a.toB-p),d=a.fromA,f=fU(t,a.toA,c-a.toA)):l>m&&t.slice(a.toA,f)==u.slice(h,h+m)&&(a=e[i]=new HH(f-o,f,a.fromB+m,a.toB+m),f=a.toA,d=pU(t,a.fromA,a.fromA-r)),p=a.fromA-d,m=f-a.toA}if(p||m)a=e[i]=new HH(a.fromA-p,a.toA+m,a.fromB-p,a.toB+m);else if(!o){let t=hU(n,a.fromB,a.toB),r,o=t<0?-1:mU(n,a.toB,a.fromB);t>-1&&(r=t-a.fromB)<=u&&n.slice(a.fromB,t)==n.slice(a.toB,a.toB+r)?a=e[i]=a.offset(r):o>-1&&(r=a.toB-o)<=l&&n.slice(a.fromB-r,a.fromB)==n.slice(o,a.toB)&&(a=e[i]=a.offset(-r))}else if(!s){let n=hU(t,a.fromA,a.toA),r,o=n<0?-1:mU(t,a.toA,a.fromA);n>-1&&(r=n-a.fromA)<=u&&t.slice(a.fromA,n)==t.slice(a.toA,a.toA+r)?a=e[i]=a.offset(r):o>-1&&(r=a.toA-o)<=l&&t.slice(a.fromA-r,a.fromA)==t.slice(o,a.toA)&&(a=e[i]=a.offset(-r))}}r=a.toA}return iU(e,3),e}var sU;try{sU=RegExp(`[\\p{Alphabetic}\\p{Number}]`,`u`)}catch{}function cU(e){return e>48&&e<58||e>64&&e<91||e>96&&e<123}function lU(e,t){if(t==e.length)return 0;let n=e.charCodeAt(t);return n<192?+!!cU(n):sU?!gU(n)||t==e.length-1?+!!sU.test(String.fromCharCode(n)):sU.test(e.slice(t,t+2))?2:0:0}function uU(e,t){if(!t)return 0;let n=e.charCodeAt(t-1);return n<192?+!!cU(n):sU?!_U(n)||t==1?+!!sU.test(String.fromCharCode(n)):sU.test(e.slice(t-2,t))?2:0:0}var dU=8;function fU(e,t,n){if(t==e.length||!uU(e,t))return t;for(let r=t,i=t+n,a=0;a<dU;a++){let t=lU(e,r);if(!t||r+t>i)return r;r+=t}return t}function pU(e,t,n){if(!t||!lU(e,t))return t;for(let r=t,i=t-n,a=0;a<dU;a++){let t=uU(e,r);if(!t||r-t<i)return r;r-=t}return t}function mU(e,t,n){for(;t!=n;t--)if(e.charCodeAt(t-1)==10)return t;return-1}function hU(e,t,n){for(;t!=n;t++)if(e.charCodeAt(t)==10)return t;return-1}var gU=e=>e>=55296&&e<=56319,_U=e=>e>=56320&&e<=57343;function vU(e,t){return!t||t==e.length||!gU(e.charCodeAt(t-1))||!_U(e.charCodeAt(t))}function yU(e,t,n){let r=n?.override;return r?r(e,t):(WH=(n?.scanLimit??1e9)>>1,GH=n?.timeout?Date.now()+n.timeout:0,KH=!1,aU(e,t,UH(e,0,e.length,t,0,t.length)))}function bU(){return!KH}function xU(e,t,n){return oU(yU(e,t,n),e,t)}var SU=class e{constructor(e,t,n,r,i,a=!0){this.changes=e,this.fromA=t,this.toA=n,this.fromB=r,this.toB=i,this.precise=a}offset(t,n){return t||n?new e(this.changes,this.fromA+t,this.toA+t,this.fromB+n,this.toB+n,this.precise):this}get endA(){return Math.max(this.fromA,this.toA-1)}get endB(){return Math.max(this.fromB,this.toB-1)}static build(e,t,n){return TU(xU(e.toString(),t.toString(),n),e,t,0,0,bU())}static updateA(e,t,n,r,i){return kU(OU(e,r,!0,n.length),e,t,n,i)}static updateB(e,t,n,r,i){return kU(OU(e,r,!1,t.length),e,t,n,i)}};function CU(e,t,n,r){let i=n.lineAt(e),a=r.lineAt(t);return i.to==e&&a.to==t&&e<n.length&&t<r.length?[e+1,t+1]:[i.from,a.from]}function wU(e,t,n,r){let i=n.lineAt(e),a=r.lineAt(t);return i.from==e&&a.from==t?[e,t]:[i.to+1,a.to+1]}function TU(e,t,n,r,i,a){let o=[];for(let s=0;s<e.length;s++){let c=e[s],[l,u]=CU(c.fromA+r,c.fromB+i,t,n),[d,f]=wU(c.toA+r,c.toB+i,t,n),p=[c.offset(-l+r,-u+i)];for(;s<e.length-1;){let a=e[s+1],[o,c]=CU(a.fromA+r,a.fromB+i,t,n);if(o>d+1&&c>f+1)break;p.push(a.offset(-l+r,-u+i)),[d,f]=wU(a.toA+r,a.toB+i,t,n),s++}o.push(new SU(p,l,Math.max(l,d),u,Math.max(u,f),a))}return o}var EU=1e3;function DU(e,t,n,r){let i=0,a=e.length;for(;;){if(i==a){let r=0,a=0;i&&({toA:r,toB:a}=e[i-1]);let o=t-(n?r:a);return[r+o,a+o]}let o=i+a>>1,s=e[o],[c,l]=n?[s.fromA,s.toA]:[s.fromB,s.toB];if(c>t)a=o;else if(l<=t)i=o+1;else return r?[s.fromA,s.fromB]:[s.toA,s.toB]}}function OU(e,t,n,r){let i=[];return t.iterChangedRanges((a,o,s,c)=>{let l=0,u=n?t.length:r,d=0,f=n?r:t.length;a>EU&&([l,d]=DU(e,a-EU,n,!0)),o<t.length-EU&&([u,f]=DU(e,o+EU,n,!1));let p=c-s-(o-a),m,[h,g]=n?[p,0]:[0,p];i.length&&(m=i[i.length-1]).toA>=l?i[i.length-1]={fromA:m.fromA,fromB:m.fromB,toA:u,toB:f,diffA:m.diffA+h,diffB:m.diffB+g}:i.push({fromA:l,toA:u,fromB:d,toB:f,diffA:h,diffB:g})}),i}function kU(e,t,n,r,i){if(!e.length)return t;let a=[];for(let o=0,s=0,c=0,l=0;;o++){let u=o==e.length?null:e[o],d=u?u.fromA+s:n.length,f=u?u.fromB+c:r.length;for(;l<t.length;){let e=t[l];if(e.endA+s>d||e.endB+c>f)break;a.push(e.offset(s,c)),l++}if(!u)break;let p=u.toA+s+u.diffA,m=u.toB+c+u.diffB,h=xU(n.sliceString(d,p),r.sliceString(f,m),i);for(let e of TU(h,n,r,d,f,bU()))a.push(e);for(s+=u.diffA,c+=u.diffB;l<t.length;){let e=t[l];if(e.fromA+s>p&&e.fromB+c>m)break;l++}}return a}var AU={diffModal:`DiffModal-module__diffModal___v1LSh`,content:`DiffModal-module__content___CqXvC`,emptyState:`DiffModal-module__emptyState___gS4Kg`,diffContainer:`DiffModal-module__diffContainer___AoJKb`,fileHeader:`DiffModal-module__fileHeader___7jkN4`,fileIcon:`DiffModal-module__fileIcon___OxYTx`,fileName:`DiffModal-module__fileName___2ylCY`,fileStats:`DiffModal-module__fileStats___bN8WB`,statAdditions:`DiffModal-module__statAdditions___EKdp8`,statDeletions:`DiffModal-module__statDeletions___Py0Xg`,statBar:`DiffModal-module__statBar___tR7TQ`,statBlock:`DiffModal-module__statBlock___4qKhG`,statBlockAdd:`DiffModal-module__statBlockAdd___VI4yX`,statBlockDel:`DiffModal-module__statBlockDel___39sMa`,diffBody:`DiffModal-module__diffBody___9dIqe`,hunk:`DiffModal-module__hunk___AcNIC`,hunkHeader:`DiffModal-module__hunkHeader___xUVgg`,hunkGutter:`DiffModal-module__hunkGutter___QVKqi`,hunkExpandIcon:`DiffModal-module__hunkExpandIcon___zbAx-`,hunkText:`DiffModal-module__hunkText___iPVut`,diffLine:`DiffModal-module__diffLine___9KzZK`,lineNum:`DiffModal-module__lineNum___VXwKE`,lineNumEmpty:`DiffModal-module__lineNumEmpty___I-5AK`,linePrefix:`DiffModal-module__linePrefix___ofp2Q`,lineText:`DiffModal-module__lineText___Zdyo3`,context:`DiffModal-module__context___RnJqZ`,deletion:`DiffModal-module__deletion___rms8N`,addition:`DiffModal-module__addition___a6g2h`};xM();var jU=3,MU=(e,t)=>Math.max(0,Math.min(t,e.length));function NU(e,t){let n=Dj.of(e.split(`
|
||
`)),r=Dj.of(t.split(`
|
||
`)),i=SU.build(n,r),a=0,o=0;return{hunks:i.map(e=>{let t=[],i=e.fromA<e.toA,s=e.fromB<e.toB,c=[];if(i){let t=n.lineAt(e.fromA).number,r=n.lineAt(e.toA-1).number;for(let e=t;e<=r;e++)c.push({num:e,text:n.line(e).text})}let l=[];if(s){let t=r.lineAt(e.fromB).number,n=r.lineAt(e.toB-1).number;for(let e=t;e<=n;e++)l.push({num:e,text:r.line(e).text})}o+=c.length,a+=l.length;let u,d,f,p;if(i)u=c[0].num-1,d=c[c.length-1].num+1;else{let t=MU(n,e.fromA),r=n.lineAt(t);e.fromA===r.from?(u=r.number-1,d=r.number):(u=r.number,d=r.number+1)}if(s)f=l[0].num-1,p=l[l.length-1].num+1;else{let t=MU(r,e.fromB),n=r.lineAt(t);e.fromB===n.from?(f=n.number-1,p=n.number):(f=n.number,p=n.number+1)}let m=Math.min(jU,Math.max(0,u),Math.max(0,f));for(let e=m;e>0;e--){let r=u-e+1,i=f-e+1;r>=1&&i>=1&&r<=n.lines&&t.push({type:`context`,oldNum:r,newNum:i,text:n.line(r).text})}for(let e of c)t.push({type:`deletion`,oldNum:e.num,newNum:null,text:e.text});for(let e of l)t.push({type:`addition`,oldNum:null,newNum:e.num,text:e.text});let h=Math.max(0,Math.min(jU,n.lines-d+1)),g=Math.max(0,Math.min(jU,r.lines-p+1)),_=Math.min(h,g);for(let e=0;e<_;e++){let i=d+e,a=p+e;i>=1&&i<=n.lines&&a>=1&&a<=r.lines&&t.push({type:`context`,oldNum:i,newNum:a,text:n.line(i).text})}let v=t.find(e=>e.oldNum!==null)?.oldNum??1,y=t.find(e=>e.newNum!==null)?.newNum??1;return{oldStart:v,oldCount:t.filter(e=>e.type!==`addition`).length,newStart:y,newCount:t.filter(e=>e.type!==`deletion`).length,lines:t}}),additions:a,deletions:o}}var PU=5;function FU({additions:e,deletions:t}){let n=e+t;if(n===0)return null;let r=Math.round(e/n*PU);return(0,I.jsx)(`span`,{className:AU.statBar,children:Array.from({length:PU},(e,t)=>(0,I.jsx)(`span`,{className:`${AU.statBlock} ${t<r?AU.statBlockAdd:AU.statBlockDel}`},t))})}function IU({open:e,original:t,modified:n,onConfirm:r,onCancel:i,loading:a=!1}){let{t:o}=Xo(),s=(0,y.useMemo)(()=>NU(t,n),[t,n]);return(0,I.jsx)(Ap,{open:e,title:o(`config_management.diff.title`),onClose:i,width:`min(1200px, 90vw)`,className:AU.diffModal,closeDisabled:a,footer:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(L,{variant:`secondary`,onClick:i,disabled:a,children:o(`common.cancel`)}),(0,I.jsx)(L,{onClick:r,loading:a,disabled:a,children:o(`config_management.diff.confirm`)})]}),children:(0,I.jsx)(`div`,{className:AU.content,children:s.hunks.length===0?(0,I.jsx)(`div`,{className:AU.emptyState,children:o(`config_management.diff.no_changes`)}):(0,I.jsxs)(`div`,{className:AU.diffContainer,children:[(0,I.jsxs)(`div`,{className:AU.fileHeader,children:[(0,I.jsx)(`svg`,{className:AU.fileIcon,viewBox:`0 0 16 16`,width:`16`,height:`16`,children:(0,I.jsx)(`path`,{fillRule:`evenodd`,d:`M3.75 1.5a.25.25 0 00-.25.25v11.5c0 .138.112.25.25.25h8.5a.25.25 0 00.25-.25V6H9.75A1.75 1.75 0 018 4.25V1.5H3.75zm5.75.56v2.19c0 .138.112.25.25.25h2.19L9.5 2.06zM2 1.75C2 .784 2.784 0 3.75 0h5.086c.464 0 .909.184 1.237.513l3.414 3.414c.329.328.513.773.513 1.237v8.086A1.75 1.75 0 0112.25 15h-8.5A1.75 1.75 0 012 13.25V1.75z`,fill:`currentColor`})}),(0,I.jsx)(`span`,{className:AU.fileName,children:`config.yaml`}),(0,I.jsxs)(`span`,{className:AU.fileStats,children:[(0,I.jsxs)(`span`,{className:AU.statAdditions,children:[`+`,s.additions]}),(0,I.jsxs)(`span`,{className:AU.statDeletions,children:[`-`,s.deletions]}),(0,I.jsx)(FU,{additions:s.additions,deletions:s.deletions})]})]}),(0,I.jsx)(`div`,{className:AU.diffBody,children:s.hunks.map((e,t)=>(0,I.jsxs)(`div`,{className:AU.hunk,children:[(0,I.jsxs)(`div`,{className:AU.hunkHeader,children:[(0,I.jsx)(`span`,{className:AU.hunkGutter,children:(0,I.jsx)(`svg`,{className:AU.hunkExpandIcon,viewBox:`0 0 16 16`,width:`12`,height:`12`,children:(0,I.jsx)(`path`,{d:`M8.177 1.677l2.896 2.896a.25.25 0 01-.177.427H8.75v1.25a.75.75 0 01-1.5 0V5H5.104a.25.25 0 01-.177-.427l2.896-2.896a.25.25 0 01.354 0zM7.25 11.75a.75.75 0 011.5 0V13h2.146a.25.25 0 01.177.427l-2.896 2.896a.25.25 0 01-.354 0l-2.896-2.896A.25.25 0 015.104 13H7.25v-1.25z`,fill:`currentColor`})})}),(0,I.jsx)(`span`,{className:AU.hunkGutter}),(0,I.jsxs)(`span`,{className:AU.hunkText,children:[`@@ -`,e.oldStart,`,`,e.oldCount,` +`,e.newStart,`,`,e.newCount,` @@`]})]}),e.lines.map((e,n)=>(0,I.jsxs)(`div`,{className:`${AU.diffLine} ${AU[e.type]}`,children:[(0,I.jsx)(`span`,{className:`${AU.lineNum} ${e.oldNum===null?AU.lineNumEmpty:``}`,children:e.oldNum??``}),(0,I.jsx)(`span`,{className:`${AU.lineNum} ${e.newNum===null?AU.lineNumEmpty:``}`,children:e.newNum??``}),(0,I.jsx)(`span`,{className:AU.linePrefix,children:e.type===`deletion`?`-`:e.type===`addition`?`+`:` `}),(0,I.jsx)(`code`,{className:AU.lineText,children:e.text||` `})]},`${t}-${n}`))]},t))})]})})})}function LU(e){let{enabled:t=!0,shouldBlock:n,dialog:r}=e,{showConfirmation:i}=Fc(),a=(0,y.useRef)(``),o=(0,y.useRef)(0),s=(0,y.useRef)(``),c=$n(),l=(0,y.useCallback)(()=>{o.current=Date.now()+2e3,s.current=``},[]),u=Dr((0,y.useCallback)(e=>{if(!t)return!1;let r=Date.now();if(o.current>r){let t=`${e.nextLocation.pathname}${e.nextLocation.search}${e.nextLocation.hash}`;if(s.current||(s.current=t),s.current===t)return!1}else o.current!==0&&(o.current=0,s.current=``);return typeof n==`function`?n(e):n},[t,n]));(0,y.useEffect)(()=>{o.current!==0&&(o.current=0,s.current=``)},[c.key]);let d=(0,y.useMemo)(()=>u.state!==`blocked`||!u.location?``:`${u.location.pathname}${u.location.search}${u.location.hash}`,[u.location,u.state]);return(0,y.useEffect)(()=>{if(u.state!==`blocked`){a.current=``;return}!d||a.current===d||(a.current=d,i({title:r.title,message:r.message,confirmText:r.confirmText,cancelText:r.cancelText,variant:r.variant??`danger`,onConfirm:()=>u.proceed(),onCancel:()=>u.reset()}))},[d,u,r,i]),{allowNextNavigation:l}}var RU={container:`ConfigPage-module__container___5kN-Y`,pageHeader:`ConfigPage-module__pageHeader___Zulyi`,pageHeaderCopy:`ConfigPage-module__pageHeaderCopy___fiTfJ`,pageTitle:`ConfigPage-module__pageTitle___BoVLE`,tabBar:`ConfigPage-module__tabBar___PelpE`,tabItem:`ConfigPage-module__tabItem___Uj1rU`,tabActive:`ConfigPage-module__tabActive___sZLh-`,workspaceShell:`ConfigPage-module__workspaceShell___Ztz3J`,content:`ConfigPage-module__content___PgFbt`,sourceWorkspace:`ConfigPage-module__sourceWorkspace___bUuLs`,sourceToolbar:`ConfigPage-module__sourceToolbar___fhCdI`,searchInputWrapper:`ConfigPage-module__searchInputWrapper___-GeEQ`,searchInput:`ConfigPage-module__searchInput___ock8o`,searchRight:`ConfigPage-module__searchRight___pwWBV`,searchCount:`ConfigPage-module__searchCount___AIry7`,searchButton:`ConfigPage-module__searchButton___GRbfi`,searchActions:`ConfigPage-module__searchActions___ZGITa`,editorWrapper:`ConfigPage-module__editorWrapper___yBudn`,modified:`ConfigPage-module__modified___4mzgT`,saved:`ConfigPage-module__saved___zmZx2`,error:`ConfigPage-module__error___qlpX1`,floatingActionContainer:`ConfigPage-module__floatingActionContainer___3ZQ-z`,floatingActionList:`ConfigPage-module__floatingActionList___ky8bV`,floatingStatus:`ConfigPage-module__floatingStatus___u8zOi`,floatingStatusCompact:`ConfigPage-module__floatingStatusCompact___STwcZ`,floatingActionButton:`ConfigPage-module__floatingActionButton___Htxmz`,dirtyDot:`ConfigPage-module__dirtyDot___zXEnD`};function zU(){return zU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zU.apply(null,arguments)}var BU=o((()=>{}));function VU(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var HU=o((()=>{}));function UU(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=e(t,n);return i?(r(n.update(i)),!0):!1}}function WU(e,t){let n=e.languageDataAt(`commentTokens`,t,1);return n.length?n[0]:{}}function GU(e,{open:t,close:n},r,i){let a=e.sliceDoc(r-LW,r),o=e.sliceDoc(i,i+LW),s=/\s*$/.exec(a)[0].length,c=/^\s*/.exec(o)[0].length,l=a.length-s;if(a.slice(l-t.length,l)==t&&o.slice(c,c+n.length)==n)return{open:{pos:r-s,margin:s&&1},close:{pos:i+c,margin:c&&1}};let u,d;i-r<=2*LW?u=d=e.sliceDoc(r,i):(u=e.sliceDoc(r,r+LW),d=e.sliceDoc(i-LW,i));let f=/^\s*/.exec(u)[0].length,p=/\s*$/.exec(d)[0].length,m=d.length-p-n.length;return u.slice(f,f+t.length)==t&&d.slice(m,m+n.length)==n?{open:{pos:r+f+t.length,margin:+!!/\s/.test(u.charAt(f+t.length))},close:{pos:i-p-n.length,margin:+!!/\s/.test(d.charAt(m-1))}}:null}function KU(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),i=n.to<=r.to?r:e.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:e.doc.lineAt(n.to-1));let a=t.length-1;a>=0&&t[a].to>r.from?t[a].to=i.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return t}function qU(e,t,n=t.selection.ranges){let r=n.map(e=>WU(t,e.from).block);if(!r.every(e=>e))return null;let i=n.map((e,n)=>GU(t,r[n],e.from,e.to));if(e!=2&&!i.every(e=>e))return{changes:t.changes(n.map((e,t)=>i[t]?[]:[{from:e.from,insert:r[t].open+` `},{from:e.to,insert:` `+r[t].close}]))};if(e!=1&&i.some(e=>e)){let e=[];for(let t=0,n;t<i.length;t++)if(n=i[t]){let i=r[t],{open:a,close:o}=n;e.push({from:a.pos-i.open.length,to:a.pos+a.margin},{from:o.pos-o.margin,to:o.pos+i.close.length})}return{changes:e}}return null}function JU(e,t,n=t.selection.ranges){let r=[],i=-1;for(let{from:e,to:a}of n){let n=r.length,o=1e9,s=WU(t,e).line;if(s){for(let n=e;n<=a;){let c=t.doc.lineAt(n);if(c.from>i&&(e==a||a>c.from)){i=c.from;let e=/^\s*/.exec(c.text)[0].length,t=e==c.length,n=c.text.slice(e,e+s.length)==s?e:-1;e<c.text.length&&e<o&&(o=e),r.push({line:c,comment:n,token:s,indent:e,empty:t,single:!1})}n=c.to+1}if(o<1e9)for(let e=n;e<r.length;e++)r[e].indent<r[e].line.text.length&&(r[e].indent=o);r.length==n+1&&(r[n].single=!0)}}if(e!=2&&r.some(e=>e.comment<0&&(!e.empty||e.single))){let e=[];for(let{line:t,token:n,indent:i,empty:a,single:o}of r)(o||!a)&&e.push({from:t.from+i,insert:n+` `});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}else if(e!=1&&r.some(e=>e.comment>=0)){let e=[];for(let{line:t,comment:n,token:i}of r)if(n>=0){let r=t.from+n,a=r+i.length;t.text[a-t.from]==` `&&a++,e.push({from:r,to:a})}return{changes:e}}return null}function YU(e={}){return[HW,VW.of(e),X.domEventHandlers({beforeinput(e,t){let n=e.inputType==`historyUndo`?UW:e.inputType==`historyRedo`?WW:null;return n?(e.preventDefault(),n(t)):!1}})]}function XU(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let i=n.field(HW,!1);if(!i)return!1;let a=i.pop(e,n,t);return a?(r(a),!0):!1}}function ZU(e,t,n,r){let i=t+1>n+20?t-n-1:0,a=e.slice(i,t);return a.push(r),a}function QU(e,t){let n=[],r=!1;return e.iterChangedRanges((e,t)=>n.push(e,t)),t.iterChangedRanges((e,t,i,a)=>{for(let e=0;e<n.length;){let t=n[e++],o=n[e++];a>=t&&i<=o&&(r=!0)}}),r}function $U(e,t){return e.ranges.length==t.ranges.length&&e.ranges.filter((e,n)=>e.empty!=t.ranges[n].empty).length===0}function eW(e,t){return e.length?t.length?e.concat(t):e:t}function tW(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-YW));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),ZU(e,e.length-1,1e9,n.setSelAfter(r)))}else return[qW.selection([t])]}function nW(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function rW(e,t){if(!e.length)return e;let n=e.length,r=JW;for(;n;){let i=iW(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){let t=e.slice(0,n);return t[n-1]=i,t}else t=i.mapped,n--,r=i.selectionsAfter}return r.length?[qW.selection(r)]:JW}function iW(e,t,n){let r=eW(e.selectionsAfter.length?e.selectionsAfter.map(e=>e.map(t)):JW,n);if(!e.changes)return qW.selection(r);let i=e.changes.map(t),a=t.mapDesc(e.changes,!0),o=e.mapped?e.mapped.composeDesc(a):a;return new qW(i,oM.mapEffects(e.effects,t),o,e.startSelection.map(a),r)}function aW(e,t){return q.create(e.ranges.map(t),e.mainIndex)}function oW(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:`select`})}function sW({state:e,dispatch:t},n){let r=aW(e.selection,n);return r.eq(e.selection,!0)?!1:(t(oW(e,r)),!0)}function cW(e,t){return q.cursor(t?e.to:e.from)}function lW(e,t){return sW(e,n=>n.empty?e.moveByChar(n,t):cW(n,t))}function uW(e){return e.textDirectionAt(e.state.selection.main.head)==II.LTR}function dW(e,t){return sW(e,n=>n.empty?e.moveByGroup(n,t):cW(n,t))}function fW(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function pW(e,t,n){let r=eV(e).resolveInner(t.head),i=n?tB.closedBy:tB.openedBy;for(let a=t.head;;){let t=n?r.childAfter(a):r.childBefore(a);if(!t)break;fW(e,t,i)?r=t:a=n?t.to:t.from}let a=r.type.prop(i),o,s;return s=a&&(o=n?FV(e,r.from,1):FV(e,r.to,-1))&&o.matched?n?o.end.to:o.end.from:n?r.to:r.from,q.cursor(s,n?-1:1)}function mW(e,t){return sW(e,n=>{if(!n.empty)return cW(n,t);let r=e.moveVertically(n,t);return r.head==n.head?e.moveToLineBoundary(n,t):r})}function hW(e){let t=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,n=0,r=0,i;if(t){for(let t of e.state.facet(X.scrollMargins)){let i=t(e);i?.top&&(n=Math.max(i?.top,n)),i?.bottom&&(r=Math.max(i?.bottom,r))}i=e.scrollDOM.clientHeight-n-r}else i=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:t,height:Math.max(e.defaultLineHeight,i-5)}}function gW(e,t){let n=hW(e),{state:r}=e,i=aW(r.selection,r=>r.empty?e.moveVertically(r,t,n.height):cW(r,t));if(i.eq(r.selection))return!1;let a;if(n.selfScroll){let t=e.coordsAtPos(r.selection.main.head),o=e.scrollDOM.getBoundingClientRect(),s=o.top+n.marginTop,c=o.bottom-n.marginBottom;t&&t.top>s&&t.bottom<c&&(a=X.scrollIntoView(i.main.head,{y:`start`,yMargin:t.top-s}))}return e.dispatch(oW(r,i),{effects:a}),!0}function _W(e,t,n){let r=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?r.to:r.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==r.from&&r.length){let n=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;n&&t.head!=r.from+n&&(i=q.cursor(r.from+n))}return i}function vW(e,t,n){let r=!1,i=aW(e.selection,t=>{let i=FV(e,t.head,-1)||FV(e,t.head,1)||t.head>0&&FV(e,t.head-1,1)||t.head<e.doc.length&&FV(e,t.head+1,-1);if(!i||!i.end)return t;r=!0;let a=i.start.from==t.head?i.end.to:i.end.from;return n?q.range(t.anchor,a):q.cursor(a)});return r?(t(oW(e,i)),!0):!1}function yW(e,t){let n=aW(e.state.selection,e=>{let n=t(e);return q.range(e.anchor,n.head,n.goalColumn,n.bidiLevel||void 0)});return n.eq(e.state.selection)?!1:(e.dispatch(oW(e.state,n)),!0)}function bW(e,t){return yW(e,n=>e.moveByChar(n,t))}function xW(e,t){return yW(e,n=>e.moveByGroup(n,t))}function SW(e,t){return yW(e,n=>e.moveVertically(n,t))}function CW(e,t){return yW(e,n=>e.moveVertically(n,t,hW(e).height))}function wW(e,t){let{state:n}=e,r=n.selection,i=n.selection.ranges.slice();for(let r of n.selection.ranges){let a=n.doc.lineAt(r.head);if(t?a.to<e.state.doc.length:a.from>0)for(let n=r;;){let r=e.moveVertically(n,t);if(r.head<a.from||r.head>a.to){i.some(e=>e.head==r.head)||i.push(r);break}else if(r.head==n.head)break;else n=r}}return i.length==r.ranges.length?!1:(e.dispatch(oW(n,q.create(i,i.length-1))),!0)}function TW(e,t){if(e.state.readOnly)return!1;let n=`delete.selection`,{state:r}=e,i=r.changeByRange(r=>{let{from:i,to:a}=r;if(i==a){let o=t(r);o<i?(n=`delete.backward`,o=EW(e,o,!1)):o>i&&(n=`delete.forward`,o=EW(e,o,!0)),i=Math.min(i,o),a=Math.max(a,o)}else i=EW(e,i,!1),a=EW(e,a,!0);return i==a?{range:r}:{changes:{from:i,to:a},range:q.cursor(i,i<r.head?-1:1)}});return i.changes.empty?!1:(e.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n==`delete.selection`?X.announce.of(r.phrase(`Selection deleted`)):void 0})),!0)}function EW(e,t,n){if(e instanceof X)for(let r of e.state.facet(X.atomicRanges).map(t=>t(e)))r.between(t,t,(e,r)=>{e<t&&r>t&&(t=n?r:e)});return t}function DW(e){let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.from),a=e.doc.lineAt(r.to);if(!r.empty&&r.to==a.from&&(a=e.doc.lineAt(r.to-1)),n>=i.number){let e=t[t.length-1];e.to=a.to,e.ranges.push(r)}else t.push({from:i.from,to:a.to,ranges:[r]});n=a.number+1}return t}function OW(e,t,n){if(e.readOnly)return!1;let r=[],i=[];for(let t of DW(e)){if(n?t.to==e.doc.length:t.from==0)continue;let a=e.doc.lineAt(n?t.to+1:t.from-1),o=a.length+1;if(n){r.push({from:t.to,to:a.to},{from:t.from,insert:a.text+e.lineBreak});for(let n of t.ranges)i.push(q.range(Math.min(e.doc.length,n.anchor+o),Math.min(e.doc.length,n.head+o)))}else{r.push({from:a.from,to:t.from},{from:t.to,insert:e.lineBreak+a.text});for(let e of t.ranges)i.push(q.range(e.anchor-o,e.head-o))}}return r.length?(t(e.update({changes:r,scrollIntoView:!0,selection:q.create(i,e.selection.mainIndex),userEvent:`move.line`})),!0):!1}function kW(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of DW(e))n?r.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):r.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});return t(e.update({changes:r,scrollIntoView:!0,userEvent:`input.copyline`})),!0}function AW(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n=eV(e).resolveInner(t),r=n.childBefore(t),i=n.childAfter(t),a;return r&&i&&r.to<=t&&i.from>=t&&(a=r.type.prop(tB.closedBy))&&a.indexOf(i.name)>-1&&e.doc.lineAt(r.to).from==e.doc.lineAt(i.from).from&&!/\S/.test(e.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}function jW(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let r=t.changeByRange(n=>{let{from:r,to:i}=n,a=t.doc.lineAt(r),o=!e&&r==i&&AW(t,r);e&&(r=i=(i<=a.to?a:t.doc.lineAt(i)).to);let s=new tH(t,{simulateBreak:r,simulateDoubleBreak:!!o}),c=iV(s,r);for(c??(c=Tj(/^\s*/.exec(t.doc.lineAt(r).text)[0],t.tabSize));i<a.to&&/\s/.test(a.text[i-a.from]);)i++;o?{from:r,to:i}=o:r>a.from&&r<a.from+100&&!/\S/.test(a.text.slice(0,r))&&(r=a.from);let l=[``,rV(t,c)];return o&&l.push(rV(t,s.lineIndent(a.from,-1))),{changes:{from:r,to:i,insert:Dj.of(l)},range:q.cursor(r+1+l[1].length)}});return n(t.update(r,{scrollIntoView:!0,userEvent:`input`})),!0}}function MW(e,t){let n=-1;return e.changeByRange(r=>{let i=[];for(let a=r.from;a<=r.to;){let o=e.doc.lineAt(a);o.number>n&&(r.empty||r.to>o.from)&&(t(o,i,r),n=o.number),a=o.to+1}let a=e.changes(i);return{changes:i,range:q.range(a.mapPos(r.anchor,1),a.mapPos(r.head,1))}})}var NW,PW,FW,IW,LW,RW,zW,BW,VW,HW,UW,WW,GW,KW,qW,JW,YW,XW,ZW,QW,$W,eG,tG,nG,rG,iG,aG,oG,sG,cG,lG,uG,dG,fG,pG,mG,hG,gG,_G,vG,yG,bG,xG,SG,CG,wG,TG,EG,DG,OG,kG,AG,jG,MG,NG,PG,FG,IG,LG,RG,zG,BG,VG,HG,UG,WG,GG,KG,qG,JG,YG,XG,ZG,QG,$G,eK,tK,nK,rK,iK,aK,oK,sK,cK,lK,uK,dK,fK,pK,mK=o((()=>{xM(),Vz(),VH(),SB(),NW=e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=WU(e.state,n.from);return r.line?PW(e):r.block?IW(e):!1},PW=UU(JU,0),FW=UU(qU,0),IW=UU((e,t)=>qU(e,t,KU(t)),0),LW=50,RW=rM.define(),zW=rM.define(),BW=J.define(),VW=J.define({combine(e){return hj(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})}}),HW=Uj.define({create(){return ZW.empty},update(e,t){let n=t.state.facet(VW),r=t.annotation(RW);if(r){let i=qW.fromTransaction(t,r.selection),a=r.side,o=a==0?e.undone:e.done;return o=i?ZU(o,o.length,n.minDepth,i):tW(o,t.startState.selection),new ZW(a==0?r.rest:o,a==0?o:r.rest)}let i=t.annotation(zW);if((i==`full`||i==`before`)&&(e=e.isolate()),t.annotation(sM.addToHistory)===!1)return t.changes.empty?e:e.addMapping(t.changes.desc);let a=qW.fromTransaction(t),o=t.annotation(sM.time),s=t.annotation(sM.userEvent);return a?e=e.addChanges(a,o,s,n,t):t.selection&&(e=e.addSelection(t.startState.selection,o,s,n.newGroupDelay)),(i==`full`||i==`after`)&&(e=e.isolate()),e},toJSON(e){return{done:e.done.map(e=>e.toJSON()),undone:e.undone.map(e=>e.toJSON())}},fromJSON(e){return new ZW(e.done.map(qW.fromJSON),e.undone.map(qW.fromJSON))}}),UW=XU(0,!1),WW=XU(1,!1),GW=XU(0,!0),KW=XU(1,!0),qW=class e{constructor(e,t,n,r,i){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=i}setSelAfter(t){return new e(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){return{changes:this.changes?.toJSON(),mapped:this.mapped?.toJSON(),startSelection:this.startSelection?.toJSON(),selectionsAfter:this.selectionsAfter.map(e=>e.toJSON())}}static fromJSON(t){return new e(t.changes&&Lj.fromJSON(t.changes),[],t.mapped&&Ij.fromJSON(t.mapped),t.startSelection&&q.fromJSON(t.startSelection),t.selectionsAfter.map(q.fromJSON))}static fromTransaction(t,n){let r=JW;for(let e of t.startState.facet(BW)){let n=e(t);n.length&&(r=r.concat(n))}return!r.length&&t.changes.empty?null:new e(t.changes.invert(t.startState.doc),r,void 0,n||t.startState.selection,JW)}static selection(t){return new e(void 0,JW,void 0,void 0,t)}},JW=[],YW=200,XW=/^(input\.type|delete)($|\.)/,ZW=class e{constructor(e,t,n=0,r=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new e(this.done,this.undone):this}addChanges(t,n,r,i,a){let o=this.done,s=o[o.length-1];return o=s&&s.changes&&!s.changes.empty&&t.changes&&(!r||XW.test(r))&&(!s.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(a,QU(s.changes,t.changes))||r==`input.type.compose`)?ZU(o,o.length-1,i.minDepth,new qW(t.changes.compose(s.changes),eW(oM.mapEffects(t.effects,s.changes),s.effects),s.mapped,s.startSelection,JW)):ZU(o,o.length,i.minDepth,t),new e(o,JW,n,r)}addSelection(t,n,r,i){let a=this.done.length?this.done[this.done.length-1].selectionsAfter:JW;return a.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&$U(a[a.length-1],t)?this:new e(tW(this.done,t),this.undone,n,r)}addMapping(t){return new e(rW(this.done,t),rW(this.undone,t),this.prevTime,this.prevUserEvent)}pop(e,t,n){let r=e==0?this.done:this.undone;if(r.length==0)return null;let i=r[r.length-1],a=i.selectionsAfter[0]||t.selection;if(n&&i.selectionsAfter.length)return t.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:RW.of({side:e,rest:nW(r),selection:a}),userEvent:e==0?`select.undo`:`select.redo`,scrollIntoView:!0});if(i.changes){let n=r.length==1?JW:r.slice(0,r.length-1);return i.mapped&&(n=rW(n,i.mapped)),t.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:RW.of({side:e,rest:n,selection:a}),filter:!1,userEvent:e==0?`undo`:`redo`,scrollIntoView:!0})}else return null}},ZW.empty=new ZW(JW,JW),QW=[{key:`Mod-z`,run:UW,preventDefault:!0},{key:`Mod-y`,mac:`Mod-Shift-z`,run:WW,preventDefault:!0},{linux:`Ctrl-Shift-z`,run:WW,preventDefault:!0},{key:`Mod-u`,run:GW,preventDefault:!0},{key:`Alt-u`,mac:`Mod-Shift-u`,run:KW,preventDefault:!0}],$W=e=>lW(e,!uW(e)),eG=e=>lW(e,uW(e)),tG=e=>dW(e,!uW(e)),nG=e=>dW(e,uW(e)),typeof Intl<`u`&&Intl.Segmenter,rG=e=>sW(e,t=>pW(e.state,t,!uW(e))),iG=e=>sW(e,t=>pW(e.state,t,uW(e))),aG=e=>mW(e,!1),oG=e=>mW(e,!0),sG=e=>gW(e,!1),cG=e=>gW(e,!0),lG=e=>sW(e,t=>_W(e,t,!0)),uG=e=>sW(e,t=>_W(e,t,!1)),dG=e=>sW(e,t=>_W(e,t,!uW(e))),fG=e=>sW(e,t=>_W(e,t,uW(e))),pG=e=>sW(e,t=>q.cursor(e.lineBlockAt(t.head).from,1)),mG=e=>sW(e,t=>q.cursor(e.lineBlockAt(t.head).to,-1)),hG=({state:e,dispatch:t})=>vW(e,t,!1),gG=e=>bW(e,!uW(e)),_G=e=>bW(e,uW(e)),vG=e=>xW(e,!uW(e)),yG=e=>xW(e,uW(e)),bG=e=>yW(e,t=>pW(e.state,t,!uW(e))),xG=e=>yW(e,t=>pW(e.state,t,uW(e))),SG=e=>SW(e,!1),CG=e=>SW(e,!0),wG=e=>CW(e,!1),TG=e=>CW(e,!0),EG=e=>yW(e,t=>_W(e,t,!0)),DG=e=>yW(e,t=>_W(e,t,!1)),OG=e=>yW(e,t=>_W(e,t,!uW(e))),kG=e=>yW(e,t=>_W(e,t,uW(e))),AG=e=>yW(e,t=>q.cursor(e.lineBlockAt(t.head).from)),jG=e=>yW(e,t=>q.cursor(e.lineBlockAt(t.head).to)),MG=({state:e,dispatch:t})=>(t(oW(e,{anchor:0})),!0),NG=({state:e,dispatch:t})=>(t(oW(e,{anchor:e.doc.length})),!0),PG=({state:e,dispatch:t})=>(t(oW(e,{anchor:e.selection.main.anchor,head:0})),!0),FG=({state:e,dispatch:t})=>(t(oW(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0),IG=({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:`select`})),!0),LG=({state:e,dispatch:t})=>{let n=DW(e).map(({from:t,to:n})=>q.range(t,Math.min(n+1,e.doc.length)));return t(e.update({selection:q.create(n),userEvent:`select`})),!0},RG=({state:e,dispatch:t})=>{let n=aW(e.selection,t=>{let n=eV(e),r=n.resolveStack(t.from,1);if(t.empty){let e=n.resolveStack(t.from,-1);e.node.from>=r.node.from&&e.node.to<=r.node.to&&(r=e)}for(let e=r;e;e=e.next){let{node:n}=e;if((n.from<t.from&&n.to>=t.to||n.to>t.to&&n.from<=t.from)&&e.next)return q.range(n.to,n.from)}return t});return n.eq(e.selection)?!1:(t(oW(e,n)),!0)},zG=e=>wW(e,!1),BG=e=>wW(e,!0),VG=({state:e,dispatch:t})=>{let n=e.selection,r=null;return n.ranges.length>1?r=q.create([n.main]):n.main.empty||(r=q.create([q.cursor(n.main.head)])),r?(t(oW(e,r)),!0):!1},HG=(e,t,n)=>TW(e,r=>{let i=r.from,{state:a}=e,o=a.doc.lineAt(i),s,c;if(n&&!t&&i>o.from&&i<o.from+200&&!/[^ \t]/.test(s=o.text.slice(0,i-o.from))){if(s[s.length-1]==` `)return i-1;let e=Tj(s,a.tabSize)%nV(a)||nV(a);for(let t=0;t<e&&s[s.length-1-t]==` `;t++)i--;c=i}else c=BA(o.text,i-o.from,t,t)+o.from,c==i&&o.number!=(t?a.doc.lines:1)?c+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(o.text.slice(c-o.from,i-o.from))&&(c=BA(o.text,c-o.from,!1,!1)+o.from);return c}),UG=e=>HG(e,!1,!0),WG=e=>HG(e,!0,!1),GG=(e,t)=>TW(e,n=>{let r=n.head,{state:i}=e,a=i.doc.lineAt(r),o=i.charCategorizer(r);for(let e=null;;){if(r==(t?a.to:a.from)){r==n.head&&a.number!=(t?i.doc.lines:1)&&(r+=t?1:-1);break}let s=BA(a.text,r-a.from,t)+a.from,c=a.text.slice(Math.min(r,s)-a.from,Math.max(r,s)-a.from),l=o(c);if(e!=null&&l!=e)break;(c!=` `||r!=n.head)&&(e=l),r=s}return r}),KG=e=>GG(e,!1),qG=e=>GG(e,!0),JG=e=>TW(e,t=>{let n=e.lineBlockAt(t.head).to;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),YG=e=>TW(e,t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}),XG=e=>TW(e,t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),ZG=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:Dj.of([``,``])},range:q.cursor(e.from)}));return t(e.update(n,{scrollIntoView:!0,userEvent:`input`})),!0},QG=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(t=>{if(!t.empty||t.from==0||t.from==e.doc.length)return{range:t};let n=t.from,r=e.doc.lineAt(n),i=n==r.from?n-1:BA(r.text,n-r.from,!1)+r.from,a=n==r.to?n+1:BA(r.text,n-r.from,!0)+r.from;return{changes:{from:i,to:a,insert:e.doc.slice(n,a).append(e.doc.slice(i,n))},range:q.cursor(a)}});return n.changes.empty?!1:(t(e.update(n,{scrollIntoView:!0,userEvent:`move.character`})),!0)},$G=({state:e,dispatch:t})=>OW(e,t,!1),eK=({state:e,dispatch:t})=>OW(e,t,!0),tK=({state:e,dispatch:t})=>kW(e,t,!1),nK=({state:e,dispatch:t})=>kW(e,t,!0),rK=e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(DW(t).map(({from:e,to:n})=>(e>0?e--:n<t.doc.length&&n++,{from:e,to:n}))),r=aW(t.selection,t=>{let n;if(e.lineWrapping){let r=e.lineBlockAt(t.head),i=e.coordsAtPos(t.head,t.assoc||1);i&&(n=r.bottom+e.documentTop-i.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,n)}).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:`delete.line`}),!0},iK=jW(!1),aK=jW(!0),oK=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new tH(e,{overrideIndentation:e=>n[e]??-1}),i=MW(e,(t,i,a)=>{let o=iV(r,t.from);if(o==null)return;/\S/.test(t.text)||(o=0);let s=/^\s*/.exec(t.text)[0],c=rV(e,o);(s!=c||a.from<t.from+s.length)&&(n[t.from]=o,i.push({from:t.from,to:t.from+s.length,insert:c}))});return i.changes.empty||t(e.update(i,{userEvent:`indent`})),!0},sK=({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update(MW(e,(t,n)=>{n.push({from:t.from,insert:e.facet(eH)})}),{userEvent:`input.indent`})),!0),cK=({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update(MW(e,(t,n)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let i=Tj(r,e.tabSize),a=0,o=rV(e,Math.max(0,i-nV(e)));for(;a<r.length&&a<o.length&&r.charCodeAt(a)==o.charCodeAt(a);)a++;n.push({from:t.from+a,to:t.from+r.length,insert:o.slice(a)})}),{userEvent:`delete.dedent`})),!0),lK=e=>(e.setTabFocusMode(),!0),uK=[{key:`Ctrl-b`,run:$W,shift:gG,preventDefault:!0},{key:`Ctrl-f`,run:eG,shift:_G},{key:`Ctrl-p`,run:aG,shift:SG},{key:`Ctrl-n`,run:oG,shift:CG},{key:`Ctrl-a`,run:pG,shift:AG},{key:`Ctrl-e`,run:mG,shift:jG},{key:`Ctrl-d`,run:WG},{key:`Ctrl-h`,run:UG},{key:`Ctrl-k`,run:JG},{key:`Ctrl-Alt-h`,run:KG},{key:`Ctrl-o`,run:ZG},{key:`Ctrl-t`,run:QG},{key:`Ctrl-v`,run:cG}],dK=[{key:`ArrowLeft`,run:$W,shift:gG,preventDefault:!0},{key:`Mod-ArrowLeft`,mac:`Alt-ArrowLeft`,run:tG,shift:vG,preventDefault:!0},{mac:`Cmd-ArrowLeft`,run:dG,shift:OG,preventDefault:!0},{key:`ArrowRight`,run:eG,shift:_G,preventDefault:!0},{key:`Mod-ArrowRight`,mac:`Alt-ArrowRight`,run:nG,shift:yG,preventDefault:!0},{mac:`Cmd-ArrowRight`,run:fG,shift:kG,preventDefault:!0},{key:`ArrowUp`,run:aG,shift:SG,preventDefault:!0},{mac:`Cmd-ArrowUp`,run:MG,shift:PG},{mac:`Ctrl-ArrowUp`,run:sG,shift:wG},{key:`ArrowDown`,run:oG,shift:CG,preventDefault:!0},{mac:`Cmd-ArrowDown`,run:NG,shift:FG},{mac:`Ctrl-ArrowDown`,run:cG,shift:TG},{key:`PageUp`,run:sG,shift:wG},{key:`PageDown`,run:cG,shift:TG},{key:`Home`,run:uG,shift:DG,preventDefault:!0},{key:`Mod-Home`,run:MG,shift:PG},{key:`End`,run:lG,shift:EG,preventDefault:!0},{key:`Mod-End`,run:NG,shift:FG},{key:`Enter`,run:iK,shift:iK},{key:`Mod-a`,run:IG},{key:`Backspace`,run:UG,shift:UG,preventDefault:!0},{key:`Delete`,run:WG,preventDefault:!0},{key:`Mod-Backspace`,mac:`Alt-Backspace`,run:KG,preventDefault:!0},{key:`Mod-Delete`,mac:`Alt-Delete`,run:qG,preventDefault:!0},{mac:`Mod-Backspace`,run:YG,preventDefault:!0},{mac:`Mod-Delete`,run:XG,preventDefault:!0}].concat(uK.map(e=>({mac:e.key,run:e.run,shift:e.shift}))),fK=[{key:`Alt-ArrowLeft`,mac:`Ctrl-ArrowLeft`,run:rG,shift:bG},{key:`Alt-ArrowRight`,mac:`Ctrl-ArrowRight`,run:iG,shift:xG},{key:`Alt-ArrowUp`,run:$G},{key:`Shift-Alt-ArrowUp`,run:tK},{key:`Alt-ArrowDown`,run:eK},{key:`Shift-Alt-ArrowDown`,run:nK},{key:`Mod-Alt-ArrowUp`,run:zG},{key:`Mod-Alt-ArrowDown`,run:BG},{key:`Escape`,run:VG},{key:`Mod-Enter`,run:aK},{key:`Alt-l`,mac:`Ctrl-l`,run:LG},{key:`Mod-i`,run:RG,preventDefault:!0},{key:`Mod-[`,run:cK},{key:`Mod-]`,run:sK},{key:`Mod-Alt-\\`,run:oK},{key:`Shift-Mod-k`,run:rK},{key:`Shift-Mod-\\`,run:hG},{key:`Mod-/`,run:NW},{key:`Alt-A`,run:FW},{key:`Ctrl-m`,mac:`Shift-Alt-m`,run:lK}].concat(dK),pK={key:`Tab`,run:sK,shift:cK}}));function hK(e){try{return new RegExp(e,zK),!0}catch{return!1}}function gK(e,t){if(t>=e.length)return t;let n=e.lineAt(t),r;for(;t<n.to&&(r=n.text.charCodeAt(t-n.from))>=56320&&r<57344;)t++;return t}function _K(e){let t=LM(`input`,{class:`cm-textfield`,name:`line`,value:String(e.state.doc.lineAt(e.state.selection.main.head).number)}),n=LM(`form`,{class:`cm-gotoLine`,onkeydown:t=>{t.keyCode==27?(t.preventDefault(),e.dispatch({effects:WK.of(!1)}),e.focus()):t.keyCode==13&&(t.preventDefault(),r())},onsubmit:e=>{e.preventDefault(),r()}},LM(`label`,e.state.phrase(`Go to line`),`: `,t),` `,LM(`button`,{class:`cm-button`,type:`submit`},e.state.phrase(`go`)),LM(`button`,{name:`close`,onclick:()=>{e.dispatch({effects:WK.of(!1)}),e.focus()},"aria-label":e.state.phrase(`close`),type:`button`},[`×`]));function r(){let n=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!n)return;let{state:r}=e,i=r.doc.lineAt(r.selection.main.head),[,a,o,s,c]=n,l=s?+s.slice(1):0,u=o?+o:i.number;if(o&&c){let e=u/100;a&&(e=e*(a==`-`?-1:1)+i.number/r.doc.lines),u=Math.round(r.doc.lines*e)}else o&&a&&(u=u*(a==`-`?-1:1)+i.number);let d=r.doc.line(Math.max(1,Math.min(r.doc.lines,u))),f=q.cursor(d.from+Math.max(0,Math.min(l,d.length)));e.dispatch({effects:[WK.of(!1),X.scrollIntoView(f.from,{y:`center`})],selection:f}),e.focus()}return{dom:n}}function vK(e){let t=[$K,QK];return e&&t.push(YK.of(e)),t}function yK(e,t,n,r){return(n==0||e(t.sliceDoc(n-1,n))!=lM.Word)&&(r==t.doc.length||e(t.sliceDoc(r,r+1))!=lM.Word)}function bK(e,t,n,r){return e(t.sliceDoc(n,n+1))==lM.Word&&e(t.sliceDoc(r-1,r))==lM.Word}function xK(e,t){let{main:n,ranges:r}=e.selection,i=e.wordAt(n.head),a=i&&i.from==n.from&&i.to==n.to;for(let n=!1,i=new LK(e.doc,t,r[r.length-1].to);;)if(i.next(),i.done){if(n)return null;i=new LK(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),n=!0}else{if(n&&r.some(e=>e.from==i.value.from))continue;if(a){let t=e.wordAt(i.value.from);if(!t||t.from!=i.value.from||t.to!=i.value.to)continue}return i.value}}function SK(e){return e?[nq.of(e),Dq]:Dq}function CK(e,t,n,r){return new LK(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:e=>e.toLowerCase(),e.wholeWord?wK(t.doc,t.charCategorizer(t.selection.main.head)):void 0)}function wK(e,t){return(n,r,i,a)=>((a>n||a+i.length<r)&&(a=Math.max(0,n-2),i=e.sliceString(a,Math.min(e.length,r+2))),(t(EK(i,n-a))!=lM.Word||t(DK(i,n-a))!=lM.Word)&&(t(DK(i,r-a))!=lM.Word||t(EK(i,r-a))!=lM.Word))}function TK(e,t,n,r){return new BK(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:e.wholeWord?OK(t.charCategorizer(t.selection.main.head)):void 0},n,r)}function EK(e,t){return e.slice(BA(e,t,!1),t)}function DK(e,t){return e.slice(t,BA(e,t))}function OK(e){return(t,n,r)=>!r[0].length||(e(EK(r.input,r.index))!=lM.Word||e(DK(r.input,r.index))!=lM.Word)&&(e(DK(r.input,r.index+r[0].length))!=lM.Word||e(EK(r.input,r.index+r[0].length))!=lM.Word)}function kK(e){return t=>{let n=t.state.field(lq,!1);return n&&n.query.spec.valid?e(t,n):bq(t)}}function AK(e){return e.state.facet(nq).createPanel(e)}function jK(e,t){let n=e.selection.main,r=n.empty||n.to>n.from+100?``:e.sliceDoc(n.from,n.to);if(t&&!r)return t;let i=e.facet(nq);return new rq({search:t?.literal??i.literal?r:r.replace(/\n/g,`\\n`),caseSensitive:t?.caseSensitive??i.caseSensitive,literal:t?.literal??i.literal,regexp:t?.regexp??i.regexp,wholeWord:t?.wholeWord??i.wholeWord})}function MK(e){let t=WF(e,AK);return t&&t.dom.querySelector(`[main-field]`)}function NK(e){let t=MK(e);t&&t==e.root.activeElement&&t.select()}function PK(e,t){return e.state.phrase(t)}function FK(e,{from:t,to:n}){let r=e.state.doc.lineAt(t),i=e.state.doc.lineAt(n).to,a=Math.max(r.from,t-wq),o=Math.min(i,n+wq),s=e.state.sliceDoc(a,o);if(a!=r.from){for(let e=0;e<wq;e++)if(!Tq.test(s[e+1])&&Tq.test(s[e])){s=s.slice(e);break}}if(o!=i){for(let e=s.length-1;e>s.length-wq;e--)if(!Tq.test(s[e-1])&&Tq.test(s[e])){s=s.slice(0,e);break}}return X.announce.of(`${e.state.phrase(`current match`)}. ${s} ${e.state.phrase(`on line`)} ${r.number}.`)}var IK,LK,RK,zK,BK,VK,HK,UK,WK,GK,KK,qK,JK,YK,XK,ZK,QK,$K,eq,tq,nq,rq,iq,aq,oq,sq,cq,lq,uq,dq,fq,pq,mq,hq,gq,_q,vq,yq,bq,xq,Sq,Cq,wq,Tq,Eq,Dq,Oq=o((()=>{Vz(),xM(),zM(),IK=typeof String.prototype.normalize==`function`?e=>e.normalize(`NFKD`):e=>e,LK=class{constructor(e,t,n=0,r=e.length,i,a){this.test=a,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer=``,this.bufferPos=0,this.iter=e.iterRange(n,r),this.bufferStart=n,this.normalize=i?e=>i(IK(e)):IK,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return UA(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=WA(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=GA(e);let r=this.normalize(t);if(r.length)for(let e=0,i=n;;e++){let a=r.charCodeAt(e),o=this.match(a,i,this.bufferPos+this.bufferStart);if(e==r.length-1){if(o)return this.value=o,this;break}i==n&&e<t.length&&t.charCodeAt(e)==a&&i++}}}match(e,t,n){let r=null;for(let t=0;t<this.matches.length;t+=2){let i=this.matches[t],a=!1;this.query.charCodeAt(i)==e&&(i==this.query.length-1?r={from:this.matches[t+1],to:n}:(this.matches[t]++,a=!0)),a||(this.matches.splice(t,2),t-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?r={from:t,to:n}:this.matches.push(1,t)),r&&this.test&&!this.test(r.from,r.to,this.buffer,this.bufferStart)&&(r=null),r}},typeof Symbol<`u`&&(LK.prototype[Symbol.iterator]=function(){return this}),RK={from:-1,to:-1,match:/.*/.exec(``)},zK=`gm`+(/x/.unicode==null?``:`u`),BK=class{constructor(e,t,n,r=0,i=e.length){if(this.text=e,this.to=i,this.curLine=``,this.done=!1,this.value=RK,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new UK(e,t,n,r,i);this.re=new RegExp(t,zK+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.iter=e.iter();let a=e.lineAt(r);this.curLineStart=a.from,this.matchPos=gK(e,r),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine=``:(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine=``:this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=gK(this.text,r+ +(n==r)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<r||n>this.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}},VK=new WeakMap,HK=class e{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(t,n,r){let i=VK.get(t);if(!i||i.from>=r||i.to<=n){let i=new e(n,t.sliceString(n,r));return VK.set(t,i),i}if(i.from==n&&i.to==r)return i;let{text:a,from:o}=i;return o>n&&(a=t.sliceString(n,o)+a,o=n),i.to<r&&(a+=t.sliceString(i.to,r)),VK.set(t,new e(o,a)),new e(n,a.slice(n-o,r-o))}},UK=class{constructor(e,t,n,r,i){this.text=e,this.to=i,this.done=!1,this.value=RK,this.matchPos=gK(e,r),this.re=new RegExp(t,zK+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.flat=HK.get(e,r,this.chunkEnd(r+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,n=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,n,t)))return this.value={from:e,to:n,match:t},this.matchPos=gK(this.text,n+ +(e==n)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=HK.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}},typeof Symbol<`u`&&(BK.prototype[Symbol.iterator]=UK.prototype[Symbol.iterator]=function(){return this}),WK=oM.define(),GK=Uj.define({create(){return!0},update(e,t){for(let n of t.effects)n.is(WK)&&(e=n.value);return e},provide:e=>Cz.from(e,e=>e?_K:null)}),KK=e=>{let t=WF(e,_K);if(!t){let n=[WK.of(!0)];e.state.field(GK,!1)??n.push(oM.appendConfig.of([GK,qK])),e.dispatch({effects:n}),t=WF(e,_K)}return t&&t.dom.querySelector(`input`).select(),!0},qK=X.baseTheme({".cm-panel.cm-gotoLine":{padding:`2px 6px 4px`,position:`relative`,"& label":{fontSize:`80%`},"& [name=close]":{position:`absolute`,top:`0`,bottom:`0`,right:`4px`,backgroundColor:`inherit`,border:`none`,font:`inherit`,padding:`0`}}}),JK={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},YK=J.define({combine(e){return hj(e,JK,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}}),XK=DI.mark({class:`cm-selectionMatch`}),ZK=DI.mark({class:`cm-selectionMatch cm-selectionMatch-main`}),QK=dL.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(YK),{state:n}=e,r=n.selection;if(r.ranges.length>1)return DI.none;let i=r.main,a,o=null;if(i.empty){if(!t.highlightWordAroundCursor)return DI.none;let e=n.wordAt(i.head);if(!e)return DI.none;o=n.charCategorizer(i.head),a=n.sliceDoc(e.from,e.to)}else{let e=i.to-i.from;if(e<t.minSelectionLength||e>200)return DI.none;if(t.wholeWords){if(a=n.sliceDoc(i.from,i.to),o=n.charCategorizer(i.head),!(yK(o,n,i.from,i.to)&&bK(o,n,i.from,i.to)))return DI.none}else if(a=n.sliceDoc(i.from,i.to),!a)return DI.none}let s=[];for(let r of e.visibleRanges){let e=new LK(n.doc,a,r.from,r.to);for(;!e.next().done;){let{from:r,to:a}=e.value;if((!o||yK(o,n,r,a))&&(i.empty&&r<=i.from&&a>=i.to?s.push(ZK.range(r,a)):(r>=i.to||a<=i.from)&&s.push(XK.range(r,a)),s.length>t.maxMatches))return DI.none}}return DI.set(s)}},{decorations:e=>e.decorations}),$K=X.baseTheme({".cm-selectionMatch":{backgroundColor:`#99ff7780`},".cm-searchMatch .cm-selectionMatch":{backgroundColor:`transparent`}}),eq=({state:e,dispatch:t})=>{let{selection:n}=e,r=q.create(n.ranges.map(t=>e.wordAt(t.head)||q.cursor(t.head)),n.mainIndex);return r.eq(n)?!1:(t(e.update({selection:r})),!0)},tq=({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some(e=>e.from===e.to))return eq({state:e,dispatch:t});let r=e.sliceDoc(n[0].from,n[0].to);if(e.selection.ranges.some(t=>e.sliceDoc(t.from,t.to)!=r))return!1;let i=xK(e,r);return i?(t(e.update({selection:e.selection.addRange(q.range(i.from,i.to),!1),effects:X.scrollIntoView(i.to)})),!0):!1},nq=J.define({combine(e){return hj(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new Cq(e),scrollToMatch:e=>X.scrollIntoView(e)})}}),rq=class{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||``,this.valid=!!this.search&&(!this.regexp||hK(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(e,t)=>t==`n`?`
|
||
`:t==`r`?`\r`:t==`t`?` `:`\\`)}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new oq(this):new aq(this)}getCursor(e,t=0,n){let r=e.doc?e:fM.create({doc:e});return n??(n=r.doc.length),this.regexp?TK(this,r,t,n):CK(this,r,t,n)}},iq=class{constructor(e){this.spec=e}},aq=class extends iq{constructor(e){super(e)}nextMatch(e,t,n){let r=CK(this.spec,e,n,e.doc.length).nextOverlapping();if(r.done){let n=Math.min(e.doc.length,t+this.spec.unquoted.length);r=CK(this.spec,e,0,n).nextOverlapping()}return r.done||r.value.from==t&&r.value.to==n?null:r.value}prevMatchInRange(e,t,n){for(let r=n;;){let n=Math.max(t,r-1e4-this.spec.unquoted.length),i=CK(this.spec,e,n,r),a=null;for(;!i.nextOverlapping().done;)a=i.value;if(a)return a;if(n==t)return null;r-=1e4}}prevMatch(e,t,n){let r=this.prevMatchInRange(e,0,t);return r||(r=this.prevMatchInRange(e,Math.max(0,n-this.spec.unquoted.length),e.doc.length)),r&&(r.from!=t||r.to!=n)?r:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let n=CK(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=CK(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}},oq=class extends iq{nextMatch(e,t,n){let r=TK(this.spec,e,n,e.doc.length).next();return r.done&&(r=TK(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let i=Math.max(t,n-r*1e4),a=TK(this.spec,e,i,n),o=null;for(;!a.next().done;)o=a.value;if(o&&(i==t||o.from>i+10))return o;if(i==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,n)=>{if(n==`&`)return e.match[0];if(n==`$`)return`$`;for(let t=n.length;t>0;t--){let r=+n.slice(0,t);if(r>0&&r<e.match.length)return e.match[r]+n.slice(t)}return t})}matchAll(e,t){let n=TK(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=TK(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}},sq=oM.define(),cq=oM.define(),lq=Uj.define({create(e){return new uq(jK(e).create(),null)},update(e,t){for(let n of t.effects)n.is(sq)?e=new uq(n.value.create(),e.panel):n.is(cq)&&(e=new uq(e.query,n.value?AK:null));return e},provide:e=>Cz.from(e,e=>e.panel)}),uq=class{constructor(e,t){this.query=e,this.panel=t}},dq=DI.mark({class:`cm-searchMatch`}),fq=DI.mark({class:`cm-searchMatch cm-searchMatch-selected`}),pq=dL.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(lq))}update(e){let t=e.state.field(lq);(t!=e.startState.field(lq)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return DI.none;let{view:n}=this,r=new _M;for(let t=0,i=n.visibleRanges,a=i.length;t<a;t++){let{from:o,to:s}=i[t];for(;t<a-1&&s>i[t+1].from-500;)s=i[++t].to;e.highlight(n.state,o,s,(e,t)=>{let i=n.state.selection.ranges.some(n=>n.from==e&&n.to==t);r.add(e,t,i?fq:dq)})}return r.finish()}},{decorations:e=>e.decorations}),mq=kK((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let i=q.single(r.from,r.to),a=e.state.facet(nq);return e.dispatch({selection:i,effects:[FK(e,r),a.scrollToMatch(i.main,e)],userEvent:`select.search`}),NK(e),!0}),hq=kK((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,i=t.prevMatch(n,r,r);if(!i)return!1;let a=q.single(i.from,i.to),o=e.state.facet(nq);return e.dispatch({selection:a,effects:[FK(e,i),o.scrollToMatch(a.main,e)],userEvent:`select.search`}),NK(e),!0}),gq=kK((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!n||!n.length?!1:(e.dispatch({selection:q.create(n.map(e=>q.range(e.from,e.to))),userEvent:`select.search.matches`}),!0)}),_q=({state:e,dispatch:t})=>{let n=e.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,a=[],o=0;for(let t=new LK(e.doc,e.sliceDoc(r,i));!t.next().done;){if(a.length>1e3)return!1;t.value.from==r&&(o=a.length),a.push(q.range(t.value.from,t.value.to))}return t(e.update({selection:q.create(a,o),userEvent:`select.search.matches`})),!0},vq=kK((e,{query:t})=>{let{state:n}=e,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let a=t.nextMatch(n,r,r);if(!a)return!1;let o=a,s=[],c,l,u=[];o.from==r&&o.to==i&&(l=n.toText(t.getReplacement(o)),s.push({from:o.from,to:o.to,insert:l}),o=t.nextMatch(n,o.from,o.to),u.push(X.announce.of(n.phrase(`replaced match on line $`,n.doc.lineAt(r).number)+`.`)));let d=e.state.changes(s);return o&&(c=q.single(o.from,o.to).map(d),u.push(FK(e,o)),u.push(n.facet(nq).scrollToMatch(c.main,e))),e.dispatch({changes:d,selection:c,effects:u,userEvent:`input.replace`}),!0}),yq=kK((e,{query:t})=>{if(e.state.readOnly)return!1;let n=t.matchAll(e.state,1e9).map(e=>{let{from:n,to:r}=e;return{from:n,to:r,insert:t.getReplacement(e)}});if(!n.length)return!1;let r=e.state.phrase(`replaced $ matches`,n.length)+`.`;return e.dispatch({changes:n,effects:X.announce.of(r),userEvent:`input.replace.all`}),!0}),bq=e=>{let t=e.state.field(lq,!1);if(t&&t.panel){let n=MK(e);if(n&&n!=e.root.activeElement){let r=jK(e.state,t.query.spec);r.valid&&e.dispatch({effects:sq.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[cq.of(!0),t?sq.of(jK(e.state,t.query.spec)):oM.appendConfig.of(Dq)]});return!0},xq=e=>{let t=e.state.field(lq,!1);if(!t||!t.panel)return!1;let n=WF(e,AK);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:cq.of(!1)}),!0},Sq=[{key:`Mod-f`,run:bq,scope:`editor search-panel`},{key:`F3`,run:mq,shift:hq,scope:`editor search-panel`,preventDefault:!0},{key:`Mod-g`,run:mq,shift:hq,scope:`editor search-panel`,preventDefault:!0},{key:`Escape`,run:xq,scope:`editor search-panel`},{key:`Mod-Shift-l`,run:_q},{key:`Mod-Alt-g`,run:KK},{key:`Mod-d`,run:tq,preventDefault:!0}],Cq=class{constructor(e){this.view=e;let t=this.query=e.state.field(lq).query.spec;this.commit=this.commit.bind(this),this.searchField=LM(`input`,{value:t.search,placeholder:PK(e,`Find`),"aria-label":PK(e,`Find`),class:`cm-textfield`,name:`search`,form:``,"main-field":`true`,onchange:this.commit,onkeyup:this.commit}),this.replaceField=LM(`input`,{value:t.replace,placeholder:PK(e,`Replace`),"aria-label":PK(e,`Replace`),class:`cm-textfield`,name:`replace`,form:``,onchange:this.commit,onkeyup:this.commit}),this.caseField=LM(`input`,{type:`checkbox`,name:`case`,form:``,checked:t.caseSensitive,onchange:this.commit}),this.reField=LM(`input`,{type:`checkbox`,name:`re`,form:``,checked:t.regexp,onchange:this.commit}),this.wordField=LM(`input`,{type:`checkbox`,name:`word`,form:``,checked:t.wholeWord,onchange:this.commit});function n(e,t,n){return LM(`button`,{class:`cm-button`,name:e,onclick:t,type:`button`},n)}this.dom=LM(`div`,{onkeydown:e=>this.keydown(e),class:`cm-search`},[this.searchField,n(`next`,()=>mq(e),[PK(e,`next`)]),n(`prev`,()=>hq(e),[PK(e,`previous`)]),n(`select`,()=>gq(e),[PK(e,`all`)]),LM(`label`,null,[this.caseField,PK(e,`match case`)]),LM(`label`,null,[this.reField,PK(e,`regexp`)]),LM(`label`,null,[this.wordField,PK(e,`by word`)]),...e.state.readOnly?[]:[LM(`br`),this.replaceField,n(`replace`,()=>vq(e),[PK(e,`replace`)]),n(`replaceAll`,()=>yq(e),[PK(e,`replace all`)])],LM(`button`,{name:`close`,onclick:()=>xq(e),"aria-label":PK(e,`close`),type:`button`},[`×`])])}commit(){let e=new rq({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:sq.of(e)}))}keydown(e){fF(this.view,e,`search-panel`)?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?hq:mq)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),vq(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(sq)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(nq).top}},wq=30,Tq=/[\s\.,:;?!]/,Eq=X.baseTheme({".cm-panel.cm-search":{padding:`2px 6px 4px`,position:`relative`,"& [name=close]":{position:`absolute`,top:`0`,right:`4px`,backgroundColor:`inherit`,border:`none`,font:`inherit`,padding:0,margin:0},"& input, & button, & label":{margin:`.2em .6em .2em 0`},"& input[type=checkbox]":{marginRight:`.2em`},"& label":{fontSize:`80%`,whiteSpace:`pre`}},"&light .cm-searchMatch":{backgroundColor:`#ffff0054`},"&dark .cm-searchMatch":{backgroundColor:`#00ffff8a`},"&light .cm-searchMatch-selected":{backgroundColor:`#ff6a0054`},"&dark .cm-searchMatch-selected":{backgroundColor:`#ff00ff8a`}}),Dq=[lq,Gj.low(pq),Eq]}));function kq(e){let t=Object.keys(e).join(``),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,``)),`[${n?`\\w`:``}${t.replace(/[^\w\s]/g,`\\$&`)}]`}function Aq(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e<r.length;e++)n[r[e]]=!0}let r=kq(t)+kq(n)+`*$`;return[RegExp(`^`+r),new RegExp(r)]}function jq(e){let t=e.map(e=>typeof e==`string`?{label:e}:e),[n,r]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:Aq(t);return e=>{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}function Mq(e){return e.selection.main.from}function Nq(e,t){let{source:n}=e,r=t&&n[0]!=`^`,i=n[n.length-1]!=`$`;return!r&&!i?e:RegExp(`${r?`^`:``}(?:${n})${i?`$`:``}`,e.flags??(e.ignoreCase?`i`:``))}function Pq(e,t,n,r){let{main:i}=e.selection,a=n-i.from,o=r-i.from;return{...e.changeByRange(s=>{if(s!=i&&n!=r&&e.sliceDoc(s.from+a,s.from+o)!=e.sliceDoc(n,r))return{range:s};let c=e.toText(t);return{changes:{from:s.from+a,to:r==i.from?s.to:s.from+o,insert:c},range:q.cursor(s.from+a+c.length)}}),scrollIntoView:!0,userEvent:`input.complete`}}function Fq(e){if(!Array.isArray(e))return e;let t=pJ.get(e);return t||pJ.set(e,t=jq(e)),t}function Iq(e,t){return e?t?e+` `+t:e:t}function Lq(e,t,n,r,i,a){let o=e.textDirection==II.RTL,s=o,c=!1,l=`top`,u,d,f=t.left-i.left,p=i.right-t.right,m=r.right-r.left,h=r.bottom-r.top;if(s&&f<Math.min(m,p)?s=!1:!s&&p<Math.min(m,f)&&(s=!0),m<=(s?f:p))u=Math.max(i.top,Math.min(n.top,i.bottom-h))-t.top,d=Math.min(400,s?f:p);else{c=!0,d=Math.min(400,(o?t.right:i.right-t.left)-30);let e=i.bottom-t.bottom;e>=h||e>t.top?u=n.bottom-t.top:(l=`bottom`,u=t.bottom-n.top)}let g=(t.bottom-t.top)/a.offsetHeight,_=(t.right-t.left)/a.offsetWidth;return{style:`${l}: ${u/g}px; max-width: ${d/_}px`,class:`cm-completionInfo-`+(c?o?`left-narrow`:`right-narrow`:s?`left`:`right`)}}function Rq(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(e){let t=document.createElement(`div`);return t.classList.add(`cm-completionIcon`),e.type&&t.classList.add(...e.type.split(/\s+/g).map(e=>`cm-completionIcon-`+e)),t.setAttribute(`aria-hidden`,`true`),t},position:20}),t.push({render(e,t,n,r){let i=document.createElement(`span`);i.className=`cm-completionLabel`;let a=e.displayLabel||e.label,o=0;for(let e=0;e<r.length;){let t=r[e++],n=r[e++];t>o&&i.appendChild(document.createTextNode(a.slice(o,t)));let s=i.appendChild(document.createElement(`span`));s.appendChild(document.createTextNode(a.slice(t,n))),s.className=`cm-completionMatchedText`,o=n}return o<a.length&&i.appendChild(document.createTextNode(a.slice(o))),i},position:50},{render(e){if(!e.detail)return null;let t=document.createElement(`span`);return t.className=`cm-completionDetail`,t.textContent=e.detail,t},position:80}),t.sort((e,t)=>e.position-t.position).map(e=>e.render)}function zq(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/n);return{from:e*n,to:(e+1)*n}}let r=Math.floor((e-t)/n);return{from:e-(r+1)*n,to:e-r*n}}function Bq(e,t){return n=>new yJ(n,e,t)}function Vq(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=n.height/e.offsetHeight;r.top<n.top?e.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(e.scrollTop+=(r.bottom-n.bottom)/i)}function Hq(e){return(e.boost||0)*100+(e.apply?10:0)+(e.info?5:0)+ +!!e.type}function Uq(e,t){let n=[],r=null,i=null,a=e=>{n.push(e);let{section:t}=e.completion;if(t){r||(r=[]);let e=typeof t==`string`?t:t.name;r.some(t=>t.name==e)||r.push(typeof t==`string`?{name:e}:t)}},o=t.facet(vJ);for(let r of e)if(r.hasResult()){let e=r.result.getMatch;if(r.result.filter===!1)for(let t of r.result.options)a(new dJ(t,r.source,e?e(t):[],1e9-n.length));else{let n=t.sliceDoc(r.from,r.to),s,c=o.filterStrict?new _J(n):new gJ(n);for(let t of r.result.options)if(s=c.match(t.label)){let n=t.displayLabel?e?e(t,s.matched):[]:s.matched,o=s.score+(t.boost||0);if(a(new dJ(t,r.source,n,o)),typeof t.section==`object`&&t.section.rank===`dynamic`){let{name:e}=t.section;i||(i=Object.create(null)),i[e]=Math.max(o,i[e]||-1e9)}}}}if(r){let e=Object.create(null),t=0,a=(e,t)=>(e.rank===`dynamic`&&t.rank===`dynamic`?i[t.name]-i[e.name]:0)||(typeof e.rank==`number`?e.rank:1e9)-(typeof t.rank==`number`?t.rank:1e9)||(e.name<t.name?-1:1);for(let n of r.sort(a))t-=1e5,e[n.name]=t;for(let t of n){let{section:n}=t.completion;n&&(t.score+=e[typeof n==`string`?n:n.name])}}let s=[],c=null,l=o.compareCompletions;for(let e of n.sort((e,t)=>t.score-e.score||l(e.completion,t.completion))){let t=e.completion;!c||c.label!=t.label||c.detail!=t.detail||c.type!=null&&t.type!=null&&c.type!=t.type||c.apply!=t.apply||c.boost!=t.boost?s.push(e):Hq(e.completion)>Hq(c)&&(s[s.length-1]=e),c=e.completion}return s}function Wq(e,t){if(e==t)return!0;for(let n=0,r=0;;){for(;n<e.length&&!e[n].hasResult();)n++;for(;r<t.length&&!t[r].hasResult();)r++;let i=n==e.length,a=r==t.length;if(i||a)return i==a;if(e[n++].result!=t[r++].result)return!1}}function Gq(e,t){let n={"aria-autocomplete":`list`,"aria-haspopup":`listbox`,"aria-controls":e};return t>-1&&(n[`aria-activedescendant`]=e+`-`+t),n}function Kq(e,t){if(e.isUserEvent(`input.complete`)){let n=e.annotation(fJ);if(n&&t.activateOnCompletion(n))return 12}let n=e.isUserEvent(`input.type`);return n&&t.activateOnTyping?5:n?1:e.isUserEvent(`delete.backward`)?2:e.selection?8:e.docChanged?16:0}function qq(e,t,n,r){if(!e)return!1;let i=t.sliceDoc(n,r);return typeof e==`function`?e(i,n,r,t):Nq(e,!0).test(i)}function Jq(e,t){let n=t.completion.apply||t.completion.label,r=e.state.field(kJ).active.find(e=>e.source==t.source);return r instanceof EJ?(typeof n==`string`?e.dispatch({...Pq(e.state,n,r.from,r.to),annotations:fJ.of(t.completion)}):n(e,t.completion,r.from,r.to),!0):!1}function Yq(e,t=`option`){return n=>{let r=n.state.field(kJ,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(vJ).interactionDelay)return!1;let i=1,a;t==`page`&&(a=UF(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(a.dom.offsetHeight/a.dom.querySelector(`li`).offsetHeight)-1));let{length:o}=r.open.options,s=r.open.selected>-1?r.open.selected+i*(e?1:-1):e?0:o-1;return s<0?s=t==`page`?0:o-1:s>=o&&(s=t==`page`?o-1:0),n.dispatch({effects:OJ.of(s)}),!0}}function Xq(){return[qJ,WJ]}function Zq(e){for(let t=0;t<16;t+=2)if(GJ.charCodeAt(t)==e)return GJ.charAt(t+1);return WA(e<128?e:e+1)}function Qq(e,t){return e.languageDataAt(`closeBrackets`,t)[0]||VJ}function $q(e,t){let n=Qq(e,e.selection.main.head),r=n.brackets||VJ.brackets;for(let i of r){let a=Zq(UA(i,0));if(t==i)return a==i?aJ(e,i,r.indexOf(i+i+i)>-1,n):rJ(e,i,a,n.before||VJ.before);if(t==a&&eJ(e,e.selection.main.from))return iJ(e,i,a)}return null}function eJ(e,t){let n=!1;return e.field(WJ).between(0,e.doc.length,e=>{e==t&&(n=!0)}),n}function tJ(e,t){let n=e.sliceString(t,t+2);return n.slice(0,GA(UA(n,0)))}function nJ(e,t){let n=e.sliceString(t-2,t);return GA(UA(n,0))==n.length?n:n.slice(1)}function rJ(e,t,n,r){let i=null,a=e.changeByRange(a=>{if(!a.empty)return{changes:[{insert:t,from:a.from},{insert:n,from:a.to}],effects:HJ.of(a.to+t.length),range:q.range(a.anchor+t.length,a.head+t.length)};let o=tJ(e.doc,a.head);return!o||/\s/.test(o)||r.indexOf(o)>-1?{changes:{insert:t+n,from:a.head},effects:HJ.of(a.head+t.length),range:q.cursor(a.head+t.length)}:{range:i=a}});return i?null:e.update(a,{scrollIntoView:!0,userEvent:`input.type`})}function iJ(e,t,n){let r=null,i=e.changeByRange(t=>t.empty&&tJ(e.doc,t.head)==n?{changes:{from:t.head,to:t.head+n.length,insert:n},range:q.cursor(t.head+n.length)}:r={range:t});return r?null:e.update(i,{scrollIntoView:!0,userEvent:`input.type`})}function aJ(e,t,n,r){let i=r.stringPrefixes||VJ.stringPrefixes,a=null,o=e.changeByRange(r=>{if(!r.empty)return{changes:[{insert:t,from:r.from},{insert:t,from:r.to}],effects:HJ.of(r.to+t.length),range:q.range(r.anchor+t.length,r.head+t.length)};let o=r.head,s=tJ(e.doc,o),c;if(s==t){if(oJ(e,o))return{changes:{insert:t+t,from:o},effects:HJ.of(o+t.length),range:q.cursor(o+t.length)};if(eJ(e,o)){let r=n&&e.sliceDoc(o,o+t.length*3)==t+t+t?t+t+t:t;return{changes:{from:o,to:o+r.length,insert:r},range:q.cursor(o+r.length)}}}else if(n&&e.sliceDoc(o-2*t.length,o)==t+t&&(c=cJ(e,o-2*t.length,i))>-1&&oJ(e,c))return{changes:{insert:t+t+t+t,from:o},effects:HJ.of(o+t.length),range:q.cursor(o+t.length)};else if(e.charCategorizer(o)(s)!=lM.Word&&cJ(e,o,i)>-1&&!sJ(e,o,t,i))return{changes:{insert:t+t,from:o},effects:HJ.of(o+t.length),range:q.cursor(o+t.length)};return{range:a=r}});return a?null:e.update(o,{scrollIntoView:!0,userEvent:`input.type`})}function oJ(e,t){let n=eV(e).resolveInner(t+1);return n.parent&&n.from==t}function sJ(e,t,n,r){let i=eV(e).resolveInner(t,-1),a=r.reduce((e,t)=>Math.max(e,t.length),0);for(let o=0;o<5;o++){let o=e.sliceDoc(i.from,Math.min(i.to,i.from+n.length+a)),s=o.indexOf(n);if(!s||s>-1&&r.indexOf(o.slice(0,s))>-1){let t=i.firstChild;for(;t&&t.from==i.from&&t.to-t.from>n.length+s;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let c=i.to==t&&i.parent;if(!c)break;i=c}return!1}function cJ(e,t,n){let r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=lM.Word)return t;for(let i of n){let n=t-i.length;if(e.sliceDoc(n,t)==i&&r(e.sliceDoc(n-1,n))!=lM.Word)return n}return-1}function lJ(e={}){return[zJ,kJ,vJ.of(e),LJ,ZJ,BJ]}var uJ,dJ,fJ,pJ,mJ,hJ,gJ,_J,vJ,yJ,bJ,xJ,SJ,CJ,wJ,TJ,EJ,DJ,OJ,kJ,AJ,jJ,MJ,NJ,PJ,FJ,IJ,LJ,RJ,zJ,BJ,VJ,HJ,UJ,WJ,GJ,KJ,qJ,JJ,YJ,XJ,ZJ,QJ=o((()=>{xM(),Vz(),VH(),uJ=class{constructor(e,t,n,r){this.state=e,this.pos=t,this.explicit=n,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=eV(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),i=r.search(Nq(e,!1));return i<0?null:{from:n+i,to:this.pos,text:r.slice(i)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){e==`abort`&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}},dJ=class{constructor(e,t,n,r){this.completion=e,this.source=t,this.match=n,this.score=r}},fJ=rM.define(),pJ=new WeakMap,mJ=oM.define(),hJ=oM.define(),gJ=class{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let n=UA(e,t),r=GA(n);this.chars.push(n);let i=e.slice(t,t+r),a=i.toUpperCase();this.folded.push(UA(a==i?i.toLowerCase():a,0)),t+=r}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:n,any:r,precise:i,byWord:a}=this;if(t.length==1){let r=UA(e,0),i=GA(r),a=i==e.length?0:-100;if(r!=t[0])if(r==n[0])a+=-200;else return null;return this.ret(a,[0,i])}let o=e.indexOf(this.pattern);if(o==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let s=t.length,c=0;if(o<0){for(let i=0,a=Math.min(e.length,200);i<a&&c<s;){let a=UA(e,i);(a==t[c]||a==n[c])&&(r[c++]=i),i+=GA(a)}if(c<s)return null}let l=0,u=0,d=!1,f=0,p=-1,m=-1,h=/[a-z]/.test(e),g=!0;for(let r=0,c=Math.min(e.length,200),_=0;r<c&&u<s;){let c=UA(e,r);o<0&&(l<s&&c==t[l]&&(i[l++]=r),f<s&&(c==t[f]||c==n[f]?(f==0&&(p=r),m=r+1,f++):f=0));let v,y=c<255?c>=48&&c<=57||c>=97&&c<=122?2:+(c>=65&&c<=90):(v=WA(c))==v.toLowerCase()?v==v.toUpperCase()?0:2:1;(!r||y==1&&h||_==0&&y!=0)&&(t[u]==c||n[u]==c&&(d=!0)?a[u++]=r:a.length&&(g=!1)),_=y,r+=GA(c)}return u==s&&a[0]==0&&g?this.result(-100+(d?-200:0),a,e):f==s&&p==0?this.ret(-200-e.length+(m==e.length?0:-100),[0,m]):o>-1?this.ret(-700-e.length,[o,o+this.pattern.length]):f==s?this.ret(-900-e.length,[p,m]):u==s?this.result(-100+(d?-200:0)+-700+(g?0:-1100),a,e):t.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,t,n){let r=[],i=0;for(let e of t){let t=e+(this.astral?GA(UA(n,e)):1);i&&r[i-1]==e?r[i-1]=t:(r[i++]=e,r[i++]=t)}return this.ret(e-n.length,r)}},_J=class{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return n==null?null:(this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}},vJ=J.define({combine(e){return hj(e,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>``,optionClass:()=>``,aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:Lq,filterStrict:!1,compareCompletions:(e,t)=>(e.sortText||e.label).localeCompare(t.sortText||t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>Iq(e(n),t(n)),optionClass:(e,t)=>n=>Iq(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}}),yJ=class{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass=``;let r=e.state.field(t),{options:i,selected:a}=r.open,o=e.state.facet(vJ);this.optionContent=Rq(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=zq(i.length,a,o.maxRenderedOptions),this.dom=document.createElement(`div`),this.dom.className=`cm-tooltip-autocomplete`,this.updateTooltipClass(e.state),this.dom.addEventListener(`mousedown`,n=>{let{options:r}=e.state.field(t).open;for(let t=n.target,i;t&&t!=this.dom;t=t.parentNode)if(t.nodeName==`LI`&&(i=/-(\d+)$/.exec(t.id))&&+i[1]<r.length){this.applyCompletion(e,r[+i[1]]),n.preventDefault();return}}),this.dom.addEventListener(`focusout`,t=>{let n=e.state.field(this.stateField,!1);n&&n.tooltip&&e.state.facet(vJ).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:hJ.of(null)})}),this.showOptions(i,r.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener(`scroll`,()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){let t=e.state.field(this.stateField),n=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),t!=n){let{options:r,selected:i,disabled:a}=t.open;(!n.open||n.open.options!=r)&&(this.range=zq(r.length,i,e.state.facet(vJ).maxRenderedOptions),this.showOptions(r,t.id)),this.updateSel(),a!=n.open?.disabled&&this.dom.classList.toggle(`cm-tooltip-autocomplete-disabled`,!!a)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(` `))e&&this.dom.classList.remove(e);for(let e of t.split(` `))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;(t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=zq(t.options.length,t.selected,this.view.state.facet(vJ).maxRenderedOptions),this.showOptions(t.options,e.id));let n=this.updateSelectedOption(t.selected);if(n){this.destroyInfo();let{completion:r}=t.options[t.selected],{info:i}=r;if(!i)return;let a=typeof i==`string`?document.createTextNode(i):i(r);if(!a)return;`then`in a?a.then(t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,r)}).catch(e=>RN(this.view.state,e,`completion info`)):(this.addInfoPane(a,r),n.setAttribute(`aria-describedby`,this.info.id))}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement(`div`);if(n.className=`cm-tooltip cm-completionInfo`,n.id=`cm-completionInfo-`+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)n.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:r}=e;n.appendChild(t),this.infoDestroy=r||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)n.nodeName!=`LI`||!n.id?r--:r==e?n.hasAttribute(`aria-selected`)||(n.setAttribute(`aria-selected`,`true`),t=n):n.hasAttribute(`aria-selected`)&&(n.removeAttribute(`aria-selected`),n.removeAttribute(`aria-describedby`));return t&&Vq(this.list,t),t}measureInfo(){let e=this.dom.querySelector(`[aria-selected]`);if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),i=this.space;if(!i){let e=this.dom.ownerDocument.documentElement;i={left:0,top:0,right:e.clientWidth,bottom:e.clientHeight}}return r.top>Math.min(i.bottom,t.bottom)-10||r.bottom<Math.max(i.top,t.top)+10?null:this.view.state.facet(vJ).positionInfo(this.view,t,r,n,i,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className=`cm-tooltip cm-completionInfo `+(e.class||``)):this.info.style.cssText=`top: -1e6px`)}createListBox(e,t,n){let r=document.createElement(`ul`);r.id=t,r.setAttribute(`role`,`listbox`),r.setAttribute(`aria-expanded`,`true`),r.setAttribute(`aria-label`,this.view.state.phrase(`Completions`)),r.addEventListener(`mousedown`,e=>{e.target==r&&e.preventDefault()});let i=null;for(let a=n.from;a<n.to;a++){let{completion:o,match:s}=e[a],{section:c}=o;if(c){let e=typeof c==`string`?c:c.name;if(e!=i&&(a>n.from||n.from==0))if(i=e,typeof c!=`string`&&c.header)r.appendChild(c.header(c));else{let t=r.appendChild(document.createElement(`completion-section`));t.textContent=e}}let l=r.appendChild(document.createElement(`li`));l.id=t+`-`+a,l.setAttribute(`role`,`option`);let u=this.optionClass(o);u&&(l.className=u);for(let e of this.optionContent){let t=e(o,this.view.state,this.view,s);t&&l.appendChild(t)}}return n.from&&r.classList.add(`cm-completionListIncompleteTop`),n.to<e.length&&r.classList.add(`cm-completionListIncompleteBottom`),r}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}},bJ=class e{constructor(e,t,n,r,i,a){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=r,this.selected=i,this.disabled=a}setSelected(t,n){return t==this.selected||t>=this.options.length?this:new e(this.options,Gq(n,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,n,r,i,a,o){if(i&&!o&&t.some(e=>e.isPending))return i.setDisabled();let s=Uq(t,n);if(!s.length)return i&&t.some(e=>e.isPending)?i.setDisabled():null;let c=n.facet(vJ).selectOnOpen?0:-1;if(i&&i.selected!=c&&i.selected!=-1){let e=i.options[i.selected].completion;for(let t=0;t<s.length;t++)if(s[t].completion==e){c=t;break}}return new e(s,Gq(r,c),{pos:t.reduce((e,t)=>t.hasResult()?Math.min(e,t.from):e,1e8),create:AJ,above:a.aboveCursor},i?i.timestamp:Date.now(),c,!1)}map(t){return new e(this.options,this.attrs,{...this.tooltip,pos:t.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new e(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}},xJ=class e{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new e(wJ,`cm-ac-`+Math.floor(Math.random()*2e6).toString(36),null)}update(t){let{state:n}=t,r=n.facet(vJ),i=(r.override||n.languageDataAt(`autocomplete`,Mq(n)).map(Fq)).map(e=>(this.active.find(t=>t.source==e)||new TJ(e,+!!this.active.some(e=>e.state!=0))).update(t,r));i.length==this.active.length&&i.every((e,t)=>e==this.active[t])&&(i=this.active);let a=this.open,o=t.effects.some(e=>e.is(DJ));a&&t.docChanged&&(a=a.map(t.changes)),t.selection||i.some(e=>e.hasResult()&&t.changes.touchesRange(e.from,e.to))||!Wq(i,this.active)||o?a=bJ.build(i,n,this.id,a,r,o):a&&a.disabled&&!i.some(e=>e.isPending)&&(a=null),!a&&i.every(e=>!e.isPending)&&i.some(e=>e.hasResult())&&(i=i.map(e=>e.hasResult()?new TJ(e.source,0):e));for(let e of t.effects)e.is(OJ)&&(a=a&&a.setSelected(e.value,this.id));return i==this.active&&a==this.open?this:new e(i,this.id,a)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?SJ:CJ}},SJ={"aria-autocomplete":`list`},CJ={},wJ=[],TJ=class e{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return this.state==1}update(t,n){let r=Kq(t,n),i=this;(r&8||r&16&&this.touches(t))&&(i=new e(i.source,0)),r&4&&i.state==0&&(i=new e(this.source,1)),i=i.updateFor(t,r);for(let n of t.effects)if(n.is(mJ))i=new e(i.source,1,n.value);else if(n.is(hJ))i=new e(i.source,0);else if(n.is(DJ))for(let e of n.value)e.source==i.source&&(i=e);return i}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(Mq(e.state))}},EJ=class e extends TJ{constructor(e,t,n,r,i,a){super(e,3,t),this.limit=n,this.result=r,this.from=i,this.to=a}hasResult(){return!0}updateFor(t,n){if(!(n&3))return this.map(t.changes);let r=this.result;r.map&&!t.changes.empty&&(r=r.map(r,t.changes));let i=t.changes.mapPos(this.from),a=t.changes.mapPos(this.to,1),o=Mq(t.state);if(o>a||!r||n&2&&(Mq(t.startState)==this.from||o<this.limit))return new TJ(this.source,n&4?1:0);let s=t.changes.mapPos(this.limit);return qq(r.validFor,t.state,i,a)?new e(this.source,this.explicit,s,r,i,a):r.update&&(r=r.update(r,i,a,new uJ(t.state,o,!1)))?new e(this.source,this.explicit,s,r,r.from,r.to??Mq(t.state)):new TJ(this.source,1,this.explicit)}map(t){return t.empty?this:(this.result.map?this.result.map(this.result,t):this.result)?new e(this.source,this.explicit,t.mapPos(this.limit),this.result,t.mapPos(this.from),t.mapPos(this.to,1)):new TJ(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}},DJ=oM.define({map(e,t){return e.map(e=>e.map(t))}}),OJ=oM.define(),kJ=Uj.define({create(){return xJ.start()},update(e,t){return e.update(t)},provide:e=>[pz.from(e,e=>e.tooltip),X.contentAttributes.from(e,e=>e.attrs)]}),AJ=Bq(kJ,Jq),jJ=e=>{let t=e.state.field(kJ,!1);return e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp<e.state.facet(vJ).interactionDelay?!1:Jq(e,t.open.options[t.open.selected])},MJ=e=>e.state.field(kJ,!1)?(e.dispatch({effects:mJ.of(!0)}),!0):!1,NJ=e=>{let t=e.state.field(kJ,!1);return!t||!t.active.some(e=>e.state!=0)?!1:(e.dispatch({effects:hJ.of(null)}),!0)},PJ=class{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}},FJ=50,IJ=1e3,LJ=dL.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let t of e.state.field(kJ).active)t.isPending&&this.startQuery(t)}update(e){let t=e.state.field(kJ),n=e.state.facet(vJ);if(!e.selectionSet&&!e.docChanged&&e.startState.field(kJ)==t)return;let r=e.transactions.some(e=>{let t=Kq(e,n);return t&8||(e.selection||e.docChanged)&&!(t&3)});for(let t=0;t<this.running.length;t++){let n=this.running[t];if(r||n.context.abortOnDocChange&&e.docChanged||n.updates.length+e.transactions.length>FJ&&Date.now()-n.time>IJ){for(let e of n.context.abortListeners)try{e()}catch(e){RN(this.view.state,e)}n.context.abortListeners=null,this.running.splice(t--,1)}else n.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some(e=>e.effects.some(e=>e.is(mJ)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=t.active.some(e=>e.isPending&&!this.running.some(t=>t.active.source==e.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let t of e.transactions)t.isUserEvent(`input.type`)?this.composing=2:this.composing==2&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field(kJ);for(let e of t.active)e.isPending&&!this.running.some(t=>t.active.source==e.source)&&this.startQuery(e);this.running.length&&t.open&&t.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(vJ).updateSyncTime))}startQuery(e){let{state:t}=this.view,n=new uJ(t,Mq(t),e.explicit,this.view),r=new PJ(e,n);this.running.push(r),Promise.resolve(e.source(n)).then(e=>{r.context.aborted||(r.done=e||null,this.scheduleAccept())},e=>{this.view.dispatch({effects:hJ.of(null)}),RN(this.view.state,e)})}scheduleAccept(){this.running.every(e=>e.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(vJ).updateSyncTime))}accept(){this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(vJ),n=this.view.state.field(kJ);for(let r=0;r<this.running.length;r++){let i=this.running[r];if(i.done===void 0)continue;if(this.running.splice(r--,1),i.done){let n=Mq(i.updates.length?i.updates[0].startState:this.view.state),r=Math.min(n,i.done.from+ +!i.active.explicit),a=new EJ(i.active.source,i.active.explicit,r,i.done,i.done.from,i.done.to??n);for(let e of i.updates)a=a.update(e,t);if(a.hasResult()){e.push(a);continue}}let a=n.active.find(e=>e.source==i.active.source);if(a&&a.isPending)if(i.done==null){let n=new TJ(i.active.source,0);for(let e of i.updates)n=n.update(e,t);n.isPending||e.push(n)}else this.startQuery(a)}(e.length||n.open&&n.open.disabled)&&this.view.dispatch({effects:DJ.of(e)})}},{eventHandlers:{blur(e){let t=this.view.state.field(kJ,!1);if(t&&t.tooltip&&this.view.state.facet(vJ).closeOnBlur){let n=t.open&&UF(this.view,t.open.tooltip);(!n||!n.dom.contains(e.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:hJ.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:mJ.of(!1)}),20),this.composing=0}}}),RJ=typeof navigator==`object`&&/Win/.test(navigator.platform),zJ=Gj.highest(X.domEventHandlers({keydown(e,t){let n=t.state.field(kJ,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&!(RJ&&e.altKey)||e.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(e=>e.source==r.source),a=r.completion.commitCharacters||i.result.commitCharacters;return a&&a.indexOf(e.key)>-1&&Jq(t,r),!1}})),BJ=X.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:`monospace`,whiteSpace:`nowrap`,overflow:`hidden auto`,maxWidth_fallback:`700px`,maxWidth:`min(700px, 95vw)`,minWidth:`250px`,maxHeight:`10em`,height:`100%`,listStyle:`none`,margin:0,padding:0,"& > li, & > completion-section":{padding:`1px 3px`,lineHeight:1.2},"& > li":{overflowX:`hidden`,textOverflow:`ellipsis`,cursor:`pointer`},"& > completion-section":{display:`list-item`,borderBottom:`1px solid silver`,paddingLeft:`0.5em`,opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#17c`,color:`white`},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#777`},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#347`,color:`white`},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#444`},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:`"···"`,opacity:.5,display:`block`,textAlign:`center`},".cm-tooltip.cm-completionInfo":{position:`absolute`,padding:`3px 9px`,width:`max-content`,maxWidth:`400px`,boxSizing:`border-box`,whiteSpace:`pre-line`},".cm-completionInfo.cm-completionInfo-left":{right:`100%`},".cm-completionInfo.cm-completionInfo-right":{left:`100%`},".cm-completionInfo.cm-completionInfo-left-narrow":{right:`30px`},".cm-completionInfo.cm-completionInfo-right-narrow":{left:`30px`},"&light .cm-snippetField":{backgroundColor:`#00000022`},"&dark .cm-snippetField":{backgroundColor:`#ffffff22`},".cm-snippetFieldPosition":{verticalAlign:`text-top`,width:0,height:`1.15em`,display:`inline-block`,margin:`0 -0.7px -.7em`,borderLeft:`1.4px dotted #888`},".cm-completionMatchedText":{textDecoration:`underline`},".cm-completionDetail":{marginLeft:`0.5em`,fontStyle:`italic`},".cm-completionIcon":{fontSize:`90%`,width:`.8em`,display:`inline-block`,textAlign:`center`,paddingRight:`.6em`,opacity:`0.6`,boxSizing:`content-box`},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:`'ƒ'`}},".cm-completionIcon-class":{"&:after":{content:`'○'`}},".cm-completionIcon-interface":{"&:after":{content:`'◌'`}},".cm-completionIcon-variable":{"&:after":{content:`'𝑥'`}},".cm-completionIcon-constant":{"&:after":{content:`'𝐶'`}},".cm-completionIcon-type":{"&:after":{content:`'𝑡'`}},".cm-completionIcon-enum":{"&:after":{content:`'∪'`}},".cm-completionIcon-property":{"&:after":{content:`'□'`}},".cm-completionIcon-keyword":{"&:after":{content:`'🔑︎'`}},".cm-completionIcon-namespace":{"&:after":{content:`'▢'`}},".cm-completionIcon-text":{"&:after":{content:`'abc'`,fontSize:`50%`,verticalAlign:`middle`}}}),VJ={brackets:[`(`,`[`,`{`,`'`,`"`],before:`)]}:;>`,stringPrefixes:[]},HJ=oM.define({map(e,t){return t.mapPos(e,-1,Fj.TrackAfter)??void 0}}),UJ=new class extends pM{},UJ.startSide=1,UJ.endSide=-1,WJ=Uj.define({create(){return gM.empty},update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:e=>e>=n.from&&e<=n.to})}for(let n of t.effects)n.is(HJ)&&(e=e.update({add:[UJ.range(n.value,n.value+1)]}));return e}}),GJ=`()[]{}<>«»»«[]{}`,KJ=typeof navigator==`object`&&/Android\b/.test(navigator.userAgent),qJ=X.inputHandler.of((e,t,n,r)=>{if((KJ?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let i=e.state.selection.main;if(r.length>2||r.length==2&&GA(UA(r,0))==1||t!=i.from||n!=i.to)return!1;let a=$q(e.state,r);return a?(e.dispatch(a),!0):!1}),JJ=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Qq(e,e.selection.main.head).brackets||VJ.brackets,r=null,i=e.changeByRange(t=>{if(t.empty){let r=nJ(e.doc,t.head);for(let i of n)if(i==r&&tJ(e.doc,t.head)==Zq(UA(i,0)))return{changes:{from:t.head-i.length,to:t.head+i.length},range:q.cursor(t.head-i.length)}}return{range:r=t}});return r||t(e.update(i,{scrollIntoView:!0,userEvent:`delete.backward`})),!r},YJ=[{key:`Backspace`,run:JJ}],XJ=[{key:`Ctrl-Space`,run:MJ},{mac:"Alt-`",run:MJ},{mac:`Alt-i`,run:MJ},{key:`Escape`,run:NJ},{key:`ArrowDown`,run:Yq(!0)},{key:`ArrowUp`,run:Yq(!1)},{key:`PageDown`,run:Yq(!0,`page`)},{key:`PageUp`,run:Yq(!1,`page`)},{key:`Enter`,run:jJ}],ZJ=Gj.highest(kR.computeN([vJ],e=>e.facet(vJ).defaultKeymap?[XJ]:[]))}));function $J(e,t=null,n=0){let r=null;return e.between(n,1e9,(e,n,{spec:i})=>{if(!(t&&i.diagnostics.indexOf(t)<0))if(!r)r=new dY(e,n,t||i.diagnostics[0]);else if(i.diagnostics.indexOf(r.diagnostic)<0)return!1;else r=new dY(r.from,n,r.diagnostic)}),r}function eY(e,t){let n=t.pos,r=t.end||n,i=e.state.facet(SY).hideOn(e,n,r);if(i!=null)return i;let a=e.startState.doc.lineAt(t.pos);return!!(e.effects.some(e=>e.is(pY))||e.changes.touchesRange(a.from,Math.max(a.to,r)))}function tY(e,t){return e.field(gY,!1)?t:t.concat(oM.appendConfig.of(DY))}function nY(e,t,n){let{diagnostics:r}=e.state.field(gY),i,a=-1,o=-1;r.between(t-+(n<0),t+ +(n>0),(e,r,{spec:s})=>{if(t>=e&&t<=r&&(e==r||(t>e||n>0)&&(t<r||n<0)))return i=s.diagnostics,a=e,o=r,!1});let s=e.state.facet(SY).tooltipFilter;return i&&s&&(i=s(i,e.state)),i?{pos:a,end:o,above:e.state.doc.lineAt(a).to<o,create(){return{dom:rY(e,i)}}}:null}function rY(e,t){return LM(`ul`,{class:`cm-tooltip-lint`},t.map(t=>oY(e,t,!1)))}function iY(e,t){return e?t?(n,r)=>t(e(n,r),r):e:t}function aY(e){let t=[];if(e)actions:for(let{name:n}of e){for(let e=0;e<n.length;e++){let r=n[e];if(/[a-zA-Z]/.test(r)&&!t.some(e=>e.toLowerCase()==r.toLowerCase())){t.push(r);continue actions}}t.push(``)}return t}function oY(e,t,n){let r=n?aY(t.actions):[];return LM(`li`,{class:`cm-diagnostic cm-diagnostic-`+t.severity},LM(`span`,{class:`cm-diagnosticText`},t.renderMessage?t.renderMessage(e):t.message),t.actions?.map((n,i)=>{let a=!1,o=r=>{if(r.preventDefault(),a)return;a=!0;let i=$J(e.state.field(gY).diagnostics,t);i&&n.apply(e,i.from,i.to)},{name:s}=n,c=r[i]?s.indexOf(r[i]):-1,l=c<0?s:[s.slice(0,c),LM(`u`,s.slice(c,c+1)),s.slice(c+1)];return LM(`button`,{type:`button`,class:`cm-diagnosticAction`+(n.markClass?` `+n.markClass:``),onclick:o,onmousedown:o,"aria-label":` Action: ${s}${c<0?``:` (access key "${r[i]})"`}.`},l)}),t.source&&LM(`div`,{class:`cm-diagnosticSource`},t.source))}function sY(e,t=`viewBox="0 0 40 40"`){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${t}>${encodeURIComponent(e)}</svg>')`}function cY(e){return sY(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${e}" fill="none" stroke-width=".7"/>`,`width="6" height="3"`)}function lY(e){return e==`error`?4:e==`warning`?3:e==`info`?2:1}function uY(e){let t=`hint`,n=1;for(let r of e){let e=lY(r.severity);e>n&&(n=e,t=r.severity)}return t}var dY,fY,pY,mY,hY,gY,_Y,vY,yY,bY,xY,SY,CY,wY,TY,EY,DY,OY=o((()=>{Vz(),xM(),zM(),dY=class{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}},fY=class e{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(t,n,r){let i=r.facet(SY).markerFilter;i&&(t=i(t,r));let a=t.slice().sort((e,t)=>e.from-t.from||e.to-t.to),o=new _M,s=[],c=0,l=r.doc.iter(),u=0,d=r.doc.length;for(let e=0;;){let t=e==a.length?null:a[e];if(!t&&!s.length)break;let n,r;if(s.length)n=c,r=s.reduce((e,t)=>Math.min(e,t.to),t&&t.from>n?t.from:1e8);else{if(n=t.from,n>d)break;r=t.to,s.push(t),e++}for(;e<a.length;){let t=a[e];if(t.from==n&&(t.to>t.from||t.to==n))s.push(t),e++,r=Math.min(t.to,r);else{r=Math.min(t.from,r);break}}r=Math.min(r,d);let i=!1;if(s.some(e=>e.from==n&&(e.to==r||r==d))&&(i=n==r,!i&&r-n<10)){let e=n-(u+l.value.length);e>0&&(l.next(e),u=n);for(let e=n;;){if(e>=r){i=!0;break}if(!l.lineBreak&&u+l.value.length>e)break;e=u+l.value.length,u+=l.value.length,l.next()}}let f=uY(s);if(i)o.add(n,n,DI.widget({widget:new CY(f),diagnostics:s.slice()}));else{let e=s.reduce((e,t)=>t.markClass?e+` `+t.markClass:e,``);o.add(n,r,DI.mark({class:`cm-lintRange cm-lintRange-`+f+e,diagnostics:s.slice(),inclusiveEnd:s.some(e=>e.to>r)}))}if(c=r,c==d)break;for(let e=0;e<s.length;e++)s[e].to<=c&&s.splice(e--,1)}let f=o.finish();return new e(f,n,$J(f))}},pY=oM.define(),mY=oM.define(),hY=oM.define(),gY=Uj.define({create(){return new fY(DI.none,null,null)},update(e,t){if(t.docChanged&&e.diagnostics.size){let n=e.diagnostics.map(t.changes),r=null,i=e.panel;if(e.selected){let i=t.changes.mapPos(e.selected.from,1);r=$J(n,e.selected.diagnostic,i)||$J(n,null,i)}!n.size&&i&&t.state.facet(SY).autoPanel&&(i=null),e=new fY(n,i,r)}for(let n of t.effects)if(n.is(pY)){let r=t.state.facet(SY).autoPanel?n.value.length?TY.open:null:e.panel;e=fY.init(n.value,r,t.state)}else n.is(mY)?e=new fY(e.diagnostics,n.value?TY.open:null,e.selected):n.is(hY)&&(e=new fY(e.diagnostics,e.panel,n.value));return e},provide:e=>[Cz.from(e,e=>e.panel),X.decorations.from(e,e=>e.diagnostics)]}),_Y=DI.mark({class:`cm-lintRange cm-lintRange-active`}),vY=e=>{let t=e.state.field(gY,!1);(!t||!t.panel)&&e.dispatch({effects:tY(e.state,[mY.of(!0)])});let n=WF(e,TY.open);return n&&n.dom.querySelector(`.cm-panel-lint ul`).focus(),!0},yY=e=>{let t=e.state.field(gY,!1);return!t||!t.panel?!1:(e.dispatch({effects:mY.of(!1)}),!0)},bY=e=>{let t=e.state.field(gY,!1);if(!t)return!1;let n=e.state.selection.main,r=t.diagnostics.iter(n.to+1);return!r.value&&(r=t.diagnostics.iter(0),!r.value||r.from==n.from&&r.to==n.to)?!1:(e.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},xY=[{key:`Mod-Shift-m`,run:vY,preventDefault:!0},{key:`F8`,run:bY}],SY=J.define({combine(e){return{sources:e.map(e=>e.source).filter(e=>e!=null),...hj(e.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:iY,tooltipFilter:iY,needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t,hideOn:(e,t)=>e?t?(n,r,i)=>e(n,r,i)||t(n,r,i):e:t,autoPanel:(e,t)=>e||t})}}}),CY=class extends TI{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return LM(`span`,{class:`cm-lintPoint cm-lintPoint-`+this.sev})}},wY=class{constructor(e,t){this.diagnostic=t,this.id=`item_`+Math.floor(Math.random()*4294967295).toString(16),this.dom=oY(e,t,!0),this.dom.id=this.id,this.dom.setAttribute(`role`,`option`)}},TY=class e{constructor(e){this.view=e,this.items=[];let t=t=>{if(t.keyCode==27)yY(this.view),this.view.focus();else if(t.keyCode==38||t.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(t.keyCode==40||t.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(t.keyCode==36)this.moveSelection(0);else if(t.keyCode==35)this.moveSelection(this.items.length-1);else if(t.keyCode==13)this.view.focus();else if(t.keyCode>=65&&t.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:n}=this.items[this.selectedIndex],r=aY(n.actions);for(let i=0;i<r.length;i++)if(r[i].toUpperCase().charCodeAt(0)==t.keyCode){let t=$J(this.view.state.field(gY).diagnostics,n);t&&n.actions[i].apply(e,t.from,t.to)}}else return;t.preventDefault()},n=e=>{for(let t=0;t<this.items.length;t++)this.items[t].dom.contains(e.target)&&this.moveSelection(t)};this.list=LM(`ul`,{tabIndex:0,role:`listbox`,"aria-label":this.view.state.phrase(`Diagnostics`),onkeydown:t,onclick:n}),this.dom=LM(`div`,{class:`cm-panel-lint`},this.list,LM(`button`,{type:`button`,name:`close`,"aria-label":this.view.state.phrase(`close`),onclick:()=>yY(this.view)},`×`)),this.update()}get selectedIndex(){let e=this.view.state.field(gY).selected;if(!e)return-1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return-1}update(){let{diagnostics:e,selected:t}=this.view.state.field(gY),n=0,r=!1,i=null,a=new Set;for(e.between(0,this.view.state.doc.length,(e,o,{spec:s})=>{for(let e of s.diagnostics){if(a.has(e))continue;a.add(e);let o=-1,s;for(let t=n;t<this.items.length;t++)if(this.items[t].diagnostic==e){o=t;break}o<0?(s=new wY(this.view,e),this.items.splice(n,0,s),r=!0):(s=this.items[o],o>n&&(this.items.splice(n,o-n),r=!0)),t&&s.diagnostic==t.diagnostic?s.dom.hasAttribute(`aria-selected`)||(s.dom.setAttribute(`aria-selected`,`true`),i=s):s.dom.hasAttribute(`aria-selected`)&&s.dom.removeAttribute(`aria-selected`),n++}});n<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)r=!0,this.items.pop();this.items.length==0&&(this.items.push(new wY(this.view,{from:-1,to:-1,severity:`info`,message:this.view.state.phrase(`No diagnostics`)})),r=!0),i?(this.list.setAttribute(`aria-activedescendant`,i.id),this.view.requestMeasure({key:this,read:()=>({sel:i.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{let n=t.height/this.list.offsetHeight;e.top<t.top?this.list.scrollTop-=(t.top-e.top)/n:e.bottom>t.bottom&&(this.list.scrollTop+=(e.bottom-t.bottom)/n)}})):this.selectedIndex<0&&this.list.removeAttribute(`aria-activedescendant`),r&&this.sync()}sync(){let e=this.list.firstChild;function t(){let t=e;e=t.nextSibling,t.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=$J(this.view.state.field(gY).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:hY.of(t)})}static open(t){return new e(t)}},EY=X.baseTheme({".cm-diagnostic":{padding:`3px 6px 3px 8px`,marginLeft:`-1px`,display:`block`,whiteSpace:`pre-wrap`},".cm-diagnostic-error":{borderLeft:`5px solid #d11`},".cm-diagnostic-warning":{borderLeft:`5px solid orange`},".cm-diagnostic-info":{borderLeft:`5px solid #999`},".cm-diagnostic-hint":{borderLeft:`5px solid #66d`},".cm-diagnosticAction":{font:`inherit`,border:`none`,padding:`2px 4px`,backgroundColor:`#444`,color:`white`,borderRadius:`3px`,marginLeft:`8px`,cursor:`pointer`},".cm-diagnosticSource":{fontSize:`70%`,opacity:.7},".cm-lintRange":{backgroundPosition:`left bottom`,backgroundRepeat:`repeat-x`,paddingBottom:`0.7px`},".cm-lintRange-error":{backgroundImage:cY(`#d11`)},".cm-lintRange-warning":{backgroundImage:cY(`orange`)},".cm-lintRange-info":{backgroundImage:cY(`#999`)},".cm-lintRange-hint":{backgroundImage:cY(`#66d`)},".cm-lintRange-active":{backgroundColor:`#ffdd9980`},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:`relative`,"&:after":{content:`""`,position:`absolute`,bottom:0,left:`-2px`,borderLeft:`3px solid transparent`,borderRight:`3px solid transparent`,borderBottom:`4px solid #d11`}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:`orange`}},".cm-lintPoint-info":{"&:after":{borderBottomColor:`#999`}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:`#66d`}},".cm-panel.cm-panel-lint":{position:`relative`,"& ul":{maxHeight:`100px`,overflowY:`auto`,"& [aria-selected]":{backgroundColor:`#ddd`,"& u":{textDecoration:`underline`}},"&:focus [aria-selected]":{background_fallback:`#bdf`,backgroundColor:`Highlight`,color_fallback:`white`,color:`HighlightText`},"& u":{textDecoration:`none`},padding:0,margin:0},"& [name=close]":{position:`absolute`,top:`0`,right:`2px`,background:`inherit`,border:`none`,font:`inherit`,padding:0,margin:0}}}),DY=[gY,X.decorations.compute([gY],e=>{let{selected:t,panel:n}=e.field(gY);return!t||!n||t.from==t.to?DI.none:DI.set([_Y.range(t.from,t.to)])}),HF(nY,{hideOn:eY}),EY]})),kY,AY=o((()=>{Vz(),xM(),mK(),Oq(),QJ(),VH(),OY(),kY=function(e){e===void 0&&(e={});var{crosshairCursor:t=!1}=e,n=[];e.closeBracketsKeymap!==!1&&(n=n.concat(YJ)),e.defaultKeymap!==!1&&(n=n.concat(fK)),e.searchKeymap!==!1&&(n=n.concat(Sq)),e.historyKeymap!==!1&&(n=n.concat(QW)),e.foldKeymap!==!1&&(n=n.concat(mH)),e.completionKeymap!==!1&&(n=n.concat(XJ)),e.lintKeymap!==!1&&(n=n.concat(xY));var r=[];return e.lineNumbers!==!1&&r.push(QF()),e.highlightActiveLineGutter!==!1&&r.push(eI()),e.highlightSpecialChars!==!1&&r.push(DF()),e.history!==!1&&r.push(YU()),e.foldGutter!==!1&&r.push(OV()),e.drawSelection!==!1&&r.push(bF()),e.dropCursor!==!1&&r.push(CF()),e.allowMultipleSelections!==!1&&r.push(fM.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&r.push(mV()),e.syntaxHighlighting!==!1&&r.push(AV(DH,{fallback:!0})),e.bracketMatching!==!1&&r.push(MV()),e.closeBrackets!==!1&&r.push(Xq()),e.autocompletion!==!1&&r.push(lJ()),e.rectangularSelection!==!1&&r.push(IF()),t!==!1&&r.push(LF()),e.highlightActiveLine!==!1&&r.push(AF()),e.highlightSelectionMatches!==!1&&r.push(vK()),e.tabSize&&typeof e.tabSize==`number`&&r.push(eH.of(` `.repeat(e.tabSize))),r.concat([kR.of(n.flat())]).filter(Boolean)}})),jY,MY,NY,PY,FY,IY,LY,RY,zY,BY,VY,HY,UY,WY,GY,KY,qY,JY,YY,XY=o((()=>{Vz(),VH(),ZB(),jY=`#e5c07b`,MY=`#e06c75`,NY=`#56b6c2`,PY=`#ffffff`,FY=`#abb2bf`,IY=`#7d8799`,LY=`#61afef`,RY=`#98c379`,zY=`#d19a66`,BY=`#c678dd`,VY=`#21252b`,HY=`#2c313a`,UY=`#282c34`,WY=`#353a42`,GY=`#3E4451`,KY=`#528bff`,qY=X.theme({"&":{color:FY,backgroundColor:UY},".cm-content":{caretColor:KY},".cm-cursor, .cm-dropCursor":{borderLeftColor:KY},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:GY},".cm-panels":{backgroundColor:VY,color:FY},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:`#72a1ff59`,outline:`1px solid #457dff`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#6199ff2f`},".cm-activeLine":{backgroundColor:`#6699ff0b`},".cm-selectionMatch":{backgroundColor:`#aafe661a`},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:`#bad0f847`},".cm-gutters":{backgroundColor:UY,color:IY,border:`none`},".cm-activeLineGutter":{backgroundColor:HY},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:`#ddd`},".cm-tooltip":{border:`none`,backgroundColor:WY},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:WY,borderBottomColor:WY},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:HY,color:FY}}},{dark:!0}),JY=SH.define([{tag:Q.keyword,color:BY},{tag:[Q.name,Q.deleted,Q.character,Q.propertyName,Q.macroName],color:MY},{tag:[Q.function(Q.variableName),Q.labelName],color:LY},{tag:[Q.color,Q.constant(Q.name),Q.standard(Q.name)],color:zY},{tag:[Q.definition(Q.name),Q.separator],color:FY},{tag:[Q.typeName,Q.className,Q.number,Q.changed,Q.annotation,Q.modifier,Q.self,Q.namespace],color:jY},{tag:[Q.operator,Q.operatorKeyword,Q.url,Q.escape,Q.regexp,Q.link,Q.special(Q.string)],color:NY},{tag:[Q.meta,Q.comment],color:IY},{tag:Q.strong,fontWeight:`bold`},{tag:Q.emphasis,fontStyle:`italic`},{tag:Q.strikethrough,textDecoration:`line-through`},{tag:Q.link,color:IY,textDecoration:`underline`},{tag:Q.heading,fontWeight:`bold`,color:MY},{tag:[Q.atom,Q.bool,Q.special(Q.variableName)],color:zY},{tag:[Q.processingInstruction,Q.string,Q.inserted],color:RY},{tag:Q.invalid,color:PY}]),YY=[qY,AV(JY)]})),ZY,QY=o((()=>{Vz(),ZY=X.theme({"&":{backgroundColor:`#fff`}},{dark:!1})})),$Y,eX=o((()=>{mK(),AY(),Vz(),XY(),xM(),QY(),XY(),QY(),$Y=function(e){e===void 0&&(e={});var{indentWithTab:t=!0,editable:n=!0,readOnly:r=!1,theme:i=`light`,placeholder:a=``,basicSetup:o=!0}=e,s=[];switch(t&&s.unshift(kR.of([pK])),o&&(typeof o==`boolean`?s.unshift(kY()):s.unshift(kY(o))),a&&s.unshift(jF(a)),i){case`light`:s.push(ZY);break;case`dark`:s.push(YY);break;case`none`:break;default:s.push(i);break}return n===!1&&s.push(X.editable.of(!1)),r&&s.push(fM.readOnly.of(!0)),[...s]}})),tX,nX=o((()=>{tX=e=>({line:e.state.doc.lineAt(e.state.selection.main.from),lineCount:e.state.doc.lines,lineBreak:e.state.lineBreak,length:e.state.doc.length,readOnly:e.state.readOnly,tabSize:e.state.tabSize,selection:e.state.selection,selectionAsSingle:e.state.selection.asSingle().main,ranges:e.state.selection.ranges,selectionCode:e.state.sliceDoc(e.state.selection.main.from,e.state.selection.main.to),selections:e.state.selection.ranges.map(t=>e.state.sliceDoc(t.from,t.to)),selectedText:e.state.selection.ranges.some(e=>!e.empty)})})),rX,iX,aX,oX,sX=o((()=>{rX=class{constructor(e,t){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=t,this.timeoutMS=t,this.callbacks.push(e)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var e=this.callbacks.slice();this.callbacks.length=0,e.forEach(e=>{try{e()}catch(e){console.error(`TimeoutLatch callback error:`,e)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}},iX=class{constructor(){this.interval=null,this.latches=new Set}add(e){this.latches.add(e),this.start()}remove(e){this.latches.delete(e),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(e=>{e.tick(),e.isDone&&this.remove(e)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}},aX=null,oX=()=>typeof window>`u`?new iX:(aX||(aX=new iX),aX)}));function cX(e){var{value:t,selection:n,onChange:r,onStatistics:i,onCreateEditor:a,onUpdate:o,extensions:s=fX,autoFocus:c,theme:l=`light`,height:u=null,minHeight:d=null,maxHeight:f=null,width:p=null,minWidth:m=null,maxWidth:h=null,placeholder:g=``,editable:_=!0,readOnly:v=!1,indentWithTab:y=!0,basicSetup:b=!0,root:x,initialState:S}=e,[C,w]=(0,lX.useState)(),[T,E]=(0,lX.useState)(),[D,O]=(0,lX.useState)(),k=(0,lX.useState)(()=>({current:null}))[0],A=(0,lX.useState)(()=>({current:null}))[0],ee=X.theme({"&":{height:u,minHeight:d,maxHeight:f,width:p,minWidth:m,maxWidth:h},"& .cm-scroller":{height:`100% !important`}}),j=[X.updateListener.of(e=>{e.docChanged&&typeof r==`function`&&!e.transactions.some(e=>e.annotation(uX))&&(k.current?k.current.reset():(k.current=new rX(()=>{if(A.current){var e=A.current;A.current=null,e()}k.current=null},dX),oX().add(k.current)),r(e.state.doc.toString(),e)),i&&i(tX(e))}),ee,...$Y({theme:l,editable:_,readOnly:v,placeholder:g,indentWithTab:y,basicSetup:b})];return o&&typeof o==`function`&&j.push(X.updateListener.of(o)),j=j.concat(s),(0,lX.useLayoutEffect)(()=>{if(C&&!D){var e={doc:t,selection:n,extensions:j},r=S?fM.fromJSON(S.json,e,S.fields):fM.create(e);if(O(r),!T){var i=new X({state:r,parent:C,root:x});E(i),a&&a(i,r)}}return()=>{T&&(O(void 0),E(void 0))}},[C,D]),(0,lX.useEffect)(()=>{e.container&&w(e.container)},[e.container]),(0,lX.useEffect)(()=>()=>{T&&(T.destroy(),E(void 0)),k.current&&(k.current.cancel(),k.current=null)},[T]),(0,lX.useEffect)(()=>{c&&T&&T.focus()},[c,T]),(0,lX.useEffect)(()=>{T&&T.dispatch({effects:oM.reconfigure.of(j)})},[l,s,u,d,f,p,m,h,g,_,v,y,b,r,o]),(0,lX.useEffect)(()=>{if(t!==void 0){var e=T?T.state.doc.toString():``;if(T&&t!==e){var n=k.current&&!k.current.isDone,r=()=>{T&&t!==T.state.doc.toString()&&T.dispatch({changes:{from:0,to:T.state.doc.toString().length,insert:t||``},annotations:[uX.of(!0)]})};n?A.current=r:r()}}},[t,T]),{state:D,setState:O,view:T,setView:E,container:C,setContainer:w}}var lX,uX,dX,fX,pX=o((()=>{lX=u(f()),xM(),Vz(),eX(),nX(),sX(),uX=rM.define(),dX=200,fX=[]})),mX,hX,gX,_X,vX=o((()=>{BU(),HU(),mX=u(f()),pX(),hX=Qo(),Vz(),xM(),AY(),pX(),eX(),nX(),gX=[`className`,`value`,`selection`,`extensions`,`onChange`,`onStatistics`,`onCreateEditor`,`onUpdate`,`autoFocus`,`theme`,`height`,`minHeight`,`maxHeight`,`width`,`minWidth`,`maxWidth`,`basicSetup`,`placeholder`,`indentWithTab`,`editable`,`readOnly`,`root`,`initialState`],_X=(0,mX.forwardRef)((e,t)=>{var{className:n,value:r=``,selection:i,extensions:a=[],onChange:o,onStatistics:s,onCreateEditor:c,onUpdate:l,autoFocus:u,theme:d=`light`,height:f,minHeight:p,maxHeight:m,width:h,minWidth:g,maxWidth:_,basicSetup:v,placeholder:y,indentWithTab:b,editable:x,readOnly:S,root:C,initialState:w}=e,T=VU(e,gX),E=(0,mX.useRef)(null),{state:D,view:O,container:k,setContainer:A}=cX({root:C,value:r,autoFocus:u,theme:d,height:f,minHeight:p,maxHeight:m,width:h,minWidth:g,maxWidth:_,basicSetup:v,placeholder:y,indentWithTab:b,editable:x,readOnly:S,selection:i,onChange:o,onStatistics:s,onCreateEditor:c,onUpdate:l,extensions:a,initialState:w});(0,mX.useImperativeHandle)(t,()=>({editor:E.current,state:D,view:O}),[E,k,D,O]);var ee=(0,mX.useCallback)(e=>{E.current=e,A(e)},[A]);if(typeof r!=`string`)throw Error(`value must be typeof string but got `+typeof r);return(0,hX.jsx)(`div`,zU({ref:ee,className:(typeof d==`string`?`cm-theme-`+d:`cm-theme`)+(n?` `+n:``)},T))}),_X.displayName=`CodeMirror`}));function yX(e,t=Uint16Array){if(typeof e!=`string`)return e;let n=null;for(let r=0,i=0;r<e.length;){let a=0;for(;;){let t=e.charCodeAt(r++),n=!1;if(t==126){a=65535;break}t>=92&&t--,t>=34&&t--;let i=t-32;if(i>=46&&(i-=46,n=!0),a+=i,n)break;a*=46}n?n[i++]=a:n=new t(a)}return n}function bX(e,t,n,r,i,a){let o=0,s=1<<r,{dialect:c}=n.p.parser;scan:for(;(s&e[o])!=0;){let n=e[o+1];for(let r=o+3;r<n;r+=2)if((e[r+1]&s)>0){let n=e[r];if(c.allows(n)&&(t.token.value==-1||t.token.value==n||SX(n,t.token.value,i,a))){t.acceptToken(n);break}}let r=t.next,l=0,u=e[o+2];if(t.next<0&&u>l&&e[n+u*3-3]==65535){o=e[n+u*3-1];continue scan}for(;l<u;){let i=l+u>>1,a=n+i+(i<<1),s=e[a],c=e[a+1]||65536;if(r<s)u=i;else if(r>=c)l=i+1;else{o=e[a+2],t.advance();continue scan}}break}}function xX(e,t,n){for(let r=t,i;(i=e[r])!=65535;r++)if(i==n)return r-t;return-1}function SX(e,t,n,r){let i=xX(n,r,t);return i<0||xX(n,r,e)<i}function CX(e,t,n){let r=e.cursor(cB.IncludeAnonymous);for(r.moveTo(t);;)if(!(n<0?r.childBefore(t):r.childAfter(t)))for(;;){if((n<0?r.to<t:r.from>t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}function wX(e,t){for(let n=0;n<t.length;n++){let r=t[n];if(r.pos==e.pos&&r.sameState(e)){t[n].score<e.score&&(t[n]=e);return}}t.push(e)}function TX(e,t){return e[t]|e[t+1]<<16}function EX(e){let t=null;for(let n of e){let e=n.p.stoppedAt;(n.pos==n.p.stream.end||e!=null&&n.pos>e)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.score<n.score)&&(t=n)}return t}function DX(e){if(e.external){let t=+!!e.extend;return(n,r)=>e.external(n,r)<<1|t}return e.get}var OX,kX,AX,jX,MX,NX,PX,FX,IX,LX,RX,zX,BX,VX,HX,UX,WX,GX,KX,qX=o((()=>{SB(),OX=class e{constructor(e,t,n,r,i,a,o,s,c,l=0,u){this.p=e,this.stack=t,this.state=n,this.reducePos=r,this.pos=i,this.score=a,this.buffer=o,this.bufferBase=s,this.curContext=c,this.lookAhead=l,this.parent=u}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?`!`+this.score:``}`}static start(t,n,r=0){let i=t.parser.context;return new e(t,[],n,r,r,0,[],0,i?new kX(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){let t=e>>19,n=e&65535,{parser:r}=this.p,i=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),a=r.dynamicPrecedence(n);if(a&&(this.score+=a),t==0){this.pushState(r.getGoto(this.state,n,!0),this.reducePos),n<r.minRepeatTerm&&this.storeNode(n,this.reducePos,this.reducePos,i?8:4,!0),this.reduceContext(n,this.reducePos);return}let o=this.stack.length-(t-1)*3-(e&262144?6:0),s=o?this.stack[o-2]:this.p.ranges[0].from,c=this.reducePos-s;c>=2e3&&!this.p.parser.nodeSet.types[n]?.isAnonymous&&(s==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=s,this.p.lastBigReductionSize=c));let l=o?this.stack[o-1]:0,u=this.bufferBase+this.buffer.length-l;if(n<r.minRepeatTerm||e&131072){let e=r.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(n,s,e,u+4,!0)}if(e&262144)this.state=this.stack[o];else{let e=this.stack[o-3];this.state=r.getGoto(e,n,!0)}for(;this.stack.length>o;)this.stack.pop();this.reduceContext(n,s)}storeNode(e,t,n,r=4,i=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let e=this,r=this.buffer.length;if(r==0&&e.parent&&(r=e.bufferBase-e.parent.bufferBase,e=e.parent),r>0&&e.buffer[r-4]==0&&e.buffer[r-1]>-1){if(t==n)return;if(e.buffer[r-2]>=t){e.buffer[r-2]=n;return}}}if(!i||this.pos==n)this.buffer.push(e,t,n,r);else{let i=this.buffer.length;if(i>0&&(this.buffer[i-4]!=0||this.buffer[i-1]<0)){let e=!1;for(let t=i;t>0&&this.buffer[t-2]>n;t-=4)if(this.buffer[t-1]>=0){e=!0;break}if(e)for(;i>0&&this.buffer[i-2]>n;)this.buffer[i]=this.buffer[i-4],this.buffer[i+1]=this.buffer[i-3],this.buffer[i+2]=this.buffer[i-2],this.buffer[i+3]=this.buffer[i-1],i-=4,r>4&&(r-=4)}this.buffer[i]=e,this.buffer[i+1]=t,this.buffer[i+2]=n,this.buffer[i+3]=r}}shift(e,t,n,r){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=r,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,r,4);else{let i=e,{parser:a}=this.p;(r>this.pos||t<=a.maxNode)&&(this.pos=r,a.stateFlag(i,1)||(this.reducePos=r)),this.pushState(i,n),this.shiftContext(t,n),t<=a.maxNode&&this.buffer.push(t,n,r,4)}}apply(e,t,n,r){e&65536?this.reduce(e):this.shift(e,t,n,r)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(t,r),this.buffer.push(n,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let t=this,n=t.buffer.length;for(;n>0&&t.buffer[n-2]>t.reducePos;)n-=4;let r=t.buffer.slice(n),i=t.bufferBase+n;for(;t&&i==t.bufferBase;)t=t.parent;return new e(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,t)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new AX(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(n==0)return!1;if(!(n&65536))return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let n=[];for(let r=0,i;r<t.length;r+=2)(i=t[r+1])!=this.state&&this.p.parser.hasAction(i,e)&&n.push(t[r],i);if(this.stack.length<120)for(let e=0;n.length<8&&e<t.length;e+=2){let r=t[e+1];n.some((e,t)=>t&1&&e==r)||n.push(t[e],r)}t=n}let n=[];for(let e=0;e<t.length&&n.length<4;e+=2){let r=t[e+1];if(r==this.state)continue;let i=this.split();i.pushState(r,this.pos),i.storeNode(0,i.pos,i.pos,4,!0),i.shiftContext(t[e],this.pos),i.reducePos=this.pos,i.score-=200,n.push(i)}return n}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if(!(t&65536))return!1;if(!e.validAction(this.state,t)){let n=t>>19,r=t&65535,i=this.stack.length-n*3;if(i<0||e.getGoto(this.stack[i],r,!1)<0){let e=this.findForcedReduction();if(e==null)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(r,i)=>{if(!t.includes(r))return t.push(r),e.allActions(r,t=>{if(!(t&393216))if(t&65536){let n=(t>>19)-i;if(n>1){let r=t&65535,i=this.stack.length-n*3;if(i>=0&&e.getGoto(this.stack[i],r,!1)>=0)return n<<19|65536|r}}else{let e=n(t,i+1);if(e!=null)return e}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new kX(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}},kX=class{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}},AX=class{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,n=e>>19;n==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(n-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}},jX=class e{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(t,n=t.bufferBase+t.buffer.length){return new e(t,n,n-t.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new e(this.stack,this.pos,this.index)}},MX=class{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}},NX=new MX,PX=class{constructor(e,t){this.input=e,this.ranges=t,this.chunk=``,this.chunkOff=0,this.chunk2=``,this.chunk2Pos=0,this.next=-1,this.token=NX,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,r=this.rangeIndex,i=this.pos+e;for(;i<n.from;){if(!r)return null;let e=this.ranges[--r];i-=n.from-e.to,n=e}for(;t<0?i>n.to:i>=n.to;){if(r==this.ranges.length-1)return null;let e=this.ranges[++r];i+=e.from-n.to,n=e}return i}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,r;if(t>=0&&t<this.chunk.length)n=this.pos+e,r=this.chunk.charCodeAt(t);else{let t=this.resolveOffset(e,1);if(t==null)return-1;if(n=t,n>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(n-this.chunk2Pos);else{let e=this.rangeIndex,t=this.range;for(;t.to<=n;)t=this.ranges[++e];this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>t.to&&(this.chunk2=this.chunk2.slice(0,t.to-n)),r=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),r}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(n==null||n<this.token.start)throw RangeError(`Token end out of bounds`);this.token.value=e,this.token.end=n}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk=``,this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=NX,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk=``,this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n=``;for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(n+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return n}},FX=class{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;bX(this.data,e,t,this.id,n.data,n.tokenPrecTable)}},FX.prototype.contextual=FX.prototype.fallback=FX.prototype.extend=!1,IX=class{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data=typeof e==`string`?yX(e):e}token(e,t){let n=e.pos,r=0;for(;;){let n=e.next<0,i=e.resolveOffset(1,1);if(bX(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(n||r++,i==null)break;e.reset(i,e.token)}r&&(e.reset(n,e.token),e.acceptToken(this.elseToken,r))}},IX.prototype.contextual=FX.prototype.fallback=FX.prototype.extend=!1,LX=class{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}},RX=typeof process<`u`&&/\bparse\b/.test({}.LOG),zX=null,BX=class{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?CX(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?CX(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let n=this.trees[t],r=this.index[t];if(r==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let i=n.children[r],a=this.start[t]+n.positions[r];if(a>e)return this.nextStart=a,null;if(i instanceof lB){if(a==e){if(a<this.safeFrom)return null;let e=a+i.length;if(e<=this.safeTo){let t=i.prop(tB.lookAhead);if(!t||e+t<this.fragment.to)return i}}this.index[t]++,a+i.length>=Math.max(this.safeFrom,e)&&(this.trees.push(i),this.start.push(a),this.index.push(0))}else this.index[t]++,this.nextStart=a+i.length}}},VX=class{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(e=>new MX)}getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:i}=r,a=r.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,s=0;for(let r=0;r<i.length;r++){if(!(1<<r&a))continue;let c=i[r],l=this.tokens[r];if(!(n&&!c.fallback)&&((c.contextual||l.start!=e.pos||l.mask!=a||l.context!=o)&&(this.updateCachedToken(l,c,e),l.mask=a,l.context=o),l.lookAhead>l.end+25&&(s=Math.max(l.lookAhead,s)),l.value!=0)){let r=t;if(l.extended>-1&&(t=this.addActions(e,l.extended,l.end,t)),t=this.addActions(e,l.value,l.end,t),!c.extend&&(n=l,t>r))break}}for(;this.actions.length>t;)this.actions.pop();return s&&e.setLookAhead(s),!n&&e.pos==this.stream.end&&(n=new MX,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new MX,{pos:n,p:r}=e;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,n){let r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){let{parser:t}=n.p;for(let r=0;r<t.specialized.length;r++)if(t.specialized[r]==e.value){let i=t.specializers[r](this.stream.read(e.start,e.end),n);if(i>=0&&n.p.parser.dialect.allows(i>>1)){i&1?e.extended=i>>1:e.value=i>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let t=0;t<r;t+=3)if(this.actions[t]==e)return r;return this.actions[r++]=e,this.actions[r++]=t,this.actions[r++]=n,r}addActions(e,t,n,r){let{state:i}=e,{parser:a}=e.p,{data:o}=a;for(let e=0;e<2;e++)for(let s=a.stateSlot(i,e?2:1);;s+=3){if(o[s]==65535)if(o[s+1]==1)s=TX(o,s+2);else{r==0&&o[s+1]==2&&(r=this.putAction(TX(o,s+2),t,n,r));break}o[s]==t&&(r=this.putAction(TX(o,s+1),t,n,r))}return r}},HX=class{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new PX(t,r),this.tokens=new VX(e,this.stream),this.topTerm=e.top[1];let{from:i}=r[0];this.stacks=[OX.start(this,e.top[0],i)],this.fragments=n.length&&this.stream.end-i>e.bufferLength*4?new BX(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,n=this.stacks=[],r,i;if(this.bigReductionCount>300&&e.length==1){let[t]=e;for(;t.forceReduce()&&t.stack.length&&t.stack[t.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;a<e.length;a++){let o=e[a];for(;;){if(this.tokens.mainToken=null,o.pos>t)n.push(o);else if(this.advanceStack(o,n,e))continue;else{r||(r=[],i=[]),r.push(o);let e=this.tokens.getMainToken(o);i.push(e.value,e.end)}break}}if(!n.length){let e=r&&EX(r);if(e)return RX&&console.log(`Finish with `+this.stackID(e)),this.stackToTree(e);if(this.parser.strict)throw RX&&r&&console.log(`Stuck with token `+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):`none`)),SyntaxError(`No parse at `+t);this.recovering||(this.recovering=5)}if(this.recovering&&r){let e=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,i,n);if(e)return RX&&console.log(`Force-finish `+this.stackID(e)),this.stackToTree(e.forceAll())}if(this.recovering){let e=this.recovering==1?1:this.recovering*3;if(n.length>e)for(n.sort((e,t)=>t.score-e.score);n.length>e;)n.pop();n.some(e=>e.reducePos>t)&&this.recovering--}else if(n.length>1){outer:for(let e=0;e<n.length-1;e++){let t=n[e];for(let r=e+1;r<n.length;r++){let i=n[r];if(t.sameState(i)||t.buffer.length>500&&i.buffer.length>500)if((t.score-i.score||t.buffer.length-i.buffer.length)>0)n.splice(r--,1);else{n.splice(e--,1);continue outer}}}n.length>12&&n.splice(12,n.length-12)}this.minStackPos=n[0].pos;for(let e=1;e<n.length;e++)n[e].pos<this.minStackPos&&(this.minStackPos=n[e].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw RangeError(`Can't move stoppedAt forward`);this.stoppedAt=e}advanceStack(e,t,n){let r=e.pos,{parser:i}=this,a=RX?this.stackID(e)+` -> `:``;if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.curContext&&e.curContext.tracker.strict,n=t?e.curContext.hash:0;for(let o=this.fragments.nodeAt(r);o;){let r=this.parser.nodeSet.types[o.type.id]==o.type?i.getGoto(e.state,o.type.id):-1;if(r>-1&&o.length&&(!t||(o.prop(tB.contextHash)||0)==n))return e.useNode(o,r),RX&&console.log(a+this.stackID(e)+` (via reuse of ${i.getName(o.type.id)})`),!0;if(!(o instanceof lB)||o.children.length==0||o.positions[0]>0)break;let s=o.children[0];if(s instanceof lB&&o.positions[0]==0)o=s;else break}}let o=i.stateSlot(e.state,4);if(o>0)return e.reduce(o),RX&&console.log(a+this.stackID(e)+` (via always-reduce ${i.getName(o&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let s=this.tokens.getActions(e);for(let o=0;o<s.length;){let c=s[o++],l=s[o++],u=s[o++],d=o==s.length||!n,f=d?e:e.split(),p=this.tokens.mainToken;if(f.apply(c,l,p?p.start:f.pos,u),RX&&console.log(a+this.stackID(f)+` (via ${c&65536?`reduce of ${i.getName(c&65535)}`:`shift`} for ${i.getName(l)} @ ${r}${f==e?``:`, split`})`),d)return!0;f.pos>r?t.push(f):n.push(f)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return wX(e,t),!0}}runRecovery(e,t,n){let r=null,i=!1;for(let a=0;a<e.length;a++){let o=e[a],s=t[a<<1],c=t[(a<<1)+1],l=RX?this.stackID(o)+` -> `:``;if(o.deadEnd&&(i||(i=!0,o.restart(),RX&&console.log(l+this.stackID(o)+` (restarted)`),this.advanceFully(o,n))))continue;let u=o.split(),d=l;for(let e=0;e<10&&u.forceReduce()&&(RX&&console.log(d+this.stackID(u)+` (via force-reduce)`),!this.advanceFully(u,n));e++)RX&&(d=this.stackID(u)+` -> `);for(let e of o.recoverByInsert(s))RX&&console.log(l+this.stackID(e)+` (via recover-insert)`),this.advanceFully(e,n);this.stream.end>o.pos?(c==o.pos&&(c++,s=0),o.recoverByDelete(s,c),RX&&console.log(l+this.stackID(o)+` (via recover-delete ${this.parser.getName(s)})`),wX(o,n)):(!r||r.score<o.score)&&(r=o)}return r}stackToTree(e){return e.close(),lB.build({buffer:jX.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(zX||(zX=new WeakMap)).get(e);return t||zX.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}},UX=class{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||this.disabled[e]==0}},WX=e=>e,GX=class{constructor(e){this.start=e.start,this.shift=e.shift||WX,this.reduce=e.reduce||WX,this.reuse=e.reuse||WX,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}},KX=class e extends bB{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(` `);this.minRepeatTerm=t.length;for(let n=0;n<e.repeatNodeCount;n++)t.push(``);let n=Object.keys(e.topRules).map(t=>e.topRules[t][1]),r=[];for(let e=0;e<t.length;e++)r.push([]);function i(e,t,n){r[e].push([t,t.deserialize(String(n))])}if(e.nodeProps)for(let t of e.nodeProps){let e=t[0];typeof e==`string`&&(e=tB[e]);for(let n=1;n<t.length;){let r=t[n++];if(r>=0)i(r,e,t[n++]);else{let a=t[n+-r];for(let o=-r;o>0;o--)i(t[n++],e,a);n++}}}this.nodeSet=new aB(t.map((t,i)=>iB.define({name:i>=this.minRepeatTerm?void 0:t,id:i,props:r[i],top:n.indexOf(i)>-1,error:i==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(i)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=Qz;let a=yX(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e<this.specializerSpecs.length;e++)this.specialized[e]=this.specializerSpecs[e].term;this.specializers=this.specializerSpecs.map(DX),this.states=yX(e.states,Uint32Array),this.data=yX(e.stateData),this.goto=yX(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(e=>typeof e==`number`?new FX(a,e):e),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let r=new HX(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}getGoto(e,t,n=!1){let r=this.goto;if(t>=r[0])return-1;for(let i=r[t+1];;){let t=r[i++],a=t&1,o=r[i++];if(a&&n)return o;for(let n=i+(t>>1);i<n;i++)if(r[i]==e)return o;if(a)return-1}}hasAction(e,t){let n=this.data;for(let r=0;r<2;r++)for(let i=this.stateSlot(e,r?2:1),a;;i+=3){if((a=n[i])==65535)if(n[i+1]==1)a=n[i=TX(n,i+2)];else if(n[i+1]==2)return TX(n,i+2);else break;if(a==t||a==0)return TX(n,i+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,e=>e==t?!0:null)}allActions(e,t){let n=this.stateSlot(e,4),r=n?t(n):void 0;for(let n=this.stateSlot(e,1);r==null;n+=3){if(this.data[n]==65535)if(this.data[n+1]==1)n=TX(this.data,n+2);else break;r=t(TX(this.data,n+1))}return r}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(this.data[n]==65535)if(this.data[n+1]==1)n=TX(this.data,n+2);else break;if(!(this.data[n+2]&1)){let e=this.data[n+1];t.some((t,n)=>n&1&&t==e)||t.push(this.data[n],e)}}return t}configure(t){let n=Object.assign(Object.create(e.prototype),this);if(t.props&&(n.nodeSet=this.nodeSet.extend(...t.props)),t.top){let e=this.topRules[t.top];if(!e)throw RangeError(`Invalid top rule name ${t.top}`);n.top=e}return t.tokenizers&&(n.tokenizers=this.tokenizers.map(e=>{let n=t.tokenizers.find(t=>t.from==e);return n?n.to:e})),t.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((e,r)=>{let i=t.specializers.find(t=>t.from==e.external);if(!i)return e;let a=Object.assign(Object.assign({},e),{external:i.to});return n.specializers[r]=DX(a),a})),t.contextTracker&&(n.context=t.contextTracker),t.dialect&&(n.dialect=this.parseDialect(t.dialect)),t.strict!=null&&(n.strict=t.strict),t.wrap&&(n.wrappers=n.wrappers.concat(t.wrap)),t.bufferLength!=null&&(n.bufferLength=t.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let r of e.split(` `)){let e=t.indexOf(r);e>=0&&(n[e]=!0)}let r=null;for(let e=0;e<t.length;e++)if(!n[e])for(let n=this.dialects[t[e]],i;(i=this.data[n++])!=65535;)(r||(r=new Uint8Array(this.maxTerm+1)))[i]=1;return new UX(e,n,r)}static deserialize(t){return new e(t)}}}));function JX(e,t){for(let n=0,r=t-e.pos-1;;r--,n++){let t=e.peek(r);if(XX(t)||t==-1)return n}}function YX(e){return e==32||e==9}function XX(e){return e==10||e==13}function ZX(e){return YX(e)||XX(e)}function QX(e){return e<0||ZX(e)}function $X(e,t,n=0){return e.peek(n)==t&&e.peek(n+1)==t&&e.peek(n+2)==t&&QX(e.peek(n+3))}function eZ(e){return e>32&&e<127&&e!=34&&e!=37&&e!=44&&e!=60&&e!=62&&e!=92&&e!=94&&e!=96&&e!=123&&e!=124&&e!=125}function tZ(e){return e>=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70}function nZ(e,t){return e.next==37?(e.advance(),tZ(e.next)&&e.advance(),tZ(e.next)&&e.advance(),!0):eZ(e.next)||t&&e.next==44?(e.advance(),!0):!1}function rZ(e){if(e.advance(),e.next==60){for(e.advance();;)if(!nZ(e,!0)){e.next==62&&e.advance();break}}else for(;nZ(e,!1););}function iZ(e){for(e.advance();!QX(e.next)&&sZ(e.tag)!=`f`;)e.advance()}function aZ(e,t){let n=e.next,r=!1,i=e.pos;for(e.advance();;){let a=e.next;if(a<0)break;if(e.advance(),a==n)if(a==39)if(e.next==39)e.advance();else break;else break;else if(a==92&&n==34)e.next>=0&&e.advance();else if(XX(a)){if(t)return!1;r=!0}else if(t&&e.pos>=i+1024)return!1}return!r}function oZ(e){for(let t=[],n=e.pos+1024;;)if(e.next==91||e.next==123)t.push(e.next),e.advance();else if(e.next==39||e.next==34){if(!aZ(e,!0))return!1}else if(e.next==93||e.next==125){if(t[t.length-1]!=e.next-2)return!1;if(t.pop(),e.advance(),!t.length)return!0}else if(e.next<0||e.pos>n||XX(e.next))return!1;else e.advance()}function sZ(e){return e<33?`u`:e>125?`s`:HZ[e-33]}function cZ(e,t){let n=sZ(e);return n!=`u`&&!(t&&n==`f`)}function lZ(e,t,n,r){if(sZ(e.next)==`s`||(e.next==63||e.next==58||e.next==45)&&cZ(e.peek(1),n))e.advance();else return!1;let i=e.pos;for(;;){let a=e.next,o=0,s=r+1;for(;ZX(a);){if(XX(a)){if(t)return!1;s=0}else s++;a=e.peek(++o)}if(!(a>=0&&(a==58?cZ(e.peek(o+1),n):a==35?e.peek(o-1)!=32:cZ(a,n)))||!n&&s<=r||s==0&&!n&&($X(e,45,o)||$X(e,46,o)))break;if(t&&sZ(a)==`f`)return!1;for(let t=o;t>=0;t--)e.advance();if(t&&e.pos>i+1024)return!1}return!0}var uZ,dZ,fZ,pZ,mZ,hZ,gZ,_Z,vZ,yZ,bZ,xZ,SZ,CZ,wZ,TZ,EZ,DZ,OZ,kZ,AZ,jZ,MZ,NZ,PZ,FZ,IZ,LZ,RZ,zZ,BZ,VZ,HZ,UZ,WZ,GZ,KZ,qZ=o((()=>{qX(),ZB(),uZ=63,dZ=64,fZ=1,pZ=2,mZ=3,hZ=4,gZ=5,_Z=6,vZ=7,yZ=65,bZ=66,xZ=8,SZ=9,CZ=10,wZ=11,TZ=12,EZ=13,DZ=19,OZ=20,kZ=29,AZ=33,jZ=34,MZ=47,NZ=0,PZ=1,FZ=2,IZ=3,LZ=4,RZ=class{constructor(e,t,n){this.parent=e,this.depth=t,this.type=n,this.hash=(e?e.hash+e.hash<<8:0)+t+(t<<4)+n}},RZ.top=new RZ(null,-1,NZ),zZ=new GX({start:RZ.top,reduce(e,t){return e.type==IZ&&(t==OZ||t==jZ)?e.parent:e},shift(e,t,n,r){if(t==mZ)return new RZ(e,JX(r,r.pos),PZ);if(t==yZ||t==gZ)return new RZ(e,JX(r,r.pos),FZ);if(t==uZ)return e.parent;if(t==DZ||t==AZ)return new RZ(e,0,IZ);if(t==EZ&&e.type==LZ)return e.parent;if(t==MZ){let t=/[1-9]/.exec(r.read(r.pos,n.pos));if(t)return new RZ(e,e.depth+ +t[0],LZ)}return e},hash(e){return e.hash}}),BZ=new LX((e,t)=>{if(e.next==-1&&t.canShift(dZ))return e.acceptToken(dZ);let n=e.peek(-1);if((XX(n)||n<0)&&t.context.type!=IZ){if($X(e,45))if(t.canShift(uZ))e.acceptToken(uZ);else return e.acceptToken(fZ,3);if($X(e,46))if(t.canShift(uZ))e.acceptToken(uZ);else return e.acceptToken(pZ,3);let n=0;for(;e.next==32;)n++,e.advance();(n<t.context.depth||n==t.context.depth&&t.context.type==PZ&&(e.next!=45||!QX(e.peek(1))))&&e.next!=-1&&!XX(e.next)&&e.next!=35&&e.acceptToken(uZ,-n)}},{contextual:!0}),VZ=new LX((e,t)=>{if(t.context.type==IZ){e.next==63&&(e.advance(),QX(e.next)&&e.acceptToken(vZ));return}if(e.next==45)e.advance(),QX(e.next)&&e.acceptToken(t.context.type==PZ&&t.context.depth==JX(e,e.pos-1)?hZ:mZ);else if(e.next==63)e.advance(),QX(e.next)&&e.acceptToken(t.context.type==FZ&&t.context.depth==JX(e,e.pos-1)?_Z:gZ);else{let n=e.pos;for(;;)if(YX(e.next)){if(e.pos==n)return;e.advance()}else if(e.next==33)rZ(e);else if(e.next==38)iZ(e);else if(e.next==42){iZ(e);break}else if(e.next==39||e.next==34){if(aZ(e,!0))break;return}else if(e.next==91||e.next==123){if(!oZ(e))return;break}else{lZ(e,!0,!1,0);break}for(;YX(e.next);)e.advance();if(e.next==58){if(e.pos==n&&t.canShift(kZ))return;QX(e.peek(1))&&e.acceptTokenTo(t.context.type==FZ&&t.context.depth==JX(e,n)?bZ:yZ,n)}}},{contextual:!0}),HZ=`iiisiiissisfissssssssssssisssiiissssssssssssssssssssssssssfsfssissssssssssssssssssssssssssfif`,UZ=new LX((e,t)=>{if(e.next==33)rZ(e),e.acceptToken(TZ);else if(e.next==38||e.next==42){let t=e.next==38?CZ:wZ;iZ(e),e.acceptToken(t)}else e.next==39||e.next==34?(aZ(e,!1),e.acceptToken(SZ)):lZ(e,!1,t.context.type==IZ,t.context.depth)&&e.acceptToken(xZ)}),WZ=new LX((e,t)=>{let n=t.context.type==LZ?t.context.depth:-1,r=e.pos;scan:for(;;){let i=0,a=e.next;for(;a==32;)a=e.peek(++i);if(!i&&($X(e,45,i)||$X(e,46,i))||!XX(a)&&(n<0&&(n=Math.max(t.context.depth+1,i)),i<n))break;for(;;){if(e.next<0)break scan;let t=XX(e.next);if(e.advance(),t)continue scan;r=e.pos}}e.acceptTokenTo(EZ,r)}),GZ=TB({DirectiveName:Q.keyword,DirectiveContent:Q.attributeValue,"DirectiveEnd DocEnd":Q.meta,QuotedLiteral:Q.string,BlockLiteralHeader:Q.special(Q.string),BlockLiteralContent:Q.content,Literal:Q.content,"Key/Literal Key/QuotedLiteral":Q.definition(Q.propertyName),"Anchor Alias":Q.labelName,Tag:Q.typeName,Comment:Q.lineComment,": , -":Q.separator,"?":Q.punctuation,"[ ]":Q.squareBracket,"{ }":Q.brace}),KZ=KX.deserialize({version:14,states:"5lQ!ZQgOOO#PQfO'#CpO#uQfO'#DOOOQR'#Dv'#DvO$qQgO'#DRO%gQdO'#DUO%nQgO'#DUO&ROaO'#D[OOQR'#Du'#DuO&{QgO'#D^O'rQgO'#D`OOQR'#Dt'#DtO(iOqO'#DbOOQP'#Dj'#DjO(zQaO'#CmO)YQgO'#CmOOQP'#Cm'#CmQ)jQaOOQ)uQgOOQ]QgOOO*PQdO'#CrO*nQdO'#CtOOQO'#Dw'#DwO+]Q`O'#CxO+hQdO'#CwO+rQ`O'#CwOOQO'#Cv'#CvO+wQdO'#CvOOQO'#Cq'#CqO,UQ`O,59[O,^QfO,59[OOQR,59[,59[OOQO'#Cx'#CxO,eQ`O'#DPO,pQdO'#DPOOQO'#Dx'#DxO,zQdO'#DxO-XQ`O,59jO-aQfO,59jOOQR,59j,59jOOQR'#DS'#DSO-hQcO,59mO-sQgO'#DVO.TQ`O'#DVO.YQcO,59pOOQR'#DX'#DXO#|QfO'#DWO.hQcO'#DWOOQR,59v,59vO.yOWO,59vO/OOaO,59vO/WOaO,59vO/cQgO'#D_OOQR,59x,59xO0VQgO'#DaOOQR,59z,59zOOQP,59|,59|O0yOaO,59|O1ROaO,59|O1aOqO,59|OOQP-E7h-E7hO1oQgO,59XOOQP,59X,59XO2PQaO'#DeO2_QgO'#DeO2oQgO'#DkOOQP'#Dk'#DkQ)jQaOOO3PQdO'#CsOOQO,59^,59^O3kQdO'#CuOOQO,59`,59`OOQO,59c,59cO4VQdO,59cO4aQdO'#CzO4kQ`O'#CzOOQO,59b,59bOOQU,5:Q,5:QOOQR1G.v1G.vO4pQ`O1G.vOOQU-E7d-E7dO4xQdO,59kOOQO,59k,59kO5SQdO'#DQO5^Q`O'#DQOOQO,5:d,5:dOOQU,5:R,5:ROOQR1G/U1G/UO5cQ`O1G/UOOQU-E7e-E7eO5kQgO'#DhO5xQcO1G/XOOQR1G/X1G/XOOQR,59q,59qO6TQgO,59qO6eQdO'#DiO6lQgO'#DiO7PQcO1G/[OOQR1G/[1G/[OOQR,59r,59rO#|QfO,59rOOQR1G/b1G/bO7_OWO1G/bO7dOaO1G/bOOQR,59y,59yOOQR,59{,59{OOQP1G/h1G/hO7lOaO1G/hO7tOaO1G/hO8POaO1G/hOOQP1G.s1G.sO8_QgO,5:POOQP,5:P,5:POOQP,5:V,5:VOOQP-E7i-E7iOOQO,59_,59_OOQO,59a,59aOOQO1G.}1G.}OOQO,59f,59fO8oQdO,59fOOQR7+$b7+$bP,XQ`O'#DfOOQO1G/V1G/VOOQO,59l,59lO8yQdO,59lOOQR7+$p7+$pP9TQ`O'#DgOOQR'#DT'#DTOOQR,5:S,5:SOOQR-E7f-E7fOOQR7+$s7+$sOOQR1G/]1G/]O9YQgO'#DYO9jQ`O'#DYOOQR,5:T,5:TO#|QfO'#DZO9oQcO'#DZOOQR-E7g-E7gOOQR7+$v7+$vOOQR1G/^1G/^OOQR7+$|7+$|O:QOWO7+$|OOQP7+%S7+%SO:VOaO7+%SO:_OaO7+%SOOQP1G/k1G/kOOQO1G/Q1G/QOOQO1G/W1G/WOOQR,59t,59tO:jQgO,59tOOQR,59u,59uO#|QfO,59uOOQR<<Hh<<HhOOQP<<Hn<<HnO:zOaO<<HnOOQR1G/`1G/`OOQR1G/a1G/aOOQPAN>YAN>Y",stateData:";S~O!fOS!gOS^OS~OP_OQbORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!V[O!cTO~O`cO~P]OVkOWROXROYeOZfO[dOcPOmhOqQO~OboO~P!bOVtOWROXROYeOZfO[dOcPOmrOqQO~OpwO~P#WORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!cTO~OSvP!avP!bvP~P#|OWROXROYeOZfO[dOcPOqQO~OmzO~P%OOm!OOUzP!azP!bzP!dzP~P#|O^!SO!b!QO!f!TO!g!RO~ORSOTUOWROXROcPOqQO!PVO!cTO~OY!UOP!QXQ!QX!V!QX!`!QXS!QX!a!QX!b!QXU!QXm!QX!d!QX~P&aO[!WOP!SXQ!SX!V!SX!`!SXS!SX!a!SX!b!SXU!SXm!SX!d!SX~P&aO^!ZO!W![O!b!YO!f!]O!g!YO~OP!_O!V[OQaX!`aX~OPaXQaX!VaX!`aX~P#|OP!bOQ!cO!V[O~OP_O!V[O~P#|OWROXROY!fOcPOqQObfXmfXofXpfX~OWROXRO[!hOcPOqQObhXmhXohXphX~ObeXmlXoeX~ObkXokX~P%OOm!kO~Om!lObnPonP~P%OOb!pOo!oO~Ob!pO~P!bOm!sOosXpsX~OosXpsX~P%OOm!uOotPptP~P%OOo!xOp!yO~Op!yO~P#WOS!|O!a#OO!b#OO~OUyX!ayX!byX!dyX~P#|Om#QO~OU#SO!a#UO!b#UO!d#RO~Om#WOUzX!azX!bzX!dzX~O]#XO~O!b#XO!g#YO~O^#ZO!b#XO!g#YO~OP!RXQ!RX!V!RX!`!RXS!RX!a!RX!b!RXU!RXm!RX!d!RX~P&aOP!TXQ!TX!V!TX!`!TXS!TX!a!TX!b!TXU!TXm!TX!d!TX~P&aO!b#^O!g#^O~O^#_O!b#^O!f#`O!g#^O~O^#_O!W#aO!b#^O!g#^O~OPaaQaa!Vaa!`aa~P#|OP#cO!V[OQ!XX!`!XX~OP!XXQ!XX!V!XX!`!XX~P#|OP_O!V[OQ!_X!`!_X~P#|OWROXROcPOqQObgXmgXogXpgX~OWROXROcPOqQObiXmiXoiXpiX~Obkaoka~P%OObnXonX~P%OOm#kO~Ob#lOo!oO~Oosapsa~P%OOotXptX~P%OOm#pO~Oo!xOp#qO~OSwP!awP!bwP~P#|OS!|O!a#vO!b#vO~OUya!aya!bya!dya~P#|Om#xO~P%OOm#{OU}P!a}P!b}P!d}P~P#|OU#SO!a$OO!b$OO!d#RO~O]$QO~O!b$QO!g$RO~O!b$SO!g$SO~O^$TO!b$SO!g$SO~O^$TO!b$SO!f$UO!g$SO~OP!XaQ!Xa!V!Xa!`!Xa~P#|Obnaona~P%OOotapta~P%OOo!xO~OU|X!a|X!b|X!d|X~P#|Om$ZO~Om$]OU}X!a}X!b}X!d}X~O]$^O~O!b$_O!g$_O~O^$`O!b$_O!g$_O~OU|a!a|a!b|a!d|a~P#|O!b$cO!g$cO~O",goto:",]!mPPPPPPPPPPPPPPPPP!nPP!v#v#|$`#|$c$f$j$nP%VPPP!v%Y%^%a%{&O%a&R&U&X&_&b%aP&e&{&e'O'RPP']'a'g'm's'y(XPPPPPPPP(_)e*X+c,VUaObcR#e!c!{ROPQSTUXY_bcdehknrtvz!O!U!W!_!b!c!f!h!k!l!s!u!|#Q#R#S#W#c#k#p#x#{$Z$]QmPR!qnqfPQThknrtv!k!l!s!u#R#k#pR!gdR!ieTlPnTjPnSiPnSqQvQ{TQ!mkQ!trQ!vtR#y#RR!nkTsQvR!wt!RWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]RySR#t!|R|TR|UQ!PUR#|#SR#z#RR#z#SyZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]R!VXR!XYa]O^abc!a!c!eT!da!eQnPR!rnQvQR!{vQ!}yR#u!}Q#T|R#}#TW^Obc!cS!^^!aT!aa!eQ!eaR#f!eW`Obc!cQxSS}U#SQ!`_Q#PzQ#V!OQ#b!_Q#d!bQ#s!|Q#w#QQ$P#WQ$V#cQ$Y#xQ$[#{Q$a$ZR$b$]xZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]Q!VXQ!XYQ#[!UR#]!W!QWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]pfPQThknrtv!k!l!s!u#R#k#pQ!gdQ!ieQ#g!fR#h!hSgPn^pQTkrtv#RQ!jhQ#i!kQ#j!lQ#n!sQ#o!uQ$W#kR$X#pQuQR!zv",nodeNames:`⚠ DirectiveEnd DocEnd - - ? ? ? Literal QuotedLiteral Anchor Alias Tag BlockLiteralContent Comment Stream BOM Document ] [ FlowSequence Item Tagged Anchored Anchored Tagged FlowMapping Pair Key : Pair , } { FlowMapping Pair Pair BlockSequence Item Item BlockMapping Pair Pair Key Pair Pair BlockLiteral BlockLiteralHeader Tagged Anchored Anchored Tagged Directive DirectiveName DirectiveContent Document`,maxTerm:74,context:zZ,nodeProps:[[`isolate`,-3,8,9,14,``],[`openedBy`,18,`[`,32,`{`],[`closedBy`,19,`]`,33,`}`]],propSources:[GZ],skippedNodes:[0],repeatNodeCount:6,tokenData:"-Y~RnOX#PXY$QYZ$]Z]#P]^$]^p#Ppq$Qqs#Pst$btu#Puv$yv|#P|}&e}![#P![!]'O!]!`#P!`!a'i!a!}#P!}#O*g#O#P#P#P#Q+Q#Q#o#P#o#p+k#p#q'i#q#r,U#r;'S#P;'S;=`#z<%l?HT#P?HT?HU,o?HUO#PQ#UU!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PQ#kTOY#PZs#Pt;'S#P;'S;=`#z<%lO#PQ#}P;=`<%l#P~$VQ!f~XY$Qpq$Q~$bO!g~~$gS^~OY$bZ;'S$b;'S;=`$s<%lO$b~$vP;=`<%l$bR%OX!WQOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR%rX!WQ!VPOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR&bP;=`<%l%kR&lUoP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'VUmP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'p[!PP!WQOY#PZp#Ppq#hq{#P{|(f|}#P}!O(f!O!R#P!R![)p![;'S#P;'S;=`#z<%lO#PR(mW!PP!WQOY#PZp#Ppq#hq!R#P!R![)V![;'S#P;'S;=`#z<%lO#PR)^U!PP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR)wY!PP!WQOY#PZp#Ppq#hq{#P{|)V|}#P}!O)V!O;'S#P;'S;=`#z<%lO#PR*nUcP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+XUbP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+rUqP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,]UpP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,vU`P!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#P",tokenizers:[BZ,VZ,UZ,WZ,0,1],topRules:{Stream:[0,15]},tokenPrec:0})}));function JZ(){return new QV(YZ)}var YZ,XZ=o((()=>{qZ(),VH(),SB(),ZB(),qX(),YZ=UV.define({name:`yaml`,parser:KZ.configure({props:[nH.add({Stream:e=>{for(let t=e.node.resolve(e.pos,-1);t&&t.to>=e.pos;t=t.parent){if(t.name==`BlockLiteralContent`&&t.from<t.to)return e.baseIndentFor(t);if(t.name==`BlockLiteral`)return e.baseIndentFor(t)+e.unit;if(t.name==`BlockSequence`||t.name==`BlockMapping`)return e.column(t.from,1);if(t.name==`QuotedLiteral`)return null;if(t.name==`Literal`){let n=e.column(t.from,1);if(n==e.lineIndent(t.from,1))return n;if(t.to>e.pos)return null}}return null},FlowMapping:fV({closing:`}`}),FlowSequence:fV({closing:`]`})}),oH.add({"FlowMapping FlowSequence":hV,"Item Pair BlockLiteral":(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}),languageData:{commentTokens:{line:`#`},indentOnInput:/^\s*[\]\}]$/}}),Q.meta})),ZZ=c({default:()=>QZ});function QZ({value:e,onChange:t,editorRef:n,theme:r,editable:i,placeholder:a}){return(0,eQ.jsx)(_X,{ref:n,value:e,onChange:t,extensions:(0,$Z.useMemo)(()=>[JZ(),SK(),vK(),kR.of(Sq)],[]),theme:r,editable:i,placeholder:a,height:`100%`,style:{height:`100%`},basicSetup:{lineNumbers:!0,highlightActiveLineGutter:!0,highlightActiveLine:!0,foldGutter:!0,dropCursor:!0,allowMultipleSelections:!0,indentOnInput:!0,bracketMatching:!0,closeBrackets:!0,autocompletion:!1,rectangularSelection:!0,crosshairCursor:!1,highlightSelectionMatches:!0,closeBracketsKeymap:!0,searchKeymap:!0,foldKeymap:!0,completionKeymap:!1,lintKeymap:!0}})}var $Z,eQ,tQ=o((()=>{$Z=u(f(),1),vX(),XZ(),Oq(),Vz(),eQ=Qo()})),nQ=(0,y.lazy)(()=>E(()=>Promise.resolve().then(()=>(tQ(),ZZ)),void 0,import.meta.url));function rQ(e){try{let t=qO(e);return!t||typeof t!=`object`||Array.isArray(t)?!1:!!t[`commercial-mode`]}catch{return!1}}function iQ(e){try{return KO(e).toString({indent:2,lineWidth:120,minContentWidth:0})}catch{return e}}function aQ(){let{t:e}=Xo(),t=ym(),n=t?t.isCurrentLayer:!0,r=Fc(e=>e.showNotification),i=Fc(e=>e.showConfirmation),a=mp(e=>e.connectionStatus),o=Wc(e=>e.resolvedTheme),s=XO(`(max-width: 768px)`),{visualValues:c,visualDirty:l,visualParseError:u,visualValidationErrors:d,visualHasPayloadValidationErrors:f,loadVisualValuesFromYaml:p,applyVisualChangesToYaml:m,setVisualValues:h}=Xk(),[g,_]=(0,y.useState)(()=>{let e=localStorage.getItem(`config-management:tab`);return e===`visual`||e===`source`?e:`visual`}),[v,b]=(0,y.useState)(``),[x,C]=(0,y.useState)(!0),[w,T]=(0,y.useState)(!1),[E,D]=(0,y.useState)(``),[O,k]=(0,y.useState)(!1),[A,ee]=(0,y.useState)(!1),[j,M]=(0,y.useState)(``),[N,te]=(0,y.useState)(``),[P,F]=(0,y.useState)(``),[ne,re]=(0,y.useState)({current:0,total:0}),[ie,ae]=(0,y.useState)(``),oe=(0,y.useRef)(null),se=(0,y.useRef)(null),ce=a!==`connected`,le=O||l,ue=n,de=!!u,fe=g===`visual`&&(Object.values(d).some(Boolean)||f);LU({enabled:n,shouldBlock:le,dialog:(0,y.useMemo)(()=>({title:e(`common.unsaved_changes_title`),message:e(`common.unsaved_changes_message`),confirmText:e(`common.confirm`),cancelText:e(`common.cancel`)}),[e])});let pe=(0,y.useCallback)(async()=>{C(!0),D(``);try{let e=await tg.fetchConfigYaml();b(e),k(!1),ee(!1),M(e),te(e),p(e)}catch(t){D(t instanceof Error?t.message:e(`notification.refresh_failed`))}finally{C(!1)}},[p,e]);(0,y.useEffect)(()=>{pe()},[pe]),(0,y.useEffect)(()=>{g!==`visual`||!u||(_(`source`),localStorage.setItem(`config-management:tab`,`source`),r(e(`config_management.visual_mode_unavailable_detail`,{message:u}),`error`))},[g,r,e,u]);let me=async()=>{T(!0);try{let t=rQ(j)!==rQ(N);await tg.saveConfigYaml(N);let n=await tg.fetchConfigYaml();k(!1),ee(!1),b(n),M(n),te(n),p(n);try{Uf.getState().clearCache(),await Uf.getState().fetchConfig(void 0,!0)}catch(t){let n=t instanceof Error?t.message:typeof t==`string`?t:``;r(`${e(`notification.refresh_failed`)}${n?`: ${n}`:``}`,`error`)}r(e(`config_management.save_success`),`success`),t&&r(e(`notification.commercial_mode_restart_required`),`warning`)}catch(t){let n=t instanceof Error?t.message:``;r(`${e(`notification.save_failed`)}: ${n}`,`error`)}finally{T(!1)}},he=async()=>{if(g===`visual`&&u){r(e(`config_management.visual_mode_save_blocked`),`error`);return}T(!0);try{let t=await tg.fetchConfigYaml(),n=O?v:t;if(g!==`source`){let i=KO(t);if(i.errors.length>0){r(e(`config_management.visual_mode_latest_yaml_invalid`,{message:i.errors[0]?.message??e(`config_management.visual_mode_save_blocked`)}),`error`);return}if(n!==t){let t=KO(n);if(t.errors.length>0){r(e(`config_management.visual_mode_latest_yaml_invalid`,{message:t.errors[0]?.message??e(`config_management.visual_mode_save_blocked`)}),`error`);return}}}let i=g===`source`?v:m(n),a=t;if(g!==`source`&&(a=iQ(t)),a===i){k(!1),b(t),M(t),te(i),p(t),r(e(`config_management.diff.no_changes`),`info`);return}M(a),te(i),ee(!0)}catch(t){let n=t instanceof Error?t.message:``;r(`${e(`notification.save_failed`)}: ${n}`,`error`)}finally{T(!1)}},ge=(0,y.useCallback)(e=>{b(e),k(!0)},[]),_e=(0,y.useCallback)(t=>{if(t!==g){if(t===`source`){if(l){let e=m(v);e!==v&&(b(e),k(!0))}}else{let t=p(v);if(!t.ok){r(e(`config_management.visual_mode_unavailable_detail`,{message:t.error}),`error`);return}}_(t),localStorage.setItem(`config-management:tab`,t)}},[g,m,v,p,r,e,l]),ve=(0,y.useCallback)((e,t=`next`)=>{if(!e||!oe.current?.view)return;let n=oe.current.view,r=n.state.doc.toString(),i=[],a=e.toLowerCase(),o=r.toLowerCase(),s=0;for(;s<o.length;){let e=o.indexOf(a,s);if(e===-1)break;i.push(e),s=e+1}if(i.length===0){re({current:0,total:0});return}let c=n.state.selection.main,l=t===`prev`?c.from:c.to,u=0;if(t===`next`)for(let e=0;e<i.length;e++){if(i[e]>l){u=e;break}e===i.length-1&&(u=0)}else for(let e=i.length-1;e>=0;e--){if(i[e]<l){u=e;break}e===0&&(u=i.length-1)}let d=i[u];re({current:u+1,total:i.length}),n.dispatch({selection:{anchor:d,head:d+e.length},scrollIntoView:!0}),n.focus()},[]),ye=(0,y.useCallback)(e=>{F(e),e?re({current:0,total:0}):(re({current:0,total:0}),ae(``))},[]),be=(0,y.useCallback)((e=`next`)=>{P&&(ae(P),ve(P,e))},[P,ve]),xe=(0,y.useCallback)(e=>{e.key===`Enter`&&(e.preventDefault(),be(e.shiftKey?`prev`:`next`))},[be]),Se=(0,y.useCallback)(()=>{ie&&ve(ie,`prev`)},[ie,ve]),Ce=(0,y.useCallback)(()=>{ie&&ve(ie,`next`)},[ie,ve]);Jb(se,`--config-action-bar-height`,ue);let we=()=>e(ce?`config_management.status_disconnected`:x?`config_management.status_loading`:E?`config_management.status_load_failed`:de?`config_management.visual_mode_unavailable`:fe?`config_management.visual.validation.validation_blocked`:w?`config_management.status_saving`:le?`config_management.status_dirty`:`config_management.status_loaded`),Te=()=>E||de||fe?RU.error:le?RU.modified:!x&&!w?RU.saved:``,Ee=()=>s?ce?e(`config_management.status_disconnected_short`,{defaultValue:`Disconnected`}):x?e(`config_management.status_loading_short`,{defaultValue:`Loading`}):E?e(`config_management.status_load_failed_short`,{defaultValue:`Failed`}):de?e(`config_management.visual_mode_unavailable_short`,{defaultValue:`YAML issue`}):fe?e(`config_management.visual.validation_blocked_short`,{defaultValue:`Fix errors`}):w?e(`config_management.status_saving_short`,{defaultValue:`Saving`}):le?e(`config_management.status_dirty_short`,{defaultValue:`Unsaved`}):e(`config_management.status_loaded_short`,{defaultValue:`Loaded`}):we(),De=(0,y.useCallback)(()=>{if(!le){pe();return}i({title:e(`common.unsaved_changes_title`),message:e(`config_management.reload_confirm_message`),confirmText:e(`config_management.reload`),cancelText:e(`common.cancel`),variant:`danger`,onConfirm:async()=>{await pe()}})},[le,pe,i,e]),Oe=(0,I.jsx)(`div`,{className:RU.floatingActionContainer,ref:se,children:(0,I.jsxs)(`div`,{className:RU.floatingActionList,children:[(0,I.jsx)(`div`,{className:`${RU.floatingStatus} ${s?RU.floatingStatusCompact:``} ${Te()}`,children:Ee()}),(0,I.jsx)(`button`,{type:`button`,className:RU.floatingActionButton,onClick:De,disabled:x||w,title:e(`config_management.reload`),"aria-label":e(`config_management.reload`),children:(0,I.jsx)(ps,{size:16})}),(0,I.jsxs)(`button`,{type:`button`,className:RU.floatingActionButton,onClick:he,disabled:ce||x||w||!le||A||de||fe,title:e(`config_management.save`),"aria-label":e(`config_management.save`),children:[(0,I.jsx)(ks,{size:16}),le&&(0,I.jsx)(`span`,{className:RU.dirtyDot,"aria-hidden":`true`})]})]})});return(0,I.jsxs)(`div`,{className:RU.container,children:[(0,I.jsx)(`div`,{className:RU.pageHeader,children:(0,I.jsxs)(`div`,{className:RU.pageHeaderCopy,children:[(0,I.jsx)(`h1`,{className:RU.pageTitle,children:e(`config_management.title`)}),(0,I.jsxs)(`div`,{className:RU.tabBar,children:[(0,I.jsx)(`button`,{type:`button`,className:`${RU.tabItem} ${g===`visual`?RU.tabActive:``}`,onClick:()=>_e(`visual`),disabled:w||x,children:e(`config_management.tabs.visual`,{defaultValue:`可视化编辑`})}),(0,I.jsx)(`button`,{type:`button`,className:`${RU.tabItem} ${g===`source`?RU.tabActive:``}`,onClick:()=>_e(`source`),disabled:w||x,children:e(`config_management.tabs.source`,{defaultValue:`源代码编辑`})})]})]})}),(0,I.jsx)(`div`,{className:RU.workspaceShell,children:(0,I.jsxs)(`div`,{className:RU.content,children:[E&&(0,I.jsx)(`div`,{className:`error-box`,children:E}),!E&&u&&(0,I.jsx)(`div`,{className:`error-box`,children:e(`config_management.visual_mode_unavailable_detail`,{message:u})}),g===`visual`?(0,I.jsx)(SA,{values:c,validationErrors:d,hasPayloadValidationErrors:f,disabled:ce||x,onChange:h}):(0,I.jsxs)(`div`,{className:RU.sourceWorkspace,children:[(0,I.jsxs)(`div`,{className:RU.sourceToolbar,children:[(0,I.jsx)(`div`,{className:RU.searchInputWrapper,children:(0,I.jsx)($o,{value:P,onChange:e=>ye(e.target.value),onKeyDown:xe,placeholder:e(`config_management.search_placeholder`,{defaultValue:`搜索配置内容...`}),disabled:ce||x,className:RU.searchInput,rightElement:(0,I.jsxs)(`div`,{className:RU.searchRight,children:[P&&ie===P&&(0,I.jsx)(`span`,{className:RU.searchCount,children:ne.total>0?`${ne.current} / ${ne.total}`:e(`config_management.search_no_results`,{defaultValue:`无结果`})}),(0,I.jsx)(`button`,{type:`button`,className:RU.searchButton,onClick:()=>be(`next`),disabled:!P||ce||x,title:e(`config_management.search_button`,{defaultValue:`搜索`}),children:(0,I.jsx)(Ds,{size:16})})]})})}),(0,I.jsxs)(`div`,{className:RU.searchActions,children:[(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:Se,disabled:!P||ie!==P||ne.total===0,title:e(`config_management.search_prev`,{defaultValue:`上一个`}),children:(0,I.jsx)(ws,{size:16})}),(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:Ce,disabled:!P||ie!==P||ne.total===0,title:e(`config_management.search_next`,{defaultValue:`下一个`}),children:(0,I.jsx)(Ts,{size:16})})]})]}),(0,I.jsx)(`div`,{className:RU.editorWrapper,children:(0,I.jsx)(y.Suspense,{fallback:null,children:(0,I.jsx)(nQ,{editorRef:oe,value:v,onChange:ge,theme:o,editable:!ce&&!x,placeholder:e(`config_management.editor_placeholder`)})})})]})]})}),ue&&typeof document<`u`?(0,S.createPortal)(Oe,document.body):null,(0,I.jsx)(IU,{open:A,original:j,modified:N,onConfirm:me,onCancel:()=>ee(!1),loading:w})]})}function oQ(e,t){let[n,r]=(0,y.useState)(()=>{try{let n=window.localStorage.getItem(e);return n?JSON.parse(n):t}catch(n){return console.error(`Error reading localStorage key "${e}":`,n),t}});return[n,(0,y.useCallback)(t=>{r(n=>{let r=t instanceof Function?t(n):t;try{window.localStorage.setItem(e,JSON.stringify(r))}catch(t){console.error(`Error setting localStorage key "${e}":`,t)}return r})},[e])]}var sQ=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`,`OPTIONS`,`HEAD`],cQ=[`2xx`,`3xx`,`4xx`,`5xx`],lQ=e=>{if(typeof e==`number`){if(e>=200&&e<300)return`2xx`;if(e>=300&&e<400)return`3xx`;if(e>=400&&e<500)return`4xx`;if(e>=500&&e<600)return`5xx`}},uQ=RegExp(`\\b(${sQ.join(`|`)})\\b`),dQ=/^\[?(\d{4}-\d{2}-\d{2}[ T]\d{2}:\d{2}:\d{2}(?:\.\d{1,3})?)\]?/,fQ=/^\[?(trace|debug|info|warn|warning|error|fatal)\s*\]?(?=\s|\[|$)\s*/i,pQ=/^\[([^\]]+)\]/,mQ=/\b(?:\d+(?:\.\d+)?\s*(?:µs|us|ms|s|m))(?:\s*\d+(?:\.\d+)?\s*(?:µs|us|ms|s|m))*\b/i,hQ=/\b(?:\d{1,3}\.){3}\d{1,3}\b/,gQ=/\b(?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}\b/i,_Q=/^([a-f0-9]{8}|--------)$/i,vQ=/\brequest[_-]?id=([A-Za-z0-9][A-Za-z0-9._:-]{0,127})\b/i,yQ=/^\d{1,2}:\d{2}:\d{2}(?:\.\d{1,3})?$/,bQ=/^\[GIN\]\s+(\d{4})\/(\d{2})\/(\d{2})\s*-\s*(\d{2}:\d{2}:\d{2}(?:\.\d{1,3})?)\s*$/,xQ=[/\|\s*([1-5]\d{2})\s*\|/,/\b([1-5]\d{2})\s*-/,RegExp(`\\b(?:${sQ.join(`|`)})\\s+\\S+\\s+([1-5]\\d{2})\\b`),/\b(?:status|code|http)[:\s]+([1-5]\d{2})\b/i,/\b([1-5]\d{2})\s+(?:OK|Created|Accepted|No Content|Moved|Found|Bad Request|Unauthorized|Forbidden|Not Found|Method Not Allowed|Internal Server Error|Bad Gateway|Service Unavailable|Gateway Timeout)\b/i],SQ=e=>{for(let t of xQ){let n=e.match(t);if(!n)continue;let r=Number.parseInt(n[1],10);if(Number.isFinite(r)&&r>=100&&r<=599)return r}},CQ=e=>{let t=e.match(hQ);if(t)return t[0];let n=e.match(gQ);if(!n)return;let r=n[0];if(!yQ.test(r)&&!(!r.includes(`::`)&&r.split(`:`).length!==8))return r},wQ=e=>{let t=e.trim(),n=t.match(/^(\d{4}-\d{2}-\d{2})[ T](\d{2}:\d{2}:\d{2})/);return n?`${n[1]} ${n[2]}`:t},TQ=e=>{let t=e.match(mQ);if(t)return t[0].replace(/\s+/g,``)},EQ=e=>{let t=e.trim().toLowerCase();if(t===`warning`||t===`warn`)return`warn`;if(t===`info`)return`info`;if(t===`error`)return`error`;if(t===`fatal`)return`fatal`;if(t===`debug`)return`debug`;if(t===`trace`)return`trace`},DQ=e=>{let t=e.toLowerCase();if(/\bfatal\b/.test(t))return`fatal`;if(/\berror\b/.test(t))return`error`;if(/\bwarn(?:ing)?\b/.test(t)||e.includes(`警告`))return`warn`;if(/\binfo\b/.test(t))return`info`;if(/\bdebug\b/.test(t))return`debug`;if(/\btrace\b/.test(t))return`trace`},OQ=e=>{let t=e.match(vQ);if(!t)return;let n=t[1];if(!/^-+$/.test(n))return n},kQ=e=>{let t=e.match(uQ);if(!t)return{};let n=t[1],r=t.index??0,i=e.slice(r+t[0].length).trim();return{method:n,path:i?i.split(/\s+/)[0]:void 0}},AQ=e=>{let t=e.trim(),n,r=t.match(dQ);r&&(n=r[1],t=t.slice(r[0].length).trim());let i,a=t.match(/^\[([a-f0-9]{8}|--------)\]\s*/i);if(a){let e=a[1];/^-+$/.test(e)||(i=e),t=t.slice(a[0].length).trim()}let o,s=t.match(fQ);s&&(o=EQ(s[1]),t=t.slice(s[0].length).trim());let c,l=t.match(pQ);l&&(c=l[1],t=t.slice(l[0].length).trim());let u,d,f,p,m,h=t;if(t.includes(`|`)){let e=t.split(`|`).map(e=>e.trim()).filter(Boolean),r=new Set,a=e.findIndex(e=>bQ.test(e));if(a>=0){let t=e[a].match(bQ);if(t){let e=`${t[1]}-${t[2]}-${t[3]} ${t[4]}`,i=wQ(e),o=n?wQ(n):void 0;n?o===i&&r.add(a):(n=e,r.add(a))}}let o=e.findIndex(e=>_Q.test(e)||!!OQ(e));if(o>=0){let t=OQ(e[o]);if(t)i=t,r.add(o);else{let t=e[o].match(_Q);if(t){let e=t[1];/^-+$/.test(e)||(i=e),r.add(o)}}}let s=e.findIndex(e=>/^\d{3}$/.test(e));if(s>=0){let t=e[s].match(/^(\d{3})$/);if(t){let e=Number.parseInt(t[1],10);e>=100&&e<=599&&(u=e,r.add(s))}}let l=e.findIndex(e=>mQ.test(e));if(l>=0){let t=TQ(e[l]);t&&(d=t,r.add(l))}let g=e.findIndex(e=>!!CQ(e));if(g>=0){let t=CQ(e[g]);t&&(f=t,r.add(g))}let _=e.findIndex(e=>{let{method:t}=kQ(e);return!!t});if(_>=0){let t=kQ(e[_]);p=t.method,m=t.path,r.add(_)}let v=e.findIndex(e=>pQ.test(e));if(v>=0){let t=e[v].match(pQ);t&&(c=t[1],r.add(v))}h=e.filter((e,t)=>!r.has(t)).join(` | `)}else{u=SQ(t);let e=TQ(t);e&&(d=e),f=CQ(t);let n=kQ(t);p=n.method,m=n.path,i||(i=OQ(t))}if(o||(o=DQ(e)),h){let e=h.match(bQ);if(e){let t=`${e[1]}-${e[2]}-${e[3]} ${e[4]}`;n||(n=t),wQ(n)===wQ(t)&&(h=``)}}return{raw:e,timestamp:n,level:o,source:c,requestId:i,statusCode:u,latency:d,ip:f,method:p,path:m,message:h}},jQ=12;function MQ(e){let{parsedLines:t}=e,[n,r]=oQ(`logsPage.methodFilters`,[]),[i,a]=oQ(`logsPage.statusFilters`,[]),[o,s]=oQ(`logsPage.pathFilters`,[]),c=(0,y.useMemo)(()=>new Set(n),[n]),l=(0,y.useMemo)(()=>new Set(i),[i]),u=(0,y.useMemo)(()=>new Set(o),[o]),d=n.length>0||i.length>0||o.length>0,f=(0,y.useMemo)(()=>{let e={};return t.forEach(t=>{t.method&&(e[t.method]=(e[t.method]??0)+1)}),e},[t]),p=(0,y.useMemo)(()=>{let e={};return t.forEach(t=>{let n=lQ(t.statusCode);n&&(e[n]=(e[n]??0)+1)}),e},[t]),m=(0,y.useMemo)(()=>{let e=new Map;return t.forEach(t=>{t.path&&e.set(t.path,(e.get(t.path)??0)+1)}),Array.from(e.entries()).sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0])).slice(0,jQ).map(([e,t])=>({path:e,count:t}))},[t]);return(0,y.useEffect)(()=>{if(t.length===0)return;let e=new Set(m.map(e=>e.path));s(t=>{if(t.length===0)return t;let n=t.filter(t=>e.has(t));return n.length===t.length?t:n})},[t.length,m,s]),{methodFilters:n,statusFilters:i,pathFilters:o,methodFilterSet:c,statusFilterSet:l,pathFilterSet:u,hasStructuredFilters:d,methodCounts:f,statusCounts:p,pathOptions:m,toggleMethodFilter:e=>{r(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},toggleStatusFilter:e=>{a(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},togglePathFilter:e=>{s(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},clearStructuredFilters:()=>{r([]),a([]),s([])}}}var NQ=200,PQ=72,FQ=e=>e?e.scrollHeight-e.scrollTop-e.clientHeight<=24:!0;function IQ(e){let{logState:t,setLogState:n,loading:r,isSearching:i,filteredLineCount:a,hasStructuredFilters:o,showRawLogs:s}=e,c=(0,y.useRef)(null),l=(0,y.useRef)(!1),u=(0,y.useRef)(null),d=!i&&t.visibleFrom>0,f=(0,y.useCallback)(()=>{let e=c.current;e&&(e.scrollTop=e.scrollHeight)},[]),p=(0,y.useCallback)(()=>{l.current=!0},[]),m=(0,y.useCallback)(()=>{let e=c.current;e&&(u.current||i||n(t=>t.visibleFrom<=0?t:(u.current={scrollHeight:e.scrollHeight,scrollTop:e.scrollTop},{...t,visibleFrom:Math.max(t.visibleFrom-NQ,0)})))},[i,n]),h=(0,y.useCallback)(e=>{let t=c.current;t&&(i||d&&(u.current||t.scrollTop>PQ||m()))},[d,i,m]);(0,y.useLayoutEffect)(()=>{let e=c.current,t=u.current;if(!e||!t)return;let n=e.scrollHeight-t.scrollHeight;e.scrollTop=t.scrollTop+n,u.current=null},[t.visibleFrom]);let g=(0,y.useCallback)(()=>{let e=c.current;e&&d&&(i||u.current||e.scrollHeight>e.clientHeight+1||m())},[d,i,m]);return(0,y.useEffect)(()=>{if(r||!c.current)return;let e=window.requestAnimationFrame(()=>{g()});return()=>{window.cancelAnimationFrame(e)}},[a,o,r,t.visibleFrom,s,g]),(0,y.useEffect)(()=>{let e=()=>{window.requestAnimationFrame(()=>{g()})};return window.addEventListener(`resize`,e),()=>{window.removeEventListener(`resize`,e)}},[g]),(0,y.useEffect)(()=>{l.current&&(r||c.current&&(f(),l.current=!1))},[r,t.buffer,t.visibleFrom,f]),{logViewerRef:c,canLoadMore:d,handleLogScroll:h,scrollToBottom:f,requestScrollToBottom:p}}var $={container:`LogsPage-module__container___aQ0JL`,pageHeader:`LogsPage-module__pageHeader___yZbkC`,pageTitle:`LogsPage-module__pageTitle___vZY55`,tabBar:`LogsPage-module__tabBar___bI3hW`,tabItem:`LogsPage-module__tabItem___5tb4J`,tabActive:`LogsPage-module__tabActive___JjbWX`,content:`LogsPage-module__content___hGaGn`,logCard:`LogsPage-module__logCard___KG4Jd`,runtimeNotice:`LogsPage-module__runtimeNotice___94iyL`,toolbar:`LogsPage-module__toolbar___9dY5F`,filters:`LogsPage-module__filters___nUahU`,searchWrapper:`LogsPage-module__searchWrapper___mrEmr`,filterPanelHeader:`LogsPage-module__filterPanelHeader___Oi5tO`,filterPanelToggle:`LogsPage-module__filterPanelToggle___ADZED`,filterPanelButtonContent:`LogsPage-module__filterPanelButtonContent___sgOCp`,filterPanelCount:`LogsPage-module__filterPanelCount___kAJ5-`,structuredFilters:`LogsPage-module__structuredFilters___fW4v7`,filterChipGroup:`LogsPage-module__filterChipGroup___bbPoy`,filterChipLabel:`LogsPage-module__filterChipLabel___jy0D3`,filterChipList:`LogsPage-module__filterChipList___hHeOY`,filterChip:`LogsPage-module__filterChip___Efqh7`,filterChipActive:`LogsPage-module__filterChipActive___8S8ki`,filterChipHint:`LogsPage-module__filterChipHint___shcVo`,searchInput:`LogsPage-module__searchInput___eoPij`,searchIcon:`LogsPage-module__searchIcon___73cvF`,searchClear:`LogsPage-module__searchClear___yTM1y`,filterStats:`LogsPage-module__filterStats___IaTXF`,removedCount:`LogsPage-module__removedCount___bNgxC`,actionButton:`LogsPage-module__actionButton___aYJPR`,buttonContent:`LogsPage-module__buttonContent___qjHrB`,switchLabel:`LogsPage-module__switchLabel___EfB3d`,logPanel:`LogsPage-module__logPanel___2wjiP`,errorPanel:`LogsPage-module__errorPanel___0w-se`,errorLogViewer:`LogsPage-module__errorLogViewer___dYvlG`,errorLogViewerMeta:`LogsPage-module__errorLogViewerMeta___Dy7Ay`,errorLogContent:`LogsPage-module__errorLogContent___6GzNt`,loadMoreBanner:`LogsPage-module__loadMoreBanner___BUD0t`,loadMoreCount:`LogsPage-module__loadMoreCount___UsdBd`,loadMoreStats:`LogsPage-module__loadMoreStats___e9bVk`,logList:`LogsPage-module__logList___lFt6f`,rawLog:`LogsPage-module__rawLog___F5YBd`,logRow:`LogsPage-module__logRow___rxZS5`,rowWarn:`LogsPage-module__rowWarn___Lhg4M`,rowError:`LogsPage-module__rowError___XQ3Qi`,timestamp:`LogsPage-module__timestamp___TZvLq`,rowMain:`LogsPage-module__rowMain___f--We`,badge:`LogsPage-module__badge___tR566`,pill:`LogsPage-module__pill___vGA2z`,source:`LogsPage-module__source___nv7Zu`,requestIdBadge:`LogsPage-module__requestIdBadge___yPO1b`,statusBadge:`LogsPage-module__statusBadge___hj08j`,statusSuccess:`LogsPage-module__statusSuccess___3llcn`,statusInfo:`LogsPage-module__statusInfo___B6DaE`,statusWarn:`LogsPage-module__statusWarn___1Dwki`,statusError:`LogsPage-module__statusError___xxTDc`,levelInfo:`LogsPage-module__levelInfo___oZMOp`,levelWarn:`LogsPage-module__levelWarn___DsCD0`,levelError:`LogsPage-module__levelError___8VjWc`,levelDebug:`LogsPage-module__levelDebug___l-5yk`,levelTrace:`LogsPage-module__levelTrace___XvRLF`,methodBadge:`LogsPage-module__methodBadge___Cf9jC`,path:`LogsPage-module__path___frHAs`,message:`LogsPage-module__message___bNHRw`,logCardFullscreen:`LogsPage-module__logCardFullscreen___y99Q8`,logPanelFullscreen:`LogsPage-module__logPanelFullscreen___lHzBV`},LQ=100,RQ=1e4,zQ=650,BQ=10,VQ=e=>typeof e==`number`?e>1?e-1:void 0:e,HQ=(e,t)=>{let n={limit:RQ};if(!e)return n;t.cursor&&(n.cursor=t.cursor);let r=VQ(t.after);return r!==void 0&&(n.after=r),n},UQ=(e,t)=>{let n=Math.min(e.length,t.length);for(let r=n;r>0;--r){let n=!0;for(let i=0;i<r;i+=1)if(e[e.length-r+i]!==t[i]){n=!1;break}if(n)return r}return 0},WQ=(e,t)=>{if(e.length===0||t.length===0)return[...e,...t];let n=UQ(e,t);return[...e,...t.slice(n)]},GQ=e=>typeof e!=`object`||!e?``:[e.data,e.details].filter(e=>e!==void 0).map(e=>{if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return``}}).join(` `),KQ=e=>`${pc(e)} ${GQ(e)}`.toLowerCase().includes(`logging to file disabled`),qQ=async e=>{if(e instanceof Blob)return e.text();if(e instanceof ArrayBuffer)return new TextDecoder().decode(e);if(typeof e==`string`)return e;if(e==null)return``;try{return JSON.stringify(e,null,2)}catch{return String(e)}};function JQ(){let{t:e}=Xo(),{showNotification:t,showConfirmation:n}=Fc(),r=mp(e=>e.connectionStatus),i=mp(e=>e.serverRuntimeKind),a=mp(e=>e.updateServerRuntimeKind),o=Uf(e=>e.config),s=o?.requestLog??!1,c=o?.loggingToFile??!1,l=i===`cpa`&&!c,u=i===`home`,[d,f]=(0,y.useState)(!1),p=l||d,[m,h]=(0,y.useState)(`logs`),[g,_]=(0,y.useState)({buffer:[],visibleFrom:0}),[v,b]=(0,y.useState)(!0),[x,S]=(0,y.useState)(``),[C,w]=oQ(`logsPage.autoRefresh`,!1),[T,E]=(0,y.useState)(``),D=(0,y.useDeferredValue)(T),[O,k]=oQ(`logsPage.hideManagementLogs`,!0),[A,ee]=oQ(`logsPage.showRawLogs`,!1),[j,M]=oQ(`logsPage.structuredFiltersExpanded`,!0),[N,te]=(0,y.useState)([]),[P,F]=(0,y.useState)(!1),[ne,re]=(0,y.useState)(``),[ie,ae]=(0,y.useState)(null),[oe,se]=(0,y.useState)(``),[ce,le]=(0,y.useState)(``),[ue,de]=(0,y.useState)(!1),[fe,pe]=(0,y.useState)(null),[me,he]=(0,y.useState)(!1),[ge,_e]=(0,y.useState)(!1),ve=(0,y.useRef)(null),ye=(0,y.useRef)({}),be=(0,y.useRef)(0),xe=(0,y.useRef)(null),Se=(0,y.useRef)(!1),Ce=(0,y.useRef)(!1),we=(0,y.useRef)({}),Te=()=>{we.current={}},Ee=(e,t)=>{let n=we.current,r={};e.nextCursor&&(r.cursor=e.nextCursor),e.latestAfter===void 0?t&&n.after!==void 0&&(r.after=n.after):r.after=e.latestAfter,we.current=r},De=r!==`connected`,Oe=De||v||l,ke=De||p,Ae=De||p||u,je=async(t=!1)=>{if(r!==`connected`){b(!1);return}if(l){t||(Te(),ye.current={},f(!1),_({buffer:[],visibleFrom:0}),S(``),b(!1));return}if(Se.current){t||(Ce.current=!0);return}Se.current=!0,t||b(!0),S(``);try{let e=ve.current,n=!t||FQ(e?.logViewerRef.current??null);n&&e?.requestScrollToBottom();let r=HQ(t,we.current),i=await E_.fetchLogs(r);f(!1),Ee(i,t),i.requestLogHomeIpById?ye.current=t?{...ye.current,...i.requestLogHomeIpById}:i.requestLogHomeIpById:t||(ye.current={});let a=Array.isArray(i.lines)?i.lines:[];if(t&&i.cursorReset){let e=a.slice(-RQ);_({buffer:e,visibleFrom:Math.max(e.length-LQ,0)})}else if(t&&a.length>0)_(e=>{let t=e.buffer.length-e.visibleFrom,r=WQ(e.buffer,a),i=Math.max(r.length-RQ,0),o=i>0?r.slice(i):r,s=Math.max(e.visibleFrom-i,0);return n&&(s=Math.max(o.length-t,0)),{buffer:o,visibleFrom:s}});else if(!t){let e=a.slice(-RQ);_({buffer:e,visibleFrom:Math.max(e.length-LQ,0)})}}catch(n){if(console.error(`Failed to load logs:`,n),KQ(n)){t||(Te(),ye.current={},f(!0),_({buffer:[],visibleFrom:0}),S(``));return}t||S(pc(n)||e(`logs.load_error`))}finally{t||b(!1),Se.current=!1,Ce.current&&(Ce.current=!1,je(!1))}};iv(()=>je(!1));let Me=async()=>{if(u){t(e(`logs.home_clear_unavailable`),`warning`);return}if(l){t(e(`logs.cpa_file_logging_required`),`warning`);return}if(d){t(e(`logs.file_logging_required`),`warning`);return}n({title:e(`logs.clear_confirm_title`,{defaultValue:`Clear Logs`}),message:e(`logs.clear_confirm`),variant:`danger`,confirmText:e(`common.confirm`),onConfirm:async()=>{try{await E_.clearLogs(),_({buffer:[],visibleFrom:0}),Te(),ye.current={},f(!1),t(e(`logs.clear_success`),`success`)}catch(n){let r=pc(n);t(`${e(`notification.delete_failed`)}${r?`: ${r}`:``}`,`error`)}}})},Ne=()=>{let n=g.buffer.join(`
|
||
`);XS({filename:`logs.txt`,blob:new Blob([n],{type:`text/plain`})}),t(e(`logs.download_success`),`success`)},Pe=async()=>{if(r!==`connected`){F(!1);return}if(u){F(!1),te([]),re(``);return}F(!0),re(``);try{let e=await E_.fetchErrorLogs();te(Array.isArray(e.files)?e.files:[])}catch(t){console.error(`Failed to load error logs:`,t),te([]);let n=pc(t);re(n?`${e(`logs.error_logs_load_error`)}: ${n}`:e(`logs.error_logs_load_error`))}finally{F(!1)}},Fe=async n=>{try{let r=await E_.downloadErrorLog(n);XS({filename:n,blob:new Blob([r.data],{type:`text/plain`})}),t(e(`logs.error_log_download_success`),`success`)}catch(n){let r=pc(n);t(`${e(`notification.download_failed`)}${r?`: ${r}`:``}`,`error`)}},Ie=async t=>{let n=be.current+1;be.current=n,ae(t),se(``),le(``),de(!0);try{let e=await qQ((await E_.downloadErrorLog(t.name)).data);if(be.current!==n)return;se(e)}catch(t){if(be.current!==n)return;let r=pc(t);le(r?`${e(`logs.error_log_open_failed`)}: ${r}`:e(`logs.error_log_open_failed`))}finally{be.current===n&&de(!1)}},Le=()=>{be.current+=1,ae(null),se(``),le(``),de(!1)},Re=async()=>{let n=await Zb(oe);t(n?e(`logs.error_log_copy_success`):e(`logs.copy_failed`,{defaultValue:`Copy failed`}),n?`success`:`error`)};(0,y.useEffect)(()=>{r===`connected`&&(Te(),ye.current={},f(!1),je(!1))},[r,c]),(0,y.useEffect)(()=>{if(r!==`connected`||i!==`unknown`)return;let e=!1;return(async()=>{let t=await Sf.detectRuntimeKind();!e&&(t===`cpa`||t===`home`)&&a(t)})(),()=>{e=!0}},[r,i,a]),(0,y.useEffect)(()=>{m===`errors`&&r===`connected`&&Pe()},[m,r,s]),(0,y.useEffect)(()=>{if(!C||r!==`connected`||p)return;let e=window.setInterval(()=>{je(!0)},8e3);return()=>window.clearInterval(e)},[C,r,p]);let ze=(0,y.useMemo)(()=>g.buffer.slice(g.visibleFrom),[g.buffer,g.visibleFrom]),Be=D.trim(),Ve=Be.length>0,He=Ve?g.buffer:ze,Ue=(0,y.useMemo)(()=>{let e=He;if(O&&(e=e.filter(e=>!e.includes(_c))),Be){let t=Be.toLowerCase();e=e.filter(e=>e.toLowerCase().includes(t))}return e.map(e=>AQ(e))},[He,O,Be]),We=MQ({parsedLines:Ue}),Ge=`logs-structured-filters`,Ke=We.methodFilters.length+We.statusFilters.length+We.pathFilters.length,{filteredParsedLines:qe,filteredLines:Je,removedCount:Ye}=(0,y.useMemo)(()=>{let e=Ue.filter(e=>{if(We.methodFilterSet.size>0&&(!e.method||!We.methodFilterSet.has(e.method)))return!1;let t=lQ(e.statusCode);return!(We.statusFilterSet.size>0&&(!t||!We.statusFilterSet.has(t))||We.pathFilterSet.size>0&&(!e.path||!We.pathFilterSet.has(e.path)))});return{filteredParsedLines:e,filteredLines:e.map(e=>e.raw),removedCount:Math.max(He.length-e.length,0)}},[He,We.methodFilterSet,We.pathFilterSet,We.statusFilterSet,Ue]),Xe=(0,y.useMemo)(()=>A?[]:qe,[qe,A]),Ze=(0,y.useMemo)(()=>Je.join(`
|
||
`),[Je]),Qe=IQ({logState:g,setLogState:_,loading:v,isSearching:Ve,filteredLineCount:Je.length,hasStructuredFilters:We.hasStructuredFilters,showRawLogs:A});ve.current=Qe;let $e=async n=>{await Zb(n)?t(e(`logs.copy_success`,{defaultValue:`Copied to clipboard`}),`success`):t(e(`logs.copy_failed`,{defaultValue:`Copy failed`}),`error`)},et=()=>{xe.current?.timer&&(window.clearTimeout(xe.current.timer),xe.current.timer=null)},tt=(e,t)=>{s&&t&&(fe||(et(),xe.current={timer:window.setTimeout(()=>{pe(t),xe.current&&(xe.current.fired=!0,xe.current.timer=null)},zQ),startX:e.clientX,startY:e.clientY,fired:!1}))},nt=()=>{et(),xe.current=null},rt=e=>{let t=xe.current;if(!t||t.timer===null||t.fired)return;let n=Math.abs(e.clientX-t.startX),r=Math.abs(e.clientY-t.startY);(n>BQ||r>BQ)&&nt()},it=()=>{me||pe(null)},at=async n=>{he(!0);try{let r=await E_.downloadRequestLogById(n,ye.current[n]);XS({filename:`request-${n}.log`,blob:new Blob([r.data],{type:`text/plain`})}),t(e(`logs.request_log_download_success`),`success`),pe(null)}catch(n){let r=pc(n);t(`${e(`notification.download_failed`)}${r?`: ${r}`:``}`,`error`)}finally{he(!1)}};return(0,y.useEffect)(()=>()=>{xe.current?.timer&&(window.clearTimeout(xe.current.timer),xe.current.timer=null)},[]),(0,y.useEffect)(()=>{if(!ge)return;document.body.classList.add(`logs-fullscreen-active`),Ep();let e=e=>{e.key===`Escape`&&(document.querySelector(`.modal-overlay`)||_e(!1))};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),document.body.classList.remove(`logs-fullscreen-active`),Dp()}},[ge]),(0,I.jsxs)(`div`,{className:$.container,children:[(0,I.jsxs)(`div`,{className:$.pageHeader,children:[(0,I.jsx)(`h1`,{className:$.pageTitle,children:e(`logs.title`)}),(0,I.jsx)(`div`,{className:$.runtimeNotice,children:e(`logs.runtime_${i}`)})]}),(0,I.jsxs)(`div`,{className:$.tabBar,children:[(0,I.jsx)(`button`,{type:`button`,className:`${$.tabItem} ${m===`logs`?$.tabActive:``}`,onClick:()=>h(`logs`),children:e(`logs.log_content`)}),(0,I.jsx)(`button`,{type:`button`,className:`${$.tabItem} ${m===`errors`?$.tabActive:``}`,onClick:()=>{_e(!1),h(`errors`)},children:e(`logs.error_logs_modal_title`)})]}),(0,I.jsxs)(`div`,{className:$.content,children:[m===`logs`&&(0,I.jsxs)(Yb,{className:[$.logCard,ge?$.logCardFullscreen:``].filter(Boolean).join(` `),children:[p&&(0,I.jsx)(`div`,{className:`status-badge warning`,children:e(l?`logs.cpa_file_logging_required`:`logs.file_logging_required`)}),x&&(0,I.jsx)(`div`,{className:`error-box`,children:x}),(0,I.jsxs)(`div`,{className:$.filters,children:[!ge&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:$.searchWrapper,children:(0,I.jsx)($o,{value:T,onChange:e=>E(e.target.value),placeholder:e(`logs.search_placeholder`),className:$.searchInput,rightElement:T?(0,I.jsx)(`button`,{type:`button`,className:$.searchClear,onClick:()=>E(``),title:`Clear`,"aria-label":`Clear`,children:(0,I.jsx)(Os,{size:16})}):(0,I.jsx)(Ds,{size:16,className:$.searchIcon})})}),(0,I.jsx)(`div`,{className:$.filterPanelHeader,children:(0,I.jsx)(L,{type:`button`,variant:`secondary`,size:`sm`,className:$.filterPanelToggle,onClick:()=>M(e=>!e),"aria-expanded":j,"aria-controls":Ge,title:e(j?`logs.filter_panel_collapse`:`logs.filter_panel_expand`),children:(0,I.jsxs)(`span`,{className:$.filterPanelButtonContent,children:[(0,I.jsx)(ns,{size:16}),(0,I.jsx)(`span`,{children:e(`logs.filter_panel_title`)}),Ke>0&&(0,I.jsx)(`span`,{className:$.filterPanelCount,children:e(`logs.filter_panel_active_count`,{count:Ke})}),j?(0,I.jsx)(ws,{size:16}):(0,I.jsx)(Ts,{size:16})]})})})]}),!ge&&j&&(0,I.jsxs)(`div`,{id:Ge,className:$.structuredFilters,children:[(0,I.jsxs)(`div`,{className:$.filterChipGroup,children:[(0,I.jsx)(`span`,{className:$.filterChipLabel,children:e(`logs.filter_method`)}),(0,I.jsx)(`div`,{className:$.filterChipList,children:sQ.map(e=>{let t=We.methodFilters.includes(e),n=We.methodCounts[e]??0;return(0,I.jsxs)(`button`,{type:`button`,className:`${$.filterChip} ${t?$.filterChipActive:``}`,onClick:()=>We.toggleMethodFilter(e),disabled:n===0&&!t,"aria-pressed":t,children:[e,` (`,n,`)`]},e)})})]}),(0,I.jsxs)(`div`,{className:$.filterChipGroup,children:[(0,I.jsx)(`span`,{className:$.filterChipLabel,children:e(`logs.filter_status`)}),(0,I.jsx)(`div`,{className:$.filterChipList,children:cQ.map(t=>{let n=We.statusFilters.includes(t),r=We.statusCounts[t]??0;return(0,I.jsxs)(`button`,{type:`button`,className:`${$.filterChip} ${n?$.filterChipActive:``}`,onClick:()=>We.toggleStatusFilter(t),disabled:r===0&&!n,"aria-pressed":n,children:[e(`logs.filter_status_${t}`),` (`,r,`)`]},t)})})]}),(0,I.jsxs)(`div`,{className:$.filterChipGroup,children:[(0,I.jsx)(`span`,{className:$.filterChipLabel,children:e(`logs.filter_path`)}),(0,I.jsx)(`div`,{className:$.filterChipList,children:We.pathOptions.length===0?(0,I.jsx)(`span`,{className:$.filterChipHint,children:e(`logs.filter_path_empty`)}):We.pathOptions.map(({path:e,count:t})=>{let n=We.pathFilters.includes(e);return(0,I.jsxs)(`button`,{type:`button`,className:`${$.filterChip} ${n?$.filterChipActive:``}`,onClick:()=>We.togglePathFilter(e),"aria-pressed":n,title:e,children:[e,` (`,t,`)`]},e)})})]}),(0,I.jsx)(L,{variant:`ghost`,size:`sm`,onClick:We.clearStructuredFilters,disabled:!We.hasStructuredFilters,children:e(`logs.clear_filters`)})]}),(0,I.jsx)(hy,{checked:O,onChange:k,label:(0,I.jsxs)(`span`,{className:$.switchLabel,children:[(0,I.jsx)(js,{size:16}),e(`logs.hide_management_logs`,{prefix:`/v0/management`})]})}),(0,I.jsx)(hy,{checked:A,onChange:ee,label:(0,I.jsxs)(`span`,{className:$.switchLabel,title:e(`logs.show_raw_logs_hint`,{defaultValue:`Show original log text for easier multi-line copy`}),children:[(0,I.jsx)(Rs,{size:16}),e(`logs.show_raw_logs`,{defaultValue:`Show raw logs`})]})}),(0,I.jsxs)(`div`,{className:$.toolbar,children:[(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:()=>je(!1),disabled:Oe,className:$.actionButton,children:(0,I.jsxs)(`span`,{className:$.buttonContent,children:[(0,I.jsx)(ps,{size:16}),e(`logs.refresh_button`)]})}),(0,I.jsx)(hy,{checked:C,onChange:e=>w(e),disabled:ke,label:(0,I.jsxs)(`span`,{className:$.switchLabel,children:[(0,I.jsx)(Ps,{size:16}),e(`logs.auto_refresh`)]})}),(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:Ne,disabled:g.buffer.length===0,className:$.actionButton,children:(0,I.jsxs)(`span`,{className:$.buttonContent,children:[(0,I.jsx)(ms,{size:16}),e(`logs.download_button`)]})}),(0,I.jsx)(L,{variant:`danger`,size:`sm`,onClick:Me,disabled:Ae,className:$.actionButton,children:(0,I.jsxs)(`span`,{className:$.buttonContent,children:[(0,I.jsx)(hs,{size:16}),e(`logs.clear_button`)]})}),(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:()=>_e(e=>!e),className:$.actionButton,"aria-pressed":ge,title:e(ge?`logs.exit_fullscreen_button`:`logs.fullscreen_button`),children:(0,I.jsxs)(`span`,{className:$.buttonContent,children:[ge?(0,I.jsx)(_s,{size:16}):(0,I.jsx)(gs,{size:16}),e(ge?`logs.exit_fullscreen_button`:`logs.fullscreen_button`)]})})]})]}),v?(0,I.jsx)(`div`,{className:`hint`,children:e(`logs.loading`)}):g.buffer.length>0&&Je.length>0?(0,I.jsxs)(`div`,{ref:Qe.logViewerRef,className:[$.logPanel,ge?$.logPanelFullscreen:``].filter(Boolean).join(` `),onScroll:Qe.handleLogScroll,children:[Qe.canLoadMore&&(0,I.jsxs)(`div`,{className:$.loadMoreBanner,children:[(0,I.jsx)(`span`,{children:e(`logs.load_more_hint`)}),(0,I.jsxs)(`div`,{className:$.loadMoreStats,children:[(0,I.jsx)(`span`,{children:e(`logs.loaded_lines`,{count:Je.length})}),Ye>0&&(0,I.jsx)(`span`,{className:$.loadMoreCount,children:e(`logs.filtered_lines`,{count:Ye})}),(0,I.jsx)(`span`,{className:$.loadMoreCount,children:e(`logs.hidden_lines`,{count:g.visibleFrom})})]})]}),A?(0,I.jsx)(`pre`,{className:$.rawLog,spellCheck:!1,children:Ze}):(0,I.jsx)(`div`,{className:$.logList,children:Xe.map((t,n)=>{let r=[$.logRow];return t.level===`warn`&&r.push($.rowWarn),(t.level===`error`||t.level===`fatal`)&&r.push($.rowError),(0,I.jsxs)(`div`,{className:r.join(` `),onDoubleClick:()=>{$e(t.raw)},onPointerDown:e=>tt(e,t.requestId),onPointerUp:nt,onPointerLeave:nt,onPointerCancel:nt,onPointerMove:rt,title:e(`logs.double_click_copy_hint`,{defaultValue:`Double-click to copy`}),children:[(0,I.jsx)(`div`,{className:$.timestamp,children:t.timestamp||``}),(0,I.jsxs)(`div`,{className:$.rowMain,children:[t.level&&(0,I.jsx)(`span`,{className:[$.badge,t.level===`info`?$.levelInfo:``,t.level===`warn`?$.levelWarn:``,t.level===`error`||t.level===`fatal`?$.levelError:``,t.level===`debug`?$.levelDebug:``,t.level===`trace`?$.levelTrace:``].filter(Boolean).join(` `),children:t.level.toUpperCase()}),t.source&&(0,I.jsx)(`span`,{className:$.source,title:t.source,children:t.source}),t.requestId&&(0,I.jsx)(`span`,{className:[$.badge,$.requestIdBadge].join(` `),title:t.requestId,children:t.requestId}),typeof t.statusCode==`number`&&(0,I.jsx)(`span`,{className:[$.badge,$.statusBadge,t.statusCode>=200&&t.statusCode<300?$.statusSuccess:t.statusCode>=300&&t.statusCode<400?$.statusInfo:t.statusCode>=400&&t.statusCode<500?$.statusWarn:$.statusError].join(` `),children:t.statusCode}),t.latency&&(0,I.jsx)(`span`,{className:$.pill,children:t.latency}),t.ip&&(0,I.jsx)(`span`,{className:$.pill,children:t.ip}),t.method&&(0,I.jsx)(`span`,{className:[$.badge,$.methodBadge].join(` `),children:t.method}),t.path&&(0,I.jsx)(`span`,{className:$.path,title:t.path,children:t.path}),t.message&&(0,I.jsx)(`span`,{className:$.message,children:t.message})]})]},`${g.visibleFrom+n}-${t.raw}`)})})]}):g.buffer.length>0?(0,I.jsx)(Xb,{title:e(`logs.search_empty_title`),description:e(`logs.search_empty_desc`)}):p?(0,I.jsx)(Xb,{title:e(l?`logs.cpa_file_logging_required_title`:`logs.file_logging_required_title`),description:e(l?`logs.cpa_file_logging_required_desc`:`logs.file_logging_required_desc`)}):(0,I.jsx)(Xb,{title:e(`logs.empty_title`),description:e(`logs.empty_desc`)})]}),m===`errors`&&(0,I.jsx)(Yb,{extra:(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:Pe,loading:P,disabled:De,children:e(`common.refresh`)}),children:(0,I.jsxs)(`div`,{className:`stack`,children:[(0,I.jsx)(`div`,{className:`hint`,children:e(`logs.error_logs_description`)}),u&&(0,I.jsx)(`div`,{className:`status-badge warning`,children:e(`logs.error_logs_home_unavailable`)}),s&&!u&&(0,I.jsx)(`div`,{children:(0,I.jsx)(`div`,{className:`status-badge warning`,children:e(`logs.error_logs_request_log_enabled`)})}),ne&&(0,I.jsx)(`div`,{className:`error-box`,children:ne}),(0,I.jsx)(`div`,{className:$.errorPanel,children:P?(0,I.jsx)(`div`,{className:`hint`,children:e(`common.loading`)}):N.length===0?(0,I.jsx)(`div`,{className:`hint`,children:e(`logs.error_logs_empty`)}):(0,I.jsx)(`div`,{className:`item-list`,children:N.map(t=>(0,I.jsxs)(`div`,{className:`item-row`,children:[(0,I.jsxs)(`div`,{className:`item-meta`,children:[(0,I.jsx)(`div`,{className:`item-title`,children:t.name}),(0,I.jsxs)(`div`,{className:`item-subtitle`,children:[t.size?`${(t.size/1024).toFixed(1)} KB`:``,` `,t.modified?Y_(t.modified):``]})]}),(0,I.jsxs)(`div`,{className:`item-actions`,children:[(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:()=>{Ie(t)},disabled:De,children:(0,I.jsxs)(`span`,{className:$.buttonContent,children:[(0,I.jsx)(As,{size:16}),e(`logs.error_logs_open`)]})}),(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:()=>Fe(t.name),disabled:De,children:e(`logs.error_logs_download`)})]})]},t.name))})})]})})]}),(0,I.jsx)(Ap,{open:!!ie,onClose:Le,title:ie?.name??e(`logs.error_log_view_title`),width:960,footer:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(L,{variant:`secondary`,onClick:Le,children:e(`common.close`)}),(0,I.jsx)(L,{variant:`secondary`,onClick:()=>{Re()},disabled:!oe||ue,children:e(`common.copy`)}),(0,I.jsx)(L,{onClick:()=>{ie&&Fe(ie.name)},disabled:!ie||ue,children:e(`logs.error_logs_download`)})]}),children:(0,I.jsxs)(`div`,{className:$.errorLogViewer,children:[ie&&(0,I.jsxs)(`div`,{className:$.errorLogViewerMeta,children:[(0,I.jsxs)(`span`,{children:[e(`logs.error_logs_size`),`:`,` `,ie.size?`${(ie.size/1024).toFixed(1)} KB`:`-`]}),(0,I.jsxs)(`span`,{children:[e(`logs.error_logs_modified`),`:`,` `,ie.modified?Y_(ie.modified):`-`]})]}),ce&&(0,I.jsx)(`div`,{className:`error-box`,children:ce}),ue?(0,I.jsx)(`div`,{className:`hint`,children:e(`common.loading`)}):oe?(0,I.jsx)(`pre`,{className:$.errorLogContent,spellCheck:!1,children:oe}):ce?null:(0,I.jsx)(`div`,{className:`hint`,children:e(`logs.error_log_empty_content`)})]})}),(0,I.jsx)(Ap,{open:!!fe,onClose:it,title:e(`logs.request_log_download_title`),footer:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(L,{variant:`secondary`,onClick:it,disabled:me,children:e(`common.cancel`)}),(0,I.jsx)(L,{onClick:()=>{fe&&at(fe)},loading:me,disabled:!fe,children:e(`common.confirm`)})]}),children:fe?e(`logs.request_log_download_confirm`,{id:fe}):null})]})}var YQ=`data:image/svg+xml,%3csvg%20fill='%23ffffff'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eOpenAI%3c/title%3e%3cpath%20d='M21.55%2010.004a5.416%205.416%200%2000-.478-4.501c-1.217-2.09-3.662-3.166-6.05-2.66A5.59%205.59%200%200010.831%201C8.39.995%206.224%202.546%205.473%204.838A5.553%205.553%200%20001.76%207.496a5.487%205.487%200%2000.691%206.5%205.416%205.416%200%2000.477%204.502c1.217%202.09%203.662%203.165%206.05%202.66A5.586%205.586%200%200013.168%2023c2.443.006%204.61-1.546%205.361-3.84a5.553%205.553%200%20003.715-2.66%205.488%205.488%200%2000-.693-6.497v.001zm-8.381%2011.558a4.199%204.199%200%2001-2.675-.954c.034-.018.093-.05.132-.074l4.44-2.53a.71.71%200%2000.364-.623v-6.176l1.877%201.069c.02.01.033.029.036.05v5.115c-.003%202.274-1.87%204.118-4.174%204.123zM4.192%2017.78a4.059%204.059%200%2001-.498-2.763c.032.02.09.055.131.078l4.44%202.53c.225.13.504.13.73%200l5.42-3.088v2.138a.068.068%200%2001-.027.057L9.9%2019.288c-1.999%201.136-4.552.46-5.707-1.51h-.001zM3.023%208.216A4.15%204.15%200%20015.198%206.41l-.002.151v5.06a.711.711%200%2000.364.624l5.42%203.087-1.876%201.07a.067.067%200%2001-.063.005l-4.489-2.559c-1.995-1.14-2.679-3.658-1.53-5.63h.001zm15.417%203.54l-5.42-3.088L14.896%207.6a.067.067%200%2001.063-.006l4.489%202.557c1.998%201.14%202.683%203.662%201.529%205.633a4.163%204.163%200%2001-2.174%201.807V12.38a.71.71%200%2000-.363-.623zm1.867-2.773a6.04%206.04%200%2000-.132-.078l-4.44-2.53a.731.731%200%2000-.729%200l-5.42%203.088V7.325a.068.068%200%2001.027-.057L14.1%204.713c2-1.137%204.555-.46%205.707%201.513.487.833.664%201.809.499%202.757h.001zm-11.741%203.81l-1.877-1.068a.065.065%200%2001-.036-.051V6.559c.001-2.277%201.873-4.122%204.181-4.12.976%200%201.92.338%202.671.954-.034.018-.092.05-.131.073l-4.44%202.53a.71.71%200%2000-.365.623l-.003%206.173v.002zm1.02-2.168L12%209.25l2.414%201.375v2.75L12%2014.75l-2.415-1.375v-2.75z'%3e%3c/path%3e%3c/svg%3e`,XQ=`data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eZhipu%3c/title%3e%3cpath%20d='M11.991%2023.503a.24.24%200%2000-.244.248.24.24%200%2000.244.249.24.24%200%2000.245-.249.24.24%200%2000-.22-.247l-.025-.001zM9.671%205.365a1.697%201.697%200%20011.099%202.132l-.071.172-.016.04-.018.054c-.07.16-.104.32-.104.498-.035.71.47%201.279%201.186%201.314h.366c1.309.053%202.338%201.173%202.286%202.523-.052%201.332-1.152%202.38-2.478%202.327h-.174c-.715.018-1.274.64-1.239%201.368%200%20.124.018.23.053.337.209.373.54.658.96.8.75.23%201.517-.125%201.9-.782l.018-.035c.402-.64%201.17-.96%201.92-.711.854.284%201.378%201.226%201.099%202.167a1.661%201.661%200%2001-2.077%201.102%201.711%201.711%200%2001-.907-.711l-.017-.035c-.2-.323-.463-.58-.851-.711l-.056-.018a1.646%201.646%200%2000-1.954.746%201.66%201.66%200%2001-1.065.764%201.677%201.677%200%2001-1.989-1.279c-.209-.906.332-1.83%201.257-2.043a1.51%201.51%200%2001.296-.035h.018c.68-.071%201.151-.622%201.116-1.333a1.307%201.307%200%2000-.227-.693%202.515%202.515%200%2001-.366-1.403%202.39%202.39%200%2001.366-1.208c.14-.195.21-.444.227-.693.018-.71-.506-1.261-1.186-1.332l-.07-.018a1.43%201.43%200%2001-.299-.07l-.05-.019a1.7%201.7%200%2001-1.047-2.114%201.68%201.68%200%20012.094-1.101zm-5.575%2010.11c.26-.264.639-.367.994-.27.355.096.633.379.728.74.095.362-.007.748-.267%201.013-.402.41-1.053.41-1.455%200a1.062%201.062%200%20010-1.482zm14.845-.294c.359-.09.738.024.992.297.254.274.344.665.237%201.025-.107.36-.396.634-.756.718-.551.128-1.1-.22-1.23-.781a1.05%201.05%200%2001.757-1.26zm-.064-4.39c.314.32.49.753.49%201.206%200%20.452-.176.886-.49%201.206-.315.32-.74.5-1.185.5-.444%200-.87-.18-1.184-.5a1.727%201.727%200%20010-2.412%201.654%201.654%200%20012.369%200zm-11.243.163c.364.484.447%201.128.218%201.691a1.665%201.665%200%2001-2.188.923c-.855-.36-1.26-1.358-.907-2.228a1.68%201.68%200%20011.33-1.038c.593-.08%201.183.169%201.547.652zm11.545-4.221c.368%200%20.708.2.892.524.184.324.184.724%200%201.048a1.026%201.026%200%2001-.892.524c-.568%200-1.03-.47-1.03-1.048%200-.579.462-1.048%201.03-1.048zm-14.358%200c.368%200%20.707.2.891.524.184.324.184.724%200%201.048a1.026%201.026%200%2001-.891.524c-.569%200-1.03-.47-1.03-1.048%200-.579.461-1.048%201.03-1.048zm10.031-1.475c.925%200%201.675.764%201.675%201.706s-.75%201.705-1.675%201.705-1.674-.763-1.674-1.705c0-.942.75-1.706%201.674-1.706zm-2.626-.684c.362-.082.653-.356.761-.718a1.062%201.062%200%2000-.238-1.028%201.017%201.017%200%2000-.996-.294c-.547.14-.881.7-.752%201.257.13.558.675.907%201.225.783zm0%2016.876c.359-.087.644-.36.75-.72a1.062%201.062%200%2000-.237-1.019%201.018%201.018%200%2000-.985-.301%201.037%201.037%200%2000-.762.717c-.108.361-.017.754.239%201.028.245.263.606.377.953.305l.043-.01zM17.19%203.5a.631.631%200%2000.628-.64c0-.355-.279-.64-.628-.64a.631.631%200%2000-.628.64c0%20.355.28.64.628.64zm-10.38%200a.631.631%200%2000.628-.64c0-.355-.28-.64-.628-.64a.631.631%200%2000-.628.64c0%20.355.279.64.628.64zm-5.182%207.852a.631.631%200%2000-.628.64c0%20.354.28.639.628.639a.63.63%200%2000.627-.606l.001-.034a.62.62%200%2000-.628-.64zm5.182%209.13a.631.631%200%2000-.628.64c0%20.355.279.64.628.64a.631.631%200%2000.628-.64c0-.355-.28-.64-.628-.64zm10.38.018a.631.631%200%2000-.628.64c0%20.355.28.64.628.64a.631.631%200%2000.628-.64c0-.355-.279-.64-.628-.64zm5.182-9.148a.631.631%200%2000-.628.64c0%20.354.279.639.628.639a.631.631%200%2000.628-.64c0-.355-.28-.64-.628-.64zm-.384-4.992a.24.24%200%2000.244-.249.24.24%200%2000-.244-.249.24.24%200%2000-.244.249c0%20.142.122.249.244.249zM11.991.497a.24.24%200%2000.245-.248A.24.24%200%200011.99%200a.24.24%200%2000-.244.249c0%20.133.108.236.223.247l.021.001zM2.011%206.36a.24.24%200%2000.245-.249.24.24%200%2000-.244-.249.24.24%200%2000-.244.249.24.24%200%2000.244.249zm0%2011.263a.24.24%200%2000-.243.248.24.24%200%2000.244.249.24.24%200%2000.244-.249.252.252%200%2000-.244-.248zm19.995-.018a.24.24%200%2000-.245.248.24.24%200%2000.245.25.24.24%200%2000.244-.25.252.252%200%2000-.244-.248z'%20fill='%233859FF'%20fill-rule='nonzero'%3e%3c/path%3e%3c/svg%3e`,ZQ=`data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eDeepSeek%3c/title%3e%3cpath%20d='M23.748%204.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434%201.202-.422%201.84.027%201.436.633%202.58%201.838%203.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526%205.526%200%2001-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365%2011.365%200%2000-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055%203.055%200%2001-.465.137%209.597%209.597%200%2000-2.883-.102c-1.885.21-3.39%201.102-4.497%202.623C.082%208.606-.231%2010.684.152%2012.85c.403%202.284%201.569%204.175%203.36%205.653%201.858%201.533%203.997%202.284%206.438%202.14%201.482-.085%203.133-.284%204.994-1.86.47.234.962.327%201.78.397.63.059%201.236-.03%201.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926%201.096-1.296%202.746-2.642%203.392-7.003.05-.347.007-.565%200-.845-.004-.17.035-.237.23-.256a4.173%204.173%200%20001.545-.475c1.396-.763%201.96-2.015%202.093-3.517.02-.23-.004-.467-.247-.588zM11.581%2018c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696%204.696%200%20011.529-.039c2.132.312%203.946%201.265%205.468%202.774.868.86%201.525%201.887%202.202%202.891.72%201.066%201.494%202.082%202.48%202.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306%200%2001.415-.287.302.302%200%2001.2.288.306.306%200%2001-.31.307.303.303%200%2001-.304-.308zm3.11%201.596c-.2.081-.399.151-.59.16a1.245%201.245%200%2001-.798-.254c-.274-.23-.47-.358-.552-.758a1.73%201.73%200%2001.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559%200%2001-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136%201.146.016.352.144.618.408%201.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z'%20fill='%234D6BFE'%3e%3c/path%3e%3c/svg%3e`,QQ=`data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eMinimax%3c/title%3e%3cdefs%3e%3clinearGradient%20id='lobe-icons-minimax-fill'%20x1='0%25'%20x2='100.182%25'%20y1='50.057%25'%20y2='50.057%25'%3e%3cstop%20offset='0%25'%20stop-color='%23E2167E'%3e%3c/stop%3e%3cstop%20offset='100%25'%20stop-color='%23FE603C'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3cpath%20d='M16.278%202c1.156%200%202.093.927%202.093%202.07v12.501a.74.74%200%2000.744.709.74.74%200%2000.743-.709V9.099a2.06%202.06%200%20012.071-2.049A2.06%202.06%200%200124%209.1v6.561a.649.649%200%2001-.652.645.649.649%200%2001-.653-.645V9.1a.762.762%200%2000-.766-.758.762.762%200%2000-.766.758v7.472a2.037%202.037%200%2001-2.048%202.026%202.037%202.037%200%2001-2.048-2.026v-12.5a.785.785%200%2000-.788-.753.785.785%200%2000-.789.752l-.001%2015.904A2.037%202.037%200%200113.441%2022a2.037%202.037%200%2001-2.048-2.026V18.04c0-.356.292-.645.652-.645.36%200%20.652.289.652.645v1.934c0%20.263.142.506.372.638.23.131.514.131.744%200a.734.734%200%2000.372-.638V4.07c0-1.143.937-2.07%202.093-2.07zm-5.674%200c1.156%200%202.093.927%202.093%202.07v11.523a.648.648%200%2001-.652.645.648.648%200%2001-.652-.645V4.07a.785.785%200%2000-.789-.78.785.785%200%2000-.789.78v14.013a2.06%202.06%200%2001-2.07%202.048%202.06%202.06%200%2001-2.071-2.048V9.1a.762.762%200%2000-.766-.758.762.762%200%2000-.766.758v3.8a2.06%202.06%200%2001-2.071%202.049A2.06%202.06%200%20010%2012.9v-1.378c0-.357.292-.646.652-.646.36%200%20.653.29.653.646V12.9c0%20.418.343.757.766.757s.766-.339.766-.757V9.099a2.06%202.06%200%20012.07-2.048%202.06%202.06%200%20012.071%202.048v8.984c0%20.419.343.758.767.758.423%200%20.766-.339.766-.758V4.07c0-1.143.937-2.07%202.093-2.07z'%20fill='url(%23lobe-icons-minimax-fill)'%20fill-rule='nonzero'%3e%3c/path%3e%3c/svg%3e`,$Q={container:`SystemPage-module__container___KAydo`,pageTitle:`SystemPage-module__pageTitle___DiF5E`,content:`SystemPage-module__content___SauLn`,aboutCard:`SystemPage-module__aboutCard___v2-ui`,aboutHeader:`SystemPage-module__aboutHeader___hT4-J`,aboutLogo:`SystemPage-module__aboutLogo___KXoLr`,aboutTitle:`SystemPage-module__aboutTitle___BTLGy`,aboutInfoGrid:`SystemPage-module__aboutInfoGrid___b7AR0`,infoTile:`SystemPage-module__infoTile___6AuIY`,tapTile:`SystemPage-module__tapTile___-9SaX`,tileLabel:`SystemPage-module__tileLabel___eMn4v`,tileHeader:`SystemPage-module__tileHeader___w4Ej0`,tileAction:`SystemPage-module__tileAction___WKXuS`,tileValue:`SystemPage-module__tileValue___Up02X`,tileSub:`SystemPage-module__tileSub___ysVDj`,section:`SystemPage-module__section___Q6rCw`,sectionTitle:`SystemPage-module__sectionTitle___GOXpQ`,sectionDescription:`SystemPage-module__sectionDescription___nI7Jo`,clearLoginActions:`SystemPage-module__clearLoginActions___4ek-m`,infoGrid:`SystemPage-module__infoGrid___NNFgo`,infoRow:`SystemPage-module__infoRow___E8Q0J`,label:`SystemPage-module__label___Xw4tZ`,value:`SystemPage-module__value___pii6g`,modelsList:`SystemPage-module__modelsList___id54Q`,modelItem:`SystemPage-module__modelItem___ZTm4G`,modelTags:`SystemPage-module__modelTags___M0sci`,groupTitle:`SystemPage-module__groupTitle___bTqIN`,groupIcon:`SystemPage-module__groupIcon___-XXrb`,modelTag:`SystemPage-module__modelTag___5Ar53`,modelName:`SystemPage-module__modelName___LKdAK`,modelAlias:`SystemPage-module__modelAlias___zioM-`,versionCheck:`SystemPage-module__versionCheck___V09h4`,versionInfo:`SystemPage-module__versionInfo___cmujE`,versionItem:`SystemPage-module__versionItem___NmHd7`,version:`SystemPage-module__version___XoIFT`,quickLinks:`SystemPage-module__quickLinks___QTmT3`,linkCard:`SystemPage-module__linkCard___iSrVF`,linkIcon:`SystemPage-module__linkIcon___gNqz2`,github:`SystemPage-module__github___V8I3m`,docs:`SystemPage-module__docs___cA-rG`,linkContent:`SystemPage-module__linkContent___Rfh7h`,linkTitle:`SystemPage-module__linkTitle___Zpr4Q`,linkDesc:`SystemPage-module__linkDesc___KKavC`},e$={gpt:{light:ny,dark:YQ},claude:$v,gemini:ty,qwen:ix,kimi:{light:rx,dark:nx},glm:XQ,grok:{light:$b,dark:ex},deepseek:ZQ,minimax:QQ},t$=e=>{if(!e)return null;let t=e.trim().replace(/^v/i,``);if(!t)return null;let n=t.split(/[^0-9]+/).filter(Boolean).map(e=>Number.parseInt(e,10)).filter(Number.isFinite);return n.length?n:null},n$=(e,t)=>{let n=t$(e),r=t$(t);if(!n||!r)return null;let i=Math.max(n.length,r.length);for(let e=0;e<i;e++){let t=n[e]||0,i=r[e]||0;if(t>i)return 1;if(t<i)return-1}return 0};function r$(){let{t:e,i18n:t}=Xo(),{showNotification:n,showConfirmation:r}=Fc(),i=Wc(e=>e.resolvedTheme),a=mp(),o=Uf(e=>e.config),s=Uf(e=>e.fetchConfig),c=Uf(e=>e.clearCache),l=Uf(e=>e.updateConfigValue),u=dp(e=>e.models),d=dp(e=>e.loading),f=dp(e=>e.error),p=dp(e=>e.fetchModels),[m,h]=(0,y.useState)(),[g,_]=(0,y.useState)(!1),[v,b]=(0,y.useState)(!1),[S,C]=(0,y.useState)(!1),[w,T]=(0,y.useState)(!1),[E,D]=(0,y.useState)(!1),O=(0,y.useRef)(0),k=(0,y.useRef)(null),A=(0,y.useMemo)(()=>t.language?.toLowerCase().startsWith(`zh`)?`其他`:`Other`,[t.language]),ee=(0,y.useMemo)(()=>qf(u,{otherLabel:A}),[u,A]),j=o?.requestLog??!1,M=v!==j,N=a.connectionStatus===`connected`&&!!o,te=a.serverVersion||e(`system_info.version_unknown`),P=Q_(a.serverBuildDate,t.language)||e(`system_info.version_unknown`),F=e=>{let t=e$[e];return t?typeof t==`string`?t:i===`dark`?t.dark:t.light:null},ne=K_(),re=async({forceRefresh:t=!1}={})=>{if(a.connectionStatus!==`connected`){h({type:`warning`,message:e(`notification.connection_required`)});return}if(!a.apiBase){n(e(`notification.connection_required`),`warning`);return}h({type:`muted`,message:e(`system_info.models_loading`)});try{let n=(await ne({force:t}))[0],r=await p(a.apiBase,n,t),i=r.length>0;h({type:i?`success`:`warning`,message:i?e(`system_info.models_count`,{count:r.length}):e(`system_info.models_empty`)})}catch(t){let n=t instanceof Error?t.message:typeof t==`string`?t:``,r=n?`: ${n}`:``;h({type:`error`,message:`${e(`system_info.models_error`)}${r}`})}},ie=()=>{r({title:e(`system_info.clear_login_title`,{defaultValue:`Clear Login Storage`}),message:e(`system_info.clear_login_confirm`),variant:`danger`,confirmText:e(`common.confirm`),onConfirm:()=>{a.logout(),!(typeof localStorage>`u`)&&([Oc,`isLoggedIn`,`apiBase`,`apiUrl`,`managementKey`].forEach(e=>localStorage.removeItem(e)),n(e(`notification.login_storage_cleared`),`success`))}})},ae=(0,y.useCallback)(()=>{C(!1),b(j),_(!0)},[j]),oe=(0,y.useCallback)(()=>{if(O.current+=1,k.current&&clearTimeout(k.current),O.current>=7){O.current=0,k.current=null,ae();return}k.current=setTimeout(()=>{O.current=0,k.current=null},1500)},[ae]),se=(0,y.useCallback)(()=>{_(!1),C(!1)},[]),ce=async()=>{if(!N)return;if(!M){_(!1);return}let t=j;T(!0),l(`request-log`,v);try{await Rf.updateRequestLog(v),c(`request-log`),n(e(`notification.request_log_updated`),`success`),_(!1)}catch(r){let i=r instanceof Error?r.message:typeof r==`string`?r:``;l(`request-log`,t),n(`${e(`notification.update_failed`)}${i?`: ${i}`:``}`,`error`)}finally{T(!1)}},le=(0,y.useCallback)(async()=>{D(!0);try{let t=await Sf.checkLatest(),r=t?.[`latest-version`]??t?.latest_version??t?.latest??``,i=typeof r==`string`?r:String(r??``),o=n$(i,a.serverVersion);if(!i){n(e(`system_info.version_check_error`),`error`);return}if(o===null){n(e(`system_info.version_current_missing`),`warning`);return}o>0?n(e(`system_info.version_update_available`,{version:i}),`warning`):n(e(`system_info.version_is_latest`),`success`)}catch(t){let r=t instanceof Error?t.message:typeof t==`string`?t:``,i=r?`: ${r}`:``;n(`${e(`system_info.version_check_error`)}${i}`,`error`)}finally{D(!1)}},[a.serverVersion,n,e]);return(0,y.useEffect)(()=>{s().catch(()=>{})},[s]),(0,y.useEffect)(()=>{g&&!S&&b(j)},[g,S,j]),(0,y.useEffect)(()=>()=>{k.current&&clearTimeout(k.current)},[]),(0,y.useEffect)(()=>{re()},[a.connectionStatus,a.apiBase]),(0,I.jsxs)(`div`,{className:$Q.container,children:[(0,I.jsx)(`h1`,{className:$Q.pageTitle,children:e(`system_info.title`)}),(0,I.jsxs)(`div`,{className:$Q.content,children:[(0,I.jsxs)(Yb,{className:$Q.aboutCard,children:[(0,I.jsxs)(`div`,{className:$Q.aboutHeader,children:[(0,I.jsx)(`img`,{src:x,alt:`CPAMC`,className:$Q.aboutLogo}),(0,I.jsx)(`div`,{className:$Q.aboutTitle,children:e(`system_info.about_title`)})]}),(0,I.jsxs)(`div`,{className:$Q.aboutInfoGrid,children:[(0,I.jsxs)(`button`,{type:`button`,className:`${$Q.infoTile} ${$Q.tapTile}`,onClick:oe,children:[(0,I.jsx)(`div`,{className:$Q.tileHeader,children:(0,I.jsx)(`div`,{className:$Q.tileLabel,children:e(`footer.version`)})}),(0,I.jsx)(`div`,{className:$Q.tileValue,children:`v1.17.1`})]}),(0,I.jsxs)(`div`,{className:$Q.infoTile,children:[(0,I.jsxs)(`div`,{className:$Q.tileHeader,children:[(0,I.jsx)(`div`,{className:$Q.tileLabel,children:e(`footer.api_version`)}),(0,I.jsx)(L,{type:`button`,variant:`ghost`,size:`sm`,className:$Q.tileAction,onClick:()=>void le(),loading:E,title:e(`system_info.version_check_button`),"aria-label":e(`system_info.version_check_button`),children:e(`system_info.version_check_button`)})]}),(0,I.jsx)(`div`,{className:$Q.tileValue,children:te})]}),(0,I.jsxs)(`div`,{className:$Q.infoTile,children:[(0,I.jsx)(`div`,{className:$Q.tileLabel,children:e(`footer.build_date`)}),(0,I.jsx)(`div`,{className:$Q.tileValue,children:P})]}),(0,I.jsxs)(`div`,{className:$Q.infoTile,children:[(0,I.jsx)(`div`,{className:$Q.tileLabel,children:e(`connection.status`)}),(0,I.jsx)(`div`,{className:$Q.tileValue,children:e(`common.${a.connectionStatus}_status`)}),(0,I.jsx)(`div`,{className:$Q.tileSub,children:a.apiBase||`-`})]})]})]}),(0,I.jsxs)(Yb,{title:e(`system_info.quick_links_title`),children:[(0,I.jsx)(`p`,{className:$Q.sectionDescription,children:e(`system_info.quick_links_desc`)}),(0,I.jsxs)(`div`,{className:$Q.quickLinks,children:[(0,I.jsxs)(`a`,{href:`https://github.com/router-for-me/CLIProxyAPI`,target:`_blank`,rel:`noopener noreferrer`,className:$Q.linkCard,children:[(0,I.jsx)(`div`,{className:`${$Q.linkIcon} ${$Q.github}`,children:(0,I.jsx)(Fs,{size:22})}),(0,I.jsxs)(`div`,{className:$Q.linkContent,children:[(0,I.jsxs)(`div`,{className:$Q.linkTitle,children:[e(`system_info.link_main_repo`),(0,I.jsx)(Is,{size:14})]}),(0,I.jsx)(`div`,{className:$Q.linkDesc,children:e(`system_info.link_main_repo_desc`)})]})]}),(0,I.jsxs)(`a`,{href:`https://github.com/router-for-me/Cli-Proxy-API-Management-Center`,target:`_blank`,rel:`noopener noreferrer`,className:$Q.linkCard,children:[(0,I.jsx)(`div`,{className:`${$Q.linkIcon} ${$Q.github}`,children:(0,I.jsx)(Rs,{size:22})}),(0,I.jsxs)(`div`,{className:$Q.linkContent,children:[(0,I.jsxs)(`div`,{className:$Q.linkTitle,children:[e(`system_info.link_webui_repo`),(0,I.jsx)(Is,{size:14})]}),(0,I.jsx)(`div`,{className:$Q.linkDesc,children:e(`system_info.link_webui_repo_desc`)})]})]}),(0,I.jsxs)(`a`,{href:`https://help.router-for.me/`,target:`_blank`,rel:`noopener noreferrer`,className:$Q.linkCard,children:[(0,I.jsx)(`div`,{className:`${$Q.linkIcon} ${$Q.docs}`,children:(0,I.jsx)(Ls,{size:22})}),(0,I.jsxs)(`div`,{className:$Q.linkContent,children:[(0,I.jsxs)(`div`,{className:$Q.linkTitle,children:[e(`system_info.link_docs`),(0,I.jsx)(Is,{size:14})]}),(0,I.jsx)(`div`,{className:$Q.linkDesc,children:e(`system_info.link_docs_desc`)})]})]})]})]}),(0,I.jsxs)(Yb,{title:e(`system_info.models_title`),extra:(0,I.jsx)(L,{variant:`secondary`,size:`sm`,onClick:()=>re({forceRefresh:!0}),loading:d,children:e(`common.refresh`)}),children:[(0,I.jsx)(`p`,{className:$Q.sectionDescription,children:e(`system_info.models_desc`)}),m&&(0,I.jsx)(`div`,{className:`status-badge ${m.type}`,children:m.message}),f&&(0,I.jsx)(`div`,{className:`error-box`,children:f}),d?(0,I.jsx)(`div`,{className:`hint`,children:e(`common.loading`)}):u.length===0?(0,I.jsx)(`div`,{className:`hint`,children:e(`system_info.models_empty`)}):(0,I.jsx)(`div`,{className:`item-list`,children:ee.map(t=>{let n=F(t.id);return(0,I.jsxs)(`div`,{className:`item-row`,children:[(0,I.jsxs)(`div`,{className:`item-meta`,children:[(0,I.jsxs)(`div`,{className:$Q.groupTitle,children:[n&&(0,I.jsx)(`img`,{src:n,alt:``,className:$Q.groupIcon}),(0,I.jsx)(`span`,{className:`item-title`,children:t.label})]}),(0,I.jsx)(`div`,{className:`item-subtitle`,children:e(`system_info.models_count`,{count:t.items.length})})]}),(0,I.jsx)(`div`,{className:$Q.modelTags,children:t.items.map(e=>(0,I.jsxs)(`span`,{className:$Q.modelTag,title:e.description||``,children:[(0,I.jsx)(`span`,{className:$Q.modelName,children:e.name}),e.alias&&(0,I.jsx)(`span`,{className:$Q.modelAlias,children:e.alias})]},`${e.name}-${e.alias??`default`}`))})]},t.id)})})]}),(0,I.jsxs)(Yb,{title:e(`system_info.clear_login_title`),children:[(0,I.jsx)(`p`,{className:$Q.sectionDescription,children:e(`system_info.clear_login_desc`)}),(0,I.jsx)(`div`,{className:$Q.clearLoginActions,children:(0,I.jsx)(L,{variant:`danger`,onClick:ie,children:e(`system_info.clear_login_button`)})})]})]}),(0,I.jsx)(Ap,{open:g,onClose:se,title:e(`basic_settings.request_log_title`),footer:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(L,{variant:`secondary`,onClick:se,disabled:w,children:e(`common.cancel`)}),(0,I.jsx)(L,{onClick:ce,loading:w,disabled:!N||!M,children:e(`common.save`)})]}),children:(0,I.jsxs)(`div`,{className:`request-log-modal`,children:[(0,I.jsx)(`div`,{className:`status-badge warning`,children:e(`basic_settings.request_log_warning`)}),(0,I.jsx)(hy,{label:e(`basic_settings.request_log_enable`),labelPosition:`left`,checked:v,disabled:!N||w,onChange:e=>{b(e),C(!0)}})]})})]})}var i$=e=>[{path:`/`,element:(0,I.jsx)(tv,{})},{path:`/dashboard`,element:(0,I.jsx)(tv,{})},{path:`/settings`,element:(0,I.jsx)(Ur,{to:`/config`,replace:!0})},{path:`/api-keys`,element:(0,I.jsx)(Ur,{to:`/config`,replace:!0})},{path:`/ai-providers`,element:(0,I.jsx)(qb,{})},{path:`/ai-providers/*`,element:(0,I.jsx)(Ur,{to:`/ai-providers`,replace:!0})},{path:`/auth-files`,element:(0,I.jsx)(PC,{})},{path:`/auth-files/oauth-excluded`,element:(0,I.jsx)(UC,{})},{path:`/auth-files/oauth-model-alias`,element:(0,I.jsx)(qC,{})},{path:`/oauth`,element:(0,I.jsx)(cw,{})},{path:`/quota`,element:(0,I.jsx)(lw,{})},...e?[{path:`/plugin-pages/:pluginId/:menuIndex`,element:(0,I.jsx)(Ow,{})},{path:`/plugins`,element:(0,I.jsx)(Ww,{})},{path:`/plugin-store`,element:(0,I.jsx)(nT,{})},{path:`/plugins/*`,element:(0,I.jsx)(Ur,{to:`/plugins`,replace:!0})}]:[{path:`/plugin-pages/*`,element:(0,I.jsx)(Ur,{to:`/`,replace:!0})},{path:`/plugins/*`,element:(0,I.jsx)(Ur,{to:`/`,replace:!0})},{path:`/plugin-store`,element:(0,I.jsx)(Ur,{to:`/`,replace:!0})}],{path:`/config`,element:(0,I.jsx)(aQ,{})},{path:`/logs`,element:(0,I.jsx)(JQ,{})},{path:`/system`,element:(0,I.jsx)(r$,{})},{path:`*`,element:(0,I.jsx)(Ur,{to:`/`,replace:!0})}];function a$({location:e}){return cr(i$(mp(e=>e.supportsPlugin)),e)}var o$={dashboard:(0,I.jsx)(zs,{size:18}),aiProviders:(0,I.jsx)(Us,{size:18}),authFiles:(0,I.jsx)(Ws,{size:18}),oauth:(0,I.jsx)(Gs,{size:18}),quota:(0,I.jsx)(Ks,{size:18}),plugins:(0,I.jsx)(Vs,{size:18}),pluginStore:(0,I.jsx)(Hs,{size:18}),config:(0,I.jsx)(Bs,{size:18}),logs:(0,I.jsx)(qs,{size:18}),system:(0,I.jsx)(Js,{size:18})},s$=e=>e.flatMap(e=>e.kind===`drawer`?e.children:[e]);function c$(e,t,n){(0,y.useEffect)(()=>{if(!e)return;let r=e=>{t.current?.contains(e.target)||n()},i=e=>{e.key===`Escape`&&n()};return document.addEventListener(`mousedown`,r),document.addEventListener(`keydown`,i),()=>{document.removeEventListener(`mousedown`,r),document.removeEventListener(`keydown`,i)}},[e,t,n])}function l$({src:e}){let[t,n]=(0,y.useState)(!1);return e&&!t?(0,I.jsx)(`img`,{src:e,alt:``,onError:()=>n(!0)}):(0,I.jsx)(Vs,{size:18})}var u$={width:16,height:16,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,focusable:`false`},d$={refresh:(0,I.jsxs)(`svg`,{...u$,children:[(0,I.jsx)(`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`}),(0,I.jsx)(`path`,{d:`M21 3v5h-5`})]}),menu:(0,I.jsxs)(`svg`,{...u$,children:[(0,I.jsx)(`path`,{d:`M4 7h16`}),(0,I.jsx)(`path`,{d:`M4 12h16`}),(0,I.jsx)(`path`,{d:`M4 17h16`})]}),close:(0,I.jsxs)(`svg`,{...u$,children:[(0,I.jsx)(`path`,{d:`M18 6 6 18`}),(0,I.jsx)(`path`,{d:`m6 6 12 12`})]}),chevronLeft:(0,I.jsx)(`svg`,{...u$,children:(0,I.jsx)(`path`,{d:`m14 18-6-6 6-6`})}),chevronRight:(0,I.jsx)(`svg`,{...u$,children:(0,I.jsx)(`path`,{d:`m10 6 6 6-6 6`})}),language:(0,I.jsxs)(`svg`,{...u$,children:[(0,I.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,I.jsx)(`path`,{d:`M2 12h20`}),(0,I.jsx)(`path`,{d:`M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z`})]}),sun:(0,I.jsxs)(`svg`,{...u$,children:[(0,I.jsx)(`circle`,{cx:`12`,cy:`12`,r:`4`}),(0,I.jsx)(`path`,{d:`M12 2v2`}),(0,I.jsx)(`path`,{d:`M12 20v2`}),(0,I.jsx)(`path`,{d:`m4.93 4.93 1.41 1.41`}),(0,I.jsx)(`path`,{d:`m17.66 17.66 1.41 1.41`}),(0,I.jsx)(`path`,{d:`M2 12h2`}),(0,I.jsx)(`path`,{d:`M20 12h2`}),(0,I.jsx)(`path`,{d:`m6.34 17.66-1.41 1.41`}),(0,I.jsx)(`path`,{d:`m19.07 4.93-1.41 1.41`})]}),moon:(0,I.jsx)(`svg`,{...u$,children:(0,I.jsx)(`path`,{d:`M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9z`})}),whiteTheme:(0,I.jsxs)(`svg`,{...u$,children:[(0,I.jsx)(`circle`,{cx:`12`,cy:`12`,r:`7`}),(0,I.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`,fill:`currentColor`,stroke:`none`})]}),autoTheme:(0,I.jsxs)(`svg`,{...u$,children:[(0,I.jsx)(`defs`,{children:(0,I.jsx)(`clipPath`,{id:`mainLayoutAutoThemeSunLeftHalf`,children:(0,I.jsx)(`rect`,{x:`0`,y:`0`,width:`12`,height:`24`})})}),(0,I.jsx)(`circle`,{cx:`12`,cy:`12`,r:`4`}),(0,I.jsx)(`circle`,{cx:`12`,cy:`12`,r:`4`,clipPath:`url(#mainLayoutAutoThemeSunLeftHalf)`,fill:`currentColor`}),(0,I.jsx)(`path`,{d:`M12 2v2`}),(0,I.jsx)(`path`,{d:`M12 20v2`}),(0,I.jsx)(`path`,{d:`M4.93 4.93l1.41 1.41`}),(0,I.jsx)(`path`,{d:`M17.66 17.66l1.41 1.41`}),(0,I.jsx)(`path`,{d:`M2 12h2`}),(0,I.jsx)(`path`,{d:`M20 12h2`}),(0,I.jsx)(`path`,{d:`M6.34 17.66l-1.41 1.41`}),(0,I.jsx)(`path`,{d:`M19.07 4.93l-1.41 1.41`})]}),logout:(0,I.jsxs)(`svg`,{...u$,children:[(0,I.jsx)(`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`}),(0,I.jsx)(`path`,{d:`m16 17 5-5-5-5`}),(0,I.jsx)(`path`,{d:`M21 12H9`})]})},f$=[{key:`auto`,labelKey:`theme.auto`,colors:{bg:`linear-gradient(135deg, #ffffff 0 50%, #111111 50% 100%)`,card:`linear-gradient(135deg, #ffffff 0 50%, #1a1a1a 50% 100%)`,border:`#bdbdbd`,text:`#2d2a26`,textMuted:`linear-gradient(135deg, #c9c9c9 0 50%, #5a5a5a 50% 100%)`}},{key:`white`,labelKey:`theme.white`,colors:{bg:`#ffffff`,card:`#ffffff`,border:`#e5e5e5`,text:`#2d2a26`,textMuted:`#a29c95`}},{key:`light`,labelKey:`theme.light`,colors:{bg:`#faf9f5`,card:`#f0eee8`,border:`#e3e1db`,text:`#2d2a26`,textMuted:`#a29c95`}},{key:`dark`,labelKey:`theme.dark`,colors:{bg:`#151412`,card:`#1d1b18`,border:`#3a3530`,text:`#f6f4f1`,textMuted:`#9c958d`}}];function p$(){let{t:e}=Xo(),{showNotification:t}=Fc(),n=$n(),r=mp(e=>e.logout),i=mp(e=>e.connectionStatus),a=mp(e=>e.apiBase),o=mp(e=>e.supportsPlugin),s=Uf(e=>e.fetchConfig),c=Uf(e=>e.clearCache),l=Wc(e=>e.theme),u=Wc(e=>e.setTheme),d=nl(e=>e.language),f=nl(e=>e.setLanguage),[p,m]=(0,y.useState)(!1),[h,g]=(0,y.useState)(!1),[_,v]=(0,y.useState)(!1),[b,S]=(0,y.useState)(!1),[C,w]=(0,y.useState)([]),[T,E]=(0,y.useState)(()=>new Set),D=(0,y.useRef)(null),O=(0,y.useRef)(null),k=(0,y.useRef)(null),A=(0,y.useRef)(null),ee=e(`title.abbr`),j=n.pathname.startsWith(`/logs`),M=n.pathname.startsWith(`/plugin-pages`),N=!h||p;(0,y.useLayoutEffect)(()=>{let e=()=>{let e=A.current?.offsetHeight;e&&document.documentElement.style.setProperty(`--header-height`,`${e}px`)};e();let t=typeof ResizeObserver<`u`&&A.current?new ResizeObserver(e):null;return t&&A.current&&t.observe(A.current),window.addEventListener(`resize`,e),()=>{t&&t.disconnect(),window.removeEventListener(`resize`,e)}},[]),(0,y.useLayoutEffect)(()=>{let e=()=>{let e=D.current;if(!e)return;let t=e.getBoundingClientRect(),n=t.left+t.width/2;document.documentElement.style.setProperty(`--content-center-x`,`${n}px`)};e();let t=typeof ResizeObserver<`u`&&D.current?new ResizeObserver(e):null;return t&&D.current&&t.observe(D.current),window.addEventListener(`resize`,e),()=>{t&&t.disconnect(),window.removeEventListener(`resize`,e),document.documentElement.style.removeProperty(`--content-center-x`)}},[]);let te=(0,y.useCallback)(()=>v(!1),[]),P=(0,y.useCallback)(()=>S(!1),[]);c$(_,O,te),c$(b,k,P);let F=(0,y.useCallback)(()=>{v(e=>!e),S(!1)},[]),ne=(0,y.useCallback)(()=>{S(e=>!e),v(!1)},[]),re=(0,y.useCallback)(e=>{u(e),S(!1)},[u]),ie=(0,y.useCallback)(e=>{Xc(e)&&(f(e),v(!1))},[f]);(0,y.useEffect)(()=>{s().catch(()=>{})},[s]);let ae=(0,y.useCallback)(async()=>{if(i!==`connected`||!o){w([]);return}try{w(Cw((await H_.list()).plugins))}catch{w([])}},[i,o]);(0,y.useEffect)(()=>{let e=window.setTimeout(()=>{ae()},0);return window.addEventListener(uw,ae),()=>{window.clearTimeout(e),window.removeEventListener(uw,ae)}},[a,ae]);let oe=C.reduce((e,t)=>{let n=e.find(e=>e.pluginID===t.pluginID);return n?(n.entries.push(t),e):(e.push({pluginID:t.pluginID,pluginTitle:t.pluginTitle,entries:[t]}),e)},[]),se=o?oe.flatMap(t=>{if(t.entries.length===1){let e=t.entries[0],n=mw(e.pluginLogo,a);return[{path:e.route,label:e.label,meta:e.description,icon:(0,I.jsx)(l$,{src:n})}]}let n=mw(t.entries[0]?.pluginLogo??``,a);return[{kind:`drawer`,id:`plugin-pages-${t.pluginID}`,label:t.pluginTitle,meta:e(`plugin_resource.page_count`,{count:t.entries.length}),icon:(0,I.jsx)(l$,{src:n}),children:t.entries.map(e=>({path:e.route,label:e.label,meta:e.description,icon:(0,I.jsx)(`span`,{className:`nav-sub-dot`,"aria-hidden":`true`})}))}]}):[],ce=[{id:`operate`,labelKey:`nav_groups.operate`,items:[{path:`/`,labelKey:`nav.dashboard`,metaKey:`nav_meta.dashboard`,icon:o$.dashboard}]},{id:`gateway`,labelKey:`nav_groups.gateway`,items:[{path:`/ai-providers`,labelKey:`nav.ai_providers`,metaKey:`nav_meta.ai_providers`,icon:o$.aiProviders},{path:`/auth-files`,labelKey:`nav.auth_files`,metaKey:`nav_meta.auth_files`,icon:o$.authFiles},{path:`/oauth`,labelKey:`nav.oauth`,metaKey:`nav_meta.oauth`,icon:o$.oauth}]},{id:`observe`,labelKey:`nav_groups.observe`,items:[{path:`/quota`,labelKey:`nav.quota_management`,metaKey:`nav_meta.quota_management`,icon:o$.quota},{path:`/logs`,labelKey:`nav.logs`,metaKey:`nav_meta.logs`,icon:o$.logs}]},{id:`control`,labelKey:`nav_groups.control`,items:[{path:`/config`,labelKey:`nav.config_management`,metaKey:`nav_meta.config_management`,icon:o$.config},...o?[{path:`/plugins`,labelKey:`nav.plugins`,metaKey:`nav_meta.plugins`,icon:o$.plugins},{path:`/plugin-store`,labelKey:`nav.plugin_store`,metaKey:`nav_meta.plugin_store`,icon:o$.pluginStore}]:[],{path:`/system`,labelKey:`nav.system_info`,metaKey:`nav_meta.system_info`,icon:o$.system}]},...se.length>0?[{id:`plugin-pages`,labelKey:`nav_groups.plugin_pages`,items:se}]:[]],le=ce.flatMap(e=>s$(e.items)).map(e=>e.path),ue=e=>{let t=e.length>1&&e.endsWith(`/`)?e.slice(0,-1):e,n=t===`/dashboard`?`/`:t,r=le.indexOf(`/auth-files`);if(r!==-1){if(n===`/auth-files`)return r;if(n.startsWith(`/auth-files/`))return n.startsWith(`/auth-files/oauth-excluded`)?r+.1:n.startsWith(`/auth-files/oauth-model-alias`)?r+.2:r+.05}let i=le.indexOf(n);if(i!==-1)return i;let a=le.findIndex(e=>e!==`/`&&n.startsWith(`${e}/`));return a===-1?null:a},de=(0,y.useCallback)((e,t)=>{let n=e=>{let t=e.length>1&&e.endsWith(`/`)?e.slice(0,-1):e;return t===`/dashboard`?`/`:t},r=n(e),i=n(t),a=e=>e===`/auth-files`||e.startsWith(`/auth-files/`);return a(r)&&a(i)?`ios`:`vertical`},[]),fe=async()=>{c();let n=(await Promise.allSettled([s(void 0,!0),ae(),rv()])).find(e=>e.status===`rejected`);if(n&&n.status===`rejected`){let r=n.reason,i=typeof r==`string`?r:r instanceof Error?r.message:``;t(`${e(`notification.refresh_failed`)}${i?`: ${i}`:``}`,`error`);return}t(e(`notification.data_refreshed`),`success`)},pe=(0,y.useCallback)(e=>{E(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),me=(t,n=`nav-item`)=>{let r=t.label??(t.labelKey?e(t.labelKey):``),i=t.meta??(t.metaKey?e(t.metaKey):``);return(0,I.jsxs)(Ri,{to:t.path,className:({isActive:e})=>`${n} ${e?`active`:``}`,onClick:()=>m(!1),title:N?void 0:r,children:[(0,I.jsx)(`span`,{className:`nav-icon`,children:t.icon}),N&&(0,I.jsxs)(`span`,{className:`nav-text`,children:[(0,I.jsx)(`span`,{className:`nav-label`,children:r}),i?(0,I.jsx)(`span`,{className:`nav-meta`,children:i}):null]})]},t.path)},he=e=>{if(e.kind!==`drawer`)return me(e);let t=e.children.some(e=>e.path===n.pathname),r=t||T.has(e.id);return(0,I.jsxs)(`div`,{className:`nav-drawer ${r?`open`:``}`,children:[(0,I.jsxs)(`button`,{type:`button`,className:`nav-item nav-drawer-toggle ${t?`active`:``} ${r?`open`:``}`,onClick:()=>pe(e.id),title:N?void 0:e.label,"aria-expanded":r,children:[(0,I.jsx)(`span`,{className:`nav-icon`,children:e.icon}),N&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`span`,{className:`nav-text`,children:[(0,I.jsx)(`span`,{className:`nav-label`,children:e.label}),e.meta?(0,I.jsx)(`span`,{className:`nav-meta`,children:e.meta}):null]}),(0,I.jsx)(`span`,{className:`nav-drawer-caret`,"aria-hidden":`true`,children:(0,I.jsx)(Ts,{size:14})})]})]}),r?(0,I.jsx)(`div`,{className:`nav-sub-list`,children:e.children.map(e=>me(e,`nav-item nav-sub-item`))}):null]},e.id)},ge=p?e(`sidebar.toggle_collapse`,{defaultValue:`Close navigation`}):e(`sidebar.toggle_expand`,{defaultValue:`Open navigation`});return(0,I.jsxs)(`div`,{className:`app-shell ${h?`sidebar-is-collapsed`:``} ${M?`plugin-resource-shell`:``}`,children:[(0,I.jsx)(`div`,{className:`top-gradient-blur`,"aria-hidden":`true`}),(0,I.jsxs)(`header`,{className:`main-header`,ref:A,children:[(0,I.jsx)(`button`,{type:`button`,className:`sidebar-toggle-floating`,onClick:()=>g(e=>!e),title:h?e(`sidebar.expand`,{defaultValue:`展开`}):e(`sidebar.collapse`,{defaultValue:`收起`}),"aria-label":h?e(`sidebar.expand`,{defaultValue:`展开`}):e(`sidebar.collapse`,{defaultValue:`收起`}),children:h?d$.chevronRight:d$.chevronLeft}),(0,I.jsx)(`div`,{className:`mobile-sidebar-actions`,children:(0,I.jsx)(L,{className:`mobile-menu-btn`,variant:`ghost`,size:`sm`,onClick:()=>m(e=>!e),title:ge,"aria-label":ge,children:p?d$.close:d$.menu})}),(0,I.jsxs)(`div`,{className:`header-actions floating-actions`,children:[(0,I.jsx)(L,{variant:`ghost`,size:`sm`,onClick:fe,title:e(`header.refresh_all`),children:d$.refresh}),(0,I.jsxs)(`div`,{className:`language-menu ${_?`open`:``}`,ref:O,children:[(0,I.jsx)(L,{variant:`ghost`,size:`sm`,onClick:F,title:e(`language.switch`),"aria-label":e(`language.switch`),"aria-haspopup":`menu`,"aria-expanded":_,children:d$.language}),_&&(0,I.jsx)(`div`,{className:`notification entering language-menu-popover`,role:`menu`,"aria-label":e(`language.switch`),children:jc.map(t=>(0,I.jsxs)(`button`,{type:`button`,className:`language-menu-option ${d===t?`active`:``}`,onClick:()=>ie(t),role:`menuitemradio`,"aria-checked":d===t,children:[(0,I.jsx)(`span`,{children:e(Mc[t])}),d===t?(0,I.jsx)(`span`,{className:`language-menu-check`,children:`✓`}):null]},t))})]}),(0,I.jsxs)(`div`,{className:`theme-menu ${b?`open`:``}`,ref:k,children:[(0,I.jsx)(L,{variant:`ghost`,size:`sm`,onClick:ne,title:e(`theme.switch`),"aria-label":e(`theme.switch`),"aria-haspopup":`menu`,"aria-expanded":b,children:l===`auto`?d$.autoTheme:l===`dark`?d$.moon:l===`white`?d$.whiteTheme:d$.sun}),b&&(0,I.jsx)(`div`,{className:`notification entering theme-menu-popover`,role:`menu`,"aria-label":e(`theme.switch`),children:f$.map(t=>(0,I.jsxs)(`button`,{type:`button`,className:`theme-card ${l===t.key?`active`:``}`,onClick:()=>re(t.key),role:`menuitemradio`,"aria-checked":l===t.key,children:[(0,I.jsxs)(`div`,{className:`theme-card-preview`,style:{background:t.colors.bg,border:`1px solid ${t.colors.border}`},children:[(0,I.jsx)(`div`,{className:`theme-card-header`,style:{background:t.colors.card,borderBottom:`1px solid ${t.colors.border}`}}),(0,I.jsxs)(`div`,{className:`theme-card-body`,children:[(0,I.jsx)(`div`,{className:`theme-card-sidebar`,style:{background:t.colors.card,borderRight:`1px solid ${t.colors.border}`}}),(0,I.jsxs)(`div`,{className:`theme-card-content`,style:{background:t.colors.bg},children:[(0,I.jsx)(`div`,{className:`theme-card-line`,style:{background:t.colors.textMuted}}),(0,I.jsx)(`div`,{className:`theme-card-line short`,style:{background:t.colors.textMuted}})]})]})]}),(0,I.jsx)(`span`,{className:`theme-card-label`,children:e(t.labelKey)})]},t.key))})]}),(0,I.jsx)(L,{variant:`ghost`,size:`sm`,onClick:r,title:e(`header.logout`),children:d$.logout})]})]}),(0,I.jsxs)(`div`,{className:`main-body`,children:[(0,I.jsx)(`button`,{type:`button`,className:`sidebar-backdrop ${p?`visible`:``}`,onClick:()=>m(!1),"aria-label":e(`common.close`),"aria-hidden":!p,tabIndex:p?0:-1}),(0,I.jsxs)(`aside`,{className:`sidebar ${p?`open`:``} ${h?`collapsed`:``}`,children:[(0,I.jsxs)(`div`,{className:`sidebar-brand`,title:`CLI Proxy API Management Center`,children:[(0,I.jsx)(`img`,{src:x,alt:`CPAMC logo`,className:`sidebar-brand-logo`}),N&&(0,I.jsx)(`span`,{className:`sidebar-brand-title`,children:ee})]}),(0,I.jsx)(`div`,{className:`nav-section`,children:ce.map((t,n)=>(0,I.jsxs)(`div`,{className:`nav-group ${t.id===`plugin-pages`?`nav-group-bottom`:``}`,children:[N?(0,I.jsx)(`div`,{className:`nav-group-label`,children:e(t.labelKey)}):n>0&&(0,I.jsx)(`div`,{className:`nav-group-divider`,"aria-hidden":`true`}),t.items.map(e=>he(e))]},t.id))})]}),(0,I.jsx)(`div`,{className:`content${j?` content-logs`:``}${M?` content-plugin-resource`:``}`,ref:D,children:(0,I.jsx)(`main`,{className:`main-content${j?` main-content-logs`:``}${M?` main-content-plugin-resource`:``}`,children:(0,I.jsx)(Bm,{render:e=>(0,I.jsx)(a$,{location:e}),getRouteOrder:ue,getTransitionVariant:de,scrollContainerRef:D})})})]})]})}function m$({children:e}){let t=$n(),n=mp(e=>e.isAuthenticated),r=mp(e=>e.managementKey),i=mp(e=>e.apiBase),a=mp(e=>e.checkAuth),[o,s]=(0,y.useState)(!1);return(0,y.useEffect)(()=>{(async()=>{if(!n&&r&&i){s(!0);try{await a()}finally{s(!1)}}})()},[i,n,r,a]),o?(0,I.jsx)(`div`,{className:`main-content`,children:(0,I.jsx)(kx,{})}):n?e:(0,I.jsx)(Ur,{to:`/login`,replace:!0,state:{from:t}})}function h$(){return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(xp,{}),(0,I.jsx)(jp,{}),(0,I.jsx)(Wr,{})]})}var g$=Mi([{element:(0,I.jsx)(h$,{}),children:[{path:`/login`,element:(0,I.jsx)(yp,{})},{path:`/*`,element:(0,I.jsx)(m$,{children:(0,I.jsx)(p$,{})})}]}]);function _$(){let e=Wc(e=>e.initializeTheme),t=nl(e=>e.language),n=nl(e=>e.setLanguage);return(0,y.useEffect)(()=>e(),[e]),(0,y.useEffect)(()=>{n(t)},[]),(0,y.useEffect)(()=>{document.documentElement.lang=t},[t]),(0,I.jsx)(na,{router:g$})}document.title=`CLI Proxy API Management Center`,document.documentElement.setAttribute(`translate`,`no`),document.documentElement.classList.add(`notranslate`);var v$=document.querySelector(`link[rel="icon"]`);if(v$)v$.href=x,v$.type=`image/jpeg`;else{let e=document.createElement(`link`);e.rel=`icon`,e.type=`image/jpeg`,e.href=x,document.head.appendChild(e)}(0,b.createRoot)(document.getElementById(`root`)).render((0,I.jsx)(y.StrictMode,{children:(0,I.jsx)(_$,{})}));</script>
|
||
<style rel="stylesheet" crossorigin>*,:before,:after{box-sizing:border-box;margin:0;padding:0}html,body{width:100%;height:100%}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;line-height:1.5}#root{width:100%;height:100%}button,input,textarea,select{font:inherit}a{color:inherit;text-decoration:none}ul,ol{list-style:none}:root{--bg-secondary:#faf9f5;--bg-primary:#f0eee8;--bg-tertiary:#e9e6df;--bg-hover:var(--bg-tertiary);--bg-quinary:#f6f4ee;--bg-error-light:#c657461a;--floating-surface:#fffdf9;--floating-border:#d8d3ca;--floating-shadow:0 12px 26px #00000024;--text-primary:#2d2a26;--text-secondary:#6d6760;--text-tertiary:#a29c95;--text-quaternary:#c0bab3;--text-muted:var(--text-tertiary);--border-color:#e3e1db;--border-secondary:var(--border-color);--border-primary:#d5d2cb;--border-hover:#cecac4;--primary-color:#8b8680;--primary-hover:#7f7a74;--primary-active:#726d67;--primary-contrast:#fff;--success-color:#10b981;--quota-medium-color:#e0aa14;--warning-color:#c65746;--error-color:#c65746;--danger-color:var(--error-color);--info-color:var(--primary-color);--warning-bg:#c657461f;--warning-border:#c6574659;--warning-text:var(--warning-color);--success-badge-bg:#d1fae5;--success-badge-text:#065f46;--success-badge-border:#6ee7b7;--failure-badge-bg:#c6574624;--failure-badge-text:#8a3a30;--failure-badge-border:#c6574659;--count-badge-bg:#8b86802e;--count-badge-text:var(--primary-active);--shadow:0 1px 2px 0 #00000014;--shadow-lg:0 10px 18px -3px #0000001a;--radius-md:8px;--accent-tertiary:var(--bg-tertiary);--primary-8:color-mix(in srgb, var(--primary-color) 8%, transparent);--primary-10:color-mix(in srgb, var(--primary-color) 10%, transparent);--primary-30:color-mix(in srgb, var(--primary-color) 30%, transparent);--amber-color:#d97706;--amber-text:#92400e;--amber-10:color-mix(in srgb, var(--amber-color) 10%, transparent);--amber-30:color-mix(in srgb, var(--amber-color) 30%, transparent);--destructive-color:var(--error-color);--destructive-10:color-mix(in srgb, var(--destructive-color) 10%, transparent);--destructive-30:color-mix(in srgb, var(--destructive-color) 30%, transparent);--muted-bg:var(--bg-tertiary);--muted-foreground:var(--text-secondary);--accent-bg:var(--bg-tertiary);--glass-blur:12px;--glass-backdrop-filter:blur(var(--glass-blur));--glass-filter:blur(var(--glass-blur));--glass-bg:color-mix(in srgb, var(--bg-primary) 82%, transparent);--glass-bg-secondary:color-mix(in srgb, var(--bg-secondary) 82%, transparent);--glass-border:color-mix(in srgb, var(--border-color) 60%, transparent)}[data-theme=white]{--bg-secondary:#fff;--bg-primary:#fff;--bg-tertiary:#f6f6f6;--bg-hover:var(--bg-tertiary);--bg-quinary:#fff;--bg-error-light:#c6574614;--floating-surface:#fff;--floating-border:#d9d9d9;--floating-shadow:0 12px 26px #0000001f;--text-primary:#2d2a26;--text-secondary:#6d6760;--text-tertiary:#a29c95;--text-quaternary:#c0bab3;--text-muted:var(--text-tertiary);--border-color:#e5e5e5;--border-secondary:var(--border-color);--border-primary:#d9d9d9;--border-hover:#ccc;--primary-color:#8b8680;--primary-hover:#7f7a74;--primary-active:#726d67;--primary-contrast:#fff;--success-color:#10b981;--quota-medium-color:#e0aa14;--warning-color:#c65746;--error-color:#c65746;--danger-color:var(--error-color);--info-color:var(--primary-color);--warning-bg:#c657461f;--warning-border:#c6574659;--warning-text:var(--warning-color);--success-badge-bg:#d1fae5;--success-badge-text:#065f46;--success-badge-border:#6ee7b7;--failure-badge-bg:#c6574624;--failure-badge-text:#8a3a30;--failure-badge-border:#c6574659;--count-badge-bg:#8b86802e;--count-badge-text:var(--primary-active);--shadow:0 1px 2px 0 #00000014;--shadow-lg:0 10px 18px -3px #0000001a;--radius-md:8px;--accent-tertiary:var(--bg-tertiary);--primary-8:color-mix(in srgb, var(--primary-color) 8%, transparent);--primary-10:color-mix(in srgb, var(--primary-color) 10%, transparent);--primary-30:color-mix(in srgb, var(--primary-color) 30%, transparent);--amber-color:#d97706;--amber-text:#92400e;--amber-10:color-mix(in srgb, var(--amber-color) 10%, transparent);--amber-30:color-mix(in srgb, var(--amber-color) 30%, transparent);--destructive-color:var(--error-color);--destructive-10:color-mix(in srgb, var(--destructive-color) 10%, transparent);--destructive-30:color-mix(in srgb, var(--destructive-color) 30%, transparent);--muted-bg:var(--bg-tertiary);--muted-foreground:var(--text-secondary);--accent-bg:var(--bg-tertiary)}[data-theme=dark]{--bg-secondary:#151412;--bg-primary:#1d1b18;--bg-tertiary:#262320;--bg-hover:#2e2a26;--bg-quinary:#191714;--bg-error-light:#c657462e;--floating-surface:#2a2723;--floating-border:#4a443d;--floating-shadow:0 14px 30px #0006;--text-primary:#f6f4f1;--text-secondary:#c9c3bb;--text-tertiary:#9c958d;--text-quaternary:#6f6962;--text-muted:var(--text-tertiary);--border-color:#3a3530;--border-secondary:var(--border-color);--border-primary:#4a453f;--border-hover:#5a544d;--primary-color:#8b8680;--primary-hover:#9a948e;--primary-active:#a6a099;--primary-contrast:#fff;--success-color:#10b981;--quota-medium-color:#ffd862;--warning-color:#c65746;--error-color:#c65746;--danger-color:var(--error-color);--info-color:var(--primary-color);--warning-bg:#c6574638;--warning-border:#c6574673;--warning-text:#f1b0a6;--success-badge-bg:#064e3b4d;--success-badge-text:#6ee7b7;--success-badge-border:#059669;--failure-badge-bg:#c657463d;--failure-badge-text:#f1b0a6;--failure-badge-border:#c6574680;--count-badge-bg:#8b868047;--count-badge-text:var(--primary-active);--shadow:0 1px 3px 0 #0000004d;--shadow-lg:0 10px 15px -3px #0000004d;--radius-md:8px;--accent-tertiary:var(--bg-tertiary);--primary-8:color-mix(in srgb, var(--primary-color) 8%, transparent);--primary-10:color-mix(in srgb, var(--primary-color) 10%, transparent);--primary-30:color-mix(in srgb, var(--primary-color) 30%, transparent);--amber-color:#f59e0b;--amber-text:#fcd34d;--amber-10:color-mix(in srgb, var(--amber-color) 14%, transparent);--amber-30:color-mix(in srgb, var(--amber-color) 38%, transparent);--destructive-color:var(--error-color);--destructive-10:color-mix(in srgb, var(--destructive-color) 14%, transparent);--destructive-30:color-mix(in srgb, var(--destructive-color) 38%, transparent);--muted-bg:var(--bg-tertiary);--muted-foreground:var(--text-secondary);--accent-bg:var(--bg-tertiary);--glass-border:color-mix(in srgb, var(--border-color) 55%, transparent)}@media (max-width:768px),(prefers-reduced-motion:reduce),(prefers-reduced-transparency:reduce){:root{--glass-backdrop-filter:none;--glass-filter:none;--glass-bg:var(--bg-primary);--glass-bg-secondary:var(--bg-secondary);--glass-border:var(--border-color)}}.btn{cursor:pointer;background-color:var(--bg-secondary);color:var(--text-primary);border:1px solid #0000;border-radius:8px;justify-content:center;align-items:center;gap:8px;padding:10px 14px;font-weight:600;transition:all .15s;display:inline-flex}.btn.btn-primary{background-color:var(--primary-color);color:var(--primary-contrast,#fff);border-color:var(--primary-color)}.btn.btn-primary:hover{background-color:var(--primary-hover);border-color:var(--primary-hover)}.btn.btn-secondary{background-color:var(--bg-tertiary);border-color:var(--border-color);color:var(--text-primary)}.btn.btn-secondary:hover{background-color:var(--bg-hover,var(--bg-tertiary));border-color:var(--border-hover)}.btn.btn-ghost{color:var(--text-secondary);background:0 0;border-color:#0000}.btn.btn-ghost:hover{color:var(--text-primary);background:var(--bg-tertiary)}.btn.btn-danger{color:#fff;background-color:#c65746;border-color:#c65746}.btn.btn-danger:hover{background-color:#b94a39}.btn.btn-full{width:100%}.btn.btn-sm{padding:8px 10px;font-size:14px}.btn:disabled{opacity:.6;cursor:not-allowed}[data-theme=dark] .btn,[data-theme=dark] .btn.btn-secondary,[data-theme=dark] .btn.btn-ghost{color:#fff}.input,textarea{border:1px solid var(--border-color);background-color:var(--bg-secondary);width:100%;color:var(--text-primary);border-radius:8px;padding:10px 12px;transition:border-color .15s,box-shadow .15s}.input:focus,textarea:focus{border-color:var(--primary-color);outline:none;box-shadow:0 0 0 3px #8b86802e}.form-group{flex-direction:column;gap:4px;margin-bottom:16px;display:flex}.form-group label{color:var(--text-primary);font-weight:600}.form-group .hint{color:var(--text-secondary);font-size:13px}.card{background-color:var(--bg-primary);border:1px solid var(--border-color);box-shadow:var(--shadow);border-radius:12px;padding:24px}.card-header{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;margin-bottom:16px;display:flex}.card-header>*{min-width:0}.card-header .title{min-width:0;color:var(--text-primary);flex:auto;font-size:18px;font-weight:700}.status-badge{border:1px solid var(--border-color);border-radius:9999px;align-items:center;gap:6px;margin-bottom:16px;padding:4px 10px;font-size:13px;display:inline-flex}.status-badge+*{display:block}.status-badge.success{color:#10b981;background:#10b98114;border-color:#10b98159}.status-badge.warning,.status-badge.error{color:#c65746;background:#c6574614;border-color:#c6574659}.status-badge.muted{color:var(--text-secondary)}.notification-container{z-index:3000;flex-direction:column;gap:8px;max-width:360px;display:flex;position:fixed;top:24px;right:24px}@keyframes notification-enter{0%{opacity:0;transform:translate(100%)}to{opacity:1;transform:translate(0)}}@keyframes notification-exit{0%{opacity:1;transform:translate(0)}to{opacity:0;transform:translate(100%)}}.notification{box-shadow:var(--shadow);border:1px solid var(--border-color);background:var(--bg-primary);color:var(--text-primary);border-radius:8px;justify-content:space-between;align-items:center;gap:8px;padding:16px;display:flex}.notification.entering{animation:.3s ease-out forwards notification-enter}.notification.exiting{animation:.3s ease-in forwards notification-exit}.notification.success{border-color:#10b98166}.notification.warning,.notification.error{border-color:#c6574666}.notification .message{flex:1;font-weight:500}.notification .close-btn{width:30px;height:30px;color:var(--text-secondary);cursor:pointer;background:0 0;border:none;border-radius:8px;justify-content:center;align-items:center;padding:0;transition:color .15s,background-color .15s;display:inline-flex}.notification .close-btn svg{display:block}.notification .close-btn:hover{color:var(--text-primary);background:var(--bg-secondary)}.switch{cursor:pointer;align-items:center;gap:8px;display:inline-flex;position:relative}.switch input{opacity:0;width:0;height:0;position:absolute}.switch .track{background:var(--border-color);border-radius:9999px;width:44px;height:24px;transition:background .15s;position:relative}.switch .thumb{background:#fff;border-radius:9999px;width:18px;height:18px;transition:transform .15s;position:absolute;top:3px;left:3px;box-shadow:0 1px 2px #0000000d}.switch input:checked+.track{background:var(--primary-color)}.switch input:checked+.track .thumb{transform:translate(20px)}.switch .label{color:var(--text-primary);font-weight:600}.switch-label-left .label{order:-1}.pill{background:var(--bg-secondary);color:var(--text-secondary);border:1px solid var(--border-color);border-radius:9999px;padding:4px 10px;font-size:12px}.loading-spinner{border:3px solid #fff3;border-top-color:#fff;border-radius:50%;width:16px;height:16px;animation:.8s linear infinite spin}@supports (color:color-mix(in srgb, currentColor 22%, transparent)){.loading-spinner{border-color:color-mix(in srgb, currentColor 22%, transparent);border-top-color:currentColor}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.modal-overlay{z-index:2000;background:#00000059;justify-content:center;align-items:center;padding:24px;display:flex;position:fixed;top:0;bottom:0;left:0;right:0}.modal-overlay.modal-overlay-entering{animation:.25s ease-out forwards modal-overlay-fade-in}.modal-overlay.modal-overlay-closing{animation:.35s ease-in forwards modal-overlay-fade-out}@keyframes modal-overlay-fade-in{0%{opacity:0}to{opacity:1}}@keyframes modal-overlay-fade-out{0%{opacity:1}to{opacity:0}}.modal{background:var(--bg-primary);border:1px solid var(--border-color);transform-origin:calc(100% - 28px) 28px;border-radius:12px;flex-direction:column;max-width:100%;max-height:90vh;display:flex;position:relative;overflow:hidden;box-shadow:0 10px 15px -3px #0000001a}.modal.modal-entering{animation:.3s cubic-bezier(.34,1.56,.64,1) forwards modal-scale-in}.modal.modal-closing{animation:.35s cubic-bezier(.4,0,.2,1) forwards modal-collapse-to-close}@keyframes modal-scale-in{0%{opacity:0;transform:scale(.85)translateY(20px)}to{opacity:1;transform:scale(1)translateY(0)}}@keyframes modal-collapse-to-close{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(0)}}.modal-close-floating{background:var(--bg-secondary);border:1px solid var(--border-color);width:32px;height:32px;color:var(--text-secondary);cursor:pointer;z-index:10;border-radius:9999px;justify-content:center;align-items:center;padding:0;transition:color .15s,background-color .15s,transform .15s;display:inline-flex;position:absolute;top:12px;right:12px}.modal-close-floating svg{display:block}.modal-close-floating:hover{color:var(--text-primary);background:var(--bg-tertiary);transform:scale(1.1)}.modal-close-floating:active{transform:scale(.95)}.modal-close-floating:disabled{cursor:not-allowed;opacity:.6;transform:none}.modal-close-floating:disabled:hover{color:var(--text-secondary);background:var(--bg-secondary);transform:none}.modal-header{border-bottom:1px solid var(--border-color);align-items:center;padding:16px 24px;display:flex}.modal-header .modal-title{color:var(--text-primary);font-size:18px;font-weight:700}.modal-body{max-height:65vh;padding:24px;overflow:auto}.modal-footer{border-top:1px solid var(--border-color);background:var(--bg-primary);justify-content:flex-end;gap:8px;padding:16px 24px;display:flex}@media (max-width:768px){.modal-overlay{padding:16px}.modal{border-radius:8px;max-height:calc(100vh - 32px)}@supports (height:100dvh){.modal{max-height:calc(100dvh - 32px)}}.modal-header{padding:16px 52px 16px 16px}.modal-body{max-height:min(60vh,100vh - 180px);padding:16px}@supports (height:100dvh){.modal-body{max-height:min(60dvh,100dvh - 180px)}}.modal-footer{flex-direction:column-reverse;align-items:stretch;padding:16px}.modal-footer .btn{width:100%}}.request-log-modal{flex-direction:column;align-items:flex-start;gap:16px;display:flex}.request-log-modal .status-badge{margin-bottom:0}.empty-state{border:1px dashed var(--border-color);background:var(--bg-secondary);border-radius:12px;justify-content:space-between;align-items:center;gap:16px;padding:24px;display:flex}.empty-state .empty-content{align-items:center;gap:16px;display:flex}.empty-state .empty-icon{border:2px solid var(--border-color);width:42px;height:42px;color:var(--text-secondary);border-radius:9999px;flex:0 0 42px;justify-content:center;align-items:center;line-height:0;display:inline-flex}.empty-state .empty-icon svg{flex-shrink:0;width:20px;height:20px;display:block}.empty-state .empty-title{color:var(--text-primary);font-weight:700}.empty-state .empty-desc{color:var(--text-secondary);margin-top:4px}.empty-state .empty-action .btn>span{justify-content:center;align-items:center;gap:8px;line-height:1;display:inline-flex}.empty-state .empty-action .btn svg{flex-shrink:0;display:block}.header-input-list{flex-direction:column;gap:8px;display:flex}.header-input-list .header-input-row{grid-template-columns:1fr auto 1fr auto;align-items:center;gap:8px;display:grid}.header-input-list .header-separator{color:var(--text-secondary);text-align:center}.header-input-list .align-start{width:-moz-fit-content;width:fit-content}.item-list{flex-direction:column;gap:8px;display:flex}.item-row{border:1px solid var(--border-color);background:var(--bg-primary);border-radius:8px;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:16px;padding:16px;display:flex}.item-row .item-meta{flex-direction:column;gap:6px;display:flex}.item-row .item-title{color:var(--text-primary);font-weight:700}.item-row .item-subtitle{color:var(--text-secondary);word-break:break-all;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.item-row .item-actions{gap:8px;display:flex}.error-box{color:#c65746;background:#c657461a;border:1px solid #c6574666;border-radius:8px;padding:8px 16px}.stack{flex-direction:column;gap:24px;display:flex}.filters{grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px;margin-bottom:16px;display:grid}.filters .filter-item{flex-direction:column;gap:4px;display:flex}.table{border:1px solid var(--border-color);border-radius:8px;flex-direction:column;display:flex;overflow:hidden}.table .table-header,.table .table-row{grid-template-columns:repeat(auto-fit,minmax(160px,1fr));align-items:center;gap:8px;padding:8px 16px;display:grid}.table .table-header{background:var(--bg-secondary);color:var(--text-primary);font-weight:700}.table .table-row{border-top:1px solid var(--border-color)}.table .cell{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.pagination{align-items:center;gap:8px;margin-top:16px;display:flex}.stat-card{border:1px solid var(--border-color);background:var(--bg-primary);border-radius:8px;flex-direction:column;gap:4px;padding:16px;display:flex}.stat-card .stat-label{color:var(--text-secondary);font-size:14px}.stat-card .stat-value{color:var(--text-primary);font-size:18px;font-weight:800}.log-viewer{background:var(--bg-secondary);border:1px solid var(--border-color);white-space:pre-wrap;max-height:520px;color:var(--text-primary);border-radius:8px;padding:16px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;overflow:auto}.log-viewer-lines .log-line{padding:1px 0;display:block}.log-viewer-lines .log-line-warning{color:var(--warning-text,#92400e);background:var(--warning-bg,#fbbf242e);border-radius:4px;padding:2px 6px}.hint{color:var(--text-secondary)}:root{--header-height:80px;--shell-gutter:24px;--sidebar-panel-width:256px;--sidebar-collapsed-width:68px;--sidebar-active-width:var(--sidebar-panel-width);--sidebar-gap:0px;--floating-control-size:38px}.app-shell{--sidebar-active-width:var(--sidebar-panel-width);background:linear-gradient(180deg, var(--bg-secondary), var(--bg-quinary,var(--bg-secondary)));height:100vh;min-height:100vh;color:var(--text-primary);flex-direction:column;display:flex;position:relative;overflow:hidden}.app-shell.sidebar-is-collapsed{--sidebar-active-width:var(--sidebar-collapsed-width)}@media (max-width:768px){.app-shell{height:auto;min-height:100vh;overflow:visible auto}}.app-shell.plugin-resource-shell .top-gradient-blur{display:none}.top-gradient-blur{top:0;right:0;left:var(--sidebar-active-width);z-index:998;pointer-events:none;background:linear-gradient(180deg, color-mix(in srgb, var(--bg-secondary) 88%, #0d0c0a) 0%, color-mix(in srgb, var(--bg-secondary) 54%, transparent) 36%, color-mix(in srgb, var(--bg-secondary) 22%, transparent) 66%, transparent 100%);--glass-blur:22px;height:141px;-webkit-backdrop-filter:var(--glass-backdrop-filter);transition:left .3s;position:fixed;-webkit-mask-image:linear-gradient(#000 0%,#000000e6 24%,#00000094 48%,#00000038 72%,#0000 100%);mask-image:linear-gradient(#000 0%,#000000e6 24%,#00000094 48%,#00000038 72%,#0000 100%)}.main-header{z-index:1001;height:var(--header-height);pointer-events:none;background:0 0;border:0;position:fixed;top:0;left:0;right:0}.main-header .sidebar-toggle-floating{top:50%;left:calc(var(--sidebar-active-width) - 12px);border:1px solid color-mix(in srgb, var(--border-color) 78%, transparent);background:var(--bg-primary);width:24px;height:52px;color:color-mix(in srgb, var(--text-secondary) 88%, transparent);cursor:pointer;pointer-events:auto;border-radius:14px;justify-content:center;align-items:center;padding:0;transition:background .15s,border-color .15s,color .15s,transform .15s,left .3s;display:inline-flex;position:fixed;transform:translateY(-50%);box-shadow:4px 0 14px #0000002e,inset 0 1px #ffffff08}.main-header .sidebar-toggle-floating svg{width:14px;height:14px}.main-header .sidebar-toggle-floating:hover{background:color-mix(in srgb, var(--bg-primary) 90%, var(--text-primary) 10%);border-color:color-mix(in srgb, var(--border-hover) 86%, transparent);color:var(--text-primary);transform:translateY(-50%)translate(2px)}.main-header .sidebar-toggle-floating:active{transform:translateY(-50%)translate(0)}.main-header .sidebar-toggle-floating:focus-visible{box-shadow:0 0 0 2px color-mix(in srgb, var(--primary-color) 24%, transparent), 4px 0 14px #0000002e;outline:none}.main-header .mobile-sidebar-actions,.main-header .header-actions{top:var(--shell-gutter);border:1px solid color-mix(in srgb, var(--border-color) 68%, transparent);background:color-mix(in srgb, var(--bg-primary) 68%, transparent);color:var(--text-secondary);--glass-blur:16px;-webkit-backdrop-filter:var(--glass-backdrop-filter);pointer-events:auto;border-radius:16px;align-items:center;gap:4px;padding:6px;display:inline-flex;position:absolute;box-shadow:0 18px 44px #0000002b,inset 0 1px #ffffff0a}.main-header .mobile-sidebar-actions{left:var(--shell-gutter);display:none}.main-header .header-actions{right:var(--shell-gutter)}.main-header .mobile-sidebar-actions .btn,.main-header .header-actions .btn{width:var(--floating-control-size);height:var(--floating-control-size);min-width:var(--floating-control-size);color:var(--text-secondary);background:0 0;border-color:#0000;border-radius:11px;padding:0}.main-header .mobile-sidebar-actions .btn>span,.main-header .header-actions .btn>span{justify-content:center;align-items:center;line-height:0;display:inline-flex}.main-header .mobile-sidebar-actions .btn:hover,.main-header .header-actions .btn:hover{background:color-mix(in srgb, var(--text-primary) 8%, transparent);color:var(--text-primary);border-color:#0000}.main-header .mobile-sidebar-actions .btn:focus-visible{box-shadow:0 0 0 2px color-mix(in srgb, var(--primary-color) 26%, transparent);outline:none}.main-header .header-actions .btn:focus-visible{box-shadow:0 0 0 2px color-mix(in srgb, var(--primary-color) 26%, transparent);outline:none}.main-header .mobile-menu-btn{flex-shrink:0;display:none}.main-header .language-menu,.main-header .theme-menu{align-items:center;display:inline-flex;position:relative}.main-header .language-menu-popover,.main-header .theme-menu-popover{z-index:1002;border:1px solid color-mix(in srgb, var(--border-color) 74%, transparent);background:color-mix(in srgb, var(--bg-primary) 88%, transparent);--glass-blur:16px;-webkit-backdrop-filter:var(--glass-backdrop-filter);position:absolute;top:calc(100% + 12px);right:0;box-shadow:0 20px 48px #00000038}.main-header .language-menu-popover{flex-direction:column;gap:2px;min-width:164px;padding:4px;display:flex}.main-header .language-menu-option{width:100%;color:var(--text-primary);cursor:pointer;background:0 0;border:none;border-radius:4px;justify-content:space-between;align-items:center;padding:8px 10px;font-size:14px;font-weight:500;transition:background-color .15s,color .15s;display:flex}.main-header .language-menu-option:hover{background:color-mix(in srgb, var(--text-primary) 8%, transparent)}.main-header .language-menu-option:focus-visible{background:color-mix(in srgb, var(--text-primary) 8%, transparent);box-shadow:0 0 0 2px color-mix(in srgb, var(--primary-color) 22%, transparent);outline:none}.main-header .language-menu-option.active{color:var(--primary-color);font-weight:600}.main-header .language-menu-check{font-size:13px;line-height:1}.main-header .theme-menu-popover{gap:4px;width:max-content;max-width:calc(100vw - 16px);padding:8px 8px 4px;display:flex}.main-header .theme-card{cursor:pointer;background:0 0;border:2px solid #0000;border-radius:8px;flex-direction:column;align-items:center;gap:4px;padding:6px 6px 4px;transition:border-color .15s,background-color .15s;display:flex}.main-header .theme-card:hover{background:color-mix(in srgb, var(--text-primary) 8%, transparent)}.main-header .theme-card:focus-visible{box-shadow:0 0 0 2px color-mix(in srgb, var(--primary-color) 22%, transparent);outline:none}.main-header .theme-card.active{border-color:var(--primary-color)}.main-header .theme-card-preview{border-radius:4px;flex-direction:column;width:72px;height:52px;display:flex;overflow:hidden}.main-header .theme-card-header{flex-shrink:0;height:10px}.main-header .theme-card-body{flex:1;min-height:0;display:flex}.main-header .theme-card-sidebar{flex-shrink:0;width:16px}.main-header .theme-card-content{flex-direction:column;flex:1;justify-content:center;gap:4px;padding:5px 8px;display:flex}.main-header .theme-card-line{border-radius:1px;height:3px}.main-header .theme-card-line.short{width:60%}.main-header .theme-card-label{color:var(--text-primary);white-space:nowrap;font-size:11px;font-weight:500}.main-header svg{display:block}.main-body{flex:1;gap:0;height:100vh;min-height:0;padding:0;display:flex;position:relative;overflow:hidden}@supports (height:100dvh){.main-body{height:100dvh}}.sidebar-backdrop{opacity:0;pointer-events:none;-webkit-backdrop-filter:blur(4px);background:#08080857;border:0;margin:0;padding:0;transition:opacity .15s;display:none}.sidebar{z-index:999;width:var(--sidebar-panel-width);background:var(--bg-primary);border:0;border-right:1px solid color-mix(in srgb, var(--border-color) 78%, transparent);height:100vh;box-shadow:none;scrollbar-width:none;border-radius:0;flex-direction:column;flex-shrink:0;gap:16px;padding:18px 14px;transition:width .3s,transform .3s,padding .3s;display:flex;position:relative;overflow-y:auto}@supports (height:100dvh){.sidebar{height:100dvh}}.sidebar::-webkit-scrollbar{display:none}.sidebar.collapsed{width:var(--sidebar-collapsed-width);padding:18px 10px}.sidebar.collapsed .sidebar-brand{justify-content:center;padding-left:0;padding-right:0}.sidebar.collapsed .nav-item{justify-content:center;padding:10px}.sidebar.collapsed .nav-group-label{display:none}.sidebar.collapsed .nav-group-divider{display:block}.sidebar.collapsed .nav-drawer-caret{display:none}.sidebar.collapsed .nav-sub-list{border-left:0;margin-left:0;padding-left:0}.sidebar .sidebar-brand{border-bottom:1px solid color-mix(in srgb, var(--border-color) 60%, transparent);min-height:42px;color:var(--text-primary);flex-shrink:0;align-items:center;gap:10px;margin-bottom:4px;padding:4px 10px 14px;display:flex}.sidebar .sidebar-brand-logo{object-fit:contain;width:34px;height:34px;box-shadow:none;border-radius:8px;flex-shrink:0}.sidebar .sidebar-brand-title{min-width:0;color:var(--text-primary);letter-spacing:0;white-space:nowrap;font-size:18px;font-weight:800;overflow:hidden}.sidebar .nav-section{flex-direction:column;flex:1;gap:14px;display:flex}.sidebar .nav-group{flex-direction:column;gap:4px;display:flex}.sidebar .nav-group-bottom{margin-top:auto;padding-top:12px}.sidebar .nav-group-label{letter-spacing:.08em;text-transform:uppercase;color:color-mix(in srgb, var(--text-primary) 42%, transparent);-webkit-user-select:none;user-select:none;padding:0 12px 4px;font-size:10.5px;font-weight:700}.sidebar .nav-group-divider{background:color-mix(in srgb, var(--border-color) 70%, transparent);width:24px;height:1px;margin:4px auto;display:none}.sidebar .nav-drawer{flex-direction:column;gap:4px;display:flex}.sidebar .nav-drawer-toggle{width:100%;font:inherit;text-align:left;background:0 0}.sidebar .nav-drawer-caret{color:color-mix(in srgb, var(--text-primary) 46%, transparent);margin-left:auto;line-height:0;transition:transform .15s}.sidebar .nav-drawer-toggle.open .nav-drawer-caret{transform:rotate(180deg)}.sidebar .nav-sub-list{border-left:1px solid color-mix(in srgb, var(--border-color) 72%, transparent);flex-direction:column;gap:4px;margin-left:21px;padding-left:10px;display:flex}.sidebar .nav-item{color:var(--text-primary);cursor:pointer;border:1px solid #0000;border-radius:11px;align-items:center;gap:8px;padding:9px 12px;font-weight:650;text-decoration:none;transition:background .15s,border-color .15s,color .15s,transform .15s;display:flex}.sidebar .nav-item .nav-icon{color:currentColor;opacity:.96;background:linear-gradient(180deg, #ffffff1f, #fff0), color-mix(in srgb, var(--bg-secondary) 84%, transparent);width:28px;height:28px;box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--border-primary) 82%, transparent);border-radius:8px;flex-shrink:0;justify-content:center;align-items:center;transition:background .15s,box-shadow .15s,color .15s;display:inline-flex}.sidebar .nav-item .nav-icon svg{width:18px;height:18px;display:block}.sidebar .nav-item .nav-icon img{object-fit:cover;border-radius:5px;width:18px;height:18px;display:block}.sidebar .nav-item .nav-text{flex-direction:column;min-width:0;line-height:1.2;display:flex}.sidebar .nav-item .nav-label{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.sidebar .nav-item .nav-meta{color:color-mix(in srgb, var(--text-primary) 50%, transparent);text-overflow:ellipsis;white-space:nowrap;margin-top:2px;font-size:11.5px;font-weight:500;overflow:hidden}.sidebar .nav-item:hover{background:color-mix(in srgb, var(--text-primary) 7%, transparent);border-color:color-mix(in srgb, var(--border-color) 58%, transparent);transform:translate(1px)}.sidebar .nav-item:hover .nav-icon{background:linear-gradient(180deg, #ffffff29, #fff0), color-mix(in srgb, var(--bg-primary) 88%, transparent);box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--border-hover) 86%, transparent)}.sidebar .nav-item:hover .nav-meta{color:color-mix(in srgb, var(--text-primary) 62%, transparent)}.sidebar .nav-item.active{background:color-mix(in srgb, var(--text-primary) 10%, transparent);color:var(--text-primary);border-color:color-mix(in srgb, var(--border-hover) 70%, transparent);box-shadow:inset 0 1px #ffffff0a}.sidebar .nav-item.active .nav-icon{color:var(--primary-active);background:linear-gradient(180deg, #ffffff2e, #fff0), color-mix(in srgb, var(--primary-color) 14%, var(--bg-primary));box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--primary-color) 24%, transparent)}.sidebar .nav-item.active .nav-meta{color:color-mix(in srgb, var(--text-primary) 68%, transparent)}.sidebar .nav-item.nav-sub-item{border-radius:9px;min-height:34px;padding:7px 10px;font-size:13px;font-weight:600}.sidebar .nav-item.nav-sub-item .nav-icon{border-radius:6px;width:18px;height:18px}.sidebar .nav-item .nav-sub-dot{opacity:.62;background:currentColor;border-radius:9999px;width:6px;height:6px}.content{scrollbar-gutter:stable;flex-direction:column;flex:1;min-width:0;height:100vh;display:flex;overflow-y:auto}@supports (height:100dvh){.content{height:100dvh}}.content.content-logs{overflow:hidden}.content.content-plugin-resource{scrollbar-gutter:auto;overflow:hidden}.main-content{flex-direction:column;flex:1 0 auto;gap:24px;min-height:100%;padding:70px clamp(20px,3vw,48px) 40px;display:flex;overflow-x:hidden}.main-content.main-content-logs{flex:auto;min-height:0;overflow:hidden}.main-content.main-content-plugin-resource{background:#fff;flex:auto;gap:0;min-height:0;padding:0;overflow:hidden}.main-content.main-content-plugin-resource .page-transition,.main-content.main-content-plugin-resource .page-transition__layer{background:#fff;gap:0;height:100%}.grid{gap:24px;display:grid}@media (min-width:1024px){.grid.cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width:768px){:root{--header-height:74px;--shell-gutter:12px;--sidebar-panel-width:min(280px, calc(100vw - 24px));--floating-control-size:36px}.top-gradient-blur{height:114px}.main-header .sidebar-toggle-floating{display:none}.main-header .header-actions{top:var(--shell-gutter);right:var(--shell-gutter);max-width:calc(100vw - var(--shell-gutter) - var(--shell-gutter) - var(--floating-control-size) - 14px);border-radius:14px;gap:2px;padding:5px}.main-header .mobile-sidebar-actions{top:var(--shell-gutter);left:var(--shell-gutter);border-radius:14px;gap:2px;padding:5px;display:inline-flex}.main-header .mobile-menu-btn{display:inline-flex}.main-header .language-menu-popover{left:0;right:auto}.main-header .theme-menu-popover{grid-template-columns:repeat(2,minmax(0,1fr));justify-content:stretch;width:min(188px,100vw - 16px);display:grid;left:auto;right:0;transform:none}.main-header .theme-card{width:100%;min-width:0}.main-header .theme-card-label{white-space:normal;text-align:center;line-height:1.2}.main-body{height:auto;min-height:100vh;padding:0;overflow:visible}@supports (min-height:100dvh){.main-body{min-height:100dvh}}.sidebar-backdrop{z-index:999;background:#08080875;display:block;position:fixed;top:0;bottom:0;left:0;right:0}.sidebar-backdrop.visible{opacity:1;pointer-events:auto}.sidebar{z-index:1000;width:var(--sidebar-panel-width);background:var(--bg-primary);border:0;border-right:1px solid color-mix(in srgb, var(--border-color) 78%, transparent);height:auto;box-shadow:none;border-radius:0;position:fixed;top:0;bottom:0;left:0;transform:translate(calc(-100% - 24px))}.sidebar.open{transform:translate(0)}.sidebar.collapsed{width:var(--sidebar-panel-width);padding:18px 14px}.sidebar.collapsed .sidebar-brand,.sidebar.collapsed .nav-item{justify-content:flex-start}.content{height:auto;min-height:100vh;overflow:visible auto}.content.content-logs{height:auto;overflow:visible auto}.content.content-plugin-resource{height:100vh;min-height:100vh;overflow:hidden}@supports (height:100dvh){.content.content-plugin-resource{height:100dvh;min-height:100dvh}}.main-content{padding:calc(var(--header-height) + 16px) 16px 24px}.main-content.main-content-plugin-resource{min-height:0;padding:0;overflow:hidden}.main-content.main-content-logs{flex:none;min-height:auto;overflow:visible}}body{background-color:var(--bg-secondary);color:var(--text-primary);transition:background-color .3s,color .3s}html.modal-open,body.modal-open,body.modal-open .content{overflow:hidden}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:var(--bg-secondary)}::-webkit-scrollbar-thumb{background:var(--border-color);border-radius:9999px}::-webkit-scrollbar-thumb:hover{background:var(--border-hover)}.container{width:100%;max-width:1280px;margin:0 auto;padding:0 16px}.flex-center{justify-content:center;align-items:center;display:flex}.text-ellipsis{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.fade-enter{opacity:0}.fade-enter-active{opacity:1;transition:opacity .3s}.fade-exit{opacity:1}.fade-exit-active{opacity:0;transition:opacity .3s}.Select-module__wrap___8GKsa{align-items:center;display:inline-flex;position:relative}.Select-module__wrapFullWidth___uQ1gt{width:100%}.Select-module__trigger___nKY0l{border:1px solid var(--border-color);background-color:var(--bg-primary);width:100%;height:40px;box-shadow:var(--shadow);color:var(--text-primary);cursor:pointer;-webkit-appearance:none;appearance:none;text-align:left;box-sizing:border-box;border-radius:8px;justify-content:space-between;align-items:center;gap:8px;padding:0 12px;font-size:13px;font-weight:500;display:inline-flex}.Select-module__trigger___nKY0l:hover{border-color:var(--border-hover)}.Select-module__trigger___nKY0l:focus{box-shadow:var(--shadow), 0 0 0 3px #8b86802e;outline:none}.Select-module__trigger___nKY0l[aria-expanded=true]{border-color:var(--primary-color);box-shadow:var(--shadow), 0 0 0 3px #8b86802e}.Select-module__triggerSm___0Ozlc{height:28px;box-shadow:none;padding:0 10px;font-size:12px}.Select-module__triggerText___zQEIp{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.Select-module__placeholder___N04iW{color:var(--text-tertiary)}.Select-module__triggerIcon___ipYKn{color:var(--text-secondary);flex-shrink:0;transition:transform .2s;display:inline-flex}[aria-expanded=true]>.Select-module__triggerIcon___ipYKn{transform:rotate(180deg)}.Select-module__dropdown___6YdcD{background:var(--bg-primary);border:1px solid var(--border-color);box-shadow:var(--shadow-lg);overscroll-behavior:contain;scrollbar-gutter:stable;border-radius:12px;flex-direction:column;gap:4px;max-height:240px;padding:6px;display:flex;position:fixed;overflow-y:auto}.Select-module__option___EKsSG{color:var(--text-primary);cursor:pointer;text-align:left;background:0 0;border:1px solid #0000;border-radius:8px;flex-shrink:0;padding:8px 12px;font-size:13px;font-weight:500;transition:background-color .15s,border-color .15s}.Select-module__option___EKsSG:hover{background:var(--bg-secondary)}.Select-module__optionActive___y280o{background:#8b86801a;border-color:#8b868080;font-weight:600}.Select-module__optionHighlighted___CPa3K{background:var(--bg-secondary)}.SelectionCheckbox-module__root___LiMQt{cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;gap:8px;display:inline-flex;position:relative}.SelectionCheckbox-module__disabled___-T-uP{cursor:not-allowed;opacity:.6}.SelectionCheckbox-module__input___b-Hpm{clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.SelectionCheckbox-module__box___FRD4m{border:1px solid var(--border-color);background:color-mix(in srgb, var(--bg-secondary) 92%, transparent);width:22px;height:22px;color:var(--primary-contrast,#fff);border-radius:7px;flex-shrink:0;justify-content:center;align-items:center;transition:border-color .15s,background-color .15s,box-shadow .15s,transform .15s;display:inline-flex}.SelectionCheckbox-module__root___LiMQt:hover .SelectionCheckbox-module__box___FRD4m{border-color:var(--primary-color);box-shadow:0 0 0 3px color-mix(in srgb, var(--primary-color) 16%, transparent)}.SelectionCheckbox-module__root___LiMQt:active .SelectionCheckbox-module__box___FRD4m{transform:scale(.95)}.SelectionCheckbox-module__disabled___-T-uP:hover .SelectionCheckbox-module__box___FRD4m{border-color:var(--border-color);box-shadow:none}.SelectionCheckbox-module__disabled___-T-uP:active .SelectionCheckbox-module__box___FRD4m{transform:none}.SelectionCheckbox-module__input___b-Hpm:focus-visible+.SelectionCheckbox-module__box___FRD4m{border-color:var(--primary-color);box-shadow:0 0 0 3px color-mix(in srgb, var(--primary-color) 16%, transparent), 0 0 0 1px color-mix(in srgb, var(--primary-color) 50%, transparent)}.SelectionCheckbox-module__boxChecked___4lydu{border-color:var(--primary-color);background:var(--primary-color)}.SelectionCheckbox-module__boxChecked___4lydu svg{stroke-width:2.4px;display:block}.SelectionCheckbox-module__label___twhQj{color:var(--text-primary);font-size:14px;font-weight:500}.LoginPage-module__container___bHtIX{background:var(--bg-secondary);min-height:100vh;display:flex}.LoginPage-module__brandPanel___kKUR5{background:#000;flex-direction:column;flex:1;justify-content:center;align-items:center;padding:48px;display:flex;position:relative;overflow:hidden}@media (max-width:768px){.LoginPage-module__brandPanel___kKUR5{display:none}}.LoginPage-module__brandContent___ZEhbk{z-index:1;flex-direction:column;align-items:flex-end;gap:0;width:100%;padding:0;display:flex;position:relative}@keyframes LoginPage-module__brandFadeIn___tpmGl{0%{opacity:0;transform:translateY(-10px)}to{opacity:var(--target-opacity,.9);transform:translateY(0)}}.LoginPage-module__brandWord___3DkwD{color:#ffffffe6;letter-spacing:-.02em;text-transform:uppercase;text-align:right;opacity:0;padding-right:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:14vw;font-weight:900;line-height:.85;animation:.8s ease-out forwards LoginPage-module__brandFadeIn___tpmGl}.LoginPage-module__brandWord___3DkwD:first-child{--target-opacity:.95;animation-delay:.1s}.LoginPage-module__brandWord___3DkwD:nth-child(2){--target-opacity:.7;animation-delay:.35s}.LoginPage-module__brandWord___3DkwD:nth-child(3){--target-opacity:.45;animation-delay:.6s}.LoginPage-module__formPanel___Nrtrt{background:var(--bg-secondary);flex-direction:column;flex:1;justify-content:center;align-items:center;padding:48px;display:flex;position:relative}@media (max-width:768px){.LoginPage-module__formPanel___Nrtrt{min-height:100vh;padding:24px}}.LoginPage-module__formContent___H8fD-{flex-direction:column;align-items:center;gap:32px;width:100%;max-width:420px;display:flex}.LoginPage-module__logo___ASmao{object-fit:cover;width:80px;height:80px;box-shadow:var(--shadow-lg);border:3px solid var(--border-color);border-radius:12px}.LoginPage-module__loginCard___OgP-R{background:var(--bg-primary);border:1px solid var(--border-color);width:100%;box-shadow:var(--shadow-lg);border-radius:12px;flex-direction:column;gap:24px;padding:32px;display:flex}@media (max-width:768px){.LoginPage-module__loginCard___OgP-R{box-shadow:none;background:0 0;border:none;padding:24px}}.LoginPage-module__loginHeader___3kAvs{text-align:center;flex-direction:column;gap:8px;display:flex}.LoginPage-module__titleRow___9h914{flex-wrap:wrap;justify-content:center;align-items:center;gap:8px;display:flex}.LoginPage-module__title___I-LuY{color:var(--text-primary);font-size:22px;font-weight:800}.LoginPage-module__subtitle___Q41SH{color:var(--text-secondary);font-size:14px}.LoginPage-module__languageSelect___KUNwV{flex:none;min-width:108px}.LoginPage-module__connectionBox___B5--X{background:var(--bg-secondary);border:1px dashed var(--border-color);border-radius:8px;flex-direction:column;gap:4px;padding:16px;display:flex}.LoginPage-module__connectionBox___B5--X .LoginPage-module__label___2fkY-{color:var(--text-secondary);font-size:14px}.LoginPage-module__connectionBox___B5--X .LoginPage-module__value___JFrYC{color:var(--text-primary);word-break:break-all;font-weight:700}.LoginPage-module__connectionBox___B5--X .LoginPage-module__hint___bcz4d{color:var(--text-secondary);font-size:12px}.LoginPage-module__toggleAdvanced___4aKnv{justify-content:flex-start;width:100%;display:flex}.LoginPage-module__toggleLabel___C3t9M{color:var(--text-secondary);font-size:14px;font-weight:500}.LoginPage-module__errorBox___wX1tT{color:#c65746;background:#c657461a;border:1px solid #c6574666;border-radius:8px;padding:8px 16px;font-size:14px}@keyframes LoginPage-module__splashEnter___K-Jk9{0%{opacity:0;transform:scale(.9)translateY(20px)}to{opacity:1;transform:scale(1)translateY(0)}}@keyframes LoginPage-module__splashLogoPulse___DIteW{0%,to{transform:scale(1)}50%{transform:scale(1.05)}}@keyframes LoginPage-module__splashLoading___jAaFC{0%{transform-origin:0;transform:scaleX(0)}50%{transform-origin:0;transform:scaleX(1)}50.01%{transform-origin:100%}to{transform-origin:100%;transform:scaleX(0)}}.LoginPage-module__splashContent___Cc3DZ{flex-direction:column;align-items:center;gap:16px;animation:.6s ease-out LoginPage-module__splashEnter___K-Jk9;display:flex}.LoginPage-module__splashLogo___yzbbw{border-radius:12px;width:auto;height:80px;animation:1.5s ease-in-out infinite LoginPage-module__splashLogoPulse___DIteW;box-shadow:0 10px 15px -3px #0000001a}.LoginPage-module__splashTitle___G-HEP{color:var(--text-primary);letter-spacing:-.5px;margin:0;font-size:28px;font-weight:800}.LoginPage-module__splashSubtitle___BYSQi{color:var(--text-secondary);margin:-8px 0 0;font-size:16px;font-weight:500}.LoginPage-module__splashLoader___SdvUl{background:var(--border-color);border-radius:9999px;width:120px;height:3px;margin-top:16px;overflow:hidden}.LoginPage-module__splashLoaderBar___lyVXw{background:var(--primary-color);border-radius:9999px;width:100%;height:100%;animation:1.2s ease-in-out infinite LoginPage-module__splashLoading___jAaFC}.page-transition{flex-direction:column;flex:auto;min-height:0;display:flex;position:relative;overflow:hidden}.page-transition__layer{background:var(--bg-secondary);-webkit-backface-visibility:hidden;backface-visibility:hidden;flex-direction:column;flex:1;gap:24px;min-height:0;display:flex;transform:translateZ(0)}.page-transition__layer--exit{pointer-events:none;will-change:transform, opacity;position:absolute;top:0;bottom:0;left:0;right:0;overflow:hidden}.page-transition__layer--stacked{display:none}.page-transition__layer--stacked.page-transition__layer--stacked-keep{pointer-events:none;opacity:0;will-change:transform, opacity;display:flex;position:absolute;top:0;bottom:0;left:0;right:0;overflow:hidden}.page-transition--animating .page-transition__layer{will-change:transform, opacity}.page-transition--animating .page-transition__layer:not(.page-transition__layer--exit):not(.page-transition__layer--stacked){position:relative}.DashboardPage-module__dashboard___c-JEy{flex-direction:column;gap:32px;max-width:1000px;margin:0 auto;display:flex;position:relative}.DashboardPage-module__backgroundOrbs___ZlInx{pointer-events:none;z-index:0;opacity:.42;filter:blur(16px);position:absolute;top:0;bottom:0;left:0;right:0;overflow:hidden}.DashboardPage-module__orb1___msZV4{background:radial-gradient(circle, color-mix(in srgb, var(--primary-color) 6%, transparent), transparent 70%);border-radius:50%;width:420px;height:420px;animation:22s ease-in-out infinite alternate DashboardPage-module__orbFloat___zdYrn;position:absolute;top:-140px;right:-80px}.DashboardPage-module__orb2___rkxwt{background:radial-gradient(circle, color-mix(in srgb, var(--success-color) 4%, transparent), transparent 70%);border-radius:50%;width:320px;height:320px;animation:28s ease-in-out infinite alternate-reverse DashboardPage-module__orbFloat___zdYrn;position:absolute;bottom:18%;left:-100px}@keyframes DashboardPage-module__orbFloat___zdYrn{0%{transform:translate(0)scale(1)}to{transform:translate(30px,-20px)scale(1.1)}}.DashboardPage-module__hero___4gtI-{z-index:1;--glass-blur:12px;background:linear-gradient(135deg, color-mix(in srgb, var(--bg-primary) 92%, transparent), color-mix(in srgb, var(--bg-secondary) 80%, transparent));border:1px solid color-mix(in srgb, var(--border-color) 60%, transparent);-webkit-backdrop-filter:var(--glass-backdrop-filter);border-radius:12px;justify-content:space-between;align-items:flex-end;gap:24px;padding:48px 32px;animation:.6s ease-out both DashboardPage-module__heroEnter___LNodk;display:flex;position:relative;overflow:hidden}@media (max-width:768px){.DashboardPage-module__hero___4gtI-{flex-direction:column;align-items:flex-start;padding:32px 24px}}.DashboardPage-module__heroWatermark___eoPCs{letter-spacing:0;text-transform:uppercase;color:var(--text-primary);opacity:.04;white-space:nowrap;pointer-events:none;-webkit-user-select:none;user-select:none;font-size:104px;font-weight:900;line-height:1;animation:.8s ease-out .1s both DashboardPage-module__watermarkEnter___4r-VK;position:absolute;top:50%;left:32px;transform:translateY(-50%)}@media (max-width:768px){.DashboardPage-module__heroWatermark___eoPCs{font-size:58px;left:24px}}@keyframes DashboardPage-module__watermarkEnter___4r-VK{0%{opacity:0;transform:translateY(-50%)translate(-20px)}to{opacity:.04;transform:translateY(-50%)translate(0)}}.DashboardPage-module__heroContent___rRgSn{z-index:1;flex-direction:column;gap:4px;display:flex;position:relative}.DashboardPage-module__heroGreeting___LkC-3{letter-spacing:0;text-transform:uppercase;color:var(--primary-color);font-size:13px;font-weight:600;animation:.5s ease-out .1s both DashboardPage-module__fadeSlideUp___svgeE}.DashboardPage-module__heroTitle___583C6{letter-spacing:0;color:var(--text-primary);margin:0;font-size:44px;font-weight:800;line-height:1.1;animation:.5s ease-out .2s both DashboardPage-module__fadeSlideUp___svgeE}@media (max-width:768px){.DashboardPage-module__heroTitle___583C6{font-size:34px}}.DashboardPage-module__heroCaring___4RIkE{color:var(--text-secondary);margin:4px 0 0;font-size:15px;line-height:1.5;animation:.5s ease-out .3s both DashboardPage-module__fadeSlideUp___svgeE}.DashboardPage-module__heroMeta___-2WgN{z-index:1;flex-direction:column;flex-shrink:0;align-items:flex-end;gap:8px;animation:.5s ease-out .35s both DashboardPage-module__fadeSlideUp___svgeE;display:flex;position:relative}@media (max-width:768px){.DashboardPage-module__heroMeta___-2WgN{flex-flow:wrap;align-items:flex-start;gap:8px}}.DashboardPage-module__dateTimeBlock___nv-GA{flex-direction:column;align-items:flex-end;gap:2px;display:flex}@media (max-width:768px){.DashboardPage-module__dateTimeBlock___nv-GA{align-items:flex-start}}.DashboardPage-module__time___r-JWY{color:var(--text-primary);font-variant-numeric:tabular-nums;font-size:22px;font-weight:700;line-height:1.2}.DashboardPage-module__date___fd2-M{color:var(--text-secondary);font-size:12px}.DashboardPage-module__connectionPill___Jf-zm{--glass-blur:8px;background:var(--glass-bg-secondary);border:1px solid var(--glass-border);-webkit-backdrop-filter:var(--glass-backdrop-filter);border-radius:9999px;align-items:center;gap:6px;padding:5px 12px;font-size:12px;display:inline-flex}.DashboardPage-module__statusDot___4w7W-{background:#9ca3af;border-radius:50%;flex-shrink:0;width:8px;height:8px}.DashboardPage-module__statusDot___4w7W-.DashboardPage-module__connected___CeELY{background:#10b981;box-shadow:0 0 6px #10b98180}.DashboardPage-module__statusDot___4w7W-.DashboardPage-module__connecting___j03PZ{background:#c65746;animation:1s ease-in-out infinite DashboardPage-module__pulse___GLJju}.DashboardPage-module__statusDot___4w7W-.DashboardPage-module__disconnected___3l11q{background:#c65746}.DashboardPage-module__pillText___HO7gg{color:var(--text-primary);font-weight:600}.DashboardPage-module__buildDate___zr4hY{color:var(--text-tertiary);text-align:right;font-size:11px}@media (max-width:768px){.DashboardPage-module__buildDate___zr4hY{text-align:left}}.DashboardPage-module__statsSection___E5LH9{z-index:1;position:relative}.DashboardPage-module__sectionHeading___j2-4e{text-transform:uppercase;letter-spacing:0;color:var(--text-tertiary);margin:0 0 16px;font-size:12px;font-weight:700}.DashboardPage-module__bentoGrid___L3GMN{grid-template-rows:auto auto;grid-template-columns:repeat(3,1fr);gap:16px;display:grid}@media (max-width:900px){.DashboardPage-module__bentoGrid___L3GMN{grid-template-columns:repeat(2,1fr)}}@media (max-width:500px){.DashboardPage-module__bentoGrid___L3GMN{grid-template-columns:1fr}}.DashboardPage-module__bentoCard___fZ0NR{background:linear-gradient(145deg, color-mix(in srgb, var(--bg-primary) 86%, transparent), color-mix(in srgb, var(--bg-secondary) 72%, transparent));border:1px solid color-mix(in srgb, var(--border-color) 66%, transparent);--glass-blur:12px;-webkit-backdrop-filter:var(--glass-backdrop-filter);border-radius:12px;flex-direction:column;gap:16px;padding:24px;text-decoration:none;transition:border-color .15s,box-shadow .15s,transform .15s;animation:.4s ease-out both DashboardPage-module__cardEnter___TzYj-;display:flex;box-shadow:0 18px 42px #0000001f,inset 0 1px #ffffff08}.DashboardPage-module__bentoCard___fZ0NR:hover{border-color:color-mix(in srgb, var(--border-hover) 82%, transparent);transform:translateY(-2px);box-shadow:0 22px 48px #00000029,inset 0 1px #ffffff0a}.DashboardPage-module__bentoLarge___OI8ha{background:linear-gradient(160deg, color-mix(in srgb, var(--primary-color) 8%, var(--bg-primary)), color-mix(in srgb, var(--bg-primary) 84%, transparent));grid-row:1/3;justify-content:center}.DashboardPage-module__bentoLarge___OI8ha .DashboardPage-module__bentoValue___4z4aG{font-size:44px}.DashboardPage-module__bentoLarge___OI8ha .DashboardPage-module__bentoIcon___yMz7f{width:56px;height:56px}@media (max-width:900px){.DashboardPage-module__bentoLarge___OI8ha{grid-row:auto}.DashboardPage-module__bentoLarge___OI8ha .DashboardPage-module__bentoValue___4z4aG{font-size:32px}.DashboardPage-module__bentoLarge___OI8ha .DashboardPage-module__bentoIcon___yMz7f{width:44px;height:44px}}.DashboardPage-module__bentoIcon___yMz7f{background:color-mix(in srgb, var(--primary-color) 10%, var(--bg-secondary));width:44px;height:44px;color:var(--primary-color);border-radius:8px;justify-content:center;align-items:center;transition:background .15s;display:flex}.DashboardPage-module__bentoCard___fZ0NR:hover .DashboardPage-module__bentoIcon___yMz7f{background:color-mix(in srgb, var(--primary-color) 16%, var(--bg-secondary))}.DashboardPage-module__bentoContent___7qrNg{flex-direction:column;gap:2px;display:flex}.DashboardPage-module__bentoValue___4z4aG{color:var(--text-primary);font-variant-numeric:tabular-nums;font-size:28px;font-weight:800;line-height:1.2}.DashboardPage-module__bentoLabel___s0-b2{color:var(--text-secondary);font-size:13px}.DashboardPage-module__bentoSublabel___LRcJB{color:var(--text-secondary);opacity:.7;margin-top:2px;font-size:11px}.DashboardPage-module__configSection___G0W4F{z-index:1;flex-direction:column;gap:16px;animation:.4s ease-out .5s both DashboardPage-module__cardEnter___TzYj-;display:flex;position:relative}.DashboardPage-module__configPillGrid___Ie76m{flex-wrap:wrap;gap:8px;display:flex}.DashboardPage-module__configPill___C2Adr{background:color-mix(in srgb, var(--bg-primary) 68%, transparent);border:1px solid color-mix(in srgb, var(--border-color) 68%, transparent);--glass-blur:10px;-webkit-backdrop-filter:var(--glass-backdrop-filter);border-radius:9999px;align-items:center;gap:8px;padding:6px 14px;font-size:13px;transition:border-color .15s;display:inline-flex}.DashboardPage-module__configPill___C2Adr:hover{border-color:color-mix(in srgb, var(--border-hover) 82%, transparent)}.DashboardPage-module__configPillWide___2Bkpx{border-radius:8px;flex-basis:100%}.DashboardPage-module__configPillLabel___eK-LR{color:var(--text-secondary);white-space:nowrap}.DashboardPage-module__configPillValue___k6VI3{color:var(--text-primary);font-weight:600}.DashboardPage-module__configPillValue___k6VI3.DashboardPage-module__on___kqLdD{color:#10b981}.DashboardPage-module__configPillValue___k6VI3.DashboardPage-module__off___gkz6F{color:var(--text-secondary)}.DashboardPage-module__configPillMono___pEsgq{color:var(--text-secondary);word-break:break-all;font-family:Courier New,Courier,monospace;font-size:12px}.DashboardPage-module__configBadge___TrJTP{border:1px solid var(--border-color);text-overflow:ellipsis;white-space:nowrap;border-radius:9999px;justify-content:center;align-items:center;max-width:100%;padding:2px 8px;font-size:11px;font-weight:600;line-height:1.2;display:inline-flex;overflow:hidden}.DashboardPage-module__configBadgeRoundRobin___wgPLB{color:var(--primary-color);background:#8b86801f;border-color:#8b86803d}.DashboardPage-module__configBadgeFillFirst___N5vai{color:#10b981;background:#10b9811f;border-color:#10b9814d}.DashboardPage-module__configBadgeUnknown___Jo3zP{color:var(--text-secondary);background:var(--bg-primary)}.DashboardPage-module__viewMoreLink___wKvoJ{color:var(--primary-color);align-items:center;margin-top:4px;font-size:13px;text-decoration:none;transition:color .15s;display:inline-flex}.DashboardPage-module__viewMoreLink___wKvoJ:hover{color:var(--primary-hover);text-decoration:underline}@keyframes DashboardPage-module__heroEnter___LNodk{0%{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}@keyframes DashboardPage-module__fadeSlideUp___svgeE{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes DashboardPage-module__cardEnter___TzYj-{0%{opacity:0;transform:translateY(16px)scale(.98)}to{opacity:1;transform:translateY(0)scale(1)}}@keyframes DashboardPage-module__pulse___GLJju{0%,to{opacity:1}50%{opacity:.5}}.Skeleton-module__skeleton___XePp7{background:linear-gradient(90deg, var(--bg-tertiary) 0%, var(--bg-hover) 50%, var(--bg-tertiary) 100%);border-radius:var(--radius-md);background-size:200% 100%;animation:1.5s ease-in-out infinite Skeleton-module__shimmer___vu211;display:block}@keyframes Skeleton-module__shimmer___vu211{0%{background-position:200% 0}to{background-position:-200% 0}}@media (prefers-reduced-motion:reduce){.Skeleton-module__skeleton___XePp7{background:var(--bg-tertiary);animation:none}}.ProviderHeaderCard-module__card___-vito{flex-direction:column;gap:12px;display:flex}.ProviderHeaderCard-module__row___8x7Kv{flex-direction:column;gap:16px;display:flex}@media (min-width:1024px){.ProviderHeaderCard-module__row___8x7Kv{flex-direction:row;justify-content:space-between;align-items:center}}.ProviderHeaderCard-module__titleArea___wB2EB{flex-direction:column;gap:6px;min-width:0;display:flex}.ProviderHeaderCard-module__title___gZU4U{color:var(--text-primary);margin:0;font-size:30px;font-weight:700}.ProviderHeaderCard-module__subtitle___ahXHM{color:var(--muted-foreground);margin:0;font-size:14px;line-height:1.5}.ProviderHeaderCard-module__actions___mjRJJ{flex-wrap:wrap;align-items:center;gap:8px;display:flex}@media (min-width:1024px){.ProviderHeaderCard-module__actions___mjRJJ{justify-content:flex-end}}.ProviderHeaderCard-module__btn___V-Ldg{border-radius:var(--radius-md);cursor:pointer;height:34px;color:var(--text-primary);background:0 0;border:1px solid #0000;align-items:center;gap:6px;padding:0 14px;font-size:14px;font-weight:500;transition:background-color .15s,border-color .15s,color .15s;display:inline-flex}.ProviderHeaderCard-module__btn___V-Ldg:disabled{opacity:.6;cursor:not-allowed}.ProviderHeaderCard-module__btn___V-Ldg:focus-visible{outline:2px solid var(--primary-color);outline-offset:2px}.ProviderHeaderCard-module__btnOutline___P7piG{border-color:var(--border-color);background:var(--bg-primary)}.ProviderHeaderCard-module__btnOutline___P7piG:hover:not(:disabled){background:var(--bg-tertiary);border-color:var(--border-hover)}.ProviderHeaderCard-module__btnPrimary___-U6YA{background:var(--primary-color);color:var(--primary-contrast)}.ProviderHeaderCard-module__btnPrimary___-U6YA:hover:not(:disabled){background:var(--primary-hover)}.ProviderHeaderCard-module__btnPrimary___-U6YA:active:not(:disabled){background:var(--primary-active)}.ProviderHeaderCard-module__chips___kt9b-{flex-wrap:wrap;gap:8px;display:flex}.ProviderHeaderCard-module__chip___U2QSK{border-radius:var(--radius-md);border:1px solid var(--border-color);background:var(--muted-bg);color:var(--muted-foreground);align-items:center;gap:6px;padding:5px 12px;font-size:13px;font-weight:500;display:inline-flex}.ProviderHeaderCard-module__chipPrimary___u8TVQ{border-color:var(--primary-30);background:var(--primary-10);color:var(--primary-color)}.ProviderHeaderCard-module__chipAmber___1vTiO{border-color:var(--amber-30);background:var(--amber-10);color:var(--amber-text)}.ProviderHeaderCard-module__spin___JVOx1{animation:.9s linear infinite ProviderHeaderCard-module__pwc-spin___Ehj71;display:inline-flex}.ProviderHeaderCard-module__btnIcon___zQlLw{align-items:center;display:inline-flex}@keyframes ProviderHeaderCard-module__pwc-spin___Ehj71{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ProviderCategoryList-module__aside___PBIjb{background:var(--bg-primary);border:1px solid var(--border-color);box-shadow:var(--shadow);border-radius:12px;min-width:0;padding:12px}.ProviderCategoryList-module__eyebrow___oNTkj{letter-spacing:.05em;text-transform:uppercase;color:var(--muted-foreground);margin:4px 8px 8px;font-size:12px;font-weight:500}.ProviderCategoryList-module__list___i2RZA{flex-direction:column;gap:4px;display:flex}.ProviderCategoryList-module__item___WRCng{border-radius:var(--radius-md);cursor:pointer;text-align:left;width:100%;color:var(--text-primary);background:0 0;border:1px solid #0000;justify-content:space-between;align-items:center;gap:12px;min-width:0;padding:10px 12px;transition:background-color .15s,border-color .15s,color .15s;display:flex}.ProviderCategoryList-module__item___WRCng:hover:not(.ProviderCategoryList-module__active___MLw6R){background:color-mix(in srgb, var(--accent-bg) 50%, transparent);border-color:var(--border-color)}.ProviderCategoryList-module__item___WRCng:focus-visible{outline:2px solid var(--primary-color);outline-offset:-2px}.ProviderCategoryList-module__item___WRCng.ProviderCategoryList-module__active___MLw6R{border-color:var(--primary-30);background:var(--primary-10);color:var(--primary-color)}.ProviderCategoryList-module__itemLeft___z9fEi{flex:1;align-items:center;gap:10px;min-width:0;display:flex}.ProviderCategoryList-module__logo___8TKKa{border-radius:var(--radius-md);object-fit:contain;background:var(--bg-tertiary);flex-shrink:0;width:26px;height:26px;padding:2px}[data-theme=dark] .ProviderCategoryList-module__logoInvertOnDark___4YQXt{filter:invert()hue-rotate(180deg)}.ProviderCategoryList-module__itemText___YV93M{flex-direction:column;min-width:0;display:flex}.ProviderCategoryList-module__itemTitle___tWmJK{white-space:nowrap;text-overflow:ellipsis;font-size:14px;font-weight:500;overflow:hidden}.ProviderCategoryList-module__itemSubtitle___hUfT0{color:var(--muted-foreground);margin-top:2px;font-size:12px;font-weight:400}.ProviderCategoryList-module__active___MLw6R .ProviderCategoryList-module__itemSubtitle___hUfT0{color:var(--primary-color);opacity:.85}.ProviderCategoryList-module__badge___mYck8{border-radius:var(--radius-md);background:var(--bg-primary);border:1px solid var(--border-color);min-width:26px;color:var(--muted-foreground);flex-shrink:0;justify-content:center;align-items:center;padding:2px 9px;font-size:12px;font-weight:500;display:inline-flex}.ProviderCategoryList-module__badgeAmber___n2AT5{background:var(--amber-10);border-color:var(--amber-30);color:var(--amber-text)}.Table-module__wrap___BoMJd{border:1px solid var(--border-color);border-radius:var(--radius-md);background:var(--bg-primary);overflow:hidden}.Table-module__scroll___hyI-i{overflow-x:auto}.Table-module__table___2tzS9{border-collapse:separate;border-spacing:0;width:100%;color:var(--text-primary);font-size:13px}.Table-module__head___exzqF{background:var(--muted-bg)}.Table-module__head___exzqF th{color:var(--muted-foreground);text-align:left;border-bottom:1px solid var(--border-color);vertical-align:middle;padding:10px 14px;font-size:12px;font-weight:500}.Table-module__head___exzqF th.Table-module__alignRight___sq06f{text-align:right}.Table-module__body___7J59-{background:var(--bg-primary)}.Table-module__row___jJz3d{transition:background-color .15s}.Table-module__row___jJz3d td{border-bottom:1px solid var(--border-color);vertical-align:top;padding:12px 14px;line-height:1.5}.Table-module__row___jJz3d:hover td{background:color-mix(in srgb, var(--accent-bg) 50%, transparent)}.Table-module__row___jJz3d.Table-module__selected___-MWZq td{background:var(--primary-8)}.Table-module__body___7J59- .Table-module__row___jJz3d:last-child td{border-bottom:none}.Table-module__alignRight___sq06f{text-align:right}.ToggleSwitch-module__root___IUqKD{cursor:pointer;align-items:center;gap:8px;display:inline-flex;position:relative}.ToggleSwitch-module__labelLeft___Pc6fJ .ToggleSwitch-module__label___4iQkR{order:-1}.ToggleSwitch-module__disabled___GNGHj{cursor:not-allowed}.ToggleSwitch-module__root___IUqKD input{opacity:0;width:0;height:0;position:absolute}.ToggleSwitch-module__track___zFtXx{background:var(--border-color);border-radius:9999px;width:44px;height:24px;transition:background .15s;position:relative}.ToggleSwitch-module__thumb___gQ45C{background:#fff;border-radius:9999px;width:18px;height:18px;transition:transform .15s;position:absolute;top:3px;left:3px;box-shadow:0 1px 2px #0000000d}.ToggleSwitch-module__root___IUqKD input:checked+.ToggleSwitch-module__track___zFtXx{background:var(--primary-color)}.ToggleSwitch-module__root___IUqKD input:checked+.ToggleSwitch-module__track___zFtXx .ToggleSwitch-module__thumb___gQ45C{transform:translate(20px)}.ToggleSwitch-module__label___4iQkR{color:var(--text-primary);font-weight:600}.ProviderResourceTable-module__primaryCell___fLp9r{flex-direction:column;gap:4px;min-width:0;display:flex}.ProviderResourceTable-module__primaryName___dfYeV{color:var(--text-primary);text-overflow:ellipsis;white-space:nowrap;max-width:220px;font-weight:500;overflow:hidden}.ProviderResourceTable-module__primarySub___QABoS,.ProviderResourceTable-module__baseUrl___FNjG7{color:var(--muted-foreground);text-overflow:ellipsis;white-space:nowrap;max-width:220px;font-family:Courier New,Courier,monospace;font-size:12px;overflow:hidden}.ProviderResourceTable-module__chip___U7kQV{border-radius:var(--radius-md);border:1px solid var(--border-color);background:var(--muted-bg);color:var(--muted-foreground);align-items:center;padding:3px 9px;font-size:12px;display:inline-flex}.ProviderResourceTable-module__metricsCell___1OlzF{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.ProviderResourceTable-module__metric___aEHez{border-radius:var(--radius-md);border:1px solid var(--border-color);background:var(--muted-bg);white-space:nowrap;align-items:center;gap:4px;padding:3px 9px;font-size:12px;line-height:1.4;display:inline-flex}.ProviderResourceTable-module__metricLabel___t8rAu{color:var(--muted-foreground)}.ProviderResourceTable-module__metricValue___VTEWB{color:var(--text-primary);font-variant-numeric:tabular-nums;font-weight:600}.ProviderResourceTable-module__flagTag___2i4Y4{border-radius:var(--radius-md);border:1px solid var(--primary-30);background:var(--primary-10);color:var(--primary-color);white-space:nowrap;align-items:center;padding:3px 9px;font-size:12px;font-weight:500;line-height:1.4;display:inline-flex}.ProviderResourceTable-module__statusBadge___dk8Hi{border-radius:var(--radius-md);white-space:nowrap;border:1px solid;align-items:center;gap:4px;padding:3px 9px;font-size:12px;font-weight:500;display:inline-flex}.ProviderResourceTable-module__statusCell___8599N{flex-direction:column;align-items:flex-start;gap:6px;min-width:0;display:flex}.ProviderResourceTable-module__stats___73Ql1{flex-wrap:wrap;gap:6px;display:flex}.ProviderResourceTable-module__statPill___-ANv0{white-space:nowrap;font-variant-numeric:tabular-nums;border:1px solid #0000;border-radius:999px;align-items:center;gap:4px;padding:3px 9px;font-size:12px;font-weight:600;line-height:1.4;display:inline-flex}.ProviderResourceTable-module__statSuccess___LrHac{background-color:var(--success-badge-bg);color:var(--success-badge-text);border-color:var(--success-badge-border)}.ProviderResourceTable-module__statFailure___yGMe3{background-color:var(--failure-badge-bg);color:var(--failure-badge-text);border-color:var(--failure-badge-border)}.ProviderResourceTable-module__statusActive___Zw5FB{border-color:var(--success-badge-border);background:var(--success-badge-bg);color:var(--success-badge-text)}.ProviderResourceTable-module__statusDisabled___BKP-G{border-color:var(--amber-30);background:var(--amber-10);color:var(--amber-text)}.ProviderResourceTable-module__actions___4j-hn{justify-content:flex-end;align-items:center;gap:4px;display:flex}.ProviderResourceTable-module__toggleWrap___1u1Vz{align-items:center;margin-right:4px;display:inline-flex}.ProviderResourceTable-module__iconBtn___RYOTP{border-radius:var(--radius-md);width:30px;height:30px;color:var(--text-secondary);cursor:pointer;background:0 0;border:1px solid #0000;justify-content:center;align-items:center;padding:0;transition:background-color .15s,color .15s;display:inline-flex}.ProviderResourceTable-module__iconBtn___RYOTP:hover:not(:disabled){background:var(--bg-tertiary);color:var(--text-primary)}.ProviderResourceTable-module__iconBtn___RYOTP:disabled{opacity:.5;cursor:not-allowed}.ProviderResourceTable-module__iconBtn___RYOTP:focus-visible{outline:2px solid var(--primary-color);outline-offset:-1px}.ProviderResourceTable-module__iconBtnDanger___OCat1{color:var(--destructive-color)}.ProviderResourceTable-module__iconBtnDanger___OCat1:hover:not(:disabled){background:var(--destructive-10);color:var(--destructive-color)}.providerStatusBar-module__statusBar___CO-2Q{align-items:center;gap:6px;max-width:100%;display:flex}.providerStatusBar-module__statusBlocks___GUtae{flex:1;gap:2px;min-width:120px;display:flex;position:relative}.providerStatusBar-module__statusBlockWrapper___7PmJZ{cursor:pointer;-webkit-tap-highlight-color:transparent;flex:1;min-width:4px;position:relative}.providerStatusBar-module__statusBlock___Bo-Dp{border-radius:2px;width:100%;height:6px;transition:transform .15s,opacity .15s}.providerStatusBar-module__statusBlockWrapper___7PmJZ:hover .providerStatusBar-module__statusBlock___Bo-Dp,.providerStatusBar-module__statusBlockWrapper___7PmJZ.providerStatusBar-module__statusBlockActive___FgyJm .providerStatusBar-module__statusBlock___Bo-Dp{opacity:.9;transform:scaleY(1.8)}.providerStatusBar-module__statusBlockIdle___SNDuL{background-color:var(--border-color)}.providerStatusBar-module__statusTooltip___pI78F{background:var(--bg-primary);border:1px solid var(--border-color);white-space:nowrap;z-index:1000;pointer-events:none;color:var(--text-primary);border-radius:6px;padding:6px 10px;font-size:12px;line-height:1.5;position:absolute;bottom:calc(100% + 8px);left:50%;transform:translate(-50%);box-shadow:0 4px 12px #0000001f}.providerStatusBar-module__statusTooltip___pI78F:after{content:"";border:5px solid #0000;border-top-color:var(--bg-primary);position:absolute;top:100%;left:50%;transform:translate(-50%)}.providerStatusBar-module__statusTooltip___pI78F:before{content:"";border:6px solid #0000;border-top-color:var(--border-color);position:absolute;top:100%;left:50%;transform:translate(-50%)}.providerStatusBar-module__statusTooltipLeft___ZskB1{left:0;transform:translate(0)}.providerStatusBar-module__statusTooltipLeft___ZskB1:after,.providerStatusBar-module__statusTooltipLeft___ZskB1:before{left:8px;transform:none}.providerStatusBar-module__statusTooltipRight___Ajuc0{left:auto;right:0;transform:translate(0)}.providerStatusBar-module__statusTooltipRight___Ajuc0:after,.providerStatusBar-module__statusTooltipRight___Ajuc0:before{left:auto;right:8px;transform:none}.providerStatusBar-module__tooltipTime___u6zEq{color:var(--text-secondary);margin-bottom:2px;display:block}.providerStatusBar-module__tooltipStats___uvspI{align-items:center;gap:8px;display:flex}.providerStatusBar-module__tooltipSuccess___km1zF{color:var(--success-color,#22c55e)}.providerStatusBar-module__tooltipFailure___rNWH9{color:var(--danger-color,#ef4444)}.providerStatusBar-module__tooltipRate___YZaf1{color:var(--text-secondary);margin-left:2px}.providerStatusBar-module__statusRate___gq06G{white-space:nowrap;background:var(--bg-tertiary);color:var(--text-secondary);font-variant-numeric:tabular-nums;border-radius:4px;align-items:center;padding:2px 7px;font-size:12px;font-weight:600;display:inline-flex}.providerStatusBar-module__statusRateHigh___Q976x{color:var(--success-badge-text,#065f46);background:var(--success-badge-bg,#d1fae5)}.providerStatusBar-module__statusRateMedium___ExaLs{color:var(--warning-text,#92400e);background:var(--warning-bg,#fef3c7)}.providerStatusBar-module__statusRateLow___iNJnD{color:var(--failure-badge-text);background:var(--failure-badge-bg)}.ProviderResourceToolbar-module__root___3OtVO{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.ProviderResourceToolbar-module__sortGroup___Owd8u{align-items:center;gap:6px;display:flex}.ProviderResourceToolbar-module__label___Xpn6H{color:var(--muted-foreground);white-space:nowrap;font-size:12px}.ProviderResourceToolbar-module__dirBtn___Si6-Q{border-radius:var(--radius-md);border:1px solid var(--border-color);background:var(--bg-primary);width:30px;height:30px;color:var(--text-secondary);cursor:pointer;justify-content:center;align-items:center;transition:background-color .15s,color .15s;display:inline-flex}.ProviderResourceToolbar-module__dirBtn___Si6-Q:hover{background:var(--bg-tertiary);color:var(--text-primary)}.ProviderResourceToolbar-module__filterGroup___GCSLL{position:relative}.ProviderResourceToolbar-module__filterTrigger___7nyg5{border-radius:var(--radius-md);border:1px solid var(--border-color);background:var(--bg-primary);height:30px;color:var(--text-primary);cursor:pointer;align-items:center;gap:6px;padding:0 11px;font-size:13px;transition:background-color .15s,border-color .15s;display:inline-flex}.ProviderResourceToolbar-module__filterTrigger___7nyg5:hover:not(:disabled){border-color:var(--primary-color);color:var(--primary-color)}.ProviderResourceToolbar-module__filterTrigger___7nyg5:disabled{opacity:.6;cursor:not-allowed}.ProviderResourceToolbar-module__filterPanel___By-o1{z-index:1000;background:var(--bg-primary);border:1px solid var(--border-color);border-radius:var(--radius-md);flex-direction:column;gap:6px;min-width:220px;max-width:320px;padding:8px;display:flex;position:absolute;top:calc(100% + 6px);right:0;box-shadow:0 8px 20px #00000014}.ProviderResourceToolbar-module__filterToolbar___rAN5t{justify-content:flex-end;align-items:center;gap:6px;display:flex}.ProviderResourceToolbar-module__filterToolbarBtn___H8kEF{border-radius:var(--radius-md);border:1px solid var(--border-color);background:var(--bg-primary);color:var(--text-secondary);cursor:pointer;padding:3px 9px;font-size:12px}.ProviderResourceToolbar-module__filterToolbarBtn___H8kEF:hover:not(:disabled){border-color:var(--primary-color);color:var(--primary-color)}.ProviderResourceToolbar-module__filterToolbarBtn___H8kEF:disabled{opacity:.5;cursor:not-allowed}.ProviderResourceToolbar-module__filterEmpty___YoLaV{text-align:center;color:var(--muted-foreground);padding:12px;font-size:13px}.ProviderResourceToolbar-module__filterList___bLUS8{flex-direction:column;gap:2px;max-height:220px;margin:0;padding:0;list-style:none;display:flex;overflow-y:auto}.ProviderResourceToolbar-module__filterItem___ayJYT{border-radius:var(--radius-sm);padding:4px 6px}.ProviderResourceToolbar-module__filterItem___ayJYT:hover{background:var(--bg-tertiary)}.ProviderResourceToolbar-module__filterItemLabel___WgP0a{word-break:break-all;font-family:Courier New,Courier,monospace;font-size:13px}.ProviderResourcePanel-module__panel___CMeiX{background:var(--bg-primary);border:1px solid var(--border-color);box-shadow:var(--shadow);border-radius:12px;flex-direction:column;gap:16px;min-width:0;padding:20px;display:flex}.ProviderResourcePanel-module__header___Ud2jP,.ProviderResourcePanel-module__headerMain___aGFKi{flex-direction:column;gap:12px;display:flex}@media (min-width:768px){.ProviderResourcePanel-module__headerMain___aGFKi{flex-direction:row;justify-content:space-between;align-items:flex-start}}.ProviderResourcePanel-module__headerToolbarRow___lBCoP{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px;display:flex}.ProviderResourcePanel-module__titleArea___SIpoX{flex-direction:column;min-width:0;display:flex}.ProviderResourcePanel-module__titleRow___T1AfI{align-items:center;gap:12px;display:flex}.ProviderResourcePanel-module__logo___7eyxv{border-radius:var(--radius-md);object-fit:contain;flex-shrink:0;width:26px;height:26px}[data-theme=dark] .ProviderResourcePanel-module__logoInvertOnDark___yeOZu{filter:invert()hue-rotate(180deg)}.ProviderResourcePanel-module__title___Zw2Hc{color:var(--text-primary);letter-spacing:-.005em;margin:0;font-size:22px;font-weight:600}.ProviderResourcePanel-module__searchWrap___95CD5{min-width:0;position:relative}@media (min-width:768px){.ProviderResourcePanel-module__searchWrap___95CD5{width:280px}}.ProviderResourcePanel-module__searchInput___TA7QZ{border-radius:var(--radius-md);border:1px solid var(--border-color);background:var(--bg-primary);width:100%;height:38px;color:var(--text-primary);box-sizing:border-box;padding:0 12px 0 38px;font-size:14px}.ProviderResourcePanel-module__searchInput___TA7QZ::placeholder{color:var(--text-tertiary)}.ProviderResourcePanel-module__searchInput___TA7QZ:focus{border-color:var(--primary-color);box-shadow:0 0 0 3px var(--primary-10);outline:none}.ProviderResourcePanel-module__searchIcon___u6sCR{color:var(--muted-foreground);pointer-events:none;display:inline-flex;position:absolute;top:50%;left:13px;transform:translateY(-50%)}.ProviderResourcePanel-module__empty___1gkyi{border:1px dashed var(--border-color);border-radius:var(--radius-md);text-align:center;color:var(--muted-foreground);padding:32px;font-size:14px}.ProviderResourcePanel-module__emptyAction___EzR3x{margin-top:12px}.Sheet-module__overlay___z8D5E{opacity:0;z-index:2000;background:#00000080;justify-content:flex-end;transition:opacity .2s;display:flex;position:fixed;top:0;bottom:0;left:0;right:0}.Sheet-module__overlay___z8D5E.Sheet-module__entering___-FNfE{opacity:1}.Sheet-module__overlay___z8D5E.Sheet-module__exiting___q7zPi{opacity:0}.Sheet-module__content___ITPBZ{background:var(--bg-primary);border-left:1px solid var(--border-color);box-shadow:var(--floating-shadow);outline:none;flex-direction:column;height:100%;transition:transform .28s cubic-bezier(.32,.72,0,1);display:flex;position:relative;transform:translate(100%)}.Sheet-module__content___ITPBZ.Sheet-module__entering___-FNfE{transform:translate(0)}.Sheet-module__content___ITPBZ.Sheet-module__exiting___q7zPi{transform:translate(100%)}.Sheet-module__sizeMd___ziRMr{width:min(640px,100vw)}.Sheet-module__sizeLg___32pg7{width:min(720px,100vw)}.Sheet-module__sizeXl___AvWCt{width:min(960px,100vw)}.Sheet-module__header___cUB1H{border-bottom:1px solid var(--border-color);flex-direction:column;flex-shrink:0;gap:4px;padding:20px 56px 20px 24px;display:flex}.Sheet-module__eyebrow___Duxhe{text-transform:uppercase;letter-spacing:.05em;color:var(--muted-foreground);font-size:11px;font-weight:500}.Sheet-module__title___1-JZS{color:var(--text-primary);margin:0;font-size:18px;font-weight:600}.Sheet-module__description___Xg2Ae{color:var(--muted-foreground);margin:0;font-size:13px;line-height:1.5}.Sheet-module__body___Aso8V{flex:1;padding:24px;overflow-y:auto}.Sheet-module__footer___kLZWM{border-top:1px solid var(--border-color);flex-wrap:wrap;flex-shrink:0;justify-content:flex-end;align-items:center;gap:12px;padding:16px 24px;display:flex}.Sheet-module__closeBtn___s0cgQ{width:32px;height:32px;color:var(--text-secondary);border-radius:var(--radius-md);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;transition:background-color .15s,color .15s;display:flex;position:absolute;top:14px;right:14px}.Sheet-module__closeBtn___s0cgQ:hover{background:var(--bg-tertiary);color:var(--text-primary)}.Sheet-module__closeBtn___s0cgQ:focus-visible{outline:2px solid var(--primary-color);outline-offset:2px}@media (max-width:640px){.Sheet-module__content___ITPBZ{border-left:none;width:100vw!important}.Sheet-module__header___cUB1H{padding:16px 52px 16px 16px}.Sheet-module__body___Aso8V{padding:16px}.Sheet-module__footer___kLZWM{padding:12px 16px}}.Collapsible-module__root___pblku{border:1px solid var(--border-color);border-radius:var(--radius-md);background:var(--bg-primary);overflow:hidden}.Collapsible-module__summary___9zX-c{cursor:pointer;color:var(--text-primary);-webkit-user-select:none;user-select:none;justify-content:space-between;align-items:center;gap:12px;padding:10px 14px;font-size:13px;font-weight:500;list-style:none;display:flex}.Collapsible-module__summary___9zX-c::-webkit-details-marker{display:none}.Collapsible-module__summary___9zX-c:hover{background:color-mix(in srgb, var(--accent-bg) 35%, transparent)}.Collapsible-module__summary___9zX-c:focus-visible{outline:2px solid var(--primary-color);outline-offset:-2px}.Collapsible-module__summaryLabel___G6Rv3{flex:1;align-items:center;gap:10px;min-width:0;display:flex}.Collapsible-module__summaryHint___zzQq-{color:var(--muted-foreground);font-size:12px;font-weight:400}.Collapsible-module__chevron___L6d3B{width:16px;height:16px;color:var(--muted-foreground);flex-shrink:0;transition:transform .2s}.Collapsible-module__root___pblku[open] .Collapsible-module__chevron___L6d3B{transform:rotate(180deg)}.Collapsible-module__content___rwqsf{border-top:1px solid var(--border-color);padding:14px}.Collapsible-module__contentFlush___WXXdd{border-top:1px solid var(--border-color);padding:0}.sharedForm-module__form___PT91R{flex-direction:column;gap:16px;display:flex}.sharedForm-module__section___i8OOd{flex-direction:column;gap:12px;display:flex}.sharedForm-module__sectionTitle___82MzD{color:var(--text-primary);align-items:center;gap:8px;margin:0;font-size:13px;font-weight:600;display:flex}.sharedForm-module__sectionDesc___pBlrt{color:var(--muted-foreground);margin:0;font-size:12px;line-height:1.5}.sharedForm-module__field___67Fow{gap:6px;display:grid}.sharedForm-module__label___sL6bS{color:var(--text-primary);font-size:12px;font-weight:500}.sharedForm-module__labelHint___M7UU6{color:var(--muted-foreground);font-size:11px;font-weight:400}.sharedForm-module__input___5xUXx,.sharedForm-module__passwordInput___rSuUg,.sharedForm-module__textarea___CdY6q{border-radius:var(--radius-md);border:1px solid var(--border-color);background:var(--bg-primary);width:100%;height:36px;color:var(--text-primary);box-sizing:border-box;padding:8px 12px;font-family:inherit;font-size:13px}.sharedForm-module__input___5xUXx::placeholder,.sharedForm-module__passwordInput___rSuUg::placeholder,.sharedForm-module__textarea___CdY6q::placeholder{color:var(--text-tertiary)}.sharedForm-module__input___5xUXx:focus,.sharedForm-module__passwordInput___rSuUg:focus,.sharedForm-module__textarea___CdY6q:focus{border-color:var(--primary-color);box-shadow:0 0 0 3px var(--primary-10);outline:none}.sharedForm-module__input___5xUXx:disabled,.sharedForm-module__passwordInput___rSuUg:disabled,.sharedForm-module__textarea___CdY6q:disabled{opacity:.6;cursor:not-allowed}.sharedForm-module__textarea___CdY6q{resize:vertical;height:auto;min-height:80px;font-family:Courier New,Courier,monospace;line-height:1.5}.sharedForm-module__checkboxRow___-oiND{cursor:pointer;-webkit-user-select:none;user-select:none;align-items:flex-start;gap:10px;display:flex}.sharedForm-module__checkboxBox___eIVJQ{border:1px solid var(--border-color);background:var(--bg-primary);cursor:pointer;-webkit-appearance:none;appearance:none;border-radius:4px;flex-shrink:0;justify-content:center;align-items:center;width:16px;height:16px;margin-top:2px;display:inline-flex;position:relative}.sharedForm-module__checkboxBox___eIVJQ:checked{background:var(--primary-color);border-color:var(--primary-color)}.sharedForm-module__checkboxBox___eIVJQ:checked:after{content:"";border-left:2px solid var(--primary-contrast);border-bottom:2px solid var(--primary-contrast);width:8px;height:4px;transform:rotate(-45deg)translateY(-2px)}.sharedForm-module__checkboxBox___eIVJQ:focus-visible{outline:2px solid var(--primary-color);outline-offset:2px}.sharedForm-module__checkboxText___LnhPu{color:var(--text-primary);flex-direction:column;gap:2px;font-size:13px;display:flex}.sharedForm-module__checkboxText___LnhPu small{color:var(--muted-foreground);font-size:11px}.sharedForm-module__fieldRow___FmfR-{grid-template-columns:1fr 1fr;gap:12px;display:grid}.sharedForm-module__divider___hp8lX{border:0;border-top:1px solid var(--border-color);margin:4px 0}.sharedForm-module__errorBox___tj-8g{border:1px solid var(--destructive-30);background:var(--destructive-10);color:var(--destructive-color);border-radius:var(--radius-md);padding:10px 12px;font-size:12px;line-height:1.5}.sharedForm-module__dl___fU3jy{grid-template-columns:1fr 1fr;gap:12px 16px;margin:0;display:grid}.sharedForm-module__dt___WtuBR{color:var(--muted-foreground);font-size:11px;font-weight:500}.sharedForm-module__dd___xdoZu{color:var(--text-primary);word-break:break-word;margin:2px 0 0;font-family:Courier New,Courier,monospace;font-size:12px}.sharedForm-module__detailHeader___Gwp7N{margin-bottom:4px}.sharedForm-module__entryCard___4UpBh{border:1px solid var(--border-color);border-radius:var(--radius-md);background:var(--bg-secondary);flex-direction:column;gap:10px;padding:12px;display:flex}.sharedForm-module__entryCardHeader___9w6Nq{color:var(--muted-foreground);justify-content:space-between;align-items:center;font-size:12px;font-weight:500;display:flex}.sharedForm-module__entryCardHeaderRight___XQk-H{align-items:center;gap:6px;display:flex}.sharedForm-module__entriesToolbar___ZMhPO{justify-content:flex-end;align-items:center;gap:8px;margin-bottom:2px;display:flex}.sharedForm-module__entriesToolbarSplit___ZVvqH{justify-content:space-between}.sharedForm-module__connectivityRow___yytvW{align-items:center;gap:8px;margin-top:4px;display:flex}.sharedForm-module__connectivityBtn___xuFLs{border-radius:var(--radius-md);border:1px solid var(--border-color);background:var(--bg-primary);height:28px;color:var(--text-primary);cursor:pointer;align-items:center;gap:6px;padding:0 12px;font-size:12px;font-weight:500;transition:background-color .15s,border-color .15s;display:inline-flex}.sharedForm-module__connectivityBtn___xuFLs:hover:not(:disabled){border-color:var(--primary-color);color:var(--primary-color)}.sharedForm-module__connectivityBtn___xuFLs:disabled{opacity:.6;cursor:not-allowed}.sharedForm-module__connectivityBtnGhost___Ks4Ys{border-radius:var(--radius-md);height:24px;color:var(--text-secondary);cursor:pointer;background:0 0;border:1px solid #0000;align-items:center;gap:6px;padding:0 8px;font-size:11px;font-weight:500;transition:background-color .15s,color .15s;display:inline-flex}.sharedForm-module__connectivityBtnGhost___Ks4Ys:hover:not(:disabled){background:var(--bg-tertiary);color:var(--text-primary)}.sharedForm-module__connectivityBtnGhost___Ks4Ys:disabled{opacity:.6;cursor:not-allowed}.sharedForm-module__connectivityError___MLzpW{border:1px solid var(--destructive-30);background:var(--destructive-10);color:var(--destructive-color);border-radius:var(--radius-md);word-break:break-word;padding:8px 10px;font-size:11px;line-height:1.4}.sharedForm-module__connectivityHintSuccess___bCB6B{color:var(--primary-color);font-size:11px}.sharedForm-module__statusIcon___Qo3og{justify-content:center;align-items:center;width:14px;height:14px;display:inline-flex}.sharedForm-module__statusIconLoading___Jr4Oi{color:var(--text-secondary);animation:.8s linear infinite sharedForm-module__spin___ebAKO}.sharedForm-module__statusIconSuccess___XeAnb{color:var(--success-color)}.sharedForm-module__statusIconError___1-Uh3{color:var(--destructive-color)}.sharedForm-module__discoveryPanel___AhjnU{border:1px solid var(--border-color);border-radius:var(--radius-md);background:var(--bg-secondary);flex-direction:column;gap:10px;padding:12px;display:flex}.sharedForm-module__discoveryToolbar___pxuM6{align-items:center;gap:8px;display:flex}.sharedForm-module__discoverySearchWrap___6FqGI{flex:1;align-items:center;display:flex;position:relative}.sharedForm-module__discoverySearchIcon___ygwRw{color:var(--muted-foreground);pointer-events:none;align-items:center;display:inline-flex;position:absolute;left:10px}.sharedForm-module__discoverySearch___18P-i{border-radius:var(--radius-md);border:1px solid var(--border-color);background:var(--bg-primary);width:100%;height:32px;color:var(--text-primary);box-sizing:border-box;padding:6px 10px 6px 30px;font-size:12px}.sharedForm-module__discoverySearch___18P-i::placeholder{color:var(--text-tertiary)}.sharedForm-module__discoverySearch___18P-i:focus{border-color:var(--primary-color);box-shadow:0 0 0 3px var(--primary-10);outline:none}.sharedForm-module__discoveryEmpty___yCmmN{text-align:center;color:var(--muted-foreground);border:1px dashed var(--border-color);border-radius:var(--radius-md);background:var(--bg-primary);padding:16px;font-size:12px}.sharedForm-module__discoveryBatchRow___RSSTs{justify-content:space-between;align-items:center;padding:2px 4px;display:flex}.sharedForm-module__discoveryBatchLabel___pHhDl{color:var(--text-primary);font-size:12px;font-weight:500}.sharedForm-module__discoveryCount___nHCkA{color:var(--muted-foreground);font-variant-numeric:tabular-nums;font-size:11px}.sharedForm-module__discoveryList___UmHOn{border:1px solid var(--border-color);border-radius:var(--radius-md);background:var(--bg-primary);flex-direction:column;gap:2px;max-height:240px;margin:0;padding:0;list-style:none;display:flex;overflow-y:auto}.sharedForm-module__discoveryItem___K7Etw{border-bottom:1px solid var(--border-color);color:var(--text-primary);justify-content:space-between;align-items:center;gap:8px;padding:8px 10px;font-size:12px;display:flex}.sharedForm-module__discoveryItem___K7Etw:last-child{border-bottom:0}.sharedForm-module__discoveryItemExisting___OZBJe{background:var(--muted-bg);color:var(--muted-foreground)}.sharedForm-module__discoveryName___PQCDn{word-break:break-all;font-family:Courier New,Courier,monospace;font-size:12px}.sharedForm-module__discoveryAddedTag___HJanN{color:var(--muted-foreground);border-radius:var(--radius-md);border:1px solid var(--border-color);background:var(--bg-primary);padding:2px 8px;font-size:11px}.sharedForm-module__discoveryFooter___Is7iL{justify-content:flex-end;align-items:center;gap:8px;display:flex}.sharedForm-module__discoveryApplyBtn___Iu3oS{border-radius:var(--radius-md);background:var(--primary-color);height:30px;color:var(--primary-contrast);cursor:pointer;border:1px solid #0000;align-items:center;gap:6px;padding:0 14px;font-size:12px;font-weight:500;transition:background-color .15s;display:inline-flex}.sharedForm-module__discoveryApplyBtn___Iu3oS:hover:not(:disabled){background:var(--primary-hover)}.sharedForm-module__discoveryApplyBtn___Iu3oS:disabled{opacity:.6;cursor:not-allowed}@keyframes sharedForm-module__spin___ebAKO{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.sharedForm-module__passwordField___XUXUd{align-items:center;display:flex;position:relative}.sharedForm-module__passwordInput___rSuUg{padding-right:36px}.sharedForm-module__passwordToggle___uGvUz{color:var(--text-tertiary);cursor:pointer;border-radius:var(--radius-sm);background:0 0;border:none;justify-content:center;align-items:center;padding:4px;transition:color .15s;display:flex;position:absolute;right:8px}.sharedForm-module__passwordToggle___uGvUz:hover:not(:disabled){color:var(--text-primary)}.sharedForm-module__passwordToggle___uGvUz:disabled{opacity:.5;cursor:not-allowed}.sharedForm-module__entriesList___-jY7O{flex-direction:column;gap:10px;display:flex}.sharedForm-module__removeBtn___iEUNe{border-radius:var(--radius-md);color:var(--destructive-color);cursor:pointer;background:0 0;border:1px solid #0000;align-items:center;gap:4px;padding:4px 8px;font-size:12px;display:inline-flex}.sharedForm-module__removeBtn___iEUNe:hover{background:var(--destructive-10)}.sharedForm-module__removeBtn___iEUNe:disabled{opacity:.5;cursor:not-allowed}.sharedForm-module__addBtn___O-Vjb{border-radius:var(--radius-md);border:1px dashed var(--border-color);background:var(--bg-primary);color:var(--text-secondary);cursor:pointer;align-self:flex-start;align-items:center;gap:6px;padding:6px 12px;font-size:12px;font-weight:500;display:inline-flex}.sharedForm-module__addBtn___O-Vjb:hover{border-color:var(--primary-color);color:var(--primary-color)}.sharedForm-module__footerBtn___DyIZY{border-radius:var(--radius-md);cursor:pointer;height:32px;color:var(--text-primary);background:0 0;border:1px solid #0000;align-items:center;gap:6px;padding:0 14px;font-size:13px;font-weight:500;transition:background-color .15s;display:inline-flex}.sharedForm-module__footerBtn___DyIZY:disabled{opacity:.6;cursor:not-allowed}.sharedForm-module__footerBtnGhost___6XhK0{background:0 0;border-color:#0000}.sharedForm-module__footerBtnGhost___6XhK0:hover:not(:disabled){background:var(--bg-tertiary)}.sharedForm-module__footerBtnOutline___mplFu{border-color:var(--border-color);background:var(--bg-primary)}.sharedForm-module__footerBtnOutline___mplFu:hover:not(:disabled){background:var(--bg-tertiary)}.sharedForm-module__footerBtnPrimary___RbN5Y{background:var(--primary-color);color:var(--primary-contrast)}.sharedForm-module__footerBtnPrimary___RbN5Y:hover:not(:disabled){background:var(--primary-hover)}.sharedForm-module__apiKeyEntriesSection___BiWv-{min-width:0;max-width:100%;margin-top:16px}.sharedForm-module__apiKeyEntriesLabel___k7lKa{color:var(--text-secondary);margin-bottom:6px;font-size:12px;font-weight:600}.sharedForm-module__apiKeyEntryList___sun97{flex-direction:column;gap:6px;min-width:0;max-width:100%;display:flex}.sharedForm-module__apiKeyEntryCard___uW3Az{background:var(--bg-secondary);border:1px solid var(--border-secondary);border-radius:8px;flex-wrap:wrap;align-items:center;gap:8px;min-width:0;max-width:100%;padding:8px 12px;font-size:12px;display:flex}.sharedForm-module__apiKeyEntryIndex___0Vn5O{background:var(--primary-color);width:20px;height:20px;color:var(--primary-contrast);border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;font-size:11px;font-weight:600;display:inline-flex}.sharedForm-module__apiKeyEntryKey___nFskf{color:var(--text-primary);overflow-wrap:anywhere;word-break:break-all;min-width:0;max-width:100%;font-family:Monaco,Menlo,Consolas,Ubuntu Mono,monospace;font-weight:600}.sharedForm-module__apiKeyEntryProxy___o-PFf{color:var(--text-tertiary);overflow-wrap:anywhere;word-break:break-word;min-width:0;max-width:100%;font-size:11px}.sharedForm-module__apiKeyEntryProxy___o-PFf:before{content:"| Proxy: ";color:var(--text-quaternary)}.sharedForm-module__apiKeyEntryStats___DWlE3{gap:6px;margin-left:auto;display:flex}.sharedForm-module__apiKeyEntryStat___pC-og{border-radius:10px;align-items:center;gap:3px;padding:2px 6px;font-size:10px;font-weight:600;display:inline-flex}.sharedForm-module__apiKeyEntryStat___pC-og svg{display:block}.sharedForm-module__apiKeyEntryStatSuccess___PbODP{background:var(--success-badge-bg);color:var(--success-badge-text)}.sharedForm-module__apiKeyEntryStatFailure___0l7My{background:var(--failure-badge-bg);color:var(--failure-badge-text)}.ProvidersWorkbenchPage-module__page___b5s-a{box-sizing:border-box;flex-direction:column;gap:20px;width:100%;padding:24px;display:flex}.ProvidersWorkbenchPage-module__layout___MCNil{grid-template-columns:minmax(0,1fr);gap:16px;display:grid}@media (min-width:1280px){.ProvidersWorkbenchPage-module__layout___MCNil{grid-template-columns:240px minmax(0,1fr)}}.ProvidersWorkbenchPage-module__modelCatalogSlot___bAD6H{margin-top:4px}@media (max-width:768px){.ProvidersWorkbenchPage-module__page___b5s-a{gap:16px;padding:16px}}.QuotaPage-module__container___CkTNE{flex-direction:column;gap:24px;display:flex}.QuotaPage-module__pageHeader___7RVAE{flex-direction:column;gap:8px;display:flex}.QuotaPage-module__pageTitle___c6BF7{color:var(--text-primary);margin:0;font-size:28px;font-weight:700}.QuotaPage-module__description___qDPuI{color:var(--text-secondary);margin:0;font-size:14px}.QuotaPage-module__headerActions___Jfu3A{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px;min-width:0;display:flex}.QuotaPage-module__headerActions___Jfu3A .btn.btn-sm{min-width:0;line-height:16px}.QuotaPage-module__headerActions___Jfu3A svg{display:block}@media (max-width:768px){.QuotaPage-module__headerActions___Jfu3A{justify-content:stretch;width:100%}}.QuotaPage-module__titleWrapper___lHVCF{align-items:center;gap:8px;line-height:24px;display:flex}.QuotaPage-module__countBadge___tuPLs{min-width:24px;height:24px;color:var(--count-badge-text);background-color:var(--count-badge-bg);box-sizing:border-box;border-radius:999px;justify-content:center;align-items:center;padding:0 8px;font-size:13px;font-weight:600;display:inline-flex}.QuotaPage-module__errorBox___Ub2Qs{border:1px solid var(--danger-color);color:var(--danger-color);background-color:#c657461a;border-radius:8px;padding:16px;font-size:14px}.QuotaPage-module__pageSizeSelect___1AaaU{border:1px solid var(--border-color);background-color:var(--bg-primary);color:var(--text-primary);cursor:text;box-sizing:border-box;border-radius:8px;height:38px;padding:8px 12px;font-size:14px}.QuotaPage-module__pageSizeSelect___1AaaU:focus{border-color:var(--primary-color);outline:none}.QuotaPage-module__statsInfo___coFxw{background-color:var(--bg-secondary);color:var(--text-secondary);white-space:nowrap;box-sizing:border-box;border-radius:8px;align-items:center;height:38px;padding:8px 12px;font-size:13px;display:flex}.QuotaPage-module__antigravityGrid___d29-f,.QuotaPage-module__claudeGrid___g3N0r,.QuotaPage-module__codexGrid___gQjcK,.QuotaPage-module__kimiGrid___-9u7J,.QuotaPage-module__xaiGrid___OJdA2{grid-template-columns:repeat(auto-fill,minmax(380px,1fr));gap:16px;display:grid}@media (max-width:768px){.QuotaPage-module__antigravityGrid___d29-f,.QuotaPage-module__claudeGrid___g3N0r,.QuotaPage-module__codexGrid___gQjcK,.QuotaPage-module__kimiGrid___-9u7J,.QuotaPage-module__xaiGrid___OJdA2{grid-template-columns:1fr}}.QuotaPage-module__antigravityControls___jdhuf,.QuotaPage-module__claudeControls___CJ9XX,.QuotaPage-module__codexControls___ZabMA,.QuotaPage-module__kimiControls___3WNBe,.QuotaPage-module__xaiControls___PNfIL{flex-wrap:wrap;align-items:flex-end;gap:16px;margin-bottom:16px;display:flex}.QuotaPage-module__antigravityControl___Z2Ti6,.QuotaPage-module__claudeControl___4J9Tz,.QuotaPage-module__codexControl___P4r4g,.QuotaPage-module__kimiControl___5rxbt,.QuotaPage-module__xaiControl___wPP0E{flex-direction:column;gap:4px;display:flex}.QuotaPage-module__antigravityControl___Z2Ti6 label,.QuotaPage-module__claudeControl___4J9Tz label,.QuotaPage-module__codexControl___P4r4g label,.QuotaPage-module__kimiControl___5rxbt label,.QuotaPage-module__xaiControl___wPP0E label{color:var(--text-secondary);white-space:nowrap;font-size:12px;font-weight:500}.QuotaPage-module__viewModeToggle___BHo1O{background:color-mix(in srgb, var(--bg-secondary) 92%, transparent);border:1px solid color-mix(in srgb, var(--border-color) 88%, transparent);border-radius:999px;align-items:center;gap:4px;padding:3px;display:inline-flex;box-shadow:inset 0 1px #ffffff29}@media (max-width:768px){.QuotaPage-module__viewModeToggle___BHo1O{flex:auto;width:100%}}.QuotaPage-module__viewModeButton___jjKnb.btn.btn-sm{color:var(--text-secondary);box-shadow:none;background:0 0;border-color:#0000;border-radius:999px;padding:8px 14px}.QuotaPage-module__viewModeButton___jjKnb.btn.btn-sm:hover:not(:disabled){background:color-mix(in srgb, var(--bg-hover) 72%, transparent);color:var(--text-primary);border-color:#0000}.QuotaPage-module__viewModeButton___jjKnb.btn.btn-sm>span{white-space:nowrap}@media (max-width:768px){.QuotaPage-module__viewModeButton___jjKnb.btn.btn-sm{flex:1 1 0}}.QuotaPage-module__viewModeButtonActive___LGwRk.btn.btn-sm{background:var(--primary-color);border-color:var(--primary-color);color:var(--primary-contrast,#fff);box-shadow:0 8px 18px -14px #00000073}.QuotaPage-module__viewModeButtonActive___LGwRk.btn.btn-sm:hover:not(:disabled){background:var(--primary-hover);border-color:var(--primary-hover);color:var(--primary-contrast,#fff)}.QuotaPage-module__refreshAllButton___c9-I-.btn.btn-sm{background:color-mix(in srgb, var(--primary-color) 12%, var(--bg-secondary));border-color:color-mix(in srgb, var(--primary-color) 22%, var(--border-color));color:var(--text-primary);border-radius:999px;padding-inline-start:14px;padding-inline-end:14px}.QuotaPage-module__refreshAllButton___c9-I-.btn.btn-sm>span{white-space:nowrap;align-items:center;gap:8px;display:inline-flex}.QuotaPage-module__refreshAllButton___c9-I-.btn.btn-sm:hover:not(:disabled){background:color-mix(in srgb, var(--primary-color) 16%, var(--bg-secondary));border-color:color-mix(in srgb, var(--primary-color) 34%, var(--border-color))}@media (max-width:768px){.QuotaPage-module__refreshAllButton___c9-I-.btn.btn-sm{justify-content:center;width:100%}}[data-theme=dark] .QuotaPage-module__viewModeToggle___BHo1O{box-shadow:inset 0 1px #ffffff0a}[data-theme=dark] .QuotaPage-module__refreshAllButton___c9-I-.btn.btn-sm{background:color-mix(in srgb, var(--primary-color) 18%, var(--bg-secondary));border-color:color-mix(in srgb, var(--primary-color) 32%, var(--border-color))}@media (max-width:768px){.QuotaPage-module__headerActions___Jfu3A{gap:4px}}.QuotaPage-module__claudeCard___z9zBZ{background-image:linear-gradient(#fbece42e,#fbece400)}.QuotaPage-module__antigravityCard___0jKaG{background-image:linear-gradient(#e0f7fa1f,#e0f7fa00)}.QuotaPage-module__codexCard___2xhZX{background-image:linear-gradient(#eae7ff2e,#eae7ff00)}.QuotaPage-module__kimiCard___WWvTD{background-image:linear-gradient(#dce8ff33,#dce8ff00)}.QuotaPage-module__xaiCard___l41eR{background-image:linear-gradient(#f3f4f638,#f3f4f600)}.QuotaPage-module__quotaSection___Yb6bk{border-top:1px dashed var(--border-color);flex-direction:column;gap:8px;margin-top:4px;padding-top:8px;display:flex}.QuotaPage-module__quotaRow___uNjD0{flex-direction:column;gap:4px;display:flex}.QuotaPage-module__antigravityQuotaGroup___gtcPR{flex-direction:column;gap:8px;padding-bottom:4px;display:flex}.QuotaPage-module__antigravityQuotaGroup___gtcPR+.QuotaPage-module__antigravityQuotaGroup___gtcPR{border-top:1px solid color-mix(in srgb, var(--border-color) 65%, transparent);padding-top:8px}.QuotaPage-module__antigravityQuotaGroupHeader___0SHVL{flex-direction:column;gap:2px;min-width:0;display:flex}.QuotaPage-module__antigravityQuotaGroupTitle___2aARm{color:var(--text-primary);font-size:13px;font-weight:700}.QuotaPage-module__antigravityQuotaGroupDescription___rBbc9{color:var(--text-tertiary);font-size:12px;line-height:1.35}.QuotaPage-module__quotaRowHeader___jr9zd{justify-content:space-between;align-items:center;gap:8px;min-width:0;display:flex}@media (max-width:768px){.QuotaPage-module__quotaRowHeader___jr9zd{flex-direction:column;align-items:flex-start}}.QuotaPage-module__quotaModel___-3mcR{color:var(--text-primary);white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0;font-size:13px;font-weight:600;overflow:hidden}@media (max-width:768px){.QuotaPage-module__quotaModel___-3mcR{white-space:normal}}.QuotaPage-module__quotaBar___ATY20{background-color:var(--bg-tertiary);border-radius:999px;height:8px;overflow:hidden}.QuotaPage-module__quotaBarFill___arMGf{background-color:var(--success-color,#22c55e);height:100%;transition:width .2s}.QuotaPage-module__quotaBarFillHigh___yfdzz{background-color:var(--success-color,#22c55e)}.QuotaPage-module__quotaBarFillMedium___PbU2j{background-color:var(--quota-medium-color,#e0aa14)}.QuotaPage-module__quotaBarFillLow___1dvgT{background-color:var(--danger-color)}.QuotaPage-module__quotaMeta___2Gr-S{color:var(--text-secondary);white-space:nowrap;align-items:center;gap:8px;font-size:12px;display:flex}@media (max-width:768px){.QuotaPage-module__quotaMeta___2Gr-S{justify-content:flex-start}}.QuotaPage-module__quotaPercent___dwFKN{color:var(--text-primary);font-weight:600}.QuotaPage-module__quotaReset___AQC0c{color:var(--text-tertiary)}.QuotaPage-module__quotaAmount___liJkK{color:var(--text-secondary)}.QuotaPage-module__quotaMessage___tXEKQ{color:var(--text-tertiary);text-align:center;padding:8px 0;font-size:12px}.QuotaPage-module__quotaMessageAction___lCJz4{cursor:pointer;background:0 0;border:none;width:100%;text-decoration:underline}.QuotaPage-module__quotaMessageAction___lCJz4:hover:not(:disabled){color:var(--text-primary)}.QuotaPage-module__quotaMessageAction___lCJz4:disabled{cursor:not-allowed;opacity:.6;text-decoration:none}.QuotaPage-module__quotaCardActions___neob1{flex-wrap:wrap;justify-content:flex-end;gap:4px;padding-top:4px;display:flex}.QuotaPage-module__quotaResetCreditButton___850uQ.btn.btn-sm,.QuotaPage-module__quotaRefreshButton___y1YAz.btn.btn-sm{border-radius:999px;padding-inline-start:12px;padding-inline-end:12px}.QuotaPage-module__quotaResetCreditButton___850uQ.btn.btn-sm>span,.QuotaPage-module__quotaRefreshButton___y1YAz.btn.btn-sm>span{white-space:nowrap;align-items:center;gap:6px;display:inline-flex}.QuotaPage-module__quotaError___rIKP-{color:var(--danger-color);border:1px solid var(--danger-color);background-color:#c6574614;border-radius:4px;padding:4px 8px;font-size:12px}.QuotaPage-module__quotaWarning___phfIc{color:var(--warning-text);background-color:var(--warning-bg);border:1px solid var(--warning-border);border-radius:4px;padding:4px 8px;font-size:12px}.QuotaPage-module__codexPlan___cNsir{color:var(--text-secondary);flex-wrap:wrap;align-items:center;gap:6px 12px;font-size:12px;display:flex}.QuotaPage-module__codexPlanItem___zPoYp{flex-wrap:wrap;align-items:center;gap:6px;min-width:0;max-width:100%;display:inline-flex}.QuotaPage-module__codexPlanLabel___NR4tn{color:var(--text-tertiary);flex:none}.QuotaPage-module__codexPlanValue___TZDzO{color:var(--text-primary);text-transform:capitalize;min-width:0;font-weight:600}.QuotaPage-module__codexPlanSeparator___dHG-Q{background-color:var(--border-color);width:1px;height:12px}.QuotaPage-module__premiumPlanValue___7ouKX{white-space:nowrap;isolation:isolate;color:#6b4b00;text-shadow:0 1px #ffffff8c;text-transform:capitalize;background:radial-gradient(circle at 18% 24%,#fffffff5 0%,#ffffffb8 18%,#fff0 42%),linear-gradient(135deg,#fff9e3 0%,#ffe07f 52%,#e0aa14 100%);border:1px solid #d9a516b8;border-radius:999px;flex:none;align-items:center;padding:2px 8px;font-size:12px;font-weight:700;display:inline-flex;position:relative;overflow:visible;box-shadow:0 1px 3px #855c0029,inset 0 0 0 1px #ffffff38,0 0 16px #ffd66247}.QuotaPage-module__premiumPlanValue___7ouKX:before{content:"";border-radius:inherit;--glass-blur:9px;filter:var(--glass-filter);opacity:.75;pointer-events:none;z-index:-1;background:radial-gradient(circle at 18% 22%,#ffffffe6 0%,#ffed9e94 32%,#ffd75b00 72%);position:absolute;top:-6px;bottom:-6px;left:-9px;right:-9px}@media (dynamic-range:high){.QuotaPage-module__premiumPlanValue___7ouKX{color:#704c00;color:color(display-p3 .43 .3 0);background:radial-gradient(circle at 18% 24%,#fffcf0 0%,#fff7d2d1 18%,#fff2b400 42%),linear-gradient(135deg,#fffae1,#ffda46,#f2ac00);background:radial-gradient(circle at 18% 24%,color(display-p3 1 .99 .94) 0%,color(display-p3 1 .97 .82/.82) 18%,color(display-p3 1 .95 .7/0) 42%),linear-gradient(135deg,color(display-p3 1 .98 .88),color(display-p3 .99 .86 .34),color(display-p3 .92 .68 .05));border-color:#ebb900d9;border-color:color(display-p3 .9 .73 .12/.85);box-shadow:0 1px 4px #76470038,inset 0 0 0 1px #fffadc4d,0 0 18px #ffe22f5c;box-shadow:0 1px 4px color(display-p3 .45 .28 0/.22),inset 0 0 0 1px color(display-p3 1 .98 .86/.3),0 0 18px color(display-p3 1 .89 .2/.36)}}@supports (color:color(rec2100-linear 1 1 1)){@media (dynamic-range:high){.QuotaPage-module__premiumPlanValue___7ouKX{dynamic-range-limit:no-limit;box-shadow:0 1px 4px #76470038, 0 0 0 1px #fffadc4d inset, 0 0 14px #ffe22f5c, 0 0 30px color(rec2100-linear 3.6 2.9 .7 / .48)}@supports (color:color(display-p3 0 0 0)){.QuotaPage-module__premiumPlanValue___7ouKX{box-shadow:0 1px 4px color(display-p3 .45 .28 0/.22), 0 0 0 1px color(display-p3 1 .98 .86/.3) inset, 0 0 14px color(display-p3 1 .89 .2/.36), 0 0 30px color(rec2100-linear 3.6 2.9 .7 / .48)}}.QuotaPage-module__premiumPlanValue___7ouKX:before{background:radial-gradient(circle at 18% 22%, color(rec2100-linear 6.5 6.2 5.4 / .92) 0%, color(rec2100-linear 2.4 2 .6 / .62) 34%, color(rec2100-linear 1 .85 .12 / 0) 76%);opacity:.92}}}[data-theme=dark] .QuotaPage-module__premiumPlanValue___7ouKX{color:#fff0a8;text-shadow:0 0 10px #ffd44f38;background:radial-gradient(circle at 18% 24%,#ffe58a52 0%,#ffd6622e 18%,#ffd66200 44%),linear-gradient(135deg,#4f3d0b 0%,#6e5510 48%,#8f6d10 100%);border-color:#e2b432b3;box-shadow:0 1px 6px #00000047,inset 0 0 0 1px #ffdc7829,0 0 18px #ffc42c38}[data-theme=dark] .QuotaPage-module__premiumPlanValue___7ouKX:before{opacity:.8;background:radial-gradient(circle at 18% 24%,#ffe58a6b 0%,#ffc54247 34%,#fb00 74%)}@media (dynamic-range:high){[data-theme=dark] .QuotaPage-module__premiumPlanValue___7ouKX{color:#ffed95;color:color(display-p3 1 .93 .58);background:radial-gradient(circle at 18% 24%,#ffe26161 0%,#ffd13133 18%,#ffd13100 44%),linear-gradient(135deg,#573f00,#7f5b00,#a37400);background:radial-gradient(circle at 18% 24%,color(display-p3 1 .89 .38/.38) 0%,color(display-p3 1 .82 .2/.2) 18%,color(display-p3 1 .82 .2/0) 44%),linear-gradient(135deg,color(display-p3 .33 .25 .04),color(display-p3 .48 .36 .08),color(display-p3 .62 .46 .09));border-color:#ce9700c7;border-color:color(display-p3 .78 .6 .16/.78);box-shadow:0 1px 8px #00000052,inset 0 0 0 1px #f9ca002e,0 0 20px #ffc21447;box-shadow:0 1px 8px color(display-p3 0 0 0/.32),inset 0 0 0 1px color(display-p3 .95 .8 .24/.18),0 0 20px color(display-p3 1 .76 .1/.28)}}@supports (color:color(rec2100-linear 1 1 1)){@media (dynamic-range:high){[data-theme=dark] .QuotaPage-module__premiumPlanValue___7ouKX{dynamic-range-limit:no-limit;box-shadow:0 1px 8px #00000052, 0 0 0 1px #f9ca002e inset, 0 0 16px #ffc21447, 0 0 28px color(rec2100-linear 4.8 3.5 .45 / .4)}@supports (color:color(display-p3 0 0 0)){[data-theme=dark] .QuotaPage-module__premiumPlanValue___7ouKX{box-shadow:0 1px 8px color(display-p3 0 0 0/.32), 0 0 0 1px color(display-p3 .95 .8 .24/.18) inset, 0 0 16px color(display-p3 1 .76 .1/.28), 0 0 28px color(rec2100-linear 4.8 3.5 .45 / .4)}}[data-theme=dark] .QuotaPage-module__premiumPlanValue___7ouKX:before{background:radial-gradient(circle at 18% 24%, color(rec2100-linear 5.6 4.1 .75 / .64) 0%, color(rec2100-linear 2.2 1.5 .2 / .34) 34%, color(rec2100-linear 1.2 .9 .06 / 0) 74%);opacity:.95}}}@media (max-width:768px){.QuotaPage-module__premiumPlanValue___7ouKX{background:radial-gradient(circle at 18% 24%,#ffffffe0 0%,#ffffff94 18%,#fff0 42%),linear-gradient(135deg,#fff9e3 0%,#ffe07f 52%,#e0aa14 100%);overflow:hidden;box-shadow:0 1px 3px #855c0029,inset 0 0 0 1px #ffffff38,0 0 10px #ffd66238}.QuotaPage-module__premiumPlanValue___7ouKX:before{content:none}[data-theme=dark] .QuotaPage-module__premiumPlanValue___7ouKX{background:radial-gradient(circle at 18% 24%,#ffe58a47 0%,#ffd66224 18%,#ffd66200 44%),linear-gradient(135deg,#4f3d0b 0%,#6e5510 48%,#8f6d10 100%);box-shadow:0 1px 6px #00000047,inset 0 0 0 1px #ffdc7829,0 0 10px #ffc42c2e}}.QuotaPage-module__fileCard___7ZTk-{background-color:var(--bg-primary);border:1px solid var(--border-color);border-radius:12px;flex-direction:column;gap:8px;padding:16px;transition:transform .15s,box-shadow .15s,border-color .15s;display:flex}.QuotaPage-module__fileCard___7ZTk-:hover{border-color:#2563eb33;transform:translateY(-2px);box-shadow:0 4px 6px -1px #0000001a}.QuotaPage-module__cardHeader___vBGld{align-items:center;gap:8px;min-height:28px;display:flex}.QuotaPage-module__typeBadge___ubtCA{white-space:nowrap;border-radius:12px;flex-shrink:0;padding:4px 10px;font-size:12px;font-weight:600}.QuotaPage-module__fileName___ATlvN{color:var(--text-primary);word-break:break-all;font-size:14px;font-weight:600;line-height:1.4}.QuotaPage-module__pagination___W2eGv{border-top:1px solid var(--border-color);justify-content:center;align-items:center;gap:16px;margin-top:24px;padding-top:16px;display:flex}.QuotaPage-module__pageInfo___yNU7E{color:var(--text-secondary);background-color:var(--bg-secondary);border-radius:8px;padding:4px 16px;font-size:13px}.QuotaPage-module__warningOverlay___lVjB7{z-index:1000;background-color:#00000080;justify-content:center;align-items:center;display:flex;position:fixed;top:0;bottom:0;left:0;right:0}.QuotaPage-module__warningModal___2pPNd{background-color:var(--bg-primary);text-align:center;border-radius:12px;max-width:400px;padding:24px;box-shadow:0 10px 15px -3px #0000001a}.QuotaPage-module__warningModal___2pPNd p{color:var(--text-primary);margin:0 0 16px;font-size:14px;line-height:1.6}.AuthFilesPage-module__container___u1c4k{padding-bottom:calc(var(--auth-files-action-bar-height,0px) + 16px + env(safe-area-inset-bottom));flex-direction:column;gap:24px;display:flex}.AuthFilesPage-module__pageHeader___DVV58{flex-direction:column;gap:8px;display:flex}.AuthFilesPage-module__pageTitle___1TOZn{color:var(--text-primary);margin:0;font-size:28px;font-weight:700}.AuthFilesPage-module__description___N3RjR{color:var(--text-secondary);margin:0;font-size:14px}.AuthFilesPage-module__headerActions___j0ROO{flex-wrap:wrap;align-items:center;gap:8px;min-width:0;max-width:100%;display:flex}.AuthFilesPage-module__headerActions___j0ROO .btn{min-width:0}@media (max-width:768px){.AuthFilesPage-module__headerActions___j0ROO{width:100%}}.AuthFilesPage-module__titleWrapper___PLYyj{align-items:center;gap:8px;line-height:24px;display:flex}.AuthFilesPage-module__countBadge___DQWug{min-width:24px;height:24px;color:var(--count-badge-text);background-color:var(--count-badge-bg);box-sizing:border-box;border-radius:999px;justify-content:center;align-items:center;padding:0 8px;font-size:13px;font-weight:600;display:inline-flex}.AuthFilesPage-module__errorBox___A9vF2{border:1px solid var(--danger-color);color:var(--danger-color);background-color:#c657461a;border-radius:8px;margin-bottom:16px;padding:16px;font-size:14px}.AuthFilesPage-module__filterSection___qQ3Zo{flex-direction:column;gap:16px;margin-bottom:24px;display:flex}.AuthFilesPage-module__filterRail___YRraq{border:1px solid color-mix(in srgb, var(--border-color) 60%, transparent);background:color-mix(in srgb, var(--bg-secondary) 60%, transparent);border-radius:10px;flex-direction:column;gap:10px;padding:12px 14px;display:flex}@media (max-width:768px){.AuthFilesPage-module__filterRail___YRraq{padding:10px}}.AuthFilesPage-module__filterAllIconWrap___jMF1r{border-color:color-mix(in srgb, var(--primary-color) 20%, var(--border-color));background:linear-gradient(145deg, color-mix(in srgb, var(--bg-secondary) 94%, var(--primary-color) 8%), color-mix(in srgb, var(--bg-primary) 92%, var(--primary-color) 5%));box-shadow:0 10px 22px -18px color-mix(in srgb, var(--primary-color) 50%, transparent);position:relative}.AuthFilesPage-module__filterAllIcon___mqchB{z-index:1;color:color-mix(in srgb, var(--primary-color) 70%, var(--text-primary));display:block;position:relative}.AuthFilesPage-module__filterContent___xfK-G{flex-direction:column;gap:16px;min-width:0;display:flex}.AuthFilesPage-module__filterTags___A24A3{flex-flow:wrap;gap:8px;display:flex}.AuthFilesPage-module__filterTag___-YnCU{border:1px solid color-mix(in srgb, var(--border-color) 60%, transparent);background:color-mix(in srgb, var(--bg-secondary) 70%, transparent);color:var(--text-secondary);cursor:pointer;white-space:nowrap;border-radius:10px;align-items:center;gap:8px;padding:7px 12px 7px 8px;font-size:13px;font-weight:600;line-height:1.2;transition:border-color .15s,background-color .15s,color .15s;display:inline-flex}.AuthFilesPage-module__filterTag___-YnCU:hover{border-color:color-mix(in srgb, var(--filter-color) 40%, var(--border-color));background:color-mix(in srgb, var(--bg-secondary) 90%, transparent);color:var(--text-primary)}.AuthFilesPage-module__filterTagActive___Rnbcs{border-color:color-mix(in srgb, var(--filter-color) 50%, var(--border-color));background:color-mix(in srgb, var(--filter-surface) 22%, var(--bg-secondary));color:var(--text-primary)}.AuthFilesPage-module__filterTagActive___Rnbcs .AuthFilesPage-module__filterTagIconWrap___pN6-v{border-color:color-mix(in srgb, var(--filter-color) 40%, transparent)}.AuthFilesPage-module__filterTagLabel___pP8yh{align-items:center;gap:10px;min-width:0;display:inline-flex}.AuthFilesPage-module__filterTagIconWrap___pN6-v{border:1px solid color-mix(in srgb, var(--border-color) 50%, transparent);background:color-mix(in srgb, var(--bg-tertiary) 60%, transparent);border-radius:6px;flex:none;justify-content:center;align-items:center;width:24px;height:24px;display:inline-flex}.AuthFilesPage-module__filterTagIcon___j068V{object-fit:contain;flex:none;width:16px;height:16px}.AuthFilesPage-module__filterTagIconFallback___4ALgn{color:var(--filter-color);font-size:14px;font-weight:700;line-height:1}.AuthFilesPage-module__filterTagText___b9X07{min-width:0;color:inherit;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.AuthFilesPage-module__filterTagCount___RxSVk{background:color-mix(in srgb, var(--filter-color) 12%, transparent);min-width:20px;height:20px;color:var(--text-tertiary);font-variant-numeric:tabular-nums;text-align:center;border-radius:6px;flex:none;place-items:center;padding:0 6px;font-size:11px;font-weight:700;line-height:1;display:inline-grid}.AuthFilesPage-module__filterTagActive___Rnbcs .AuthFilesPage-module__filterTagCount___RxSVk{background:color-mix(in srgb, var(--filter-color) 22%, transparent);color:var(--filter-color)}.AuthFilesPage-module__filterControlsPanel___V-IZn{border:1px solid color-mix(in srgb, var(--border-color) 60%, transparent);background:linear-gradient(135deg, color-mix(in srgb, var(--primary-color) 8%, transparent), transparent 46%), color-mix(in srgb, var(--bg-secondary) 56%, transparent);border-radius:10px;padding:16px;position:relative;overflow:hidden}@media (max-width:768px){.AuthFilesPage-module__filterControlsPanel___V-IZn{padding:12px}}.AuthFilesPage-module__filterControls___PfZDU{grid-template-columns:minmax(260px,1fr) minmax(108px,.35fr) minmax(148px,.45fr);align-items:flex-end;gap:12px;display:grid}.AuthFilesPage-module__filterControls___PfZDU .form-group{margin:0}.AuthFilesPage-module__filterControls___PfZDU .input{box-sizing:border-box;height:42px}@media (min-width:769px) and (max-width:1024px){.AuthFilesPage-module__filterControls___PfZDU{grid-template-columns:minmax(220px,1fr) repeat(2,minmax(140px,.8fr))}}@media (max-width:768px){.AuthFilesPage-module__filterControls___PfZDU{grid-template-columns:1fr}}.AuthFilesPage-module__filterSearchItem___G3Ly6{min-width:0}.AuthFilesPage-module__filterItem___Kko4o{flex-direction:column;gap:6px;min-width:0;display:flex}.AuthFilesPage-module__filterItem___Kko4o label{color:var(--text-tertiary);letter-spacing:0;white-space:nowrap;font-size:11px;font-weight:700}.AuthFilesPage-module__filterToggleItem___m2sGr{grid-column:1/-1;min-width:0}@media (min-width:769px) and (max-width:1024px){.AuthFilesPage-module__filterToggleItem___m2sGr{grid-column:1/-1}}.AuthFilesPage-module__filterToggleGroup___TdMH-{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;min-height:42px;display:grid}@media (max-width:768px){.AuthFilesPage-module__filterToggleGroup___TdMH-{grid-template-columns:1fr}}.AuthFilesPage-module__filterToggleCard___N4oxi{border:1px solid color-mix(in srgb, var(--border-color) 60%, transparent);background:color-mix(in srgb, var(--bg-primary) 56%, transparent);border-radius:8px;align-items:center;min-width:0;min-height:42px;padding:0 10px;display:flex}.AuthFilesPage-module__filterToggleCard___N4oxi>label{width:100%;min-width:0}.AuthFilesPage-module__filterToggle___mi9Sd{align-items:center;min-height:40px;padding-inline-start:2px;padding-inline-end:2px;display:flex}.AuthFilesPage-module__filterToggleLabel___5rAlu{color:var(--text-primary);align-items:center;font-size:13px;font-weight:600;line-height:1.25;display:inline-flex}.AuthFilesPage-module__searchInput___-3dd7{padding-right:40px}.AuthFilesPage-module__searchIcon___td5EK{color:var(--text-tertiary);pointer-events:none;display:block}.AuthFilesPage-module__pageSizeSelect___yEBvp{border:1px solid color-mix(in srgb, var(--border-color) 70%, transparent);background-color:var(--bg-secondary);width:100%;color:var(--text-primary);cursor:text;box-sizing:border-box;border-radius:8px;height:42px;padding:8px 12px;font-size:14px}.AuthFilesPage-module__pageSizeSelect___yEBvp:focus{border-color:var(--primary-color);box-shadow:0 0 0 2px color-mix(in srgb, var(--primary-color) 12%, transparent);outline:none}.AuthFilesPage-module__fileGrid___ajvi5{grid-template-columns:repeat(auto-fill,minmax(min(100%,320px),1fr));gap:16px;display:grid}.AuthFilesPage-module__fileGridQuotaManaged___kOhRx{grid-template-columns:repeat(auto-fill,minmax(min(100%,340px),1fr))}.AuthFilesPage-module__fileGridCompact___meaAl{grid-template-columns:repeat(auto-fill,minmax(min(100%,280px),1fr))}.AuthFilesPage-module__antigravityGrid___N7Got{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;display:grid}@media (min-width:769px) and (max-width:1024px){.AuthFilesPage-module__antigravityGrid___N7Got{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width:768px){.AuthFilesPage-module__antigravityGrid___N7Got{grid-template-columns:1fr}}.AuthFilesPage-module__codexGrid___vLB3H{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;display:grid}@media (min-width:769px) and (max-width:1024px){.AuthFilesPage-module__codexGrid___vLB3H{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width:768px){.AuthFilesPage-module__codexGrid___vLB3H{grid-template-columns:1fr}}.AuthFilesPage-module__antigravityControls___gn3rt{flex-wrap:wrap;align-items:flex-end;gap:16px;margin-bottom:16px;display:flex}.AuthFilesPage-module__antigravityControl___rQ8wo{flex-direction:column;gap:4px;display:flex}.AuthFilesPage-module__antigravityControl___rQ8wo label{color:var(--text-secondary);white-space:nowrap;font-size:12px;font-weight:500}.AuthFilesPage-module__codexControls___Clxl6{flex-wrap:wrap;align-items:flex-end;gap:16px;margin-bottom:16px;display:flex}.AuthFilesPage-module__codexControl___E7Mtk{flex-direction:column;gap:4px;display:flex}.AuthFilesPage-module__codexControl___E7Mtk label{color:var(--text-secondary);white-space:nowrap;font-size:12px;font-weight:500}.AuthFilesPage-module__antigravityCard___rt36l{background-image:linear-gradient(#e0f7fa0f,#0000)}.AuthFilesPage-module__claudeCard___L-dIs{background-image:linear-gradient(#fbece414,#0000)}.AuthFilesPage-module__codexCard___FiEQ6{background-image:linear-gradient(#eae7ff14,#0000)}.AuthFilesPage-module__kimiCard___zWq5C{background-image:linear-gradient(#dce8ff14,#0000)}.AuthFilesPage-module__xaiCard___EW-0Z{background-image:linear-gradient(#f3f4f614,#0000)}.AuthFilesPage-module__quotaSection___hXy5f{border-top:1px dashed color-mix(in srgb, var(--border-color) 82%, transparent);flex-direction:column;gap:8px;margin-top:2px;padding-top:8px;display:flex}.AuthFilesPage-module__quotaRow___P2dUi{flex-direction:column;gap:4px;display:flex}.AuthFilesPage-module__antigravityQuotaGroup___-1dZn{flex-direction:column;gap:8px;padding-bottom:4px;display:flex}.AuthFilesPage-module__antigravityQuotaGroup___-1dZn+.AuthFilesPage-module__antigravityQuotaGroup___-1dZn{border-top:1px solid color-mix(in srgb, var(--border-color) 65%, transparent);padding-top:8px}.AuthFilesPage-module__antigravityQuotaGroupHeader___0XV-S{flex-direction:column;gap:2px;min-width:0;display:flex}.AuthFilesPage-module__antigravityQuotaGroupTitle___Wv00F{color:var(--text-primary);font-size:13px;font-weight:700}.AuthFilesPage-module__antigravityQuotaGroupDescription___efR87{color:var(--text-tertiary);font-size:12px;line-height:1.35}.AuthFilesPage-module__quotaRowHeader___IKu7H{justify-content:space-between;align-items:center;gap:8px;min-width:0;display:flex}@media (max-width:768px){.AuthFilesPage-module__quotaRowHeader___IKu7H{flex-direction:column;align-items:flex-start}}.AuthFilesPage-module__quotaModel___huwv6{color:var(--text-primary);white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0;font-size:13px;font-weight:600;overflow:hidden}@media (max-width:768px){.AuthFilesPage-module__quotaModel___huwv6{white-space:normal}}.AuthFilesPage-module__quotaBar___ex7am{background-color:var(--bg-tertiary);border-radius:999px;height:8px;overflow:hidden}.AuthFilesPage-module__quotaBarFill___KqH7M{background-color:var(--success-color,#22c55e);height:100%;transition:width .2s}.AuthFilesPage-module__quotaBarFillHigh___F8WGP{background-color:var(--success-color,#22c55e)}.AuthFilesPage-module__quotaBarFillMedium___ae0Pi{background-color:var(--quota-medium-color,#e0aa14)}.AuthFilesPage-module__quotaBarFillLow___dX4lb{background-color:var(--danger-color)}.AuthFilesPage-module__quotaMeta___HcbUH{color:var(--text-secondary);white-space:nowrap;align-items:center;gap:8px;font-size:12px;display:flex}@media (max-width:768px){.AuthFilesPage-module__quotaMeta___HcbUH{justify-content:flex-start}}.AuthFilesPage-module__quotaPercent___6J9UR{color:var(--text-primary);font-weight:600}.AuthFilesPage-module__quotaReset___bmEse{color:var(--text-tertiary)}.AuthFilesPage-module__quotaAmount___k3Wx6{color:var(--text-secondary)}.AuthFilesPage-module__quotaMessage___1w3oM{color:var(--text-tertiary);text-align:center;padding:8px 0;font-size:12px}.AuthFilesPage-module__quotaMessageAction___9r9cq{cursor:pointer;background:0 0;border:none;width:100%;text-decoration:underline}.AuthFilesPage-module__quotaMessageAction___9r9cq:hover:not(:disabled){color:var(--text-primary)}.AuthFilesPage-module__quotaMessageAction___9r9cq:disabled{cursor:not-allowed;opacity:.6;text-decoration:none}.AuthFilesPage-module__quotaResetCreditButton___nOyaf.btn.btn-sm{border-radius:999px;padding-inline-start:12px;padding-inline-end:12px}.AuthFilesPage-module__quotaResetCreditButton___nOyaf.btn.btn-sm>span{white-space:nowrap;align-items:center;gap:6px;display:inline-flex}.AuthFilesPage-module__quotaCardActions___jIyFS{flex-wrap:wrap;justify-content:flex-end;gap:4px;padding-top:4px;display:flex}.AuthFilesPage-module__quotaError___dEV4B{color:var(--danger-color);border:1px solid var(--danger-color);background-color:#c6574614;border-radius:4px;padding:4px 8px;font-size:12px}.AuthFilesPage-module__quotaWarning___G1Tvc{color:var(--warning-text);background-color:var(--warning-bg);border:1px solid var(--warning-border);border-radius:4px;padding:4px 8px;font-size:12px}.AuthFilesPage-module__codexPlan___4IbAU{color:var(--text-secondary);flex-wrap:wrap;align-items:center;gap:6px 12px;font-size:12px;display:flex}.AuthFilesPage-module__codexPlanItem___MGwEH{flex-wrap:wrap;align-items:center;gap:6px;min-width:0;max-width:100%;display:inline-flex}.AuthFilesPage-module__codexPlanLabel___RZN4K{color:var(--text-tertiary);flex:none}.AuthFilesPage-module__codexPlanValue___Z0Kgr{color:var(--text-primary);text-transform:capitalize;min-width:0;font-weight:600}.AuthFilesPage-module__codexPlanSeparator___t84wX{background-color:var(--border-color);width:1px;height:12px}.AuthFilesPage-module__premiumPlanValue___9WyhU,.AuthFilesPage-module__subscriptionBadgePremium___VRQC9{white-space:nowrap;isolation:isolate;color:#6b4b00;text-shadow:0 1px #ffffff8c;text-transform:capitalize;background:radial-gradient(circle at 18% 24%,#fffffff5 0%,#ffffffb8 18%,#fff0 42%),linear-gradient(135deg,#fff9e3 0%,#ffe07f 52%,#e0aa14 100%);border:1px solid #d9a516b8;border-radius:999px;flex:none;align-items:center;padding:2px 8px;font-size:12px;font-weight:700;display:inline-flex;position:relative;overflow:visible;box-shadow:0 1px 3px #855c0029,inset 0 0 0 1px #ffffff38,0 0 16px #ffd66247}.AuthFilesPage-module__premiumPlanValue___9WyhU:before,.AuthFilesPage-module__subscriptionBadgePremium___VRQC9:before{content:"";border-radius:inherit;--glass-blur:9px;filter:var(--glass-filter);opacity:.75;pointer-events:none;z-index:-1;background:radial-gradient(circle at 18% 22%,#ffffffe6 0%,#ffed9e94 32%,#ffd75b00 72%);position:absolute;top:-6px;bottom:-6px;left:-9px;right:-9px}@media (dynamic-range:high){.AuthFilesPage-module__premiumPlanValue___9WyhU,.AuthFilesPage-module__subscriptionBadgePremium___VRQC9{color:#704c00;color:color(display-p3 .43 .3 0);background:radial-gradient(circle at 18% 24%,#fffcf0 0%,#fff7d2d1 18%,#fff2b400 42%),linear-gradient(135deg,#fffae1,#ffda46,#f2ac00);background:radial-gradient(circle at 18% 24%,color(display-p3 1 .99 .94) 0%,color(display-p3 1 .97 .82/.82) 18%,color(display-p3 1 .95 .7/0) 42%),linear-gradient(135deg,color(display-p3 1 .98 .88),color(display-p3 .99 .86 .34),color(display-p3 .92 .68 .05));border-color:#ebb900d9;border-color:color(display-p3 .9 .73 .12/.85);box-shadow:0 1px 4px #76470038,inset 0 0 0 1px #fffadc4d,0 0 18px #ffe22f5c;box-shadow:0 1px 4px color(display-p3 .45 .28 0/.22),inset 0 0 0 1px color(display-p3 1 .98 .86/.3),0 0 18px color(display-p3 1 .89 .2/.36)}}@supports (color:color(rec2100-linear 1 1 1)){@media (dynamic-range:high){.AuthFilesPage-module__premiumPlanValue___9WyhU,.AuthFilesPage-module__subscriptionBadgePremium___VRQC9{dynamic-range-limit:no-limit;box-shadow:0 1px 4px #76470038, 0 0 0 1px #fffadc4d inset, 0 0 14px #ffe22f5c, 0 0 30px color(rec2100-linear 3.6 2.9 .7 / .48)}@supports (color:color(display-p3 0 0 0)){.AuthFilesPage-module__premiumPlanValue___9WyhU,.AuthFilesPage-module__subscriptionBadgePremium___VRQC9{box-shadow:0 1px 4px color(display-p3 .45 .28 0/.22), 0 0 0 1px color(display-p3 1 .98 .86/.3) inset, 0 0 14px color(display-p3 1 .89 .2/.36), 0 0 30px color(rec2100-linear 3.6 2.9 .7 / .48)}}.AuthFilesPage-module__premiumPlanValue___9WyhU:before,.AuthFilesPage-module__subscriptionBadgePremium___VRQC9:before{background:radial-gradient(circle at 18% 22%, color(rec2100-linear 6.5 6.2 5.4 / .92) 0%, color(rec2100-linear 2.4 2 .6 / .62) 34%, color(rec2100-linear 1 .85 .12 / 0) 76%);opacity:.92}}}[data-theme=dark] .AuthFilesPage-module__premiumPlanValue___9WyhU,[data-theme=dark] .AuthFilesPage-module__subscriptionBadgePremium___VRQC9{color:#fff0a8;text-shadow:0 0 10px #ffd44f38;background:radial-gradient(circle at 18% 24%,#ffe58a52 0%,#ffd6622e 18%,#ffd66200 44%),linear-gradient(135deg,#4f3d0b 0%,#6e5510 48%,#8f6d10 100%);border-color:#e2b432b3;box-shadow:0 1px 6px #00000047,inset 0 0 0 1px #ffdc7829,0 0 18px #ffc42c38}[data-theme=dark] .AuthFilesPage-module__premiumPlanValue___9WyhU:before,[data-theme=dark] .AuthFilesPage-module__subscriptionBadgePremium___VRQC9:before{opacity:.8;background:radial-gradient(circle at 18% 24%,#ffe58a6b 0%,#ffc54247 34%,#fb00 74%)}@media (dynamic-range:high){[data-theme=dark] .AuthFilesPage-module__premiumPlanValue___9WyhU,[data-theme=dark] .AuthFilesPage-module__subscriptionBadgePremium___VRQC9{color:#ffed95;color:color(display-p3 1 .93 .58);background:radial-gradient(circle at 18% 24%,#ffe26161 0%,#ffd13133 18%,#ffd13100 44%),linear-gradient(135deg,#573f00,#7f5b00,#a37400);background:radial-gradient(circle at 18% 24%,color(display-p3 1 .89 .38/.38) 0%,color(display-p3 1 .82 .2/.2) 18%,color(display-p3 1 .82 .2/0) 44%),linear-gradient(135deg,color(display-p3 .33 .25 .04),color(display-p3 .48 .36 .08),color(display-p3 .62 .46 .09));border-color:#ce9700c7;border-color:color(display-p3 .78 .6 .16/.78);box-shadow:0 1px 8px #00000052,inset 0 0 0 1px #f9ca002e,0 0 20px #ffc21447;box-shadow:0 1px 8px color(display-p3 0 0 0/.32),inset 0 0 0 1px color(display-p3 .95 .8 .24/.18),0 0 20px color(display-p3 1 .76 .1/.28)}}@supports (color:color(rec2100-linear 1 1 1)){@media (dynamic-range:high){[data-theme=dark] .AuthFilesPage-module__premiumPlanValue___9WyhU,[data-theme=dark] .AuthFilesPage-module__subscriptionBadgePremium___VRQC9{dynamic-range-limit:no-limit;box-shadow:0 1px 8px #00000052, 0 0 0 1px #f9ca002e inset, 0 0 16px #ffc21447, 0 0 28px color(rec2100-linear 4.8 3.5 .45 / .4)}@supports (color:color(display-p3 0 0 0)){[data-theme=dark] .AuthFilesPage-module__premiumPlanValue___9WyhU,[data-theme=dark] .AuthFilesPage-module__subscriptionBadgePremium___VRQC9{box-shadow:0 1px 8px color(display-p3 0 0 0/.32), 0 0 0 1px color(display-p3 .95 .8 .24/.18) inset, 0 0 16px color(display-p3 1 .76 .1/.28), 0 0 28px color(rec2100-linear 4.8 3.5 .45 / .4)}}[data-theme=dark] .AuthFilesPage-module__premiumPlanValue___9WyhU:before,[data-theme=dark] .AuthFilesPage-module__subscriptionBadgePremium___VRQC9:before{background:radial-gradient(circle at 18% 24%, color(rec2100-linear 5.6 4.1 .75 / .64) 0%, color(rec2100-linear 2.2 1.5 .2 / .34) 34%, color(rec2100-linear 1.2 .9 .06 / 0) 74%);opacity:.95}}}@media (max-width:768px){.AuthFilesPage-module__premiumPlanValue___9WyhU,.AuthFilesPage-module__subscriptionBadgePremium___VRQC9{background:radial-gradient(circle at 18% 24%,#ffffffe0 0%,#ffffff94 18%,#fff0 42%),linear-gradient(135deg,#fff9e3 0%,#ffe07f 52%,#e0aa14 100%);overflow:hidden;box-shadow:0 1px 3px #855c0029,inset 0 0 0 1px #ffffff38,0 0 10px #ffd66238}.AuthFilesPage-module__premiumPlanValue___9WyhU:before,.AuthFilesPage-module__subscriptionBadgePremium___VRQC9:before{content:none}[data-theme=dark] .AuthFilesPage-module__premiumPlanValue___9WyhU,[data-theme=dark] .AuthFilesPage-module__subscriptionBadgePremium___VRQC9{background:radial-gradient(circle at 18% 24%,#ffe58a47 0%,#ffd66224 18%,#ffd66200 44%),linear-gradient(135deg,#4f3d0b 0%,#6e5510 48%,#8f6d10 100%);box-shadow:0 1px 6px #00000047,inset 0 0 0 1px #ffdc7829,0 0 10px #ffc42c2e}}.AuthFilesPage-module__fileCard___j9Jtq{background-color:color-mix(in srgb, var(--bg-primary) 85%, transparent);--glass-blur:8px;-webkit-backdrop-filter:var(--glass-backdrop-filter);border:1px solid color-mix(in srgb, var(--border-color) 70%, transparent);border-radius:12px;flex-direction:column;min-height:100%;padding:16px;transition:transform .15s,box-shadow .15s,border-color .15s;display:flex;position:relative;overflow:hidden}.AuthFilesPage-module__fileCard___j9Jtq:hover{border-color:color-mix(in srgb, var(--primary-color) 28%, var(--border-color));transform:translateY(-1px);box-shadow:0 8px 24px -12px #00000026}.AuthFilesPage-module__fileCardSelected___9i7m1{border-color:color-mix(in srgb, var(--primary-color) 60%, transparent);box-shadow:0 0 0 1px color-mix(in srgb, var(--primary-color) 30%, transparent)}.AuthFilesPage-module__fileCardSelected___9i7m1:hover{border-color:color-mix(in srgb, var(--primary-color) 60%, transparent)}.AuthFilesPage-module__fileCardDisabled___hbSbQ{background-color:color-mix(in srgb, var(--bg-primary) 78%, var(--bg-secondary));border-color:color-mix(in srgb, var(--border-color) 62%, transparent)}.AuthFilesPage-module__fileCardDisabled___hbSbQ .AuthFilesPage-module__providerAvatar___4xnYu,.AuthFilesPage-module__fileCardDisabled___hbSbQ .AuthFilesPage-module__cardHeaderContent___rh9WP,.AuthFilesPage-module__fileCardDisabled___hbSbQ .AuthFilesPage-module__cardMeta___H6kAQ,.AuthFilesPage-module__fileCardDisabled___hbSbQ .AuthFilesPage-module__healthStatusMessage___KKfW-,.AuthFilesPage-module__fileCardDisabled___hbSbQ .AuthFilesPage-module__subscriptionError___xaqEd,.AuthFilesPage-module__fileCardDisabled___hbSbQ .AuthFilesPage-module__cardInsights___ci5AY{opacity:.72}.AuthFilesPage-module__fileCardDisabled___hbSbQ .AuthFilesPage-module__cardSelection___wOE11,.AuthFilesPage-module__fileCardDisabled___hbSbQ .AuthFilesPage-module__cardActions___mJgkW{opacity:1}.AuthFilesPage-module__fileCardDisabled___hbSbQ:hover{box-shadow:none;border-color:var(--border-color);transform:none}.AuthFilesPage-module__fileCardCompact___u9yZu{border-radius:10px;padding:12px}.AuthFilesPage-module__fileCardCompact___u9yZu .AuthFilesPage-module__fileCardMain___6JwC7,.AuthFilesPage-module__fileCardCompact___u9yZu .AuthFilesPage-module__cardHeader___uJMtL{gap:8px}.AuthFilesPage-module__fileCardCompact___u9yZu .AuthFilesPage-module__cardSelection___wOE11{margin-top:6px}.AuthFilesPage-module__fileCardCompact___u9yZu .AuthFilesPage-module__providerAvatar___4xnYu{border-radius:8px;width:34px;height:34px}.AuthFilesPage-module__fileCardCompact___u9yZu .AuthFilesPage-module__providerAvatarImage___QL5oK{width:16px;height:16px}.AuthFilesPage-module__fileCardCompact___u9yZu .AuthFilesPage-module__providerAvatarFallback___H9Mgn{font-size:14px}.AuthFilesPage-module__fileCardCompact___u9yZu .AuthFilesPage-module__cardHeaderContent___rh9WP{gap:3px}.AuthFilesPage-module__fileCardCompact___u9yZu .AuthFilesPage-module__cardBadgeRow___SeOzZ{gap:4px}.AuthFilesPage-module__fileCardCompact___u9yZu .AuthFilesPage-module__typeBadge___Dtm6A,.AuthFilesPage-module__fileCardCompact___u9yZu .AuthFilesPage-module__stateBadge___Cq7id,.AuthFilesPage-module__fileCardCompact___u9yZu .AuthFilesPage-module__subscriptionBadge___vP30K,.AuthFilesPage-module__fileCardCompact___u9yZu .AuthFilesPage-module__subscriptionBadgePremium___VRQC9{padding:3px 7px;font-size:10px}.AuthFilesPage-module__fileCardCompact___u9yZu .AuthFilesPage-module__fileName___DZ39s{-webkit-line-clamp:1;font-size:13px;line-height:1.3}.AuthFilesPage-module__fileCardCompact___u9yZu .AuthFilesPage-module__healthStatusMessage___KKfW-,.AuthFilesPage-module__fileCardCompact___u9yZu .AuthFilesPage-module__subscriptionError___xaqEd{border-radius:8px;padding:6px 8px;font-size:11px}.AuthFilesPage-module__fileCardCompact___u9yZu .AuthFilesPage-module__quotaSection___hXy5f{display:none}.AuthFilesPage-module__fileCardCompact___u9yZu .AuthFilesPage-module__cardActions___mJgkW{gap:6px;padding-top:6px}.AuthFilesPage-module__fileCardCompact___u9yZu .AuthFilesPage-module__cardActionsMain___9Lsw7{gap:4px}.AuthFilesPage-module__fileCardCompact___u9yZu .AuthFilesPage-module__primaryActionButton___ex-Us.btn.btn-sm{flex:0 auto;min-width:0;padding-inline-start:8px;padding-inline-end:8px}.AuthFilesPage-module__fileCardCompact___u9yZu .AuthFilesPage-module__cardUtilityActions___LX5uj{border-radius:6px;gap:2px;padding:2px}.AuthFilesPage-module__fileCardCompact___u9yZu .AuthFilesPage-module__iconButton___XT5TY.btn.btn-sm{border-radius:6px;width:28px;min-width:28px;height:28px}.AuthFilesPage-module__fileCardCompact___u9yZu .AuthFilesPage-module__statusToggle___H8bxD{gap:6px}.AuthFilesPage-module__fileCardCompact___u9yZu .AuthFilesPage-module__statusToggleLabel___Wdwo7{font-size:10px}.AuthFilesPage-module__fileCardLayout___HRpBj{align-items:stretch;gap:16px;min-height:100%;display:flex}.AuthFilesPage-module__fileCardMain___6JwC7{flex-direction:column;flex:1;gap:10px;min-width:0;display:flex}.AuthFilesPage-module__cardHeader___uJMtL{align-items:flex-start;gap:10px;display:flex}.AuthFilesPage-module__cardSelection___wOE11{flex-shrink:0;margin-top:8px}.AuthFilesPage-module__providerAvatar___4xnYu{border:1px solid color-mix(in srgb, var(--border-color) 60%, transparent);border-radius:10px;flex:none;justify-content:center;align-items:center;width:40px;height:40px;display:inline-flex}.AuthFilesPage-module__providerAvatarImage___QL5oK{object-fit:contain;width:22px;height:22px}.AuthFilesPage-module__providerAvatarFallback___H9Mgn{font-size:18px;font-weight:700;line-height:1}.AuthFilesPage-module__cardHeaderContent___rh9WP{flex-direction:column;flex:1;gap:6px;min-width:0;display:flex}.AuthFilesPage-module__cardBadgeRow___SeOzZ{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.AuthFilesPage-module__typeBadge___Dtm6A{white-space:nowrap;border:1px solid #0000;border-radius:6px;flex-shrink:0;align-items:center;padding:3px 8px;font-size:11px;font-weight:600;line-height:1;display:inline-flex}.AuthFilesPage-module__stateBadge___Cq7id{white-space:nowrap;letter-spacing:.02em;border-radius:6px;align-items:center;padding:3px 8px;font-size:10px;font-weight:700;line-height:1;display:inline-flex}.AuthFilesPage-module__stateBadgeActive___Fo6ts{color:var(--success-badge-text,#065f46);background:var(--success-badge-bg,#d1fae5);border:1px solid var(--success-badge-border,#6ee7b7)}.AuthFilesPage-module__stateBadgeWarning___vMjci{color:var(--warning-text);background:var(--warning-bg);border:1px solid var(--warning-border)}.AuthFilesPage-module__stateBadgeDisabled___uB-Ra{color:var(--text-secondary);background:color-mix(in srgb, var(--bg-tertiary) 86%, transparent);border:1px solid var(--border-color)}.AuthFilesPage-module__stateBadgeVirtual___Ig7fr{color:var(--text-secondary);background:color-mix(in srgb, var(--bg-tertiary) 82%, transparent);border:1px dashed color-mix(in srgb, var(--border-primary) 90%, transparent)}.AuthFilesPage-module__subscriptionBadge___vP30K{white-space:nowrap;border:1px solid #0000;border-radius:6px;align-items:center;min-width:0;max-width:100%;padding:3px 8px;font-size:10px;font-weight:700;line-height:1;display:inline-flex}.AuthFilesPage-module__subscriptionBadgeLoading___MOER-{color:var(--text-secondary);background:color-mix(in srgb, var(--bg-tertiary) 86%, transparent);border-color:var(--border-color)}.AuthFilesPage-module__subscriptionBadgeFree___rJzzo{color:var(--text-secondary);background:color-mix(in srgb, var(--bg-tertiary) 82%, transparent);border-color:color-mix(in srgb, var(--border-color) 86%, transparent)}.AuthFilesPage-module__subscriptionBadgePaid___0lu-a{color:#8a5b00;background:#d9a51624;border-color:#d9a51657}[data-theme=dark] .AuthFilesPage-module__subscriptionBadgePaid___0lu-a{color:#ffd862;background:#e2b4321f;border-color:#e2b43247}.AuthFilesPage-module__subscriptionBadgeUnknown___PxvCn{color:var(--text-secondary);background:color-mix(in srgb, var(--bg-tertiary) 80%, transparent);border-color:color-mix(in srgb, var(--border-color) 72%, transparent)}.AuthFilesPage-module__subscriptionBadgeError___VmSzr{color:var(--danger-color);border-color:color-mix(in srgb, var(--danger-color) 70%, transparent);background:#c6574614}.AuthFilesPage-module__subscriptionBadgePremium___VRQC9{text-transform:none;padding:3px 8px;font-size:10px}.AuthFilesPage-module__fileName___DZ39s{color:var(--text-primary);word-break:break-all;-webkit-line-clamp:2;letter-spacing:-.01em;-webkit-box-orient:vertical;font-size:14px;font-weight:800;line-height:1.4;display:-webkit-box;overflow:hidden}.AuthFilesPage-module__cardMeta___H6kAQ{flex-wrap:wrap;align-items:baseline;gap:4px 14px;padding:0 2px;display:flex}.AuthFilesPage-module__cardMetaCompact___h-CkT{gap:3px 12px}.AuthFilesPage-module__cardMetaCompact___h-CkT .AuthFilesPage-module__metaLabel___4mGPs{font-size:10px}.AuthFilesPage-module__cardMetaCompact___h-CkT .AuthFilesPage-module__metaValue___VKbWa{font-size:11px}.AuthFilesPage-module__metaItem___f62C0{background:0 0;border:none;align-items:baseline;gap:5px;min-width:0;padding:0;display:inline-flex}.AuthFilesPage-module__metaLabel___4mGPs{color:var(--text-tertiary);white-space:nowrap;font-size:11px;font-weight:500;line-height:1.2}.AuthFilesPage-module__metaLabel___4mGPs:after{content:":"}.AuthFilesPage-module__metaValue___VKbWa{min-width:0;color:var(--text-secondary);word-break:break-word;font-size:12px;font-weight:600;line-height:1.4}.AuthFilesPage-module__priorityBadge___vHY0g{min-width:0}.AuthFilesPage-module__priorityValue___cH2dN{font-variant-numeric:tabular-nums}.AuthFilesPage-module__noteText___xsgqc{color:var(--text-secondary);align-items:flex-start;gap:6px;min-width:0;font-size:12px;line-height:1.5;display:flex}.AuthFilesPage-module__noteLabel___DrD8k{color:var(--text-tertiary);flex:none;font-weight:600}.AuthFilesPage-module__noteValue___-wZpH{-webkit-line-clamp:2;word-break:break-word;-webkit-box-orient:vertical;min-width:0;display:-webkit-box;overflow:hidden}.AuthFilesPage-module__subscriptionSubtitle___oUyH9{color:var(--text-secondary);align-items:flex-start;gap:6px;min-width:0;font-size:12px;line-height:1.5;display:flex}.AuthFilesPage-module__subscriptionSubtitleLabel___ZCx0J{color:var(--text-tertiary);flex:none;font-weight:600}.AuthFilesPage-module__subscriptionSubtitleValue___CRebG{-webkit-line-clamp:2;word-break:break-word;-webkit-box-orient:vertical;min-width:0;display:-webkit-box;overflow:hidden}.AuthFilesPage-module__sortSelect___4fEjm{width:100%;min-width:0}.AuthFilesPage-module__healthStatusMessage___KKfW-{color:var(--warning-text);background-color:color-mix(in srgb, var(--warning-bg) 60%, transparent);border:1px solid color-mix(in srgb, var(--warning-border) 60%, transparent);word-break:break-word;border-radius:8px;align-items:flex-start;gap:6px;padding:8px 10px;font-size:11px;display:flex}.AuthFilesPage-module__subscriptionError___xaqEd{color:var(--danger-color);border:1px solid color-mix(in srgb, var(--danger-color) 58%, transparent);word-break:break-word;background-color:#c6574614;border-radius:8px;align-items:flex-start;gap:6px;padding:8px 10px;font-size:11px;display:flex}.AuthFilesPage-module__messageIcon___X3Cwx{flex-shrink:0;margin-top:1px}.AuthFilesPage-module__cardInsights___ci5AY{flex-direction:column;gap:8px;padding:0 2px;display:flex}.AuthFilesPage-module__cardInsightsCompact___y0Q4G{gap:6px}.AuthFilesPage-module__cardStats___JQ4ig{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.AuthFilesPage-module__cardStatsCompact___gRvUT{gap:6px}.AuthFilesPage-module__cardStatsCompact___gRvUT .AuthFilesPage-module__statPill___wFsBu{padding:3px 8px}.AuthFilesPage-module__cardStatsCompact___gRvUT .AuthFilesPage-module__statLabel___x0iKO{font-size:10px}.AuthFilesPage-module__cardStatsCompact___gRvUT .AuthFilesPage-module__statValue___0Cyg5{font-size:12px}.AuthFilesPage-module__statPill___wFsBu{border:none;border-radius:999px;align-items:baseline;gap:5px;min-width:0;padding:4px 10px;display:inline-flex}.AuthFilesPage-module__statLabel___x0iKO{font-size:11px;font-weight:600;line-height:1}.AuthFilesPage-module__statValue___0Cyg5{font-variant-numeric:tabular-nums;font-size:13px;font-weight:700;line-height:1}.AuthFilesPage-module__statSuccess___mh8iR{background:color-mix(in srgb, var(--success-badge-bg,#d1fae5) 50%, transparent);color:var(--success-badge-text,#065f46)}.AuthFilesPage-module__statFailure___ivDGu{background:color-mix(in srgb, var(--failure-badge-bg) 50%, transparent);color:var(--failure-badge-text)}.AuthFilesPage-module__statusPanel___jxcFi{flex-direction:column;gap:4px;display:flex}.AuthFilesPage-module__statusPanelCompact___qla9F{gap:3px}.AuthFilesPage-module__statusPanelCompact___qla9F .AuthFilesPage-module__statusPanelLabel___D3k8N{display:none}.AuthFilesPage-module__statusPanelCompact___qla9F .AuthFilesPage-module__statusBar___n-3Gp{flex-wrap:wrap;gap:6px 8px}.AuthFilesPage-module__statusPanelCompact___qla9F .AuthFilesPage-module__statusBlocks___DpQaY{gap:2px}.AuthFilesPage-module__statusPanelCompact___qla9F .AuthFilesPage-module__statusBlockWrapper___XCgvC{min-width:5px}.AuthFilesPage-module__statusPanelCompact___qla9F .AuthFilesPage-module__statusRate___LZm5e{margin-left:auto;padding:5px 7px;font-size:11px}.AuthFilesPage-module__statusPanelLabel___D3k8N{color:var(--text-tertiary);text-transform:uppercase;letter-spacing:.03em;align-items:center;gap:4px;font-size:10px;font-weight:500;display:inline-flex}.AuthFilesPage-module__statusBar___n-3Gp{align-items:center;gap:10px;width:100%;min-width:0;max-width:none;padding:0;display:flex}@media (max-width:768px){.AuthFilesPage-module__statusBar___n-3Gp{flex-direction:column;align-items:stretch}}.AuthFilesPage-module__statusBlocks___DpQaY{flex:1;gap:3px;min-width:0;display:flex;position:relative}.AuthFilesPage-module__statusBlockWrapper___XCgvC{cursor:pointer;-webkit-tap-highlight-color:transparent;flex:1;min-width:5px;position:relative}.AuthFilesPage-module__statusBlock___RPMAs{border-radius:999px;width:100%;height:6px;transition:transform .15s,opacity .15s}.AuthFilesPage-module__statusBlockWrapper___XCgvC:hover .AuthFilesPage-module__statusBlock___RPMAs,.AuthFilesPage-module__statusBlockWrapper___XCgvC.AuthFilesPage-module__statusBlockActive___pjNyd .AuthFilesPage-module__statusBlock___RPMAs{opacity:.9;transform:scaleY(1.6)}.AuthFilesPage-module__statusBlockIdle___6Uc0C{background-color:var(--border-secondary,#e5e7eb)}.AuthFilesPage-module__statusTooltip___skNaB{background:var(--bg-quinary,var(--bg-primary,#fff));border:1px solid var(--border-secondary,#e5e7eb);white-space:nowrap;z-index:1000;pointer-events:none;color:var(--text-primary);border-radius:10px;padding:8px 10px;font-size:11px;line-height:1.5;position:absolute;bottom:calc(100% + 8px);left:50%;transform:translate(-50%);box-shadow:0 8px 24px #00000024}.AuthFilesPage-module__statusTooltip___skNaB:after{content:"";border:5px solid #0000;border-top-color:var(--bg-quinary,var(--bg-primary,#fff));position:absolute;top:100%;left:50%;transform:translate(-50%)}.AuthFilesPage-module__statusTooltip___skNaB:before{content:"";border:6px solid #0000;border-top-color:var(--border-secondary,#e5e7eb);position:absolute;top:100%;left:50%;transform:translate(-50%)}.AuthFilesPage-module__statusTooltipLeft___ZK0OM{left:0;transform:translate(0)}.AuthFilesPage-module__statusTooltipLeft___ZK0OM:after,.AuthFilesPage-module__statusTooltipLeft___ZK0OM:before{left:8px;transform:none}.AuthFilesPage-module__statusTooltipRight___MrcVP{left:auto;right:0;transform:translate(0)}.AuthFilesPage-module__statusTooltipRight___MrcVP:after,.AuthFilesPage-module__statusTooltipRight___MrcVP:before{left:auto;right:8px;transform:none}.AuthFilesPage-module__tooltipTime___6rx7A{color:var(--text-secondary);margin-bottom:2px;display:block}.AuthFilesPage-module__tooltipStats___rDF8h{align-items:center;gap:8px;display:flex}.AuthFilesPage-module__tooltipSuccess___DygUj{color:var(--success-color,#22c55e)}.AuthFilesPage-module__tooltipFailure___Som0h{color:var(--danger-color,#ef4444)}.AuthFilesPage-module__tooltipRate___gbhZZ{color:var(--text-secondary);margin-left:2px}.AuthFilesPage-module__statusRate___LZm5e{white-space:nowrap;background:var(--bg-tertiary);border-radius:999px;flex-shrink:0;align-items:center;gap:4px;padding:6px 10px;font-size:12px;font-weight:700;display:flex}.AuthFilesPage-module__statusRateHigh___seYyb{color:var(--success-badge-text,#065f46);background:var(--success-badge-bg,#d1fae5)}.AuthFilesPage-module__statusRateMedium___aNblo{color:var(--warning-text,#92400e);background:var(--warning-bg,#fef3c7)}.AuthFilesPage-module__statusRateLow___BxxBi{color:var(--failure-badge-text);background:var(--failure-badge-bg)}@media (max-width:768px){.AuthFilesPage-module__statusTooltip___skNaB{padding:8px 12px;font-size:12px}.AuthFilesPage-module__statusBlocks___DpQaY{min-width:0}}.AuthFilesPage-module__prefixProxyEditor___QyoN1{flex-direction:column;gap:16px;max-height:60vh;display:flex;overflow:auto}.AuthFilesPage-module__prefixProxyLoading___pipJw{color:var(--text-secondary);justify-content:center;align-items:center;gap:8px;padding:8px 0;font-size:12px;display:flex}.AuthFilesPage-module__prefixProxyError___HNtOZ{border:1px solid var(--danger-color);color:var(--danger-color);background-color:#c657461a;border-radius:8px;padding:8px 16px;font-size:12px}.AuthFilesPage-module__prefixProxyJsonWrapper___j237Y{flex-direction:column;gap:6px;display:flex}.AuthFilesPage-module__prefixProxyLabel___IJHtd{color:var(--text-secondary);font-size:12px;font-weight:600}.AuthFilesPage-module__prefixProxyTextarea___wcym6{border:1px solid var(--border-color);background-color:var(--bg-secondary);width:100%;color:var(--text-primary);resize:vertical;box-sizing:border-box;border-radius:8px;min-height:120px;padding:8px 16px;font-family:monospace;font-size:12px}.AuthFilesPage-module__prefixProxyTextarea___wcym6:focus{border-color:var(--primary-color);outline:none}.AuthFilesPage-module__prefixProxyInvalidContentPreview___WnKvR{border:1px solid var(--border-color);background-color:var(--bg-secondary);width:100%;max-height:220px;color:var(--text-secondary);white-space:pre-wrap;box-sizing:border-box;border-radius:8px;margin:0;padding:8px 16px;font-family:monospace;font-size:12px;line-height:1.5;overflow:auto}.AuthFilesPage-module__prefixProxyFields___da72p{grid-template-columns:1fr;gap:8px;display:grid}.AuthFilesPage-module__prefixProxyFields___da72p .form-group{margin:0}.AuthFilesPage-module__prefixProxyTextareaInvalid___CNpvm{border-color:var(--danger-color);box-shadow:0 0 0 3px #c657461f}.AuthFilesPage-module__cardActions___mJgkW{border-top:1px solid color-mix(in srgb, var(--border-color) 50%, transparent);justify-content:space-between;align-items:center;gap:8px;margin-top:auto;padding-top:8px;display:flex}.AuthFilesPage-module__cardActionsMain___9Lsw7{flex:1;align-items:center;gap:6px;min-width:0;display:flex}.AuthFilesPage-module__primaryActionButton___ex-Us.btn.btn-sm{min-width:0;padding-inline-start:10px;padding-inline-end:10px}.AuthFilesPage-module__modelsActionButton___-ihP6.btn.btn-sm{background:color-mix(in srgb, var(--primary-color) 10%, var(--bg-secondary));border-color:color-mix(in srgb, var(--primary-color) 20%, var(--border-color))}.AuthFilesPage-module__modelsActionButton___-ihP6.btn.btn-sm:hover{border-color:color-mix(in srgb, var(--primary-color) 35%, var(--border-color));background:color-mix(in srgb, var(--primary-color) 14%, var(--bg-secondary))}.AuthFilesPage-module__modelsActionButton___-ihP6.btn.btn-sm>span{align-items:center;gap:8px;min-width:0;display:inline-flex}.AuthFilesPage-module__modelsActionIconWrap___KD-87{background:color-mix(in srgb, var(--primary-color) 16%, transparent);border-radius:8px;flex:none;justify-content:center;align-items:center;width:22px;height:22px;display:inline-flex}.AuthFilesPage-module__actionButtonLabel___B0RSa{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.AuthFilesPage-module__cardUtilityActions___LX5uj{background:color-mix(in srgb, var(--bg-tertiary) 50%, transparent);border-radius:8px;align-items:center;gap:3px;padding:2px;display:flex}.AuthFilesPage-module__statusToggle___H8bxD{flex-shrink:0;align-items:center;gap:6px;margin-left:auto;display:inline-flex}.AuthFilesPage-module__statusToggleLabel___Wdwo7{color:var(--text-tertiary);font-size:11px;font-weight:500}.AuthFilesPage-module__iconButton___XT5TY.btn.btn-sm{box-sizing:border-box;border-radius:8px;gap:0;width:32px;min-width:32px;height:32px;padding:0}.AuthFilesPage-module__actionIcon___F2TRI{display:block}@media (max-width:768px){.AuthFilesPage-module__cardActions___mJgkW{flex-wrap:wrap}.AuthFilesPage-module__cardActionsMain___9Lsw7{flex-wrap:wrap;width:100%}.AuthFilesPage-module__primaryActionButton___ex-Us.btn.btn-sm{flex:auto;min-width:0}.AuthFilesPage-module__statusToggle___H8bxD{justify-content:space-between;width:100%}}.AuthFilesPage-module__pagination___Hwpg2{border-top:1px solid var(--border-color);flex-wrap:wrap;justify-content:center;align-items:center;gap:16px;margin-top:24px;padding-top:16px;display:flex}.AuthFilesPage-module__batchActionContainer___qPwxN{left:var(--content-center-x,50%);bottom:calc(16px + env(safe-area-inset-bottom));z-index:50;box-sizing:border-box;will-change:transform, opacity;width:min(960px,100vw - 24px);max-width:calc(100vw - 24px);position:fixed;transform:translate(-50%)}.AuthFilesPage-module__batchActionBar___YEJju{border:1px solid color-mix(in srgb, var(--border-color) 70%, transparent);background:color-mix(in srgb, var(--bg-primary) 84%, transparent);--glass-blur:12px;-webkit-backdrop-filter:var(--glass-backdrop-filter);box-shadow:var(--shadow-lg);border-radius:12px;justify-content:space-between;align-items:center;gap:8px;padding:10px 12px;display:flex}.AuthFilesPage-module__batchActionLeft___g851y,.AuthFilesPage-module__batchActionRight___NDPeh{flex-wrap:wrap;align-items:center;gap:4px;display:flex}.AuthFilesPage-module__batchActionRight___NDPeh{justify-content:flex-end}.AuthFilesPage-module__batchSelectionText___rSTLk{color:var(--text-primary);margin-right:2px;font-size:13px;font-weight:600}@media (max-width:768px){.AuthFilesPage-module__batchActionContainer___qPwxN{width:calc(100vw - 16px);max-width:calc(100vw - 16px);bottom:calc(12px + env(safe-area-inset-bottom))}.AuthFilesPage-module__batchActionBar___YEJju{flex-direction:column;align-items:stretch}.AuthFilesPage-module__batchActionLeft___g851y,.AuthFilesPage-module__batchActionRight___NDPeh{justify-content:center}}.AuthFilesPage-module__pageInfo___Fkfbg{color:var(--text-secondary);background-color:var(--bg-secondary);border-radius:8px;padding:4px 16px;font-size:13px}.AuthFilesPage-module__excludedList___9OGiS{flex-direction:column;gap:8px;display:flex}.AuthFilesPage-module__excludedItem___J3Xxa{background-color:var(--bg-secondary);border:1px solid var(--border-color);border-radius:8px;justify-content:space-between;align-items:center;gap:16px;padding:16px;display:flex}@media (max-width:768px){.AuthFilesPage-module__excludedItem___J3Xxa{flex-direction:column;align-items:flex-start}}.AuthFilesPage-module__excludedInfo___0hKQa{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.AuthFilesPage-module__excludedProvider___6pkYz{color:var(--text-primary);font-size:14px;font-weight:600}.AuthFilesPage-module__excludedModels___QdpJB{color:var(--text-secondary);font-size:12px}.AuthFilesPage-module__excludedActions___jP49M{flex-shrink:0;gap:4px;display:flex}.AuthFilesPage-module__providerField___end0y{flex-direction:column;gap:4px;display:flex}.AuthFilesPage-module__providerField___end0y .form-group{margin-bottom:0}.AuthFilesPage-module__providerTagList___dCCYW{flex-wrap:wrap;gap:4px;display:flex}.AuthFilesPage-module__providerTag___RADdc{border:1px solid var(--border-color);background-color:var(--bg-secondary);color:var(--text-secondary);cursor:pointer;border-radius:9999px;align-items:center;gap:4px;padding:4px 10px;font-size:12px;transition:all .15s;display:inline-flex}.AuthFilesPage-module__providerTag___RADdc:hover{border-color:var(--primary-color);color:var(--text-primary);background-color:var(--bg-hover)}.AuthFilesPage-module__providerTag___RADdc:disabled{opacity:.6;cursor:not-allowed}.AuthFilesPage-module__providerTagActive___j4vQJ,.AuthFilesPage-module__providerTagActive___j4vQJ:hover{background-color:var(--primary-color);border-color:var(--primary-color);color:#fff}.AuthFilesPage-module__aliasChartSection___uS-yX{border-bottom:1px solid var(--border-color);margin-bottom:24px;padding-bottom:24px}.AuthFilesPage-module__aliasChartHeader___ABhkk{justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px;display:flex}.AuthFilesPage-module__aliasChartTitle___OSz75{color:var(--text-secondary);margin:0;font-size:14px;font-weight:600}.AuthFilesPage-module__aliasChart___XbONn{width:100%;min-height:120px}.AuthFilesPage-module__cardExtraButtons___P-fL4{flex-wrap:wrap;align-items:center;gap:8px;min-width:0;max-width:100%;display:flex}.AuthFilesPage-module__viewModeSwitch___CxLpP{background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:8px;flex-wrap:wrap;align-items:center;gap:4px;min-width:0;max-width:100%;padding:2px;display:inline-flex}.AuthFilesPage-module__viewModeSwitch___CxLpP .btn.btn-sm{min-width:0}@media (max-width:768px){.AuthFilesPage-module__cardExtraButtons___P-fL4{width:100%}.AuthFilesPage-module__viewModeSwitch___CxLpP{justify-content:stretch;width:100%}.AuthFilesPage-module__viewModeSwitch___CxLpP .btn.btn-sm{flex:1 1 0}}.AuthFilesPage-module__mappingRow___b1MBs{grid-template-columns:1fr auto 1fr auto auto;align-items:center;gap:8px;display:grid}@media (max-width:768px){.AuthFilesPage-module__mappingRow___b1MBs{grid-template-columns:1fr}}.AuthFilesPage-module__mappingSeparator___Wx18F{color:var(--text-secondary);text-align:center}@media (max-width:768px){.AuthFilesPage-module__mappingSeparator___Wx18F{display:none}}.AuthFilesPage-module__mappingFork___nRhwu{align-items:center;display:flex}.AuthFilesPage-module__detailContent___K3wet{max-height:400px;overflow:auto}.AuthFilesPage-module__jsonContent___5lYBo{background-color:var(--bg-secondary);border:1px solid var(--border-color);white-space:pre-wrap;word-break:break-all;color:var(--text-primary);border-radius:8px;margin:0;padding:16px;font-family:monospace;font-size:12px}.AuthFilesPage-module__formGroup___1YGlp{flex-direction:column;gap:4px;margin-top:16px;display:flex}.AuthFilesPage-module__formGroup___1YGlp label{color:var(--text-primary);font-size:14px;font-weight:500}.AuthFilesPage-module__textarea___IAg4a{border:1px solid var(--border-color);background-color:var(--bg-primary);width:100%;color:var(--text-primary);resize:vertical;border-radius:8px;padding:8px 16px;font-family:monospace;font-size:14px}.AuthFilesPage-module__textarea___IAg4a:focus{border-color:var(--primary-color);outline:none}.AuthFilesPage-module__textarea___IAg4a::placeholder{color:var(--text-tertiary)}.AuthFilesPage-module__hint___YExGS{color:var(--text-tertiary);text-align:center;padding:24px;font-size:12px;font-style:italic}.AuthFilesPage-module__modelsList___KKhRE{flex-direction:column;gap:8px;display:flex}.AuthFilesPage-module__modelItem___VMfPD{background-color:var(--bg-secondary);border:1px solid var(--border-color);cursor:pointer;border-radius:8px;flex-wrap:wrap;align-items:center;gap:8px;padding:8px 16px;transition:all .15s;display:flex}.AuthFilesPage-module__modelItem___VMfPD:hover{background-color:var(--bg-hover);border-color:var(--primary-color)}.AuthFilesPage-module__modelItem___VMfPD:active{transform:scale(.98)}.AuthFilesPage-module__modelId___4wMUh{color:var(--text-primary);word-break:break-all;font-family:Consolas,Monaco,Courier New,monospace;font-size:13px;font-weight:600}.AuthFilesPage-module__modelDisplayName___znKrk{color:var(--text-secondary);flex-shrink:0;font-size:12px}.AuthFilesPage-module__modelType___B0C7D{color:var(--text-tertiary);background-color:var(--bg-tertiary);border-radius:10px;flex-shrink:0;margin-left:auto;padding:2px 8px;font-size:11px}.AuthFilesPage-module__modelItemExcluded___I5sBn{opacity:.6;background-color:var(--bg-tertiary);border-style:dashed}.AuthFilesPage-module__modelItemExcluded___I5sBn .AuthFilesPage-module__modelId___4wMUh{color:var(--text-tertiary);text-decoration:line-through}.AuthFilesPage-module__modelItemExcluded___I5sBn:hover{border-color:var(--danger-color)}.AuthFilesPage-module__modelExcludedBadge___FyRdH{color:var(--danger-color);border:1px solid var(--danger-color);background-color:#c657461a;border-radius:8px;flex-shrink:0;padding:2px 6px;font-size:10px}.AuthFilesPage-module__excludedCheckList___8T3-H{border:1px solid var(--border-color);background-color:var(--bg-secondary);border-radius:8px;flex-direction:column;gap:4px;max-height:280px;padding:8px;display:flex;overflow-y:auto}.AuthFilesPage-module__excludedCheckItem___2z42k{cursor:pointer;border-radius:4px;align-items:center;gap:8px;padding:4px 8px;transition:background-color .15s;display:flex}.AuthFilesPage-module__excludedCheckItem___2z42k:hover{background-color:var(--bg-hover)}.AuthFilesPage-module__excludedCheckItem___2z42k input[type=checkbox]{cursor:pointer;width:16px;height:16px;accent-color:var(--primary-color)}.AuthFilesPage-module__excludedCheckLabel___tg4BJ{color:var(--text-primary);word-break:break-all;align-items:center;gap:8px;font-family:Consolas,Monaco,Courier New,monospace;font-size:13px;display:flex}.AuthFilesPage-module__excludedCheckDisplayName___Cno8d{color:var(--text-tertiary);font-family:inherit;font-size:12px}.ModelMappingDiagram-module__scrollContainer___CVtMl{overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;width:100%;overflow-x:auto}.ModelMappingDiagram-module__tapHint___WVg9j{z-index:3;color:var(--text-secondary);margin-bottom:8px;padding:0 4px;font-size:12px;position:sticky;left:0}.ModelMappingDiagram-module__container___5GMeJ{-webkit-user-select:none;user-select:none;justify-content:space-between;min-width:100%;min-height:300px;padding:20px 0;display:inline-flex;position:relative}@media (max-width:768px){.ModelMappingDiagram-module__container___5GMeJ{min-width:max(100%,960px);padding:12px 0}}.ModelMappingDiagram-module__connections___-pgzq{pointer-events:none;z-index:1;width:100%;height:100%;position:absolute;top:0;left:0;overflow:visible}.ModelMappingDiagram-module__connections___-pgzq path{fill:none;stroke-width:2px}.ModelMappingDiagram-module__column___Guf-v{z-index:2;flex-direction:column;flex:none;gap:12px;display:flex}.ModelMappingDiagram-module__column___Guf-v.ModelMappingDiagram-module__providers___n0NN6{align-items:flex-end;min-width:140px}.ModelMappingDiagram-module__column___Guf-v.ModelMappingDiagram-module__sources___N646E,.ModelMappingDiagram-module__column___Guf-v.ModelMappingDiagram-module__aliases___zg5ma{align-items:flex-start;min-width:200px}.ModelMappingDiagram-module__columnHeader___QAC6y{color:var(--text-secondary);text-transform:uppercase;margin-bottom:8px;padding:0 4px;font-size:13px;font-weight:600}.ModelMappingDiagram-module__item___KBTKp{background:var(--bg-primary);border:1px solid var(--border-color);color:var(--text-primary);border-radius:8px;justify-content:space-between;align-items:center;width:100%;max-width:280px;padding:10px 14px;font-size:13px;transition:all .2s;display:flex;position:relative;box-shadow:0 1px 2px #0000000d}.ModelMappingDiagram-module__item___KBTKp:hover{border-color:var(--primary-color);z-index:10;transform:translateY(-1px);box-shadow:0 4px 6px #0000000d}.ModelMappingDiagram-module__item___KBTKp.ModelMappingDiagram-module__dropTarget___dAYPB{background-color:var(--bg-secondary);border-color:var(--primary-color);border-width:2px}.ModelMappingDiagram-module__item___KBTKp.ModelMappingDiagram-module__selected___r3Gyz{border-color:var(--primary-color);background-color:var(--bg-secondary);box-shadow:0 0 0 2px #8b86802e}.ModelMappingDiagram-module__providerItem___4PZQM{border-left:3px solid #0000;align-items:center;gap:8px;padding-left:8px;display:flex}.ModelMappingDiagram-module__providerItem___4PZQM .ModelMappingDiagram-module__providerLabel___E2vNu{text-overflow:ellipsis;white-space:nowrap;flex:1;font-size:13px;font-weight:600;overflow:hidden}.ModelMappingDiagram-module__providerItem___4PZQM .ModelMappingDiagram-module__collapseBtn___RXanB{background:var(--bg-secondary);cursor:pointer;width:24px;height:24px;color:var(--text-secondary);border:none;border-radius:4px;flex-shrink:0;justify-content:center;align-items:center;transition:background-color .15s,color .15s;display:flex}.ModelMappingDiagram-module__providerItem___4PZQM .ModelMappingDiagram-module__collapseBtn___RXanB:hover{background:var(--border-color);color:var(--text-primary)}.ModelMappingDiagram-module__providerItem___4PZQM .ModelMappingDiagram-module__chevronDown___AP7zK,.ModelMappingDiagram-module__providerItem___4PZQM .ModelMappingDiagram-module__chevronRight___bbMVy{border-style:solid;width:0;height:0;display:inline-block}.ModelMappingDiagram-module__providerItem___4PZQM .ModelMappingDiagram-module__chevronDown___AP7zK{border-width:5px 4px 0;border-color:currentColor #0000 #0000}.ModelMappingDiagram-module__providerItem___4PZQM .ModelMappingDiagram-module__chevronRight___bbMVy{border-width:4px 0 4px 5px;border-color:#0000 #0000 #0000 currentColor}.ModelMappingDiagram-module__providerGroup___5JNQu{justify-content:flex-end;align-items:center;width:100%;display:flex}.ModelMappingDiagram-module__sourceItem___TjDG6,.ModelMappingDiagram-module__aliasItem___h6w7D{cursor:grab}.ModelMappingDiagram-module__sourceItem___TjDG6:active,.ModelMappingDiagram-module__aliasItem___h6w7D:active{cursor:grabbing}.ModelMappingDiagram-module__sourceItem___TjDG6.ModelMappingDiagram-module__dragging___lhx9y,.ModelMappingDiagram-module__aliasItem___h6w7D.ModelMappingDiagram-module__dragging___lhx9y{opacity:.5;border-style:dashed}.ModelMappingDiagram-module__dot___AOWIN{border-radius:50%;flex-shrink:0;width:6px;height:6px;margin-top:-3px;position:absolute;top:50%}.ModelMappingDiagram-module__dot___AOWIN.ModelMappingDiagram-module__dotLeft___BKXAm{background:var(--text-tertiary);left:-3px}.ModelMappingDiagram-module__sourceItem___TjDG6 .ModelMappingDiagram-module__dot___AOWIN{right:-3px}.ModelMappingDiagram-module__providerBadge___cRzux{background:var(--bg-secondary);color:var(--text-secondary);border-radius:4px;margin-right:8px;padding:2px 6px;font-size:11px;font-weight:500}.ModelMappingDiagram-module__itemName___MjfSv{text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}.ModelMappingDiagram-module__itemCount___B-gtl{color:var(--text-tertiary);background:var(--bg-secondary);border-radius:10px;margin-left:8px;padding:1px 6px;font-size:11px}.ModelMappingDiagram-module__contextMenu___VHX-s{background:var(--bg-primary);border:1px solid var(--border-color);z-index:9999;border-radius:6px;min-width:120px;padding:4px 0;position:fixed;overflow:hidden;box-shadow:0 4px 12px #00000026}.ModelMappingDiagram-module__contextMenu___VHX-s .ModelMappingDiagram-module__menuItem___e-LvI{color:var(--text-primary);cursor:pointer;align-items:center;gap:8px;padding:8px 12px;font-size:13px;transition:background-color .1s;display:flex}.ModelMappingDiagram-module__contextMenu___VHX-s .ModelMappingDiagram-module__menuItem___e-LvI:hover{background-color:var(--bg-secondary)}.ModelMappingDiagram-module__contextMenu___VHX-s .ModelMappingDiagram-module__menuItem___e-LvI.ModelMappingDiagram-module__danger___klXxM{color:var(--error-color)}.ModelMappingDiagram-module__contextMenu___VHX-s .ModelMappingDiagram-module__menuItem___e-LvI.ModelMappingDiagram-module__danger___klXxM:hover{background-color:var(--bg-error-light)}.ModelMappingDiagram-module__contextMenu___VHX-s .ModelMappingDiagram-module__menuDivider___XtoCo{background:var(--border-color);cursor:default;pointer-events:none;height:1px;margin:4px 0;padding:0}.ModelMappingDiagram-module__settingsEmpty___N0gFF{color:var(--text-tertiary);text-align:center;padding:24px 0;font-size:13px}.ModelMappingDiagram-module__settingsList___ovuWo{flex-direction:column;gap:8px;display:flex}.ModelMappingDiagram-module__settingsRow___wH-TW{border:1px solid var(--border-color);background:var(--bg-secondary);border-radius:8px;grid-template-columns:minmax(200px,1fr) auto;align-items:center;gap:16px;padding:8px 16px;display:grid}@media (max-width:768px){.ModelMappingDiagram-module__settingsRow___wH-TW{grid-template-columns:1fr;align-items:flex-start}}.ModelMappingDiagram-module__settingsNames___QDn9j{color:var(--text-primary);align-items:center;gap:4px;min-width:0;font-size:13px;display:flex}.ModelMappingDiagram-module__settingsSource___Hz9zo,.ModelMappingDiagram-module__settingsAlias___Ov9zt{white-space:nowrap;text-overflow:ellipsis;max-width:220px;overflow:hidden}.ModelMappingDiagram-module__settingsArrow___SKvFd{color:var(--text-tertiary)}.ModelMappingDiagram-module__settingsActions___PYXMU{align-items:center;gap:8px;display:flex}.ModelMappingDiagram-module__settingsLabel___R--i-{color:var(--text-secondary);font-size:12px}.ModelMappingDiagram-module__settingsDelete___PDG7z{color:var(--error-color);cursor:pointer;background:0 0;border:0;border-radius:6px;padding:6px}.ModelMappingDiagram-module__settingsDelete___PDG7z:hover{background:var(--bg-error-light)}.SecondaryScreenShell-module__container___9DAwq{flex-direction:column;gap:24px;min-height:0;display:flex}.SecondaryScreenShell-module__topBar___vHzq4{z-index:5;background:var(--bg-secondary);border-bottom:1px solid var(--border-color);grid-template-columns:1fr auto 1fr;align-items:center;gap:16px;min-height:44px;padding:8px 16px;display:grid;position:sticky;top:0}.SecondaryScreenShell-module__topBarTitle___Q8LCy{text-align:center;min-width:0;color:var(--text-primary);text-overflow:ellipsis;white-space:nowrap;justify-self:center;font-size:16px;font-weight:650;overflow:hidden}.SecondaryScreenShell-module__backButton___d6Zgy{justify-self:start;gap:0;padding-left:6px;padding-right:10px}.SecondaryScreenShell-module__backButton___d6Zgy>span:last-child{align-items:center;gap:6px;display:inline-flex}.SecondaryScreenShell-module__backIcon___R8Iyn{justify-content:center;align-items:center;display:inline-flex}.SecondaryScreenShell-module__backIcon___R8Iyn svg{display:block}.SecondaryScreenShell-module__backText___CODk7{font-weight:600;line-height:18px}.SecondaryScreenShell-module__rightSlot___ZvWJR{justify-content:flex-end;justify-self:end;display:flex}.SecondaryScreenShell-module__loadingState___4Jbsa{color:var(--text-secondary);justify-content:center;align-items:center;gap:8px;padding:48px 0;display:flex}.SecondaryScreenShell-module__content___nVk3R{flex-direction:column;gap:24px;display:flex}.SecondaryScreenShell-module__contentWithFloatingAction___4gXgb{padding-bottom:calc(var(--secondary-shell-floating-action-height,56px) + 12px + env(safe-area-inset-bottom))}.SecondaryScreenShell-module__floatingActionContainer___sSKk-{left:var(--content-center-x,50%);bottom:calc(12px + env(safe-area-inset-bottom));z-index:50;pointer-events:none;width:-moz-fit-content;width:fit-content;max-width:calc(100vw - 24px);position:fixed;transform:translate(-50%)}.SecondaryScreenShell-module__floatingActionSurface___Wfab-{pointer-events:auto;--glass-blur:12px;background:var(--glass-bg);-webkit-backdrop-filter:var(--glass-backdrop-filter);border:1px solid var(--glass-border);border-radius:999px;align-items:center;gap:8px;padding:10px 12px;display:inline-flex;box-shadow:0 4px 24px #00000014}[data-theme=dark] .SecondaryScreenShell-module__floatingActionSurface___Wfab-{box-shadow:0 4px 24px #0006}@media (max-width:1200px){.SecondaryScreenShell-module__floatingActionContainer___sSKk-{max-width:calc(100vw - 16px)}.SecondaryScreenShell-module__floatingActionSurface___Wfab-{padding:8px 10px}}.AuthFilesOAuthExcludedEditPage-module__pageContent___42nA2{width:100%;max-width:1000px;margin:0 auto;padding:0 24px 48px}@media (max-width:768px){.AuthFilesOAuthExcludedEditPage-module__pageContent___42nA2{padding-left:16px;padding-right:16px}}.AuthFilesOAuthExcludedEditPage-module__settingsCard___EE-1z{padding:0;overflow:visible}.AuthFilesOAuthExcludedEditPage-module__settingsHeader___Jm0RO{border-bottom:1px solid var(--border-color);flex-direction:column;gap:4px;padding:16px 24px;display:flex}@media (max-width:768px){.AuthFilesOAuthExcludedEditPage-module__settingsHeader___Jm0RO{padding-left:16px;padding-right:16px}}.AuthFilesOAuthExcludedEditPage-module__settingsHeaderTitle___nOj9w{color:var(--text-primary);align-items:center;gap:4px;font-weight:700;display:inline-flex}.AuthFilesOAuthExcludedEditPage-module__settingsHeaderHint___EzQSN{color:var(--text-secondary);font-size:13px}.AuthFilesOAuthExcludedEditPage-module__settingsSection___ozndx{flex-direction:column;gap:8px;padding:16px 24px 24px;display:flex}@media (max-width:768px){.AuthFilesOAuthExcludedEditPage-module__settingsSection___ozndx{padding-left:16px;padding-right:16px}}.AuthFilesOAuthExcludedEditPage-module__settingsRow___z6QPQ{justify-content:space-between;align-items:flex-start;gap:24px;display:flex}@media (max-width:768px){.AuthFilesOAuthExcludedEditPage-module__settingsRow___z6QPQ{flex-direction:column;align-items:stretch;gap:8px}}.AuthFilesOAuthExcludedEditPage-module__settingsInfo___lRYwp{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.AuthFilesOAuthExcludedEditPage-module__settingsLabel___KbPgc{color:var(--text-primary);font-size:14px;font-weight:600}.AuthFilesOAuthExcludedEditPage-module__settingsDesc___6LSPN{color:var(--text-secondary);font-size:13px}.AuthFilesOAuthExcludedEditPage-module__settingsControl___luVcd{flex:none;width:min(360px,45%);min-width:220px}@media (max-width:768px){.AuthFilesOAuthExcludedEditPage-module__settingsControl___luVcd{width:100%;min-width:0}}.AuthFilesOAuthExcludedEditPage-module__tagList___Is0Fd{flex-wrap:wrap;gap:4px;display:flex}.AuthFilesOAuthExcludedEditPage-module__tag___fyrKv{border:1px solid var(--border-color);background-color:var(--bg-secondary);color:var(--text-secondary);cursor:pointer;border-radius:9999px;align-items:center;padding:4px 10px;font-size:12px;transition:all .15s;display:inline-flex}.AuthFilesOAuthExcludedEditPage-module__tag___fyrKv:hover{border-color:var(--primary-color);color:var(--text-primary);background-color:var(--bg-tertiary)}.AuthFilesOAuthExcludedEditPage-module__tag___fyrKv:disabled{opacity:.6;cursor:not-allowed}.AuthFilesOAuthExcludedEditPage-module__tagActive___EkiBG,.AuthFilesOAuthExcludedEditPage-module__tagActive___EkiBG:hover{background-color:var(--primary-color);border-color:var(--primary-color);color:#fff}.AuthFilesOAuthExcludedEditPage-module__modelsHint___Rm6l4{color:var(--text-secondary);align-items:center;gap:4px;font-size:13px;display:flex}.AuthFilesOAuthExcludedEditPage-module__loadingModels___-9Wy6{color:var(--text-secondary);justify-content:center;align-items:center;gap:8px;padding:32px 0;display:flex}.AuthFilesOAuthExcludedEditPage-module__modelList___6ebAr{max-height:520px;padding:8px 24px 24px;overflow:auto}@media (max-width:768px){.AuthFilesOAuthExcludedEditPage-module__modelList___6ebAr{padding-left:16px;padding-right:16px}}.AuthFilesOAuthExcludedEditPage-module__modelItem___v0y1o{border-bottom:1px solid var(--border-color);border-radius:4px;align-items:flex-start;width:100%;padding:10px 0;transition:background-color .15s}.AuthFilesOAuthExcludedEditPage-module__modelItem___v0y1o:last-child{border-bottom:none}.AuthFilesOAuthExcludedEditPage-module__modelItem___v0y1o:hover{background-color:var(--bg-hover)}.AuthFilesOAuthExcludedEditPage-module__modelText___50mQC{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.AuthFilesOAuthExcludedEditPage-module__modelId___Z2Ylu{color:var(--text-primary);word-break:break-all;font-size:13px;font-weight:600}.AuthFilesOAuthExcludedEditPage-module__modelDisplayName___ATlA5{color:var(--text-secondary);word-break:break-all;font-size:12px}.AuthFilesOAuthExcludedEditPage-module__emptyModels___kAuwa{color:var(--text-secondary);text-align:center;padding:32px 24px;font-size:13px}@media (max-width:768px){.AuthFilesOAuthExcludedEditPage-module__emptyModels___kAuwa{padding-left:16px;padding-right:16px}}.AuthFilesOAuthModelAliasEditPage-module__pageContent___mxGSP{width:100%;max-width:1000px;margin:0 auto;padding:0 24px 48px}@media (max-width:768px){.AuthFilesOAuthModelAliasEditPage-module__pageContent___mxGSP{padding-left:16px;padding-right:16px}}.AuthFilesOAuthModelAliasEditPage-module__settingsCard___4uMxA{padding:0;overflow:visible}.AuthFilesOAuthModelAliasEditPage-module__settingsHeader___h4vIs{border-bottom:1px solid var(--border-color);flex-direction:column;gap:4px;padding:16px 24px;display:flex}@media (max-width:768px){.AuthFilesOAuthModelAliasEditPage-module__settingsHeader___h4vIs{padding-left:16px;padding-right:16px}}.AuthFilesOAuthModelAliasEditPage-module__settingsHeaderTitle___GExPS{color:var(--text-primary);align-items:center;gap:4px;font-weight:700;display:inline-flex}.AuthFilesOAuthModelAliasEditPage-module__settingsHeaderHint___C94bR{color:var(--text-secondary);font-size:13px}.AuthFilesOAuthModelAliasEditPage-module__settingsSection___JQr18{flex-direction:column;gap:8px;padding:16px 24px 24px;display:flex}@media (max-width:768px){.AuthFilesOAuthModelAliasEditPage-module__settingsSection___JQr18{padding-left:16px;padding-right:16px}}.AuthFilesOAuthModelAliasEditPage-module__settingsRow___qzQdL{justify-content:space-between;align-items:flex-start;gap:24px;display:flex}@media (max-width:768px){.AuthFilesOAuthModelAliasEditPage-module__settingsRow___qzQdL{flex-direction:column;align-items:stretch;gap:8px}}.AuthFilesOAuthModelAliasEditPage-module__settingsInfo___Jt7Ub{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.AuthFilesOAuthModelAliasEditPage-module__settingsLabel___v6dmL{color:var(--text-primary);font-size:14px;font-weight:600}.AuthFilesOAuthModelAliasEditPage-module__settingsDesc___TgK3P{color:var(--text-secondary);font-size:13px}.AuthFilesOAuthModelAliasEditPage-module__settingsControl___nSl-3{flex:none;width:min(360px,45%);min-width:220px}@media (max-width:768px){.AuthFilesOAuthModelAliasEditPage-module__settingsControl___nSl-3{width:100%;min-width:0}}.AuthFilesOAuthModelAliasEditPage-module__tagList___OxNTF{flex-wrap:wrap;gap:4px;display:flex}.AuthFilesOAuthModelAliasEditPage-module__tag___sULm6{border:1px solid var(--border-color);background-color:var(--bg-secondary);color:var(--text-secondary);cursor:pointer;border-radius:9999px;align-items:center;padding:4px 10px;font-size:12px;transition:all .15s;display:inline-flex}.AuthFilesOAuthModelAliasEditPage-module__tag___sULm6:hover{border-color:var(--primary-color);color:var(--text-primary);background-color:var(--bg-tertiary)}.AuthFilesOAuthModelAliasEditPage-module__tag___sULm6:disabled{opacity:.6;cursor:not-allowed}.AuthFilesOAuthModelAliasEditPage-module__tagActive___CcyFC,.AuthFilesOAuthModelAliasEditPage-module__tagActive___CcyFC:hover{background-color:var(--primary-color);border-color:var(--primary-color);color:#fff}.AuthFilesOAuthModelAliasEditPage-module__mappingsHeader___wddAp{border-bottom:1px solid var(--border-color);justify-content:space-between;align-items:center;gap:16px;padding:16px 24px;display:flex}@media (max-width:768px){.AuthFilesOAuthModelAliasEditPage-module__mappingsHeader___wddAp{padding-left:16px;padding-right:16px}}.AuthFilesOAuthModelAliasEditPage-module__mappingsTitle___QywAa{color:var(--text-primary);font-weight:700}.AuthFilesOAuthModelAliasEditPage-module__modelsHint___nQAc7{color:var(--text-secondary);border-bottom:1px solid var(--border-color);align-items:center;gap:4px;padding:8px 24px;font-size:13px;display:flex}@media (max-width:768px){.AuthFilesOAuthModelAliasEditPage-module__modelsHint___nQAc7{padding-left:16px;padding-right:16px}}.AuthFilesOAuthModelAliasEditPage-module__mappingsBody___jOz-S{padding:8px 24px 24px}@media (max-width:768px){.AuthFilesOAuthModelAliasEditPage-module__mappingsBody___jOz-S{padding-left:16px;padding-right:16px}}.AuthFilesOAuthModelAliasEditPage-module__mappingRow___NTr41{border-bottom:1px solid var(--border-color);grid-template-columns:1fr auto 1fr auto auto;align-items:center;gap:8px;padding:10px 0;display:grid}.AuthFilesOAuthModelAliasEditPage-module__mappingRow___NTr41:last-child{border-bottom:none}@media (max-width:768px){.AuthFilesOAuthModelAliasEditPage-module__mappingRow___NTr41{grid-template-columns:1fr;gap:8px}}.AuthFilesOAuthModelAliasEditPage-module__mappingSeparator___dN9rZ{color:var(--text-secondary);text-align:center}@media (max-width:768px){.AuthFilesOAuthModelAliasEditPage-module__mappingSeparator___dN9rZ{display:none}}.AuthFilesOAuthModelAliasEditPage-module__mappingAliasInput___iG0V3{width:100%}.AuthFilesOAuthModelAliasEditPage-module__mappingFork___4pAg3{align-items:center;display:flex}@media (max-width:768px){.AuthFilesOAuthModelAliasEditPage-module__mappingFork___4pAg3{justify-content:flex-start}}.OAuthPage-module__container___LCCdH{width:100%}.OAuthPage-module__cardTitle___yFaP0{align-items:center;gap:8px;display:flex}.OAuthPage-module__cardTitleIcon___eAnql{width:24px;height:24px}.OAuthPage-module__pageTitle___BQQ2z{color:var(--text-primary);margin:0 0 32px;font-size:28px;font-weight:700}.OAuthPage-module__content___Phg9V{flex-direction:column;gap:32px;display:flex}.OAuthPage-module__cardContent___1sXLA{flex-direction:column;gap:16px;display:flex}.OAuthPage-module__cardContent___1sXLA .form-group{margin-bottom:0}.OAuthPage-module__cardContent___1sXLA .status-badge{align-self:flex-start;margin-bottom:0}.OAuthPage-module__cardHint___ttOpd{color:var(--text-secondary);margin:0;font-size:13px;line-height:1.6}.OAuthPage-module__cardHintSecondary___tWM17{color:var(--text-tertiary);margin:0;font-size:12px;line-height:1.5}.OAuthPage-module__oauthSection___1olLq{flex-direction:column;gap:24px;display:flex}.OAuthPage-module__oauthGrid___wjAyh{grid-template-columns:repeat(auto-fit,minmax(400px,1fr));gap:24px;display:grid}@media (max-width:768px){.OAuthPage-module__oauthGrid___wjAyh{grid-template-columns:1fr}}.OAuthPage-module__oauthCard___CYTnC{flex-direction:column;gap:16px;display:flex}.OAuthPage-module__oauthStatus___h7bbL{border-radius:8px;padding:16px;font-size:14px}.OAuthPage-module__oauthStatus___h7bbL.OAuthPage-module__success___UHta0{color:#16a34a;background-color:#22c55e1a}.OAuthPage-module__oauthStatus___h7bbL.OAuthPage-module__error___057CD{color:#c65746;background-color:#c657461f}.OAuthPage-module__oauthStatus___h7bbL.OAuthPage-module__waiting___CbNSk{color:var(--primary-color);background-color:#8b86801f}.OAuthPage-module__callbackSection___8kA31{flex-direction:column;gap:8px;margin-top:0;display:flex}.OAuthPage-module__callbackActions___wtkMI{gap:16px;display:flex}.OAuthPage-module__authUrlBox___Iu1d4{background:var(--bg-secondary);border:1px dashed var(--border-color);border-radius:8px;flex-direction:column;gap:4px;padding:16px;display:flex}.OAuthPage-module__authUrlLabel___mYFJB{color:var(--text-secondary);font-size:14px}.OAuthPage-module__authUrlValue___axvUJ{color:var(--text-primary);word-break:break-all;overflow-wrap:anywhere;max-width:100%;font-weight:700;line-height:1.5}.OAuthPage-module__authUrlActions___venPj{flex-wrap:wrap;align-items:center;gap:8px;margin-top:8px;display:flex}.OAuthPage-module__successActions___wHpp9{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.OAuthPage-module__geminiProjectField___g456A .form-group{gap:8px;margin-top:0;margin-bottom:0}.OAuthPage-module__geminiProjectField___g456A .input:disabled{background-color:var(--bg-tertiary);border-color:var(--border-color);color:var(--text-tertiary);cursor:not-allowed}.OAuthPage-module__formItem___Bgt9S{flex-direction:column;gap:4px;display:flex}.OAuthPage-module__formItemLabel___QZFrG{color:var(--text-primary);margin:0;font-weight:600}.OAuthPage-module__filePicker___NmFjy{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.OAuthPage-module__fileName___9ZbQI{border:1px solid var(--border-color);background:var(--bg-primary);min-width:220px;color:var(--text-primary);border-radius:8px;flex:1;padding:10px 12px;font-size:14px}.OAuthPage-module__fileNamePlaceholder___WHjj4{color:var(--text-secondary)}.OAuthPage-module__connectionBox___Gwo4r{background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:8px;flex-direction:column;gap:8px;padding:16px;display:flex}.OAuthPage-module__connectionLabel___cJMrf{color:var(--text-primary);margin:0;font-size:14px;font-weight:600}.OAuthPage-module__keyValueList___lEOY0{flex-direction:column;gap:6px;display:flex}.OAuthPage-module__keyValueItem___XOwWB{grid-template-columns:140px 1fr;align-items:start;gap:10px;display:grid}@media (max-width:768px){.OAuthPage-module__keyValueItem___XOwWB{grid-template-columns:1fr;gap:2px}}.OAuthPage-module__keyValueKey___WF-VN{color:var(--text-secondary);font-size:13px}.OAuthPage-module__keyValueValue___m2I-C{color:var(--text-primary);word-break:break-all;overflow-wrap:anywhere}.PluginResourcePage-module__page___Worp1{background:#fff;flex:auto;width:100%;min-width:0;height:100%;min-height:0;display:flex}.PluginResourcePage-module__frame___vFTLX{background:#fff;border:0;flex:auto;width:100%;min-width:0;height:100%;min-height:0;display:block}.PluginResourcePage-module__stateShell___mvcAO{background:var(--bg-secondary);justify-content:center;align-items:center;width:100%;min-height:100%;padding:70px clamp(20px,3vw,48px) 40px;display:flex}.PluginResourcePage-module__statusPanel___hLEe6{color:var(--text-secondary);font-size:14px}.PluginsPage-module__page___CvQ2C{flex-direction:column;gap:24px;width:100%;display:flex}.PluginsPage-module__pageHeader___QAQJM{flex-direction:column;gap:8px;display:flex}.PluginsPage-module__title___kbWp2{color:var(--text-primary);margin:0;font-size:28px;font-weight:700;line-height:1.2}.PluginsPage-module__description___rS8P3{color:var(--text-secondary);margin:0;font-size:14px;line-height:1.5}.PluginsPage-module__errorBox___CXInm,.PluginsPage-module__warningBox___XGq99{border-radius:8px;padding:16px;font-size:14px;line-height:1.5}.PluginsPage-module__errorBox___CXInm{border:1px solid var(--danger-color);color:var(--danger-color);background:#c657461a}.PluginsPage-module__warningBox___XGq99{border:1px solid color-mix(in srgb, var(--warning-color,#c65746) 42%, var(--border-color));background:color-mix(in srgb, var(--warning-color,#c65746) 9%, var(--bg-secondary));color:var(--text-primary)}.PluginsPage-module__statusBar___-NeAi{border:1px solid color-mix(in srgb, var(--border-color) 60%, transparent);background:color-mix(in srgb, var(--bg-secondary) 60%, transparent);border-radius:10px;flex-wrap:wrap;align-items:center;gap:10px;padding:10px 14px;display:flex}.PluginsPage-module__statusPill___KsCzj{border:1px solid color-mix(in srgb, var(--border-color) 50%, transparent);background:color-mix(in srgb, var(--bg-primary) 56%, transparent);white-space:nowrap;border-radius:9999px;align-items:center;gap:6px;min-width:0;max-width:100%;padding:5px 12px;font-size:12px;font-weight:600;display:inline-flex}.PluginsPage-module__statusDot___sWBOV{border-radius:50%;flex-shrink:0;width:7px;height:7px}.PluginsPage-module__statusDotOn___7cgF3{background:#10b981;box-shadow:0 0 6px #10b98180}.PluginsPage-module__statusDotOff___biyeH{background:var(--text-tertiary)}.PluginsPage-module__statusLabel___OJVc7{color:var(--text-secondary)}.PluginsPage-module__statusValue___wqQgp{color:var(--text-primary);font-weight:700}.PluginsPage-module__statusPathValue___SCblH{text-overflow:ellipsis;white-space:nowrap;min-width:0;max-width:min(360px,58vw);display:block;overflow:hidden}.PluginsPage-module__statusDivider___fJexN{background:color-mix(in srgb, var(--border-color) 60%, transparent);flex-shrink:0;width:1px;height:20px}@media (max-width:768px){.PluginsPage-module__statusDivider___fJexN{display:none}}.PluginsPage-module__toolbar___-cit2{align-items:center;gap:8px;display:flex}.PluginsPage-module__toolbar___-cit2 .form-group{flex:1;max-width:480px;margin:0}.PluginsPage-module__toolbar___-cit2 .input{padding-right:36px}.PluginsPage-module__toolbar___-cit2 .btn>span{align-items:center;gap:8px;display:inline-flex}@media (max-width:768px){.PluginsPage-module__toolbar___-cit2{flex-direction:column;align-items:stretch}.PluginsPage-module__toolbar___-cit2 .form-group{max-width:none}}.PluginsPage-module__pluginList___Jk4FJ{border:1px solid color-mix(in srgb, var(--border-color) 70%, transparent);background:color-mix(in srgb, var(--border-color) 30%, transparent);border-radius:12px;flex-direction:column;gap:1px;display:flex;overflow:hidden}.PluginsPage-module__pluginRow___-y4iX{background:var(--bg-primary);grid-template-columns:40px 1fr auto;align-items:center;gap:16px;padding:16px 24px;transition:background-color .15s;display:grid}.PluginsPage-module__pluginRow___-y4iX:hover{background:var(--bg-hover)}@media (max-width:768px){.PluginsPage-module__pluginRow___-y4iX{grid-template-rows:auto auto;grid-template-columns:36px 1fr;gap:8px;padding:16px}}.PluginsPage-module__logoBox___9Hy-r{border:1px solid color-mix(in srgb, var(--border-color) 50%, transparent);background:color-mix(in srgb, var(--bg-tertiary) 60%, transparent);width:40px;height:40px;color:var(--text-secondary);border-radius:10px;flex-shrink:0;justify-content:center;align-items:center;display:inline-flex;overflow:hidden}.PluginsPage-module__logoBox___9Hy-r img{object-fit:cover;width:100%;height:100%}@media (max-width:768px){.PluginsPage-module__logoBox___9Hy-r{border-radius:8px;width:36px;height:36px}}.PluginsPage-module__pluginInfo___ODdnV{flex-direction:column;gap:4px;min-width:0;display:flex}.PluginsPage-module__pluginName___uX3d7{align-items:center;gap:8px;min-width:0;display:flex}.PluginsPage-module__pluginName___uX3d7 h2{min-width:0;color:var(--text-primary);text-overflow:ellipsis;white-space:nowrap;margin:0;font-size:15px;font-weight:650;line-height:1.3;overflow:hidden}.PluginsPage-module__pluginId___SjbKJ{color:var(--text-tertiary);text-overflow:ellipsis;white-space:nowrap;font-family:Courier New,Courier,monospace;font-size:12px;overflow:hidden}.PluginsPage-module__pluginMeta___xa89L{flex-wrap:wrap;align-items:center;gap:8px;margin-top:2px;display:flex}.PluginsPage-module__metaItem___05Mg9{min-width:0;max-width:100%;color:var(--text-tertiary);white-space:nowrap;align-items:center;gap:4px;font-size:12px;display:inline-flex}.PluginsPage-module__metaItem___05Mg9 strong{color:var(--text-secondary);font-weight:600}.PluginsPage-module__metaPath___JUDWR{text-overflow:ellipsis;display:block;overflow:hidden}.PluginsPage-module__metaDot___FpFyv{background:color-mix(in srgb, var(--text-tertiary) 50%, transparent);border-radius:50%;flex-shrink:0;width:3px;height:3px}.PluginsPage-module__badgeRow___USdlO{flex-wrap:wrap;gap:5px;display:flex}.PluginsPage-module__badge___2k1PE,.PluginsPage-module__badgeSuccess___1yPJW,.PluginsPage-module__badgeWarning___ADHL9,.PluginsPage-module__badgeMuted___f-Gd9{border-radius:6px;align-items:center;min-height:22px;padding:2px 8px;font-size:11px;font-weight:600;line-height:1.25;display:inline-flex}.PluginsPage-module__badge___2k1PE{background:color-mix(in srgb, var(--bg-secondary) 82%, transparent);border:1px solid color-mix(in srgb, var(--border-color) 50%, transparent);color:var(--text-secondary)}.PluginsPage-module__badgeSuccess___1yPJW{color:var(--success-color);background:#10b9811a;border:1px solid #10b98133}.PluginsPage-module__badgeWarning___ADHL9{color:var(--warning-color);background:#c657461a;border:1px solid #c6574633}.PluginsPage-module__badgeMuted___f-Gd9{background:color-mix(in srgb, var(--bg-secondary) 82%, transparent);border:1px solid color-mix(in srgb, var(--border-color) 40%, transparent);color:var(--text-tertiary)}.PluginsPage-module__rowActions___LvMkv{flex-wrap:wrap;flex-shrink:0;justify-content:flex-end;align-items:center;gap:8px;min-width:0;max-width:min(560px,48vw);display:flex}.PluginsPage-module__rowActions___LvMkv .btn>span{align-items:center;gap:6px;display:inline-flex}@media (max-width:768px){.PluginsPage-module__rowActions___LvMkv{grid-column:1/-1;justify-content:flex-start;max-width:none}}.PluginsPage-module__iconLink___ofzv1{border:1px solid var(--border-color);background:var(--bg-primary);min-height:30px;color:var(--text-primary);border-radius:8px;justify-content:center;align-items:center;font-size:12px;font-weight:600;text-decoration:none;transition:border-color .15s,background-color .15s,color .15s;display:inline-flex}.PluginsPage-module__iconLink___ofzv1:hover{border-color:var(--primary-color);background:var(--bg-hover);color:var(--primary-color)}.PluginsPage-module__iconLink___ofzv1{flex:none;width:30px}.PluginsPage-module__skeletonRow___BCdYy{background:var(--bg-primary);align-items:center;gap:16px;padding:16px 24px;display:flex}.PluginsPage-module__skeletonAvatar___qfNzu{background:linear-gradient(90deg, color-mix(in srgb, var(--bg-secondary) 86%, transparent) 25%, color-mix(in srgb, var(--bg-hover) 70%, transparent) 37%, color-mix(in srgb, var(--bg-secondary) 86%, transparent) 63%);background-size:400% 100%;border-radius:10px;flex-shrink:0;width:40px;height:40px;animation:1.35s ease-in-out infinite PluginsPage-module__skeletonPulse___FskV9}.PluginsPage-module__skeletonText___PKTOA{flex-direction:column;flex:1;gap:8px;display:flex}.PluginsPage-module__skeletonLine___91eQ6{background:linear-gradient(90deg, color-mix(in srgb, var(--bg-secondary) 86%, transparent) 25%, color-mix(in srgb, var(--bg-hover) 70%, transparent) 37%, color-mix(in srgb, var(--bg-secondary) 86%, transparent) 63%);background-size:400% 100%;border-radius:4px;height:14px;animation:1.35s ease-in-out infinite PluginsPage-module__skeletonPulse___FskV9}.PluginsPage-module__skeletonLine___91eQ6:first-child{width:45%}.PluginsPage-module__skeletonLine___91eQ6:last-child{width:70%;height:10px}.PluginsPage-module__sheetFooter___IZQM-{justify-content:flex-end;gap:8px;display:flex}.PluginsPage-module__configForm___acXwo{flex-direction:column;gap:24px;display:flex}.PluginsPage-module__formSection___J8eP4{flex-direction:column;gap:16px;display:flex}.PluginsPage-module__formSection___J8eP4 h3{color:var(--text-primary);margin:0;font-size:16px;font-weight:700}.PluginsPage-module__formSection___J8eP4 .form-group{margin:0}.PluginsPage-module__fieldRow___-q2Wa{border:1px solid var(--border-color);background:color-mix(in srgb, var(--bg-secondary) 72%, transparent);border-radius:8px;justify-content:space-between;align-items:center;gap:16px;min-height:52px;padding:16px;display:flex}.PluginsPage-module__fieldText___KkAH-{min-width:0}.PluginsPage-module__fieldLabel___3on7I{color:var(--text-primary);overflow-wrap:anywhere;font-size:14px;font-weight:650}.PluginsPage-module__fieldDescription___JEDFJ,.PluginsPage-module__fieldHint___MyVVK{color:var(--text-tertiary);overflow-wrap:anywhere;margin-top:4px;font-size:12px;line-height:1.45}.PluginsPage-module__formField___-MDet{flex-direction:column;gap:6px;display:flex}.PluginsPage-module__formField___-MDet label{color:var(--text-primary);overflow-wrap:anywhere;font-size:14px;font-weight:600}.PluginsPage-module__textarea___DVGj3{resize:vertical;border:1px solid var(--border-color);background:var(--bg-primary);min-height:148px;color:var(--text-primary);border-radius:8px;padding:10px 12px;font-family:Courier New,Courier,monospace;font-size:13px;line-height:1.5}.PluginsPage-module__textarea___DVGj3:focus{border-color:var(--primary-color);box-shadow:0 0 0 3px color-mix(in srgb, var(--primary-color) 18%, transparent);outline:none}.PluginsPage-module__arrayEditor___K9xc4{flex-direction:column;gap:8px;display:flex}.PluginsPage-module__arrayItemRow___d7Z4j{grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;display:grid}.PluginsPage-module__arrayInput___nJqhY{border:1px solid var(--border-color);background:var(--bg-primary);width:100%;min-width:0;height:38px;color:var(--text-primary);box-sizing:border-box;border-radius:8px;padding:0 12px;font-size:14px;line-height:38px}.PluginsPage-module__arrayInput___nJqhY:focus{border-color:var(--primary-color);box-shadow:0 0 0 3px color-mix(in srgb, var(--primary-color) 18%, transparent);outline:none}.PluginsPage-module__arrayActions___uqVHA{flex:none;gap:4px;display:inline-flex}.PluginsPage-module__iconButton___LZwkO.btn.btn-sm{width:34px;min-width:34px;height:34px;padding:0}.PluginsPage-module__iconButton___LZwkO.btn.btn-sm>span{justify-content:center;align-items:center;display:inline-flex}.PluginsPage-module__fieldError___ekayR{color:var(--danger-color);background:#c657461a;border-radius:4px;padding:8px 10px;font-size:12px;line-height:1.4}.PluginsPage-module__emptyConfig___lkfig{border:1px dashed var(--border-color);background:color-mix(in srgb, var(--bg-secondary) 70%, transparent);color:var(--text-secondary);border-radius:8px;padding:16px;font-size:14px}@keyframes PluginsPage-module__skeletonPulse___FskV9{0%{background-position:100% 0}to{background-position:0 0}}@media (max-width:768px){.PluginsPage-module__page___CvQ2C{gap:16px}.PluginsPage-module__sheetFooter___IZQM-{flex-direction:column-reverse}.PluginsPage-module__sheetFooter___IZQM- .btn{width:100%}.PluginsPage-module__arrayItemRow___d7Z4j{grid-template-columns:minmax(0,1fr) auto}}.PluginInstallGateModal-module__gateModal___ue7KG{text-align:left}.PluginInstallGateModal-module__identity___cMUhh{text-align:center;border-bottom:1px solid var(--border-color);flex-direction:column;align-items:center;gap:8px;padding:8px 0 16px;display:flex}.PluginInstallGateModal-module__logoBox___if1mL{border:1px solid color-mix(in srgb, var(--border-color) 50%, transparent);background:color-mix(in srgb, var(--bg-tertiary) 60%, transparent);width:52px;height:52px;color:var(--text-secondary);border-radius:12px;justify-content:center;align-items:center;display:inline-flex;overflow:hidden}.PluginInstallGateModal-module__logoBox___if1mL img{object-fit:cover;width:100%;height:100%}.PluginInstallGateModal-module__name___EUXHi{color:var(--text-primary);overflow-wrap:anywhere;margin:0;font-size:20px;font-weight:700}.PluginInstallGateModal-module__slug___nUy93{color:var(--text-secondary);overflow-wrap:anywhere;margin:0;font-family:Courier New,Courier,monospace;font-size:13px}.PluginInstallGateModal-module__repoLink___YkOrf{max-width:100%;color:var(--text-secondary);align-items:center;gap:4px;margin:0;font-family:Courier New,Courier,monospace;font-size:13px;text-decoration:none;display:inline-flex}.PluginInstallGateModal-module__repoLink___YkOrf span{overflow-wrap:anywhere;min-width:0}.PluginInstallGateModal-module__repoLink___YkOrf svg{color:var(--text-tertiary);flex-shrink:0}.PluginInstallGateModal-module__repoLink___YkOrf:hover{color:var(--accent-color);text-decoration:underline}.PluginInstallGateModal-module__repoLink___YkOrf:hover svg{color:currentColor}.PluginInstallGateModal-module__repoLink___YkOrf:focus-visible{outline:2px solid var(--focus-ring-color,var(--accent-color));outline-offset:3px;border-radius:4px}.PluginInstallGateModal-module__source___nEQCo{color:var(--text-tertiary);overflow-wrap:anywhere;margin:0;font-size:12px}.PluginInstallGateModal-module__warningBanner___NeGNY{border:1px solid color-mix(in srgb, var(--quota-medium-color,#e0aa14) 45%, var(--border-color));background:color-mix(in srgb, var(--quota-medium-color,#e0aa14) 16%, var(--bg-secondary));color:var(--text-primary);border-radius:8px;align-items:center;gap:8px;margin-top:24px;padding:12px 14px;font-size:14px;font-weight:600;line-height:1.4;display:flex}.PluginInstallGateModal-module__warningBanner___NeGNY svg{color:var(--quota-medium-color,#e0aa14);flex-shrink:0}.PluginInstallGateModal-module__effects___3sPvx{border-left:2px solid var(--border-color);flex-direction:column;gap:12px;margin:16px 0 0;padding-left:16px;list-style:none;display:flex}.PluginInstallGateModal-module__effects___3sPvx li{color:var(--text-secondary);padding-left:18px;font-size:14px;line-height:1.5;position:relative}.PluginInstallGateModal-module__effects___3sPvx li:before{content:"";background:var(--text-tertiary);border-radius:50%;width:7px;height:7px;position:absolute;top:7px;left:0}.PluginInstallGateModal-module__untrustedAlert___qDVbK{background:#c657461a;border:1px solid #c6574659;border-radius:8px;margin-top:24px;padding:12px 14px}.PluginInstallGateModal-module__untrustedText___oIwKQ{color:var(--danger-color);margin:0;font-size:13.5px;font-weight:600;line-height:1.5}.PluginInstallGateModal-module__originGrid___YoESL{grid-template-columns:auto 1fr;gap:4px 12px;margin:10px 0 0;display:grid}.PluginInstallGateModal-module__originGrid___YoESL dt{color:var(--text-secondary);font-size:12px;font-weight:600}.PluginInstallGateModal-module__originGrid___YoESL dd{color:var(--text-primary);overflow-wrap:anywhere;margin:0;font-family:Courier New,Courier,monospace;font-size:12px}.PluginInstallGateModal-module__confirmBlock___L2Vcd{margin-top:24px}.PluginInstallGateModal-module__confirmPrompt___zS8uB{color:var(--text-primary);overflow-wrap:anywhere;margin-bottom:8px;font-size:14px;font-weight:600;line-height:1.5;display:block}.PluginInstallGateModal-module__confirmHint___ZYG8r{color:var(--text-tertiary);margin:8px 0 0;font-size:12px}.PluginStorePage-module__page___rN2vB{flex-direction:column;gap:24px;width:100%;display:flex}.PluginStorePage-module__pageHeader___a5hmM{flex-direction:column;gap:8px;display:flex}.PluginStorePage-module__title___QkQ1O{color:var(--text-primary);margin:0;font-size:28px;font-weight:700;line-height:1.2}.PluginStorePage-module__description___r173b{color:var(--text-secondary);margin:0;font-size:14px;line-height:1.5}.PluginStorePage-module__errorBox___wObm5,.PluginStorePage-module__warningBox___m3Ra1{border-radius:8px;padding:16px;font-size:14px;line-height:1.5}.PluginStorePage-module__errorBox___wObm5{border:1px solid var(--danger-color);color:var(--danger-color);background:#c657461a;justify-content:space-between;align-items:center;gap:16px;display:flex}.PluginStorePage-module__errorBox___wObm5 span{overflow-wrap:anywhere;min-width:0}.PluginStorePage-module__errorBox___wObm5 .btn{flex-shrink:0}@media (max-width:768px){.PluginStorePage-module__errorBox___wObm5{flex-direction:column;align-items:stretch}}.PluginStorePage-module__warningBox___m3Ra1{border:1px solid color-mix(in srgb, var(--warning-color,#c65746) 42%, var(--border-color));background:color-mix(in srgb, var(--warning-color,#c65746) 9%, var(--bg-secondary));color:var(--text-primary)}.PluginStorePage-module__securityBanner___OtvY-{border:1px solid color-mix(in srgb, var(--quota-medium-color,#e0aa14) 45%, var(--border-color));background:color-mix(in srgb, var(--quota-medium-color,#e0aa14) 14%, var(--bg-secondary));color:var(--text-primary);border-radius:8px;align-items:flex-start;gap:8px;padding:12px 14px;display:flex}.PluginStorePage-module__securityBanner___OtvY->svg{color:var(--quota-medium-color,#e0aa14);flex-shrink:0;margin-top:1px}.PluginStorePage-module__securityBannerText___eDLQ1{min-width:0}.PluginStorePage-module__securityBannerText___eDLQ1 strong{font-size:14px;font-weight:700;line-height:1.4;display:block}.PluginStorePage-module__securityBannerText___eDLQ1 p{color:var(--text-secondary);margin:2px 0 0;font-size:13px;line-height:1.5}.PluginStorePage-module__statusBar___b8rzI{border:1px solid color-mix(in srgb, var(--border-color) 60%, transparent);background:color-mix(in srgb, var(--bg-secondary) 60%, transparent);border-radius:10px;flex-wrap:wrap;align-items:center;gap:10px;padding:10px 14px;display:flex}.PluginStorePage-module__statusPill___AN7oF{border:1px solid color-mix(in srgb, var(--border-color) 50%, transparent);background:color-mix(in srgb, var(--bg-primary) 56%, transparent);white-space:nowrap;border-radius:9999px;align-items:center;gap:6px;min-width:0;max-width:100%;padding:5px 12px;font-size:12px;font-weight:600;display:inline-flex}.PluginStorePage-module__statusDot___llMK6{border-radius:50%;flex-shrink:0;width:7px;height:7px}.PluginStorePage-module__statusDotOn___cQMJQ{background:#10b981;box-shadow:0 0 6px #10b98180}.PluginStorePage-module__statusDotOff___auyTL{background:var(--text-tertiary)}.PluginStorePage-module__statusLabel___0CDXB{color:var(--text-secondary)}.PluginStorePage-module__statusValue___Buecx{color:var(--text-primary);font-weight:700}.PluginStorePage-module__statusPathValue___gU-aN{text-overflow:ellipsis;white-space:nowrap;min-width:0;max-width:min(360px,58vw);display:block;overflow:hidden}.PluginStorePage-module__statusDivider___0N7N9{background:color-mix(in srgb, var(--border-color) 60%, transparent);flex-shrink:0;width:1px;height:20px}@media (max-width:768px){.PluginStorePage-module__statusDivider___0N7N9{display:none}}.PluginStorePage-module__toolbar___Z-Caf{align-items:center;gap:8px;display:flex}.PluginStorePage-module__toolbar___Z-Caf .form-group{flex:1;max-width:480px;margin:0}.PluginStorePage-module__toolbar___Z-Caf .input{padding-right:36px}.PluginStorePage-module__toolbar___Z-Caf .btn>span{align-items:center;gap:8px;display:inline-flex}@media (max-width:768px){.PluginStorePage-module__toolbar___Z-Caf{flex-direction:column;align-items:stretch}.PluginStorePage-module__toolbar___Z-Caf .form-group{max-width:none}}.PluginStorePage-module__filterChips___IS9vp{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.PluginStorePage-module__filterChip___GUJrG{border:1px solid color-mix(in srgb, var(--border-color) 70%, transparent);background:var(--bg-primary);color:var(--text-secondary);cursor:pointer;border-radius:9999px;align-items:center;gap:6px;padding:5px 12px;font-size:12px;font-weight:600;line-height:1.4;transition:border-color .15s,background-color .15s,color .15s;display:inline-flex}.PluginStorePage-module__filterChip___GUJrG:hover{border-color:var(--primary-color);color:var(--text-primary)}.PluginStorePage-module__filterChipActive___ej1JK{border-color:var(--primary-color);background:color-mix(in srgb, var(--primary-color) 12%, var(--bg-primary));color:var(--text-primary)}.PluginStorePage-module__filterChipCount___YmS7u{background:color-mix(in srgb, var(--border-color) 45%, transparent);min-width:18px;color:var(--text-secondary);border-radius:9999px;justify-content:center;align-items:center;padding:0 5px;font-size:11px;font-weight:700;display:inline-flex}.PluginStorePage-module__cardGrid___fnYwp{grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px;display:grid}@media (max-width:768px){.PluginStorePage-module__cardGrid___fnYwp{grid-template-columns:1fr}}.PluginStorePage-module__card___T-2ZC{border:1px solid color-mix(in srgb, var(--border-color) 70%, transparent);background:var(--bg-primary);border-radius:12px;flex-direction:column;gap:8px;padding:16px;transition:border-color .15s,background-color .15s;display:flex}.PluginStorePage-module__card___T-2ZC:hover{border-color:color-mix(in srgb, var(--primary-color) 45%, var(--border-color));background:var(--bg-hover)}.PluginStorePage-module__cardHeader___ApM1k{align-items:flex-start;gap:8px;display:flex}.PluginStorePage-module__logoBox___h82gm{border:1px solid color-mix(in srgb, var(--border-color) 50%, transparent);background:color-mix(in srgb, var(--bg-tertiary) 60%, transparent);width:40px;height:40px;color:var(--text-secondary);border-radius:10px;flex-shrink:0;justify-content:center;align-items:center;display:inline-flex;overflow:hidden}.PluginStorePage-module__logoBox___h82gm img{object-fit:cover;width:100%;height:100%}.PluginStorePage-module__cardTitleBlock___6IWjb{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.PluginStorePage-module__cardTitle___iD68r{color:var(--text-primary);text-overflow:ellipsis;white-space:nowrap;margin:0;font-size:15px;font-weight:650;line-height:1.3;overflow:hidden}.PluginStorePage-module__cardId___W5pBu{color:var(--text-tertiary);text-overflow:ellipsis;white-space:nowrap;font-family:Courier New,Courier,monospace;font-size:12px;overflow:hidden}.PluginStorePage-module__cardBadges___mWJO0{flex-wrap:wrap;flex-shrink:0;justify-content:flex-end;gap:5px;display:flex}.PluginStorePage-module__badge___4g24a,.PluginStorePage-module__badgeSuccess___wg0Ot,.PluginStorePage-module__badgeWarning___xHNML,.PluginStorePage-module__badgeUntrusted___Wjoz1{border-radius:6px;align-items:center;min-height:22px;padding:2px 8px;font-size:11px;font-weight:600;line-height:1.25;display:inline-flex}.PluginStorePage-module__badge___4g24a{background:color-mix(in srgb, var(--bg-secondary) 82%, transparent);border:1px solid color-mix(in srgb, var(--border-color) 50%, transparent);color:var(--text-secondary)}.PluginStorePage-module__badgeSuccess___wg0Ot{color:var(--success-color);background:#10b9811a;border:1px solid #10b98133}.PluginStorePage-module__badgeWarning___xHNML{color:var(--warning-color);background:#c657461a;border:1px solid #c6574633}.PluginStorePage-module__badgeUntrusted___Wjoz1{color:var(--danger-color);background:#c657461f;border:1px solid #c6574666;gap:4px}.PluginStorePage-module__badgeUntrusted___Wjoz1 svg{flex-shrink:0}.PluginStorePage-module__cardDesc___jQ-NX{color:var(--text-secondary);-webkit-line-clamp:2;-webkit-box-orient:vertical;margin:0;font-size:13px;line-height:1.5;display:-webkit-box;overflow:hidden}.PluginStorePage-module__cardDescBlock___yUsqR{flex-direction:column;gap:4px;min-width:0;display:flex}.PluginStorePage-module__cardDescExpanded___A3Tfg{-webkit-line-clamp:initial;display:block;overflow:visible}.PluginStorePage-module__cardDescToggle___zYFf8{color:var(--primary-color);cursor:pointer;font:inherit;background:0 0;border:0;align-self:flex-start;padding:0;font-size:12px;font-weight:650;line-height:1.4}.PluginStorePage-module__cardDescToggle___zYFf8:hover{color:var(--primary-hover);text-decoration:underline}.PluginStorePage-module__cardDescToggle___zYFf8:focus-visible{outline:2px solid color-mix(in srgb, var(--primary-color) 45%, transparent);outline-offset:3px;border-radius:4px}.PluginStorePage-module__cardMeta___vVo9C{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.PluginStorePage-module__metaItem___kRo15{min-width:0;max-width:100%;color:var(--text-tertiary);white-space:nowrap;align-items:center;gap:8px;font-size:12px;display:inline-flex}.PluginStorePage-module__metaItem___kRo15 strong{color:var(--text-secondary);font-weight:600}.PluginStorePage-module__metaDot___MB3Eg{background:color-mix(in srgb, var(--text-tertiary) 50%, transparent);border-radius:50%;flex-shrink:0;width:3px;height:3px}.PluginStorePage-module__tagRow___E6-yD{flex-wrap:wrap;gap:5px;display:flex}.PluginStorePage-module__tag___HqCio{background:color-mix(in srgb, var(--bg-secondary) 82%, transparent);border:1px solid color-mix(in srgb, var(--border-color) 40%, transparent);color:var(--text-tertiary);border-radius:9999px;align-items:center;padding:2px 8px;font-size:11px;font-weight:600;line-height:1.4;display:inline-flex}.PluginStorePage-module__cardFooter___2L0tU{justify-content:space-between;align-items:center;gap:8px;margin-top:auto;padding-top:8px;display:flex}.PluginStorePage-module__cardActions___Ks10I{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.PluginStorePage-module__cardActions___Ks10I .btn>span{align-items:center;gap:6px;display:inline-flex}.PluginStorePage-module__cardLinks___SkIwi{flex-shrink:0;align-items:center;gap:8px;display:flex}.PluginStorePage-module__iconLink___Bv605{border:1px solid var(--border-color);background:var(--bg-primary);width:30px;min-height:30px;color:var(--text-primary);border-radius:8px;flex:none;justify-content:center;align-items:center;text-decoration:none;transition:border-color .15s,background-color .15s,color .15s;display:inline-flex}.PluginStorePage-module__iconLink___Bv605:hover{border-color:var(--primary-color);background:var(--bg-hover);color:var(--primary-color)}.PluginStorePage-module__skeletonCard___QXKVq{border:1px solid color-mix(in srgb, var(--border-color) 70%, transparent);background:var(--bg-primary);border-radius:12px;flex-direction:column;gap:16px;padding:16px;display:flex}.PluginStorePage-module__skeletonHeader___joNtm{align-items:center;gap:16px;display:flex}.PluginStorePage-module__skeletonAvatar___bmFWM{background:linear-gradient(90deg, color-mix(in srgb, var(--bg-secondary) 86%, transparent) 25%, color-mix(in srgb, var(--bg-hover) 70%, transparent) 37%, color-mix(in srgb, var(--bg-secondary) 86%, transparent) 63%);background-size:400% 100%;border-radius:10px;flex-shrink:0;width:40px;height:40px;animation:1.35s ease-in-out infinite PluginStorePage-module__skeletonPulse___TfDaw}.PluginStorePage-module__skeletonText___JE5Eo{flex-direction:column;flex:1;gap:8px;display:flex}.PluginStorePage-module__skeletonLine___Nyb3e{background:linear-gradient(90deg, color-mix(in srgb, var(--bg-secondary) 86%, transparent) 25%, color-mix(in srgb, var(--bg-hover) 70%, transparent) 37%, color-mix(in srgb, var(--bg-secondary) 86%, transparent) 63%);background-size:400% 100%;border-radius:4px;height:14px;animation:1.35s ease-in-out infinite PluginStorePage-module__skeletonPulse___TfDaw}.PluginStorePage-module__skeletonLine___Nyb3e:first-child{width:45%}.PluginStorePage-module__skeletonLine___Nyb3e:last-child{width:70%;height:10px}.PluginStorePage-module__skeletonBody___Zy7HX{background:linear-gradient(90deg, color-mix(in srgb, var(--bg-secondary) 86%, transparent) 25%, color-mix(in srgb, var(--bg-hover) 70%, transparent) 37%, color-mix(in srgb, var(--bg-secondary) 86%, transparent) 63%);background-size:400% 100%;border-radius:8px;height:56px;animation:1.35s ease-in-out infinite PluginStorePage-module__skeletonPulse___TfDaw}@keyframes PluginStorePage-module__skeletonPulse___TfDaw{0%{background-position:100% 0}to{background-position:0 0}}@media (max-width:768px){.PluginStorePage-module__page___rN2vB{gap:16px}}.ConfigSection-module__section___36A5y{height:clamp(520px, 100dvh - var(--header-height,64px) - 250px, 780px);box-sizing:border-box;overscroll-behavior:auto;border:1px solid var(--border-color);background:color-mix(in srgb, var(--bg-primary) 82%, transparent);scroll-snap-align:start;scroll-snap-stop:always;scrollbar-width:thin;border-radius:8px;flex-direction:column;gap:clamp(16px,2vw,22px);min-width:0;padding:clamp(20px,2.4vw,28px);scroll-margin-top:104px;display:flex;overflow-y:auto}@media (max-width:768px){.ConfigSection-module__section___36A5y{height:clamp(420px, 100dvh - var(--header-height,64px) - 260px, 680px);gap:14px;padding:16px;scroll-margin-top:92px}}.ConfigSection-module__header___9y9kI{border-bottom:1px solid var(--border-color);background:color-mix(in srgb, var(--bg-primary) 88%, transparent);grid-template-columns:auto minmax(0,1fr);align-items:start;gap:10px;padding-bottom:14px;display:grid}@media (max-width:768px){.ConfigSection-module__header___9y9kI{background:0 0;grid-template-columns:minmax(0,1fr);gap:10px;padding-bottom:12px}}.ConfigSection-module__titleRow___MDqPS{align-items:center;gap:8px;min-width:0;display:flex}.ConfigSection-module__indexBadge___BNk-6{border:1px solid var(--border-color);min-width:32px;height:28px;color:var(--text-secondary);letter-spacing:.08em;border-radius:6px;justify-content:center;align-items:center;padding:0 8px;font-size:11px;font-weight:750;display:inline-flex}.ConfigSection-module__iconBadge___608--{width:28px;height:28px;color:var(--text-secondary);border-radius:6px;flex:none;justify-content:center;align-items:center;display:inline-flex}.ConfigSection-module__headingGroup___iqK3P{flex-direction:column;gap:6px;min-width:0;display:flex}.ConfigSection-module__title___fNwM-{color:var(--text-primary);letter-spacing:0;margin:0;font-size:clamp(18px,1.6vw,22px);font-weight:680;line-height:1.18}.ConfigSection-module__description___uM2Zw{max-width:72ch;color:var(--text-secondary);margin:0;font-size:13px;line-height:1.65}@media (max-width:768px){.ConfigSection-module__description___uM2Zw{max-width:none}}.ConfigSection-module__content___RBAGw{flex-direction:column;gap:16px;width:100%;min-width:0;display:flex}.VisualConfigEditor-module__visualEditor___qt8bb{flex-direction:column;gap:18px;display:flex}.VisualConfigEditor-module__visualEditor___qt8bb .form-group{gap:7px;margin-bottom:0}.VisualConfigEditor-module__visualEditor___qt8bb .form-group>label{color:var(--text-secondary);letter-spacing:.02em;font-size:12px;font-weight:700}.VisualConfigEditor-module__visualEditor___qt8bb .input{background:var(--bg-secondary);border-color:var(--border-color);min-height:42px;box-shadow:none;border-radius:8px}.VisualConfigEditor-module__visualEditor___qt8bb .input:focus{background:var(--bg-primary);border-color:var(--text-primary);box-shadow:0 0 0 2px color-mix(in srgb, var(--text-primary) 12%, transparent)}.VisualConfigEditor-module__visualEditor___qt8bb textarea.input{min-height:112px}.VisualConfigEditor-module__visualEditor___qt8bb .hint{color:var(--text-secondary);font-size:12px;line-height:1.55}.VisualConfigEditor-module__visualEditor___qt8bb .error-box{border-radius:8px}.VisualConfigEditor-module__visualEditor___qt8bb .item-list{gap:8px;margin-top:8px}.VisualConfigEditor-module__visualEditor___qt8bb .item-row{border-color:var(--border-color);background:0 0;border-radius:8px;padding:12px}.VisualConfigEditor-module__visualEditor___qt8bb .item-row .item-meta{gap:4px}.VisualConfigEditor-module__visualEditor___qt8bb .item-row .item-actions{flex-wrap:wrap}.VisualConfigEditor-module__visualEditor___qt8bb .pill{border:1px solid var(--border-color);color:var(--text-secondary);background:0 0;border-radius:6px}.VisualConfigEditor-module__expandableInputWrapper___k5rpc{flex:1;align-items:flex-start;min-width:0;display:flex;position:relative}.VisualConfigEditor-module__expandableInputWrapper___k5rpc>.VisualConfigEditor-module__expandableTextarea___OVvmN,.VisualConfigEditor-module__expandableInputWrapper___k5rpc>.input{flex:1;min-width:0;padding-right:28px}.VisualConfigEditor-module__expandableTextarea___OVvmN{resize:none;min-height:60px;padding-right:32px;line-height:1.5;overflow:hidden}.VisualConfigEditor-module__expandableToggle___M5mBU{z-index:1;color:var(--text-secondary);cursor:pointer;opacity:.58;background:0 0;border:0;padding:2px;font-size:10px;line-height:1;transition:opacity .15s;position:absolute;top:50%;right:7px;transform:translateY(-50%)}.VisualConfigEditor-module__expandableToggle___M5mBU:hover{opacity:1}.VisualConfigEditor-module__expandableToggle___M5mBU:disabled{cursor:default;opacity:.35}.VisualConfigEditor-module__expandableInputExpanded___9zfyv .VisualConfigEditor-module__expandableToggle___M5mBU{top:9px;right:12px;transform:none}.VisualConfigEditor-module__overview___OzHQc{border-bottom:1px solid var(--border-color);grid-template-columns:minmax(0,1fr);gap:10px;padding:0 0 18px;display:grid}.VisualConfigEditor-module__overviewHeader___A8kWa{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:10px;min-width:0;display:flex}@media (max-width:768px){.VisualConfigEditor-module__overviewHeader___A8kWa{align-items:stretch}}.VisualConfigEditor-module__overviewMeta___SM8ZF{flex-wrap:wrap;gap:6px;display:flex}.VisualConfigEditor-module__overviewPill___eXq54{border:1px solid var(--border-color);min-height:28px;color:var(--text-secondary);border-radius:6px;align-items:center;padding:0 9px;font-size:12px;font-weight:700;line-height:1.2;display:inline-flex}.VisualConfigEditor-module__overviewPillWarning___ruscj{color:var(--warning-text);border-color:var(--warning-border);background:var(--warning-bg)}.VisualConfigEditor-module__modeSwitch___RaXgu{border:1px solid var(--border-color);background:var(--bg-secondary);border-radius:8px;gap:4px;padding:3px;display:inline-flex}.VisualConfigEditor-module__modeButton___4q91-{cursor:pointer;font:inherit;color:inherit;background:0 0;border:none;outline:none;margin:0;padding:0}.VisualConfigEditor-module__modeButton___4q91-:focus{outline-offset:2px;outline:2px solid #8b8680}.VisualConfigEditor-module__modeButton___4q91-{min-height:30px;color:var(--text-secondary);border-radius:6px;align-items:center;gap:6px;padding:0 12px;font-size:13px;font-weight:700;line-height:1.2;transition:background-color .15s,color .15s;display:inline-flex}.VisualConfigEditor-module__modeButton___4q91-:hover{color:var(--text-primary)}.VisualConfigEditor-module__modeButtonActive___2l-EB{background:var(--bg-primary);color:var(--text-primary);box-shadow:0 1px 2px color-mix(in srgb, var(--text-primary) 10%, transparent)}.VisualConfigEditor-module__searchBox___5Hbe-{min-width:0;position:relative}.VisualConfigEditor-module__searchControl___qs3dO{padding-right:38px!important}.VisualConfigEditor-module__searchIcon___SSFNZ{color:var(--text-tertiary);pointer-events:none;align-items:center;display:inline-flex}.VisualConfigEditor-module__searchResults___LmzzD{z-index:20;border:1px solid var(--border-color);background:var(--bg-primary);max-height:320px;box-shadow:0 14px 32px color-mix(in srgb, var(--text-primary) 16%, transparent);border-radius:8px;flex-direction:column;gap:2px;padding:6px;display:flex;position:absolute;top:calc(100% + 6px);left:0;right:0;overflow-y:auto}.VisualConfigEditor-module__searchResultItem___WXj4b{cursor:pointer;font:inherit;color:inherit;background:0 0;border:none;outline:none;margin:0;padding:0}.VisualConfigEditor-module__searchResultItem___WXj4b:focus{outline-offset:2px;outline:2px solid #8b8680}.VisualConfigEditor-module__searchResultItem___WXj4b{text-align:left;border-radius:6px;justify-content:space-between;align-items:center;gap:12px;width:100%;padding:9px 10px;transition:background-color .12s;display:flex}.VisualConfigEditor-module__searchResultItem___WXj4b:hover,.VisualConfigEditor-module__searchResultItemActive___D4PcP{background:color-mix(in srgb, var(--text-primary) 6%, transparent)}.VisualConfigEditor-module__searchResultLabel___C-XH4{min-width:0;color:var(--text-primary);align-items:baseline;gap:7px;font-size:13px;font-weight:650;line-height:1.3;display:inline-flex}.VisualConfigEditor-module__searchResultQualifier___L6ySy{color:var(--text-tertiary);white-space:nowrap;font-size:11px;font-weight:600}.VisualConfigEditor-module__searchResultSection___2Ncbv{color:var(--text-secondary);white-space:nowrap;flex:none;font-size:11px;font-weight:650}.VisualConfigEditor-module__searchEmpty___SfISJ{color:var(--text-secondary);text-align:center;padding:12px 10px;font-size:13px}.VisualConfigEditor-module__fieldAnchor___b8GES{min-width:0;scroll-margin-top:calc(var(--header-height,64px) + 16px);display:block}.VisualConfigEditor-module__fieldHighlightActive___N9bvD{border-radius:10px;animation:1.8s ease-out VisualConfigEditor-module__cfgFieldHighlight___tprRG}@keyframes VisualConfigEditor-module__cfgFieldHighlight___tprRG{0%{box-shadow:0 0 0 3px color-mix(in srgb, var(--text-primary) 55%, transparent)}55%{box-shadow:0 0 0 3px color-mix(in srgb, var(--text-primary) 32%, transparent)}to{box-shadow:0 0 0 3px #0000}}.VisualConfigEditor-module__simpleView___2aSgt{flex-direction:column;gap:16px;width:100%;min-width:0;max-width:760px;display:flex}.VisualConfigEditor-module__simpleForm___fP8sP{flex-direction:column;gap:14px;min-width:0;display:flex}.VisualConfigEditor-module__simpleField___PKRxy{border:1px solid var(--border-color);background:0 0;border-radius:8px;padding:14px}.VisualConfigEditor-module__simpleBanner___IrwOV{border:1px solid var(--warning-border);background:var(--warning-bg);color:var(--warning-text);border-radius:8px;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;padding:12px 14px;font-size:13px;font-weight:600;line-height:1.5;display:flex}.VisualConfigEditor-module__simpleBannerAction___Qu19P{cursor:pointer;font:inherit;color:inherit;background:0 0;border:none;outline:none;margin:0;padding:0}.VisualConfigEditor-module__simpleBannerAction___Qu19P:focus{outline-offset:2px;outline:2px solid #8b8680}.VisualConfigEditor-module__simpleBannerAction___Qu19P{border:1px solid var(--warning-border);color:var(--warning-text);border-radius:6px;flex:none;padding:6px 12px;font-size:12px;font-weight:700;transition:background-color .15s}.VisualConfigEditor-module__simpleBannerAction___Qu19P:hover{background:color-mix(in srgb, var(--warning-text) 10%, transparent)}.VisualConfigEditor-module__simpleMore___8Wff6{cursor:pointer;font:inherit;color:inherit;background:0 0;border:none;outline:none;margin:0;padding:0}.VisualConfigEditor-module__simpleMore___8Wff6:focus{outline-offset:2px;outline:2px solid #8b8680}.VisualConfigEditor-module__simpleMore___8Wff6{border:1px dashed var(--border-color);width:100%;min-height:46px;color:var(--text-secondary);text-align:center;border-radius:8px;justify-content:center;align-items:center;gap:8px;padding:12px 16px;font-size:13px;font-weight:700;transition:background-color .15s,border-color .15s,color .15s;display:flex}.VisualConfigEditor-module__simpleMore___8Wff6:hover{border-color:var(--text-primary);color:var(--text-primary);background:color-mix(in srgb, var(--text-primary) 4%, transparent)}.VisualConfigEditor-module__workspace___gqLDP{flex-direction:column;gap:14px;min-width:0;display:flex}@media (max-width:768px){.VisualConfigEditor-module__workspace___gqLDP{gap:12px}}.VisualConfigEditor-module__mobileSectionNav___d-TWK{display:none}@media (max-width:768px){.VisualConfigEditor-module__mobileSectionNav___d-TWK{top:calc(var(--header-height,64px) + 10px);z-index:4;background:color-mix(in srgb, var(--bg-secondary) 92%, transparent);margin-bottom:4px;display:block;position:sticky}}.VisualConfigEditor-module__mobileSectionNavScroller___VGXz-{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:2px 0 8px;display:grid;overflow:visible}.VisualConfigEditor-module__mobileSectionNavButton___mR9BT{cursor:pointer;font:inherit;color:inherit;background:0 0;border:none;outline:none;margin:0;padding:0}.VisualConfigEditor-module__mobileSectionNavButton___mR9BT:focus{outline-offset:2px;outline:2px solid #8b8680}.VisualConfigEditor-module__mobileSectionNavButton___mR9BT{border:1px solid var(--border-color);background:var(--bg-primary);text-align:left;border-radius:8px;align-items:center;gap:7px;width:100%;min-width:0;padding:9px 10px;display:inline-flex}.VisualConfigEditor-module__mobileSectionNavButtonActive___ug6e6{border-color:var(--text-primary);background:color-mix(in srgb, var(--text-primary) 6%, transparent)}.VisualConfigEditor-module__mobileSectionNavIndex___eVeF8{color:var(--text-tertiary);letter-spacing:.08em;font-size:11px;font-weight:750}.VisualConfigEditor-module__mobileSectionNavLabel___oOjqs{color:var(--text-primary);font-size:13px;font-weight:700;line-height:1.25}.VisualConfigEditor-module__mobileSectionNavBadge___Gp-uW{background:var(--warning-bg);border:1px solid var(--warning-border);min-width:20px;height:20px;color:var(--warning-text);border-radius:6px;justify-content:center;align-items:center;padding:0 6px;font-size:11px;font-weight:700;display:inline-flex}.VisualConfigEditor-module__sidebar___SiTqL{top:calc(var(--header-height,64px) + 12px);z-index:5;align-self:stretch;min-width:0;position:sticky}@media (max-width:768px){.VisualConfigEditor-module__sidebar___SiTqL{display:none}}.VisualConfigEditor-module__sidebarRail___aktyQ{border-bottom:1px solid var(--border-color);background:color-mix(in srgb, var(--bg-secondary) 88%, transparent);padding:0 0 12px}.VisualConfigEditor-module__navList___Z7CyL{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;min-width:0;display:grid}@media (min-width:769px) and (max-width:1024px){.VisualConfigEditor-module__navList___Z7CyL{grid-template-columns:repeat(2,minmax(0,1fr))}}.VisualConfigEditor-module__navButton___EtGL7{cursor:pointer;font:inherit;color:inherit;background:0 0;border:none;outline:none;margin:0;padding:0}.VisualConfigEditor-module__navButton___EtGL7:focus{outline-offset:2px;outline:2px solid #8b8680}.VisualConfigEditor-module__navButton___EtGL7{border:1px solid var(--border-color);width:100%;min-height:48px;color:inherit;text-align:left;background:0 0;border-radius:8px;align-items:center;gap:10px;padding:9px 11px;transition:background-color .15s,border-color .15s,color .15s;display:flex}.VisualConfigEditor-module__navButton___EtGL7:hover{background:color-mix(in srgb, var(--text-primary) 5%, transparent)}.VisualConfigEditor-module__navButtonActive___oMl0Y{border-color:var(--text-primary);background:color-mix(in srgb, var(--text-primary) 6%, transparent)}.VisualConfigEditor-module__navIndex___NEFe2{min-width:24px;color:var(--text-tertiary);letter-spacing:.08em;flex:none;padding-top:2px;font-size:11px;font-weight:750}.VisualConfigEditor-module__navMain___JoJFq{flex-direction:column;flex:1;min-width:0;display:flex}.VisualConfigEditor-module__navHeadingRow___ulXXL{align-items:center;gap:8px;min-width:0;display:flex}.VisualConfigEditor-module__navLabelWrap___3-6B4{align-items:center;gap:7px;min-width:0;display:inline-flex}.VisualConfigEditor-module__navIcon___ZGr7m{width:16px;color:var(--text-secondary);flex:none;justify-content:center;align-items:center;display:inline-flex}.VisualConfigEditor-module__navLabel___-reRP{color:var(--text-primary);font-size:13px;font-weight:700;line-height:1.25}.VisualConfigEditor-module__navBadge___UKNbs{background:var(--warning-bg);border:1px solid var(--warning-border);min-width:22px;height:22px;color:var(--warning-text);border-radius:6px;flex:none;justify-content:center;align-items:center;padding:0 7px;font-size:11px;font-weight:700;display:inline-flex}.VisualConfigEditor-module__sections___UAac4{scroll-snap-type:x mandatory;scrollbar-gutter:stable;scrollbar-width:thin;align-items:stretch;gap:0;width:100%;min-width:0;max-width:100%;padding:0 0 12px;scroll-padding-left:0;display:flex;overflow:auto hidden}@media (max-width:768px){.VisualConfigEditor-module__sections___UAac4{padding-bottom:10px}}.VisualConfigEditor-module__sections___UAac4>*{flex:0 0 100%;width:100%;max-width:100%}.VisualConfigEditor-module__sectionGrid___KHy6p{grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px;display:grid}@media (max-width:768px){.VisualConfigEditor-module__sectionGrid___KHy6p{grid-template-columns:minmax(0,1fr)}}.VisualConfigEditor-module__sectionStack___nY-l7{flex-direction:column;gap:14px;display:flex}.VisualConfigEditor-module__divider___RHNc6{background:var(--border-color);height:1px}.VisualConfigEditor-module__toggleRow___Lb65M{border:1px solid var(--border-color);background:0 0;border-radius:8px;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:14px;min-height:74px;padding:14px;display:grid}@media (max-width:768px){.VisualConfigEditor-module__toggleRow___Lb65M{grid-template-columns:minmax(0,1fr)}}.VisualConfigEditor-module__toggleCopy___IC6RU{flex-direction:column;gap:5px;min-width:0;display:flex}.VisualConfigEditor-module__toggleTitle___ep81q{color:var(--text-primary);font-size:14px;font-weight:700;line-height:1.25}.VisualConfigEditor-module__toggleDescription___DrJw5{color:var(--text-secondary);font-size:12px;line-height:1.55}.VisualConfigEditor-module__fieldShell___Q-UC-{flex-direction:column;gap:7px;min-width:0;display:flex}.VisualConfigEditor-module__fieldLabel___B0C9J{color:var(--text-secondary);letter-spacing:.02em;font-size:12px;font-weight:700}.VisualConfigEditor-module__fieldControl___bzi3y{position:relative}.VisualConfigEditor-module__fieldHint___lA9jH{color:var(--text-secondary);font-size:12px;line-height:1.55}.VisualConfigEditor-module__inlinePill___qI2DE{border:1px solid var(--border-color);background:var(--bg-primary);min-height:24px;color:var(--text-secondary);border-radius:6px;align-items:center;padding:0 8px;font-size:11px;font-weight:700;display:inline-flex;position:absolute;top:50%;right:8px;transform:translateY(-50%)}.VisualConfigEditor-module__subsection___wLWRY{border:1px solid var(--border-color);background:0 0;border-radius:8px;flex-direction:column;gap:12px;padding:16px;display:flex}.VisualConfigEditor-module__subsectionHeader___OAu1N{flex-direction:column;gap:5px;display:flex}.VisualConfigEditor-module__subsectionTitle___9spj4{color:var(--text-primary);margin:0;font-size:15px;font-weight:700;line-height:1.25}.VisualConfigEditor-module__subsectionDescription___Cy1zr{color:var(--text-secondary);margin:0;font-size:12px;line-height:1.6}.VisualConfigEditor-module__blockHeaderRow___bw0Ek{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:10px;display:flex}.VisualConfigEditor-module__blockStack___skL7x{flex-direction:column;gap:10px;display:flex}.VisualConfigEditor-module__ruleCard___PtDhf{border:1px solid var(--border-color);background:color-mix(in srgb, var(--bg-secondary) 64%, transparent);border-radius:8px;flex-direction:column;gap:12px;padding:12px;display:flex}.VisualConfigEditor-module__ruleCardHeader___MYRwJ{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:10px;display:flex}.VisualConfigEditor-module__ruleCardTitle___tshgp{color:var(--text-primary);font-size:14px;font-weight:700;line-height:1.25}.VisualConfigEditor-module__blockLabel___NjEEm{color:var(--text-secondary);font-size:12px;font-weight:700;line-height:1.4}.VisualConfigEditor-module__actionRow___XLzbJ{justify-content:flex-end;display:flex}.VisualConfigEditor-module__emptyState___A7-n3{border:1px dashed var(--border-color);color:var(--text-secondary);text-align:center;background:0 0;border-radius:8px;padding:16px}.VisualConfigEditor-module__stringList___lQQGc{flex-direction:column;gap:8px;display:flex}.VisualConfigEditor-module__stringListRow___4k2cz{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.VisualConfigEditor-module__payloadRuleModelRow___VKBv1{grid-template-columns:1fr 160px auto auto;align-items:center;gap:8px;display:grid}.VisualConfigEditor-module__payloadRuleModelRowProtocolFirst___OaJ2F{grid-template-columns:160px 1fr auto auto}.VisualConfigEditor-module__payloadModelGroup___7fsJd{flex-direction:column;gap:8px;display:flex}.VisualConfigEditor-module__payloadModelAdvanced___y09Hm{border-left:2px solid var(--border-color);flex-direction:column;gap:12px;margin-left:10px;padding-left:12px;display:flex}.VisualConfigEditor-module__payloadAdvancedGrid___THpAJ{grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px;display:grid}.VisualConfigEditor-module__payloadHeaderRow___8x4ed{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;align-items:center;gap:8px;display:grid}.VisualConfigEditor-module__payloadRuleParamRow___KZJW-{grid-template-columns:1fr 140px 1fr auto;align-items:start;gap:8px;display:grid}.VisualConfigEditor-module__payloadRuleRawParamRow___7PtrY{grid-template-columns:minmax(240px,1fr) minmax(320px,1fr) auto}.VisualConfigEditor-module__payloadRuleParamGroup___1QLNQ{flex-direction:column;gap:6px;display:flex}.VisualConfigEditor-module__payloadJsonInput___ewOqz{resize:vertical;min-height:112px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.VisualConfigEditor-module__payloadParamError___wGWdg{margin:0}.VisualConfigEditor-module__payloadFilterModelRow___MeP9-{grid-template-columns:1fr 160px auto;align-items:center;gap:8px;display:grid}.VisualConfigEditor-module__payloadRowActionButton___8Fdka{flex:none;justify-self:start}.VisualConfigEditor-module__apiKeyModalInputRow___08QmU{align-items:center;gap:8px;display:flex}.VisualConfigEditor-module__apiKeyModalInputRow___08QmU .input{flex:1}@media (max-width:900px){.VisualConfigEditor-module__payloadRuleModelRow___VKBv1,.VisualConfigEditor-module__payloadRuleModelRowProtocolFirst___OaJ2F,.VisualConfigEditor-module__payloadHeaderRow___8x4ed,.VisualConfigEditor-module__payloadRuleParamRow___KZJW-,.VisualConfigEditor-module__payloadFilterModelRow___MeP9-{grid-template-columns:minmax(0,1fr)}.VisualConfigEditor-module__apiKeyModalInputRow___08QmU{flex-direction:column;align-items:stretch}.VisualConfigEditor-module__payloadRowActionButton___8Fdka{width:100%}}@media (max-width:768px){.VisualConfigEditor-module__overview___OzHQc{padding-bottom:14px}.VisualConfigEditor-module__subsection___wLWRY,.VisualConfigEditor-module__ruleCard___PtDhf,.VisualConfigEditor-module__toggleRow___Lb65M{padding:14px}.VisualConfigEditor-module__blockHeaderRow___bw0Ek,.VisualConfigEditor-module__ruleCardHeader___MYRwJ{align-items:stretch}.VisualConfigEditor-module__blockHeaderRow___bw0Ek .btn,.VisualConfigEditor-module__ruleCardHeader___MYRwJ .btn,.VisualConfigEditor-module__actionRow___XLzbJ .btn,.VisualConfigEditor-module__stringListRow___4k2cz .btn{justify-content:center;width:100%}.VisualConfigEditor-module__actionRow___XLzbJ{justify-content:stretch}.VisualConfigEditor-module__stringListRow___4k2cz{align-items:stretch}}@media (max-width:380px){.VisualConfigEditor-module__subsection___wLWRY,.VisualConfigEditor-module__ruleCard___PtDhf,.VisualConfigEditor-module__toggleRow___Lb65M{padding:12px}}.DiffModal-module__diffModal___v1LSh .modal-body{max-height:none;padding:0;overflow:hidden}.DiffModal-module__content___CqXvC{flex-direction:column;height:70vh;min-height:420px;display:flex}.DiffModal-module__emptyState___gS4Kg{border:1px dashed var(--border-color);background:var(--bg-secondary);color:var(--text-secondary);border-radius:8px;flex:1;place-items:center;margin:16px;font-size:14px;display:grid}.DiffModal-module__diffContainer___AoJKb{flex-direction:column;flex:1;min-height:0;display:flex;overflow:hidden}.DiffModal-module__fileHeader___7jkN4{background:var(--bg-secondary);border-bottom:1px solid var(--border-color);flex-shrink:0;align-items:center;gap:8px;padding:10px 16px;display:flex}.DiffModal-module__fileIcon___OxYTx{color:var(--text-tertiary);flex-shrink:0}.DiffModal-module__fileName___2ylCY{color:var(--text-primary);font-family:Consolas,Monaco,Menlo,SF Mono,monospace;font-size:13px;font-weight:600}.DiffModal-module__fileStats___bN8WB{align-items:center;gap:8px;margin-left:auto;font-family:Consolas,Monaco,Menlo,SF Mono,monospace;font-size:12px;font-weight:700;display:flex}.DiffModal-module__statAdditions___EKdp8{color:#3fb950}.DiffModal-module__statDeletions___Py0Xg{color:#f85149}.DiffModal-module__statBar___tR7TQ{gap:2px;margin-left:2px;display:inline-flex}.DiffModal-module__statBlock___4qKhG{border-radius:2px;width:8px;height:8px}.DiffModal-module__statBlockAdd___VI4yX{background:#3fb950}.DiffModal-module__statBlockDel___39sMa{background:#f85149}.DiffModal-module__diffBody___9dIqe{flex:1;min-height:0;font-family:Consolas,Monaco,Menlo,SF Mono,monospace;font-size:12px;line-height:20px;overflow:auto}.DiffModal-module__hunk___AcNIC+.DiffModal-module__hunk___AcNIC{border-top:1px solid var(--border-color)}.DiffModal-module__hunkHeader___xUVgg{background:color-mix(in srgb, #388bfd 8%, var(--bg-primary));border-bottom:1px solid color-mix(in srgb, #388bfd 12%, var(--border-color));color:color-mix(in srgb, #388bfd 75%, var(--text-secondary));align-items:center;min-height:20px;display:flex}.DiffModal-module__hunkGutter___QVKqi{border-right:1px solid color-mix(in srgb, #388bfd 12%, var(--border-color));flex-shrink:0;justify-content:center;align-self:stretch;align-items:center;width:50px;display:flex}.DiffModal-module__hunkExpandIcon___zbAx-{color:color-mix(in srgb, #388bfd 70%, var(--text-tertiary));opacity:.7}.DiffModal-module__hunkText___iPVut{white-space:nowrap;padding:4px 8px 4px 28px;font-size:12px}.DiffModal-module__diffLine___9KzZK{min-height:20px;display:flex}.DiffModal-module__lineNum___VXwKE{text-align:right;width:50px;color:var(--text-tertiary);-webkit-user-select:none;user-select:none;font-variant-numeric:tabular-nums;border-right:1px solid color-mix(in srgb, var(--border-color) 60%, transparent);box-sizing:border-box;flex-shrink:0;padding:0 8px}.DiffModal-module__lineNumEmpty___I-5AK{color:#0000}.DiffModal-module__linePrefix___ofp2Q{text-align:center;-webkit-user-select:none;user-select:none;flex-shrink:0;width:20px;font-weight:700}.DiffModal-module__lineText___Zdyo3{white-space:pre-wrap;word-break:break-word;flex:1;min-width:0;padding-right:12px}.DiffModal-module__context___RnJqZ{background:var(--bg-primary)}.DiffModal-module__context___RnJqZ .DiffModal-module__linePrefix___ofp2Q{color:var(--text-tertiary)}.DiffModal-module__context___RnJqZ .DiffModal-module__lineText___Zdyo3{color:var(--text-primary)}.DiffModal-module__deletion___rms8N{background:color-mix(in srgb, #f85149 8%, var(--bg-primary))}.DiffModal-module__deletion___rms8N .DiffModal-module__lineNum___VXwKE{background:color-mix(in srgb, #f85149 12%, var(--bg-primary));border-right-color:color-mix(in srgb, #f85149 18%, var(--border-color));color:color-mix(in srgb, #f85149 60%, var(--text-tertiary))}.DiffModal-module__deletion___rms8N .DiffModal-module__linePrefix___ofp2Q{color:#f85149}.DiffModal-module__deletion___rms8N .DiffModal-module__lineText___Zdyo3{color:var(--text-primary)}.DiffModal-module__addition___a6g2h{background:color-mix(in srgb, #3fb950 8%, var(--bg-primary))}.DiffModal-module__addition___a6g2h .DiffModal-module__lineNum___VXwKE{background:color-mix(in srgb, #3fb950 12%, var(--bg-primary));border-right-color:color-mix(in srgb, #3fb950 18%, var(--border-color));color:color-mix(in srgb, #3fb950 60%, var(--text-tertiary))}.DiffModal-module__addition___a6g2h .DiffModal-module__linePrefix___ofp2Q{color:#3fb950}.DiffModal-module__addition___a6g2h .DiffModal-module__lineText___Zdyo3{color:var(--text-primary)}@media (max-width:768px){.DiffModal-module__content___CqXvC{height:65vh;min-height:360px}.DiffModal-module__lineNum___VXwKE{width:36px;padding:0 4px;font-size:10px}.DiffModal-module__linePrefix___ofp2Q{width:16px;font-size:11px}.DiffModal-module__hunkGutter___QVKqi{width:36px}.DiffModal-module__hunkText___iPVut{padding-left:20px}.DiffModal-module__diffBody___9dIqe{font-size:11px;line-height:18px}.DiffModal-module__fileName___2ylCY{font-size:12px}.DiffModal-module__fileStats___bN8WB{font-size:11px}}.ConfigPage-module__container___5kN-Y{width:min(100%,1480px);min-height:100%;padding-bottom:calc(var(--config-action-bar-height,0px) + 16px + env(safe-area-inset-bottom) + 16px);flex-direction:column;gap:clamp(18px,2.4vw,28px);margin:0 auto;display:flex;overflow-y:auto}.ConfigPage-module__pageHeader___Zulyi{align-items:flex-start;display:flex}.ConfigPage-module__pageHeaderCopy___fiTfJ{flex-direction:column;gap:10px;width:min(100%,360px);min-width:0;display:flex}.ConfigPage-module__pageTitle___BoVLE{color:var(--text-primary);margin:0;font-size:28px;font-weight:700}.ConfigPage-module__tabBar___PelpE{border:1px solid var(--border-color);background:color-mix(in srgb, var(--bg-primary) 72%, transparent);border-radius:8px;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px;padding:2px;display:grid}.ConfigPage-module__tabItem___Uj1rU{cursor:pointer;font:inherit;color:inherit;background:0 0;border:none;outline:none;margin:0;padding:0}.ConfigPage-module__tabItem___Uj1rU:focus{outline-offset:2px;outline:2px solid #8b8680}.ConfigPage-module__tabItem___Uj1rU{min-height:38px;color:var(--text-secondary);white-space:nowrap;border:1px solid #0000;border-radius:6px;padding:0 12px;font-size:13px;font-weight:650;line-height:1.25;transition:color .15s,background-color .15s,border-color .15s}.ConfigPage-module__tabItem___Uj1rU:hover:not(:disabled){color:var(--text-primary);background:color-mix(in srgb, var(--text-primary) 5%, transparent)}.ConfigPage-module__tabItem___Uj1rU:disabled{opacity:.58;cursor:not-allowed}.ConfigPage-module__tabActive___sZLh-{color:var(--bg-primary);background:var(--text-primary);border-color:var(--text-primary)}.ConfigPage-module__workspaceShell___Ztz3J{flex-direction:column;gap:24px;min-width:0;display:flex}.ConfigPage-module__content___PgFbt{flex-direction:column;gap:24px;min-height:0;display:flex}.ConfigPage-module__sourceWorkspace___bUuLs{flex-direction:column;gap:12px;min-height:0;display:flex}.ConfigPage-module__sourceToolbar___fhCdI{border:1px solid var(--border-color);background:color-mix(in srgb, var(--bg-primary) 76%, transparent);border-radius:8px;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;padding:8px;display:grid}@media (max-width:768px){.ConfigPage-module__sourceToolbar___fhCdI{grid-template-columns:minmax(0,1fr)}}.ConfigPage-module__searchInputWrapper___-GeEQ{align-items:center;min-width:0;display:flex;position:relative}.ConfigPage-module__searchInputWrapper___-GeEQ .form-group{width:100%;margin-bottom:0}.ConfigPage-module__searchInput___ock8o{background:var(--bg-secondary)!important;border-radius:6px!important;min-height:38px!important;padding-right:128px!important}.ConfigPage-module__searchRight___pwWBV{align-items:center;gap:6px;display:inline-flex}.ConfigPage-module__searchCount___AIry7{border:1px solid var(--border-color);min-height:26px;color:var(--text-secondary);pointer-events:none;white-space:nowrap;border-radius:6px;align-items:center;padding:0 8px;font-size:12px;font-weight:650;display:inline-flex}.ConfigPage-module__searchButton___GRbfi{cursor:pointer;font:inherit;color:inherit;background:0 0;border:none;outline:none;margin:0;padding:0}.ConfigPage-module__searchButton___GRbfi:focus{outline-offset:2px;outline:2px solid #8b8680}.ConfigPage-module__searchButton___GRbfi{border:1px solid var(--text-primary);background:var(--text-primary);width:30px;height:30px;color:var(--bg-primary);border-radius:6px;justify-content:center;align-items:center;transition:background-color .15s,border-color .15s,opacity .15s;display:inline-flex}.ConfigPage-module__searchButton___GRbfi:hover:not(:disabled){background:var(--primary-hover);border-color:var(--primary-hover)}.ConfigPage-module__searchButton___GRbfi:disabled{opacity:.45;cursor:not-allowed}.ConfigPage-module__searchActions___ZGITa{flex-shrink:0;gap:6px;display:flex}.ConfigPage-module__searchActions___ZGITa button{border-radius:6px;width:38px;min-width:38px;height:38px;padding:0!important}@media (max-width:768px){.ConfigPage-module__searchActions___ZGITa{justify-content:stretch}.ConfigPage-module__searchActions___ZGITa button{flex:1;width:auto}}.ConfigPage-module__editorWrapper___yBudn{border:1px solid var(--border-color);background:var(--bg-primary);border-radius:8px;flex:none;width:100%;height:clamp(500px,70vh,1040px);overflow:hidden}@supports (height:100dvh){.ConfigPage-module__editorWrapper___yBudn{height:clamp(500px,70dvh,1040px)}}.ConfigPage-module__editorWrapper___yBudn .cm-editor{background:0 0;height:100%;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:13px}.ConfigPage-module__editorWrapper___yBudn .cm-scroller{-webkit-overflow-scrolling:touch;touch-action:pan-x pan-y;overscroll-behavior:contain;overflow:auto}.ConfigPage-module__editorWrapper___yBudn .cm-gutters{border-right:1px solid var(--border-color);background:color-mix(in srgb, var(--bg-secondary) 86%, transparent)}.ConfigPage-module__editorWrapper___yBudn .cm-lineNumbers .cm-gutterElement{min-width:40px;color:var(--text-muted);padding:0 8px 0 12px}.ConfigPage-module__editorWrapper___yBudn .cm-activeLine,.ConfigPage-module__editorWrapper___yBudn .cm-activeLineGutter{background:color-mix(in srgb, var(--text-primary) 5%, transparent)}.ConfigPage-module__editorWrapper___yBudn .cm-selectionMatch{background:#e0aa143d}.ConfigPage-module__editorWrapper___yBudn .cm-searchMatch{background:#e0aa1452;outline:1px solid #e0aa147a}.ConfigPage-module__editorWrapper___yBudn .cm-searchMatch-selected{background:#c6574652}.ConfigPage-module__modified___4mzgT{color:var(--warning-text);background:var(--warning-bg);border-color:var(--warning-border)}.ConfigPage-module__saved___zmZx2{color:var(--success-color);background:color-mix(in srgb, var(--success-color) 10%, transparent);border-color:color-mix(in srgb, var(--success-color) 34%, var(--border-color))}.ConfigPage-module__error___qlpX1{color:var(--warning-text);background:var(--warning-bg);border-color:var(--warning-border)}.ConfigPage-module__floatingActionContainer___3ZQ-z{left:var(--content-center-x,50%);bottom:calc(16px + env(safe-area-inset-bottom));z-index:50;pointer-events:auto;width:-moz-fit-content;width:fit-content;max-width:calc(100vw - 24px);position:fixed;transform:translate(-50%)}.ConfigPage-module__floatingActionList___ky8bV{max-width:inherit;border:1px solid var(--border-color);background:color-mix(in srgb, var(--bg-primary) 92%, transparent);box-shadow:var(--shadow-lg);scrollbar-width:none;border-radius:8px;align-items:center;gap:6px;padding:6px;display:inline-flex;overflow-x:auto}.ConfigPage-module__floatingActionList___ky8bV::-webkit-scrollbar{display:none}.ConfigPage-module__floatingStatus___u8zOi{min-width:0;min-height:34px;color:var(--text-primary);text-align:center;white-space:nowrap;text-overflow:ellipsis;border:1px solid #0000;border-radius:6px;align-items:center;max-width:min(300px,46vw);padding:0 10px;font-size:11px;font-weight:700;line-height:1.2;display:inline-flex;overflow:hidden}.ConfigPage-module__floatingStatusCompact___STwcZ{max-width:112px;padding:0 8px;font-size:10px}.ConfigPage-module__floatingActionButton___Htxmz{cursor:pointer;font:inherit;color:inherit;background:0 0;border:none;outline:none;margin:0;padding:0}.ConfigPage-module__floatingActionButton___Htxmz:focus{outline-offset:2px;outline:2px solid #8b8680}.ConfigPage-module__floatingActionButton___Htxmz{width:38px;height:38px;color:var(--text-primary);cursor:pointer;border-radius:6px;justify-content:center;align-items:center;transition:background-color .15s,color .15s,opacity .15s;display:flex;position:relative}.ConfigPage-module__floatingActionButton___Htxmz:hover:not(:disabled){background:var(--text-primary);color:var(--bg-primary)}.ConfigPage-module__floatingActionButton___Htxmz:disabled{opacity:.45;cursor:not-allowed}.ConfigPage-module__dirtyDot___zXEnD{background:var(--warning-color);width:7px;height:7px;box-shadow:0 0 0 2px var(--bg-primary);border-radius:999px;position:absolute;top:8px;right:8px}@media (max-width:1200px){.ConfigPage-module__floatingActionContainer___3ZQ-z{bottom:calc(12px + env(safe-area-inset-bottom));max-width:calc(100vw - 16px)}.ConfigPage-module__floatingStatus___u8zOi{max-width:min(180px,40vw)}}@media (max-width:480px){.ConfigPage-module__floatingStatus___u8zOi{max-width:min(132px,38vw)}.ConfigPage-module__searchInput___ock8o{padding-right:108px!important}}.LogsPage-module__container___aQ0JL{flex-direction:column;flex:1;width:100%;min-height:0;display:flex}@media (max-width:768px){.LogsPage-module__container___aQ0JL{min-height:auto;overflow:visible}}.LogsPage-module__pageHeader___yZbkC{justify-content:space-between;align-items:center;gap:16px;margin:0 0 24px;display:flex}@media (max-width:768px){.LogsPage-module__pageHeader___yZbkC{flex-direction:column;align-items:flex-start;gap:4px}}.LogsPage-module__pageTitle___vZY55{color:var(--text-primary);margin:0;font-size:28px;font-weight:700}.LogsPage-module__tabBar___bI3hW{border-bottom:1px solid var(--border-color);gap:4px;margin-bottom:24px;display:flex}.LogsPage-module__tabItem___5tb4J{cursor:pointer;font:inherit;color:inherit;background:0 0;border:none;outline:none;margin:0;padding:0}.LogsPage-module__tabItem___5tb4J:focus{outline-offset:2px;outline:2px solid #8b8680}.LogsPage-module__tabItem___5tb4J{color:var(--text-secondary);cursor:pointer;background:0 0;border-bottom:2px solid #0000;margin-bottom:-1px;padding:12px 20px;font-size:14px;font-weight:500;transition:color .15s,border-color .15s}.LogsPage-module__tabItem___5tb4J:hover{color:var(--text-primary)}.LogsPage-module__tabItem___5tb4J:focus{box-shadow:none;outline:none}.LogsPage-module__tabItem___5tb4J:focus-visible{box-shadow:none;outline:none}.LogsPage-module__tabActive___JjbWX{color:var(--primary-color);border-bottom-color:var(--primary-color)}.LogsPage-module__content___hGaGn{flex-direction:column;flex:1;gap:24px;min-height:0;display:flex}@media (max-width:768px){.LogsPage-module__content___hGaGn{gap:16px;min-height:auto}}.LogsPage-module__logCard___KG4Jd{flex-direction:column;flex:1;min-height:0;display:flex;overflow:hidden}@media (max-width:768px){.LogsPage-module__logCard___KG4Jd{flex:none;min-height:auto;overflow:visible}}.LogsPage-module__runtimeNotice___94iyL{border:1px solid var(--border-color);color:var(--text-secondary);background:var(--bg-secondary);border-radius:9999px;flex:none;padding:4px 10px;font-size:12px;line-height:1.3}.LogsPage-module__toolbar___9dY5F{flex-wrap:wrap;align-items:center;gap:8px;margin-left:auto;display:flex}@media (max-width:768px){.LogsPage-module__toolbar___9dY5F{align-items:flex-start;width:100%;margin-left:0}}.LogsPage-module__filters___nUahU{flex-wrap:wrap;align-items:center;gap:16px;margin-bottom:16px;display:flex}.LogsPage-module__filters___nUahU .form-group{margin:0}@media (max-width:768px){.LogsPage-module__filters___nUahU{gap:8px;margin-bottom:8px}}.LogsPage-module__searchWrapper___mrEmr{flex:1;min-width:220px;max-width:420px}.LogsPage-module__filterPanelHeader___Oi5tO{flex:100%;align-items:center;display:flex}.LogsPage-module__filterPanelToggle___ADZED{white-space:nowrap}.LogsPage-module__filterPanelButtonContent___sgOCp{align-items:center;gap:6px;display:inline-flex}.LogsPage-module__filterPanelCount___kAJ5-{color:var(--primary-color);background:#8b86801f;border-radius:9999px;align-items:center;padding:2px 8px;font-size:12px;line-height:1.2;display:inline-flex}.LogsPage-module__structuredFilters___fW4v7{background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:8px;flex-direction:column;flex:100%;gap:8px;padding:8px 10px;display:flex}.LogsPage-module__filterChipGroup___bbPoy{flex-wrap:wrap;align-items:flex-start;gap:8px;display:flex}.LogsPage-module__filterChipLabel___jy0D3{color:var(--text-secondary);min-width:68px;font-size:12px;font-weight:700;line-height:28px}.LogsPage-module__filterChipList___hHeOY{flex-wrap:wrap;flex:1;align-items:center;gap:6px;display:flex}.LogsPage-module__filterChip___Efqh7{cursor:pointer;font:inherit;color:inherit;background:0 0;border:none;outline:none;margin:0;padding:0}.LogsPage-module__filterChip___Efqh7:focus{outline-offset:2px;outline:2px solid #8b8680}.LogsPage-module__filterChip___Efqh7{border:1px solid var(--border-color);background:var(--bg-primary);color:var(--text-secondary);cursor:pointer;white-space:nowrap;text-overflow:ellipsis;border-radius:9999px;align-items:center;gap:4px;max-width:280px;padding:4px 10px;font-size:12px;line-height:1.3;transition:border-color .15s,color .15s,background-color .15s;display:inline-flex;overflow:hidden}.LogsPage-module__filterChip___Efqh7:hover:not(:disabled){color:var(--text-primary);border-color:var(--primary-color)}.LogsPage-module__filterChip___Efqh7:disabled{opacity:.55;cursor:not-allowed}.LogsPage-module__filterChipActive___8S8ki{color:var(--primary-color);background:#8b868024;border-color:#8b868073}.LogsPage-module__filterChipHint___shcVo{color:var(--text-tertiary);font-size:12px}@media (max-width:768px){.LogsPage-module__filterPanelHeader___Oi5tO,.LogsPage-module__filterPanelToggle___ADZED{width:100%}.LogsPage-module__filterPanelButtonContent___sgOCp{flex-wrap:wrap;justify-content:space-between;width:100%}.LogsPage-module__filterChipGroup___bbPoy{flex-direction:column;gap:6px}.LogsPage-module__filterChipLabel___jy0D3{min-width:0;line-height:1.2}}.LogsPage-module__searchInput___eoPij{padding-right:44px!important}.LogsPage-module__searchIcon___73cvF{color:var(--text-tertiary);pointer-events:none}.LogsPage-module__searchClear___yTM1y{cursor:pointer;font:inherit;color:inherit;background:0 0;border:none;outline:none;margin:0;padding:0}.LogsPage-module__searchClear___yTM1y:focus{outline-offset:2px;outline:2px solid #8b8680}.LogsPage-module__searchClear___yTM1y{width:28px;height:28px;color:var(--text-secondary);border-radius:9999px;justify-content:center;align-items:center;display:inline-flex}.LogsPage-module__searchClear___yTM1y:hover{background:var(--bg-secondary)}.LogsPage-module__filterStats___IaTXF{color:var(--text-secondary);white-space:nowrap;align-items:center;gap:10px;margin-left:auto;font-size:12px;display:inline-flex}.LogsPage-module__removedCount___bNgxC{color:var(--text-tertiary)}.LogsPage-module__actionButton___aYJPR{white-space:nowrap}.LogsPage-module__buttonContent___qjHrB{align-items:center;gap:6px;display:inline-flex}.LogsPage-module__buttonContent___qjHrB svg{flex:none}.LogsPage-module__switchLabel___EfB3d{align-items:center;gap:6px;display:inline-flex}.LogsPage-module__switchLabel___EfB3d svg{flex:none}.LogsPage-module__logPanel___2wjiP{background:var(--bg-secondary);border:1px solid var(--border-color);resize:vertical;-webkit-overflow-scrolling:touch;touch-action:pan-y;overscroll-behavior:contain;border-radius:8px;flex:auto;height:auto;min-height:280px;max-height:calc(100vh - 320px);position:relative;overflow:auto}@media (min-width:769px) and (max-width:1024px){.LogsPage-module__logPanel___2wjiP{min-height:240px;max-height:calc(100vh - 300px)}}@media (max-width:768px){.LogsPage-module__logPanel___2wjiP{flex:none;height:420px;min-height:360px;max-height:480px}}.LogsPage-module__errorPanel___0w-se{-webkit-overflow-scrolling:touch;overscroll-behavior:contain;height:480px;overflow:auto}.LogsPage-module__errorPanel___0w-se .item-meta{flex:260px;min-width:0}.LogsPage-module__errorPanel___0w-se .item-title{overflow-wrap:anywhere}.LogsPage-module__errorPanel___0w-se .item-actions{flex-wrap:wrap;justify-content:flex-end}.LogsPage-module__errorLogViewer___dYvlG{flex-direction:column;gap:16px;min-height:0;display:flex}.LogsPage-module__errorLogViewerMeta___Dy7Ay{color:var(--text-secondary);flex-wrap:wrap;gap:8px 16px;font-size:12px;display:flex}.LogsPage-module__errorLogContent___6GzNt{border:1px solid var(--border-color);background:var(--bg-secondary);max-height:min(58vh,640px);color:var(--text-primary);white-space:pre;-webkit-overflow-scrolling:touch;border-radius:8px;margin:0;padding:12px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:12px;line-height:1.5;overflow:auto}.LogsPage-module__loadMoreBanner___BUD0t{z-index:1;border-bottom:1px solid var(--border-color);background:var(--bg-primary);color:var(--text-secondary);justify-content:space-between;align-items:center;gap:8px;padding:8px 12px;font-size:12px;display:flex;position:sticky;top:0}@media (max-width:768px){.LogsPage-module__loadMoreBanner___BUD0t{flex-direction:column;justify-content:flex-start;align-items:flex-start;gap:4px}.LogsPage-module__loadMoreBanner___BUD0t>span{width:100%}}.LogsPage-module__loadMoreCount___UsdBd{color:var(--text-tertiary);white-space:nowrap}.LogsPage-module__loadMoreStats___e9bVk{align-items:center;gap:16px;display:flex}@media (max-width:768px){.LogsPage-module__loadMoreStats___e9bVk{flex-wrap:wrap;gap:8px;width:100%}.LogsPage-module__loadMoreStats___e9bVk>span{white-space:nowrap}}.LogsPage-module__logList___lFt6f{flex-direction:column;display:flex}.LogsPage-module__rawLog___F5YBd{cursor:text;-webkit-user-select:text;user-select:text;white-space:pre;color:var(--text-primary);margin:0;padding:10px 12px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:12.5px;line-height:1.45}@media (min-width:769px) and (max-width:1024px){.LogsPage-module__rawLog___F5YBd{padding:8px 10px;font-size:12px}}@media (max-width:768px){.LogsPage-module__rawLog___F5YBd{padding:8px 10px;font-size:11.5px}}.LogsPage-module__logRow___rxZS5{border-bottom:1px solid var(--border-color);cursor:copy;color:var(--text-primary);border-left:3px solid #0000;grid-template-columns:170px 1fr;gap:16px;padding:10px 12px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:12.5px;line-height:1.45;display:grid}.LogsPage-module__logRow___rxZS5:hover{background:#8b86800f}@media (min-width:769px) and (max-width:1024px){.LogsPage-module__logRow___rxZS5{grid-template-columns:140px 1fr;gap:8px;padding:8px 10px;font-size:12px}}@media (max-width:768px){.LogsPage-module__logRow___rxZS5{grid-template-columns:1fr;gap:4px;padding:8px 10px;font-size:11.5px}}.LogsPage-module__rowWarn___Lhg4M{border-left-color:var(--warning-color)}.LogsPage-module__rowError___XQ3Qi{border-left-color:var(--error-color)}.LogsPage-module__timestamp___TZvLq{color:var(--text-tertiary);white-space:nowrap;padding-top:2px}@media (max-width:768px){.LogsPage-module__timestamp___TZvLq{white-space:normal}}.LogsPage-module__rowMain___f--We{flex-wrap:wrap;align-items:baseline;gap:6px;min-width:0;display:flex}.LogsPage-module__badge___tR566{border:1px solid var(--border-color);background:var(--bg-primary);color:var(--text-secondary);white-space:nowrap;border-radius:9999px;align-items:center;padding:2px 8px;font-size:12px;font-weight:800;display:inline-flex}.LogsPage-module__pill___vGA2z{border:1px solid var(--border-color);background:var(--bg-primary);color:var(--text-secondary);white-space:nowrap;border-radius:9999px;align-items:center;padding:2px 8px;font-size:12px;font-weight:600;display:inline-flex}.LogsPage-module__source___nv7Zu{color:var(--text-secondary);text-overflow:ellipsis;white-space:nowrap;max-width:240px;overflow:hidden}@media (max-width:768px){.LogsPage-module__source___nv7Zu{max-width:100%}}.LogsPage-module__requestIdBadge___yPO1b{color:#0891b2;background:#0891b21a;border-color:#0891b240;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:11px}.LogsPage-module__statusBadge___hj08j{font-variant-numeric:tabular-nums}.LogsPage-module__statusSuccess___3llcn{color:var(--success-badge-text);background:var(--success-badge-bg);border-color:var(--success-badge-border)}.LogsPage-module__statusInfo___B6DaE{color:var(--info-color);background:#8b86801f;border-color:#8b868040}.LogsPage-module__statusWarn___1Dwki{color:var(--warning-text);background:var(--warning-bg);border-color:var(--warning-border)}.LogsPage-module__statusError___xxTDc{color:var(--failure-badge-text);background:var(--failure-badge-bg);border-color:var(--failure-badge-border)}.LogsPage-module__levelInfo___oZMOp{color:var(--info-color);background:#8b86801f;border-color:#8b868040}.LogsPage-module__levelWarn___DsCD0{color:var(--warning-text);background:var(--warning-bg);border-color:var(--warning-border)}.LogsPage-module__levelError___8VjWc{color:var(--error-color);background:#c657461f;border-color:#c6574640}.LogsPage-module__levelDebug___l-5yk,.LogsPage-module__levelTrace___XvRLF{color:var(--text-secondary);background:#6b72801f;border-color:#6b728040}.LogsPage-module__methodBadge___Cf9jC{color:var(--text-primary);background:#8b868014;border-color:#8b868038}.LogsPage-module__path___frHAs{color:var(--text-primary);text-overflow:ellipsis;white-space:nowrap;max-width:520px;font-weight:700;overflow:hidden}@media (max-width:768px){.LogsPage-module__path___frHAs{flex-basis:100%;max-width:100%}}.LogsPage-module__message___bNHRw{color:var(--text-secondary);word-break:break-word}@media (max-width:768px){.LogsPage-module__message___bNHRw{flex-basis:100%}}@media (max-height:960px) and (min-width:769px){.LogsPage-module__logPanel___2wjiP{min-height:160px;max-height:calc(100vh - 300px)}}@media (max-height:820px){.LogsPage-module__pageTitle___vZY55{font-size:24px}.LogsPage-module__pageHeader___yZbkC,.LogsPage-module__tabBar___bI3hW{margin-bottom:16px}.LogsPage-module__tabItem___5tb4J{padding:10px 16px}.LogsPage-module__content___hGaGn{gap:16px}}@media (max-height:820px) and (min-width:769px){.LogsPage-module__filters___nUahU{overscroll-behavior:contain;flex:none;gap:8px;max-height:260px;margin-bottom:8px;padding-right:4px;overflow:auto}.LogsPage-module__logPanel___2wjiP{min-height:0;max-height:calc(100vh - 280px)}}@media (max-height:820px){.LogsPage-module__logCard___KG4Jd{padding:16px}.LogsPage-module__logRow___rxZS5{padding:8px 10px;font-size:12px}.LogsPage-module__errorPanel___0w-se{height:360px}}@media (max-height:600px){.LogsPage-module__pageTitle___vZY55{font-size:20px}.LogsPage-module__pageHeader___yZbkC,.LogsPage-module__tabBar___bI3hW{margin-bottom:8px}.LogsPage-module__tabItem___5tb4J{padding:8px 12px;font-size:13px}.LogsPage-module__content___hGaGn{gap:8px}.LogsPage-module__filters___nUahU{gap:8px;margin-bottom:8px}}@media (max-height:600px) and (min-width:769px){.LogsPage-module__filters___nUahU{max-height:180px}.LogsPage-module__logPanel___2wjiP{min-height:0;max-height:calc(100vh - 220px)}}@media (max-height:600px){.LogsPage-module__logCard___KG4Jd{padding:8px}.LogsPage-module__logRow___rxZS5{grid-template-columns:130px 1fr;gap:4px;padding:6px 8px;font-size:11px}.LogsPage-module__loadMoreBanner___BUD0t{padding:6px 10px}.LogsPage-module__errorPanel___0w-se{height:280px}}.LogsPage-module__logCardFullscreen___y99Q8{z-index:1999;background:var(--bg-primary);border:none;border-radius:0;width:100vw;height:100vh;min-height:0;padding:24px;position:fixed;top:0;bottom:0;left:0;right:0;overflow:hidden}@media (max-width:768px){.LogsPage-module__logCardFullscreen___y99Q8{min-height:0;padding:16px;overflow:hidden}}body.logs-fullscreen-active .page-transition__layer{transform:none!important}.LogsPage-module__logPanelFullscreen___lHzBV{resize:none;flex:auto;height:auto;min-height:0;max-height:none}@media (min-width:769px) and (max-width:1024px){.LogsPage-module__logPanelFullscreen___lHzBV{min-height:0;max-height:none}}@media (max-width:768px){.LogsPage-module__logPanelFullscreen___lHzBV{flex:auto;height:auto;min-height:0;max-height:none}}.SystemPage-module__container___KAydo{width:100%}.SystemPage-module__pageTitle___DiF5E{color:var(--text-primary);margin:0 0 32px;font-size:28px;font-weight:700}.SystemPage-module__content___SauLn{flex-direction:column;gap:32px;display:flex}.SystemPage-module__aboutCard___v2-ui{overflow:hidden}.SystemPage-module__aboutHeader___hT4-J{flex-direction:column;justify-content:center;align-items:center;gap:16px;width:100%;padding:24px 0 32px;display:flex}.SystemPage-module__aboutLogo___KXoLr{object-fit:cover;border-radius:26px;width:108px;height:108px;box-shadow:0 12px 32px #00000029}.SystemPage-module__aboutTitle___BTLGy{width:min(100%,920px);color:var(--text-primary);letter-spacing:-.02em;text-align:center;text-wrap:balance;white-space:normal;overflow-wrap:anywhere;font-size:clamp(28px,4.2vw,44px);font-weight:800;line-height:1.12}.SystemPage-module__aboutInfoGrid___b7AR0{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;display:grid}@media (max-width:900px){.SystemPage-module__aboutInfoGrid___b7AR0{grid-template-columns:1fr}}.SystemPage-module__infoTile___6AuIY{border:1px solid var(--border-color);background:color-mix(in srgb, var(--bg-secondary) 82%, transparent);text-align:left;border-radius:12px;flex-direction:column;gap:6px;min-height:120px;padding:16px 24px;display:flex}.SystemPage-module__tapTile___-9SaX{border:1px solid var(--border-color);background:color-mix(in srgb, var(--bg-secondary) 82%, transparent);color:inherit;cursor:pointer;padding:16px 24px;transition:transform .18s,border-color .2s,box-shadow .2s}.SystemPage-module__tapTile___-9SaX:hover{border-color:var(--primary-color);transform:translateY(-1px);box-shadow:0 8px 18px #8b86802e}.SystemPage-module__tapTile___-9SaX:active{transform:translateY(0)}.SystemPage-module__tileLabel___eMn4v{color:var(--text-secondary);font-size:13px;font-weight:600}.SystemPage-module__tileHeader___w4Ej0{justify-content:space-between;align-items:flex-start;gap:8px;min-height:40px;display:flex}.SystemPage-module__tileAction___WKXuS{white-space:nowrap;flex-shrink:0;margin:-4px -8px 0 0}.SystemPage-module__tileValue___Up02X{color:var(--text-primary);word-break:break-word;font-size:22px;font-weight:700;line-height:1.25}.SystemPage-module__tileSub___ysVDj{color:var(--text-tertiary);font-size:12px;line-height:1.4}.SystemPage-module__section___Q6rCw{flex-direction:column;gap:16px;display:flex}.SystemPage-module__sectionTitle___GOXpQ{color:var(--text-primary);margin:0 0 16px;font-size:20px;font-weight:600}.SystemPage-module__sectionDescription___nI7Jo{color:var(--text-secondary);margin:0 0 16px;font-size:14px}.SystemPage-module__clearLoginActions___4ek-m{justify-content:flex-end;align-items:center;display:flex}.SystemPage-module__infoGrid___NNFgo{gap:8px;display:grid}.SystemPage-module__infoGrid___NNFgo .SystemPage-module__infoRow___E8Q0J{background-color:var(--bg-secondary);border-radius:8px;justify-content:space-between;padding:8px 16px;display:flex}.SystemPage-module__infoGrid___NNFgo .SystemPage-module__infoRow___E8Q0J .SystemPage-module__label___Xw4tZ{color:var(--text-secondary);font-weight:500}.SystemPage-module__infoGrid___NNFgo .SystemPage-module__infoRow___E8Q0J .SystemPage-module__value___pii6g{color:var(--text-primary);font-family:Consolas,Monaco,Courier New,monospace}.SystemPage-module__modelsList___id54Q{flex-direction:column;gap:8px;max-height:400px;display:flex;overflow-y:auto}.SystemPage-module__modelItem___ZTm4G{background-color:var(--bg-secondary);border-radius:8px;padding:8px 16px;font-family:Consolas,Monaco,Courier New,monospace;font-size:13px}.SystemPage-module__modelItem___ZTm4G:hover{background-color:var(--bg-hover)}.SystemPage-module__modelTags___M0sci{flex-wrap:wrap;flex:0 0 100%;gap:8px;display:flex}.SystemPage-module__groupTitle___bTqIN{align-items:center;gap:8px;display:flex}.SystemPage-module__groupIcon___-XXrb{flex-shrink:0;width:18px;height:18px}.SystemPage-module__modelTag___5Ar53{border:1px solid var(--border-color);background-color:var(--bg-secondary);border-radius:9999px;align-items:center;gap:4px;padding:4px 10px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;display:inline-flex}.SystemPage-module__modelName___LKdAK{color:var(--text-primary);font-weight:600}.SystemPage-module__modelAlias___zioM-{color:var(--text-secondary);font-size:12px}.SystemPage-module__versionCheck___V09h4{flex-direction:column;gap:16px;display:flex}.SystemPage-module__versionInfo___cmujE{grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:16px;display:grid}.SystemPage-module__versionInfo___cmujE .SystemPage-module__versionItem___NmHd7{background-color:var(--bg-secondary);border-radius:8px;padding:16px}.SystemPage-module__versionInfo___cmujE .SystemPage-module__versionItem___NmHd7 .SystemPage-module__label___Xw4tZ{color:var(--text-secondary);margin-bottom:4px;font-size:12px}.SystemPage-module__versionInfo___cmujE .SystemPage-module__versionItem___NmHd7 .SystemPage-module__version___XoIFT{color:var(--text-primary);font-family:Consolas,Monaco,Courier New,monospace;font-size:16px;font-weight:600}.SystemPage-module__quickLinks___QTmT3{grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:16px;display:grid}.SystemPage-module__linkCard___iSrVF{background-color:var(--bg-secondary);border:1px solid var(--border-color);color:inherit;border-radius:12px;align-items:center;gap:16px;padding:16px 24px;text-decoration:none;transition:all .2s;display:flex}.SystemPage-module__linkCard___iSrVF:hover{background-color:var(--bg-hover);border-color:var(--primary-color);transform:translateY(-2px);box-shadow:0 4px 12px #0000001a}.SystemPage-module__linkCard___iSrVF:active{transform:translateY(0)}.SystemPage-module__linkIcon___gNqz2{background-color:var(--primary-color);color:#fff;border-radius:8px;flex-shrink:0;justify-content:center;align-items:center;width:44px;height:44px;display:flex}.SystemPage-module__linkIcon___gNqz2.SystemPage-module__github___V8I3m{background-color:#24292f}.SystemPage-module__linkIcon___gNqz2.SystemPage-module__docs___cA-rG{background-color:#10b981}.SystemPage-module__linkContent___Rfh7h{flex:1;min-width:0}.SystemPage-module__linkTitle___Zpr4Q{color:var(--text-primary);align-items:center;gap:4px;margin-bottom:2px;font-size:15px;font-weight:600;display:flex}.SystemPage-module__linkTitle___Zpr4Q svg{opacity:.5;flex-shrink:0}.SystemPage-module__linkDesc___KKavC{color:var(--text-secondary);white-space:nowrap;text-overflow:ellipsis;font-size:13px;overflow:hidden}@media (max-width:768px){.SystemPage-module__aboutLogo___KXoLr{border-radius:22px;width:92px;height:92px}.SystemPage-module__aboutTitle___BTLGy{letter-spacing:-.012em;width:min(100%,24ch);font-size:clamp(22px,6.6vw,34px);font-weight:700;line-height:1.18}}@media (max-width:520px){.SystemPage-module__aboutTitle___BTLGy{letter-spacing:-.006em;width:min(100%,19ch);font-size:clamp(20px,7.2vw,28px);font-weight:600;line-height:1.22}}
|
||
/*$vite$:1*/</style>
|
||
</head>
|
||
<body>
|
||
<div id="root"></div>
|
||
</body>
|
||
</html>
|