free-coding-models 0.5.22 → 0.5.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6,7 +6,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
|
6
6
|
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{xe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?be(n):``}function Ce(e,t){switch(e.tag){case 26:case 27:case 5:return be(e.type);case 16:return be(`Lazy`);case 13:return e.child!==t&&t!==null?be(`Suspense Fallback`):be(`Suspense`);case 19:return be(`SuspenseList`);case 0:case 15:return Se(e.type,!1);case 11:return Se(e.type.render,!1);case 1:return Se(e.type,!0);case 31:return be(`Activity`);default:return``}}function we(e){try{var t=``,n=null;do t+=Ce(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
7
7
|
Error generating stack: `+e.message+`
|
|
8
8
|
`+e.stack}}var Te=Object.prototype.hasOwnProperty,Ee=t.unstable_scheduleCallback,De=t.unstable_cancelCallback,Oe=t.unstable_shouldYield,ke=t.unstable_requestPaint,Ae=t.unstable_now,je=t.unstable_getCurrentPriorityLevel,Me=t.unstable_ImmediatePriority,Ne=t.unstable_UserBlockingPriority,Pe=t.unstable_NormalPriority,Fe=t.unstable_LowPriority,Ie=t.unstable_IdlePriority,Le=t.log,Re=t.unstable_setDisableYieldValue,ze=null,Be=null;function Ve(e){if(typeof Le==`function`&&Re(e),Be&&typeof Be.setStrictMode==`function`)try{Be.setStrictMode(ze,e)}catch{}}var He=Math.clz32?Math.clz32:Ge,Ue=Math.log,We=Math.LN2;function Ge(e){return e>>>=0,e===0?32:31-(Ue(e)/We|0)|0}var Ke=256,qe=262144,Je=4194304;function Ye(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 Xe(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=Ye(n))):i=Ye(o):i=Ye(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ye(n))):i=Ye(o)):i=Ye(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 Ze(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Qe(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 $e(){var e=Je;return Je<<=1,!(Je&62914560)&&(Je=4194304),e}function et(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function tt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function nt(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-He(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&&rt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function rt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-He(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function it(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-He(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function at(e,t){var n=t&-t;return n=n&42?1:ot(n),(n&(e.suspendedLanes|t))===0?n:0}function ot(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 st(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function ct(){var e=j.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function lt(e,t){var n=j.p;try{return j.p=e,t()}finally{j.p=n}}var ut=Math.random().toString(36).slice(2),dt=`__reactFiber$`+ut,ft=`__reactProps$`+ut,P=`__reactContainer$`+ut,pt=`__reactEvents$`+ut,mt=`__reactListeners$`+ut,ht=`__reactHandles$`+ut,gt=`__reactResources$`+ut,_t=`__reactMarker$`+ut;function vt(e){delete e[dt],delete e[ft],delete e[pt],delete e[mt],delete e[ht]}function yt(e){var t=e[dt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[P]||n[dt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[dt])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function bt(e){if(e=e[dt]||e[P]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function xt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function St(e){var t=e[gt];return t||=e[gt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Ct(e){e[_t]=!0}var wt=new Set,Tt={};function Et(e,t){Dt(e,t),Dt(e+`Capture`,t)}function Dt(e,t){for(Tt[e]=t,e=0;e<t.length;e++)wt.add(t[e])}var Ot=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]*$`),kt={},At={};function jt(e){return Te.call(At,e)?!0:Te.call(kt,e)?!1:Ot.test(e)?At[e]=!0:(kt[e]=!0,!1)}function Mt(e,t,n){if(jt(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 Nt(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 Pt(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 Ft(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function It(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Lt(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 Rt(e){if(!e._valueTracker){var t=It(e)?`checked`:`value`;e._valueTracker=Lt(e,t,``+e[t])}}function zt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=It(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Bt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Vt=/[\n"\\]/g;function Ht(e){return e.replace(Vt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Ut(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=``+Ft(t)):e.value!==``+Ft(t)&&(e.value=``+Ft(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Gt(e,o,Ft(n)):Gt(e,o,Ft(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=``+Ft(s):e.removeAttribute(`name`)}function Wt(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)){Rt(e);return}n=n==null?``:``+Ft(n),t=t==null?n:``+Ft(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Rt(e)}function Gt(e,t,n){t===`number`&&Bt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Kt(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=``+Ft(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 qt(e,t,n){if(t!=null&&(t=``+Ft(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Ft(n)}function Jt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ae(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Ft(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Rt(e)}function Yt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Xt=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 Zt(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||Xt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Qt(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&&Zt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Zt(e,o,t[o])}function $t(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 en=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`]]),tn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function nn(e){return tn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function rn(){}var an=null;function on(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var sn=null,cn=null;function ln(e){var t=bt(e);if(t&&(e=t.stateNode)){var n=e[ft]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Ut(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="`+Ht(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[ft]||null;if(!a)throw Error(i(90));Ut(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&&zt(r)}break a;case`textarea`:qt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Kt(e,!!n.multiple,t,!1)}}}var un=!1;function dn(e,t,n){if(un)return e(t,n);un=!0;try{return e(t)}finally{if(un=!1,(sn!==null||cn!==null)&&(vu(),sn&&(t=sn,e=cn,cn=sn=null,ln(t),e)))for(t=0;t<e.length;t++)ln(e[t])}}function fn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ft]||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 pn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),mn=!1;if(pn)try{var hn={};Object.defineProperty(hn,"passive",{get:function(){mn=!0}}),window.addEventListener(`test`,hn,hn),window.removeEventListener(`test`,hn,hn)}catch{mn=!1}var gn=null,_n=null,vn=null;function yn(){if(vn)return vn;var e,t=_n,n=t.length,r,i=`value`in gn?gn.value:gn.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 vn=i.slice(e,1<r?1-r:void 0)}function bn(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 xn(){return!0}function Sn(){return!1}function Cn(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)?xn:Sn,this.isPropagationStopped=Sn,this}return m(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=xn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=xn)},persist:function(){},isPersistent:xn}),t}var wn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Tn=Cn(wn),En=m({},wn,{view:0,detail:0}),Dn=Cn(En),On,kn,An,jn=m({},En,{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!==An&&(An&&e.type===`mousemove`?(On=e.screenX-An.screenX,kn=e.screenY-An.screenY):kn=On=0,An=e),On)},movementY:function(e){return`movementY`in e?e.movementY:kn}}),Mn=Cn(jn),Nn=Cn(m({},jn,{dataTransfer:0})),Pn=Cn(m({},En,{relatedTarget:0})),Fn=Cn(m({},wn,{animationName:0,elapsedTime:0,pseudoElement:0})),In=Cn(m({},wn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),F=Cn(m({},wn,{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=Cn(m({},En,{key:function(e){if(e.key){var t=Ln[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=bn(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`?bn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?bn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Un=Cn(m({},jn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Wn=Cn(m({},En,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Vn})),Gn=Cn(m({},wn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Kn=Cn(m({},jn,{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=Cn(m({},wn,{newState:0,oldState:0})),Jn=[9,13,27,32],Yn=pn&&`CompositionEvent`in window,Xn=null;pn&&`documentMode`in document&&(Xn=document.documentMode);var Zn=pn&&`TextEvent`in window&&!Xn,Qn=pn&&(!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=yn(),vn=_n=gn=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){sn?cn?cn.push(r):cn=[r]:sn=r,t=Td(t,`onChange`),0<t.length&&(n=new Tn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var lr=null,ur=null;function dr(e){vd(e,0)}function fr(e){if(zt(xt(e)))return e}function pr(e,t){if(e===`change`)return t}var mr=!1;if(pn){var hr;if(pn){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,on(e)),dn(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(!Te.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=Bt(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=Bt(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=pn&&`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!==Bt(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=Td(Pr,`onSelect`),0<r.length&&(t=new Tn(`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={};pn&&(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,I=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);I.push(`scrollEnd`);function Zr(e,t){Xr.set(e,t),Et(t,[e])}var L=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)},Qr=[],$r=0,ei=0;function ti(){for(var e=$r,t=ei=$r=0;t<e;){var n=Qr[t];Qr[t++]=null;var r=Qr[t];Qr[t++]=null;var i=Qr[t];Qr[t++]=null;var a=Qr[t];if(Qr[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&&ai(n,i,a)}}function ni(e,t,n,r){Qr[$r++]=e,Qr[$r++]=t,Qr[$r++]=n,Qr[$r++]=r,ei|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ri(e,t,n,r){return ni(e,t,n,r),oi(e)}function ii(e,t){return ni(e,null,null,t),oi(e)}function ai(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-He(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function oi(e){if(50<lu)throw lu=0,uu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var si={};function ci(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 li(e,t,n,r){return new ci(e,t,n,r)}function ui(e){return e=e.prototype,!(!e||!e.isReactComponent)}function di(e,t){var n=e.alternate;return n===null?(n=li(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 fi(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 pi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ui(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,ue.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case ee:return e=li(31,n,t,a),e.elementType=ee,e.lanes=o,e;case y:return mi(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=li(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=li(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=li(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=li(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function mi(e,t,n,r){return e=li(7,e,r,t),e.lanes=n,e}function hi(e,t,n){return e=li(6,e,null,t),e.lanes=n,e}function gi(e){var t=li(18,null,null,0);return t.stateNode=e,t}function _i(e,t,n){return t=li(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var vi=new WeakMap;function yi(e,t){if(typeof e==`object`&&e){var n=vi.get(e);return n===void 0?(t={value:e,source:t,stack:we(t)},vi.set(e,t),t):n}return{value:e,source:t,stack:we(t)}}var bi=[],xi=0,Si=null,Ci=0,wi=[],Ti=0,Ei=null,Di=1,Oi=``;function ki(e,t){bi[xi++]=Ci,bi[xi++]=Si,Si=e,Ci=t}function Ai(e,t,n){wi[Ti++]=Di,wi[Ti++]=Oi,wi[Ti++]=Ei,Ei=e;var r=Di;e=Oi;var i=32-He(r)-1;r&=~(1<<i),n+=1;var a=32-He(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Di=1<<32-He(t)+i|n<<i|r,Oi=a+e}else Di=1<<a|n<<i|r,Oi=e}function ji(e){e.return!==null&&(ki(e,1),Ai(e,1,0))}function Mi(e){for(;e===Si;)Si=bi[--xi],bi[xi]=null,Ci=bi[--xi],bi[xi]=null;for(;e===Ei;)Ei=wi[--Ti],wi[Ti]=null,Oi=wi[--Ti],wi[Ti]=null,Di=wi[--Ti],wi[Ti]=null}function Ni(e,t){wi[Ti++]=Di,wi[Ti++]=Oi,wi[Ti++]=Ei,Di=t.id,Oi=t.overflow,Ei=e}var Pi=null,Fi=null,R=!1,Ii=null,Li=!1,Ri=Error(i(519));function zi(e){throw Gi(yi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ri}function Bi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[dt]=e,t[ft]=r,n){case`dialog`:$(`cancel`,t),$(`close`,t);break;case`iframe`:case`object`:case`embed`:$(`load`,t);break;case`video`:case`audio`:for(n=0;n<gd.length;n++)$(gd[n],t);break;case`source`:$(`error`,t);break;case`img`:case`image`:case`link`:$(`error`,t),$(`load`,t);break;case`details`:$(`toggle`,t);break;case`input`:$(`invalid`,t),Wt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:$(`invalid`,t);break;case`textarea`:$(`invalid`,t),Jt(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||jd(t.textContent,n)?(r.popover!=null&&($(`beforetoggle`,t),$(`toggle`,t)),r.onScroll!=null&&$(`scroll`,t),r.onScrollEnd!=null&&$(`scrollend`,t),r.onClick!=null&&(t.onclick=rn),t=!0):t=!1,t||zi(e,!0)}function Vi(e){for(Pi=e.return;Pi;)switch(Pi.tag){case 5:case 31:case 13:Li=!1;return;case 27:case 3:Li=!0;return;default:Pi=Pi.return}}function Hi(e){if(e!==Pi)return!1;if(!R)return Vi(e),R=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Ud(e.type,e.memoizedProps)),n=!n),n&&Fi&&zi(e),Vi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Fi=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Fi=uf(e)}else t===27?(t=Fi,Zd(e.type)?(e=lf,lf=null,Fi=e):Fi=t):Fi=Pi?cf(e.stateNode.nextSibling):null;return!0}function Ui(){Fi=Pi=null,R=!1}function Wi(){var e=Ii;return e!==null&&(Yl===null?Yl=e:Yl.push.apply(Yl,e),Ii=null),e}function Gi(e){Ii===null?Ii=[e]:Ii.push(e)}var Ki=M(null),qi=null,Ji=null;function z(e,t,n){N(Ki,t._currentValue),t._currentValue=n}function Yi(e){e._currentValue=Ki.current,le(Ki)}function Xi(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 Zi(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),Xi(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),Xi(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 Qi(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===pe.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}a=a.return}e!==null&&Zi(t,e,n,r),t.flags|=262144}function $i(e){for(e=e.firstContext;e!==null;){if(!Tr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ea(e){qi=e,Ji=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ta(e){return ra(qi,e)}function na(e,t){return qi===null&&ea(e),ra(e,t)}function ra(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Ji===null){if(e===null)throw Error(i(308));Ji=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ji=Ji.next=t;return n}var ia=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},aa=t.unstable_scheduleCallback,oa=t.unstable_NormalPriority,sa={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ca(){return{controller:new ia,data:new Map,refCount:0}}function la(e){e.refCount--,e.refCount===0&&aa(oa,function(){e.controller.abort()})}var B=null,V=0,ua=0,da=null;function fa(e,t){if(B===null){var n=B=[];V=0,ua=ud(),da={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return V++,t.then(pa,pa),t}function pa(){if(--V===0&&B!==null){da!==null&&(da.status=`fulfilled`);var e=B;B=null,ua=0,da=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ma(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 ha=A.S;A.S=function(e,t){Ql=Ae(),typeof t==`object`&&t&&typeof t.then==`function`&&fa(e,t),ha!==null&&ha(e,t)};var ga=M(null);function _a(){var e=ga.current;return e===null?Fl.pooledCache:e}function va(e,t){t===null?N(ga,ga.current):N(ga,t.pool)}function ya(){var e=_a();return e===null?null:{parent:sa._currentValue,pool:e}}var ba=Error(i(460)),xa=Error(i(474)),Sa=Error(i(542)),Ca={then:function(){}};function wa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ta(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(rn,rn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ka(e),e;default:if(typeof t.status==`string`)t.then(rn,rn);else{if(e=Fl,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,ka(e),e}throw Da=t,ba}}function Ea(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Da=e,ba):e}}var Da=null;function Oa(){if(Da===null)throw Error(i(459));var e=Da;return Da=null,e}function ka(e){if(e===ba||e===Sa)throw Error(i(483))}var Aa=null,ja=0;function Ma(e){var t=ja;return ja+=1,Aa===null&&(Aa=[]),Ta(Aa,e,t)}function Na(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Pa(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Fa(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=di(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=hi(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&&Ea(i)===t.type)?(t=a(t,n.props),Na(t,n),t.return=e,t):(t=pi(n.type,n.key,n.props,null,e.mode,r),Na(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=_i(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=mi(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=hi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=pi(t.type,t.key,t.props,null,e.mode,n),Na(n,t),n.return=e,n;case v:return t=_i(t,e.mode,n),t.return=e,t;case O:return t=Ea(t),f(e,t,n)}if(ae(t)||ne(t))return t=mi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ma(t),n);if(t.$$typeof===C)return f(e,na(e,t),n);Pa(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=Ea(n),p(e,t,n,r)}if(ae(n)||ne(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ma(n),r);if(n.$$typeof===C)return p(e,t,na(e,n),r);Pa(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=Ea(r),m(e,t,n,r,i)}if(ae(r)||ne(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Ma(r),i);if(r.$$typeof===C)return m(e,t,n,na(t,r),i);Pa(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),R&&ki(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return R&&ki(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(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)}),R&&ki(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),R&&ki(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return R&&ki(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(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)}),R&&ki(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&&Ea(l)===r.type){n(e,r.sibling),c=a(r,o.props),Na(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=mi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=pi(o.type,o.key,o.props,null,e.mode,c),Na(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=_i(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Ea(o),b(e,r,o,c)}if(ae(o))return h(e,r,o,c);if(ne(o)){if(l=ne(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,Ma(o),c);if(o.$$typeof===C)return b(e,r,na(e,o),c);Pa(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=hi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{ja=0;var i=b(e,t,n,r);return Aa=null,i}catch(t){if(t===ba||t===Sa)throw t;var a=li(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ia=Fa(!0),La=Fa(!1),Ra=!1;function za(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ba(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 Va(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ha(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Pl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=oi(e),ai(e,null,n),t}return ni(e,r,t,n),oi(e)}function Ua(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,it(e,n)}}function Wa(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 Ga=!1;function Ka(){if(Ga){var e=da;if(e!==null)throw e}}function qa(e,t,n,r){Ga=!1;var i=e.updateQueue;Ra=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Q&f)===f:(r&f)===f){f!==0&&f===ua&&(Ga=!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=m({},d,f);break a;case 2:Ra=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Ul|=o,e.lanes=o,e.memoizedState=d}}function Ja(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ya(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ja(n[e],t)}var Xa=M(null),Za=M(0);function Qa(e,t){e=Vl,N(Za,e),N(Xa,t),Vl=e|t.baseLanes}function $a(){N(Za,Vl),N(Xa,Xa.current)}function eo(){Vl=Za.current,le(Xa),le(Za)}var to=M(null),no=null;function ro(e){var t=e.alternate;N(co,co.current&1),N(to,e),no===null&&(t===null||Xa.current!==null||t.memoizedState!==null)&&(no=e)}function io(e){N(co,co.current),N(to,e),no===null&&(no=e)}function ao(e){e.tag===22?(N(co,co.current),N(to,e),no===null&&(no=e)):oo(e)}function oo(){N(co,co.current),N(to,to.current)}function so(e){le(to),no===e&&(no=null),le(co)}var co=M(0);function lo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(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 uo=0,H=null,fo=null,po=null,mo=!1,ho=!1,go=!1,_o=0,vo=0,yo=null,bo=0;function xo(){throw Error(i(321))}function So(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 Co(e,t,n,r,i,a){return uo=a,H=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,A.H=e===null||e.memoizedState===null?Rs:zs,go=!1,a=n(r,i),go=!1,ho&&(a=To(t,n,r,i)),wo(e),a}function wo(e){A.H=Ls;var t=fo!==null&&fo.next!==null;if(uo=0,po=fo=H=null,mo=!1,vo=0,yo=null,t)throw Error(i(300));e===null||$s||(e=e.dependencies,e!==null&&$i(e)&&($s=!0))}function To(e,t,n,r){H=e;var a=0;do{if(ho&&(yo=null),vo=0,ho=!1,25<=a)throw Error(i(301));if(a+=1,po=fo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}A.H=Bs,o=t(n,r)}while(ho);return o}function Eo(){var e=A.H,t=e.useState()[0];return t=typeof t.then==`function`?No(t):t,e=e.useState()[0],(fo===null?null:fo.memoizedState)!==e&&(H.flags|=1024),t}function Do(){var e=_o!==0;return _o=0,e}function Oo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ko(e){if(mo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}mo=!1}uo=0,po=fo=H=null,ho=!1,vo=_o=0,yo=null}function Ao(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return po===null?H.memoizedState=po=e:po=po.next=e,po}function jo(){if(fo===null){var e=H.alternate;e=e===null?null:e.memoizedState}else e=fo.next;var t=po===null?H.memoizedState:po.next;if(t!==null)po=t,fo=e;else{if(e===null)throw H.alternate===null?Error(i(467)):Error(i(310));fo=e,e={memoizedState:fo.memoizedState,baseState:fo.baseState,baseQueue:fo.baseQueue,queue:fo.queue,next:null},po===null?H.memoizedState=po=e:po=po.next=e}return po}function Mo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function No(e){var t=vo;return vo+=1,yo===null&&(yo=[]),e=Ta(yo,e,t),t=H,(po===null?t.memoizedState:po.next)===null&&(t=t.alternate,A.H=t===null||t.memoizedState===null?Rs:zs),e}function Po(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return No(e);if(e.$$typeof===C)return ta(e)}throw Error(i(438,String(e)))}function Fo(e){var t=null,n=H.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=H.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Mo(),H.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]=te;return t.index++,n}function Io(e,t){return typeof t==`function`?t(e):t}function Lo(e){return Ro(jo(),fo,e)}function Ro(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?(uo&f)===f:(Q&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ua&&(d=!0);else if((uo&p)===p){u=u.next,p===ua&&(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,H.lanes|=p,Ul|=p;f=u.action,go&&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,H.lanes|=f,Ul|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Tr(o,e.memoizedState)&&($s=!0,d&&(n=da,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 zo(e){var t=jo(),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)||($s=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Bo(e,t,n){var r=H,a=jo(),o=R;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Tr((fo||a).memoizedState,n);if(s&&(a.memoizedState=n,$s=!0),a=a.queue,ds(Uo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||po!==null&&po.memoizedState.tag&1){if(r.flags|=2048,os(9,{destroy:void 0},Ho.bind(null,r,a,n,t),null),Fl===null)throw Error(i(349));o||uo&127||Vo(r,t,n)}return n}function Vo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=H.updateQueue,t===null?(t=Mo(),H.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ho(e,t,n,r){t.value=n,t.getSnapshot=r,Wo(t)&&Go(e)}function Uo(e,t,n){return n(function(){Wo(t)&&Go(e)})}function Wo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Tr(e,n)}catch{return!0}}function Go(e){var t=ii(e,2);t!==null&&pu(t,e,2)}function Ko(e){var t=Ao();if(typeof e==`function`){var n=e;if(e=n(),go){Ve(!0);try{n()}finally{Ve(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:e},t}function qo(e,t,n,r){return e.baseState=n,Ro(e,fo,typeof r==`function`?r:Io)}function Jo(e,t,n,r,a){if(Ps(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)}};A.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Yo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Yo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=A.T,o={};A.T=o;try{var s=n(i,r),c=A.S;c!==null&&c(o,s),Xo(e,t,s)}catch(n){Qo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),A.T=a}}else try{a=n(i,r),Xo(e,t,a)}catch(n){Qo(e,t,n)}}function Xo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Zo(e,t,n)},function(n){return Qo(e,t,n)}):Zo(e,t,n)}function Zo(e,t,n){t.status=`fulfilled`,t.value=n,$o(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Yo(e,n)))}function Qo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,$o(t),t=t.next;while(t!==r)}e.action=null}function $o(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function es(e,t){return t}function ts(e,t){if(R){var n=Fl.formState;if(n!==null){a:{var r=H;if(R){if(Fi){b:{for(var i=Fi,a=Li;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Fi=cf(i.nextSibling),r=i.data===`F!`;break a}}zi(r)}r=!1}r&&(t=n[0])}}return n=Ao(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:es,lastRenderedState:t},n.queue=r,n=js.bind(null,H,r),r.dispatch=n,r=Ko(!1),a=Ns.bind(null,H,!1,r.queue),r=Ao(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Jo.bind(null,H,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ns(e){return rs(jo(),fo,e)}function rs(e,t,n){if(t=Ro(e,t,es)[0],e=Lo(Io)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=No(t)}catch(e){throw e===ba?Sa:e}else r=t;t=jo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(H.flags|=2048,os(9,{destroy:void 0},is.bind(null,i,n),null)),[r,a,e]}function is(e,t){e.action=t}function as(e){var t=jo(),n=fo;if(n!==null)return rs(t,n,e);jo(),t=t.memoizedState,n=jo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function os(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=H.updateQueue,t===null&&(t=Mo(),H.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 ss(){return jo().memoizedState}function cs(e,t,n,r){var i=Ao();H.flags|=e,i.memoizedState=os(1|t,{destroy:void 0},n,r===void 0?null:r)}function ls(e,t,n,r){var i=jo();r=r===void 0?null:r;var a=i.memoizedState.inst;fo!==null&&r!==null&&So(r,fo.memoizedState.deps)?i.memoizedState=os(t,a,n,r):(H.flags|=e,i.memoizedState=os(1|t,a,n,r))}function us(e,t){cs(8390656,8,e,t)}function ds(e,t){ls(2048,8,e,t)}function fs(e){H.flags|=4;var t=H.updateQueue;if(t===null)t=Mo(),H.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ps(e){var t=jo().memoizedState;return fs({ref:t,nextImpl:e}),function(){if(Pl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ms(e,t){return ls(4,2,e,t)}function hs(e,t){return ls(4,4,e,t)}function gs(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 _s(e,t,n){n=n==null?null:n.concat([e]),ls(4,4,gs.bind(null,t,e),n)}function vs(){}function U(e,t){var n=jo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&So(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ys(e,t){var n=jo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&So(t,r[1]))return r[0];if(r=e(),go){Ve(!0);try{e()}finally{Ve(!1)}}return n.memoizedState=[r,t],r}function bs(e,t,n){return n===void 0||uo&1073741824&&!(Q&261930)?e.memoizedState=t:(e.memoizedState=n,e=fu(),H.lanes|=e,Ul|=e,n)}function W(e,t,n,r){return Tr(n,t)?n:Xa.current===null?!(uo&42)||uo&1073741824&&!(Q&261930)?($s=!0,e.memoizedState=n):(e=fu(),H.lanes|=e,Ul|=e,t):(e=bs(e,n,r),Tr(e,t)||($s=!0),e)}function xs(e,t,n,r,i){var a=j.p;j.p=a!==0&&8>a?a:8;var o=A.T,s={};A.T=s,Ns(e,!1,t,n);try{var c=i(),l=A.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ms(e,t,ma(c,r),du(e)):Ms(e,t,r,du(e))}catch(n){Ms(e,t,{then:function(){},status:`rejected`,reason:n},du())}finally{j.p=a,o!==null&&s.types!==null&&(o.types=s.types),A.T=o}}function Ss(){}function Cs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=ws(e).queue;xs(e,a,t,oe,n===null?Ss:function(){return Ts(e),n(r)})}function ws(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:oe,baseState:oe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:oe},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ts(e){var t=ws(e);t.next===null&&(t=e.alternate.memoizedState),Ms(e,t.next.queue,{},du())}function Es(){return ta(Qf)}function Ds(){return jo().memoizedState}function Os(){return jo().memoizedState}function ks(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=du();e=Va(n);var r=Ha(t,e,n);r!==null&&(pu(r,t,n),Ua(r,t,n)),t={cache:ca()},e.payload=t;return}t=t.return}}function As(e,t,n){var r=du();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ps(e)?Fs(t,n):(n=ri(e,t,n,r),n!==null&&(pu(n,e,r),Is(n,t,r)))}function js(e,t,n){Ms(e,t,n,du())}function Ms(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ps(e))Fs(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 ni(e,t,i,0),Fl===null&&ti(),!1}catch{}if(n=ri(e,t,i,r),n!==null)return pu(n,e,r),Is(n,t,r),!0}return!1}function Ns(e,t,n,r){if(r={lane:2,revertLane:ud(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ps(e)){if(t)throw Error(i(479))}else t=ri(e,n,r,2),t!==null&&pu(t,e,2)}function Ps(e){var t=e.alternate;return e===H||t!==null&&t===H}function Fs(e,t){ho=mo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Is(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,it(e,n)}}var Ls={readContext:ta,use:Po,useCallback:xo,useContext:xo,useEffect:xo,useImperativeHandle:xo,useLayoutEffect:xo,useInsertionEffect:xo,useMemo:xo,useReducer:xo,useRef:xo,useState:xo,useDebugValue:xo,useDeferredValue:xo,useTransition:xo,useSyncExternalStore:xo,useId:xo,useHostTransitionStatus:xo,useFormState:xo,useActionState:xo,useOptimistic:xo,useMemoCache:xo,useCacheRefresh:xo};Ls.useEffectEvent=xo;var Rs={readContext:ta,use:Po,useCallback:function(e,t){return Ao().memoizedState=[e,t===void 0?null:t],e},useContext:ta,useEffect:us,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),cs(4194308,4,gs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return cs(4194308,4,e,t)},useInsertionEffect:function(e,t){cs(4,2,e,t)},useMemo:function(e,t){var n=Ao();t=t===void 0?null:t;var r=e();if(go){Ve(!0);try{e()}finally{Ve(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Ao();if(n!==void 0){var i=n(t);if(go){Ve(!0);try{n(t)}finally{Ve(!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=As.bind(null,H,e),[r.memoizedState,e]},useRef:function(e){var t=Ao();return e={current:e},t.memoizedState=e},useState:function(e){e=Ko(e);var t=e.queue,n=js.bind(null,H,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:vs,useDeferredValue:function(e,t){return bs(Ao(),e,t)},useTransition:function(){var e=Ko(!1);return e=xs.bind(null,H,e.queue,!0,!1),Ao().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=H,a=Ao();if(R){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Fl===null)throw Error(i(349));Q&127||Vo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,us(Uo.bind(null,r,o,e),[e]),r.flags|=2048,os(9,{destroy:void 0},Ho.bind(null,r,o,n,t),null),n},useId:function(){var e=Ao(),t=Fl.identifierPrefix;if(R){var n=Oi,r=Di;n=(r&~(1<<32-He(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=_o++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=bo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Es,useFormState:ts,useActionState:ts,useOptimistic:function(e){var t=Ao();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ns.bind(null,H,!0,n),n.dispatch=t,[e,t]},useMemoCache:Fo,useCacheRefresh:function(){return Ao().memoizedState=ks.bind(null,H)},useEffectEvent:function(e){var t=Ao(),n={impl:e};return t.memoizedState=n,function(){if(Pl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},zs={readContext:ta,use:Po,useCallback:U,useContext:ta,useEffect:ds,useImperativeHandle:_s,useInsertionEffect:ms,useLayoutEffect:hs,useMemo:ys,useReducer:Lo,useRef:ss,useState:function(){return Lo(Io)},useDebugValue:vs,useDeferredValue:function(e,t){return W(jo(),fo.memoizedState,e,t)},useTransition:function(){var e=Lo(Io)[0],t=jo().memoizedState;return[typeof e==`boolean`?e:No(e),t]},useSyncExternalStore:Bo,useId:Ds,useHostTransitionStatus:Es,useFormState:ns,useActionState:ns,useOptimistic:function(e,t){return qo(jo(),fo,e,t)},useMemoCache:Fo,useCacheRefresh:Os};zs.useEffectEvent=ps;var Bs={readContext:ta,use:Po,useCallback:U,useContext:ta,useEffect:ds,useImperativeHandle:_s,useInsertionEffect:ms,useLayoutEffect:hs,useMemo:ys,useReducer:zo,useRef:ss,useState:function(){return zo(Io)},useDebugValue:vs,useDeferredValue:function(e,t){var n=jo();return fo===null?bs(n,e,t):W(n,fo.memoizedState,e,t)},useTransition:function(){var e=zo(Io)[0],t=jo().memoizedState;return[typeof e==`boolean`?e:No(e),t]},useSyncExternalStore:Bo,useId:Ds,useHostTransitionStatus:Es,useFormState:as,useActionState:as,useOptimistic:function(e,t){var n=jo();return fo===null?(n.baseState=e,[e,n.queue.dispatch]):qo(n,fo,e,t)},useMemoCache:Fo,useCacheRefresh:Os};Bs.useEffectEvent=ps;function Vs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:m({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Hs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=du(),i=Va(r);i.payload=t,n!=null&&(i.callback=n),t=Ha(e,i,r),t!==null&&(pu(t,e,r),Ua(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=du(),i=Va(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ha(e,i,r),t!==null&&(pu(t,e,r),Ua(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=du(),r=Va(n);r.tag=2,t!=null&&(r.callback=t),t=Ha(e,r,n),t!==null&&(pu(t,e,n),Ua(t,e,n))}};function G(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 Us(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&&Hs.enqueueReplaceState(t,t.state,null)}function Ws(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=m({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Gs(e){L(e)}function Ks(e){console.error(e)}function K(e){L(e)}function qs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Js(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 q(e,t,n){return n=Va(n),n.tag=3,n.payload={element:null},n.callback=function(){qs(e,t)},n}function Ys(e){return e=Va(e),e.tag=3,e}function Xs(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(){Js(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Js(t,n,r),typeof i!=`function`&&(tu===null?tu=new Set([this]):tu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Zs(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Qi(t,n,a,!0),n=to.current,n!==null){switch(n.tag){case 31:case 13:return no===null?Tu():n.alternate===null&&Hl===0&&(Hl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ca?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Wu(e,r,a)),!1;case 22:return n.flags|=65536,r===Ca?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)),Wu(e,r,a)),!1}throw Error(i(435,n.tag))}return Wu(e,r,a),Tu(),!1}if(R)return t=to.current,t===null?(r!==Ri&&(t=Error(i(423),{cause:r}),Gi(yi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=yi(r,n),a=q(e.stateNode,r,a),Wa(e,a),Hl!==4&&(Hl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Ri&&(e=Error(i(422),{cause:r}),Gi(yi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=yi(o,n),Jl===null?Jl=[o]:Jl.push(o),Hl!==4&&(Hl=2),t===null)return!0;r=yi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=q(n.stateNode,r,e),Wa(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`&&(tu===null||!tu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Ys(a),Xs(a,e,n,r),Wa(n,a),!1}n=n.return}while(n!==null);return!1}var Qs=Error(i(461)),$s=!1;function ec(e,t,n,r){t.child=e===null?La(t,null,n,r):Ia(t,e.child,n,r)}function tc(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 ea(t),r=Co(e,t,n,o,a,i),s=Do(),e!==null&&!$s?(Oo(e,t,i),Tc(e,t,i)):(R&&s&&ji(t),t.flags|=1,ec(e,t,r,i),t.child)}function nc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ui(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,rc(e,t,a,r,i)):(e=pi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Ec(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Er:n,n(o,r)&&e.ref===t.ref)return Tc(e,t,i)}return t.flags|=1,e=di(a,r),e.ref=t.ref,e.return=t,t.child=e}function rc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Er(a,r)&&e.ref===t.ref)if($s=!1,t.pendingProps=r=a,Ec(e,i))e.flags&131072&&($s=!0);else return t.lanes=e.lanes,Tc(e,t,i)}return dc(e,t,n,r,i)}function ic(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 oc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&va(t,a===null?null:a.cachePool),a===null?$a():Qa(t,a),ao(t);else return r=t.lanes=536870912,oc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&va(t,null),$a(),oo(t)):(va(t,a.cachePool),Qa(t,a),oo(t),t.memoizedState=null);return ec(e,t,i,n),t.child}function ac(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function oc(e,t,n,r,i){var a=_a();return a=a===null?null:{parent:sa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&va(t,null),$a(),ao(t),e!==null&&Qi(e,t,r,!0),t.childLanes=i,null}function sc(e,t){return t=bc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function cc(e,t,n){return Ia(t,e.child,null,n),e=sc(t,t.pendingProps),e.flags|=2,so(t),t.memoizedState=null,e}function lc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(R){if(r.mode===`hidden`)return e=sc(t,r),t.lanes=536870912,ac(null,e);if(io(t),(e=Fi)?(e=rf(e,Li),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ei===null?null:{id:Di,overflow:Oi},retryLane:536870912,hydrationErrors:null},n=gi(e),n.return=t,t.child=n,Pi=t,Fi=null)):e=null,e===null)throw zi(t);return t.lanes=536870912,null}return sc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(io(t),a)if(t.flags&256)t.flags&=-257,t=cc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if($s||Qi(e,t,n,!1),a=(n&e.childLanes)!==0,$s||a){if(r=Fl,r!==null&&(s=at(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ii(e,s),pu(r,e,s),Qs;Tu(),t=cc(e,t,n)}else e=o.treeContext,Fi=cf(s.nextSibling),Pi=t,R=!0,Ii=null,Li=!1,e!==null&&Ni(t,e),t=sc(t,r),t.flags|=4096;return t}return e=di(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function uc(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 dc(e,t,n,r,i){return ea(t),n=Co(e,t,n,r,void 0,i),r=Do(),e!==null&&!$s?(Oo(e,t,i),Tc(e,t,i)):(R&&r&&ji(t),t.flags|=1,ec(e,t,n,i),t.child)}function fc(e,t,n,r,i,a){return ea(t),t.updateQueue=null,n=To(t,r,n,i),wo(e),r=Do(),e!==null&&!$s?(Oo(e,t,a),Tc(e,t,a)):(R&&r&&ji(t),t.flags|=1,ec(e,t,n,a),t.child)}function pc(e,t,n,r,i){if(ea(t),t.stateNode===null){var a=si,o=n.contextType;typeof o==`object`&&o&&(a=ta(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Hs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},za(t),o=n.contextType,a.context=typeof o==`object`&&o?ta(o):si,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Vs(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&&Hs.enqueueReplaceState(a,a.state,null),qa(t,r,a,i),Ka(),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=Ws(n,s);a.props=c;var l=a.context,u=n.contextType;o=si,typeof u==`object`&&u&&(o=ta(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)&&Us(t,a,r,o),Ra=!1;var f=t.memoizedState;a.state=f,qa(t,r,a,i),Ka(),l=t.memoizedState,s||f!==l||Ra?(typeof d==`function`&&(Vs(t,n,d,r),l=t.memoizedState),(c=Ra||G(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,Ba(e,t),o=t.memoizedProps,u=Ws(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=si,typeof l==`object`&&l&&(c=ta(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)&&Us(t,a,r,c),Ra=!1,f=t.memoizedState,a.state=f,qa(t,r,a,i),Ka();var p=t.memoizedState;o!==d||f!==p||Ra||e!==null&&e.dependencies!==null&&$i(e.dependencies)?(typeof s==`function`&&(Vs(t,n,s,r),p=t.memoizedState),(u=Ra||G(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&$i(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,uc(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=Ia(t,e.child,null,i),t.child=Ia(t,null,n,i)):ec(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Tc(e,t,i),e}function mc(e,t,n,r){return Ui(),t.flags|=256,ec(e,t,n,r),t.child}var hc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gc(e){return{baseLanes:e,cachePool:ya()}}function _c(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Kl),e}function vc(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:(co.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(R){if(a?ro(t):oo(t),(e=Fi)?(e=rf(e,Li),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ei===null?null:{id:Di,overflow:Oi},retryLane:536870912,hydrationErrors:null},n=gi(e),n.return=t,t.child=n,Pi=t,Fi=null)):e=null,e===null)throw zi(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(oo(t),a=t.mode,c=bc({mode:`hidden`,children:c},a),r=mi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=gc(n),r.childLanes=_c(e,s,n),t.memoizedState=hc,ac(null,r)):(ro(t),yc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(ro(t),t.flags&=-257,t=xc(e,t,n)):t.memoizedState===null?(oo(t),c=r.fallback,a=t.mode,r=bc({mode:`visible`,children:r.children},a),c=mi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ia(t,e.child,null,n),r=t.child,r.memoizedState=gc(n),r.childLanes=_c(e,s,n),t.memoizedState=hc,t=ac(null,r)):(oo(t),t.child=e.child,t.flags|=128,t=null);else if(ro(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Gi({value:r,source:null,stack:null}),t=xc(e,t,n)}else if($s||Qi(e,t,n,!1),s=(n&e.childLanes)!==0,$s||s){if(s=Fl,s!==null&&(r=at(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ii(e,r),pu(s,e,r),Qs;af(c)||Tu(),t=xc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Fi=cf(c.nextSibling),Pi=t,R=!0,Ii=null,Li=!1,e!==null&&Ni(t,e),t=yc(t,r.children),t.flags|=4096);return t}return a?(oo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=di(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=mi(c,a,n,null),c.flags|=2):c=di(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,ac(null,r),r=t.child,c=e.child.memoizedState,c===null?c=gc(n):(a=c.cachePool,a===null?a=ya():(l=sa._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=_c(e,s,n),t.memoizedState=hc,ac(e.child,r)):(ro(t),n=e.child,e=n.sibling,n=di(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 yc(e,t){return t=bc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function bc(e,t){return e=li(22,e,null,t),e.lanes=0,e}function xc(e,t,n){return Ia(t,e.child,null,n),e=yc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Sc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Xi(e.return,t,n)}function Cc(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 wc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=co.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,N(co,o),ec(e,t,r,n),r=R?Ci:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Sc(e,n,t);else if(e.tag===19)Sc(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&&lo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Cc(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&&lo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Cc(t,!0,n,null,a,r);break;case`together`:Cc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Tc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ul|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Qi(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=di(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=di(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ec(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&$i(e))):!0}function Dc(e,t,n){switch(t.tag){case 3:me(t,t.stateNode.containerInfo),z(t,sa,e.memoizedState.cache),Ui();break;case 27:case 5:ge(t);break;case 4:me(t,t.stateNode.containerInfo);break;case 10:z(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,io(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(ro(t),e=Tc(e,t,n),e===null?null:e.sibling):vc(e,t,n):(ro(t),t.flags|=128,null);ro(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Qi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return wc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),N(co,co.current),r)break;return null;case 22:return t.lanes=0,ic(e,t,n,t.pendingProps);case 24:z(t,sa,e.memoizedState.cache)}return Tc(e,t,n)}function Oc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)$s=!0;else{if(!Ec(e,n)&&!(t.flags&128))return $s=!1,Dc(e,t,n);$s=!!(e.flags&131072)}else $s=!1,R&&t.flags&1048576&&Ai(t,Ci,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ea(t.elementType),t.type=e,typeof e==`function`)ui(e)?(r=Ws(e,r),t.tag=1,t=pc(null,t,e,r,n)):(t.tag=0,t=dc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=tc(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=nc(null,t,e,r,n);break a}}throw t=ie(e)||e,Error(i(306,t,``))}}return t;case 0:return dc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Ws(r,t.pendingProps),pc(e,t,r,a,n);case 3:a:{if(me(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ba(e,t),qa(t,r,null,n);var s=t.memoizedState;if(r=s.cache,z(t,sa,r),r!==o.cache&&Zi(t,[sa],n,!0),Ka(),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=mc(e,t,r,n);break a}else if(r!==a){a=yi(Error(i(424)),t),Gi(a),t=mc(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(Fi=cf(e.firstChild),Pi=t,R=!0,Ii=null,Li=!0,n=La(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ui(),r===a){t=Tc(e,t,n);break a}ec(e,t,r,n)}t=t.child}return t;case 26:return uc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:R||(n=t.type,e=t.pendingProps,r=Bd(fe.current).createElement(n),r[dt]=t,r[ft]=e,Pd(r,n,e),Ct(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ge(t),e===null&&R&&(r=t.stateNode=ff(t.type,t.pendingProps,fe.current),Pi=t,Li=!0,a=Fi,Zd(t.type)?(lf=a,Fi=cf(r.firstChild)):Fi=a),ec(e,t,t.pendingProps.children,n),uc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&R&&((a=r=Fi)&&(r=tf(r,t.type,t.pendingProps,Li),r===null?a=!1:(t.stateNode=r,Pi=t,Fi=cf(r.firstChild),Li=!1,a=!0)),a||zi(t)),ge(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ud(a,o)?r=null:s!==null&&Ud(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Co(e,t,Eo,null,null,n),Qf._currentValue=a),uc(e,t),ec(e,t,r,n),t.child;case 6:return e===null&&R&&((e=n=Fi)&&(n=nf(n,t.pendingProps,Li),n===null?e=!1:(t.stateNode=n,Pi=t,Fi=null,e=!0)),e||zi(t)),null;case 13:return vc(e,t,n);case 4:return me(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ia(t,null,r,n):ec(e,t,r,n),t.child;case 11:return tc(e,t,t.type,t.pendingProps,n);case 7:return ec(e,t,t.pendingProps,n),t.child;case 8:return ec(e,t,t.pendingProps.children,n),t.child;case 12:return ec(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,z(t,t.type,r.value),ec(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,ea(t),a=ta(a),r=r(a),t.flags|=1,ec(e,t,r,n),t.child;case 14:return nc(e,t,t.type,t.pendingProps,n);case 15:return rc(e,t,t.type,t.pendingProps,n);case 19:return wc(e,t,n);case 31:return lc(e,t,n);case 22:return ic(e,t,n,t.pendingProps);case 24:return ea(t),r=ta(sa),e===null?(a=_a(),a===null&&(a=Fl,o=ca(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},za(t),z(t,sa,a)):((e.lanes&n)!==0&&(Ba(e,t),qa(t,null,null,n),Ka()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,z(t,sa,r),r!==a.cache&&Zi(t,[sa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),z(t,sa,r))),ec(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function kc(e){e.flags|=4}function Ac(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(Su())e.flags|=8192;else throw Da=Ca,xa}else e.flags&=-16777217}function jc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(Su())e.flags|=8192;else throw Da=Ca,xa}function Mc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:$e(),e.lanes|=t,ql|=t)}function Nc(e,t){if(!R)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 Pc(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 Fc(e,t,n){var r=t.pendingProps;switch(Mi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pc(t),null;case 1:return Pc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Yi(sa),he(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Hi(t)?kc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Wi())),Pc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(kc(t),o===null?(Pc(t),Ac(t,a,null,r,n)):(Pc(t),jc(t,o))):o?o===e.memoizedState?(Pc(t),t.flags&=-16777217):(kc(t),Pc(t),jc(t,o)):(e=e.memoizedProps,e!==r&&kc(t),Pc(t),Ac(t,a,e,r,n)),null;case 27:if(_e(t),n=fe.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Pc(t),null}e=ue.current,Hi(t)?Bi(t,e):(e=ff(a,r,n),t.stateNode=e,kc(t))}return Pc(t),null;case 5:if(_e(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Pc(t),null}if(o=ue.current,Hi(t))Bi(t,o);else{var s=Bd(fe.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[dt]=t,o[ft]=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(Pd(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&&kc(t)}}return Pc(t),Ac(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=fe.current,Hi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Pi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[dt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||jd(e.nodeValue,n)),e||zi(t,!0)}else e=Bd(e).createTextNode(r),e[dt]=t,t.stateNode=e}return Pc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Hi(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[dt]=t}else Ui(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Pc(t),e=!1}else n=Wi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(so(t),t):(so(t),null);if(t.flags&128)throw Error(i(558))}return Pc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Hi(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[dt]=t}else Ui(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Pc(t),a=!1}else a=Wi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(so(t),t):(so(t),null)}return so(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),Mc(t,t.updateQueue),Pc(t),null);case 4:return he(),e===null&&xd(t.stateNode.containerInfo),Pc(t),null;case 10:return Yi(t.type),Pc(t),null;case 19:if(le(co),r=t.memoizedState,r===null)return Pc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Nc(r,!1);else{if(Hl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=lo(e),o!==null){for(t.flags|=128,Nc(r,!1),e=o.updateQueue,t.updateQueue=e,Mc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)fi(n,e),n=n.sibling;return N(co,co.current&1|2),R&&ki(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ae()>$l&&(t.flags|=128,a=!0,Nc(r,!1),t.lanes=4194304)}else{if(!a)if(e=lo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Mc(t,e),Nc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!R)return Pc(t),null}else 2*Ae()-r.renderingStartTime>$l&&n!==536870912&&(t.flags|=128,a=!0,Nc(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?(Pc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ae(),e.sibling=null,n=co.current,N(co,a?n&1|2:n&1),R&&ki(t,r.treeForkCount),e);case 22:case 23:return so(t),eo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Pc(t),t.subtreeFlags&6&&(t.flags|=8192)):Pc(t),n=t.updateQueue,n!==null&&Mc(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&&le(ga),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Yi(sa),Pc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Ic(e,t){switch(Mi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Yi(sa),he(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return _e(t),null;case 31:if(t.memoizedState!==null){if(so(t),t.alternate===null)throw Error(i(340));Ui()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(so(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Ui()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return le(co),null;case 4:return he(),null;case 10:return Yi(t.type),null;case 22:case 23:return so(t),eo(),e!==null&&le(ga),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Yi(sa),null;case 25:return null;default:return null}}function J(e,t){switch(Mi(t),t.tag){case 3:Yi(sa),he();break;case 26:case 27:case 5:_e(t);break;case 4:he();break;case 31:t.memoizedState!==null&&so(t);break;case 13:so(t);break;case 19:le(co);break;case 10:Yi(t.type);break;case 22:case 23:so(t),eo(),e!==null&&le(ga);break;case 24:Yi(sa)}}function Lc(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){Uu(t,t.return,e)}}function Rc(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){Uu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Uu(t,t.return,e)}}function zc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ya(t,n)}catch(t){Uu(e,e.return,t)}}}function Bc(e,t,n){n.props=Ws(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Uu(e,t,n)}}function Vc(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){Uu(e,t,n)}}function Hc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Uu(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){Uu(e,t,n)}else n.current=null}function Uc(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){Uu(e,e.return,t)}}function Wc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[ft]=t}catch(t){Uu(e,e.return,t)}}function Gc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Kc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Gc(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&&Zd(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 Y(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=rn));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Y(e,t,n),e=e.sibling;e!==null;)Y(e,t,n),e=e.sibling}function qc(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&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(qc(e,t,n),e=e.sibling;e!==null;)qc(e,t,n),e=e.sibling}function Jc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[dt]=e,t[ft]=n}catch(t){Uu(e,e.return,t)}}var Yc=!1,Xc=!1,Zc=!1,Qc=typeof WeakSet==`function`?WeakSet:Set,$c=null;function el(e,t){if(e=e.containerInfo,Rd=sp,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||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,$c=t;$c!==null;)if(t=$c,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,$c=e;else for(;$c!==null;){switch(t=$c,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=Ws(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Uu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(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,$c=e;break}$c=t.return}}function tl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:hl(e,n),r&4&&Lc(5,n);break;case 1:if(hl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Uu(n,n.return,e)}else{var i=Ws(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Uu(n,n.return,e)}}r&64&&zc(n),r&512&&Vc(n,n.return);break;case 3:if(hl(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{Ya(e,t)}catch(e){Uu(n,n.return,e)}}break;case 27:t===null&&r&4&&Jc(n);case 26:case 5:hl(e,n),t===null&&r&4&&Uc(n),r&512&&Vc(n,n.return);break;case 12:hl(e,n);break;case 31:hl(e,n),r&4&&ol(e,n);break;case 13:hl(e,n),r&4&&sl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=qu.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||Yc,!r){t=t!==null&&t.memoizedState!==null||Xc,i=Yc;var a=Xc;Yc=r,(Xc=t)&&!a?_l(e,n,(n.subtreeFlags&8772)!=0):hl(e,n),Yc=i,Xc=a}break;case 30:break;default:hl(e,n)}}function X(e){var t=e.alternate;t!==null&&(e.alternate=null,X(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&vt(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 nl=null,rl=!1;function il(e,t,n){for(n=n.child;n!==null;)al(e,t,n),n=n.sibling}function al(e,t,n){if(Be&&typeof Be.onCommitFiberUnmount==`function`)try{Be.onCommitFiberUnmount(ze,n)}catch{}switch(n.tag){case 26:Xc||Hc(n,t),il(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Xc||Hc(n,t);var r=nl,i=rl;Zd(n.type)&&(nl=n.stateNode,rl=!1),il(e,t,n),pf(n.stateNode),nl=r,rl=i;break;case 5:Xc||Hc(n,t);case 6:if(r=nl,i=rl,nl=null,il(e,t,n),nl=r,rl=i,nl!==null)if(rl)try{(nl.nodeType===9?nl.body:nl.nodeName===`HTML`?nl.ownerDocument.body:nl).removeChild(n.stateNode)}catch(e){Uu(n,t,e)}else try{nl.removeChild(n.stateNode)}catch(e){Uu(n,t,e)}break;case 18:nl!==null&&(rl?(e=nl,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(nl,n.stateNode));break;case 4:r=nl,i=rl,nl=n.stateNode.containerInfo,rl=!0,il(e,t,n),nl=r,rl=i;break;case 0:case 11:case 14:case 15:Rc(2,n,t),Xc||Rc(4,n,t),il(e,t,n);break;case 1:Xc||(Hc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Bc(n,t,r)),il(e,t,n);break;case 21:il(e,t,n);break;case 22:Xc=(r=Xc)||n.memoizedState!==null,il(e,t,n),Xc=r;break;default:il(e,t,n)}}function ol(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Uu(t,t.return,e)}}}function sl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Uu(t,t.return,e)}}function cl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Qc),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Qc),t;default:throw Error(i(435,e.tag))}}function ll(e,t){var n=cl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Ju.bind(null,e,t);t.then(r,r)}})}function ul(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(Zd(c.type)){nl=c.stateNode,rl=!1;break a}break;case 5:nl=c.stateNode,rl=!1;break a;case 3:case 4:nl=c.stateNode.containerInfo,rl=!0;break a}c=c.return}if(nl===null)throw Error(i(160));al(o,s,a),nl=null,rl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)fl(t,e),t=t.sibling}var dl=null;function fl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ul(t,e),pl(e),r&4&&(Rc(3,e,e.return),Lc(3,e),Rc(5,e,e.return));break;case 1:ul(t,e),pl(e),r&512&&(Xc||n===null||Hc(n,n.return)),r&64&&Yc&&(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=dl;if(ul(t,e),pl(e),r&512&&(Xc||n===null||Hc(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[_t]||o[dt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Pd(o,r,n),o[dt]=e,Ct(o),r=o;break a;case`link`:var s=Vf(`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),Pd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Vf(`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),Pd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[dt]=e,Ct(o),r=o}e.stateNode=r}else Hf(a,e.type,e.stateNode);else e.stateNode=If(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Wc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(a,e.type,e.stateNode):If(a,r,e.memoizedProps))}break;case 27:ul(t,e),pl(e),r&512&&(Xc||n===null||Hc(n,n.return)),n!==null&&r&4&&Wc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(ul(t,e),pl(e),r&512&&(Xc||n===null||Hc(n,n.return)),e.flags&32){a=e.stateNode;try{Yt(a,``)}catch(t){Uu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Wc(e,a,n===null?a:n.memoizedProps)),r&1024&&(Zc=!0);break;case 6:if(ul(t,e),pl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Uu(e,e.return,t)}}break;case 3:if(Bf=null,a=dl,dl=gf(t.containerInfo),ul(t,e),dl=a,pl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Uu(e,e.return,t)}Zc&&(Zc=!1,ml(e));break;case 4:r=dl,dl=gf(e.stateNode.containerInfo),ul(t,e),pl(e),dl=r;break;case 12:ul(t,e),pl(e);break;case 31:ul(t,e),pl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ll(e,r)));break;case 13:ul(t,e),pl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Zl=Ae()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ll(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Yc,d=Xc;if(Yc=u||a,Xc=d||l,ul(t,e),Xc=d,Yc=u,pl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Yc||Xc||gl(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){Uu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Uu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?$d(m,!0):$d(l.stateNode,!1)}catch(e){Uu(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,ll(e,n))));break;case 19:ul(t,e),pl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ll(e,r)));break;case 30:break;case 21:break;default:ul(t,e),pl(e)}}function pl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Gc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;qc(e,Kc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Yt(o,``),n.flags&=-33),qc(e,Kc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Y(e,Kc(e),s);break;default:throw Error(i(161))}}catch(t){Uu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ml(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ml(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function hl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)tl(e,t.alternate,t),t=t.sibling}function gl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Rc(4,t,t.return),gl(t);break;case 1:Hc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Bc(t,t.return,n),gl(t);break;case 27:pf(t.stateNode);case 26:case 5:Hc(t,t.return),gl(t);break;case 22:t.memoizedState===null&&gl(t);break;case 30:gl(t);break;default:gl(t)}e=e.sibling}}function _l(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:_l(i,a,n),Lc(4,a);break;case 1:if(_l(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Uu(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++)Ja(c[i],s)}catch(e){Uu(r,r.return,e)}}n&&o&64&&zc(a),Vc(a,a.return);break;case 27:Jc(a);case 26:case 5:_l(i,a,n),n&&r===null&&o&4&&Uc(a),Vc(a,a.return);break;case 12:_l(i,a,n);break;case 31:_l(i,a,n),n&&o&4&&ol(i,a);break;case 13:_l(i,a,n),n&&o&4&&sl(i,a);break;case 22:a.memoizedState===null&&_l(i,a,n),Vc(a,a.return);break;case 30:break;default:_l(i,a,n)}t=t.sibling}}function vl(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&&la(n))}function yl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&la(e))}function bl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)xl(e,t,n,r),t=t.sibling}function xl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:bl(e,t,n,r),i&2048&&Lc(9,t);break;case 1:bl(e,t,n,r);break;case 3:bl(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&&la(e)));break;case 12:if(i&2048){bl(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){Uu(t,t.return,e)}}else bl(e,t,n,r);break;case 31:bl(e,t,n,r);break;case 13:bl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?bl(e,t,n,r):(a._visibility|=2,Sl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?bl(e,t,n,r):Cl(e,t),i&2048&&vl(o,t);break;case 24:bl(e,t,n,r),i&2048&&yl(t.alternate,t);break;default:bl(e,t,n,r)}}function Sl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Sl(a,o,s,c,i),Lc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Sl(a,o,s,c,i)):u._visibility&2?Sl(a,o,s,c,i):Cl(a,o),i&&l&2048&&vl(o.alternate,o);break;case 24:Sl(a,o,s,c,i),i&&l&2048&&yl(o.alternate,o);break;default:Sl(a,o,s,c,i)}t=t.sibling}}function Cl(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:Cl(n,r),i&2048&&vl(r.alternate,r);break;case 24:Cl(n,r),i&2048&&yl(r.alternate,r);break;default:Cl(n,r)}t=t.sibling}}var wl=8192;function Tl(e,t,n){if(e.subtreeFlags&wl)for(e=e.child;e!==null;)El(e,t,n),e=e.sibling}function El(e,t,n){switch(e.tag){case 26:Tl(e,t,n),e.flags&wl&&e.memoizedState!==null&&Gf(n,dl,e.memoizedState,e.memoizedProps);break;case 5:Tl(e,t,n);break;case 3:case 4:var r=dl;dl=gf(e.stateNode.containerInfo),Tl(e,t,n),dl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=wl,wl=16777216,Tl(e,t,n),wl=r):Tl(e,t,n));break;default:Tl(e,t,n)}}function Dl(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 Ol(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];$c=r,jl(r,e)}Dl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)kl(e),e=e.sibling}function kl(e){switch(e.tag){case 0:case 11:case 15:Ol(e),e.flags&2048&&Rc(9,e,e.return);break;case 3:Ol(e);break;case 12:Ol(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Al(e)):Ol(e);break;default:Ol(e)}}function Al(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];$c=r,jl(r,e)}Dl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Rc(8,t,t.return),Al(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Al(t));break;default:Al(t)}e=e.sibling}}function jl(e,t){for(;$c!==null;){var n=$c;switch(n.tag){case 0:case 11:case 15:Rc(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:la(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,$c=r;else a:for(n=e;$c!==null;){r=$c;var i=r.sibling,a=r.return;if(X(r),r===n){$c=null;break a}if(i!==null){i.return=a,$c=i;break a}$c=a}}}var Ml={getCacheForType:function(e){var t=ta(sa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ta(sa).controller.signal}},Nl=typeof WeakMap==`function`?WeakMap:Map,Pl=0,Fl=null,Z=null,Q=0,Il=0,Ll=null,Rl=!1,zl=!1,Bl=!1,Vl=0,Hl=0,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=null,Yl=null,Xl=!1,Zl=0,Ql=0,$l=1/0,eu=null,tu=null,nu=0,ru=null,iu=null,au=0,ou=0,su=null,cu=null,lu=0,uu=null;function du(){return Pl&2&&Q!==0?Q&-Q:A.T===null?ct():ud()}function fu(){if(Kl===0)if(!(Q&536870912)||R){var e=qe;qe<<=1,!(qe&3932160)&&(qe=262144),Kl=e}else Kl=536870912;return e=to.current,e!==null&&(e.flags|=32),Kl}function pu(e,t,n){(e===Fl&&(Il===2||Il===9)||e.cancelPendingCommit!==null)&&(bu(e,0),_u(e,Q,Kl,!1)),tt(e,n),(!(Pl&2)||e!==Fl)&&(e===Fl&&(!(Pl&2)&&(Wl|=n),Hl===4&&_u(e,Q,Kl,!1)),nd(e))}function mu(e,t,n){if(Pl&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Ze(e,t),a=r?Ou(e,t):Eu(e,t,!0),o=r;do{if(a===0){zl&&!r&&_u(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!gu(n)){a=Eu(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=Jl;var l=c.current.memoizedState.isDehydrated;if(l&&(bu(c,s).flags|=256),s=Eu(c,s,!1),s!==2){if(Bl&&!l){c.errorRecoveryDisabledLanes|=o,Wl|=o,a=4;break a}o=Yl,Yl=a,o!==null&&(Yl===null?Yl=o:Yl.push.apply(Yl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){bu(e,0),_u(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:_u(r,t,Kl,!Rl);break a;case 2:Yl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=Zl+300-Ae(),10<a)){if(_u(r,t,Kl,!Rl),Xe(r,0,!0)!==0)break a;au=t,r.timeoutHandle=Kd(hu.bind(null,r,n,Yl,eu,Xl,t,Kl,Wl,ql,Rl,o,`Throttled`,-0,0),a);break a}hu(r,n,Yl,eu,Xl,t,Kl,Wl,ql,Rl,o,null,-0,0)}}break}while(1);nd(e)}function hu(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:rn},El(t,a,d);var m=(a&62914560)===a?Zl-Ae():(a&4194048)===a?Ql-Ae():0;if(m=qf(d,m),m!==null){au=a,e.cancelPendingCommit=m(Fu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),_u(e,a,o,!l);return}}Fu(e,t,a,n,r,i,o,s,c)}function gu(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 _u(e,t,n,r){t&=~Gl,t&=~Wl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-He(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&rt(e,n,t)}function vu(){return Pl&6?!0:(rd(0,!1),!1)}function yu(){if(Z!==null){if(Il===0)var e=Z.return;else e=Z,Ji=qi=null,ko(e),Aa=null,ja=0,e=Z;for(;e!==null;)J(e.alternate,e),e=e.return;Z=null}}function bu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),au=0,yu(),Fl=e,Z=n=di(e.current,null),Q=t,Il=0,Ll=null,Rl=!1,zl=Ze(e,t),Bl=!1,ql=Kl=Gl=Wl=Ul=Hl=0,Yl=Jl=null,Xl=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-He(r),a=1<<i;t|=e[i],r&=~a}return Vl=t,ti(),n}function xu(e,t){H=null,A.H=Ls,t===ba||t===Sa?(t=Oa(),Il=3):t===xa?(t=Oa(),Il=4):Il=t===Qs?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Ll=t,Z===null&&(Hl=1,qs(e,yi(t,e.current)))}function Su(){var e=to.current;return e===null?!0:(Q&4194048)===Q?no===null:(Q&62914560)===Q||Q&536870912?e===no:!1}function Cu(){var e=A.H;return A.H=Ls,e===null?Ls:e}function wu(){var e=A.A;return A.A=Ml,e}function Tu(){Hl=4,Rl||(Q&4194048)!==Q&&to.current!==null||(zl=!0),!(Ul&134217727)&&!(Wl&134217727)||Fl===null||_u(Fl,Q,Kl,!1)}function Eu(e,t,n){var r=Pl;Pl|=2;var i=Cu(),a=wu();(Fl!==e||Q!==t)&&(eu=null,bu(e,t)),t=!1;var o=Hl;a:do try{if(Il!==0&&Z!==null){var s=Z,c=Ll;switch(Il){case 8:yu(),o=6;break a;case 3:case 2:case 9:case 6:to.current===null&&(t=!0);var l=Il;if(Il=0,Ll=null,Mu(e,s,c,l),n&&zl){o=0;break a}break;default:l=Il,Il=0,Ll=null,Mu(e,s,c,l)}}Du(),o=Hl;break}catch(t){xu(e,t)}while(1);return t&&e.shellSuspendCounter++,Ji=qi=null,Pl=r,A.H=i,A.A=a,Z===null&&(Fl=null,Q=0,ti()),o}function Du(){for(;Z!==null;)Au(Z)}function Ou(e,t){var n=Pl;Pl|=2;var r=Cu(),a=wu();Fl!==e||Q!==t?(eu=null,$l=Ae()+500,bu(e,t)):zl=Ze(e,t);a:do try{if(Il!==0&&Z!==null){t=Z;var o=Ll;b:switch(Il){case 1:Il=0,Ll=null,Mu(e,t,o,1);break;case 2:case 9:if(wa(o)){Il=0,Ll=null,ju(t);break}t=function(){Il!==2&&Il!==9||Fl!==e||(Il=7),nd(e)},o.then(t,t);break a;case 3:Il=7;break a;case 4:Il=5;break a;case 7:wa(o)?(Il=0,Ll=null,ju(t)):(Il=0,Ll=null,Mu(e,t,o,7));break;case 5:var s=null;switch(Z.tag){case 26:s=Z.memoizedState;case 5:case 27:var c=Z;if(s?Wf(s):c.stateNode.complete){Il=0,Ll=null;var l=c.sibling;if(l!==null)Z=l;else{var u=c.return;u===null?Z=null:(Z=u,Nu(u))}break b}}Il=0,Ll=null,Mu(e,t,o,5);break;case 6:Il=0,Ll=null,Mu(e,t,o,6);break;case 8:yu(),Hl=6;break a;default:throw Error(i(462))}}ku();break}catch(t){xu(e,t)}while(1);return Ji=qi=null,A.H=r,A.A=a,Pl=n,Z===null?(Fl=null,Q=0,ti(),Hl):0}function ku(){for(;Z!==null&&!Oe();)Au(Z)}function Au(e){var t=Oc(e.alternate,e,Vl);e.memoizedProps=e.pendingProps,t===null?Nu(e):Z=t}function ju(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=fc(n,t,t.pendingProps,t.type,void 0,Q);break;case 11:t=fc(n,t,t.pendingProps,t.type.render,t.ref,Q);break;case 5:ko(t);default:J(n,t),t=Z=fi(t,Vl),t=Oc(n,t,Vl)}e.memoizedProps=e.pendingProps,t===null?Nu(e):Z=t}function Mu(e,t,n,r){Ji=qi=null,ko(t),Aa=null,ja=0;var i=t.return;try{if(Zs(e,i,t,n,Q)){Hl=1,qs(e,yi(n,e.current)),Z=null;return}}catch(t){if(i!==null)throw Z=i,t;Hl=1,qs(e,yi(n,e.current)),Z=null;return}t.flags&32768?(R||r===1?e=!0:zl||Q&536870912?e=!1:(Rl=e=!0,(r===2||r===9||r===3||r===6)&&(r=to.current,r!==null&&r.tag===13&&(r.flags|=16384))),Pu(t,e)):Nu(t)}function Nu(e){var t=e;do{if(t.flags&32768){Pu(t,Rl);return}e=t.return;var n=Fc(t.alternate,t,Vl);if(n!==null){Z=n;return}if(t=t.sibling,t!==null){Z=t;return}Z=t=e}while(t!==null);Hl===0&&(Hl=5)}function Pu(e,t){do{var n=Ic(e.alternate,e);if(n!==null){n.flags&=32767,Z=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Z=e;return}Z=e=n}while(e!==null);Hl=6,Z=null}function Fu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Bu();while(nu!==0);if(Pl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=ei,nt(e,n,o,s,c,l),e===Fl&&(Z=Fl=null,Q=0),iu=t,ru=e,au=n,ou=o,su=a,cu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Yu(Pe,function(){return Vu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=A.T,A.T=null,a=j.p,j.p=2,s=Pl,Pl|=4;try{el(e,t,n)}finally{Pl=s,j.p=a,A.T=r}}nu=1,Iu(),Lu(),Ru()}}function Iu(){if(nu===1){nu=0;var e=ru,t=iu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=A.T,A.T=null;var r=j.p;j.p=2;var i=Pl;Pl|=4;try{fl(t,e);var a=zd,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}}sp=!!Rd,zd=Rd=null}finally{Pl=i,j.p=r,A.T=n}}e.current=t,nu=2}}function Lu(){if(nu===2){nu=0;var e=ru,t=iu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=A.T,A.T=null;var r=j.p;j.p=2;var i=Pl;Pl|=4;try{tl(e,t.alternate,t)}finally{Pl=i,j.p=r,A.T=n}}nu=3}}function Ru(){if(nu===4||nu===3){nu=0,ke();var e=ru,t=iu,n=au,r=cu;t.subtreeFlags&10256||t.flags&10256?nu=5:(nu=0,iu=ru=null,zu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(tu=null),st(n),t=t.stateNode,Be&&typeof Be.onCommitFiberRoot==`function`)try{Be.onCommitFiberRoot(ze,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=A.T,i=j.p,j.p=2,A.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{A.T=t,j.p=i}}au&3&&Bu(),nd(e),i=e.pendingLanes,n&261930&&i&42?e===uu?lu++:(lu=0,uu=e):lu=0,rd(0,!1)}}function zu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,la(t)))}function Bu(){return Iu(),Lu(),Ru(),Vu()}function Vu(){if(nu!==5)return!1;var e=ru,t=ou;ou=0;var n=st(au),r=A.T,a=j.p;try{j.p=32>n?32:n,A.T=null,n=su,su=null;var o=ru,s=au;if(nu=0,iu=ru=null,au=0,Pl&6)throw Error(i(331));var c=Pl;if(Pl|=4,kl(o.current),xl(o,o.current,s,n),Pl=c,rd(0,!1),Be&&typeof Be.onPostCommitFiberRoot==`function`)try{Be.onPostCommitFiberRoot(ze,o)}catch{}return!0}finally{j.p=a,A.T=r,zu(e,t)}}function Hu(e,t,n){t=yi(n,t),t=q(e.stateNode,t,2),e=Ha(e,t,2),e!==null&&(tt(e,2),nd(e))}function Uu(e,t,n){if(e.tag===3)Hu(e,e,n);else for(;t!==null;){if(t.tag===3){Hu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(tu===null||!tu.has(r))){e=yi(n,e),n=Ys(2),r=Ha(t,n,2),r!==null&&(Xs(n,r,t,e),tt(r,2),nd(r));break}}t=t.return}}function Wu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Nl;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)||(Bl=!0,i.add(n),e=Gu.bind(null,e,t,n),t.then(e,e))}function Gu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Fl===e&&(Q&n)===n&&(Hl===4||Hl===3&&(Q&62914560)===Q&&300>Ae()-Zl?!(Pl&2)&&bu(e,0):Gl|=n,ql===Q&&(ql=0)),nd(e)}function Ku(e,t){t===0&&(t=$e()),e=ii(e,t),e!==null&&(tt(e,t),nd(e))}function qu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ku(e,n)}function Ju(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),Ku(e,n)}function Yu(e,t){return Ee(e,t)}var Xu=null,Zu=null,Qu=!1,$u=!1,ed=!1,td=0;function nd(e){e!==Zu&&e.next===null&&(Zu===null?Xu=Zu=e:Zu=Zu.next=e),$u=!0,Qu||(Qu=!0,ld())}function rd(e,t){if(!ed&&$u){ed=!0;do for(var n=!1,r=Xu;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-He(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,cd(r,a))}else a=Q,a=Xe(r,r===Fl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ze(r,a)||(n=!0,cd(r,a));r=r.next}while(n);ed=!1}}function id(){ad()}function ad(){$u=Qu=!1;var e=0;td!==0&&Gd()&&(e=td);for(var t=Ae(),n=null,r=Xu;r!==null;){var i=r.next,a=od(r,t);a===0?(r.next=null,n===null?Xu=i:n.next=i,i===null&&(Zu=n)):(n=r,(e!==0||a&3)&&($u=!0)),r=i}nu!==0&&nu!==5||rd(e,!1),td!==0&&(td=0)}function od(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-He(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Qe(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Fl,n=Q,n=Xe(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Il===2||Il===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&De(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ze(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&De(r),st(n)){case 2:case 8:n=Ne;break;case 32:n=Pe;break;case 268435456:n=Ie;break;default:n=Pe}return r=sd.bind(null,e),n=Ee(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&De(r),e.callbackPriority=2,e.callbackNode=null,2}function sd(e,t){if(nu!==0&&nu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Bu()&&e.callbackNode!==n)return null;var r=Q;return r=Xe(e,e===Fl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(mu(e,r,t),od(e,Ae()),e.callbackNode!=null&&e.callbackNode===n?sd.bind(null,e):null)}function cd(e,t){if(Bu())return null;mu(e,t,!0)}function ld(){Yd(function(){Pl&6?Ee(Me,id):ad()})}function ud(){if(td===0){var e=ua;e===0&&(e=Ke,Ke<<=1,!(Ke&261888)&&(Ke=256)),td=e}return td}function dd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:nn(``+e)}function fd(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 pd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=dd((i[ft]||null).action),o=r.submitter;o&&(t=(t=o[ft]||null)?dd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Tn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(td!==0){var e=o?fd(i,o):new FormData(i);Cs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?fd(i,o):new FormData(i),Cs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var md=0;md<I.length;md++){var hd=I[md];Zr(hd.toLowerCase(),`on`+(hd[0].toUpperCase()+hd.slice(1)))}Zr(Ur,`onAnimationEnd`),Zr(Wr,`onAnimationIteration`),Zr(Gr,`onAnimationStart`),Zr(`dblclick`,`onDoubleClick`),Zr(`focusin`,`onFocus`),Zr(`focusout`,`onBlur`),Zr(Kr,`onTransitionRun`),Zr(qr,`onTransitionStart`),Zr(Jr,`onTransitionCancel`),Zr(Yr,`onTransitionEnd`),Dt(`onMouseEnter`,[`mouseout`,`mouseover`]),Dt(`onMouseLeave`,[`mouseout`,`mouseover`]),Dt(`onPointerEnter`,[`pointerout`,`pointerover`]),Dt(`onPointerLeave`,[`pointerout`,`pointerover`]),Et(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Et(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Et(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Et(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Et(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Et(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var gd=`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(` `),_d=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(gd));function vd(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){L(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){L(e)}i.currentTarget=null,a=c}}}}function $(e,t){var n=t[pt];n===void 0&&(n=t[pt]=new Set);var r=e+`__bubble`;n.has(r)||(Sd(t,e,2,!1),n.add(r))}function yd(e,t,n){var r=0;t&&(r|=4),Sd(n,e,r,t)}var bd=`_reactListening`+Math.random().toString(36).slice(2);function xd(e){if(!e[bd]){e[bd]=!0,wt.forEach(function(t){t!==`selectionchange`&&(_d.has(t)||yd(t,!1,e),yd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[bd]||(t[bd]=!0,yd(`selectionchange`,!1,t))}}function Sd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!mn||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 Cd(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=yt(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}dn(function(){var r=a,i=on(n),s=[];a:{var c=Xr.get(e);if(c!==void 0){var l=Tn,u=e;switch(e){case`keypress`:if(bn(n)===0)break a;case`keydown`:case`keyup`:l=Hn;break;case`focusin`:u=`focus`,l=Pn;break;case`focusout`:u=`blur`,l=Pn;break;case`beforeblur`:case`afterblur`:l=Pn;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=Mn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Nn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Wn;break;case Ur:case Wr:case Gr:l=Fn;break;case Yr:l=Gn;break;case`scroll`:case`scrollend`:l=Dn;break;case`wheel`:l=Kn;break;case`copy`:case`cut`:case`paste`:l=In;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=fn(m,p),g!=null&&d.push(wd(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!==an&&(u=n.relatedTarget||n.fromElement)&&(yt(u)||u[P]))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?yt(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=Mn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Un,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:xt(l),h=u==null?c:xt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,yt(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=Ed,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&&Dd(s,c,l,d,!1),u!==null&&f!==null&&Dd(s,f,u,d,!0)}}a:{if(c=r?xt(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&&$t(r.elementType)&&(v=pr):v=Sr;if(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&&Gt(c,`number`,c.value)}switch(y=r?xt(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=yn()):(gn=i,_n=`value`in gn?gn.value:gn.textContent,rr=!0)),y=Td(r,x),0<y.length&&(x=new F(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=Td(r,`onBeforeInput`),0<x.length&&(y=new F(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),pd(s,e,r,n,i)}vd(s,t)})}function wd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Td(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=fn(e,n),i!=null&&r.unshift(wd(e,i,a)),i=fn(e,t),i!=null&&r.push(wd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Ed(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Dd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=fn(n,a),l!=null&&o.unshift(wd(n,l,c))):i||(l=fn(n,a),l!=null&&o.push(wd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Od=/\r\n?/g,kd=/\u0000|\uFFFD/g;function Ad(e){return(typeof e==`string`?e:``+e).replace(Od,`
|
|
9
|
-
`).replace(kd,``)}function jd(e,t){return t=Ad(t),Ad(e)===t}function Md(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Yt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Yt(e,``+r);break;case`className`:Nt(e,`class`,r);break;case`tabIndex`:Nt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Nt(e,n,r);break;case`style`:Qt(e,r,o);break;case`data`:if(t!==`object`){Nt(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=nn(``+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`&&Md(e,t,`name`,a.name,a,null),Md(e,t,`formEncType`,a.formEncType,a,null),Md(e,t,`formMethod`,a.formMethod,a,null),Md(e,t,`formTarget`,a.formTarget,a,null)):(Md(e,t,`encType`,a.encType,a,null),Md(e,t,`method`,a.method,a,null),Md(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=nn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=rn);break;case`onScroll`:r!=null&&$(`scroll`,e);break;case`onScrollEnd`:r!=null&&$(`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=nn(``+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`:$(`beforetoggle`,e),$(`toggle`,e),Mt(e,`popover`,r);break;case`xlinkActuate`:Pt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Pt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Pt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Pt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Pt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Pt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Pt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Pt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Pt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Mt(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=en.get(n)||n,Mt(e,n,r))}}function Nd(e,t,n,r,a,o){switch(n){case`style`:Qt(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`?Yt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Yt(e,``+r);break;case`onScroll`:r!=null&&$(`scroll`,e);break;case`onScrollEnd`:r!=null&&$(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=rn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Tt.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[ft]||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,``):Mt(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:$(`error`,e),$(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Md(e,t,o,s,n,null)}}a&&Md(e,t,`srcSet`,n.srcSet,n,null),r&&Md(e,t,`src`,n.src,n,null);return;case`input`:$(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Md(e,t,r,d,n,null)}}Wt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in $(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Md(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Kt(e,!!r,n,!0):Kt(e,!!r,t,!1);return;case`textarea`:for(s in $(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Md(e,t,s,c,n,null)}Jt(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:Md(e,t,l,r,n,null)}return;case`dialog`:$(`beforetoggle`,e),$(`toggle`,e),$(`cancel`,e),$(`close`,e);break;case`iframe`:case`object`:$(`load`,e);break;case`video`:case`audio`:for(r=0;r<gd.length;r++)$(gd[r],e);break;case`image`:$(`error`,e),$(`load`,e);break;case`details`:$(`toggle`,e);break;case`embed`:case`source`:case`link`:$(`error`,e),$(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Md(e,t,u,r,n,null)}return;default:if($t(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Md(e,t,c,r,n,null))}function Fd(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)||Md(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&&Md(e,t,p,m,r,f)}}Ut(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)||Md(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&&Md(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Kt(e,!!n,n?[]:``,!1):Kt(e,!!n,t,!0)):Kt(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:Md(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&&Md(e,t,s,a,r,o)}qt(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:Md(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:Md(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)&&Md(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:Md(e,t,u,p,r,m)}return;default:if($t(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(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||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Md(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||Md(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){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&&Id(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&&Id(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 Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(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 Hd(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 Ud(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 Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[_t]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(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 ef(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`:ef(n),vt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(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[_t])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=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(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 cf(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 lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(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 ff(e,t,n){switch(t=Bd(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 pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);vt(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=j.d;j.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=vu();return e||t}function yf(e){var t=bt(e);t!==null&&t.tag===5&&t.type===`form`?Ts(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Ht(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),Ct(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Ht(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Ht(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Ht(n.imageSizes)+`"]`)):i+=`[href="`+Ht(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=m({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),Ct(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Ht(r)+`"][href="`+Ht(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=m({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),Ct(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=St(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);Ct(c),Pd(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,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=St(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=m({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),Ct(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=St(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=m({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),Ct(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=fe.current)?gf(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=Af(n.href),n=St(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=Af(n.href);var o=St(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(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.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},mf.set(e,n),o||Nf(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=Pf(n),n=St(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 Af(e){return`href="`+Ht(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(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}),Pd(t,`link`,n),Ct(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Ht(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Ht(n.href)+`"]`);if(r)return t.instance=r,Ct(r),r;var a=m({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Ct(r),Pd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,Ct(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),Ct(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,Ct(a),a):(r=n,(a=mf.get(o))&&(r=m({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Ct(a),Pd(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,Lf(r,n.precedence,e));return t.instance}function Lf(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 Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,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[_t]||a[dt]||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 Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Ct(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),Ct(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:C,Provider:null,Consumer:null,_currentValue:oe,_currentValue2:oe,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=et(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=et(0),this.hiddenUpdates=et(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=li(3,null,null,t),e.current=a,a.stateNode=e,t=ca(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},za(a),e}function tp(e){return e?(e=si,e):si}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Va(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ha(e,r,t),n!==null&&(pu(n,e,t),Ua(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=ii(e,67108864);t!==null&&pu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=du();t=ot(t);var n=ii(e,t);n!==null&&pu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=A.T;A.T=null;var a=j.p;try{j.p=2,up(e,t,n,r)}finally{j.p=a,A.T=i}}function lp(e,t,n,r){var i=A.T;A.T=null;var a=j.p;try{j.p=8,up(e,t,n,r)}finally{j.p=a,A.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)Cd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=bt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ye(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-He(o);s.entanglements[1]|=c,o&=~c}nd(a),!(Pl&6)&&($l=Ae()+500,rd(0,!1))}}break;case 31:case 13:s=ii(a,2),s!==null&&pu(s,a,2),vu(),ip(a,2)}if(a=dp(r),a===null&&Cd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Cd(e,t,r,null,n)}}function dp(e){return e=on(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=yt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(je()){case Me:return 2;case Ne:return 8;case Pe:case Fe:return 32;case Ie:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=bt(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=yt(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,lt(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,lt(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);an=r,n.target.dispatchEvent(r),an=null}else return t=bt(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=bt(n);a!==null&&(e.splice(t,3),t-=3,Cs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ft]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ft]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;np(n,du(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),vu(),t[P]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=ct();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.7`)throw Error(i(527,Lp,`19.2.7`));j.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:A,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{ze=zp.inject(Rp),Be=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Gs,s=Ks,c=K;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[P]=t.current,xd(e),new Fp(t)}})),_=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=l(d(),1),y=_(),b=Object.create(null);b.open=`0`,b.close=`1`,b.ping=`2`,b.pong=`3`,b.message=`4`,b.upgrade=`5`,b.noop=`6`;var x=Object.create(null);Object.keys(b).forEach(e=>{x[b[e]]=e});var S={type:`error`,data:`parser error`},C=typeof Blob==`function`||typeof Blob<`u`&&Object.prototype.toString.call(Blob)===`[object BlobConstructor]`,w=typeof ArrayBuffer==`function`,T=e=>typeof ArrayBuffer.isView==`function`?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,E=({type:e,data:t},n,r)=>C&&t instanceof Blob?n?r(t):D(t,r):w&&(t instanceof ArrayBuffer||T(t))?n?r(t):D(new Blob([t]),r):r(b[e]+(t||``)),D=(e,t)=>{let n=new FileReader;return n.onload=function(){let e=n.result.split(`,`)[1];t(`b`+(e||``))},n.readAsDataURL(e)};function O(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}var ee;function te(e,t){if(C&&e.data instanceof Blob)return e.data.arrayBuffer().then(O).then(t);if(w&&(e.data instanceof ArrayBuffer||T(e.data)))return t(O(e.data));E(e,!1,e=>{ee||=new TextEncoder,t(ee.encode(e))})}var k=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,ne=typeof Uint8Array>`u`?[]:new Uint8Array(256);for(let e=0;e<64;e++)ne[k.charCodeAt(e)]=e;var re=e=>{let t=e.length*.75,n=e.length,r,i=0,a,o,s,c;e[e.length-1]===`=`&&(t--,e[e.length-2]===`=`&&t--);let l=new ArrayBuffer(t),u=new Uint8Array(l);for(r=0;r<n;r+=4)a=ne[e.charCodeAt(r)],o=ne[e.charCodeAt(r+1)],s=ne[e.charCodeAt(r+2)],c=ne[e.charCodeAt(r+3)],u[i++]=a<<2|o>>4,u[i++]=(o&15)<<4|s>>2,u[i++]=(s&3)<<6|c&63;return l},ie=typeof ArrayBuffer==`function`,ae=(e,t)=>{if(typeof e!=`string`)return{type:`message`,data:j(e,t)};let n=e.charAt(0);return n===`b`?{type:`message`,data:A(e.substring(1),t)}:x[n]?e.length>1?{type:x[n],data:e.substring(1)}:{type:x[n]}:S},A=(e,t)=>ie?j(re(e),t):{base64:!0,data:e},j=(e,t)=>{switch(t){case`blob`:return e instanceof Blob?e:new Blob([e]);default:return e instanceof ArrayBuffer?e:e.buffer}},oe=``,se=(e,t)=>{let n=e.length,r=Array(n),i=0;e.forEach((e,a)=>{E(e,!1,e=>{r[a]=e,++i===n&&t(r.join(oe))})})},ce=(e,t)=>{let n=e.split(oe),r=[];for(let e=0;e<n.length;e++){let i=ae(n[e],t);if(r.push(i),i.type===`error`)break}return r};function M(){return new TransformStream({transform(e,t){te(e,n=>{let r=n.length,i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);let e=new DataView(i.buffer);e.setUint8(0,126),e.setUint16(1,r)}else{i=new Uint8Array(9);let e=new DataView(i.buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!=`string`&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}var le;function N(e){return e.reduce((e,t)=>e+t.length,0)}function ue(e,t){if(e[0].length===t)return e.shift();let n=new Uint8Array(t),r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function de(e,t){le||=new TextDecoder;let n=[],r=0,i=-1,a=!1;return new TransformStream({transform(o,s){for(n.push(o);;){if(r===0){if(N(n)<1)break;let e=ue(n,1);a=(e[0]&128)==128,i=e[0]&127,r=i<126?3:i===126?1:2}else if(r===1){if(N(n)<2)break;let e=ue(n,2);i=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),r=3}else if(r===2){if(N(n)<8)break;let e=ue(n,8),t=new DataView(e.buffer,e.byteOffset,e.length),a=t.getUint32(0);if(a>2**21-1){s.enqueue(S);break}i=a*2**32+t.getUint32(4),r=3}else{if(N(n)<i)break;let e=ue(n,i);s.enqueue(ae(a?e:le.decode(e),t)),r=0}if(i===0||i>e){s.enqueue(S);break}}}})}function fe(e){if(e)return pe(e)}function pe(e){for(var t in fe.prototype)e[t]=fe.prototype[t];return e}fe.prototype.on=fe.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[`$`+e]=this._callbacks[`$`+e]||[]).push(t),this},fe.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},fe.prototype.off=fe.prototype.removeListener=fe.prototype.removeAllListeners=fe.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks[`$`+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks[`$`+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks[`$`+e],this},fe.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=Array(arguments.length-1),n=this._callbacks[`$`+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this},fe.prototype.emitReserved=fe.prototype.emit,fe.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[`$`+e]||[]},fe.prototype.hasListeners=function(e){return!!this.listeners(e).length};var me=typeof Promise==`function`&&typeof Promise.resolve==`function`?e=>Promise.resolve().then(e):(e,t)=>t(e,0),he=typeof self<`u`?self:typeof window<`u`?window:Function(`return this`)(),ge=`arraybuffer`;function _e(e,...t){return t.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{})}var ve=he.setTimeout,ye=he.clearTimeout;function be(e,t){t.useNativeTimers?(e.setTimeoutFn=ve.bind(he),e.clearTimeoutFn=ye.bind(he)):(e.setTimeoutFn=he.setTimeout.bind(he),e.clearTimeoutFn=he.clearTimeout.bind(he))}var xe=1.33;function Se(e){return typeof e==`string`?Ce(e):Math.ceil((e.byteLength||e.size)*xe)}function Ce(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function we(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Te(e){let t=``;for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+=`&`),t+=encodeURIComponent(n)+`=`+encodeURIComponent(e[n]));return t}function Ee(e){let t={},n=e.split(`&`);for(let e=0,r=n.length;e<r;e++){let r=n[e].split(`=`);t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return t}var De=class extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type=`TransportError`}},Oe=class extends fe{constructor(e){super(),this.writable=!1,be(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,n){return super.emitReserved(`error`,new De(e,t,n)),this}open(){return this.readyState=`opening`,this.doOpen(),this}close(){return(this.readyState===`opening`||this.readyState===`open`)&&(this.doClose(),this.onClose()),this}send(e){this.readyState===`open`&&this.write(e)}onOpen(){this.readyState=`open`,this.writable=!0,super.emitReserved(`open`)}onData(e){let t=ae(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved(`packet`,e)}onClose(e){this.readyState=`closed`,super.emitReserved(`close`,e)}pause(e){}createUri(e,t={}){return e+`://`+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){let e=this.opts.hostname;return e.indexOf(`:`)===-1?e:`[`+e+`]`}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?`:`+this.opts.port:``}_query(e){let t=Te(e);return t.length?`?`+t:``}},ke=class extends Oe{constructor(){super(...arguments),this._polling=!1}get name(){return`polling`}doOpen(){this._poll()}pause(e){this.readyState=`pausing`;let t=()=>{this.readyState=`paused`,e()};if(this._polling||!this.writable){let e=0;this._polling&&(e++,this.once(`pollComplete`,function(){--e||t()})),this.writable||(e++,this.once(`drain`,function(){--e||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved(`poll`)}onData(e){ce(e,this.socket.binaryType).forEach(e=>{if(this.readyState===`opening`&&e.type===`open`&&this.onOpen(),e.type===`close`)return this.onClose({description:`transport closed by the server`}),!1;this.onPacket(e)}),this.readyState!==`closed`&&(this._polling=!1,this.emitReserved(`pollComplete`),this.readyState===`open`&&this._poll())}doClose(){let e=()=>{this.write([{type:`close`}])};this.readyState===`open`?e():this.once(`open`,e)}write(e){this.writable=!1,se(e,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved(`drain`)})})}uri(){let e=this.opts.secure?`https`:`http`,t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=we()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}},Ae=!1;try{Ae=typeof XMLHttpRequest<`u`&&`withCredentials`in new XMLHttpRequest}catch{}var je=Ae;function Me(){}var Ne=class extends ke{constructor(e){if(super(e),typeof location<`u`){let t=location.protocol===`https:`,n=location.port;n||=t?`443`:`80`,this.xd=typeof location<`u`&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,t){let n=this.request({method:`POST`,data:e});n.on(`success`,t),n.on(`error`,(e,t)=>{this.onError(`xhr post error`,e,t)})}doPoll(){let e=this.request();e.on(`data`,this.onData.bind(this)),e.on(`error`,(e,t)=>{this.onError(`xhr poll error`,e,t)}),this.pollXhr=e}},Pe=class e extends fe{constructor(e,t,n){super(),this.createRequest=e,be(this,n),this._opts=n,this._method=n.method||`GET`,this._uri=t,this._data=n.data===void 0?null:n.data,this._create()}_create(){var t;let n=_e(this._opts,`agent`,`pfx`,`key`,`passphrase`,`cert`,`ca`,`ciphers`,`rejectUnauthorized`,`autoUnref`);n.xdomain=!!this._opts.xd;let r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let e in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(e)&&r.setRequestHeader(e,this._opts.extraHeaders[e])}}catch{}if(this._method===`POST`)try{r.setRequestHeader(`Content-type`,`text/plain;charset=UTF-8`)}catch{}try{r.setRequestHeader(`Accept`,`*/*`)}catch{}(t=this._opts.cookieJar)==null||t.addCookies(r),`withCredentials`in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var e;r.readyState===3&&((e=this._opts.cookieJar)==null||e.parseCookies(r.getResponseHeader(`set-cookie`))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status==`number`?r.status:0)},0))},r.send(this._data)}catch(e){this.setTimeoutFn(()=>{this._onError(e)},0);return}typeof document<`u`&&(this._index=e.requestsCount++,e.requests[this._index]=this)}_onError(e){this.emitReserved(`error`,e,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(this._xhr===void 0||this._xhr===null)){if(this._xhr.onreadystatechange=Me,t)try{this._xhr.abort()}catch{}typeof document<`u`&&delete e.requests[this._index],this._xhr=null}}_onLoad(){let e=this._xhr.responseText;e!==null&&(this.emitReserved(`data`,e),this.emitReserved(`success`),this._cleanup())}abort(){this._cleanup()}};if(Pe.requestsCount=0,Pe.requests={},typeof document<`u`){if(typeof attachEvent==`function`)attachEvent(`onunload`,Fe);else if(typeof addEventListener==`function`){let e=`onpagehide`in he?`pagehide`:`unload`;addEventListener(e,Fe,!1)}}function Fe(){for(let e in Pe.requests)Pe.requests.hasOwnProperty(e)&&Pe.requests[e].abort()}var Ie=(function(){let e=Re({xdomain:!1});return e&&e.responseType!==null})(),Le=class extends Ne{constructor(e){super(e);let t=e&&e.forceBase64;this.supportsBinary=Ie&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Pe(Re,this.uri(),e)}};function Re(e){let t=e.xdomain;try{if(typeof XMLHttpRequest<`u`&&(!t||je))return new XMLHttpRequest}catch{}if(!t)try{return new he[[`Active`,`Object`].join(`X`)](`Microsoft.XMLHTTP`)}catch{}}var ze=typeof navigator<`u`&&typeof navigator.product==`string`&&navigator.product.toLowerCase()===`reactnative`,Be=class extends Oe{get name(){return`websocket`}doOpen(){let e=this.uri(),t=this.opts.protocols,n=ze?{}:_e(this.opts,`agent`,`perMessageDeflate`,`pfx`,`key`,`passphrase`,`cert`,`ca`,`ciphers`,`rejectUnauthorized`,`localAddress`,`protocolVersion`,`origin`,`maxPayload`,`family`,`checkServerIdentity`);this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,n)}catch(e){return this.emitReserved(`error`,e)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:`websocket connection closed`,context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError(`websocket error`,e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let n=e[t],r=t===e.length-1;E(n,this.supportsBinary,e=>{try{this.doWrite(n,e)}catch{}r&&me(()=>{this.writable=!0,this.emitReserved(`drain`)},this.setTimeoutFn)})}}doClose(){this.ws!==void 0&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?`wss`:`ws`,t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=we()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}},Ve=he.WebSocket||he.MozWebSocket,He={websocket:class extends Be{createSocket(e,t,n){return ze?new Ve(e,t,n):t?new Ve(e,t):new Ve(e)}doWrite(e,t){this.ws.send(t)}},webtransport:class extends Oe{get name(){return`webtransport`}doOpen(){try{this._transport=new WebTransport(this.createUri(`https`),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved(`error`,e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError(`webtransport error`,e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{let t=de(2**53-1,this.socket.binaryType),n=e.readable.pipeThrough(t).getReader(),r=M();r.readable.pipeTo(e.writable),this._writer=r.writable.getWriter();let i=()=>{n.read().then(({done:e,value:t})=>{e||(this.onPacket(t),i())}).catch(e=>{})};i();let a={type:`open`};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this._writer.write(a).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let n=e[t],r=t===e.length-1;this._writer.write(n).then(()=>{r&&me(()=>{this.writable=!0,this.emitReserved(`drain`)},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)==null||e.close()}},polling:Le},Ue=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,We=[`source`,`protocol`,`authority`,`userInfo`,`user`,`password`,`host`,`port`,`relative`,`path`,`directory`,`file`,`query`,`anchor`];function Ge(e){if(e.length>8e3)throw`URI too long`;let t=e,n=e.indexOf(`[`),r=e.indexOf(`]`);n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,`;`)+e.substring(r,e.length));let i=Ue.exec(e||``),a={},o=14;for(;o--;)a[We[o]]=i[o]||``;return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,`:`),a.authority=a.authority.replace(`[`,``).replace(`]`,``).replace(/;/g,`:`),a.ipv6uri=!0),a.pathNames=Ke(a,a.path),a.queryKey=qe(a,a.query),a}function Ke(e,t){let n=t.replace(/\/{2,9}/g,`/`).split(`/`);return(t.slice(0,1)==`/`||t.length===0)&&n.splice(0,1),t.slice(-1)==`/`&&n.splice(n.length-1,1),n}function qe(e,t){let n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(e,t,r){t&&(n[t]=r)}),n}var Je=typeof addEventListener==`function`&&typeof removeEventListener==`function`,Ye=[];Je&&addEventListener(`offline`,()=>{Ye.forEach(e=>e())},!1);var Xe=class e extends fe{constructor(e,t){if(super(),this.binaryType=ge,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e==`object`&&(t=e,e=null),e){let n=Ge(e);t.hostname=n.host,t.secure=n.protocol===`https`||n.protocol===`wss`,t.port=n.port,n.query&&(t.query=n.query)}else t.host&&(t.hostname=Ge(t.host).host);be(this,t),this.secure=t.secure==null?typeof location<`u`&&location.protocol===`https:`:t.secure,t.hostname&&!t.port&&(t.port=this.secure?`443`:`80`),this.hostname=t.hostname||(typeof location<`u`?location.hostname:`localhost`),this.port=t.port||(typeof location<`u`&&location.port?location.port:this.secure?`443`:`80`),this.transports=[],this._transportsByName={},t.transports.forEach(e=>{let t=e.prototype.name;this.transports.push(t),this._transportsByName[t]=e}),this.opts=Object.assign({path:`/engine.io`,agent:!1,withCredentials:!1,upgrade:!0,timestampParam:`t`,rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,``)+(this.opts.addTrailingSlash?`/`:``),typeof this.opts.query==`string`&&(this.opts.query=Ee(this.opts.query)),Je&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener(`beforeunload`,this._beforeunloadEventListener,!1)),this.hostname!==`localhost`&&(this._offlineEventListener=()=>{this._onClose(`transport close`,{description:`network connection lost`})},Ye.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);let n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved(`error`,`No transports available`)},0);return}let t=this.opts.rememberUpgrade&&e.priorWebsocketSuccess&&this.transports.indexOf(`websocket`)!==-1?`websocket`:this.transports[0];this.readyState=`opening`;let n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on(`drain`,this._onDrain.bind(this)).on(`packet`,this._onPacket.bind(this)).on(`error`,this._onError.bind(this)).on(`close`,e=>this._onClose(`transport close`,e))}onOpen(){this.readyState=`open`,e.priorWebsocketSuccess=this.transport.name===`websocket`,this.emitReserved(`open`),this.flush()}_onPacket(e){if(this.readyState===`opening`||this.readyState===`open`||this.readyState===`closing`)switch(this.emitReserved(`packet`,e),this.emitReserved(`heartbeat`),e.type){case`open`:this.onHandshake(JSON.parse(e.data));break;case`ping`:this._sendPacket(`pong`),this.emitReserved(`ping`),this.emitReserved(`pong`),this._resetPingTimeout();break;case`error`:let t=Error(`server error`);t.code=e.data,this._onError(t);break;case`message`:this.emitReserved(`data`,e.data),this.emitReserved(`message`,e.data);break}}onHandshake(e){this.emitReserved(`handshake`,e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!==`closed`&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose(`ping timeout`)},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved(`drain`):this.flush()}flush(){if(this.readyState!==`closed`&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved(`flush`)}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name===`polling`&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let t=0;t<this.writeBuffer.length;t++){let n=this.writeBuffer[t].data;if(n&&(e+=Se(n)),t>0&&e>this._maxPayload)return this.writeBuffer.slice(0,t);e+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,me(()=>{this._onClose(`ping timeout`)},this.setTimeoutFn)),e}write(e,t,n){return this._sendPacket(`message`,e,t,n),this}send(e,t,n){return this._sendPacket(`message`,e,t,n),this}_sendPacket(e,t,n,r){if(typeof t==`function`&&(r=t,t=void 0),typeof n==`function`&&(r=n,n=null),this.readyState===`closing`||this.readyState===`closed`)return;n||={},n.compress=!1!==n.compress;let i={type:e,data:t,options:n};this.emitReserved(`packetCreate`,i),this.writeBuffer.push(i),r&&this.once(`flush`,r),this.flush()}close(){let e=()=>{this._onClose(`forced close`),this.transport.close()},t=()=>{this.off(`upgrade`,t),this.off(`upgradeError`,t),e()},n=()=>{this.once(`upgrade`,t),this.once(`upgradeError`,t)};return(this.readyState===`opening`||this.readyState===`open`)&&(this.readyState=`closing`,this.writeBuffer.length?this.once(`drain`,()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(t){if(e.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState===`opening`)return this.transports.shift(),this._open();this.emitReserved(`error`,t),this._onClose(`transport error`,t)}_onClose(e,t){if(this.readyState===`opening`||this.readyState===`open`||this.readyState===`closing`){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners(`close`),this.transport.close(),this.transport.removeAllListeners(),Je&&(this._beforeunloadEventListener&&removeEventListener(`beforeunload`,this._beforeunloadEventListener,!1),this._offlineEventListener)){let e=Ye.indexOf(this._offlineEventListener);e!==-1&&Ye.splice(e,1)}this.readyState=`closed`,this.id=null,this.emitReserved(`close`,e,t),this.writeBuffer=[],this._prevBufferLen=0}}};Xe.protocol=4;var Ze=class extends Xe{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState===`open`&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),n=!1;Xe.priorWebsocketSuccess=!1;let r=()=>{n||(t.send([{type:`ping`,data:`probe`}]),t.once(`packet`,e=>{if(!n)if(e.type===`pong`&&e.data===`probe`){if(this.upgrading=!0,this.emitReserved(`upgrading`,t),!t)return;Xe.priorWebsocketSuccess=t.name===`websocket`,this.transport.pause(()=>{n||this.readyState!==`closed`&&(l(),this.setTransport(t),t.send([{type:`upgrade`}]),this.emitReserved(`upgrade`,t),t=null,this.upgrading=!1,this.flush())})}else{let e=Error(`probe error`);e.transport=t.name,this.emitReserved(`upgradeError`,e)}}))};function i(){n||(n=!0,l(),t.close(),t=null)}let a=e=>{let n=Error(`probe error: `+e);n.transport=t.name,i(),this.emitReserved(`upgradeError`,n)};function o(){a(`transport closed`)}function s(){a(`socket closed`)}function c(e){t&&e.name!==t.name&&i()}let l=()=>{t.removeListener(`open`,r),t.removeListener(`error`,a),t.removeListener(`close`,o),this.off(`close`,s),this.off(`upgrading`,c)};t.once(`open`,r),t.once(`error`,a),t.once(`close`,o),this.once(`close`,s),this.once(`upgrading`,c),this._upgrades.indexOf(`webtransport`)!==-1&&e!==`webtransport`?this.setTimeoutFn(()=>{n||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let t=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}},Qe=class extends Ze{constructor(e,t={}){let n=typeof e==`object`?e:t;(!n.transports||n.transports&&typeof n.transports[0]==`string`)&&(n.transports=(n.transports||[`polling`,`websocket`,`webtransport`]).map(e=>He[e]).filter(e=>!!e)),super(e,n)}};Qe.protocol;function $e(e,t=``,n){let r=e;n||=typeof location<`u`&&location,e??=n.protocol+`//`+n.host,typeof e==`string`&&(e.charAt(0)===`/`&&(e=e.charAt(1)===`/`?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(e=n===void 0?`https://`+e:n.protocol+`//`+e),r=Ge(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port=`80`:/^(http|ws)s$/.test(r.protocol)&&(r.port=`443`)),r.path=r.path||`/`;let i=r.host.indexOf(`:`)===-1?r.host:`[`+r.host+`]`;return r.id=r.protocol+`://`+i+`:`+r.port+t,r.href=r.protocol+`://`+i+(n&&n.port===r.port?``:`:`+r.port),r}var et=typeof ArrayBuffer==`function`,tt=e=>typeof ArrayBuffer.isView==`function`?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,nt=Object.prototype.toString,rt=typeof Blob==`function`||typeof Blob<`u`&&nt.call(Blob)===`[object BlobConstructor]`,it=typeof File==`function`||typeof File<`u`&&nt.call(File)===`[object FileConstructor]`;function at(e){return et&&(e instanceof ArrayBuffer||tt(e))||rt&&e instanceof Blob||it&&e instanceof File}function ot(e,t){if(!e||typeof e!=`object`)return!1;if(Array.isArray(e)){for(let t=0,n=e.length;t<n;t++)if(ot(e[t]))return!0;return!1}if(at(e))return!0;if(e.toJSON&&typeof e.toJSON==`function`&&arguments.length===1)return ot(e.toJSON(),!0);for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&ot(e[t]))return!0;return!1}function st(e){let t=[],n=e.data,r=e;return r.data=ct(n,t),r.attachments=t.length,{packet:r,buffers:t}}function ct(e,t){if(!e)return e;if(at(e)){let n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){let n=Array(e.length);for(let r=0;r<e.length;r++)n[r]=ct(e[r],t);return n}else if(typeof e==`object`&&!(e instanceof Date)){let n={};for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=ct(e[r],t));return n}return e}function lt(e,t){return e.data=ut(e.data,t),delete e.attachments,e}function ut(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num==`number`&&e.num>=0&&e.num<t.length)return t[e.num];throw Error(`illegal attachments`)}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=ut(e[n],t);else if(typeof e==`object`)for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=ut(e[n],t));return e}var dt=s({Decoder:()=>mt,Encoder:()=>pt,PacketType:()=>P,isPacketValid:()=>xt,protocol:()=>5}),ft=[`connect`,`connect_error`,`disconnect`,`disconnecting`,`newListener`,`removeListener`],P;(function(e){e[e.CONNECT=0]=`CONNECT`,e[e.DISCONNECT=1]=`DISCONNECT`,e[e.EVENT=2]=`EVENT`,e[e.ACK=3]=`ACK`,e[e.CONNECT_ERROR=4]=`CONNECT_ERROR`,e[e.BINARY_EVENT=5]=`BINARY_EVENT`,e[e.BINARY_ACK=6]=`BINARY_ACK`})(P||={});var pt=class{constructor(e){this.replacer=e}encode(e){return(e.type===P.EVENT||e.type===P.ACK)&&ot(e)?this.encodeAsBinary({type:e.type===P.EVENT?P.BINARY_EVENT:P.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=``+e.type;return(e.type===P.BINARY_EVENT||e.type===P.BINARY_ACK)&&(t+=e.attachments+`-`),e.nsp&&e.nsp!==`/`&&(t+=e.nsp+`,`),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){let t=st(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}},mt=class e extends fe{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e==`function`?{reviver:e}:e)}add(e){let t;if(typeof e==`string`){if(this.reconstructor)throw Error(`got plaintext data when reconstructing a packet`);t=this.decodeString(e);let n=t.type===P.BINARY_EVENT;n||t.type===P.BINARY_ACK?(t.type=n?P.EVENT:P.ACK,this.reconstructor=new ht(t),t.attachments===0&&super.emitReserved(`decoded`,t)):super.emitReserved(`decoded`,t)}else if(at(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved(`decoded`,t));else throw Error(`got binary data when not reconstructing a packet`);else throw Error(`Unknown type: `+e)}decodeString(t){let n=0,r={type:Number(t.charAt(0))};if(P[r.type]===void 0)throw Error(`unknown packet type `+r.type);if(r.type===P.BINARY_EVENT||r.type===P.BINARY_ACK){let e=n+1;for(;t.charAt(++n)!==`-`&&n!=t.length;);let i=t.substring(e,n);if(i!=Number(i)||t.charAt(n)!==`-`)throw Error(`Illegal attachments`);let a=Number(i);if(!_t(a)||a<0)throw Error(`Illegal attachments`);if(a>this.opts.maxAttachments)throw Error(`too many attachments`);r.attachments=a}if(t.charAt(n+1)===`/`){let e=n+1;for(;++n&&!(t.charAt(n)===`,`||n===t.length););r.nsp=t.substring(e,n)}else r.nsp=`/`;let i=t.charAt(n+1);if(i!==``&&Number(i)==i){let e=n+1;for(;++n;){let e=t.charAt(n);if(e==null||Number(e)!=e){--n;break}if(n===t.length)break}r.id=Number(t.substring(e,n+1))}if(t.charAt(++n)){let i=this.tryParse(t.substr(n));if(e.isPayloadValid(r.type,i))r.data=i;else throw Error(`invalid payload`)}return r}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case P.CONNECT:return yt(t);case P.DISCONNECT:return t===void 0;case P.CONNECT_ERROR:return typeof t==`string`||yt(t);case P.EVENT:case P.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]==`number`||typeof t[0]==`string`&&ft.indexOf(t[0])===-1);case P.ACK:case P.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&=(this.reconstructor.finishedReconstruction(),null)}},ht=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){let e=lt(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function gt(e){return typeof e==`string`}var _t=Number.isInteger||function(e){return typeof e==`number`&&isFinite(e)&&Math.floor(e)===e};function vt(e){return e===void 0||_t(e)}function yt(e){return Object.prototype.toString.call(e)===`[object Object]`}function bt(e,t){switch(e){case P.CONNECT:return t===void 0||yt(t);case P.DISCONNECT:return t===void 0;case P.EVENT:return Array.isArray(t)&&(typeof t[0]==`number`||typeof t[0]==`string`&&ft.indexOf(t[0])===-1);case P.ACK:return Array.isArray(t);case P.CONNECT_ERROR:return typeof t==`string`||yt(t);default:return!1}}function xt(e){return gt(e.nsp)&&vt(e.id)&&bt(e.type,e.data)}function St(e,t,n){return e.on(t,n),function(){e.off(t,n)}}var Ct=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),wt=class extends fe{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[St(e,`open`,this.onopen.bind(this)),St(e,`packet`,this.onpacket.bind(this)),St(e,`error`,this.onerror.bind(this)),St(e,`close`,this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState===`open`&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift(`message`),this.emit.apply(this,e),this}emit(e,...t){if(Ct.hasOwnProperty(e))throw Error(`"`+e.toString()+`" is a reserved event name`);if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;let n={type:P.EVENT,data:t};if(n.options={},n.options.compress=this.flags.compress!==!1,typeof t[t.length-1]==`function`){let e=this.ids++,r=t.pop();this._registerAckCallback(e,r),n.id=e}let r=this.io.engine?.transport?.writable,i=this.connected&&!this.io.engine?._hasPingExpired();return this.flags.volatile&&!r||(i?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n)),this.flags={},this}_registerAckCallback(e,t){let n=this.flags.timeout??this._opts.ackTimeout;if(n===void 0){this.acks[e]=t;return}let r=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,Error(`operation has timed out`))},n),i=(...e)=>{this.io.clearTimeoutFn(r),t.apply(this,e)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...t){return new Promise((n,r)=>{let i=(e,t)=>e?r(e):n(t);i.withError=!0,t.push(i),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]==`function`&&(t=e.pop());let n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((e,...r)=>(this._queue[0],e===null?(this._queue.shift(),t&&t(null,...r)):n.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth==`function`?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:P.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved(`connect_error`,e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved(`disconnect`,e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(t=>String(t.id)===e)){let t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,Error(`socket has been disconnected`))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case P.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved(`connect_error`,Error(`It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)`));break;case P.EVENT:case P.BINARY_EVENT:this.onevent(e);break;case P.ACK:case P.BINARY_ACK:this.onack(e);break;case P.DISCONNECT:this.ondisconnect();break;case P.CONNECT_ERROR:this.destroy();let t=Error(e.data.message);t.data=e.data.data,this.emitReserved(`connect_error`,t);break}}onevent(e){let t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let t=this._anyListeners.slice();for(let n of t)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]==`string`&&(this._lastOffset=e[e.length-1])}ack(e){let t=this,n=!1;return function(...r){n||(n=!0,t.packet({type:P.ACK,id:e,data:r}))}}onack(e){let t=this.acks[e.id];typeof t==`function`&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved(`connect`)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose(`io server disconnect`)}destroy(){this.subs&&=(this.subs.forEach(e=>e()),void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:P.DISCONNECT}),this.destroy(),this.connected&&this.onclose(`io client disconnect`),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let t=this._anyOutgoingListeners.slice();for(let n of t)n.apply(this,e.data)}}};function Tt(e){e||={},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Tt.prototype.duration=function(){var e=this.ms*this.factor**+ this.attempts++;if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0},Tt.prototype.reset=function(){this.attempts=0},Tt.prototype.setMin=function(e){this.ms=e},Tt.prototype.setMax=function(e){this.max=e},Tt.prototype.setJitter=function(e){this.jitter=e};var Et=class extends fe{constructor(e,t){super(),this.nsps={},this.subs=[],e&&typeof e==`object`&&(t=e,e=void 0),t||={},t.path=t.path||`/socket.io`,this.opts=t,be(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor??.5),this.backoff=new Tt({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState=`closed`,this.uri=e;let n=t.parser||dt;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)==null||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)==null||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)==null||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf(`open`))return this;this.engine=new Qe(this.uri,this.opts);let t=this.engine,n=this;this._readyState=`opening`,this.skipReconnect=!1;let r=St(t,`open`,function(){n.onopen(),e&&e()}),i=t=>{this.cleanup(),this._readyState=`closed`,this.emitReserved(`error`,t),e?e(t):this.maybeReconnectOnOpen()},a=St(t,`error`,i);if(!1!==this._timeout){let e=this._timeout,n=this.setTimeoutFn(()=>{r(),i(Error(`timeout`)),t.close()},e);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}return this.subs.push(r),this.subs.push(a),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState=`open`,this.emitReserved(`open`);let e=this.engine;this.subs.push(St(e,`ping`,this.onping.bind(this)),St(e,`data`,this.ondata.bind(this)),St(e,`error`,this.onerror.bind(this)),St(e,`close`,this.onclose.bind(this)),St(this.decoder,`decoded`,this.ondecoded.bind(this)))}onping(){this.emitReserved(`ping`)}ondata(e){try{this.decoder.add(e)}catch(e){this.onclose(`parse error`,e)}}ondecoded(e){me(()=>{this.emitReserved(`packet`,e)},this.setTimeoutFn)}onerror(e){this.emitReserved(`error`,e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new wt(this,e,t),this.nsps[e]=n),n}_destroy(e){let t=Object.keys(this.nsps);for(let e of t)if(this.nsps[e].active)return;this._close()}_packet(e){let t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose(`forced close`)}disconnect(){return this._close()}onclose(e,t){var n;this.cleanup(),(n=this.engine)==null||n.close(),this.backoff.reset(),this._readyState=`closed`,this.emitReserved(`close`,e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved(`reconnect_failed`),this._reconnecting=!1;else{let t=this.backoff.duration();this._reconnecting=!0;let n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved(`reconnect_attempt`,e.backoff.attempts),!e.skipReconnect&&e.open(t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved(`reconnect_error`,t)):e.onreconnect()}))},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved(`reconnect`,e)}},Dt={};function Ot(e,t){typeof e==`object`&&(t=e,e=void 0),t||={};let n=$e(e,t.path||`/socket.io`),r=n.source,i=n.id,a=n.path,o=Dt[i]&&a in Dt[i].nsps,s=t.forceNew||t[`force new connection`]||!1===t.multiplex||o,c;return s?c=new Et(r,t):(Dt[i]||(Dt[i]=new Et(r,t)),c=Dt[i]),n.query&&!t.query&&(t.query=n.queryKey),c.socket(n.path,t)}Object.assign(Ot,{Manager:Et,Socket:wt,io:Ot,connect:Ot});var kt=2e3,At=4e3,jt=1e3;function Mt(e){return e?Array.isArray(e)?{models:e}:Array.isArray(e.models)?e:null:null}function Nt(e,t){return t?`${t.replace(/\/$/,``)}${e}`:e}function Pt(e=``){let[t,n]=(0,v.useState)([]),[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(`connecting`),[s,c]=(0,v.useState)(0),[l,u]=(0,v.useState)(null),[d,f]=(0,v.useState)(!1),[p,m]=(0,v.useState)(0),[h,g]=(0,v.useState)(`speed`),[_,y]=(0,v.useState)(!1),[b,x]=(0,v.useState)(0),[S,C]=(0,v.useState)(0),[w,T]=(0,v.useState)(null),E=(0,v.useRef)(null),D=(0,v.useRef)(null),O=(0,v.useRef)(null),ee=(0,v.useRef)(0),te=(0,v.useRef)(0),k=(0,v.useRef)(!1),ne=(0,v.useCallback)((e,t=`unknown`)=>{let r=Mt(e);!r||!k.current||(n(r.models??[]),g(r.pingMode??`speed`),u(r.nextPingAt??null),f(!!r.isPinging),m(Number.isFinite(r.pendingPings)?r.pendingPings:0),y(!!r.globalBenchmarkRunning),x(Number.isFinite(r.globalBenchmarkTotal)?r.globalBenchmarkTotal:0),C(Number.isFinite(r.globalBenchmarkCompleted)?r.globalBenchmarkCompleted:0),T(r.updateStatus&&r.updateStatus.allowedOutdated?r.updateStatus:null),c(e=>e+1),ee.current=Date.now(),t!==`poll`&&(i(!0),o(t)))},[]),re=(0,v.useCallback)(async()=>{try{let t=await fetch(Nt(`/api/state`,e),{headers:{Accept:`application/json`}});if(t.ok){ne(await t.json(),`poll`),i(!0),o(e=>e===`socket`||e===`sse`?e:`poll`);return}}catch{}try{let t=await fetch(Nt(`/api/models`,e),{headers:{Accept:`application/json`}});if(!t.ok)throw Error(`HTTP ${t.status}`);ne(await t.json(),`poll`),i(!0),o(e=>e===`socket`||e===`sse`?e:`poll`)}catch{i(!1),o(`offline`)}},[ne,e]),ie=(0,v.useCallback)(()=>{if(!(D.current||!k.current))try{let t=new EventSource(Nt(`/api/events`,e));D.current=t,t.onopen=()=>{k.current&&(i(!0),o(`sse`))};let n=e=>{try{ne(JSON.parse(e.data),`sse`)}catch(e){console.warn(`[useSocket] SSE parse error:`,e)}};t.onmessage=n,t.addEventListener(`models`,n),t.onerror=()=>{t.close(),D.current===t&&(D.current=null),E.current?.connected||i(!1)}}catch{D.current=null}},[ne,e]),ae=(0,v.useCallback)(()=>{let t=Date.now();if(!(t-te.current<jt)){if(te.current=t,E.current?.connected){E.current.emit(`client:activity`);return}fetch(Nt(`/api/activity`,e),{method:`POST`}).catch(()=>{})}},[e]);return(0,v.useEffect)(()=>{k.current=!0;let t=Ot(e||void 0,{transports:[`websocket`,`polling`],reconnectionDelay:500,reconnectionDelayMax:2500,timeout:1200});E.current=t,t.on(`connect`,()=>{i(!0),o(`socket`),D.current?.close(),D.current=null,t.emit(`models:refresh`),t.emit(`client:activity`)}),t.on(`disconnect`,()=>{k.current&&(i(!1),ie())}),t.on(`connect_error`,()=>{k.current&&(i(!1),ie())}),t.on(`models:update`,e=>ne(e,`socket`)),O.current=setInterval(()=>{let e=Date.now()-ee.current>At;(!t.connected||e)&&re()},kt),re();let n=[`keydown`,`pointerdown`,`mousemove`,`focus`];for(let e of n)window.addEventListener(e,ae,{passive:!0});return()=>{k.current=!1;for(let e of n)window.removeEventListener(e,ae);O.current&&clearInterval(O.current),t.disconnect(),D.current?.close(),E.current=null,D.current=null}},[ne,re,ae,e,ie]),{models:t,connected:r,transport:a,updateCount:s,nextPingAt:l,isPinging:d,pendingPings:p,pingMode:h,globalBenchmarkRunning:_,globalBenchmarkTotal:b,globalBenchmarkCompleted:S,updateStatus:w}}var Ft={"S+":0,S:1,"A+":2,A:3,"A-":4,"B+":5,B:6,C:7},It={Perfect:0,Normal:1,Slow:2,Spiky:3,"Very Slow":4,Overloaded:5,Unstable:6,"Not Active":7,Pending:8};function Lt(e){return Ft[e]??99}function Rt(e){return It[e]??99}function zt(e){return!e||e===`—`?0:parseFloat(e.replace(`%`,``))||0}function Bt(e){let t=zt(e);return t>=65?`sweHigh`:t>=40?`sweMid`:`sweLow`}function Vt(e){return e==null||e===1/0||e>99e3?{text:`—`,cls:`pingNone`}:{text:`${e}ms`,cls:Ht(e)}}function Ht(e){return e==null||e===1/0?`pingNone`:e<500?`pingFast`:e<1500?`pingMedium`:`pingSlow`}function Ut(e){if(!e||e===`—`)return 0;let t=e.toLowerCase();return t.includes(`m`)?parseFloat(t)*1e3:t.includes(`k`)?parseFloat(t):0}function Wt(e){return!e||e.length<8?`••••••••`:`••••••••`+e.slice(-4)}var Gt=[`all`,`S+`,`S`,`A+`,`A`,`A-`,`B+`,`B`,`C`],Kt=[`all`,`up`,`down`,`pending`],qt=[`all`,`Perfect`,`Normal`,`Spiky`,`Slow`,`Overloaded`,`Down`,`Unstable`,`Pending`],Jt=[`all`,`up`,`timeout`,`down`,`pending`,`noauth`,`auth_error`],Yt=[`normal`,`configured`,`usable`];function Xt(e){return e.idx??9999}function Zt(e){return e.pingHistory||e.pings||[]}function Qt(e){let t=Zt(e);return(t.length>0?t[t.length-1]:null)?.ms??null}function $t(e){let t=Zt(e).map(e=>e?.ms).filter(e=>typeof e==`number`&&Number.isFinite(e));return t.length<2?null:t[t.length-1]-t[0]}function en(e){return typeof e==`number`&&Number.isFinite(e)?e:null}function tn(e,t,n){let r=e==null,i=t==null;return r&&i?0:r?1:i?-1:(e-t)*n}function nn(e,t,n){let r=typeof e==`string`?e:``,i=typeof t==`string`?t:``,a=r.length===0,o=i.length===0;return a&&o?0:a?1:o?-1:r.localeCompare(i)*n}var rn={up:0,pending:1,timeout:2,down:3,noauth:4,auth_error:5};function an(e){let[t,n]=(0,v.useState)(`all`),[r,i]=(0,v.useState)(`all`),[a,o]=(0,v.useState)(`all`),[s,c]=(0,v.useState)(`all`),[l,u]=(0,v.useState)(`all`),[d,f]=(0,v.useState)(`normal`),[p,m]=(0,v.useState)(``),[h,g]=(0,v.useState)(null),[_,y]=(0,v.useState)(`avg`),[b,x]=(0,v.useState)(`asc`),S=(0,v.useCallback)((e,t,n)=>{n(t[(t.indexOf(e)+1)%t.length])},[]),C=(0,v.useCallback)(()=>S(t,Gt,n),[t,S]),w=(0,v.useCallback)(()=>S(r,Kt,i),[r,S]),T=(0,v.useCallback)(()=>S(s,qt,c),[s,S]),E=(0,v.useCallback)(()=>S(l,Jt,u),[l,S]),D=(0,v.useCallback)(()=>S(d,Yt,f),[d,S]),O=(0,v.useCallback)(e=>{if(_!==e){y(e),x(`asc`);return}if(b===`asc`){x(`desc`);return}y(null),x(`asc`)},[_,b]),ee=(0,v.useCallback)(()=>{n(`all`),i(`all`),o(`all`),c(`all`),u(`all`),f(`normal`),m(``),g(null),y(`avg`),x(`asc`)},[]);return{filtered:(0,v.useMemo)(()=>{let n=[...e];t!==`all`&&(n=n.filter(e=>e.tier===t)),r!==`all`&&(n=n.filter(e=>r===`up`?e.status===`up`:r===`down`?e.status===`down`||e.status===`timeout`:r===`pending`?e.status===`pending`:!0)),a!==`all`&&(n=n.filter(e=>e.providerKey===a)),s!==`all`&&(n=n.filter(e=>e.verdict===s)),l!==`all`&&(n=n.filter(e=>e.status===l)),d===`configured`?n=n.filter(e=>e.hasApiKey&&e.status!==`noauth`&&e.status!==`auth_error`):d===`usable`&&(n=n.filter(e=>e.status===`up`?[`Perfect`,`Normal`,`Slow`].includes(e.verdict):!1));let i=p.trim().toLowerCase(),o=(h||``).trim().toLowerCase();return i&&(n=n.filter(e=>e.label.toLowerCase().includes(i)||e.modelId.toLowerCase().includes(i)||e.origin.toLowerCase().includes(i)||e.tier.toLowerCase().includes(i)||(e.verdict||``).toLowerCase().includes(i))),o&&(n=n.filter(e=>e.label.toLowerCase().includes(o)||e.modelId.toLowerCase().includes(o)||e.origin.toLowerCase().includes(o)||(e.ctx||``).toLowerCase().includes(o)||(e.providerKey||``).toLowerCase().includes(o))),n.sort((e,t)=>{if(!_)return Xt(e)-Xt(t);let n=b===`desc`?-1:1,r=0;return _===`mood`?r=tn(Rt(e.verdict),Rt(t.verdict),n):_===`idx`?r=tn(Xt(e),Xt(t),n):_===`tier`?r=tn(Lt(e.tier),Lt(t.tier),n):_===`label`?r=nn(e.label,t.label,n):_===`origin`?r=nn(e.origin,t.origin,n):_===`sweScore`?r=tn(zt(e.sweScore),zt(t.sweScore),n):_===`ctx`?r=tn(Ut(e.ctx),Ut(t.ctx),n):_===`latestPing`?r=tn(Qt(e),Qt(t),n):_===`avg`?r=tn(e.avg==null||e.avg===1/0||e.avg>99e3?null:e.avg,t.avg==null||t.avg===1/0||t.avg>99e3?null:t.avg,n):_===`condition`?r=tn(rn[e.status]??9,rn[t.status]??9,n):_===`verdict`?r=tn(Rt(e.verdict),Rt(t.verdict),n):_===`stability`?r=tn(en(e.stability),en(t.stability),n):_===`uptime`?r=tn(en(e.uptime),en(t.uptime),n):_===`aiLatency`?r=tn(e.benchmark?.ok?e.benchmark.totalMs:null,t.benchmark?.ok?t.benchmark.totalMs:null,n):_===`tps`?r=tn(e.benchmark?.ok?e.benchmark.tokensPerSecond??0:null,t.benchmark?.ok?t.benchmark.tokensPerSecond??0:null,n):_===`trend`&&(r=tn($t(e),$t(t),n)),r||Xt(e)-Xt(t)}),n},[e,t,r,a,s,l,d,p,h,_,b]),filterTier:t,setFilterTier:n,cycleTier:C,filterStatus:r,setFilterStatus:i,cycleStatus:w,filterProvider:a,setFilterProvider:o,filterVerdict:s,setFilterVerdict:c,cycleVerdict:T,filterHealth:l,setFilterHealth:u,cycleHealth:E,visibilityMode:d,setVisibilityMode:f,cycleVisibility:D,searchQuery:p,setSearchQuery:m,customTextFilter:h,setCustomTextFilter:g,sortColumn:_,sortDirection:b,toggleSort:O,resetView:ee}}var on=[`auto`,`dark`,`light`];function sn(){if(typeof window>`u`||typeof window.matchMedia!=`function`)return`dark`;try{return window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`}catch{return`dark`}}function cn(){if(typeof document>`u`)return`auto`;let e=document.documentElement.getAttribute(`data-theme`);return e===`auto`||e===`dark`||e===`light`?e:`auto`}function ln(){let[e,t]=(0,v.useState)(cn),[n,r]=(0,v.useState)(sn);(0,v.useEffect)(()=>{if(typeof window>`u`||typeof window.matchMedia!=`function`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`),t=e=>r(e.matches?`dark`:`light`);if(typeof e.addEventListener==`function`)return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t);if(typeof e.addListener==`function`)return e.addListener(t),()=>e.removeListener(t)},[]),(0,v.useEffect)(()=>{let t=e===`auto`?n:e;document.documentElement.setAttribute(`data-theme`,t),document.documentElement.setAttribute(`data-theme-preference`,e)},[e,n]);let i=(0,v.useCallback)(()=>{t(e=>on[(on.indexOf(e)+1)%on.length])},[]),a=(0,v.useCallback)(e=>{on.includes(e)&&t(e)},[]);return{theme:e,resolvedTheme:e===`auto`?n:e,setTheme:a,cycle:i}}var un=Object.freeze([]);function dn({models:e}={}){let[t,n]=(0,v.useState)(un),[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(!0),[s,c]=(0,v.useState)(null),l=(0,v.useCallback)(async()=>{try{let e=await fetch(`/api/favorites`);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();n(Array.isArray(t.favorites)?t.favorites:[]),i(!!t.pinnedAndSticky),c(null)}catch(e){c(e.message||`Failed to load favorites`),n(un),i(!1)}finally{o(!1)}},[]);(0,v.useEffect)(()=>{l()},[l]);let u=(0,v.useMemo)(()=>{let e=new Map;return t.forEach((t,n)=>e.set(t,n)),e},[t]),d=(0,v.useCallback)(e=>{if(!e)return!1;let t=`${e.providerKey}/${e.modelId}`;return u.has(t)},[u]),f=(0,v.useCallback)(e=>{if(!e)return 2**53-1;let t=`${e.providerKey}/${e.modelId}`,n=u.get(t);return n===void 0?2**53-1:n},[u]),p=(0,v.useCallback)(e=>e?`${e.providerKey}/${e.modelId}`:null,[]),m=(0,v.useCallback)(async e=>{try{let t=await fetch(`/api/favorites`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({favorites:e})});if(!t.ok)throw Error(`HTTP ${t.status}`);n(e)}catch(e){c(e.message||`Failed to save favorites`)}},[]);return{favorites:t,pinnedAndSticky:r,isFavorite:d,favoriteRank:f,toggle:(0,v.useCallback)(async e=>{let n=p(e);n&&await m(u.has(n)?t.filter(e=>e!==n):[...t,n])},[t,u,p,m]),reorder:(0,v.useCallback)(async(e,n)=>{let r=p(e);if(!r)return;let i=t.indexOf(r);if(i<0)return;let a=n===`up`?i-1:i+1;if(a<0||a>=t.length)return;let o=[...t];[o[i],o[a]]=[o[a],o[i]],await m(o)},[t,p,m]),setPinnedAndSticky:(0,v.useCallback)(async e=>{i(!!e);try{await fetch(`/api/favorites`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({pinnedAndSticky:!!e})})}catch(e){c(e.message||`Failed to save display mode`)}},[]),refresh:l,loading:a,error:s}}var fn=[`opencode`,`opencode-desktop`,`opencode-web`,`openclaw`,`crush`,`goose`,`pi`,`aider`,`qwen`,`openhands`,`amp`,`forgecode`,`fcm_router`],pn=`opencode`;function mn(e){return fn.includes(e)?e:pn}function hn({onToast:e}={}){let[t,n]=(0,v.useState)(pn),r=(0,v.useRef)(!1);(0,v.useEffect)(()=>{let t=!1;async function i(){try{let e=await fetch(`/api/tool-mode`),i=await e.json().catch(()=>({}));!t&&!r.current&&e.ok&&n(mn(i.mode))}catch(n){t||e?.(`Tool mode load failed: ${n.message}`,`error`)}}return i(),()=>{t=!0}},[e]);let i=(0,v.useCallback)(async t=>{let i=mn(t);r.current=!0,n(i);try{let e=await fetch(`/api/tool-mode`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({mode:i})}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||`HTTP ${e.status}`);return n(mn(t.mode)),{ok:!0,mode:mn(t.mode)}}catch(t){return e?.(`Tool mode save failed: ${t.message}`,`error`),{ok:!1,error:t.message,mode:i}}},[e]),a=(0,v.useCallback)(()=>i(fn[(TOOL_MODE_ORDER.indexOf(t)+1)%fn.length]||pn),[i,t]);return{toolMode:t,tools:(0,v.useMemo)(()=>[...fn],[]),setToolMode:i,cycleToolMode:a}}var gn={opencode:{label:`OpenCode CLI`,emoji:`📦`,flag:`--opencode`,color:[110,214,255]},"opencode-desktop":{label:`OpenCode Desktop`,emoji:`📦`,flag:`--opencode-desktop`,color:[149,205,255]},"opencode-web":{label:`OpenCode Web`,emoji:`📦`,flag:`--opencode-web`,color:[180,220,255]},openclaw:{label:`OpenClaw`,emoji:`🦞`,flag:`--openclaw`,color:[255,129,129]},crush:{label:`Crush`,emoji:`💘`,flag:`--crush`,color:[255,168,209]},goose:{label:`Goose`,emoji:`🪿`,flag:`--goose`,color:[132,235,168]},pi:{label:`Pi`,emoji:`π`,flag:`--pi`,color:[173,216,230]},aider:{label:`Aider`,emoji:`🛠`,flag:`--aider`,color:[255,208,102]},kilo:{label:`Kilo CLI`,emoji:`⚡️`,flag:`--kilo`,color:[255,107,107]},qwen:{label:`Qwen Code`,emoji:`🐉`,flag:`--qwen`,color:[255,213,128]},openhands:{label:`OpenHands`,emoji:`🤲`,flag:`--openhands`,color:[228,191,239]},amp:{label:`Amp`,emoji:`⚡`,flag:`--amp`,color:[255,232,98]},hermes:{label:`Hermes`,emoji:`🔮`,flag:`--hermes`,color:[200,160,255]},continue:{label:`Continue CLI`,emoji:`▶️`,flag:`--continue`,color:[255,100,100]},cline:{label:`Cline`,emoji:`🧠`,flag:`--cline`,color:[100,220,180]},rovo:{label:`Rovo Dev CLI`,emoji:`🦘`,flag:`--rovo`,color:[148,163,184],cliOnly:!0},gemini:{label:`Gemini CLI`,emoji:`♊`,flag:`--gemini`,color:[66,165,245],cliOnly:!0},caveman:{label:`Caveman Code`,emoji:`🪨`,flag:`--caveman`,color:[180,130,80]},jcode:{label:`jcode`,emoji:`🪼`,flag:`--jcode`,color:[255,140,0]},xcode:{label:`Xcode Intelligence`,emoji:`🛠️`,flag:`--xcode`,color:[20,126,251]},fcm_router:{label:`FCM Router`,emoji:`🧭`,flag:`--fcm-router`,color:[80,200,120]},copilot:{label:`Copilot CLI`,emoji:`🤖`,flag:`--copilot`,color:[200,220,255]},forgecode:{label:`ForgeCode`,emoji:`🔥`,flag:`--forgecode`,color:[255,120,50]}},_n=[`opencode`,`pi`,`jcode`,`opencode-desktop`,`opencode-web`,`openclaw`,`crush`,`goose`,`aider`,`kilo`,`qwen`,`openhands`,`amp`,`hermes`,`continue`,`cline`,`xcode`,`fcm_router`,`rovo`,`gemini`,`caveman`,`copilot`,`forgecode`];function vn(e){return gn[e]||{label:e,emoji:`•`,flag:null}}var yn=Object.keys(gn).filter(e=>!gn[e].cliOnly);function bn(e){return e===`rovo`?[`rovo`]:e===`gemini`?[`gemini`]:yn}function xn(e,t){return bn(e).includes(t)}function Sn(e,t,n,r=3){let i=parseFloat(e)||0;return n.filter(e=>!e.hidden&&xn(e.providerKey,t)).map(e=>({modelId:e.modelId,label:e.label,tier:e.tier,sweScore:e.sweScore||`-`,providerKey:e.providerKey,sweDelta:Math.abs((parseFloat(e.sweScore)||0)-i)})).sort((e,t)=>e.sweDelta-t.sweDelta).slice(0,r)}var Cn=new Set([`S+`,`S`,`A+`,`A`,`A-`,`B+`,`B`,`C`,`all`]),wn=new Set([`up`,`down`,`pending`,`all`]),Tn=new Set([`mood`,`idx`,`tier`,`sweScore`,`ctx`,`label`,`origin`,`latestPing`,`avg`,`condition`,`verdict`,`stability`,`uptime`,`aiLatency`,`tps`,`trend`]),En=new Set([`dashboard`,`settings`,`analytics`,`recommend`,`router`,`help`,`changelog`]),Dn=new Set([`asc`,`desc`]),On=new Set(_n);function kn(){if(typeof window>`u`)return null;let e=new URLSearchParams(window.location.search),t={};return e.has(`view`)&&En.has(e.get(`view`))&&(t.view=e.get(`view`)),e.has(`tier`)&&Cn.has(e.get(`tier`))&&(t.tier=e.get(`tier`)),e.has(`status`)&&wn.has(e.get(`status`))&&(t.status=e.get(`status`)),e.has(`provider`)&&(t.provider=e.get(`provider`)),e.has(`verdict`)&&(t.verdict=e.get(`verdict`)),e.has(`health`)&&(t.health=e.get(`health`)),e.has(`sort`)&&Tn.has(e.get(`sort`))&&(t.sort=e.get(`sort`)),e.has(`dir`)&&Dn.has(e.get(`dir`))&&(t.dir=e.get(`dir`)),e.has(`q`)&&(t.q=e.get(`q`)),e.has(`toolMode`)&&On.has(e.get(`toolMode`))&&(t.toolMode=e.get(`toolMode`)),e.has(`recommend`)&&[`1`,`true`,`open`].includes(e.get(`recommend`))&&(t.view=`recommend`),e.has(`palette`)&&e.get(`palette`)===`open`&&(t.palette=`open`),t}function An(e){let t=new URLSearchParams;return e?(e.currentView&&e.currentView!==`dashboard`&&t.set(`view`,e.currentView),e.filterTier&&e.filterTier!==`all`&&t.set(`tier`,e.filterTier),e.filterStatus&&e.filterStatus!==`all`&&t.set(`status`,e.filterStatus),e.filterProvider&&e.filterProvider!==`all`&&t.set(`provider`,e.filterProvider),e.filterVerdict&&e.filterVerdict!==`all`&&t.set(`verdict`,e.filterVerdict),e.filterHealth&&e.filterHealth!==`all`&&t.set(`health`,e.filterHealth),e.sortColumn&&(t.set(`sort`,e.sortColumn),e.sortDirection&&t.set(`dir`,e.sortDirection)),e.searchQuery&&t.set(`q`,e.searchQuery),e.toolMode&&t.set(`toolMode`,e.toolMode),e.paletteOpen&&t.set(`palette`,`open`),t):t}function jn(e){if(typeof window>`u`)return;let t=An(e).toString(),n=t?`${window.location.pathname}?${t}${window.location.hash}`:`${window.location.pathname}${window.location.hash}`;window.history.replaceState({},``,n)}function Mn({currentView:e,setCurrentView:t,filterState:n=null,paletteOpen:r=!1,setPaletteOpen:i=()=>{},toolMode:a=null,setToolMode:o=()=>{}}){let s=(0,v.useRef)(null),c=(0,v.useRef)(!1);(0,v.useEffect)(()=>{if(c.current)return;c.current=!0;let r=kn();r&&(r.view&&t&&r.view!==e&&t(r.view),r.tier&&n?.setFilterTier&&n.setFilterTier(r.tier),r.status&&n?.setFilterStatus&&n.setFilterStatus(r.status),r.provider&&n?.setFilterProvider&&n.setFilterProvider(r.provider),r.verdict&&n?.setFilterVerdict&&n.setFilterVerdict(r.verdict),r.health&&n?.setFilterHealth&&n.setFilterHealth(r.health),r.sort&&n?.toggleSort&&(n.setSortColumn&&n.setSortColumn(r.sort),r.dir&&n.setSortDirection&&n.setSortDirection(r.dir)),r.q!==void 0&&n?.setSearchQuery&&n.setSearchQuery(r.q),r.toolMode&&o&&o(r.toolMode),r.palette===`open`&&i&&i(!0))},[]),(0,v.useEffect)(()=>{if(c.current)return s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{jn({currentView:e,filterTier:n?.filterTier,filterStatus:n?.filterStatus,filterProvider:n?.filterProvider,filterVerdict:n?.filterVerdict,filterHealth:n?.filterHealth,sortColumn:n?.sortColumn,sortDirection:n?.sortDirection,searchQuery:n?.searchQuery,toolMode:a,paletteOpen:r})},80),()=>{s.current&&clearTimeout(s.current)}},[e,r,a,n?.filterTier,n?.filterStatus,n?.filterProvider,n?.filterVerdict,n?.filterHealth,n?.sortColumn,n?.sortDirection,n?.searchQuery])}var Nn=5*6e4;function Pn(e,t){if(!e||!t)return 0;let n=e.replace(/^v/,``).split(`.`).map(Number),r=t.replace(/^v/,``).split(`.`).map(Number);for(let e=0;e<Math.max(n.length,r.length);e++){let t=n[e]||0,i=r[e]||0;if(i!==t)return i-t}return 0}function Fn({onToast:e}={}){let[t,n]=(0,v.useState)(null),[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)(!1),d=(0,v.useRef)(null),f=(0,v.useCallback)(async()=>{u(!0);try{let e=await fetch(`/api/version`);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();n(t.local??null),i(t.latest??null),o(t.lastReleaseDate??null),c(t.error??null)}catch(e){c(e.message||`update check failed`)}finally{u(!1)}},[]);(0,v.useEffect)(()=>(f(),d.current=setInterval(f,Nn),()=>{d.current&&clearInterval(d.current)}),[f]);let p=!!(r&&t&&Pn(r,t)>0);return{localVersion:t,latestVersion:r,lastReleaseDate:a,updateAvailable:p,checkNow:f,runUpdate:(0,v.useCallback)(async()=>{if(!p){e?.(`No update available.`,`info`);return}try{let t=await fetch(`/api/update/run`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({version:r})}),n=await t.json().catch(()=>({}));t.ok&&n?.started?e?.(`Update to v${r} started — restart the dashboard to apply.`,`success`):e?.(n?.error||n?.message||`Update failed`,`error`)}catch(t){e?.(t.message||`Update request failed`,`error`)}},[p,r,e]),loading:l,error:s}}var In={outline:{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},filled:{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`currentColor`,stroke:`none`}},F=(e,t,n,r)=>{let i=(0,v.forwardRef)(({color:n=`currentColor`,size:i=24,stroke:a=2,title:o,className:s,children:c,...l},u)=>(0,v.createElement)(`svg`,{ref:u,...In[e],width:i,height:i,className:[`tabler-icon`,`tabler-icon-${t}`,s].join(` `),...e===`filled`?{fill:n}:{strokeWidth:a,stroke:n},...l},[o&&(0,v.createElement)(`title`,{key:`svg-title`},o),...r.map(([e,t])=>(0,v.createElement)(e,t)),...Array.isArray(c)?c:[c]]));return i.displayName=`${n}`,i},Ln=F(`outline`,`activity`,`Activity`,[[`path`,{d:`M3 12h4l3 8l4 -16l3 8h4`,key:`svg-0`}]]),Rn=F(`outline`,`alert-octagon`,`AlertOctagon`,[[`path`,{d:`M12.802 2.165l5.575 2.389c.48 .206 .863 .589 1.07 1.07l2.388 5.574c.22 .512 .22 1.092 0 1.604l-2.389 5.575c-.206 .48 -.589 .863 -1.07 1.07l-5.574 2.388c-.512 .22 -1.092 .22 -1.604 0l-5.575 -2.389a2.036 2.036 0 0 1 -1.07 -1.07l-2.388 -5.574a2.036 2.036 0 0 1 0 -1.604l2.389 -5.575c.206 -.48 .589 -.863 1.07 -1.07l5.574 -2.388a2.036 2.036 0 0 1 1.604 0`,key:`svg-0`}],[`path`,{d:`M12 8v4`,key:`svg-1`}],[`path`,{d:`M12 16h.01`,key:`svg-2`}]]),zn=F(`outline`,`alert-triangle`,`AlertTriangle`,[[`path`,{d:`M12 9v4`,key:`svg-0`}],[`path`,{d:`M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0`,key:`svg-1`}],[`path`,{d:`M12 16h.01`,key:`svg-2`}]]),Bn=F(`outline`,`arrow-down`,`ArrowDown`,[[`path`,{d:`M12 5l0 14`,key:`svg-0`}],[`path`,{d:`M18 13l-6 6`,key:`svg-1`}],[`path`,{d:`M6 13l6 6`,key:`svg-2`}]]),Vn=F(`outline`,`arrow-left`,`ArrowLeft`,[[`path`,{d:`M5 12l14 0`,key:`svg-0`}],[`path`,{d:`M5 12l6 6`,key:`svg-1`}],[`path`,{d:`M5 12l6 -6`,key:`svg-2`}]]),Hn=F(`outline`,`arrow-up`,`ArrowUp`,[[`path`,{d:`M12 5l0 14`,key:`svg-0`}],[`path`,{d:`M18 11l-6 -6`,key:`svg-1`}],[`path`,{d:`M6 11l6 -6`,key:`svg-2`}]]),Un=F(`outline`,`ban`,`Ban`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`,key:`svg-0`}],[`path`,{d:`M5.7 5.7l12.6 12.6`,key:`svg-1`}]]),Wn=F(`outline`,`bolt`,`Bolt`,[[`path`,{d:`M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11`,key:`svg-0`}]]),Gn=F(`outline`,`braces`,`Braces`,[[`path`,{d:`M7 4a2 2 0 0 0 -2 2v3a2 3 0 0 1 -2 3a2 3 0 0 1 2 3v3a2 2 0 0 0 2 2`,key:`svg-0`}],[`path`,{d:`M17 4a2 2 0 0 1 2 2v3a2 3 0 0 0 2 3a2 3 0 0 0 -2 3v3a2 2 0 0 1 -2 2`,key:`svg-1`}]]),Kn=F(`outline`,`check`,`Check`,[[`path`,{d:`M5 12l5 5l10 -10`,key:`svg-0`}]]),qn=F(`outline`,`checks`,`Checks`,[[`path`,{d:`M7 12l5 5l10 -10`,key:`svg-0`}],[`path`,{d:`M2 12l5 5m5 -5l5 -5`,key:`svg-1`}]]),Jn=F(`outline`,`chevron-down`,`ChevronDown`,[[`path`,{d:`M6 9l6 6l6 -6`,key:`svg-0`}]]),Yn=F(`outline`,`chevron-left`,`ChevronLeft`,[[`path`,{d:`M15 6l-6 6l6 6`,key:`svg-0`}]]),Xn=F(`outline`,`chevron-right`,`ChevronRight`,[[`path`,{d:`M9 6l6 6l-6 6`,key:`svg-0`}]]),Zn=F(`outline`,`chevron-up`,`ChevronUp`,[[`path`,{d:`M6 15l6 -6l6 6`,key:`svg-0`}]]),Qn=F(`outline`,`circle-check`,`CircleCheck`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`,key:`svg-0`}],[`path`,{d:`M9 12l2 2l4 -4`,key:`svg-1`}]]),$n=F(`outline`,`clipboard`,`Clipboard`,[[`path`,{d:`M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2`,key:`svg-0`}],[`path`,{d:`M9 5a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2`,key:`svg-1`}]]),er=F(`outline`,`clock`,`Clock`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0`,key:`svg-0`}],[`path`,{d:`M12 7v5l3 3`,key:`svg-1`}]]),tr=F(`outline`,`cloud-off`,`CloudOff`,[[`path`,{d:`M9.58 5.548c.24 -.11 .492 -.207 .752 -.286c1.88 -.572 3.956 -.193 5.444 1c1.488 1.19 2.162 3.007 1.77 4.769h.99c1.913 0 3.464 1.56 3.464 3.486c0 .957 -.383 1.824 -1.003 2.454m-2.997 1.033h-11.343c-2.572 -.004 -4.657 -2.011 -4.657 -4.487c0 -2.475 2.085 -4.482 4.657 -4.482c.13 -.582 .37 -1.128 .7 -1.62`,key:`svg-0`}],[`path`,{d:`M3 3l18 18`,key:`svg-1`}]]),nr=F(`outline`,`command`,`Command`,[[`path`,{d:`M7 9a2 2 0 1 1 2 -2v10a2 2 0 1 1 -2 -2h10a2 2 0 1 1 -2 2v-10a2 2 0 1 1 2 2h-10`,key:`svg-0`}]]),rr=F(`outline`,`copy`,`Copy`,[[`path`,{d:`M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666`,key:`svg-0`}],[`path`,{d:`M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1`,key:`svg-1`}]]),ir=F(`outline`,`dots`,`Dots`,[[`path`,{d:`M4 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-0`}],[`path`,{d:`M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-1`}],[`path`,{d:`M18 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-2`}]]),ar=F(`outline`,`download`,`Download`,[[`path`,{d:`M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2`,key:`svg-0`}],[`path`,{d:`M7 11l5 5l5 -5`,key:`svg-1`}],[`path`,{d:`M12 4l0 12`,key:`svg-2`}]]),or=F(`outline`,`error-404`,`Error404`,[[`path`,{d:`M3 8v3a1 1 0 0 0 1 1h3`,key:`svg-0`}],[`path`,{d:`M7 8v8`,key:`svg-1`}],[`path`,{d:`M17 8v3a1 1 0 0 0 1 1h3`,key:`svg-2`}],[`path`,{d:`M21 8v8`,key:`svg-3`}],[`path`,{d:`M10 10v4a2 2 0 1 0 4 0v-4a2 2 0 1 0 -4 0`,key:`svg-4`}]]),sr=F(`outline`,`external-link`,`ExternalLink`,[[`path`,{d:`M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6`,key:`svg-0`}],[`path`,{d:`M11 13l9 -9`,key:`svg-1`}],[`path`,{d:`M15 4h5v5`,key:`svg-2`}]]),cr=F(`outline`,`eye-off`,`EyeOff`,[[`path`,{d:`M10.585 10.587a2 2 0 0 0 2.829 2.828`,key:`svg-0`}],[`path`,{d:`M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87`,key:`svg-1`}],[`path`,{d:`M3 3l18 18`,key:`svg-2`}]]),lr=F(`outline`,`eye`,`Eye`,[[`path`,{d:`M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0`,key:`svg-0`}],[`path`,{d:`M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6`,key:`svg-1`}]]),ur=F(`outline`,`file-spreadsheet`,`FileSpreadsheet`,[[`path`,{d:`M14 3v4a1 1 0 0 0 1 1h4`,key:`svg-0`}],[`path`,{d:`M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2`,key:`svg-1`}],[`path`,{d:`M8 11h8v7h-8l0 -7`,key:`svg-2`}],[`path`,{d:`M8 15h8`,key:`svg-3`}],[`path`,{d:`M11 11v7`,key:`svg-4`}]]),dr=F(`outline`,`filter`,`Filter`,[[`path`,{d:`M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227`,key:`svg-0`}]]),fr=F(`outline`,`flame`,`Flame`,[[`path`,{d:`M12 10.941c2.333 -3.308 .167 -7.823 -1 -8.941c0 3.395 -2.235 5.299 -3.667 6.706c-1.43 1.408 -2.333 3.294 -2.333 5.588c0 3.704 3.134 6.706 7 6.706c3.866 0 7 -3.002 7 -6.706c0 -1.712 -1.232 -4.403 -2.333 -5.588c-2.084 3.353 -3.257 3.353 -4.667 2.235`,key:`svg-0`}]]),pr=F(`outline`,`folders`,`Folders`,[[`path`,{d:`M9 3h3l2 2h5a2 2 0 0 1 2 2v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-9a2 2 0 0 1 2 -2`,key:`svg-0`}],[`path`,{d:`M17 16v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-9a2 2 0 0 1 2 -2h2`,key:`svg-1`}]]),mr=F(`outline`,`grip-vertical`,`GripVertical`,[[`path`,{d:`M8 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-0`}],[`path`,{d:`M8 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-1`}],[`path`,{d:`M8 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-2`}],[`path`,{d:`M14 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-3`}],[`path`,{d:`M14 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-4`}],[`path`,{d:`M14 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-5`}]]),hr=F(`outline`,`history`,`History`,[[`path`,{d:`M12 8l0 4l2 2`,key:`svg-0`}],[`path`,{d:`M3.05 11a9 9 0 1 1 .5 4m-.5 5v-5h5`,key:`svg-1`}]]),gr=F(`outline`,`hourglass-off`,`HourglassOff`,[[`path`,{d:`M18 18v2a1 1 0 0 1 -1 1h-10a1 1 0 0 1 -1 -1v-2a6 6 0 0 1 6 -6`,key:`svg-0`}],[`path`,{d:`M6 6a6 6 0 0 0 6 6m3.13 -.88a6 6 0 0 0 2.87 -5.12v-2a1 1 0 0 0 -1 -1h-10`,key:`svg-1`}],[`path`,{d:`M3 3l18 18`,key:`svg-2`}]]),_r=F(`outline`,`hourglass`,`Hourglass`,[[`path`,{d:`M6.5 7h11`,key:`svg-0`}],[`path`,{d:`M6.5 17h11`,key:`svg-1`}],[`path`,{d:`M6 20v-2a6 6 0 1 1 12 0v2a1 1 0 0 1 -1 1h-10a1 1 0 0 1 -1 -1`,key:`svg-2`}],[`path`,{d:`M6 4v2a6 6 0 1 0 12 0v-2a1 1 0 0 0 -1 -1h-10a1 1 0 0 0 -1 1`,key:`svg-3`}]]),vr=F(`outline`,`key`,`Key`,[[`path`,{d:`M16.555 3.843l3.602 3.602a2.877 2.877 0 0 1 0 4.069l-2.643 2.643a2.877 2.877 0 0 1 -4.069 0l-.301 -.301l-6.558 6.558a2 2 0 0 1 -1.239 .578l-.175 .008h-1.172a1 1 0 0 1 -.993 -.883l-.007 -.117v-1.172a2 2 0 0 1 .467 -1.284l.119 -.13l.414 -.414h2v-2h2v-2l2.144 -2.144l-.301 -.301a2.877 2.877 0 0 1 0 -4.069l2.643 -2.643a2.877 2.877 0 0 1 4.069 0`,key:`svg-0`}],[`path`,{d:`M15 9h.01`,key:`svg-1`}]]),yr=F(`outline`,`layout-dashboard`,`LayoutDashboard`,[[`path`,{d:`M5 4h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1`,key:`svg-0`}],[`path`,{d:`M5 16h4a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1`,key:`svg-1`}],[`path`,{d:`M15 12h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1`,key:`svg-2`}],[`path`,{d:`M15 4h4a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1`,key:`svg-3`}]]),br=F(`outline`,`list`,`List`,[[`path`,{d:`M9 6l11 0`,key:`svg-0`}],[`path`,{d:`M9 12l11 0`,key:`svg-1`}],[`path`,{d:`M9 18l11 0`,key:`svg-2`}],[`path`,{d:`M5 6l0 .01`,key:`svg-3`}],[`path`,{d:`M5 12l0 .01`,key:`svg-4`}],[`path`,{d:`M5 18l0 .01`,key:`svg-5`}]]),xr=F(`outline`,`loader`,`Loader`,[[`path`,{d:`M12 6l0 -3`,key:`svg-0`}],[`path`,{d:`M16.25 7.75l2.15 -2.15`,key:`svg-1`}],[`path`,{d:`M18 12l3 0`,key:`svg-2`}],[`path`,{d:`M16.25 16.25l2.15 2.15`,key:`svg-3`}],[`path`,{d:`M12 18l0 3`,key:`svg-4`}],[`path`,{d:`M7.75 16.25l-2.15 2.15`,key:`svg-5`}],[`path`,{d:`M6 12l-3 0`,key:`svg-6`}],[`path`,{d:`M7.75 7.75l-2.15 -2.15`,key:`svg-7`}]]),Sr=F(`outline`,`lock`,`Lock`,[[`path`,{d:`M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6`,key:`svg-0`}],[`path`,{d:`M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0`,key:`svg-1`}],[`path`,{d:`M8 11v-4a4 4 0 1 1 8 0v4`,key:`svg-2`}]]),Cr=F(`outline`,`menu-2`,`Menu2`,[[`path`,{d:`M4 6l16 0`,key:`svg-0`}],[`path`,{d:`M4 12l16 0`,key:`svg-1`}],[`path`,{d:`M4 18l16 0`,key:`svg-2`}]]),wr=F(`outline`,`message-chatbot`,`MessageChatbot`,[[`path`,{d:`M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12`,key:`svg-0`}],[`path`,{d:`M9.5 9h.01`,key:`svg-1`}],[`path`,{d:`M14.5 9h.01`,key:`svg-2`}],[`path`,{d:`M9.5 13a3.5 3.5 0 0 0 5 0`,key:`svg-3`}]]),Tr=F(`outline`,`moon`,`Moon`,[[`path`,{d:`M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454l0 .008`,key:`svg-0`}]]),Er=F(`outline`,`player-play`,`PlayerPlay`,[[`path`,{d:`M7 4v16l13 -8l-13 -8`,key:`svg-0`}]]),Dr=F(`outline`,`player-stop`,`PlayerStop`,[[`path`,{d:`M5 7a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2l0 -10`,key:`svg-0`}]]),Or=F(`outline`,`plug-connected`,`PlugConnected`,[[`path`,{d:`M7 12l5 5l-1.5 1.5a3.536 3.536 0 1 1 -5 -5l1.5 -1.5`,key:`svg-0`}],[`path`,{d:`M17 12l-5 -5l1.5 -1.5a3.536 3.536 0 1 1 5 5l-1.5 1.5`,key:`svg-1`}],[`path`,{d:`M3 21l2.5 -2.5`,key:`svg-2`}],[`path`,{d:`M18.5 5.5l2.5 -2.5`,key:`svg-3`}],[`path`,{d:`M10 11l-2 2`,key:`svg-4`}],[`path`,{d:`M13 14l-2 2`,key:`svg-5`}]]),kr=F(`outline`,`plug`,`Plug`,[[`path`,{d:`M9.785 6l8.215 8.215l-2.054 2.054a5.81 5.81 0 1 1 -8.215 -8.215l2.054 -2.054`,key:`svg-0`}],[`path`,{d:`M4 20l3.5 -3.5`,key:`svg-1`}],[`path`,{d:`M15 4l-3.5 3.5`,key:`svg-2`}],[`path`,{d:`M20 9l-3.5 3.5`,key:`svg-3`}]]),Ar=F(`outline`,`plus`,`Plus`,[[`path`,{d:`M12 5l0 14`,key:`svg-0`}],[`path`,{d:`M5 12l14 0`,key:`svg-1`}]]),jr=F(`outline`,`question-mark`,`QuestionMark`,[[`path`,{d:`M8 8a3.5 3 0 0 1 3.5 -3h1a3.5 3 0 0 1 3.5 3a3 3 0 0 1 -2 3a3 4 0 0 0 -2 4`,key:`svg-0`}],[`path`,{d:`M12 19l0 .01`,key:`svg-1`}]]),Mr=F(`outline`,`refresh`,`Refresh`,[[`path`,{d:`M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4`,key:`svg-0`}],[`path`,{d:`M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4`,key:`svg-1`}]]),Nr=F(`outline`,`route`,`Route`,[[`path`,{d:`M3 19a2 2 0 1 0 4 0a2 2 0 0 0 -4 0`,key:`svg-0`}],[`path`,{d:`M19 7a2 2 0 1 0 0 -4a2 2 0 0 0 0 4`,key:`svg-1`}],[`path`,{d:`M11 19h5.5a3.5 3.5 0 0 0 0 -7h-8a3.5 3.5 0 0 1 0 -7h4.5`,key:`svg-2`}]]),Pr=F(`outline`,`search`,`Search`,[[`path`,{d:`M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0`,key:`svg-0`}],[`path`,{d:`M21 21l-6 -6`,key:`svg-1`}]]),Fr=F(`outline`,`send`,`Send`,[[`path`,{d:`M10 14l11 -11`,key:`svg-0`}],[`path`,{d:`M21 3l-6.5 18a.55 .55 0 0 1 -1 0l-3.5 -7l-7 -3.5a.55 .55 0 0 1 0 -1l18 -6.5`,key:`svg-1`}]]),Ir=F(`outline`,`settings`,`Settings`,[[`path`,{d:`M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065`,key:`svg-0`}],[`path`,{d:`M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0`,key:`svg-1`}]]),Lr=F(`outline`,`sparkles`,`Sparkles`,[[`path`,{d:`M16 18a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2m0 -12a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2m-7 12a6 6 0 0 1 6 -6a6 6 0 0 1 -6 -6a6 6 0 0 1 -6 6a6 6 0 0 1 6 6`,key:`svg-0`}]]),Rr=F(`outline`,`star`,`Star`,[[`path`,{d:`M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873l-6.158 -3.245`,key:`svg-0`}]]),zr=F(`outline`,`sun`,`Sun`,[[`path`,{d:`M8 12a4 4 0 1 0 8 0a4 4 0 1 0 -8 0`,key:`svg-0`}],[`path`,{d:`M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7`,key:`svg-1`}]]),Br=F(`outline`,`tool`,`Tool`,[[`path`,{d:`M7 10h3v-3l-3.5 -3.5a6 6 0 0 1 8 8l6 6a2 2 0 0 1 -3 3l-6 -6a6 6 0 0 1 -8 -8l3.5 3.5`,key:`svg-0`}]]),Vr=F(`outline`,`trash`,`Trash`,[[`path`,{d:`M4 7l16 0`,key:`svg-0`}],[`path`,{d:`M10 11l0 6`,key:`svg-1`}],[`path`,{d:`M14 11l0 6`,key:`svg-2`}],[`path`,{d:`M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12`,key:`svg-3`}],[`path`,{d:`M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3`,key:`svg-4`}]]),Hr=F(`outline`,`trophy`,`Trophy`,[[`path`,{d:`M8 21l8 0`,key:`svg-0`}],[`path`,{d:`M12 17l0 4`,key:`svg-1`}],[`path`,{d:`M7 4l10 0`,key:`svg-2`}],[`path`,{d:`M17 4v8a5 5 0 0 1 -10 0v-8`,key:`svg-3`}],[`path`,{d:`M3 9a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-4`}],[`path`,{d:`M17 9a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-5`}]]),Ur=F(`outline`,`upload`,`Upload`,[[`path`,{d:`M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2`,key:`svg-0`}],[`path`,{d:`M7 9l5 -5l5 5`,key:`svg-1`}],[`path`,{d:`M12 4l0 12`,key:`svg-2`}]]),Wr=F(`outline`,`wand`,`Wand`,[[`path`,{d:`M6 21l15 -15l-3 -3l-15 15l3 3`,key:`svg-0`}],[`path`,{d:`M15 6l3 3`,key:`svg-1`}],[`path`,{d:`M9 3a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2`,key:`svg-2`}],[`path`,{d:`M19 13a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2`,key:`svg-3`}]]),Gr=F(`outline`,`x`,`X`,[[`path`,{d:`M18 6l-12 12`,key:`svg-0`}],[`path`,{d:`M6 6l12 12`,key:`svg-1`}]]),Kr=F(`filled`,`circle-check-filled`,`CircleCheckFilled`,[[`path`,{d:`M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.293 5.953a1 1 0 0 0 -1.32 -.083l-.094 .083l-3.293 3.292l-1.293 -1.292l-.094 -.083a1 1 0 0 0 -1.403 1.403l.083 .094l2 2l.094 .083a1 1 0 0 0 1.226 0l.094 -.083l4 -4l.083 -.094a1 1 0 0 0 -.083 -1.32z`,key:`svg-0`}]]),qr=F(`filled`,`player-play-filled`,`PlayerPlayFilled`,[[`path`,{d:`M6 4v16a1 1 0 0 0 1.524 .852l13 -8a1 1 0 0 0 0 -1.704l-13 -8a1 1 0 0 0 -1.524 .852z`,key:`svg-0`}]]),Jr=F(`filled`,`star-filled`,`StarFilled`,[[`path`,{d:`M8.243 7.34l-6.38 .925l-.113 .023a1 1 0 0 0 -.44 1.684l4.622 4.499l-1.09 6.355l-.013 .11a1 1 0 0 0 1.464 .944l5.706 -3l5.693 3l.1 .046a1 1 0 0 0 1.352 -1.1l-1.091 -6.355l4.624 -4.5l.078 -.085a1 1 0 0 0 -.633 -1.62l-6.38 -.926l-2.852 -5.78a1 1 0 0 0 -1.794 0l-2.853 5.78z`,key:`svg-0`}]]),Yr={wrap:`_wrap_3zy19_5`,trigger:`_trigger_3zy19_11`,cycle:`_cycle_3zy19_12`,emoji:`_emoji_3zy19_40`,label:`_label_3zy19_41`,menu:`_menu_3zy19_42`,item:`_item_3zy19_56`,itemActive:`_itemActive_3zy19_70`,itemEmoji:`_itemEmoji_3zy19_74`,itemText:`_itemText_3zy19_75`,activeDot:`_activeDot_3zy19_78`,compact:`_compact_3zy19_79`},Xr=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),I=o(((e,t)=>{t.exports=Xr()}))();function Zr({toolMode:e=`opencode`,onSetToolMode:t,onCycleToolMode:n,compact:r=!1,tools:i=fn}){let[a,o]=(0,v.useState)(!1),s=(0,v.useRef)(null),c=vn(e);return(0,v.useEffect)(()=>{if(!a)return;let e=e=>{s.current&&!s.current.contains(e.target)&&o(!1)},t=e=>{e.key===`Escape`&&o(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[a]),(0,I.jsxs)(`div`,{className:`${Yr.wrap} ${r?Yr.compact:``}`,ref:s,children:[(0,I.jsxs)(`button`,{type:`button`,className:Yr.trigger,onClick:()=>o(e=>!e),"aria-haspopup":`listbox`,"aria-expanded":a,title:`Install endpoint into: ${c.label}`,children:[(0,I.jsx)(`span`,{className:Yr.emoji,children:c.emoji}),(0,I.jsx)(`span`,{className:Yr.label,children:r?c.label.replace(/ CLI$/,``):c.label}),(0,I.jsx)(Jn,{size:13,stroke:1.7})]}),(0,I.jsx)(`button`,{type:`button`,className:Yr.cycle,onClick:n,title:`Cycle endpoint target`,"aria-label":`Cycle endpoint target`,children:(0,I.jsx)(Mr,{size:13,stroke:1.7})}),a&&(0,I.jsx)(`div`,{className:Yr.menu,role:`listbox`,"aria-label":`Endpoint install target`,children:i.map(n=>{let r=gn[n],i=n===e;return(0,I.jsxs)(`button`,{type:`button`,className:`${Yr.item} ${i?Yr.itemActive:``}`,onClick:()=>{t?.(n),o(!1)},role:`option`,"aria-selected":i,children:[(0,I.jsx)(`span`,{className:Yr.itemEmoji,children:r.emoji}),(0,I.jsxs)(`span`,{className:Yr.itemText,children:[(0,I.jsx)(`strong`,{children:r.label}),(0,I.jsx)(`small`,{children:r.flag})]}),i&&(0,I.jsx)(`span`,{className:Yr.activeDot,children:`●`})]},n)})})]})}var L={header:`_header_3lvj2_11`,left:`_left_3lvj2_28`,center:`_center_3lvj2_35`,right:`_right_3lvj2_41`,logo:`_logo_3lvj2_49`,logoIcon:`_logoIcon_3lvj2_50`,logoText:`_logoText_3lvj2_58`,logoTextHighlight:`_logoTextHighlight_3lvj2_64`,version:`_version_3lvj2_65`,nav:`_nav_3lvj2_72`,navBtn:`_navBtn_3lvj2_82`,navBtnActive:`_navBtnActive_3lvj2_103`,comingBadge:`_comingBadge_3lvj2_116`,menuWrap:`_menuWrap_3lvj2_132`,menuTrigger:`_menuTrigger_3lvj2_133`,menuPopover:`_menuPopover_3lvj2_138`,menuItem:`_menuItem_3lvj2_153`,searchBar:`_searchBar_3lvj2_173`,searchIcon:`_searchIcon_3lvj2_183`,searchInput:`_searchInput_3lvj2_184`,iconBtn:`_iconBtn_3lvj2_192`,cmdkBtn:`_cmdkBtn_3lvj2_202`,cmdkLabel:`_cmdkLabel_3lvj2_215`,benchmarkBtn:`_benchmarkBtn_3lvj2_218`,benchmarkActive:`_benchmarkActive_3lvj2_228`,benchmarkRunning:`_benchmarkRunning_3lvj2_233`,spinner:`_spinner_3lvj2_235`,spin:`_spin_3lvj2_235`,hamburgerBtn:`_hamburgerBtn_3lvj2_268`,mobileNav:`_mobileNav_3lvj2_290`,mobileNavItem:`_mobileNavItem_3lvj2_305`,mobileNavActive:`_mobileNavActive_3lvj2_322`,mobileNavDivider:`_mobileNavDivider_3lvj2_327`},Qr=[{id:`dashboard`,label:`Dashboard`,icon:yr},{id:`settings`,label:`Settings`,icon:Ir},{id:`analytics`,label:`Analytics`,icon:Ln},{id:`recommend`,label:`Recommend`,icon:Lr},{id:`router`,label:`Router`,icon:Nr},{id:`playground`,label:`Playground`,icon:wr}],$r=[{id:`help`,label:`Help`,icon:jr},{id:`changelog`,label:`Changelog`,icon:hr},{id:`install-endpoints`,label:`Install Endpoints`,icon:kr},{id:`installed-models`,label:`Installed Models`,icon:pr}];function ei({searchQuery:e,onSearchChange:t,currentView:n,onNavigate:r,onToggleTheme:i,onOpenExport:a,onOpenCommandPalette:o,onBenchmark:s,benchmarkRunning:c,benchmarkTotal:l,benchmarkCompleted:u,modelsCount:d,theme:f,onToast:p,toolMode:m=`opencode`,onSetToolMode:h,onCycleToolMode:g,updateSlot:_=null}){let[y,b]=(0,v.useState)(!1),[x,S]=(0,v.useState)(!1),C=(0,v.useRef)(null);(0,v.useEffect)(()=>{if(!y&&!x)return;let e=e=>{C.current&&!C.current.contains(e.target)&&b(!1)},t=e=>{e.key===`Escape`&&(b(!1),S(!1))};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[y,x]);let w=e=>{if(e.comingIn){p?.(`${e.label} arrives in milestone ${e.comingIn}.`,`info`);return}r(e.id),S(!1)},T=e=>{if(b(!1),e.comingIn){p?.(`${e.label} arrives in milestone ${e.comingIn}.`,`info`);return}r(e.id)};return(0,I.jsxs)(`header`,{className:L.header,children:[(0,I.jsxs)(`div`,{className:L.left,children:[(0,I.jsxs)(`div`,{className:L.logo,children:[(0,I.jsx)(`span`,{className:L.logoIcon,children:`>`}),(0,I.jsxs)(`span`,{className:L.logoText,children:[(0,I.jsx)(`span`,{className:L.logoTextHighlight,children:`free`}),(0,I.jsx)(`span`,{children:`-coding-models`}),(0,I.jsx)(`span`,{className:L.logoTextHighlight,children:`_`})]})]}),(0,I.jsxs)(`span`,{className:L.version,children:[`v`,`0.5.22`]}),(0,I.jsx)(`button`,{className:L.hamburgerBtn,onClick:()=>S(e=>!e),"aria-label":`Navigation menu`,"aria-expanded":x,"aria-haspopup":`true`,children:(0,I.jsx)(Cr,{size:18,stroke:1.5})}),x&&(0,I.jsxs)(`div`,{className:L.mobileNav,role:`menu`,children:[Qr.map(e=>{let t=e.icon;return(0,I.jsxs)(`button`,{className:`${L.mobileNavItem} ${n===e.id?L.mobileNavActive:``}`,onClick:()=>w(e),role:`menuitem`,children:[(0,I.jsx)(t,{size:16,stroke:1.5}),(0,I.jsx)(`span`,{children:e.label})]},e.id)}),(0,I.jsx)(`div`,{className:L.mobileNavDivider}),$r.map(e=>{let t=e.icon;return(0,I.jsxs)(`button`,{className:L.mobileNavItem,onClick:()=>T(e),role:`menuitem`,children:[(0,I.jsx)(t,{size:16,stroke:1.5}),(0,I.jsx)(`span`,{children:e.label})]},e.id)})]}),(0,I.jsxs)(`nav`,{className:L.nav,"aria-label":`Primary`,children:[Qr.map(e=>{let t=e.icon,r=n===e.id;return(0,I.jsxs)(`button`,{className:`${L.navBtn} ${r?L.navBtnActive:``}`,onClick:()=>w(e),title:e.comingIn?`${e.label} — coming in ${e.comingIn}`:e.label,"aria-current":r?`page`:void 0,children:[(0,I.jsx)(t,{size:14,stroke:1.5}),(0,I.jsx)(`span`,{children:e.label}),e.comingIn&&(0,I.jsx)(`span`,{className:L.comingBadge,children:e.comingIn})]},e.id)}),(0,I.jsxs)(`div`,{className:L.menuWrap,ref:C,children:[(0,I.jsx)(`button`,{className:`${L.navBtn} ${L.menuTrigger}`,onClick:()=>b(e=>!e),title:`More features`,"aria-label":`More features`,"aria-haspopup":`true`,"aria-expanded":y,children:(0,I.jsx)(ir,{size:16,stroke:1.5})}),y&&(0,I.jsx)(`div`,{className:L.menuPopover,role:`menu`,children:$r.map(e=>{let t=e.icon;return(0,I.jsxs)(`button`,{className:L.menuItem,onClick:()=>T(e),role:`menuitem`,children:[(0,I.jsx)(t,{size:14,stroke:1.5}),(0,I.jsx)(`span`,{children:e.label}),e.comingIn&&(0,I.jsx)(`span`,{className:L.comingBadge,children:e.comingIn})]},e.id)})})]})]})]}),(0,I.jsx)(`div`,{className:L.center,children:(0,I.jsxs)(`div`,{className:L.searchBar,children:[(0,I.jsx)(`span`,{className:L.searchIcon,children:(0,I.jsx)(Pr,{size:16,stroke:1.5})}),(0,I.jsx)(`input`,{type:`text`,className:L.searchInput,placeholder:`Search models, providers, tiers...`,value:e,onChange:e=>t(e.target.value),autoComplete:`off`})]})}),(0,I.jsxs)(`div`,{className:L.right,children:[(0,I.jsx)(Zr,{toolMode:m,onSetToolMode:h,onCycleToolMode:g}),(0,I.jsxs)(`button`,{className:L.cmdkBtn,onClick:o,title:`Command palette (⌘K / Ctrl+P)`,"aria-label":`Open command palette (⌘K)`,children:[(0,I.jsx)(nr,{size:14,stroke:1.5}),(0,I.jsx)(`span`,{className:L.cmdkLabel,children:`⌘K`})]}),(0,I.jsxs)(`button`,{className:`${L.benchmarkBtn} ${c?L.benchmarkActive:``}`,onClick:s,disabled:c,title:c?`AI Speed Test running — ${u}/${l}`:`Run AI Latency benchmark on ${d} visible models`,"aria-label":c?`AI Speed Test running — ${u} of ${l} complete`:`AI Latency benchmark`,children:[(0,I.jsx)(Er,{size:14,stroke:1.5}),c?(0,I.jsxs)(`span`,{className:L.benchmarkRunning,children:[(0,I.jsx)(`span`,{className:L.spinner}),`RUN `,u,`/`,l]}):(0,I.jsx)(`span`,{children:`AI Latency`})]}),_,(0,I.jsx)(`button`,{className:L.iconBtn,onClick:i,title:`Theme: ${f} (click to cycle auto / dark / light)`,"aria-label":`Theme: ${f}. Click to cycle.`,children:f===`light`?(0,I.jsx)(Tr,{size:16,stroke:1.5}):(0,I.jsx)(zr,{size:16,stroke:1.5})}),(0,I.jsx)(`button`,{className:L.iconBtn,onClick:a,title:`Export Data`,"aria-label":`Export model data`,children:(0,I.jsx)(ar,{size:16,stroke:1.5})})]})]})}var ti={footer:`_footer_1uw54_1`,left:`_left_1uw54_8`,right:`_right_1uw54_8`};function ni(){return(0,I.jsxs)(`footer`,{className:ti.footer,children:[(0,I.jsxs)(`div`,{className:ti.left,children:[`by `,(0,I.jsx)(`a`,{href:`https://vavanessa.dev`,target:`_blank`,rel:`noopener`,children:`Vava-Nessa`})]}),(0,I.jsxs)(`div`,{className:ti.right,children:[(0,I.jsx)(`a`,{href:`https://github.com/vava-nessa/free-coding-models`,target:`_blank`,rel:`noopener`,children:`GitHub`}),(0,I.jsx)(`a`,{href:`https://discord.gg/ZTNFHvvCkU`,target:`_blank`,rel:`noopener`,children:`Discord`})]})]})}var ri=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 181 24" xmlns="http://www.w3.org/2000/svg"><title>Google AI Studio</title><path d="M172.721 19.07c-1.172 0-2.221-.266-3.149-.798a5.779 5.779 0 01-2.169-2.237c-.517-.943-.775-1.993-.775-3.15 0-1.155.258-2.205.775-3.149a5.619 5.619 0 012.169-2.213c.928-.548 1.977-.822 3.149-.822 1.171 0 2.221.274 3.149.822a5.777 5.777 0 012.168 2.236c.518.944.776 1.986.776 3.127 0 1.156-.258 2.206-.776 3.15a5.776 5.776 0 01-2.168 2.236c-.928.532-1.978.799-3.149.799zm0-2.304c.639 0 1.232-.153 1.78-.457.548-.32.981-.768 1.301-1.346.335-.594.502-1.286.502-2.077 0-.791-.167-1.476-.502-2.054a3.304 3.304 0 00-1.301-1.324 3.472 3.472 0 00-1.78-.479c-.639 0-1.232.16-1.78.48a3.458 3.458 0 00-1.324 1.323c-.319.578-.479 1.263-.479 2.054 0 .791.16 1.483.479 2.077a3.629 3.629 0 001.324 1.346 3.606 3.606 0 001.78.457zM162.999 5.378a1.69 1.69 0 01-1.21-.48 1.69 1.69 0 01-.479-1.21c0-.47.16-.866.479-1.186a1.65 1.65 0 011.21-.502c.471 0 .867.167 1.186.502.335.32.503.715.503 1.187 0 .471-.168.875-.503 1.21a1.61 1.61 0 01-1.186.479zm-1.255 1.688h2.51v11.64h-2.51V7.066zM152.429 19.07c-1.05 0-2.001-.266-2.853-.798-.852-.533-1.529-1.263-2.031-2.191-.487-.944-.73-2.008-.73-3.195 0-1.187.243-2.244.73-3.172.502-.944 1.179-1.682 2.031-2.214.852-.533 1.803-.799 2.853-.799.821 0 1.559.183 2.213.548.655.365 1.149.814 1.484 1.346h.114l-.114-1.643V2.365h2.51v16.34h-2.396V17.2h-.114c-.335.517-.829.959-1.484 1.324-.654.365-1.392.547-2.213.547zm.365-2.305c.608 0 1.171-.16 1.689-.479.532-.32.958-.776 1.278-1.37.319-.592.479-1.27.479-2.03 0-.76-.16-1.43-.479-2.008-.32-.594-.746-1.05-1.278-1.37a3.158 3.158 0 00-1.689-.48c-.609 0-1.179.16-1.712.48-.532.32-.958.776-1.278 1.37-.319.578-.479 1.247-.479 2.008 0 .76.16 1.438.479 2.03.32.594.746 1.05 1.278 1.37.533.32 1.103.48 1.712.48zM138.527 19.07c-1.415 0-2.495-.418-3.241-1.255-.73-.852-1.095-2.03-1.095-3.537V7.066h2.51v6.87c0 .943.221 1.65.662 2.122.456.472 1.05.707 1.78.707.593 0 1.118-.152 1.575-.456.456-.32.806-.738 1.049-1.255a3.856 3.856 0 00.366-1.666V7.066h2.51v11.64h-2.373v-1.507h-.137c-.32.548-.814.997-1.484 1.346a4.517 4.517 0 01-2.122.525zM130.115 18.888a4.208 4.208 0 01-1.461-.251c-.457-.167-.829-.388-1.118-.662-.655-.654-.982-1.544-.982-2.67V9.28h-2.031V7.066h2.031V3.78h2.511v3.286h2.83V9.28h-2.83v5.477c0 .624.121 1.065.365 1.324.228.304.624.456 1.187.456.258 0 .486-.03.684-.09.198-.077.411-.191.639-.343v2.442c-.502.228-1.11.342-1.825.342zM117.888 19.07a6.03 6.03 0 01-3.652-1.186c-1.08-.791-1.825-1.902-2.236-3.332l2.419-.981c.243.897.669 1.635 1.278 2.213.624.563 1.369.845 2.236.845.807 0 1.491-.206 2.054-.617.563-.426.845-1.004.845-1.734 0-.67-.251-1.217-.753-1.643-.487-.441-1.347-.883-2.579-1.324l-1.027-.365c-1.096-.38-2.016-.928-2.762-1.643-.745-.715-1.118-1.658-1.118-2.83 0-.806.221-1.552.662-2.236.441-.685 1.05-1.225 1.826-1.62.791-.412 1.681-.617 2.67-.617 1.43 0 2.571.35 3.423 1.05.852.684 1.423 1.46 1.712 2.328l-2.305.981c-.168-.517-.487-.974-.959-1.37-.471-.395-1.08-.593-1.826-.593-.745 0-1.376.19-1.894.57-.502.381-.753.868-.753 1.461 0 .563.228 1.027.685 1.393.456.365 1.171.715 2.145 1.05l1.027.342c1.4.487 2.48 1.126 3.241 1.917.776.776 1.164 1.818 1.164 3.126 0 1.065-.274 1.963-.822 2.693a4.978 4.978 0 01-2.1 1.598 6.677 6.677 0 01-2.601.525zM102.221 2.365h2.556v16.34h-2.556V2.365zM90.94 2.365h2.922L100 18.705h-2.83l-1.46-4.176h-6.596l-1.484 4.176h-2.83l6.14-16.34zm3.903 9.79l-1.734-4.86-.64-1.895h-.136l-.64 1.894-1.734 4.862h4.884zM73.43 19.07c-1.141 0-2.168-.266-3.081-.798a5.758 5.758 0 01-2.123-2.191c-.502-.943-.753-2-.753-3.172 0-1.111.244-2.138.73-3.081a5.898 5.898 0 012.078-2.282c.882-.563 1.886-.845 3.012-.845 1.171 0 2.183.259 3.035.776A4.985 4.985 0 0178.291 9.6c.456.897.684 1.909.684 3.035 0 .213-.022.48-.068.799h-8.923c.091 1.08.471 1.917 1.14 2.51a3.57 3.57 0 002.374.867c.715 0 1.332-.16 1.849-.48a3.745 3.745 0 001.278-1.345l2.122 1.004c-.547.958-1.263 1.711-2.145 2.259-.882.548-1.94.822-3.172.822zm2.99-7.553a2.82 2.82 0 00-.389-1.21c-.228-.41-.578-.753-1.05-1.027-.456-.274-1.019-.41-1.688-.41-.806 0-1.491.243-2.054.73-.548.471-.928 1.11-1.141 1.917h6.322zM62.763 2.365h2.51v16.34h-2.51V2.365zM54.016 24c-1.43 0-2.616-.327-3.56-.981-.928-.654-1.552-1.43-1.871-2.328l2.35-.981a3.148 3.148 0 001.164 1.46c.548.38 1.187.57 1.917.57 1.065 0 1.895-.319 2.488-.958.609-.624.913-1.506.913-2.647v-1.073h-.137c-.38.548-.89.982-1.53 1.301-.623.304-1.346.457-2.167.457a5.185 5.185 0 01-2.716-.754c-.837-.502-1.506-1.21-2.008-2.122-.487-.928-.73-1.986-.73-3.172 0-1.187.243-2.237.73-3.15.502-.928 1.171-1.643 2.008-2.145a5.07 5.07 0 012.716-.776c.806 0 1.529.16 2.168.48.639.319 1.149.753 1.529 1.3h.137V7.066h2.396v11c0 1.263-.243 2.336-.73 3.218a4.81 4.81 0 01-2.054 2.031c-.867.457-1.872.685-3.013.685zm.023-7.463c.609 0 1.172-.144 1.69-.433a3.281 3.281 0 001.231-1.301c.305-.578.457-1.255.457-2.031 0-1.187-.327-2.107-.982-2.762-.639-.67-1.437-1.004-2.396-1.004-.623 0-1.194.152-1.711.457-.518.289-.928.715-1.233 1.278-.304.563-.456 1.24-.456 2.03 0 .792.152 1.469.456 2.032a3.28 3.28 0 001.233 1.3c.517.29 1.087.434 1.711.434zM40.36 19.07c-1.172 0-2.222-.266-3.15-.798a5.778 5.778 0 01-2.168-2.237c-.517-.943-.776-1.993-.776-3.15 0-1.155.259-2.205.776-3.149a5.618 5.618 0 012.168-2.213c.928-.548 1.978-.822 3.15-.822 1.17 0 2.22.274 3.149.822a5.778 5.778 0 012.168 2.236c.517.944.776 1.986.776 3.127 0 1.156-.259 2.206-.776 3.15a5.778 5.778 0 01-2.168 2.236c-.928.532-1.978.799-3.15.799zm0-2.304c.638 0 1.232-.153 1.78-.457.547-.32.98-.768 1.3-1.346.335-.594.502-1.286.502-2.077 0-.791-.167-1.476-.502-2.054a3.303 3.303 0 00-1.3-1.324 3.472 3.472 0 00-1.78-.479c-.64 0-1.233.16-1.78.48a3.458 3.458 0 00-1.324 1.323c-.32.578-.48 1.263-.48 2.054 0 .791.16 1.483.48 2.077a3.629 3.629 0 001.323 1.346 3.606 3.606 0 001.78.457zM26.497 19.07c-1.172 0-2.221-.266-3.15-.798a5.778 5.778 0 01-2.168-2.237c-.517-.943-.775-1.993-.775-3.15 0-1.155.258-2.205.776-3.149a5.618 5.618 0 012.168-2.213c.928-.548 1.977-.822 3.149-.822s2.221.274 3.15.822a5.779 5.779 0 012.167 2.236c.518.944.776 1.986.776 3.127 0 1.156-.258 2.206-.776 3.15a5.778 5.778 0 01-2.168 2.236c-.928.532-1.977.799-3.149.799zm0-2.304c.639 0 1.232-.153 1.78-.457.548-.32.981-.768 1.3-1.346.336-.594.503-1.286.503-2.077 0-.791-.167-1.476-.502-2.054a3.303 3.303 0 00-1.3-1.324 3.472 3.472 0 00-1.781-.479c-.639 0-1.232.16-1.78.48a3.456 3.456 0 00-1.324 1.323c-.32.578-.479 1.263-.479 2.054 0 .791.16 1.483.48 2.077a3.627 3.627 0 001.323 1.346 3.606 3.606 0 001.78.457zM10.558 19.07c-1.552 0-2.982-.372-4.29-1.118a8.49 8.49 0 01-3.127-3.058C2.381 13.586 2 12.133 2 10.535c0-1.597.38-3.043 1.141-4.336a8.435 8.435 0 013.127-3.08C7.576 2.372 9.006 2 10.558 2c1.232 0 2.381.22 3.446.662 1.065.441 1.955 1.057 2.67 1.848l-1.78 1.78a5.401 5.401 0 00-1.917-1.369c-.73-.32-1.544-.48-2.442-.48-1.05 0-2.03.252-2.944.754a5.702 5.702 0 00-2.19 2.145c-.548.928-.822 1.993-.822 3.195 0 1.202.274 2.267.821 3.195a5.702 5.702 0 002.191 2.146 6.057 6.057 0 002.967.753c.974 0 1.788-.145 2.442-.434a6.2 6.2 0 001.757-1.164c.335-.335.617-.753.845-1.255.243-.502.403-1.05.479-1.643h-5.546V9.85H18.5c.076.426.114.867.114 1.323 0 1.035-.16 2.032-.479 2.99a6.294 6.294 0 01-1.53 2.465c-1.536 1.628-3.552 2.442-6.047 2.442z"></path></svg>`,ii=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Google AI Studio</title><path d="M9.921 4.196H6.328A2.705 2.705 0 003.623 6.9v11.362a2.705 2.705 0 002.705 2.705h11.363a2.705 2.705 0 002.705-2.705v-4.756l1.623-1.113v5.87a4.329 4.329 0 01-4.328 4.328H6.328A4.329 4.329 0 012 18.263V6.901a4.328 4.328 0 014.328-4.329h4.545l-.952 1.624z"></path><path d="M17.82 0c.145 0 .268.104.299.246a7 7 0 001.9 3.484 7 7 0 003.485 1.901c.142.031.246.154.246.3a.308.308 0 01-.246.298A7 7 0 0020.02 8.13a7 7 0 00-1.912 3.535.297.297 0 01-.288.238.297.297 0 01-.288-.238A7 7 0 0015.62 8.13a7 7 0 00-3.535-1.912.297.297 0 01-.238-.288c0-.14.1-.26.238-.288A7 7 0 0015.62 3.73 7.001 7.001 0 0017.521.246.308.308 0 0117.82 0z"></path></svg>`,ai=`<svg fill="currentColor" height="1em" style="flex:none;line-height:1" viewBox="0 0 53 24" xmlns="http://www.w3.org/2000/svg"><title>Cerebras</title><path clip-rule="evenodd" d="M13 2.701A9.299 9.299 0 0013 21.3V22.7C7.09 22.701 2.299 17.91 2.299 12S7.09 1.299 13 1.299V2.7zm4.752 3.677a7.353 7.353 0 00-9.453 11.265l-.901 1.074A8.755 8.755 0 1118.652 5.304l-.901 1.074zm-2.256.844a5.407 5.407 0 00-5.049 9.563l-.654 1.24a6.81 6.81 0 016.358-12.043l-.655 1.24zM13 8.539a3.461 3.461 0 000 6.922v1.402a4.863 4.863 0 010-9.726v1.402z" fill="#F15A29" fill-rule="evenodd"></path><path d="M14.286 10.836a2.242 2.242 0 00-.51-.409 1.085 1.085 0 00-.545-.152c-.254 0-.482.047-.683.14a1.582 1.582 0 00-.841.912 1.848 1.848 0 000 1.262 1.595 1.595 0 00.841.913c.2.093.429.14.683.14.217 0 .418-.046.603-.135.187-.09.35-.225.475-.392l.927 1.006c-.139.14-.3.261-.481.363a3.367 3.367 0 01-1.083.38c-.17.026-.317.04-.44.04a3.316 3.316 0 01-1.182-.21 2.826 2.826 0 01-.962-.597 2.813 2.813 0 01-.643-.929 2.986 2.986 0 01-.238-1.21c0-.444.08-.847.238-1.21.15-.35.368-.666.643-.929.277-.261.604-.464.962-.596a3.316 3.316 0 011.181-.21c.355 0 .713.068 1.072.204.362.138.686.36.945.649l-.962.97z"></path><path d="M19.338 11.397c-.008-.414-.136-.738-.383-.976-.247-.237-.59-.356-1.03-.356-.418 0-.749.12-.991.362-.244.242-.393.565-.447.97h2.85zm-2.85 1.052c.045.42.208.748.486.982.278.234.614.351 1.008.351.348 0 .639-.072.875-.217a2.42 2.42 0 00.62-.543l.997.76c-.325.405-.689.694-1.09.865a3.32 3.32 0 01-2.445.047 2.821 2.821 0 01-.962-.597 2.829 2.829 0 01-.643-.929 2.992 2.992 0 01-.237-1.21c0-.444.079-.847.238-1.21.15-.35.368-.666.642-.929.278-.261.605-.464.962-.596a3.32 3.32 0 011.182-.21c.386 0 .74.067 1.06.204.32.136.595.333.823.59.228.258.405.575.533.953.128.379.19.812.19 1.303v.386h-4.24zm4.843-3.296h1.39v.888h.023c.155-.327.375-.58.661-.76a1.812 1.812 0 011.234-.246c.081.016.164.036.25.06v1.355a3.912 3.912 0 00-.343-.076c-.109-.02-.22-.03-.33-.03-.324 0-.585.06-.782.182a1.38 1.38 0 00-.66.883 1.76 1.76 0 00-.053.35v3.005h-1.39V9.152zm7.797 2.244c-.008-.414-.135-.738-.383-.976-.246-.237-.59-.356-1.03-.356-.417 0-.748.12-.99.362-.245.242-.393.565-.447.97h2.85zm-2.85 1.052c.046.42.208.748.487.982.277.234.613.351 1.007.351.348 0 .64-.072.875-.217.236-.144.446-.328.62-.543l.997.76c-.325.405-.688.694-1.09.865a3.319 3.319 0 01-2.445.047 2.823 2.823 0 01-.961-.597 2.829 2.829 0 01-.643-.929 2.984 2.984 0 01-.238-1.21c0-.444.08-.847.238-1.21.158-.362.373-.672.643-.929a2.84 2.84 0 01.962-.596 3.318 3.318 0 011.181-.21c.387 0 .74.067 1.06.204.321.136.596.333.823.59.228.258.406.575.533.953.128.379.192.812.192 1.303v.386h-4.241zm9.225-.49a1.84 1.84 0 00-.11-.632 1.603 1.603 0 00-.84-.912 1.607 1.607 0 00-.684-.14 1.587 1.587 0 00-1.524 1.052 1.83 1.83 0 00-.11.631c0 .218.036.429.11.632a1.583 1.583 0 001.524 1.052 1.591 1.591 0 001.524-1.052c.073-.203.11-.414.11-.632zM30.89 5.925h1.391v3.94h.035a1.99 1.99 0 01.266-.287 2.327 2.327 0 01.927-.485c.201-.054.433-.081.696-.081a2.55 2.55 0 011.94.853c.236.264.42.577.55.935.132.358.198.744.198 1.157 0 .413-.062.8-.186 1.158a2.673 2.673 0 01-.544.935c-.243.267-.539.48-.869.625-.34.152-.723.229-1.147.229a2.613 2.613 0 01-1.1-.235 1.785 1.785 0 01-.812-.748h-.023v.841H30.89V5.927zm6.604 3.227h1.39v.888h.023c.155-.327.376-.58.661-.76a1.815 1.815 0 011.234-.246c.081.016.164.036.25.06v1.355a3.893 3.893 0 00-.343-.076c-.109-.02-.22-.03-.33-.03-.325 0-.585.06-.782.182a1.43 1.43 0 00-.452.415 1.39 1.39 0 00-.209.468 1.788 1.788 0 00-.051.35v3.005h-1.391V9.152zm7.207 3.097h-.29c-.193 0-.409.008-.649.024a3.384 3.384 0 00-.677.11c-.213.06-.393.146-.54.258a.564.564 0 00-.22.473c0 .133.03.244.087.333.058.09.134.166.226.229a.933.933 0 00.313.134c.117.027.232.04.348.04.48 0 .832-.114 1.06-.344.228-.23.342-.544.342-.94v-.317zm.082 1.743h-.036c-.2.32-.456.551-.764.695-.32.146-.668.22-1.02.216-.253 0-.504-.035-.748-.104a2.03 2.03 0 01-.649-.317 1.616 1.616 0 01-.457-.526 1.501 1.501 0 01-.174-.736c0-.305.054-.563.163-.777.103-.21.252-.393.434-.539a2.19 2.19 0 01.632-.344c.242-.087.492-.152.747-.193.258-.043.52-.07.782-.082.247-.011.495-.017.742-.018h.347v-.151c0-.351-.12-.614-.36-.79-.238-.175-.544-.262-.914-.262a2.129 2.129 0 00-1.483.585l-.73-.738a2.7 2.7 0 011.083-.69c.412-.14.845-.21 1.28-.21.394 0 .726.046.997.135.27.09.494.205.672.345.177.14.314.302.411.485.096.183.166.368.21.555.041.187.066.368.074.544.008.175.012.33.012.461v3.227h-1.252v-.771zm5.018-3.286c-.27-.382-.634-.573-1.09-.573a1.16 1.16 0 00-.544.14.478.478 0 00-.266.456c0 .172.073.297.22.375.147.078.332.144.556.198.224.055.465.111.724.17.259.058.5.148.724.268.224.122.41.287.556.498.147.21.22.498.22.864 0 .336-.071.619-.214.848-.139.226-.33.417-.556.556a2.456 2.456 0 01-.77.303c-.282.062-.57.094-.858.094-.432 0-.83-.062-1.194-.187a2.27 2.27 0 01-.973-.678l.928-.877c.177.203.368.368.573.497.204.129.454.193.747.193.101 0 .205-.012.313-.035a.992.992 0 00.301-.117.71.71 0 00.226-.204.482.482 0 00.087-.287c0-.194-.073-.34-.22-.432a1.966 1.966 0 00-.556-.229c-.24-.062-.481-.116-.724-.164a2.794 2.794 0 01-.725-.245 1.523 1.523 0 01-.556-.473c-.146-.203-.22-.483-.22-.841 0-.312.064-.583.191-.813a1.69 1.69 0 01.504-.567c.217-.152.461-.263.719-.327a3.256 3.256 0 011.923.087c.356.123.664.354.881.66l-.927.842z"></path></svg>`,oi=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 53 24" xmlns="http://www.w3.org/2000/svg"><title>Cerebras</title><path clip-rule="evenodd" d="M13 2.701A9.299 9.299 0 0013 21.3V22.7C7.09 22.701 2.299 17.91 2.299 12S7.09 1.299 13 1.299V2.7zm4.752 3.677a7.353 7.353 0 00-9.453 11.265l-.901 1.074A8.755 8.755 0 1118.652 5.304l-.901 1.074zm-2.256.844a5.407 5.407 0 00-5.049 9.563l-.654 1.24a6.81 6.81 0 016.358-12.043l-.655 1.24zM13 8.539a3.461 3.461 0 000 6.922v1.402a4.863 4.863 0 010-9.726v1.402z"></path><path d="M14.286 10.836a2.242 2.242 0 00-.51-.409 1.085 1.085 0 00-.545-.152c-.254 0-.482.047-.683.14a1.582 1.582 0 00-.841.912 1.848 1.848 0 000 1.262 1.595 1.595 0 00.841.913c.2.093.429.14.683.14.217 0 .418-.046.603-.135.187-.09.35-.225.475-.392l.927 1.006c-.139.14-.3.261-.481.363a3.367 3.367 0 01-1.083.38c-.17.026-.317.04-.44.04a3.316 3.316 0 01-1.182-.21 2.826 2.826 0 01-.962-.597 2.813 2.813 0 01-.643-.929 2.986 2.986 0 01-.238-1.21c0-.444.08-.847.238-1.21.15-.35.368-.666.643-.929.277-.261.604-.464.962-.596a3.316 3.316 0 011.181-.21c.355 0 .713.068 1.072.204.362.138.686.36.945.649l-.962.97z"></path><path d="M19.338 11.397c-.008-.414-.136-.738-.383-.976-.247-.237-.59-.356-1.03-.356-.418 0-.749.12-.991.362-.244.242-.393.565-.447.97h2.85zm-2.85 1.052c.045.42.208.748.486.982.278.234.614.351 1.008.351.348 0 .639-.072.875-.217a2.42 2.42 0 00.62-.543l.997.76c-.325.405-.689.694-1.09.865a3.32 3.32 0 01-2.445.047 2.821 2.821 0 01-.962-.597 2.829 2.829 0 01-.643-.929 2.992 2.992 0 01-.237-1.21c0-.444.079-.847.238-1.21.15-.35.368-.666.642-.929.278-.261.605-.464.962-.596a3.32 3.32 0 011.182-.21c.386 0 .74.067 1.06.204.32.136.595.333.823.59.228.258.405.575.533.953.128.379.19.812.19 1.303v.386h-4.24zm4.843-3.296h1.39v.888h.023c.155-.327.375-.58.661-.76a1.812 1.812 0 011.234-.246c.081.016.164.036.25.06v1.355a3.912 3.912 0 00-.343-.076c-.109-.02-.22-.03-.33-.03-.324 0-.585.06-.782.182a1.38 1.38 0 00-.66.883 1.76 1.76 0 00-.053.35v3.005h-1.39V9.152zm7.797 2.244c-.008-.414-.135-.738-.383-.976-.246-.237-.59-.356-1.03-.356-.417 0-.748.12-.99.362-.245.242-.393.565-.447.97h2.85zm-2.85 1.052c.046.42.208.748.487.982.277.234.613.351 1.007.351.348 0 .64-.072.875-.217.236-.144.446-.328.62-.543l.997.76c-.325.405-.688.694-1.09.865a3.319 3.319 0 01-2.445.047 2.823 2.823 0 01-.961-.597 2.829 2.829 0 01-.643-.929 2.984 2.984 0 01-.238-1.21c0-.444.08-.847.238-1.21.158-.362.373-.672.643-.929a2.84 2.84 0 01.962-.596 3.318 3.318 0 011.181-.21c.387 0 .74.067 1.06.204.321.136.596.333.823.59.228.258.406.575.533.953.128.379.192.812.192 1.303v.386h-4.241zm9.225-.49a1.84 1.84 0 00-.11-.632 1.603 1.603 0 00-.84-.912 1.607 1.607 0 00-.684-.14 1.587 1.587 0 00-1.524 1.052 1.83 1.83 0 00-.11.631c0 .218.036.429.11.632a1.583 1.583 0 001.524 1.052 1.591 1.591 0 001.524-1.052c.073-.203.11-.414.11-.632zM30.89 5.925h1.391v3.94h.035a1.99 1.99 0 01.266-.287 2.327 2.327 0 01.927-.485c.201-.054.433-.081.696-.081a2.55 2.55 0 011.94.853c.236.264.42.577.55.935.132.358.198.744.198 1.157 0 .413-.062.8-.186 1.158a2.673 2.673 0 01-.544.935c-.243.267-.539.48-.869.625-.34.152-.723.229-1.147.229a2.613 2.613 0 01-1.1-.235 1.785 1.785 0 01-.812-.748h-.023v.841H30.89V5.927zm6.604 3.227h1.39v.888h.023c.155-.327.376-.58.661-.76a1.815 1.815 0 011.234-.246c.081.016.164.036.25.06v1.355a3.893 3.893 0 00-.343-.076c-.109-.02-.22-.03-.33-.03-.325 0-.585.06-.782.182a1.43 1.43 0 00-.452.415 1.39 1.39 0 00-.209.468 1.788 1.788 0 00-.051.35v3.005h-1.391V9.152zm7.207 3.097h-.29c-.193 0-.409.008-.649.024a3.384 3.384 0 00-.677.11c-.213.06-.393.146-.54.258a.564.564 0 00-.22.473c0 .133.03.244.087.333.058.09.134.166.226.229a.933.933 0 00.313.134c.117.027.232.04.348.04.48 0 .832-.114 1.06-.344.228-.23.342-.544.342-.94v-.317zm.082 1.743h-.036c-.2.32-.456.551-.764.695-.32.146-.668.22-1.02.216-.253 0-.504-.035-.748-.104a2.03 2.03 0 01-.649-.317 1.616 1.616 0 01-.457-.526 1.501 1.501 0 01-.174-.736c0-.305.054-.563.163-.777.103-.21.252-.393.434-.539a2.19 2.19 0 01.632-.344c.242-.087.492-.152.747-.193.258-.043.52-.07.782-.082.247-.011.495-.017.742-.018h.347v-.151c0-.351-.12-.614-.36-.79-.238-.175-.544-.262-.914-.262a2.129 2.129 0 00-1.483.585l-.73-.738a2.7 2.7 0 011.083-.69c.412-.14.845-.21 1.28-.21.394 0 .726.046.997.135.27.09.494.205.672.345.177.14.314.302.411.485.096.183.166.368.21.555.041.187.066.368.074.544.008.175.012.33.012.461v3.227h-1.252v-.771zm5.018-3.286c-.27-.382-.634-.573-1.09-.573a1.16 1.16 0 00-.544.14.478.478 0 00-.266.456c0 .172.073.297.22.375.147.078.332.144.556.198.224.055.465.111.724.17.259.058.5.148.724.268.224.122.41.287.556.498.147.21.22.498.22.864 0 .336-.071.619-.214.848-.139.226-.33.417-.556.556a2.456 2.456 0 01-.77.303c-.282.062-.57.094-.858.094-.432 0-.83-.062-1.194-.187a2.27 2.27 0 01-.973-.678l.928-.877c.177.203.368.368.573.497.204.129.454.193.747.193.101 0 .205-.012.313-.035a.992.992 0 00.301-.117.71.71 0 00.226-.204.482.482 0 00.087-.287c0-.194-.073-.34-.22-.432a1.966 1.966 0 00-.556-.229c-.24-.062-.481-.116-.724-.164a2.794 2.794 0 01-.725-.245 1.523 1.523 0 01-.556-.473c-.146-.203-.22-.483-.22-.841 0-.312.064-.583.191-.813a1.69 1.69 0 01.504-.567c.217-.152.461-.263.719-.327a3.256 3.256 0 011.923.087c.356.123.664.354.881.66l-.927.842z"></path></svg>`,si=`<svg fill="currentColor" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Cerebras</title><path clip-rule="evenodd" d="M14.121 2.701a9.299 9.299 0 000 18.598V22.7c-5.91 0-10.7-4.791-10.7-10.701S8.21 1.299 14.12 1.299V2.7zm4.752 3.677A7.353 7.353 0 109.42 17.643l-.901 1.074a8.754 8.754 0 01-1.08-12.334 8.755 8.755 0 0112.335-1.08l-.901 1.075zm-2.255.844a5.407 5.407 0 00-5.048 9.563l-.656 1.24a6.81 6.81 0 016.358-12.043l-.654 1.24zM14.12 8.539a3.46 3.46 0 100 6.922v1.402a4.863 4.863 0 010-9.726v1.402z" fill="#F15A29" fill-rule="evenodd"></path><path d="M15.407 10.836a2.24 2.24 0 00-.51-.409 1.084 1.084 0 00-.544-.152c-.255 0-.483.047-.684.14a1.58 1.58 0 00-.84.912c-.074.203-.11.416-.11.631 0 .218.036.43.11.631a1.594 1.594 0 00.84.913c.2.093.43.14.684.14.216 0 .417-.046.602-.135.188-.09.35-.225.475-.392l.928 1.006c-.14.14-.3.261-.482.363a3.367 3.367 0 01-1.083.38c-.17.026-.317.04-.44.04a3.315 3.315 0 01-1.182-.21 2.825 2.825 0 01-.961-.597 2.816 2.816 0 01-.644-.929 2.987 2.987 0 01-.238-1.21c0-.444.08-.847.238-1.21.15-.35.368-.666.643-.929.278-.261.605-.464.962-.596a3.315 3.315 0 011.182-.21c.355 0 .712.068 1.072.204.361.138.685.36.944.649l-.962.97z"></path></svg>`,ci=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 95 24" xmlns="http://www.w3.org/2000/svg"><title>Cerebras</title><path clip-rule="evenodd" d="M17.075 16.717c-.62-.52-.982-1.25-1.085-2.187l9.446.001v-.86c0-1.094-.14-2.06-.425-2.904-.283-.842-.68-1.549-1.188-2.12a5.049 5.049 0 00-1.832-1.317c-.713-.304-1.5-.456-2.361-.456a7.396 7.396 0 00-2.633.469 6.325 6.325 0 00-2.143 1.328 6.309 6.309 0 00-1.431 2.07c-.354.808-.53 1.706-.53 2.696 0 .99.176 1.888.529 2.695.333.78.82 1.483 1.432 2.07a6.288 6.288 0 002.142 1.328 7.396 7.396 0 002.633.469 7.101 7.101 0 002.814-.573c.894-.381 1.704-1.025 2.427-1.926l-2.22-1.693c-.388.48-.855.888-1.381 1.21-.526.322-1.175.483-1.95.483-.877 0-1.625-.261-2.244-.783zm4.413-6.705c.55.53.836 1.254.852 2.175h-6.35c.12-.903.452-1.623.995-2.162.54-.537 1.278-.807 2.207-.807.98 0 1.745.266 2.296.794z"></path><path d="M29.878 7.187H26.78v12.499h3.098v-6.693c0-.172.038-.433.116-.78.077-.348.232-.694.465-1.043.233-.346.568-.654 1.006-.923.44-.27 1.02-.405 1.742-.405.247 0 .493.023.736.066.256.045.51.101.761.169v-3.02a7.03 7.03 0 00-.554-.131 2.962 2.962 0 00-.555-.05c-.827 0-1.559.198-2.194.597-.636.4-1.129.964-1.473 1.693h-.05V7.187z"></path><path clip-rule="evenodd" d="M37.8 14.531c.102.937.465 1.666 1.084 2.186.619.522 1.367.783 2.245.783.775 0 1.424-.161 1.95-.483.525-.322.992-.73 1.38-1.21l2.22 1.693c-.722.901-1.532 1.545-2.426 1.926-.89.38-1.848.576-2.815.573a7.39 7.39 0 01-2.632-.469 6.287 6.287 0 01-2.142-1.328 6.302 6.302 0 01-1.432-2.07c-.353-.807-.53-1.705-.53-2.696 0-.989.177-1.887.53-2.695a6.3 6.3 0 011.432-2.07 6.325 6.325 0 012.142-1.328 7.39 7.39 0 012.633-.469c.86 0 1.648.152 2.361.456a5.05 5.05 0 011.833 1.316c.507.572.904 1.279 1.188 2.121.285.844.426 1.81.426 2.903v.861H37.8zm5.497-4.519c.55.53.834 1.254.852 2.175H37.8c.121-.903.452-1.623.995-2.162.54-.537 1.278-.807 2.207-.807.98 0 1.746.266 2.296.794zM51.173 0h-3.098v19.686h2.944V17.81h.051c.447.765 1.048 1.32 1.808 1.667.77.35 1.606.528 2.45.522.947 0 1.8-.17 2.557-.509a5.714 5.714 0 001.935-1.393 5.954 5.954 0 001.213-2.082 7.835 7.835 0 00.413-2.58c0-.92-.146-1.778-.44-2.576a6.398 6.398 0 00-1.225-2.085 5.68 5.68 0 00-1.896-1.394 5.772 5.772 0 00-2.426-.506 5.93 5.93 0 00-1.55.182 5.18 5.18 0 00-1.187.47c-.344.19-.636.394-.878.61-.241.219-.439.43-.593.638h-.078V0zm6.931 12.031c.163.45.245.92.245 1.405 0 .487-.082.956-.246 1.407a3.545 3.545 0 01-1.87 2.03 3.574 3.574 0 01-1.524.314 3.525 3.525 0 01-3.394-2.343 4.098 4.098 0 01-.245-1.407c-.001-.48.081-.955.245-1.406A3.533 3.533 0 0153.186 10a3.584 3.584 0 011.523-.312c.568 0 1.076.104 1.523.312.434.2.825.482 1.15.833.317.349.557.746.722 1.2z"></path><path d="M65.882 7.187h-3.097v12.499h3.098v-6.693c0-.172.038-.433.115-.78.078-.348.233-.694.466-1.043.232-.346.567-.654 1.006-.923.439-.27 1.019-.405 1.742-.405.246 0 .492.023.735.066.257.045.512.101.763.169v-3.02a7.065 7.065 0 00-.556-.131 2.942 2.942 0 00-.554-.05c-.825 0-1.558.198-2.194.597-.636.4-1.128.964-1.473 1.693h-.051V7.187z"></path><path clip-rule="evenodd" d="M78.943 17.969h.079l-.002 1.718h2.788v-7.188c0-.294-.008-.638-.026-1.028a6.951 6.951 0 00-.166-1.21 5.142 5.142 0 00-.466-1.238 3.4 3.4 0 00-.916-1.08c-.397-.312-.895-.569-1.497-.77-.603-.198-1.343-.299-2.22-.299a8.83 8.83 0 00-2.853.469 6.012 6.012 0 00-2.413 1.536l1.626 1.642a4.743 4.743 0 013.304-1.303c.826 0 1.506.196 2.039.587.533.39.8.976.8 1.757v.338h-.773c-.551.001-1.103.014-1.654.039-.584.026-1.165.088-1.741.182a9.606 9.606 0 00-1.665.43 4.88 4.88 0 00-1.407.768 3.555 3.555 0 00-.967 1.199c-.241.478-.363 1.053-.363 1.731 0 .625.13 1.173.388 1.64.25.461.598.861 1.019 1.173.436.32.925.558 1.446.704a6.019 6.019 0 001.665.233 5.307 5.307 0 002.271-.481c.688-.321 1.257-.838 1.704-1.55zm-.749-3.881h.645v.703c0 .884-.254 1.584-.76 2.096-.51.513-1.295.768-2.362.768-.259 0-.516-.03-.775-.091a2.083 2.083 0 01-.698-.3 1.769 1.769 0 01-.503-.507c-.129-.2-.193-.447-.193-.742 0-.451.164-.803.49-1.055a3.465 3.465 0 011.202-.573 7.534 7.534 0 011.508-.247 22.752 22.752 0 011.446-.052z"></path><path d="M87.774 9.374c1.015 0 1.825.425 2.426 1.276l2.066-1.875a4.013 4.013 0 00-1.963-1.47 7.302 7.302 0 00-2.452-.43c-.618-.001-1.234.078-1.833.234a4.82 4.82 0 00-1.6.73c-.464.33-.839.75-1.123 1.262-.284.512-.425 1.116-.425 1.81 0 .798.163 1.424.49 1.876.322.446.747.807 1.239 1.052a6.22 6.22 0 001.614.547c.54.106 1.079.227 1.613.365.499.131.91.3 1.238.51.328.207.491.529.491.961 0 .245-.065.458-.194.64a1.578 1.578 0 01-.504.454c-.206.122-.429.21-.67.26a3.24 3.24 0 01-.697.079c-.654 0-1.21-.143-1.665-.428a5.852 5.852 0 01-1.277-1.11l-2.066 1.955c.637.729 1.36 1.232 2.168 1.51.81.278 1.696.417 2.66.417.642-.001 1.282-.07 1.91-.209a5.473 5.473 0 001.716-.676 3.78 3.78 0 001.238-1.238c.319-.51.477-1.14.477-1.888 0-.816-.163-1.458-.49-1.926a3.527 3.527 0 00-1.238-1.108 6.356 6.356 0 00-1.613-.598c-.577-.13-1.115-.256-1.614-.378-.5-.121-.911-.269-1.238-.442-.327-.173-.49-.452-.49-.834 0-.47.197-.806.593-1.016.396-.208.8-.312 1.213-.312zM9.95 10.026c.422.246.805.553 1.137.911l2.142-2.162a5.428 5.428 0 00-2.104-1.446 6.713 6.713 0 00-2.388-.455 7.386 7.386 0 00-2.632.468 6.316 6.316 0 00-2.142 1.329 6.266 6.266 0 00-1.432 2.07C2.177 11.55 2 12.449 2 13.437c0 .99.177 1.887.53 2.695.333.78.82 1.484 1.433 2.07a6.294 6.294 0 002.142 1.33 7.384 7.384 0 002.632.467c.276 0 .603-.03.982-.09a7.502 7.502 0 002.413-.846 4.813 4.813 0 001.072-.808l-2.066-2.24c-.278.37-.64.67-1.058.873-.413.198-.86.3-1.343.3-.567 0-1.075-.105-1.521-.312a3.553 3.553 0 01-1.873-2.032 4.107 4.107 0 01-.246-1.407c0-.48.082-.955.245-1.405a3.52 3.52 0 01.724-1.198c.32-.349.701-.625 1.15-.835.446-.207.954-.311 1.521-.311.428.003.846.12 1.214.339z"></path></svg>`,li=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Cerebras</title><path clip-rule="evenodd" d="M14.121 2.701a9.299 9.299 0 000 18.598V22.7c-5.91 0-10.7-4.791-10.7-10.701S8.21 1.299 14.12 1.299V2.7zm4.752 3.677A7.353 7.353 0 109.42 17.643l-.901 1.074a8.754 8.754 0 01-1.08-12.334 8.755 8.755 0 0112.335-1.08l-.901 1.075zm-2.255.844a5.407 5.407 0 00-5.048 9.563l-.656 1.24a6.81 6.81 0 016.358-12.043l-.654 1.24zM14.12 8.539a3.46 3.46 0 100 6.922v1.402a4.863 4.863 0 010-9.726v1.402z"></path><path d="M15.407 10.836a2.24 2.24 0 00-.51-.409 1.084 1.084 0 00-.544-.152c-.255 0-.483.047-.684.14a1.58 1.58 0 00-.84.912c-.074.203-.11.416-.11.631 0 .218.036.43.11.631a1.594 1.594 0 00.84.913c.2.093.43.14.684.14.216 0 .417-.046.602-.135.188-.09.35-.225.475-.392l.928 1.006c-.14.14-.3.261-.482.363a3.367 3.367 0 01-1.083.38c-.17.026-.317.04-.44.04a3.315 3.315 0 01-1.182-.21 2.825 2.825 0 01-.961-.597 2.816 2.816 0 01-.644-.929 2.987 2.987 0 01-.238-1.21c0-.444.08-.847.238-1.21.15-.35.368-.666.643-.929.278-.261.605-.464.962-.596a3.315 3.315 0 011.182-.21c.355 0 .712.068 1.072.204.361.138.685.36.944.649l-.962.97z"></path></svg>`,ui=`<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Cloudflare</title><path d="M16.493 17.4c.135-.52.08-.983-.161-1.338-.215-.328-.592-.519-1.05-.519l-8.663-.109a.148.148 0 01-.135-.082c-.027-.054-.027-.109-.027-.163.027-.082.108-.164.189-.164l8.744-.11c1.05-.054 2.153-.9 2.556-1.937l.511-1.31c.027-.055.027-.11.027-.164C17.92 8.91 15.66 7 12.942 7c-2.503 0-4.628 1.638-5.381 3.903a2.432 2.432 0 00-1.803-.491c-1.21.109-2.153 1.092-2.287 2.32-.027.328 0 .628.054.9C1.56 13.688 0 15.326 0 17.319c0 .19.027.355.027.545 0 .082.08.137.161.137h15.983c.08 0 .188-.055.215-.164l.107-.437" fill="#F38020"></path><path d="M19.238 11.75h-.242c-.054 0-.108.054-.135.109l-.35 1.2c-.134.52-.08.983.162 1.338.215.328.592.518 1.05.518l1.855.11c.054 0 .108.027.135.082.027.054.027.109.027.163-.027.082-.108.164-.188.164l-1.91.11c-1.05.054-2.153.9-2.557 1.937l-.134.355c-.027.055.026.137.107.137h6.592c.081 0 .162-.055.162-.137.107-.41.188-.846.188-1.31-.027-2.62-2.153-4.777-4.762-4.777" fill="#FCAD32"></path></svg>`,di=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 242 24" xmlns="http://www.w3.org/2000/svg"><title>Cloudflare</title><path d="M28.4 2.395h5.386v14.606h9.326v4.736H28.4V2.395zM16.71 14.369c-.787 1.71-2.363 2.894-4.465 2.894-2.89 0-4.86-2.368-4.86-5.263 0-2.764 1.97-5.132 4.86-5.132 2.232 0 3.81 1.316 4.597 3.158h5.647C21.571 5.421 17.5 2 12.377 2 6.467 2 2 6.474 2 12s4.335 10 10.377 10c5.122 0 9.062-3.289 10.112-7.763H16.71v.132zM224.37 2.395h15.499v4.606h-10.114v2.894h9.194v4.21h-9.194v3.027H240v4.605h-15.63V2.395zm-24.693 0h9.062c2.89 0 4.991.79 6.305 2.105 1.182 1.052 1.708 2.632 1.708 4.474 0 2.894-1.576 4.868-3.94 5.921l4.596 6.71h-6.174l-3.939-5.79h-2.365v5.79h-5.386V2.395h.133zm8.8 9.211c1.838 0 2.889-.921 2.889-2.238 0-1.579-1.05-2.237-2.89-2.237l-3.546.001v4.605h3.547v-.13zm-29.028-9.343h5.122l8.144 19.474h-5.78l-1.444-3.421h-7.486l-1.315 3.42h-5.516l8.275-19.473zm4.598 11.842l-2.103-5.526-2.232 5.526h4.335zm-33.232-11.71h5.386v14.606h9.325v4.736h-14.711V2.395zm-22.854 0h15.367v4.737h-9.981v3.158h9.062v4.474h-9.062v6.973h-5.386V2.395zm-26.007 0h7.488c6.829 0 10.9 3.947 10.9 9.473 0 5.526-4.071 9.737-11.032 9.737h-7.356V2.395zm7.488 14.606c3.151 0 5.253-1.712 5.253-4.87 0-3.025-2.102-4.868-5.253-4.868h-2.233v9.87h2.233V17zm-33.625-3.816V2.395H81.2v10.658c0 2.763 1.445 4.078 3.547 4.078 2.101 0 3.547-1.315 3.547-3.946V2.263h5.385v10.659c0 6.183-3.548 8.946-9.063 8.946-5.386.132-8.8-2.63-8.8-8.683zm-27.19-1.053C48.628 6.474 53.095 2 59.006 2c5.91 0 10.375 4.474 10.375 10s-4.465 10-10.375 10c-6.042 0-10.377-4.342-10.377-9.868zm15.237 0c0-2.896-1.97-5.264-4.99-5.264-2.891 0-4.861 2.368-4.861 5.132s1.97 5.263 4.86 5.263c3.02 0 4.99-2.368 4.99-5.131z"></path></svg>`,fi=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Cloudflare</title><path d="M16.493 17.4c.135-.52.08-.983-.161-1.338-.215-.328-.592-.519-1.05-.519l-8.663-.109a.148.148 0 01-.135-.082c-.027-.054-.027-.109-.027-.163.027-.082.108-.164.189-.164l8.744-.11c1.05-.054 2.153-.9 2.556-1.937l.511-1.31c.027-.055.027-.11.027-.164C17.92 8.91 15.66 7 12.942 7c-2.503 0-4.628 1.638-5.381 3.903a2.432 2.432 0 00-1.803-.491c-1.21.109-2.153 1.092-2.287 2.32-.027.328 0 .628.054.9C1.56 13.688 0 15.326 0 17.319c0 .19.027.355.027.545 0 .082.08.137.161.137h15.983c.08 0 .188-.055.215-.164l.107-.437"></path><path d="M19.238 11.75h-.242c-.054 0-.108.054-.135.109l-.35 1.2c-.134.52-.08.983.162 1.338.215.328.592.518 1.05.518l1.855.11c.054 0 .108.027.135.082.027.054.027.109.027.163-.027.082-.108.164-.188.164l-1.91.11c-1.05.054-2.153.9-2.557 1.937l-.134.355c-.027.055.026.137.107.137h6.592c.081 0 .162-.055.162-.137.107-.41.188-.846.188-1.31-.027-2.62-2.153-4.777-4.762-4.777"></path></svg>`,pi=`<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Gemini</title><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z" fill="#3186FF"></path><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z" fill="url(#lobe-icons-gemini-0-_R_0_)"></path><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z" fill="url(#lobe-icons-gemini-1-_R_0_)"></path><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z" fill="url(#lobe-icons-gemini-2-_R_0_)"></path><defs><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-gemini-0-_R_0_" x1="7" x2="11" y1="15.5" y2="12"><stop stop-color="#08B962"></stop><stop offset="1" stop-color="#08B962" stop-opacity="0"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-gemini-1-_R_0_" x1="8" x2="11.5" y1="5.5" y2="11"><stop stop-color="#F94543"></stop><stop offset="1" stop-color="#F94543" stop-opacity="0"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-gemini-2-_R_0_" x1="3.5" x2="17.5" y1="13.5" y2="12"><stop stop-color="#FABC12"></stop><stop offset=".46" stop-color="#FABC12" stop-opacity="0"></stop></linearGradient></defs></svg>`,mi=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 98 24" xmlns="http://www.w3.org/2000/svg"><title>Gemini</title><path d="M21.186 12.67c0 2.649-.786 4.759-2.359 6.33-1.766 1.87-4.09 2.806-6.969 2.806-2.756 0-5.088-.953-6.996-2.86C2.954 17.04 2 14.693 2 11.904c0-2.789.954-5.137 2.862-7.043C6.77 2.953 9.102 2 11.858 2c1.396 0 2.712.247 3.949.741 1.236.495 2.252 1.192 3.047 2.092l-1.749 1.748c-.583-.706-1.338-1.258-2.266-1.655a7.49 7.49 0 00-2.981-.596c-2.067 0-3.816.715-5.247 2.145-1.413 1.448-2.12 3.257-2.12 5.428s.707 3.98 2.12 5.428c1.431 1.43 3.18 2.145 5.247 2.145 1.89 0 3.463-.53 4.717-1.588 1.254-1.06 1.979-2.516 2.173-4.37h-6.89v-2.277h9.196c.088.495.132.971.132 1.43m7.652-4.633c1.946 0 3.494.629 4.645 1.886 1.15 1.257 1.726 3.018 1.726 5.282l-.027.268H24.877c.036 1.284.464 2.318 1.285 3.102.82.785 1.802 1.177 2.944 1.177 1.57 0 2.802-.784 3.694-2.354l2.195 1.07a6.54 6.54 0 01-2.45 2.595C31.503 21.688 30.32 22 29 22c-1.927 0-3.516-.66-4.765-1.98-1.249-1.319-1.873-2.986-1.873-5.001 0-1.997.606-3.66 1.82-4.988 1.213-1.329 2.766-1.993 4.657-1.993m-.053 2.247c-.928 0-1.727.285-2.396.856-.67.57-1.11 1.337-1.325 2.3h7.522c-.071-.91-.442-1.663-1.111-2.26-.67-.598-1.566-.896-2.69-.896M39.247 21.53h-2.455V8.465h2.348v1.813h.107c.374-.64.947-1.173 1.721-1.6.774-.427 1.544-.64 2.309-.64.96 0 1.806.222 2.535.667a3.931 3.931 0 011.601 1.84c1.085-1.671 2.589-2.507 4.51-2.507 1.513 0 2.678.462 3.496 1.387.819.924 1.228 2.24 1.228 3.946v8.16h-2.455v-7.786c0-1.227-.223-2.112-.668-2.654-.444-.542-1.192-.813-2.241-.813-.943 0-1.735.4-2.375 1.2-.64.8-.961 1.742-.961 2.826v7.227h-2.455v-7.786c0-1.227-.223-2.112-.668-2.654-.444-.542-1.191-.813-2.241-.813-.943 0-1.735.4-2.375 1.2-.64.8-.961 1.742-.961 2.826v7.227zM61.911 3.93c0 .48-.17.89-.508 1.228a1.675 1.675 0 01-1.23.508c-.48 0-.89-.17-1.229-.508a1.673 1.673 0 01-.508-1.228c0-.481.17-.89.508-1.229a1.675 1.675 0 011.23-.508c.48 0 .89.17 1.23.508.338.338.507.748.507 1.228m-.11 4.514v13.088h-2.857V8.443h2.857zM80 3.93c0 .48-.17.89-.508 1.228a1.675 1.675 0 01-1.23.508c-.48 0-.89-.17-1.229-.508a1.673 1.673 0 01-.508-1.228c0-.481.17-.89.508-1.229a1.675 1.675 0 011.23-.508c.48 0 .89.17 1.23.508.338.338.507.748.507 1.228m-.11 4.514v13.088h-2.857V8.443h2.857zm-16.343.022h2.349v1.813h.107c.373-.64.947-1.173 1.721-1.6a4.935 4.935 0 012.415-.64c1.601 0 2.833.458 3.696 1.373.863.916 1.294 2.218 1.294 3.907v8.213h-2.455v-8.053c-.053-2.133-1.13-3.2-3.229-3.2-.978 0-1.797.395-2.455 1.187-.658.79-.987 1.737-.987 2.84v7.226h-2.456V8.465z"></path></svg>`,hi=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Gemini</title><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z"></path></svg>`,gi=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 78 24" xmlns="http://www.w3.org/2000/svg"><title>Github</title><path d="M16.598 10.836v9.48c0 .066-.017.181-.1.214 0 0-2.07 1.47-5.484 1.47C6.888 22 2 20.712 2 12.223 2 3.734 6.275 1.983 10.45 2c3.613 0 5.07.81 5.303.958.066.083.1.149.1.231l-.697 2.94c0 .149-.149.33-.331.28-.597-.18-1.491-.544-3.596-.544-2.435 0-5.053.693-5.053 6.16 0 5.466 2.485 6.11 4.275 6.11 1.524 0 2.07-.181 2.07-.181v-3.799h-2.435c-.182 0-.315-.132-.315-.28v-3.04c0-.148.133-.28.315-.28h6.197c.182 0 .315.132.315.28zM76 14.684c0 5.664-1.84 7.283-5.054 7.283-2.717 0-4.175-1.37-4.175-1.37s-.067.759-.15.858c-.05.1-.132.132-.231.132h-2.453c-.165 0-.315-.132-.315-.28l.034-18.349a.29.29 0 01.281-.28h3.53a.29.29 0 01.281.28v6.226s1.359-.875 3.347-.875l-.016-.033c1.988 0 4.921.743 4.921 6.408zM47.865 2.71a.29.29 0 01.281.281V21.34a.29.29 0 01-.281.281h-3.53a.29.29 0 01-.281-.28l.033-7.845h-5.485v7.844a.29.29 0 01-.281.281h-3.53c-.132 0-.281-.132-.281-.28V2.99a.29.29 0 01.281-.28h3.53a.29.29 0 01.281.28v6.755h5.485V2.99a.29.29 0 01.282-.28h3.496zM61.55 8.722c.183 0 .315.132.315.28l-.033 12.337c0 .149-.1.281-.282.281h-2.22c-.116 0-.232-.066-.265-.148-.05-.1-.133-.744-.133-.744S57.061 22 54.758 22c-2.8 0-4.839-.908-4.839-4.542V9.02a.29.29 0 01.282-.28h3.546a.29.29 0 01.282.28v7.845c0 1.238.364 1.8 1.607 1.8 1.243 0 2.154-.644 2.154-.644V9.036c0-.182.1-.314.282-.314h3.48zm-28.84 9.861h.007c.14.029.239.154.234.296v2.477c0 .116-.05.231-.149.264-.166.083-1.226.363-2.104.363-1.922 0-4.74-.412-4.74-4.442v-5.417H24.12c-.149 0-.281-.132-.281-.314V9.564c0-.132.083-.248.215-.28.116-.017 1.922-.463 1.922-.463V5.237c0-.132.083-.215.232-.215h3.58c.148 0 .231.083.231.215v3.485h2.635c.132 0 .265.132.265.28v2.808c0 .182-.116.314-.265.314h-2.635v5.17c0 .777.448 1.372 1.74 1.372.41 0 .797-.081.951-.083zM22.28 8.705a.29.29 0 01.282.281v12.172c0 .297-.083.446-.414.446h-3.182c-.281 0-.497-.116-.497-.446V9.036c0-.182.133-.33.282-.33h3.53zm49.693 6.243c0-2.99-1.21-3.386-2.486-3.253-.994.066-1.79.561-1.79.561v5.813s.813.562 2.022.595c1.707.05 2.254-.562 2.254-3.716zM20.54 3.123a2.26 2.26 0 012.254 2.28A2.26 2.26 0 0120.54 7.68a2.266 2.266 0 01-2.286-2.279c0-1.271 1.01-2.279 2.286-2.279z"></path></svg>`,_i=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Github</title><path d="M12 0c6.63 0 12 5.276 12 11.79-.001 5.067-3.29 9.567-8.175 11.187-.6.118-.825-.25-.825-.56 0-.398.015-1.665.015-3.242 0-1.105-.375-1.813-.81-2.181 2.67-.295 5.475-1.297 5.475-5.822 0-1.297-.465-2.344-1.23-3.169.12-.295.54-1.503-.12-3.125 0 0-1.005-.324-3.3 1.209a11.32 11.32 0 00-3-.398c-1.02 0-2.04.133-3 .398-2.295-1.518-3.3-1.209-3.3-1.209-.66 1.622-.24 2.83-.12 3.125-.765.825-1.23 1.887-1.23 3.169 0 4.51 2.79 5.527 5.46 5.822-.345.294-.66.81-.765 1.577-.69.31-2.415.81-3.495-.973-.225-.354-.9-1.223-1.845-1.209-1.005.015-.405.56.015.781.51.28 1.095 1.327 1.23 1.666.24.663 1.02 1.93 4.035 1.385 0 .988.015 1.916.015 2.196 0 .31-.225.664-.825.56C3.303 21.374-.003 16.867 0 11.791 0 5.276 5.37 0 12 0z"></path></svg>`,vi=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 64 24" xmlns="http://www.w3.org/2000/svg"><title>Groq</title><path d="M37.925 2.039c4.142 0 7.509 3.368 7.509 7.528l-.004.244c-.128 4.047-3.437 7.284-7.505 7.284-4.15 0-7.509-3.368-7.509-7.528s3.36-7.528 7.509-7.528zm-11.144-.023c.26 0 .522.015.775.046l.015-.008a7.464 7.464 0 012.922.969L29.09 5.468a4.619 4.619 0 00-2.309-.6h-.253l-.253.016c-.338.03-.66.092-.982.177-.621.169-1.196.469-1.703.869a4.062 4.062 0 00-1.418 2.322l-.04.234-.03.235c-.007.077-.023.161-.023.238l-.014 2.713v2.593l-.016 2.522h-2.815l-.03-4.973V8.852c0-.139.015-.262.022-.392.023-.262.062-.523.115-.777.1-.523.269-1.03.491-1.515a6.998 6.998 0 011.948-2.484 7.465 7.465 0 012.754-1.391c.49-.131.99-.216 1.495-.254.123-.008.253-.023.376-.023h.376zM37.925 4.86a4.7 4.7 0 00-4.694 4.706 4.7 4.7 0 004.694 4.706 4.7 4.7 0 004.694-4.706l-.005-.216a4.7 4.7 0 00-4.689-4.49zM9.578 2C5.428 1.96 2.038 5.298 2 9.458c-.038 4.16 3.29 7.559 7.44 7.597h2.608v-2.822h-2.47c-2.592.031-4.717-2.053-4.748-4.652a4.7 4.7 0 014.64-4.76h.108c2.52 0 4.577 1.992 4.696 4.49l.005.216v6.936c0 2.576-2.093 4.676-4.655 4.706a4.663 4.663 0 01-3.267-1.376l-1.994 2A7.46 7.46 0 009.57 24h.1c4.096-.062 7.386-3.391 7.409-7.497V9.35c-.1-4.09-3.428-7.35-7.501-7.35zm44.929.038c-4.15 0-7.509 3.368-7.509 7.528s3.36 7.528 7.509 7.528h2.57v-2.822h-2.57a4.7 4.7 0 01-4.694-4.706 4.7 4.7 0 014.694-4.706A4.707 4.707 0 0159.16 8.94l.024.22v14.456H62V9.566c-.008-4.152-3.352-7.527-7.493-7.527z"></path></svg>`,yi=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Groq</title><path d="M12.036 2c-3.853-.035-7 3-7.036 6.781-.035 3.782 3.055 6.872 6.908 6.907h2.42v-2.566h-2.292c-2.407.028-4.38-1.866-4.408-4.23-.029-2.362 1.901-4.298 4.308-4.326h.1c2.407 0 4.358 1.915 4.365 4.278v6.305c0 2.342-1.944 4.25-4.323 4.279a4.375 4.375 0 01-3.033-1.252l-1.851 1.818A7 7 0 0012.029 22h.092c3.803-.056 6.858-3.083 6.879-6.816v-6.5C18.907 4.963 15.817 2 12.036 2z"></path></svg>`,bi=`<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Mistral</title><path d="M3.428 3.4h3.429v3.428H3.428V3.4zm13.714 0h3.43v3.428h-3.43V3.4z" fill="gold"></path><path d="M3.428 6.828h6.857v3.429H3.429V6.828zm10.286 0h6.857v3.429h-6.857V6.828z" fill="#FFAF00"></path><path d="M3.428 10.258h17.144v3.428H3.428v-3.428z" fill="#FF8205"></path><path d="M3.428 13.686h3.429v3.428H3.428v-3.428zm6.858 0h3.429v3.428h-3.429v-3.428zm6.856 0h3.43v3.428h-3.43v-3.428z" fill="#FA500F"></path><path d="M0 17.114h10.286v3.429H0v-3.429zm13.714 0H24v3.429H13.714v-3.429z" fill="#E10500"></path></svg>`,xi=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 134 24" xmlns="http://www.w3.org/2000/svg"><title>Mistral</title><path d="M2 22.638V1h6.55l3.933 14.76L16.37 1h6.565v21.638H18.87V5.605l-4.302 17.033h-4.214L6.066 5.605v17.033H2zm25.011-17.8V1.002h4.155V4.84h-4.155zm0 17.801V6.964h4.155V22.64h-4.155zm6.707-4.473l4.17-.635c.177.807.536 1.42 1.079 1.838.986.864 3.753.796 4.702.036.588-.404.753-1.367.25-1.89-.206-.196-.67-.378-1.389-.545-3.351-.738-5.475-1.412-6.372-2.022-2.418-1.526-2.465-5.18-.252-6.952 1.76-1.8 7.852-1.78 9.788-.34 1.045.699 1.764 1.732 2.159 3.1l-3.918.723c-.413-1.402-1.417-1.886-2.957-1.89-1.094 0-1.878.154-2.35.458-.591.383-.651 1.179-.06 1.595.374.275 1.668.664 3.88 1.165 2.213.502 3.759 1.117 4.636 1.845 1.993 1.694 1.615 5.13-.503 6.79-2.087 2.01-8.091 2.034-10.416.25-1.247-.865-2.063-2.04-2.447-3.527zm31.88 4.472h-4.154V6.963h3.86v2.229c.66-1.053 1.253-1.747 1.78-2.081 1.374-.857 3.144-.536 4.532.28l-1.286 3.617c-1.877-1.247-3.849-.81-4.384 1.535-.468 1.352-.329 7.76-.347 10.096zm10.67-10.892l-3.77-.679c1.014-3.408 3.08-4.43 6.801-4.457 2.81.037 4.804.362 6.055 2.324.37.674.554 1.912.554 3.713.013 1.729-.178 6.48.155 7.889.133.654.382 1.355.747 2.103H82.7c-.124-.272-.411-1.286-.547-1.712-1.378 1.335-2.97 2.066-4.865 2.067-2.945.058-5.22-1.756-5.219-4.635-.011-1.72.87-3.225 2.418-3.963.764-.37 1.865-.691 3.304-.967 1.942-.364 3.287-.703 4.037-1.018v-.413c0-.797-.197-1.366-.591-1.705-.57-.582-3.147-.744-3.963-.074-.414.29-.75.8-1.006 1.527zm5.56 3.365c-.757.315-4.139.86-4.79 1.358-1.077.707-1.038 2.141-.163 2.967 1.017.987 2.672.733 3.8-.103 1.374-.983 1.117-2.455 1.153-4.221zm7.933 7.527V1h4.155v21.638H89.76zm35.917 0h-4.761l-1.892-4.915h-8.665l-1.789 4.915h-4.643L112.371 1h4.627l8.679 21.638h.001zm-8.058-8.56l-2.987-8.03-2.927 8.03h5.914zm10.004 8.56V1H132v21.638h-4.376zM58.98 6.964v3.307H56.14v6.317l.081 2.236c.434 1.136 1.612.712 2.743.332l.355 3.218c-2.416 1.02-6.87 1.14-7.215-2.346-.096-.537-.123-1.89-.133-3.44v-6.317h-1.908V6.965h1.908V3.85l4.17-2.42v5.535h2.838z"></path></svg>`,Si=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Mistral</title><path clip-rule="evenodd" d="M3.428 3.4h3.429v3.428h3.429v3.429h-.002 3.431V6.828h3.427V3.4h3.43v13.714H24v3.429H13.714v-3.428h-3.428v-3.429h-3.43v3.428h3.43v3.429H0v-3.429h3.428V3.4zm10.286 13.715h3.428v-3.429h-3.427v3.429z"></path></svg>`,Ci=`<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Nvidia</title><path d="M10.212 8.976V7.62c.127-.01.256-.017.388-.021 3.596-.117 5.957 3.184 5.957 3.184s-2.548 3.647-5.282 3.647a3.227 3.227 0 01-1.063-.175v-4.109c1.4.174 1.681.812 2.523 2.258l1.873-1.627a4.905 4.905 0 00-3.67-1.846 6.594 6.594 0 00-.729.044m0-4.476v2.025c.13-.01.259-.019.388-.024 5.002-.174 8.261 4.226 8.261 4.226s-3.743 4.69-7.643 4.69c-.338 0-.675-.031-1.007-.092v1.25c.278.038.558.057.838.057 3.629 0 6.253-1.91 8.794-4.169.421.347 2.146 1.193 2.501 1.564-2.416 2.083-8.048 3.763-11.24 3.763-.308 0-.603-.02-.894-.048V19.5H24v-15H10.21zm0 9.756v1.068c-3.356-.616-4.287-4.21-4.287-4.21a7.173 7.173 0 014.287-2.138v1.172h-.005a3.182 3.182 0 00-2.502 1.178s.615 2.276 2.507 2.931m-5.961-3.3c1.436-1.935 3.604-3.148 5.961-3.336V6.523C5.81 6.887 2 10.723 2 10.723s2.158 6.427 8.21 7.015v-1.166C5.77 16 4.25 10.958 4.25 10.958h-.002z" fill="#74B71B" fill-rule="nonzero"></path></svg>`,wi=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 111 24" xmlns="http://www.w3.org/2000/svg"><title>Nvidia</title><path d="M46.495 2.027v19.965h5.656V2.027h-5.656zM2 2v19.992h5.706V6.48l4.452.015a4.088 4.088 0 013.183 1.101c.894.951 1.26 2.483 1.26 5.287V22h5.529V10.949c0-7.883-5.035-8.946-9.972-8.946L2 2zm53.604.027v19.965h9.174c4.882 0 6.482-.81 8.208-2.626a11.156 11.156 0 002.008-7.136c.109-2.423-.53-4.82-1.831-6.869-2.095-2.788-5.114-3.332-9.621-3.332l-7.938-.002zm5.61 4.347h2.432c3.527 0 5.81 1.58 5.81 5.678 0 4.097-2.289 5.679-5.81 5.679h-2.432V6.374zM38.34 2.027L33.62 17.845 29.096 2.027h-6.102l6.46 19.965h8.151l6.51-19.965h-5.774zm39.285 19.965h5.657V2.03h-5.659l.002 19.963zm15.86-19.957l-7.898 19.95h5.578l1.25-3.526h9.346l1.183 3.526H109l-7.958-19.952-7.555.002zm3.673 3.64l3.427 9.346h-6.96l3.533-9.346z"></path></svg>`,Ti=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Nvidia</title><path d="M10.212 8.976V7.62c.127-.01.256-.017.388-.021 3.596-.117 5.957 3.184 5.957 3.184s-2.548 3.647-5.282 3.647a3.227 3.227 0 01-1.063-.175v-4.109c1.4.174 1.681.812 2.523 2.258l1.873-1.627a4.905 4.905 0 00-3.67-1.846 6.594 6.594 0 00-.729.044m0-4.476v2.025c.13-.01.259-.019.388-.024 5.002-.174 8.261 4.226 8.261 4.226s-3.743 4.69-7.643 4.69c-.338 0-.675-.031-1.007-.092v1.25c.278.038.558.057.838.057 3.629 0 6.253-1.91 8.794-4.169.421.347 2.146 1.193 2.501 1.564-2.416 2.083-8.048 3.763-11.24 3.763-.308 0-.603-.02-.894-.048V19.5H24v-15H10.21zm0 9.756v1.068c-3.356-.616-4.287-4.21-4.287-4.21a7.173 7.173 0 014.287-2.138v1.172h-.005a3.182 3.182 0 00-2.502 1.178s.615 2.276 2.507 2.931m-5.961-3.3c1.436-1.935 3.604-3.148 5.961-3.336V6.523C5.81 6.887 2 10.723 2 10.723s2.158 6.427 8.21 7.015v-1.166C5.77 16 4.25 10.958 4.25 10.958h-.002z"></path></svg>`,Ei=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 138 24" xmlns="http://www.w3.org/2000/svg"><title>opencode</title><path d="M12.429 17.143H5.57v-6.857h6.858v6.857z" fill-opacity=".25"></path><path d="M12.428 6.857H5.571v10.286h6.857V6.857zm3.43 13.715H2.142V3.429h13.714v17.143z" fill-opacity=".75"></path><path d="M29.571 17.143h-6.857v-6.857h6.857v6.857z" fill-opacity=".25"></path><path d="M22.714 17.143h6.858V6.857h-6.858v10.286zM33 20.572H22.714V24h-3.428V3.43H33v17.143z" fill-opacity=".75"></path><path d="M50.143 13.714v3.429H39.857v-3.429h10.286z" fill-opacity=".25"></path><path d="M50.143 13.714H39.857v3.429h10.286v3.429H36.429V3.429h13.714v10.285zm-10.286-3.428h6.857V6.857h-6.857v3.429z" fill-opacity=".75"></path><path d="M63.857 20.571H57V10.286h6.857V20.57z" fill-opacity=".25"></path><path d="M63.857 6.857H57v13.715h-3.429V3.429h10.286v3.428zm3.429 13.715h-3.429V6.857h3.429v13.715z" fill-opacity=".75"></path><path d="M84.428 17.143H74.144v-6.857h10.285v6.857z" fill-opacity=".25"></path><path d="M84.428 6.857H74.144v10.286h10.285v3.429H70.715V3.429H84.43v3.428z"></path><path d="M98.143 17.143h-6.857v-6.857h6.857v6.857z" fill-opacity=".25"></path><path d="M98.143 6.857h-6.857v10.286h6.857V6.857zm3.428 13.715H87.857V3.429h13.714v17.143z"></path><path d="M115.286 17.143h-6.857v-6.857h6.857v6.857z" fill-opacity=".25"></path><path d="M115.286 6.857h-6.857v10.286h6.857V6.857zm3.428 13.714H105V3.43h10.286V0h3.428v20.571z"></path><path d="M135.857 13.714v3.429h-10.286v-3.429h10.286z" fill-opacity=".25"></path><path d="M125.571 6.857v3.429h6.858V6.857h-6.858zm10.286 6.857h-10.286v3.429h10.286v3.429h-13.714V3.429h13.714v10.285z"></path></svg>`,Di=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>opencode</title><path d="M16 6H8v12h8V6zm4 16H4V2h16v20z"></path></svg>`,Oi=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>OpenRouter</title><path d="M16.804 1.957l7.22 4.105v.087L16.73 10.21l.017-2.117-.821-.03c-1.059-.028-1.611.002-2.268.11-1.064.175-2.038.577-3.147 1.352L8.345 11.03c-.284.195-.495.336-.68.455l-.515.322-.397.234.385.23.53.338c.476.314 1.17.796 2.701 1.866 1.11.775 2.083 1.177 3.147 1.352l.3.045c.694.091 1.375.094 2.825.033l.022-2.159 7.22 4.105v.087L16.589 22l.014-1.862-.635.022c-1.386.042-2.137.002-3.138-.162-1.694-.28-3.26-.926-4.881-2.059l-2.158-1.5a21.997 21.997 0 00-.755-.498l-.467-.28a55.927 55.927 0 00-.76-.43C2.908 14.73.563 14.116 0 14.116V9.888l.14.004c.564-.007 2.91-.622 3.809-1.124l1.016-.58.438-.274c.428-.28 1.072-.726 2.686-1.853 1.621-1.133 3.186-1.78 4.881-2.059 1.152-.19 1.974-.213 3.814-.138l.02-1.907z"></path></svg>`,ki=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 143 24" xmlns="http://www.w3.org/2000/svg"><title>OpenRouter</title><path d="M9.623 2c1.46 0 2.763.35 3.91 1.05 1.149.699 2.053 1.7 2.714 3.002.66 1.303.991 2.861.991 4.675 0 1.814-.33 3.372-.991 4.675-.66 1.302-1.565 2.303-2.713 3.003-1.148.7-2.452 1.049-3.91 1.049-1.465 0-2.772-.35-3.92-1.05-1.148-.699-2.052-1.701-2.713-3.007-.66-1.305-.991-2.862-.991-4.67 0-1.814.33-3.372.991-4.675.66-1.302 1.565-2.303 2.713-3.003C6.852 2.35 8.16 2 9.624 2zm0 2.34c-.974 0-1.844.244-2.61.734-.765.489-1.37 1.208-1.813 2.156-.443.949-.664 2.114-.664 3.497s.221 2.548.664 3.497c.444.948 1.048 1.667 1.813 2.156.766.49 1.636.735 2.61.735.97 0 1.838-.245 2.606-.735.768-.489 1.374-1.208 1.817-2.156.443-.949.665-2.114.665-3.497s-.222-2.548-.665-3.497c-.443-.948-1.049-1.667-1.817-2.156-.768-.49-1.637-.735-2.606-.735zm16.32 1.974c1.024 0 1.938.26 2.742.78s1.436 1.269 1.896 2.248c.46.979.69 2.156.69 3.534 0 1.377-.23 2.556-.686 3.538-.457.981-1.085 1.736-1.883 2.264-.799.529-1.71.793-2.734.793-.771 0-1.4-.13-1.887-.39-.488-.26-.869-.564-1.144-.913a6.908 6.908 0 01-.636-.929h-.149V24h-2.47V6.48h2.412v2.065h.207c.143-.265.35-.572.62-.92.27-.349.643-.655 1.123-.917.479-.263 1.112-.394 1.9-.394zm-.528 2.107c-.716 0-1.32.185-1.813.556-.493.37-.866.887-1.12 1.55-.253.665-.38 1.439-.38 2.324 0 .896.13 1.68.389 2.356.259.674.633 1.201 1.123 1.58s1.09.568 1.8.568c.738 0 1.355-.198 1.85-.593.496-.395.872-.933 1.128-1.613.256-.68.384-1.447.384-2.298 0-.84-.125-1.596-.376-2.265-.25-.67-.625-1.197-1.123-1.584-.498-.388-1.12-.581-1.862-.581zm13.387-2.107c.716 0 1.41.119 2.082.356a5.037 5.037 0 011.809 1.12c.534.51.955 1.169 1.263 1.979.309.81.463 1.793.463 2.949v.88l-9.016-.001.002.105c.03.732.178 1.364.445 1.895.3.597.72 1.052 1.26 1.364.539.313 1.17.469 1.89.469.469 0 .895-.068 1.28-.203a2.716 2.716 0 001-.61c.281-.271.496-.606.644-1.004l2.338.423a4.247 4.247 0 01-1.004 1.813c-.482.517-1.084.918-1.808 1.203-.725.284-1.549.427-2.474.427-1.25 0-2.325-.27-3.225-.809-.9-.54-1.594-1.3-2.082-2.281-.487-.982-.73-2.134-.73-3.455 0-1.306.243-2.456.73-3.451.488-.996 1.17-1.773 2.049-2.331.878-.559 1.906-.838 3.084-.838zm.017 2.049c-.694 0-1.298.17-1.813.51-.515.34-.911.782-1.19 1.327a3.778 3.778 0 00-.39 1.303l-.02.236h6.593c0-.653-.132-1.232-.397-1.738a3.022 3.022 0 00-1.11-1.199c-.477-.293-1.034-.44-1.673-.44zm10.29 3.293v7.566H46.64V6.48h2.37v2.074h.158a3.63 3.63 0 011.375-1.626c.625-.41 1.413-.614 2.366-.614.864 0 1.622.18 2.271.543.65.362 1.154.9 1.512 1.614.358.713.537 1.595.537 2.646v8.105h-2.47v-7.806c0-.924-.24-1.647-.718-2.17-.48-.522-1.137-.784-1.974-.784-.573 0-1.081.125-1.524.374a2.65 2.65 0 00-1.05 1.09c-.255.479-.383 1.055-.383 1.73zm17.122-9.424c1.31 0 2.4.227 3.266.68.868.454 1.516 1.08 1.945 1.88.43.799.645 1.72.645 2.766 0 1.04-.216 1.954-.649 2.742-.432.788-1.082 1.4-1.949 1.837a5.1 5.1 0 01-.501.22l3.743 6.865h-2.907l-3.436-6.43h-3.634v6.43h-2.552V2.232h6.029zm-.273 2.199h-3.204v6.155h3.237c.826 0 1.5-.119 2.02-.357s.901-.583 1.144-1.037c.242-.453.363-.998.363-1.634 0-.641-.122-1.197-.367-1.667-.246-.47-.628-.831-1.148-1.083-.52-.252-1.202-.377-2.045-.377zM79.66 6.314c1.19 0 2.227.273 3.114.821.886.548 1.575 1.316 2.065 2.306s.735 2.146.735 3.468c0 1.316-.245 2.466-.735 3.45-.49.985-1.179 1.751-2.065 2.299-.887.547-1.924.82-3.114.82s-2.227-.273-3.113-.82c-.887-.548-1.575-1.314-2.065-2.298-.49-.985-.735-2.135-.735-3.451 0-1.322.245-2.478.735-3.468.49-.99 1.178-1.758 2.065-2.306.886-.548 1.924-.821 3.113-.821zm.008 2.074c-.776 0-1.419.207-1.928.622-.51.415-.887.963-1.132 1.646a6.602 6.602 0 00-.367 2.244c0 .819.122 1.568.367 2.249.245.68.623 1.225 1.132 1.634.51.41 1.152.614 1.928.614.771 0 1.41-.205 1.917-.614.506-.41.882-.954 1.127-1.634.245-.68.367-1.43.367-2.249 0-.813-.122-1.56-.367-2.244-.245-.683-.62-1.231-1.127-1.646-.507-.415-1.146-.622-1.917-.622zm16.164 5.55V6.48h2.477v12.742h-2.428v-2.207h-.132a3.956 3.956 0 01-1.4 1.697c-.641.45-1.438.676-2.391.676-.815 0-1.535-.181-2.16-.544-.625-.362-1.115-.9-1.47-1.613-.355-.714-.533-1.596-.533-2.647V6.48h2.47v7.806c0 .868.24 1.56.718 2.074.48.514 1.102.771 1.867.771.462 0 .924-.116 1.383-.348.46-.232.843-.584 1.148-1.054.306-.47.456-1.067.45-1.792zm8.58-10.511v3.052h2.602v1.992h-2.602v7.01c0 .48.072.841.215 1.082.144.24.33.404.558.49.228.085.478.128.747.128.199 0 .372-.014.52-.041l.348-.067.446 2.05a4.42 4.42 0 01-.612.17c-.264.057-.594.09-.99.095a4.331 4.331 0 01-1.818-.349 3.12 3.12 0 01-1.362-1.128c-.347-.509-.52-1.148-.52-1.916l-.002-7.525h-1.857V6.48h1.857l.001-3.053h2.47zm9.961 2.887c.716 0 1.41.119 2.081.356a5.037 5.037 0 011.81 1.12c.533.51.954 1.169 1.263 1.979.308.81.462 1.793.462 2.949v.88l-9.016-.001.003.105c.03.732.178 1.364.445 1.895.3.597.72 1.052 1.259 1.364.54.313 1.17.469 1.891.469.468 0 .895-.068 1.28-.203a2.716 2.716 0 001-.61c.28-.271.495-.606.644-1.004l2.337.423a4.247 4.247 0 01-1.003 1.813c-.482.517-1.085.918-1.809 1.203-.724.284-1.548.427-2.473.427-1.25 0-2.325-.27-3.226-.809-.9-.54-1.594-1.3-2.08-2.281-.488-.982-.732-2.134-.732-3.455 0-1.306.244-2.456.731-3.451.487-.996 1.17-1.773 2.048-2.331.879-.559 1.907-.838 3.085-.838zm.017 2.049c-.694 0-1.298.17-1.813.51-.515.34-.911.782-1.19 1.327a3.778 3.778 0 00-.39 1.303l-.02.236h6.592c0-.653-.132-1.232-.396-1.738a3.022 3.022 0 00-1.11-1.199c-.477-.293-1.035-.44-1.673-.44zm7.821 10.859V6.48h2.387v2.024h.132a3.092 3.092 0 011.227-1.622 3.485 3.485 0 011.994-.593l.396.01.153.006c.212.011.379.025.5.042v2.372c-.1-.027-.275-.059-.529-.095a5.4 5.4 0 00-.76-.054c-.583 0-1.102.123-1.556.37a2.799 2.799 0 00-1.078 1.02 2.79 2.79 0 00-.397 1.48v7.782h-2.469z"></path></svg>`,Ai=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>OpenRouter</title><path d="M16.804 1.957l7.22 4.105v.087L16.73 10.21l.017-2.117-.821-.03c-1.059-.028-1.611.002-2.268.11-1.064.175-2.038.577-3.147 1.352L8.345 11.03c-.284.195-.495.336-.68.455l-.515.322-.397.234.385.23.53.338c.476.314 1.17.796 2.701 1.866 1.11.775 2.083 1.177 3.147 1.352l.3.045c.694.091 1.375.094 2.825.033l.022-2.159 7.22 4.105v.087L16.589 22l.014-1.862-.635.022c-1.386.042-2.137.002-3.138-.162-1.694-.28-3.26-.926-4.881-2.059l-2.158-1.5a21.997 21.997 0 00-.755-.498l-.467-.28a55.927 55.927 0 00-.76-.43C2.908 14.73.563 14.116 0 14.116V9.888l.14.004c.564-.007 2.91-.622 3.809-1.124l1.016-.58.438-.274c.428-.28 1.072-.726 2.686-1.853 1.621-1.133 3.186-1.78 4.881-2.059 1.152-.19 1.974-.213 3.814-.138l.02-1.907z"></path></svg>`,ji=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 298.03 47.18" fill="currentColor" role="img" aria-label="OVHcloud">
|
|
9
|
+
`).replace(kd,``)}function jd(e,t){return t=Ad(t),Ad(e)===t}function Md(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Yt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Yt(e,``+r);break;case`className`:Nt(e,`class`,r);break;case`tabIndex`:Nt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Nt(e,n,r);break;case`style`:Qt(e,r,o);break;case`data`:if(t!==`object`){Nt(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=nn(``+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`&&Md(e,t,`name`,a.name,a,null),Md(e,t,`formEncType`,a.formEncType,a,null),Md(e,t,`formMethod`,a.formMethod,a,null),Md(e,t,`formTarget`,a.formTarget,a,null)):(Md(e,t,`encType`,a.encType,a,null),Md(e,t,`method`,a.method,a,null),Md(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=nn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=rn);break;case`onScroll`:r!=null&&$(`scroll`,e);break;case`onScrollEnd`:r!=null&&$(`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=nn(``+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`:$(`beforetoggle`,e),$(`toggle`,e),Mt(e,`popover`,r);break;case`xlinkActuate`:Pt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Pt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Pt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Pt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Pt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Pt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Pt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Pt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Pt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Mt(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=en.get(n)||n,Mt(e,n,r))}}function Nd(e,t,n,r,a,o){switch(n){case`style`:Qt(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`?Yt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Yt(e,``+r);break;case`onScroll`:r!=null&&$(`scroll`,e);break;case`onScrollEnd`:r!=null&&$(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=rn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Tt.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[ft]||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,``):Mt(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:$(`error`,e),$(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Md(e,t,o,s,n,null)}}a&&Md(e,t,`srcSet`,n.srcSet,n,null),r&&Md(e,t,`src`,n.src,n,null);return;case`input`:$(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Md(e,t,r,d,n,null)}}Wt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in $(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Md(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Kt(e,!!r,n,!0):Kt(e,!!r,t,!1);return;case`textarea`:for(s in $(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Md(e,t,s,c,n,null)}Jt(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:Md(e,t,l,r,n,null)}return;case`dialog`:$(`beforetoggle`,e),$(`toggle`,e),$(`cancel`,e),$(`close`,e);break;case`iframe`:case`object`:$(`load`,e);break;case`video`:case`audio`:for(r=0;r<gd.length;r++)$(gd[r],e);break;case`image`:$(`error`,e),$(`load`,e);break;case`details`:$(`toggle`,e);break;case`embed`:case`source`:case`link`:$(`error`,e),$(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Md(e,t,u,r,n,null)}return;default:if($t(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Md(e,t,c,r,n,null))}function Fd(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)||Md(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&&Md(e,t,p,m,r,f)}}Ut(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)||Md(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&&Md(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Kt(e,!!n,n?[]:``,!1):Kt(e,!!n,t,!0)):Kt(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:Md(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&&Md(e,t,s,a,r,o)}qt(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:Md(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:Md(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)&&Md(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:Md(e,t,u,p,r,m)}return;default:if($t(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(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||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Md(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||Md(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){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&&Id(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&&Id(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 Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(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 Hd(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 Ud(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 Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[_t]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(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 ef(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`:ef(n),vt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(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[_t])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=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(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 cf(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 lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(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 ff(e,t,n){switch(t=Bd(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 pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);vt(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=j.d;j.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=vu();return e||t}function yf(e){var t=bt(e);t!==null&&t.tag===5&&t.type===`form`?Ts(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Ht(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),Ct(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Ht(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Ht(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Ht(n.imageSizes)+`"]`)):i+=`[href="`+Ht(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=m({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),Ct(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Ht(r)+`"][href="`+Ht(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=m({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),Ct(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=St(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);Ct(c),Pd(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,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=St(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=m({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),Ct(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=St(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=m({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),Ct(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=fe.current)?gf(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=Af(n.href),n=St(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=Af(n.href);var o=St(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(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.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},mf.set(e,n),o||Nf(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=Pf(n),n=St(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 Af(e){return`href="`+Ht(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(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}),Pd(t,`link`,n),Ct(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Ht(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Ht(n.href)+`"]`);if(r)return t.instance=r,Ct(r),r;var a=m({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Ct(r),Pd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,Ct(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),Ct(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,Ct(a),a):(r=n,(a=mf.get(o))&&(r=m({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Ct(a),Pd(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,Lf(r,n.precedence,e));return t.instance}function Lf(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 Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,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[_t]||a[dt]||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 Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Ct(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),Ct(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:C,Provider:null,Consumer:null,_currentValue:oe,_currentValue2:oe,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=et(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=et(0),this.hiddenUpdates=et(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=li(3,null,null,t),e.current=a,a.stateNode=e,t=ca(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},za(a),e}function tp(e){return e?(e=si,e):si}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Va(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ha(e,r,t),n!==null&&(pu(n,e,t),Ua(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=ii(e,67108864);t!==null&&pu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=du();t=ot(t);var n=ii(e,t);n!==null&&pu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=A.T;A.T=null;var a=j.p;try{j.p=2,up(e,t,n,r)}finally{j.p=a,A.T=i}}function lp(e,t,n,r){var i=A.T;A.T=null;var a=j.p;try{j.p=8,up(e,t,n,r)}finally{j.p=a,A.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)Cd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=bt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ye(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-He(o);s.entanglements[1]|=c,o&=~c}nd(a),!(Pl&6)&&($l=Ae()+500,rd(0,!1))}}break;case 31:case 13:s=ii(a,2),s!==null&&pu(s,a,2),vu(),ip(a,2)}if(a=dp(r),a===null&&Cd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Cd(e,t,r,null,n)}}function dp(e){return e=on(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=yt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(je()){case Me:return 2;case Ne:return 8;case Pe:case Fe:return 32;case Ie:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=bt(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=yt(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,lt(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,lt(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);an=r,n.target.dispatchEvent(r),an=null}else return t=bt(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=bt(n);a!==null&&(e.splice(t,3),t-=3,Cs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ft]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ft]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;np(n,du(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),vu(),t[P]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=ct();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.7`)throw Error(i(527,Lp,`19.2.7`));j.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:A,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{ze=zp.inject(Rp),Be=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Gs,s=Ks,c=K;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[P]=t.current,xd(e),new Fp(t)}})),_=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=l(d(),1),y=_(),b=Object.create(null);b.open=`0`,b.close=`1`,b.ping=`2`,b.pong=`3`,b.message=`4`,b.upgrade=`5`,b.noop=`6`;var x=Object.create(null);Object.keys(b).forEach(e=>{x[b[e]]=e});var S={type:`error`,data:`parser error`},C=typeof Blob==`function`||typeof Blob<`u`&&Object.prototype.toString.call(Blob)===`[object BlobConstructor]`,w=typeof ArrayBuffer==`function`,T=e=>typeof ArrayBuffer.isView==`function`?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,E=({type:e,data:t},n,r)=>C&&t instanceof Blob?n?r(t):D(t,r):w&&(t instanceof ArrayBuffer||T(t))?n?r(t):D(new Blob([t]),r):r(b[e]+(t||``)),D=(e,t)=>{let n=new FileReader;return n.onload=function(){let e=n.result.split(`,`)[1];t(`b`+(e||``))},n.readAsDataURL(e)};function O(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}var ee;function te(e,t){if(C&&e.data instanceof Blob)return e.data.arrayBuffer().then(O).then(t);if(w&&(e.data instanceof ArrayBuffer||T(e.data)))return t(O(e.data));E(e,!1,e=>{ee||=new TextEncoder,t(ee.encode(e))})}var k=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,ne=typeof Uint8Array>`u`?[]:new Uint8Array(256);for(let e=0;e<64;e++)ne[k.charCodeAt(e)]=e;var re=e=>{let t=e.length*.75,n=e.length,r,i=0,a,o,s,c;e[e.length-1]===`=`&&(t--,e[e.length-2]===`=`&&t--);let l=new ArrayBuffer(t),u=new Uint8Array(l);for(r=0;r<n;r+=4)a=ne[e.charCodeAt(r)],o=ne[e.charCodeAt(r+1)],s=ne[e.charCodeAt(r+2)],c=ne[e.charCodeAt(r+3)],u[i++]=a<<2|o>>4,u[i++]=(o&15)<<4|s>>2,u[i++]=(s&3)<<6|c&63;return l},ie=typeof ArrayBuffer==`function`,ae=(e,t)=>{if(typeof e!=`string`)return{type:`message`,data:j(e,t)};let n=e.charAt(0);return n===`b`?{type:`message`,data:A(e.substring(1),t)}:x[n]?e.length>1?{type:x[n],data:e.substring(1)}:{type:x[n]}:S},A=(e,t)=>ie?j(re(e),t):{base64:!0,data:e},j=(e,t)=>{switch(t){case`blob`:return e instanceof Blob?e:new Blob([e]);default:return e instanceof ArrayBuffer?e:e.buffer}},oe=``,se=(e,t)=>{let n=e.length,r=Array(n),i=0;e.forEach((e,a)=>{E(e,!1,e=>{r[a]=e,++i===n&&t(r.join(oe))})})},ce=(e,t)=>{let n=e.split(oe),r=[];for(let e=0;e<n.length;e++){let i=ae(n[e],t);if(r.push(i),i.type===`error`)break}return r};function M(){return new TransformStream({transform(e,t){te(e,n=>{let r=n.length,i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);let e=new DataView(i.buffer);e.setUint8(0,126),e.setUint16(1,r)}else{i=new Uint8Array(9);let e=new DataView(i.buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!=`string`&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}var le;function N(e){return e.reduce((e,t)=>e+t.length,0)}function ue(e,t){if(e[0].length===t)return e.shift();let n=new Uint8Array(t),r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function de(e,t){le||=new TextDecoder;let n=[],r=0,i=-1,a=!1;return new TransformStream({transform(o,s){for(n.push(o);;){if(r===0){if(N(n)<1)break;let e=ue(n,1);a=(e[0]&128)==128,i=e[0]&127,r=i<126?3:i===126?1:2}else if(r===1){if(N(n)<2)break;let e=ue(n,2);i=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),r=3}else if(r===2){if(N(n)<8)break;let e=ue(n,8),t=new DataView(e.buffer,e.byteOffset,e.length),a=t.getUint32(0);if(a>2**21-1){s.enqueue(S);break}i=a*2**32+t.getUint32(4),r=3}else{if(N(n)<i)break;let e=ue(n,i);s.enqueue(ae(a?e:le.decode(e),t)),r=0}if(i===0||i>e){s.enqueue(S);break}}}})}function fe(e){if(e)return pe(e)}function pe(e){for(var t in fe.prototype)e[t]=fe.prototype[t];return e}fe.prototype.on=fe.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[`$`+e]=this._callbacks[`$`+e]||[]).push(t),this},fe.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},fe.prototype.off=fe.prototype.removeListener=fe.prototype.removeAllListeners=fe.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks[`$`+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks[`$`+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks[`$`+e],this},fe.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=Array(arguments.length-1),n=this._callbacks[`$`+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this},fe.prototype.emitReserved=fe.prototype.emit,fe.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[`$`+e]||[]},fe.prototype.hasListeners=function(e){return!!this.listeners(e).length};var me=typeof Promise==`function`&&typeof Promise.resolve==`function`?e=>Promise.resolve().then(e):(e,t)=>t(e,0),he=typeof self<`u`?self:typeof window<`u`?window:Function(`return this`)(),ge=`arraybuffer`;function _e(e,...t){return t.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{})}var ve=he.setTimeout,ye=he.clearTimeout;function be(e,t){t.useNativeTimers?(e.setTimeoutFn=ve.bind(he),e.clearTimeoutFn=ye.bind(he)):(e.setTimeoutFn=he.setTimeout.bind(he),e.clearTimeoutFn=he.clearTimeout.bind(he))}var xe=1.33;function Se(e){return typeof e==`string`?Ce(e):Math.ceil((e.byteLength||e.size)*xe)}function Ce(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function we(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Te(e){let t=``;for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+=`&`),t+=encodeURIComponent(n)+`=`+encodeURIComponent(e[n]));return t}function Ee(e){let t={},n=e.split(`&`);for(let e=0,r=n.length;e<r;e++){let r=n[e].split(`=`);t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return t}var De=class extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type=`TransportError`}},Oe=class extends fe{constructor(e){super(),this.writable=!1,be(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,n){return super.emitReserved(`error`,new De(e,t,n)),this}open(){return this.readyState=`opening`,this.doOpen(),this}close(){return(this.readyState===`opening`||this.readyState===`open`)&&(this.doClose(),this.onClose()),this}send(e){this.readyState===`open`&&this.write(e)}onOpen(){this.readyState=`open`,this.writable=!0,super.emitReserved(`open`)}onData(e){let t=ae(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved(`packet`,e)}onClose(e){this.readyState=`closed`,super.emitReserved(`close`,e)}pause(e){}createUri(e,t={}){return e+`://`+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){let e=this.opts.hostname;return e.indexOf(`:`)===-1?e:`[`+e+`]`}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?`:`+this.opts.port:``}_query(e){let t=Te(e);return t.length?`?`+t:``}},ke=class extends Oe{constructor(){super(...arguments),this._polling=!1}get name(){return`polling`}doOpen(){this._poll()}pause(e){this.readyState=`pausing`;let t=()=>{this.readyState=`paused`,e()};if(this._polling||!this.writable){let e=0;this._polling&&(e++,this.once(`pollComplete`,function(){--e||t()})),this.writable||(e++,this.once(`drain`,function(){--e||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved(`poll`)}onData(e){ce(e,this.socket.binaryType).forEach(e=>{if(this.readyState===`opening`&&e.type===`open`&&this.onOpen(),e.type===`close`)return this.onClose({description:`transport closed by the server`}),!1;this.onPacket(e)}),this.readyState!==`closed`&&(this._polling=!1,this.emitReserved(`pollComplete`),this.readyState===`open`&&this._poll())}doClose(){let e=()=>{this.write([{type:`close`}])};this.readyState===`open`?e():this.once(`open`,e)}write(e){this.writable=!1,se(e,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved(`drain`)})})}uri(){let e=this.opts.secure?`https`:`http`,t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=we()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}},Ae=!1;try{Ae=typeof XMLHttpRequest<`u`&&`withCredentials`in new XMLHttpRequest}catch{}var je=Ae;function Me(){}var Ne=class extends ke{constructor(e){if(super(e),typeof location<`u`){let t=location.protocol===`https:`,n=location.port;n||=t?`443`:`80`,this.xd=typeof location<`u`&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,t){let n=this.request({method:`POST`,data:e});n.on(`success`,t),n.on(`error`,(e,t)=>{this.onError(`xhr post error`,e,t)})}doPoll(){let e=this.request();e.on(`data`,this.onData.bind(this)),e.on(`error`,(e,t)=>{this.onError(`xhr poll error`,e,t)}),this.pollXhr=e}},Pe=class e extends fe{constructor(e,t,n){super(),this.createRequest=e,be(this,n),this._opts=n,this._method=n.method||`GET`,this._uri=t,this._data=n.data===void 0?null:n.data,this._create()}_create(){var t;let n=_e(this._opts,`agent`,`pfx`,`key`,`passphrase`,`cert`,`ca`,`ciphers`,`rejectUnauthorized`,`autoUnref`);n.xdomain=!!this._opts.xd;let r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let e in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(e)&&r.setRequestHeader(e,this._opts.extraHeaders[e])}}catch{}if(this._method===`POST`)try{r.setRequestHeader(`Content-type`,`text/plain;charset=UTF-8`)}catch{}try{r.setRequestHeader(`Accept`,`*/*`)}catch{}(t=this._opts.cookieJar)==null||t.addCookies(r),`withCredentials`in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var e;r.readyState===3&&((e=this._opts.cookieJar)==null||e.parseCookies(r.getResponseHeader(`set-cookie`))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status==`number`?r.status:0)},0))},r.send(this._data)}catch(e){this.setTimeoutFn(()=>{this._onError(e)},0);return}typeof document<`u`&&(this._index=e.requestsCount++,e.requests[this._index]=this)}_onError(e){this.emitReserved(`error`,e,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(this._xhr===void 0||this._xhr===null)){if(this._xhr.onreadystatechange=Me,t)try{this._xhr.abort()}catch{}typeof document<`u`&&delete e.requests[this._index],this._xhr=null}}_onLoad(){let e=this._xhr.responseText;e!==null&&(this.emitReserved(`data`,e),this.emitReserved(`success`),this._cleanup())}abort(){this._cleanup()}};if(Pe.requestsCount=0,Pe.requests={},typeof document<`u`){if(typeof attachEvent==`function`)attachEvent(`onunload`,Fe);else if(typeof addEventListener==`function`){let e=`onpagehide`in he?`pagehide`:`unload`;addEventListener(e,Fe,!1)}}function Fe(){for(let e in Pe.requests)Pe.requests.hasOwnProperty(e)&&Pe.requests[e].abort()}var Ie=(function(){let e=Re({xdomain:!1});return e&&e.responseType!==null})(),Le=class extends Ne{constructor(e){super(e);let t=e&&e.forceBase64;this.supportsBinary=Ie&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Pe(Re,this.uri(),e)}};function Re(e){let t=e.xdomain;try{if(typeof XMLHttpRequest<`u`&&(!t||je))return new XMLHttpRequest}catch{}if(!t)try{return new he[[`Active`,`Object`].join(`X`)](`Microsoft.XMLHTTP`)}catch{}}var ze=typeof navigator<`u`&&typeof navigator.product==`string`&&navigator.product.toLowerCase()===`reactnative`,Be=class extends Oe{get name(){return`websocket`}doOpen(){let e=this.uri(),t=this.opts.protocols,n=ze?{}:_e(this.opts,`agent`,`perMessageDeflate`,`pfx`,`key`,`passphrase`,`cert`,`ca`,`ciphers`,`rejectUnauthorized`,`localAddress`,`protocolVersion`,`origin`,`maxPayload`,`family`,`checkServerIdentity`);this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,n)}catch(e){return this.emitReserved(`error`,e)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:`websocket connection closed`,context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError(`websocket error`,e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let n=e[t],r=t===e.length-1;E(n,this.supportsBinary,e=>{try{this.doWrite(n,e)}catch{}r&&me(()=>{this.writable=!0,this.emitReserved(`drain`)},this.setTimeoutFn)})}}doClose(){this.ws!==void 0&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?`wss`:`ws`,t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=we()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}},Ve=he.WebSocket||he.MozWebSocket,He={websocket:class extends Be{createSocket(e,t,n){return ze?new Ve(e,t,n):t?new Ve(e,t):new Ve(e)}doWrite(e,t){this.ws.send(t)}},webtransport:class extends Oe{get name(){return`webtransport`}doOpen(){try{this._transport=new WebTransport(this.createUri(`https`),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved(`error`,e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError(`webtransport error`,e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{let t=de(2**53-1,this.socket.binaryType),n=e.readable.pipeThrough(t).getReader(),r=M();r.readable.pipeTo(e.writable),this._writer=r.writable.getWriter();let i=()=>{n.read().then(({done:e,value:t})=>{e||(this.onPacket(t),i())}).catch(e=>{})};i();let a={type:`open`};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this._writer.write(a).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let n=e[t],r=t===e.length-1;this._writer.write(n).then(()=>{r&&me(()=>{this.writable=!0,this.emitReserved(`drain`)},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)==null||e.close()}},polling:Le},Ue=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,We=[`source`,`protocol`,`authority`,`userInfo`,`user`,`password`,`host`,`port`,`relative`,`path`,`directory`,`file`,`query`,`anchor`];function Ge(e){if(e.length>8e3)throw`URI too long`;let t=e,n=e.indexOf(`[`),r=e.indexOf(`]`);n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,`;`)+e.substring(r,e.length));let i=Ue.exec(e||``),a={},o=14;for(;o--;)a[We[o]]=i[o]||``;return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,`:`),a.authority=a.authority.replace(`[`,``).replace(`]`,``).replace(/;/g,`:`),a.ipv6uri=!0),a.pathNames=Ke(a,a.path),a.queryKey=qe(a,a.query),a}function Ke(e,t){let n=t.replace(/\/{2,9}/g,`/`).split(`/`);return(t.slice(0,1)==`/`||t.length===0)&&n.splice(0,1),t.slice(-1)==`/`&&n.splice(n.length-1,1),n}function qe(e,t){let n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(e,t,r){t&&(n[t]=r)}),n}var Je=typeof addEventListener==`function`&&typeof removeEventListener==`function`,Ye=[];Je&&addEventListener(`offline`,()=>{Ye.forEach(e=>e())},!1);var Xe=class e extends fe{constructor(e,t){if(super(),this.binaryType=ge,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e==`object`&&(t=e,e=null),e){let n=Ge(e);t.hostname=n.host,t.secure=n.protocol===`https`||n.protocol===`wss`,t.port=n.port,n.query&&(t.query=n.query)}else t.host&&(t.hostname=Ge(t.host).host);be(this,t),this.secure=t.secure==null?typeof location<`u`&&location.protocol===`https:`:t.secure,t.hostname&&!t.port&&(t.port=this.secure?`443`:`80`),this.hostname=t.hostname||(typeof location<`u`?location.hostname:`localhost`),this.port=t.port||(typeof location<`u`&&location.port?location.port:this.secure?`443`:`80`),this.transports=[],this._transportsByName={},t.transports.forEach(e=>{let t=e.prototype.name;this.transports.push(t),this._transportsByName[t]=e}),this.opts=Object.assign({path:`/engine.io`,agent:!1,withCredentials:!1,upgrade:!0,timestampParam:`t`,rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,``)+(this.opts.addTrailingSlash?`/`:``),typeof this.opts.query==`string`&&(this.opts.query=Ee(this.opts.query)),Je&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener(`beforeunload`,this._beforeunloadEventListener,!1)),this.hostname!==`localhost`&&(this._offlineEventListener=()=>{this._onClose(`transport close`,{description:`network connection lost`})},Ye.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);let n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved(`error`,`No transports available`)},0);return}let t=this.opts.rememberUpgrade&&e.priorWebsocketSuccess&&this.transports.indexOf(`websocket`)!==-1?`websocket`:this.transports[0];this.readyState=`opening`;let n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on(`drain`,this._onDrain.bind(this)).on(`packet`,this._onPacket.bind(this)).on(`error`,this._onError.bind(this)).on(`close`,e=>this._onClose(`transport close`,e))}onOpen(){this.readyState=`open`,e.priorWebsocketSuccess=this.transport.name===`websocket`,this.emitReserved(`open`),this.flush()}_onPacket(e){if(this.readyState===`opening`||this.readyState===`open`||this.readyState===`closing`)switch(this.emitReserved(`packet`,e),this.emitReserved(`heartbeat`),e.type){case`open`:this.onHandshake(JSON.parse(e.data));break;case`ping`:this._sendPacket(`pong`),this.emitReserved(`ping`),this.emitReserved(`pong`),this._resetPingTimeout();break;case`error`:let t=Error(`server error`);t.code=e.data,this._onError(t);break;case`message`:this.emitReserved(`data`,e.data),this.emitReserved(`message`,e.data);break}}onHandshake(e){this.emitReserved(`handshake`,e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!==`closed`&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose(`ping timeout`)},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved(`drain`):this.flush()}flush(){if(this.readyState!==`closed`&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved(`flush`)}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name===`polling`&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let t=0;t<this.writeBuffer.length;t++){let n=this.writeBuffer[t].data;if(n&&(e+=Se(n)),t>0&&e>this._maxPayload)return this.writeBuffer.slice(0,t);e+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,me(()=>{this._onClose(`ping timeout`)},this.setTimeoutFn)),e}write(e,t,n){return this._sendPacket(`message`,e,t,n),this}send(e,t,n){return this._sendPacket(`message`,e,t,n),this}_sendPacket(e,t,n,r){if(typeof t==`function`&&(r=t,t=void 0),typeof n==`function`&&(r=n,n=null),this.readyState===`closing`||this.readyState===`closed`)return;n||={},n.compress=!1!==n.compress;let i={type:e,data:t,options:n};this.emitReserved(`packetCreate`,i),this.writeBuffer.push(i),r&&this.once(`flush`,r),this.flush()}close(){let e=()=>{this._onClose(`forced close`),this.transport.close()},t=()=>{this.off(`upgrade`,t),this.off(`upgradeError`,t),e()},n=()=>{this.once(`upgrade`,t),this.once(`upgradeError`,t)};return(this.readyState===`opening`||this.readyState===`open`)&&(this.readyState=`closing`,this.writeBuffer.length?this.once(`drain`,()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(t){if(e.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState===`opening`)return this.transports.shift(),this._open();this.emitReserved(`error`,t),this._onClose(`transport error`,t)}_onClose(e,t){if(this.readyState===`opening`||this.readyState===`open`||this.readyState===`closing`){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners(`close`),this.transport.close(),this.transport.removeAllListeners(),Je&&(this._beforeunloadEventListener&&removeEventListener(`beforeunload`,this._beforeunloadEventListener,!1),this._offlineEventListener)){let e=Ye.indexOf(this._offlineEventListener);e!==-1&&Ye.splice(e,1)}this.readyState=`closed`,this.id=null,this.emitReserved(`close`,e,t),this.writeBuffer=[],this._prevBufferLen=0}}};Xe.protocol=4;var Ze=class extends Xe{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState===`open`&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),n=!1;Xe.priorWebsocketSuccess=!1;let r=()=>{n||(t.send([{type:`ping`,data:`probe`}]),t.once(`packet`,e=>{if(!n)if(e.type===`pong`&&e.data===`probe`){if(this.upgrading=!0,this.emitReserved(`upgrading`,t),!t)return;Xe.priorWebsocketSuccess=t.name===`websocket`,this.transport.pause(()=>{n||this.readyState!==`closed`&&(l(),this.setTransport(t),t.send([{type:`upgrade`}]),this.emitReserved(`upgrade`,t),t=null,this.upgrading=!1,this.flush())})}else{let e=Error(`probe error`);e.transport=t.name,this.emitReserved(`upgradeError`,e)}}))};function i(){n||(n=!0,l(),t.close(),t=null)}let a=e=>{let n=Error(`probe error: `+e);n.transport=t.name,i(),this.emitReserved(`upgradeError`,n)};function o(){a(`transport closed`)}function s(){a(`socket closed`)}function c(e){t&&e.name!==t.name&&i()}let l=()=>{t.removeListener(`open`,r),t.removeListener(`error`,a),t.removeListener(`close`,o),this.off(`close`,s),this.off(`upgrading`,c)};t.once(`open`,r),t.once(`error`,a),t.once(`close`,o),this.once(`close`,s),this.once(`upgrading`,c),this._upgrades.indexOf(`webtransport`)!==-1&&e!==`webtransport`?this.setTimeoutFn(()=>{n||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let t=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}},Qe=class extends Ze{constructor(e,t={}){let n=typeof e==`object`?e:t;(!n.transports||n.transports&&typeof n.transports[0]==`string`)&&(n.transports=(n.transports||[`polling`,`websocket`,`webtransport`]).map(e=>He[e]).filter(e=>!!e)),super(e,n)}};Qe.protocol;function $e(e,t=``,n){let r=e;n||=typeof location<`u`&&location,e??=n.protocol+`//`+n.host,typeof e==`string`&&(e.charAt(0)===`/`&&(e=e.charAt(1)===`/`?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(e=n===void 0?`https://`+e:n.protocol+`//`+e),r=Ge(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port=`80`:/^(http|ws)s$/.test(r.protocol)&&(r.port=`443`)),r.path=r.path||`/`;let i=r.host.indexOf(`:`)===-1?r.host:`[`+r.host+`]`;return r.id=r.protocol+`://`+i+`:`+r.port+t,r.href=r.protocol+`://`+i+(n&&n.port===r.port?``:`:`+r.port),r}var et=typeof ArrayBuffer==`function`,tt=e=>typeof ArrayBuffer.isView==`function`?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,nt=Object.prototype.toString,rt=typeof Blob==`function`||typeof Blob<`u`&&nt.call(Blob)===`[object BlobConstructor]`,it=typeof File==`function`||typeof File<`u`&&nt.call(File)===`[object FileConstructor]`;function at(e){return et&&(e instanceof ArrayBuffer||tt(e))||rt&&e instanceof Blob||it&&e instanceof File}function ot(e,t){if(!e||typeof e!=`object`)return!1;if(Array.isArray(e)){for(let t=0,n=e.length;t<n;t++)if(ot(e[t]))return!0;return!1}if(at(e))return!0;if(e.toJSON&&typeof e.toJSON==`function`&&arguments.length===1)return ot(e.toJSON(),!0);for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&ot(e[t]))return!0;return!1}function st(e){let t=[],n=e.data,r=e;return r.data=ct(n,t),r.attachments=t.length,{packet:r,buffers:t}}function ct(e,t){if(!e)return e;if(at(e)){let n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){let n=Array(e.length);for(let r=0;r<e.length;r++)n[r]=ct(e[r],t);return n}else if(typeof e==`object`&&!(e instanceof Date)){let n={};for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=ct(e[r],t));return n}return e}function lt(e,t){return e.data=ut(e.data,t),delete e.attachments,e}function ut(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num==`number`&&e.num>=0&&e.num<t.length)return t[e.num];throw Error(`illegal attachments`)}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=ut(e[n],t);else if(typeof e==`object`)for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=ut(e[n],t));return e}var dt=s({Decoder:()=>mt,Encoder:()=>pt,PacketType:()=>P,isPacketValid:()=>xt,protocol:()=>5}),ft=[`connect`,`connect_error`,`disconnect`,`disconnecting`,`newListener`,`removeListener`],P;(function(e){e[e.CONNECT=0]=`CONNECT`,e[e.DISCONNECT=1]=`DISCONNECT`,e[e.EVENT=2]=`EVENT`,e[e.ACK=3]=`ACK`,e[e.CONNECT_ERROR=4]=`CONNECT_ERROR`,e[e.BINARY_EVENT=5]=`BINARY_EVENT`,e[e.BINARY_ACK=6]=`BINARY_ACK`})(P||={});var pt=class{constructor(e){this.replacer=e}encode(e){return(e.type===P.EVENT||e.type===P.ACK)&&ot(e)?this.encodeAsBinary({type:e.type===P.EVENT?P.BINARY_EVENT:P.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=``+e.type;return(e.type===P.BINARY_EVENT||e.type===P.BINARY_ACK)&&(t+=e.attachments+`-`),e.nsp&&e.nsp!==`/`&&(t+=e.nsp+`,`),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){let t=st(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}},mt=class e extends fe{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e==`function`?{reviver:e}:e)}add(e){let t;if(typeof e==`string`){if(this.reconstructor)throw Error(`got plaintext data when reconstructing a packet`);t=this.decodeString(e);let n=t.type===P.BINARY_EVENT;n||t.type===P.BINARY_ACK?(t.type=n?P.EVENT:P.ACK,this.reconstructor=new ht(t),t.attachments===0&&super.emitReserved(`decoded`,t)):super.emitReserved(`decoded`,t)}else if(at(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved(`decoded`,t));else throw Error(`got binary data when not reconstructing a packet`);else throw Error(`Unknown type: `+e)}decodeString(t){let n=0,r={type:Number(t.charAt(0))};if(P[r.type]===void 0)throw Error(`unknown packet type `+r.type);if(r.type===P.BINARY_EVENT||r.type===P.BINARY_ACK){let e=n+1;for(;t.charAt(++n)!==`-`&&n!=t.length;);let i=t.substring(e,n);if(i!=Number(i)||t.charAt(n)!==`-`)throw Error(`Illegal attachments`);let a=Number(i);if(!_t(a)||a<0)throw Error(`Illegal attachments`);if(a>this.opts.maxAttachments)throw Error(`too many attachments`);r.attachments=a}if(t.charAt(n+1)===`/`){let e=n+1;for(;++n&&!(t.charAt(n)===`,`||n===t.length););r.nsp=t.substring(e,n)}else r.nsp=`/`;let i=t.charAt(n+1);if(i!==``&&Number(i)==i){let e=n+1;for(;++n;){let e=t.charAt(n);if(e==null||Number(e)!=e){--n;break}if(n===t.length)break}r.id=Number(t.substring(e,n+1))}if(t.charAt(++n)){let i=this.tryParse(t.substr(n));if(e.isPayloadValid(r.type,i))r.data=i;else throw Error(`invalid payload`)}return r}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case P.CONNECT:return yt(t);case P.DISCONNECT:return t===void 0;case P.CONNECT_ERROR:return typeof t==`string`||yt(t);case P.EVENT:case P.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]==`number`||typeof t[0]==`string`&&ft.indexOf(t[0])===-1);case P.ACK:case P.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&=(this.reconstructor.finishedReconstruction(),null)}},ht=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){let e=lt(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function gt(e){return typeof e==`string`}var _t=Number.isInteger||function(e){return typeof e==`number`&&isFinite(e)&&Math.floor(e)===e};function vt(e){return e===void 0||_t(e)}function yt(e){return Object.prototype.toString.call(e)===`[object Object]`}function bt(e,t){switch(e){case P.CONNECT:return t===void 0||yt(t);case P.DISCONNECT:return t===void 0;case P.EVENT:return Array.isArray(t)&&(typeof t[0]==`number`||typeof t[0]==`string`&&ft.indexOf(t[0])===-1);case P.ACK:return Array.isArray(t);case P.CONNECT_ERROR:return typeof t==`string`||yt(t);default:return!1}}function xt(e){return gt(e.nsp)&&vt(e.id)&&bt(e.type,e.data)}function St(e,t,n){return e.on(t,n),function(){e.off(t,n)}}var Ct=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),wt=class extends fe{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[St(e,`open`,this.onopen.bind(this)),St(e,`packet`,this.onpacket.bind(this)),St(e,`error`,this.onerror.bind(this)),St(e,`close`,this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState===`open`&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift(`message`),this.emit.apply(this,e),this}emit(e,...t){if(Ct.hasOwnProperty(e))throw Error(`"`+e.toString()+`" is a reserved event name`);if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;let n={type:P.EVENT,data:t};if(n.options={},n.options.compress=this.flags.compress!==!1,typeof t[t.length-1]==`function`){let e=this.ids++,r=t.pop();this._registerAckCallback(e,r),n.id=e}let r=this.io.engine?.transport?.writable,i=this.connected&&!this.io.engine?._hasPingExpired();return this.flags.volatile&&!r||(i?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n)),this.flags={},this}_registerAckCallback(e,t){let n=this.flags.timeout??this._opts.ackTimeout;if(n===void 0){this.acks[e]=t;return}let r=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,Error(`operation has timed out`))},n),i=(...e)=>{this.io.clearTimeoutFn(r),t.apply(this,e)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...t){return new Promise((n,r)=>{let i=(e,t)=>e?r(e):n(t);i.withError=!0,t.push(i),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]==`function`&&(t=e.pop());let n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((e,...r)=>(this._queue[0],e===null?(this._queue.shift(),t&&t(null,...r)):n.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth==`function`?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:P.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved(`connect_error`,e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved(`disconnect`,e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(t=>String(t.id)===e)){let t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,Error(`socket has been disconnected`))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case P.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved(`connect_error`,Error(`It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)`));break;case P.EVENT:case P.BINARY_EVENT:this.onevent(e);break;case P.ACK:case P.BINARY_ACK:this.onack(e);break;case P.DISCONNECT:this.ondisconnect();break;case P.CONNECT_ERROR:this.destroy();let t=Error(e.data.message);t.data=e.data.data,this.emitReserved(`connect_error`,t);break}}onevent(e){let t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let t=this._anyListeners.slice();for(let n of t)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]==`string`&&(this._lastOffset=e[e.length-1])}ack(e){let t=this,n=!1;return function(...r){n||(n=!0,t.packet({type:P.ACK,id:e,data:r}))}}onack(e){let t=this.acks[e.id];typeof t==`function`&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved(`connect`)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose(`io server disconnect`)}destroy(){this.subs&&=(this.subs.forEach(e=>e()),void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:P.DISCONNECT}),this.destroy(),this.connected&&this.onclose(`io client disconnect`),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let t=this._anyOutgoingListeners.slice();for(let n of t)n.apply(this,e.data)}}};function Tt(e){e||={},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Tt.prototype.duration=function(){var e=this.ms*this.factor**+ this.attempts++;if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0},Tt.prototype.reset=function(){this.attempts=0},Tt.prototype.setMin=function(e){this.ms=e},Tt.prototype.setMax=function(e){this.max=e},Tt.prototype.setJitter=function(e){this.jitter=e};var Et=class extends fe{constructor(e,t){super(),this.nsps={},this.subs=[],e&&typeof e==`object`&&(t=e,e=void 0),t||={},t.path=t.path||`/socket.io`,this.opts=t,be(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor??.5),this.backoff=new Tt({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState=`closed`,this.uri=e;let n=t.parser||dt;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)==null||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)==null||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)==null||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf(`open`))return this;this.engine=new Qe(this.uri,this.opts);let t=this.engine,n=this;this._readyState=`opening`,this.skipReconnect=!1;let r=St(t,`open`,function(){n.onopen(),e&&e()}),i=t=>{this.cleanup(),this._readyState=`closed`,this.emitReserved(`error`,t),e?e(t):this.maybeReconnectOnOpen()},a=St(t,`error`,i);if(!1!==this._timeout){let e=this._timeout,n=this.setTimeoutFn(()=>{r(),i(Error(`timeout`)),t.close()},e);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}return this.subs.push(r),this.subs.push(a),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState=`open`,this.emitReserved(`open`);let e=this.engine;this.subs.push(St(e,`ping`,this.onping.bind(this)),St(e,`data`,this.ondata.bind(this)),St(e,`error`,this.onerror.bind(this)),St(e,`close`,this.onclose.bind(this)),St(this.decoder,`decoded`,this.ondecoded.bind(this)))}onping(){this.emitReserved(`ping`)}ondata(e){try{this.decoder.add(e)}catch(e){this.onclose(`parse error`,e)}}ondecoded(e){me(()=>{this.emitReserved(`packet`,e)},this.setTimeoutFn)}onerror(e){this.emitReserved(`error`,e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new wt(this,e,t),this.nsps[e]=n),n}_destroy(e){let t=Object.keys(this.nsps);for(let e of t)if(this.nsps[e].active)return;this._close()}_packet(e){let t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose(`forced close`)}disconnect(){return this._close()}onclose(e,t){var n;this.cleanup(),(n=this.engine)==null||n.close(),this.backoff.reset(),this._readyState=`closed`,this.emitReserved(`close`,e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved(`reconnect_failed`),this._reconnecting=!1;else{let t=this.backoff.duration();this._reconnecting=!0;let n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved(`reconnect_attempt`,e.backoff.attempts),!e.skipReconnect&&e.open(t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved(`reconnect_error`,t)):e.onreconnect()}))},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved(`reconnect`,e)}},Dt={};function Ot(e,t){typeof e==`object`&&(t=e,e=void 0),t||={};let n=$e(e,t.path||`/socket.io`),r=n.source,i=n.id,a=n.path,o=Dt[i]&&a in Dt[i].nsps,s=t.forceNew||t[`force new connection`]||!1===t.multiplex||o,c;return s?c=new Et(r,t):(Dt[i]||(Dt[i]=new Et(r,t)),c=Dt[i]),n.query&&!t.query&&(t.query=n.queryKey),c.socket(n.path,t)}Object.assign(Ot,{Manager:Et,Socket:wt,io:Ot,connect:Ot});var kt=2e3,At=4e3,jt=1e3;function Mt(e){return e?Array.isArray(e)?{models:e}:Array.isArray(e.models)?e:null:null}function Nt(e,t){return t?`${t.replace(/\/$/,``)}${e}`:e}function Pt(e=``){let[t,n]=(0,v.useState)([]),[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(`connecting`),[s,c]=(0,v.useState)(0),[l,u]=(0,v.useState)(null),[d,f]=(0,v.useState)(!1),[p,m]=(0,v.useState)(0),[h,g]=(0,v.useState)(`speed`),[_,y]=(0,v.useState)(!1),[b,x]=(0,v.useState)(0),[S,C]=(0,v.useState)(0),[w,T]=(0,v.useState)(null),E=(0,v.useRef)(null),D=(0,v.useRef)(null),O=(0,v.useRef)(null),ee=(0,v.useRef)(0),te=(0,v.useRef)(0),k=(0,v.useRef)(!1),ne=(0,v.useCallback)((e,t=`unknown`)=>{let r=Mt(e);!r||!k.current||(n(r.models??[]),g(r.pingMode??`speed`),u(r.nextPingAt??null),f(!!r.isPinging),m(Number.isFinite(r.pendingPings)?r.pendingPings:0),y(!!r.globalBenchmarkRunning),x(Number.isFinite(r.globalBenchmarkTotal)?r.globalBenchmarkTotal:0),C(Number.isFinite(r.globalBenchmarkCompleted)?r.globalBenchmarkCompleted:0),T(r.updateStatus&&r.updateStatus.allowedOutdated?r.updateStatus:null),c(e=>e+1),ee.current=Date.now(),t!==`poll`&&(i(!0),o(t)))},[]),re=(0,v.useCallback)(async()=>{try{let t=await fetch(Nt(`/api/state`,e),{headers:{Accept:`application/json`}});if(t.ok){ne(await t.json(),`poll`),i(!0),o(e=>e===`socket`||e===`sse`?e:`poll`);return}}catch{}try{let t=await fetch(Nt(`/api/models`,e),{headers:{Accept:`application/json`}});if(!t.ok)throw Error(`HTTP ${t.status}`);ne(await t.json(),`poll`),i(!0),o(e=>e===`socket`||e===`sse`?e:`poll`)}catch{i(!1),o(`offline`)}},[ne,e]),ie=(0,v.useCallback)(()=>{if(!(D.current||!k.current))try{let t=new EventSource(Nt(`/api/events`,e));D.current=t,t.onopen=()=>{k.current&&(i(!0),o(`sse`))};let n=e=>{try{ne(JSON.parse(e.data),`sse`)}catch(e){console.warn(`[useSocket] SSE parse error:`,e)}};t.onmessage=n,t.addEventListener(`models`,n),t.onerror=()=>{t.close(),D.current===t&&(D.current=null),E.current?.connected||i(!1)}}catch{D.current=null}},[ne,e]),ae=(0,v.useCallback)(()=>{let t=Date.now();if(!(t-te.current<jt)){if(te.current=t,E.current?.connected){E.current.emit(`client:activity`);return}fetch(Nt(`/api/activity`,e),{method:`POST`}).catch(()=>{})}},[e]);return(0,v.useEffect)(()=>{k.current=!0;let t=Ot(e||void 0,{transports:[`websocket`,`polling`],reconnectionDelay:500,reconnectionDelayMax:2500,timeout:1200});E.current=t,t.on(`connect`,()=>{i(!0),o(`socket`),D.current?.close(),D.current=null,t.emit(`models:refresh`),t.emit(`client:activity`)}),t.on(`disconnect`,()=>{k.current&&(i(!1),ie())}),t.on(`connect_error`,()=>{k.current&&(i(!1),ie())}),t.on(`models:update`,e=>ne(e,`socket`)),O.current=setInterval(()=>{let e=Date.now()-ee.current>At;(!t.connected||e)&&re()},kt),re();let n=[`keydown`,`pointerdown`,`mousemove`,`focus`];for(let e of n)window.addEventListener(e,ae,{passive:!0});return()=>{k.current=!1;for(let e of n)window.removeEventListener(e,ae);O.current&&clearInterval(O.current),t.disconnect(),D.current?.close(),E.current=null,D.current=null}},[ne,re,ae,e,ie]),{models:t,connected:r,transport:a,updateCount:s,nextPingAt:l,isPinging:d,pendingPings:p,pingMode:h,globalBenchmarkRunning:_,globalBenchmarkTotal:b,globalBenchmarkCompleted:S,updateStatus:w}}var Ft={"S+":0,S:1,"A+":2,A:3,"A-":4,"B+":5,B:6,C:7},It={Perfect:0,Normal:1,Slow:2,Spiky:3,"Very Slow":4,Overloaded:5,Unstable:6,"Not Active":7,Pending:8};function Lt(e){return Ft[e]??99}function Rt(e){return It[e]??99}function zt(e){return!e||e===`—`?0:parseFloat(e.replace(`%`,``))||0}function Bt(e){let t=zt(e);return t>=65?`sweHigh`:t>=40?`sweMid`:`sweLow`}function Vt(e){return e==null||e===1/0||e>99e3?{text:`—`,cls:`pingNone`}:{text:`${e}ms`,cls:Ht(e)}}function Ht(e){return e==null||e===1/0?`pingNone`:e<500?`pingFast`:e<1500?`pingMedium`:`pingSlow`}function Ut(e){if(!e||e===`—`)return 0;let t=e.toLowerCase();return t.includes(`m`)?parseFloat(t)*1e3:t.includes(`k`)?parseFloat(t):0}function Wt(e){return!e||e.length<8?`••••••••`:`••••••••`+e.slice(-4)}var Gt=[`all`,`S+`,`S`,`A+`,`A`,`A-`,`B+`,`B`,`C`],Kt=[`all`,`up`,`down`,`pending`],qt=[`all`,`Perfect`,`Normal`,`Spiky`,`Slow`,`Overloaded`,`Down`,`Unstable`,`Pending`],Jt=[`all`,`up`,`timeout`,`down`,`pending`,`noauth`,`auth_error`],Yt=[`normal`,`configured`,`usable`];function Xt(e){return e.idx??9999}function Zt(e){return e.pingHistory||e.pings||[]}function Qt(e){let t=Zt(e);return(t.length>0?t[t.length-1]:null)?.ms??null}function $t(e){let t=Zt(e).map(e=>e?.ms).filter(e=>typeof e==`number`&&Number.isFinite(e));return t.length<2?null:t[t.length-1]-t[0]}function en(e){return typeof e==`number`&&Number.isFinite(e)?e:null}function tn(e,t,n){let r=e==null,i=t==null;return r&&i?0:r?1:i?-1:(e-t)*n}function nn(e,t,n){let r=typeof e==`string`?e:``,i=typeof t==`string`?t:``,a=r.length===0,o=i.length===0;return a&&o?0:a?1:o?-1:r.localeCompare(i)*n}var rn={up:0,pending:1,timeout:2,down:3,noauth:4,auth_error:5};function an(e){let[t,n]=(0,v.useState)(`all`),[r,i]=(0,v.useState)(`all`),[a,o]=(0,v.useState)(`all`),[s,c]=(0,v.useState)(`all`),[l,u]=(0,v.useState)(`all`),[d,f]=(0,v.useState)(`normal`),[p,m]=(0,v.useState)(``),[h,g]=(0,v.useState)(null),[_,y]=(0,v.useState)(`avg`),[b,x]=(0,v.useState)(`asc`),S=(0,v.useCallback)((e,t,n)=>{n(t[(t.indexOf(e)+1)%t.length])},[]),C=(0,v.useCallback)(()=>S(t,Gt,n),[t,S]),w=(0,v.useCallback)(()=>S(r,Kt,i),[r,S]),T=(0,v.useCallback)(()=>S(s,qt,c),[s,S]),E=(0,v.useCallback)(()=>S(l,Jt,u),[l,S]),D=(0,v.useCallback)(()=>S(d,Yt,f),[d,S]),O=(0,v.useCallback)(e=>{if(_!==e){y(e),x(`asc`);return}if(b===`asc`){x(`desc`);return}y(null),x(`asc`)},[_,b]),ee=(0,v.useCallback)(()=>{n(`all`),i(`all`),o(`all`),c(`all`),u(`all`),f(`normal`),m(``),g(null),y(`avg`),x(`asc`)},[]);return{filtered:(0,v.useMemo)(()=>{let n=[...e];t!==`all`&&(n=n.filter(e=>e.tier===t)),r!==`all`&&(n=n.filter(e=>r===`up`?e.status===`up`:r===`down`?e.status===`down`||e.status===`timeout`:r===`pending`?e.status===`pending`:!0)),a!==`all`&&(n=n.filter(e=>e.providerKey===a)),s!==`all`&&(n=n.filter(e=>e.verdict===s)),l!==`all`&&(n=n.filter(e=>e.status===l)),d===`configured`?n=n.filter(e=>e.hasApiKey&&e.status!==`noauth`&&e.status!==`auth_error`):d===`usable`&&(n=n.filter(e=>e.status===`up`?[`Perfect`,`Normal`,`Slow`].includes(e.verdict):!1));let i=p.trim().toLowerCase(),o=(h||``).trim().toLowerCase();return i&&(n=n.filter(e=>e.label.toLowerCase().includes(i)||e.modelId.toLowerCase().includes(i)||e.origin.toLowerCase().includes(i)||e.tier.toLowerCase().includes(i)||(e.verdict||``).toLowerCase().includes(i))),o&&(n=n.filter(e=>e.label.toLowerCase().includes(o)||e.modelId.toLowerCase().includes(o)||e.origin.toLowerCase().includes(o)||(e.ctx||``).toLowerCase().includes(o)||(e.providerKey||``).toLowerCase().includes(o))),n.sort((e,t)=>{if(!_)return Xt(e)-Xt(t);let n=b===`desc`?-1:1,r=0;return _===`mood`?r=tn(Rt(e.verdict),Rt(t.verdict),n):_===`idx`?r=tn(Xt(e),Xt(t),n):_===`tier`?r=tn(Lt(e.tier),Lt(t.tier),n):_===`label`?r=nn(e.label,t.label,n):_===`origin`?r=nn(e.origin,t.origin,n):_===`sweScore`?r=tn(zt(e.sweScore),zt(t.sweScore),n):_===`ctx`?r=tn(Ut(e.ctx),Ut(t.ctx),n):_===`latestPing`?r=tn(Qt(e),Qt(t),n):_===`avg`?r=tn(e.avg==null||e.avg===1/0||e.avg>99e3?null:e.avg,t.avg==null||t.avg===1/0||t.avg>99e3?null:t.avg,n):_===`condition`?r=tn(rn[e.status]??9,rn[t.status]??9,n):_===`verdict`?r=tn(Rt(e.verdict),Rt(t.verdict),n):_===`stability`?r=tn(en(e.stability),en(t.stability),n):_===`uptime`?r=tn(en(e.uptime),en(t.uptime),n):_===`aiLatency`?r=tn(e.benchmark?.ok?e.benchmark.totalMs:null,t.benchmark?.ok?t.benchmark.totalMs:null,n):_===`tps`?r=tn(e.benchmark?.ok?e.benchmark.tokensPerSecond??0:null,t.benchmark?.ok?t.benchmark.tokensPerSecond??0:null,n):_===`trend`&&(r=tn($t(e),$t(t),n)),r||Xt(e)-Xt(t)}),n},[e,t,r,a,s,l,d,p,h,_,b]),filterTier:t,setFilterTier:n,cycleTier:C,filterStatus:r,setFilterStatus:i,cycleStatus:w,filterProvider:a,setFilterProvider:o,filterVerdict:s,setFilterVerdict:c,cycleVerdict:T,filterHealth:l,setFilterHealth:u,cycleHealth:E,visibilityMode:d,setVisibilityMode:f,cycleVisibility:D,searchQuery:p,setSearchQuery:m,customTextFilter:h,setCustomTextFilter:g,sortColumn:_,sortDirection:b,toggleSort:O,resetView:ee}}var on=[`auto`,`dark`,`light`];function sn(){if(typeof window>`u`||typeof window.matchMedia!=`function`)return`dark`;try{return window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`}catch{return`dark`}}function cn(){if(typeof document>`u`)return`auto`;let e=document.documentElement.getAttribute(`data-theme`);return e===`auto`||e===`dark`||e===`light`?e:`auto`}function ln(){let[e,t]=(0,v.useState)(cn),[n,r]=(0,v.useState)(sn);(0,v.useEffect)(()=>{if(typeof window>`u`||typeof window.matchMedia!=`function`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`),t=e=>r(e.matches?`dark`:`light`);if(typeof e.addEventListener==`function`)return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t);if(typeof e.addListener==`function`)return e.addListener(t),()=>e.removeListener(t)},[]),(0,v.useEffect)(()=>{let t=e===`auto`?n:e;document.documentElement.setAttribute(`data-theme`,t),document.documentElement.setAttribute(`data-theme-preference`,e)},[e,n]);let i=(0,v.useCallback)(()=>{t(e=>on[(on.indexOf(e)+1)%on.length])},[]),a=(0,v.useCallback)(e=>{on.includes(e)&&t(e)},[]);return{theme:e,resolvedTheme:e===`auto`?n:e,setTheme:a,cycle:i}}var un=Object.freeze([]);function dn({models:e}={}){let[t,n]=(0,v.useState)(un),[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(!0),[s,c]=(0,v.useState)(null),l=(0,v.useCallback)(async()=>{try{let e=await fetch(`/api/favorites`);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();n(Array.isArray(t.favorites)?t.favorites:[]),i(!!t.pinnedAndSticky),c(null)}catch(e){c(e.message||`Failed to load favorites`),n(un),i(!1)}finally{o(!1)}},[]);(0,v.useEffect)(()=>{l()},[l]);let u=(0,v.useMemo)(()=>{let e=new Map;return t.forEach((t,n)=>e.set(t,n)),e},[t]),d=(0,v.useCallback)(e=>{if(!e)return!1;let t=`${e.providerKey}/${e.modelId}`;return u.has(t)},[u]),f=(0,v.useCallback)(e=>{if(!e)return 2**53-1;let t=`${e.providerKey}/${e.modelId}`,n=u.get(t);return n===void 0?2**53-1:n},[u]),p=(0,v.useCallback)(e=>e?`${e.providerKey}/${e.modelId}`:null,[]),m=(0,v.useCallback)(async e=>{try{let t=await fetch(`/api/favorites`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({favorites:e})});if(!t.ok)throw Error(`HTTP ${t.status}`);n(e)}catch(e){c(e.message||`Failed to save favorites`)}},[]);return{favorites:t,pinnedAndSticky:r,isFavorite:d,favoriteRank:f,toggle:(0,v.useCallback)(async e=>{let n=p(e);n&&await m(u.has(n)?t.filter(e=>e!==n):[...t,n])},[t,u,p,m]),reorder:(0,v.useCallback)(async(e,n)=>{let r=p(e);if(!r)return;let i=t.indexOf(r);if(i<0)return;let a=n===`up`?i-1:i+1;if(a<0||a>=t.length)return;let o=[...t];[o[i],o[a]]=[o[a],o[i]],await m(o)},[t,p,m]),setPinnedAndSticky:(0,v.useCallback)(async e=>{i(!!e);try{await fetch(`/api/favorites`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({pinnedAndSticky:!!e})})}catch(e){c(e.message||`Failed to save display mode`)}},[]),refresh:l,loading:a,error:s}}var fn=[`opencode`,`opencode-desktop`,`opencode-web`,`openclaw`,`crush`,`goose`,`pi`,`aider`,`qwen`,`openhands`,`amp`,`forgecode`,`fcm_router`],pn=`opencode`;function mn(e){return fn.includes(e)?e:pn}function hn({onToast:e}={}){let[t,n]=(0,v.useState)(pn),r=(0,v.useRef)(!1);(0,v.useEffect)(()=>{let t=!1;async function i(){try{let e=await fetch(`/api/tool-mode`),i=await e.json().catch(()=>({}));!t&&!r.current&&e.ok&&n(mn(i.mode))}catch(n){t||e?.(`Tool mode load failed: ${n.message}`,`error`)}}return i(),()=>{t=!0}},[e]);let i=(0,v.useCallback)(async t=>{let i=mn(t);r.current=!0,n(i);try{let e=await fetch(`/api/tool-mode`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({mode:i})}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||`HTTP ${e.status}`);return n(mn(t.mode)),{ok:!0,mode:mn(t.mode)}}catch(t){return e?.(`Tool mode save failed: ${t.message}`,`error`),{ok:!1,error:t.message,mode:i}}},[e]),a=(0,v.useCallback)(()=>i(fn[(TOOL_MODE_ORDER.indexOf(t)+1)%fn.length]||pn),[i,t]);return{toolMode:t,tools:(0,v.useMemo)(()=>[...fn],[]),setToolMode:i,cycleToolMode:a}}var gn={opencode:{label:`OpenCode CLI`,emoji:`📦`,flag:`--opencode`,color:[110,214,255]},"opencode-desktop":{label:`OpenCode Desktop`,emoji:`📦`,flag:`--opencode-desktop`,color:[149,205,255]},"opencode-web":{label:`OpenCode Web`,emoji:`📦`,flag:`--opencode-web`,color:[180,220,255]},openclaw:{label:`OpenClaw`,emoji:`🦞`,flag:`--openclaw`,color:[255,129,129]},crush:{label:`Crush`,emoji:`💘`,flag:`--crush`,color:[255,168,209]},goose:{label:`Goose`,emoji:`🪿`,flag:`--goose`,color:[132,235,168]},pi:{label:`Pi`,emoji:`π`,flag:`--pi`,color:[173,216,230]},aider:{label:`Aider`,emoji:`🛠`,flag:`--aider`,color:[255,208,102]},kilo:{label:`Kilo CLI`,emoji:`⚡️`,flag:`--kilo`,color:[255,107,107]},qwen:{label:`Qwen Code`,emoji:`🐉`,flag:`--qwen`,color:[255,213,128]},openhands:{label:`OpenHands`,emoji:`🤲`,flag:`--openhands`,color:[228,191,239]},amp:{label:`Amp`,emoji:`⚡`,flag:`--amp`,color:[255,232,98]},hermes:{label:`Hermes`,emoji:`🔮`,flag:`--hermes`,color:[200,160,255]},continue:{label:`Continue CLI`,emoji:`▶️`,flag:`--continue`,color:[255,100,100]},cline:{label:`Cline`,emoji:`🧠`,flag:`--cline`,color:[100,220,180]},rovo:{label:`Rovo Dev CLI`,emoji:`🦘`,flag:`--rovo`,color:[148,163,184],cliOnly:!0},gemini:{label:`Gemini CLI`,emoji:`♊`,flag:`--gemini`,color:[66,165,245],cliOnly:!0},caveman:{label:`Caveman Code`,emoji:`🪨`,flag:`--caveman`,color:[180,130,80]},jcode:{label:`jcode`,emoji:`🪼`,flag:`--jcode`,color:[255,140,0]},xcode:{label:`Xcode Intelligence`,emoji:`🛠️`,flag:`--xcode`,color:[20,126,251]},fcm_router:{label:`FCM Router`,emoji:`🧭`,flag:`--fcm-router`,color:[80,200,120]},copilot:{label:`Copilot CLI`,emoji:`🤖`,flag:`--copilot`,color:[200,220,255]},forgecode:{label:`ForgeCode`,emoji:`🔥`,flag:`--forgecode`,color:[255,120,50]}},_n=[`opencode`,`pi`,`jcode`,`opencode-desktop`,`opencode-web`,`openclaw`,`crush`,`goose`,`aider`,`kilo`,`qwen`,`openhands`,`amp`,`hermes`,`continue`,`cline`,`xcode`,`fcm_router`,`rovo`,`gemini`,`caveman`,`copilot`,`forgecode`];function vn(e){return gn[e]||{label:e,emoji:`•`,flag:null}}var yn=Object.keys(gn).filter(e=>!gn[e].cliOnly);function bn(e){return e===`rovo`?[`rovo`]:e===`gemini`?[`gemini`]:yn}function xn(e,t){return bn(e).includes(t)}function Sn(e,t,n,r=3){let i=parseFloat(e)||0;return n.filter(e=>!e.hidden&&xn(e.providerKey,t)).map(e=>({modelId:e.modelId,label:e.label,tier:e.tier,sweScore:e.sweScore||`-`,providerKey:e.providerKey,sweDelta:Math.abs((parseFloat(e.sweScore)||0)-i)})).sort((e,t)=>e.sweDelta-t.sweDelta).slice(0,r)}var Cn=new Set([`S+`,`S`,`A+`,`A`,`A-`,`B+`,`B`,`C`,`all`]),wn=new Set([`up`,`down`,`pending`,`all`]),Tn=new Set([`mood`,`idx`,`tier`,`sweScore`,`ctx`,`label`,`origin`,`latestPing`,`avg`,`condition`,`verdict`,`stability`,`uptime`,`aiLatency`,`tps`,`trend`]),En=new Set([`dashboard`,`settings`,`analytics`,`recommend`,`router`,`help`,`changelog`]),Dn=new Set([`asc`,`desc`]),On=new Set(_n);function kn(){if(typeof window>`u`)return null;let e=new URLSearchParams(window.location.search),t={};return e.has(`view`)&&En.has(e.get(`view`))&&(t.view=e.get(`view`)),e.has(`tier`)&&Cn.has(e.get(`tier`))&&(t.tier=e.get(`tier`)),e.has(`status`)&&wn.has(e.get(`status`))&&(t.status=e.get(`status`)),e.has(`provider`)&&(t.provider=e.get(`provider`)),e.has(`verdict`)&&(t.verdict=e.get(`verdict`)),e.has(`health`)&&(t.health=e.get(`health`)),e.has(`sort`)&&Tn.has(e.get(`sort`))&&(t.sort=e.get(`sort`)),e.has(`dir`)&&Dn.has(e.get(`dir`))&&(t.dir=e.get(`dir`)),e.has(`q`)&&(t.q=e.get(`q`)),e.has(`toolMode`)&&On.has(e.get(`toolMode`))&&(t.toolMode=e.get(`toolMode`)),e.has(`recommend`)&&[`1`,`true`,`open`].includes(e.get(`recommend`))&&(t.view=`recommend`),e.has(`palette`)&&e.get(`palette`)===`open`&&(t.palette=`open`),t}function An(e){let t=new URLSearchParams;return e?(e.currentView&&e.currentView!==`dashboard`&&t.set(`view`,e.currentView),e.filterTier&&e.filterTier!==`all`&&t.set(`tier`,e.filterTier),e.filterStatus&&e.filterStatus!==`all`&&t.set(`status`,e.filterStatus),e.filterProvider&&e.filterProvider!==`all`&&t.set(`provider`,e.filterProvider),e.filterVerdict&&e.filterVerdict!==`all`&&t.set(`verdict`,e.filterVerdict),e.filterHealth&&e.filterHealth!==`all`&&t.set(`health`,e.filterHealth),e.sortColumn&&(t.set(`sort`,e.sortColumn),e.sortDirection&&t.set(`dir`,e.sortDirection)),e.searchQuery&&t.set(`q`,e.searchQuery),e.toolMode&&t.set(`toolMode`,e.toolMode),e.paletteOpen&&t.set(`palette`,`open`),t):t}function jn(e){if(typeof window>`u`)return;let t=An(e).toString(),n=t?`${window.location.pathname}?${t}${window.location.hash}`:`${window.location.pathname}${window.location.hash}`;window.history.replaceState({},``,n)}function Mn({currentView:e,setCurrentView:t,filterState:n=null,paletteOpen:r=!1,setPaletteOpen:i=()=>{},toolMode:a=null,setToolMode:o=()=>{}}){let s=(0,v.useRef)(null),c=(0,v.useRef)(!1);(0,v.useEffect)(()=>{if(c.current)return;c.current=!0;let r=kn();r&&(r.view&&t&&r.view!==e&&t(r.view),r.tier&&n?.setFilterTier&&n.setFilterTier(r.tier),r.status&&n?.setFilterStatus&&n.setFilterStatus(r.status),r.provider&&n?.setFilterProvider&&n.setFilterProvider(r.provider),r.verdict&&n?.setFilterVerdict&&n.setFilterVerdict(r.verdict),r.health&&n?.setFilterHealth&&n.setFilterHealth(r.health),r.sort&&n?.toggleSort&&(n.setSortColumn&&n.setSortColumn(r.sort),r.dir&&n.setSortDirection&&n.setSortDirection(r.dir)),r.q!==void 0&&n?.setSearchQuery&&n.setSearchQuery(r.q),r.toolMode&&o&&o(r.toolMode),r.palette===`open`&&i&&i(!0))},[]),(0,v.useEffect)(()=>{if(c.current)return s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{jn({currentView:e,filterTier:n?.filterTier,filterStatus:n?.filterStatus,filterProvider:n?.filterProvider,filterVerdict:n?.filterVerdict,filterHealth:n?.filterHealth,sortColumn:n?.sortColumn,sortDirection:n?.sortDirection,searchQuery:n?.searchQuery,toolMode:a,paletteOpen:r})},80),()=>{s.current&&clearTimeout(s.current)}},[e,r,a,n?.filterTier,n?.filterStatus,n?.filterProvider,n?.filterVerdict,n?.filterHealth,n?.sortColumn,n?.sortDirection,n?.searchQuery])}var Nn=5*6e4;function Pn(e,t){if(!e||!t)return 0;let n=e.replace(/^v/,``).split(`.`).map(Number),r=t.replace(/^v/,``).split(`.`).map(Number);for(let e=0;e<Math.max(n.length,r.length);e++){let t=n[e]||0,i=r[e]||0;if(i!==t)return i-t}return 0}function Fn({onToast:e}={}){let[t,n]=(0,v.useState)(null),[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)(!1),d=(0,v.useRef)(null),f=(0,v.useCallback)(async()=>{u(!0);try{let e=await fetch(`/api/version`);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();n(t.local??null),i(t.latest??null),o(t.lastReleaseDate??null),c(t.error??null)}catch(e){c(e.message||`update check failed`)}finally{u(!1)}},[]);(0,v.useEffect)(()=>(f(),d.current=setInterval(f,Nn),()=>{d.current&&clearInterval(d.current)}),[f]);let p=!!(r&&t&&Pn(r,t)>0);return{localVersion:t,latestVersion:r,lastReleaseDate:a,updateAvailable:p,checkNow:f,runUpdate:(0,v.useCallback)(async()=>{if(!p){e?.(`No update available.`,`info`);return}try{let t=await fetch(`/api/update/run`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({version:r})}),n=await t.json().catch(()=>({}));t.ok&&n?.started?e?.(`Update to v${r} started — restart the dashboard to apply.`,`success`):e?.(n?.error||n?.message||`Update failed`,`error`)}catch(t){e?.(t.message||`Update request failed`,`error`)}},[p,r,e]),loading:l,error:s}}var In={outline:{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},filled:{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`currentColor`,stroke:`none`}},F=(e,t,n,r)=>{let i=(0,v.forwardRef)(({color:n=`currentColor`,size:i=24,stroke:a=2,title:o,className:s,children:c,...l},u)=>(0,v.createElement)(`svg`,{ref:u,...In[e],width:i,height:i,className:[`tabler-icon`,`tabler-icon-${t}`,s].join(` `),...e===`filled`?{fill:n}:{strokeWidth:a,stroke:n},...l},[o&&(0,v.createElement)(`title`,{key:`svg-title`},o),...r.map(([e,t])=>(0,v.createElement)(e,t)),...Array.isArray(c)?c:[c]]));return i.displayName=`${n}`,i},Ln=F(`outline`,`activity`,`Activity`,[[`path`,{d:`M3 12h4l3 8l4 -16l3 8h4`,key:`svg-0`}]]),Rn=F(`outline`,`alert-octagon`,`AlertOctagon`,[[`path`,{d:`M12.802 2.165l5.575 2.389c.48 .206 .863 .589 1.07 1.07l2.388 5.574c.22 .512 .22 1.092 0 1.604l-2.389 5.575c-.206 .48 -.589 .863 -1.07 1.07l-5.574 2.388c-.512 .22 -1.092 .22 -1.604 0l-5.575 -2.389a2.036 2.036 0 0 1 -1.07 -1.07l-2.388 -5.574a2.036 2.036 0 0 1 0 -1.604l2.389 -5.575c.206 -.48 .589 -.863 1.07 -1.07l5.574 -2.388a2.036 2.036 0 0 1 1.604 0`,key:`svg-0`}],[`path`,{d:`M12 8v4`,key:`svg-1`}],[`path`,{d:`M12 16h.01`,key:`svg-2`}]]),zn=F(`outline`,`alert-triangle`,`AlertTriangle`,[[`path`,{d:`M12 9v4`,key:`svg-0`}],[`path`,{d:`M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0`,key:`svg-1`}],[`path`,{d:`M12 16h.01`,key:`svg-2`}]]),Bn=F(`outline`,`arrow-down`,`ArrowDown`,[[`path`,{d:`M12 5l0 14`,key:`svg-0`}],[`path`,{d:`M18 13l-6 6`,key:`svg-1`}],[`path`,{d:`M6 13l6 6`,key:`svg-2`}]]),Vn=F(`outline`,`arrow-left`,`ArrowLeft`,[[`path`,{d:`M5 12l14 0`,key:`svg-0`}],[`path`,{d:`M5 12l6 6`,key:`svg-1`}],[`path`,{d:`M5 12l6 -6`,key:`svg-2`}]]),Hn=F(`outline`,`arrow-up`,`ArrowUp`,[[`path`,{d:`M12 5l0 14`,key:`svg-0`}],[`path`,{d:`M18 11l-6 -6`,key:`svg-1`}],[`path`,{d:`M6 11l6 -6`,key:`svg-2`}]]),Un=F(`outline`,`ban`,`Ban`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`,key:`svg-0`}],[`path`,{d:`M5.7 5.7l12.6 12.6`,key:`svg-1`}]]),Wn=F(`outline`,`bolt`,`Bolt`,[[`path`,{d:`M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11`,key:`svg-0`}]]),Gn=F(`outline`,`braces`,`Braces`,[[`path`,{d:`M7 4a2 2 0 0 0 -2 2v3a2 3 0 0 1 -2 3a2 3 0 0 1 2 3v3a2 2 0 0 0 2 2`,key:`svg-0`}],[`path`,{d:`M17 4a2 2 0 0 1 2 2v3a2 3 0 0 0 2 3a2 3 0 0 0 -2 3v3a2 2 0 0 1 -2 2`,key:`svg-1`}]]),Kn=F(`outline`,`check`,`Check`,[[`path`,{d:`M5 12l5 5l10 -10`,key:`svg-0`}]]),qn=F(`outline`,`checks`,`Checks`,[[`path`,{d:`M7 12l5 5l10 -10`,key:`svg-0`}],[`path`,{d:`M2 12l5 5m5 -5l5 -5`,key:`svg-1`}]]),Jn=F(`outline`,`chevron-down`,`ChevronDown`,[[`path`,{d:`M6 9l6 6l6 -6`,key:`svg-0`}]]),Yn=F(`outline`,`chevron-left`,`ChevronLeft`,[[`path`,{d:`M15 6l-6 6l6 6`,key:`svg-0`}]]),Xn=F(`outline`,`chevron-right`,`ChevronRight`,[[`path`,{d:`M9 6l6 6l-6 6`,key:`svg-0`}]]),Zn=F(`outline`,`chevron-up`,`ChevronUp`,[[`path`,{d:`M6 15l6 -6l6 6`,key:`svg-0`}]]),Qn=F(`outline`,`circle-check`,`CircleCheck`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`,key:`svg-0`}],[`path`,{d:`M9 12l2 2l4 -4`,key:`svg-1`}]]),$n=F(`outline`,`clipboard`,`Clipboard`,[[`path`,{d:`M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2`,key:`svg-0`}],[`path`,{d:`M9 5a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2`,key:`svg-1`}]]),er=F(`outline`,`clock`,`Clock`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0`,key:`svg-0`}],[`path`,{d:`M12 7v5l3 3`,key:`svg-1`}]]),tr=F(`outline`,`cloud-off`,`CloudOff`,[[`path`,{d:`M9.58 5.548c.24 -.11 .492 -.207 .752 -.286c1.88 -.572 3.956 -.193 5.444 1c1.488 1.19 2.162 3.007 1.77 4.769h.99c1.913 0 3.464 1.56 3.464 3.486c0 .957 -.383 1.824 -1.003 2.454m-2.997 1.033h-11.343c-2.572 -.004 -4.657 -2.011 -4.657 -4.487c0 -2.475 2.085 -4.482 4.657 -4.482c.13 -.582 .37 -1.128 .7 -1.62`,key:`svg-0`}],[`path`,{d:`M3 3l18 18`,key:`svg-1`}]]),nr=F(`outline`,`command`,`Command`,[[`path`,{d:`M7 9a2 2 0 1 1 2 -2v10a2 2 0 1 1 -2 -2h10a2 2 0 1 1 -2 2v-10a2 2 0 1 1 2 2h-10`,key:`svg-0`}]]),rr=F(`outline`,`copy`,`Copy`,[[`path`,{d:`M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666`,key:`svg-0`}],[`path`,{d:`M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1`,key:`svg-1`}]]),ir=F(`outline`,`dots`,`Dots`,[[`path`,{d:`M4 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-0`}],[`path`,{d:`M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-1`}],[`path`,{d:`M18 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-2`}]]),ar=F(`outline`,`download`,`Download`,[[`path`,{d:`M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2`,key:`svg-0`}],[`path`,{d:`M7 11l5 5l5 -5`,key:`svg-1`}],[`path`,{d:`M12 4l0 12`,key:`svg-2`}]]),or=F(`outline`,`error-404`,`Error404`,[[`path`,{d:`M3 8v3a1 1 0 0 0 1 1h3`,key:`svg-0`}],[`path`,{d:`M7 8v8`,key:`svg-1`}],[`path`,{d:`M17 8v3a1 1 0 0 0 1 1h3`,key:`svg-2`}],[`path`,{d:`M21 8v8`,key:`svg-3`}],[`path`,{d:`M10 10v4a2 2 0 1 0 4 0v-4a2 2 0 1 0 -4 0`,key:`svg-4`}]]),sr=F(`outline`,`external-link`,`ExternalLink`,[[`path`,{d:`M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6`,key:`svg-0`}],[`path`,{d:`M11 13l9 -9`,key:`svg-1`}],[`path`,{d:`M15 4h5v5`,key:`svg-2`}]]),cr=F(`outline`,`eye-off`,`EyeOff`,[[`path`,{d:`M10.585 10.587a2 2 0 0 0 2.829 2.828`,key:`svg-0`}],[`path`,{d:`M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87`,key:`svg-1`}],[`path`,{d:`M3 3l18 18`,key:`svg-2`}]]),lr=F(`outline`,`eye`,`Eye`,[[`path`,{d:`M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0`,key:`svg-0`}],[`path`,{d:`M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6`,key:`svg-1`}]]),ur=F(`outline`,`file-spreadsheet`,`FileSpreadsheet`,[[`path`,{d:`M14 3v4a1 1 0 0 0 1 1h4`,key:`svg-0`}],[`path`,{d:`M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2`,key:`svg-1`}],[`path`,{d:`M8 11h8v7h-8l0 -7`,key:`svg-2`}],[`path`,{d:`M8 15h8`,key:`svg-3`}],[`path`,{d:`M11 11v7`,key:`svg-4`}]]),dr=F(`outline`,`filter`,`Filter`,[[`path`,{d:`M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227`,key:`svg-0`}]]),fr=F(`outline`,`flame`,`Flame`,[[`path`,{d:`M12 10.941c2.333 -3.308 .167 -7.823 -1 -8.941c0 3.395 -2.235 5.299 -3.667 6.706c-1.43 1.408 -2.333 3.294 -2.333 5.588c0 3.704 3.134 6.706 7 6.706c3.866 0 7 -3.002 7 -6.706c0 -1.712 -1.232 -4.403 -2.333 -5.588c-2.084 3.353 -3.257 3.353 -4.667 2.235`,key:`svg-0`}]]),pr=F(`outline`,`folders`,`Folders`,[[`path`,{d:`M9 3h3l2 2h5a2 2 0 0 1 2 2v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-9a2 2 0 0 1 2 -2`,key:`svg-0`}],[`path`,{d:`M17 16v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-9a2 2 0 0 1 2 -2h2`,key:`svg-1`}]]),mr=F(`outline`,`grip-vertical`,`GripVertical`,[[`path`,{d:`M8 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-0`}],[`path`,{d:`M8 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-1`}],[`path`,{d:`M8 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-2`}],[`path`,{d:`M14 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-3`}],[`path`,{d:`M14 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-4`}],[`path`,{d:`M14 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-5`}]]),hr=F(`outline`,`history`,`History`,[[`path`,{d:`M12 8l0 4l2 2`,key:`svg-0`}],[`path`,{d:`M3.05 11a9 9 0 1 1 .5 4m-.5 5v-5h5`,key:`svg-1`}]]),gr=F(`outline`,`hourglass-off`,`HourglassOff`,[[`path`,{d:`M18 18v2a1 1 0 0 1 -1 1h-10a1 1 0 0 1 -1 -1v-2a6 6 0 0 1 6 -6`,key:`svg-0`}],[`path`,{d:`M6 6a6 6 0 0 0 6 6m3.13 -.88a6 6 0 0 0 2.87 -5.12v-2a1 1 0 0 0 -1 -1h-10`,key:`svg-1`}],[`path`,{d:`M3 3l18 18`,key:`svg-2`}]]),_r=F(`outline`,`hourglass`,`Hourglass`,[[`path`,{d:`M6.5 7h11`,key:`svg-0`}],[`path`,{d:`M6.5 17h11`,key:`svg-1`}],[`path`,{d:`M6 20v-2a6 6 0 1 1 12 0v2a1 1 0 0 1 -1 1h-10a1 1 0 0 1 -1 -1`,key:`svg-2`}],[`path`,{d:`M6 4v2a6 6 0 1 0 12 0v-2a1 1 0 0 0 -1 -1h-10a1 1 0 0 0 -1 1`,key:`svg-3`}]]),vr=F(`outline`,`key`,`Key`,[[`path`,{d:`M16.555 3.843l3.602 3.602a2.877 2.877 0 0 1 0 4.069l-2.643 2.643a2.877 2.877 0 0 1 -4.069 0l-.301 -.301l-6.558 6.558a2 2 0 0 1 -1.239 .578l-.175 .008h-1.172a1 1 0 0 1 -.993 -.883l-.007 -.117v-1.172a2 2 0 0 1 .467 -1.284l.119 -.13l.414 -.414h2v-2h2v-2l2.144 -2.144l-.301 -.301a2.877 2.877 0 0 1 0 -4.069l2.643 -2.643a2.877 2.877 0 0 1 4.069 0`,key:`svg-0`}],[`path`,{d:`M15 9h.01`,key:`svg-1`}]]),yr=F(`outline`,`layout-dashboard`,`LayoutDashboard`,[[`path`,{d:`M5 4h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1`,key:`svg-0`}],[`path`,{d:`M5 16h4a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1`,key:`svg-1`}],[`path`,{d:`M15 12h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1`,key:`svg-2`}],[`path`,{d:`M15 4h4a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1`,key:`svg-3`}]]),br=F(`outline`,`list`,`List`,[[`path`,{d:`M9 6l11 0`,key:`svg-0`}],[`path`,{d:`M9 12l11 0`,key:`svg-1`}],[`path`,{d:`M9 18l11 0`,key:`svg-2`}],[`path`,{d:`M5 6l0 .01`,key:`svg-3`}],[`path`,{d:`M5 12l0 .01`,key:`svg-4`}],[`path`,{d:`M5 18l0 .01`,key:`svg-5`}]]),xr=F(`outline`,`loader`,`Loader`,[[`path`,{d:`M12 6l0 -3`,key:`svg-0`}],[`path`,{d:`M16.25 7.75l2.15 -2.15`,key:`svg-1`}],[`path`,{d:`M18 12l3 0`,key:`svg-2`}],[`path`,{d:`M16.25 16.25l2.15 2.15`,key:`svg-3`}],[`path`,{d:`M12 18l0 3`,key:`svg-4`}],[`path`,{d:`M7.75 16.25l-2.15 2.15`,key:`svg-5`}],[`path`,{d:`M6 12l-3 0`,key:`svg-6`}],[`path`,{d:`M7.75 7.75l-2.15 -2.15`,key:`svg-7`}]]),Sr=F(`outline`,`lock`,`Lock`,[[`path`,{d:`M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6`,key:`svg-0`}],[`path`,{d:`M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0`,key:`svg-1`}],[`path`,{d:`M8 11v-4a4 4 0 1 1 8 0v4`,key:`svg-2`}]]),Cr=F(`outline`,`menu-2`,`Menu2`,[[`path`,{d:`M4 6l16 0`,key:`svg-0`}],[`path`,{d:`M4 12l16 0`,key:`svg-1`}],[`path`,{d:`M4 18l16 0`,key:`svg-2`}]]),wr=F(`outline`,`message-chatbot`,`MessageChatbot`,[[`path`,{d:`M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12`,key:`svg-0`}],[`path`,{d:`M9.5 9h.01`,key:`svg-1`}],[`path`,{d:`M14.5 9h.01`,key:`svg-2`}],[`path`,{d:`M9.5 13a3.5 3.5 0 0 0 5 0`,key:`svg-3`}]]),Tr=F(`outline`,`moon`,`Moon`,[[`path`,{d:`M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454l0 .008`,key:`svg-0`}]]),Er=F(`outline`,`player-play`,`PlayerPlay`,[[`path`,{d:`M7 4v16l13 -8l-13 -8`,key:`svg-0`}]]),Dr=F(`outline`,`player-stop`,`PlayerStop`,[[`path`,{d:`M5 7a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2l0 -10`,key:`svg-0`}]]),Or=F(`outline`,`plug-connected`,`PlugConnected`,[[`path`,{d:`M7 12l5 5l-1.5 1.5a3.536 3.536 0 1 1 -5 -5l1.5 -1.5`,key:`svg-0`}],[`path`,{d:`M17 12l-5 -5l1.5 -1.5a3.536 3.536 0 1 1 5 5l-1.5 1.5`,key:`svg-1`}],[`path`,{d:`M3 21l2.5 -2.5`,key:`svg-2`}],[`path`,{d:`M18.5 5.5l2.5 -2.5`,key:`svg-3`}],[`path`,{d:`M10 11l-2 2`,key:`svg-4`}],[`path`,{d:`M13 14l-2 2`,key:`svg-5`}]]),kr=F(`outline`,`plug`,`Plug`,[[`path`,{d:`M9.785 6l8.215 8.215l-2.054 2.054a5.81 5.81 0 1 1 -8.215 -8.215l2.054 -2.054`,key:`svg-0`}],[`path`,{d:`M4 20l3.5 -3.5`,key:`svg-1`}],[`path`,{d:`M15 4l-3.5 3.5`,key:`svg-2`}],[`path`,{d:`M20 9l-3.5 3.5`,key:`svg-3`}]]),Ar=F(`outline`,`plus`,`Plus`,[[`path`,{d:`M12 5l0 14`,key:`svg-0`}],[`path`,{d:`M5 12l14 0`,key:`svg-1`}]]),jr=F(`outline`,`question-mark`,`QuestionMark`,[[`path`,{d:`M8 8a3.5 3 0 0 1 3.5 -3h1a3.5 3 0 0 1 3.5 3a3 3 0 0 1 -2 3a3 4 0 0 0 -2 4`,key:`svg-0`}],[`path`,{d:`M12 19l0 .01`,key:`svg-1`}]]),Mr=F(`outline`,`refresh`,`Refresh`,[[`path`,{d:`M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4`,key:`svg-0`}],[`path`,{d:`M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4`,key:`svg-1`}]]),Nr=F(`outline`,`route`,`Route`,[[`path`,{d:`M3 19a2 2 0 1 0 4 0a2 2 0 0 0 -4 0`,key:`svg-0`}],[`path`,{d:`M19 7a2 2 0 1 0 0 -4a2 2 0 0 0 0 4`,key:`svg-1`}],[`path`,{d:`M11 19h5.5a3.5 3.5 0 0 0 0 -7h-8a3.5 3.5 0 0 1 0 -7h4.5`,key:`svg-2`}]]),Pr=F(`outline`,`search`,`Search`,[[`path`,{d:`M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0`,key:`svg-0`}],[`path`,{d:`M21 21l-6 -6`,key:`svg-1`}]]),Fr=F(`outline`,`send`,`Send`,[[`path`,{d:`M10 14l11 -11`,key:`svg-0`}],[`path`,{d:`M21 3l-6.5 18a.55 .55 0 0 1 -1 0l-3.5 -7l-7 -3.5a.55 .55 0 0 1 0 -1l18 -6.5`,key:`svg-1`}]]),Ir=F(`outline`,`settings`,`Settings`,[[`path`,{d:`M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065`,key:`svg-0`}],[`path`,{d:`M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0`,key:`svg-1`}]]),Lr=F(`outline`,`sparkles`,`Sparkles`,[[`path`,{d:`M16 18a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2m0 -12a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2m-7 12a6 6 0 0 1 6 -6a6 6 0 0 1 -6 -6a6 6 0 0 1 -6 6a6 6 0 0 1 6 6`,key:`svg-0`}]]),Rr=F(`outline`,`star`,`Star`,[[`path`,{d:`M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873l-6.158 -3.245`,key:`svg-0`}]]),zr=F(`outline`,`sun`,`Sun`,[[`path`,{d:`M8 12a4 4 0 1 0 8 0a4 4 0 1 0 -8 0`,key:`svg-0`}],[`path`,{d:`M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7`,key:`svg-1`}]]),Br=F(`outline`,`tool`,`Tool`,[[`path`,{d:`M7 10h3v-3l-3.5 -3.5a6 6 0 0 1 8 8l6 6a2 2 0 0 1 -3 3l-6 -6a6 6 0 0 1 -8 -8l3.5 3.5`,key:`svg-0`}]]),Vr=F(`outline`,`trash`,`Trash`,[[`path`,{d:`M4 7l16 0`,key:`svg-0`}],[`path`,{d:`M10 11l0 6`,key:`svg-1`}],[`path`,{d:`M14 11l0 6`,key:`svg-2`}],[`path`,{d:`M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12`,key:`svg-3`}],[`path`,{d:`M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3`,key:`svg-4`}]]),Hr=F(`outline`,`trophy`,`Trophy`,[[`path`,{d:`M8 21l8 0`,key:`svg-0`}],[`path`,{d:`M12 17l0 4`,key:`svg-1`}],[`path`,{d:`M7 4l10 0`,key:`svg-2`}],[`path`,{d:`M17 4v8a5 5 0 0 1 -10 0v-8`,key:`svg-3`}],[`path`,{d:`M3 9a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-4`}],[`path`,{d:`M17 9a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-5`}]]),Ur=F(`outline`,`upload`,`Upload`,[[`path`,{d:`M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2`,key:`svg-0`}],[`path`,{d:`M7 9l5 -5l5 5`,key:`svg-1`}],[`path`,{d:`M12 4l0 12`,key:`svg-2`}]]),Wr=F(`outline`,`wand`,`Wand`,[[`path`,{d:`M6 21l15 -15l-3 -3l-15 15l3 3`,key:`svg-0`}],[`path`,{d:`M15 6l3 3`,key:`svg-1`}],[`path`,{d:`M9 3a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2`,key:`svg-2`}],[`path`,{d:`M19 13a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2`,key:`svg-3`}]]),Gr=F(`outline`,`x`,`X`,[[`path`,{d:`M18 6l-12 12`,key:`svg-0`}],[`path`,{d:`M6 6l12 12`,key:`svg-1`}]]),Kr=F(`filled`,`circle-check-filled`,`CircleCheckFilled`,[[`path`,{d:`M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.293 5.953a1 1 0 0 0 -1.32 -.083l-.094 .083l-3.293 3.292l-1.293 -1.292l-.094 -.083a1 1 0 0 0 -1.403 1.403l.083 .094l2 2l.094 .083a1 1 0 0 0 1.226 0l.094 -.083l4 -4l.083 -.094a1 1 0 0 0 -.083 -1.32z`,key:`svg-0`}]]),qr=F(`filled`,`player-play-filled`,`PlayerPlayFilled`,[[`path`,{d:`M6 4v16a1 1 0 0 0 1.524 .852l13 -8a1 1 0 0 0 0 -1.704l-13 -8a1 1 0 0 0 -1.524 .852z`,key:`svg-0`}]]),Jr=F(`filled`,`star-filled`,`StarFilled`,[[`path`,{d:`M8.243 7.34l-6.38 .925l-.113 .023a1 1 0 0 0 -.44 1.684l4.622 4.499l-1.09 6.355l-.013 .11a1 1 0 0 0 1.464 .944l5.706 -3l5.693 3l.1 .046a1 1 0 0 0 1.352 -1.1l-1.091 -6.355l4.624 -4.5l.078 -.085a1 1 0 0 0 -.633 -1.62l-6.38 -.926l-2.852 -5.78a1 1 0 0 0 -1.794 0l-2.853 5.78z`,key:`svg-0`}]]),Yr={wrap:`_wrap_3zy19_5`,trigger:`_trigger_3zy19_11`,cycle:`_cycle_3zy19_12`,emoji:`_emoji_3zy19_40`,label:`_label_3zy19_41`,menu:`_menu_3zy19_42`,item:`_item_3zy19_56`,itemActive:`_itemActive_3zy19_70`,itemEmoji:`_itemEmoji_3zy19_74`,itemText:`_itemText_3zy19_75`,activeDot:`_activeDot_3zy19_78`,compact:`_compact_3zy19_79`},Xr=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),I=o(((e,t)=>{t.exports=Xr()}))();function Zr({toolMode:e=`opencode`,onSetToolMode:t,onCycleToolMode:n,compact:r=!1,tools:i=fn}){let[a,o]=(0,v.useState)(!1),s=(0,v.useRef)(null),c=vn(e);return(0,v.useEffect)(()=>{if(!a)return;let e=e=>{s.current&&!s.current.contains(e.target)&&o(!1)},t=e=>{e.key===`Escape`&&o(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[a]),(0,I.jsxs)(`div`,{className:`${Yr.wrap} ${r?Yr.compact:``}`,ref:s,children:[(0,I.jsxs)(`button`,{type:`button`,className:Yr.trigger,onClick:()=>o(e=>!e),"aria-haspopup":`listbox`,"aria-expanded":a,title:`Install endpoint into: ${c.label}`,children:[(0,I.jsx)(`span`,{className:Yr.emoji,children:c.emoji}),(0,I.jsx)(`span`,{className:Yr.label,children:r?c.label.replace(/ CLI$/,``):c.label}),(0,I.jsx)(Jn,{size:13,stroke:1.7})]}),(0,I.jsx)(`button`,{type:`button`,className:Yr.cycle,onClick:n,title:`Cycle endpoint target`,"aria-label":`Cycle endpoint target`,children:(0,I.jsx)(Mr,{size:13,stroke:1.7})}),a&&(0,I.jsx)(`div`,{className:Yr.menu,role:`listbox`,"aria-label":`Endpoint install target`,children:i.map(n=>{let r=gn[n],i=n===e;return(0,I.jsxs)(`button`,{type:`button`,className:`${Yr.item} ${i?Yr.itemActive:``}`,onClick:()=>{t?.(n),o(!1)},role:`option`,"aria-selected":i,children:[(0,I.jsx)(`span`,{className:Yr.itemEmoji,children:r.emoji}),(0,I.jsxs)(`span`,{className:Yr.itemText,children:[(0,I.jsx)(`strong`,{children:r.label}),(0,I.jsx)(`small`,{children:r.flag})]}),i&&(0,I.jsx)(`span`,{className:Yr.activeDot,children:`●`})]},n)})})]})}var L={header:`_header_3lvj2_11`,left:`_left_3lvj2_28`,center:`_center_3lvj2_35`,right:`_right_3lvj2_41`,logo:`_logo_3lvj2_49`,logoIcon:`_logoIcon_3lvj2_50`,logoText:`_logoText_3lvj2_58`,logoTextHighlight:`_logoTextHighlight_3lvj2_64`,version:`_version_3lvj2_65`,nav:`_nav_3lvj2_72`,navBtn:`_navBtn_3lvj2_82`,navBtnActive:`_navBtnActive_3lvj2_103`,comingBadge:`_comingBadge_3lvj2_116`,menuWrap:`_menuWrap_3lvj2_132`,menuTrigger:`_menuTrigger_3lvj2_133`,menuPopover:`_menuPopover_3lvj2_138`,menuItem:`_menuItem_3lvj2_153`,searchBar:`_searchBar_3lvj2_173`,searchIcon:`_searchIcon_3lvj2_183`,searchInput:`_searchInput_3lvj2_184`,iconBtn:`_iconBtn_3lvj2_192`,cmdkBtn:`_cmdkBtn_3lvj2_202`,cmdkLabel:`_cmdkLabel_3lvj2_215`,benchmarkBtn:`_benchmarkBtn_3lvj2_218`,benchmarkActive:`_benchmarkActive_3lvj2_228`,benchmarkRunning:`_benchmarkRunning_3lvj2_233`,spinner:`_spinner_3lvj2_235`,spin:`_spin_3lvj2_235`,hamburgerBtn:`_hamburgerBtn_3lvj2_268`,mobileNav:`_mobileNav_3lvj2_290`,mobileNavItem:`_mobileNavItem_3lvj2_305`,mobileNavActive:`_mobileNavActive_3lvj2_322`,mobileNavDivider:`_mobileNavDivider_3lvj2_327`},Qr=[{id:`dashboard`,label:`Dashboard`,icon:yr},{id:`settings`,label:`Settings`,icon:Ir},{id:`analytics`,label:`Analytics`,icon:Ln},{id:`recommend`,label:`Recommend`,icon:Lr},{id:`router`,label:`Router`,icon:Nr},{id:`playground`,label:`Playground`,icon:wr}],$r=[{id:`help`,label:`Help`,icon:jr},{id:`changelog`,label:`Changelog`,icon:hr},{id:`install-endpoints`,label:`Install Endpoints`,icon:kr},{id:`installed-models`,label:`Installed Models`,icon:pr}];function ei({searchQuery:e,onSearchChange:t,currentView:n,onNavigate:r,onToggleTheme:i,onOpenExport:a,onOpenCommandPalette:o,onBenchmark:s,benchmarkRunning:c,benchmarkTotal:l,benchmarkCompleted:u,modelsCount:d,theme:f,onToast:p,toolMode:m=`opencode`,onSetToolMode:h,onCycleToolMode:g,updateSlot:_=null}){let[y,b]=(0,v.useState)(!1),[x,S]=(0,v.useState)(!1),C=(0,v.useRef)(null);(0,v.useEffect)(()=>{if(!y&&!x)return;let e=e=>{C.current&&!C.current.contains(e.target)&&b(!1)},t=e=>{e.key===`Escape`&&(b(!1),S(!1))};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[y,x]);let w=e=>{if(e.comingIn){p?.(`${e.label} arrives in milestone ${e.comingIn}.`,`info`);return}r(e.id),S(!1)},T=e=>{if(b(!1),e.comingIn){p?.(`${e.label} arrives in milestone ${e.comingIn}.`,`info`);return}r(e.id)};return(0,I.jsxs)(`header`,{className:L.header,children:[(0,I.jsxs)(`div`,{className:L.left,children:[(0,I.jsxs)(`div`,{className:L.logo,children:[(0,I.jsx)(`span`,{className:L.logoIcon,children:`>`}),(0,I.jsxs)(`span`,{className:L.logoText,children:[(0,I.jsx)(`span`,{className:L.logoTextHighlight,children:`free`}),(0,I.jsx)(`span`,{children:`-coding-models`}),(0,I.jsx)(`span`,{className:L.logoTextHighlight,children:`_`})]})]}),(0,I.jsxs)(`span`,{className:L.version,children:[`v`,`0.5.23`]}),(0,I.jsx)(`button`,{className:L.hamburgerBtn,onClick:()=>S(e=>!e),"aria-label":`Navigation menu`,"aria-expanded":x,"aria-haspopup":`true`,children:(0,I.jsx)(Cr,{size:18,stroke:1.5})}),x&&(0,I.jsxs)(`div`,{className:L.mobileNav,role:`menu`,children:[Qr.map(e=>{let t=e.icon;return(0,I.jsxs)(`button`,{className:`${L.mobileNavItem} ${n===e.id?L.mobileNavActive:``}`,onClick:()=>w(e),role:`menuitem`,children:[(0,I.jsx)(t,{size:16,stroke:1.5}),(0,I.jsx)(`span`,{children:e.label})]},e.id)}),(0,I.jsx)(`div`,{className:L.mobileNavDivider}),$r.map(e=>{let t=e.icon;return(0,I.jsxs)(`button`,{className:L.mobileNavItem,onClick:()=>T(e),role:`menuitem`,children:[(0,I.jsx)(t,{size:16,stroke:1.5}),(0,I.jsx)(`span`,{children:e.label})]},e.id)})]}),(0,I.jsxs)(`nav`,{className:L.nav,"aria-label":`Primary`,children:[Qr.map(e=>{let t=e.icon,r=n===e.id;return(0,I.jsxs)(`button`,{className:`${L.navBtn} ${r?L.navBtnActive:``}`,onClick:()=>w(e),title:e.comingIn?`${e.label} — coming in ${e.comingIn}`:e.label,"aria-current":r?`page`:void 0,children:[(0,I.jsx)(t,{size:14,stroke:1.5}),(0,I.jsx)(`span`,{children:e.label}),e.comingIn&&(0,I.jsx)(`span`,{className:L.comingBadge,children:e.comingIn})]},e.id)}),(0,I.jsxs)(`div`,{className:L.menuWrap,ref:C,children:[(0,I.jsx)(`button`,{className:`${L.navBtn} ${L.menuTrigger}`,onClick:()=>b(e=>!e),title:`More features`,"aria-label":`More features`,"aria-haspopup":`true`,"aria-expanded":y,children:(0,I.jsx)(ir,{size:16,stroke:1.5})}),y&&(0,I.jsx)(`div`,{className:L.menuPopover,role:`menu`,children:$r.map(e=>{let t=e.icon;return(0,I.jsxs)(`button`,{className:L.menuItem,onClick:()=>T(e),role:`menuitem`,children:[(0,I.jsx)(t,{size:14,stroke:1.5}),(0,I.jsx)(`span`,{children:e.label}),e.comingIn&&(0,I.jsx)(`span`,{className:L.comingBadge,children:e.comingIn})]},e.id)})})]})]})]}),(0,I.jsx)(`div`,{className:L.center,children:(0,I.jsxs)(`div`,{className:L.searchBar,children:[(0,I.jsx)(`span`,{className:L.searchIcon,children:(0,I.jsx)(Pr,{size:16,stroke:1.5})}),(0,I.jsx)(`input`,{type:`text`,className:L.searchInput,placeholder:`Search models, providers, tiers...`,value:e,onChange:e=>t(e.target.value),autoComplete:`off`})]})}),(0,I.jsxs)(`div`,{className:L.right,children:[(0,I.jsx)(Zr,{toolMode:m,onSetToolMode:h,onCycleToolMode:g}),(0,I.jsxs)(`button`,{className:L.cmdkBtn,onClick:o,title:`Command palette (⌘K / Ctrl+P)`,"aria-label":`Open command palette (⌘K)`,children:[(0,I.jsx)(nr,{size:14,stroke:1.5}),(0,I.jsx)(`span`,{className:L.cmdkLabel,children:`⌘K`})]}),(0,I.jsxs)(`button`,{className:`${L.benchmarkBtn} ${c?L.benchmarkActive:``}`,onClick:s,disabled:c,title:c?`AI Speed Test running — ${u}/${l}`:`Run AI Latency benchmark on ${d} visible models`,"aria-label":c?`AI Speed Test running — ${u} of ${l} complete`:`AI Latency benchmark`,children:[(0,I.jsx)(Er,{size:14,stroke:1.5}),c?(0,I.jsxs)(`span`,{className:L.benchmarkRunning,children:[(0,I.jsx)(`span`,{className:L.spinner}),`RUN `,u,`/`,l]}):(0,I.jsx)(`span`,{children:`AI Latency`})]}),_,(0,I.jsx)(`button`,{className:L.iconBtn,onClick:i,title:`Theme: ${f} (click to cycle auto / dark / light)`,"aria-label":`Theme: ${f}. Click to cycle.`,children:f===`light`?(0,I.jsx)(Tr,{size:16,stroke:1.5}):(0,I.jsx)(zr,{size:16,stroke:1.5})}),(0,I.jsx)(`button`,{className:L.iconBtn,onClick:a,title:`Export Data`,"aria-label":`Export model data`,children:(0,I.jsx)(ar,{size:16,stroke:1.5})})]})]})}var ti={footer:`_footer_1uw54_1`,left:`_left_1uw54_8`,right:`_right_1uw54_8`};function ni(){return(0,I.jsxs)(`footer`,{className:ti.footer,children:[(0,I.jsxs)(`div`,{className:ti.left,children:[`by `,(0,I.jsx)(`a`,{href:`https://vavanessa.dev`,target:`_blank`,rel:`noopener`,children:`Vava-Nessa`})]}),(0,I.jsxs)(`div`,{className:ti.right,children:[(0,I.jsx)(`a`,{href:`https://github.com/vava-nessa/free-coding-models`,target:`_blank`,rel:`noopener`,children:`GitHub`}),(0,I.jsx)(`a`,{href:`https://discord.gg/ZTNFHvvCkU`,target:`_blank`,rel:`noopener`,children:`Discord`})]})]})}var ri=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 181 24" xmlns="http://www.w3.org/2000/svg"><title>Google AI Studio</title><path d="M172.721 19.07c-1.172 0-2.221-.266-3.149-.798a5.779 5.779 0 01-2.169-2.237c-.517-.943-.775-1.993-.775-3.15 0-1.155.258-2.205.775-3.149a5.619 5.619 0 012.169-2.213c.928-.548 1.977-.822 3.149-.822 1.171 0 2.221.274 3.149.822a5.777 5.777 0 012.168 2.236c.518.944.776 1.986.776 3.127 0 1.156-.258 2.206-.776 3.15a5.776 5.776 0 01-2.168 2.236c-.928.532-1.978.799-3.149.799zm0-2.304c.639 0 1.232-.153 1.78-.457.548-.32.981-.768 1.301-1.346.335-.594.502-1.286.502-2.077 0-.791-.167-1.476-.502-2.054a3.304 3.304 0 00-1.301-1.324 3.472 3.472 0 00-1.78-.479c-.639 0-1.232.16-1.78.48a3.458 3.458 0 00-1.324 1.323c-.319.578-.479 1.263-.479 2.054 0 .791.16 1.483.479 2.077a3.629 3.629 0 001.324 1.346 3.606 3.606 0 001.78.457zM162.999 5.378a1.69 1.69 0 01-1.21-.48 1.69 1.69 0 01-.479-1.21c0-.47.16-.866.479-1.186a1.65 1.65 0 011.21-.502c.471 0 .867.167 1.186.502.335.32.503.715.503 1.187 0 .471-.168.875-.503 1.21a1.61 1.61 0 01-1.186.479zm-1.255 1.688h2.51v11.64h-2.51V7.066zM152.429 19.07c-1.05 0-2.001-.266-2.853-.798-.852-.533-1.529-1.263-2.031-2.191-.487-.944-.73-2.008-.73-3.195 0-1.187.243-2.244.73-3.172.502-.944 1.179-1.682 2.031-2.214.852-.533 1.803-.799 2.853-.799.821 0 1.559.183 2.213.548.655.365 1.149.814 1.484 1.346h.114l-.114-1.643V2.365h2.51v16.34h-2.396V17.2h-.114c-.335.517-.829.959-1.484 1.324-.654.365-1.392.547-2.213.547zm.365-2.305c.608 0 1.171-.16 1.689-.479.532-.32.958-.776 1.278-1.37.319-.592.479-1.27.479-2.03 0-.76-.16-1.43-.479-2.008-.32-.594-.746-1.05-1.278-1.37a3.158 3.158 0 00-1.689-.48c-.609 0-1.179.16-1.712.48-.532.32-.958.776-1.278 1.37-.319.578-.479 1.247-.479 2.008 0 .76.16 1.438.479 2.03.32.594.746 1.05 1.278 1.37.533.32 1.103.48 1.712.48zM138.527 19.07c-1.415 0-2.495-.418-3.241-1.255-.73-.852-1.095-2.03-1.095-3.537V7.066h2.51v6.87c0 .943.221 1.65.662 2.122.456.472 1.05.707 1.78.707.593 0 1.118-.152 1.575-.456.456-.32.806-.738 1.049-1.255a3.856 3.856 0 00.366-1.666V7.066h2.51v11.64h-2.373v-1.507h-.137c-.32.548-.814.997-1.484 1.346a4.517 4.517 0 01-2.122.525zM130.115 18.888a4.208 4.208 0 01-1.461-.251c-.457-.167-.829-.388-1.118-.662-.655-.654-.982-1.544-.982-2.67V9.28h-2.031V7.066h2.031V3.78h2.511v3.286h2.83V9.28h-2.83v5.477c0 .624.121 1.065.365 1.324.228.304.624.456 1.187.456.258 0 .486-.03.684-.09.198-.077.411-.191.639-.343v2.442c-.502.228-1.11.342-1.825.342zM117.888 19.07a6.03 6.03 0 01-3.652-1.186c-1.08-.791-1.825-1.902-2.236-3.332l2.419-.981c.243.897.669 1.635 1.278 2.213.624.563 1.369.845 2.236.845.807 0 1.491-.206 2.054-.617.563-.426.845-1.004.845-1.734 0-.67-.251-1.217-.753-1.643-.487-.441-1.347-.883-2.579-1.324l-1.027-.365c-1.096-.38-2.016-.928-2.762-1.643-.745-.715-1.118-1.658-1.118-2.83 0-.806.221-1.552.662-2.236.441-.685 1.05-1.225 1.826-1.62.791-.412 1.681-.617 2.67-.617 1.43 0 2.571.35 3.423 1.05.852.684 1.423 1.46 1.712 2.328l-2.305.981c-.168-.517-.487-.974-.959-1.37-.471-.395-1.08-.593-1.826-.593-.745 0-1.376.19-1.894.57-.502.381-.753.868-.753 1.461 0 .563.228 1.027.685 1.393.456.365 1.171.715 2.145 1.05l1.027.342c1.4.487 2.48 1.126 3.241 1.917.776.776 1.164 1.818 1.164 3.126 0 1.065-.274 1.963-.822 2.693a4.978 4.978 0 01-2.1 1.598 6.677 6.677 0 01-2.601.525zM102.221 2.365h2.556v16.34h-2.556V2.365zM90.94 2.365h2.922L100 18.705h-2.83l-1.46-4.176h-6.596l-1.484 4.176h-2.83l6.14-16.34zm3.903 9.79l-1.734-4.86-.64-1.895h-.136l-.64 1.894-1.734 4.862h4.884zM73.43 19.07c-1.141 0-2.168-.266-3.081-.798a5.758 5.758 0 01-2.123-2.191c-.502-.943-.753-2-.753-3.172 0-1.111.244-2.138.73-3.081a5.898 5.898 0 012.078-2.282c.882-.563 1.886-.845 3.012-.845 1.171 0 2.183.259 3.035.776A4.985 4.985 0 0178.291 9.6c.456.897.684 1.909.684 3.035 0 .213-.022.48-.068.799h-8.923c.091 1.08.471 1.917 1.14 2.51a3.57 3.57 0 002.374.867c.715 0 1.332-.16 1.849-.48a3.745 3.745 0 001.278-1.345l2.122 1.004c-.547.958-1.263 1.711-2.145 2.259-.882.548-1.94.822-3.172.822zm2.99-7.553a2.82 2.82 0 00-.389-1.21c-.228-.41-.578-.753-1.05-1.027-.456-.274-1.019-.41-1.688-.41-.806 0-1.491.243-2.054.73-.548.471-.928 1.11-1.141 1.917h6.322zM62.763 2.365h2.51v16.34h-2.51V2.365zM54.016 24c-1.43 0-2.616-.327-3.56-.981-.928-.654-1.552-1.43-1.871-2.328l2.35-.981a3.148 3.148 0 001.164 1.46c.548.38 1.187.57 1.917.57 1.065 0 1.895-.319 2.488-.958.609-.624.913-1.506.913-2.647v-1.073h-.137c-.38.548-.89.982-1.53 1.301-.623.304-1.346.457-2.167.457a5.185 5.185 0 01-2.716-.754c-.837-.502-1.506-1.21-2.008-2.122-.487-.928-.73-1.986-.73-3.172 0-1.187.243-2.237.73-3.15.502-.928 1.171-1.643 2.008-2.145a5.07 5.07 0 012.716-.776c.806 0 1.529.16 2.168.48.639.319 1.149.753 1.529 1.3h.137V7.066h2.396v11c0 1.263-.243 2.336-.73 3.218a4.81 4.81 0 01-2.054 2.031c-.867.457-1.872.685-3.013.685zm.023-7.463c.609 0 1.172-.144 1.69-.433a3.281 3.281 0 001.231-1.301c.305-.578.457-1.255.457-2.031 0-1.187-.327-2.107-.982-2.762-.639-.67-1.437-1.004-2.396-1.004-.623 0-1.194.152-1.711.457-.518.289-.928.715-1.233 1.278-.304.563-.456 1.24-.456 2.03 0 .792.152 1.469.456 2.032a3.28 3.28 0 001.233 1.3c.517.29 1.087.434 1.711.434zM40.36 19.07c-1.172 0-2.222-.266-3.15-.798a5.778 5.778 0 01-2.168-2.237c-.517-.943-.776-1.993-.776-3.15 0-1.155.259-2.205.776-3.149a5.618 5.618 0 012.168-2.213c.928-.548 1.978-.822 3.15-.822 1.17 0 2.22.274 3.149.822a5.778 5.778 0 012.168 2.236c.517.944.776 1.986.776 3.127 0 1.156-.259 2.206-.776 3.15a5.778 5.778 0 01-2.168 2.236c-.928.532-1.978.799-3.15.799zm0-2.304c.638 0 1.232-.153 1.78-.457.547-.32.98-.768 1.3-1.346.335-.594.502-1.286.502-2.077 0-.791-.167-1.476-.502-2.054a3.303 3.303 0 00-1.3-1.324 3.472 3.472 0 00-1.78-.479c-.64 0-1.233.16-1.78.48a3.458 3.458 0 00-1.324 1.323c-.32.578-.48 1.263-.48 2.054 0 .791.16 1.483.48 2.077a3.629 3.629 0 001.323 1.346 3.606 3.606 0 001.78.457zM26.497 19.07c-1.172 0-2.221-.266-3.15-.798a5.778 5.778 0 01-2.168-2.237c-.517-.943-.775-1.993-.775-3.15 0-1.155.258-2.205.776-3.149a5.618 5.618 0 012.168-2.213c.928-.548 1.977-.822 3.149-.822s2.221.274 3.15.822a5.779 5.779 0 012.167 2.236c.518.944.776 1.986.776 3.127 0 1.156-.258 2.206-.776 3.15a5.778 5.778 0 01-2.168 2.236c-.928.532-1.977.799-3.149.799zm0-2.304c.639 0 1.232-.153 1.78-.457.548-.32.981-.768 1.3-1.346.336-.594.503-1.286.503-2.077 0-.791-.167-1.476-.502-2.054a3.303 3.303 0 00-1.3-1.324 3.472 3.472 0 00-1.781-.479c-.639 0-1.232.16-1.78.48a3.456 3.456 0 00-1.324 1.323c-.32.578-.479 1.263-.479 2.054 0 .791.16 1.483.48 2.077a3.627 3.627 0 001.323 1.346 3.606 3.606 0 001.78.457zM10.558 19.07c-1.552 0-2.982-.372-4.29-1.118a8.49 8.49 0 01-3.127-3.058C2.381 13.586 2 12.133 2 10.535c0-1.597.38-3.043 1.141-4.336a8.435 8.435 0 013.127-3.08C7.576 2.372 9.006 2 10.558 2c1.232 0 2.381.22 3.446.662 1.065.441 1.955 1.057 2.67 1.848l-1.78 1.78a5.401 5.401 0 00-1.917-1.369c-.73-.32-1.544-.48-2.442-.48-1.05 0-2.03.252-2.944.754a5.702 5.702 0 00-2.19 2.145c-.548.928-.822 1.993-.822 3.195 0 1.202.274 2.267.821 3.195a5.702 5.702 0 002.191 2.146 6.057 6.057 0 002.967.753c.974 0 1.788-.145 2.442-.434a6.2 6.2 0 001.757-1.164c.335-.335.617-.753.845-1.255.243-.502.403-1.05.479-1.643h-5.546V9.85H18.5c.076.426.114.867.114 1.323 0 1.035-.16 2.032-.479 2.99a6.294 6.294 0 01-1.53 2.465c-1.536 1.628-3.552 2.442-6.047 2.442z"></path></svg>`,ii=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Google AI Studio</title><path d="M9.921 4.196H6.328A2.705 2.705 0 003.623 6.9v11.362a2.705 2.705 0 002.705 2.705h11.363a2.705 2.705 0 002.705-2.705v-4.756l1.623-1.113v5.87a4.329 4.329 0 01-4.328 4.328H6.328A4.329 4.329 0 012 18.263V6.901a4.328 4.328 0 014.328-4.329h4.545l-.952 1.624z"></path><path d="M17.82 0c.145 0 .268.104.299.246a7 7 0 001.9 3.484 7 7 0 003.485 1.901c.142.031.246.154.246.3a.308.308 0 01-.246.298A7 7 0 0020.02 8.13a7 7 0 00-1.912 3.535.297.297 0 01-.288.238.297.297 0 01-.288-.238A7 7 0 0015.62 8.13a7 7 0 00-3.535-1.912.297.297 0 01-.238-.288c0-.14.1-.26.238-.288A7 7 0 0015.62 3.73 7.001 7.001 0 0017.521.246.308.308 0 0117.82 0z"></path></svg>`,ai=`<svg fill="currentColor" height="1em" style="flex:none;line-height:1" viewBox="0 0 53 24" xmlns="http://www.w3.org/2000/svg"><title>Cerebras</title><path clip-rule="evenodd" d="M13 2.701A9.299 9.299 0 0013 21.3V22.7C7.09 22.701 2.299 17.91 2.299 12S7.09 1.299 13 1.299V2.7zm4.752 3.677a7.353 7.353 0 00-9.453 11.265l-.901 1.074A8.755 8.755 0 1118.652 5.304l-.901 1.074zm-2.256.844a5.407 5.407 0 00-5.049 9.563l-.654 1.24a6.81 6.81 0 016.358-12.043l-.655 1.24zM13 8.539a3.461 3.461 0 000 6.922v1.402a4.863 4.863 0 010-9.726v1.402z" fill="#F15A29" fill-rule="evenodd"></path><path d="M14.286 10.836a2.242 2.242 0 00-.51-.409 1.085 1.085 0 00-.545-.152c-.254 0-.482.047-.683.14a1.582 1.582 0 00-.841.912 1.848 1.848 0 000 1.262 1.595 1.595 0 00.841.913c.2.093.429.14.683.14.217 0 .418-.046.603-.135.187-.09.35-.225.475-.392l.927 1.006c-.139.14-.3.261-.481.363a3.367 3.367 0 01-1.083.38c-.17.026-.317.04-.44.04a3.316 3.316 0 01-1.182-.21 2.826 2.826 0 01-.962-.597 2.813 2.813 0 01-.643-.929 2.986 2.986 0 01-.238-1.21c0-.444.08-.847.238-1.21.15-.35.368-.666.643-.929.277-.261.604-.464.962-.596a3.316 3.316 0 011.181-.21c.355 0 .713.068 1.072.204.362.138.686.36.945.649l-.962.97z"></path><path d="M19.338 11.397c-.008-.414-.136-.738-.383-.976-.247-.237-.59-.356-1.03-.356-.418 0-.749.12-.991.362-.244.242-.393.565-.447.97h2.85zm-2.85 1.052c.045.42.208.748.486.982.278.234.614.351 1.008.351.348 0 .639-.072.875-.217a2.42 2.42 0 00.62-.543l.997.76c-.325.405-.689.694-1.09.865a3.32 3.32 0 01-2.445.047 2.821 2.821 0 01-.962-.597 2.829 2.829 0 01-.643-.929 2.992 2.992 0 01-.237-1.21c0-.444.079-.847.238-1.21.15-.35.368-.666.642-.929.278-.261.605-.464.962-.596a3.32 3.32 0 011.182-.21c.386 0 .74.067 1.06.204.32.136.595.333.823.59.228.258.405.575.533.953.128.379.19.812.19 1.303v.386h-4.24zm4.843-3.296h1.39v.888h.023c.155-.327.375-.58.661-.76a1.812 1.812 0 011.234-.246c.081.016.164.036.25.06v1.355a3.912 3.912 0 00-.343-.076c-.109-.02-.22-.03-.33-.03-.324 0-.585.06-.782.182a1.38 1.38 0 00-.66.883 1.76 1.76 0 00-.053.35v3.005h-1.39V9.152zm7.797 2.244c-.008-.414-.135-.738-.383-.976-.246-.237-.59-.356-1.03-.356-.417 0-.748.12-.99.362-.245.242-.393.565-.447.97h2.85zm-2.85 1.052c.046.42.208.748.487.982.277.234.613.351 1.007.351.348 0 .64-.072.875-.217.236-.144.446-.328.62-.543l.997.76c-.325.405-.688.694-1.09.865a3.319 3.319 0 01-2.445.047 2.823 2.823 0 01-.961-.597 2.829 2.829 0 01-.643-.929 2.984 2.984 0 01-.238-1.21c0-.444.08-.847.238-1.21.158-.362.373-.672.643-.929a2.84 2.84 0 01.962-.596 3.318 3.318 0 011.181-.21c.387 0 .74.067 1.06.204.321.136.596.333.823.59.228.258.406.575.533.953.128.379.192.812.192 1.303v.386h-4.241zm9.225-.49a1.84 1.84 0 00-.11-.632 1.603 1.603 0 00-.84-.912 1.607 1.607 0 00-.684-.14 1.587 1.587 0 00-1.524 1.052 1.83 1.83 0 00-.11.631c0 .218.036.429.11.632a1.583 1.583 0 001.524 1.052 1.591 1.591 0 001.524-1.052c.073-.203.11-.414.11-.632zM30.89 5.925h1.391v3.94h.035a1.99 1.99 0 01.266-.287 2.327 2.327 0 01.927-.485c.201-.054.433-.081.696-.081a2.55 2.55 0 011.94.853c.236.264.42.577.55.935.132.358.198.744.198 1.157 0 .413-.062.8-.186 1.158a2.673 2.673 0 01-.544.935c-.243.267-.539.48-.869.625-.34.152-.723.229-1.147.229a2.613 2.613 0 01-1.1-.235 1.785 1.785 0 01-.812-.748h-.023v.841H30.89V5.927zm6.604 3.227h1.39v.888h.023c.155-.327.376-.58.661-.76a1.815 1.815 0 011.234-.246c.081.016.164.036.25.06v1.355a3.893 3.893 0 00-.343-.076c-.109-.02-.22-.03-.33-.03-.325 0-.585.06-.782.182a1.43 1.43 0 00-.452.415 1.39 1.39 0 00-.209.468 1.788 1.788 0 00-.051.35v3.005h-1.391V9.152zm7.207 3.097h-.29c-.193 0-.409.008-.649.024a3.384 3.384 0 00-.677.11c-.213.06-.393.146-.54.258a.564.564 0 00-.22.473c0 .133.03.244.087.333.058.09.134.166.226.229a.933.933 0 00.313.134c.117.027.232.04.348.04.48 0 .832-.114 1.06-.344.228-.23.342-.544.342-.94v-.317zm.082 1.743h-.036c-.2.32-.456.551-.764.695-.32.146-.668.22-1.02.216-.253 0-.504-.035-.748-.104a2.03 2.03 0 01-.649-.317 1.616 1.616 0 01-.457-.526 1.501 1.501 0 01-.174-.736c0-.305.054-.563.163-.777.103-.21.252-.393.434-.539a2.19 2.19 0 01.632-.344c.242-.087.492-.152.747-.193.258-.043.52-.07.782-.082.247-.011.495-.017.742-.018h.347v-.151c0-.351-.12-.614-.36-.79-.238-.175-.544-.262-.914-.262a2.129 2.129 0 00-1.483.585l-.73-.738a2.7 2.7 0 011.083-.69c.412-.14.845-.21 1.28-.21.394 0 .726.046.997.135.27.09.494.205.672.345.177.14.314.302.411.485.096.183.166.368.21.555.041.187.066.368.074.544.008.175.012.33.012.461v3.227h-1.252v-.771zm5.018-3.286c-.27-.382-.634-.573-1.09-.573a1.16 1.16 0 00-.544.14.478.478 0 00-.266.456c0 .172.073.297.22.375.147.078.332.144.556.198.224.055.465.111.724.17.259.058.5.148.724.268.224.122.41.287.556.498.147.21.22.498.22.864 0 .336-.071.619-.214.848-.139.226-.33.417-.556.556a2.456 2.456 0 01-.77.303c-.282.062-.57.094-.858.094-.432 0-.83-.062-1.194-.187a2.27 2.27 0 01-.973-.678l.928-.877c.177.203.368.368.573.497.204.129.454.193.747.193.101 0 .205-.012.313-.035a.992.992 0 00.301-.117.71.71 0 00.226-.204.482.482 0 00.087-.287c0-.194-.073-.34-.22-.432a1.966 1.966 0 00-.556-.229c-.24-.062-.481-.116-.724-.164a2.794 2.794 0 01-.725-.245 1.523 1.523 0 01-.556-.473c-.146-.203-.22-.483-.22-.841 0-.312.064-.583.191-.813a1.69 1.69 0 01.504-.567c.217-.152.461-.263.719-.327a3.256 3.256 0 011.923.087c.356.123.664.354.881.66l-.927.842z"></path></svg>`,oi=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 53 24" xmlns="http://www.w3.org/2000/svg"><title>Cerebras</title><path clip-rule="evenodd" d="M13 2.701A9.299 9.299 0 0013 21.3V22.7C7.09 22.701 2.299 17.91 2.299 12S7.09 1.299 13 1.299V2.7zm4.752 3.677a7.353 7.353 0 00-9.453 11.265l-.901 1.074A8.755 8.755 0 1118.652 5.304l-.901 1.074zm-2.256.844a5.407 5.407 0 00-5.049 9.563l-.654 1.24a6.81 6.81 0 016.358-12.043l-.655 1.24zM13 8.539a3.461 3.461 0 000 6.922v1.402a4.863 4.863 0 010-9.726v1.402z"></path><path d="M14.286 10.836a2.242 2.242 0 00-.51-.409 1.085 1.085 0 00-.545-.152c-.254 0-.482.047-.683.14a1.582 1.582 0 00-.841.912 1.848 1.848 0 000 1.262 1.595 1.595 0 00.841.913c.2.093.429.14.683.14.217 0 .418-.046.603-.135.187-.09.35-.225.475-.392l.927 1.006c-.139.14-.3.261-.481.363a3.367 3.367 0 01-1.083.38c-.17.026-.317.04-.44.04a3.316 3.316 0 01-1.182-.21 2.826 2.826 0 01-.962-.597 2.813 2.813 0 01-.643-.929 2.986 2.986 0 01-.238-1.21c0-.444.08-.847.238-1.21.15-.35.368-.666.643-.929.277-.261.604-.464.962-.596a3.316 3.316 0 011.181-.21c.355 0 .713.068 1.072.204.362.138.686.36.945.649l-.962.97z"></path><path d="M19.338 11.397c-.008-.414-.136-.738-.383-.976-.247-.237-.59-.356-1.03-.356-.418 0-.749.12-.991.362-.244.242-.393.565-.447.97h2.85zm-2.85 1.052c.045.42.208.748.486.982.278.234.614.351 1.008.351.348 0 .639-.072.875-.217a2.42 2.42 0 00.62-.543l.997.76c-.325.405-.689.694-1.09.865a3.32 3.32 0 01-2.445.047 2.821 2.821 0 01-.962-.597 2.829 2.829 0 01-.643-.929 2.992 2.992 0 01-.237-1.21c0-.444.079-.847.238-1.21.15-.35.368-.666.642-.929.278-.261.605-.464.962-.596a3.32 3.32 0 011.182-.21c.386 0 .74.067 1.06.204.32.136.595.333.823.59.228.258.405.575.533.953.128.379.19.812.19 1.303v.386h-4.24zm4.843-3.296h1.39v.888h.023c.155-.327.375-.58.661-.76a1.812 1.812 0 011.234-.246c.081.016.164.036.25.06v1.355a3.912 3.912 0 00-.343-.076c-.109-.02-.22-.03-.33-.03-.324 0-.585.06-.782.182a1.38 1.38 0 00-.66.883 1.76 1.76 0 00-.053.35v3.005h-1.39V9.152zm7.797 2.244c-.008-.414-.135-.738-.383-.976-.246-.237-.59-.356-1.03-.356-.417 0-.748.12-.99.362-.245.242-.393.565-.447.97h2.85zm-2.85 1.052c.046.42.208.748.487.982.277.234.613.351 1.007.351.348 0 .64-.072.875-.217.236-.144.446-.328.62-.543l.997.76c-.325.405-.688.694-1.09.865a3.319 3.319 0 01-2.445.047 2.823 2.823 0 01-.961-.597 2.829 2.829 0 01-.643-.929 2.984 2.984 0 01-.238-1.21c0-.444.08-.847.238-1.21.158-.362.373-.672.643-.929a2.84 2.84 0 01.962-.596 3.318 3.318 0 011.181-.21c.387 0 .74.067 1.06.204.321.136.596.333.823.59.228.258.406.575.533.953.128.379.192.812.192 1.303v.386h-4.241zm9.225-.49a1.84 1.84 0 00-.11-.632 1.603 1.603 0 00-.84-.912 1.607 1.607 0 00-.684-.14 1.587 1.587 0 00-1.524 1.052 1.83 1.83 0 00-.11.631c0 .218.036.429.11.632a1.583 1.583 0 001.524 1.052 1.591 1.591 0 001.524-1.052c.073-.203.11-.414.11-.632zM30.89 5.925h1.391v3.94h.035a1.99 1.99 0 01.266-.287 2.327 2.327 0 01.927-.485c.201-.054.433-.081.696-.081a2.55 2.55 0 011.94.853c.236.264.42.577.55.935.132.358.198.744.198 1.157 0 .413-.062.8-.186 1.158a2.673 2.673 0 01-.544.935c-.243.267-.539.48-.869.625-.34.152-.723.229-1.147.229a2.613 2.613 0 01-1.1-.235 1.785 1.785 0 01-.812-.748h-.023v.841H30.89V5.927zm6.604 3.227h1.39v.888h.023c.155-.327.376-.58.661-.76a1.815 1.815 0 011.234-.246c.081.016.164.036.25.06v1.355a3.893 3.893 0 00-.343-.076c-.109-.02-.22-.03-.33-.03-.325 0-.585.06-.782.182a1.43 1.43 0 00-.452.415 1.39 1.39 0 00-.209.468 1.788 1.788 0 00-.051.35v3.005h-1.391V9.152zm7.207 3.097h-.29c-.193 0-.409.008-.649.024a3.384 3.384 0 00-.677.11c-.213.06-.393.146-.54.258a.564.564 0 00-.22.473c0 .133.03.244.087.333.058.09.134.166.226.229a.933.933 0 00.313.134c.117.027.232.04.348.04.48 0 .832-.114 1.06-.344.228-.23.342-.544.342-.94v-.317zm.082 1.743h-.036c-.2.32-.456.551-.764.695-.32.146-.668.22-1.02.216-.253 0-.504-.035-.748-.104a2.03 2.03 0 01-.649-.317 1.616 1.616 0 01-.457-.526 1.501 1.501 0 01-.174-.736c0-.305.054-.563.163-.777.103-.21.252-.393.434-.539a2.19 2.19 0 01.632-.344c.242-.087.492-.152.747-.193.258-.043.52-.07.782-.082.247-.011.495-.017.742-.018h.347v-.151c0-.351-.12-.614-.36-.79-.238-.175-.544-.262-.914-.262a2.129 2.129 0 00-1.483.585l-.73-.738a2.7 2.7 0 011.083-.69c.412-.14.845-.21 1.28-.21.394 0 .726.046.997.135.27.09.494.205.672.345.177.14.314.302.411.485.096.183.166.368.21.555.041.187.066.368.074.544.008.175.012.33.012.461v3.227h-1.252v-.771zm5.018-3.286c-.27-.382-.634-.573-1.09-.573a1.16 1.16 0 00-.544.14.478.478 0 00-.266.456c0 .172.073.297.22.375.147.078.332.144.556.198.224.055.465.111.724.17.259.058.5.148.724.268.224.122.41.287.556.498.147.21.22.498.22.864 0 .336-.071.619-.214.848-.139.226-.33.417-.556.556a2.456 2.456 0 01-.77.303c-.282.062-.57.094-.858.094-.432 0-.83-.062-1.194-.187a2.27 2.27 0 01-.973-.678l.928-.877c.177.203.368.368.573.497.204.129.454.193.747.193.101 0 .205-.012.313-.035a.992.992 0 00.301-.117.71.71 0 00.226-.204.482.482 0 00.087-.287c0-.194-.073-.34-.22-.432a1.966 1.966 0 00-.556-.229c-.24-.062-.481-.116-.724-.164a2.794 2.794 0 01-.725-.245 1.523 1.523 0 01-.556-.473c-.146-.203-.22-.483-.22-.841 0-.312.064-.583.191-.813a1.69 1.69 0 01.504-.567c.217-.152.461-.263.719-.327a3.256 3.256 0 011.923.087c.356.123.664.354.881.66l-.927.842z"></path></svg>`,si=`<svg fill="currentColor" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Cerebras</title><path clip-rule="evenodd" d="M14.121 2.701a9.299 9.299 0 000 18.598V22.7c-5.91 0-10.7-4.791-10.7-10.701S8.21 1.299 14.12 1.299V2.7zm4.752 3.677A7.353 7.353 0 109.42 17.643l-.901 1.074a8.754 8.754 0 01-1.08-12.334 8.755 8.755 0 0112.335-1.08l-.901 1.075zm-2.255.844a5.407 5.407 0 00-5.048 9.563l-.656 1.24a6.81 6.81 0 016.358-12.043l-.654 1.24zM14.12 8.539a3.46 3.46 0 100 6.922v1.402a4.863 4.863 0 010-9.726v1.402z" fill="#F15A29" fill-rule="evenodd"></path><path d="M15.407 10.836a2.24 2.24 0 00-.51-.409 1.084 1.084 0 00-.544-.152c-.255 0-.483.047-.684.14a1.58 1.58 0 00-.84.912c-.074.203-.11.416-.11.631 0 .218.036.43.11.631a1.594 1.594 0 00.84.913c.2.093.43.14.684.14.216 0 .417-.046.602-.135.188-.09.35-.225.475-.392l.928 1.006c-.14.14-.3.261-.482.363a3.367 3.367 0 01-1.083.38c-.17.026-.317.04-.44.04a3.315 3.315 0 01-1.182-.21 2.825 2.825 0 01-.961-.597 2.816 2.816 0 01-.644-.929 2.987 2.987 0 01-.238-1.21c0-.444.08-.847.238-1.21.15-.35.368-.666.643-.929.278-.261.605-.464.962-.596a3.315 3.315 0 011.182-.21c.355 0 .712.068 1.072.204.361.138.685.36.944.649l-.962.97z"></path></svg>`,ci=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 95 24" xmlns="http://www.w3.org/2000/svg"><title>Cerebras</title><path clip-rule="evenodd" d="M17.075 16.717c-.62-.52-.982-1.25-1.085-2.187l9.446.001v-.86c0-1.094-.14-2.06-.425-2.904-.283-.842-.68-1.549-1.188-2.12a5.049 5.049 0 00-1.832-1.317c-.713-.304-1.5-.456-2.361-.456a7.396 7.396 0 00-2.633.469 6.325 6.325 0 00-2.143 1.328 6.309 6.309 0 00-1.431 2.07c-.354.808-.53 1.706-.53 2.696 0 .99.176 1.888.529 2.695.333.78.82 1.483 1.432 2.07a6.288 6.288 0 002.142 1.328 7.396 7.396 0 002.633.469 7.101 7.101 0 002.814-.573c.894-.381 1.704-1.025 2.427-1.926l-2.22-1.693c-.388.48-.855.888-1.381 1.21-.526.322-1.175.483-1.95.483-.877 0-1.625-.261-2.244-.783zm4.413-6.705c.55.53.836 1.254.852 2.175h-6.35c.12-.903.452-1.623.995-2.162.54-.537 1.278-.807 2.207-.807.98 0 1.745.266 2.296.794z"></path><path d="M29.878 7.187H26.78v12.499h3.098v-6.693c0-.172.038-.433.116-.78.077-.348.232-.694.465-1.043.233-.346.568-.654 1.006-.923.44-.27 1.02-.405 1.742-.405.247 0 .493.023.736.066.256.045.51.101.761.169v-3.02a7.03 7.03 0 00-.554-.131 2.962 2.962 0 00-.555-.05c-.827 0-1.559.198-2.194.597-.636.4-1.129.964-1.473 1.693h-.05V7.187z"></path><path clip-rule="evenodd" d="M37.8 14.531c.102.937.465 1.666 1.084 2.186.619.522 1.367.783 2.245.783.775 0 1.424-.161 1.95-.483.525-.322.992-.73 1.38-1.21l2.22 1.693c-.722.901-1.532 1.545-2.426 1.926-.89.38-1.848.576-2.815.573a7.39 7.39 0 01-2.632-.469 6.287 6.287 0 01-2.142-1.328 6.302 6.302 0 01-1.432-2.07c-.353-.807-.53-1.705-.53-2.696 0-.989.177-1.887.53-2.695a6.3 6.3 0 011.432-2.07 6.325 6.325 0 012.142-1.328 7.39 7.39 0 012.633-.469c.86 0 1.648.152 2.361.456a5.05 5.05 0 011.833 1.316c.507.572.904 1.279 1.188 2.121.285.844.426 1.81.426 2.903v.861H37.8zm5.497-4.519c.55.53.834 1.254.852 2.175H37.8c.121-.903.452-1.623.995-2.162.54-.537 1.278-.807 2.207-.807.98 0 1.746.266 2.296.794zM51.173 0h-3.098v19.686h2.944V17.81h.051c.447.765 1.048 1.32 1.808 1.667.77.35 1.606.528 2.45.522.947 0 1.8-.17 2.557-.509a5.714 5.714 0 001.935-1.393 5.954 5.954 0 001.213-2.082 7.835 7.835 0 00.413-2.58c0-.92-.146-1.778-.44-2.576a6.398 6.398 0 00-1.225-2.085 5.68 5.68 0 00-1.896-1.394 5.772 5.772 0 00-2.426-.506 5.93 5.93 0 00-1.55.182 5.18 5.18 0 00-1.187.47c-.344.19-.636.394-.878.61-.241.219-.439.43-.593.638h-.078V0zm6.931 12.031c.163.45.245.92.245 1.405 0 .487-.082.956-.246 1.407a3.545 3.545 0 01-1.87 2.03 3.574 3.574 0 01-1.524.314 3.525 3.525 0 01-3.394-2.343 4.098 4.098 0 01-.245-1.407c-.001-.48.081-.955.245-1.406A3.533 3.533 0 0153.186 10a3.584 3.584 0 011.523-.312c.568 0 1.076.104 1.523.312.434.2.825.482 1.15.833.317.349.557.746.722 1.2z"></path><path d="M65.882 7.187h-3.097v12.499h3.098v-6.693c0-.172.038-.433.115-.78.078-.348.233-.694.466-1.043.232-.346.567-.654 1.006-.923.439-.27 1.019-.405 1.742-.405.246 0 .492.023.735.066.257.045.512.101.763.169v-3.02a7.065 7.065 0 00-.556-.131 2.942 2.942 0 00-.554-.05c-.825 0-1.558.198-2.194.597-.636.4-1.128.964-1.473 1.693h-.051V7.187z"></path><path clip-rule="evenodd" d="M78.943 17.969h.079l-.002 1.718h2.788v-7.188c0-.294-.008-.638-.026-1.028a6.951 6.951 0 00-.166-1.21 5.142 5.142 0 00-.466-1.238 3.4 3.4 0 00-.916-1.08c-.397-.312-.895-.569-1.497-.77-.603-.198-1.343-.299-2.22-.299a8.83 8.83 0 00-2.853.469 6.012 6.012 0 00-2.413 1.536l1.626 1.642a4.743 4.743 0 013.304-1.303c.826 0 1.506.196 2.039.587.533.39.8.976.8 1.757v.338h-.773c-.551.001-1.103.014-1.654.039-.584.026-1.165.088-1.741.182a9.606 9.606 0 00-1.665.43 4.88 4.88 0 00-1.407.768 3.555 3.555 0 00-.967 1.199c-.241.478-.363 1.053-.363 1.731 0 .625.13 1.173.388 1.64.25.461.598.861 1.019 1.173.436.32.925.558 1.446.704a6.019 6.019 0 001.665.233 5.307 5.307 0 002.271-.481c.688-.321 1.257-.838 1.704-1.55zm-.749-3.881h.645v.703c0 .884-.254 1.584-.76 2.096-.51.513-1.295.768-2.362.768-.259 0-.516-.03-.775-.091a2.083 2.083 0 01-.698-.3 1.769 1.769 0 01-.503-.507c-.129-.2-.193-.447-.193-.742 0-.451.164-.803.49-1.055a3.465 3.465 0 011.202-.573 7.534 7.534 0 011.508-.247 22.752 22.752 0 011.446-.052z"></path><path d="M87.774 9.374c1.015 0 1.825.425 2.426 1.276l2.066-1.875a4.013 4.013 0 00-1.963-1.47 7.302 7.302 0 00-2.452-.43c-.618-.001-1.234.078-1.833.234a4.82 4.82 0 00-1.6.73c-.464.33-.839.75-1.123 1.262-.284.512-.425 1.116-.425 1.81 0 .798.163 1.424.49 1.876.322.446.747.807 1.239 1.052a6.22 6.22 0 001.614.547c.54.106 1.079.227 1.613.365.499.131.91.3 1.238.51.328.207.491.529.491.961 0 .245-.065.458-.194.64a1.578 1.578 0 01-.504.454c-.206.122-.429.21-.67.26a3.24 3.24 0 01-.697.079c-.654 0-1.21-.143-1.665-.428a5.852 5.852 0 01-1.277-1.11l-2.066 1.955c.637.729 1.36 1.232 2.168 1.51.81.278 1.696.417 2.66.417.642-.001 1.282-.07 1.91-.209a5.473 5.473 0 001.716-.676 3.78 3.78 0 001.238-1.238c.319-.51.477-1.14.477-1.888 0-.816-.163-1.458-.49-1.926a3.527 3.527 0 00-1.238-1.108 6.356 6.356 0 00-1.613-.598c-.577-.13-1.115-.256-1.614-.378-.5-.121-.911-.269-1.238-.442-.327-.173-.49-.452-.49-.834 0-.47.197-.806.593-1.016.396-.208.8-.312 1.213-.312zM9.95 10.026c.422.246.805.553 1.137.911l2.142-2.162a5.428 5.428 0 00-2.104-1.446 6.713 6.713 0 00-2.388-.455 7.386 7.386 0 00-2.632.468 6.316 6.316 0 00-2.142 1.329 6.266 6.266 0 00-1.432 2.07C2.177 11.55 2 12.449 2 13.437c0 .99.177 1.887.53 2.695.333.78.82 1.484 1.433 2.07a6.294 6.294 0 002.142 1.33 7.384 7.384 0 002.632.467c.276 0 .603-.03.982-.09a7.502 7.502 0 002.413-.846 4.813 4.813 0 001.072-.808l-2.066-2.24c-.278.37-.64.67-1.058.873-.413.198-.86.3-1.343.3-.567 0-1.075-.105-1.521-.312a3.553 3.553 0 01-1.873-2.032 4.107 4.107 0 01-.246-1.407c0-.48.082-.955.245-1.405a3.52 3.52 0 01.724-1.198c.32-.349.701-.625 1.15-.835.446-.207.954-.311 1.521-.311.428.003.846.12 1.214.339z"></path></svg>`,li=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Cerebras</title><path clip-rule="evenodd" d="M14.121 2.701a9.299 9.299 0 000 18.598V22.7c-5.91 0-10.7-4.791-10.7-10.701S8.21 1.299 14.12 1.299V2.7zm4.752 3.677A7.353 7.353 0 109.42 17.643l-.901 1.074a8.754 8.754 0 01-1.08-12.334 8.755 8.755 0 0112.335-1.08l-.901 1.075zm-2.255.844a5.407 5.407 0 00-5.048 9.563l-.656 1.24a6.81 6.81 0 016.358-12.043l-.654 1.24zM14.12 8.539a3.46 3.46 0 100 6.922v1.402a4.863 4.863 0 010-9.726v1.402z"></path><path d="M15.407 10.836a2.24 2.24 0 00-.51-.409 1.084 1.084 0 00-.544-.152c-.255 0-.483.047-.684.14a1.58 1.58 0 00-.84.912c-.074.203-.11.416-.11.631 0 .218.036.43.11.631a1.594 1.594 0 00.84.913c.2.093.43.14.684.14.216 0 .417-.046.602-.135.188-.09.35-.225.475-.392l.928 1.006c-.14.14-.3.261-.482.363a3.367 3.367 0 01-1.083.38c-.17.026-.317.04-.44.04a3.315 3.315 0 01-1.182-.21 2.825 2.825 0 01-.961-.597 2.816 2.816 0 01-.644-.929 2.987 2.987 0 01-.238-1.21c0-.444.08-.847.238-1.21.15-.35.368-.666.643-.929.278-.261.605-.464.962-.596a3.315 3.315 0 011.182-.21c.355 0 .712.068 1.072.204.361.138.685.36.944.649l-.962.97z"></path></svg>`,ui=`<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Cloudflare</title><path d="M16.493 17.4c.135-.52.08-.983-.161-1.338-.215-.328-.592-.519-1.05-.519l-8.663-.109a.148.148 0 01-.135-.082c-.027-.054-.027-.109-.027-.163.027-.082.108-.164.189-.164l8.744-.11c1.05-.054 2.153-.9 2.556-1.937l.511-1.31c.027-.055.027-.11.027-.164C17.92 8.91 15.66 7 12.942 7c-2.503 0-4.628 1.638-5.381 3.903a2.432 2.432 0 00-1.803-.491c-1.21.109-2.153 1.092-2.287 2.32-.027.328 0 .628.054.9C1.56 13.688 0 15.326 0 17.319c0 .19.027.355.027.545 0 .082.08.137.161.137h15.983c.08 0 .188-.055.215-.164l.107-.437" fill="#F38020"></path><path d="M19.238 11.75h-.242c-.054 0-.108.054-.135.109l-.35 1.2c-.134.52-.08.983.162 1.338.215.328.592.518 1.05.518l1.855.11c.054 0 .108.027.135.082.027.054.027.109.027.163-.027.082-.108.164-.188.164l-1.91.11c-1.05.054-2.153.9-2.557 1.937l-.134.355c-.027.055.026.137.107.137h6.592c.081 0 .162-.055.162-.137.107-.41.188-.846.188-1.31-.027-2.62-2.153-4.777-4.762-4.777" fill="#FCAD32"></path></svg>`,di=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 242 24" xmlns="http://www.w3.org/2000/svg"><title>Cloudflare</title><path d="M28.4 2.395h5.386v14.606h9.326v4.736H28.4V2.395zM16.71 14.369c-.787 1.71-2.363 2.894-4.465 2.894-2.89 0-4.86-2.368-4.86-5.263 0-2.764 1.97-5.132 4.86-5.132 2.232 0 3.81 1.316 4.597 3.158h5.647C21.571 5.421 17.5 2 12.377 2 6.467 2 2 6.474 2 12s4.335 10 10.377 10c5.122 0 9.062-3.289 10.112-7.763H16.71v.132zM224.37 2.395h15.499v4.606h-10.114v2.894h9.194v4.21h-9.194v3.027H240v4.605h-15.63V2.395zm-24.693 0h9.062c2.89 0 4.991.79 6.305 2.105 1.182 1.052 1.708 2.632 1.708 4.474 0 2.894-1.576 4.868-3.94 5.921l4.596 6.71h-6.174l-3.939-5.79h-2.365v5.79h-5.386V2.395h.133zm8.8 9.211c1.838 0 2.889-.921 2.889-2.238 0-1.579-1.05-2.237-2.89-2.237l-3.546.001v4.605h3.547v-.13zm-29.028-9.343h5.122l8.144 19.474h-5.78l-1.444-3.421h-7.486l-1.315 3.42h-5.516l8.275-19.473zm4.598 11.842l-2.103-5.526-2.232 5.526h4.335zm-33.232-11.71h5.386v14.606h9.325v4.736h-14.711V2.395zm-22.854 0h15.367v4.737h-9.981v3.158h9.062v4.474h-9.062v6.973h-5.386V2.395zm-26.007 0h7.488c6.829 0 10.9 3.947 10.9 9.473 0 5.526-4.071 9.737-11.032 9.737h-7.356V2.395zm7.488 14.606c3.151 0 5.253-1.712 5.253-4.87 0-3.025-2.102-4.868-5.253-4.868h-2.233v9.87h2.233V17zm-33.625-3.816V2.395H81.2v10.658c0 2.763 1.445 4.078 3.547 4.078 2.101 0 3.547-1.315 3.547-3.946V2.263h5.385v10.659c0 6.183-3.548 8.946-9.063 8.946-5.386.132-8.8-2.63-8.8-8.683zm-27.19-1.053C48.628 6.474 53.095 2 59.006 2c5.91 0 10.375 4.474 10.375 10s-4.465 10-10.375 10c-6.042 0-10.377-4.342-10.377-9.868zm15.237 0c0-2.896-1.97-5.264-4.99-5.264-2.891 0-4.861 2.368-4.861 5.132s1.97 5.263 4.86 5.263c3.02 0 4.99-2.368 4.99-5.131z"></path></svg>`,fi=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Cloudflare</title><path d="M16.493 17.4c.135-.52.08-.983-.161-1.338-.215-.328-.592-.519-1.05-.519l-8.663-.109a.148.148 0 01-.135-.082c-.027-.054-.027-.109-.027-.163.027-.082.108-.164.189-.164l8.744-.11c1.05-.054 2.153-.9 2.556-1.937l.511-1.31c.027-.055.027-.11.027-.164C17.92 8.91 15.66 7 12.942 7c-2.503 0-4.628 1.638-5.381 3.903a2.432 2.432 0 00-1.803-.491c-1.21.109-2.153 1.092-2.287 2.32-.027.328 0 .628.054.9C1.56 13.688 0 15.326 0 17.319c0 .19.027.355.027.545 0 .082.08.137.161.137h15.983c.08 0 .188-.055.215-.164l.107-.437"></path><path d="M19.238 11.75h-.242c-.054 0-.108.054-.135.109l-.35 1.2c-.134.52-.08.983.162 1.338.215.328.592.518 1.05.518l1.855.11c.054 0 .108.027.135.082.027.054.027.109.027.163-.027.082-.108.164-.188.164l-1.91.11c-1.05.054-2.153.9-2.557 1.937l-.134.355c-.027.055.026.137.107.137h6.592c.081 0 .162-.055.162-.137.107-.41.188-.846.188-1.31-.027-2.62-2.153-4.777-4.762-4.777"></path></svg>`,pi=`<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Gemini</title><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z" fill="#3186FF"></path><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z" fill="url(#lobe-icons-gemini-0-_R_0_)"></path><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z" fill="url(#lobe-icons-gemini-1-_R_0_)"></path><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z" fill="url(#lobe-icons-gemini-2-_R_0_)"></path><defs><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-gemini-0-_R_0_" x1="7" x2="11" y1="15.5" y2="12"><stop stop-color="#08B962"></stop><stop offset="1" stop-color="#08B962" stop-opacity="0"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-gemini-1-_R_0_" x1="8" x2="11.5" y1="5.5" y2="11"><stop stop-color="#F94543"></stop><stop offset="1" stop-color="#F94543" stop-opacity="0"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-gemini-2-_R_0_" x1="3.5" x2="17.5" y1="13.5" y2="12"><stop stop-color="#FABC12"></stop><stop offset=".46" stop-color="#FABC12" stop-opacity="0"></stop></linearGradient></defs></svg>`,mi=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 98 24" xmlns="http://www.w3.org/2000/svg"><title>Gemini</title><path d="M21.186 12.67c0 2.649-.786 4.759-2.359 6.33-1.766 1.87-4.09 2.806-6.969 2.806-2.756 0-5.088-.953-6.996-2.86C2.954 17.04 2 14.693 2 11.904c0-2.789.954-5.137 2.862-7.043C6.77 2.953 9.102 2 11.858 2c1.396 0 2.712.247 3.949.741 1.236.495 2.252 1.192 3.047 2.092l-1.749 1.748c-.583-.706-1.338-1.258-2.266-1.655a7.49 7.49 0 00-2.981-.596c-2.067 0-3.816.715-5.247 2.145-1.413 1.448-2.12 3.257-2.12 5.428s.707 3.98 2.12 5.428c1.431 1.43 3.18 2.145 5.247 2.145 1.89 0 3.463-.53 4.717-1.588 1.254-1.06 1.979-2.516 2.173-4.37h-6.89v-2.277h9.196c.088.495.132.971.132 1.43m7.652-4.633c1.946 0 3.494.629 4.645 1.886 1.15 1.257 1.726 3.018 1.726 5.282l-.027.268H24.877c.036 1.284.464 2.318 1.285 3.102.82.785 1.802 1.177 2.944 1.177 1.57 0 2.802-.784 3.694-2.354l2.195 1.07a6.54 6.54 0 01-2.45 2.595C31.503 21.688 30.32 22 29 22c-1.927 0-3.516-.66-4.765-1.98-1.249-1.319-1.873-2.986-1.873-5.001 0-1.997.606-3.66 1.82-4.988 1.213-1.329 2.766-1.993 4.657-1.993m-.053 2.247c-.928 0-1.727.285-2.396.856-.67.57-1.11 1.337-1.325 2.3h7.522c-.071-.91-.442-1.663-1.111-2.26-.67-.598-1.566-.896-2.69-.896M39.247 21.53h-2.455V8.465h2.348v1.813h.107c.374-.64.947-1.173 1.721-1.6.774-.427 1.544-.64 2.309-.64.96 0 1.806.222 2.535.667a3.931 3.931 0 011.601 1.84c1.085-1.671 2.589-2.507 4.51-2.507 1.513 0 2.678.462 3.496 1.387.819.924 1.228 2.24 1.228 3.946v8.16h-2.455v-7.786c0-1.227-.223-2.112-.668-2.654-.444-.542-1.192-.813-2.241-.813-.943 0-1.735.4-2.375 1.2-.64.8-.961 1.742-.961 2.826v7.227h-2.455v-7.786c0-1.227-.223-2.112-.668-2.654-.444-.542-1.191-.813-2.241-.813-.943 0-1.735.4-2.375 1.2-.64.8-.961 1.742-.961 2.826v7.227zM61.911 3.93c0 .48-.17.89-.508 1.228a1.675 1.675 0 01-1.23.508c-.48 0-.89-.17-1.229-.508a1.673 1.673 0 01-.508-1.228c0-.481.17-.89.508-1.229a1.675 1.675 0 011.23-.508c.48 0 .89.17 1.23.508.338.338.507.748.507 1.228m-.11 4.514v13.088h-2.857V8.443h2.857zM80 3.93c0 .48-.17.89-.508 1.228a1.675 1.675 0 01-1.23.508c-.48 0-.89-.17-1.229-.508a1.673 1.673 0 01-.508-1.228c0-.481.17-.89.508-1.229a1.675 1.675 0 011.23-.508c.48 0 .89.17 1.23.508.338.338.507.748.507 1.228m-.11 4.514v13.088h-2.857V8.443h2.857zm-16.343.022h2.349v1.813h.107c.373-.64.947-1.173 1.721-1.6a4.935 4.935 0 012.415-.64c1.601 0 2.833.458 3.696 1.373.863.916 1.294 2.218 1.294 3.907v8.213h-2.455v-8.053c-.053-2.133-1.13-3.2-3.229-3.2-.978 0-1.797.395-2.455 1.187-.658.79-.987 1.737-.987 2.84v7.226h-2.456V8.465z"></path></svg>`,hi=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Gemini</title><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z"></path></svg>`,gi=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 78 24" xmlns="http://www.w3.org/2000/svg"><title>Github</title><path d="M16.598 10.836v9.48c0 .066-.017.181-.1.214 0 0-2.07 1.47-5.484 1.47C6.888 22 2 20.712 2 12.223 2 3.734 6.275 1.983 10.45 2c3.613 0 5.07.81 5.303.958.066.083.1.149.1.231l-.697 2.94c0 .149-.149.33-.331.28-.597-.18-1.491-.544-3.596-.544-2.435 0-5.053.693-5.053 6.16 0 5.466 2.485 6.11 4.275 6.11 1.524 0 2.07-.181 2.07-.181v-3.799h-2.435c-.182 0-.315-.132-.315-.28v-3.04c0-.148.133-.28.315-.28h6.197c.182 0 .315.132.315.28zM76 14.684c0 5.664-1.84 7.283-5.054 7.283-2.717 0-4.175-1.37-4.175-1.37s-.067.759-.15.858c-.05.1-.132.132-.231.132h-2.453c-.165 0-.315-.132-.315-.28l.034-18.349a.29.29 0 01.281-.28h3.53a.29.29 0 01.281.28v6.226s1.359-.875 3.347-.875l-.016-.033c1.988 0 4.921.743 4.921 6.408zM47.865 2.71a.29.29 0 01.281.281V21.34a.29.29 0 01-.281.281h-3.53a.29.29 0 01-.281-.28l.033-7.845h-5.485v7.844a.29.29 0 01-.281.281h-3.53c-.132 0-.281-.132-.281-.28V2.99a.29.29 0 01.281-.28h3.53a.29.29 0 01.281.28v6.755h5.485V2.99a.29.29 0 01.282-.28h3.496zM61.55 8.722c.183 0 .315.132.315.28l-.033 12.337c0 .149-.1.281-.282.281h-2.22c-.116 0-.232-.066-.265-.148-.05-.1-.133-.744-.133-.744S57.061 22 54.758 22c-2.8 0-4.839-.908-4.839-4.542V9.02a.29.29 0 01.282-.28h3.546a.29.29 0 01.282.28v7.845c0 1.238.364 1.8 1.607 1.8 1.243 0 2.154-.644 2.154-.644V9.036c0-.182.1-.314.282-.314h3.48zm-28.84 9.861h.007c.14.029.239.154.234.296v2.477c0 .116-.05.231-.149.264-.166.083-1.226.363-2.104.363-1.922 0-4.74-.412-4.74-4.442v-5.417H24.12c-.149 0-.281-.132-.281-.314V9.564c0-.132.083-.248.215-.28.116-.017 1.922-.463 1.922-.463V5.237c0-.132.083-.215.232-.215h3.58c.148 0 .231.083.231.215v3.485h2.635c.132 0 .265.132.265.28v2.808c0 .182-.116.314-.265.314h-2.635v5.17c0 .777.448 1.372 1.74 1.372.41 0 .797-.081.951-.083zM22.28 8.705a.29.29 0 01.282.281v12.172c0 .297-.083.446-.414.446h-3.182c-.281 0-.497-.116-.497-.446V9.036c0-.182.133-.33.282-.33h3.53zm49.693 6.243c0-2.99-1.21-3.386-2.486-3.253-.994.066-1.79.561-1.79.561v5.813s.813.562 2.022.595c1.707.05 2.254-.562 2.254-3.716zM20.54 3.123a2.26 2.26 0 012.254 2.28A2.26 2.26 0 0120.54 7.68a2.266 2.266 0 01-2.286-2.279c0-1.271 1.01-2.279 2.286-2.279z"></path></svg>`,_i=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Github</title><path d="M12 0c6.63 0 12 5.276 12 11.79-.001 5.067-3.29 9.567-8.175 11.187-.6.118-.825-.25-.825-.56 0-.398.015-1.665.015-3.242 0-1.105-.375-1.813-.81-2.181 2.67-.295 5.475-1.297 5.475-5.822 0-1.297-.465-2.344-1.23-3.169.12-.295.54-1.503-.12-3.125 0 0-1.005-.324-3.3 1.209a11.32 11.32 0 00-3-.398c-1.02 0-2.04.133-3 .398-2.295-1.518-3.3-1.209-3.3-1.209-.66 1.622-.24 2.83-.12 3.125-.765.825-1.23 1.887-1.23 3.169 0 4.51 2.79 5.527 5.46 5.822-.345.294-.66.81-.765 1.577-.69.31-2.415.81-3.495-.973-.225-.354-.9-1.223-1.845-1.209-1.005.015-.405.56.015.781.51.28 1.095 1.327 1.23 1.666.24.663 1.02 1.93 4.035 1.385 0 .988.015 1.916.015 2.196 0 .31-.225.664-.825.56C3.303 21.374-.003 16.867 0 11.791 0 5.276 5.37 0 12 0z"></path></svg>`,vi=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 64 24" xmlns="http://www.w3.org/2000/svg"><title>Groq</title><path d="M37.925 2.039c4.142 0 7.509 3.368 7.509 7.528l-.004.244c-.128 4.047-3.437 7.284-7.505 7.284-4.15 0-7.509-3.368-7.509-7.528s3.36-7.528 7.509-7.528zm-11.144-.023c.26 0 .522.015.775.046l.015-.008a7.464 7.464 0 012.922.969L29.09 5.468a4.619 4.619 0 00-2.309-.6h-.253l-.253.016c-.338.03-.66.092-.982.177-.621.169-1.196.469-1.703.869a4.062 4.062 0 00-1.418 2.322l-.04.234-.03.235c-.007.077-.023.161-.023.238l-.014 2.713v2.593l-.016 2.522h-2.815l-.03-4.973V8.852c0-.139.015-.262.022-.392.023-.262.062-.523.115-.777.1-.523.269-1.03.491-1.515a6.998 6.998 0 011.948-2.484 7.465 7.465 0 012.754-1.391c.49-.131.99-.216 1.495-.254.123-.008.253-.023.376-.023h.376zM37.925 4.86a4.7 4.7 0 00-4.694 4.706 4.7 4.7 0 004.694 4.706 4.7 4.7 0 004.694-4.706l-.005-.216a4.7 4.7 0 00-4.689-4.49zM9.578 2C5.428 1.96 2.038 5.298 2 9.458c-.038 4.16 3.29 7.559 7.44 7.597h2.608v-2.822h-2.47c-2.592.031-4.717-2.053-4.748-4.652a4.7 4.7 0 014.64-4.76h.108c2.52 0 4.577 1.992 4.696 4.49l.005.216v6.936c0 2.576-2.093 4.676-4.655 4.706a4.663 4.663 0 01-3.267-1.376l-1.994 2A7.46 7.46 0 009.57 24h.1c4.096-.062 7.386-3.391 7.409-7.497V9.35c-.1-4.09-3.428-7.35-7.501-7.35zm44.929.038c-4.15 0-7.509 3.368-7.509 7.528s3.36 7.528 7.509 7.528h2.57v-2.822h-2.57a4.7 4.7 0 01-4.694-4.706 4.7 4.7 0 014.694-4.706A4.707 4.707 0 0159.16 8.94l.024.22v14.456H62V9.566c-.008-4.152-3.352-7.527-7.493-7.527z"></path></svg>`,yi=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Groq</title><path d="M12.036 2c-3.853-.035-7 3-7.036 6.781-.035 3.782 3.055 6.872 6.908 6.907h2.42v-2.566h-2.292c-2.407.028-4.38-1.866-4.408-4.23-.029-2.362 1.901-4.298 4.308-4.326h.1c2.407 0 4.358 1.915 4.365 4.278v6.305c0 2.342-1.944 4.25-4.323 4.279a4.375 4.375 0 01-3.033-1.252l-1.851 1.818A7 7 0 0012.029 22h.092c3.803-.056 6.858-3.083 6.879-6.816v-6.5C18.907 4.963 15.817 2 12.036 2z"></path></svg>`,bi=`<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Mistral</title><path d="M3.428 3.4h3.429v3.428H3.428V3.4zm13.714 0h3.43v3.428h-3.43V3.4z" fill="gold"></path><path d="M3.428 6.828h6.857v3.429H3.429V6.828zm10.286 0h6.857v3.429h-6.857V6.828z" fill="#FFAF00"></path><path d="M3.428 10.258h17.144v3.428H3.428v-3.428z" fill="#FF8205"></path><path d="M3.428 13.686h3.429v3.428H3.428v-3.428zm6.858 0h3.429v3.428h-3.429v-3.428zm6.856 0h3.43v3.428h-3.43v-3.428z" fill="#FA500F"></path><path d="M0 17.114h10.286v3.429H0v-3.429zm13.714 0H24v3.429H13.714v-3.429z" fill="#E10500"></path></svg>`,xi=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 134 24" xmlns="http://www.w3.org/2000/svg"><title>Mistral</title><path d="M2 22.638V1h6.55l3.933 14.76L16.37 1h6.565v21.638H18.87V5.605l-4.302 17.033h-4.214L6.066 5.605v17.033H2zm25.011-17.8V1.002h4.155V4.84h-4.155zm0 17.801V6.964h4.155V22.64h-4.155zm6.707-4.473l4.17-.635c.177.807.536 1.42 1.079 1.838.986.864 3.753.796 4.702.036.588-.404.753-1.367.25-1.89-.206-.196-.67-.378-1.389-.545-3.351-.738-5.475-1.412-6.372-2.022-2.418-1.526-2.465-5.18-.252-6.952 1.76-1.8 7.852-1.78 9.788-.34 1.045.699 1.764 1.732 2.159 3.1l-3.918.723c-.413-1.402-1.417-1.886-2.957-1.89-1.094 0-1.878.154-2.35.458-.591.383-.651 1.179-.06 1.595.374.275 1.668.664 3.88 1.165 2.213.502 3.759 1.117 4.636 1.845 1.993 1.694 1.615 5.13-.503 6.79-2.087 2.01-8.091 2.034-10.416.25-1.247-.865-2.063-2.04-2.447-3.527zm31.88 4.472h-4.154V6.963h3.86v2.229c.66-1.053 1.253-1.747 1.78-2.081 1.374-.857 3.144-.536 4.532.28l-1.286 3.617c-1.877-1.247-3.849-.81-4.384 1.535-.468 1.352-.329 7.76-.347 10.096zm10.67-10.892l-3.77-.679c1.014-3.408 3.08-4.43 6.801-4.457 2.81.037 4.804.362 6.055 2.324.37.674.554 1.912.554 3.713.013 1.729-.178 6.48.155 7.889.133.654.382 1.355.747 2.103H82.7c-.124-.272-.411-1.286-.547-1.712-1.378 1.335-2.97 2.066-4.865 2.067-2.945.058-5.22-1.756-5.219-4.635-.011-1.72.87-3.225 2.418-3.963.764-.37 1.865-.691 3.304-.967 1.942-.364 3.287-.703 4.037-1.018v-.413c0-.797-.197-1.366-.591-1.705-.57-.582-3.147-.744-3.963-.074-.414.29-.75.8-1.006 1.527zm5.56 3.365c-.757.315-4.139.86-4.79 1.358-1.077.707-1.038 2.141-.163 2.967 1.017.987 2.672.733 3.8-.103 1.374-.983 1.117-2.455 1.153-4.221zm7.933 7.527V1h4.155v21.638H89.76zm35.917 0h-4.761l-1.892-4.915h-8.665l-1.789 4.915h-4.643L112.371 1h4.627l8.679 21.638h.001zm-8.058-8.56l-2.987-8.03-2.927 8.03h5.914zm10.004 8.56V1H132v21.638h-4.376zM58.98 6.964v3.307H56.14v6.317l.081 2.236c.434 1.136 1.612.712 2.743.332l.355 3.218c-2.416 1.02-6.87 1.14-7.215-2.346-.096-.537-.123-1.89-.133-3.44v-6.317h-1.908V6.965h1.908V3.85l4.17-2.42v5.535h2.838z"></path></svg>`,Si=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Mistral</title><path clip-rule="evenodd" d="M3.428 3.4h3.429v3.428h3.429v3.429h-.002 3.431V6.828h3.427V3.4h3.43v13.714H24v3.429H13.714v-3.428h-3.428v-3.429h-3.43v3.428h3.43v3.429H0v-3.429h3.428V3.4zm10.286 13.715h3.428v-3.429h-3.427v3.429z"></path></svg>`,Ci=`<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Nvidia</title><path d="M10.212 8.976V7.62c.127-.01.256-.017.388-.021 3.596-.117 5.957 3.184 5.957 3.184s-2.548 3.647-5.282 3.647a3.227 3.227 0 01-1.063-.175v-4.109c1.4.174 1.681.812 2.523 2.258l1.873-1.627a4.905 4.905 0 00-3.67-1.846 6.594 6.594 0 00-.729.044m0-4.476v2.025c.13-.01.259-.019.388-.024 5.002-.174 8.261 4.226 8.261 4.226s-3.743 4.69-7.643 4.69c-.338 0-.675-.031-1.007-.092v1.25c.278.038.558.057.838.057 3.629 0 6.253-1.91 8.794-4.169.421.347 2.146 1.193 2.501 1.564-2.416 2.083-8.048 3.763-11.24 3.763-.308 0-.603-.02-.894-.048V19.5H24v-15H10.21zm0 9.756v1.068c-3.356-.616-4.287-4.21-4.287-4.21a7.173 7.173 0 014.287-2.138v1.172h-.005a3.182 3.182 0 00-2.502 1.178s.615 2.276 2.507 2.931m-5.961-3.3c1.436-1.935 3.604-3.148 5.961-3.336V6.523C5.81 6.887 2 10.723 2 10.723s2.158 6.427 8.21 7.015v-1.166C5.77 16 4.25 10.958 4.25 10.958h-.002z" fill="#74B71B" fill-rule="nonzero"></path></svg>`,wi=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 111 24" xmlns="http://www.w3.org/2000/svg"><title>Nvidia</title><path d="M46.495 2.027v19.965h5.656V2.027h-5.656zM2 2v19.992h5.706V6.48l4.452.015a4.088 4.088 0 013.183 1.101c.894.951 1.26 2.483 1.26 5.287V22h5.529V10.949c0-7.883-5.035-8.946-9.972-8.946L2 2zm53.604.027v19.965h9.174c4.882 0 6.482-.81 8.208-2.626a11.156 11.156 0 002.008-7.136c.109-2.423-.53-4.82-1.831-6.869-2.095-2.788-5.114-3.332-9.621-3.332l-7.938-.002zm5.61 4.347h2.432c3.527 0 5.81 1.58 5.81 5.678 0 4.097-2.289 5.679-5.81 5.679h-2.432V6.374zM38.34 2.027L33.62 17.845 29.096 2.027h-6.102l6.46 19.965h8.151l6.51-19.965h-5.774zm39.285 19.965h5.657V2.03h-5.659l.002 19.963zm15.86-19.957l-7.898 19.95h5.578l1.25-3.526h9.346l1.183 3.526H109l-7.958-19.952-7.555.002zm3.673 3.64l3.427 9.346h-6.96l3.533-9.346z"></path></svg>`,Ti=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Nvidia</title><path d="M10.212 8.976V7.62c.127-.01.256-.017.388-.021 3.596-.117 5.957 3.184 5.957 3.184s-2.548 3.647-5.282 3.647a3.227 3.227 0 01-1.063-.175v-4.109c1.4.174 1.681.812 2.523 2.258l1.873-1.627a4.905 4.905 0 00-3.67-1.846 6.594 6.594 0 00-.729.044m0-4.476v2.025c.13-.01.259-.019.388-.024 5.002-.174 8.261 4.226 8.261 4.226s-3.743 4.69-7.643 4.69c-.338 0-.675-.031-1.007-.092v1.25c.278.038.558.057.838.057 3.629 0 6.253-1.91 8.794-4.169.421.347 2.146 1.193 2.501 1.564-2.416 2.083-8.048 3.763-11.24 3.763-.308 0-.603-.02-.894-.048V19.5H24v-15H10.21zm0 9.756v1.068c-3.356-.616-4.287-4.21-4.287-4.21a7.173 7.173 0 014.287-2.138v1.172h-.005a3.182 3.182 0 00-2.502 1.178s.615 2.276 2.507 2.931m-5.961-3.3c1.436-1.935 3.604-3.148 5.961-3.336V6.523C5.81 6.887 2 10.723 2 10.723s2.158 6.427 8.21 7.015v-1.166C5.77 16 4.25 10.958 4.25 10.958h-.002z"></path></svg>`,Ei=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 138 24" xmlns="http://www.w3.org/2000/svg"><title>opencode</title><path d="M12.429 17.143H5.57v-6.857h6.858v6.857z" fill-opacity=".25"></path><path d="M12.428 6.857H5.571v10.286h6.857V6.857zm3.43 13.715H2.142V3.429h13.714v17.143z" fill-opacity=".75"></path><path d="M29.571 17.143h-6.857v-6.857h6.857v6.857z" fill-opacity=".25"></path><path d="M22.714 17.143h6.858V6.857h-6.858v10.286zM33 20.572H22.714V24h-3.428V3.43H33v17.143z" fill-opacity=".75"></path><path d="M50.143 13.714v3.429H39.857v-3.429h10.286z" fill-opacity=".25"></path><path d="M50.143 13.714H39.857v3.429h10.286v3.429H36.429V3.429h13.714v10.285zm-10.286-3.428h6.857V6.857h-6.857v3.429z" fill-opacity=".75"></path><path d="M63.857 20.571H57V10.286h6.857V20.57z" fill-opacity=".25"></path><path d="M63.857 6.857H57v13.715h-3.429V3.429h10.286v3.428zm3.429 13.715h-3.429V6.857h3.429v13.715z" fill-opacity=".75"></path><path d="M84.428 17.143H74.144v-6.857h10.285v6.857z" fill-opacity=".25"></path><path d="M84.428 6.857H74.144v10.286h10.285v3.429H70.715V3.429H84.43v3.428z"></path><path d="M98.143 17.143h-6.857v-6.857h6.857v6.857z" fill-opacity=".25"></path><path d="M98.143 6.857h-6.857v10.286h6.857V6.857zm3.428 13.715H87.857V3.429h13.714v17.143z"></path><path d="M115.286 17.143h-6.857v-6.857h6.857v6.857z" fill-opacity=".25"></path><path d="M115.286 6.857h-6.857v10.286h6.857V6.857zm3.428 13.714H105V3.43h10.286V0h3.428v20.571z"></path><path d="M135.857 13.714v3.429h-10.286v-3.429h10.286z" fill-opacity=".25"></path><path d="M125.571 6.857v3.429h6.858V6.857h-6.858zm10.286 6.857h-10.286v3.429h10.286v3.429h-13.714V3.429h13.714v10.285z"></path></svg>`,Di=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>opencode</title><path d="M16 6H8v12h8V6zm4 16H4V2h16v20z"></path></svg>`,Oi=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>OpenRouter</title><path d="M16.804 1.957l7.22 4.105v.087L16.73 10.21l.017-2.117-.821-.03c-1.059-.028-1.611.002-2.268.11-1.064.175-2.038.577-3.147 1.352L8.345 11.03c-.284.195-.495.336-.68.455l-.515.322-.397.234.385.23.53.338c.476.314 1.17.796 2.701 1.866 1.11.775 2.083 1.177 3.147 1.352l.3.045c.694.091 1.375.094 2.825.033l.022-2.159 7.22 4.105v.087L16.589 22l.014-1.862-.635.022c-1.386.042-2.137.002-3.138-.162-1.694-.28-3.26-.926-4.881-2.059l-2.158-1.5a21.997 21.997 0 00-.755-.498l-.467-.28a55.927 55.927 0 00-.76-.43C2.908 14.73.563 14.116 0 14.116V9.888l.14.004c.564-.007 2.91-.622 3.809-1.124l1.016-.58.438-.274c.428-.28 1.072-.726 2.686-1.853 1.621-1.133 3.186-1.78 4.881-2.059 1.152-.19 1.974-.213 3.814-.138l.02-1.907z"></path></svg>`,ki=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 143 24" xmlns="http://www.w3.org/2000/svg"><title>OpenRouter</title><path d="M9.623 2c1.46 0 2.763.35 3.91 1.05 1.149.699 2.053 1.7 2.714 3.002.66 1.303.991 2.861.991 4.675 0 1.814-.33 3.372-.991 4.675-.66 1.302-1.565 2.303-2.713 3.003-1.148.7-2.452 1.049-3.91 1.049-1.465 0-2.772-.35-3.92-1.05-1.148-.699-2.052-1.701-2.713-3.007-.66-1.305-.991-2.862-.991-4.67 0-1.814.33-3.372.991-4.675.66-1.302 1.565-2.303 2.713-3.003C6.852 2.35 8.16 2 9.624 2zm0 2.34c-.974 0-1.844.244-2.61.734-.765.489-1.37 1.208-1.813 2.156-.443.949-.664 2.114-.664 3.497s.221 2.548.664 3.497c.444.948 1.048 1.667 1.813 2.156.766.49 1.636.735 2.61.735.97 0 1.838-.245 2.606-.735.768-.489 1.374-1.208 1.817-2.156.443-.949.665-2.114.665-3.497s-.222-2.548-.665-3.497c-.443-.948-1.049-1.667-1.817-2.156-.768-.49-1.637-.735-2.606-.735zm16.32 1.974c1.024 0 1.938.26 2.742.78s1.436 1.269 1.896 2.248c.46.979.69 2.156.69 3.534 0 1.377-.23 2.556-.686 3.538-.457.981-1.085 1.736-1.883 2.264-.799.529-1.71.793-2.734.793-.771 0-1.4-.13-1.887-.39-.488-.26-.869-.564-1.144-.913a6.908 6.908 0 01-.636-.929h-.149V24h-2.47V6.48h2.412v2.065h.207c.143-.265.35-.572.62-.92.27-.349.643-.655 1.123-.917.479-.263 1.112-.394 1.9-.394zm-.528 2.107c-.716 0-1.32.185-1.813.556-.493.37-.866.887-1.12 1.55-.253.665-.38 1.439-.38 2.324 0 .896.13 1.68.389 2.356.259.674.633 1.201 1.123 1.58s1.09.568 1.8.568c.738 0 1.355-.198 1.85-.593.496-.395.872-.933 1.128-1.613.256-.68.384-1.447.384-2.298 0-.84-.125-1.596-.376-2.265-.25-.67-.625-1.197-1.123-1.584-.498-.388-1.12-.581-1.862-.581zm13.387-2.107c.716 0 1.41.119 2.082.356a5.037 5.037 0 011.809 1.12c.534.51.955 1.169 1.263 1.979.309.81.463 1.793.463 2.949v.88l-9.016-.001.002.105c.03.732.178 1.364.445 1.895.3.597.72 1.052 1.26 1.364.539.313 1.17.469 1.89.469.469 0 .895-.068 1.28-.203a2.716 2.716 0 001-.61c.281-.271.496-.606.644-1.004l2.338.423a4.247 4.247 0 01-1.004 1.813c-.482.517-1.084.918-1.808 1.203-.725.284-1.549.427-2.474.427-1.25 0-2.325-.27-3.225-.809-.9-.54-1.594-1.3-2.082-2.281-.487-.982-.73-2.134-.73-3.455 0-1.306.243-2.456.73-3.451.488-.996 1.17-1.773 2.049-2.331.878-.559 1.906-.838 3.084-.838zm.017 2.049c-.694 0-1.298.17-1.813.51-.515.34-.911.782-1.19 1.327a3.778 3.778 0 00-.39 1.303l-.02.236h6.593c0-.653-.132-1.232-.397-1.738a3.022 3.022 0 00-1.11-1.199c-.477-.293-1.034-.44-1.673-.44zm10.29 3.293v7.566H46.64V6.48h2.37v2.074h.158a3.63 3.63 0 011.375-1.626c.625-.41 1.413-.614 2.366-.614.864 0 1.622.18 2.271.543.65.362 1.154.9 1.512 1.614.358.713.537 1.595.537 2.646v8.105h-2.47v-7.806c0-.924-.24-1.647-.718-2.17-.48-.522-1.137-.784-1.974-.784-.573 0-1.081.125-1.524.374a2.65 2.65 0 00-1.05 1.09c-.255.479-.383 1.055-.383 1.73zm17.122-9.424c1.31 0 2.4.227 3.266.68.868.454 1.516 1.08 1.945 1.88.43.799.645 1.72.645 2.766 0 1.04-.216 1.954-.649 2.742-.432.788-1.082 1.4-1.949 1.837a5.1 5.1 0 01-.501.22l3.743 6.865h-2.907l-3.436-6.43h-3.634v6.43h-2.552V2.232h6.029zm-.273 2.199h-3.204v6.155h3.237c.826 0 1.5-.119 2.02-.357s.901-.583 1.144-1.037c.242-.453.363-.998.363-1.634 0-.641-.122-1.197-.367-1.667-.246-.47-.628-.831-1.148-1.083-.52-.252-1.202-.377-2.045-.377zM79.66 6.314c1.19 0 2.227.273 3.114.821.886.548 1.575 1.316 2.065 2.306s.735 2.146.735 3.468c0 1.316-.245 2.466-.735 3.45-.49.985-1.179 1.751-2.065 2.299-.887.547-1.924.82-3.114.82s-2.227-.273-3.113-.82c-.887-.548-1.575-1.314-2.065-2.298-.49-.985-.735-2.135-.735-3.451 0-1.322.245-2.478.735-3.468.49-.99 1.178-1.758 2.065-2.306.886-.548 1.924-.821 3.113-.821zm.008 2.074c-.776 0-1.419.207-1.928.622-.51.415-.887.963-1.132 1.646a6.602 6.602 0 00-.367 2.244c0 .819.122 1.568.367 2.249.245.68.623 1.225 1.132 1.634.51.41 1.152.614 1.928.614.771 0 1.41-.205 1.917-.614.506-.41.882-.954 1.127-1.634.245-.68.367-1.43.367-2.249 0-.813-.122-1.56-.367-2.244-.245-.683-.62-1.231-1.127-1.646-.507-.415-1.146-.622-1.917-.622zm16.164 5.55V6.48h2.477v12.742h-2.428v-2.207h-.132a3.956 3.956 0 01-1.4 1.697c-.641.45-1.438.676-2.391.676-.815 0-1.535-.181-2.16-.544-.625-.362-1.115-.9-1.47-1.613-.355-.714-.533-1.596-.533-2.647V6.48h2.47v7.806c0 .868.24 1.56.718 2.074.48.514 1.102.771 1.867.771.462 0 .924-.116 1.383-.348.46-.232.843-.584 1.148-1.054.306-.47.456-1.067.45-1.792zm8.58-10.511v3.052h2.602v1.992h-2.602v7.01c0 .48.072.841.215 1.082.144.24.33.404.558.49.228.085.478.128.747.128.199 0 .372-.014.52-.041l.348-.067.446 2.05a4.42 4.42 0 01-.612.17c-.264.057-.594.09-.99.095a4.331 4.331 0 01-1.818-.349 3.12 3.12 0 01-1.362-1.128c-.347-.509-.52-1.148-.52-1.916l-.002-7.525h-1.857V6.48h1.857l.001-3.053h2.47zm9.961 2.887c.716 0 1.41.119 2.081.356a5.037 5.037 0 011.81 1.12c.533.51.954 1.169 1.263 1.979.308.81.462 1.793.462 2.949v.88l-9.016-.001.003.105c.03.732.178 1.364.445 1.895.3.597.72 1.052 1.259 1.364.54.313 1.17.469 1.891.469.468 0 .895-.068 1.28-.203a2.716 2.716 0 001-.61c.28-.271.495-.606.644-1.004l2.337.423a4.247 4.247 0 01-1.003 1.813c-.482.517-1.085.918-1.809 1.203-.724.284-1.548.427-2.473.427-1.25 0-2.325-.27-3.226-.809-.9-.54-1.594-1.3-2.08-2.281-.488-.982-.732-2.134-.732-3.455 0-1.306.244-2.456.731-3.451.487-.996 1.17-1.773 2.048-2.331.879-.559 1.907-.838 3.085-.838zm.017 2.049c-.694 0-1.298.17-1.813.51-.515.34-.911.782-1.19 1.327a3.778 3.778 0 00-.39 1.303l-.02.236h6.592c0-.653-.132-1.232-.396-1.738a3.022 3.022 0 00-1.11-1.199c-.477-.293-1.035-.44-1.673-.44zm7.821 10.859V6.48h2.387v2.024h.132a3.092 3.092 0 011.227-1.622 3.485 3.485 0 011.994-.593l.396.01.153.006c.212.011.379.025.5.042v2.372c-.1-.027-.275-.059-.529-.095a5.4 5.4 0 00-.76-.054c-.583 0-1.102.123-1.556.37a2.799 2.799 0 00-1.078 1.02 2.79 2.79 0 00-.397 1.48v7.782h-2.469z"></path></svg>`,Ai=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>OpenRouter</title><path d="M16.804 1.957l7.22 4.105v.087L16.73 10.21l.017-2.117-.821-.03c-1.059-.028-1.611.002-2.268.11-1.064.175-2.038.577-3.147 1.352L8.345 11.03c-.284.195-.495.336-.68.455l-.515.322-.397.234.385.23.53.338c.476.314 1.17.796 2.701 1.866 1.11.775 2.083 1.177 3.147 1.352l.3.045c.694.091 1.375.094 2.825.033l.022-2.159 7.22 4.105v.087L16.589 22l.014-1.862-.635.022c-1.386.042-2.137.002-3.138-.162-1.694-.28-3.26-.926-4.881-2.059l-2.158-1.5a21.997 21.997 0 00-.755-.498l-.467-.28a55.927 55.927 0 00-.76-.43C2.908 14.73.563 14.116 0 14.116V9.888l.14.004c.564-.007 2.91-.622 3.809-1.124l1.016-.58.438-.274c.428-.28 1.072-.726 2.686-1.853 1.621-1.133 3.186-1.78 4.881-2.059 1.152-.19 1.974-.213 3.814-.138l.02-1.907z"></path></svg>`,ji=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 298.03 47.18" fill="currentColor" role="img" aria-label="OVHcloud">
|
|
10
10
|
<title>OVHcloud</title>
|
|
11
11
|
<path fill="currentColor" d="M110.11,40.31a40.1,40.1,0,0,1-3.74,44.49H84.93l6.6-11.67H82.8L93.09,55h8.78l8.24-14.67ZM67.77,84.8H45.91a39.59,39.59,0,0,1-3.79-44.59L56.3,64.84,71.93,37.62h23L67.78,84.78h0v0Z" transform="translate(-36.97 -37.62)"/>
|
|
12
12
|
<path fill="currentColor" d="M128.18,62.9c0-12.59,6.27-18.64,16.57-18.64s16.56,6.05,16.56,18.64S155,81.47,144.75,81.47,128.18,75.37,128.18,62.9Zm3.72,0c0,10.35,4.72,15.28,12.85,15.28s12.84-4.93,12.84-15.28-4.72-15.35-12.84-15.35S131.9,52.49,131.9,62.9Z" transform="translate(-36.97 -37.62)"/>
|
|
@@ -38,4 +38,4 @@ Error generating stack: `+e.message+`
|
|
|
38
38
|
`);for(let e of n){if(!e.startsWith(`data: `))continue;let t=e.slice(6).trim();if(t!==`[DONE]`)try{let e=JSON.parse(t).choices?.[0]?.delta?.content;e&&(o+=e,f(o))}catch{}}}}catch(e){e.name!==`AbortError`&&f(`Error: ${e.message}`)}finally{m(!1),h.current=null}},[l,p,e.providerKey,e.modelId]),te=(0,v.useCallback)(async()=>{if(g===`running`)return;_(`running`),b({latency:null,tokens:null,tps:null}),S(``),w(0),T.current&&T.current.abort();let t=new AbortController;T.current=t;try{let n=await fetch(`/api/benchmark-stream`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({providerKey:e.providerKey,modelId:e.modelId}),signal:t.signal});if(!n.ok){let e=await n.text().catch(()=>`HTTP ${n.status}`);_(`error`),S(`Error: ${e}`);return}let r=n.body.getReader(),i=new TextDecoder,a=``,o=``;for(;;){let{done:e,value:t}=await r.read();if(e)break;a+=i.decode(t,{stream:!0});let n=a.split(`
|
|
39
39
|
`);a=n.pop()||``;for(let e of n){let t=e.trim();if(t&&!t.startsWith(`event: `)&&t.startsWith(`data: `)){let e=t.slice(6).trim();try{let t=JSON.parse(e),n=t.type||t.event;n===`token`||t.token!==void 0?(t.text&&(o+=t.text,S(o)),t.totalMs!=null&&b(e=>({...e,latency:(t.totalMs/1e3).toFixed(2)})),t.tokens!=null&&(b(e=>({...e,tokens:t.tokens})),w(Math.min(100,Math.round(t.tokens/140*100)))),t.tps!=null&&b(e=>({...e,tps:t.tps.toFixed(1)}))):n===`done`?(t.totalMs!=null&&b(e=>({...e,latency:(t.totalMs/1e3).toFixed(2)})),t.outputTokens!=null&&b(e=>({...e,tokens:t.outputTokens})),t.tokensPerSecond!=null&&b(e=>({...e,tps:t.tokensPerSecond.toFixed(1)})),w(100),_(`done`)):n===`error`&&(_(`error`),S(t.message||t.error||`Unknown error`))}catch{}}}}}catch(e){e.name!==`AbortError`&&(_(`error`),S(`Error: ${e.message}`))}finally{g===`running`&&_(`done`),T.current=null}},[g,e.providerKey,e.modelId]);return e.hasApiKey?(0,I.jsx)(`div`,{className:U.row,children:(0,I.jsxs)(`div`,{className:U.grid,children:[(0,I.jsxs)(`div`,{className:U.col,children:[(0,I.jsx)(`div`,{className:U.colTitle,children:`📊 Model Info`}),(0,I.jsxs)(`div`,{className:U.statGrid,children:[(0,I.jsx)(ys,{label:`Tier`,children:(0,I.jsx)(zo,{tier:e.tier})}),(0,I.jsx)(ys,{label:`SWE-bench`,children:(0,I.jsx)(`span`,{className:U[Bt(e.sweScore)],children:e.sweScore||`—`})}),(0,I.jsx)(ys,{label:`Context`,children:e.ctx||`—`}),(0,I.jsx)(ys,{label:`Provider`,children:e.origin}),(0,I.jsxs)(ys,{label:`Status`,children:[(0,I.jsx)(Vo,{status:e.status}),(0,I.jsx)(`span`,{style:{fontSize:11},children:e.status})]}),(0,I.jsx)(ys,{label:`Avg Ping`,children:(0,I.jsx)(`span`,{className:U[O],children:D.text})}),(0,I.jsx)(ys,{label:`Stability`,children:(0,I.jsx)(rs,{score:e.stability})}),(0,I.jsx)(ys,{label:`Verdict`,children:(0,I.jsx)(ss,{verdict:e.verdict,httpCode:e.httpCode})}),(0,I.jsx)(ys,{label:`Uptime`,children:e.uptime>0?`${e.uptime}%`:`—`})]}),(0,I.jsxs)(`div`,{className:U.infoActions,children:[t&&(0,I.jsxs)(`button`,{className:`${U.favBtn} ${E?U.favBtnActive:``}`,onClick:()=>t.toggle(e),title:E?`Unfavorite ${e.label}`:`Favorite ${e.label}`,children:[E?(0,I.jsx)(Jr,{size:13,stroke:1.5}):(0,I.jsx)(Rr,{size:13,stroke:1.5}),(0,I.jsx)(`span`,{children:E?`Favorited`:`Favorite`})]}),r&&(0,I.jsx)(vs,{model:e,toolMode:a,onLaunch:r,variant:`default`})]})]}),(0,I.jsxs)(`div`,{className:U.col,children:[(0,I.jsxs)(`div`,{className:U.playgroundHeader,children:[`💬 Mini Playground — `,e.label]}),(0,I.jsxs)(`div`,{className:U.inputRow,children:[(0,I.jsx)(`input`,{type:`text`,className:U.inputField,placeholder:`Type a message…`,value:l,onChange:e=>u(e.target.value),onKeyDown:e=>{e.key===`Enter`&&ee()},disabled:p}),(0,I.jsx)(`button`,{className:U.sendBtn,onClick:ee,disabled:p||!l.trim(),title:`Send message`,children:p?(0,I.jsx)(xr,{size:14,stroke:1.8,className:U.spinning}):(0,I.jsx)(Fr,{size:14,stroke:1.8})})]}),(0,I.jsx)(`div`,{className:U.responseArea,children:p&&!d?(0,I.jsx)(`span`,{className:U.responsePlaceholder,children:`Waiting for response…`}):d||(0,I.jsx)(`span`,{className:U.responsePlaceholder,children:`Send a message to test this model. Responses stream in real time.`})})]}),(0,I.jsxs)(`div`,{className:U.col,children:[(0,I.jsxs)(`button`,{className:U.benchBtn,onClick:te,disabled:g===`running`,title:g===`running`?`Running benchmark…`:`Test AI Latency`,children:[g===`running`?(0,I.jsx)(xr,{size:13,stroke:1.8,className:U.spinning}):(0,I.jsx)(qr,{size:13,stroke:1.8}),(0,I.jsx)(`span`,{children:g===`running`?`Running…`:`Test AI Latency`})]}),(0,I.jsxs)(`div`,{className:U.metricsGrid,children:[(0,I.jsxs)(`div`,{className:U.metricCard,children:[(0,I.jsx)(`span`,{className:U.metricLabel,children:`Latency`}),(0,I.jsx)(`span`,{className:U.metricValue,children:y.latency==null?`—`:`${y.latency}s`})]}),(0,I.jsxs)(`div`,{className:U.metricCard,children:[(0,I.jsx)(`span`,{className:U.metricLabel,children:`Tokens`}),(0,I.jsx)(`span`,{className:U.metricValue,children:y.tokens==null?`—`:y.tokens})]}),(0,I.jsxs)(`div`,{className:U.metricCard,children:[(0,I.jsx)(`span`,{className:U.metricLabel,children:`TPS`}),(0,I.jsx)(`span`,{className:U.metricValue,children:y.tps==null?`—`:y.tps})]}),(0,I.jsxs)(`div`,{className:U.metricCard,children:[(0,I.jsx)(`span`,{className:U.metricLabel,children:`Status`}),(0,I.jsxs)(`span`,{className:U.metricValue,children:[g===`idle`&&`⏳`,g===`running`&&`⚡`,g===`done`&&`✅`,g===`error`&&`❌`]})]})]}),(0,I.jsx)(`div`,{className:U.progressBar,children:(0,I.jsx)(`div`,{className:U.progressFill,style:{width:`${C}%`}})}),(0,I.jsx)(`div`,{className:U.streamText,children:x||(0,I.jsx)(`span`,{className:U.responsePlaceholder,children:`Generated text will appear here…`})})]})]})}):(0,I.jsx)(`div`,{className:U.row,children:(0,I.jsxs)(`div`,{className:U.noKeyBanner,children:[(0,I.jsx)(`span`,{className:U.noKeyIcon,children:`🔒`}),(0,I.jsxs)(`span`,{children:[`No API key configured for `,e.origin,`. Open Settings (P) to add one.`]})]})})}var W={container:`_container_1uha3_8`,table:`_table_1uha3_23`,th:`_th_1uha3_32`,thInner:`_thInner_1uha3_59`,thLabel:`_thLabel_1uha3_67`,resizeHandle:`_resizeHandle_1uha3_81`,resizeHandleActive:`_resizeHandleActive_1uha3_106`,resizeToolbar:`_resizeToolbar_1uha3_125`,resizeToolbarHint:`_resizeToolbarHint_1uha3_139`,resizeResetButton:`_resizeResetButton_1uha3_150`,sortIcon:`_sortIcon_1uha3_179`,sortIconActive:`_sortIconActive_1uha3_180`,td:`_td_1uha3_183`,rank1:`_rank1_1uha3_202`,rank2:`_rank2_1uha3_203`,rank3:`_rank3_1uha3_204`,rankNum:`_rankNum_1uha3_207`,swe:`_swe_1uha3_215`,sweHigh:`_sweHigh_1uha3_216`,sweMid:`_sweMid_1uha3_217`,sweLow:`_sweLow_1uha3_218`,ctx:`_ctx_1uha3_220`,ping:`_ping_1uha3_222`,pingFast:`_pingFast_1uha3_223`,pingMedium:`_pingMedium_1uha3_224`,pingSlow:`_pingSlow_1uha3_225`,pingNone:`_pingNone_1uha3_226`,uptime:`_uptime_1uha3_235`,modelCell:`_modelCell_1uha3_238`,modelMeta:`_modelMeta_1uha3_239`,modelHeader:`_modelHeader_1uha3_240`,modelName:`_modelName_1uha3_241`,modelId:`_modelId_1uha3_242`,benchRow:`_benchRow_1uha3_253`,benchRowPulse:`_benchRowPulse_1uha3_1`,empty:`_empty_1uha3_271`,favBtn:`_favBtn_1uha3_274`,favBtnActive:`_favBtnActive_1uha3_289`,aiLatencyWrap:`_aiLatencyWrap_1uha3_301`,aiLatencyRunning:`_aiLatencyRunning_1uha3_312`,aiLatencyPlay:`_aiLatencyPlay_1uha3_314`,incompatible:`_incompatible_1uha3_323`,unusable:`_unusable_1uha3_341`,launchCell:`_launchCell_1uha3_349`,expandedRow:`_expandedRow_1uha3_362`,expandRowWrapper:`_expandRowWrapper_1uha3_365`,expandRowCell:`_expandRowCell_1uha3_368`},xs=ia(),Ss=new Set([`mood`,`idx`,`tier`,`sweScore`,`ctx`,`label`,`origin`,`latestPing`,`avg`,`condition`,`verdict`,`stability`,`uptime`,`aiLatency`,`tps`,`trend`]);function Cs({row:e}){return(0,I.jsx)(Lo,{verdict:e.original.verdict})}function ws({row:e}){let t=e.original,n=!t.hasApiKey&&!t.cliOnly;return(0,I.jsxs)(`div`,{className:W.modelCell,children:[(0,I.jsx)(Vo,{status:t.status}),(0,I.jsxs)(`div`,{className:W.modelMeta,children:[(0,I.jsxs)(`div`,{className:W.modelHeader,children:[(0,I.jsx)(`span`,{className:W.modelName,children:t.label}),n&&(0,I.jsx)(Ko,{size:14,title:`No API key configured — health will stay in 'NO KEY' state`})]}),(0,I.jsx)(`div`,{className:W.modelId,children:t.modelId})]})]})}function Ts({row:e}){let t=e.original,n=Bt(t.sweScore);return(0,I.jsx)(`span`,{className:`${W.swe} ${W[n]}`,children:t.sweScore||`—`})}function Es({row:e}){return(0,I.jsx)(`span`,{className:W.ctx,children:e.original.ctx||`—`})}function Ds({row:e}){return(0,I.jsx)(Wi,{providerKey:e.original.providerKey,origin:e.original.origin})}function Os({row:e}){let t=e.original,n=t.pingHistory||t.pings||[];return(0,I.jsx)(Wo,{ms:(n.length>0?n[n.length-1]:null)?.ms??null,isPinging:!!t.isPinging})}function ks({row:e}){let t=e.original,n=Ht(t.avg);return(0,I.jsx)(`span`,{className:`${W.ping} ${W[n]}`,children:t.avg==null||t.avg===1/0||t.avg>99e3?`—`:t.avg})}function As({row:e}){let t=e.original;return(0,I.jsx)(ts,{status:t.status,httpCode:t.httpCode})}function js({row:e}){let t=e.original;return(0,I.jsx)(ss,{verdict:t.verdict,httpCode:t.httpCode})}function Ms({row:e}){return(0,I.jsx)(rs,{score:e.original.stability})}function Ns({row:e}){let t=e.original;return(0,I.jsx)(`span`,{className:W.uptime,children:t.uptime>0?`${t.uptime}%`:`—`})}function Ps({row:e}){let t=e.original,n=!!t.isBenchmarking;return(0,I.jsxs)(`div`,{className:`${W.aiLatencyWrap} ${n?W.aiLatencyRunning:``}`,onClick:e=>{e.stopPropagation();let n=window.__fcmRowBenchmarkHandler;typeof n==`function`&&n(t)},title:n?`Benchmarking…`:`Click to run AI Speed Test (TUI: Ctrl+A)`,children:[(0,I.jsx)(ps,{result:t.benchmark||null,isRunning:n}),!n&&(0,I.jsx)(`span`,{className:W.aiLatencyPlay,"aria-hidden":`true`,children:(0,I.jsx)(qr,{size:10,stroke:1.5})})]})}function Fs({row:e}){let t=e.original;return(0,I.jsx)(gs,{result:t.benchmark||null,isRunning:!!t.isBenchmarking})}function Is({row:e}){return(0,I.jsx)(us,{history:e.original.pingHistory})}var Ls=({favorites:e,onBenchmarkRow:t,onSelectModel:n,onLaunch:r,toolMode:i})=>[xs.display({id:`fav`,header:`⭐`,size:32,enableSorting:!1,cell:({row:t})=>{let n=t.original,r=e.isFavorite(n);return(0,I.jsx)(`button`,{className:`${W.favBtn} ${r?W.favBtnActive:``}`,onClick:t=>{t.stopPropagation(),e.toggle(n)},title:r?`Unfavorite ${n.label} (TUI: F)`:`Favorite ${n.label} (TUI: F)`,"aria-label":r?`Unfavorite ${n.label}`:`Favorite ${n.label}`,"aria-pressed":r,children:r?(0,I.jsx)(Jr,{size:14,stroke:1.5}):(0,I.jsx)(Rr,{size:14,stroke:1.5})})}}),xs.display({id:`mood`,header:`❔`,size:28,cell:Cs,enableSorting:!0}),xs.accessor(`idx`,{header:`#`,size:36,enableSorting:!0,cell:({getValue:e,row:t})=>(0,I.jsx)(`span`,{className:W.rankNum,children:e()??t.index+1})}),xs.accessor(`tier`,{header:`Tier`,size:48,enableSorting:!0,cell:({getValue:e})=>(0,I.jsx)(zo,{tier:e()})}),xs.accessor(`sweScore`,{header:`SWE%`,size:52,enableSorting:!0,cell:Ts}),xs.accessor(`ctx`,{header:`CTX`,size:48,enableSorting:!0,cell:Es}),xs.accessor(`label`,{header:`Model`,size:200,enableSorting:!0,cell:ws}),xs.accessor(`origin`,{header:`Provider`,size:150,enableSorting:!0,cell:Ds}),xs.display({id:`latestPing`,header:`Last Ping`,size:80,cell:Os,enableSorting:!0}),xs.accessor(`avg`,{header:`Avg`,size:72,enableSorting:!0,cell:ks}),xs.accessor(`status`,{id:`condition`,header:`Health`,size:120,enableSorting:!0,cell:As}),xs.accessor(`verdict`,{header:`Verdict`,size:100,enableSorting:!0,cell:js}),xs.accessor(`stability`,{header:`Stability`,size:90,enableSorting:!0,cell:Ms}),xs.accessor(`uptime`,{header:`Up%`,size:48,enableSorting:!0,cell:Ns}),xs.display({id:`aiLatency`,header:`AI Lat.`,size:80,cell:Ps,enableSorting:!0}),xs.display({id:`tps`,header:`TPS`,size:48,cell:Fs,enableSorting:!0}),xs.display({id:`trend`,header:`Trend`,size:96,cell:Is,enableSorting:!0}),xs.display({id:`launch`,header:`🔌`,size:42,enableSorting:!1,cell:({row:e})=>(0,I.jsx)(`div`,{className:W.launchCell,children:(0,I.jsx)(vs,{model:e.original,toolMode:i,onLaunch:r,variant:`icon`})})})],Rs=Ls({favorites:{isFavorite:()=>!1,toggle:()=>{}},onBenchmarkRow:null,onSelectModel:null,onLaunch:null,toolMode:`opencode`}).reduce((e,t)=>(t.id&&(e[t.id]=t.size??80),e),{});function zs({filtered:e,onSelectModel:t,onBenchmarkRow:n,onLaunch:r,favorites:i,sortColumn:a,sortDirection:o,onSort:s,toolMode:c=null,onToast:l,onSetToolMode:u,onCycleToolMode:d,onOpenFallback:f}){let[p,m]=(0,v.useState)(null),h=(0,v.useCallback)(e=>{let t=`${e.providerKey}/${e.modelId}`;m(e=>e===t?null:t)},[]),g=(0,v.useMemo)(()=>{let t=e.filter(e=>e.status===`up`&&e.avg!=null&&e.avg!==1/0&&e.avg<99e3);return new Set([...t].sort((e,t)=>e.avg-t.avg).slice(0,3).map(e=>e.modelId))},[e]);(0,v.useEffect)(()=>{if(typeof n!=`function`){window.__fcmRowBenchmarkHandler=null;return}return window.__fcmRowBenchmarkHandler=n,()=>{window.__fcmRowBenchmarkHandler===n&&(window.__fcmRowBenchmarkHandler=null)}},[n]);let _=(0,v.useMemo)(()=>Ls({favorites:i,onBenchmarkRow:n,onSelectModel:t,onLaunch:r,toolMode:c}),[i,n,t,r,c]),{columnSizing:y,setColumnSizing:b,resetColumnSizing:x,hasCustomSizing:S}=Po(Rs),C=wo({data:e,columns:_,defaultColumn:{enableSorting:!0},getCoreRowModel:yo(),columnResizeMode:`onChange`,state:{columnSizing:y},onColumnSizingChange:b}),w=C.getRowModel().rows,T=(0,v.useMemo)(()=>C.getAllColumns().reduce((e,t)=>e+t.getSize(),0),[y]),E=!!C.getState().columnSizingInfo?.isResizingColumn;return(0,v.useEffect)(()=>{if(!(typeof document>`u`))return E?document.body.classList.add(`col-resizing`):document.body.classList.remove(`col-resizing`),()=>{document.body.classList.remove(`col-resizing`)}},[E]),w.length===0?(0,I.jsx)(`div`,{className:W.empty,children:`No models match your filters`}):(0,I.jsxs)(`div`,{className:W.container,children:[S&&(0,I.jsxs)(`div`,{className:W.resizeToolbar,children:[(0,I.jsxs)(`span`,{className:W.resizeToolbarHint,children:[`📐 Custom column widths · total `,(0,I.jsxs)(`strong`,{children:[Math.round(T),`px`]})]}),(0,I.jsx)(`button`,{type:`button`,className:W.resizeResetButton,onClick:x,title:`Restore the default column widths`,children:`↺ Reset columns`})]}),(0,I.jsxs)(`table`,{className:W.table,style:S?{minWidth:`${T}px`}:void 0,children:[(0,I.jsx)(`thead`,{children:C.getHeaderGroups().map(e=>(0,I.jsx)(`tr`,{children:e.headers.map(e=>{let t=e.column,n=Ss.has(t.id),r=t.getIsResizing?.()===!0,i=`${e.getSize()}px`;return(0,I.jsx)(`th`,{className:W.th,onClick:n?()=>s(e.id):void 0,style:{width:i,minWidth:i,maxWidth:i,cursor:n?`pointer`:`default`},title:`Sort ${t.columnDef.header}: asc → desc → reset`,children:(0,I.jsxs)(`div`,{className:W.thInner,children:[(0,I.jsxs)(`span`,{className:W.thLabel,children:[bo(t.columnDef.header,e.getContext()),n&&(0,I.jsx)(`span`,{className:a===t.id?W.sortIconActive:W.sortIcon,children:a===t.id?o===`asc`?`↑`:`↓`:`⇅`})]}),(0,I.jsx)(`span`,{className:`${W.resizeHandle} ${r?W.resizeHandleActive:``}`,onClick:e=>e.stopPropagation(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),onDoubleClick:()=>{b(e=>({...e,[t.id]:Rs[t.id]}))},title:`Drag to resize ${t.columnDef.header} (double-click to reset this column)`,role:`separator`,"aria-orientation":`vertical`,"aria-label":`Resize ${t.columnDef.header} column`})]})},e.id)})},e.id))}),(0,I.jsx)(`tbody`,{children:w.map((e,t)=>{let a=e.original,o=p===`${a.providerKey}/${a.modelId}`,s=[...g].indexOf(a.modelId),m=[];return s>=0&&m.push(W[`rank${s+1}`]),a.isBenchmarking&&m.push(W.benchRow),o&&m.push(W.expandedRow),c&&(bn(a.providerKey).includes(c)||m.push(W.incompatible)),(a.status===`noauth`||a.status===`auth_error`)&&m.push(W.unusable),(0,I.jsxs)(v.Fragment,{children:[(0,I.jsx)(`tr`,{className:m.join(` `),onClick:()=>h(a),children:e.getVisibleCells().map(e=>{let t=`${e.column.getSize()}px`;return(0,I.jsx)(`td`,{className:W.td,style:{width:t,minWidth:t,maxWidth:t},children:bo(e.column.columnDef.cell,e.getContext())},e.id)})}),o&&(0,I.jsx)(`tr`,{className:W.expandRowWrapper,children:(0,I.jsx)(`td`,{colSpan:e.getVisibleCells().length,className:W.expandRowCell,children:(0,I.jsx)(bs,{model:a,favorites:i,onBenchmark:n,onLaunch:r,onToast:l,toolMode:c,onSetToolMode:u,onCycleToolMode:d,onOpenFallback:f})})})]},e.id)})})]})]})}function Bs(e,t,n){let r=new Blob([e],{type:n}),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=t,a.click(),URL.revokeObjectURL(i)}var Vs={overlay:`_overlay_1e3f5_1`,fadeIn:`_fadeIn_1e3f5_1`,modal:`_modal_1e3f5_18`,modalSlideIn:`_modalSlideIn_1e3f5_1`,modalHeader:`_modalHeader_1e3f5_33`,modalTitle:`_modalTitle_1e3f5_40`,modalClose:`_modalClose_1e3f5_45`,modalBody:`_modalBody_1e3f5_57`,options:`_options_1e3f5_60`,option:`_option_1e3f5_60`,optionIcon:`_optionIcon_1e3f5_84`,optionText:`_optionText_1e3f5_88`,optionLabel:`_optionLabel_1e3f5_89`,optionDesc:`_optionDesc_1e3f5_94`};function Hs({models:e,onClose:t,onToast:n}){return e?(0,I.jsx)(`div`,{className:Vs.overlay,onClick:e=>e.target===e.currentTarget&&t(),children:(0,I.jsxs)(`div`,{className:Vs.modal,children:[(0,I.jsxs)(`div`,{className:Vs.modalHeader,children:[(0,I.jsxs)(`h2`,{className:Vs.modalTitle,children:[(0,I.jsx)(Ur,{size:20,stroke:1.5,style:{marginRight:8,verticalAlign:`middle`}}),`Export Data`]}),(0,I.jsx)(`button`,{className:Vs.modalClose,onClick:t,children:`×`})]}),(0,I.jsx)(`div`,{className:Vs.modalBody,children:(0,I.jsxs)(`div`,{className:Vs.options,children:[(0,I.jsxs)(`button`,{className:Vs.option,onClick:()=>{Bs(JSON.stringify(e,null,2),`free-coding-models-export.json`,`application/json`),n?.(`Exported as JSON`,`success`),t()},children:[(0,I.jsx)(`span`,{className:Vs.optionIcon,children:(0,I.jsx)(Gn,{size:20,stroke:1.5})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`span`,{className:Vs.optionLabel,children:`Export as JSON`}),(0,I.jsx)(`span`,{className:Vs.optionDesc,children:`Full model data with all metrics`})]})]}),(0,I.jsxs)(`button`,{className:Vs.option,onClick:()=>{let r=[`Rank`,`Tier`,`Model`,`Provider`,`SWE%`,`Context`,`LatestPing`,`AvgPing`,`Stability`,`Verdict`,`Uptime`],i=e.map((e,t)=>[t+1,e.tier,e.label,e.origin,e.sweScore||``,e.ctx||``,e.latestPing||``,e.avg===1/0?``:e.avg,e.stability||``,e.verdict||``,e.uptime||``].join(`,`));Bs([r.join(`,`),...i].join(`
|
|
40
40
|
`),`free-coding-models-export.csv`,`text/csv`),n?.(`Exported as CSV`,`success`),t()},children:[(0,I.jsx)(`span`,{className:Vs.optionIcon,children:(0,I.jsx)(ur,{size:20,stroke:1.5})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`span`,{className:Vs.optionLabel,children:`Export as CSV`}),(0,I.jsx)(`span`,{className:Vs.optionDesc,children:`Spreadsheet-compatible format`})]})]}),(0,I.jsxs)(`button`,{className:Vs.option,onClick:async()=>{let r=e.filter(e=>e.status===`up`),i=`free-coding-models Dashboard Export\nTotal: ${e.length} | Online: ${r.length}\n\n`+r.slice(0,20).map((e,t)=>`${t+1}. ${e.label} [${e.tier}] — ${e.avg===1/0?`N/A`:e.avg+`ms`} (${e.origin})`).join(`
|
|
41
|
-
`);await navigator.clipboard.writeText(i),n?.(`Copied to clipboard`,`success`),t()},children:[(0,I.jsx)(`span`,{className:Vs.optionIcon,children:(0,I.jsx)($n,{size:20,stroke:1.5})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`span`,{className:Vs.optionLabel,children:`Copy to Clipboard`}),(0,I.jsx)(`span`,{className:Vs.optionDesc,children:`Copy model summary as text`})]})]})]})})]})}):null}var G={page:`_page_1847y_1`,pageHeader:`_pageHeader_1847y_5`,pageTitle:`_pageTitle_1847y_9`,pageSubtitle:`_pageSubtitle_1847y_15`,loading:`_loading_1847y_30`,featureSection:`_featureSection_1847y_37`,sectionHeading:`_sectionHeading_1847y_44`,featureGrid:`_featureGrid_1847y_52`,featureRow:`_featureRow_1847y_57`,featureLabel:`_featureLabel_1847y_67`,featureTitle:`_featureTitle_1847y_79`,featureDesc:`_featureDesc_1847y_85`,featureActions:`_featureActions_1847y_91`,select:`_select_1847y_96`,toggleSwitch:`_toggleSwitch_1847y_110`,toggleSlider:`_toggleSlider_1847y_122`,smallBtn:`_smallBtn_1847y_148`,notice:`_notice_1847y_166`,testBadge:`_testBadge_1847y_178`,test_ok:`_test_ok_1847y_191`,test_auth_error:`_test_auth_error_1847y_192`,test_rate_limited:`_test_rate_limited_1847y_193`,test_no_callable_model:`_test_no_callable_model_1847y_194`,test_fail:`_test_fail_1847y_195`,test_missing_key:`_test_missing_key_1847y_196`,test_pending:`_test_pending_1847y_197`,testSpinner:`_testSpinner_1847y_199`,spin:`_spin_1847y_1`,toolbar:`_toolbar_1847y_210`,toolbarSearch:`_toolbarSearch_1847y_218`,toolbarActions:`_toolbarActions_1847y_250`,toolbarBtn:`_toolbarBtn_1847y_255`,providers:`_providers_1847y_276`,card:`_card_1847y_282`,cardHeader:`_cardHeader_1847y_295`,cardIcon:`_cardIcon_1847y_308`,cardInfo:`_cardInfo_1847y_320`,cardName:`_cardName_1847y_325`,cardMeta:`_cardMeta_1847y_330`,cardStatus:`_cardStatus_1847y_336`,statusConfigured:`_statusConfigured_1847y_344`,statusMissing:`_statusMissing_1847y_349`,toggleIcon:`_toggleIcon_1847y_354`,toggleIconExpanded:`_toggleIconExpanded_1847y_361`,cardBody:`_cardBody_1847y_365`,cardExpanded:`_cardExpanded_1847y_372`,cardContent:`_cardContent_1847y_377`,keyGroup:`_keyGroup_1847y_381`,keyLabel:`_keyLabel_1847y_385`,keyDisplay:`_keyDisplay_1847y_395`,keyDisplayValue:`_keyDisplayValue_1847y_406`,keyDisplayActions:`_keyDisplayActions_1847y_414`,actionBtn:`_actionBtn_1847y_420`,actionBtnDanger:`_actionBtnDanger_1847y_438`,keyInputRow:`_keyInputRow_1847y_448`,keyInput:`_keyInput_1847y_448`,saveBtn:`_saveBtn_1847y_475`,enabledRow:`_enabledRow_1847y_495`,enabledLabel:`_enabledLabel_1847y_504`},Us={ok:{label:`OK`,icon:Kr,className:`testOk`},auth_error:{label:`Auth error`,icon:vr,className:`testErr`},rate_limited:{label:`Rate limited`,icon:Mr,className:`testWarn`},no_callable_model:{label:`No callable model`,icon:vr,className:`testWarn`},fail:{label:`Failed`,icon:vr,className:`testErr`},missing_key:{label:`Missing key`,icon:vr,className:`testNeutral`}};function Ws({onToast:e,onOpenChangelog:t,onCheckForUpdate:n}){let[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(``),[s,c]=(0,v.useState)(new Set),[l,u]=(0,v.useState)(new Set),[d,f]=(0,v.useState)({}),[p,m]=(0,v.useState)({}),[h,g]=(0,v.useState)(new Set),[_,y]=(0,v.useState)(null),b=(0,v.useCallback)(async()=>{try{i(await(await fetch(`/api/config`)).json())}catch{e?.(`Failed to load settings`,`error`)}},[e]);(0,v.useEffect)(()=>{b()},[b]);let x=e=>{c(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},S=()=>{r&&c(new Set(Object.keys(r.providers)))},C=()=>c(new Set),w=async t=>{if(l.has(t)){u(e=>{let n=new Set(e);return n.delete(t),n});return}try{(await(await fetch(`/api/key/${t}`)).json()).key&&u(e=>new Set(e).add(t))}catch{e?.(`Failed to reveal key`,`error`)}},T=async t=>{try{let n=await(await fetch(`/api/key/${t}`)).json();n.key?(await navigator.clipboard.writeText(n.key),e?.(`API key copied to clipboard`,`success`)):e?.(`No key to copy`,`warning`)}catch{e?.(`Failed to copy key`,`error`)}},E=async t=>{let n=d[t]?.trim();if(!n){e?.(`Please enter an API key`,`warning`);return}try{let r=await(await fetch(`/api/settings`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({apiKeys:{[t]:n}})})).json();r.success?(e?.(`API key for ${t} saved successfully!`,`success`),f(e=>({...e,[t]:``})),u(e=>{let n=new Set(e);return n.delete(t),n}),await b(),c(e=>new Set(e).add(t))):e?.(r.error||`Failed to save`,`error`)}catch{e?.(`Network error while saving`,`error`)}},D=async t=>{if(confirm(`Are you sure you want to delete the API key for "${t}"?`))try{let n=await(await fetch(`/api/settings`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({apiKeys:{[t]:``}})})).json();n.success?(e?.(`API key for ${t} deleted`,`info`),u(e=>{let n=new Set(e);return n.delete(t),n}),await b()):e?.(n.error||`Failed to delete`,`error`)}catch{e?.(`Network error while deleting`,`error`)}},O=async(t,n)=>{try{let r=await(await fetch(`/api/settings`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({providers:{[t]:{enabled:n}}})})).json();r.success?e?.(`${t} ${n?`enabled`:`disabled`}`,`success`):e?.(r.error||`Failed to toggle`,`error`)}catch{e?.(`Network error`,`error`)}},ee=(0,v.useCallback)(async t=>{if(!h.has(t)){g(e=>new Set(e).add(t)),m(e=>({...e,[t]:{outcome:`pending`}}));try{let n=await fetch(`/api/key/${encodeURIComponent(t)}/test`,{method:`POST`}),r=await n.json().catch(()=>({}));if(n.ok){m(e=>({...e,[t]:r}));let n=Us[r.outcome]||Us.fail;e?.(`${t} test: ${n.label}${r.code?` (HTTP ${r.code})`:``}`,r.outcome===`ok`?`success`:`info`)}else m(e=>({...e,[t]:{outcome:`fail`,detail:r.error||`HTTP `+n.status}})),e?.(`${t} test failed: ${r.error||n.statusText}`,`error`)}catch(n){m(e=>({...e,[t]:{outcome:`fail`,detail:n.message}})),e?.(`${t} test failed: ${n.message}`,`error`)}finally{g(e=>{let n=new Set(e);return n.delete(t),n})}}},[h,e]),te=(0,v.useCallback)(async(t,n)=>{try{let r=await(await fetch(`/api/settings/feature`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(n===void 0?{feature:t}:{feature:t,value:n})})).json();r.success?(await b(),e?.(`${t} updated`,`success`)):e?.(r.error||`Failed to update feature`,`error`)}catch{e?.(`Network error`,`error`)}},[e]),k=(0,v.useCallback)(async t=>{try{let n=await(await fetch(`/api/shell-env/toggle`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({enabled:t})})).json();n.success?(await b(),e?.(`Shell env export ${n.enabled?`enabled`:`disabled`} — restart your shell to apply.`,`success`)):e?.(n.error||`Failed to toggle shell env`,`error`)}catch{e?.(`Network error`,`error`)}},[e]),ne=(0,v.useCallback)(async()=>{if(confirm(`Remove discontinued proxy config leftovers? This is safe to run.`))try{let t=await(await fetch(`/api/legacy-cleanup`,{method:`POST`})).json(),n=(t.removedFiles?.length||0)+(t.updatedFiles?.length||0);t.changed?(y(`Cleaned ${n} legacy file(s). ${t.errors.length} error(s).`),e?.(`Legacy proxy cleanup: ${n} file(s) cleaned.`,`success`)):(y(`No discontinued proxy config was found. You are on the stable direct-provider setup.`),e?.(`No legacy proxy config found — already on stable setup.`,`info`)),await b()}catch(t){e?.(`Legacy cleanup failed: ${t.message}`,`error`)}},[e]),re=(0,v.useCallback)(()=>{n?.()},[n]);if(!r)return(0,I.jsx)(`div`,{className:G.page,children:(0,I.jsx)(`div`,{className:G.loading,children:`Loading settings...`})});let ie=Object.entries(r.providers).filter(([,e])=>{if(!a)return!0;let t=a.toLowerCase();return e.name.toLowerCase().includes(t)}).sort((e,t)=>e[1].name.localeCompare(t[1].name));return(0,I.jsxs)(`div`,{className:G.page,children:[(0,I.jsxs)(`div`,{className:G.pageHeader,children:[(0,I.jsxs)(`h1`,{className:G.pageTitle,children:[(0,I.jsx)(Ir,{size:24,stroke:1.5,style:{marginRight:8,verticalAlign:`middle`}}),`Settings`]}),(0,I.jsxs)(`p`,{className:G.pageSubtitle,children:[`API keys, theme, favorites mode, shell env, and update controls. All settings are stored locally in `,(0,I.jsx)(`code`,{children:`~/.free-coding-models.json`}),`and shared with the TUI.`]})]}),r&&(0,I.jsxs)(`section`,{className:G.featureSection,children:[(0,I.jsx)(`h2`,{className:G.sectionHeading,children:`⚙️ Global settings`}),(0,I.jsxs)(`div`,{className:G.featureGrid,children:[(0,I.jsxs)(`div`,{className:G.featureRow,children:[(0,I.jsxs)(`div`,{className:G.featureLabel,children:[(0,I.jsx)(zr,{size:16,stroke:1.5}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:G.featureTitle,children:`Theme`}),(0,I.jsx)(`div`,{className:G.featureDesc,children:`Tri-state cycle. Auto follows your OS.`})]})]}),(0,I.jsxs)(`select`,{className:G.select,value:r.settings?.theme||`auto`,onChange:e=>te(`theme`,e.target.value),children:[(0,I.jsx)(`option`,{value:`auto`,children:`Auto (OS)`}),(0,I.jsx)(`option`,{value:`dark`,children:`Dark`}),(0,I.jsx)(`option`,{value:`light`,children:`Light`})]})]}),(0,I.jsxs)(`div`,{className:G.featureRow,children:[(0,I.jsxs)(`div`,{className:G.featureLabel,children:[(0,I.jsx)(Rr,{size:16,stroke:1.5}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:G.featureTitle,children:`Favorites pinned + always visible`}),(0,I.jsx)(`div`,{className:G.featureDesc,children:`Favorites bypass filters and stay on top (TUI: Y key).`})]})]}),(0,I.jsxs)(`label`,{className:G.toggleSwitch,children:[(0,I.jsx)(`input`,{type:`checkbox`,checked:!!r.settings?.favoritesPinnedAndSticky,onChange:e=>te(`favoritesPinnedAndSticky`,e.target.checked)}),(0,I.jsx)(`span`,{className:G.toggleSlider})]})]}),(0,I.jsxs)(`div`,{className:G.featureRow,children:[(0,I.jsxs)(`div`,{className:G.featureLabel,children:[(0,I.jsx)(Wn,{size:16,stroke:1.5}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:G.featureTitle,children:`Run AI Speed Test on startup`}),(0,I.jsx)(`div`,{className:G.featureDesc,children:`Auto-fire the global benchmark right after launch (TUI: U → 'Enable').`})]})]}),(0,I.jsxs)(`label`,{className:G.toggleSwitch,children:[(0,I.jsx)(`input`,{type:`checkbox`,checked:!!r.settings?.runAiSpeedTestOnStartup,onChange:e=>te(`runAiSpeedTestOnStartup`,e.target.checked)}),(0,I.jsx)(`span`,{className:G.toggleSlider})]})]}),(0,I.jsxs)(`div`,{className:G.featureRow,children:[(0,I.jsxs)(`div`,{className:G.featureLabel,children:[(0,I.jsx)(Qn,{size:16,stroke:1.5}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:G.featureTitle,children:`Export API keys to shell rc`}),(0,I.jsx)(`div`,{className:G.featureDesc,children:`Write NVIDIA_API_KEY / GROQ_API_KEY / … to your shell rc file.`})]})]}),(0,I.jsxs)(`label`,{className:G.toggleSwitch,children:[(0,I.jsx)(`input`,{type:`checkbox`,checked:!!r.settings?.shellEnvEnabled,onChange:e=>k(e.target.checked)}),(0,I.jsx)(`span`,{className:G.toggleSlider})]})]}),(0,I.jsxs)(`div`,{className:G.featureRow,children:[(0,I.jsxs)(`div`,{className:G.featureLabel,children:[(0,I.jsx)(ar,{size:16,stroke:1.5}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:G.featureTitle,children:`Check for updates`}),(0,I.jsx)(`div`,{className:G.featureDesc,children:`The header chip turns green when a newer npm version is available. Use the 'Update now' button to install.`})]})]}),(0,I.jsxs)(`div`,{className:G.featureActions,children:[(0,I.jsx)(`button`,{className:G.smallBtn,onClick:re,children:`Check now`}),(0,I.jsxs)(`button`,{className:G.smallBtn,onClick:()=>t?.(null),children:[(0,I.jsx)(hr,{size:13,stroke:1.5}),` Changelog`]})]})]}),(0,I.jsxs)(`div`,{className:G.featureRow,children:[(0,I.jsxs)(`div`,{className:G.featureLabel,children:[(0,I.jsx)(Mr,{size:16,stroke:1.5}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:G.featureTitle,children:`Cleanup discontinued proxy artifacts`}),(0,I.jsx)(`div`,{className:G.featureDesc,children:`Remove old config / env / service leftovers from the old multi-tool proxy.`})]})]}),(0,I.jsx)(`button`,{className:G.smallBtn,onClick:ne,children:`Run cleanup`})]})]}),_&&(0,I.jsx)(`div`,{className:G.notice,children:_})]}),(0,I.jsxs)(`div`,{className:G.toolbar,children:[(0,I.jsxs)(`div`,{className:G.toolbarSearch,children:[(0,I.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:[(0,I.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,I.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]}),(0,I.jsx)(`input`,{type:`text`,placeholder:`Search providers...`,value:a,onChange:e=>o(e.target.value),autoComplete:`off`})]}),(0,I.jsxs)(`div`,{className:G.toolbarActions,children:[(0,I.jsx)(`button`,{className:G.toolbarBtn,onClick:S,children:`Expand All`}),(0,I.jsx)(`button`,{className:G.toolbarBtn,onClick:C,children:`Collapse All`})]})]}),(0,I.jsx)(`div`,{className:G.providers,children:ie.map(([e,t])=>{let n=s.has(e),r=l.has(e);return(0,I.jsxs)(`div`,{className:`${G.card} ${n?G.cardExpanded:``}`,children:[(0,I.jsxs)(`div`,{className:G.cardHeader,onClick:()=>x(e),children:[(0,I.jsx)(`div`,{className:G.cardIcon,children:(0,I.jsx)(kr,{size:20,stroke:1.5})}),(0,I.jsxs)(`div`,{className:G.cardInfo,children:[(0,I.jsx)(`div`,{className:G.cardName,children:t.name}),(0,I.jsxs)(`div`,{className:G.cardMeta,children:[t.modelCount,` models · `,e]})]}),(0,I.jsx)(`span`,{className:`${G.cardStatus} ${t.hasKey?G.statusConfigured:G.statusMissing}`,children:t.hasKey?(0,I.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,I.jsx)(Qn,{size:14,stroke:1.5}),` Active`]}):(0,I.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,I.jsx)(vr,{size:14,stroke:1.5}),` No Key`]})}),(0,I.jsx)(`span`,{className:`${G.toggleIcon} ${n?G.toggleIconExpanded:``}`,children:`▼`})]}),(0,I.jsx)(`div`,{className:G.cardBody,children:(0,I.jsxs)(`div`,{className:G.cardContent,children:[t.hasKey&&p[e]&&(0,I.jsx)(`div`,{className:`${G.testBadge} ${G[`test_${p[e].outcome}`]||``}`,children:(()=>{let t=Us[p[e].outcome]||Us.fail,n=t.icon;return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(n,{size:12,stroke:1.5}),(0,I.jsxs)(`span`,{children:[`Last test: `,t.label,p[e].code?` (HTTP ${p[e].code})`:``]})]})})()}),t.hasKey&&(0,I.jsxs)(`div`,{className:G.keyGroup,children:[(0,I.jsx)(`label`,{className:G.keyLabel,children:`Current API Key`}),(0,I.jsxs)(`div`,{className:G.keyDisplay,children:[(0,I.jsx)(`span`,{className:G.keyDisplayValue,children:r?t.maskedKey||`••••••••`:Wt(t.maskedKey||``)}),(0,I.jsxs)(`div`,{className:G.keyDisplayActions,children:[(0,I.jsx)(`button`,{className:G.actionBtn,onClick:()=>w(e),title:r?`Hide`:`Reveal`,children:r?(0,I.jsx)(cr,{size:14,stroke:1.5}):(0,I.jsx)(lr,{size:14,stroke:1.5})}),(0,I.jsx)(`button`,{className:G.actionBtn,onClick:()=>T(e),title:`Copy`,children:(0,I.jsx)(rr,{size:14,stroke:1.5})}),(0,I.jsxs)(`button`,{className:G.actionBtn,onClick:()=>ee(e),disabled:h.has(e),title:`Test this key against the provider (TUI: T key in Settings)`,"aria-label":`Test key for ${e}`,children:[h.has(e)?(0,I.jsx)(`span`,{className:G.testSpinner}):(0,I.jsx)(Wn,{size:14,stroke:1.5}),h.has(e)?`Testing…`:`Test`]}),(0,I.jsx)(`button`,{className:`${G.actionBtn} ${G.actionBtnDanger}`,onClick:()=>D(e),title:`Delete Key`,children:(0,I.jsx)(Vr,{size:14,stroke:1.5})})]})]})]}),(0,I.jsxs)(`div`,{className:G.keyGroup,children:[(0,I.jsx)(`label`,{className:G.keyLabel,children:t.hasKey?`Update API Key`:`Add API Key`}),(0,I.jsxs)(`div`,{className:G.keyInputRow,children:[(0,I.jsx)(`input`,{type:`password`,className:G.keyInput,placeholder:`Enter your API key...`,value:d[e]||``,onChange:t=>f(n=>({...n,[e]:t.target.value})),autoComplete:`off`}),(0,I.jsx)(`button`,{className:G.saveBtn,onClick:()=>E(e),children:t.hasKey?`Update`:`Save`})]})]}),(0,I.jsxs)(`div`,{className:G.enabledRow,children:[(0,I.jsx)(`span`,{className:G.enabledLabel,children:`Provider Enabled`}),(0,I.jsxs)(`label`,{className:G.toggleSwitch,children:[(0,I.jsx)(`input`,{type:`checkbox`,defaultChecked:t.enabled!==!1,onChange:t=>O(e,t.target.checked)}),(0,I.jsx)(`span`,{className:G.toggleSlider})]})]})]})})]},e)})})]})}function Gs(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(!0),i=(0,v.useCallback)(async()=>{r(!0);try{t(Ks(await(await fetch(`/api/router/tokens`)).json()))}catch{t(null)}finally{r(!1)}},[]);return(0,v.useEffect)(()=>{i()},[i]),{data:e,loading:n,refresh:i}}function Ks(e){if(!e)return null;let t=e.daily||{},n=e.all_time||{},r=[],i=new Date;for(let e=6;e>=0;e--){let n=new Date(i);n.setDate(n.getDate()-e);let a=n.toISOString().slice(0,10),o=t[a]||{total_tokens:0,requests:0};r.push({date:a,label:n.toLocaleDateString(`en`,{weekday:`short`}),totalTokens:o.total_tokens||0,requests:o.requests||0})}let a={};for(let e of Object.values(t)){let t=e.by_model||{};for(let[e,n]of Object.entries(t))a[e]||(a[e]={total:0,requests:0}),a[e].total+=n.total||0,a[e].requests+=n.requests||0}let o=Object.entries(a).sort((e,t)=>t[1].total-e[1].total).slice(0,10).map(([e,t])=>({key:e,...t})),s={};for(let[e,t]of Object.entries(a)){let n=e.split(`/`)[0];s[n]||(s[n]={total:0,requests:0}),s[n].total+=t.total,s[n].requests+=t.requests}let c=Object.entries(s).sort((e,t)=>t[1].total-e[1].total).slice(0,10).map(([e,t])=>({key:e,...t})),l=t[i.toISOString().slice(0,10)]||{};return{today:{totalTokens:l.total_tokens||0,promptTokens:l.prompt_tokens||0,completionTokens:l.completion_tokens||0,requests:l.requests||0},allTime:{totalTokens:n.total_tokens||0,promptTokens:n.prompt_tokens||0,completionTokens:n.completion_tokens||0,requests:n.requests||0},sevenDays:r,topModels:o,topProviders:c,hasData:n.total_tokens>0||Object.keys(t).length>0}}var K={card:`_card_1m2zx_1`,cardTitle:`_cardTitle_1m2zx_5`,empty:`_empty_1m2zx_14`,summaryGrid:`_summaryGrid_1m2zx_22`,summaryCard:`_summaryCard_1m2zx_29`,summaryLabel:`_summaryLabel_1m2zx_39`,summaryValue:`_summaryValue_1m2zx_47`,summarySub:`_summarySub_1m2zx_53`,chart:`_chart_1m2zx_59`,chartBar:`_chartBar_1m2zx_67`,chartFill:`_chartFill_1m2zx_77`,chartLabel:`_chartLabel_1m2zx_85`,topList:`_topList_1m2zx_92`,topRow:`_topRow_1m2zx_98`,topKey:`_topKey_1m2zx_106`,topVal:`_topVal_1m2zx_115`,topReq:`_topReq_1m2zx_121`};function qs(e){return typeof e!=`number`||!Number.isFinite(e)?`0`:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(Math.round(e))}function Js(){let{data:e,loading:t}=Gs();if(t)return(0,I.jsxs)(`div`,{className:K.card,children:[(0,I.jsx)(`h3`,{className:K.cardTitle,children:`Token Usage`}),(0,I.jsx)(`div`,{className:K.empty,children:`Loading…`})]});if(!e||!e.hasData)return(0,I.jsxs)(`div`,{className:K.card,children:[(0,I.jsx)(`h3`,{className:K.cardTitle,children:`Token Usage`}),(0,I.jsx)(`div`,{className:K.empty,children:`No token data yet. Start the router and send requests to track usage.`})]});let n=Math.max(...e.sevenDays.map(e=>e.totalTokens),1);return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:K.summaryGrid,children:[(0,I.jsxs)(`div`,{className:K.summaryCard,children:[(0,I.jsx)(`span`,{className:K.summaryLabel,children:`Today`}),(0,I.jsx)(`span`,{className:K.summaryValue,children:qs(e.today.totalTokens)}),(0,I.jsxs)(`span`,{className:K.summarySub,children:[e.today.requests,` requests`]})]}),(0,I.jsxs)(`div`,{className:K.summaryCard,children:[(0,I.jsx)(`span`,{className:K.summaryLabel,children:`All Time`}),(0,I.jsx)(`span`,{className:K.summaryValue,children:qs(e.allTime.totalTokens)}),(0,I.jsxs)(`span`,{className:K.summarySub,children:[e.allTime.requests,` requests`]})]})]}),(0,I.jsxs)(`div`,{className:K.card,children:[(0,I.jsx)(`h3`,{className:K.cardTitle,children:`7-Day Usage`}),(0,I.jsx)(`div`,{className:K.chart,children:e.sevenDays.map(e=>(0,I.jsxs)(`div`,{className:K.chartBar,children:[(0,I.jsx)(`div`,{className:K.chartFill,style:{height:`${Math.max(2,e.totalTokens/n*100)}%`},title:`${e.date}: ${qs(e.totalTokens)} tokens`}),(0,I.jsx)(`span`,{className:K.chartLabel,children:e.label})]},e.date))})]}),e.topModels.length>0&&(0,I.jsxs)(`div`,{className:K.card,children:[(0,I.jsx)(`h3`,{className:K.cardTitle,children:`Top Models`}),(0,I.jsx)(`div`,{className:K.topList,children:e.topModels.map(e=>(0,I.jsxs)(`div`,{className:K.topRow,children:[(0,I.jsx)(`span`,{className:K.topKey,children:e.key}),(0,I.jsxs)(`span`,{className:K.topVal,children:[qs(e.total),` tokens`]}),(0,I.jsxs)(`span`,{className:K.topReq,children:[e.requests,` req`]})]},e.key))})]}),e.topProviders.length>0&&(0,I.jsxs)(`div`,{className:K.card,children:[(0,I.jsx)(`h3`,{className:K.cardTitle,children:`Top Providers`}),(0,I.jsx)(`div`,{className:K.topList,children:e.topProviders.map(e=>(0,I.jsxs)(`div`,{className:K.topRow,children:[(0,I.jsx)(`span`,{className:K.topKey,children:e.key}),(0,I.jsxs)(`span`,{className:K.topVal,children:[qs(e.total),` tokens`]}),(0,I.jsxs)(`span`,{className:K.topReq,children:[e.requests,` req`]})]},e.key))})]})]})}var q={page:`_page_1n8f8_1`,pageHeader:`_pageHeader_1n8f8_5`,pageTitle:`_pageTitle_1n8f8_9`,pageSubtitle:`_pageSubtitle_1n8f8_15`,grid:`_grid_1n8f8_21`,card:`_card_1n8f8_27`,cardWide:`_cardWide_1n8f8_36`,cardTitle:`_cardTitle_1n8f8_40`,cardBody:`_cardBody_1n8f8_46`,empty:`_empty_1n8f8_49`,healthItem:`_healthItem_1n8f8_55`,healthName:`_healthName_1n8f8_67`,healthBar:`_healthBar_1n8f8_74`,healthFill:`_healthFill_1n8f8_82`,healthPct:`_healthPct_1n8f8_89`,pctFast:`_pctFast_1n8f8_97`,pctMedium:`_pctMedium_1n8f8_98`,pctSlow:`_pctSlow_1n8f8_99`,leaderItem:`_leaderItem_1n8f8_105`,leaderRank:`_leaderRank_1n8f8_117`,rank1:`_rank1_1n8f8_131`,rank2:`_rank2_1n8f8_132`,rank3:`_rank3_1n8f8_133`,leaderName:`_leaderName_1n8f8_135`,leaderLatency:`_leaderLatency_1n8f8_145`,tierItem:`_tierItem_1n8f8_153`,tierBadge:`_tierBadge_1n8f8_160`,tierBar:`_tierBar_1n8f8_165`,tierFill:`_tierFill_1n8f8_173`,tierCount:`_tierCount_1n8f8_179`};function Ys(e,t){return typeof window>`u`||!window.document?.documentElement?t:getComputedStyle(document.documentElement).getPropertyValue(e).trim()||t}var Xs={"S+":`--tier-splus`,S:`--tier-s`,"A+":`--tier-aplus`,A:`--tier-a`,"A-":`--tier-aminus`,"B+":`--tier-bplus`,B:`--tier-b`,C:`--tier-c`},Zs={"S+":`#ffd700`,S:`#ff8c00`,"A+":`#00c8ff`,A:`#3ddc84`,"A-":`#7ecf7e`,"B+":`#a8a8c8`,B:`#808098`,C:`#606078`};function Qs(e){return Ys(Xs[e],Zs[e])}var $s=[`S+`,`S`,`A+`,`A`,`A-`,`B+`,`B`,`C`];function ec({models:e}){let t=(0,v.useMemo)(()=>{let t={};return e.forEach(e=>{t[e.origin]||(t[e.origin]={total:0,online:0,key:e.providerKey}),t[e.origin].total++,e.status===`up`&&t[e.origin].online++}),Object.entries(t).sort((e,t)=>t[1].online/t[1].total-e[1].online/e[1].total)},[e]),n=(0,v.useMemo)(()=>[...e.filter(e=>e.status===`up`&&e.avg!==1/0&&e.avg<99e3)].sort((e,t)=>e.avg-t.avg).slice(0,10),[e]),r=(0,v.useMemo)(()=>{let t={};e.forEach(e=>{t[e.tier]=(t[e.tier]||0)+1});let n=Math.max(...Object.values(t),1);return $s.map(e=>({tier:e,count:t[e]||0,pct:(t[e]||0)/n*100}))},[e]);return(0,I.jsxs)(`div`,{className:q.page,children:[(0,I.jsxs)(`div`,{className:q.pageHeader,children:[(0,I.jsxs)(`h1`,{className:q.pageTitle,children:[(0,I.jsx)(Ln,{size:24,stroke:1.5,style:{marginRight:8,verticalAlign:`middle`}}),`Analytics`]}),(0,I.jsx)(`p`,{className:q.pageSubtitle,children:`Real-time insights across all providers and models`})]}),(0,I.jsxs)(`div`,{className:q.grid,children:[(0,I.jsxs)(`div`,{className:`${q.card} ${q.cardWide}`,children:[(0,I.jsx)(`h3`,{className:q.cardTitle,children:`Provider Health Overview`}),(0,I.jsx)(`div`,{className:q.cardBody,children:t.length===0?(0,I.jsx)(`div`,{className:q.empty,children:`Waiting for data...`}):t.map(([e,t])=>{let n=t.total>0?Math.round(t.online/t.total*100):0,r=n>70?q.pctFast:n>30?q.pctMedium:q.pctSlow;return(0,I.jsxs)(`div`,{className:q.healthItem,children:[(0,I.jsx)(`span`,{className:q.healthName,children:e}),(0,I.jsx)(`div`,{className:q.healthBar,children:(0,I.jsx)(`div`,{className:q.healthFill,style:{width:`${n}%`}})}),(0,I.jsxs)(`span`,{className:`${q.healthPct} ${r}`,children:[n,`%`]})]},e)})})]}),(0,I.jsxs)(`div`,{className:q.card,children:[(0,I.jsxs)(`h3`,{className:q.cardTitle,style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,I.jsx)(Hr,{size:16,stroke:1.5}),`Fastest Models`]}),(0,I.jsx)(`div`,{className:q.cardBody,children:n.length===0?(0,I.jsx)(`div`,{className:q.empty,children:`Waiting for ping data...`}):n.map((e,t)=>{let n=t<3?q[`rank${t+1}`]:``;return(0,I.jsxs)(`div`,{className:q.leaderItem,children:[(0,I.jsx)(`div`,{className:`${q.leaderRank} ${n}`,children:t+1}),(0,I.jsx)(`span`,{className:q.leaderName,children:e.label}),(0,I.jsxs)(`span`,{className:q.leaderLatency,children:[e.avg,`ms`]})]},e.modelId)})})]}),(0,I.jsxs)(`div`,{className:q.card,children:[(0,I.jsx)(`h3`,{className:q.cardTitle,children:`Tier Distribution`}),(0,I.jsx)(`div`,{className:q.cardBody,children:r.map(({tier:e,count:t,pct:n})=>(0,I.jsxs)(`div`,{className:q.tierItem,children:[(0,I.jsx)(`div`,{className:q.tierBadge,children:(0,I.jsx)(zo,{tier:e})}),(0,I.jsx)(`div`,{className:q.tierBar,children:(0,I.jsx)(`div`,{className:q.tierFill,style:{width:`${n}%`,background:Qs(e)}})}),(0,I.jsx)(`span`,{className:q.tierCount,children:t})]},e))})]})]}),(0,I.jsx)(Js,{})]})}var tc={nvidia:{name:`NVIDIA NIM`,url:`https://integrate.api.nvidia.com/v1/chat/completions`,models:[[`minimaxai/minimax-m2.7`,`MiniMax M2.7`,`S+`,`80.2%`,`200k`],[`z-ai/glm-5.1`,`GLM 5.1`,`S+`,`77.8%`,`128k`],[`moonshotai/kimi-k2.6`,`Kimi K2.6`,`S+`,`76.8%`,`256k`],[`deepseek-ai/deepseek-v4-pro`,`DeepSeek V4 Pro`,`S+`,`73.1%`,`1M`],[`deepseek-ai/deepseek-v4-flash`,`DeepSeek V4 Flash`,`S+`,`72.0%`,`1M`],[`stepfun-ai/step-3.5-flash`,`Step 3.5 Flash`,`S+`,`74.4%`,`256k`],[`stepfun-ai/step-3.7-flash`,`Step 3.7 Flash`,`S+`,`74.4%`,`256k`],[`qwen/qwen3-coder-480b-a35b-instruct`,`Qwen3 Coder 480B`,`S+`,`70.6%`,`256k`],[`nvidia/nemotron-3-ultra-550b-a55b`,`Nemotron 3 Ultra`,`S+`,`-`,`1M`],[`qwen/qwen3-next-80b-a3b-instruct`,`Qwen3 80B Instruct`,`S`,`65.0%`,`128k`],[`qwen/qwen3.5-397b-a17b`,`Qwen3.5 400B VLM`,`S`,`68.0%`,`128k`],[`openai/gpt-oss-120b`,`GPT OSS 120B`,`S`,`60.0%`,`128k`],[`meta/llama-4-maverick-17b-128e-instruct`,`Llama 4 Maverick`,`S`,`62.0%`,`1M`],[`mistralai/mistral-medium-3.5-128b`,`Mistral Medium 3.5`,`S`,`66.0%`,`128k`],[`mistralai/mistral-small-4-119b-2603`,`Mistral Small 4`,`S`,`60.0%`,`256k`],[`qwen/qwen3.5-122b-a10b`,`Qwen3.5 122B`,`S`,`64.0%`,`128k`],[`mistralai/mistral-large-3-675b-instruct-2512`,`Mistral Large 675B`,`A+`,`58.0%`,`256k`],[`nvidia/nemotron-3-super-120b-a12b`,`Nemotron 3 Super`,`A+`,`56.0%`,`128k`],[`nvidia/nemotron-3-nano-omni-30b-a3b-reasoning`,`Nemotron 3 Omni`,`A+`,`52.0%`,`128k`],[`nvidia/nemotron-3-nano-30b-a3b`,`Nemotron Nano 30B`,`A`,`43.0%`,`128k`],[`openai/gpt-oss-20b`,`GPT OSS 20B`,`A`,`42.0%`,`128k`],[`google/gemma-4-31b-it`,`Gemma 4 31B`,`A`,`45.0%`,`256k`],[`bytedance/seed-oss-36b-instruct`,`Seed OSS 36B`,`A-`,`38.0%`,`32k`],[`stockmark/stockmark-2-100b-instruct`,`Stockmark 100B`,`A-`,`36.0%`,`32k`],[`mistralai/ministral-14b-instruct-2512`,`Ministral 14B`,`B+`,`34.0%`,`32k`],[`meta/llama-3.2-11b-vision-instruct`,`Llama 3.2 11B Vision`,`B`,`28.0%`,`128k`],[`microsoft/phi-4-mini-instruct`,`Phi 4 Mini`,`C`,`14.0%`,`128k`]]},groq:{name:`Groq`,url:`https://api.groq.com/openai/v1/chat/completions`,models:[[`llama-3.3-70b-versatile`,`Llama 3.3 70B`,`A-`,`39.5%`,`131k`],[`meta-llama/llama-4-scout-17b-16e-instruct`,`Llama 4 Scout`,`A`,`44.0%`,`131k`],[`llama-3.1-8b-instant`,`Llama 3.1 8B`,`B`,`28.8%`,`131k`],[`openai/gpt-oss-120b`,`GPT OSS 120B`,`S`,`60.0%`,`131k`],[`openai/gpt-oss-20b`,`GPT OSS 20B`,`A`,`42.0%`,`131k`],[`qwen/qwen3-32b`,`Qwen3 32B`,`A+`,`50.0%`,`131k`],[`groq/compound`,`Groq Compound`,`A`,`45.0%`,`131k`],[`groq/compound-mini`,`Groq Compound Mini`,`B+`,`32.0%`,`131k`]]},cerebras:{name:`Cerebras`,url:`https://api.cerebras.ai/v1/chat/completions`,models:[[`gpt-oss-120b`,`GPT OSS 120B`,`S`,`60.0%`,`131k`],[`zai-glm-4.7`,`GLM 4.7`,`S+`,`73.8%`,`131k`]]},googleai:{name:`Google AI`,url:`https://generativelanguage.googleapis.com/v1beta/openai/chat/completions`,models:[[`gemini-3.5-flash`,`Gemini 3.5 Flash`,`S+`,`-`,`1M`],[`gemini-3.1-pro-preview`,`Gemini 3.1 Pro Preview`,`S+`,`78.0%`,`1M`],[`gemini-3-flash-preview`,`Gemini 3 Flash Preview`,`S`,`65.0%`,`1M`],[`gemini-3.1-flash-lite`,`Gemini 3.1 Flash Lite`,`A+`,`55.0%`,`1M`],[`gemini-2.5-pro`,`Gemini 2.5 Pro`,`S+`,`63.2%`,`1M`],[`gemini-2.5-flash`,`Gemini 2.5 Flash`,`A+`,`50.0%`,`1M`],[`gemini-2.5-flash-lite`,`Gemini 2.5 Flash Lite`,`A`,`42.0%`,`1M`]]},"github-models":{name:`GitHub Models`,url:`https://models.github.ai/inference/chat/completions`,models:[[`openai/gpt-4.1`,`GPT-4.1`,`S+`,`-`,`1M`],[`openai/gpt-4.1-mini`,`GPT-4.1 Mini`,`S`,`-`,`1M`],[`openai/gpt-4.1-nano`,`GPT-4.1 Nano`,`A`,`-`,`1M`],[`deepseek/deepseek-v3-0324`,`DeepSeek V3 0324`,`S`,`62.0%`,`128k`],[`meta/meta-llama-3.1-405b-instruct`,`Llama 3.1 405B`,`A`,`44.0%`,`128k`],[`meta/llama-4-maverick-17b-128e-instruct-fp8`,`Llama 4 Maverick`,`S`,`62.0%`,`1M`],[`meta/llama-4-scout-17b-16e-instruct`,`Llama 4 Scout`,`A`,`44.0%`,`1M`],[`meta/llama-3.3-70b-instruct`,`Llama 3.3 70B`,`A-`,`39.5%`,`128k`],[`meta/llama-3.2-90b-vision-instruct`,`Llama 3.2 90B Vision`,`A-`,`-`,`128k`],[`meta/llama-3.2-11b-vision-instruct`,`Llama 3.2 11B Vision`,`B`,`-`,`128k`],[`meta/meta-llama-3.1-8b-instruct`,`Llama 3.1 8B`,`B`,`28.8%`,`128k`],[`mistral-ai/codestral-2501`,`Codestral 2501`,`B+`,`34.0%`,`256k`],[`mistral-ai/mistral-medium-2505`,`Mistral Medium 2505`,`A`,`48.0%`,`128k`],[`mistral-ai/mistral-small-2503`,`Mistral Small 2503`,`B+`,`30.0%`,`128k`],[`mistral-ai/ministral-3b`,`Ministral 3B`,`C`,`-`,`128k`]]},mistral:{name:`Mistral LP`,url:`https://api.mistral.ai/v1/chat/completions`,models:[[`mistral-large-2512`,`Mistral Large 3`,`S+`,`70.0%`,`256k`],[`mistral-medium-3-5`,`Mistral Medium 3.5`,`S+`,`77.6%`,`256k`],[`devstral-2512`,`Devstral 2`,`S+`,`72.2%`,`256k`],[`magistral-medium-2509`,`Magistral Medium 1.2`,`A+`,`52.0%`,`128k`],[`mistral-small-2603`,`Mistral Small 4`,`A`,`48.0%`,`256k`]]},cloudflare:{name:`Cloudflare AI`,url:`https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/v1/chat/completions`,models:[[`@cf/moonshotai/kimi-k2.6`,`Kimi K2.6`,`S+`,`76.8%`,`262k`],[`@cf/zai-org/glm-4.7-flash`,`GLM-4.7-Flash`,`S`,`59.2%`,`131k`],[`@cf/nvidia/nemotron-3-120b-a12b`,`Nemotron 3 Super`,`A+`,`56.0%`,`32k`],[`@cf/meta/llama-4-scout-17b-16e-instruct`,`Llama 4 Scout`,`A`,`44.0%`,`131k`],[`@cf/meta/llama-3.2-90b-instruct`,`Llama 3.2 90B`,`A+`,`45.0%`,`128k`],[`@cf/mistralai/mistral-7b-instruct-v0.2`,`Mistral 7B v0.2`,`A`,`38.0%`,`128k`],[`@cf/google/gemma-2-9b-it`,`Gemma 2 9B`,`A`,`35.0%`,`128k`],[`@cf/anthropic/claude-3-5-sonnet`,`Claude 3.5 Sonnet`,`S+`,`62.4%`,`200k`],[`@cf/openai/gpt-4o-mini`,`GPT-4o Mini`,`A+`,`50.0%`,`128k`],[`@cf/qwen/qwen3-30b-a3b-fp8`,`Qwen3 30B MoE`,`A`,`45.0%`,`128k`],[`@cf/qwen/qwen2.5-coder-32b-instruct`,`Qwen2.5 Coder 32B`,`A`,`46.0%`,`128k`],[`@cf/openai/gpt-oss-20b`,`GPT OSS 20B`,`A`,`42.0%`,`128k`],[`@cf/meta/llama-3.3-70b-instruct-fp8-fast`,`Llama 3.3 70B`,`A-`,`39.5%`,`128k`],[`@cf/google/gemma-4-26b-a4b-it`,`Gemma 4 26B MoE`,`A-`,`38.0%`,`128k`],[`@cf/mistralai/mistral-small-3.1-24b-instruct`,`Mistral Small 3.1`,`B+`,`30.0%`,`128k`],[`@cf/ibm/granite-4.0-h-micro`,`Granite 4.0 Micro`,`B+`,`30.0%`,`128k`]]},openrouter:{name:`OpenRouter`,url:`https://openrouter.ai/api/v1/chat/completions`,models:[[`qwen/qwen3-coder:free`,`Qwen3 Coder 480B`,`S+`,`70.6%`,`1M`],[`z-ai/glm-4.5-air:free`,`GLM 4.5 Air`,`S+`,`72.0%`,`131k`],[`poolside/laguna-m.1:free`,`Poolside Laguna M.1`,`S+`,`-`,`262k`],[`poolside/laguna-xs.2:free`,`Poolside Laguna XS.2`,`S+`,`-`,`131k`],[`moonshotai/kimi-k2.6:free`,`Kimi K2.6`,`S+`,`76.8%`,`262k`],[`qwen/qwen3-next-80b-a3b-instruct:free`,`Qwen3 80B Instruct`,`S`,`65.0%`,`262k`],[`openai/gpt-oss-120b:free`,`GPT OSS 120B`,`S`,`60.0%`,`131k`],[`arcee-ai/trinity-large-thinking:free`,`Arcee Trinity Large`,`A`,`-`,`262k`],[`nvidia/nemotron-3-super-120b-a12b:free`,`Nemotron 3 Super`,`A+`,`56.0%`,`262k`],[`nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free`,`Nemotron 3 Omni`,`A+`,`52.0%`,`256k`],[`nvidia/nemotron-nano-12b-v2-vl:free`,`Nemotron Nano 12B VL`,`A`,`20.0%`,`128k`],[`openrouter/owl-alpha`,`Owl Alpha`,`A+`,`-`,`1M`],[`nousresearch/hermes-3-llama-3.1-405b:free`,`Hermes 3 405B`,`A`,`44.0%`,`131k`],[`openai/gpt-oss-20b:free`,`GPT OSS 20B`,`A`,`42.0%`,`131k`],[`nvidia/nemotron-nano-30b-a3b:free`,`Nemotron Nano 30B`,`A`,`43.0%`,`256k`],[`cognitivecomputations/dolphin-mistral-24b-venice-edition:free`,`Dolphin Mistral 24B`,`B+`,`30.0%`,`33k`],[`google/gemma-4-31b-it:free`,`Gemma 4 31B`,`A`,`45.0%`,`256k`],[`google/gemma-4-26b-a4b-it:free`,`Gemma 4 26B MoE`,`A-`,`38.0%`,`256k`],[`meta-llama/llama-3.3-70b-instruct:free`,`Llama 3.3 70B`,`A-`,`39.5%`,`131k`],[`meta-llama/llama-3.2-3b-instruct:free`,`Llama 3.2 3B`,`B`,`20.0%`,`128k`],[`nvidia/nemotron-nano-9b-v2:free`,`Nemotron Nano 9B`,`B+`,`18.0%`,`128k`],[`openrouter/free`,`OpenRouter Free`,`B`,`-`,`200k`],[`liquid/lfm-2.5-1.2b-instruct:free`,`LFM 2.5 1.2B`,`C`,`-`,`32k`],[`liquid/lfm-2.5-1.2b-thinking:free`,`LFM 2.5 Thinking`,`C`,`-`,`32k`]]},sambanova:{name:`SambaNova`,url:`https://api.sambanova.ai/v1/chat/completions`,models:[[`MiniMax-M2.7`,`MiniMax M2.7`,`S+`,`56.2%`,`192k`],[`DeepSeek-V3.1`,`DeepSeek V3.1`,`S`,`62.0%`,`128k`],[`DeepSeek-V3.2`,`DeepSeek V3.2`,`S+`,`70.0%`,`32k`],[`Llama-4-Maverick-17B-128E-Instruct`,`Llama 4 Maverick`,`S`,`62.0%`,`128k`],[`gpt-oss-120b`,`GPT OSS 120B`,`S`,`60.0%`,`128k`],[`Meta-Llama-3.3-70B-Instruct`,`Llama 3.3 70B`,`A-`,`39.5%`,`128k`],[`gemma-3-12b-it`,`Gemma 3 12B IT`,`B+`,`46.0%`,`128k`]]},ovhcloud:{name:`OVHcloud AI`,url:`https://oai.endpoints.kepler.ai.cloud.ovh.net/v1/chat/completions`,models:[[`Qwen3.5-397B-A17B`,`Qwen3.5 397B MoE`,`S`,`-`,`262k`],[`Qwen3-Coder-30B-A3B-Instruct`,`Qwen3 Coder 30B MoE`,`A+`,`55.0%`,`256k`],[`gpt-oss-120b`,`GPT OSS 120B`,`S`,`60.0%`,`131k`],[`gpt-oss-20b`,`GPT OSS 20B`,`A`,`42.0%`,`131k`],[`Meta-Llama-3_3-70B-Instruct`,`Llama 3.3 70B`,`A-`,`39.5%`,`131k`],[`Qwen3-32B`,`Qwen3 32B`,`A+`,`50.0%`,`32k`],[`Mistral-Small-3.2-24B-Instruct-2506`,`Mistral Small 3.2`,`B+`,`34.0%`,`128k`],[`Mistral-7B-Instruct-v0.3`,`Mistral 7B Instruct`,`B`,`25.0%`,`127k`],[`Mistral-Nemo-Instruct-2407`,`Mistral Nemo`,`B+`,`30.0%`,`118k`],[`Qwen3.5-9B`,`Qwen3.5 9B`,`B+`,`30.0%`,`262k`]]},codestral:{name:`Codestral`,url:`https://api.mistral.ai/v1/chat/completions`,models:[[`codestral-2508`,`Codestral`,`B+`,`34.0%`,`128k`]]},zai:{name:`ZAI`,url:`https://api.z.ai/api/coding/paas/v4/chat/completions`,models:[[`zai/glm-4.7-flash`,`GLM-4.7-Flash`,`S`,`59.2%`,`200k`],[`zai/glm-4.5-flash`,`GLM-4.5-Flash`,`S`,`59.2%`,`128k`]]},scaleway:{name:`Scaleway`,url:`https://api.scaleway.ai/v1/chat/completions`,models:[[`devstral-2-123b-instruct-2512`,`Devstral 2 123B`,`S+`,`72.2%`,`200k`],[`qwen3.5-397b-a17b`,`Qwen3.5 400B VLM`,`S`,`68.0%`,`250k`],[`mistral/mistral-large-3-675b-instruct-2512`,`Mistral Large 675B`,`A+`,`58.0%`,`250k`],[`qwen3-235b-a22b-instruct-2507`,`Qwen3 235B`,`S+`,`70.0%`,`250k`],[`gpt-oss-120b`,`GPT OSS 120B`,`S`,`60.0%`,`128k`],[`qwen3-coder-30b-a3b-instruct`,`Qwen3 Coder 30B`,`A+`,`55.0%`,`128k`],[`holo2-30b-a3b`,`Holo2 30B`,`A+`,`52.0%`,`22k`],[`llama-3.3-70b-instruct`,`Llama 3.3 70B`,`A-`,`39.5%`,`100k`],[`mistral-small-3.2-24b-instruct-2506`,`Mistral Small 3.2`,`B+`,`30.0%`,`128k`],[`gemma-3-27b-it`,`Gemma 3 27B`,`B`,`22.0%`,`40k`]]},qwen:{name:`Alibaba DashScope`,url:`https://dashscope-intl.aliyuncs.com/compatible-mode/v1/chat/completions`,models:[[`qwen3.7-max`,`Qwen3.7 Max`,`S+`,`80.0%`,`1M`],[`qwen3-max`,`Qwen3 Max`,`S+`,`78.8%`,`256k`],[`qwen3.6-plus`,`Qwen3.6 Plus`,`S+`,`72.0%`,`1M`],[`qwen3-235b-a22b`,`Qwen3 235B`,`S+`,`70.0%`,`256k`],[`qwen3.5-plus`,`Qwen3.5 Plus`,`S`,`68.0%`,`1M`],[`qwen3-coder-plus`,`Qwen3 Coder Plus`,`S`,`69.6%`,`1M`],[`qwen3-coder-next`,`Qwen3 Coder Next`,`S`,`65.0%`,`256k`],[`qwen3.6-flash`,`Qwen3.6 Flash`,`A+`,`60.0%`,`1M`],[`qwen3.5-flash`,`Qwen3.5 Flash`,`A+`,`55.0%`,`1M`],[`qwen3-coder-flash`,`Qwen3 Coder Flash`,`A+`,`55.0%`,`1M`],[`qwen3-32b`,`Qwen3 32B`,`A+`,`50.0%`,`256k`]]},gemini:{name:`Gemini CLI`,url:null,models:[[`gemini-3.5-flash`,`Gemini 3.5 Flash`,`S+`,`-`,`1M`],[`gemini-3.1-pro-preview`,`Gemini 3.1 Pro Preview`,`S+`,`78.0%`,`1M`],[`gemini-3-flash-preview`,`Gemini 3 Flash Preview`,`S`,`65.0%`,`1M`],[`gemini-3.1-flash-lite`,`Gemini 3.1 Flash Lite`,`A+`,`55.0%`,`1M`],[`gemini-2.5-pro`,`Gemini 2.5 Pro`,`S+`,`63.2%`,`1M`],[`gemini-2.5-flash`,`Gemini 2.5 Flash`,`A+`,`50.0%`,`1M`],[`gemini-2.5-flash-lite`,`Gemini 2.5 Flash Lite`,`A`,`42.0%`,`1M`]],cliOnly:!0,installUrl:`https://github.com/google-gemini/gemini-cli`,binary:`gemini`,checkArgs:[`--version`]},"opencode-zen":{name:`OpenCode Zen`,url:`https://opencode.ai/zen/v1/chat/completions`,models:[[`big-pickle`,`Big Pickle`,`S+`,`72.0%`,`200k`],[`deepseek-v4-flash-free`,`DeepSeek V4 Flash Free`,`S+`,`79.0%`,`200k`],[`mimo-v2.5-free`,`MiMo-V2.5 Free`,`S+`,`-`,`200k`],[`nemotron-3-super-free`,`Nemotron 3 Super Free`,`A+`,`52.0%`,`200k`],[`minimax-m3-free`,`MiniMax M3 Free`,`S+`,`59.0%`,`1M`]],zenOnly:!0}},nc=[];for(let[e,t]of Object.entries(tc))if(!(!t||!t.models))for(let[n,r,i,a,o]of t.models)nc.push([n,r,i,a,o,e]);var rc=Object.entries(tc).map(([e,t])=>{let n=t?.name||e;return{id:`filter-provider-${e.replace(/[^a-z0-9]+/gi,`-`)}`,label:n,providerKey:e,description:`${n} models`,keywords:[`filter`,`provider`,`origin`,e,n.toLowerCase()]}}),ic={opencode:`Launch in OpenCode CLI with the selected model.`,"opencode-desktop":`Set model in shared config, then open OpenCode Desktop.`,"opencode-web":`Set model in shared config, then open OpenCode WebUI.`,openclaw:`Set default model in OpenClaw and launch it.`,crush:`Launch Crush with this provider/model pair.`,goose:`Launch Goose and preselect the active model.`,pi:`Launch Pi with model/provider flags.`,aider:`Launch Aider configured on the selected model.`,kilo:`Set model in shared config, then launch Kilo CLI.`,qwen:`Launch Qwen Code using the selected provider model.`,openhands:`Launch OpenHands with the selected model endpoint.`,amp:`Launch Amp with this model as active target.`,hermes:`Launch Hermes Agent with the selected model.`,continue:`Launch Continue CLI with the selected model.`,cline:`Launch Cline CLI with the selected model.`,rovo:`Rovo Dev CLI model (launch with Rovo tool only).`,gemini:`Gemini CLI model (launch with Gemini tool only).`,caveman:`Caveman Code — token-efficient coding agent (launch with Caveman tool only).`,jcode:`Launch jcode coding agent with the selected model.`},ac=_n.map(e=>{let t=gn[e]||{label:e,emoji:`🧰`};return{id:`action-set-tool-${e}`,label:t.label,toolMode:e,icon:t.emoji,description:ic[e]||`Set this as the active launch target.`,keywords:[`tool`,`target`,`mode`,e,t.label.toLowerCase()]}}),oc=[{id:`action-cycle-ping-mode`,label:`Cycle ping mode`,shortcut:`W`,icon:`⚡`,description:`Rotate speed → normal → slow → forced.`,keywords:[`ping`,`mode`,`cycle`,`speed`,`normal`,`slow`,`forced`]},{id:`action-set-ping-speed`,label:`Speed mode (2s)`,pingMode:`speed`,description:`Fast 2s bursts for short live checks.`,keywords:[`ping`,`mode`,`speed`,`2s`,`fast`]},{id:`action-set-ping-normal`,label:`Normal mode (10s)`,pingMode:`normal`,description:`Balanced default cadence for daily use.`,keywords:[`ping`,`mode`,`normal`,`10s`,`default`]},{id:`action-set-ping-slow`,label:`Slow mode (30s)`,pingMode:`slow`,description:`Lower refresh cost when you are mostly idle.`,keywords:[`ping`,`mode`,`slow`,`30s`,`idle`]},{id:`action-set-ping-forced`,label:`Forced mode (4s)`,pingMode:`forced`,description:`Keeps 4s cadence until manually changed.`,keywords:[`ping`,`mode`,`forced`,`4s`,`manual`]}],sc=[{id:`filters`,label:`Filters`,icon:`🔍`,children:[{id:`filter-tier`,label:`Filter by tier`,icon:`📊`,children:[{id:`filter-tier-all`,label:`All tiers`,tier:null,shortcut:`T`,description:`Show all models`,keywords:[`filter`,`tier`,`all`]},{id:`filter-tier-splus`,label:`S+ tier`,tier:`S+`,description:`Best coding models`,keywords:[`filter`,`tier`,`s+`]},{id:`filter-tier-s`,label:`S tier`,tier:`S`,description:`Excellent models`,keywords:[`filter`,`tier`,`s`]},{id:`filter-tier-aplus`,label:`A+ tier`,tier:`A+`,description:`Very good models`,keywords:[`filter`,`tier`,`a+`]},{id:`filter-tier-a`,label:`A tier`,tier:`A`,description:`Good models`,keywords:[`filter`,`tier`,`a`]},{id:`filter-tier-aminus`,label:`A- tier`,tier:`A-`,description:`Solid models`,keywords:[`filter`,`tier`,`a-`]},{id:`filter-tier-bplus`,label:`B+ tier`,tier:`B+`,description:`Fair models`,keywords:[`filter`,`tier`,`b+`]},{id:`filter-tier-b`,label:`B tier`,tier:`B`,description:`Basic models`,keywords:[`filter`,`tier`,`b`]},{id:`filter-tier-c`,label:`C tier`,tier:`C`,description:`Limited models`,keywords:[`filter`,`tier`,`c`]}]},{id:`filter-provider`,label:`Filter by provider`,icon:`🏢`,children:[{id:`filter-provider-cycle`,label:`Cycle provider`,shortcut:`D`,description:`Switch between providers`,keywords:[`filter`,`provider`,`origin`]},{id:`filter-provider-all`,label:`All providers`,providerKey:null,description:`Show all providers`,keywords:[`filter`,`provider`,`all`]},...rc]},{id:`filter-model`,label:`Filter by model`,icon:`🤖`,children:[]},{id:`filter-other`,label:`Other filters`,icon:`⚙️`,children:[{id:`filter-configured-toggle`,label:`Show only configured & working`,shortcut:`E`,description:`Show only configured providers that are responding (not noauth/auth error)`,keywords:[`filter`,`configured`,`keys`,`working`,`active`]}]}]},{id:`sort`,label:`Sort`,icon:`📶`,children:[{id:`sort-rank`,label:`Sort by rank`,shortcut:`R`,description:`Rank by SWE score`,keywords:[`sort`,`rank`]},{id:`sort-tier`,label:`Sort by tier`,description:`Group by quality tier`,keywords:[`sort`,`tier`]},{id:`sort-provider`,label:`Sort by provider`,shortcut:`O`,description:`Group by provider`,keywords:[`sort`,`origin`,`provider`]},{id:`sort-model`,label:`Sort by model`,shortcut:`M`,description:`Alphabetical order`,keywords:[`sort`,`model`,`name`]},{id:`sort-latest-ping`,label:`Sort by latest ping`,shortcut:`L`,description:`Recent response time`,keywords:[`sort`,`latest`,`ping`]},{id:`sort-avg-ping`,label:`Sort by avg ping`,shortcut:`A`,description:`Average response time`,keywords:[`sort`,`avg`,`average`,`ping`]},{id:`sort-swe`,label:`Sort by SWE score`,shortcut:`S`,description:`Coding ability score`,keywords:[`sort`,`swe`,`score`]},{id:`sort-ctx`,label:`Sort by context`,shortcut:`C`,description:`Context window size`,keywords:[`sort`,`context`,`ctx`]},{id:`sort-health`,label:`Sort by health`,shortcut:`H`,description:`Current model status`,keywords:[`sort`,`health`,`condition`]},{id:`sort-verdict`,label:`Sort by verdict`,shortcut:`V`,description:`Overall assessment`,keywords:[`sort`,`verdict`]},{id:`sort-stability`,label:`Sort by stability`,shortcut:`B`,description:`Reliability score`,keywords:[`sort`,`stability`]},{id:`sort-uptime`,label:`Sort by uptime`,shortcut:`U`,description:`Success rate`,keywords:[`sort`,`uptime`]}]},{id:`actions`,label:`Actions`,icon:`⚙️`,children:[{id:`action-target-tool`,label:`Target tool`,icon:`🧰`,children:[{id:`action-cycle-tool-mode`,label:`Cycle target tool`,shortcut:`Z`,icon:`🔄`,description:`Rotate through every launcher mode.`,keywords:[`tool`,`mode`,`cycle`,`target`]},...ac]},{id:`action-ping-mode`,label:`Ping mode`,icon:`📶`,children:oc},{id:`action-favorites-mode`,label:`Favorites mode`,icon:`⭐`,children:[{id:`action-toggle-favorite-mode`,label:`Toggle favorites mode`,shortcut:`Y`,icon:`⭐`,description:`Switch pinned+sticky ↔ normal list behavior.`,keywords:[`favorite`,`favorites`,`mode`,`toggle`,`y`]},{id:`action-favorites-mode-pinned`,label:`Pinned + always visible`,favoritesPinned:!0,description:`Favorites stay on top and bypass current filters.`,keywords:[`favorite`,`favorites`,`pinned`,`sticky`,`always visible`]},{id:`action-favorites-mode-normal`,label:`Normal rows (starred only)`,favoritesPinned:!1,description:`Favorites keep ⭐ but follow active filters and sort.`,keywords:[`favorite`,`favorites`,`normal`,`sort`,`filter`]},{id:`action-toggle-favorite`,label:`Toggle favorite on selected row`,shortcut:`F`,icon:`⭐`,description:`Star/unstar the highlighted model.`,keywords:[`favorite`,`star`,`toggle`]}]},{id:`action-cycle-theme`,label:`Cycle theme`,shortcut:`G`,icon:`🌗`,description:`Switch dark/light/auto`,keywords:[`theme`,`dark`,`light`,`auto`]},{id:`action-reset-view`,label:`Reset view`,shortcut:`N`,icon:`🔄`,description:`Reset filters and sort`,keywords:[`reset`,`view`,`sort`,`filters`]}]},{id:`open-settings`,label:`Settings`,shortcut:`P`,icon:`⚙️`,type:`page`,description:`API keys and preferences`,keywords:[`settings`,`config`,`api key`]},{id:`open-help`,label:`Help`,shortcut:`K`,icon:`❓`,type:`page`,description:`Show all shortcuts`,keywords:[`help`,`shortcuts`,`hotkeys`]},{id:`open-changelog`,label:`Changelog`,icon:`📋`,type:`page`,description:`Version history`,keywords:[`changelog`,`release`]},{id:`open-recommend`,label:`Smart recommend`,shortcut:`Q`,icon:`🎯`,type:`page`,description:`Find best model for task`,keywords:[`recommend`,`best model`]},{id:`open-playground`,label:`Playground`,shortcut:`;`,icon:`💬`,type:`page`,description:`Chat with the FCM router`,keywords:[`playground`,`chat`,`try`,`prompt`,`router`]},{id:`open-install-endpoints`,label:`Install endpoints`,icon:`🔌`,type:`page`,description:`Install provider catalogs`,keywords:[`install`,`endpoints`,`providers`]},{id:`open-installed-models`,label:`Installed models`,icon:`🗂️`,type:`page`,description:`View models configured in tools`,keywords:[`installed`,`models`,`configured`,`tools`,`manager`,`goose`,`crush`,`aider`]}];function cc(e=[]){let t=JSON.parse(JSON.stringify(sc)),n=t.find(e=>e.id===`filters`)?.children.find(e=>e.id===`filter-model`);if(n&&Array.isArray(e)&&e.length>0){let t=e.filter(e=>!e.hidden&&e.status!==`noauth`).slice(0,20);for(let e of t)n.children.push({id:`filter-model-${e.providerKey}-${e.modelId}`,label:e.label,modelId:e.modelId,providerKey:e.providerKey,keywords:[`filter`,`model`,e.label.toLowerCase(),e.modelId.toLowerCase()]})}return t}function lc(e,t=new Set){let n=[];function r(e,i=0){for(let a of e){if(a.type===`page`||a.type===`action`){n.push({...a,type:a.type,depth:0,hasChildren:!1,isExpanded:!1});continue}let e=t.has(a.id),o=Array.isArray(a.children)&&a.children.length>0;o?(n.push({...a,type:i===0?`category`:`subcategory`,depth:i,hasChildren:o,isExpanded:e}),e&&r(a.children,i+1)):n.push({...a,type:`command`,depth:i,hasChildren:!1,isExpanded:!1})}}return r(e),n}function uc(e=[]){let t=cc(e),n=new Set;function r(e){for(let t of e)n.add(t.id),Array.isArray(t.children)&&r(t.children)}return r(t),lc(t,n).map(e=>{let t={...e};return e.tier!==void 0&&(t.tierValue=e.tier),t})}function dc(e,t){let n=(e||``).trim().toLowerCase(),r=(t||``).toLowerCase();if(!n)return{matched:!0,score:0,positions:[]};if(!r)return{matched:!1,score:0,positions:[]};let i=0,a=[];for(let e=0;e<r.length&&i<n.length;e++)n[i]===r[e]&&(a.push(e),i++);if(i!==n.length)return{matched:!1,score:0,positions:[]};let o=n.length*10;for(let e=1;e<a.length;e++)a[e]===a[e-1]+1&&(o+=5);for(let e of a)if(e===0)o+=8;else{let t=r[e-1];(t===` `||t===`:`||t===`-`||t===`/`)&&(o+=6)}return o-=Math.max(0,r.length-n.length),{matched:!0,score:o,positions:a}}function fc(e,t){let n=(t||``).trim();if(!n)return e;let r=[];for(let t of e){let e=dc(n,t.label),i=e.score,a=e.positions,o=e.matched;if(!o&&Array.isArray(t.keywords))for(let e of t.keywords){let t=dc(n,e);if(!t.matched)continue;o=!0;let r=Math.max(1,t.score-7);r>i&&(i=r,a=[])}o&&r.push({...t,score:i,matchPositions:a})}let i=[],a=new Set;for(let e of r)e.type===`command`&&e.matchPositions&&i.find(t=>t.id===e.id)&&a.add(e.parentId);return r.sort((e,t)=>t.score===e.score?e.depth===t.depth?e.label.localeCompare(t.label):e.depth-t.depth:t.score-e.score),r}var pc={backdrop:`_backdrop_162pr_6`,modal:`_modal_162pr_19`,searchRow:`_searchRow_162pr_31`,searchIcon:`_searchIcon_162pr_38`,input:`_input_162pr_39`,kbd:`_kbd_162pr_49`,list:`_list_162pr_62`,item:`_item_162pr_70`,itemActive:`_itemActive_162pr_82`,itemDisabled:`_itemDisabled_162pr_83`,itemIcon:`_itemIcon_162pr_88`,itemLabel:`_itemLabel_162pr_89`,itemEnter:`_itemEnter_162pr_90`,empty:`_empty_162pr_96`,footer:`_footer_162pr_103`},mc={filter:{icon:`🔍`,label:`Filter`},sort:{icon:`📶`,label:`Sort`},action:{icon:`⚙️`,label:`Action`},page:{icon:`📄`,label:`Page`},update:{icon:`⬆️`,label:`Update`},tool:{icon:`🧰`,label:`Tool`}},hc=[`speed`,`normal`,`slow`,`forced`];function gc(e){let{onCycleTheme:t,onResetView:n,onSetPingMode:r,onOpenChangelog:i,theme:a,pingMode:o,modelsCount:s,onExport:c}=e;return[{id:`page.help`,section:`page`,label:`Open Help`,keywords:[`help`,`shortcuts`,`reference`],run:()=>e.onOpenHelp?.()},{id:`page.changelog`,section:`page`,label:`Open Changelog`,keywords:[`changelog`,`release`,`history`,`version`],run:()=>i?.()},{id:`page.playground`,section:`page`,label:`Open Playground`,keywords:[`playground`,`chat`,`try`,`prompt`,`router`],run:()=>e.onOpenPlayground?.()},{id:`page.install-endpoints`,section:`page`,label:`Open Install Endpoints (M4)`,keywords:[`install`,`endpoint`,`tool`,`configure`],disabled:!0},{id:`page.installed-models`,section:`page`,label:`Open Installed Models (M4)`,keywords:[`installed`,`models`,`tools`],disabled:!0},{id:`action.theme.cycle`,section:`action`,label:`Cycle theme (current: ${a})`,keywords:[`theme`,`dark`,`light`,`auto`],run:t},{id:`action.reset.view`,section:`action`,label:`Reset view (filters + sort)`,keywords:[`reset`,`view`,`clear`,`filters`,`sort`],run:n},{id:`action.ping.speed`,section:`action`,label:`Ping mode → Speed (2s)`,keywords:[`ping`,`mode`,`speed`,`fast`,`2s`],run:()=>r?.(`speed`)},{id:`action.ping.normal`,section:`action`,label:`Ping mode → Normal (10s)`,keywords:[`ping`,`mode`,`normal`,`10s`,`default`],run:()=>r?.(`normal`)},{id:`action.ping.slow`,section:`action`,label:`Ping mode → Slow (30s)`,keywords:[`ping`,`mode`,`slow`,`30s`,`idle`],run:()=>r?.(`slow`)},{id:`action.ping.forced`,section:`action`,label:`Ping mode → Forced (4s)`,keywords:[`ping`,`mode`,`forced`,`4s`],run:()=>r?.(`forced`)},{id:`action.export`,section:`action`,label:`Export models…`,keywords:[`export`,`download`,`json`,`csv`,`clipboard`],run:c}]}function _c({onClose:e,onNavigate:t,onCycleTheme:n,onResetView:r,onSetPingMode:i,onOpenHelp:a,onOpenChangelog:o,onOpenCommandPalette:s,onToast:c,onExport:l,currentView:u,theme:d,pingMode:f,models:p,updateAvailable:m,latestVersion:h,onRunUpdate:g}){let[_,y]=(0,v.useState)(``),[b,x]=(0,v.useState)(0),S=(0,v.useRef)(null),C=(0,v.useRef)(null),w=(0,v.useMemo)(()=>{let e=uc(p||[]).map(e=>{let t=`action`;return e.id.startsWith(`filter-`)?t=`filter`:e.id.startsWith(`sort-`)?t=`sort`:e.id.startsWith(`action-`)?t=`action`:e.id.startsWith(`action-set-tool-`)?t=`tool`:(e.id.startsWith(`page-`)||e.id===`open-settings`||e.id===`open-help`||e.id===`open-changelog`)&&(t=`page`),{...e,section:t}}),t=gc({onCycleTheme:n,onResetView:r,onSetPingMode:i,onOpenChangelog:o,onOpenHelp:a,theme:d,pingMode:f,modelsCount:p?.length??0,onExport:l}),s=[];return m&&h&&s.push({id:`action.update.run`,section:`update`,label:`⬆️ UPDATE NOW — v${h} available (recommended!)`,keywords:[`update`,`upgrade`,`version`,`install`,`new`],run:()=>g?.()}),[...s,...e,...t]},[p,d,f,n,r,i,o,a,l,m,h,g]),T=(0,v.useMemo)(()=>_.trim()?fc(w,_):w,[w,_]),E=(0,v.useMemo)(()=>{let e=new Map;for(let t of T)e.has(t.section)||e.set(t.section,[]),e.get(t.section).push(t);return Array.from(e.entries())},[T]),D=(0,v.useMemo)(()=>E.flatMap(([,e])=>e),[E]);(0,v.useEffect)(()=>{S.current?.focus()},[]),(0,v.useEffect)(()=>{b>=D.length&&x(0)},[D,b]),(0,v.useEffect)(()=>{let t=t=>{if(t.key===`Escape`){t.preventDefault(),e();return}if(t.key===`ArrowDown`){t.preventDefault(),x(e=>Math.min(D.length-1,e+1));return}if(t.key===`ArrowUp`){t.preventDefault(),x(e=>Math.max(0,e-1));return}if(t.key===`Enter`){t.preventDefault();let e=D[b];if(!e)return;if(e.disabled){c?.(`${e.label} is not available yet.`,`info`);return}O(e)}};return document.addEventListener(`keydown`,t),()=>document.removeEventListener(`keydown`,t)},[D,b,e,c]);let O=(0,v.useCallback)(s=>{let u=s.id;if(u===`open-settings`){t?.(`settings`),e();return}if(u===`open-help`){a?.(),e();return}if(u===`open-changelog`){o?.(),e();return}if(u===`open-recommend`){c?.(`Recommend arrives in M3`,`info`),e();return}if(u===`open-router-dashboard`){c?.(`Router dashboard arrives in M4`,`info`),e();return}if(u===`open-installed-models`){c?.(`Installed Models arrives in M4`,`info`),e();return}if(u===`open-install-endpoints`){c?.(`Install Endpoints arrives in M4`,`info`),e();return}if(u===`action-update-now`){g?.(),e();return}if(u===`action-cycle-theme`){n?.(),e();return}if(u===`action-reset-view`){r?.(),e();return}if(u===`action-cycle-ping-mode`){let t=hc.indexOf(f);i?.(hc[(t+1)%hc.length]),e();return}if(u===`action-cycle-tool-mode`){c?.(`Tool mode picker arrives in M3`,`info`),e();return}if(u===`action-toggle-favorite`){c?.(`Press F on a model row in the table.`,`info`),e();return}if(u===`action-toggle-favorite-mode`){c?.(`Set the favorites display mode in Settings (M2).`,`info`),e();return}if(u===`action-export`){l?.(),e();return}if(u===`action-benchmark-row`){c?.(`Click any AI Lat. cell to benchmark the highlighted row.`,`info`),e();return}if(u===`filter-provider-cycle`){c?.(`Use the Provider dropdown in the FilterBar.`,`info`),e();return}if(u.startsWith(`filter-tier-`)){c?.(`Tier filter — use the Tier chip row in the FilterBar.`,`info`),e();return}if(u.startsWith(`filter-provider-`)){c?.(`Provider filter — use the Provider dropdown.`,`info`),e();return}if(u===`filter-configured-toggle`){c?.(`Use the Visibility dropdown in the FilterBar.`,`info`),e();return}if(u.startsWith(`sort-`)){c?.(`Sort — click the column header in the table.`,`info`),e();return}if(u===`action-set-ping-speed`){i?.(`speed`),e();return}if(u===`action-set-ping-normal`){i?.(`normal`),e();return}if(u===`action-set-ping-slow`){i?.(`slow`),e();return}if(u===`action-set-ping-forced`){i?.(`forced`),e();return}if(typeof s.run==`function`){s.run(),e();return}c?.(`${s.label} is not wired on the Web yet.`,`info`),e()},[t,e,c,n,r,i,a,o,g,l,f]);return(0,v.useEffect)(()=>{if(!C.current)return;let e=C.current.querySelector(`[data-cmd-index="${b}"]`);e&&e.scrollIntoView({block:`nearest`})},[b]),(0,I.jsx)(`div`,{className:pc.backdrop,onClick:e,children:(0,I.jsxs)(`div`,{className:pc.modal,onClick:e=>e.stopPropagation(),children:[(0,I.jsxs)(`div`,{className:pc.searchRow,children:[(0,I.jsx)(Pr,{size:16,stroke:1.5,className:pc.searchIcon}),(0,I.jsx)(`input`,{ref:S,className:pc.input,placeholder:`Type a command… (filters, sorts, tools, theme, ping, export)`,value:_,onChange:e=>y(e.target.value),autoComplete:`off`}),(0,I.jsxs)(`span`,{className:pc.kbd,children:[(0,I.jsx)(nr,{size:10,stroke:1.5}),`K`]})]}),(0,I.jsxs)(`div`,{className:pc.list,ref:C,role:`listbox`,children:[D.length===0&&(0,I.jsx)(`div`,{className:pc.empty,children:`No matching command.`}),E.map(([e,t])=>{let n=mc[e]||{icon:`•`,label:e};return(0,I.jsxs)(`div`,{className:pc.section,children:[(0,I.jsxs)(`div`,{className:pc.sectionHeader,children:[(0,I.jsx)(`span`,{className:pc.sectionIcon,children:n.icon}),(0,I.jsx)(`span`,{children:n.label})]}),t.map(e=>{let t=D.indexOf(e),n=t===b;return(0,I.jsxs)(`button`,{"data-cmd-index":t,className:`${pc.item} ${n?pc.itemActive:``} ${e.disabled?pc.itemDisabled:``}`,onClick:()=>O(e),onMouseEnter:()=>x(t),role:`option`,"aria-selected":n,"aria-disabled":e.disabled?`true`:void 0,children:[(0,I.jsxs)(`span`,{className:pc.itemLabel,children:[e.label,e.shortcut&&(0,I.jsx)(`span`,{className:pc.shortcut,children:e.shortcut})]}),e.description&&(0,I.jsx)(`span`,{className:pc.itemDesc,children:e.description}),n&&(0,I.jsx)(`span`,{className:pc.itemEnter,children:`↵`})]},e.id)})]},e)})]}),(0,I.jsxs)(`div`,{className:pc.footer,children:[(0,I.jsxs)(`span`,{children:[(0,I.jsx)(`kbd`,{children:`↑↓`}),` navigate`]}),(0,I.jsxs)(`span`,{children:[(0,I.jsx)(`kbd`,{children:`↵`}),` select`]}),(0,I.jsxs)(`span`,{children:[(0,I.jsx)(`kbd`,{children:`Esc`}),` close`]}),(0,I.jsxs)(`span`,{className:pc.footerRight,children:[`Powered by the TUI command registry — 1:1 parity`,(0,I.jsx)(sr,{size:10,stroke:1.5,style:{marginLeft:4}})]})]})]})})}var vc={backdrop:`_backdrop_1y1s7_6`,modal:`_modal_1y1s7_19`,header:`_header_1y1s7_31`,titleRow:`_titleRow_1y1s7_36`,title:`_title_1y1s7_36`,closeBtn:`_closeBtn_1y1s7_50`,searchBar:`_searchBar_1y1s7_63`,searchIcon:`_searchIcon_1y1s7_78`,searchInput:`_searchInput_1y1s7_79`,note:`_note_1y1s7_90`,body:`_body_1y1s7_106`,section:`_section_1y1s7_112`,sectionTitle:`_sectionTitle_1y1s7_113`,itemList:`_itemList_1y1s7_122`,item:`_item_1y1s7_122`,itemKey:`_itemKey_1y1s7_141`,itemDesc:`_itemDesc_1y1s7_147`,empty:`_empty_1y1s7_152`},yc=[{id:`navigation`,title:`🧭 Navigation`,items:[{key:`↑ / ↓`,desc:`Navigate rows in the main table (planned — currently mouse-only)`},{key:`Enter`,desc:`Open the detail panel for the focused row`},{key:`Esc`,desc:`Close any open modal or detail panel`}]},{id:`filters`,title:`🔍 Filters`,items:[{key:`Tier chip`,desc:`Click to cycle: All → S+ → S → A+ → A → A- → B+ → B → C → All`},{key:`Status chip`,desc:`Click to cycle: All → Up → Down → Pending`},{key:`Verdict chip`,desc:`Click to cycle: All → Perfect → Normal → Spiky → Slow → Overloaded → Down → Unstable → Pending`},{key:`Health chip`,desc:`Click to cycle: All → Up → Timeout → Down → Pending → No key → Auth err`},{key:`Visibility`,desc:`Normal (all) / Configured only (hide no-key) / Usable only (UP + good verdict)`},{key:`Provider dropdown`,desc:`Filter by provider`},{key:`Custom text filter`,desc:"Apply via ⌘K palette or `Apply text filter` — clear with the X chip"},{key:`Reset button`,desc:`Clears every active filter + sort back to defaults`}]},{id:`sort`,title:`📶 Sort`,items:[{key:`Click any column header`,desc:`Sort asc → desc → reset (no sort, default order)`},{key:`Resizable columns`,desc:`Drag the right edge of any header to resize. Double-click resets one column.`}]},{id:`favorites`,title:`⭐ Favorites`,items:[{key:`Star button (per row)`,desc:`Click to favorite / unfavorite the model (TUI: F key)`},{key:`Detail panel`,desc:`Favorite + Up/Down reorder + current priority rank (TUI: Shift+↑/↓)`},{key:`Pinned mode`,desc:`In the Settings view, toggle "Pinned + always visible" (TUI: Y key)`},{key:`Shared with TUI`,desc:`Favorites are persisted in the same ~/.free-coding-models.json the TUI uses`}]},{id:`benchmark`,title:`🤖 AI Speed Test (benchmark)`,items:[{key:`Header button`,desc:`Run a global AI Speed Test on every visible model`},{key:`AI Lat. cell`,desc:`Click any AI Lat. cell to benchmark just that model (TUI: Ctrl+A)`},{key:`Detail panel`,desc:`Dedicated "AI Speed Test" button (TUI: Ctrl+A)`},{key:`TPS column`,desc:`Tokens per second for the model — appears after a benchmark run`},{key:`Latency column`,desc:`Real completion latency (not just ping) for the model`}]},{id:`tools`,title:`🧰 Tool mode (M3)`,items:[{key:`M3 shipped`,desc:`Endpoint target picker, per-row Install Endpoint button, and incompatible-target fallback modal`}]},{id:`palette`,title:`⚡ Command palette`,items:[{key:`⌘K / Ctrl+P`,desc:`The Web's only global keyboard shortcut — toggles the command palette`},{key:`Type to search`,desc:`Fuzzy match across all filters, sorts, tools, pages, and theme / ping / reset actions`},{key:`↑ / ↓ + Enter`,desc:`Navigate the results and execute the highlighted command`},{key:`Esc`,desc:`Close the palette without running anything`}]},{id:`theme`,title:`🌗 Theme`,items:[{key:`Theme button (header)`,desc:`Click to cycle: auto → dark → light (TUI: G key)`},{key:`Auto mode`,desc:`Follows the OS prefers-color-scheme preference and updates live`}]},{id:`ping`,title:`⚡ Ping mode`,items:[{key:`Speed / Normal / Slow / Forced`,desc:`Ping cadence (2s / 10s / 30s / 4s) — TUI: W key`},{key:`next ping in Xs`,desc:`Live countdown shown in the FilterBar (TUI footer style)`}]},{id:`url`,title:`🔗 URL deep-linking`,items:[{key:`?tier=S+&sort=verdict&origin=groq&view=dashboard`,desc:`Every filter / sort / view is reflected in the URL — share pre-filtered links`}]},{id:`cli`,title:`⌨️ CLI parity`,items:[{key:`Same storage`,desc:`The Web reads + writes the same ~/.free-coding-models.json as the TUI`},{key:`Same engine`,desc:`All model parsing, ping, and benchmark code is shared with the TUI`}]},{id:`how-router-works`,title:`🌐 How the FCM Router works`,items:[{key:`Smart router`,desc:`Point any OpenAI client at http://localhost:19280/v1 with model: "fcm". The daemon picks the healthiest model in the active set and forwards the request with automatic failover.`},{key:`Pre-prompt`,desc:`A first-class system message is injected on every proxied request. The default introduces the assistant as the FCM routing agent. Edit from Settings.`},{key:`Probes`,desc:`Every 10s/30s/120s (eco/balanced/aggressive) the daemon sends a 1-token chat-completion ping to every model in the active set. The probe measures latency + status code, not just URL reachability — so a wrong API key is caught and the circuit opens.`},{key:`Circuit breaker`,desc:`Per-model state. Healthy (green) = last probe 2xx, route here. Down (red) = last 3 probes failed, skip until cooldown. Recovering (yellow) = cooldown expired, retrying. Auth error (orange) = 401/403, your key is wrong. Deprecated (gray) = removed from catalog, will be replaced by auto-heal.`},{key:`Failover order`,desc:`Models are tried in priority order. A model in Recovering/Down/Auth error is skipped — the request goes to the next healthy one. If ALL fail, you get 503 with the "models_tried" list in the error body.`},{key:`Auto-heal`,desc:`On daemon start, every Auth-error / Deprecated model in the active set is swapped for a working alternative (same provider first, then cross-provider). The first time you add/remove/reorder a model, auto-heal switches off.`},{key:`Rate limits`,desc:`Each provider has its own quota. Common free-tier limits: Groq 14 400 RPD, Mistral 1 RPS, NVIDIA ~40 RPM, OpenRouter 50 RPD. When a provider returns 429, the router fails over. When daily quota is exhausted, the model goes Auth error and auto-heal swaps it out next start.`}]}];function bc({onClose:e}){let[t,n]=(0,v.useState)(``),r=(0,v.useMemo)(()=>{let e=t.trim().toLowerCase();return e?yc.map(t=>({...t,items:t.items.filter(t=>t.key.toLowerCase().includes(e)||t.desc.toLowerCase().includes(e))})).filter(e=>e.items.length>0):yc},[t]);return(0,I.jsx)(`div`,{className:vc.backdrop,onClick:e,children:(0,I.jsxs)(`div`,{className:vc.modal,onClick:e=>e.stopPropagation(),children:[(0,I.jsxs)(`div`,{className:vc.header,children:[(0,I.jsxs)(`div`,{className:vc.titleRow,children:[(0,I.jsx)(`h2`,{className:vc.title,children:`❓ Help & Keyboard Shortcuts`}),(0,I.jsx)(`button`,{className:vc.closeBtn,onClick:e,"aria-label":`Close help`,children:(0,I.jsx)(Gr,{size:18,stroke:1.5})})]}),(0,I.jsxs)(`div`,{className:vc.searchBar,children:[(0,I.jsx)(Pr,{size:14,stroke:1.5,className:vc.searchIcon}),(0,I.jsx)(`input`,{className:vc.searchInput,placeholder:`Search help (filters, hotkeys, TUI parity)…`,value:t,onChange:e=>n(e.target.value),autoFocus:!0})]}),(0,I.jsxs)(`p`,{className:vc.note,children:[`The Web Dashboard is mouse-first. The only global keyboard shortcut is`,` `,(0,I.jsx)(`kbd`,{children:`⌘K`}),` / `,(0,I.jsx)(`kbd`,{children:`Ctrl+P`}),` for the command palette — everything else lives here, in the header menu, or in modals.`]})]}),(0,I.jsx)(`div`,{className:vc.body,children:r.length===0?(0,I.jsxs)(`div`,{className:vc.empty,children:[`No help matches "`,t,`".`]}):r.map(e=>(0,I.jsxs)(`section`,{className:vc.section,children:[(0,I.jsx)(`h3`,{className:vc.sectionTitle,children:e.title}),(0,I.jsx)(`ul`,{className:vc.itemList,children:e.items.map(e=>(0,I.jsxs)(`li`,{className:vc.item,children:[(0,I.jsx)(`span`,{className:vc.itemKey,children:e.key}),(0,I.jsx)(`span`,{className:vc.itemDesc,children:e.desc})]},e.key+e.desc))})]},e.id))})]})})}function xc(){let[e,t]=(0,v.useState)({}),[n,r]=(0,v.useState)(!0),[i,a]=(0,v.useState)(null),o=(0,v.useCallback)(async()=>{try{let e=await fetch(`/api/changelog`);if(!e.ok)throw Error(`HTTP ${e.status}`);t((await e.json())?.versions??{}),a(null)}catch(e){a(e.message||`Failed to load changelog`)}finally{r(!1)}},[]);return(0,v.useEffect)(()=>{o()},[o]),{versions:e,sortedVersions:(0,v.useMemo)(()=>Object.keys(e).sort((e,t)=>{let n=e.split(`.`).map(Number),r=t.split(`.`).map(Number);for(let e=0;e<Math.max(n.length,r.length);e++){let t=n[e]||0,i=r[e]||0;if(i!==t)return i-t}return 0}),[e]),getVersion:(0,v.useCallback)(t=>e[t]??null,[e]),loading:n,error:i,refresh:o}}var Sc={backdrop:`_backdrop_5ik46_6`,modal:`_modal_5ik46_19`,header:`_header_5ik46_31`,titleRow:`_titleRow_5ik46_36`,title:`_title_5ik46_36`,backBtn:`_backBtn_5ik46_51`,closeBtn:`_closeBtn_5ik46_68`,body:`_body_5ik46_82`,indexWrap:`_indexWrap_5ik46_88`,indexHint:`_indexHint_5ik46_89`,versionList:`_versionList_5ik46_95`,versionBtn:`_versionBtn_5ik46_103`,versionLabel:`_versionLabel_5ik46_119`,versionSummary:`_versionSummary_5ik46_125`,details:`_details_5ik46_130`,section:`_section_5ik46_131`,sectionTitle:`_sectionTitle_5ik46_132`,itemList:`_itemList_5ik46_140`,item:`_item_5ik46_140`,empty:`_empty_5ik46_155`},Cc=[{key:`added`,label:`✨ Added`,icon:`✨`},{key:`fixed`,label:`🐛 Fixed`,icon:`🐛`},{key:`changed`,label:`🔄 Changed`,icon:`🔄`},{key:`updated`,label:`📝 Updated`,icon:`📝`}];function wc({onClose:e,defaultVersion:t=null}){let{sortedVersions:n,getVersion:r,loading:i,error:a}=xc(),[o,s]=(0,v.useState)(t?`details`:`index`),[c,l]=(0,v.useState)(t),u=e=>{l(e),s(`details`)},d=()=>{l(null),s(`index`)},f=c?r(c):null;return(0,I.jsx)(`div`,{className:Sc.backdrop,onClick:e,children:(0,I.jsxs)(`div`,{className:Sc.modal,onClick:e=>e.stopPropagation(),children:[(0,I.jsx)(`div`,{className:Sc.header,children:(0,I.jsxs)(`div`,{className:Sc.titleRow,children:[(0,I.jsx)(`h2`,{className:Sc.title,children:o===`index`?`📋 Changelog`:`📋 v${c}`}),o===`details`&&(0,I.jsxs)(`button`,{className:Sc.backBtn,onClick:d,title:`Back to index (TUI: B)`,children:[(0,I.jsx)(Vn,{size:14,stroke:1.5}),` Index`]}),(0,I.jsx)(`button`,{className:Sc.closeBtn,onClick:e,"aria-label":`Close changelog`,children:(0,I.jsx)(Gr,{size:18,stroke:1.5})})]})}),(0,I.jsxs)(`div`,{className:Sc.body,children:[i&&(0,I.jsx)(`div`,{className:Sc.empty,children:`Loading changelog…`}),a&&!i&&(0,I.jsxs)(`div`,{className:Sc.empty,children:[`Failed to load changelog: `,a]}),!i&&!a&&o===`index`&&(0,I.jsxs)(`div`,{className:Sc.indexWrap,children:[(0,I.jsxs)(`p`,{className:Sc.indexHint,children:[n.length,` versions. Click any to read the release notes.`]}),(0,I.jsx)(`ul`,{className:Sc.versionList,children:n.map(e=>{let t=r(e),n=[];return t?.added?.length&&n.push(`${t.added.length} added`),t?.fixed?.length&&n.push(`${t.fixed.length} fixed`),t?.changed?.length&&n.push(`${t.changed.length} changed`),(0,I.jsx)(`li`,{children:(0,I.jsxs)(`button`,{className:Sc.versionBtn,onClick:()=>u(e),children:[(0,I.jsxs)(`span`,{className:Sc.versionLabel,children:[`v`,e]}),(0,I.jsx)(`span`,{className:Sc.versionSummary,children:n.length>0?n.join(` · `):`—`})]})},e)})})]}),!i&&!a&&o===`details`&&f&&(0,I.jsxs)(`div`,{className:Sc.details,children:[Cc.map(({key:e,label:t})=>{let n=f[e];return!n||n.length===0?null:(0,I.jsxs)(`section`,{className:Sc.section,children:[(0,I.jsx)(`h3`,{className:Sc.sectionTitle,children:t}),(0,I.jsx)(`ul`,{className:Sc.itemList,children:n.map((e,t)=>(0,I.jsx)(`li`,{className:Sc.item,children:Tc(e)},t))})]},e)}),Cc.every(({key:e})=>!f[e]?.length)&&(0,I.jsxs)(`div`,{className:Sc.empty,children:[`No release notes for v`,c,`.`]})]}),!i&&!a&&o===`details`&&!f&&(0,I.jsxs)(`div`,{className:Sc.empty,children:[`No notes for v`,c,`.`]})]})]})})}function Tc(e){return e.replace(/\*\*([^*]+)\*\*/g,`$1`).replace(/`([^`]+)`/g,`$1`).trim()}var Ec={wrap:`_wrap_10lrt_6`,chip:`_chip_10lrt_11`,checking:`_checking_10lrt_34`,dot:`_dot_10lrt_42`,pulse:`_pulse_10lrt_1`,popover:`_popover_10lrt_54`,popoverHeader:`_popoverHeader_10lrt_67`,popoverTitle:`_popoverTitle_10lrt_74`,popoverClose:`_popoverClose_10lrt_82`,popoverBody:`_popoverBody_10lrt_95`,popoverActions:`_popoverActions_10lrt_107`,primaryAction:`_primaryAction_10lrt_113`,secondaryAction:`_secondaryAction_10lrt_114`};function Dc({updateAvailable:e,latestVersion:t,onRunUpdate:n,onOpenChangelog:r,checking:i}){let[a,o]=(0,v.useState)(!1),s=(0,v.useRef)(null);return(0,v.useEffect)(()=>{if(!a)return;let e=e=>{s.current&&!s.current.contains(e.target)&&o(!1)},t=e=>{e.key===`Escape`&&o(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[a]),e?(0,I.jsxs)(`div`,{className:Ec.wrap,ref:s,children:[(0,I.jsxs)(`button`,{className:Ec.chip,onClick:()=>o(e=>!e),title:`Update available: v${t}. Click to install.`,"aria-expanded":a,"aria-haspopup":`dialog`,children:[(0,I.jsx)(ar,{size:13,stroke:1.5}),(0,I.jsxs)(`span`,{children:[`v`,t]})]}),a&&(0,I.jsxs)(`div`,{className:Ec.popover,role:`dialog`,"aria-label":`Update available`,children:[(0,I.jsxs)(`div`,{className:Ec.popoverHeader,children:[(0,I.jsxs)(`div`,{className:Ec.popoverTitle,children:[(0,I.jsx)(ar,{size:14,stroke:1.5}),(0,I.jsx)(`span`,{children:`Update available`})]}),(0,I.jsx)(`button`,{className:Ec.popoverClose,onClick:()=>o(!1),"aria-label":`Close`,children:(0,I.jsx)(Gr,{size:14,stroke:1.5})})]}),(0,I.jsxs)(`p`,{className:Ec.popoverBody,children:[`A newer version (`,(0,I.jsxs)(`strong`,{children:[`v`,t]}),`) is available on npm. After updating, restart the dashboard to pick up the changes.`]}),(0,I.jsxs)(`div`,{className:Ec.popoverActions,children:[(0,I.jsxs)(`button`,{className:Ec.primaryAction,onClick:()=>{o(!1),n?.()},children:[(0,I.jsx)(ar,{size:13,stroke:1.5}),(0,I.jsx)(`span`,{children:`Update now`})]}),(0,I.jsxs)(`button`,{className:Ec.secondaryAction,onClick:()=>{o(!1),r?.(t)},children:[(0,I.jsx)(hr,{size:13,stroke:1.5}),(0,I.jsx)(`span`,{children:`What's new`})]})]})]})]}):i?(0,I.jsx)(`span`,{className:Ec.checking,title:`Checking for updates…`,children:(0,I.jsx)(`span`,{className:Ec.dot})}):null}var Oc={quickfix:{label:`Quick Fix`,sweWeight:.2,speedWeight:.5,ctxWeight:.1,stabilityWeight:.2},refactor:{label:`Deep Refactor`,sweWeight:.4,speedWeight:.1,ctxWeight:.3,stabilityWeight:.2},review:{label:`Code Review`,sweWeight:.35,speedWeight:.2,ctxWeight:.25,stabilityWeight:.2},testgen:{label:`Test Generation`,sweWeight:.35,speedWeight:.15,ctxWeight:.2,stabilityWeight:.3}},kc={speed:{label:`Speed`,speedMultiplier:1.5,sweMultiplier:.7},quality:{label:`Quality`,speedMultiplier:.7,sweMultiplier:1.5},balanced:{label:`Balanced`,speedMultiplier:1,sweMultiplier:1}},Ac={small:{label:`Small file (<4K)`,minCtx:0,idealCtx:32},medium:{label:`Medium project (<32K)`,minCtx:32,idealCtx:128},large:{label:`Large codebase (>32K)`,minCtx:128,idealCtx:256}};function jc({onToast:e}={}){let[t,n]=(0,v.useState)(!1),[r,i]=(0,v.useState)(0),[a,o]=(0,v.useState)([]),[s,c]=(0,v.useState)(null),l=(0,v.useRef)(null);return(0,v.useEffect)(()=>()=>{l.current&&clearInterval(l.current)},[]),{recommend:(0,v.useCallback)(async t=>{l.current&&clearInterval(l.current),n(!0),i(0),o([]),c(null);let r=Date.now();l.current=setInterval(()=>{i(Math.min(98,Math.round((Date.now()-r)/1e4*100)))},250);try{await new Promise(e=>setTimeout(e,1e4));let e=await fetch(`/api/recommend`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({answers:t})}),n=await e.json().catch(()=>({}));if(!e.ok)throw Error(n.error||`HTTP ${e.status}`);return o(Array.isArray(n.top3)?n.top3:[]),i(100),{ok:!0,top3:n.top3||[]}}catch(t){return c(t.message),e?.(`Recommend failed: ${t.message}`,`error`),{ok:!1,error:t.message}}finally{l.current&&clearInterval(l.current),l.current=null,n(!1)}},[e]),loading:t,progress:r,results:a,error:s,reset:(0,v.useCallback)(()=>{l.current&&clearInterval(l.current),l.current=null,n(!1),i(0),o([]),c(null)},[])}}var Mc={backdrop:`_backdrop_7j81h_2`,modal:`_modal_7j81h_13`,header:`_header_7j81h_23`,footer:`_footer_7j81h_24`,eyebrow:`_eyebrow_7j81h_27`,summary:`_summary_7j81h_28`,muted:`_muted_7j81h_29`,close:`_close_7j81h_30`,secondary:`_secondary_7j81h_31`,body:`_body_7j81h_35`,steps:`_steps_7j81h_36`,options:`_options_7j81h_38`,option:`_option_7j81h_38`,progress:`_progress_7j81h_43`,percent:`_percent_7j81h_45`,results:`_results_7j81h_46`,resultCard:`_resultCard_7j81h_47`,medal:`_medal_7j81h_48`,resultMain:`_resultMain_7j81h_49`,score:`_score_7j81h_53`,error:`_error_7j81h_54`},Nc=[{key:`taskType`,title:`What are you working on?`,options:Oc},{key:`priority`,title:`What matters most?`,options:kc},{key:`contextBudget`,title:`How big is your context?`,options:Ac}];function Pc({onClose:e,onLaunch:t,onPinAndLaunch:n,toolMode:r,onToast:i}){let[a,o]=(0,v.useState)(0),[s,c]=(0,v.useState)({taskType:null,priority:null,contextBudget:null}),{recommend:l,loading:u,progress:d,results:f,error:p,reset:m}=jc({onToast:i}),h=Nc[a],g=f.length>0,_=(0,v.useMemo)(()=>Nc.map(e=>e.options[s[e.key]]?.label).filter(Boolean).join(` · `),[s]);async function y(e){let t={...s,[h.key]:e};if(c(t),a<Nc.length-1){o(a+1);return}await l(t)}function b(){if(g||u){m(),o(0),c({taskType:null,priority:null,contextBudget:null});return}o(e=>Math.max(0,e-1))}return(0,I.jsx)(`div`,{className:Mc.backdrop,onClick:e,children:(0,I.jsxs)(`div`,{className:Mc.modal,onClick:e=>e.stopPropagation(),children:[(0,I.jsxs)(`header`,{className:Mc.header,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`p`,{className:Mc.eyebrow,children:`Smart Recommend`}),(0,I.jsxs)(`h2`,{children:[(0,I.jsx)(Lr,{size:20}),` Find the best model for this task`]}),_&&(0,I.jsx)(`p`,{className:Mc.summary,children:_})]}),(0,I.jsx)(`button`,{className:Mc.close,onClick:e,"aria-label":`Close`,children:(0,I.jsx)(Gr,{size:18})})]}),!u&&!g&&(0,I.jsxs)(`main`,{className:Mc.body,children:[(0,I.jsxs)(`div`,{className:Mc.steps,children:[`Question `,a+1,` / `,Nc.length]}),(0,I.jsx)(`h3`,{children:h.title}),(0,I.jsx)(`div`,{className:Mc.options,children:Object.entries(h.options).map(([e,t])=>(0,I.jsxs)(`button`,{className:Mc.option,onClick:()=>y(e),children:[(0,I.jsx)(`strong`,{children:t.label}),(0,I.jsx)(`span`,{children:e})]},e))})]}),u&&(0,I.jsxs)(`main`,{className:Mc.body,children:[(0,I.jsx)(`h3`,{children:`Analyzing live catalog…`}),(0,I.jsx)(`p`,{className:Mc.muted,children:`10 seconds · roughly 2 checks/sec · same scoring as the TUI.`}),(0,I.jsx)(`div`,{className:Mc.progress,children:(0,I.jsx)(`span`,{style:{width:`${d}%`}})}),(0,I.jsxs)(`p`,{className:Mc.percent,children:[d,`%`]})]}),g&&(0,I.jsxs)(`main`,{className:Mc.body,children:[(0,I.jsx)(`h3`,{children:`Top 3 recommendations`}),(0,I.jsx)(`div`,{className:Mc.results,children:f.map((e,t)=>(0,I.jsxs)(`article`,{className:Mc.resultCard,children:[(0,I.jsx)(`div`,{className:Mc.medal,children:[`🥇`,`🥈`,`🥉`][t]}),(0,I.jsxs)(`div`,{className:Mc.resultMain,children:[(0,I.jsx)(`strong`,{children:e.result.label}),(0,I.jsxs)(`span`,{children:[e.result.origin,` · `,e.result.tier,` · `,e.result.ctx]}),(0,I.jsx)(`p`,{children:e.reason})]}),(0,I.jsx)(`div`,{className:Mc.score,children:e.score}),(0,I.jsx)(vs,{model:e.result,toolMode:r,onLaunch:()=>n?.(e.result)})]},`${e.result.providerKey}/${e.result.modelId}`))})]}),p&&(0,I.jsx)(`p`,{className:Mc.error,children:p}),(0,I.jsxs)(`footer`,{className:Mc.footer,children:[(0,I.jsxs)(`button`,{className:Mc.secondary,onClick:b,disabled:a===0&&!u&&!g,children:[(0,I.jsx)(Vn,{size:14}),` `,g||u?`Restart`:`Back`]}),(0,I.jsx)(`button`,{className:Mc.secondary,onClick:e,children:`Close`})]})]})})}var Fc={backdrop:`_backdrop_8r8li_2`,modal:`_modal_8r8li_13`,modalWide:`_modalWide_8r8li_14`,header:`_header_8r8li_25`,eyebrow:`_eyebrow_8r8li_40`,close:`_close_8r8li_48`,body:`_body_8r8li_61`,command:`_command_8r8li_62`,note:`_note_8r8li_72`,muted:`_muted_8r8li_73`,docs:`_docs_8r8li_74`,error:`_error_8r8li_75`,footer:`_footer_8r8li_76`,primary:`_primary_8r8li_83`,secondary:`_secondary_8r8li_84`,option:`_option_8r8li_85`,grid:`_grid_8r8li_103`,card:`_card_8r8li_104`,stack:`_stack_8r8li_111`};function Ic({request:e,models:t=[],onClose:n,onSwitchToolLaunch:r,onLaunchSimilar:i}){if(!e?.model)return null;let{model:a,toolMode:o}=e,s=vn(o),c=bn(a.providerKey),l=Sn(a.sweScore,o,t,3).filter(e=>e.modelId!==a.modelId||e.providerKey!==a.providerKey);return(0,I.jsx)(`div`,{className:Fc.backdrop,onClick:n,children:(0,I.jsxs)(`div`,{className:Fc.modalWide,onClick:e=>e.stopPropagation(),children:[(0,I.jsxs)(`div`,{className:Fc.header,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`p`,{className:Fc.eyebrow,children:`Incompatible model`}),(0,I.jsxs)(`h2`,{children:[(0,I.jsx)(zn,{size:18}),` `,a.label,` cannot be installed in `,s.emoji,` `,s.label]})]}),(0,I.jsx)(`button`,{className:Fc.close,onClick:n,"aria-label":`Close`,children:(0,I.jsx)(Gr,{size:18})})]}),(0,I.jsxs)(`div`,{className:Fc.grid,children:[(0,I.jsxs)(`section`,{className:Fc.card,children:[(0,I.jsxs)(`h3`,{children:[(0,I.jsx)(Br,{size:15}),` Switch tool`]}),(0,I.jsx)(`p`,{className:Fc.muted,children:`This provider can be configured in these tools. Pick one and FCM installs the endpoint.`}),(0,I.jsx)(`div`,{className:Fc.stack,children:c.map(e=>{let t=vn(e);return(0,I.jsxs)(`button`,{className:Fc.option,onClick:()=>r?.(e,a),children:[(0,I.jsx)(`span`,{children:t.emoji}),(0,I.jsx)(`strong`,{children:t.label})]},e)})})]}),(0,I.jsxs)(`section`,{className:Fc.card,children:[(0,I.jsxs)(`h3`,{children:[(0,I.jsx)(Or,{size:15}),` Similar models`]}),(0,I.jsxs)(`p`,{className:Fc.muted,children:[`Or keep `,s.label,` and install a compatible model close to the same SWE score.`]}),(0,I.jsxs)(`div`,{className:Fc.stack,children:[l.length===0&&(0,I.jsx)(`p`,{className:Fc.muted,children:`No close compatible alternative found yet.`}),l.map(e=>(0,I.jsxs)(`button`,{className:Fc.option,onClick:()=>i?.(e),children:[(0,I.jsx)(`span`,{children:e.tier}),(0,I.jsx)(`strong`,{children:e.label}),(0,I.jsxs)(`small`,{children:[e.providerKey,` · `,e.sweScore]})]},`${e.providerKey}/${e.modelId}`))]})]})]})]})})}var J={overlay:`_overlay_1ay4p_1`,fadeIn:`_fadeIn_1ay4p_1`,modal:`_modal_1ay4p_12`,header:`_header_1ay4p_24`,title:`_title_1ay4p_32`,closeBtn:`_closeBtn_1ay4p_42`,body:`_body_1ay4p_53`,heroCard:`_heroCard_1ay4p_60`,heroRunning:`_heroRunning_1ay4p_69`,heroStopped:`_heroStopped_1ay4p_74`,heroLeft:`_heroLeft_1ay4p_79`,heroStatus:`_heroStatus_1ay4p_85`,statusDot:`_statusDot_1ay4p_91`,dotGreen:`_dotGreen_1ay4p_98`,dotGray:`_dotGray_1ay4p_103`,heroLabel:`_heroLabel_1ay4p_107`,heroMeta:`_heroMeta_1ay4p_113`,heroActions:`_heroActions_1ay4p_121`,startBtn:`_startBtn_1ay4p_127`,stopBtn:`_stopBtn_1ay4p_143`,refreshBtn:`_refreshBtn_1ay4p_159`,quickSetup:`_quickSetup_1ay4p_174`,sectionTitle:`_sectionTitle_1ay4p_178`,quickRows:`_quickRows_1ay4p_190`,quickRow:`_quickRow_1ay4p_190`,quickLabel:`_quickLabel_1ay4p_206`,quickValue:`_quickValue_1ay4p_214`,copyBtn:`_copyBtn_1ay4p_224`,section:`_section_1ay4p_178`,probeModes:`_probeModes_1ay4p_239`,probeBtn:`_probeBtn_1ay4p_244`,probeActive:`_probeActive_1ay4p_256`,modelList:`_modelList_1ay4p_264`,modelRow:`_modelRow_1ay4p_270`,modelPriority:`_modelPriority_1ay4p_280`,modelName:`_modelName_1ay4p_286`,modelScore:`_modelScore_1ay4p_295`,modelLatency:`_modelLatency_1ay4p_301`,circuitBadge:`_circuitBadge_1ay4p_307`,circuitClosed:`_circuitClosed_1ay4p_318`,circuitOpen:`_circuitOpen_1ay4p_319`,circuitHalfOpen:`_circuitHalfOpen_1ay4p_320`,circuitAuth:`_circuitAuth_1ay4p_321`,circuitUnknown:`_circuitUnknown_1ay4p_322`,logList:`_logList_1ay4p_325`,logRow:`_logRow_1ay4p_331`,logOk:`_logOk_1ay4p_340`,logErr:`_logErr_1ay4p_341`,logModel:`_logModel_1ay4p_342`,logLatency:`_logLatency_1ay4p_343`,logTokens:`_logTokens_1ay4p_344`,logFailover:`_logFailover_1ay4p_345`,setMeta:`_setMeta_1ay4p_361`,setMetaName:`_setMetaName_1ay4p_370`,setActions:`_setActions_1ay4p_376`,smallBtn:`_smallBtn_1ay4p_382`,primaryBtn:`_primaryBtn_1ay4p_399`,setList:`_setList_1ay4p_416`,setEmpty:`_setEmpty_1ay4p_423`,setRow:`_setRow_1ay4p_433`,setRowDragging:`_setRowDragging_1ay4p_452`,setRowDropTarget:`_setRowDropTarget_1ay4p_458`,setRowDropTargetAbove:`_setRowDropTargetAbove_1ay4p_463`,setRowDropTargetBelow:`_setRowDropTargetBelow_1ay4p_467`,setDragHandle:`_setDragHandle_1ay4p_471`,setPriority:`_setPriority_1ay4p_482`,setKey:`_setKey_1ay4p_491`,setTier:`_setTier_1ay4p_501`,setRowBtns:`_setRowBtns_1ay4p_513`,iconBtn:`_iconBtn_1ay4p_518`,removeBtn:`_removeBtn_1ay4p_532`,pickerPanel:`_pickerPanel_1ay4p_535`,pickerHeader:`_pickerHeader_1ay4p_546`,pickerSearch:`_pickerSearch_1ay4p_555`,pickerInput:`_pickerInput_1ay4p_560`,pickerSelect:`_pickerSelect_1ay4p_573`,pickerList:`_pickerList_1ay4p_586`,pickerItem:`_pickerItem_1ay4p_594`,pickerItemAdded:`_pickerItemAdded_1ay4p_607`,pickerProvider:`_pickerProvider_1ay4p_613`,pickerModel:`_pickerModel_1ay4p_618`,pickerBadge:`_pickerBadge_1ay4p_625`,pickerBadgeOk:`_pickerBadgeOk_1ay4p_635`,pickerEmpty:`_pickerEmpty_1ay4p_640`,saveStatus:`_saveStatus_1ay4p_647`,saveStatusOk:`_saveStatusOk_1ay4p_657`,saveStatusErr:`_saveStatusErr_1ay4p_658`,autoHealBanner:`_autoHealBanner_1ay4p_662`,autoHealLeft:`_autoHealLeft_1ay4p_674`,autoHealIcon:`_autoHealIcon_1ay4p_682`,autoHealTitle:`_autoHealTitle_1ay4p_689`,autoHealHint:`_autoHealHint_1ay4p_696`,autoHealActions:`_autoHealActions_1ay4p_706`};function Lc(e){if(!e||e<=0)return`—`;let t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=e%60;return t>0?`${t}h ${n}m`:n>0?`${n}m ${r}s`:`${r}s`}function Rc(e){return typeof e!=`number`||!Number.isFinite(e)?`0`:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e)}var zc={CLOSED:{label:`Healthy`,cls:`circuitClosed`},OPEN:{label:`Down`,cls:`circuitOpen`},HALF_OPEN:{label:`Recovering`,cls:`circuitHalfOpen`},AUTH_ERROR:{label:`Auth error`,cls:`circuitAuth`},STALE:{label:`Deprecated`,cls:`circuitUnknown`},UNSUPPORTED:{label:`Unsupported`,cls:`circuitUnknown`},UNKNOWN:{label:`Unknown`,cls:`circuitUnknown`}};function Bc({state:e}){let t=zc[e]||zc.UNKNOWN;return(0,I.jsx)(`span`,{className:`${J.circuitBadge} ${J[t.cls]}`,children:t.label})}var Vc={kind:`idle`},Hc={kind:`saving`},Uc={kind:`saved`},Wc=e=>({kind:`error`,message:e});function Gc({onClose:e,onToast:t}){let[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(!1),[f,p]=(0,v.useState)(null),[m,h]=(0,v.useState)(!1),[g,_]=(0,v.useState)({activeSet:null,sets:{}}),[y,b]=(0,v.useState)([]),[x,S]=(0,v.useState)(!1),[C,w]=(0,v.useState)(``),[T,E]=(0,v.useState)(``),[D,O]=(0,v.useState)(Vc),ee=(0,v.useRef)(null),te=(0,v.useCallback)(async()=>{try{let e=await(await fetch(`/api/router/status`)).json();if(r(e),e?.ok){let e=await(await fetch(`/api/router/stats`)).json();e.ok&&a(e)}}catch{}},[]),k=(0,v.useCallback)(async()=>{try{let e=await(await fetch(`/api/router/sets`)).json();e&&e.sets&&_(e)}catch{}},[]),ne=(0,v.useCallback)(async()=>{try{let e=await(await fetch(`/api/router/catalog`)).json();Array.isArray(e?.models)&&b(e.models)}catch{}},[]);(0,v.useEffect)(()=>{te(),k(),ne(),fetch(`/api/router/quick-setup`).then(e=>e.json()).then(s).catch(()=>{});let e=setInterval(()=>{te(),k()},5e3);return()=>clearInterval(e)},[te,k,ne]),(0,v.useEffect)(()=>{if(D.kind===`saved`)return ee.current=setTimeout(()=>O(Vc),1500),()=>{ee.current&&clearTimeout(ee.current)}},[D]);let re=async()=>{l(!0);try{let e=await(await fetch(`/api/router/start`,{method:`POST`})).json();e.ok||e.alreadyRunning?(t?.(`Router daemon started.`,`success`),await te(),await k()):t?.(`Failed to start: ${e.error||`unknown`}`,`error`)}catch(e){t?.(`Start failed: ${e.message}`,`error`)}finally{l(!1)}},ie=async()=>{l(!0);try{let e=await(await fetch(`/api/router/stop`,{method:`POST`})).json();e.ok?(t?.(`Router daemon stopped.`,`success`),r({ok:!1,running:!1}),a(null)):t?.(`Failed to stop: ${e.error||`unknown`}`,`error`)}catch(e){t?.(`Stop failed: ${e.message}`,`error`)}finally{l(!1)}},ae=(e,t)=>{navigator.clipboard.writeText(e).then(()=>{p(t),setTimeout(()=>p(null),1500)})},A=async e=>{try{await fetch(`/api/router/probe-mode`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({probeMode:e})}),t?.(`Probe mode set to ${e}.`,`info`),await te()}catch{}},j=g?.activeSet||n?.activeSet||`fast-coding`,oe=g?.sets?.[j]||{models:[]},se=Array.isArray(oe.models)?oe.models:[],ce=async e=>{try{await fetch(`/api/router/sets/${encodeURIComponent(e)}/activate`,{method:`POST`}),t?.(`Active set: ${e}`,`info`),await k(),await te()}catch(e){t?.(`Failed to activate: ${e.message}`,`error`)}},M=async()=>{if(j){O(Hc),t?.(`Probing models with your keys…`,`info`);try{let e=await fetch(`/api/router/sets/${encodeURIComponent(j)}/sync`,{method:`POST`});if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(t.error||`HTTP ${e.status}`)}let n=await e.json(),r=n.selected?.length||0,i=n.probeCount||0;t?.(`Synced ${j}: ${r} working model${r===1?``:`s`} from ${i} probes.`,`success`),await k(),await te(),O(Uc)}catch(e){O(Wc(e.message||String(e))),t?.(`Sync failed: ${e.message}`,`error`)}}},le=(0,v.useCallback)(async e=>{if(j){O(Hc);try{let t=e.map(e=>`${e.provider}/${e.model}`),n=await fetch(`/api/router/sets/${encodeURIComponent(j)}/reorder`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({order:t})});if(!n.ok){let e=await n.json().catch(()=>({}));throw Error(e.error||`HTTP ${n.status}`)}let r=await n.json();r?.sets?.[j]?_(e=>({...e,sets:r.sets})):await k(),O(Uc)}catch(e){O(Wc(e.message||String(e))),t?.(`Reorder failed: ${e.message}`,`error`)}}},[j,k,t]),N=(0,v.useCallback)(async(e,n)=>{if(j){O(Hc);try{let r=await fetch(`/api/router/sets/${encodeURIComponent(j)}/models`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({provider:e,model:n})});if(!r.ok){let e=await r.json().catch(()=>({}));throw Error(e.error||`HTTP ${r.status}`)}let i=await r.json();i?.sets?.[j]?_(e=>({...e,sets:i.sets})):await k(),O(Uc),t?.(`Added ${e}/${n} to ${j}.`,`success`)}catch(e){O(Wc(e.message||String(e))),t?.(`Add failed: ${e.message}`,`error`)}}},[j,k,t]),ue=(0,v.useCallback)(async(e,n)=>{if(j){O(Hc);try{let t=await fetch(`/api/router/sets/${encodeURIComponent(j)}/models`,{method:`DELETE`,headers:{"Content-Type":`application/json`},body:JSON.stringify({provider:e,model:n})});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error||`HTTP ${t.status}`)}let r=await t.json();r?.sets?.[j]?_(e=>({...e,sets:r.sets})):await k(),O(Uc)}catch(e){O(Wc(e.message||String(e))),t?.(`Remove failed: ${e.message}`,`error`)}}},[j,k,t]),[de,fe]=(0,v.useState)(se);(0,v.useEffect)(()=>{fe(se)},[se]);let[pe,me]=(0,v.useState)(null),[he,ge]=(0,v.useState)(null),_e=(0,v.useCallback)(async(e,t)=>{let n=[...de],r=t===`up`?e-1:e+1;if(r<0||r>=n.length)return;let[i]=n.splice(e,1);n.splice(r,0,i),fe(n),await le(n)},[de,le]),ve=(0,v.useCallback)(async e=>{let t=de[e];t&&(fe(de.filter((t,n)=>n!==e)),await ue(t.provider,t.model))},[de,ue]),ye=(e,t)=>{let n=de[t];n&&(me(`${n.provider}/${n.model}`),e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(`text/plain`,`${n.provider}/${n.model}`))},be=(e,t)=>{if(pe==null)return;e.preventDefault(),e.dataTransfer.dropEffect=`move`;let n=de[t];if(!n)return;let r=`${n.provider}/${n.model}`;if(r===pe)return;let i=e.currentTarget.getBoundingClientRect();ge({key:r,side:e.clientY<i.top+i.height/2?`above`:`below`})},xe=e=>{e.currentTarget.contains(e.relatedTarget)},Se=async(e,t)=>{if(e.preventDefault(),pe==null)return;let n=de.findIndex(e=>`${e.provider}/${e.model}`===pe);if(n<0){me(null),ge(null);return}if(!de[t]){me(null),ge(null);return}let r=e.currentTarget.getBoundingClientRect(),i=(e.clientY<r.top+r.height/2?`above`:`below`)==`above`?t:t+1;if(n<i&&--i,i===n){me(null),ge(null);return}let a=[...de],[o]=a.splice(n,1);a.splice(i,0,o),fe(a),me(null),ge(null),await le(a)},Ce=()=>{me(null),ge(null)},we=(0,v.useMemo)(()=>{let e=new Set(y.map(e=>e.provider));return Array.from(e).sort()},[y]),Te=(0,v.useMemo)(()=>{let e=C.trim().toLowerCase();return y.filter(t=>T&&t.provider!==T?!1:e?t.key.toLowerCase().includes(e)||(t.label||``).toLowerCase().includes(e)||t.provider.toLowerCase().includes(e):!0).slice(0,200)},[y,C,T]),Ee=(e,t)=>de.some(n=>n.provider===e&&n.model===t),De=n?.ok,Oe=i?.circuitBreakers||{},ke=i?.requestLog||[],Ae=g?.sets||{},je=Object.keys(Ae).sort();return(0,I.jsx)(`div`,{className:J.overlay,onClick:t=>t.target===t.currentTarget&&e(),children:(0,I.jsxs)(`div`,{className:J.modal,children:[(0,I.jsxs)(`div`,{className:J.header,children:[(0,I.jsxs)(`h2`,{className:J.title,children:[(0,I.jsx)(Nr,{size:20,stroke:1.5}),`Router Dashboard`]}),(0,I.jsx)(`button`,{className:J.closeBtn,onClick:e,"aria-label":`Close`,children:`✕`})]}),(0,I.jsxs)(`div`,{className:J.body,children:[De&&n?.brokenModelCount>0&&!m&&(0,I.jsxs)(`div`,{className:J.autoHealBanner,children:[(0,I.jsxs)(`div`,{className:J.autoHealLeft,children:[(0,I.jsx)(`span`,{className:J.autoHealIcon,children:`⚠`}),(0,I.jsxs)(`div`,{children:[(0,I.jsxs)(`div`,{className:J.autoHealTitle,children:[n.brokenModelCount,` model`,n.brokenModelCount===1?``:`s`,` in the active set are not responding`]}),(0,I.jsxs)(`div`,{className:J.autoHealHint,children:[`Auto-heal ran on startup but the replacement may also be broken. Click `,(0,I.jsx)(`strong`,{children:`Sync best`}),` below to re-probe with your current keys, or click `,(0,I.jsx)(`strong`,{children:`Fix now`}),` to manually replace the broken entries.`]})]})]}),(0,I.jsxs)(`div`,{className:J.autoHealActions,children:[(0,I.jsxs)(`button`,{className:J.smallBtn,onClick:M,children:[(0,I.jsx)(Wr,{size:11}),`Fix now`]}),(0,I.jsx)(`button`,{className:J.iconBtn,onClick:()=>h(!0),"aria-label":`Dismiss`,children:(0,I.jsx)(Gr,{size:12})})]})]}),(0,I.jsxs)(`div`,{className:`${J.heroCard} ${De?J.heroRunning:J.heroStopped}`,children:[(0,I.jsxs)(`div`,{className:J.heroLeft,children:[(0,I.jsxs)(`div`,{className:J.heroStatus,children:[(0,I.jsx)(`span`,{className:`${J.statusDot} ${De?J.dotGreen:J.dotGray}`}),(0,I.jsx)(`span`,{className:J.heroLabel,children:De?`Running`:`Stopped`})]}),De&&(0,I.jsxs)(`div`,{className:J.heroMeta,children:[(0,I.jsxs)(`span`,{children:[`Port `,n.port]}),(0,I.jsx)(`span`,{children:`·`}),(0,I.jsxs)(`span`,{children:[`Uptime `,Lc(n.uptimeSeconds)]}),(0,I.jsx)(`span`,{children:`·`}),(0,I.jsxs)(`span`,{children:[n.requestsRouted,` requests`]})]}),!De&&(0,I.jsx)(`div`,{className:J.heroMeta,children:`Smart failover router — start to route requests to the healthiest model.`})]}),(0,I.jsxs)(`div`,{className:J.heroActions,children:[De?(0,I.jsxs)(`button`,{className:J.stopBtn,onClick:ie,disabled:c,children:[(0,I.jsx)(Dr,{size:14}),c?`Stopping…`:`Stop`]}):(0,I.jsxs)(`button`,{className:J.startBtn,onClick:re,disabled:c,children:[(0,I.jsx)(Er,{size:14}),c?`Starting…`:`Start Router`]}),(0,I.jsx)(`button`,{className:J.refreshBtn,onClick:te,title:`Refresh`,children:(0,I.jsx)(Mr,{size:14})})]})]}),De&&o&&(0,I.jsxs)(`div`,{className:J.quickSetup,children:[(0,I.jsxs)(`h3`,{className:J.sectionTitle,children:[(0,I.jsx)(rr,{size:14}),`Quick Setup`]}),(0,I.jsxs)(`div`,{className:J.quickRows,children:[o.baseUrl&&(0,I.jsxs)(`div`,{className:J.quickRow,children:[(0,I.jsx)(`span`,{className:J.quickLabel,children:`Base URL`}),(0,I.jsx)(`code`,{className:J.quickValue,children:o.baseUrl}),(0,I.jsx)(`button`,{className:J.copyBtn,onClick:()=>ae(o.baseUrl,`url`),children:f===`url`?(0,I.jsx)(Kn,{size:12}):(0,I.jsx)(rr,{size:12})})]}),(0,I.jsxs)(`div`,{className:J.quickRow,children:[(0,I.jsx)(`span`,{className:J.quickLabel,children:`Model`}),(0,I.jsx)(`code`,{className:J.quickValue,children:o.model}),(0,I.jsx)(`button`,{className:J.copyBtn,onClick:()=>ae(o.model,`model`),children:f===`model`?(0,I.jsx)(Kn,{size:12}):(0,I.jsx)(rr,{size:12})})]})]})]}),De&&(0,I.jsxs)(`div`,{className:J.section,children:[(0,I.jsxs)(`h3`,{className:J.sectionTitle,children:[(0,I.jsx)(br,{size:14}),`Active Set (`,de.length,` models)`]}),(0,I.jsxs)(`div`,{className:J.setMeta,children:[(0,I.jsxs)(`div`,{className:J.setActions,children:[(0,I.jsx)(`span`,{className:J.setMetaName,children:j}),je.length>1&&(0,I.jsx)(`select`,{className:J.pickerSelect,value:j,onChange:e=>ce(e.target.value),title:`Switch the active set`,children:je.map(e=>(0,I.jsx)(`option`,{value:e,children:e},e))})]}),(0,I.jsxs)(`div`,{className:J.setActions,children:[(0,I.jsx)(Kc,{status:D}),(0,I.jsxs)(`button`,{className:J.smallBtn,onClick:M,disabled:D.kind===`saving`,title:`Probe your API keys and rebuild the set with only models that actually work`,children:[(0,I.jsx)(Wr,{size:11}),`Sync best`]}),(0,I.jsxs)(`button`,{className:J.primaryBtn,onClick:()=>S(e=>!e),disabled:D.kind===`saving`,children:[x?(0,I.jsx)(Gr,{size:11}):(0,I.jsx)(Ar,{size:11}),x?`Close`:`Add model`]})]})]}),de.length===0?(0,I.jsx)(`div`,{className:J.setEmpty,children:`The active set is empty. Add models with the button above to start routing.`}):(0,I.jsx)(`div`,{className:J.setList,onDragLeave:xe,children:de.map((e,t)=>{let n=`${e.provider}/${e.model}`,r=Oe[n]||{},i=pe===n,a=he?.key===n&&he.side===`above`,o=he?.key===n&&he.side===`below`;return(0,I.jsxs)(`div`,{className:`${J.setRow} ${i?J.setRowDragging:``} ${a?`${J.setRowDropTarget} ${J.setRowDropTargetAbove}`:``} ${o?`${J.setRowDropTarget} ${J.setRowDropTargetBelow}`:``}`,draggable:!0,onDragStart:e=>ye(e,t),onDragOver:e=>be(e,t),onDrop:e=>Se(e,t),onDragEnd:Ce,title:n,children:[(0,I.jsx)(`span`,{className:J.setDragHandle,"aria-hidden":!0,children:(0,I.jsx)(mr,{size:14})}),(0,I.jsxs)(`span`,{className:J.setPriority,children:[`#`,t+1]}),(0,I.jsx)(`span`,{className:J.setKey,children:n}),e.tier&&(0,I.jsx)(`span`,{className:J.setTier,children:e.tier}),(0,I.jsx)(Bc,{state:r.state||e.state}),(0,I.jsxs)(`div`,{className:J.setRowBtns,children:[(0,I.jsx)(`button`,{className:J.iconBtn,onClick:()=>_e(t,`up`),disabled:t===0||D.kind===`saving`,title:`Move up`,"aria-label":`Move ${n} up`,children:(0,I.jsx)(Hn,{size:12})}),(0,I.jsx)(`button`,{className:J.iconBtn,onClick:()=>_e(t,`down`),disabled:t===de.length-1||D.kind===`saving`,title:`Move down`,"aria-label":`Move ${n} down`,children:(0,I.jsx)(Bn,{size:12})}),(0,I.jsx)(`button`,{className:`${J.iconBtn} ${J.removeBtn}`,onClick:()=>ve(t),disabled:D.kind===`saving`,title:`Remove from set`,"aria-label":`Remove ${n}`,children:(0,I.jsx)(Vr,{size:12})})]})]},n)})}),x&&(0,I.jsxs)(`div`,{className:J.pickerPanel,children:[(0,I.jsxs)(`div`,{className:J.pickerHeader,children:[(0,I.jsxs)(`span`,{children:[`Add a model to `,(0,I.jsx)(`code`,{children:j})]}),(0,I.jsxs)(`span`,{style:{color:`var(--text-muted, #888)`},children:[Te.length,` of `,y.length]})]}),(0,I.jsxs)(`div`,{className:J.pickerSearch,children:[(0,I.jsx)(`input`,{className:J.pickerInput,placeholder:`Search by provider, model, or label…`,value:C,onChange:e=>w(e.target.value),autoFocus:!0}),(0,I.jsxs)(`select`,{className:J.pickerSelect,value:T,onChange:e=>E(e.target.value),children:[(0,I.jsx)(`option`,{value:``,children:`All providers`}),we.map(e=>(0,I.jsx)(`option`,{value:e,children:e},e))]})]}),(0,I.jsx)(`div`,{className:J.pickerList,children:Te.length===0?(0,I.jsx)(`div`,{className:J.pickerEmpty,children:`No models match your filter.`}):Te.map(e=>{let t=Ee(e.provider,e.model);return(0,I.jsxs)(`div`,{className:`${J.pickerItem} ${t?J.pickerItemAdded:``}`,onClick:()=>{t||N(e.provider,e.model)},title:t?`Already in set`:`Add ${e.key}`,children:[(0,I.jsx)(`span`,{className:J.pickerProvider,children:e.provider}),(0,I.jsx)(`span`,{className:J.pickerModel,children:e.label||e.model}),e.tier&&(0,I.jsx)(`span`,{className:J.setTier,children:e.tier}),e.hasKey?(0,I.jsx)(`span`,{className:`${J.pickerBadge} ${J.pickerBadgeOk}`,children:`key`}):(0,I.jsx)(`span`,{className:J.pickerBadge,children:`no key`})]},e.key)})})]})]}),De&&(0,I.jsxs)(`div`,{className:J.section,children:[(0,I.jsxs)(`h3`,{className:J.sectionTitle,children:[(0,I.jsx)(Ln,{size:14}),`Probe Mode`]}),(0,I.jsx)(`div`,{className:J.probeModes,children:[`eco`,`balanced`,`aggressive`].map(e=>(0,I.jsx)(`button`,{className:`${J.probeBtn} ${n?.probeMode===e?J.probeActive:``}`,onClick:()=>A(e),children:e},e))})]}),De&&ke.length>0&&(0,I.jsxs)(`div`,{className:J.section,children:[(0,I.jsxs)(`h3`,{className:J.sectionTitle,onClick:()=>d(!u),style:{cursor:`pointer`},children:[(0,I.jsx)(Ln,{size:14}),`Request Log (`,ke.length,`)`,u?(0,I.jsx)(Zn,{size:12}):(0,I.jsx)(Jn,{size:12})]}),u&&(0,I.jsx)(`div`,{className:J.logList,children:ke.map((e,t)=>(0,I.jsxs)(`div`,{className:J.logRow,children:[(0,I.jsx)(`span`,{className:e.error?J.logErr:J.logOk,children:e.status||`—`}),(0,I.jsx)(`span`,{className:J.logModel,children:e.model}),(0,I.jsx)(`span`,{className:J.logLatency,children:e.latency_ms==null?`—`:`${e.latency_ms}ms`}),(0,I.jsx)(`span`,{className:J.logTokens,children:e.tokens>0?Rc(e.tokens)+` tok`:``}),e.failover&&(0,I.jsx)(`span`,{className:J.logFailover,children:`failover`})]},t))})]}),(0,I.jsx)(`div`,{className:J.section,style:{marginBottom:0,marginTop:16},children:(0,I.jsx)(`span`,{className:J.saveStatus,children:i?.tokenStats?`${Rc(i.tokenStats.all_time?.total_tokens||0)} tokens routed lifetime`:``})})]})]})})}function Kc({status:e}){return!e||e.kind===`idle`?null:e.kind===`saving`?(0,I.jsx)(`span`,{className:J.saveStatus,children:`saving…`}):e.kind===`saved`?(0,I.jsx)(`span`,{className:`${J.saveStatus} ${J.saveStatusOk}`,children:`✓ saved`}):e.kind===`error`?(0,I.jsxs)(`span`,{className:`${J.saveStatus} ${J.saveStatusErr}`,title:e.message,children:[`⚠ `,e.message?.slice(0,40)||`error`]}):null}var Y={overlay:`_overlay_1bte7_7`,fadeIn:`_fadeIn_1bte7_1`,modal:`_modal_1bte7_18`,slideUp:`_slideUp_1bte7_1`,header:`_header_1bte7_41`,headerLeft:`_headerLeft_1bte7_50`,headerTitle:`_headerTitle_1bte7_57`,headerSubtitle:`_headerSubtitle_1bte7_65`,headerActions:`_headerActions_1bte7_71`,iconBtn:`_iconBtn_1bte7_77`,modelBar:`_modelBar_1bte7_95`,modelLabel:`_modelLabel_1bte7_106`,modelSelect:`_modelSelect_1bte7_111`,presetChip:`_presetChip_1bte7_129`,prePromptToggle:`_prePromptToggle_1bte7_146`,transcript:`_transcript_1bte7_159`,empty:`_empty_1bte7_169`,emptyTitle:`_emptyTitle_1bte7_181`,emptyHint:`_emptyHint_1bte7_187`,message:`_message_1bte7_193`,msgIn:`_msgIn_1bte7_1`,user:`_user_1bte7_206`,assistant:`_assistant_1bte7_210`,system:`_system_1bte7_214`,messageRole:`_messageRole_1bte7_219`,bubble:`_bubble_1bte7_228`,codeBlock:`_codeBlock_1bte7_259`,meta:`_meta_1bte7_271`,metaChip:`_metaChip_1bte7_280`,provider:`_provider_1bte7_291`,error:`_error_1bte7_296`,cursor:`_cursor_1bte7_301`,blink:`_blink_1bte7_1`,inputBar:`_inputBar_1bte7_316`,textarea:`_textarea_1bte7_326`,sendBtn:`_sendBtn_1bte7_351`,errorBar:`_errorBar_1bte7_376`,stopBar:`_stopBar_1bte7_388`,stopBtn:`_stopBtn_1bte7_400`,daemonStartPanel:`_daemonStartPanel_1bte7_417`,daemonStartTitle:`_daemonStartTitle_1bte7_429`,daemonStartHint:`_daemonStartHint_1bte7_435`,daemonStartBtn:`_daemonStartBtn_1bte7_442`,daemonStartAlt:`_daemonStartAlt_1bte7_474`,spin:`_spin_1bte7_488`,spinAnim:`_spinAnim_1bte7_1`},qc=[`Write a Python fizzbuzz with type hints`,`Explain Big O notation with three examples`,`Refactor a deeply nested for-loop into map/filter`,`Write a tiny Express endpoint that returns JSON`];function Jc(e){return!e||typeof e!=`object`?typeof e==`string`?e:null:typeof e.error==`string`?e.error:e.error&&typeof e.error==`object`&&typeof e.error.message==`string`?e.error.message:typeof e.message==`string`?e.message:null}function Yc(e){return e?e.split(/(```[\s\S]*?```)/g).map((e,t)=>{let n=e.match(/^```([a-zA-Z0-9_-]+)?\n?([\s\S]*?)```$/);return n?(0,I.jsx)(`pre`,{className:Y.codeBlock,children:(0,I.jsx)(`code`,{children:n[2].replace(/\n$/,``)})},t):(0,I.jsx)(`span`,{children:e},t)}):null}function Xc({icon:e,label:t,tone:n}){return(0,I.jsxs)(`span`,{className:`${Y.metaChip} ${n?Y[n]:``}`,children:[e,t]})}function Zc({routerStatus:e,daemonRunning:t}){return t===!0?(0,I.jsxs)(`span`,{className:Y.metaChip,children:[(0,I.jsx)(Wn,{size:11}),`Router online`]}):t===!1?(0,I.jsxs)(`span`,{className:`${Y.metaChip} ${Y.error}`,children:[(0,I.jsx)(zn,{size:11}),`Router offline`]}):(0,I.jsxs)(`span`,{className:Y.metaChip,children:[(0,I.jsx)(xr,{size:11,className:Y.spin}),`Checking router…`]})}function Qc({onClose:e,onToast:t,models:n,routerStatus:r}){let[i,a]=(0,v.useState)([]),[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(null),[u,d]=(0,v.useState)(!0),[f,p]=(0,v.useState)(!0),[m,h]=(0,v.useState)(``),[g,_]=(0,v.useState)(!1),[y,b]=(0,v.useState)(null),[x,S]=(0,v.useState)(null),C=(0,v.useRef)(null),w=(0,v.useRef)(null),[T,E]=(0,v.useState)(r?.running===!0?!0:null),[D,O]=(0,v.useState)(!1),[ee,te]=(0,v.useState)(5),k=(0,v.useRef)(null),ne=(0,v.useRef)(null),re=(0,v.useRef)(!1);(0,v.useEffect)(()=>{fetch(`/api/router/preprompt`).then(e=>e.json()).then(e=>{e&&typeof e==`object`&&(p(e.enabled===!0),typeof e.text==`string`&&h(e.text))}).catch(()=>{})},[]),(0,v.useEffect)(()=>{if(c!==null)return;let e=(Array.isArray(n)?n:[]).filter(e=>e.status===`up`&&e.hasApiKey&&!e.isPinging);if(e.length>0){let t={"S+":0,S:1,"A+":2,A:3,"A-":4,"B+":5,B:6,C:7};e.sort((e,n)=>{let r=t[e.tier]??99,i=t[n.tier]??99;return r===i?(typeof e.avg==`number`?e.avg:99999)-(typeof n.avg==`number`?n.avg:99999):r-i});let n=e[0];l(`${n.providerKey}/${n.modelId}`);return}if(r?.running||T===!0){l(`fcm`);return}l(`fcm`)},[n,c,r,T]),(0,v.useEffect)(()=>{let e=!0;async function t(){try{let t=await(await fetch(`/api/router/status`)).json();if(!e)return;if(t?.running){E(!0);return}E(!1)}catch{e&&E(!1)}}return t(),()=>{e=!1,k.current&&clearInterval(k.current),ne.current&&clearInterval(ne.current)}},[]),(0,v.useEffect)(()=>{if(T!==!1||c!==`fcm`||re.current)return;let e=5;return te(5),k.current=setInterval(()=>{--e,te(e),e<=0&&(clearInterval(k.current),re.current=!0,ie())},1e3),()=>{k.current&&clearInterval(k.current)}},[T,c]);let ie=(0,v.useCallback)(async()=>{if(!D){k.current&&=(clearInterval(k.current),null),re.current=!0,O(!0);try{await fetch(`/api/router/start`,{method:`POST`});let e=0;await new Promise(t=>{ne.current=setInterval(async()=>{e+=1;try{(await(await fetch(`/api/router/status`)).json())?.running&&(clearInterval(ne.current),E(!0),O(!1),t())}catch{}e>=30&&(clearInterval(ne.current),O(!1),t())},1e3)})}catch{O(!1)}}},[D]);(0,v.useEffect)(()=>{let e=w.current;e&&(e.scrollTop=e.scrollHeight)},[i,g]);let ae=(0,v.useMemo)(()=>{let e=[{value:`fcm`,label:`fcm — auto router (recommended)`}];if(Array.isArray(n))for(let t of n.slice(0,200)){let n=t.modelId||t.id;if(!n)continue;let r=t.label||n;e.push({value:`${t.providerKey}/${n}`,label:`${t.providerKey}/${n} (${r})`})}return e},[n]),A=(0,v.useCallback)(()=>{C.current&&=(C.current.abort(),null),_(!1)},[]),j=(0,v.useCallback)(async()=>{let e=o.trim();if(!e||g)return;if(c===`fcm`&&T!==!0){b("Router daemon is not running. Start it first using the button above or run `free-coding-models --daemon-bg`.");return}b(null),s(``);let t={role:`user`,content:e,ts:Date.now()},n=[...i,t];a(n),_(!0);let r=`assistant-${Date.now()}`;a(e=>[...e,{id:r,role:`assistant`,content:``,ts:Date.now()}]);let l=new AbortController;C.current=l;let d={model:c||`fcm`,messages:n.map(({role:e,content:t})=>({role:e,content:t})),stream:u,temperature:.7};try{let e=await fetch(`/api/playground/chat`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(d),signal:l.signal});if(!e.ok){let t=Jc(await e.json().catch(()=>null))||`Request failed with status ${e.status}`;b(t),a(e=>e.map(e=>e.id===r?{...e,content:e.content,error:t,aborted:!0}:e)),_(!1);return}if(u){let t=e.body?.getReader();if(!t)throw Error(`No stream reader available`);let n=new TextDecoder,i=``,o={provider:null,model:null,latencyMs:null,tokens:0,fallbackAttempts:0};for(;;){let{value:e,done:s}=await t.read();if(s)break;i+=n.decode(e,{stream:!0});let c=i.split(/\n\n/);i=c.pop()||``;for(let e of c){let t=e.split(/\n/);for(let e of t){if(!e.startsWith(`data:`))continue;let t=e.slice(5).trim();if(t!==`[DONE]`)try{let e=JSON.parse(t),n=e?.choices?.[0]?.delta?.content;n&&a(e=>e.map(e=>e.id===r?{...e,content:(e.content||``)+n}:e)),e?.x_routed_via&&(o.provider=e.x_routed_via),e?.x_routed_model&&(o.model=e.x_routed_model),e?.x_latency_ms&&(o.latencyMs=e.x_latency_ms),e?.x_fallback_attempts&&(o.fallbackAttempts=e.x_fallback_attempts),e?.usage?.total_tokens&&(o.tokens=e.usage.total_tokens)}catch{}}}}a(e=>e.map(e=>e.id===r?{...e,meta:o}:e))}else{let t=await e.json(),n=t?.choices?.[0]?.message?.content||``,i=t?.usage||{},o={provider:t?.x_routed_via||null,model:t?.x_routed_model||null,latencyMs:t?.x_latency_ms||null,tokens:i?.total_tokens||0,fallbackAttempts:t?.x_fallback_attempts||0};a(e=>e.map(e=>e.id===r?{...e,content:n,meta:o}:e))}}catch(e){e.name===`AbortError`?a(e=>e.map(e=>e.id===r?{...e,aborted:!0}:e)):(b(e.message||String(e)),a(t=>t.map(t=>t.id===r?{...t,error:e.message||String(e),aborted:!0}:t)))}finally{_(!1),C.current=null}},[o,g,i,c,u,T]),oe=(0,v.useCallback)(e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),j())},[j]),se=(0,v.useCallback)(()=>{g&&A(),a([]),b(null)},[g,A]),ce=(0,v.useCallback)(async(e,n)=>{try{await navigator.clipboard.writeText(n||``),S(e),setTimeout(()=>S(null),1500)}catch{t?.(`Copy failed`,`error`)}},[t]),M=(0,v.useMemo)(()=>i.reduce((e,t)=>e+(t.meta?.tokens||0),0),[i]);return(0,I.jsx)(`div`,{className:Y.overlay,onClick:t=>{t.target===t.currentTarget&&e()},children:(0,I.jsxs)(`div`,{className:Y.modal,role:`dialog`,"aria-label":`Free Coding Models Playground`,children:[(0,I.jsxs)(`div`,{className:Y.header,children:[(0,I.jsxs)(`div`,{className:Y.headerLeft,children:[(0,I.jsxs)(`div`,{className:Y.headerTitle,children:[(0,I.jsx)(wr,{size:18}),`Playground`]}),(0,I.jsxs)(`div`,{className:Y.headerSubtitle,children:[`Chat with the FCM router · `,i.length,` message`,i.length===1?``:`s`,` · `,M,` tokens`]})]}),(0,I.jsxs)(`div`,{className:Y.headerActions,children:[(0,I.jsx)(`button`,{className:Y.iconBtn,onClick:se,title:`Clear conversation`,disabled:i.length===0&&!g,children:(0,I.jsx)(Vr,{size:16})}),(0,I.jsx)(`button`,{className:Y.iconBtn,onClick:e,title:`Close (Esc)`,children:(0,I.jsx)(Gr,{size:16})})]})]}),(0,I.jsxs)(`div`,{className:Y.modelBar,children:[(0,I.jsx)(`span`,{className:Y.modelLabel,children:`Model:`}),(0,I.jsx)(`select`,{className:Y.modelSelect,value:c,onChange:e=>l(e.target.value),disabled:g,children:ae.map(e=>(0,I.jsx)(`option`,{value:e.value,children:e.label},e.value))}),(0,I.jsx)(`button`,{className:Y.presetChip,onClick:()=>d(e=>!e),title:`Toggle streaming`,children:u?`⚡ Streaming`:`🐢 One-shot`}),(0,I.jsxs)(`label`,{className:Y.prePromptToggle,title:`Router persona injected as the first system message`,children:[(0,I.jsx)(`input`,{type:`checkbox`,checked:f,onChange:e=>p(e.target.checked)}),`Pre-prompt`]}),(0,I.jsx)(Zc,{routerStatus:r,daemonRunning:T})]}),f&&m&&(0,I.jsxs)(`div`,{className:Y.modelBar,style:{borderTop:`none`,background:`transparent`,paddingTop:4,paddingBottom:8,fontSize:11},children:[(0,I.jsx)(`span`,{className:Y.modelLabel,style:{flexShrink:0},children:`Persona:`}),(0,I.jsx)(`span`,{style:{opacity:.7,fontStyle:`italic`},children:m.length>160?`${m.slice(0,160)}…`:m})]}),(0,I.jsx)(`div`,{className:Y.transcript,ref:w,children:T===!1&&!D&&i.length===0&&c===`fcm`?(0,I.jsxs)(`div`,{className:Y.daemonStartPanel,children:[(0,I.jsx)(zn,{size:32,style:{color:`#fbbf24`,opacity:.8}}),(0,I.jsx)(`div`,{className:Y.daemonStartTitle,children:`Router daemon is not running`}),(0,I.jsx)(`div`,{className:Y.daemonStartHint,children:`The playground routes your chats through the FCM router daemon. Start it to begin chatting with free coding models, or pick a specific model above.`}),(0,I.jsx)(`button`,{className:Y.daemonStartBtn,onClick:ie,title:`Start the router daemon`,children:D?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(xr,{size:14,className:Y.spin}),` Starting…`]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Er,{size:14}),` Start Router`,ee>0&&!re.current?` (auto in ${ee}s)`:``]})}),(0,I.jsxs)(`div`,{className:Y.daemonStartAlt,children:[`Or run `,(0,I.jsx)(`code`,{children:`free-coding-models --daemon-bg`}),` in your terminal`]})]}):D&&i.length===0&&c===`fcm`?(0,I.jsxs)(`div`,{className:Y.daemonStartPanel,children:[(0,I.jsx)(xr,{size:32,className:Y.spin,style:{color:`var(--accent, #22c55e)`}}),(0,I.jsx)(`div`,{className:Y.daemonStartTitle,children:`Starting router daemon…`}),(0,I.jsx)(`div`,{className:Y.daemonStartHint,children:`The daemon is being launched. This usually takes a few seconds. You'll be able to chat as soon as it's ready.`})]}):i.length===0?(0,I.jsxs)(`div`,{className:Y.empty,children:[(0,I.jsx)(wr,{size:42,style:{opacity:.5}}),(0,I.jsx)(`div`,{className:Y.emptyTitle,children:`Try the FCM router in 10 seconds`}),(0,I.jsxs)(`div`,{className:Y.emptyHint,children:[`Each request is auto-routed to the healthiest free coding model in your active set. The pre-prompt is injected server-side, so even plain `,(0,I.jsx)(`code`,{children:`curl`}),` callers get the same persona.`]}),(0,I.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:6,justifyContent:`center`,marginTop:8},children:qc.map(e=>(0,I.jsx)(`button`,{className:Y.presetChip,onClick:()=>s(e),children:e},e))})]}):i.map((e,t)=>(0,I.jsxs)(`div`,{className:`${Y.message} ${Y[e.role]||``}`,children:[(0,I.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,justifyContent:e.role===`user`?`flex-end`:`flex-start`},children:[(0,I.jsx)(`div`,{className:Y.messageRole,children:e.role}),e.role===`assistant`&&e.content&&(0,I.jsx)(`button`,{className:Y.iconBtn,style:{padding:2,border:`none`},onClick:()=>ce(t,e.content),title:`Copy reply`,children:x===t?(0,I.jsx)(Kn,{size:11}):(0,I.jsx)(rr,{size:11})})]}),(0,I.jsx)(`div`,{className:Y.bubble,children:e.role===`assistant`?(0,I.jsxs)(I.Fragment,{children:[Yc(e.content),g&&t===i.length-1&&!e.aborted&&(0,I.jsx)(`span`,{className:Y.cursor})]}):e.content}),e.role===`assistant`&&e.meta&&(e.meta.provider||e.meta.model)&&(0,I.jsxs)(`div`,{className:Y.meta,children:[e.meta.provider&&(0,I.jsx)(Xc,{icon:(0,I.jsx)(Wn,{size:11}),label:`routed via ${e.meta.provider}/${e.meta.model||`?`}`,tone:`provider`}),e.meta.latencyMs!=null&&(0,I.jsx)(Xc,{label:`${e.meta.latencyMs} ms`}),e.meta.tokens>0&&(0,I.jsx)(Xc,{label:`${e.meta.tokens} tok`}),e.meta.fallbackAttempts>0&&(0,I.jsx)(Xc,{icon:(0,I.jsx)(Mr,{size:11}),label:`${e.meta.fallbackAttempts} fallback${e.meta.fallbackAttempts>1?`s`:``}`})]}),e.role===`assistant`&&e.error&&(0,I.jsx)(`div`,{className:Y.meta,children:(0,I.jsx)(Xc,{icon:(0,I.jsx)(zn,{size:11}),label:e.error,tone:`error`})}),e.role===`assistant`&&e.aborted&&!e.error&&(0,I.jsx)(`div`,{className:Y.meta,children:(0,I.jsx)(Xc,{label:`stopped`})})]},e.id||t))}),y&&(0,I.jsxs)(`div`,{className:Y.errorBar,children:[(0,I.jsx)(zn,{size:14}),y]}),g&&(0,I.jsxs)(`div`,{className:Y.stopBar,children:[(0,I.jsx)(`span`,{children:`Streaming response…`}),(0,I.jsx)(`button`,{className:Y.stopBtn,onClick:A,children:`Stop`})]}),(0,I.jsxs)(`div`,{className:Y.inputBar,children:[(0,I.jsx)(`textarea`,{className:Y.textarea,placeholder:`Ask the FCM router anything. Enter to send, Shift+Enter for newline.`,value:o,onChange:e=>s(e.target.value),onKeyDown:oe,disabled:g||c===`fcm`&&T!==!0,rows:1,"data-testid":`playground-input`}),(0,I.jsxs)(`button`,{className:Y.sendBtn,onClick:j,disabled:g||!o.trim()||c===`fcm`&&T!==!0,"data-testid":`playground-send`,children:[(0,I.jsx)(Fr,{size:14}),`Send`]})]})]})})}function $c(){let[e,t]=(0,v.useState)([]),[n,r]=(0,v.useState)(!0),i=(0,v.useCallback)(async()=>{r(!0);try{t((await(await fetch(`/api/installed-models`)).json()).results||[])}catch{t([])}finally{r(!1)}},[]);return(0,v.useEffect)(()=>{i()},[i]),{results:e,loading:n,refresh:i,disableModel:(0,v.useCallback)(async(e,t)=>{let n=await(await fetch(`/api/installed-models/${encodeURIComponent(e)}/${encodeURIComponent(t)}/disable`,{method:`POST`})).json();return n.success&&await i(),n},[i])}}var el={overlay:`_overlay_1ocey_1`,fadeIn:`_fadeIn_1ocey_1`,modal:`_modal_1ocey_12`,header:`_header_1ocey_24`,title:`_title_1ocey_32`,count:`_count_1ocey_42`,headerActions:`_headerActions_1ocey_51`,refreshBtn:`_refreshBtn_1ocey_57`,closeBtn:`_closeBtn_1ocey_71`,body:`_body_1ocey_82`,empty:`_empty_1ocey_88`,hint:`_hint_1ocey_96`,toolGroup:`_toolGroup_1ocey_102`,toolHeader:`_toolHeader_1ocey_106`,toolEmoji:`_toolEmoji_1ocey_113`,toolLabel:`_toolLabel_1ocey_117`,toolCount:`_toolCount_1ocey_123`,toolMissing:`_toolMissing_1ocey_128`,modelList:`_modelList_1ocey_139`,modelRow:`_modelRow_1ocey_146`,modelIcon:`_modelIcon_1ocey_157`,modelName:`_modelName_1ocey_161`,modelTier:`_modelTier_1ocey_166`,modelId:`_modelId_1ocey_175`,disableBtn:`_disableBtn_1ocey_185`};function tl({onClose:e,onToast:t}){let{results:n,loading:r,refresh:i,disableModel:a}=$c(),o=async(e,n)=>{try{let r=await a(e,n);r.success?t?.(`Disabled ${n} in ${e}.`,`success`):t?.(`Failed: ${r.error||`unknown error`}`,`error`)}catch(e){t?.(`Error: ${e.message}`,`error`)}},s=n.reduce((e,t)=>e+t.models.length,0);return(0,I.jsx)(`div`,{className:el.overlay,onClick:t=>t.target===t.currentTarget&&e(),children:(0,I.jsxs)(`div`,{className:el.modal,children:[(0,I.jsxs)(`div`,{className:el.header,children:[(0,I.jsxs)(`h2`,{className:el.title,children:[(0,I.jsx)(pr,{size:20,stroke:1.5}),`Installed Models`,!r&&(0,I.jsx)(`span`,{className:el.count,children:s})]}),(0,I.jsxs)(`div`,{className:el.headerActions,children:[(0,I.jsx)(`button`,{className:el.refreshBtn,onClick:i,title:`Refresh`,children:(0,I.jsx)(Mr,{size:14})}),(0,I.jsx)(`button`,{className:el.closeBtn,onClick:e,"aria-label":`Close`,children:`✕`})]})]}),(0,I.jsxs)(`div`,{className:el.body,children:[r&&(0,I.jsx)(`div`,{className:el.empty,children:`Scanning tool configs…`}),!r&&s===0&&(0,I.jsxs)(`div`,{className:el.empty,children:[`No models found in tool configs.`,(0,I.jsx)(`br`,{}),(0,I.jsx)(`span`,{className:el.hint,children:`Use "Install Endpoints" to configure models for your tools.`})]}),!r&&n.map(e=>(0,I.jsxs)(`div`,{className:el.toolGroup,children:[(0,I.jsxs)(`div`,{className:el.toolHeader,children:[(0,I.jsx)(`span`,{className:el.toolEmoji,children:e.toolEmoji}),(0,I.jsx)(`span`,{className:el.toolLabel,children:e.toolLabel}),(0,I.jsxs)(`span`,{className:el.toolCount,children:[e.models.length,` model`,e.models.length===1?``:`s`]}),!e.isValid&&(0,I.jsx)(`span`,{className:el.toolMissing,children:`Not installed`})]}),e.models.length>0&&(0,I.jsx)(`div`,{className:el.modelList,children:e.models.map(t=>(0,I.jsxs)(`div`,{className:el.modelRow,children:[(0,I.jsx)(`span`,{className:el.modelIcon,children:t.isExternal?`🔗`:`✅`}),(0,I.jsx)(`span`,{className:el.modelName,children:t.label}),t.tier&&t.tier!==`-`&&(0,I.jsx)(`span`,{className:el.modelTier,children:t.tier}),(0,I.jsx)(`span`,{className:el.modelId,title:t.modelId,children:t.modelId}),(0,I.jsx)(`button`,{className:el.disableBtn,onClick:()=>o(e.toolMode,t.modelId),title:`Remove model from config (backup saved)`,children:(0,I.jsx)(Vr,{size:12})})]},`${e.toolMode}-${t.modelId}`))})]},e.toolMode))]})]})})}var X={overlay:`_overlay_bbtxk_1`,fadeIn:`_fadeIn_bbtxk_1`,modal:`_modal_bbtxk_12`,header:`_header_bbtxk_24`,title:`_title_bbtxk_32`,closeBtn:`_closeBtn_bbtxk_42`,steps:`_steps_bbtxk_54`,step:`_step_bbtxk_54`,stepActive:`_stepActive_bbtxk_71`,stepDone:`_stepDone_bbtxk_76`,stepNum:`_stepNum_bbtxk_80`,stepLabel:`_stepLabel_bbtxk_105`,body:`_body_bbtxk_111`,stepContent:`_stepContent_bbtxk_118`,stepDesc:`_stepDesc_bbtxk_120`,loading:`_loading_bbtxk_126`,empty:`_empty_bbtxk_126`,grid:`_grid_bbtxk_134`,pickCard:`_pickCard_bbtxk_140`,pickActive:`_pickActive_bbtxk_156`,pickEmoji:`_pickEmoji_bbtxk_162`,pickLabel:`_pickLabel_bbtxk_166`,pickMeta:`_pickMeta_bbtxk_171`,scopeToggle:`_scopeToggle_bbtxk_177`,scopeBtn:`_scopeBtn_bbtxk_183`,scopeActive:`_scopeActive_bbtxk_194`,modelGrid:`_modelGrid_bbtxk_202`,modelCard:`_modelCard_bbtxk_210`,modelSelected:`_modelSelected_bbtxk_224`,modelName:`_modelName_bbtxk_230`,modelTier:`_modelTier_bbtxk_236`,allNotice:`_allNotice_bbtxk_247`,installingState:`_installingState_bbtxk_255`,installingLabel:`_installingLabel_bbtxk_265`,installingSub:`_installingSub_bbtxk_271`,spinner:`_spinner_bbtxk_276`,spin:`_spin_bbtxk_276`,doneState:`_doneState_bbtxk_280`,doneFadeIn:`_doneFadeIn_bbtxk_1`,doneTitle:`_doneTitle_bbtxk_290`,doneSub:`_doneSub_bbtxk_296`,checkCircle:`_checkCircle_bbtxk_308`,checkPop:`_checkPop_bbtxk_1`,errorDot:`_errorDot_bbtxk_320`,installPath:`_installPath_bbtxk_334`,footer:`_footer_bbtxk_363`,backBtn:`_backBtn_bbtxk_370`,nextBtn:`_nextBtn_bbtxk_384`,doneBtn:`_doneBtn_bbtxk_401`,donePop:`_donePop_bbtxk_1`},nl=[`Provider`,`Tool`,`Models`,`Install`];function rl({onClose:e,onToast:t}){let[n,r]=(0,v.useState)(0),[i,a]=(0,v.useState)([]),[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)([]),[u,d]=(0,v.useState)(null),[f,p]=(0,v.useState)([]),[m,h]=(0,v.useState)(`all`),[g,_]=(0,v.useState)(!1),[y,b]=(0,v.useState)(null),[x,S]=(0,v.useState)(!0),C=[{id:`opencode`,label:`OpenCode CLI`,emoji:`💻`},{id:`opencode-desktop`,label:`OpenCode Desktop`,emoji:`🖥️`},{id:`openclaw`,label:`OpenClaw`,emoji:`🦞`},{id:`crush`,label:`Crush`,emoji:`💘`},{id:`goose`,label:`Goose`,emoji:`🪿`},{id:`pi`,label:`Pi`,emoji:`π`},{id:`aider`,label:`Aider`,emoji:`🛠`},{id:`qwen`,label:`Qwen`,emoji:`🐉`},{id:`openhands`,label:`OpenHands`,emoji:`🤲`},{id:`amp`,label:`Amp`,emoji:`⚡`},{id:`forgecode`,label:`ForgeCode`,emoji:`🔥`},{id:`fcm_router`,label:`FCM Router`,emoji:`🔄`}];(0,v.useEffect)(()=>{fetch(`/api/install-endpoints/providers`).then(e=>e.json()).then(e=>{a(e.providers||[]),S(!1)}).catch(()=>S(!1))},[]),(0,v.useEffect)(()=>{o&&fetch(`/api/install-endpoints/catalog?provider=${o.providerKey}`).then(e=>e.json()).then(e=>l(e.models||[])).catch(()=>l([]))},[o]);let w=(0,v.useCallback)(e=>{p(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[]),T=(0,v.useCallback)(()=>{p(c.map(e=>e.modelId)),h(`all`)},[c]);(0,v.useCallback)(()=>{p([]),h(`selected`)},[]);let E=()=>n===0?!!o:n===1?!!u:n===2?m===`all`||f.length>0:!0,D=async()=>{r(3),_(!0),b(null);try{let e=await(await fetch(`/api/install-endpoints/wizard`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({providerKey:o.providerKey,toolMode:u,scope:m,modelIds:m===`selected`?f:[]})})).json();e.success?(b(e),t?.(`Installed ${e.modelCount} models for ${o.label} into ${C.find(e=>e.id===u)?.label||u}.`,`success`)):(b(null),t?.(`Install failed: ${e.error||`unknown`}`,`error`),r(2))}catch(e){b(null),t?.(`Install error: ${e.message}`,`error`),r(2)}finally{_(!1)}};return(0,I.jsx)(`div`,{className:X.overlay,onClick:t=>t.target===t.currentTarget&&e(),children:(0,I.jsxs)(`div`,{className:X.modal,children:[(0,I.jsxs)(`div`,{className:X.header,children:[(0,I.jsxs)(`h2`,{className:X.title,children:[(0,I.jsx)(kr,{size:20,stroke:1.5}),`Install Endpoints`]}),(0,I.jsx)(`button`,{className:X.closeBtn,onClick:e,"aria-label":`Close`,children:`✕`})]}),(0,I.jsx)(`div`,{className:X.steps,children:nl.map((e,t)=>(0,I.jsxs)(`div`,{className:`${X.step} ${t===n?X.stepActive:t<n?X.stepDone:``}`,children:[(0,I.jsx)(`span`,{className:X.stepNum,children:t<n?(0,I.jsx)(Kn,{size:12}):t+1}),(0,I.jsx)(`span`,{className:X.stepLabel,children:e})]},t))}),(0,I.jsxs)(`div`,{className:X.body,children:[n===0&&(0,I.jsxs)(`div`,{className:X.stepContent,children:[(0,I.jsx)(`p`,{className:X.stepDesc,children:`Choose a provider with a configured API key.`}),x&&(0,I.jsx)(`div`,{className:X.loading,children:`Loading providers…`}),!x&&i.length===0&&(0,I.jsx)(`div`,{className:X.empty,children:`No configured providers found. Add API keys in Settings first.`}),(0,I.jsx)(`div`,{className:X.grid,children:i.map(e=>(0,I.jsxs)(`button`,{className:`${X.pickCard} ${o?.providerKey===e.providerKey?X.pickActive:``}`,onClick:()=>{s(e),r(1)},children:[(0,I.jsx)(`span`,{className:X.pickLabel,children:e.label}),(0,I.jsxs)(`span`,{className:X.pickMeta,children:[e.modelCount,` models`]})]},e.providerKey))})]}),n===1&&(0,I.jsxs)(`div`,{className:X.stepContent,children:[(0,I.jsxs)(`p`,{className:X.stepDesc,children:[`Install `,(0,I.jsx)(`strong`,{children:o?.label}),` models into which tool?`]}),(0,I.jsx)(`div`,{className:X.grid,children:C.map(e=>(0,I.jsxs)(`button`,{className:`${X.pickCard} ${u===e.id?X.pickActive:``}`,onClick:()=>{d(e.id),r(2)},children:[(0,I.jsx)(`span`,{className:X.pickEmoji,children:e.emoji}),(0,I.jsx)(`span`,{className:X.pickLabel,children:e.label})]},e.id))})]}),n===2&&(0,I.jsxs)(`div`,{className:X.stepContent,children:[(0,I.jsxs)(`p`,{className:X.stepDesc,children:[`Choose models to install from `,(0,I.jsx)(`strong`,{children:o?.label}),` into `,(0,I.jsx)(`strong`,{children:C.find(e=>e.id===u)?.label}),`.`]}),(0,I.jsxs)(`div`,{className:X.scopeToggle,children:[(0,I.jsx)(`button`,{className:`${X.scopeBtn} ${m===`all`?X.scopeActive:``}`,onClick:()=>{h(`all`),T()},children:`All Models`}),(0,I.jsx)(`button`,{className:`${X.scopeBtn} ${m===`selected`?X.scopeActive:``}`,onClick:()=>h(`selected`),children:`Select Models`})]}),m===`selected`&&(0,I.jsx)(`div`,{className:X.modelGrid,children:c.map(e=>(0,I.jsxs)(`button`,{className:`${X.modelCard} ${f.includes(e.modelId)?X.modelSelected:``}`,onClick:()=>w(e.modelId),children:[(0,I.jsx)(`span`,{className:X.modelName,children:e.label}),(0,I.jsx)(`span`,{className:X.modelTier,children:e.tier})]},e.modelId))}),m===`all`&&(0,I.jsxs)(`div`,{className:X.allNotice,children:[`All `,c.length,` models from `,o?.label,` will be installed.`]})]}),n===3&&(0,I.jsxs)(`div`,{className:X.stepContent,children:[g&&(0,I.jsxs)(`div`,{className:X.installingState,children:[(0,I.jsx)(xr,{size:32,className:X.spinner}),(0,I.jsxs)(`span`,{className:X.installingLabel,children:[`Installing `,m===`all`?`all`:f.length,` model`,m===`all`&&c.length!==1?`s`:f.length===1?``:`s`,`…`]}),(0,I.jsxs)(`span`,{className:X.installingSub,children:[`Writing config for `,C.find(e=>e.id===u)?.label]})]}),!g&&y&&(0,I.jsxs)(`div`,{className:X.doneState,children:[(0,I.jsx)(`div`,{className:X.checkCircle,children:(0,I.jsx)(Kn,{size:36})}),(0,I.jsx)(`h3`,{className:X.doneTitle,children:`Installed!`}),(0,I.jsxs)(`p`,{className:X.doneSub,children:[y.modelCount,` model`,y.modelCount===1?``:`s`,` from `,(0,I.jsx)(`strong`,{children:o?.label}),` → `,(0,I.jsx)(`strong`,{children:y.toolLabel})]}),(0,I.jsx)(`code`,{className:X.installPath,children:y.path})]}),!g&&!y&&(0,I.jsxs)(`div`,{className:X.doneState,children:[(0,I.jsx)(`span`,{className:X.errorDot,children:`✕`}),(0,I.jsx)(`h3`,{className:X.doneTitle,children:`Install failed`}),(0,I.jsx)(`p`,{className:X.doneSub,children:`Check the toast for details. You can go back and retry.`})]})]})]}),(0,I.jsxs)(`div`,{className:X.footer,children:[n>0&&n<3&&(0,I.jsxs)(`button`,{className:X.backBtn,onClick:()=>{r(e=>Math.max(e-1,0))},children:[(0,I.jsx)(Yn,{size:14}),`Back`]}),n===3&&!g&&!y&&(0,I.jsxs)(`button`,{className:X.backBtn,onClick:()=>r(2),children:[(0,I.jsx)(Yn,{size:14}),`Back`]}),n<3&&(0,I.jsx)(`button`,{className:X.nextBtn,onClick:()=>{if(n===2){D();return}r(e=>Math.min(e+1,3))},disabled:!E(),children:n===2?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(kr,{size:14}),`Install`]}):(0,I.jsxs)(I.Fragment,{children:[`Next`,(0,I.jsx)(Xn,{size:14})]})}),n===3&&!g&&y&&(0,I.jsxs)(`button`,{className:X.doneBtn,onClick:e,children:[(0,I.jsx)(Kn,{size:14}),`Done`]})]})]})})}var il={container:`_container_18l8h_1`},al={toast:`_toast_73ezc_1`,slideIn:`_slideIn_73ezc_1`,success:`_success_73ezc_17`,error:`_error_73ezc_18`,warning:`_warning_73ezc_19`,info:`_info_73ezc_20`,icon:`_icon_73ezc_27`,message:`_message_73ezc_28`,close:`_close_73ezc_29`,exiting:`_exiting_73ezc_38`,slideOut:`_slideOut_73ezc_1`},ol={success:`✅`,error:`❌`,warning:`⚠️`,info:`ℹ️`};function sl({message:e,type:t=`info`,duration:n=3500,onDismiss:r}){let i=(0,v.useRef)(null);return(0,v.useEffect)(()=>(i.current=setTimeout(r,n),()=>clearTimeout(i.current)),[n,r]),(0,I.jsxs)(`div`,{className:`${al.toast} ${al[t]}`,children:[(0,I.jsx)(`span`,{className:al.icon,children:ol[t]||`📌`}),(0,I.jsx)(`span`,{className:al.message,children:e}),(0,I.jsx)(`button`,{className:al.close,onClick:r,children:`×`})]})}function cl({toasts:e,dismissToast:t}){return(0,I.jsx)(`div`,{className:il.container,children:e.map(e=>(0,I.jsx)(sl,{message:e.message,type:e.type,onDismiss:()=>t(e.id)},e.id))})}var ll=0,ul={dashboard:`dashboard`,settings:`settings`,analytics:`analytics`,recommend:`recommend`,router:`router`};function dl(){let{models:e,connected:t,nextPingAt:n,isPinging:r,pingMode:i,globalBenchmarkRunning:a,globalBenchmarkTotal:o,globalBenchmarkCompleted:s}=Pt(),{theme:c,cycle:l}=ln(),[u,d]=(0,v.useState)(`dashboard`),[f,p]=(0,v.useState)(null),[m,h]=(0,v.useState)(!1),[g,_]=(0,v.useState)(!1),[y,b]=(0,v.useState)(!1),[x,S]=(0,v.useState)(!1),[C,w]=(0,v.useState)(null),[T,E]=(0,v.useState)(!1),[D,O]=(0,v.useState)(!1),[ee,te]=(0,v.useState)(!1),[k,ne]=(0,v.useState)(!1),[re,ie]=(0,v.useState)(!1),[ae,A]=(0,v.useState)(null),[j,oe]=(0,v.useState)([]),se=(0,v.useRef)(Date.now());(0,v.useEffect)(()=>{try{typeof window<`u`&&window.posthog?.capture&&window.posthog.capture(`app_web_start`,{version:`0.5.22`,timestamp:new Date().toISOString()})}catch{}},[]);let ce=(0,v.useCallback)(()=>{O(!0);try{typeof window<`u`&&window.posthog?.capture&&window.posthog.capture(`app_router_start`,{version:`0.5.22`,timestamp:new Date().toISOString()})}catch{}},[]),M=(0,v.useCallback)((e,t=`info`)=>{let n=++ll;oe(r=>[...r,{id:n,message:e,type:t}]),setTimeout(()=>{oe(e=>e.filter(e=>e.id!==n))},4e3)},[]),le=(0,v.useCallback)(e=>{oe(t=>t.filter(t=>t.id!==e))},[]),{filtered:N,filterTier:ue,setFilterTier:de,filterStatus:fe,setFilterStatus:pe,filterProvider:me,setFilterProvider:he,filterVerdict:ge,setFilterVerdict:_e,filterHealth:ve,setFilterHealth:ye,visibilityMode:be,setVisibilityMode:xe,searchQuery:Se,setSearchQuery:Ce,customTextFilter:we,setCustomTextFilter:Te,sortColumn:Ee,sortDirection:De,setSortColumn:Oe,setSortDirection:ke,toggleSort:Ae,resetView:je}=an(e),{toolMode:Me,setToolMode:Ne,cycleToolMode:Pe}=hn({onToast:M});Mn({currentView:u,setCurrentView:d,filterState:{filterTier:ue,setFilterTier:de,filterStatus:fe,setFilterStatus:pe,filterProvider:me,setFilterProvider:he,filterVerdict:ge,setFilterVerdict:_e,filterHealth:ve,setFilterHealth:ye,sortColumn:Ee,sortDirection:De,setSortColumn:Oe,setSortDirection:ke,toggleSort:Ae,setSearchQuery:Ce,filterState:null,searchQuery:Se},paletteOpen:g,setPaletteOpen:_,toolMode:Me,setToolMode:Ne});let Fe=dn({models:e}),Ie=(0,v.useCallback)(async(e,t=null)=>{let n=t||Me||`opencode`;if(e){if(!xn(e.providerKey,n)){A({model:e,toolMode:n});return}try{let t=await fetch(`/api/install-endpoint`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({providerKey:e.providerKey,modelId:e.modelId,toolMode:n})}),r=await t.json().catch(()=>({}));if(t.status===422&&r.code===`incompatible_model`){A({model:e,toolMode:n});return}if(!t.ok)throw Error(r.error||`HTTP ${t.status}`);M(`Endpoint installed for ${e.label} in ${n}. Start the tool yourself.`,`success`)}catch(e){M(`Endpoint install failed: ${e.message}`,`error`)}}},[M,Me]),Le=(0,v.useCallback)(async(e,t)=>{await Ne(e),A(null),await Ie(t,e)},[Ie,Ne]),Re=(0,v.useCallback)(async e=>{Fe.isFavorite(e)||await Fe.toggle(e),await Ie(e)},[Fe,Ie]),{localVersion:ze,latestVersion:Be,updateAvailable:Ve,runUpdate:He,checkNow:Ue,error:We}=Fn({onToast:M}),Ge=(0,v.useMemo)(()=>{let t={};return e.forEach(e=>{t[e.providerKey]||(t[e.providerKey]={key:e.providerKey,name:e.origin,count:0,hasKey:!1,anyUp:!1}),t[e.providerKey].count++,e.hasApiKey&&(t[e.providerKey].hasKey=!0),e.status===`up`&&(t[e.providerKey].anyUp=!0)}),Object.values(t).sort((e,t)=>e.name.localeCompare(t.name))},[e]),Ke=(0,v.useCallback)(async()=>{if(!a)try{await fetch(`/api/global-benchmark`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({models:N.map(e=>({providerKey:e.providerKey,modelId:e.modelId}))})})}catch(e){console.error(`[Benchmark] Failed to start global benchmark:`,e.message)}},[N,a]),qe=(0,v.useCallback)(async e=>{try{let t=await fetch(`/api/benchmark`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({providerKey:e.providerKey,modelId:e.modelId})});!t.ok&&t.status!==202&&M(`Benchmark failed: ${(await t.json().catch(()=>({})))?.error||t.statusText}`,`error`)}catch(e){console.error(`[Benchmark] per-row failed:`,e.message)}},[M]),Je=(0,v.useCallback)(e=>{p(e),se.current=Date.now()},[]);(0,v.useCallback)(()=>p(null),[]);let Ye=(0,v.useCallback)(async e=>{try{await fetch(`/api/ping-mode?action=${e}`,{method:`POST`})}catch{}},[]),Xe=(0,v.useCallback)(e=>{if(e===`help`){b(!0);return}if(e===`changelog`){S(!0),w(null);return}if(e===`recommend`){E(!0);return}if(e===`router`){ce();return}if(e===`playground`){te(!0);return}if(e===`install-endpoints`){ie(!0);return}if(e===`installed-models`){ne(!0);return}d(ul[e]||e),se.current=Date.now()},[M]),Ze=(0,v.useCallback)(()=>{je(),Ce(``),M(`View reset to defaults.`,`info`)},[M,je,Ce]),Qe=(0,v.useCallback)(e=>{w(e),S(!0)},[]);return(0,v.useEffect)(()=>{let e=e=>{let t=e.metaKey||e.ctrlKey;if(t&&(e.key===`k`||e.key===`K`)){e.preventDefault(),_(e=>!e);return}if(t&&(e.key===`p`||e.key===`P`)&&!e.shiftKey){e.preventDefault(),_(e=>!e);return}if(e.key===`Escape`){if(g){_(!1);return}if(y){b(!1);return}if(x){S(!1);return}if(T){E(!1);return}if(D){O(!1);return}if(ee){te(!1);return}if(re){ie(!1);return}if(k){ne(!1);return}if(ae){A(null);return}if(f){p(null);return}if(m){h(!1);return}}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[g,y,x,T,D,ee,re,k,ae,f,m]),(0,v.useEffect)(()=>{u===`recommend`&&(E(!0),d(`dashboard`))},[u]),(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`app-shell`,children:[(0,I.jsx)(ei,{searchQuery:Se,onSearchChange:Ce,currentView:u,onNavigate:Xe,onToggleTheme:l,onOpenExport:()=>h(!0),onOpenCommandPalette:()=>_(!0),onBenchmark:Ke,benchmarkRunning:a,benchmarkTotal:o,benchmarkCompleted:s,modelsCount:N.length,theme:c,onToast:M,toolMode:Me,onSetToolMode:Ne,onCycleToolMode:Pe,updateSlot:(0,I.jsx)(Dc,{updateAvailable:Ve,latestVersion:Be,onRunUpdate:He,onOpenChangelog:Qe})}),(0,I.jsxs)(`div`,{className:`app-content`,children:[u===`dashboard`&&(0,I.jsxs)(`main`,{className:`view`,children:[(0,I.jsx)(ra,{filterTier:ue,setFilterTier:de,filterStatus:fe,setFilterStatus:pe,filterProvider:me,setFilterProvider:he,filterVerdict:ge,setFilterVerdict:_e,filterHealth:ve,setFilterHealth:ye,visibilityMode:be,setVisibilityMode:xe,customTextFilter:we,setCustomTextFilter:Te,searchQuery:Se,onResetView:Ze,providers:Ge,pingMode:i,setPingMode:Ye,nextPingAt:n,isPinging:r,globalBenchmarkRunning:a,globalBenchmarkTotal:o,globalBenchmarkCompleted:s,toolMode:Me}),(0,I.jsx)(zs,{filtered:N,onSelectModel:Je,onBenchmarkRow:qe,onLaunch:Ie,favorites:Fe,sortColumn:Ee,sortDirection:De,onSort:Ae,toolMode:Me,onToast:M,onSetToolMode:Ne,onCycleToolMode:Pe,onOpenFallback:e=>A({model:e,toolMode:Me})})]}),u===`settings`&&(0,I.jsx)(`div`,{className:`view`,children:(0,I.jsx)(Ws,{onToast:M,onOpenChangelog:e=>{w(e),S(!0)},onCheckForUpdate:()=>{Ue(),M?.(`Checking for updates…`,`info`)}})}),u===`analytics`&&(0,I.jsx)(`div`,{className:`view`,children:(0,I.jsx)(ec,{models:e})}),(0,I.jsx)(ni,{})]})]}),m&&(0,I.jsx)(Hs,{models:N,onClose:()=>h(!1),onToast:M}),g&&(0,I.jsx)(_c,{onClose:()=>_(!1),onNavigate:Xe,onCycleTheme:l,onResetView:Ze,onSetPingMode:Ye,onOpenHelp:()=>b(!0),onOpenChangelog:()=>{w(null),S(!0)},onOpenPlayground:()=>te(!0),onExport:()=>h(!0),onRunUpdate:He,currentView:u,theme:c,pingMode:i,models:e,updateAvailable:Ve,latestVersion:Be,onToast:M}),T&&(0,I.jsx)(Pc,{onClose:()=>E(!1),toolMode:Me,onLaunch:Ie,onPinAndLaunch:Re,onToast:M}),ae&&(0,I.jsx)(Ic,{request:ae,models:e,onClose:()=>A(null),onSwitchToolLaunch:Le,onLaunchSimilar:t=>{A(null),Ie(e.find(e=>e.providerKey===t.providerKey&&e.modelId===t.modelId)||t)}}),y&&(0,I.jsx)(bc,{onClose:()=>b(!1)}),x&&(0,I.jsx)(wc,{onClose:()=>S(!1),defaultVersion:C}),D&&(0,I.jsx)(Gc,{onClose:()=>O(!1),onToast:M}),ee&&(0,I.jsx)(Qc,{onClose:()=>te(!1),onToast:M,models:e,routerStatus:null}),k&&(0,I.jsx)(tl,{onClose:()=>ne(!1),onToast:M}),re&&(0,I.jsx)(rl,{onClose:()=>ie(!1),onToast:M}),(0,I.jsx)(cl,{toasts:j,dismissToast:le})]})}(0,y.createRoot)(document.getElementById(`root`)).render((0,I.jsx)(v.StrictMode,{children:(0,I.jsx)(dl,{})}));
|
|
41
|
+
`);await navigator.clipboard.writeText(i),n?.(`Copied to clipboard`,`success`),t()},children:[(0,I.jsx)(`span`,{className:Vs.optionIcon,children:(0,I.jsx)($n,{size:20,stroke:1.5})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`span`,{className:Vs.optionLabel,children:`Copy to Clipboard`}),(0,I.jsx)(`span`,{className:Vs.optionDesc,children:`Copy model summary as text`})]})]})]})})]})}):null}var G={page:`_page_1847y_1`,pageHeader:`_pageHeader_1847y_5`,pageTitle:`_pageTitle_1847y_9`,pageSubtitle:`_pageSubtitle_1847y_15`,loading:`_loading_1847y_30`,featureSection:`_featureSection_1847y_37`,sectionHeading:`_sectionHeading_1847y_44`,featureGrid:`_featureGrid_1847y_52`,featureRow:`_featureRow_1847y_57`,featureLabel:`_featureLabel_1847y_67`,featureTitle:`_featureTitle_1847y_79`,featureDesc:`_featureDesc_1847y_85`,featureActions:`_featureActions_1847y_91`,select:`_select_1847y_96`,toggleSwitch:`_toggleSwitch_1847y_110`,toggleSlider:`_toggleSlider_1847y_122`,smallBtn:`_smallBtn_1847y_148`,notice:`_notice_1847y_166`,testBadge:`_testBadge_1847y_178`,test_ok:`_test_ok_1847y_191`,test_auth_error:`_test_auth_error_1847y_192`,test_rate_limited:`_test_rate_limited_1847y_193`,test_no_callable_model:`_test_no_callable_model_1847y_194`,test_fail:`_test_fail_1847y_195`,test_missing_key:`_test_missing_key_1847y_196`,test_pending:`_test_pending_1847y_197`,testSpinner:`_testSpinner_1847y_199`,spin:`_spin_1847y_1`,toolbar:`_toolbar_1847y_210`,toolbarSearch:`_toolbarSearch_1847y_218`,toolbarActions:`_toolbarActions_1847y_250`,toolbarBtn:`_toolbarBtn_1847y_255`,providers:`_providers_1847y_276`,card:`_card_1847y_282`,cardHeader:`_cardHeader_1847y_295`,cardIcon:`_cardIcon_1847y_308`,cardInfo:`_cardInfo_1847y_320`,cardName:`_cardName_1847y_325`,cardMeta:`_cardMeta_1847y_330`,cardStatus:`_cardStatus_1847y_336`,statusConfigured:`_statusConfigured_1847y_344`,statusMissing:`_statusMissing_1847y_349`,toggleIcon:`_toggleIcon_1847y_354`,toggleIconExpanded:`_toggleIconExpanded_1847y_361`,cardBody:`_cardBody_1847y_365`,cardExpanded:`_cardExpanded_1847y_372`,cardContent:`_cardContent_1847y_377`,keyGroup:`_keyGroup_1847y_381`,keyLabel:`_keyLabel_1847y_385`,keyDisplay:`_keyDisplay_1847y_395`,keyDisplayValue:`_keyDisplayValue_1847y_406`,keyDisplayActions:`_keyDisplayActions_1847y_414`,actionBtn:`_actionBtn_1847y_420`,actionBtnDanger:`_actionBtnDanger_1847y_438`,keyInputRow:`_keyInputRow_1847y_448`,keyInput:`_keyInput_1847y_448`,saveBtn:`_saveBtn_1847y_475`,enabledRow:`_enabledRow_1847y_495`,enabledLabel:`_enabledLabel_1847y_504`},Us={ok:{label:`OK`,icon:Kr,className:`testOk`},auth_error:{label:`Auth error`,icon:vr,className:`testErr`},rate_limited:{label:`Rate limited`,icon:Mr,className:`testWarn`},no_callable_model:{label:`No callable model`,icon:vr,className:`testWarn`},fail:{label:`Failed`,icon:vr,className:`testErr`},missing_key:{label:`Missing key`,icon:vr,className:`testNeutral`}};function Ws({onToast:e,onOpenChangelog:t,onCheckForUpdate:n}){let[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(``),[s,c]=(0,v.useState)(new Set),[l,u]=(0,v.useState)(new Set),[d,f]=(0,v.useState)({}),[p,m]=(0,v.useState)({}),[h,g]=(0,v.useState)(new Set),[_,y]=(0,v.useState)(null),b=(0,v.useCallback)(async()=>{try{i(await(await fetch(`/api/config`)).json())}catch{e?.(`Failed to load settings`,`error`)}},[e]);(0,v.useEffect)(()=>{b()},[b]);let x=e=>{c(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},S=()=>{r&&c(new Set(Object.keys(r.providers)))},C=()=>c(new Set),w=async t=>{if(l.has(t)){u(e=>{let n=new Set(e);return n.delete(t),n});return}try{(await(await fetch(`/api/key/${t}`)).json()).key&&u(e=>new Set(e).add(t))}catch{e?.(`Failed to reveal key`,`error`)}},T=async t=>{try{let n=await(await fetch(`/api/key/${t}`)).json();n.key?(await navigator.clipboard.writeText(n.key),e?.(`API key copied to clipboard`,`success`)):e?.(`No key to copy`,`warning`)}catch{e?.(`Failed to copy key`,`error`)}},E=async t=>{let n=d[t]?.trim();if(!n){e?.(`Please enter an API key`,`warning`);return}try{let r=await(await fetch(`/api/settings`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({apiKeys:{[t]:n}})})).json();r.success?(e?.(`API key for ${t} saved successfully!`,`success`),f(e=>({...e,[t]:``})),u(e=>{let n=new Set(e);return n.delete(t),n}),await b(),c(e=>new Set(e).add(t))):e?.(r.error||`Failed to save`,`error`)}catch{e?.(`Network error while saving`,`error`)}},D=async t=>{if(confirm(`Are you sure you want to delete the API key for "${t}"?`))try{let n=await(await fetch(`/api/settings`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({apiKeys:{[t]:``}})})).json();n.success?(e?.(`API key for ${t} deleted`,`info`),u(e=>{let n=new Set(e);return n.delete(t),n}),await b()):e?.(n.error||`Failed to delete`,`error`)}catch{e?.(`Network error while deleting`,`error`)}},O=async(t,n)=>{try{let r=await(await fetch(`/api/settings`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({providers:{[t]:{enabled:n}}})})).json();r.success?e?.(`${t} ${n?`enabled`:`disabled`}`,`success`):e?.(r.error||`Failed to toggle`,`error`)}catch{e?.(`Network error`,`error`)}},ee=(0,v.useCallback)(async t=>{if(!h.has(t)){g(e=>new Set(e).add(t)),m(e=>({...e,[t]:{outcome:`pending`}}));try{let n=await fetch(`/api/key/${encodeURIComponent(t)}/test`,{method:`POST`}),r=await n.json().catch(()=>({}));if(n.ok){m(e=>({...e,[t]:r}));let n=Us[r.outcome]||Us.fail;e?.(`${t} test: ${n.label}${r.code?` (HTTP ${r.code})`:``}`,r.outcome===`ok`?`success`:`info`)}else m(e=>({...e,[t]:{outcome:`fail`,detail:r.error||`HTTP `+n.status}})),e?.(`${t} test failed: ${r.error||n.statusText}`,`error`)}catch(n){m(e=>({...e,[t]:{outcome:`fail`,detail:n.message}})),e?.(`${t} test failed: ${n.message}`,`error`)}finally{g(e=>{let n=new Set(e);return n.delete(t),n})}}},[h,e]),te=(0,v.useCallback)(async(t,n)=>{try{let r=await(await fetch(`/api/settings/feature`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(n===void 0?{feature:t}:{feature:t,value:n})})).json();r.success?(await b(),e?.(`${t} updated`,`success`)):e?.(r.error||`Failed to update feature`,`error`)}catch{e?.(`Network error`,`error`)}},[e]),k=(0,v.useCallback)(async t=>{try{let n=await(await fetch(`/api/shell-env/toggle`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({enabled:t})})).json();n.success?(await b(),e?.(`Shell env export ${n.enabled?`enabled`:`disabled`} — restart your shell to apply.`,`success`)):e?.(n.error||`Failed to toggle shell env`,`error`)}catch{e?.(`Network error`,`error`)}},[e]),ne=(0,v.useCallback)(async()=>{if(confirm(`Remove discontinued proxy config leftovers? This is safe to run.`))try{let t=await(await fetch(`/api/legacy-cleanup`,{method:`POST`})).json(),n=(t.removedFiles?.length||0)+(t.updatedFiles?.length||0);t.changed?(y(`Cleaned ${n} legacy file(s). ${t.errors.length} error(s).`),e?.(`Legacy proxy cleanup: ${n} file(s) cleaned.`,`success`)):(y(`No discontinued proxy config was found. You are on the stable direct-provider setup.`),e?.(`No legacy proxy config found — already on stable setup.`,`info`)),await b()}catch(t){e?.(`Legacy cleanup failed: ${t.message}`,`error`)}},[e]),re=(0,v.useCallback)(()=>{n?.()},[n]);if(!r)return(0,I.jsx)(`div`,{className:G.page,children:(0,I.jsx)(`div`,{className:G.loading,children:`Loading settings...`})});let ie=Object.entries(r.providers).filter(([,e])=>{if(!a)return!0;let t=a.toLowerCase();return e.name.toLowerCase().includes(t)}).sort((e,t)=>e[1].name.localeCompare(t[1].name));return(0,I.jsxs)(`div`,{className:G.page,children:[(0,I.jsxs)(`div`,{className:G.pageHeader,children:[(0,I.jsxs)(`h1`,{className:G.pageTitle,children:[(0,I.jsx)(Ir,{size:24,stroke:1.5,style:{marginRight:8,verticalAlign:`middle`}}),`Settings`]}),(0,I.jsxs)(`p`,{className:G.pageSubtitle,children:[`API keys, theme, favorites mode, shell env, and update controls. All settings are stored locally in `,(0,I.jsx)(`code`,{children:`~/.free-coding-models.json`}),`and shared with the TUI.`]})]}),r&&(0,I.jsxs)(`section`,{className:G.featureSection,children:[(0,I.jsx)(`h2`,{className:G.sectionHeading,children:`⚙️ Global settings`}),(0,I.jsxs)(`div`,{className:G.featureGrid,children:[(0,I.jsxs)(`div`,{className:G.featureRow,children:[(0,I.jsxs)(`div`,{className:G.featureLabel,children:[(0,I.jsx)(zr,{size:16,stroke:1.5}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:G.featureTitle,children:`Theme`}),(0,I.jsx)(`div`,{className:G.featureDesc,children:`Tri-state cycle. Auto follows your OS.`})]})]}),(0,I.jsxs)(`select`,{className:G.select,value:r.settings?.theme||`auto`,onChange:e=>te(`theme`,e.target.value),children:[(0,I.jsx)(`option`,{value:`auto`,children:`Auto (OS)`}),(0,I.jsx)(`option`,{value:`dark`,children:`Dark`}),(0,I.jsx)(`option`,{value:`light`,children:`Light`})]})]}),(0,I.jsxs)(`div`,{className:G.featureRow,children:[(0,I.jsxs)(`div`,{className:G.featureLabel,children:[(0,I.jsx)(Rr,{size:16,stroke:1.5}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:G.featureTitle,children:`Favorites pinned + always visible`}),(0,I.jsx)(`div`,{className:G.featureDesc,children:`Favorites bypass filters and stay on top (TUI: Y key).`})]})]}),(0,I.jsxs)(`label`,{className:G.toggleSwitch,children:[(0,I.jsx)(`input`,{type:`checkbox`,checked:!!r.settings?.favoritesPinnedAndSticky,onChange:e=>te(`favoritesPinnedAndSticky`,e.target.checked)}),(0,I.jsx)(`span`,{className:G.toggleSlider})]})]}),(0,I.jsxs)(`div`,{className:G.featureRow,children:[(0,I.jsxs)(`div`,{className:G.featureLabel,children:[(0,I.jsx)(Wn,{size:16,stroke:1.5}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:G.featureTitle,children:`Run AI Speed Test on startup`}),(0,I.jsx)(`div`,{className:G.featureDesc,children:`Auto-fire the global benchmark right after launch (TUI: U → 'Enable').`})]})]}),(0,I.jsxs)(`label`,{className:G.toggleSwitch,children:[(0,I.jsx)(`input`,{type:`checkbox`,checked:!!r.settings?.runAiSpeedTestOnStartup,onChange:e=>te(`runAiSpeedTestOnStartup`,e.target.checked)}),(0,I.jsx)(`span`,{className:G.toggleSlider})]})]}),(0,I.jsxs)(`div`,{className:G.featureRow,children:[(0,I.jsxs)(`div`,{className:G.featureLabel,children:[(0,I.jsx)(Qn,{size:16,stroke:1.5}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:G.featureTitle,children:`Export API keys to shell rc`}),(0,I.jsx)(`div`,{className:G.featureDesc,children:`Write NVIDIA_API_KEY / GROQ_API_KEY / … to your shell rc file.`})]})]}),(0,I.jsxs)(`label`,{className:G.toggleSwitch,children:[(0,I.jsx)(`input`,{type:`checkbox`,checked:!!r.settings?.shellEnvEnabled,onChange:e=>k(e.target.checked)}),(0,I.jsx)(`span`,{className:G.toggleSlider})]})]}),(0,I.jsxs)(`div`,{className:G.featureRow,children:[(0,I.jsxs)(`div`,{className:G.featureLabel,children:[(0,I.jsx)(ar,{size:16,stroke:1.5}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:G.featureTitle,children:`Check for updates`}),(0,I.jsx)(`div`,{className:G.featureDesc,children:`The header chip turns green when a newer npm version is available. Use the 'Update now' button to install.`})]})]}),(0,I.jsxs)(`div`,{className:G.featureActions,children:[(0,I.jsx)(`button`,{className:G.smallBtn,onClick:re,children:`Check now`}),(0,I.jsxs)(`button`,{className:G.smallBtn,onClick:()=>t?.(null),children:[(0,I.jsx)(hr,{size:13,stroke:1.5}),` Changelog`]})]})]}),(0,I.jsxs)(`div`,{className:G.featureRow,children:[(0,I.jsxs)(`div`,{className:G.featureLabel,children:[(0,I.jsx)(Mr,{size:16,stroke:1.5}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:G.featureTitle,children:`Cleanup discontinued proxy artifacts`}),(0,I.jsx)(`div`,{className:G.featureDesc,children:`Remove old config / env / service leftovers from the old multi-tool proxy.`})]})]}),(0,I.jsx)(`button`,{className:G.smallBtn,onClick:ne,children:`Run cleanup`})]})]}),_&&(0,I.jsx)(`div`,{className:G.notice,children:_})]}),(0,I.jsxs)(`div`,{className:G.toolbar,children:[(0,I.jsxs)(`div`,{className:G.toolbarSearch,children:[(0,I.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:[(0,I.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,I.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]}),(0,I.jsx)(`input`,{type:`text`,placeholder:`Search providers...`,value:a,onChange:e=>o(e.target.value),autoComplete:`off`})]}),(0,I.jsxs)(`div`,{className:G.toolbarActions,children:[(0,I.jsx)(`button`,{className:G.toolbarBtn,onClick:S,children:`Expand All`}),(0,I.jsx)(`button`,{className:G.toolbarBtn,onClick:C,children:`Collapse All`})]})]}),(0,I.jsx)(`div`,{className:G.providers,children:ie.map(([e,t])=>{let n=s.has(e),r=l.has(e);return(0,I.jsxs)(`div`,{className:`${G.card} ${n?G.cardExpanded:``}`,children:[(0,I.jsxs)(`div`,{className:G.cardHeader,onClick:()=>x(e),children:[(0,I.jsx)(`div`,{className:G.cardIcon,children:(0,I.jsx)(kr,{size:20,stroke:1.5})}),(0,I.jsxs)(`div`,{className:G.cardInfo,children:[(0,I.jsx)(`div`,{className:G.cardName,children:t.name}),(0,I.jsxs)(`div`,{className:G.cardMeta,children:[t.modelCount,` models · `,e]})]}),(0,I.jsx)(`span`,{className:`${G.cardStatus} ${t.hasKey?G.statusConfigured:G.statusMissing}`,children:t.hasKey?(0,I.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,I.jsx)(Qn,{size:14,stroke:1.5}),` Active`]}):(0,I.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,I.jsx)(vr,{size:14,stroke:1.5}),` No Key`]})}),(0,I.jsx)(`span`,{className:`${G.toggleIcon} ${n?G.toggleIconExpanded:``}`,children:`▼`})]}),(0,I.jsx)(`div`,{className:G.cardBody,children:(0,I.jsxs)(`div`,{className:G.cardContent,children:[t.hasKey&&p[e]&&(0,I.jsx)(`div`,{className:`${G.testBadge} ${G[`test_${p[e].outcome}`]||``}`,children:(()=>{let t=Us[p[e].outcome]||Us.fail,n=t.icon;return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(n,{size:12,stroke:1.5}),(0,I.jsxs)(`span`,{children:[`Last test: `,t.label,p[e].code?` (HTTP ${p[e].code})`:``]})]})})()}),t.hasKey&&(0,I.jsxs)(`div`,{className:G.keyGroup,children:[(0,I.jsx)(`label`,{className:G.keyLabel,children:`Current API Key`}),(0,I.jsxs)(`div`,{className:G.keyDisplay,children:[(0,I.jsx)(`span`,{className:G.keyDisplayValue,children:r?t.maskedKey||`••••••••`:Wt(t.maskedKey||``)}),(0,I.jsxs)(`div`,{className:G.keyDisplayActions,children:[(0,I.jsx)(`button`,{className:G.actionBtn,onClick:()=>w(e),title:r?`Hide`:`Reveal`,children:r?(0,I.jsx)(cr,{size:14,stroke:1.5}):(0,I.jsx)(lr,{size:14,stroke:1.5})}),(0,I.jsx)(`button`,{className:G.actionBtn,onClick:()=>T(e),title:`Copy`,children:(0,I.jsx)(rr,{size:14,stroke:1.5})}),(0,I.jsxs)(`button`,{className:G.actionBtn,onClick:()=>ee(e),disabled:h.has(e),title:`Test this key against the provider (TUI: T key in Settings)`,"aria-label":`Test key for ${e}`,children:[h.has(e)?(0,I.jsx)(`span`,{className:G.testSpinner}):(0,I.jsx)(Wn,{size:14,stroke:1.5}),h.has(e)?`Testing…`:`Test`]}),(0,I.jsx)(`button`,{className:`${G.actionBtn} ${G.actionBtnDanger}`,onClick:()=>D(e),title:`Delete Key`,children:(0,I.jsx)(Vr,{size:14,stroke:1.5})})]})]})]}),(0,I.jsxs)(`div`,{className:G.keyGroup,children:[(0,I.jsx)(`label`,{className:G.keyLabel,children:t.hasKey?`Update API Key`:`Add API Key`}),(0,I.jsxs)(`div`,{className:G.keyInputRow,children:[(0,I.jsx)(`input`,{type:`password`,className:G.keyInput,placeholder:`Enter your API key...`,value:d[e]||``,onChange:t=>f(n=>({...n,[e]:t.target.value})),autoComplete:`off`}),(0,I.jsx)(`button`,{className:G.saveBtn,onClick:()=>E(e),children:t.hasKey?`Update`:`Save`})]})]}),(0,I.jsxs)(`div`,{className:G.enabledRow,children:[(0,I.jsx)(`span`,{className:G.enabledLabel,children:`Provider Enabled`}),(0,I.jsxs)(`label`,{className:G.toggleSwitch,children:[(0,I.jsx)(`input`,{type:`checkbox`,defaultChecked:t.enabled!==!1,onChange:t=>O(e,t.target.checked)}),(0,I.jsx)(`span`,{className:G.toggleSlider})]})]})]})})]},e)})})]})}function Gs(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(!0),i=(0,v.useCallback)(async()=>{r(!0);try{t(Ks(await(await fetch(`/api/router/tokens`)).json()))}catch{t(null)}finally{r(!1)}},[]);return(0,v.useEffect)(()=>{i()},[i]),{data:e,loading:n,refresh:i}}function Ks(e){if(!e)return null;let t=e.daily||{},n=e.all_time||{},r=[],i=new Date;for(let e=6;e>=0;e--){let n=new Date(i);n.setDate(n.getDate()-e);let a=n.toISOString().slice(0,10),o=t[a]||{total_tokens:0,requests:0};r.push({date:a,label:n.toLocaleDateString(`en`,{weekday:`short`}),totalTokens:o.total_tokens||0,requests:o.requests||0})}let a={};for(let e of Object.values(t)){let t=e.by_model||{};for(let[e,n]of Object.entries(t))a[e]||(a[e]={total:0,requests:0}),a[e].total+=n.total||0,a[e].requests+=n.requests||0}let o=Object.entries(a).sort((e,t)=>t[1].total-e[1].total).slice(0,10).map(([e,t])=>({key:e,...t})),s={};for(let[e,t]of Object.entries(a)){let n=e.split(`/`)[0];s[n]||(s[n]={total:0,requests:0}),s[n].total+=t.total,s[n].requests+=t.requests}let c=Object.entries(s).sort((e,t)=>t[1].total-e[1].total).slice(0,10).map(([e,t])=>({key:e,...t})),l=t[i.toISOString().slice(0,10)]||{};return{today:{totalTokens:l.total_tokens||0,promptTokens:l.prompt_tokens||0,completionTokens:l.completion_tokens||0,requests:l.requests||0},allTime:{totalTokens:n.total_tokens||0,promptTokens:n.prompt_tokens||0,completionTokens:n.completion_tokens||0,requests:n.requests||0},sevenDays:r,topModels:o,topProviders:c,hasData:n.total_tokens>0||Object.keys(t).length>0}}var K={card:`_card_1m2zx_1`,cardTitle:`_cardTitle_1m2zx_5`,empty:`_empty_1m2zx_14`,summaryGrid:`_summaryGrid_1m2zx_22`,summaryCard:`_summaryCard_1m2zx_29`,summaryLabel:`_summaryLabel_1m2zx_39`,summaryValue:`_summaryValue_1m2zx_47`,summarySub:`_summarySub_1m2zx_53`,chart:`_chart_1m2zx_59`,chartBar:`_chartBar_1m2zx_67`,chartFill:`_chartFill_1m2zx_77`,chartLabel:`_chartLabel_1m2zx_85`,topList:`_topList_1m2zx_92`,topRow:`_topRow_1m2zx_98`,topKey:`_topKey_1m2zx_106`,topVal:`_topVal_1m2zx_115`,topReq:`_topReq_1m2zx_121`};function qs(e){return typeof e!=`number`||!Number.isFinite(e)?`0`:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(Math.round(e))}function Js(){let{data:e,loading:t}=Gs();if(t)return(0,I.jsxs)(`div`,{className:K.card,children:[(0,I.jsx)(`h3`,{className:K.cardTitle,children:`Token Usage`}),(0,I.jsx)(`div`,{className:K.empty,children:`Loading…`})]});if(!e||!e.hasData)return(0,I.jsxs)(`div`,{className:K.card,children:[(0,I.jsx)(`h3`,{className:K.cardTitle,children:`Token Usage`}),(0,I.jsx)(`div`,{className:K.empty,children:`No token data yet. Start the router and send requests to track usage.`})]});let n=Math.max(...e.sevenDays.map(e=>e.totalTokens),1);return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:K.summaryGrid,children:[(0,I.jsxs)(`div`,{className:K.summaryCard,children:[(0,I.jsx)(`span`,{className:K.summaryLabel,children:`Today`}),(0,I.jsx)(`span`,{className:K.summaryValue,children:qs(e.today.totalTokens)}),(0,I.jsxs)(`span`,{className:K.summarySub,children:[e.today.requests,` requests`]})]}),(0,I.jsxs)(`div`,{className:K.summaryCard,children:[(0,I.jsx)(`span`,{className:K.summaryLabel,children:`All Time`}),(0,I.jsx)(`span`,{className:K.summaryValue,children:qs(e.allTime.totalTokens)}),(0,I.jsxs)(`span`,{className:K.summarySub,children:[e.allTime.requests,` requests`]})]})]}),(0,I.jsxs)(`div`,{className:K.card,children:[(0,I.jsx)(`h3`,{className:K.cardTitle,children:`7-Day Usage`}),(0,I.jsx)(`div`,{className:K.chart,children:e.sevenDays.map(e=>(0,I.jsxs)(`div`,{className:K.chartBar,children:[(0,I.jsx)(`div`,{className:K.chartFill,style:{height:`${Math.max(2,e.totalTokens/n*100)}%`},title:`${e.date}: ${qs(e.totalTokens)} tokens`}),(0,I.jsx)(`span`,{className:K.chartLabel,children:e.label})]},e.date))})]}),e.topModels.length>0&&(0,I.jsxs)(`div`,{className:K.card,children:[(0,I.jsx)(`h3`,{className:K.cardTitle,children:`Top Models`}),(0,I.jsx)(`div`,{className:K.topList,children:e.topModels.map(e=>(0,I.jsxs)(`div`,{className:K.topRow,children:[(0,I.jsx)(`span`,{className:K.topKey,children:e.key}),(0,I.jsxs)(`span`,{className:K.topVal,children:[qs(e.total),` tokens`]}),(0,I.jsxs)(`span`,{className:K.topReq,children:[e.requests,` req`]})]},e.key))})]}),e.topProviders.length>0&&(0,I.jsxs)(`div`,{className:K.card,children:[(0,I.jsx)(`h3`,{className:K.cardTitle,children:`Top Providers`}),(0,I.jsx)(`div`,{className:K.topList,children:e.topProviders.map(e=>(0,I.jsxs)(`div`,{className:K.topRow,children:[(0,I.jsx)(`span`,{className:K.topKey,children:e.key}),(0,I.jsxs)(`span`,{className:K.topVal,children:[qs(e.total),` tokens`]}),(0,I.jsxs)(`span`,{className:K.topReq,children:[e.requests,` req`]})]},e.key))})]})]})}var q={page:`_page_1n8f8_1`,pageHeader:`_pageHeader_1n8f8_5`,pageTitle:`_pageTitle_1n8f8_9`,pageSubtitle:`_pageSubtitle_1n8f8_15`,grid:`_grid_1n8f8_21`,card:`_card_1n8f8_27`,cardWide:`_cardWide_1n8f8_36`,cardTitle:`_cardTitle_1n8f8_40`,cardBody:`_cardBody_1n8f8_46`,empty:`_empty_1n8f8_49`,healthItem:`_healthItem_1n8f8_55`,healthName:`_healthName_1n8f8_67`,healthBar:`_healthBar_1n8f8_74`,healthFill:`_healthFill_1n8f8_82`,healthPct:`_healthPct_1n8f8_89`,pctFast:`_pctFast_1n8f8_97`,pctMedium:`_pctMedium_1n8f8_98`,pctSlow:`_pctSlow_1n8f8_99`,leaderItem:`_leaderItem_1n8f8_105`,leaderRank:`_leaderRank_1n8f8_117`,rank1:`_rank1_1n8f8_131`,rank2:`_rank2_1n8f8_132`,rank3:`_rank3_1n8f8_133`,leaderName:`_leaderName_1n8f8_135`,leaderLatency:`_leaderLatency_1n8f8_145`,tierItem:`_tierItem_1n8f8_153`,tierBadge:`_tierBadge_1n8f8_160`,tierBar:`_tierBar_1n8f8_165`,tierFill:`_tierFill_1n8f8_173`,tierCount:`_tierCount_1n8f8_179`};function Ys(e,t){return typeof window>`u`||!window.document?.documentElement?t:getComputedStyle(document.documentElement).getPropertyValue(e).trim()||t}var Xs={"S+":`--tier-splus`,S:`--tier-s`,"A+":`--tier-aplus`,A:`--tier-a`,"A-":`--tier-aminus`,"B+":`--tier-bplus`,B:`--tier-b`,C:`--tier-c`},Zs={"S+":`#ffd700`,S:`#ff8c00`,"A+":`#00c8ff`,A:`#3ddc84`,"A-":`#7ecf7e`,"B+":`#a8a8c8`,B:`#808098`,C:`#606078`};function Qs(e){return Ys(Xs[e],Zs[e])}var $s=[`S+`,`S`,`A+`,`A`,`A-`,`B+`,`B`,`C`];function ec({models:e}){let t=(0,v.useMemo)(()=>{let t={};return e.forEach(e=>{t[e.origin]||(t[e.origin]={total:0,online:0,key:e.providerKey}),t[e.origin].total++,e.status===`up`&&t[e.origin].online++}),Object.entries(t).sort((e,t)=>t[1].online/t[1].total-e[1].online/e[1].total)},[e]),n=(0,v.useMemo)(()=>[...e.filter(e=>e.status===`up`&&e.avg!==1/0&&e.avg<99e3)].sort((e,t)=>e.avg-t.avg).slice(0,10),[e]),r=(0,v.useMemo)(()=>{let t={};e.forEach(e=>{t[e.tier]=(t[e.tier]||0)+1});let n=Math.max(...Object.values(t),1);return $s.map(e=>({tier:e,count:t[e]||0,pct:(t[e]||0)/n*100}))},[e]);return(0,I.jsxs)(`div`,{className:q.page,children:[(0,I.jsxs)(`div`,{className:q.pageHeader,children:[(0,I.jsxs)(`h1`,{className:q.pageTitle,children:[(0,I.jsx)(Ln,{size:24,stroke:1.5,style:{marginRight:8,verticalAlign:`middle`}}),`Analytics`]}),(0,I.jsx)(`p`,{className:q.pageSubtitle,children:`Real-time insights across all providers and models`})]}),(0,I.jsxs)(`div`,{className:q.grid,children:[(0,I.jsxs)(`div`,{className:`${q.card} ${q.cardWide}`,children:[(0,I.jsx)(`h3`,{className:q.cardTitle,children:`Provider Health Overview`}),(0,I.jsx)(`div`,{className:q.cardBody,children:t.length===0?(0,I.jsx)(`div`,{className:q.empty,children:`Waiting for data...`}):t.map(([e,t])=>{let n=t.total>0?Math.round(t.online/t.total*100):0,r=n>70?q.pctFast:n>30?q.pctMedium:q.pctSlow;return(0,I.jsxs)(`div`,{className:q.healthItem,children:[(0,I.jsx)(`span`,{className:q.healthName,children:e}),(0,I.jsx)(`div`,{className:q.healthBar,children:(0,I.jsx)(`div`,{className:q.healthFill,style:{width:`${n}%`}})}),(0,I.jsxs)(`span`,{className:`${q.healthPct} ${r}`,children:[n,`%`]})]},e)})})]}),(0,I.jsxs)(`div`,{className:q.card,children:[(0,I.jsxs)(`h3`,{className:q.cardTitle,style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,I.jsx)(Hr,{size:16,stroke:1.5}),`Fastest Models`]}),(0,I.jsx)(`div`,{className:q.cardBody,children:n.length===0?(0,I.jsx)(`div`,{className:q.empty,children:`Waiting for ping data...`}):n.map((e,t)=>{let n=t<3?q[`rank${t+1}`]:``;return(0,I.jsxs)(`div`,{className:q.leaderItem,children:[(0,I.jsx)(`div`,{className:`${q.leaderRank} ${n}`,children:t+1}),(0,I.jsx)(`span`,{className:q.leaderName,children:e.label}),(0,I.jsxs)(`span`,{className:q.leaderLatency,children:[e.avg,`ms`]})]},e.modelId)})})]}),(0,I.jsxs)(`div`,{className:q.card,children:[(0,I.jsx)(`h3`,{className:q.cardTitle,children:`Tier Distribution`}),(0,I.jsx)(`div`,{className:q.cardBody,children:r.map(({tier:e,count:t,pct:n})=>(0,I.jsxs)(`div`,{className:q.tierItem,children:[(0,I.jsx)(`div`,{className:q.tierBadge,children:(0,I.jsx)(zo,{tier:e})}),(0,I.jsx)(`div`,{className:q.tierBar,children:(0,I.jsx)(`div`,{className:q.tierFill,style:{width:`${n}%`,background:Qs(e)}})}),(0,I.jsx)(`span`,{className:q.tierCount,children:t})]},e))})]})]}),(0,I.jsx)(Js,{})]})}var tc={nvidia:{name:`NVIDIA NIM`,url:`https://integrate.api.nvidia.com/v1/chat/completions`,models:[[`minimaxai/minimax-m2.7`,`MiniMax M2.7`,`S+`,`80.2%`,`200k`],[`z-ai/glm-5.1`,`GLM 5.1`,`S+`,`77.8%`,`128k`],[`moonshotai/kimi-k2.6`,`Kimi K2.6`,`S+`,`76.8%`,`256k`],[`deepseek-ai/deepseek-v4-pro`,`DeepSeek V4 Pro`,`S+`,`73.1%`,`1M`],[`deepseek-ai/deepseek-v4-flash`,`DeepSeek V4 Flash`,`S+`,`72.0%`,`1M`],[`stepfun-ai/step-3.5-flash`,`Step 3.5 Flash`,`S+`,`74.4%`,`256k`],[`stepfun-ai/step-3.7-flash`,`Step 3.7 Flash`,`S+`,`74.4%`,`256k`],[`qwen/qwen3-coder-480b-a35b-instruct`,`Qwen3 Coder 480B`,`S+`,`70.6%`,`256k`],[`nvidia/nemotron-3-ultra-550b-a55b`,`Nemotron 3 Ultra`,`S+`,`-`,`1M`],[`qwen/qwen3-next-80b-a3b-instruct`,`Qwen3 80B Instruct`,`S`,`65.0%`,`128k`],[`qwen/qwen3.5-397b-a17b`,`Qwen3.5 400B VLM`,`S`,`68.0%`,`128k`],[`openai/gpt-oss-120b`,`GPT OSS 120B`,`S`,`60.0%`,`128k`],[`meta/llama-4-maverick-17b-128e-instruct`,`Llama 4 Maverick`,`S`,`62.0%`,`1M`],[`mistralai/mistral-medium-3.5-128b`,`Mistral Medium 3.5`,`S`,`66.0%`,`128k`],[`mistralai/mistral-small-4-119b-2603`,`Mistral Small 4`,`S`,`60.0%`,`256k`],[`qwen/qwen3.5-122b-a10b`,`Qwen3.5 122B`,`S`,`64.0%`,`128k`],[`mistralai/mistral-large-3-675b-instruct-2512`,`Mistral Large 675B`,`A+`,`58.0%`,`256k`],[`nvidia/nemotron-3-super-120b-a12b`,`Nemotron 3 Super`,`A+`,`56.0%`,`128k`],[`nvidia/nemotron-3-nano-omni-30b-a3b-reasoning`,`Nemotron 3 Omni`,`A+`,`52.0%`,`128k`],[`nvidia/nemotron-3-nano-30b-a3b`,`Nemotron Nano 30B`,`A`,`43.0%`,`128k`],[`openai/gpt-oss-20b`,`GPT OSS 20B`,`A`,`42.0%`,`128k`],[`google/gemma-4-31b-it`,`Gemma 4 31B`,`A`,`45.0%`,`256k`],[`bytedance/seed-oss-36b-instruct`,`Seed OSS 36B`,`A-`,`38.0%`,`32k`],[`stockmark/stockmark-2-100b-instruct`,`Stockmark 100B`,`A-`,`36.0%`,`32k`],[`mistralai/ministral-14b-instruct-2512`,`Ministral 14B`,`B+`,`34.0%`,`32k`],[`meta/llama-3.2-11b-vision-instruct`,`Llama 3.2 11B Vision`,`B`,`28.0%`,`128k`],[`microsoft/phi-4-mini-instruct`,`Phi 4 Mini`,`C`,`14.0%`,`128k`]]},groq:{name:`Groq`,url:`https://api.groq.com/openai/v1/chat/completions`,models:[[`llama-3.3-70b-versatile`,`Llama 3.3 70B`,`A-`,`39.5%`,`131k`],[`meta-llama/llama-4-scout-17b-16e-instruct`,`Llama 4 Scout`,`A`,`44.0%`,`131k`],[`llama-3.1-8b-instant`,`Llama 3.1 8B`,`B`,`28.8%`,`131k`],[`openai/gpt-oss-120b`,`GPT OSS 120B`,`S`,`60.0%`,`131k`],[`openai/gpt-oss-20b`,`GPT OSS 20B`,`A`,`42.0%`,`131k`],[`qwen/qwen3-32b`,`Qwen3 32B`,`A+`,`50.0%`,`131k`],[`groq/compound`,`Groq Compound`,`A`,`45.0%`,`131k`],[`groq/compound-mini`,`Groq Compound Mini`,`B+`,`32.0%`,`131k`]]},cerebras:{name:`Cerebras`,url:`https://api.cerebras.ai/v1/chat/completions`,models:[[`gpt-oss-120b`,`GPT OSS 120B`,`S`,`60.0%`,`131k`],[`zai-glm-4.7`,`GLM 4.7`,`S+`,`73.8%`,`131k`]]},googleai:{name:`Google AI`,url:`https://generativelanguage.googleapis.com/v1beta/openai/chat/completions`,models:[[`gemini-3.5-flash`,`Gemini 3.5 Flash`,`S+`,`-`,`1M`],[`gemini-3.1-pro-preview`,`Gemini 3.1 Pro Preview`,`S+`,`78.0%`,`1M`],[`gemini-3-flash-preview`,`Gemini 3 Flash Preview`,`S`,`65.0%`,`1M`],[`gemini-3.1-flash-lite`,`Gemini 3.1 Flash Lite`,`A+`,`55.0%`,`1M`],[`gemini-2.5-pro`,`Gemini 2.5 Pro`,`S+`,`63.2%`,`1M`],[`gemini-2.5-flash`,`Gemini 2.5 Flash`,`A+`,`50.0%`,`1M`],[`gemini-2.5-flash-lite`,`Gemini 2.5 Flash Lite`,`A`,`42.0%`,`1M`]]},"github-models":{name:`GitHub Models`,url:`https://models.github.ai/inference/chat/completions`,models:[[`openai/gpt-4.1`,`GPT-4.1`,`S+`,`-`,`1M`],[`openai/gpt-4.1-mini`,`GPT-4.1 Mini`,`S`,`-`,`1M`],[`openai/gpt-4.1-nano`,`GPT-4.1 Nano`,`A`,`-`,`1M`],[`deepseek/deepseek-v3-0324`,`DeepSeek V3 0324`,`S`,`62.0%`,`128k`],[`meta/meta-llama-3.1-405b-instruct`,`Llama 3.1 405B`,`A`,`44.0%`,`128k`],[`meta/llama-4-maverick-17b-128e-instruct-fp8`,`Llama 4 Maverick`,`S`,`62.0%`,`1M`],[`meta/llama-4-scout-17b-16e-instruct`,`Llama 4 Scout`,`A`,`44.0%`,`1M`],[`meta/llama-3.3-70b-instruct`,`Llama 3.3 70B`,`A-`,`39.5%`,`128k`],[`meta/llama-3.2-90b-vision-instruct`,`Llama 3.2 90B Vision`,`A-`,`-`,`128k`],[`meta/llama-3.2-11b-vision-instruct`,`Llama 3.2 11B Vision`,`B`,`-`,`128k`],[`meta/meta-llama-3.1-8b-instruct`,`Llama 3.1 8B`,`B`,`28.8%`,`128k`],[`mistral-ai/codestral-2501`,`Codestral 2501`,`B+`,`34.0%`,`256k`],[`mistral-ai/mistral-medium-2505`,`Mistral Medium 2505`,`A`,`48.0%`,`128k`],[`mistral-ai/mistral-small-2503`,`Mistral Small 2503`,`B+`,`30.0%`,`128k`],[`mistral-ai/ministral-3b`,`Ministral 3B`,`C`,`-`,`128k`]]},mistral:{name:`Mistral LP`,url:`https://api.mistral.ai/v1/chat/completions`,models:[[`mistral-large-2512`,`Mistral Large 3`,`S+`,`70.0%`,`256k`],[`mistral-medium-3-5`,`Mistral Medium 3.5`,`S+`,`77.6%`,`256k`],[`devstral-2512`,`Devstral 2`,`S+`,`72.2%`,`256k`],[`magistral-medium-2509`,`Magistral Medium 1.2`,`A+`,`52.0%`,`128k`],[`mistral-small-2603`,`Mistral Small 4`,`A`,`48.0%`,`256k`]]},cloudflare:{name:`Cloudflare AI`,url:`https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/v1/chat/completions`,models:[[`@cf/moonshotai/kimi-k2.6`,`Kimi K2.6`,`S+`,`76.8%`,`262k`],[`@cf/zai-org/glm-4.7-flash`,`GLM-4.7-Flash`,`S`,`59.2%`,`131k`],[`@cf/nvidia/nemotron-3-120b-a12b`,`Nemotron 3 Super`,`A+`,`56.0%`,`32k`],[`@cf/meta/llama-4-scout-17b-16e-instruct`,`Llama 4 Scout`,`A`,`44.0%`,`131k`],[`@cf/meta/llama-3.2-90b-instruct`,`Llama 3.2 90B`,`A+`,`45.0%`,`128k`],[`@cf/mistralai/mistral-7b-instruct-v0.2`,`Mistral 7B v0.2`,`A`,`38.0%`,`128k`],[`@cf/google/gemma-2-9b-it`,`Gemma 2 9B`,`A`,`35.0%`,`128k`],[`@cf/anthropic/claude-3-5-sonnet`,`Claude 3.5 Sonnet`,`S+`,`62.4%`,`200k`],[`@cf/openai/gpt-4o-mini`,`GPT-4o Mini`,`A+`,`50.0%`,`128k`],[`@cf/qwen/qwen3-30b-a3b-fp8`,`Qwen3 30B MoE`,`A`,`45.0%`,`128k`],[`@cf/qwen/qwen2.5-coder-32b-instruct`,`Qwen2.5 Coder 32B`,`A`,`46.0%`,`128k`],[`@cf/openai/gpt-oss-20b`,`GPT OSS 20B`,`A`,`42.0%`,`128k`],[`@cf/meta/llama-3.3-70b-instruct-fp8-fast`,`Llama 3.3 70B`,`A-`,`39.5%`,`128k`],[`@cf/google/gemma-4-26b-a4b-it`,`Gemma 4 26B MoE`,`A-`,`38.0%`,`128k`],[`@cf/mistralai/mistral-small-3.1-24b-instruct`,`Mistral Small 3.1`,`B+`,`30.0%`,`128k`],[`@cf/ibm/granite-4.0-h-micro`,`Granite 4.0 Micro`,`B+`,`30.0%`,`128k`]]},openrouter:{name:`OpenRouter`,url:`https://openrouter.ai/api/v1/chat/completions`,models:[[`qwen/qwen3-coder:free`,`Qwen3 Coder 480B`,`S+`,`70.6%`,`1M`],[`z-ai/glm-4.5-air:free`,`GLM 4.5 Air`,`S+`,`72.0%`,`131k`],[`poolside/laguna-m.1:free`,`Poolside Laguna M.1`,`S+`,`-`,`262k`],[`poolside/laguna-xs.2:free`,`Poolside Laguna XS.2`,`S+`,`-`,`131k`],[`moonshotai/kimi-k2.6:free`,`Kimi K2.6`,`S+`,`76.8%`,`262k`],[`qwen/qwen3-next-80b-a3b-instruct:free`,`Qwen3 80B Instruct`,`S`,`65.0%`,`262k`],[`openai/gpt-oss-120b:free`,`GPT OSS 120B`,`S`,`60.0%`,`131k`],[`arcee-ai/trinity-large-thinking:free`,`Arcee Trinity Large`,`A`,`-`,`262k`],[`nvidia/nemotron-3-super-120b-a12b:free`,`Nemotron 3 Super`,`A+`,`56.0%`,`262k`],[`nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free`,`Nemotron 3 Omni`,`A+`,`52.0%`,`256k`],[`nvidia/nemotron-nano-12b-v2-vl:free`,`Nemotron Nano 12B VL`,`A`,`20.0%`,`128k`],[`openrouter/owl-alpha`,`Owl Alpha`,`A+`,`-`,`1M`],[`nousresearch/hermes-3-llama-3.1-405b:free`,`Hermes 3 405B`,`A`,`44.0%`,`131k`],[`openai/gpt-oss-20b:free`,`GPT OSS 20B`,`A`,`42.0%`,`131k`],[`nvidia/nemotron-nano-30b-a3b:free`,`Nemotron Nano 30B`,`A`,`43.0%`,`256k`],[`cognitivecomputations/dolphin-mistral-24b-venice-edition:free`,`Dolphin Mistral 24B`,`B+`,`30.0%`,`33k`],[`google/gemma-4-31b-it:free`,`Gemma 4 31B`,`A`,`45.0%`,`256k`],[`google/gemma-4-26b-a4b-it:free`,`Gemma 4 26B MoE`,`A-`,`38.0%`,`256k`],[`meta-llama/llama-3.3-70b-instruct:free`,`Llama 3.3 70B`,`A-`,`39.5%`,`131k`],[`meta-llama/llama-3.2-3b-instruct:free`,`Llama 3.2 3B`,`B`,`20.0%`,`128k`],[`nvidia/nemotron-nano-9b-v2:free`,`Nemotron Nano 9B`,`B+`,`18.0%`,`128k`],[`openrouter/free`,`OpenRouter Free`,`B`,`-`,`200k`],[`liquid/lfm-2.5-1.2b-instruct:free`,`LFM 2.5 1.2B`,`C`,`-`,`32k`],[`liquid/lfm-2.5-1.2b-thinking:free`,`LFM 2.5 Thinking`,`C`,`-`,`32k`]]},sambanova:{name:`SambaNova`,url:`https://api.sambanova.ai/v1/chat/completions`,models:[[`MiniMax-M2.7`,`MiniMax M2.7`,`S+`,`56.2%`,`192k`],[`DeepSeek-V3.1`,`DeepSeek V3.1`,`S`,`62.0%`,`128k`],[`DeepSeek-V3.2`,`DeepSeek V3.2`,`S+`,`70.0%`,`32k`],[`Llama-4-Maverick-17B-128E-Instruct`,`Llama 4 Maverick`,`S`,`62.0%`,`128k`],[`gpt-oss-120b`,`GPT OSS 120B`,`S`,`60.0%`,`128k`],[`Meta-Llama-3.3-70B-Instruct`,`Llama 3.3 70B`,`A-`,`39.5%`,`128k`],[`gemma-3-12b-it`,`Gemma 3 12B IT`,`B+`,`46.0%`,`128k`]]},ovhcloud:{name:`OVHcloud AI`,url:`https://oai.endpoints.kepler.ai.cloud.ovh.net/v1/chat/completions`,models:[[`Qwen3.5-397B-A17B`,`Qwen3.5 397B MoE`,`S`,`-`,`262k`],[`Qwen3-Coder-30B-A3B-Instruct`,`Qwen3 Coder 30B MoE`,`A+`,`55.0%`,`256k`],[`gpt-oss-120b`,`GPT OSS 120B`,`S`,`60.0%`,`131k`],[`gpt-oss-20b`,`GPT OSS 20B`,`A`,`42.0%`,`131k`],[`Meta-Llama-3_3-70B-Instruct`,`Llama 3.3 70B`,`A-`,`39.5%`,`131k`],[`Qwen3-32B`,`Qwen3 32B`,`A+`,`50.0%`,`32k`],[`Mistral-Small-3.2-24B-Instruct-2506`,`Mistral Small 3.2`,`B+`,`34.0%`,`128k`],[`Mistral-7B-Instruct-v0.3`,`Mistral 7B Instruct`,`B`,`25.0%`,`127k`],[`Mistral-Nemo-Instruct-2407`,`Mistral Nemo`,`B+`,`30.0%`,`118k`],[`Qwen3.5-9B`,`Qwen3.5 9B`,`B+`,`30.0%`,`262k`]]},codestral:{name:`Codestral`,url:`https://api.mistral.ai/v1/chat/completions`,models:[[`codestral-2508`,`Codestral`,`B+`,`34.0%`,`128k`]]},zai:{name:`ZAI`,url:`https://api.z.ai/api/coding/paas/v4/chat/completions`,models:[[`zai/glm-4.7-flash`,`GLM-4.7-Flash`,`S`,`59.2%`,`200k`],[`zai/glm-4.5-flash`,`GLM-4.5-Flash`,`S`,`59.2%`,`128k`]]},scaleway:{name:`Scaleway`,url:`https://api.scaleway.ai/v1/chat/completions`,models:[[`devstral-2-123b-instruct-2512`,`Devstral 2 123B`,`S+`,`72.2%`,`200k`],[`qwen3.5-397b-a17b`,`Qwen3.5 400B VLM`,`S`,`68.0%`,`250k`],[`mistral/mistral-large-3-675b-instruct-2512`,`Mistral Large 675B`,`A+`,`58.0%`,`250k`],[`qwen3-235b-a22b-instruct-2507`,`Qwen3 235B`,`S+`,`70.0%`,`250k`],[`gpt-oss-120b`,`GPT OSS 120B`,`S`,`60.0%`,`128k`],[`qwen3-coder-30b-a3b-instruct`,`Qwen3 Coder 30B`,`A+`,`55.0%`,`128k`],[`holo2-30b-a3b`,`Holo2 30B`,`A+`,`52.0%`,`22k`],[`llama-3.3-70b-instruct`,`Llama 3.3 70B`,`A-`,`39.5%`,`100k`],[`mistral-small-3.2-24b-instruct-2506`,`Mistral Small 3.2`,`B+`,`30.0%`,`128k`],[`gemma-3-27b-it`,`Gemma 3 27B`,`B`,`22.0%`,`40k`]]},qwen:{name:`Alibaba DashScope`,url:`https://dashscope-intl.aliyuncs.com/compatible-mode/v1/chat/completions`,models:[[`qwen3.7-max`,`Qwen3.7 Max`,`S+`,`80.0%`,`1M`],[`qwen3-max`,`Qwen3 Max`,`S+`,`78.8%`,`256k`],[`qwen3.6-plus`,`Qwen3.6 Plus`,`S+`,`72.0%`,`1M`],[`qwen3-235b-a22b`,`Qwen3 235B`,`S+`,`70.0%`,`256k`],[`qwen3.5-plus`,`Qwen3.5 Plus`,`S`,`68.0%`,`1M`],[`qwen3-coder-plus`,`Qwen3 Coder Plus`,`S`,`69.6%`,`1M`],[`qwen3-coder-next`,`Qwen3 Coder Next`,`S`,`65.0%`,`256k`],[`qwen3.6-flash`,`Qwen3.6 Flash`,`A+`,`60.0%`,`1M`],[`qwen3.5-flash`,`Qwen3.5 Flash`,`A+`,`55.0%`,`1M`],[`qwen3-coder-flash`,`Qwen3 Coder Flash`,`A+`,`55.0%`,`1M`],[`qwen3-32b`,`Qwen3 32B`,`A+`,`50.0%`,`256k`]]},gemini:{name:`Gemini CLI`,url:null,models:[[`gemini-3.5-flash`,`Gemini 3.5 Flash`,`S+`,`-`,`1M`],[`gemini-3.1-pro-preview`,`Gemini 3.1 Pro Preview`,`S+`,`78.0%`,`1M`],[`gemini-3-flash-preview`,`Gemini 3 Flash Preview`,`S`,`65.0%`,`1M`],[`gemini-3.1-flash-lite`,`Gemini 3.1 Flash Lite`,`A+`,`55.0%`,`1M`],[`gemini-2.5-pro`,`Gemini 2.5 Pro`,`S+`,`63.2%`,`1M`],[`gemini-2.5-flash`,`Gemini 2.5 Flash`,`A+`,`50.0%`,`1M`],[`gemini-2.5-flash-lite`,`Gemini 2.5 Flash Lite`,`A`,`42.0%`,`1M`]],cliOnly:!0,installUrl:`https://github.com/google-gemini/gemini-cli`,binary:`gemini`,checkArgs:[`--version`]},"opencode-zen":{name:`OpenCode Zen`,url:`https://opencode.ai/zen/v1/chat/completions`,models:[[`big-pickle`,`Big Pickle`,`S+`,`72.0%`,`200k`],[`deepseek-v4-flash-free`,`DeepSeek V4 Flash Free`,`S+`,`79.0%`,`200k`],[`mimo-v2.5-free`,`MiMo-V2.5 Free`,`S+`,`-`,`200k`],[`nemotron-3-super-free`,`Nemotron 3 Super Free`,`A+`,`52.0%`,`200k`],[`minimax-m3-free`,`MiniMax M3 Free`,`S+`,`59.0%`,`1M`]],zenOnly:!0}},nc=[];for(let[e,t]of Object.entries(tc))if(!(!t||!t.models))for(let[n,r,i,a,o]of t.models)nc.push([n,r,i,a,o,e]);var rc=Object.entries(tc).map(([e,t])=>{let n=t?.name||e;return{id:`filter-provider-${e.replace(/[^a-z0-9]+/gi,`-`)}`,label:n,providerKey:e,description:`${n} models`,keywords:[`filter`,`provider`,`origin`,e,n.toLowerCase()]}}),ic={opencode:`Launch in OpenCode CLI with the selected model.`,"opencode-desktop":`Set model in shared config, then open OpenCode Desktop.`,"opencode-web":`Set model in shared config, then open OpenCode WebUI.`,openclaw:`Set default model in OpenClaw and launch it.`,crush:`Launch Crush with this provider/model pair.`,goose:`Launch Goose and preselect the active model.`,pi:`Launch Pi with model/provider flags.`,aider:`Launch Aider configured on the selected model.`,kilo:`Set model in shared config, then launch Kilo CLI.`,qwen:`Launch Qwen Code using the selected provider model.`,openhands:`Launch OpenHands with the selected model endpoint.`,amp:`Launch Amp with this model as active target.`,hermes:`Launch Hermes Agent with the selected model.`,continue:`Launch Continue CLI with the selected model.`,cline:`Launch Cline CLI with the selected model.`,rovo:`Rovo Dev CLI model (launch with Rovo tool only).`,gemini:`Gemini CLI model (launch with Gemini tool only).`,caveman:`Caveman Code — token-efficient coding agent (launch with Caveman tool only).`,jcode:`Launch jcode coding agent with the selected model.`},ac=_n.map(e=>{let t=gn[e]||{label:e,emoji:`🧰`};return{id:`action-set-tool-${e}`,label:t.label,toolMode:e,icon:t.emoji,description:ic[e]||`Set this as the active launch target.`,keywords:[`tool`,`target`,`mode`,e,t.label.toLowerCase()]}}),oc=[{id:`action-cycle-ping-mode`,label:`Cycle ping mode`,shortcut:`W`,icon:`⚡`,description:`Rotate speed → normal → slow → forced.`,keywords:[`ping`,`mode`,`cycle`,`speed`,`normal`,`slow`,`forced`]},{id:`action-set-ping-speed`,label:`Speed mode (2s)`,pingMode:`speed`,description:`Fast 2s bursts for short live checks.`,keywords:[`ping`,`mode`,`speed`,`2s`,`fast`]},{id:`action-set-ping-normal`,label:`Normal mode (10s)`,pingMode:`normal`,description:`Balanced default cadence for daily use.`,keywords:[`ping`,`mode`,`normal`,`10s`,`default`]},{id:`action-set-ping-slow`,label:`Slow mode (30s)`,pingMode:`slow`,description:`Lower refresh cost when you are mostly idle.`,keywords:[`ping`,`mode`,`slow`,`30s`,`idle`]},{id:`action-set-ping-forced`,label:`Forced mode (4s)`,pingMode:`forced`,description:`Keeps 4s cadence until manually changed.`,keywords:[`ping`,`mode`,`forced`,`4s`,`manual`]}],sc=[{id:`filters`,label:`Filters`,icon:`🔍`,children:[{id:`filter-tier`,label:`Filter by tier`,icon:`📊`,children:[{id:`filter-tier-all`,label:`All tiers`,tier:null,shortcut:`T`,description:`Show all models`,keywords:[`filter`,`tier`,`all`]},{id:`filter-tier-splus`,label:`S+ tier`,tier:`S+`,description:`Best coding models`,keywords:[`filter`,`tier`,`s+`]},{id:`filter-tier-s`,label:`S tier`,tier:`S`,description:`Excellent models`,keywords:[`filter`,`tier`,`s`]},{id:`filter-tier-aplus`,label:`A+ tier`,tier:`A+`,description:`Very good models`,keywords:[`filter`,`tier`,`a+`]},{id:`filter-tier-a`,label:`A tier`,tier:`A`,description:`Good models`,keywords:[`filter`,`tier`,`a`]},{id:`filter-tier-aminus`,label:`A- tier`,tier:`A-`,description:`Solid models`,keywords:[`filter`,`tier`,`a-`]},{id:`filter-tier-bplus`,label:`B+ tier`,tier:`B+`,description:`Fair models`,keywords:[`filter`,`tier`,`b+`]},{id:`filter-tier-b`,label:`B tier`,tier:`B`,description:`Basic models`,keywords:[`filter`,`tier`,`b`]},{id:`filter-tier-c`,label:`C tier`,tier:`C`,description:`Limited models`,keywords:[`filter`,`tier`,`c`]}]},{id:`filter-provider`,label:`Filter by provider`,icon:`🏢`,children:[{id:`filter-provider-cycle`,label:`Cycle provider`,shortcut:`D`,description:`Switch between providers`,keywords:[`filter`,`provider`,`origin`]},{id:`filter-provider-all`,label:`All providers`,providerKey:null,description:`Show all providers`,keywords:[`filter`,`provider`,`all`]},...rc]},{id:`filter-model`,label:`Filter by model`,icon:`🤖`,children:[]},{id:`filter-other`,label:`Other filters`,icon:`⚙️`,children:[{id:`filter-configured-toggle`,label:`Show only configured & working`,shortcut:`E`,description:`Show only configured providers that are responding (not noauth/auth error)`,keywords:[`filter`,`configured`,`keys`,`working`,`active`]}]}]},{id:`sort`,label:`Sort`,icon:`📶`,children:[{id:`sort-rank`,label:`Sort by rank`,shortcut:`R`,description:`Rank by SWE score`,keywords:[`sort`,`rank`]},{id:`sort-tier`,label:`Sort by tier`,description:`Group by quality tier`,keywords:[`sort`,`tier`]},{id:`sort-provider`,label:`Sort by provider`,shortcut:`O`,description:`Group by provider`,keywords:[`sort`,`origin`,`provider`]},{id:`sort-model`,label:`Sort by model`,shortcut:`M`,description:`Alphabetical order`,keywords:[`sort`,`model`,`name`]},{id:`sort-latest-ping`,label:`Sort by latest ping`,shortcut:`L`,description:`Recent response time`,keywords:[`sort`,`latest`,`ping`]},{id:`sort-avg-ping`,label:`Sort by avg ping`,shortcut:`A`,description:`Average response time`,keywords:[`sort`,`avg`,`average`,`ping`]},{id:`sort-swe`,label:`Sort by SWE score`,shortcut:`S`,description:`Coding ability score`,keywords:[`sort`,`swe`,`score`]},{id:`sort-ctx`,label:`Sort by context`,shortcut:`C`,description:`Context window size`,keywords:[`sort`,`context`,`ctx`]},{id:`sort-health`,label:`Sort by health`,shortcut:`H`,description:`Current model status`,keywords:[`sort`,`health`,`condition`]},{id:`sort-verdict`,label:`Sort by verdict`,shortcut:`V`,description:`Overall assessment`,keywords:[`sort`,`verdict`]},{id:`sort-stability`,label:`Sort by stability`,shortcut:`B`,description:`Reliability score`,keywords:[`sort`,`stability`]},{id:`sort-uptime`,label:`Sort by uptime`,shortcut:`U`,description:`Success rate`,keywords:[`sort`,`uptime`]}]},{id:`actions`,label:`Actions`,icon:`⚙️`,children:[{id:`action-target-tool`,label:`Target tool`,icon:`🧰`,children:[{id:`action-cycle-tool-mode`,label:`Cycle target tool`,shortcut:`Z`,icon:`🔄`,description:`Rotate through every launcher mode.`,keywords:[`tool`,`mode`,`cycle`,`target`]},...ac]},{id:`action-ping-mode`,label:`Ping mode`,icon:`📶`,children:oc},{id:`action-favorites-mode`,label:`Favorites mode`,icon:`⭐`,children:[{id:`action-toggle-favorite-mode`,label:`Toggle favorites mode`,shortcut:`Y`,icon:`⭐`,description:`Switch pinned+sticky ↔ normal list behavior.`,keywords:[`favorite`,`favorites`,`mode`,`toggle`,`y`]},{id:`action-favorites-mode-pinned`,label:`Pinned + always visible`,favoritesPinned:!0,description:`Favorites stay on top and bypass current filters.`,keywords:[`favorite`,`favorites`,`pinned`,`sticky`,`always visible`]},{id:`action-favorites-mode-normal`,label:`Normal rows (starred only)`,favoritesPinned:!1,description:`Favorites keep ⭐ but follow active filters and sort.`,keywords:[`favorite`,`favorites`,`normal`,`sort`,`filter`]},{id:`action-toggle-favorite`,label:`Toggle favorite on selected row`,shortcut:`F`,icon:`⭐`,description:`Star/unstar the highlighted model.`,keywords:[`favorite`,`star`,`toggle`]}]},{id:`action-cycle-theme`,label:`Cycle theme`,shortcut:`G`,icon:`🌗`,description:`Switch dark/light/auto`,keywords:[`theme`,`dark`,`light`,`auto`]},{id:`action-reset-view`,label:`Reset view`,shortcut:`N`,icon:`🔄`,description:`Reset filters and sort`,keywords:[`reset`,`view`,`sort`,`filters`]}]},{id:`open-settings`,label:`Settings`,shortcut:`P`,icon:`⚙️`,type:`page`,description:`API keys and preferences`,keywords:[`settings`,`config`,`api key`]},{id:`open-help`,label:`Help`,shortcut:`K`,icon:`❓`,type:`page`,description:`Show all shortcuts`,keywords:[`help`,`shortcuts`,`hotkeys`]},{id:`open-changelog`,label:`Changelog`,icon:`📋`,type:`page`,description:`Version history`,keywords:[`changelog`,`release`]},{id:`open-recommend`,label:`Smart recommend`,shortcut:`Q`,icon:`🎯`,type:`page`,description:`Find best model for task`,keywords:[`recommend`,`best model`]},{id:`open-playground`,label:`Playground`,shortcut:`;`,icon:`💬`,type:`page`,description:`Chat with the FCM router`,keywords:[`playground`,`chat`,`try`,`prompt`,`router`]},{id:`open-install-endpoints`,label:`Install endpoints`,icon:`🔌`,type:`page`,description:`Install provider catalogs`,keywords:[`install`,`endpoints`,`providers`]},{id:`open-installed-models`,label:`Installed models`,icon:`🗂️`,type:`page`,description:`View models configured in tools`,keywords:[`installed`,`models`,`configured`,`tools`,`manager`,`goose`,`crush`,`aider`]}];function cc(e=[]){let t=JSON.parse(JSON.stringify(sc)),n=t.find(e=>e.id===`filters`)?.children.find(e=>e.id===`filter-model`);if(n&&Array.isArray(e)&&e.length>0){let t=e.filter(e=>!e.hidden&&e.status!==`noauth`).slice(0,20);for(let e of t)n.children.push({id:`filter-model-${e.providerKey}-${e.modelId}`,label:e.label,modelId:e.modelId,providerKey:e.providerKey,keywords:[`filter`,`model`,e.label.toLowerCase(),e.modelId.toLowerCase()]})}return t}function lc(e,t=new Set){let n=[];function r(e,i=0){for(let a of e){if(a.type===`page`||a.type===`action`){n.push({...a,type:a.type,depth:0,hasChildren:!1,isExpanded:!1});continue}let e=t.has(a.id),o=Array.isArray(a.children)&&a.children.length>0;o?(n.push({...a,type:i===0?`category`:`subcategory`,depth:i,hasChildren:o,isExpanded:e}),e&&r(a.children,i+1)):n.push({...a,type:`command`,depth:i,hasChildren:!1,isExpanded:!1})}}return r(e),n}function uc(e=[]){let t=cc(e),n=new Set;function r(e){for(let t of e)n.add(t.id),Array.isArray(t.children)&&r(t.children)}return r(t),lc(t,n).map(e=>{let t={...e};return e.tier!==void 0&&(t.tierValue=e.tier),t})}function dc(e,t){let n=(e||``).trim().toLowerCase(),r=(t||``).toLowerCase();if(!n)return{matched:!0,score:0,positions:[]};if(!r)return{matched:!1,score:0,positions:[]};let i=0,a=[];for(let e=0;e<r.length&&i<n.length;e++)n[i]===r[e]&&(a.push(e),i++);if(i!==n.length)return{matched:!1,score:0,positions:[]};let o=n.length*10;for(let e=1;e<a.length;e++)a[e]===a[e-1]+1&&(o+=5);for(let e of a)if(e===0)o+=8;else{let t=r[e-1];(t===` `||t===`:`||t===`-`||t===`/`)&&(o+=6)}return o-=Math.max(0,r.length-n.length),{matched:!0,score:o,positions:a}}function fc(e,t){let n=(t||``).trim();if(!n)return e;let r=[];for(let t of e){let e=dc(n,t.label),i=e.score,a=e.positions,o=e.matched;if(!o&&Array.isArray(t.keywords))for(let e of t.keywords){let t=dc(n,e);if(!t.matched)continue;o=!0;let r=Math.max(1,t.score-7);r>i&&(i=r,a=[])}o&&r.push({...t,score:i,matchPositions:a})}let i=[],a=new Set;for(let e of r)e.type===`command`&&e.matchPositions&&i.find(t=>t.id===e.id)&&a.add(e.parentId);return r.sort((e,t)=>t.score===e.score?e.depth===t.depth?e.label.localeCompare(t.label):e.depth-t.depth:t.score-e.score),r}var pc={backdrop:`_backdrop_162pr_6`,modal:`_modal_162pr_19`,searchRow:`_searchRow_162pr_31`,searchIcon:`_searchIcon_162pr_38`,input:`_input_162pr_39`,kbd:`_kbd_162pr_49`,list:`_list_162pr_62`,item:`_item_162pr_70`,itemActive:`_itemActive_162pr_82`,itemDisabled:`_itemDisabled_162pr_83`,itemIcon:`_itemIcon_162pr_88`,itemLabel:`_itemLabel_162pr_89`,itemEnter:`_itemEnter_162pr_90`,empty:`_empty_162pr_96`,footer:`_footer_162pr_103`},mc={filter:{icon:`🔍`,label:`Filter`},sort:{icon:`📶`,label:`Sort`},action:{icon:`⚙️`,label:`Action`},page:{icon:`📄`,label:`Page`},update:{icon:`⬆️`,label:`Update`},tool:{icon:`🧰`,label:`Tool`}},hc=[`speed`,`normal`,`slow`,`forced`];function gc(e){let{onCycleTheme:t,onResetView:n,onSetPingMode:r,onOpenChangelog:i,theme:a,pingMode:o,modelsCount:s,onExport:c}=e;return[{id:`page.help`,section:`page`,label:`Open Help`,keywords:[`help`,`shortcuts`,`reference`],run:()=>e.onOpenHelp?.()},{id:`page.changelog`,section:`page`,label:`Open Changelog`,keywords:[`changelog`,`release`,`history`,`version`],run:()=>i?.()},{id:`page.playground`,section:`page`,label:`Open Playground`,keywords:[`playground`,`chat`,`try`,`prompt`,`router`],run:()=>e.onOpenPlayground?.()},{id:`page.install-endpoints`,section:`page`,label:`Open Install Endpoints (M4)`,keywords:[`install`,`endpoint`,`tool`,`configure`],disabled:!0},{id:`page.installed-models`,section:`page`,label:`Open Installed Models (M4)`,keywords:[`installed`,`models`,`tools`],disabled:!0},{id:`action.theme.cycle`,section:`action`,label:`Cycle theme (current: ${a})`,keywords:[`theme`,`dark`,`light`,`auto`],run:t},{id:`action.reset.view`,section:`action`,label:`Reset view (filters + sort)`,keywords:[`reset`,`view`,`clear`,`filters`,`sort`],run:n},{id:`action.ping.speed`,section:`action`,label:`Ping mode → Speed (2s)`,keywords:[`ping`,`mode`,`speed`,`fast`,`2s`],run:()=>r?.(`speed`)},{id:`action.ping.normal`,section:`action`,label:`Ping mode → Normal (10s)`,keywords:[`ping`,`mode`,`normal`,`10s`,`default`],run:()=>r?.(`normal`)},{id:`action.ping.slow`,section:`action`,label:`Ping mode → Slow (30s)`,keywords:[`ping`,`mode`,`slow`,`30s`,`idle`],run:()=>r?.(`slow`)},{id:`action.ping.forced`,section:`action`,label:`Ping mode → Forced (4s)`,keywords:[`ping`,`mode`,`forced`,`4s`],run:()=>r?.(`forced`)},{id:`action.export`,section:`action`,label:`Export models…`,keywords:[`export`,`download`,`json`,`csv`,`clipboard`],run:c}]}function _c({onClose:e,onNavigate:t,onCycleTheme:n,onResetView:r,onSetPingMode:i,onOpenHelp:a,onOpenChangelog:o,onOpenCommandPalette:s,onToast:c,onExport:l,currentView:u,theme:d,pingMode:f,models:p,updateAvailable:m,latestVersion:h,onRunUpdate:g}){let[_,y]=(0,v.useState)(``),[b,x]=(0,v.useState)(0),S=(0,v.useRef)(null),C=(0,v.useRef)(null),w=(0,v.useMemo)(()=>{let e=uc(p||[]).map(e=>{let t=`action`;return e.id.startsWith(`filter-`)?t=`filter`:e.id.startsWith(`sort-`)?t=`sort`:e.id.startsWith(`action-`)?t=`action`:e.id.startsWith(`action-set-tool-`)?t=`tool`:(e.id.startsWith(`page-`)||e.id===`open-settings`||e.id===`open-help`||e.id===`open-changelog`)&&(t=`page`),{...e,section:t}}),t=gc({onCycleTheme:n,onResetView:r,onSetPingMode:i,onOpenChangelog:o,onOpenHelp:a,theme:d,pingMode:f,modelsCount:p?.length??0,onExport:l}),s=[];return m&&h&&s.push({id:`action.update.run`,section:`update`,label:`⬆️ UPDATE NOW — v${h} available (recommended!)`,keywords:[`update`,`upgrade`,`version`,`install`,`new`],run:()=>g?.()}),[...s,...e,...t]},[p,d,f,n,r,i,o,a,l,m,h,g]),T=(0,v.useMemo)(()=>_.trim()?fc(w,_):w,[w,_]),E=(0,v.useMemo)(()=>{let e=new Map;for(let t of T)e.has(t.section)||e.set(t.section,[]),e.get(t.section).push(t);return Array.from(e.entries())},[T]),D=(0,v.useMemo)(()=>E.flatMap(([,e])=>e),[E]);(0,v.useEffect)(()=>{S.current?.focus()},[]),(0,v.useEffect)(()=>{b>=D.length&&x(0)},[D,b]),(0,v.useEffect)(()=>{let t=t=>{if(t.key===`Escape`){t.preventDefault(),e();return}if(t.key===`ArrowDown`){t.preventDefault(),x(e=>Math.min(D.length-1,e+1));return}if(t.key===`ArrowUp`){t.preventDefault(),x(e=>Math.max(0,e-1));return}if(t.key===`Enter`){t.preventDefault();let e=D[b];if(!e)return;if(e.disabled){c?.(`${e.label} is not available yet.`,`info`);return}O(e)}};return document.addEventListener(`keydown`,t),()=>document.removeEventListener(`keydown`,t)},[D,b,e,c]);let O=(0,v.useCallback)(s=>{let u=s.id;if(u===`open-settings`){t?.(`settings`),e();return}if(u===`open-help`){a?.(),e();return}if(u===`open-changelog`){o?.(),e();return}if(u===`open-recommend`){c?.(`Recommend arrives in M3`,`info`),e();return}if(u===`open-router-dashboard`){c?.(`Router dashboard arrives in M4`,`info`),e();return}if(u===`open-installed-models`){c?.(`Installed Models arrives in M4`,`info`),e();return}if(u===`open-install-endpoints`){c?.(`Install Endpoints arrives in M4`,`info`),e();return}if(u===`action-update-now`){g?.(),e();return}if(u===`action-cycle-theme`){n?.(),e();return}if(u===`action-reset-view`){r?.(),e();return}if(u===`action-cycle-ping-mode`){let t=hc.indexOf(f);i?.(hc[(t+1)%hc.length]),e();return}if(u===`action-cycle-tool-mode`){c?.(`Tool mode picker arrives in M3`,`info`),e();return}if(u===`action-toggle-favorite`){c?.(`Press F on a model row in the table.`,`info`),e();return}if(u===`action-toggle-favorite-mode`){c?.(`Set the favorites display mode in Settings (M2).`,`info`),e();return}if(u===`action-export`){l?.(),e();return}if(u===`action-benchmark-row`){c?.(`Click any AI Lat. cell to benchmark the highlighted row.`,`info`),e();return}if(u===`filter-provider-cycle`){c?.(`Use the Provider dropdown in the FilterBar.`,`info`),e();return}if(u.startsWith(`filter-tier-`)){c?.(`Tier filter — use the Tier chip row in the FilterBar.`,`info`),e();return}if(u.startsWith(`filter-provider-`)){c?.(`Provider filter — use the Provider dropdown.`,`info`),e();return}if(u===`filter-configured-toggle`){c?.(`Use the Visibility dropdown in the FilterBar.`,`info`),e();return}if(u.startsWith(`sort-`)){c?.(`Sort — click the column header in the table.`,`info`),e();return}if(u===`action-set-ping-speed`){i?.(`speed`),e();return}if(u===`action-set-ping-normal`){i?.(`normal`),e();return}if(u===`action-set-ping-slow`){i?.(`slow`),e();return}if(u===`action-set-ping-forced`){i?.(`forced`),e();return}if(typeof s.run==`function`){s.run(),e();return}c?.(`${s.label} is not wired on the Web yet.`,`info`),e()},[t,e,c,n,r,i,a,o,g,l,f]);return(0,v.useEffect)(()=>{if(!C.current)return;let e=C.current.querySelector(`[data-cmd-index="${b}"]`);e&&e.scrollIntoView({block:`nearest`})},[b]),(0,I.jsx)(`div`,{className:pc.backdrop,onClick:e,children:(0,I.jsxs)(`div`,{className:pc.modal,onClick:e=>e.stopPropagation(),children:[(0,I.jsxs)(`div`,{className:pc.searchRow,children:[(0,I.jsx)(Pr,{size:16,stroke:1.5,className:pc.searchIcon}),(0,I.jsx)(`input`,{ref:S,className:pc.input,placeholder:`Type a command… (filters, sorts, tools, theme, ping, export)`,value:_,onChange:e=>y(e.target.value),autoComplete:`off`}),(0,I.jsxs)(`span`,{className:pc.kbd,children:[(0,I.jsx)(nr,{size:10,stroke:1.5}),`K`]})]}),(0,I.jsxs)(`div`,{className:pc.list,ref:C,role:`listbox`,children:[D.length===0&&(0,I.jsx)(`div`,{className:pc.empty,children:`No matching command.`}),E.map(([e,t])=>{let n=mc[e]||{icon:`•`,label:e};return(0,I.jsxs)(`div`,{className:pc.section,children:[(0,I.jsxs)(`div`,{className:pc.sectionHeader,children:[(0,I.jsx)(`span`,{className:pc.sectionIcon,children:n.icon}),(0,I.jsx)(`span`,{children:n.label})]}),t.map(e=>{let t=D.indexOf(e),n=t===b;return(0,I.jsxs)(`button`,{"data-cmd-index":t,className:`${pc.item} ${n?pc.itemActive:``} ${e.disabled?pc.itemDisabled:``}`,onClick:()=>O(e),onMouseEnter:()=>x(t),role:`option`,"aria-selected":n,"aria-disabled":e.disabled?`true`:void 0,children:[(0,I.jsxs)(`span`,{className:pc.itemLabel,children:[e.label,e.shortcut&&(0,I.jsx)(`span`,{className:pc.shortcut,children:e.shortcut})]}),e.description&&(0,I.jsx)(`span`,{className:pc.itemDesc,children:e.description}),n&&(0,I.jsx)(`span`,{className:pc.itemEnter,children:`↵`})]},e.id)})]},e)})]}),(0,I.jsxs)(`div`,{className:pc.footer,children:[(0,I.jsxs)(`span`,{children:[(0,I.jsx)(`kbd`,{children:`↑↓`}),` navigate`]}),(0,I.jsxs)(`span`,{children:[(0,I.jsx)(`kbd`,{children:`↵`}),` select`]}),(0,I.jsxs)(`span`,{children:[(0,I.jsx)(`kbd`,{children:`Esc`}),` close`]}),(0,I.jsxs)(`span`,{className:pc.footerRight,children:[`Powered by the TUI command registry — 1:1 parity`,(0,I.jsx)(sr,{size:10,stroke:1.5,style:{marginLeft:4}})]})]})]})})}var vc={backdrop:`_backdrop_1y1s7_6`,modal:`_modal_1y1s7_19`,header:`_header_1y1s7_31`,titleRow:`_titleRow_1y1s7_36`,title:`_title_1y1s7_36`,closeBtn:`_closeBtn_1y1s7_50`,searchBar:`_searchBar_1y1s7_63`,searchIcon:`_searchIcon_1y1s7_78`,searchInput:`_searchInput_1y1s7_79`,note:`_note_1y1s7_90`,body:`_body_1y1s7_106`,section:`_section_1y1s7_112`,sectionTitle:`_sectionTitle_1y1s7_113`,itemList:`_itemList_1y1s7_122`,item:`_item_1y1s7_122`,itemKey:`_itemKey_1y1s7_141`,itemDesc:`_itemDesc_1y1s7_147`,empty:`_empty_1y1s7_152`},yc=[{id:`navigation`,title:`🧭 Navigation`,items:[{key:`↑ / ↓`,desc:`Navigate rows in the main table (planned — currently mouse-only)`},{key:`Enter`,desc:`Open the detail panel for the focused row`},{key:`Esc`,desc:`Close any open modal or detail panel`}]},{id:`filters`,title:`🔍 Filters`,items:[{key:`Tier chip`,desc:`Click to cycle: All → S+ → S → A+ → A → A- → B+ → B → C → All`},{key:`Status chip`,desc:`Click to cycle: All → Up → Down → Pending`},{key:`Verdict chip`,desc:`Click to cycle: All → Perfect → Normal → Spiky → Slow → Overloaded → Down → Unstable → Pending`},{key:`Health chip`,desc:`Click to cycle: All → Up → Timeout → Down → Pending → No key → Auth err`},{key:`Visibility`,desc:`Normal (all) / Configured only (hide no-key) / Usable only (UP + good verdict)`},{key:`Provider dropdown`,desc:`Filter by provider`},{key:`Custom text filter`,desc:"Apply via ⌘K palette or `Apply text filter` — clear with the X chip"},{key:`Reset button`,desc:`Clears every active filter + sort back to defaults`}]},{id:`sort`,title:`📶 Sort`,items:[{key:`Click any column header`,desc:`Sort asc → desc → reset (no sort, default order)`},{key:`Resizable columns`,desc:`Drag the right edge of any header to resize. Double-click resets one column.`}]},{id:`favorites`,title:`⭐ Favorites`,items:[{key:`Star button (per row)`,desc:`Click to favorite / unfavorite the model (TUI: F key)`},{key:`Detail panel`,desc:`Favorite + Up/Down reorder + current priority rank (TUI: Shift+↑/↓)`},{key:`Pinned mode`,desc:`In the Settings view, toggle "Pinned + always visible" (TUI: Y key)`},{key:`Shared with TUI`,desc:`Favorites are persisted in the same ~/.free-coding-models.json the TUI uses`}]},{id:`benchmark`,title:`🤖 AI Speed Test (benchmark)`,items:[{key:`Header button`,desc:`Run a global AI Speed Test on every visible model`},{key:`AI Lat. cell`,desc:`Click any AI Lat. cell to benchmark just that model (TUI: Ctrl+A)`},{key:`Detail panel`,desc:`Dedicated "AI Speed Test" button (TUI: Ctrl+A)`},{key:`TPS column`,desc:`Tokens per second for the model — appears after a benchmark run`},{key:`Latency column`,desc:`Real completion latency (not just ping) for the model`}]},{id:`tools`,title:`🧰 Tool mode (M3)`,items:[{key:`M3 shipped`,desc:`Endpoint target picker, per-row Install Endpoint button, and incompatible-target fallback modal`}]},{id:`palette`,title:`⚡ Command palette`,items:[{key:`⌘K / Ctrl+P`,desc:`The Web's only global keyboard shortcut — toggles the command palette`},{key:`Type to search`,desc:`Fuzzy match across all filters, sorts, tools, pages, and theme / ping / reset actions`},{key:`↑ / ↓ + Enter`,desc:`Navigate the results and execute the highlighted command`},{key:`Esc`,desc:`Close the palette without running anything`}]},{id:`theme`,title:`🌗 Theme`,items:[{key:`Theme button (header)`,desc:`Click to cycle: auto → dark → light (TUI: G key)`},{key:`Auto mode`,desc:`Follows the OS prefers-color-scheme preference and updates live`}]},{id:`ping`,title:`⚡ Ping mode`,items:[{key:`Speed / Normal / Slow / Forced`,desc:`Ping cadence (2s / 10s / 30s / 4s) — TUI: W key`},{key:`next ping in Xs`,desc:`Live countdown shown in the FilterBar (TUI footer style)`}]},{id:`url`,title:`🔗 URL deep-linking`,items:[{key:`?tier=S+&sort=verdict&origin=groq&view=dashboard`,desc:`Every filter / sort / view is reflected in the URL — share pre-filtered links`}]},{id:`cli`,title:`⌨️ CLI parity`,items:[{key:`Same storage`,desc:`The Web reads + writes the same ~/.free-coding-models.json as the TUI`},{key:`Same engine`,desc:`All model parsing, ping, and benchmark code is shared with the TUI`}]},{id:`how-router-works`,title:`🌐 How the FCM Router works`,items:[{key:`Smart router`,desc:`Point any OpenAI client at http://localhost:19280/v1 with model: "fcm". The daemon picks the healthiest model in the active set and forwards the request with automatic failover.`},{key:`Pre-prompt`,desc:`A first-class system message is injected on every proxied request. The default introduces the assistant as the FCM routing agent. Edit from Settings.`},{key:`Probes`,desc:`Every 10s/30s/120s (eco/balanced/aggressive) the daemon sends a 1-token chat-completion ping to every model in the active set. The probe measures latency + status code, not just URL reachability — so a wrong API key is caught and the circuit opens.`},{key:`Circuit breaker`,desc:`Per-model state. Healthy (green) = last probe 2xx, route here. Down (red) = last 3 probes failed, skip until cooldown. Recovering (yellow) = cooldown expired, retrying. Auth error (orange) = 401/403, your key is wrong. Deprecated (gray) = removed from catalog, will be replaced by auto-heal.`},{key:`Failover order`,desc:`Models are tried in priority order. A model in Recovering/Down/Auth error is skipped — the request goes to the next healthy one. If ALL fail, you get 503 with the "models_tried" list in the error body.`},{key:`Auto-heal`,desc:`On daemon start, every Auth-error / Deprecated model in the active set is swapped for a working alternative (same provider first, then cross-provider). The first time you add/remove/reorder a model, auto-heal switches off.`},{key:`Rate limits`,desc:`Each provider has its own quota. Common free-tier limits: Groq 14 400 RPD, Mistral 1 RPS, NVIDIA ~40 RPM, OpenRouter 50 RPD. When a provider returns 429, the router fails over. When daily quota is exhausted, the model goes Auth error and auto-heal swaps it out next start.`}]}];function bc({onClose:e}){let[t,n]=(0,v.useState)(``),r=(0,v.useMemo)(()=>{let e=t.trim().toLowerCase();return e?yc.map(t=>({...t,items:t.items.filter(t=>t.key.toLowerCase().includes(e)||t.desc.toLowerCase().includes(e))})).filter(e=>e.items.length>0):yc},[t]);return(0,I.jsx)(`div`,{className:vc.backdrop,onClick:e,children:(0,I.jsxs)(`div`,{className:vc.modal,onClick:e=>e.stopPropagation(),children:[(0,I.jsxs)(`div`,{className:vc.header,children:[(0,I.jsxs)(`div`,{className:vc.titleRow,children:[(0,I.jsx)(`h2`,{className:vc.title,children:`❓ Help & Keyboard Shortcuts`}),(0,I.jsx)(`button`,{className:vc.closeBtn,onClick:e,"aria-label":`Close help`,children:(0,I.jsx)(Gr,{size:18,stroke:1.5})})]}),(0,I.jsxs)(`div`,{className:vc.searchBar,children:[(0,I.jsx)(Pr,{size:14,stroke:1.5,className:vc.searchIcon}),(0,I.jsx)(`input`,{className:vc.searchInput,placeholder:`Search help (filters, hotkeys, TUI parity)…`,value:t,onChange:e=>n(e.target.value),autoFocus:!0})]}),(0,I.jsxs)(`p`,{className:vc.note,children:[`The Web Dashboard is mouse-first. The only global keyboard shortcut is`,` `,(0,I.jsx)(`kbd`,{children:`⌘K`}),` / `,(0,I.jsx)(`kbd`,{children:`Ctrl+P`}),` for the command palette — everything else lives here, in the header menu, or in modals.`]})]}),(0,I.jsx)(`div`,{className:vc.body,children:r.length===0?(0,I.jsxs)(`div`,{className:vc.empty,children:[`No help matches "`,t,`".`]}):r.map(e=>(0,I.jsxs)(`section`,{className:vc.section,children:[(0,I.jsx)(`h3`,{className:vc.sectionTitle,children:e.title}),(0,I.jsx)(`ul`,{className:vc.itemList,children:e.items.map(e=>(0,I.jsxs)(`li`,{className:vc.item,children:[(0,I.jsx)(`span`,{className:vc.itemKey,children:e.key}),(0,I.jsx)(`span`,{className:vc.itemDesc,children:e.desc})]},e.key+e.desc))})]},e.id))})]})})}function xc(){let[e,t]=(0,v.useState)({}),[n,r]=(0,v.useState)(!0),[i,a]=(0,v.useState)(null),o=(0,v.useCallback)(async()=>{try{let e=await fetch(`/api/changelog`);if(!e.ok)throw Error(`HTTP ${e.status}`);t((await e.json())?.versions??{}),a(null)}catch(e){a(e.message||`Failed to load changelog`)}finally{r(!1)}},[]);return(0,v.useEffect)(()=>{o()},[o]),{versions:e,sortedVersions:(0,v.useMemo)(()=>Object.keys(e).sort((e,t)=>{let n=e.split(`.`).map(Number),r=t.split(`.`).map(Number);for(let e=0;e<Math.max(n.length,r.length);e++){let t=n[e]||0,i=r[e]||0;if(i!==t)return i-t}return 0}),[e]),getVersion:(0,v.useCallback)(t=>e[t]??null,[e]),loading:n,error:i,refresh:o}}var Sc={backdrop:`_backdrop_5ik46_6`,modal:`_modal_5ik46_19`,header:`_header_5ik46_31`,titleRow:`_titleRow_5ik46_36`,title:`_title_5ik46_36`,backBtn:`_backBtn_5ik46_51`,closeBtn:`_closeBtn_5ik46_68`,body:`_body_5ik46_82`,indexWrap:`_indexWrap_5ik46_88`,indexHint:`_indexHint_5ik46_89`,versionList:`_versionList_5ik46_95`,versionBtn:`_versionBtn_5ik46_103`,versionLabel:`_versionLabel_5ik46_119`,versionSummary:`_versionSummary_5ik46_125`,details:`_details_5ik46_130`,section:`_section_5ik46_131`,sectionTitle:`_sectionTitle_5ik46_132`,itemList:`_itemList_5ik46_140`,item:`_item_5ik46_140`,empty:`_empty_5ik46_155`},Cc=[{key:`added`,label:`✨ Added`,icon:`✨`},{key:`fixed`,label:`🐛 Fixed`,icon:`🐛`},{key:`changed`,label:`🔄 Changed`,icon:`🔄`},{key:`updated`,label:`📝 Updated`,icon:`📝`}];function wc({onClose:e,defaultVersion:t=null}){let{sortedVersions:n,getVersion:r,loading:i,error:a}=xc(),[o,s]=(0,v.useState)(t?`details`:`index`),[c,l]=(0,v.useState)(t),u=e=>{l(e),s(`details`)},d=()=>{l(null),s(`index`)},f=c?r(c):null;return(0,I.jsx)(`div`,{className:Sc.backdrop,onClick:e,children:(0,I.jsxs)(`div`,{className:Sc.modal,onClick:e=>e.stopPropagation(),children:[(0,I.jsx)(`div`,{className:Sc.header,children:(0,I.jsxs)(`div`,{className:Sc.titleRow,children:[(0,I.jsx)(`h2`,{className:Sc.title,children:o===`index`?`📋 Changelog`:`📋 v${c}`}),o===`details`&&(0,I.jsxs)(`button`,{className:Sc.backBtn,onClick:d,title:`Back to index (TUI: B)`,children:[(0,I.jsx)(Vn,{size:14,stroke:1.5}),` Index`]}),(0,I.jsx)(`button`,{className:Sc.closeBtn,onClick:e,"aria-label":`Close changelog`,children:(0,I.jsx)(Gr,{size:18,stroke:1.5})})]})}),(0,I.jsxs)(`div`,{className:Sc.body,children:[i&&(0,I.jsx)(`div`,{className:Sc.empty,children:`Loading changelog…`}),a&&!i&&(0,I.jsxs)(`div`,{className:Sc.empty,children:[`Failed to load changelog: `,a]}),!i&&!a&&o===`index`&&(0,I.jsxs)(`div`,{className:Sc.indexWrap,children:[(0,I.jsxs)(`p`,{className:Sc.indexHint,children:[n.length,` versions. Click any to read the release notes.`]}),(0,I.jsx)(`ul`,{className:Sc.versionList,children:n.map(e=>{let t=r(e),n=[];return t?.added?.length&&n.push(`${t.added.length} added`),t?.fixed?.length&&n.push(`${t.fixed.length} fixed`),t?.changed?.length&&n.push(`${t.changed.length} changed`),(0,I.jsx)(`li`,{children:(0,I.jsxs)(`button`,{className:Sc.versionBtn,onClick:()=>u(e),children:[(0,I.jsxs)(`span`,{className:Sc.versionLabel,children:[`v`,e]}),(0,I.jsx)(`span`,{className:Sc.versionSummary,children:n.length>0?n.join(` · `):`—`})]})},e)})})]}),!i&&!a&&o===`details`&&f&&(0,I.jsxs)(`div`,{className:Sc.details,children:[Cc.map(({key:e,label:t})=>{let n=f[e];return!n||n.length===0?null:(0,I.jsxs)(`section`,{className:Sc.section,children:[(0,I.jsx)(`h3`,{className:Sc.sectionTitle,children:t}),(0,I.jsx)(`ul`,{className:Sc.itemList,children:n.map((e,t)=>(0,I.jsx)(`li`,{className:Sc.item,children:Tc(e)},t))})]},e)}),Cc.every(({key:e})=>!f[e]?.length)&&(0,I.jsxs)(`div`,{className:Sc.empty,children:[`No release notes for v`,c,`.`]})]}),!i&&!a&&o===`details`&&!f&&(0,I.jsxs)(`div`,{className:Sc.empty,children:[`No notes for v`,c,`.`]})]})]})})}function Tc(e){return e.replace(/\*\*([^*]+)\*\*/g,`$1`).replace(/`([^`]+)`/g,`$1`).trim()}var Ec={wrap:`_wrap_10lrt_6`,chip:`_chip_10lrt_11`,checking:`_checking_10lrt_34`,dot:`_dot_10lrt_42`,pulse:`_pulse_10lrt_1`,popover:`_popover_10lrt_54`,popoverHeader:`_popoverHeader_10lrt_67`,popoverTitle:`_popoverTitle_10lrt_74`,popoverClose:`_popoverClose_10lrt_82`,popoverBody:`_popoverBody_10lrt_95`,popoverActions:`_popoverActions_10lrt_107`,primaryAction:`_primaryAction_10lrt_113`,secondaryAction:`_secondaryAction_10lrt_114`};function Dc({updateAvailable:e,latestVersion:t,onRunUpdate:n,onOpenChangelog:r,checking:i}){let[a,o]=(0,v.useState)(!1),s=(0,v.useRef)(null);return(0,v.useEffect)(()=>{if(!a)return;let e=e=>{s.current&&!s.current.contains(e.target)&&o(!1)},t=e=>{e.key===`Escape`&&o(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[a]),e?(0,I.jsxs)(`div`,{className:Ec.wrap,ref:s,children:[(0,I.jsxs)(`button`,{className:Ec.chip,onClick:()=>o(e=>!e),title:`Update available: v${t}. Click to install.`,"aria-expanded":a,"aria-haspopup":`dialog`,children:[(0,I.jsx)(ar,{size:13,stroke:1.5}),(0,I.jsxs)(`span`,{children:[`v`,t]})]}),a&&(0,I.jsxs)(`div`,{className:Ec.popover,role:`dialog`,"aria-label":`Update available`,children:[(0,I.jsxs)(`div`,{className:Ec.popoverHeader,children:[(0,I.jsxs)(`div`,{className:Ec.popoverTitle,children:[(0,I.jsx)(ar,{size:14,stroke:1.5}),(0,I.jsx)(`span`,{children:`Update available`})]}),(0,I.jsx)(`button`,{className:Ec.popoverClose,onClick:()=>o(!1),"aria-label":`Close`,children:(0,I.jsx)(Gr,{size:14,stroke:1.5})})]}),(0,I.jsxs)(`p`,{className:Ec.popoverBody,children:[`A newer version (`,(0,I.jsxs)(`strong`,{children:[`v`,t]}),`) is available on npm. After updating, restart the dashboard to pick up the changes.`]}),(0,I.jsxs)(`div`,{className:Ec.popoverActions,children:[(0,I.jsxs)(`button`,{className:Ec.primaryAction,onClick:()=>{o(!1),n?.()},children:[(0,I.jsx)(ar,{size:13,stroke:1.5}),(0,I.jsx)(`span`,{children:`Update now`})]}),(0,I.jsxs)(`button`,{className:Ec.secondaryAction,onClick:()=>{o(!1),r?.(t)},children:[(0,I.jsx)(hr,{size:13,stroke:1.5}),(0,I.jsx)(`span`,{children:`What's new`})]})]})]})]}):i?(0,I.jsx)(`span`,{className:Ec.checking,title:`Checking for updates…`,children:(0,I.jsx)(`span`,{className:Ec.dot})}):null}var Oc={quickfix:{label:`Quick Fix`,sweWeight:.2,speedWeight:.5,ctxWeight:.1,stabilityWeight:.2},refactor:{label:`Deep Refactor`,sweWeight:.4,speedWeight:.1,ctxWeight:.3,stabilityWeight:.2},review:{label:`Code Review`,sweWeight:.35,speedWeight:.2,ctxWeight:.25,stabilityWeight:.2},testgen:{label:`Test Generation`,sweWeight:.35,speedWeight:.15,ctxWeight:.2,stabilityWeight:.3}},kc={speed:{label:`Speed`,speedMultiplier:1.5,sweMultiplier:.7},quality:{label:`Quality`,speedMultiplier:.7,sweMultiplier:1.5},balanced:{label:`Balanced`,speedMultiplier:1,sweMultiplier:1}},Ac={small:{label:`Small file (<4K)`,minCtx:0,idealCtx:32},medium:{label:`Medium project (<32K)`,minCtx:32,idealCtx:128},large:{label:`Large codebase (>32K)`,minCtx:128,idealCtx:256}};function jc({onToast:e}={}){let[t,n]=(0,v.useState)(!1),[r,i]=(0,v.useState)(0),[a,o]=(0,v.useState)([]),[s,c]=(0,v.useState)(null),l=(0,v.useRef)(null);return(0,v.useEffect)(()=>()=>{l.current&&clearInterval(l.current)},[]),{recommend:(0,v.useCallback)(async t=>{l.current&&clearInterval(l.current),n(!0),i(0),o([]),c(null);let r=Date.now();l.current=setInterval(()=>{i(Math.min(98,Math.round((Date.now()-r)/1e4*100)))},250);try{await new Promise(e=>setTimeout(e,1e4));let e=await fetch(`/api/recommend`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({answers:t})}),n=await e.json().catch(()=>({}));if(!e.ok)throw Error(n.error||`HTTP ${e.status}`);return o(Array.isArray(n.top3)?n.top3:[]),i(100),{ok:!0,top3:n.top3||[]}}catch(t){return c(t.message),e?.(`Recommend failed: ${t.message}`,`error`),{ok:!1,error:t.message}}finally{l.current&&clearInterval(l.current),l.current=null,n(!1)}},[e]),loading:t,progress:r,results:a,error:s,reset:(0,v.useCallback)(()=>{l.current&&clearInterval(l.current),l.current=null,n(!1),i(0),o([]),c(null)},[])}}var Mc={backdrop:`_backdrop_7j81h_2`,modal:`_modal_7j81h_13`,header:`_header_7j81h_23`,footer:`_footer_7j81h_24`,eyebrow:`_eyebrow_7j81h_27`,summary:`_summary_7j81h_28`,muted:`_muted_7j81h_29`,close:`_close_7j81h_30`,secondary:`_secondary_7j81h_31`,body:`_body_7j81h_35`,steps:`_steps_7j81h_36`,options:`_options_7j81h_38`,option:`_option_7j81h_38`,progress:`_progress_7j81h_43`,percent:`_percent_7j81h_45`,results:`_results_7j81h_46`,resultCard:`_resultCard_7j81h_47`,medal:`_medal_7j81h_48`,resultMain:`_resultMain_7j81h_49`,score:`_score_7j81h_53`,error:`_error_7j81h_54`},Nc=[{key:`taskType`,title:`What are you working on?`,options:Oc},{key:`priority`,title:`What matters most?`,options:kc},{key:`contextBudget`,title:`How big is your context?`,options:Ac}];function Pc({onClose:e,onLaunch:t,onPinAndLaunch:n,toolMode:r,onToast:i}){let[a,o]=(0,v.useState)(0),[s,c]=(0,v.useState)({taskType:null,priority:null,contextBudget:null}),{recommend:l,loading:u,progress:d,results:f,error:p,reset:m}=jc({onToast:i}),h=Nc[a],g=f.length>0,_=(0,v.useMemo)(()=>Nc.map(e=>e.options[s[e.key]]?.label).filter(Boolean).join(` · `),[s]);async function y(e){let t={...s,[h.key]:e};if(c(t),a<Nc.length-1){o(a+1);return}await l(t)}function b(){if(g||u){m(),o(0),c({taskType:null,priority:null,contextBudget:null});return}o(e=>Math.max(0,e-1))}return(0,I.jsx)(`div`,{className:Mc.backdrop,onClick:e,children:(0,I.jsxs)(`div`,{className:Mc.modal,onClick:e=>e.stopPropagation(),children:[(0,I.jsxs)(`header`,{className:Mc.header,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`p`,{className:Mc.eyebrow,children:`Smart Recommend`}),(0,I.jsxs)(`h2`,{children:[(0,I.jsx)(Lr,{size:20}),` Find the best model for this task`]}),_&&(0,I.jsx)(`p`,{className:Mc.summary,children:_})]}),(0,I.jsx)(`button`,{className:Mc.close,onClick:e,"aria-label":`Close`,children:(0,I.jsx)(Gr,{size:18})})]}),!u&&!g&&(0,I.jsxs)(`main`,{className:Mc.body,children:[(0,I.jsxs)(`div`,{className:Mc.steps,children:[`Question `,a+1,` / `,Nc.length]}),(0,I.jsx)(`h3`,{children:h.title}),(0,I.jsx)(`div`,{className:Mc.options,children:Object.entries(h.options).map(([e,t])=>(0,I.jsxs)(`button`,{className:Mc.option,onClick:()=>y(e),children:[(0,I.jsx)(`strong`,{children:t.label}),(0,I.jsx)(`span`,{children:e})]},e))})]}),u&&(0,I.jsxs)(`main`,{className:Mc.body,children:[(0,I.jsx)(`h3`,{children:`Analyzing live catalog…`}),(0,I.jsx)(`p`,{className:Mc.muted,children:`10 seconds · roughly 2 checks/sec · same scoring as the TUI.`}),(0,I.jsx)(`div`,{className:Mc.progress,children:(0,I.jsx)(`span`,{style:{width:`${d}%`}})}),(0,I.jsxs)(`p`,{className:Mc.percent,children:[d,`%`]})]}),g&&(0,I.jsxs)(`main`,{className:Mc.body,children:[(0,I.jsx)(`h3`,{children:`Top 3 recommendations`}),(0,I.jsx)(`div`,{className:Mc.results,children:f.map((e,t)=>(0,I.jsxs)(`article`,{className:Mc.resultCard,children:[(0,I.jsx)(`div`,{className:Mc.medal,children:[`🥇`,`🥈`,`🥉`][t]}),(0,I.jsxs)(`div`,{className:Mc.resultMain,children:[(0,I.jsx)(`strong`,{children:e.result.label}),(0,I.jsxs)(`span`,{children:[e.result.origin,` · `,e.result.tier,` · `,e.result.ctx]}),(0,I.jsx)(`p`,{children:e.reason})]}),(0,I.jsx)(`div`,{className:Mc.score,children:e.score}),(0,I.jsx)(vs,{model:e.result,toolMode:r,onLaunch:()=>n?.(e.result)})]},`${e.result.providerKey}/${e.result.modelId}`))})]}),p&&(0,I.jsx)(`p`,{className:Mc.error,children:p}),(0,I.jsxs)(`footer`,{className:Mc.footer,children:[(0,I.jsxs)(`button`,{className:Mc.secondary,onClick:b,disabled:a===0&&!u&&!g,children:[(0,I.jsx)(Vn,{size:14}),` `,g||u?`Restart`:`Back`]}),(0,I.jsx)(`button`,{className:Mc.secondary,onClick:e,children:`Close`})]})]})})}var Fc={backdrop:`_backdrop_8r8li_2`,modal:`_modal_8r8li_13`,modalWide:`_modalWide_8r8li_14`,header:`_header_8r8li_25`,eyebrow:`_eyebrow_8r8li_40`,close:`_close_8r8li_48`,body:`_body_8r8li_61`,command:`_command_8r8li_62`,note:`_note_8r8li_72`,muted:`_muted_8r8li_73`,docs:`_docs_8r8li_74`,error:`_error_8r8li_75`,footer:`_footer_8r8li_76`,primary:`_primary_8r8li_83`,secondary:`_secondary_8r8li_84`,option:`_option_8r8li_85`,grid:`_grid_8r8li_103`,card:`_card_8r8li_104`,stack:`_stack_8r8li_111`};function Ic({request:e,models:t=[],onClose:n,onSwitchToolLaunch:r,onLaunchSimilar:i}){if(!e?.model)return null;let{model:a,toolMode:o}=e,s=vn(o),c=bn(a.providerKey),l=Sn(a.sweScore,o,t,3).filter(e=>e.modelId!==a.modelId||e.providerKey!==a.providerKey);return(0,I.jsx)(`div`,{className:Fc.backdrop,onClick:n,children:(0,I.jsxs)(`div`,{className:Fc.modalWide,onClick:e=>e.stopPropagation(),children:[(0,I.jsxs)(`div`,{className:Fc.header,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`p`,{className:Fc.eyebrow,children:`Incompatible model`}),(0,I.jsxs)(`h2`,{children:[(0,I.jsx)(zn,{size:18}),` `,a.label,` cannot be installed in `,s.emoji,` `,s.label]})]}),(0,I.jsx)(`button`,{className:Fc.close,onClick:n,"aria-label":`Close`,children:(0,I.jsx)(Gr,{size:18})})]}),(0,I.jsxs)(`div`,{className:Fc.grid,children:[(0,I.jsxs)(`section`,{className:Fc.card,children:[(0,I.jsxs)(`h3`,{children:[(0,I.jsx)(Br,{size:15}),` Switch tool`]}),(0,I.jsx)(`p`,{className:Fc.muted,children:`This provider can be configured in these tools. Pick one and FCM installs the endpoint.`}),(0,I.jsx)(`div`,{className:Fc.stack,children:c.map(e=>{let t=vn(e);return(0,I.jsxs)(`button`,{className:Fc.option,onClick:()=>r?.(e,a),children:[(0,I.jsx)(`span`,{children:t.emoji}),(0,I.jsx)(`strong`,{children:t.label})]},e)})})]}),(0,I.jsxs)(`section`,{className:Fc.card,children:[(0,I.jsxs)(`h3`,{children:[(0,I.jsx)(Or,{size:15}),` Similar models`]}),(0,I.jsxs)(`p`,{className:Fc.muted,children:[`Or keep `,s.label,` and install a compatible model close to the same SWE score.`]}),(0,I.jsxs)(`div`,{className:Fc.stack,children:[l.length===0&&(0,I.jsx)(`p`,{className:Fc.muted,children:`No close compatible alternative found yet.`}),l.map(e=>(0,I.jsxs)(`button`,{className:Fc.option,onClick:()=>i?.(e),children:[(0,I.jsx)(`span`,{children:e.tier}),(0,I.jsx)(`strong`,{children:e.label}),(0,I.jsxs)(`small`,{children:[e.providerKey,` · `,e.sweScore]})]},`${e.providerKey}/${e.modelId}`))]})]})]})]})})}var J={overlay:`_overlay_1ay4p_1`,fadeIn:`_fadeIn_1ay4p_1`,modal:`_modal_1ay4p_12`,header:`_header_1ay4p_24`,title:`_title_1ay4p_32`,closeBtn:`_closeBtn_1ay4p_42`,body:`_body_1ay4p_53`,heroCard:`_heroCard_1ay4p_60`,heroRunning:`_heroRunning_1ay4p_69`,heroStopped:`_heroStopped_1ay4p_74`,heroLeft:`_heroLeft_1ay4p_79`,heroStatus:`_heroStatus_1ay4p_85`,statusDot:`_statusDot_1ay4p_91`,dotGreen:`_dotGreen_1ay4p_98`,dotGray:`_dotGray_1ay4p_103`,heroLabel:`_heroLabel_1ay4p_107`,heroMeta:`_heroMeta_1ay4p_113`,heroActions:`_heroActions_1ay4p_121`,startBtn:`_startBtn_1ay4p_127`,stopBtn:`_stopBtn_1ay4p_143`,refreshBtn:`_refreshBtn_1ay4p_159`,quickSetup:`_quickSetup_1ay4p_174`,sectionTitle:`_sectionTitle_1ay4p_178`,quickRows:`_quickRows_1ay4p_190`,quickRow:`_quickRow_1ay4p_190`,quickLabel:`_quickLabel_1ay4p_206`,quickValue:`_quickValue_1ay4p_214`,copyBtn:`_copyBtn_1ay4p_224`,section:`_section_1ay4p_178`,probeModes:`_probeModes_1ay4p_239`,probeBtn:`_probeBtn_1ay4p_244`,probeActive:`_probeActive_1ay4p_256`,modelList:`_modelList_1ay4p_264`,modelRow:`_modelRow_1ay4p_270`,modelPriority:`_modelPriority_1ay4p_280`,modelName:`_modelName_1ay4p_286`,modelScore:`_modelScore_1ay4p_295`,modelLatency:`_modelLatency_1ay4p_301`,circuitBadge:`_circuitBadge_1ay4p_307`,circuitClosed:`_circuitClosed_1ay4p_318`,circuitOpen:`_circuitOpen_1ay4p_319`,circuitHalfOpen:`_circuitHalfOpen_1ay4p_320`,circuitAuth:`_circuitAuth_1ay4p_321`,circuitUnknown:`_circuitUnknown_1ay4p_322`,logList:`_logList_1ay4p_325`,logRow:`_logRow_1ay4p_331`,logOk:`_logOk_1ay4p_340`,logErr:`_logErr_1ay4p_341`,logModel:`_logModel_1ay4p_342`,logLatency:`_logLatency_1ay4p_343`,logTokens:`_logTokens_1ay4p_344`,logFailover:`_logFailover_1ay4p_345`,setMeta:`_setMeta_1ay4p_361`,setMetaName:`_setMetaName_1ay4p_370`,setActions:`_setActions_1ay4p_376`,smallBtn:`_smallBtn_1ay4p_382`,primaryBtn:`_primaryBtn_1ay4p_399`,setList:`_setList_1ay4p_416`,setEmpty:`_setEmpty_1ay4p_423`,setRow:`_setRow_1ay4p_433`,setRowDragging:`_setRowDragging_1ay4p_452`,setRowDropTarget:`_setRowDropTarget_1ay4p_458`,setRowDropTargetAbove:`_setRowDropTargetAbove_1ay4p_463`,setRowDropTargetBelow:`_setRowDropTargetBelow_1ay4p_467`,setDragHandle:`_setDragHandle_1ay4p_471`,setPriority:`_setPriority_1ay4p_482`,setKey:`_setKey_1ay4p_491`,setTier:`_setTier_1ay4p_501`,setRowBtns:`_setRowBtns_1ay4p_513`,iconBtn:`_iconBtn_1ay4p_518`,removeBtn:`_removeBtn_1ay4p_532`,pickerPanel:`_pickerPanel_1ay4p_535`,pickerHeader:`_pickerHeader_1ay4p_546`,pickerSearch:`_pickerSearch_1ay4p_555`,pickerInput:`_pickerInput_1ay4p_560`,pickerSelect:`_pickerSelect_1ay4p_573`,pickerList:`_pickerList_1ay4p_586`,pickerItem:`_pickerItem_1ay4p_594`,pickerItemAdded:`_pickerItemAdded_1ay4p_607`,pickerProvider:`_pickerProvider_1ay4p_613`,pickerModel:`_pickerModel_1ay4p_618`,pickerBadge:`_pickerBadge_1ay4p_625`,pickerBadgeOk:`_pickerBadgeOk_1ay4p_635`,pickerEmpty:`_pickerEmpty_1ay4p_640`,saveStatus:`_saveStatus_1ay4p_647`,saveStatusOk:`_saveStatusOk_1ay4p_657`,saveStatusErr:`_saveStatusErr_1ay4p_658`,autoHealBanner:`_autoHealBanner_1ay4p_662`,autoHealLeft:`_autoHealLeft_1ay4p_674`,autoHealIcon:`_autoHealIcon_1ay4p_682`,autoHealTitle:`_autoHealTitle_1ay4p_689`,autoHealHint:`_autoHealHint_1ay4p_696`,autoHealActions:`_autoHealActions_1ay4p_706`};function Lc(e){if(!e||e<=0)return`—`;let t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=e%60;return t>0?`${t}h ${n}m`:n>0?`${n}m ${r}s`:`${r}s`}function Rc(e){return typeof e!=`number`||!Number.isFinite(e)?`0`:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e)}var zc={CLOSED:{label:`Healthy`,cls:`circuitClosed`},OPEN:{label:`Down`,cls:`circuitOpen`},HALF_OPEN:{label:`Recovering`,cls:`circuitHalfOpen`},AUTH_ERROR:{label:`Auth error`,cls:`circuitAuth`},STALE:{label:`Deprecated`,cls:`circuitUnknown`},UNSUPPORTED:{label:`Unsupported`,cls:`circuitUnknown`},UNKNOWN:{label:`Unknown`,cls:`circuitUnknown`}};function Bc({state:e}){let t=zc[e]||zc.UNKNOWN;return(0,I.jsx)(`span`,{className:`${J.circuitBadge} ${J[t.cls]}`,children:t.label})}var Vc={kind:`idle`},Hc={kind:`saving`},Uc={kind:`saved`},Wc=e=>({kind:`error`,message:e});function Gc({onClose:e,onToast:t}){let[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(!1),[f,p]=(0,v.useState)(null),[m,h]=(0,v.useState)(!1),[g,_]=(0,v.useState)({activeSet:null,sets:{}}),[y,b]=(0,v.useState)([]),[x,S]=(0,v.useState)(!1),[C,w]=(0,v.useState)(``),[T,E]=(0,v.useState)(``),[D,O]=(0,v.useState)(Vc),ee=(0,v.useRef)(null),te=(0,v.useCallback)(async()=>{try{let e=await(await fetch(`/api/router/status`)).json();if(r(e),e?.ok){let e=await(await fetch(`/api/router/stats`)).json();e.ok&&a(e)}}catch{}},[]),k=(0,v.useCallback)(async()=>{try{let e=await(await fetch(`/api/router/sets`)).json();e&&e.sets&&_(e)}catch{}},[]),ne=(0,v.useCallback)(async()=>{try{let e=await(await fetch(`/api/router/catalog`)).json();Array.isArray(e?.models)&&b(e.models)}catch{}},[]);(0,v.useEffect)(()=>{te(),k(),ne(),fetch(`/api/router/quick-setup`).then(e=>e.json()).then(s).catch(()=>{});let e=setInterval(()=>{te(),k()},5e3);return()=>clearInterval(e)},[te,k,ne]),(0,v.useEffect)(()=>{if(D.kind===`saved`)return ee.current=setTimeout(()=>O(Vc),1500),()=>{ee.current&&clearTimeout(ee.current)}},[D]);let re=async()=>{l(!0);try{let e=await(await fetch(`/api/router/start`,{method:`POST`})).json();e.ok||e.alreadyRunning?(t?.(`Router daemon started.`,`success`),await te(),await k()):t?.(`Failed to start: ${e.error||`unknown`}`,`error`)}catch(e){t?.(`Start failed: ${e.message}`,`error`)}finally{l(!1)}},ie=async()=>{l(!0);try{let e=await(await fetch(`/api/router/stop`,{method:`POST`})).json();e.ok?(t?.(`Router daemon stopped.`,`success`),r({ok:!1,running:!1}),a(null)):t?.(`Failed to stop: ${e.error||`unknown`}`,`error`)}catch(e){t?.(`Stop failed: ${e.message}`,`error`)}finally{l(!1)}},ae=(e,t)=>{navigator.clipboard.writeText(e).then(()=>{p(t),setTimeout(()=>p(null),1500)})},A=async e=>{try{await fetch(`/api/router/probe-mode`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({probeMode:e})}),t?.(`Probe mode set to ${e}.`,`info`),await te()}catch{}},j=g?.activeSet||n?.activeSet||`fast-coding`,oe=g?.sets?.[j]||{models:[]},se=Array.isArray(oe.models)?oe.models:[],ce=async e=>{try{await fetch(`/api/router/sets/${encodeURIComponent(e)}/activate`,{method:`POST`}),t?.(`Active set: ${e}`,`info`),await k(),await te()}catch(e){t?.(`Failed to activate: ${e.message}`,`error`)}},M=async()=>{if(j){O(Hc),t?.(`Probing models with your keys…`,`info`);try{let e=await fetch(`/api/router/sets/${encodeURIComponent(j)}/sync`,{method:`POST`});if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(t.error||`HTTP ${e.status}`)}let n=await e.json(),r=n.selected?.length||0,i=n.probeCount||0;t?.(`Synced ${j}: ${r} working model${r===1?``:`s`} from ${i} probes.`,`success`),await k(),await te(),O(Uc)}catch(e){O(Wc(e.message||String(e))),t?.(`Sync failed: ${e.message}`,`error`)}}},le=(0,v.useCallback)(async e=>{if(j){O(Hc);try{let t=e.map(e=>`${e.provider}/${e.model}`),n=await fetch(`/api/router/sets/${encodeURIComponent(j)}/reorder`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({order:t})});if(!n.ok){let e=await n.json().catch(()=>({}));throw Error(e.error||`HTTP ${n.status}`)}let r=await n.json();r?.sets?.[j]?_(e=>({...e,sets:r.sets})):await k(),O(Uc)}catch(e){O(Wc(e.message||String(e))),t?.(`Reorder failed: ${e.message}`,`error`)}}},[j,k,t]),N=(0,v.useCallback)(async(e,n)=>{if(j){O(Hc);try{let r=await fetch(`/api/router/sets/${encodeURIComponent(j)}/models`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({provider:e,model:n})});if(!r.ok){let e=await r.json().catch(()=>({}));throw Error(e.error||`HTTP ${r.status}`)}let i=await r.json();i?.sets?.[j]?_(e=>({...e,sets:i.sets})):await k(),O(Uc),t?.(`Added ${e}/${n} to ${j}.`,`success`)}catch(e){O(Wc(e.message||String(e))),t?.(`Add failed: ${e.message}`,`error`)}}},[j,k,t]),ue=(0,v.useCallback)(async(e,n)=>{if(j){O(Hc);try{let t=await fetch(`/api/router/sets/${encodeURIComponent(j)}/models`,{method:`DELETE`,headers:{"Content-Type":`application/json`},body:JSON.stringify({provider:e,model:n})});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error||`HTTP ${t.status}`)}let r=await t.json();r?.sets?.[j]?_(e=>({...e,sets:r.sets})):await k(),O(Uc)}catch(e){O(Wc(e.message||String(e))),t?.(`Remove failed: ${e.message}`,`error`)}}},[j,k,t]),[de,fe]=(0,v.useState)(se);(0,v.useEffect)(()=>{fe(se)},[se]);let[pe,me]=(0,v.useState)(null),[he,ge]=(0,v.useState)(null),_e=(0,v.useCallback)(async(e,t)=>{let n=[...de],r=t===`up`?e-1:e+1;if(r<0||r>=n.length)return;let[i]=n.splice(e,1);n.splice(r,0,i),fe(n),await le(n)},[de,le]),ve=(0,v.useCallback)(async e=>{let t=de[e];t&&(fe(de.filter((t,n)=>n!==e)),await ue(t.provider,t.model))},[de,ue]),ye=(e,t)=>{let n=de[t];n&&(me(`${n.provider}/${n.model}`),e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(`text/plain`,`${n.provider}/${n.model}`))},be=(e,t)=>{if(pe==null)return;e.preventDefault(),e.dataTransfer.dropEffect=`move`;let n=de[t];if(!n)return;let r=`${n.provider}/${n.model}`;if(r===pe)return;let i=e.currentTarget.getBoundingClientRect();ge({key:r,side:e.clientY<i.top+i.height/2?`above`:`below`})},xe=e=>{e.currentTarget.contains(e.relatedTarget)},Se=async(e,t)=>{if(e.preventDefault(),pe==null)return;let n=de.findIndex(e=>`${e.provider}/${e.model}`===pe);if(n<0){me(null),ge(null);return}if(!de[t]){me(null),ge(null);return}let r=e.currentTarget.getBoundingClientRect(),i=(e.clientY<r.top+r.height/2?`above`:`below`)==`above`?t:t+1;if(n<i&&--i,i===n){me(null),ge(null);return}let a=[...de],[o]=a.splice(n,1);a.splice(i,0,o),fe(a),me(null),ge(null),await le(a)},Ce=()=>{me(null),ge(null)},we=(0,v.useMemo)(()=>{let e=new Set(y.map(e=>e.provider));return Array.from(e).sort()},[y]),Te=(0,v.useMemo)(()=>{let e=C.trim().toLowerCase();return y.filter(t=>T&&t.provider!==T?!1:e?t.key.toLowerCase().includes(e)||(t.label||``).toLowerCase().includes(e)||t.provider.toLowerCase().includes(e):!0).slice(0,200)},[y,C,T]),Ee=(e,t)=>de.some(n=>n.provider===e&&n.model===t),De=n?.ok,Oe=i?.circuitBreakers||{},ke=i?.requestLog||[],Ae=g?.sets||{},je=Object.keys(Ae).sort();return(0,I.jsx)(`div`,{className:J.overlay,onClick:t=>t.target===t.currentTarget&&e(),children:(0,I.jsxs)(`div`,{className:J.modal,children:[(0,I.jsxs)(`div`,{className:J.header,children:[(0,I.jsxs)(`h2`,{className:J.title,children:[(0,I.jsx)(Nr,{size:20,stroke:1.5}),`Router Dashboard`]}),(0,I.jsx)(`button`,{className:J.closeBtn,onClick:e,"aria-label":`Close`,children:`✕`})]}),(0,I.jsxs)(`div`,{className:J.body,children:[De&&n?.brokenModelCount>0&&!m&&(0,I.jsxs)(`div`,{className:J.autoHealBanner,children:[(0,I.jsxs)(`div`,{className:J.autoHealLeft,children:[(0,I.jsx)(`span`,{className:J.autoHealIcon,children:`⚠`}),(0,I.jsxs)(`div`,{children:[(0,I.jsxs)(`div`,{className:J.autoHealTitle,children:[n.brokenModelCount,` model`,n.brokenModelCount===1?``:`s`,` in the active set are not responding`]}),(0,I.jsxs)(`div`,{className:J.autoHealHint,children:[`Auto-heal ran on startup but the replacement may also be broken. Click `,(0,I.jsx)(`strong`,{children:`Sync best`}),` below to re-probe with your current keys, or click `,(0,I.jsx)(`strong`,{children:`Fix now`}),` to manually replace the broken entries.`]})]})]}),(0,I.jsxs)(`div`,{className:J.autoHealActions,children:[(0,I.jsxs)(`button`,{className:J.smallBtn,onClick:M,children:[(0,I.jsx)(Wr,{size:11}),`Fix now`]}),(0,I.jsx)(`button`,{className:J.iconBtn,onClick:()=>h(!0),"aria-label":`Dismiss`,children:(0,I.jsx)(Gr,{size:12})})]})]}),(0,I.jsxs)(`div`,{className:`${J.heroCard} ${De?J.heroRunning:J.heroStopped}`,children:[(0,I.jsxs)(`div`,{className:J.heroLeft,children:[(0,I.jsxs)(`div`,{className:J.heroStatus,children:[(0,I.jsx)(`span`,{className:`${J.statusDot} ${De?J.dotGreen:J.dotGray}`}),(0,I.jsx)(`span`,{className:J.heroLabel,children:De?`Running`:`Stopped`})]}),De&&(0,I.jsxs)(`div`,{className:J.heroMeta,children:[(0,I.jsxs)(`span`,{children:[`Port `,n.port]}),(0,I.jsx)(`span`,{children:`·`}),(0,I.jsxs)(`span`,{children:[`Uptime `,Lc(n.uptimeSeconds)]}),(0,I.jsx)(`span`,{children:`·`}),(0,I.jsxs)(`span`,{children:[n.requestsRouted,` requests`]})]}),!De&&(0,I.jsx)(`div`,{className:J.heroMeta,children:`Smart failover router — start to route requests to the healthiest model.`})]}),(0,I.jsxs)(`div`,{className:J.heroActions,children:[De?(0,I.jsxs)(`button`,{className:J.stopBtn,onClick:ie,disabled:c,children:[(0,I.jsx)(Dr,{size:14}),c?`Stopping…`:`Stop`]}):(0,I.jsxs)(`button`,{className:J.startBtn,onClick:re,disabled:c,children:[(0,I.jsx)(Er,{size:14}),c?`Starting…`:`Start Router`]}),(0,I.jsx)(`button`,{className:J.refreshBtn,onClick:te,title:`Refresh`,children:(0,I.jsx)(Mr,{size:14})})]})]}),De&&o&&(0,I.jsxs)(`div`,{className:J.quickSetup,children:[(0,I.jsxs)(`h3`,{className:J.sectionTitle,children:[(0,I.jsx)(rr,{size:14}),`Quick Setup`]}),(0,I.jsxs)(`div`,{className:J.quickRows,children:[o.baseUrl&&(0,I.jsxs)(`div`,{className:J.quickRow,children:[(0,I.jsx)(`span`,{className:J.quickLabel,children:`Base URL`}),(0,I.jsx)(`code`,{className:J.quickValue,children:o.baseUrl}),(0,I.jsx)(`button`,{className:J.copyBtn,onClick:()=>ae(o.baseUrl,`url`),children:f===`url`?(0,I.jsx)(Kn,{size:12}):(0,I.jsx)(rr,{size:12})})]}),(0,I.jsxs)(`div`,{className:J.quickRow,children:[(0,I.jsx)(`span`,{className:J.quickLabel,children:`Model`}),(0,I.jsx)(`code`,{className:J.quickValue,children:o.model}),(0,I.jsx)(`button`,{className:J.copyBtn,onClick:()=>ae(o.model,`model`),children:f===`model`?(0,I.jsx)(Kn,{size:12}):(0,I.jsx)(rr,{size:12})})]})]})]}),De&&(0,I.jsxs)(`div`,{className:J.section,children:[(0,I.jsxs)(`h3`,{className:J.sectionTitle,children:[(0,I.jsx)(br,{size:14}),`Active Set (`,de.length,` models)`]}),(0,I.jsxs)(`div`,{className:J.setMeta,children:[(0,I.jsxs)(`div`,{className:J.setActions,children:[(0,I.jsx)(`span`,{className:J.setMetaName,children:j}),je.length>1&&(0,I.jsx)(`select`,{className:J.pickerSelect,value:j,onChange:e=>ce(e.target.value),title:`Switch the active set`,children:je.map(e=>(0,I.jsx)(`option`,{value:e,children:e},e))})]}),(0,I.jsxs)(`div`,{className:J.setActions,children:[(0,I.jsx)(Kc,{status:D}),(0,I.jsxs)(`button`,{className:J.smallBtn,onClick:M,disabled:D.kind===`saving`,title:`Probe your API keys and rebuild the set with only models that actually work`,children:[(0,I.jsx)(Wr,{size:11}),`Sync best`]}),(0,I.jsxs)(`button`,{className:J.primaryBtn,onClick:()=>S(e=>!e),disabled:D.kind===`saving`,children:[x?(0,I.jsx)(Gr,{size:11}):(0,I.jsx)(Ar,{size:11}),x?`Close`:`Add model`]})]})]}),de.length===0?(0,I.jsx)(`div`,{className:J.setEmpty,children:`The active set is empty. Add models with the button above to start routing.`}):(0,I.jsx)(`div`,{className:J.setList,onDragLeave:xe,children:de.map((e,t)=>{let n=`${e.provider}/${e.model}`,r=Oe[n]||{},i=pe===n,a=he?.key===n&&he.side===`above`,o=he?.key===n&&he.side===`below`;return(0,I.jsxs)(`div`,{className:`${J.setRow} ${i?J.setRowDragging:``} ${a?`${J.setRowDropTarget} ${J.setRowDropTargetAbove}`:``} ${o?`${J.setRowDropTarget} ${J.setRowDropTargetBelow}`:``}`,draggable:!0,onDragStart:e=>ye(e,t),onDragOver:e=>be(e,t),onDrop:e=>Se(e,t),onDragEnd:Ce,title:n,children:[(0,I.jsx)(`span`,{className:J.setDragHandle,"aria-hidden":!0,children:(0,I.jsx)(mr,{size:14})}),(0,I.jsxs)(`span`,{className:J.setPriority,children:[`#`,t+1]}),(0,I.jsx)(`span`,{className:J.setKey,children:n}),e.tier&&(0,I.jsx)(`span`,{className:J.setTier,children:e.tier}),(0,I.jsx)(Bc,{state:r.state||e.state}),(0,I.jsxs)(`div`,{className:J.setRowBtns,children:[(0,I.jsx)(`button`,{className:J.iconBtn,onClick:()=>_e(t,`up`),disabled:t===0||D.kind===`saving`,title:`Move up`,"aria-label":`Move ${n} up`,children:(0,I.jsx)(Hn,{size:12})}),(0,I.jsx)(`button`,{className:J.iconBtn,onClick:()=>_e(t,`down`),disabled:t===de.length-1||D.kind===`saving`,title:`Move down`,"aria-label":`Move ${n} down`,children:(0,I.jsx)(Bn,{size:12})}),(0,I.jsx)(`button`,{className:`${J.iconBtn} ${J.removeBtn}`,onClick:()=>ve(t),disabled:D.kind===`saving`,title:`Remove from set`,"aria-label":`Remove ${n}`,children:(0,I.jsx)(Vr,{size:12})})]})]},n)})}),x&&(0,I.jsxs)(`div`,{className:J.pickerPanel,children:[(0,I.jsxs)(`div`,{className:J.pickerHeader,children:[(0,I.jsxs)(`span`,{children:[`Add a model to `,(0,I.jsx)(`code`,{children:j})]}),(0,I.jsxs)(`span`,{style:{color:`var(--text-muted, #888)`},children:[Te.length,` of `,y.length]})]}),(0,I.jsxs)(`div`,{className:J.pickerSearch,children:[(0,I.jsx)(`input`,{className:J.pickerInput,placeholder:`Search by provider, model, or label…`,value:C,onChange:e=>w(e.target.value),autoFocus:!0}),(0,I.jsxs)(`select`,{className:J.pickerSelect,value:T,onChange:e=>E(e.target.value),children:[(0,I.jsx)(`option`,{value:``,children:`All providers`}),we.map(e=>(0,I.jsx)(`option`,{value:e,children:e},e))]})]}),(0,I.jsx)(`div`,{className:J.pickerList,children:Te.length===0?(0,I.jsx)(`div`,{className:J.pickerEmpty,children:`No models match your filter.`}):Te.map(e=>{let t=Ee(e.provider,e.model);return(0,I.jsxs)(`div`,{className:`${J.pickerItem} ${t?J.pickerItemAdded:``}`,onClick:()=>{t||N(e.provider,e.model)},title:t?`Already in set`:`Add ${e.key}`,children:[(0,I.jsx)(`span`,{className:J.pickerProvider,children:e.provider}),(0,I.jsx)(`span`,{className:J.pickerModel,children:e.label||e.model}),e.tier&&(0,I.jsx)(`span`,{className:J.setTier,children:e.tier}),e.hasKey?(0,I.jsx)(`span`,{className:`${J.pickerBadge} ${J.pickerBadgeOk}`,children:`key`}):(0,I.jsx)(`span`,{className:J.pickerBadge,children:`no key`})]},e.key)})})]})]}),De&&(0,I.jsxs)(`div`,{className:J.section,children:[(0,I.jsxs)(`h3`,{className:J.sectionTitle,children:[(0,I.jsx)(Ln,{size:14}),`Probe Mode`]}),(0,I.jsx)(`div`,{className:J.probeModes,children:[`eco`,`balanced`,`aggressive`].map(e=>(0,I.jsx)(`button`,{className:`${J.probeBtn} ${n?.probeMode===e?J.probeActive:``}`,onClick:()=>A(e),children:e},e))})]}),De&&ke.length>0&&(0,I.jsxs)(`div`,{className:J.section,children:[(0,I.jsxs)(`h3`,{className:J.sectionTitle,onClick:()=>d(!u),style:{cursor:`pointer`},children:[(0,I.jsx)(Ln,{size:14}),`Request Log (`,ke.length,`)`,u?(0,I.jsx)(Zn,{size:12}):(0,I.jsx)(Jn,{size:12})]}),u&&(0,I.jsx)(`div`,{className:J.logList,children:ke.map((e,t)=>(0,I.jsxs)(`div`,{className:J.logRow,children:[(0,I.jsx)(`span`,{className:e.error?J.logErr:J.logOk,children:e.status||`—`}),(0,I.jsx)(`span`,{className:J.logModel,children:e.model}),(0,I.jsx)(`span`,{className:J.logLatency,children:e.latency_ms==null?`—`:`${e.latency_ms}ms`}),(0,I.jsx)(`span`,{className:J.logTokens,children:e.tokens>0?Rc(e.tokens)+` tok`:``}),e.failover&&(0,I.jsx)(`span`,{className:J.logFailover,children:`failover`})]},t))})]}),(0,I.jsx)(`div`,{className:J.section,style:{marginBottom:0,marginTop:16},children:(0,I.jsx)(`span`,{className:J.saveStatus,children:i?.tokenStats?`${Rc(i.tokenStats.all_time?.total_tokens||0)} tokens routed lifetime`:``})})]})]})})}function Kc({status:e}){return!e||e.kind===`idle`?null:e.kind===`saving`?(0,I.jsx)(`span`,{className:J.saveStatus,children:`saving…`}):e.kind===`saved`?(0,I.jsx)(`span`,{className:`${J.saveStatus} ${J.saveStatusOk}`,children:`✓ saved`}):e.kind===`error`?(0,I.jsxs)(`span`,{className:`${J.saveStatus} ${J.saveStatusErr}`,title:e.message,children:[`⚠ `,e.message?.slice(0,40)||`error`]}):null}var Y={overlay:`_overlay_1bte7_7`,fadeIn:`_fadeIn_1bte7_1`,modal:`_modal_1bte7_18`,slideUp:`_slideUp_1bte7_1`,header:`_header_1bte7_41`,headerLeft:`_headerLeft_1bte7_50`,headerTitle:`_headerTitle_1bte7_57`,headerSubtitle:`_headerSubtitle_1bte7_65`,headerActions:`_headerActions_1bte7_71`,iconBtn:`_iconBtn_1bte7_77`,modelBar:`_modelBar_1bte7_95`,modelLabel:`_modelLabel_1bte7_106`,modelSelect:`_modelSelect_1bte7_111`,presetChip:`_presetChip_1bte7_129`,prePromptToggle:`_prePromptToggle_1bte7_146`,transcript:`_transcript_1bte7_159`,empty:`_empty_1bte7_169`,emptyTitle:`_emptyTitle_1bte7_181`,emptyHint:`_emptyHint_1bte7_187`,message:`_message_1bte7_193`,msgIn:`_msgIn_1bte7_1`,user:`_user_1bte7_206`,assistant:`_assistant_1bte7_210`,system:`_system_1bte7_214`,messageRole:`_messageRole_1bte7_219`,bubble:`_bubble_1bte7_228`,codeBlock:`_codeBlock_1bte7_259`,meta:`_meta_1bte7_271`,metaChip:`_metaChip_1bte7_280`,provider:`_provider_1bte7_291`,error:`_error_1bte7_296`,cursor:`_cursor_1bte7_301`,blink:`_blink_1bte7_1`,inputBar:`_inputBar_1bte7_316`,textarea:`_textarea_1bte7_326`,sendBtn:`_sendBtn_1bte7_351`,errorBar:`_errorBar_1bte7_376`,stopBar:`_stopBar_1bte7_388`,stopBtn:`_stopBtn_1bte7_400`,daemonStartPanel:`_daemonStartPanel_1bte7_417`,daemonStartTitle:`_daemonStartTitle_1bte7_429`,daemonStartHint:`_daemonStartHint_1bte7_435`,daemonStartBtn:`_daemonStartBtn_1bte7_442`,daemonStartAlt:`_daemonStartAlt_1bte7_474`,spin:`_spin_1bte7_488`,spinAnim:`_spinAnim_1bte7_1`},qc=[`Write a Python fizzbuzz with type hints`,`Explain Big O notation with three examples`,`Refactor a deeply nested for-loop into map/filter`,`Write a tiny Express endpoint that returns JSON`];function Jc(e){return!e||typeof e!=`object`?typeof e==`string`?e:null:typeof e.error==`string`?e.error:e.error&&typeof e.error==`object`&&typeof e.error.message==`string`?e.error.message:typeof e.message==`string`?e.message:null}function Yc(e){return e?e.split(/(```[\s\S]*?```)/g).map((e,t)=>{let n=e.match(/^```([a-zA-Z0-9_-]+)?\n?([\s\S]*?)```$/);return n?(0,I.jsx)(`pre`,{className:Y.codeBlock,children:(0,I.jsx)(`code`,{children:n[2].replace(/\n$/,``)})},t):(0,I.jsx)(`span`,{children:e},t)}):null}function Xc({icon:e,label:t,tone:n}){return(0,I.jsxs)(`span`,{className:`${Y.metaChip} ${n?Y[n]:``}`,children:[e,t]})}function Zc({routerStatus:e,daemonRunning:t}){return t===!0?(0,I.jsxs)(`span`,{className:Y.metaChip,children:[(0,I.jsx)(Wn,{size:11}),`Router online`]}):t===!1?(0,I.jsxs)(`span`,{className:`${Y.metaChip} ${Y.error}`,children:[(0,I.jsx)(zn,{size:11}),`Router offline`]}):(0,I.jsxs)(`span`,{className:Y.metaChip,children:[(0,I.jsx)(xr,{size:11,className:Y.spin}),`Checking router…`]})}function Qc({onClose:e,onToast:t,models:n,routerStatus:r}){let[i,a]=(0,v.useState)([]),[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(null),[u,d]=(0,v.useState)(!0),[f,p]=(0,v.useState)(!0),[m,h]=(0,v.useState)(``),[g,_]=(0,v.useState)(!1),[y,b]=(0,v.useState)(null),[x,S]=(0,v.useState)(null),C=(0,v.useRef)(null),w=(0,v.useRef)(null),[T,E]=(0,v.useState)(r?.running===!0?!0:null),[D,O]=(0,v.useState)(!1),[ee,te]=(0,v.useState)(5),k=(0,v.useRef)(null),ne=(0,v.useRef)(null),re=(0,v.useRef)(!1);(0,v.useEffect)(()=>{fetch(`/api/router/preprompt`).then(e=>e.json()).then(e=>{e&&typeof e==`object`&&(p(e.enabled===!0),typeof e.text==`string`&&h(e.text))}).catch(()=>{})},[]),(0,v.useEffect)(()=>{if(c!==null)return;let e=(Array.isArray(n)?n:[]).filter(e=>e.status===`up`&&e.hasApiKey&&!e.isPinging);if(e.length>0){let t={"S+":0,S:1,"A+":2,A:3,"A-":4,"B+":5,B:6,C:7};e.sort((e,n)=>{let r=t[e.tier]??99,i=t[n.tier]??99;return r===i?(typeof e.avg==`number`?e.avg:99999)-(typeof n.avg==`number`?n.avg:99999):r-i});let n=e[0];l(`${n.providerKey}/${n.modelId}`);return}if(r?.running||T===!0){l(`fcm`);return}l(`fcm`)},[n,c,r,T]),(0,v.useEffect)(()=>{let e=!0;async function t(){try{let t=await(await fetch(`/api/router/status`)).json();if(!e)return;if(t?.running){E(!0);return}E(!1)}catch{e&&E(!1)}}return t(),()=>{e=!1,k.current&&clearInterval(k.current),ne.current&&clearInterval(ne.current)}},[]),(0,v.useEffect)(()=>{if(T!==!1||c!==`fcm`||re.current)return;let e=5;return te(5),k.current=setInterval(()=>{--e,te(e),e<=0&&(clearInterval(k.current),re.current=!0,ie())},1e3),()=>{k.current&&clearInterval(k.current)}},[T,c]);let ie=(0,v.useCallback)(async()=>{if(!D){k.current&&=(clearInterval(k.current),null),re.current=!0,O(!0);try{await fetch(`/api/router/start`,{method:`POST`});let e=0;await new Promise(t=>{ne.current=setInterval(async()=>{e+=1;try{(await(await fetch(`/api/router/status`)).json())?.running&&(clearInterval(ne.current),E(!0),O(!1),t())}catch{}e>=30&&(clearInterval(ne.current),O(!1),t())},1e3)})}catch{O(!1)}}},[D]);(0,v.useEffect)(()=>{let e=w.current;e&&(e.scrollTop=e.scrollHeight)},[i,g]);let ae=(0,v.useMemo)(()=>{let e=[{value:`fcm`,label:`fcm — auto router (recommended)`}];if(Array.isArray(n))for(let t of n.slice(0,200)){let n=t.modelId||t.id;if(!n)continue;let r=t.label||n;e.push({value:`${t.providerKey}/${n}`,label:`${t.providerKey}/${n} (${r})`})}return e},[n]),A=(0,v.useCallback)(()=>{C.current&&=(C.current.abort(),null),_(!1)},[]),j=(0,v.useCallback)(async()=>{let e=o.trim();if(!e||g)return;if(c===`fcm`&&T!==!0){b("Router daemon is not running. Start it first using the button above or run `free-coding-models --daemon-bg`.");return}b(null),s(``);let t={role:`user`,content:e,ts:Date.now()},n=[...i,t];a(n),_(!0);let r=`assistant-${Date.now()}`;a(e=>[...e,{id:r,role:`assistant`,content:``,ts:Date.now()}]);let l=new AbortController;C.current=l;let d={model:c||`fcm`,messages:n.map(({role:e,content:t})=>({role:e,content:t})),stream:u,temperature:.7};try{let e=await fetch(`/api/playground/chat`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(d),signal:l.signal});if(!e.ok){let t=Jc(await e.json().catch(()=>null))||`Request failed with status ${e.status}`;b(t),a(e=>e.map(e=>e.id===r?{...e,content:e.content,error:t,aborted:!0}:e)),_(!1);return}if(u){let t=e.body?.getReader();if(!t)throw Error(`No stream reader available`);let n=new TextDecoder,i=``,o={provider:null,model:null,latencyMs:null,tokens:0,fallbackAttempts:0};for(;;){let{value:e,done:s}=await t.read();if(s)break;i+=n.decode(e,{stream:!0});let c=i.split(/\n\n/);i=c.pop()||``;for(let e of c){let t=e.split(/\n/);for(let e of t){if(!e.startsWith(`data:`))continue;let t=e.slice(5).trim();if(t!==`[DONE]`)try{let e=JSON.parse(t),n=e?.choices?.[0]?.delta?.content;n&&a(e=>e.map(e=>e.id===r?{...e,content:(e.content||``)+n}:e)),e?.x_routed_via&&(o.provider=e.x_routed_via),e?.x_routed_model&&(o.model=e.x_routed_model),e?.x_latency_ms&&(o.latencyMs=e.x_latency_ms),e?.x_fallback_attempts&&(o.fallbackAttempts=e.x_fallback_attempts),e?.usage?.total_tokens&&(o.tokens=e.usage.total_tokens)}catch{}}}}a(e=>e.map(e=>e.id===r?{...e,meta:o}:e))}else{let t=await e.json(),n=t?.choices?.[0]?.message?.content||``,i=t?.usage||{},o={provider:t?.x_routed_via||null,model:t?.x_routed_model||null,latencyMs:t?.x_latency_ms||null,tokens:i?.total_tokens||0,fallbackAttempts:t?.x_fallback_attempts||0};a(e=>e.map(e=>e.id===r?{...e,content:n,meta:o}:e))}}catch(e){e.name===`AbortError`?a(e=>e.map(e=>e.id===r?{...e,aborted:!0}:e)):(b(e.message||String(e)),a(t=>t.map(t=>t.id===r?{...t,error:e.message||String(e),aborted:!0}:t)))}finally{_(!1),C.current=null}},[o,g,i,c,u,T]),oe=(0,v.useCallback)(e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),j())},[j]),se=(0,v.useCallback)(()=>{g&&A(),a([]),b(null)},[g,A]),ce=(0,v.useCallback)(async(e,n)=>{try{await navigator.clipboard.writeText(n||``),S(e),setTimeout(()=>S(null),1500)}catch{t?.(`Copy failed`,`error`)}},[t]),M=(0,v.useMemo)(()=>i.reduce((e,t)=>e+(t.meta?.tokens||0),0),[i]);return(0,I.jsx)(`div`,{className:Y.overlay,onClick:t=>{t.target===t.currentTarget&&e()},children:(0,I.jsxs)(`div`,{className:Y.modal,role:`dialog`,"aria-label":`Free Coding Models Playground`,children:[(0,I.jsxs)(`div`,{className:Y.header,children:[(0,I.jsxs)(`div`,{className:Y.headerLeft,children:[(0,I.jsxs)(`div`,{className:Y.headerTitle,children:[(0,I.jsx)(wr,{size:18}),`Playground`]}),(0,I.jsxs)(`div`,{className:Y.headerSubtitle,children:[`Chat with the FCM router · `,i.length,` message`,i.length===1?``:`s`,` · `,M,` tokens`]})]}),(0,I.jsxs)(`div`,{className:Y.headerActions,children:[(0,I.jsx)(`button`,{className:Y.iconBtn,onClick:se,title:`Clear conversation`,disabled:i.length===0&&!g,children:(0,I.jsx)(Vr,{size:16})}),(0,I.jsx)(`button`,{className:Y.iconBtn,onClick:e,title:`Close (Esc)`,children:(0,I.jsx)(Gr,{size:16})})]})]}),(0,I.jsxs)(`div`,{className:Y.modelBar,children:[(0,I.jsx)(`span`,{className:Y.modelLabel,children:`Model:`}),(0,I.jsx)(`select`,{className:Y.modelSelect,value:c,onChange:e=>l(e.target.value),disabled:g,children:ae.map(e=>(0,I.jsx)(`option`,{value:e.value,children:e.label},e.value))}),(0,I.jsx)(`button`,{className:Y.presetChip,onClick:()=>d(e=>!e),title:`Toggle streaming`,children:u?`⚡ Streaming`:`🐢 One-shot`}),(0,I.jsxs)(`label`,{className:Y.prePromptToggle,title:`Router persona injected as the first system message`,children:[(0,I.jsx)(`input`,{type:`checkbox`,checked:f,onChange:e=>p(e.target.checked)}),`Pre-prompt`]}),(0,I.jsx)(Zc,{routerStatus:r,daemonRunning:T})]}),f&&m&&(0,I.jsxs)(`div`,{className:Y.modelBar,style:{borderTop:`none`,background:`transparent`,paddingTop:4,paddingBottom:8,fontSize:11},children:[(0,I.jsx)(`span`,{className:Y.modelLabel,style:{flexShrink:0},children:`Persona:`}),(0,I.jsx)(`span`,{style:{opacity:.7,fontStyle:`italic`},children:m.length>160?`${m.slice(0,160)}…`:m})]}),(0,I.jsx)(`div`,{className:Y.transcript,ref:w,children:T===!1&&!D&&i.length===0&&c===`fcm`?(0,I.jsxs)(`div`,{className:Y.daemonStartPanel,children:[(0,I.jsx)(zn,{size:32,style:{color:`#fbbf24`,opacity:.8}}),(0,I.jsx)(`div`,{className:Y.daemonStartTitle,children:`Router daemon is not running`}),(0,I.jsx)(`div`,{className:Y.daemonStartHint,children:`The playground routes your chats through the FCM router daemon. Start it to begin chatting with free coding models, or pick a specific model above.`}),(0,I.jsx)(`button`,{className:Y.daemonStartBtn,onClick:ie,title:`Start the router daemon`,children:D?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(xr,{size:14,className:Y.spin}),` Starting…`]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Er,{size:14}),` Start Router`,ee>0&&!re.current?` (auto in ${ee}s)`:``]})}),(0,I.jsxs)(`div`,{className:Y.daemonStartAlt,children:[`Or run `,(0,I.jsx)(`code`,{children:`free-coding-models --daemon-bg`}),` in your terminal`]})]}):D&&i.length===0&&c===`fcm`?(0,I.jsxs)(`div`,{className:Y.daemonStartPanel,children:[(0,I.jsx)(xr,{size:32,className:Y.spin,style:{color:`var(--accent, #22c55e)`}}),(0,I.jsx)(`div`,{className:Y.daemonStartTitle,children:`Starting router daemon…`}),(0,I.jsx)(`div`,{className:Y.daemonStartHint,children:`The daemon is being launched. This usually takes a few seconds. You'll be able to chat as soon as it's ready.`})]}):i.length===0?(0,I.jsxs)(`div`,{className:Y.empty,children:[(0,I.jsx)(wr,{size:42,style:{opacity:.5}}),(0,I.jsx)(`div`,{className:Y.emptyTitle,children:`Try the FCM router in 10 seconds`}),(0,I.jsxs)(`div`,{className:Y.emptyHint,children:[`Each request is auto-routed to the healthiest free coding model in your active set. The pre-prompt is injected server-side, so even plain `,(0,I.jsx)(`code`,{children:`curl`}),` callers get the same persona.`]}),(0,I.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:6,justifyContent:`center`,marginTop:8},children:qc.map(e=>(0,I.jsx)(`button`,{className:Y.presetChip,onClick:()=>s(e),children:e},e))})]}):i.map((e,t)=>(0,I.jsxs)(`div`,{className:`${Y.message} ${Y[e.role]||``}`,children:[(0,I.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,justifyContent:e.role===`user`?`flex-end`:`flex-start`},children:[(0,I.jsx)(`div`,{className:Y.messageRole,children:e.role}),e.role===`assistant`&&e.content&&(0,I.jsx)(`button`,{className:Y.iconBtn,style:{padding:2,border:`none`},onClick:()=>ce(t,e.content),title:`Copy reply`,children:x===t?(0,I.jsx)(Kn,{size:11}):(0,I.jsx)(rr,{size:11})})]}),(0,I.jsx)(`div`,{className:Y.bubble,children:e.role===`assistant`?(0,I.jsxs)(I.Fragment,{children:[Yc(e.content),g&&t===i.length-1&&!e.aborted&&(0,I.jsx)(`span`,{className:Y.cursor})]}):e.content}),e.role===`assistant`&&e.meta&&(e.meta.provider||e.meta.model)&&(0,I.jsxs)(`div`,{className:Y.meta,children:[e.meta.provider&&(0,I.jsx)(Xc,{icon:(0,I.jsx)(Wn,{size:11}),label:`routed via ${e.meta.provider}/${e.meta.model||`?`}`,tone:`provider`}),e.meta.latencyMs!=null&&(0,I.jsx)(Xc,{label:`${e.meta.latencyMs} ms`}),e.meta.tokens>0&&(0,I.jsx)(Xc,{label:`${e.meta.tokens} tok`}),e.meta.fallbackAttempts>0&&(0,I.jsx)(Xc,{icon:(0,I.jsx)(Mr,{size:11}),label:`${e.meta.fallbackAttempts} fallback${e.meta.fallbackAttempts>1?`s`:``}`})]}),e.role===`assistant`&&e.error&&(0,I.jsx)(`div`,{className:Y.meta,children:(0,I.jsx)(Xc,{icon:(0,I.jsx)(zn,{size:11}),label:e.error,tone:`error`})}),e.role===`assistant`&&e.aborted&&!e.error&&(0,I.jsx)(`div`,{className:Y.meta,children:(0,I.jsx)(Xc,{label:`stopped`})})]},e.id||t))}),y&&(0,I.jsxs)(`div`,{className:Y.errorBar,children:[(0,I.jsx)(zn,{size:14}),y]}),g&&(0,I.jsxs)(`div`,{className:Y.stopBar,children:[(0,I.jsx)(`span`,{children:`Streaming response…`}),(0,I.jsx)(`button`,{className:Y.stopBtn,onClick:A,children:`Stop`})]}),(0,I.jsxs)(`div`,{className:Y.inputBar,children:[(0,I.jsx)(`textarea`,{className:Y.textarea,placeholder:`Ask the FCM router anything. Enter to send, Shift+Enter for newline.`,value:o,onChange:e=>s(e.target.value),onKeyDown:oe,disabled:g||c===`fcm`&&T!==!0,rows:1,"data-testid":`playground-input`}),(0,I.jsxs)(`button`,{className:Y.sendBtn,onClick:j,disabled:g||!o.trim()||c===`fcm`&&T!==!0,"data-testid":`playground-send`,children:[(0,I.jsx)(Fr,{size:14}),`Send`]})]})]})})}function $c(){let[e,t]=(0,v.useState)([]),[n,r]=(0,v.useState)(!0),i=(0,v.useCallback)(async()=>{r(!0);try{t((await(await fetch(`/api/installed-models`)).json()).results||[])}catch{t([])}finally{r(!1)}},[]);return(0,v.useEffect)(()=>{i()},[i]),{results:e,loading:n,refresh:i,disableModel:(0,v.useCallback)(async(e,t)=>{let n=await(await fetch(`/api/installed-models/${encodeURIComponent(e)}/${encodeURIComponent(t)}/disable`,{method:`POST`})).json();return n.success&&await i(),n},[i])}}var el={overlay:`_overlay_1ocey_1`,fadeIn:`_fadeIn_1ocey_1`,modal:`_modal_1ocey_12`,header:`_header_1ocey_24`,title:`_title_1ocey_32`,count:`_count_1ocey_42`,headerActions:`_headerActions_1ocey_51`,refreshBtn:`_refreshBtn_1ocey_57`,closeBtn:`_closeBtn_1ocey_71`,body:`_body_1ocey_82`,empty:`_empty_1ocey_88`,hint:`_hint_1ocey_96`,toolGroup:`_toolGroup_1ocey_102`,toolHeader:`_toolHeader_1ocey_106`,toolEmoji:`_toolEmoji_1ocey_113`,toolLabel:`_toolLabel_1ocey_117`,toolCount:`_toolCount_1ocey_123`,toolMissing:`_toolMissing_1ocey_128`,modelList:`_modelList_1ocey_139`,modelRow:`_modelRow_1ocey_146`,modelIcon:`_modelIcon_1ocey_157`,modelName:`_modelName_1ocey_161`,modelTier:`_modelTier_1ocey_166`,modelId:`_modelId_1ocey_175`,disableBtn:`_disableBtn_1ocey_185`};function tl({onClose:e,onToast:t}){let{results:n,loading:r,refresh:i,disableModel:a}=$c(),o=async(e,n)=>{try{let r=await a(e,n);r.success?t?.(`Disabled ${n} in ${e}.`,`success`):t?.(`Failed: ${r.error||`unknown error`}`,`error`)}catch(e){t?.(`Error: ${e.message}`,`error`)}},s=n.reduce((e,t)=>e+t.models.length,0);return(0,I.jsx)(`div`,{className:el.overlay,onClick:t=>t.target===t.currentTarget&&e(),children:(0,I.jsxs)(`div`,{className:el.modal,children:[(0,I.jsxs)(`div`,{className:el.header,children:[(0,I.jsxs)(`h2`,{className:el.title,children:[(0,I.jsx)(pr,{size:20,stroke:1.5}),`Installed Models`,!r&&(0,I.jsx)(`span`,{className:el.count,children:s})]}),(0,I.jsxs)(`div`,{className:el.headerActions,children:[(0,I.jsx)(`button`,{className:el.refreshBtn,onClick:i,title:`Refresh`,children:(0,I.jsx)(Mr,{size:14})}),(0,I.jsx)(`button`,{className:el.closeBtn,onClick:e,"aria-label":`Close`,children:`✕`})]})]}),(0,I.jsxs)(`div`,{className:el.body,children:[r&&(0,I.jsx)(`div`,{className:el.empty,children:`Scanning tool configs…`}),!r&&s===0&&(0,I.jsxs)(`div`,{className:el.empty,children:[`No models found in tool configs.`,(0,I.jsx)(`br`,{}),(0,I.jsx)(`span`,{className:el.hint,children:`Use "Install Endpoints" to configure models for your tools.`})]}),!r&&n.map(e=>(0,I.jsxs)(`div`,{className:el.toolGroup,children:[(0,I.jsxs)(`div`,{className:el.toolHeader,children:[(0,I.jsx)(`span`,{className:el.toolEmoji,children:e.toolEmoji}),(0,I.jsx)(`span`,{className:el.toolLabel,children:e.toolLabel}),(0,I.jsxs)(`span`,{className:el.toolCount,children:[e.models.length,` model`,e.models.length===1?``:`s`]}),!e.isValid&&(0,I.jsx)(`span`,{className:el.toolMissing,children:`Not installed`})]}),e.models.length>0&&(0,I.jsx)(`div`,{className:el.modelList,children:e.models.map(t=>(0,I.jsxs)(`div`,{className:el.modelRow,children:[(0,I.jsx)(`span`,{className:el.modelIcon,children:t.isExternal?`🔗`:`✅`}),(0,I.jsx)(`span`,{className:el.modelName,children:t.label}),t.tier&&t.tier!==`-`&&(0,I.jsx)(`span`,{className:el.modelTier,children:t.tier}),(0,I.jsx)(`span`,{className:el.modelId,title:t.modelId,children:t.modelId}),(0,I.jsx)(`button`,{className:el.disableBtn,onClick:()=>o(e.toolMode,t.modelId),title:`Remove model from config (backup saved)`,children:(0,I.jsx)(Vr,{size:12})})]},`${e.toolMode}-${t.modelId}`))})]},e.toolMode))]})]})})}var X={overlay:`_overlay_bbtxk_1`,fadeIn:`_fadeIn_bbtxk_1`,modal:`_modal_bbtxk_12`,header:`_header_bbtxk_24`,title:`_title_bbtxk_32`,closeBtn:`_closeBtn_bbtxk_42`,steps:`_steps_bbtxk_54`,step:`_step_bbtxk_54`,stepActive:`_stepActive_bbtxk_71`,stepDone:`_stepDone_bbtxk_76`,stepNum:`_stepNum_bbtxk_80`,stepLabel:`_stepLabel_bbtxk_105`,body:`_body_bbtxk_111`,stepContent:`_stepContent_bbtxk_118`,stepDesc:`_stepDesc_bbtxk_120`,loading:`_loading_bbtxk_126`,empty:`_empty_bbtxk_126`,grid:`_grid_bbtxk_134`,pickCard:`_pickCard_bbtxk_140`,pickActive:`_pickActive_bbtxk_156`,pickEmoji:`_pickEmoji_bbtxk_162`,pickLabel:`_pickLabel_bbtxk_166`,pickMeta:`_pickMeta_bbtxk_171`,scopeToggle:`_scopeToggle_bbtxk_177`,scopeBtn:`_scopeBtn_bbtxk_183`,scopeActive:`_scopeActive_bbtxk_194`,modelGrid:`_modelGrid_bbtxk_202`,modelCard:`_modelCard_bbtxk_210`,modelSelected:`_modelSelected_bbtxk_224`,modelName:`_modelName_bbtxk_230`,modelTier:`_modelTier_bbtxk_236`,allNotice:`_allNotice_bbtxk_247`,installingState:`_installingState_bbtxk_255`,installingLabel:`_installingLabel_bbtxk_265`,installingSub:`_installingSub_bbtxk_271`,spinner:`_spinner_bbtxk_276`,spin:`_spin_bbtxk_276`,doneState:`_doneState_bbtxk_280`,doneFadeIn:`_doneFadeIn_bbtxk_1`,doneTitle:`_doneTitle_bbtxk_290`,doneSub:`_doneSub_bbtxk_296`,checkCircle:`_checkCircle_bbtxk_308`,checkPop:`_checkPop_bbtxk_1`,errorDot:`_errorDot_bbtxk_320`,installPath:`_installPath_bbtxk_334`,footer:`_footer_bbtxk_363`,backBtn:`_backBtn_bbtxk_370`,nextBtn:`_nextBtn_bbtxk_384`,doneBtn:`_doneBtn_bbtxk_401`,donePop:`_donePop_bbtxk_1`},nl=[`Provider`,`Tool`,`Models`,`Install`];function rl({onClose:e,onToast:t}){let[n,r]=(0,v.useState)(0),[i,a]=(0,v.useState)([]),[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)([]),[u,d]=(0,v.useState)(null),[f,p]=(0,v.useState)([]),[m,h]=(0,v.useState)(`all`),[g,_]=(0,v.useState)(!1),[y,b]=(0,v.useState)(null),[x,S]=(0,v.useState)(!0),C=[{id:`opencode`,label:`OpenCode CLI`,emoji:`💻`},{id:`opencode-desktop`,label:`OpenCode Desktop`,emoji:`🖥️`},{id:`openclaw`,label:`OpenClaw`,emoji:`🦞`},{id:`crush`,label:`Crush`,emoji:`💘`},{id:`goose`,label:`Goose`,emoji:`🪿`},{id:`pi`,label:`Pi`,emoji:`π`},{id:`aider`,label:`Aider`,emoji:`🛠`},{id:`qwen`,label:`Qwen`,emoji:`🐉`},{id:`openhands`,label:`OpenHands`,emoji:`🤲`},{id:`amp`,label:`Amp`,emoji:`⚡`},{id:`forgecode`,label:`ForgeCode`,emoji:`🔥`},{id:`fcm_router`,label:`FCM Router`,emoji:`🔄`}];(0,v.useEffect)(()=>{fetch(`/api/install-endpoints/providers`).then(e=>e.json()).then(e=>{a(e.providers||[]),S(!1)}).catch(()=>S(!1))},[]),(0,v.useEffect)(()=>{o&&fetch(`/api/install-endpoints/catalog?provider=${o.providerKey}`).then(e=>e.json()).then(e=>l(e.models||[])).catch(()=>l([]))},[o]);let w=(0,v.useCallback)(e=>{p(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[]),T=(0,v.useCallback)(()=>{p(c.map(e=>e.modelId)),h(`all`)},[c]);(0,v.useCallback)(()=>{p([]),h(`selected`)},[]);let E=()=>n===0?!!o:n===1?!!u:n===2?m===`all`||f.length>0:!0,D=async()=>{r(3),_(!0),b(null);try{let e=await(await fetch(`/api/install-endpoints/wizard`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({providerKey:o.providerKey,toolMode:u,scope:m,modelIds:m===`selected`?f:[]})})).json();e.success?(b(e),t?.(`Installed ${e.modelCount} models for ${o.label} into ${C.find(e=>e.id===u)?.label||u}.`,`success`)):(b(null),t?.(`Install failed: ${e.error||`unknown`}`,`error`),r(2))}catch(e){b(null),t?.(`Install error: ${e.message}`,`error`),r(2)}finally{_(!1)}};return(0,I.jsx)(`div`,{className:X.overlay,onClick:t=>t.target===t.currentTarget&&e(),children:(0,I.jsxs)(`div`,{className:X.modal,children:[(0,I.jsxs)(`div`,{className:X.header,children:[(0,I.jsxs)(`h2`,{className:X.title,children:[(0,I.jsx)(kr,{size:20,stroke:1.5}),`Install Endpoints`]}),(0,I.jsx)(`button`,{className:X.closeBtn,onClick:e,"aria-label":`Close`,children:`✕`})]}),(0,I.jsx)(`div`,{className:X.steps,children:nl.map((e,t)=>(0,I.jsxs)(`div`,{className:`${X.step} ${t===n?X.stepActive:t<n?X.stepDone:``}`,children:[(0,I.jsx)(`span`,{className:X.stepNum,children:t<n?(0,I.jsx)(Kn,{size:12}):t+1}),(0,I.jsx)(`span`,{className:X.stepLabel,children:e})]},t))}),(0,I.jsxs)(`div`,{className:X.body,children:[n===0&&(0,I.jsxs)(`div`,{className:X.stepContent,children:[(0,I.jsx)(`p`,{className:X.stepDesc,children:`Choose a provider with a configured API key.`}),x&&(0,I.jsx)(`div`,{className:X.loading,children:`Loading providers…`}),!x&&i.length===0&&(0,I.jsx)(`div`,{className:X.empty,children:`No configured providers found. Add API keys in Settings first.`}),(0,I.jsx)(`div`,{className:X.grid,children:i.map(e=>(0,I.jsxs)(`button`,{className:`${X.pickCard} ${o?.providerKey===e.providerKey?X.pickActive:``}`,onClick:()=>{s(e),r(1)},children:[(0,I.jsx)(`span`,{className:X.pickLabel,children:e.label}),(0,I.jsxs)(`span`,{className:X.pickMeta,children:[e.modelCount,` models`]})]},e.providerKey))})]}),n===1&&(0,I.jsxs)(`div`,{className:X.stepContent,children:[(0,I.jsxs)(`p`,{className:X.stepDesc,children:[`Install `,(0,I.jsx)(`strong`,{children:o?.label}),` models into which tool?`]}),(0,I.jsx)(`div`,{className:X.grid,children:C.map(e=>(0,I.jsxs)(`button`,{className:`${X.pickCard} ${u===e.id?X.pickActive:``}`,onClick:()=>{d(e.id),r(2)},children:[(0,I.jsx)(`span`,{className:X.pickEmoji,children:e.emoji}),(0,I.jsx)(`span`,{className:X.pickLabel,children:e.label})]},e.id))})]}),n===2&&(0,I.jsxs)(`div`,{className:X.stepContent,children:[(0,I.jsxs)(`p`,{className:X.stepDesc,children:[`Choose models to install from `,(0,I.jsx)(`strong`,{children:o?.label}),` into `,(0,I.jsx)(`strong`,{children:C.find(e=>e.id===u)?.label}),`.`]}),(0,I.jsxs)(`div`,{className:X.scopeToggle,children:[(0,I.jsx)(`button`,{className:`${X.scopeBtn} ${m===`all`?X.scopeActive:``}`,onClick:()=>{h(`all`),T()},children:`All Models`}),(0,I.jsx)(`button`,{className:`${X.scopeBtn} ${m===`selected`?X.scopeActive:``}`,onClick:()=>h(`selected`),children:`Select Models`})]}),m===`selected`&&(0,I.jsx)(`div`,{className:X.modelGrid,children:c.map(e=>(0,I.jsxs)(`button`,{className:`${X.modelCard} ${f.includes(e.modelId)?X.modelSelected:``}`,onClick:()=>w(e.modelId),children:[(0,I.jsx)(`span`,{className:X.modelName,children:e.label}),(0,I.jsx)(`span`,{className:X.modelTier,children:e.tier})]},e.modelId))}),m===`all`&&(0,I.jsxs)(`div`,{className:X.allNotice,children:[`All `,c.length,` models from `,o?.label,` will be installed.`]})]}),n===3&&(0,I.jsxs)(`div`,{className:X.stepContent,children:[g&&(0,I.jsxs)(`div`,{className:X.installingState,children:[(0,I.jsx)(xr,{size:32,className:X.spinner}),(0,I.jsxs)(`span`,{className:X.installingLabel,children:[`Installing `,m===`all`?`all`:f.length,` model`,m===`all`&&c.length!==1?`s`:f.length===1?``:`s`,`…`]}),(0,I.jsxs)(`span`,{className:X.installingSub,children:[`Writing config for `,C.find(e=>e.id===u)?.label]})]}),!g&&y&&(0,I.jsxs)(`div`,{className:X.doneState,children:[(0,I.jsx)(`div`,{className:X.checkCircle,children:(0,I.jsx)(Kn,{size:36})}),(0,I.jsx)(`h3`,{className:X.doneTitle,children:`Installed!`}),(0,I.jsxs)(`p`,{className:X.doneSub,children:[y.modelCount,` model`,y.modelCount===1?``:`s`,` from `,(0,I.jsx)(`strong`,{children:o?.label}),` → `,(0,I.jsx)(`strong`,{children:y.toolLabel})]}),(0,I.jsx)(`code`,{className:X.installPath,children:y.path})]}),!g&&!y&&(0,I.jsxs)(`div`,{className:X.doneState,children:[(0,I.jsx)(`span`,{className:X.errorDot,children:`✕`}),(0,I.jsx)(`h3`,{className:X.doneTitle,children:`Install failed`}),(0,I.jsx)(`p`,{className:X.doneSub,children:`Check the toast for details. You can go back and retry.`})]})]})]}),(0,I.jsxs)(`div`,{className:X.footer,children:[n>0&&n<3&&(0,I.jsxs)(`button`,{className:X.backBtn,onClick:()=>{r(e=>Math.max(e-1,0))},children:[(0,I.jsx)(Yn,{size:14}),`Back`]}),n===3&&!g&&!y&&(0,I.jsxs)(`button`,{className:X.backBtn,onClick:()=>r(2),children:[(0,I.jsx)(Yn,{size:14}),`Back`]}),n<3&&(0,I.jsx)(`button`,{className:X.nextBtn,onClick:()=>{if(n===2){D();return}r(e=>Math.min(e+1,3))},disabled:!E(),children:n===2?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(kr,{size:14}),`Install`]}):(0,I.jsxs)(I.Fragment,{children:[`Next`,(0,I.jsx)(Xn,{size:14})]})}),n===3&&!g&&y&&(0,I.jsxs)(`button`,{className:X.doneBtn,onClick:e,children:[(0,I.jsx)(Kn,{size:14}),`Done`]})]})]})})}var il={container:`_container_18l8h_1`},al={toast:`_toast_73ezc_1`,slideIn:`_slideIn_73ezc_1`,success:`_success_73ezc_17`,error:`_error_73ezc_18`,warning:`_warning_73ezc_19`,info:`_info_73ezc_20`,icon:`_icon_73ezc_27`,message:`_message_73ezc_28`,close:`_close_73ezc_29`,exiting:`_exiting_73ezc_38`,slideOut:`_slideOut_73ezc_1`},ol={success:`✅`,error:`❌`,warning:`⚠️`,info:`ℹ️`};function sl({message:e,type:t=`info`,duration:n=3500,onDismiss:r}){let i=(0,v.useRef)(null);return(0,v.useEffect)(()=>(i.current=setTimeout(r,n),()=>clearTimeout(i.current)),[n,r]),(0,I.jsxs)(`div`,{className:`${al.toast} ${al[t]}`,children:[(0,I.jsx)(`span`,{className:al.icon,children:ol[t]||`📌`}),(0,I.jsx)(`span`,{className:al.message,children:e}),(0,I.jsx)(`button`,{className:al.close,onClick:r,children:`×`})]})}function cl({toasts:e,dismissToast:t}){return(0,I.jsx)(`div`,{className:il.container,children:e.map(e=>(0,I.jsx)(sl,{message:e.message,type:e.type,onDismiss:()=>t(e.id)},e.id))})}var ll=0,ul={dashboard:`dashboard`,settings:`settings`,analytics:`analytics`,recommend:`recommend`,router:`router`};function dl(){let{models:e,connected:t,nextPingAt:n,isPinging:r,pingMode:i,globalBenchmarkRunning:a,globalBenchmarkTotal:o,globalBenchmarkCompleted:s}=Pt(),{theme:c,cycle:l}=ln(),[u,d]=(0,v.useState)(`dashboard`),[f,p]=(0,v.useState)(null),[m,h]=(0,v.useState)(!1),[g,_]=(0,v.useState)(!1),[y,b]=(0,v.useState)(!1),[x,S]=(0,v.useState)(!1),[C,w]=(0,v.useState)(null),[T,E]=(0,v.useState)(!1),[D,O]=(0,v.useState)(!1),[ee,te]=(0,v.useState)(!1),[k,ne]=(0,v.useState)(!1),[re,ie]=(0,v.useState)(!1),[ae,A]=(0,v.useState)(null),[j,oe]=(0,v.useState)([]),se=(0,v.useRef)(Date.now());(0,v.useEffect)(()=>{try{typeof window<`u`&&window.posthog?.capture&&window.posthog.capture(`app_web_start`,{version:`0.5.23`,timestamp:new Date().toISOString()})}catch{}},[]);let ce=(0,v.useCallback)(()=>{O(!0);try{typeof window<`u`&&window.posthog?.capture&&window.posthog.capture(`app_router_start`,{version:`0.5.23`,timestamp:new Date().toISOString()})}catch{}},[]),M=(0,v.useCallback)((e,t=`info`)=>{let n=++ll;oe(r=>[...r,{id:n,message:e,type:t}]),setTimeout(()=>{oe(e=>e.filter(e=>e.id!==n))},4e3)},[]),le=(0,v.useCallback)(e=>{oe(t=>t.filter(t=>t.id!==e))},[]),{filtered:N,filterTier:ue,setFilterTier:de,filterStatus:fe,setFilterStatus:pe,filterProvider:me,setFilterProvider:he,filterVerdict:ge,setFilterVerdict:_e,filterHealth:ve,setFilterHealth:ye,visibilityMode:be,setVisibilityMode:xe,searchQuery:Se,setSearchQuery:Ce,customTextFilter:we,setCustomTextFilter:Te,sortColumn:Ee,sortDirection:De,setSortColumn:Oe,setSortDirection:ke,toggleSort:Ae,resetView:je}=an(e),{toolMode:Me,setToolMode:Ne,cycleToolMode:Pe}=hn({onToast:M});Mn({currentView:u,setCurrentView:d,filterState:{filterTier:ue,setFilterTier:de,filterStatus:fe,setFilterStatus:pe,filterProvider:me,setFilterProvider:he,filterVerdict:ge,setFilterVerdict:_e,filterHealth:ve,setFilterHealth:ye,sortColumn:Ee,sortDirection:De,setSortColumn:Oe,setSortDirection:ke,toggleSort:Ae,setSearchQuery:Ce,filterState:null,searchQuery:Se},paletteOpen:g,setPaletteOpen:_,toolMode:Me,setToolMode:Ne});let Fe=dn({models:e}),Ie=(0,v.useCallback)(async(e,t=null)=>{let n=t||Me||`opencode`;if(e){if(!xn(e.providerKey,n)){A({model:e,toolMode:n});return}try{let t=await fetch(`/api/install-endpoint`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({providerKey:e.providerKey,modelId:e.modelId,toolMode:n})}),r=await t.json().catch(()=>({}));if(t.status===422&&r.code===`incompatible_model`){A({model:e,toolMode:n});return}if(!t.ok)throw Error(r.error||`HTTP ${t.status}`);M(`Endpoint installed for ${e.label} in ${n}. Start the tool yourself.`,`success`)}catch(e){M(`Endpoint install failed: ${e.message}`,`error`)}}},[M,Me]),Le=(0,v.useCallback)(async(e,t)=>{await Ne(e),A(null),await Ie(t,e)},[Ie,Ne]),Re=(0,v.useCallback)(async e=>{Fe.isFavorite(e)||await Fe.toggle(e),await Ie(e)},[Fe,Ie]),{localVersion:ze,latestVersion:Be,updateAvailable:Ve,runUpdate:He,checkNow:Ue,error:We}=Fn({onToast:M}),Ge=(0,v.useMemo)(()=>{let t={};return e.forEach(e=>{t[e.providerKey]||(t[e.providerKey]={key:e.providerKey,name:e.origin,count:0,hasKey:!1,anyUp:!1}),t[e.providerKey].count++,e.hasApiKey&&(t[e.providerKey].hasKey=!0),e.status===`up`&&(t[e.providerKey].anyUp=!0)}),Object.values(t).sort((e,t)=>e.name.localeCompare(t.name))},[e]),Ke=(0,v.useCallback)(async()=>{if(!a)try{await fetch(`/api/global-benchmark`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({models:N.map(e=>({providerKey:e.providerKey,modelId:e.modelId}))})})}catch(e){console.error(`[Benchmark] Failed to start global benchmark:`,e.message)}},[N,a]),qe=(0,v.useCallback)(async e=>{try{let t=await fetch(`/api/benchmark`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({providerKey:e.providerKey,modelId:e.modelId})});!t.ok&&t.status!==202&&M(`Benchmark failed: ${(await t.json().catch(()=>({})))?.error||t.statusText}`,`error`)}catch(e){console.error(`[Benchmark] per-row failed:`,e.message)}},[M]),Je=(0,v.useCallback)(e=>{p(e),se.current=Date.now()},[]);(0,v.useCallback)(()=>p(null),[]);let Ye=(0,v.useCallback)(async e=>{try{await fetch(`/api/ping-mode?action=${e}`,{method:`POST`})}catch{}},[]),Xe=(0,v.useCallback)(e=>{if(e===`help`){b(!0);return}if(e===`changelog`){S(!0),w(null);return}if(e===`recommend`){E(!0);return}if(e===`router`){ce();return}if(e===`playground`){te(!0);return}if(e===`install-endpoints`){ie(!0);return}if(e===`installed-models`){ne(!0);return}d(ul[e]||e),se.current=Date.now()},[M]),Ze=(0,v.useCallback)(()=>{je(),Ce(``),M(`View reset to defaults.`,`info`)},[M,je,Ce]),Qe=(0,v.useCallback)(e=>{w(e),S(!0)},[]);return(0,v.useEffect)(()=>{let e=e=>{let t=e.metaKey||e.ctrlKey;if(t&&(e.key===`k`||e.key===`K`)){e.preventDefault(),_(e=>!e);return}if(t&&(e.key===`p`||e.key===`P`)&&!e.shiftKey){e.preventDefault(),_(e=>!e);return}if(e.key===`Escape`){if(g){_(!1);return}if(y){b(!1);return}if(x){S(!1);return}if(T){E(!1);return}if(D){O(!1);return}if(ee){te(!1);return}if(re){ie(!1);return}if(k){ne(!1);return}if(ae){A(null);return}if(f){p(null);return}if(m){h(!1);return}}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[g,y,x,T,D,ee,re,k,ae,f,m]),(0,v.useEffect)(()=>{u===`recommend`&&(E(!0),d(`dashboard`))},[u]),(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`app-shell`,children:[(0,I.jsx)(ei,{searchQuery:Se,onSearchChange:Ce,currentView:u,onNavigate:Xe,onToggleTheme:l,onOpenExport:()=>h(!0),onOpenCommandPalette:()=>_(!0),onBenchmark:Ke,benchmarkRunning:a,benchmarkTotal:o,benchmarkCompleted:s,modelsCount:N.length,theme:c,onToast:M,toolMode:Me,onSetToolMode:Ne,onCycleToolMode:Pe,updateSlot:(0,I.jsx)(Dc,{updateAvailable:Ve,latestVersion:Be,onRunUpdate:He,onOpenChangelog:Qe})}),(0,I.jsxs)(`div`,{className:`app-content`,children:[u===`dashboard`&&(0,I.jsxs)(`main`,{className:`view`,children:[(0,I.jsx)(ra,{filterTier:ue,setFilterTier:de,filterStatus:fe,setFilterStatus:pe,filterProvider:me,setFilterProvider:he,filterVerdict:ge,setFilterVerdict:_e,filterHealth:ve,setFilterHealth:ye,visibilityMode:be,setVisibilityMode:xe,customTextFilter:we,setCustomTextFilter:Te,searchQuery:Se,onResetView:Ze,providers:Ge,pingMode:i,setPingMode:Ye,nextPingAt:n,isPinging:r,globalBenchmarkRunning:a,globalBenchmarkTotal:o,globalBenchmarkCompleted:s,toolMode:Me}),(0,I.jsx)(zs,{filtered:N,onSelectModel:Je,onBenchmarkRow:qe,onLaunch:Ie,favorites:Fe,sortColumn:Ee,sortDirection:De,onSort:Ae,toolMode:Me,onToast:M,onSetToolMode:Ne,onCycleToolMode:Pe,onOpenFallback:e=>A({model:e,toolMode:Me})})]}),u===`settings`&&(0,I.jsx)(`div`,{className:`view`,children:(0,I.jsx)(Ws,{onToast:M,onOpenChangelog:e=>{w(e),S(!0)},onCheckForUpdate:()=>{Ue(),M?.(`Checking for updates…`,`info`)}})}),u===`analytics`&&(0,I.jsx)(`div`,{className:`view`,children:(0,I.jsx)(ec,{models:e})}),(0,I.jsx)(ni,{})]})]}),m&&(0,I.jsx)(Hs,{models:N,onClose:()=>h(!1),onToast:M}),g&&(0,I.jsx)(_c,{onClose:()=>_(!1),onNavigate:Xe,onCycleTheme:l,onResetView:Ze,onSetPingMode:Ye,onOpenHelp:()=>b(!0),onOpenChangelog:()=>{w(null),S(!0)},onOpenPlayground:()=>te(!0),onExport:()=>h(!0),onRunUpdate:He,currentView:u,theme:c,pingMode:i,models:e,updateAvailable:Ve,latestVersion:Be,onToast:M}),T&&(0,I.jsx)(Pc,{onClose:()=>E(!1),toolMode:Me,onLaunch:Ie,onPinAndLaunch:Re,onToast:M}),ae&&(0,I.jsx)(Ic,{request:ae,models:e,onClose:()=>A(null),onSwitchToolLaunch:Le,onLaunchSimilar:t=>{A(null),Ie(e.find(e=>e.providerKey===t.providerKey&&e.modelId===t.modelId)||t)}}),y&&(0,I.jsx)(bc,{onClose:()=>b(!1)}),x&&(0,I.jsx)(wc,{onClose:()=>S(!1),defaultVersion:C}),D&&(0,I.jsx)(Gc,{onClose:()=>O(!1),onToast:M}),ee&&(0,I.jsx)(Qc,{onClose:()=>te(!1),onToast:M,models:e,routerStatus:null}),k&&(0,I.jsx)(tl,{onClose:()=>ne(!1),onToast:M}),re&&(0,I.jsx)(rl,{onClose:()=>ie(!1),onToast:M}),(0,I.jsx)(cl,{toasts:j,dismissToast:le})]})}(0,y.createRoot)(document.getElementById(`root`)).render((0,I.jsx)(v.StrictMode,{children:(0,I.jsx)(dl,{})}));
|