@seaveyon/harness-switch 0.23.0 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,62 +0,0 @@
1
- (()=>{"use strict";var e,t,n,r,a,o,i,l,s,c={6974(e,t,n){var r,a=n(7967),o=n(4041),i=n(3144);function l(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do 0!=(4098&(t=e).flags)&&(n=t.return),e=t.return;while(e)}return 3===t.tag?n:null}function c(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function u(e){if(31===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function d(e){if(s(e)!==e)throw Error(l(188))}var f=Object.assign,p=Symbol.for("react.element"),h=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),x=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),O=Symbol.for("react.lazy");Symbol.for("react.scope");var C=Symbol.for("react.activity");Symbol.for("react.legacy_hidden"),Symbol.for("react.tracing_marker");var N=Symbol.for("react.memo_cache_sentinel");Symbol.for("react.view_transition");var P=Symbol.iterator;function E(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=P&&e[P]||e["@@iterator"])?e:null}var _=Symbol.for("react.client.reference"),z=Array.isArray,T=o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,A=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R={pending:!1,data:null,method:null,action:null},L=[],I=-1;function M(e){return{current:e}}function D(e){0>I||(e.current=L[I],L[I]=null,I--)}function F(e,t){L[++I]=e.current,e.current=t}var $=M(null),U=M(null),H=M(null),B=M(null);function K(e,t){switch(F(H,t),F(U,e),F($,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?cy(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)e=cv(t=cy(t),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}D($),F($,e)}function V(){D($),D(U),D(H)}function q(e){null!==e.memoizedState&&F(B,e);var t=$.current,n=cv(t,e.type);t!==n&&(F(U,e),F($,n))}function W(e){U.current===e&&(D($),D(U)),B.current===e&&(D(B),ue._currentValue=R)}function Z(e){if(void 0===tI)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);tI=t&&t[1]||"",tM=-1<e.stack.indexOf("\n at")?" (<anonymous>)":-1<e.stack.indexOf("@")?"@unknown:0:0":""}return"\n"+tI+e+tM}var G=!1;function J(e,t){if(!e||G)return"";G=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&"function"==typeof n.catch&&n.catch(function(){})}}catch(e){if(e&&r&&"string"==typeof e.stack)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=r.DetermineComponentFrameRoot(),i=o[0],l=o[1];if(i&&l){var s=i.split("\n"),c=l.split("\n");for(a=r=0;r<s.length&&!s[r].includes("DetermineComponentFrameRoot");)r++;for(;a<c.length&&!c[a].includes("DetermineComponentFrameRoot");)a++;if(r===s.length||a===c.length)for(r=s.length-1,a=c.length-1;1<=r&&0<=a&&s[r]!==c[a];)a--;for(;1<=r&&0<=a;r--,a--)if(s[r]!==c[a]){if(1!==r||1!==a)do if(r--,a--,0>a||s[r]!==c[a]){var u="\n"+s[r].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=r&&0<=a);break}}}finally{G=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Z(n):""}function Q(e){try{var t="",n=null;do t+=function(e,t){switch(e.tag){case 26:case 27:case 5:return Z(e.type);case 16:return Z("Lazy");case 13:return e.child!==t&&null!==t?Z("Suspense Fallback"):Z("Suspense");case 19:return Z("SuspenseList");case 0:case 15:return J(e.type,!1);case 11:return J(e.type.render,!1);case 1:return J(e.type,!0);case 31:return Z("Activity");default:return""}}(e,n),n=e,e=e.return;while(e);return t}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}var Y=Object.prototype.hasOwnProperty,X=a.unstable_scheduleCallback,ee=a.unstable_cancelCallback,et=a.unstable_shouldYield,en=a.unstable_requestPaint,er=a.unstable_now,ea=a.unstable_getCurrentPriorityLevel,eo=a.unstable_ImmediatePriority,ei=a.unstable_UserBlockingPriority,el=a.unstable_NormalPriority,es=a.unstable_LowPriority,ec=a.unstable_IdlePriority,eu=a.log,ed=a.unstable_setDisableYieldValue,ef=null,ep=null;function eh(e){if("function"==typeof eu&&ed(e),ep&&"function"==typeof ep.setStrictMode)try{ep.setStrictMode(ef,e)}catch(e){}}var em=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(eg(e)/ey|0)|0},eg=Math.log,ey=Math.LN2,ev=256,eb=262144,ex=4194304;function ew(e){var t=42&e;if(0!==t)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 261888&e;case 262144:case 524288:case 1048576:case 2097152:return 3932160&e;case 4194304:case 8388608:case 0x1000000:case 0x2000000:return 0x3c00000&e;case 0x4000000:return 0x4000000;case 0x8000000:return 0x8000000;case 0x10000000:return 0x10000000;case 0x20000000:return 0x20000000;case 0x40000000:return 0;default:return e}}function ek(e,t,n){var r=e.pendingLanes;if(0===r)return 0;var a=0,o=e.suspendedLanes,i=e.pingedLanes;e=e.warmLanes;var l=0x7ffffff&r;return 0!==l?0!=(r=l&~o)?a=ew(r):0!=(i&=l)?a=ew(i):n||0!=(n=l&~e)&&(a=ew(n)):0!=(l=r&~o)?a=ew(l):0!==i?a=ew(i):n||0!=(n=r&~e)&&(a=ew(n)),0===a?0:0!==t&&t!==a&&0==(t&o)&&((o=a&-a)>=(n=t&-t)||32===o&&0!=(4194048&n))?t:a}function ej(e,t){return 0==(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function eS(){var e=ex;return 0==(0x3c00000&(ex<<=1))&&(ex=4194304),e}function eO(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function eC(e,t){e.pendingLanes|=t,0x10000000!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function eN(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-em(t);e.entangledLanes|=t,e.entanglements[r]=0x40000000|e.entanglements[r]|261930&n}function eP(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-em(n),a=1<<r;a&t|e[r]&t&&(e[r]|=t),n&=~a}}function eE(e,t){var n=t&-t;return 0!=((n=0!=(42&n)?1:e_(n))&(e.suspendedLanes|t))?0:n}function e_(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 0x1000000:case 0x2000000:e=128;break;case 0x10000000:e=0x8000000;break;default:e=0}return e}function ez(e){return 2<(e&=-e)?8<e?0!=(0x7ffffff&e)?32:0x10000000:8:2}function eT(){var e=A.p;return 0!==e?e:void 0===(e=window.event)?32:uh(e.type)}function eA(e,t){var n=A.p;try{return A.p=e,t()}finally{A.p=n}}var eR=Math.random().toString(36).slice(2),eL="__reactFiber$"+eR,eI="__reactProps$"+eR,eM="__reactContainer$"+eR,eD="__reactEvents$"+eR,eF="__reactListeners$"+eR,e$="__reactHandles$"+eR,eU="__reactResources$"+eR,eH="__reactMarker$"+eR;function eB(e){delete e[eL],delete e[eI],delete e[eD],delete e[eF],delete e[e$]}function eK(e){var t=e[eL];if(t)return t;for(var n=e.parentNode;n;){if(t=n[eM]||n[eL]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=cI(e);null!==e;){if(n=e[eL])return n;e=cI(e)}return t}n=(e=n).parentNode}return null}function eV(e){if(e=e[eL]||e[eM]){var t=e.tag;if(5===t||6===t||13===t||31===t||26===t||27===t||3===t)return e}return null}function eq(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e.stateNode;throw Error(l(33))}function eW(e){var t=e[eU];return t||(t=e[eU]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function eZ(e){e[eH]=!0}var eG=new Set,eJ={};function eQ(e,t){eY(e,t),eY(e+"Capture",t)}function eY(e,t){for(eJ[e]=t,e=0;e<t.length;e++)eG.add(t[e])}var eX=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]*$"),e0={},e1={};function e2(e,t,n){if(Y.call(e1,t)||!Y.call(e0,t)&&(eX.test(t)?e1[t]=!0:(e0[t]=!0,!1)))if(null===n)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("data-"!==r&&"aria-"!==r)return void e.removeAttribute(t)}e.setAttribute(t,""+n)}}function e4(e,t,n){if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function e3(e,t,n,r){if(null===r)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 e5(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function e6(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function e8(e){if(!e._valueTracker){var t=e6(e)?"checked":"value";e._valueTracker=function(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&void 0!==r&&"function"==typeof r.get&&"function"==typeof r.set){var a=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(e){n=""+e,o.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]}}}}(e,t,""+e[t])}}function e9(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=e6(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function e7(e){if(void 0===(e=e||("u">typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var te=/[\n"\\]/g;function tt(e){return e.replace(te,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function tn(e,t,n,r,a,o,i,l){e.name="",null!=i&&"function"!=typeof i&&"symbol"!=typeof i&&"boolean"!=typeof i?e.type=i:e.removeAttribute("type"),null!=t?"number"===i?(0===t&&""===e.value||e.value!=t)&&(e.value=""+e5(t)):e.value!==""+e5(t)&&(e.value=""+e5(t)):"submit"!==i&&"reset"!==i||e.removeAttribute("value"),null!=t?ta(e,i,e5(t)):null!=n?ta(e,i,e5(n)):null!=r&&e.removeAttribute("value"),null==a&&null!=o&&(e.defaultChecked=!!o),null!=a&&(e.checked=a&&"function"!=typeof a&&"symbol"!=typeof a),null!=l&&"function"!=typeof l&&"symbol"!=typeof l&&"boolean"!=typeof l?e.name=""+e5(l):e.removeAttribute("name")}function tr(e,t,n,r,a,o,i,l){if(null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o&&(e.type=o),null!=t||null!=n){if(("submit"===o||"reset"===o)&&null==t)return void e8(e);n=null!=n?""+e5(n):"",t=null!=t?""+e5(t):n,l||t===e.value||(e.value=t),e.defaultValue=t}r="function"!=typeof(r=null!=r?r:a)&&"symbol"!=typeof r&&!!r,e.checked=l?e.checked:!!r,e.defaultChecked=!!r,null!=i&&"function"!=typeof i&&"symbol"!=typeof i&&"boolean"!=typeof i&&(e.name=i),e8(e)}function ta(e,t,n){"number"===t&&e7(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function to(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&r&&(e[n].defaultSelected=!0)}else{for(a=0,n=""+e5(n),t=null;a<e.length;a++){if(e[a].value===n){e[a].selected=!0,r&&(e[a].defaultSelected=!0);return}null!==t||e[a].disabled||(t=e[a])}null!==t&&(t.selected=!0)}}function ti(e,t,n){if(null!=t&&((t=""+e5(t))!==e.value&&(e.value=t),null==n)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=null!=n?""+e5(n):""}function tl(e,t,n,r){if(null==t){if(null!=r){if(null!=n)throw Error(l(92));if(z(r)){if(1<r.length)throw Error(l(93));r=r[0]}n=r}null==n&&(n=""),t=n}e.defaultValue=n=e5(t),(r=e.textContent)===n&&""!==r&&null!==r&&(e.value=r),e8(e)}function ts(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType){n.nodeValue=t;return}}e.textContent=t}var tc=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 tu(e,t,n){var r=0===t.indexOf("--");null==n||"boolean"==typeof n||""===n?r?e.setProperty(t,""):"float"===t?e.cssFloat="":e[t]="":r?e.setProperty(t,n):"number"!=typeof n||0===n||tc.has(t)?"float"===t?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function td(e,t,n){if(null!=t&&"object"!=typeof t)throw Error(l(62));if(e=e.style,null!=n){for(var r in n)!n.hasOwnProperty(r)||null!=t&&t.hasOwnProperty(r)||(0===r.indexOf("--")?e.setProperty(r,""):"float"===r?e.cssFloat="":e[r]="");for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&tu(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&tu(e,o,t[o])}function tf(e){if(-1===e.indexOf("-"))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 tp=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"]]),th=/^[\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 tm(e){return th.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function tg(){}var ty=null;function tv(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var tb=null,tx=null;function tw(e){var t=eV(e);if(t&&(e=t.stateNode)){var n=e[eI]||null;switch(e=t.stateNode,t.type){case"input":if(tn(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+tt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[eI]||null;if(!a)throw Error(l(90));tn(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)(r=n[t]).form===e.form&&e9(r)}break;case"textarea":ti(e,n.value,n.defaultValue);break;case"select":null!=(t=n.value)&&to(e,!!n.multiple,t,!1)}}}var tk=!1;function tj(e,t,n){if(tk)return e(t,n);tk=!0;try{return e(t)}finally{if(tk=!1,(null!==tb||null!==tx)&&(sd(),tb&&(t=tb,e=tx,tx=tb=null,tw(t),e)))for(t=0;t<e.length;t++)tw(e[t])}}function tS(e,t){var n=e.stateNode;if(null===n)return null;var r=n[eI]||null;if(null===r)return null;switch(n=r[t],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)||(r="button"!==(e=e.type)&&"input"!==e&&"select"!==e&&"textarea"!==e),e=!r;break;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(l(231,t,typeof n));return n}var tO="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement,tC=!1;if(tO)try{var tN={};Object.defineProperty(tN,"passive",{get:function(){tC=!0}}),window.addEventListener("test",tN,tN),window.removeEventListener("test",tN,tN)}catch(e){tC=!1}var tP=null,tE=null,t_=null;function tz(){if(t_)return t_;var e,t,n=tE,r=n.length,a="value"in tP?tP.value:tP.textContent,o=a.length;for(e=0;e<r&&n[e]===a[e];e++);var i=r-e;for(t=1;t<=i&&n[r-t]===a[o-t];t++);return t_=a.slice(e,1<t?1-t:void 0)}function tT(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function tA(){return!0}function tR(){return!1}function tL(e){function t(t,n,r,a,o){for(var i in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=a,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(i)&&(t=e[i],this[i]=t?t(a):a[i]);return this.isDefaultPrevented=(null!=a.defaultPrevented?a.defaultPrevented:!1===a.returnValue)?tA:tR,this.isPropagationStopped=tR,this}return f(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=tA)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=tA)},persist:function(){},isPersistent:tA}),t}var tI,tM,tD,tF,t$,tU={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},tH=tL(tU),tB=f({},tU,{view:0,detail:0}),tK=tL(tB),tV=f({},tB,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:t2,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==t$&&(t$&&"mousemove"===e.type?(tD=e.screenX-t$.screenX,tF=e.screenY-t$.screenY):tF=tD=0,t$=e),tD)},movementY:function(e){return"movementY"in e?e.movementY:tF}}),tq=tL(tV),tW=tL(f({},tV,{dataTransfer:0})),tZ=tL(f({},tB,{relatedTarget:0})),tG=tL(f({},tU,{animationName:0,elapsedTime:0,pseudoElement:0})),tJ=tL(f({},tU,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),tQ=tL(f({},tU,{data:0})),tY={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},tX={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"},t0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function t1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=t0[e])&&!!t[e]}function t2(){return t1}var t4=tL(f({},tB,{key:function(e){if(e.key){var t=tY[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tT(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?tX[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:t2,charCode:function(e){return"keypress"===e.type?tT(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tT(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),t3=tL(f({},tV,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),t5=tL(f({},tB,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:t2})),t6=tL(f({},tU,{propertyName:0,elapsedTime:0,pseudoElement:0})),t8=tL(f({},tV,{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})),t9=tL(f({},tU,{newState:0,oldState:0})),t7=[9,13,27,32],ne=tO&&"CompositionEvent"in window,nt=null;tO&&"documentMode"in document&&(nt=document.documentMode);var nn=tO&&"TextEvent"in window&&!nt,nr=tO&&(!ne||nt&&8<nt&&11>=nt),na=!1;function no(e,t){switch(e){case"keyup":return -1!==t7.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ni(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var nl=!1,ns={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 nc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!ns[e.type]:"textarea"===t}function nu(e,t,n,r){tb?tx?tx.push(r):tx=[r]:tb=r,0<(t=cr(t,"onChange")).length&&(n=new tH("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var nd=null,nf=null;function np(e){s5(e,0)}function nh(e){if(e9(eq(e)))return e}function nm(e,t){if("change"===e)return t}var ng=!1;if(tO){if(tO){var ny="oninput"in document;if(!ny){var nv=document.createElement("div");nv.setAttribute("oninput","return;"),ny="function"==typeof nv.oninput}r=ny}else r=!1;ng=r&&(!document.documentMode||9<document.documentMode)}function nb(){nd&&(nd.detachEvent("onpropertychange",nx),nf=nd=null)}function nx(e){if("value"===e.propertyName&&nh(nf)){var t=[];nu(t,nf,e,tv(e)),tj(np,t)}}function nw(e,t,n){"focusin"===e?(nb(),nd=t,nf=n,nd.attachEvent("onpropertychange",nx)):"focusout"===e&&nb()}function nk(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return nh(nf)}function nj(e,t){if("click"===e)return nh(t)}function nS(e,t){if("input"===e||"change"===e)return nh(t)}var nO="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function nC(e,t){if(nO(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===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 a=n[r];if(!Y.call(t,a)||!nO(e[a],t[a]))return!1}return!0}function nN(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function nP(e,t){var n,r=nN(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=nN(r)}}function nE(e){e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;for(var t=e7(e.document);t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(n)e=t.contentWindow;else break;t=e7(e.document)}return t}function n_(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var nz=tO&&"documentMode"in document&&11>=document.documentMode,nT=null,nA=null,nR=null,nL=!1;function nI(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;nL||null==nT||nT!==e7(r)||(r="selectionStart"in(r=nT)&&n_(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},nR&&nC(nR,r)||(nR=r,0<(r=cr(nA,"onSelect")).length&&(t=new tH("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=nT)))}function nM(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var nD={animationend:nM("Animation","AnimationEnd"),animationiteration:nM("Animation","AnimationIteration"),animationstart:nM("Animation","AnimationStart"),transitionrun:nM("Transition","TransitionRun"),transitionstart:nM("Transition","TransitionStart"),transitioncancel:nM("Transition","TransitionCancel"),transitionend:nM("Transition","TransitionEnd")},nF={},n$={};function nU(e){if(nF[e])return nF[e];if(!nD[e])return e;var t,n=nD[e];for(t in n)if(n.hasOwnProperty(t)&&t in n$)return nF[e]=n[t];return e}tO&&(n$=document.createElement("div").style,"AnimationEvent"in window||(delete nD.animationend.animation,delete nD.animationiteration.animation,delete nD.animationstart.animation),"TransitionEvent"in window||delete nD.transitionend.transition);var nH=nU("animationend"),nB=nU("animationiteration"),nK=nU("animationstart"),nV=nU("transitionrun"),nq=nU("transitionstart"),nW=nU("transitioncancel"),nZ=nU("transitionend"),nG=new Map,nJ="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(" ");function nQ(e,t){nG.set(e,t),eQ(t,[e])}nJ.push("scrollEnd");var nY="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},nX=[],n0=0,n1=0;function n2(){for(var e=n0,t=n1=n0=0;t<e;){var n=nX[t];nX[t++]=null;var r=nX[t];nX[t++]=null;var a=nX[t];nX[t++]=null;var o=nX[t];if(nX[t++]=null,null!==r&&null!==a){var i=r.pending;null===i?a.next=a:(a.next=i.next,i.next=a),r.pending=a}0!==o&&n6(n,a,o)}}function n4(e,t,n,r){nX[n0++]=e,nX[n0++]=t,nX[n0++]=n,nX[n0++]=r,n1|=r,e.lanes|=r,null!==(e=e.alternate)&&(e.lanes|=r)}function n3(e,t,n,r){return n4(e,t,n,r),n8(e)}function n5(e,t){return n4(e,null,null,t),n8(e)}function n6(e,t,n){e.lanes|=n;var r=e.alternate;null!==r&&(r.lanes|=n);for(var a=!1,o=e.return;null!==o;)o.childLanes|=n,null!==(r=o.alternate)&&(r.childLanes|=n),22===o.tag&&(null===(e=o.stateNode)||1&e._visibility||(a=!0)),e=o,o=o.return;return 3===e.tag?(o=e.stateNode,a&&null!==t&&(a=31-em(n),null===(r=(e=o.hiddenUpdates)[a])?e[a]=[t]:r.push(t),t.lane=0x20000000|n),o):null}function n8(e){if(50<sr)throw sr=0,sa=null,Error(l(185));for(var t=e.return;null!==t;)t=(e=t).return;return 3===e.tag?e.stateNode:null}var n9={};function n7(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 re(e,t,n,r){return new n7(e,t,n,r)}function rt(e){return!(!(e=e.prototype)||!e.isReactComponent)}function rn(e,t){var n=e.alternate;return null===n?((n=re(e.tag,t,e.key,e.mode)).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=0x3e00000&e.flags,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=null===t?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 rr(e,t){e.flags&=0x3e00002;var n=e.alternate;return null===n?(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,e.dependencies=null===(t=n.dependencies)?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ra(e,t,n,r,a,o){var i=0;if(r=e,"function"==typeof e)rt(e)&&(i=1);else if("string"==typeof e)i=!function(e,t,n){if(1===n||null!=t.itemProp)return!1;switch(e){case"meta":case"title":return!0;case"style":if("string"!=typeof t.precedence||"string"!=typeof t.href||""===t.href)break;return!0;case"link":if("string"!=typeof t.rel||"string"!=typeof t.href||""===t.href||t.onLoad||t.onError)break;if("stylesheet"===t.rel)return e=t.disabled,"string"==typeof t.precedence&&null==e;return!0;case"script":if(t.async&&"function"!=typeof t.async&&"symbol"!=typeof t.async&&!t.onLoad&&!t.onError&&t.src&&"string"==typeof t.src)return!0}return!1}(e,n,$.current)?"html"===e||"head"===e||"body"===e?27:5:26;else e:switch(e){case C:return(e=re(31,n,t,a)).elementType=C,e.lanes=o,e;case g:return ro(n.children,a,o,t);case y:i=8,a|=24;break;case v:return(e=re(12,n,t,2|a)).elementType=v,e.lanes=o,e;case k:return(e=re(13,n,t,a)).elementType=k,e.lanes=o,e;case j:return(e=re(19,n,t,a)).elementType=j,e.lanes=o,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case x:i=10;break e;case b:i=9;break e;case w:i=11;break e;case S:i=14;break e;case O:i=16,r=null;break e}i=29,n=Error(l(130,null===e?"null":typeof e,"")),r=null}return(t=re(i,n,t,a)).elementType=e,t.type=r,t.lanes=o,t}function ro(e,t,n,r){return(e=re(7,e,r,t)).lanes=n,e}function ri(e,t,n){return(e=re(6,e,null,t)).lanes=n,e}function rl(e){var t=re(18,null,null,0);return t.stateNode=e,t}function rs(e,t,n){return(t=re(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var rc=new WeakMap;function ru(e,t){if("object"==typeof e&&null!==e){var n=rc.get(e);return void 0!==n?n:(t={value:e,source:t,stack:Q(t)},rc.set(e,t),t)}return{value:e,source:t,stack:Q(t)}}var rd=[],rf=0,rp=null,rh=0,rm=[],rg=0,ry=null,rv=1,rb="";function rx(e,t){rd[rf++]=rh,rd[rf++]=rp,rp=e,rh=t}function rw(e,t,n){rm[rg++]=rv,rm[rg++]=rb,rm[rg++]=ry,ry=e;var r=rv;e=rb;var a=32-em(r)-1;r&=~(1<<a),n+=1;var o=32-em(t)+a;if(30<o){var i=a-a%5;o=(r&(1<<i)-1).toString(32),r>>=i,a-=i,rv=1<<32-em(t)+a|n<<a|r,rb=o+e}else rv=1<<o|n<<a|r,rb=e}function rk(e){null!==e.return&&(rx(e,1),rw(e,1,0))}function rj(e){for(;e===rp;)rp=rd[--rf],rd[rf]=null,rh=rd[--rf],rd[rf]=null;for(;e===ry;)ry=rm[--rg],rm[rg]=null,rb=rm[--rg],rm[rg]=null,rv=rm[--rg],rm[rg]=null}function rS(e,t){rm[rg++]=rv,rm[rg++]=rb,rm[rg++]=ry,rv=t.id,rb=t.overflow,ry=e}var rO=null,rC=null,rN=!1,rP=null,rE=!1,r_=Error(l(519));function rz(e){var t=Error(l(418,1<arguments.length&&void 0!==arguments[1]&&arguments[1]?"text":"HTML",""));throw rM(ru(t,e)),r_}function rT(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[eL]=e,t[eI]=r,n){case"dialog":s6("cancel",t),s6("close",t);break;case"iframe":case"object":case"embed":s6("load",t);break;case"video":case"audio":for(n=0;n<s4.length;n++)s6(s4[n],t);break;case"source":s6("error",t);break;case"img":case"image":case"link":s6("error",t),s6("load",t);break;case"details":s6("toggle",t);break;case"input":s6("invalid",t),tr(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":s6("invalid",t);break;case"textarea":s6("invalid",t),tl(t,r.value,r.defaultValue,r.children)}"string"!=typeof(n=r.children)&&"number"!=typeof n&&"bigint"!=typeof n||t.textContent===""+n||!0===r.suppressHydrationWarning||cc(t.textContent,n)?(null!=r.popover&&(s6("beforetoggle",t),s6("toggle",t)),null!=r.onScroll&&s6("scroll",t),null!=r.onScrollEnd&&s6("scrollend",t),null!=r.onClick&&(t.onclick=tg),t=!0):t=!1,t||rz(e,!0)}function rA(e){for(rO=e.return;rO;)switch(rO.tag){case 5:case 31:case 13:rE=!1;return;case 27:case 3:rE=!0;return;default:rO=rO.return}}function rR(e){if(e!==rO)return!1;if(!rN)return rA(e),rN=!0,!1;var t,n=e.tag;if((t=3!==n&&27!==n)&&((t=5===n)&&(t="form"===(t=e.type)||"button"===t||cb(e.type,e.memoizedProps)),t=!t),t&&rC&&rz(e),rA(e),13===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(l(317));rC=cL(e)}else if(31===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(l(317));rC=cL(e)}else 27===n?(n=rC,cC(e.type)?(e=cR,cR=null,rC=e):rC=n):rC=rO?cA(e.stateNode.nextSibling):null;return!0}function rL(){rC=rO=null,rN=!1}function rI(){var e=rP;return null!==e&&(null===lX?lX=e:lX.push.apply(lX,e),rP=null),e}function rM(e){null===rP?rP=[e]:rP.push(e)}var rD=M(null),rF=null,r$=null;function rU(e,t,n){F(rD,t._currentValue),t._currentValue=n}function rH(e){e._currentValue=rD.current,D(rD)}function rB(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function rK(e,t,n,r){var a=e.child;for(null!==a&&(a.return=e);null!==a;){var o=a.dependencies;if(null!==o){var i=a.child;o=o.firstContext;e:for(;null!==o;){var s=o;o=a;for(var c=0;c<t.length;c++)if(s.context===t[c]){o.lanes|=n,null!==(s=o.alternate)&&(s.lanes|=n),rB(o.return,n,e),r||(i=null);break e}o=s.next}}else if(18===a.tag){if(null===(i=a.return))throw Error(l(341));i.lanes|=n,null!==(o=i.alternate)&&(o.lanes|=n),rB(i,n,e),i=null}else i=a.child;if(null!==i)i.return=a;else for(i=a;null!==i;){if(i===e){i=null;break}if(null!==(a=i.sibling)){a.return=i.return,i=a;break}i=i.return}a=i}}function rV(e,t,n,r){e=null;for(var a=t,o=!1;null!==a;){if(!o){if(0!=(524288&a.flags))o=!0;else if(0!=(262144&a.flags))break}if(10===a.tag){var i=a.alternate;if(null===i)throw Error(l(387));if(null!==(i=i.memoizedProps)){var s=a.type;nO(a.pendingProps.value,i.value)||(null!==e?e.push(s):e=[s])}}else if(a===B.current){if(null===(i=a.alternate))throw Error(l(387));i.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(null!==e?e.push(ue):e=[ue])}a=a.return}null!==e&&rK(t,e,n,r),t.flags|=262144}function rq(e){for(e=e.firstContext;null!==e;){if(!nO(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function rW(e){rF=e,r$=null,null!==(e=e.dependencies)&&(e.firstContext=null)}function rZ(e){return rJ(rF,e)}function rG(e,t){return null===rF&&rW(e),rJ(e,t)}function rJ(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},null===r$){if(null===e)throw Error(l(308));r$=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else r$=r$.next=t;return n}var rQ="u">typeof AbortController?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()})}},rY=a.unstable_scheduleCallback,rX=a.unstable_NormalPriority,r0={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function r1(){return{controller:new rQ,data:new Map,refCount:0}}function r2(e){e.refCount--,0===e.refCount&&rY(rX,function(){e.controller.abort()})}var r4=null,r3=0,r5=0,r6=null;function r8(){if(0==--r3&&null!==r4){null!==r6&&(r6.status="fulfilled");var e=r4;r4=null,r5=0,r6=null;for(var t=0;t<e.length;t++)(0,e[t])()}}var r9=T.S;T.S=function(e,t){l2=er(),"object"==typeof t&&null!==t&&"function"==typeof t.then&&function(e){if(null===r4){var t=r4=[];r3=0,r5=sY(),r6={status:"pending",value:void 0,then:function(e){t.push(e)}}}r3++,e.then(r8,r8)}(t),null!==r9&&r9(e,t)};var r7=M(null);function ae(){var e=r7.current;return null!==e?e:lM.pooledCache}function at(e,t){null===t?F(r7,r7.current):F(r7,t.pool)}function an(){var e=ae();return null===e?null:{parent:r0._currentValue,pool:e}}var ar=Error(l(460)),aa=Error(l(474)),ao=Error(l(542)),ai={then:function(){}};function al(e){return"fulfilled"===(e=e.status)||"rejected"===e}function as(e,t,n){switch(void 0===(n=e[n])?e.push(t):n!==t&&(t.then(tg,tg),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw af(e=t.reason),e;default:if("string"==typeof t.status)t.then(tg,tg);else{if(null!==(e=lM)&&100<e.shellSuspendCounter)throw Error(l(482));(e=t).status="pending",e.then(function(e){if("pending"===t.status){var n=t;n.status="fulfilled",n.value=e}},function(e){if("pending"===t.status){var n=t;n.status="rejected",n.reason=e}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw af(e=t.reason),e}throw au=t,ar}}function ac(e){try{return(0,e._init)(e._payload)}catch(e){if(null!==e&&"object"==typeof e&&"function"==typeof e.then)throw au=e,ar;throw e}}var au=null;function ad(){if(null===au)throw Error(l(459));var e=au;return au=null,e}function af(e){if(e===ar||e===ao)throw Error(l(483))}var ap=null,ah=0;function am(e){var t=ah;return ah+=1,null===ap&&(ap=[]),as(ap,e,t)}function ag(e,t){e.ref=void 0!==(t=t.props.ref)?t:null}function ay(e,t){if(t.$$typeof===p)throw Error(l(525));throw Error(l(31,"[object Object]"===(e=Object.prototype.toString.call(t))?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function av(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function a(e,t){return(e=rn(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return(t.index=r,e)?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=0x4000002,n):r:(t.flags|=0x4000002,n):(t.flags|=1048576,n)}function i(t){return e&&null===t.alternate&&(t.flags|=0x4000002),t}function s(e,t,n,r){return null===t||6!==t.tag?(t=ri(n,e.mode,r)).return=e:(t=a(t,n)).return=e,t}function c(e,t,n,r){var o=n.type;return o===g?d(e,t,n.props.children,r,n.key):(null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===O&&ac(o)===t.type)?ag(t=a(t,n.props),n):ag(t=ra(n.type,n.key,n.props,null,e.mode,r),n),t.return=e,t)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=rs(n,e.mode,r)).return=e:(t=a(t,n.children||[])).return=e,t}function d(e,t,n,r,o){return null===t||7!==t.tag?(t=ro(n,e.mode,r,o)).return=e:(t=a(t,n)).return=e,t}function f(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t||"bigint"==typeof t)return(t=ri(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case h:return ag(n=ra(t.type,t.key,t.props,null,e.mode,n),t),n.return=e,n;case m:return(t=rs(t,e.mode,n)).return=e,t;case O:return f(e,t=ac(t),n)}if(z(t)||E(t))return(t=ro(t,e.mode,n,null)).return=e,t;if("function"==typeof t.then)return f(e,am(t),n);if(t.$$typeof===x)return f(e,rG(e,t),n);ay(e,t)}return null}function p(e,t,n,r){var a=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n||"bigint"==typeof n)return null!==a?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case h:return n.key===a?c(e,t,n,r):null;case m:return n.key===a?u(e,t,n,r):null;case O:return p(e,t,n=ac(n),r)}if(z(n)||E(n))return null!==a?null:d(e,t,n,r,null);if("function"==typeof n.then)return p(e,t,am(n),r);if(n.$$typeof===x)return p(e,t,rG(e,n),r);ay(e,n)}return null}function y(e,t,n,r,a){if("string"==typeof r&&""!==r||"number"==typeof r||"bigint"==typeof r)return s(t,e=e.get(n)||null,""+r,a);if("object"==typeof r&&null!==r){switch(r.$$typeof){case h:return c(t,e=e.get(null===r.key?n:r.key)||null,r,a);case m:return u(t,e=e.get(null===r.key?n:r.key)||null,r,a);case O:return y(e,t,n,r=ac(r),a)}if(z(r)||E(r))return d(t,e=e.get(n)||null,r,a,null);if("function"==typeof r.then)return y(e,t,n,am(r),a);if(r.$$typeof===x)return y(e,t,n,rG(t,r),a);ay(t,r)}return null}return function(s,c,u,d){try{ah=0;var v=function s(c,u,d,v){if("object"==typeof d&&null!==d&&d.type===g&&null===d.key&&(d=d.props.children),"object"==typeof d&&null!==d){switch(d.$$typeof){case h:e:{for(var b=d.key;null!==u;){if(u.key===b){if((b=d.type)===g){if(7===u.tag){n(c,u.sibling),(v=a(u,d.props.children)).return=c,c=v;break e}}else if(u.elementType===b||"object"==typeof b&&null!==b&&b.$$typeof===O&&ac(b)===u.type){n(c,u.sibling),ag(v=a(u,d.props),d),v.return=c,c=v;break e}n(c,u);break}t(c,u),u=u.sibling}d.type===g?(v=ro(d.props.children,c.mode,v,d.key)).return=c:(ag(v=ra(d.type,d.key,d.props,null,c.mode,v),d),v.return=c),c=v}return i(c);case m:e:{for(b=d.key;null!==u;){if(u.key===b)if(4===u.tag&&u.stateNode.containerInfo===d.containerInfo&&u.stateNode.implementation===d.implementation){n(c,u.sibling),(v=a(u,d.children||[])).return=c,c=v;break e}else{n(c,u);break}t(c,u),u=u.sibling}(v=rs(d,c.mode,v)).return=c,c=v}return i(c);case O:return s(c,u,d=ac(d),v)}if(z(d))return function(a,i,l,s){for(var c=null,u=null,d=i,h=i=0,m=null;null!==d&&h<l.length;h++){d.index>h?(m=d,d=null):m=d.sibling;var g=p(a,d,l[h],s);if(null===g){null===d&&(d=m);break}e&&d&&null===g.alternate&&t(a,d),i=o(g,i,h),null===u?c=g:u.sibling=g,u=g,d=m}if(h===l.length)return n(a,d),rN&&rx(a,h),c;if(null===d){for(;h<l.length;h++)null!==(d=f(a,l[h],s))&&(i=o(d,i,h),null===u?c=d:u.sibling=d,u=d);return rN&&rx(a,h),c}for(d=r(d);h<l.length;h++)null!==(m=y(d,a,h,l[h],s))&&(e&&null!==m.alternate&&d.delete(null===m.key?h:m.key),i=o(m,i,h),null===u?c=m:u.sibling=m,u=m);return e&&d.forEach(function(e){return t(a,e)}),rN&&rx(a,h),c}(c,u,d,v);if(E(d)){if("function"!=typeof(b=E(d)))throw Error(l(150));return function(a,i,s,c){if(null==s)throw Error(l(151));for(var u=null,d=null,h=i,m=i=0,g=null,v=s.next();null!==h&&!v.done;m++,v=s.next()){h.index>m?(g=h,h=null):g=h.sibling;var b=p(a,h,v.value,c);if(null===b){null===h&&(h=g);break}e&&h&&null===b.alternate&&t(a,h),i=o(b,i,m),null===d?u=b:d.sibling=b,d=b,h=g}if(v.done)return n(a,h),rN&&rx(a,m),u;if(null===h){for(;!v.done;m++,v=s.next())null!==(v=f(a,v.value,c))&&(i=o(v,i,m),null===d?u=v:d.sibling=v,d=v);return rN&&rx(a,m),u}for(h=r(h);!v.done;m++,v=s.next())null!==(v=y(h,a,m,v.value,c))&&(e&&null!==v.alternate&&h.delete(null===v.key?m:v.key),i=o(v,i,m),null===d?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),rN&&rx(a,m),u}(c,u,d=b.call(d),v)}if("function"==typeof d.then)return s(c,u,am(d),v);if(d.$$typeof===x)return s(c,u,rG(c,d),v);ay(c,d)}return"string"==typeof d&&""!==d||"number"==typeof d||"bigint"==typeof d?(d=""+d,null!==u&&6===u.tag?(n(c,u.sibling),(v=a(u,d)).return=c):(n(c,u),(v=ri(d,c.mode,v)).return=c),i(c=v)):n(c,u)}(s,c,u,d);return ap=null,v}catch(e){if(e===ar||e===ao)throw e;var b=re(29,e,null,s.mode);return b.lanes=d,b.return=s,b}finally{}}}var ab=av(!0),ax=av(!1),aw=!1;function ak(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function aj(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 aS(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function aO(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&lI)){var a=r.pending;return null===a?t.next=t:(t.next=a.next,a.next=t),r.pending=t,t=n8(e),n6(e,null,n),t}return n4(e,r,t,n),n8(e)}function aC(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194048&n))){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,eP(e,n)}}function aN(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var a=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var i={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===o?a=o=i:o=o.next=i,n=n.next}while(null!==n);null===o?a=o=t:o=o.next=t}else a=o=t;n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:o,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var aP=!1;function aE(){if(aP){var e=r6;if(null!==e)throw e}}function a_(e,t,n,r){aP=!1;var a=e.updateQueue;aw=!1;var o=a.firstBaseUpdate,i=a.lastBaseUpdate,l=a.shared.pending;if(null!==l){a.shared.pending=null;var s=l,c=s.next;s.next=null,null===i?o=c:i.next=c,i=s;var u=e.alternate;null!==u&&(l=(u=u.updateQueue).lastBaseUpdate)!==i&&(null===l?u.firstBaseUpdate=c:l.next=c,u.lastBaseUpdate=s)}if(null!==o){var d=a.baseState;for(i=0,u=c=s=null,l=o;;){var p=-0x20000001&l.lane,h=p!==l.lane;if(h?(lF&p)===p:(r&p)===p){0!==p&&p===r5&&(aP=!0),null!==u&&(u=u.next={lane:0,tag:l.tag,payload:l.payload,callback:null,next:null});e:{var m=e,g=l;switch(p=t,g.tag){case 1:if("function"==typeof(m=g.payload)){d=m.call(n,d,p);break e}d=m;break e;case 3:m.flags=-65537&m.flags|128;case 0:if(null==(p="function"==typeof(m=g.payload)?m.call(n,d,p):m))break e;d=f({},d,p);break e;case 2:aw=!0}}null!==(p=l.callback)&&(e.flags|=64,h&&(e.flags|=8192),null===(h=a.callbacks)?a.callbacks=[p]:h.push(p))}else h={lane:p,tag:l.tag,payload:l.payload,callback:l.callback,next:null},null===u?(c=u=h,s=d):u=u.next=h,i|=p;if(null===(l=l.next))if(null===(l=a.shared.pending))break;else l=(h=l).next,h.next=null,a.lastBaseUpdate=h,a.shared.pending=null}null===u&&(s=d),a.baseState=s,a.firstBaseUpdate=c,a.lastBaseUpdate=u,null===o&&(a.shared.lanes=0),lW|=i,e.lanes=i,e.memoizedState=d}}function az(e,t){if("function"!=typeof e)throw Error(l(191,e));e.call(t)}function aT(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;e<n.length;e++)az(n[e],t)}var aA=M(null),aR=M(0);function aL(e,t){F(aR,e=lV),F(aA,t),lV=e|t.baseLanes}function aI(){F(aR,lV),F(aA,aA.current)}function aM(){lV=aR.current,D(aA),D(aR)}var aD=M(null),aF=null;function a$(e){var t=e.alternate;F(aV,1&aV.current),F(aD,e),null===aF&&(null===t||null!==aA.current?aF=e:null!==t.memoizedState&&(aF=e))}function aU(e){F(aV,aV.current),F(aD,e),null===aF&&(aF=e)}function aH(e){22===e.tag?(F(aV,aV.current),F(aD,e),null===aF&&(aF=e)):aB(e)}function aB(){F(aV,aV.current),F(aD,aD.current)}function aK(e){D(aD),aF===e&&(aF=null),D(aV)}var aV=M(0);function aq(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||cz(n)||cT(n)))return t}else if(19===t.tag&&("forwards"===t.memoizedProps.revealOrder||"backwards"===t.memoizedProps.revealOrder||"unstable_legacy-backwards"===t.memoizedProps.revealOrder||"together"===t.memoizedProps.revealOrder)){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var aW=0,aZ=null,aG=null,aJ=null,aQ=!1,aY=!1,aX=!1,a0=0,a1=0,a2=null,a4=0;function a3(){throw Error(l(321))}function a5(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!nO(e[n],t[n]))return!1;return!0}function a6(e,t,n,r,a,o){return aW=o,aZ=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,T.H=null===e||null===e.memoizedState?ir:ia,aX=!1,o=n(r,a),aX=!1,aY&&(o=a9(t,n,r,a)),a8(e),o}function a8(e){T.H=it;var t=null!==aG&&null!==aG.next;if(aW=0,aJ=aG=aZ=null,aQ=!1,a1=0,a2=null,t)throw Error(l(300));null===e||iw||null!==(e=e.dependencies)&&rq(e)&&(iw=!0)}function a9(e,t,n,r){aZ=e;var a=0;do{if(aY&&(a2=null),a1=0,aY=!1,25<=a)throw Error(l(301));if(a+=1,aJ=aG=null,null!=e.updateQueue){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,null!=o.memoCache&&(o.memoCache.index=0)}T.H=io,o=t(n,r)}while(aY);return o}function a7(){var e=T.H,t=e.useState()[0];return t="function"==typeof t.then?oi(t):t,e=e.useState()[0],(null!==aG?aG.memoizedState:null)!==e&&(aZ.flags|=1024),t}function oe(){var e=0!==a0;return a0=0,e}function ot(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function on(e){if(aQ){for(e=e.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}aQ=!1}aW=0,aJ=aG=aZ=null,aY=!1,a1=a0=0,a2=null}function or(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===aJ?aZ.memoizedState=aJ=e:aJ=aJ.next=e,aJ}function oa(){if(null===aG){var e=aZ.alternate;e=null!==e?e.memoizedState:null}else e=aG.next;var t=null===aJ?aZ.memoizedState:aJ.next;if(null!==t)aJ=t,aG=e;else{if(null===e){if(null===aZ.alternate)throw Error(l(467));throw Error(l(310))}e={memoizedState:(aG=e).memoizedState,baseState:aG.baseState,baseQueue:aG.baseQueue,queue:aG.queue,next:null},null===aJ?aZ.memoizedState=aJ=e:aJ=aJ.next=e}return aJ}function oo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function oi(e){var t=a1;return a1+=1,null===a2&&(a2=[]),e=as(a2,e,t),t=aZ,null===(null===aJ?t.memoizedState:aJ.next)&&(T.H=null===(t=t.alternate)||null===t.memoizedState?ir:ia),e}function ol(e){if(null!==e&&"object"==typeof e){if("function"==typeof e.then)return oi(e);if(e.$$typeof===x)return rZ(e)}throw Error(l(438,String(e)))}function os(e){var t=null,n=aZ.updateQueue;if(null!==n&&(t=n.memoCache),null==t){var r=aZ.alternate;null!==r&&null!==(r=r.updateQueue)&&null!=(r=r.memoCache)&&(t={data:r.data.map(function(e){return e.slice()}),index:0})}if(null==t&&(t={data:[],index:0}),null===n&&(n=oo(),aZ.updateQueue=n),n.memoCache=t,void 0===(n=t.data[t.index]))for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=N;return t.index++,n}function oc(e,t){return"function"==typeof t?t(e):t}function ou(e){return od(oa(),aG,e)}function od(e,t,n){var r=e.queue;if(null===r)throw Error(l(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(null!==o){if(null!==a){var i=a.next;a.next=o.next,o.next=i}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,null===a)e.memoizedState=o;else{t=a.next;var s=i=null,c=null,u=t,d=!1;do{var f=-0x20000001&u.lane;if(f!==u.lane?(lF&f)===f:(aW&f)===f){var p=u.revertLane;if(0===p)null!==c&&(c=c.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===r5&&(d=!0);else if((aW&p)===p){u=u.next,p===r5&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},null===c?(s=c=f,i=o):c=c.next=f,aZ.lanes|=p,lW|=p;f=u.action,aX&&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},null===c?(s=c=p,i=o):c=c.next=p,aZ.lanes|=f,lW|=f;u=u.next}while(null!==u&&u!==t);if(null===c?i=o:c.next=s,!nO(o,e.memoizedState)&&(iw=!0,d&&null!==(n=r6)))throw n;e.memoizedState=o,e.baseState=i,e.baseQueue=c,r.lastRenderedState=o}return null===a&&(r.lanes=0),[e.memoizedState,r.dispatch]}function of(e){var t=oa(),n=t.queue;if(null===n)throw Error(l(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(null!==a){n.pending=null;var i=a=a.next;do o=e(o,i.action),i=i.next;while(i!==a);nO(o,t.memoizedState)||(iw=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function op(e,t,n){var r=aZ,a=oa(),o=rN;if(o){if(void 0===n)throw Error(l(407));n=n()}else n=t();var i=!nO((aG||a).memoizedState,n);if(i&&(a.memoizedState=n,iw=!0),a=a.queue,oD(og.bind(null,r,a,e),[e]),a.getSnapshot!==t||i||null!==aJ&&1&aJ.memoizedState.tag){if(r.flags|=2048,oA(9,{destroy:void 0},om.bind(null,r,a,n,t),null),null===lM)throw Error(l(349));o||0!=(127&aW)||oh(r,t,n)}return n}function oh(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=aZ.updateQueue)?(t=oo(),aZ.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function om(e,t,n,r){t.value=n,t.getSnapshot=r,oy(t)&&ov(e)}function og(e,t,n){return n(function(){oy(t)&&ov(e)})}function oy(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!nO(e,n)}catch(e){return!0}}function ov(e){var t=n5(e,2);null!==t&&sl(t,e,2)}function ob(e){var t=or();if("function"==typeof e){var n=e;if(e=n(),aX){eh(!0);try{n()}finally{eh(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:oc,lastRenderedState:e},t}function ox(e,t,n,r){return e.baseState=n,od(e,aG,"function"==typeof r?r:oc)}function ow(e,t,n,r,a){if(o9(e))throw Error(l(485));if(null!==(e=t.action)){var o={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};null!==T.T?n(!0):o.isTransition=!1,r(o),null===(n=t.pending)?(o.next=t.pending=o,ok(t,o)):(o.next=n.next,t.pending=n.next=o)}}function ok(e,t){var n=t.action,r=t.payload,a=e.state;if(t.isTransition){var o=T.T,i={};T.T=i;try{var l=n(a,r),s=T.S;null!==s&&s(i,l),oj(e,t,l)}catch(n){oO(e,t,n)}finally{null!==o&&null!==i.types&&(o.types=i.types),T.T=o}}else try{o=n(a,r),oj(e,t,o)}catch(n){oO(e,t,n)}}function oj(e,t,n){null!==n&&"object"==typeof n&&"function"==typeof n.then?n.then(function(n){oS(e,t,n)},function(n){return oO(e,t,n)}):oS(e,t,n)}function oS(e,t,n){t.status="fulfilled",t.value=n,oC(t),e.state=n,null!==(t=e.pending)&&((n=t.next)===t?e.pending=null:(n=n.next,t.next=n,ok(e,n)))}function oO(e,t,n){var r=e.pending;if(e.pending=null,null!==r){r=r.next;do t.status="rejected",t.reason=n,oC(t),t=t.next;while(t!==r)}e.action=null}function oC(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function oN(e,t){return t}function oP(e,t){if(rN){var n=lM.formState;if(null!==n){e:{var r=aZ;if(rN){if(rC){t:{for(var a=rC,o=rE;8!==a.nodeType;)if(!o||null===(a=cA(a.nextSibling))){a=null;break t}a="F!"===(o=a.data)||"F"===o?a:null}if(a){rC=cA(a.nextSibling),r="F!"===a.data;break e}}rz(r)}r=!1}r&&(t=n[0])}}return(n=or()).memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:oN,lastRenderedState:t},n.queue=r,n=o5.bind(null,aZ,r),r.dispatch=n,r=ob(!1),o=o8.bind(null,aZ,!1,r.queue),r=or(),a={state:t,dispatch:null,action:e,pending:null},r.queue=a,n=ow.bind(null,aZ,a,o,n),a.dispatch=n,r.memoizedState=e,[t,n,!1]}function oE(e){return o_(oa(),aG,e)}function o_(e,t,n){if(t=od(e,t,oN)[0],e=ou(oc)[0],"object"==typeof t&&null!==t&&"function"==typeof t.then)try{var r=oi(t)}catch(e){if(e===ar)throw ao;throw e}else r=t;var a=(t=oa()).queue,o=a.dispatch;return n!==t.memoizedState&&(aZ.flags|=2048,oA(9,{destroy:void 0},oz.bind(null,a,n),null)),[r,o,e]}function oz(e,t){e.action=t}function oT(e){var t=oa(),n=aG;if(null!==n)return o_(t,n,e);oa(),t=t.memoizedState;var r=(n=oa()).queue.dispatch;return n.memoizedState=e,[t,r,!1]}function oA(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},null===(t=aZ.updateQueue)&&(t=oo(),aZ.updateQueue=t),null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function oR(){return oa().memoizedState}function oL(e,t,n,r){var a=or();aZ.flags|=e,a.memoizedState=oA(1|t,{destroy:void 0},n,void 0===r?null:r)}function oI(e,t,n,r){var a=oa();r=void 0===r?null:r;var o=a.memoizedState.inst;null!==aG&&null!==r&&a5(r,aG.memoizedState.deps)?a.memoizedState=oA(t,o,n,r):(aZ.flags|=e,a.memoizedState=oA(1|t,o,n,r))}function oM(e,t){oL(8390656,8,e,t)}function oD(e,t){oI(2048,8,e,t)}function oF(e){var t=oa().memoizedState,n={ref:t,nextImpl:e};aZ.flags|=4;var r=aZ.updateQueue;if(null===r)r=oo(),aZ.updateQueue=r,r.events=[n];else{var a=r.events;null===a?r.events=[n]:a.push(n)}return function(){if(0!=(2&lI))throw Error(l(440));return t.impl.apply(void 0,arguments)}}function o$(e,t){return oI(4,2,e,t)}function oU(e,t){return oI(4,4,e,t)}function oH(e,t){if("function"==typeof t){var n=t(e=e());return function(){"function"==typeof n?n():t(null)}}if(null!=t)return t.current=e=e(),function(){t.current=null}}function oB(e,t,n){n=null!=n?n.concat([e]):null,oI(4,4,oH.bind(null,t,e),n)}function oK(){}function oV(e,t){var n=oa();t=void 0===t?null:t;var r=n.memoizedState;return null!==t&&a5(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function oq(e,t){var n=oa();t=void 0===t?null:t;var r=n.memoizedState;if(null!==t&&a5(t,r[1]))return r[0];if(r=e(),aX){eh(!0);try{e()}finally{eh(!1)}}return n.memoizedState=[r,t],r}function oW(e,t,n){return void 0===n||0!=(0x40000000&aW)&&0==(261930&lF)?e.memoizedState=t:(e.memoizedState=n,e=si(),aZ.lanes|=e,lW|=e,n)}function oZ(e,t,n,r){return nO(n,t)?n:null!==aA.current?(nO(e=oW(e,n,r),t)||(iw=!0),e):0==(42&aW)||0!=(0x40000000&aW)&&0==(261930&lF)?(iw=!0,e.memoizedState=n):(e=si(),aZ.lanes|=e,lW|=e,t)}function oG(e,t,n,r,a){var o=A.p;A.p=0!==o&&8>o?o:8;var i=T.T,l={};T.T=l,o8(e,!1,t,n);try{var s=a(),c=T.S;if(null!==c&&c(l,s),null!==s&&"object"==typeof s&&"function"==typeof s.then){var u,d,f=(u=[],d={status:"pending",value:null,reason:null,then:function(e){u.push(e)}},s.then(function(){d.status="fulfilled",d.value=r;for(var e=0;e<u.length;e++)(0,u[e])(r)},function(e){for(d.status="rejected",d.reason=e,e=0;e<u.length;e++)(0,u[e])(void 0)}),d);o6(e,t,f,so(e))}else o6(e,t,r,so(e))}catch(n){o6(e,t,{then:function(){},status:"rejected",reason:n},so())}finally{A.p=o,null!==i&&null!==l.types&&(i.types=l.types),T.T=i}}function oJ(){}function oQ(e,t,n,r){if(5!==e.tag)throw Error(l(476));var a=oY(e).queue;oG(e,a,t,R,null===n?oJ:function(){return oX(e),n(r)})}function oY(e){var t=e.memoizedState;if(null!==t)return t;var n={};return(t={memoizedState:R,baseState:R,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:oc,lastRenderedState:R},next:null}).next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:oc,lastRenderedState:n},next:null},e.memoizedState=t,null!==(e=e.alternate)&&(e.memoizedState=t),t}function oX(e){var t=oY(e);null===t.next&&(t=e.alternate.memoizedState),o6(e,t.next.queue,{},so())}function o0(){return rZ(ue)}function o1(){return oa().memoizedState}function o2(){return oa().memoizedState}function o4(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var n=so(),r=aO(t,e=aS(n),n);null!==r&&(sl(r,t,n),aC(r,t,n)),t={cache:r1()},e.payload=t;return}t=t.return}}function o3(e,t,n){var r=so();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},o9(e)?o7(t,n):null!==(n=n3(e,t,n,r))&&(sl(n,e,r),ie(n,t,r))}function o5(e,t,n){o6(e,t,n,so())}function o6(e,t,n,r){var a={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(o9(e))o7(t,a);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var i=t.lastRenderedState,l=o(i,n);if(a.hasEagerState=!0,a.eagerState=l,nO(l,i))return n4(e,t,a,0),null===lM&&n2(),!1}catch(e){}finally{}if(null!==(n=n3(e,t,a,r)))return sl(n,e,r),ie(n,t,r),!0}return!1}function o8(e,t,n,r){if(r={lane:2,revertLane:sY(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},o9(e)){if(t)throw Error(l(479))}else null!==(t=n3(e,n,r,2))&&sl(t,e,2)}function o9(e){var t=e.alternate;return e===aZ||null!==t&&t===aZ}function o7(e,t){aY=aQ=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ie(e,t,n){if(0!=(4194048&n)){var r=t.lanes;r&=e.pendingLanes,t.lanes=n|=r,eP(e,n)}}var it={readContext:rZ,use:ol,useCallback:a3,useContext:a3,useEffect:a3,useImperativeHandle:a3,useLayoutEffect:a3,useInsertionEffect:a3,useMemo:a3,useReducer:a3,useRef:a3,useState:a3,useDebugValue:a3,useDeferredValue:a3,useTransition:a3,useSyncExternalStore:a3,useId:a3,useHostTransitionStatus:a3,useFormState:a3,useActionState:a3,useOptimistic:a3,useMemoCache:a3,useCacheRefresh:a3};it.useEffectEvent=a3;var ir={readContext:rZ,use:ol,useCallback:function(e,t){return or().memoizedState=[e,void 0===t?null:t],e},useContext:rZ,useEffect:oM,useImperativeHandle:function(e,t,n){n=null!=n?n.concat([e]):null,oL(4194308,4,oH.bind(null,t,e),n)},useLayoutEffect:function(e,t){return oL(4194308,4,e,t)},useInsertionEffect:function(e,t){oL(4,2,e,t)},useMemo:function(e,t){var n=or();t=void 0===t?null:t;var r=e();if(aX){eh(!0);try{e()}finally{eh(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=or();if(void 0!==n){var a=n(t);if(aX){eh(!0);try{n(t)}finally{eh(!1)}}}else a=t;return r.memoizedState=r.baseState=a,r.queue=e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},e=e.dispatch=o3.bind(null,aZ,e),[r.memoizedState,e]},useRef:function(e){return or().memoizedState={current:e}},useState:function(e){var t=(e=ob(e)).queue,n=o5.bind(null,aZ,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:oK,useDeferredValue:function(e,t){return oW(or(),e,t)},useTransition:function(){var e=ob(!1);return e=oG.bind(null,aZ,e.queue,!0,!1),or().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=aZ,a=or();if(rN){if(void 0===n)throw Error(l(407));n=n()}else{if(n=t(),null===lM)throw Error(l(349));0!=(127&lF)||oh(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,oM(og.bind(null,r,o,e),[e]),r.flags|=2048,oA(9,{destroy:void 0},om.bind(null,r,o,n,t),null),n},useId:function(){var e=or(),t=lM.identifierPrefix;if(rN){var n=rb,r=rv;t="_"+t+"R_"+(n=(r&~(1<<32-em(r)-1)).toString(32)+n),0<(n=a0++)&&(t+="H"+n.toString(32)),t+="_"}else t="_"+t+"r_"+(n=a4++).toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:o0,useFormState:oP,useActionState:oP,useOptimistic:function(e){var t=or();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=o8.bind(null,aZ,!0,n),n.dispatch=t,[e,t]},useMemoCache:os,useCacheRefresh:function(){return or().memoizedState=o4.bind(null,aZ)},useEffectEvent:function(e){var t=or(),n={impl:e};return t.memoizedState=n,function(){if(0!=(2&lI))throw Error(l(440));return n.impl.apply(void 0,arguments)}}},ia={readContext:rZ,use:ol,useCallback:oV,useContext:rZ,useEffect:oD,useImperativeHandle:oB,useInsertionEffect:o$,useLayoutEffect:oU,useMemo:oq,useReducer:ou,useRef:oR,useState:function(){return ou(oc)},useDebugValue:oK,useDeferredValue:function(e,t){return oZ(oa(),aG.memoizedState,e,t)},useTransition:function(){var e=ou(oc)[0],t=oa().memoizedState;return["boolean"==typeof e?e:oi(e),t]},useSyncExternalStore:op,useId:o1,useHostTransitionStatus:o0,useFormState:oE,useActionState:oE,useOptimistic:function(e,t){return ox(oa(),aG,e,t)},useMemoCache:os,useCacheRefresh:o2};ia.useEffectEvent=oF;var io={readContext:rZ,use:ol,useCallback:oV,useContext:rZ,useEffect:oD,useImperativeHandle:oB,useInsertionEffect:o$,useLayoutEffect:oU,useMemo:oq,useReducer:of,useRef:oR,useState:function(){return of(oc)},useDebugValue:oK,useDeferredValue:function(e,t){var n=oa();return null===aG?oW(n,e,t):oZ(n,aG.memoizedState,e,t)},useTransition:function(){var e=of(oc)[0],t=oa().memoizedState;return["boolean"==typeof e?e:oi(e),t]},useSyncExternalStore:op,useId:o1,useHostTransitionStatus:o0,useFormState:oT,useActionState:oT,useOptimistic:function(e,t){var n=oa();return null!==aG?ox(n,aG,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:os,useCacheRefresh:o2};function ii(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:f({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}io.useEffectEvent=oF;var il={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=so(),a=aS(r);a.payload=t,null!=n&&(a.callback=n),null!==(t=aO(e,a,r))&&(sl(t,e,r),aC(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=so(),a=aS(r);a.tag=1,a.payload=t,null!=n&&(a.callback=n),null!==(t=aO(e,a,r))&&(sl(t,e,r),aC(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=so(),r=aS(n);r.tag=2,null!=t&&(r.callback=t),null!==(t=aO(e,r,n))&&(sl(t,e,n),aC(t,e,n))}};function is(e,t,n,r,a,o,i){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,i):!t.prototype||!t.prototype.isPureReactComponent||!nC(n,r)||!nC(a,o)}function ic(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&il.enqueueReplaceState(t,t.state,null)}function iu(e,t){var n=t;if("ref"in t)for(var r in n={},t)"ref"!==r&&(n[r]=t[r]);if(e=e.defaultProps)for(var a in n===t&&(n=f({},n)),e)void 0===n[a]&&(n[a]=e[a]);return n}function id(e){nY(e)}function ip(e){console.error(e)}function ih(e){nY(e)}function im(e,t){try{(0,e.onUncaughtError)(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function ig(e,t,n){try{(0,e.onCaughtError)(n.value,{componentStack:n.stack,errorBoundary:1===t.tag?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function iy(e,t,n){return(n=aS(n)).tag=3,n.payload={element:null},n.callback=function(){im(e,t)},n}function iv(e){return(e=aS(e)).tag=3,e}function ib(e,t,n,r){var a=n.type.getDerivedStateFromError;if("function"==typeof a){var o=r.value;e.payload=function(){return a(o)},e.callback=function(){ig(t,n,r)}}var i=n.stateNode;null!==i&&"function"==typeof i.componentDidCatch&&(e.callback=function(){ig(t,n,r),"function"!=typeof a&&(null===l5?l5=new Set([this]):l5.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:null!==e?e:""})})}var ix=Error(l(461)),iw=!1;function ik(e,t,n,r){t.child=null===e?ax(t,null,n,r):ab(t,e.child,n,r)}function ij(e,t,n,r,a){n=n.render;var o=t.ref;if("ref"in r){var i={};for(var l in r)"ref"!==l&&(i[l]=r[l])}else i=r;return(rW(t),r=a6(e,t,n,i,o,a),l=oe(),null===e||iw)?(rN&&l&&rk(t),t.flags|=1,ik(e,t,r,a),t.child):(ot(e,t,a),iq(e,t,a))}function iS(e,t,n,r,a){if(null===e){var o=n.type;return"function"!=typeof o||rt(o)||void 0!==o.defaultProps||null!==n.compare?((e=ra(n.type,null,r,t,t.mode,a)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,iO(e,t,o,r,a))}if(o=e.child,!iW(e,a)){var i=o.memoizedProps;if((n=null!==(n=n.compare)?n:nC)(i,r)&&e.ref===t.ref)return iq(e,t,a)}return t.flags|=1,(e=rn(o,r)).ref=t.ref,e.return=t,t.child=e}function iO(e,t,n,r,a){if(null!==e){var o=e.memoizedProps;if(nC(o,r)&&e.ref===t.ref)if(iw=!1,t.pendingProps=r=o,!iW(e,a))return t.lanes=e.lanes,iq(e,t,a);else 0!=(131072&e.flags)&&(iw=!0)}return iT(e,t,n,r,a)}function iC(e,t,n,r){var a=r.children,o=null!==e?e.memoizedState:null;if(null===e&&null===t.stateNode&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),"hidden"===r.mode){if(0!=(128&t.flags)){if(o=null!==o?o.baseLanes|n:n,null!==e){for(a=0,r=t.child=e.child;null!==r;)a=a|r.lanes|r.childLanes,r=r.sibling;r=a&~o}else r=0,t.child=null;return iP(e,t,o,n,r)}if(0==(0x20000000&n))return r=t.lanes=0x20000000,iP(e,t,null!==o?o.baseLanes|n:n,n,r);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&at(t,null!==o?o.cachePool:null),null!==o?aL(t,o):aI(),aH(t)}else null!==o?(at(t,o.cachePool),aL(t,o),aB(t),t.memoizedState=null):(null!==e&&at(t,null),aI(),aB(t));return ik(e,t,a,n),t.child}function iN(e,t){return null!==e&&22===e.tag||null!==t.stateNode||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function iP(e,t,n,r,a){var o=ae();return t.memoizedState={baseLanes:n,cachePool:o=null===o?null:{parent:r0._currentValue,pool:o}},null!==e&&at(t,null),aI(),aH(t),null!==e&&rV(e,t,r,!0),t.childLanes=a,null}function iE(e,t){return(t=iU({mode:t.mode,children:t.children},e.mode)).ref=e.ref,e.child=t,t.return=e,t}function i_(e,t,n){return ab(t,e.child,null,n),e=iE(t,t.pendingProps),e.flags|=2,aK(t),t.memoizedState=null,e}function iz(e,t){var n=t.ref;if(null===n)null!==e&&null!==e.ref&&(t.flags|=4194816);else{if("function"!=typeof n&&"object"!=typeof n)throw Error(l(284));(null===e||e.ref!==n)&&(t.flags|=4194816)}}function iT(e,t,n,r,a){return(rW(t),n=a6(e,t,n,r,void 0,a),r=oe(),null===e||iw)?(rN&&r&&rk(t),t.flags|=1,ik(e,t,n,a),t.child):(ot(e,t,a),iq(e,t,a))}function iA(e,t,n,r,a,o){return(rW(t),t.updateQueue=null,n=a9(t,r,n,a),a8(e),r=oe(),null===e||iw)?(rN&&r&&rk(t),t.flags|=1,ik(e,t,n,o),t.child):(ot(e,t,o),iq(e,t,o))}function iR(e,t,n,r,a){if(rW(t),null===t.stateNode){var o=n9,i=n.contextType;"object"==typeof i&&null!==i&&(o=rZ(i)),t.memoizedState=null!==(o=new n(r,o)).state&&void 0!==o.state?o.state:null,o.updater=il,t.stateNode=o,o._reactInternals=t,(o=t.stateNode).props=r,o.state=t.memoizedState,o.refs={},ak(t),i=n.contextType,o.context="object"==typeof i&&null!==i?rZ(i):n9,o.state=t.memoizedState,"function"==typeof(i=n.getDerivedStateFromProps)&&(ii(t,n,i,r),o.state=t.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(i=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),i!==o.state&&il.enqueueReplaceState(o,o.state,null),a_(t,r,o,a),aE(),o.state=t.memoizedState),"function"==typeof o.componentDidMount&&(t.flags|=4194308),r=!0}else if(null===e){o=t.stateNode;var l=t.memoizedProps,s=iu(n,l);o.props=s;var c=o.context,u=n.contextType;i=n9,"object"==typeof u&&null!==u&&(i=rZ(u));var d=n.getDerivedStateFromProps;u="function"==typeof d||"function"==typeof o.getSnapshotBeforeUpdate,l=t.pendingProps!==l,u||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(l||c!==i)&&ic(t,o,r,i),aw=!1;var f=t.memoizedState;o.state=f,a_(t,r,o,a),aE(),c=t.memoizedState,l||f!==c||aw?("function"==typeof d&&(ii(t,n,d,r),c=t.memoizedState),(s=aw||is(t,n,s,r,f,c,i))?(u||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||("function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"==typeof o.componentDidMount&&(t.flags|=4194308)):("function"==typeof o.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=i,r=s):("function"==typeof o.componentDidMount&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,aj(e,t),u=iu(n,i=t.memoizedProps),o.props=u,d=t.pendingProps,f=o.context,c=n.contextType,s=n9,"object"==typeof c&&null!==c&&(s=rZ(c)),(c="function"==typeof(l=n.getDerivedStateFromProps)||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(i!==d||f!==s)&&ic(t,o,r,s),aw=!1,f=t.memoizedState,o.state=f,a_(t,r,o,a),aE();var p=t.memoizedState;i!==d||f!==p||aw||null!==e&&null!==e.dependencies&&rq(e.dependencies)?("function"==typeof l&&(ii(t,n,l,r),p=t.memoizedState),(u=aw||is(t,n,u,r,f,p,s)||null!==e&&null!==e.dependencies&&rq(e.dependencies))?(c||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(r,p,s),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,p,s)),"function"==typeof o.componentDidUpdate&&(t.flags|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof o.componentDidUpdate||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),o.props=r,o.state=p,o.context=s,r=u):("function"!=typeof o.componentDidUpdate||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return o=r,iz(e,t),r=0!=(128&t.flags),o||r?(o=t.stateNode,n=r&&"function"!=typeof n.getDerivedStateFromError?null:o.render(),t.flags|=1,null!==e&&r?(t.child=ab(t,e.child,null,a),t.child=ab(t,null,n,a)):ik(e,t,n,a),t.memoizedState=o.state,e=t.child):e=iq(e,t,a),e}function iL(e,t,n,r){return rL(),t.flags|=256,ik(e,t,n,r),t.child}var iI={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function iM(e){return{baseLanes:e,cachePool:an()}}function iD(e,t,n){return e=null!==e?e.childLanes&~n:0,t&&(e|=lJ),e}function iF(e,t,n){var r,a=t.pendingProps,o=!1,i=0!=(128&t.flags);if((r=i)||(r=(null===e||null!==e.memoizedState)&&0!=(2&aV.current)),r&&(o=!0,t.flags&=-129),r=0!=(32&t.flags),t.flags&=-33,null===e){if(rN){if(o?a$(t):aB(t),(e=rC)?null!==(e=null!==(e=c_(e,rE))&&"&"!==e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==ry?{id:rv,overflow:rb}:null,retryLane:0x20000000,hydrationErrors:null},(n=rl(e)).return=t,t.child=n,rO=t,rC=null):e=null,null===e)throw rz(t);return cT(e)?t.lanes=32:t.lanes=0x20000000,null}var s=a.children;return(a=a.fallback,o)?(aB(t),s=iU({mode:"hidden",children:s},o=t.mode),a=ro(a,o,n,null),s.return=t,a.return=t,s.sibling=a,t.child=s,(a=t.child).memoizedState=iM(n),a.childLanes=iD(e,r,n),t.memoizedState=iI,iN(null,a)):(a$(t),i$(t,s))}var c=e.memoizedState;if(null!==c&&null!==(s=c.dehydrated)){if(i)256&t.flags?(a$(t),t.flags&=-257,t=iH(e,t,n)):null!==t.memoizedState?(aB(t),t.child=e.child,t.flags|=128,t=null):(aB(t),s=a.fallback,o=t.mode,a=iU({mode:"visible",children:a.children},o),s=ro(s,o,n,null),s.flags|=2,a.return=t,s.return=t,a.sibling=s,t.child=a,ab(t,e.child,null,n),(a=t.child).memoizedState=iM(n),a.childLanes=iD(e,r,n),t.memoizedState=iI,t=iN(null,a));else if(a$(t),cT(s)){if(r=s.nextSibling&&s.nextSibling.dataset)var u=r.dgst;r=u,(a=Error(l(419))).stack="",a.digest=r,rM({value:a,source:null,stack:null}),t=iH(e,t,n)}else if(iw||rV(e,t,n,!1),r=0!=(n&e.childLanes),iw||r){if(null!==(r=lM)&&0!==(a=eE(r,n))&&a!==c.retryLane)throw c.retryLane=a,n5(e,a),sl(r,e,a),ix;cz(s)||sv(),t=iH(e,t,n)}else cz(s)?(t.flags|=192,t.child=e.child,t=null):(e=c.treeContext,rC=cA(s.nextSibling),rO=t,rN=!0,rP=null,rE=!1,null!==e&&rS(t,e),t=i$(t,a.children),t.flags|=4096);return t}return o?(aB(t),s=a.fallback,o=t.mode,u=(c=e.child).sibling,(a=rn(c,{mode:"hidden",children:a.children})).subtreeFlags=0x3e00000&c.subtreeFlags,null!==u?s=rn(u,s):(s=ro(s,o,n,null),s.flags|=2),s.return=t,a.return=t,a.sibling=s,t.child=a,iN(null,a),a=t.child,null===(s=e.child.memoizedState)?s=iM(n):(null!==(o=s.cachePool)?(c=r0._currentValue,o=o.parent!==c?{parent:c,pool:c}:o):o=an(),s={baseLanes:s.baseLanes|n,cachePool:o}),a.memoizedState=s,a.childLanes=iD(e,r,n),t.memoizedState=iI,iN(e.child,a)):(a$(t),e=(n=e.child).sibling,(n=rn(n,{mode:"visible",children:a.children})).return=t,n.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n)}function i$(e,t){return(t=iU({mode:"visible",children:t},e.mode)).return=e,e.child=t}function iU(e,t){return(e=re(22,e,null,t)).lanes=0,e}function iH(e,t,n){return ab(t,e.child,null,n),e=i$(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function iB(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),rB(e.return,t,n)}function iK(e,t,n,r,a,o){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:a,treeForkCount:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=a,i.treeForkCount=o)}function iV(e,t,n){var r=t.pendingProps,a=r.revealOrder,o=r.tail;r=r.children;var i=aV.current,l=0!=(2&i);if(l?(i=1&i|2,t.flags|=128):i&=1,F(aV,i),ik(e,t,r,n),r=rN?rh:0,!l&&null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&iB(e,n,t);else if(19===e.tag)iB(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(a){case"forwards":for(a=null,n=t.child;null!==n;)null!==(e=n.alternate)&&null===aq(e)&&(a=n),n=n.sibling;null===(n=a)?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),iK(t,!1,a,n,o,r);break;case"backwards":case"unstable_legacy-backwards":for(n=null,a=t.child,t.child=null;null!==a;){if(null!==(e=a.alternate)&&null===aq(e)){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}iK(t,!0,n,null,o,r);break;case"together":iK(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function iq(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),lW|=t.lanes,0==(n&t.childLanes)){if(null===e)return null;else if(rV(e,t,n,!1),0==(n&t.childLanes))return null}if(null!==e&&t.child!==e.child)throw Error(l(153));if(null!==t.child){for(n=rn(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=rn(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function iW(e,t){return 0!=(e.lanes&t)||!!(null!==(e=e.dependencies)&&rq(e))}function iZ(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps)iw=!0;else{if(!iW(e,n)&&0==(128&t.flags))return iw=!1,function(e,t,n){switch(t.tag){case 3:K(t,t.stateNode.containerInfo),rU(t,r0,e.memoizedState.cache),rL();break;case 27:case 5:q(t);break;case 4:K(t,t.stateNode.containerInfo);break;case 10:rU(t,t.type,t.memoizedProps.value);break;case 31:if(null!==t.memoizedState)return t.flags|=128,aU(t),null;break;case 13:var r=t.memoizedState;if(null!==r){if(null!==r.dehydrated)return a$(t),t.flags|=128,null;if(0!=(n&t.child.childLanes))return iF(e,t,n);return a$(t),null!==(e=iq(e,t,n))?e.sibling:null}a$(t);break;case 19:var a=0!=(128&e.flags);if((r=0!=(n&t.childLanes))||(rV(e,t,n,!1),r=0!=(n&t.childLanes)),a){if(r)return iV(e,t,n);t.flags|=128}if(null!==(a=t.memoizedState)&&(a.rendering=null,a.tail=null,a.lastEffect=null),F(aV,aV.current),!r)return null;break;case 22:return t.lanes=0,iC(e,t,n,t.pendingProps);case 24:rU(t,r0,e.memoizedState.cache)}return iq(e,t,n)}(e,t,n);iw=0!=(131072&e.flags)}else iw=!1,rN&&0!=(1048576&t.flags)&&rw(t,rh,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=ac(t.elementType),t.type=e,"function"==typeof e)rt(e)?(r=iu(e,r),t.tag=1,t=iR(null,t,e,r,n)):(t.tag=0,t=iT(null,t,e,r,n));else{if(null!=e){var a=e.$$typeof;if(a===w){t.tag=11,t=ij(null,t,e,r,n);break e}if(a===S){t.tag=14,t=iS(null,t,e,r,n);break e}}throw Error(l(306,t=function e(t){if(null==t)return null;if("function"==typeof t)return t.$$typeof===_?null:t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case g:return"Fragment";case v:return"Profiler";case y:return"StrictMode";case k:return"Suspense";case j:return"SuspenseList";case C:return"Activity"}if("object"==typeof t)switch(t.$$typeof){case m:return"Portal";case x:return t.displayName||"Context";case b:return(t._context.displayName||"Context")+".Consumer";case w:var n=t.render;return(t=t.displayName)||(t=""!==(t=n.displayName||n.name||"")?"ForwardRef("+t+")":"ForwardRef"),t;case S:return null!==(n=t.displayName||null)?n:e(t.type)||"Memo";case O:n=t._payload,t=t._init;try{return e(t(n))}catch(e){}}return null}(e)||e,""))}}return t;case 0:return iT(e,t,t.type,t.pendingProps,n);case 1:return a=iu(r=t.type,t.pendingProps),iR(e,t,r,a,n);case 3:e:{if(K(t,t.stateNode.containerInfo),null===e)throw Error(l(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,aj(e,t),a_(t,r,null,n);var i=t.memoizedState;if(rU(t,r0,r=i.cache),r!==o.cache&&rK(t,[r0],n,!0),aE(),r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=iL(e,t,r,n);break e}else if(r!==a){rM(a=ru(Error(l(424)),t)),t=iL(e,t,r,n);break e}else for(rC=cA((e=9===(e=t.stateNode.containerInfo).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e).firstChild),rO=t,rN=!0,rP=null,rE=!0,n=ax(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling;else{if(rL(),r===a){t=iq(e,t,n);break e}ik(e,t,r,n)}t=t.child}return t;case 26:return iz(e,t),null===e?(n=cV(t.type,null,t.pendingProps,null))?t.memoizedState=n:rN||(n=t.type,e=t.pendingProps,(r=cg(H.current).createElement(n))[eL]=t,r[eI]=e,cf(r,n,e),eZ(r),t.stateNode=r):t.memoizedState=cV(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return q(t),null===e&&rN&&(r=t.stateNode=cM(t.type,t.pendingProps,H.current),rO=t,rE=!0,a=rC,cC(t.type)?(cR=a,rC=cA(r.firstChild)):rC=a),ik(e,t,t.pendingProps.children,n),iz(e,t),null===e&&(t.flags|=4194304),t.child;case 5:return null===e&&rN&&((a=r=rC)&&(null!==(r=function(e,t,n,r){for(;1===e.nodeType;){if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&("INPUT"!==e.nodeName||"hidden"!==e.type))break}else if(r){if(!e[eH])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if("stylesheet"===(a=e.getAttribute("rel"))&&e.hasAttribute("data-precedence")||a!==n.rel||e.getAttribute("href")!==(null==n.href||""===n.href?null:n.href)||e.getAttribute("crossorigin")!==(null==n.crossOrigin?null:n.crossOrigin)||e.getAttribute("title")!==(null==n.title?null:n.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(((a=e.getAttribute("src"))!==(null==n.src?null:n.src)||e.getAttribute("type")!==(null==n.type?null:n.type)||e.getAttribute("crossorigin")!==(null==n.crossOrigin?null:n.crossOrigin))&&a&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else{if("input"!==t||"hidden"!==e.type)return e;var a=null==n.name?null:""+n.name;if("hidden"===n.type&&e.getAttribute("name")===a)return e}if(null===(e=cA(e.nextSibling)))break}return null}(r,t.type,t.pendingProps,rE))?(t.stateNode=r,rO=t,rC=cA(r.firstChild),rE=!1,a=!0):a=!1),a||rz(t)),q(t),a=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,r=o.children,cb(a,o)?r=null:null!==i&&cb(a,i)&&(t.flags|=32),null!==t.memoizedState&&(ue._currentValue=a=a6(e,t,a7,null,null,n)),iz(e,t),ik(e,t,r,n),t.child;case 6:return null===e&&rN&&((e=n=rC)&&(null!==(n=function(e,t,n){if(""===t)return null;for(;3!==e.nodeType;)if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!n||null===(e=cA(e.nextSibling)))return null;return e}(n,t.pendingProps,rE))?(t.stateNode=n,rO=t,rC=null,e=!0):e=!1),e||rz(t)),null;case 13:return iF(e,t,n);case 4:return K(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=ab(t,null,r,n):ik(e,t,r,n),t.child;case 11:return ij(e,t,t.type,t.pendingProps,n);case 7:return ik(e,t,t.pendingProps,n),t.child;case 8:case 12:return ik(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,rU(t,t.type,r.value),ik(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,rW(t),r=r(a=rZ(a)),t.flags|=1,ik(e,t,r,n),t.child;case 14:return iS(e,t,t.type,t.pendingProps,n);case 15:return iO(e,t,t.type,t.pendingProps,n);case 19:return iV(e,t,n);case 31:var s=e,c=t,u=n,d=c.pendingProps,f=0!=(128&c.flags);if(c.flags&=-129,null===s){if(rN){if("hidden"===d.mode)return s=iE(c,d),c.lanes=0x20000000,iN(null,s);if(aU(c),(s=rC)?null!==(s=null!==(s=c_(s,rE))&&"&"===s.data?s:null)&&(c.memoizedState={dehydrated:s,treeContext:null!==ry?{id:rv,overflow:rb}:null,retryLane:0x20000000,hydrationErrors:null},(u=rl(s)).return=c,c.child=u,rO=c,rC=null):s=null,null===s)throw rz(c);return c.lanes=0x20000000,null}return iE(c,d)}var p=s.memoizedState;if(null!==p){var h=p.dehydrated;if(aU(c),f)if(256&c.flags)c.flags&=-257,c=i_(s,c,u);else if(null!==c.memoizedState)c.child=s.child,c.flags|=128,c=null;else throw Error(l(558));else if(iw||rV(s,c,u,!1),f=0!=(u&s.childLanes),iw||f){if(null!==(d=lM)&&0!==(h=eE(d,u))&&h!==p.retryLane)throw p.retryLane=h,n5(s,h),sl(d,s,h),ix;sv(),c=i_(s,c,u)}else s=p.treeContext,rC=cA(h.nextSibling),rO=c,rN=!0,rP=null,rE=!1,null!==s&&rS(c,s),c=iE(c,d),c.flags|=4096;return c}return(s=rn(s.child,{mode:d.mode,children:d.children})).ref=c.ref,c.child=s,s.return=c,s;case 22:return iC(e,t,n,t.pendingProps);case 24:return rW(t),r=rZ(r0),null===e?(null===(a=ae())&&(a=lM,o=r1(),a.pooledCache=o,o.refCount++,null!==o&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},ak(t),rU(t,r0,a)):(0!=(e.lanes&n)&&(aj(e,t),a_(t,null,null,n),aE()),a=e.memoizedState,o=t.memoizedState,a.parent!==r?(a={parent:r,cache:r},t.memoizedState=a,0===t.lanes&&(t.memoizedState=t.updateQueue.baseState=a),rU(t,r0,r)):(rU(t,r0,r=o.cache),r!==a.cache&&rK(t,[r0],n,!0))),ik(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(l(156,t.tag))}function iG(e){e.flags|=4}function iJ(e,t,n,r,a){if((t=0!=(32&e.mode))&&(t=!1),t){if(e.flags|=0x1000000,(0x13ffff40&a)===a)if(e.stateNode.complete)e.flags|=8192;else if(sm())e.flags|=8192;else throw au=ai,aa}else e.flags&=-0x1000001}function iQ(e,t){if("stylesheet"!==t.type||0!=(4&t.state.loading))e.flags&=-0x1000001;else if(e.flags|=0x1000000,!c3(t))if(sm())e.flags|=8192;else throw au=ai,aa}function iY(e,t){null!==t&&(e.flags|=4),16384&e.flags&&(t=22!==e.tag?eS():0x20000000,e.lanes|=t,lQ|=t)}function iX(e,t){if(!rN)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function i0(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var a=e.child;null!==a;)n|=a.lanes|a.childLanes,r|=0x3e00000&a.subtreeFlags,r|=0x3e00000&a.flags,a.return=e,a=a.sibling;else for(a=e.child;null!==a;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags,r|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function i1(e,t){switch(rj(t),t.tag){case 3:rH(r0),V();break;case 26:case 27:case 5:W(t);break;case 4:V();break;case 31:null!==t.memoizedState&&aK(t);break;case 13:aK(t);break;case 19:D(aV);break;case 10:rH(t.type);break;case 22:case 23:aK(t),aM(),null!==e&&D(r7);break;case 24:rH(r0)}}function i2(e,t){try{var n=t.updateQueue,r=null!==n?n.lastEffect:null;if(null!==r){var a=r.next;n=a;do{if((n.tag&e)===e){r=void 0;var o=n.create;n.inst.destroy=r=o()}n=n.next}while(n!==a)}}catch(e){sA(t,t.return,e)}}function i4(e,t,n){try{var r=t.updateQueue,a=null!==r?r.lastEffect:null;if(null!==a){var o=a.next;r=o;do{if((r.tag&e)===e){var i=r.inst,l=i.destroy;if(void 0!==l){i.destroy=void 0,a=t;try{l()}catch(e){sA(a,n,e)}}}r=r.next}while(r!==o)}}catch(e){sA(t,t.return,e)}}function i3(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{aT(t,n)}catch(t){sA(e,e.return,t)}}}function i5(e,t,n){n.props=iu(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){sA(e,t,n)}}function i6(e,t){try{var n=e.ref;if(null!==n){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;default:r=e.stateNode}"function"==typeof n?e.refCleanup=n(r):n.current=r}}catch(n){sA(e,t,n)}}function i8(e,t){var n=e.ref,r=e.refCleanup;if(null!==n)if("function"==typeof r)try{r()}catch(n){sA(e,t,n)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"==typeof n)try{n(null)}catch(n){sA(e,t,n)}else n.current=null}function i9(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){sA(e,e.return,t)}}function i7(e,t,n){try{var r=e.stateNode;(function(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,i=null,s=null,c=null,u=null,d=null;for(h in n){var f=n[h];if(n.hasOwnProperty(h)&&null!=f)switch(h){case"checked":case"value":break;case"defaultValue":c=f;default:r.hasOwnProperty(h)||cu(e,t,h,null,r,f)}}for(var p in r){var h=r[p];if(f=n[p],r.hasOwnProperty(p)&&(null!=h||null!=f))switch(p){case"type":o=h;break;case"name":a=h;break;case"checked":u=h;break;case"defaultChecked":d=h;break;case"value":i=h;break;case"defaultValue":s=h;break;case"children":case"dangerouslySetInnerHTML":if(null!=h)throw Error(l(137,t));break;default:h!==f&&cu(e,t,p,h,r,f)}}tn(e,i,s,c,u,d,o,a);return;case"select":for(o in h=i=s=p=null,n)if(c=n[o],n.hasOwnProperty(o)&&null!=c)switch(o){case"value":break;case"multiple":h=c;default:r.hasOwnProperty(o)||cu(e,t,o,null,r,c)}for(a in r)if(o=r[a],c=n[a],r.hasOwnProperty(a)&&(null!=o||null!=c))switch(a){case"value":p=o;break;case"defaultValue":s=o;break;case"multiple":i=o;default:o!==c&&cu(e,t,a,o,r,c)}t=s,n=i,r=h,null!=p?to(e,!!n,p,!1):!!r!=!!n&&(null!=t?to(e,!!n,t,!0):to(e,!!n,n?[]:"",!1));return;case"textarea":for(s in h=p=null,n)if(a=n[s],n.hasOwnProperty(s)&&null!=a&&!r.hasOwnProperty(s))switch(s){case"value":case"children":break;default:cu(e,t,s,null,r,a)}for(i in r)if(a=r[i],o=n[i],r.hasOwnProperty(i)&&(null!=a||null!=o))switch(i){case"value":p=a;break;case"defaultValue":h=a;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=a)throw Error(l(91));break;default:a!==o&&cu(e,t,i,a,r,o)}ti(e,p,h);return;case"option":for(var m in n)p=n[m],n.hasOwnProperty(m)&&null!=p&&!r.hasOwnProperty(m)&&("selected"===m?e.selected=!1:cu(e,t,m,null,r,p));for(c in r)p=r[c],h=n[c],r.hasOwnProperty(c)&&p!==h&&(null!=p||null!=h)&&("selected"===c?e.selected=p&&"function"!=typeof p&&"symbol"!=typeof p:cu(e,t,c,p,r,h));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)&&null!=p&&!r.hasOwnProperty(g)&&cu(e,t,g,null,r,p);for(u in r)if(p=r[u],h=n[u],r.hasOwnProperty(u)&&p!==h&&(null!=p||null!=h))switch(u){case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(l(137,t));break;default:cu(e,t,u,p,r,h)}return;default:if(tf(t)){for(var y in n)p=n[y],n.hasOwnProperty(y)&&void 0!==p&&!r.hasOwnProperty(y)&&cd(e,t,y,void 0,r,p);for(d in r)p=r[d],h=n[d],r.hasOwnProperty(d)&&p!==h&&(void 0!==p||void 0!==h)&&cd(e,t,d,p,r,h);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&null!=p&&!r.hasOwnProperty(v)&&cu(e,t,v,null,r,p);for(f in r)p=r[f],h=n[f],r.hasOwnProperty(f)&&p!==h&&(null!=p||null!=h)&&cu(e,t,f,p,r,h)})(r,e.type,n,t),r[eI]=t}catch(t){sA(e,e.return,t)}}function le(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag&&cC(e.type)||4===e.tag}function lt(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||le(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(27===e.tag&&cC(e.type)||2&e.flags||null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ln(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&(27===r&&cC(e.type)&&(n=e.stateNode),null!==(e=e.child)))for(ln(e,t,n),e=e.sibling;null!==e;)ln(e,t,n),e=e.sibling}function lr(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);cf(t,r,n),t[eL]=e,t[eI]=n}catch(t){sA(e,e.return,t)}}var la=!1,lo=!1,li=!1,ll="function"==typeof WeakSet?WeakSet:Set,ls=null;function lc(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:lw(e,n),4&r&&i2(5,n);break;case 1:if(lw(e,n),4&r)if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(e){sA(n,n.return,e)}else{var a=iu(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){sA(n,n.return,e)}}64&r&&i3(n),512&r&&i6(n,n.return);break;case 3:if(lw(e,n),64&r&&null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:t=n.child.stateNode}try{aT(e,t)}catch(e){sA(n,n.return,e)}}break;case 27:null===t&&4&r&&lr(n);case 26:case 5:lw(e,n),null===t&&4&r&&i9(n),512&r&&i6(n,n.return);break;case 12:default:lw(e,n);break;case 31:lw(e,n),4&r&&lh(e,n);break;case 13:lw(e,n),4&r&&lm(e,n),64&r&&null!==(e=n.memoizedState)&&null!==(e=e.dehydrated)&&function(e,t){var n=e.ownerDocument;if("$~"===e.data)e._reactRetry=t;else if("$?"!==e.data||"loading"!==n.readyState)t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}(e,n=sM.bind(null,n));break;case 22:if(!(r=null!==n.memoizedState||la)){t=null!==t&&null!==t.memoizedState||lo,a=la;var o=lo;la=r,(lo=t)&&!o?function e(t,n,r){for(r=r&&0!=(8772&n.subtreeFlags),n=n.child;null!==n;){var a=n.alternate,o=t,i=n,l=i.flags;switch(i.tag){case 0:case 11:case 15:e(o,i,r),i2(4,i);break;case 1:if(e(o,i,r),"function"==typeof(o=(a=i).stateNode).componentDidMount)try{o.componentDidMount()}catch(e){sA(a,a.return,e)}if(null!==(o=(a=i).updateQueue)){var s=a.stateNode;try{var c=o.shared.hiddenCallbacks;if(null!==c)for(o.shared.hiddenCallbacks=null,o=0;o<c.length;o++)az(c[o],s)}catch(e){sA(a,a.return,e)}}r&&64&l&&i3(i),i6(i,i.return);break;case 27:lr(i);case 26:case 5:e(o,i,r),r&&null===a&&4&l&&i9(i),i6(i,i.return);break;case 12:default:e(o,i,r);break;case 31:e(o,i,r),r&&4&l&&lh(o,i);break;case 13:e(o,i,r),r&&4&l&&lm(o,i);break;case 22:null===i.memoizedState&&e(o,i,r),i6(i,i.return);case 30:}n=n.sibling}}(e,n,0!=(8772&n.subtreeFlags)):lw(e,n),la=a,lo=o}case 30:}}var lu=null,ld=!1;function lf(e,t,n){for(n=n.child;null!==n;)lp(e,t,n),n=n.sibling}function lp(e,t,n){if(ep&&"function"==typeof ep.onCommitFiberUnmount)try{ep.onCommitFiberUnmount(ef,n)}catch(e){}switch(n.tag){case 26:lo||i8(n,t),lf(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode).parentNode.removeChild(n);break;case 27:lo||i8(n,t);var r=lu,a=ld;cC(n.type)&&(lu=n.stateNode,ld=!1),lf(e,t,n),cD(n.stateNode),lu=r,ld=a;break;case 5:lo||i8(n,t);case 6:if(r=lu,a=ld,lu=null,lf(e,t,n),lu=r,ld=a,null!==lu)if(ld)try{(9===lu.nodeType?lu.body:"HTML"===lu.nodeName?lu.ownerDocument.body:lu).removeChild(n.stateNode)}catch(e){sA(n,t,e)}else try{lu.removeChild(n.stateNode)}catch(e){sA(n,t,e)}break;case 18:null!==lu&&(ld?(cN(9===(e=lu).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,n.stateNode),uT(e)):cN(lu,n.stateNode));break;case 4:r=lu,a=ld,lu=n.stateNode.containerInfo,ld=!0,lf(e,t,n),lu=r,ld=a;break;case 0:case 11:case 14:case 15:i4(2,n,t),lo||i4(4,n,t),lf(e,t,n);break;case 1:lo||(i8(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount&&i5(n,t,r)),lf(e,t,n);break;case 21:default:lf(e,t,n);break;case 22:lo=(r=lo)||null!==n.memoizedState,lf(e,t,n),lo=r}}function lh(e,t){if(null===t.memoizedState&&null!==(e=t.alternate)&&null!==(e=e.memoizedState)){e=e.dehydrated;try{uT(e)}catch(e){sA(t,t.return,e)}}}function lm(e,t){if(null===t.memoizedState&&null!==(e=t.alternate)&&null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))try{uT(e)}catch(e){sA(t,t.return,e)}}function lg(e,t){var n=function(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new ll),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new ll),t;default:throw Error(l(435,e.tag))}}(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=sD.bind(null,e,t);t.then(r,r)}})}function ly(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var a=n[r],o=e,i=t,s=i;e:for(;null!==s;){switch(s.tag){case 27:if(cC(s.type)){lu=s.stateNode,ld=!1;break e}break;case 5:lu=s.stateNode,ld=!1;break e;case 3:case 4:lu=s.stateNode.containerInfo,ld=!0;break e}s=s.return}if(null===lu)throw Error(l(160));lp(o,i,a),lu=null,ld=!1,null!==(o=a.alternate)&&(o.return=null),a.return=null}if(13886&t.subtreeFlags)for(t=t.child;null!==t;)lb(t,e),t=t.sibling}var lv=null;function lb(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ly(t,e),lx(e),4&r&&(i4(3,e,e.return),i2(3,e),i4(5,e,e.return));break;case 1:ly(t,e),lx(e),512&r&&(lo||null===n||i8(n,n.return)),64&r&&la&&null!==(e=e.updateQueue)&&null!==(r=e.callbacks)&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=null===n?r:n.concat(r));break;case 26:var a=lv;if(ly(t,e),lx(e),512&r&&(lo||null===n||i8(n,n.return)),4&r){var o=null!==n?n.memoizedState:null;if(r=e.memoizedState,null===n)if(null===r)if(null===e.stateNode){e:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;t:switch(r){case"title":(!(o=a.getElementsByTagName("title")[0])||o[eH]||o[eL]||"http://www.w3.org/2000/svg"===o.namespaceURI||o.hasAttribute("itemprop"))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector("head > title"))),cf(o,r,n),o[eL]=e,eZ(o),r=o;break e;case"link":var i=c2("link","href",a).get(r+(n.href||""));if(i){for(var s=0;s<i.length;s++)if((o=i[s]).getAttribute("href")===(null==n.href||""===n.href?null:n.href)&&o.getAttribute("rel")===(null==n.rel?null:n.rel)&&o.getAttribute("title")===(null==n.title?null:n.title)&&o.getAttribute("crossorigin")===(null==n.crossOrigin?null:n.crossOrigin)){i.splice(s,1);break t}}cf(o=a.createElement(r),r,n),a.head.appendChild(o);break;case"meta":if(i=c2("meta","content",a).get(r+(n.content||""))){for(s=0;s<i.length;s++)if((o=i[s]).getAttribute("content")===(null==n.content?null:""+n.content)&&o.getAttribute("name")===(null==n.name?null:n.name)&&o.getAttribute("property")===(null==n.property?null:n.property)&&o.getAttribute("http-equiv")===(null==n.httpEquiv?null:n.httpEquiv)&&o.getAttribute("charset")===(null==n.charSet?null:n.charSet)){i.splice(s,1);break t}}cf(o=a.createElement(r),r,n),a.head.appendChild(o);break;default:throw Error(l(468,r))}o[eL]=e,eZ(o),r=o}e.stateNode=r}else c4(a,e.type,e.stateNode);else e.stateNode=cQ(a,r,e.memoizedProps);else o!==r?(null===o?null!==n.stateNode&&(n=n.stateNode).parentNode.removeChild(n):o.count--,null===r?c4(a,e.type,e.stateNode):cQ(a,r,e.memoizedProps)):null===r&&null!==e.stateNode&&i7(e,e.memoizedProps,n.memoizedProps)}break;case 27:ly(t,e),lx(e),512&r&&(lo||null===n||i8(n,n.return)),null!==n&&4&r&&i7(e,e.memoizedProps,n.memoizedProps);break;case 5:if(ly(t,e),lx(e),512&r&&(lo||null===n||i8(n,n.return)),32&e.flags){a=e.stateNode;try{ts(a,"")}catch(t){sA(e,e.return,t)}}4&r&&null!=e.stateNode&&(a=e.memoizedProps,i7(e,a,null!==n?n.memoizedProps:a)),1024&r&&(li=!0);break;case 6:if(ly(t,e),lx(e),4&r){if(null===e.stateNode)throw Error(l(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){sA(e,e.return,t)}}break;case 3:if(c1=null,a=lv,lv=cU(t.containerInfo),ly(t,e),lv=a,lx(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{uT(t.containerInfo)}catch(t){sA(e,e.return,t)}li&&(li=!1,function e(t){if(1024&t.subtreeFlags)for(t=t.child;null!==t;){var n=t;e(n),5===n.tag&&1024&n.flags&&n.stateNode.reset(),t=t.sibling}}(e));break;case 4:r=lv,lv=cU(e.stateNode.containerInfo),ly(t,e),lx(e),lv=r;break;case 12:default:ly(t,e),lx(e);break;case 31:case 19:ly(t,e),lx(e),4&r&&null!==(r=e.updateQueue)&&(e.updateQueue=null,lg(e,r));break;case 13:ly(t,e),lx(e),8192&e.child.flags&&null!==e.memoizedState!=(null!==n&&null!==n.memoizedState)&&(l1=er()),4&r&&null!==(r=e.updateQueue)&&(e.updateQueue=null,lg(e,r));break;case 22:a=null!==e.memoizedState;var c=null!==n&&null!==n.memoizedState,u=la,d=lo;if(la=u||a,lo=d||c,ly(t,e),lo=d,la=u,lx(e),8192&r)e:for((t=e.stateNode)._visibility=a?-2&t._visibility:1|t._visibility,a&&(null===n||c||la||lo||function e(t){for(t=t.child;null!==t;){var n=t;switch(n.tag){case 0:case 11:case 14:case 15:i4(4,n,n.return),e(n);break;case 1:i8(n,n.return);var r=n.stateNode;"function"==typeof r.componentWillUnmount&&i5(n,n.return,r),e(n);break;case 27:cD(n.stateNode);case 26:case 5:i8(n,n.return),e(n);break;case 22:null===n.memoizedState&&e(n);break;default:e(n)}t=t.sibling}}(e)),n=null,t=e;;){if(5===t.tag||26===t.tag){if(null===n){c=n=t;try{if(o=c.stateNode,a)i=o.style,"function"==typeof i.setProperty?i.setProperty("display","none","important"):i.display="none";else{s=c.stateNode;var f=c.memoizedProps.style,p=null!=f&&f.hasOwnProperty("display")?f.display:null;s.style.display=null==p||"boolean"==typeof p?"":(""+p).trim()}}catch(e){sA(c,c.return,e)}}}else if(6===t.tag){if(null===n){c=t;try{c.stateNode.nodeValue=a?"":c.memoizedProps}catch(e){sA(c,c.return,e)}}}else if(18===t.tag){if(null===n){c=t;try{var h=c.stateNode;a?cP(h,!0):cP(c.stateNode,!1)}catch(e){sA(c,c.return,e)}}}else if((22!==t.tag&&23!==t.tag||null===t.memoizedState||t===e)&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}4&r&&null!==(r=e.updateQueue)&&null!==(n=r.retryQueue)&&(r.retryQueue=null,lg(e,n));case 30:case 21:}}function lx(e){var t=e.flags;if(2&t){try{for(var n,r=e.return;null!==r;){if(le(r)){n=r;break}r=r.return}if(null==n)throw Error(l(160));switch(n.tag){case 27:var a=n.stateNode,o=lt(e);ln(e,o,a);break;case 5:var i=n.stateNode;32&n.flags&&(ts(i,""),n.flags&=-33);var s=lt(e);ln(e,s,i);break;case 3:case 4:var c=n.stateNode.containerInfo,u=lt(e);!function e(t,n,r){var a=t.tag;if(5===a||6===a)t=t.stateNode,n?(9===r.nodeType?r.body:"HTML"===r.nodeName?r.ownerDocument.body:r).insertBefore(t,n):((n=9===r.nodeType?r.body:"HTML"===r.nodeName?r.ownerDocument.body:r).appendChild(t),null!=(r=r._reactRootContainer)||null!==n.onclick||(n.onclick=tg));else if(4!==a&&(27===a&&cC(t.type)&&(r=t.stateNode,n=null),null!==(t=t.child)))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,u,c);break;default:throw Error(l(161))}}catch(t){sA(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function lw(e,t){if(8772&t.subtreeFlags)for(t=t.child;null!==t;)lc(e,t.alternate,t),t=t.sibling}function lk(e,t){var n=null;null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),e=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(e=t.memoizedState.cachePool.pool),e!==n&&(null!=e&&e.refCount++,null!=n&&r2(n))}function lj(e,t){e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&r2(e))}function lS(e,t,n,r){if(10256&t.subtreeFlags)for(t=t.child;null!==t;)lO(e,t,n,r),t=t.sibling}function lO(e,t,n,r){var a=t.flags;switch(t.tag){case 0:case 11:case 15:lS(e,t,n,r),2048&a&&i2(9,t);break;case 1:case 31:case 13:default:lS(e,t,n,r);break;case 3:lS(e,t,n,r),2048&a&&(e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&r2(e)));break;case 12:if(2048&a){lS(e,t,n,r),e=t.stateNode;try{var o=t.memoizedProps,i=o.id,l=o.onPostCommit;"function"==typeof l&&l(i,null===t.alternate?"mount":"update",e.passiveEffectDuration,-0)}catch(e){sA(t,t.return,e)}}else lS(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,i=t.alternate,null!==t.memoizedState?2&o._visibility?lS(e,t,n,r):lC(e,t):2&o._visibility?lS(e,t,n,r):(o._visibility|=2,function e(t,n,r,a,o){for(o=o&&0!=(10256&n.subtreeFlags),n=n.child;null!==n;){var i=n,l=i.flags;switch(i.tag){case 0:case 11:case 15:e(t,i,r,a,o),i2(8,i);break;case 23:break;case 22:var s=i.stateNode;null!==i.memoizedState?2&s._visibility?e(t,i,r,a,o):lC(t,i):(s._visibility|=2,e(t,i,r,a,o)),o&&2048&l&&lk(i.alternate,i);break;case 24:e(t,i,r,a,o),o&&2048&l&&lj(i.alternate,i);break;default:e(t,i,r,a,o)}n=n.sibling}}(e,t,n,r,0!=(10256&t.subtreeFlags))),2048&a&&lk(i,t);break;case 24:lS(e,t,n,r),2048&a&&lj(t.alternate,t)}}function lC(e,t){if(10256&t.subtreeFlags)for(t=t.child;null!==t;){var n=t,r=n.flags;switch(n.tag){case 22:lC(e,n),2048&r&&lk(n.alternate,n);break;case 24:lC(e,n),2048&r&&lj(n.alternate,n);break;default:lC(e,n)}t=t.sibling}}var lN=8192;function lP(e,t,n){if(e.subtreeFlags&lN)for(e=e.child;null!==e;)lE(e,t,n),e=e.sibling}function lE(e,t,n){switch(e.tag){case 26:lP(e,t,n),e.flags&lN&&null!==e.memoizedState&&function(e,t,n,r){if("stylesheet"===n.type&&("string"!=typeof r.media||!1!==matchMedia(r.media).matches)&&0==(4&n.state.loading)){if(null===n.instance){var a=cq(r.href),o=t.querySelector(cW(a));if(o){null!==(t=o._p)&&"object"==typeof t&&"function"==typeof t.then&&(e.count++,e=c6.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=o,eZ(o);return}o=t.ownerDocument||t,r=cZ(r),(a=cF.get(a))&&cX(r,a),eZ(o=o.createElement("link"));var i=o;i._p=new Promise(function(e,t){i.onload=e,i.onerror=t}),cf(o,"link",r),n.instance=o}null===e.stylesheets&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&0==(3&n.state.loading)&&(e.count++,n=c6.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}(n,lv,e.memoizedState,e.memoizedProps);break;case 5:default:lP(e,t,n);break;case 3:case 4:var r=lv;lv=cU(e.stateNode.containerInfo),lP(e,t,n),lv=r;break;case 22:null===e.memoizedState&&(null!==(r=e.alternate)&&null!==r.memoizedState?(r=lN,lN=0x1000000,lP(e,t,n),lN=r):lP(e,t,n))}}function l_(e){var t=e.alternate;if(null!==t&&null!==(e=t.child)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(null!==e)}}function lz(e){var t=e.deletions;if(0!=(16&e.flags)){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];ls=r,lA(r,e)}l_(e)}if(10256&e.subtreeFlags)for(e=e.child;null!==e;)lT(e),e=e.sibling}function lT(e){switch(e.tag){case 0:case 11:case 15:lz(e),2048&e.flags&&i4(9,e,e.return);break;case 3:case 12:default:lz(e);break;case 22:var t=e.stateNode;null!==e.memoizedState&&2&t._visibility&&(null===e.return||13!==e.return.tag)?(t._visibility&=-3,function e(t){var n=t.deletions;if(0!=(16&t.flags)){if(null!==n)for(var r=0;r<n.length;r++){var a=n[r];ls=a,lA(a,t)}l_(t)}for(t=t.child;null!==t;){switch((n=t).tag){case 0:case 11:case 15:i4(8,n,n.return),e(n);break;case 22:2&(r=n.stateNode)._visibility&&(r._visibility&=-3,e(n));break;default:e(n)}t=t.sibling}}(e)):lz(e)}}function lA(e,t){for(;null!==ls;){var n=ls;switch(n.tag){case 0:case 11:case 15:i4(8,n,t);break;case 23:case 22:if(null!==n.memoizedState&&null!==n.memoizedState.cachePool){var r=n.memoizedState.cachePool.pool;null!=r&&r.refCount++}break;case 24:r2(n.memoizedState.cache)}if(null!==(r=n.child))r.return=n,ls=r;else for(n=e;null!==ls;){var a=(r=ls).sibling,o=r.return;if(!function e(t){var n=t.alternate;null!==n&&(t.alternate=null,e(n)),t.child=null,t.deletions=null,t.sibling=null,5===t.tag&&null!==(n=t.stateNode)&&eB(n),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}(r),r===n){ls=null;break}if(null!==a){a.return=o,ls=a;break}ls=o}}}var lR={getCacheForType:function(e){var t=rZ(r0),n=t.data.get(e);return void 0===n&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return rZ(r0).controller.signal}},lL="function"==typeof WeakMap?WeakMap:Map,lI=0,lM=null,lD=null,lF=0,l$=0,lU=null,lH=!1,lB=!1,lK=!1,lV=0,lq=0,lW=0,lZ=0,lG=0,lJ=0,lQ=0,lY=null,lX=null,l0=!1,l1=0,l2=0,l4=1/0,l3=null,l5=null,l6=0,l8=null,l9=null,l7=0,se=0,st=null,sn=null,sr=0,sa=null;function so(){return 0!=(2&lI)&&0!==lF?lF&-lF:null!==T.T?sY():eT()}function si(){if(0===lJ)if(0==(0x20000000&lF)||rN){var e=eb;0==(3932160&(eb<<=1))&&(eb=262144),lJ=e}else lJ=0x20000000;return null!==(e=aD.current)&&(e.flags|=32),lJ}function sl(e,t,n){(e===lM&&(2===l$||9===l$)||null!==e.cancelPendingCommit)&&(sp(e,0),su(e,lF,lJ,!1)),eC(e,n),(0==(2&lI)||e!==lM)&&(e===lM&&(0==(2&lI)&&(lZ|=n),4===lq&&su(e,lF,lJ,!1)),sV(e))}function ss(e,t,n){if(0!=(6&lI))throw Error(l(327));for(var r=!n&&0==(127&t)&&0==(t&e.expiredLanes)||ej(e,t),a=r?function(e,t){var n=lI;lI|=2;var r=sg(),a=sy();lM!==e||lF!==t?(l3=null,l4=er()+500,sp(e,t)):lB=ej(e,t);e:for(;;)try{if(0!==l$&&null!==lD){t=lD;var o=lU;t:switch(l$){case 1:l$=0,lU=null,sk(e,t,o,1);break;case 2:case 9:if(al(o)){l$=0,lU=null,sw(t);break}t=function(){2!==l$&&9!==l$||lM!==e||(l$=7),sV(e)},o.then(t,t);break e;case 3:l$=7;break e;case 4:l$=5;break e;case 7:al(o)?(l$=0,lU=null,sw(t)):(l$=0,lU=null,sk(e,t,o,7));break;case 5:var i=null;switch(lD.tag){case 26:i=lD.memoizedState;case 5:case 27:var s=lD;if(i?c3(i):s.stateNode.complete){l$=0,lU=null;var c=s.sibling;if(null!==c)lD=c;else{var u=s.return;null!==u?(lD=u,sj(u)):lD=null}break t}}l$=0,lU=null,sk(e,t,o,5);break;case 6:l$=0,lU=null,sk(e,t,o,6);break;case 8:sf(),lq=6;break e;default:throw Error(l(462))}}for(;null!==lD&&!et();)sx(lD);break}catch(t){sh(e,t)}return(r$=rF=null,T.H=r,T.A=a,lI=n,null!==lD)?0:(lM=null,lF=0,n2(),lq)}(e,t):sb(e,t,!0),o=r;;){if(0===a)lB&&!r&&su(e,t,0,!1);else{if(n=e.current.alternate,o&&!function(e){for(var t=e;;){var n=t.tag;if((0===n||11===n||15===n)&&16384&t.flags&&null!==(n=t.updateQueue)&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var a=n[r],o=a.getSnapshot;a=a.value;try{if(!nO(o(),a))return!1}catch(e){return!1}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(n)){a=sb(e,t,!1),o=!1;continue}if(2===a){if(o=t,e.errorRecoveryDisabledLanes&o)var i=0;else i=0!=(i=-0x20000001&e.pendingLanes)?i:0x20000000&i?0x20000000:0;if(0!==i){t=i;e:{a=lY;var s=e.current.memoizedState.isDehydrated;if(s&&(sp(e,i).flags|=256),2!==(i=sb(e,i,!1))){if(lK&&!s){e.errorRecoveryDisabledLanes|=o,lZ|=o,a=4;break e}o=lX,lX=a,null!==o&&(null===lX?lX=o:lX.push.apply(lX,o))}a=i}if(o=!1,2!==a)continue}}if(1===a){sp(e,0),su(e,t,0,!0);break}e:{switch(r=e,o=a){case 0:case 1:throw Error(l(345));case 4:if((4194048&t)!==t)break;case 6:su(r,t,lJ,!lH);break e;case 2:lX=null;break;case 3:case 5:break;default:throw Error(l(329))}if((0x3c00000&t)===t&&10<(a=l1+300-er())){if(su(r,t,lJ,!lH),0!==ek(r,0,!0))break e;l7=t,r.timeoutHandle=cw(sc.bind(null,r,n,lX,l3,l0,t,lJ,lZ,lQ,lH,o,"Throttled",-0,0),a);break e}sc(r,n,lX,l3,l0,t,lJ,lZ,lQ,lH,o,null,-0,0)}}break}sV(e)}function sc(e,t,n,r,a,o,i,l,s,c,u,d,f,p){if(e.timeoutHandle=-1,8192&(d=t.subtreeFlags)||0x1002000==(0x1002000&d)){lE(t,o,d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:tg});var h,m,g=(0x3c00000&o)===o?l1-er():(4194048&o)===o?l2-er():0;if(null!==(h=d,m=g,h.stylesheets&&0===h.count&&c9(h,h.stylesheets),g=0<h.count||0<h.imgCount?function(e){var t=setTimeout(function(){if(h.stylesheets&&c9(h,h.stylesheets),h.unsuspend){var e=h.unsuspend;h.unsuspend=null,e()}},6e4+m);0<h.imgBytes&&0===c5&&(c5=62500*function(){if("function"==typeof performance.getEntriesByType){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var a=n[r],o=a.transferSize,i=a.initiatorType,l=a.duration;if(o&&l&&cp(i)){for(i=0,l=a.responseEnd,r+=1;r<n.length;r++){var s=n[r],c=s.startTime;if(c>l)break;var u=s.transferSize,d=s.initiatorType;u&&cp(d)&&(i+=u*((s=s.responseEnd)<l?1:(l-c)/(s-c)))}if(--r,t+=8*(o+i)/(a.duration/1e3),10<++e)break}}if(0<e)return t/e/1e6}return navigator.connection&&"number"==typeof(e=navigator.connection.downlink)?e:5}());var n=setTimeout(function(){if(h.waitingForImages=!1,0===h.count&&(h.stylesheets&&c9(h,h.stylesheets),h.unsuspend)){var e=h.unsuspend;h.unsuspend=null,e()}},(h.imgBytes>c5?50:800)+m);return h.unsuspend=e,function(){h.unsuspend=null,clearTimeout(t),clearTimeout(n)}}:null)){l7=o,e.cancelPendingCommit=g(sO.bind(null,e,t,o,n,r,a,i,l,s,u,d,null,f,p)),su(e,o,i,!c);return}}sO(e,t,o,n,r,a,i,l,s)}function su(e,t,n,r){t&=~lG,t&=~lZ,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var a=t;0<a;){var o=31-em(a),i=1<<o;r[o]=-1,a&=~i}0!==n&&eN(e,n,t)}function sd(){return 0!=(6&lI)||(sq(0,!1),!1)}function sf(){if(null!==lD){if(0===l$)var e=lD.return;else e=lD,r$=rF=null,on(e),ap=null,ah=0,e=lD;for(;null!==e;)i1(e.alternate,e),e=e.return;lD=null}}function sp(e,t){var n=e.timeoutHandle;-1!==n&&(e.timeoutHandle=-1,ck(n)),null!==(n=e.cancelPendingCommit)&&(e.cancelPendingCommit=null,n()),l7=0,sf(),lM=e,lD=n=rn(e.current,null),lF=t,l$=0,lU=null,lH=!1,lB=ej(e,t),lK=!1,lQ=lJ=lG=lZ=lW=lq=0,lX=lY=null,l0=!1,0!=(8&t)&&(t|=32&t);var r=e.entangledLanes;if(0!==r)for(e=e.entanglements,r&=t;0<r;){var a=31-em(r),o=1<<a;t|=e[a],r&=~o}return lV=t,n2(),n}function sh(e,t){aZ=null,T.H=it,t===ar||t===ao?(t=ad(),l$=3):t===aa?(t=ad(),l$=4):l$=t===ix?8:null!==t&&"object"==typeof t&&"function"==typeof t.then?6:1,lU=t,null===lD&&(lq=1,im(e,ru(t,e.current)))}function sm(){var e=aD.current;return null===e||((4194048&lF)===lF?null===aF:((0x3c00000&lF)===lF||0!=(0x20000000&lF))&&e===aF)}function sg(){var e=T.H;return T.H=it,null===e?it:e}function sy(){var e=T.A;return T.A=lR,e}function sv(){lq=4,lH||(4194048&lF)!==lF&&null!==aD.current||(lB=!0),0==(0x7ffffff&lW)&&0==(0x7ffffff&lZ)||null===lM||su(lM,lF,lJ,!1)}function sb(e,t,n){var r=lI;lI|=2;var a=sg(),o=sy();(lM!==e||lF!==t)&&(l3=null,sp(e,t)),t=!1;var i=lq;e:for(;;)try{if(0!==l$&&null!==lD){var l=lD,s=lU;switch(l$){case 8:sf(),i=6;break e;case 3:case 2:case 9:case 6:null===aD.current&&(t=!0);var c=l$;if(l$=0,lU=null,sk(e,l,s,c),n&&lB){i=0;break e}break;default:c=l$,l$=0,lU=null,sk(e,l,s,c)}}(function(){for(;null!==lD;)sx(lD)})(),i=lq;break}catch(t){sh(e,t)}return t&&e.shellSuspendCounter++,r$=rF=null,lI=r,T.H=a,T.A=o,null===lD&&(lM=null,lF=0,n2()),i}function sx(e){var t=iZ(e.alternate,e,lV);e.memoizedProps=e.pendingProps,null===t?sj(e):lD=t}function sw(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=iA(n,t,t.pendingProps,t.type,void 0,lF);break;case 11:t=iA(n,t,t.pendingProps,t.type.render,t.ref,lF);break;case 5:on(t);default:i1(n,t),t=iZ(n,t=lD=rr(t,lV),lV)}e.memoizedProps=e.pendingProps,null===t?sj(e):lD=t}function sk(e,t,n,r){r$=rF=null,on(t),ap=null,ah=0;var a=t.return;try{if(function(e,t,n,r,a){if(n.flags|=32768,null!==r&&"object"==typeof r&&"function"==typeof r.then){if(null!==(t=n.alternate)&&rV(t,n,a,!0),null!==(n=aD.current)){switch(n.tag){case 31:case 13:return null===aF?sv():null===n.alternate&&0===lq&&(lq=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===ai?n.flags|=16384:(null===(t=n.updateQueue)?n.updateQueue=new Set([r]):t.add(r),sR(e,r,a)),!1;case 22:return n.flags|=65536,r===ai?n.flags|=16384:(null===(t=n.updateQueue)?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):null===(n=t.retryQueue)?t.retryQueue=new Set([r]):n.add(r),sR(e,r,a)),!1}throw Error(l(435,n.tag))}return sR(e,r,a),sv(),!1}if(rN)return null!==(t=aD.current)?(0==(65536&t.flags)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==r_&&rM(ru(e=Error(l(422),{cause:r}),n))):(r!==r_&&rM(ru(t=Error(l(423),{cause:r}),n)),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=ru(r,n),a=iy(e.stateNode,r,a),aN(e,a),4!==lq&&(lq=2)),!1;var o=Error(l(520),{cause:r});if(o=ru(o,n),null===lY?lY=[o]:lY.push(o),4!==lq&&(lq=2),null===t)return!0;r=ru(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=iy(n.stateNode,r,e),aN(n,e),!1;case 1:if(t=n.type,o=n.stateNode,0==(128&n.flags)&&("function"==typeof t.getDerivedStateFromError||null!==o&&"function"==typeof o.componentDidCatch&&(null===l5||!l5.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,ib(a=iv(a),e,n,r),aN(n,a),!1}n=n.return}while(null!==n);return!1}(e,a,t,n,lF)){lq=1,im(e,ru(n,e.current)),lD=null;return}}catch(t){if(null!==a)throw lD=a,t;lq=1,im(e,ru(n,e.current)),lD=null;return}32768&t.flags?(rN||1===r?e=!0:lB||0!=(0x20000000&lF)?e=!1:(lH=e=!0,(2===r||9===r||3===r||6===r)&&null!==(r=aD.current)&&13===r.tag&&(r.flags|=16384)),sS(t,e)):sj(t)}function sj(e){var t=e;do{if(0!=(32768&t.flags))return void sS(t,lH);e=t.return;var n=function(e,t,n){var r=t.pendingProps;switch(rj(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:case 1:return i0(t),null;case 3:return n=t.stateNode,r=null,null!==e&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),rH(r0),V(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(null===e||null===e.child)&&(rR(t)?iG(t):null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,rI())),i0(t),null;case 26:var a=t.type,o=t.memoizedState;return null===e?(iG(t),null!==o?(i0(t),iQ(t,o)):(i0(t),iJ(t,a,null,r,n))):o?o!==e.memoizedState?(iG(t),i0(t),iQ(t,o)):(i0(t),t.flags&=-0x1000001):((e=e.memoizedProps)!==r&&iG(t),i0(t),iJ(t,a,e,r,n)),null;case 27:if(W(t),n=H.current,a=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==r&&iG(t);else{if(!r){if(null===t.stateNode)throw Error(l(166));return i0(t),null}e=$.current,rR(t)?rT(t,e):(t.stateNode=e=cM(a,r,n),iG(t))}return i0(t),null;case 5:if(W(t),a=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==r&&iG(t);else{if(!r){if(null===t.stateNode)throw Error(l(166));return i0(t),null}if(o=$.current,rR(t))rT(t,o);else{var i=cg(H.current);switch(o){case 1:o=i.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:o=i.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":o=i.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":o=i.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":(o=i.createElement("div")).innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o="string"==typeof r.is?i.createElement("select",{is:r.is}):i.createElement("select"),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o="string"==typeof r.is?i.createElement(a,{is:r.is}):i.createElement(a)}}o[eL]=t,o[eI]=r;e:for(i=t.child;null!==i;){if(5===i.tag||6===i.tag)o.appendChild(i.stateNode);else if(4!==i.tag&&27!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(t.stateNode=o,cf(o,a,r),a){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break;case"img":r=!0;break;default:r=!1}r&&iG(t)}}return i0(t),iJ(t,t.type,null===e?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&iG(t);else{if("string"!=typeof r&&null===t.stateNode)throw Error(l(166));if(e=H.current,rR(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,null!==(a=rO))switch(a.tag){case 27:case 5:r=a.memoizedProps}e[eL]=t,(e=!!(e.nodeValue===n||null!==r&&!0===r.suppressHydrationWarning||cc(e.nodeValue,n)))||rz(t,!0)}else(e=cg(e).createTextNode(r))[eL]=t,t.stateNode=e}return i0(t),null;case 31:if(n=t.memoizedState,null===e||null!==e.memoizedState){if(r=rR(t),null!==n){if(null===e){if(!r)throw Error(l(318));if(!(e=null!==(e=t.memoizedState)?e.dehydrated:null))throw Error(l(557));e[eL]=t}else rL(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;i0(t),e=!1}else n=rI(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e){if(256&t.flags)return aK(t),t;return aK(t),null}if(0!=(128&t.flags))throw Error(l(558))}return i0(t),null;case 13:if(r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(a=rR(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(l(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(l(317));a[eL]=t}else rL(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;i0(t),a=!1}else a=rI(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a){if(256&t.flags)return aK(t),t;return aK(t),null}}if(aK(t),0!=(128&t.flags))return t.lanes=n,t;return n=null!==r,e=null!==e&&null!==e.memoizedState,n&&(r=t.child,a=null,null!==r.alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(a=r.alternate.memoizedState.cachePool.pool),o=null,null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),iY(t,t.updateQueue),i0(t),null;case 4:return V(),null===e&&s7(t.stateNode.containerInfo),i0(t),null;case 10:return rH(t.type),i0(t),null;case 19:if(D(aV),null===(r=t.memoizedState))return i0(t),null;if(a=0!=(128&t.flags),null===(o=r.rendering))if(a)iX(r,!1);else{if(0!==lq||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(o=aq(e))){for(t.flags|=128,iX(r,!1),t.updateQueue=e=o.updateQueue,iY(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)rr(n,e),n=n.sibling;return F(aV,1&aV.current|2),rN&&rx(t,r.treeForkCount),t.child}e=e.sibling}null!==r.tail&&er()>l4&&(t.flags|=128,a=!0,iX(r,!1),t.lanes=4194304)}else{if(!a)if(null!==(e=aq(o))){if(t.flags|=128,a=!0,t.updateQueue=e=e.updateQueue,iY(t,e),iX(r,!0),null===r.tail&&"hidden"===r.tailMode&&!o.alternate&&!rN)return i0(t),null}else 2*er()-r.renderingStartTime>l4&&0x20000000!==n&&(t.flags|=128,a=!0,iX(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(null!==(e=r.last)?e.sibling=o:t.child=o,r.last=o)}if(null!==r.tail)return e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=er(),e.sibling=null,n=aV.current,F(aV,a?1&n|2:1&n),rN&&rx(t,r.treeForkCount),e;return i0(t),null;case 22:case 23:return aK(t),aM(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?0!=(0x20000000&n)&&0==(128&t.flags)&&(i0(t),6&t.subtreeFlags&&(t.flags|=8192)):i0(t),null!==(n=t.updateQueue)&&iY(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&D(r7),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),rH(r0),i0(t),null;case 25:case 30:return null}throw Error(l(156,t.tag))}(t.alternate,t,lV);if(null!==n){lD=n;return}if(null!==(t=t.sibling)){lD=t;return}lD=t=e}while(null!==t);0===lq&&(lq=5)}function sS(e,t){do{var n=function(e,t){switch(rj(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return rH(r0),V(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return W(t),null;case 31:if(null!==t.memoizedState){if(aK(t),null===t.alternate)throw Error(l(340));rL()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 13:if(aK(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(l(340));rL()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return D(aV),null;case 4:return V(),null;case 10:return rH(t.type),null;case 22:case 23:return aK(t),aM(),null!==e&&D(r7),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return rH(r0),null;default:return null}}(e.alternate,e);if(null!==n){n.flags&=32767,lD=n;return}if(null!==(n=e.return)&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&null!==(e=e.sibling)){lD=e;return}lD=e=n}while(null!==e);lq=6,lD=null}function sO(e,t,n,r,a,o,i,s,c){e.cancelPendingCommit=null;do s_();while(0!==l6);if(0!=(6&lI))throw Error(l(327));if(null!==t){if(t===e.current)throw Error(l(177));if(!function(e,t,n,r,a,o){var i=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 l=e.entanglements,s=e.expirationTimes,c=e.hiddenUpdates;for(n=i&~n;0<n;){var u=31-em(n),d=1<<u;l[u]=0,s[u]=-1;var f=c[u];if(null!==f)for(c[u]=null,u=0;u<f.length;u++){var p=f[u];null!==p&&(p.lane&=-0x20000001)}n&=~d}0!==r&&eN(e,r,0),0!==o&&0===a&&0!==e.tag&&(e.suspendedLanes|=o&~(i&~t))}(e,n,o=t.lanes|t.childLanes|n1,i,s,c),e===lM&&(lD=lM=null,lF=0),l9=t,l8=e,l7=n,se=o,st=a,sn=r,0!=(10256&t.subtreeFlags)||0!=(10256&t.flags)?(e.callbackNode=null,e.callbackPriority=0,X(el,function(){return sz(),null})):(e.callbackNode=null,e.callbackPriority=0),r=0!=(13878&t.flags),0!=(13878&t.subtreeFlags)||r){r=T.T,T.T=null,a=A.p,A.p=2,i=lI,lI|=4;try{!function(e,t){if(e=e.containerInfo,ch=ul,n_(e=nE(e))){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var a,o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch(e){n=null;break e}var s=0,c=-1,u=-1,d=0,f=0,p=e,h=null;t:for(;;){for(;p!==n||0!==o&&3!==p.nodeType||(c=s+o),p!==i||0!==r&&3!==p.nodeType||(u=s+r),3===p.nodeType&&(s+=p.nodeValue.length),null!==(a=p.firstChild);)h=p,p=a;for(;;){if(p===e)break t;if(h===n&&++d===o&&(c=s),h===i&&++f===r&&(u=s),null!==(a=p.nextSibling))break;h=(p=h).parentNode}p=a}n=-1===c||-1===u?null:{start:c,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(cm={focusedElem:e,selectionRange:n},ul=!1,ls=t;null!==ls;)if(e=(t=ls).child,0!=(1028&t.subtreeFlags)&&null!==e)e.return=t,ls=e;else for(;null!==ls;){switch(i=(t=ls).alternate,e=t.flags,t.tag){case 0:if(0!=(4&e)&&null!==(e=null!==(e=t.updateQueue)?e.events:null))for(n=0;n<e.length;n++)(o=e[n]).ref.impl=o.nextImpl;break;case 11:case 15:case 5:case 26:case 27:case 6:case 4:case 17:break;case 1:if(0!=(1024&e)&&null!==i){e=void 0,n=t,o=i.memoizedProps,i=i.memoizedState,r=n.stateNode;try{var m=iu(n.type,o);e=r.getSnapshotBeforeUpdate(m,i),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){sA(n,n.return,e)}}break;case 3:if(0!=(1024&e)){if(9===(n=(e=t.stateNode.containerInfo).nodeType))cE(e);else if(1===n)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":cE(e);break;default:e.textContent=""}}break;default:if(0!=(1024&e))throw Error(l(163))}if(null!==(e=t.sibling)){e.return=t.return,ls=e;break}ls=t.return}}(e,t)}finally{lI=i,A.p=a,T.T=r}}l6=1,sC(),sN(),sP()}}function sC(){if(1===l6){l6=0;var e=l8,t=l9,n=0!=(13878&t.flags);if(0!=(13878&t.subtreeFlags)||n){n=T.T,T.T=null;var r=A.p;A.p=2;var a=lI;lI|=4;try{lb(t,e);var o=cm,i=nE(e.containerInfo),l=o.focusedElem,s=o.selectionRange;if(i!==l&&l&&l.ownerDocument&&function e(t,n){return!!t&&!!n&&(t===n||(!t||3!==t.nodeType)&&(n&&3===n.nodeType?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}(l.ownerDocument.documentElement,l)){if(null!==s&&n_(l)){var c=s.start,u=s.end;if(void 0===u&&(u=c),"selectionStart"in l)l.selectionStart=c,l.selectionEnd=Math.min(u,l.value.length);else{var d=l.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),h=l.textContent.length,m=Math.min(s.start,h),g=void 0===s.end?m:Math.min(s.end,h);!p.extend&&m>g&&(i=g,g=m,m=i);var y=nP(l,m),v=nP(l,g);if(y&&v&&(1!==p.rangeCount||p.anchorNode!==y.node||p.anchorOffset!==y.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var b=d.createRange();b.setStart(y.node,y.offset),p.removeAllRanges(),m>g?(p.addRange(b),p.extend(v.node,v.offset)):(b.setEnd(v.node,v.offset),p.addRange(b))}}}}for(d=[],p=l;p=p.parentNode;)1===p.nodeType&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for("function"==typeof l.focus&&l.focus(),l=0;l<d.length;l++){var x=d[l];x.element.scrollLeft=x.left,x.element.scrollTop=x.top}}ul=!!ch,cm=ch=null}finally{lI=a,A.p=r,T.T=n}}e.current=t,l6=2}}function sN(){if(2===l6){l6=0;var e=l8,t=l9,n=0!=(8772&t.flags);if(0!=(8772&t.subtreeFlags)||n){n=T.T,T.T=null;var r=A.p;A.p=2;var a=lI;lI|=4;try{lc(e,t.alternate,t)}finally{lI=a,A.p=r,T.T=n}}l6=3}}function sP(){if(4===l6||3===l6){l6=0,en();var e=l8,t=l9,n=l7,r=sn;0!=(10256&t.subtreeFlags)||0!=(10256&t.flags)?l6=5:(l6=0,l9=l8=null,sE(e,e.pendingLanes));var a=e.pendingLanes;if(0===a&&(l5=null),ez(n),t=t.stateNode,ep&&"function"==typeof ep.onCommitFiberRoot)try{ep.onCommitFiberRoot(ef,t,void 0,128==(128&t.current.flags))}catch(e){}if(null!==r){t=T.T,a=A.p,A.p=2,T.T=null;try{for(var o=e.onRecoverableError,i=0;i<r.length;i++){var l=r[i];o(l.value,{componentStack:l.stack})}}finally{T.T=t,A.p=a}}0!=(3&l7)&&s_(),sV(e),a=e.pendingLanes,0!=(261930&n)&&0!=(42&a)?e===sa?sr++:(sr=0,sa=e):sr=0,sq(0,!1)}}function sE(e,t){0==(e.pooledCacheLanes&=t)&&null!=(t=e.pooledCache)&&(e.pooledCache=null,r2(t))}function s_(){return sC(),sN(),sP(),sz()}function sz(){if(5!==l6)return!1;var e=l8,t=se;se=0;var n=ez(l7),r=T.T,a=A.p;try{A.p=32>n?32:n,T.T=null,n=st,st=null;var o=l8,i=l7;if(l6=0,l9=l8=null,l7=0,0!=(6&lI))throw Error(l(331));var s=lI;if(lI|=4,lT(o.current),lO(o,o.current,i,n),lI=s,sq(0,!1),ep&&"function"==typeof ep.onPostCommitFiberRoot)try{ep.onPostCommitFiberRoot(ef,o)}catch(e){}return!0}finally{A.p=a,T.T=r,sE(e,t)}}function sT(e,t,n){t=ru(n,t),t=iy(e.stateNode,t,2),null!==(e=aO(e,t,2))&&(eC(e,2),sV(e))}function sA(e,t,n){if(3===e.tag)sT(e,e,n);else for(;null!==t;){if(3===t.tag){sT(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===l5||!l5.has(r))){e=ru(n,e),null!==(r=aO(t,n=iv(2),2))&&(ib(n,r,t,e),eC(r,2),sV(r));break}}t=t.return}}function sR(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new lL;var a=new Set;r.set(t,a)}else void 0===(a=r.get(t))&&(a=new Set,r.set(t,a));a.has(n)||(lK=!0,a.add(n),e=sL.bind(null,e,t,n),t.then(e,e))}function sL(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,lM===e&&(lF&n)===n&&(4===lq||3===lq&&(0x3c00000&lF)===lF&&300>er()-l1?0==(2&lI)&&sp(e,0):lG|=n,lQ===lF&&(lQ=0)),sV(e)}function sI(e,t){0===t&&(t=eS()),null!==(e=n5(e,t))&&(eC(e,t),sV(e))}function sM(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),sI(e,n)}function sD(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;null!==a&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(l(314))}null!==r&&r.delete(t),sI(e,n)}var sF=null,s$=null,sU=!1,sH=!1,sB=!1,sK=0;function sV(e){e!==s$&&null===e.next&&(null===s$?sF=s$=e:s$=s$.next=e),sH=!0,sU||(sU=!0,cS(function(){0!=(6&lI)?X(eo,sW):sZ()}))}function sq(e,t){if(!sB&&sH){sB=!0;do for(var n=!1,r=sF;null!==r;){if(!t)if(0!==e){var a=r.pendingLanes;if(0===a)var o=0;else{var i=r.suspendedLanes,l=r.pingedLanes;o=0xc000095&(o=(1<<31-em(42|e)+1)-1&(a&~(i&~l)))?0xc000095&o|1:o?2|o:0}0!==o&&(n=!0,sQ(r,o))}else o=lF,0==(3&(o=ek(r,r===lM?o:0,null!==r.cancelPendingCommit||-1!==r.timeoutHandle)))||ej(r,o)||(n=!0,sQ(r,o));r=r.next}while(n);sB=!1}}function sW(){sZ()}function sZ(){sH=sU=!1;var e,t=0;0===sK||((e=window.event)&&"popstate"===e.type?e===cx||(cx=e,0):(cx=null,1))||(t=sK);for(var n=er(),r=null,a=sF;null!==a;){var o=a.next,i=sG(a,n);0===i?(a.next=null,null===r?sF=o:r.next=o,null===o&&(s$=r)):(r=a,(0!==t||0!=(3&i))&&(sH=!0)),a=o}0!==l6&&5!==l6||sq(t,!1),0!==sK&&(sK=0)}function sG(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,o=-0x3c00001&e.pendingLanes;0<o;){var i=31-em(o),l=1<<i,s=a[i];-1===s?(0==(l&n)||0!=(l&r))&&(a[i]=function(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;default:return -1}}(l,t)):s<=t&&(e.expiredLanes|=l),o&=~l}if(t=lM,n=lF,n=ek(e,e===t?n:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle),r=e.callbackNode,0===n||e===t&&(2===l$||9===l$)||null!==e.cancelPendingCommit)return null!==r&&null!==r&&ee(r),e.callbackNode=null,e.callbackPriority=0;if(0==(3&n)||ej(e,n)){if((t=n&-n)===e.callbackPriority)return t;switch(null!==r&&ee(r),ez(n)){case 2:case 8:n=ei;break;case 32:default:n=el;break;case 0x10000000:n=ec}return n=X(n,r=sJ.bind(null,e)),e.callbackPriority=t,e.callbackNode=n,t}return null!==r&&null!==r&&ee(r),e.callbackPriority=2,e.callbackNode=null,2}function sJ(e,t){if(0!==l6&&5!==l6)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(s_()&&e.callbackNode!==n)return null;var r=lF;return 0===(r=ek(e,e===lM?r:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle))?null:(ss(e,r,t),sG(e,er()),null!=e.callbackNode&&e.callbackNode===n?sJ.bind(null,e):null)}function sQ(e,t){if(s_())return null;ss(e,t,!0)}function sY(){if(0===sK){var e=r5;0===e&&(e=ev,0==(261888&(ev<<=1))&&(ev=256)),sK=e}return sK}function sX(e){return null==e||"symbol"==typeof e||"boolean"==typeof e?null:"function"==typeof e?e:tm(""+e)}function s0(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}for(var s1=0;s1<nJ.length;s1++){var s2=nJ[s1];nQ(s2.toLowerCase(),"on"+(s2[0].toUpperCase()+s2.slice(1)))}nQ(nH,"onAnimationEnd"),nQ(nB,"onAnimationIteration"),nQ(nK,"onAnimationStart"),nQ("dblclick","onDoubleClick"),nQ("focusin","onFocus"),nQ("focusout","onBlur"),nQ(nV,"onTransitionRun"),nQ(nq,"onTransitionStart"),nQ(nW,"onTransitionCancel"),nQ(nZ,"onTransitionEnd"),eY("onMouseEnter",["mouseout","mouseover"]),eY("onMouseLeave",["mouseout","mouseover"]),eY("onPointerEnter",["pointerout","pointerover"]),eY("onPointerLeave",["pointerout","pointerover"]),eQ("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),eQ("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),eQ("onBeforeInput",["compositionend","keypress","textInput","paste"]),eQ("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),eQ("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),eQ("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var s4="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(" "),s3=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(s4));function s5(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],a=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var i=r.length-1;0<=i;i--){var l=r[i],s=l.instance,c=l.currentTarget;if(l=l.listener,s!==o&&a.isPropagationStopped())break e;o=l,a.currentTarget=c;try{o(a)}catch(e){nY(e)}a.currentTarget=null,o=s}else for(i=0;i<r.length;i++){if(s=(l=r[i]).instance,c=l.currentTarget,l=l.listener,s!==o&&a.isPropagationStopped())break e;o=l,a.currentTarget=c;try{o(a)}catch(e){nY(e)}a.currentTarget=null,o=s}}}}function s6(e,t){var n=t[eD];void 0===n&&(n=t[eD]=new Set);var r=e+"__bubble";n.has(r)||(ce(t,e,2,!1),n.add(r))}function s8(e,t,n){var r=0;t&&(r|=4),ce(n,e,r,t)}var s9="_reactListening"+Math.random().toString(36).slice(2);function s7(e){if(!e[s9]){e[s9]=!0,eG.forEach(function(t){"selectionchange"!==t&&(s3.has(t)||s8(t,!1,e),s8(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[s9]||(t[s9]=!0,s8("selectionchange",!1,t))}}function ce(e,t,n,r){switch(uh(t)){case 2:var a=us;break;case 8:a=uc;break;default:a=uu}n=a.bind(null,t,n,e),a=void 0,tC&&("touchstart"===t||"touchmove"===t||"wheel"===t)&&(a=!0),r?void 0!==a?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):void 0!==a?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function ct(e,t,n,r,a){var o=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var i=r.tag;if(3===i||4===i){var l=r.stateNode.containerInfo;if(l===a)break;if(4===i)for(i=r.return;null!==i;){var c=i.tag;if((3===c||4===c)&&i.stateNode.containerInfo===a)return;i=i.return}for(;null!==l;){if(null===(i=eK(l)))return;if(5===(c=i.tag)||6===c||26===c||27===c){r=o=i;continue e}l=l.parentNode}}r=r.return}tj(function(){var r=o,a=tv(n),i=[];e:{var l=nG.get(e);if(void 0!==l){var c=tH,u=e;switch(e){case"keypress":if(0===tT(n))break e;case"keydown":case"keyup":c=t4;break;case"focusin":u="focus",c=tZ;break;case"focusout":u="blur",c=tZ;break;case"beforeblur":case"afterblur":c=tZ;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":c=tq;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":c=tW;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":c=t5;break;case nH:case nB:case nK:c=tG;break;case nZ:c=t6;break;case"scroll":case"scrollend":c=tK;break;case"wheel":c=t8;break;case"copy":case"cut":case"paste":c=tJ;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":c=t3;break;case"toggle":case"beforetoggle":c=t9}var d=0!=(4&t),f=!d&&("scroll"===e||"scrollend"===e),p=d?null!==l?l+"Capture":null:l;d=[];for(var h,m=r;null!==m;){var g=m;if(h=g.stateNode,5!==(g=g.tag)&&26!==g&&27!==g||null===h||null===p||null!=(g=tS(m,p))&&d.push(cn(m,g,h)),f)break;m=m.return}0<d.length&&(l=new c(l,u,null,n,a),i.push({event:l,listeners:d}))}}if(0==(7&t)){if((l="mouseover"===e||"pointerover"===e,c="mouseout"===e||"pointerout"===e,!(l&&n!==ty&&(u=n.relatedTarget||n.fromElement)&&(eK(u)||u[eM])))&&(c||l)&&(l=a.window===a?a:(l=a.ownerDocument)?l.defaultView||l.parentWindow:window,c?(u=n.relatedTarget||n.toElement,c=r,null!==(u=u?eK(u):null)&&(f=s(u),d=u.tag,u!==f||5!==d&&27!==d&&6!==d)&&(u=null)):(c=null,u=r),c!==u)){if(d=tq,g="onMouseLeave",p="onMouseEnter",m="mouse",("pointerout"===e||"pointerover"===e)&&(d=t3,g="onPointerLeave",p="onPointerEnter",m="pointer"),f=null==c?l:eq(c),h=null==u?l:eq(u),(l=new d(g,m+"leave",c,n,a)).target=f,l.relatedTarget=h,g=null,eK(a)===r&&((d=new d(p,m+"enter",u,n,a)).target=h,d.relatedTarget=f,g=d),f=g,c&&u)t:{for(d=ca,p=c,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var y,v=m;v;v=d(v))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||null!==m&&p===m.alternate){d=p;break t}p=d(p),m=d(m)}d=null}else d=null;null!==c&&co(i,l,c,d,!1),null!==u&&null!==f&&co(i,f,u,d,!0)}e:{if("select"===(c=(l=r?eq(r):window).nodeName&&l.nodeName.toLowerCase())||"input"===c&&"file"===l.type)var b=nm;else if(nc(l))if(ng)b=nS;else{b=nk;var x=nw}else(c=l.nodeName)&&"input"===c.toLowerCase()&&("checkbox"===l.type||"radio"===l.type)?b=nj:r&&tf(r.elementType)&&(b=nm);if(b&&(b=b(e,r))){nu(i,b,n,a);break e}x&&x(e,l,r),"focusout"===e&&r&&"number"===l.type&&null!=r.memoizedProps.value&&ta(l,"number",l.value)}switch(x=r?eq(r):window,e){case"focusin":(nc(x)||"true"===x.contentEditable)&&(nT=x,nA=r,nR=null);break;case"focusout":nR=nA=nT=null;break;case"mousedown":nL=!0;break;case"contextmenu":case"mouseup":case"dragend":nL=!1,nI(i,n,a);break;case"selectionchange":if(nz)break;case"keydown":case"keyup":nI(i,n,a)}if(ne)t:{switch(e){case"compositionstart":var w="onCompositionStart";break t;case"compositionend":w="onCompositionEnd";break t;case"compositionupdate":w="onCompositionUpdate";break t}w=void 0}else nl?no(e,n)&&(w="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(w="onCompositionStart");w&&(nr&&"ko"!==n.locale&&(nl||"onCompositionStart"!==w?"onCompositionEnd"===w&&nl&&(y=tz()):(tE="value"in(tP=a)?tP.value:tP.textContent,nl=!0)),0<(x=cr(r,w)).length&&(w=new tQ(w,e,null,n,a),i.push({event:w,listeners:x}),y?w.data=y:null!==(y=ni(n))&&(w.data=y))),(y=nn?function(e,t){switch(e){case"compositionend":return ni(t);case"keypress":if(32!==t.which)return null;return na=!0," ";case"textInput":return" "===(e=t.data)&&na?null:e;default:return null}}(e,n):function(e,t){if(nl)return"compositionend"===e||!ne&&no(e,t)?(e=tz(),t_=tE=tP=null,nl=!1,e):null;switch(e){case"paste":default: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 nr&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(w=cr(r,"onBeforeInput")).length&&(x=new tQ("onBeforeInput","beforeinput",null,n,a),i.push({event:x,listeners:w}),x.data=y);var k=e;if("submit"===k&&r&&r.stateNode===a){var j=sX((a[eI]||null).action),S=n.submitter;S&&null!==(k=(k=S[eI]||null)?sX(k.formAction):S.getAttribute("formAction"))&&(j=k,S=null);var O=new tH("action","action",null,n,a);i.push({event:O,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(0!==sK){var e=S?s0(a,S):new FormData(a);oQ(r,{pending:!0,data:e,method:a.method,action:j},null,e)}}else"function"==typeof j&&(O.preventDefault(),oQ(r,{pending:!0,data:e=S?s0(a,S):new FormData(a),method:a.method,action:j},j,e))},currentTarget:a}]})}}s5(i,t)})}function cn(e,t,n){return{instance:e,listener:t,currentTarget:n}}function cr(e,t){for(var n=t+"Capture",r=[];null!==e;){var a=e,o=a.stateNode;if(5!==(a=a.tag)&&26!==a&&27!==a||null===o||(null!=(a=tS(e,n))&&r.unshift(cn(e,a,o)),null!=(a=tS(e,t))&&r.push(cn(e,a,o))),3===e.tag)return r;e=e.return}return[]}function ca(e){if(null===e)return null;do e=e.return;while(e&&5!==e.tag&&27!==e.tag);return e||null}function co(e,t,n,r,a){for(var o=t._reactName,i=[];null!==n&&n!==r;){var l=n,s=l.alternate,c=l.stateNode;if(l=l.tag,null!==s&&s===r)break;5!==l&&26!==l&&27!==l||null===c||(s=c,a?null!=(c=tS(n,o))&&i.unshift(cn(n,c,s)):a||null!=(c=tS(n,o))&&i.push(cn(n,c,s))),n=n.return}0!==i.length&&e.push({event:t,listeners:i})}var ci=/\r\n?/g,cl=/\u0000|\uFFFD/g;function cs(e){return("string"==typeof e?e:""+e).replace(ci,"\n").replace(cl,"")}function cc(e,t){return t=cs(t),cs(e)===t}function cu(e,t,n,r,a,o){switch(n){case"children":"string"==typeof r?"body"===t||"textarea"===t&&""===r||ts(e,r):("number"==typeof r||"bigint"==typeof r)&&"body"!==t&&ts(e,""+r);break;case"className":e4(e,"class",r);break;case"tabIndex":e4(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":e4(e,n,r);break;case"style":td(e,r,o);break;case"data":if("object"!==t){e4(e,"data",r);break}case"src":case"href":if(""===r&&("a"!==t||"href"!==n)||null==r||"function"==typeof r||"symbol"==typeof r||"boolean"==typeof r){e.removeAttribute(n);break}r=tm(""+r),e.setAttribute(n,r);break;case"action":case"formAction":if("function"==typeof r){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}if("function"==typeof o&&("formAction"===n?("input"!==t&&cu(e,t,"name",a.name,a,null),cu(e,t,"formEncType",a.formEncType,a,null),cu(e,t,"formMethod",a.formMethod,a,null),cu(e,t,"formTarget",a.formTarget,a,null)):(cu(e,t,"encType",a.encType,a,null),cu(e,t,"method",a.method,a,null),cu(e,t,"target",a.target,a,null))),null==r||"symbol"==typeof r||"boolean"==typeof r){e.removeAttribute(n);break}r=tm(""+r),e.setAttribute(n,r);break;case"onClick":null!=r&&(e.onclick=tg);break;case"onScroll":null!=r&&s6("scroll",e);break;case"onScrollEnd":null!=r&&s6("scrollend",e);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!=typeof r||!("__html"in r))throw Error(l(61));if(null!=(n=r.__html)){if(null!=a.children)throw Error(l(60));e.innerHTML=n}}break;case"multiple":e.multiple=r&&"function"!=typeof r&&"symbol"!=typeof r;break;case"muted":e.muted=r&&"function"!=typeof r&&"symbol"!=typeof r;break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":case"autoFocus":case"innerText":case"textContent":break;case"xlinkHref":if(null==r||"function"==typeof r||"boolean"==typeof r||"symbol"==typeof r){e.removeAttribute("xlink:href");break}n=tm(""+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":null!=r&&"function"!=typeof r&&"symbol"!=typeof r?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&&"function"!=typeof r&&"symbol"!=typeof r?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":!0===r?e.setAttribute(n,""):!1!==r&&null!=r&&"function"!=typeof r&&"symbol"!=typeof r?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":null!=r&&"function"!=typeof r&&"symbol"!=typeof r&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":null==r||"function"==typeof r||"symbol"==typeof r||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"popover":s6("beforetoggle",e),s6("toggle",e),e2(e,"popover",r);break;case"xlinkActuate":e3(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":e3(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":e3(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":e3(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":e3(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":e3(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":e3(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":e3(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":e3(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":e2(e,"is",r);break;default:2<n.length&&("o"===n[0]||"O"===n[0])&&("n"===n[1]||"N"===n[1])||e2(e,n=tp.get(n)||n,r)}}function cd(e,t,n,r,a,o){switch(n){case"style":td(e,r,o);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!=typeof r||!("__html"in r))throw Error(l(61));if(null!=(n=r.__html)){if(null!=a.children)throw Error(l(60));e.innerHTML=n}}break;case"children":"string"==typeof r?ts(e,r):("number"==typeof r||"bigint"==typeof r)&&ts(e,""+r);break;case"onScroll":null!=r&&s6("scroll",e);break;case"onScrollEnd":null!=r&&s6("scrollend",e);break;case"onClick":null!=r&&(e.onclick=tg);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":case"innerText":case"textContent":break;default:if(!eJ.hasOwnProperty(n))e:{if("o"===n[0]&&"n"===n[1]&&(a=n.endsWith("Capture"),t=n.slice(2,a?n.length-7:void 0),"function"==typeof(o=null!=(o=e[eI]||null)?o[n]:null)&&e.removeEventListener(t,o,a),"function"==typeof r)){"function"!=typeof o&&null!==o&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break e}n in e?e[n]=r:!0===r?e.setAttribute(n,""):e2(e,n,r)}}}function cf(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":s6("error",e),s6("load",e);var r,a=!1,o=!1;for(r in n)if(n.hasOwnProperty(r)){var i=n[r];if(null!=i)switch(r){case"src":a=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,t));default:cu(e,t,r,i,n,null)}}o&&cu(e,t,"srcSet",n.srcSet,n,null),a&&cu(e,t,"src",n.src,n,null);return;case"input":s6("invalid",e);var s=r=i=o=null,c=null,u=null;for(a in n)if(n.hasOwnProperty(a)){var d=n[a];if(null!=d)switch(a){case"name":o=d;break;case"type":i=d;break;case"checked":c=d;break;case"defaultChecked":u=d;break;case"value":r=d;break;case"defaultValue":s=d;break;case"children":case"dangerouslySetInnerHTML":if(null!=d)throw Error(l(137,t));break;default:cu(e,t,a,d,n,null)}}tr(e,r,s,c,u,i,o,!1);return;case"select":for(o in s6("invalid",e),a=i=r=null,n)if(n.hasOwnProperty(o)&&null!=(s=n[o]))switch(o){case"value":r=s;break;case"defaultValue":i=s;break;case"multiple":a=s;default:cu(e,t,o,s,n,null)}t=r,n=i,e.multiple=!!a,null!=t?to(e,!!a,t,!1):null!=n&&to(e,!!a,n,!0);return;case"textarea":for(i in s6("invalid",e),r=o=a=null,n)if(n.hasOwnProperty(i)&&null!=(s=n[i]))switch(i){case"value":a=s;break;case"defaultValue":o=s;break;case"children":r=s;break;case"dangerouslySetInnerHTML":if(null!=s)throw Error(l(91));break;default:cu(e,t,i,s,n,null)}tl(e,a,o,r);return;case"option":for(c in n)n.hasOwnProperty(c)&&null!=(a=n[c])&&("selected"===c?e.selected=a&&"function"!=typeof a&&"symbol"!=typeof a:cu(e,t,c,a,n,null));return;case"dialog":s6("beforetoggle",e),s6("toggle",e),s6("cancel",e),s6("close",e);break;case"iframe":case"object":s6("load",e);break;case"video":case"audio":for(a=0;a<s4.length;a++)s6(s4[a],e);break;case"image":s6("error",e),s6("load",e);break;case"details":s6("toggle",e);break;case"embed":case"source":case"link":s6("error",e),s6("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)&&null!=(a=n[u]))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,t));default:cu(e,t,u,a,n,null)}return;default:if(tf(t)){for(d in n)n.hasOwnProperty(d)&&void 0!==(a=n[d])&&cd(e,t,d,a,n,void 0);return}}for(s in n)n.hasOwnProperty(s)&&null!=(a=n[s])&&cu(e,t,s,a,n,null)}function cp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}var ch=null,cm=null;function cg(e){return 9===e.nodeType?e:e.ownerDocument}function cy(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 cv(e,t){if(0===e)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return 1===e&&"foreignObject"===t?0:e}function cb(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"bigint"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var cx=null,cw="function"==typeof setTimeout?setTimeout:void 0,ck="function"==typeof clearTimeout?clearTimeout:void 0,cj="function"==typeof Promise?Promise:void 0,cS="function"==typeof queueMicrotask?queueMicrotask:void 0!==cj?function(e){return cj.resolve(null).then(e).catch(cO)}:cw;function cO(e){setTimeout(function(){throw e})}function cC(e){return"head"===e}function cN(e,t){var n=t,r=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&8===a.nodeType)if("/$"===(n=a.data)||"/&"===n){if(0===r){e.removeChild(a),uT(t);return}r--}else if("$"===n||"$?"===n||"$~"===n||"$!"===n||"&"===n)r++;else if("html"===n)cD(e.ownerDocument.documentElement);else if("head"===n){cD(n=e.ownerDocument.head);for(var o=n.firstChild;o;){var i=o.nextSibling,l=o.nodeName;o[eH]||"SCRIPT"===l||"STYLE"===l||"LINK"===l&&"stylesheet"===o.rel.toLowerCase()||n.removeChild(o),o=i}}else"body"===n&&cD(e.ownerDocument.body);n=a}while(n);uT(t)}function cP(e,t){var n=e;e=0;do{var r=n.nextSibling;if(1===n.nodeType?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",""===n.getAttribute("style")&&n.removeAttribute("style")):3===n.nodeType&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&8===r.nodeType)if("/$"===(n=r.data))if(0===e)break;else e--;else"$"!==n&&"$?"!==n&&"$~"!==n&&"$!"!==n||e++;n=r}while(n)}function cE(e){var t=e.firstChild;for(t&&10===t.nodeType&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":cE(n),eB(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if("stylesheet"===n.rel.toLowerCase())continue}e.removeChild(n)}}function c_(e,t){for(;8!==e.nodeType;)if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!t||null===(e=cA(e.nextSibling)))return null;return e}function cz(e){return"$?"===e.data||"$~"===e.data}function cT(e){return"$!"===e.data||"$?"===e.data&&"loading"!==e.ownerDocument.readyState}function cA(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t||"$~"===t||"&"===t||"F!"===t||"F"===t)break;if("/$"===t||"/&"===t)return null}}return e}var cR=null;function cL(e){e=e.nextSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n||"/&"===n){if(0===t)return cA(e.nextSibling);t--}else"$"!==n&&"$!"!==n&&"$?"!==n&&"$~"!==n&&"&"!==n||t++}e=e.nextSibling}return null}function cI(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n||"$~"===n||"&"===n){if(0===t)return e;t--}else"/$"!==n&&"/&"!==n||t++}e=e.previousSibling}return null}function cM(e,t,n){switch(t=cg(n),e){case"html":if(!(e=t.documentElement))throw Error(l(452));return e;case"head":if(!(e=t.head))throw Error(l(453));return e;case"body":if(!(e=t.body))throw Error(l(454));return e;default:throw Error(l(451))}}function cD(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);eB(e)}var cF=new Map,c$=new Set;function cU(e){return"function"==typeof e.getRootNode?e.getRootNode():9===e.nodeType?e:e.ownerDocument}var cH=A.d;A.d={f:function(){var e=cH.f(),t=sd();return e||t},r:function(e){var t=eV(e);null!==t&&5===t.tag&&"form"===t.type?oX(t):cH.r(e)},D:function(e){cH.D(e),cK("dns-prefetch",e,null)},C:function(e,t){cH.C(e,t),cK("preconnect",e,t)},L:function(e,t,n){if(cH.L(e,t,n),cB&&e&&t){var r='link[rel="preload"][as="'+tt(t)+'"]';"image"===t&&n&&n.imageSrcSet?(r+='[imagesrcset="'+tt(n.imageSrcSet)+'"]',"string"==typeof n.imageSizes&&(r+='[imagesizes="'+tt(n.imageSizes)+'"]')):r+='[href="'+tt(e)+'"]';var a=r;switch(t){case"style":a=cq(e);break;case"script":a=cG(e)}cF.has(a)||(e=f({rel:"preload",href:"image"===t&&n&&n.imageSrcSet?void 0:e,as:t},n),cF.set(a,e),null!==cB.querySelector(r)||"style"===t&&cB.querySelector(cW(a))||"script"===t&&cB.querySelector(cJ(a))||(cf(t=cB.createElement("link"),"link",e),eZ(t),cB.head.appendChild(t)))}},m:function(e,t){if(cH.m(e,t),cB&&e){var n=t&&"string"==typeof t.as?t.as:"script",r='link[rel="modulepreload"][as="'+tt(n)+'"][href="'+tt(e)+'"]',a=r;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":a=cG(e)}if(!cF.has(a)&&(e=f({rel:"modulepreload",href:e},t),cF.set(a,e),null===cB.querySelector(r))){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(cB.querySelector(cJ(a)))return}cf(n=cB.createElement("link"),"link",e),eZ(n),cB.head.appendChild(n)}}},X:function(e,t){if(cH.X(e,t),cB&&e){var n=eW(cB).hoistableScripts,r=cG(e),a=n.get(r);a||((a=cB.querySelector(cJ(r)))||(e=f({src:e,async:!0},t),(t=cF.get(r))&&c0(e,t),eZ(a=cB.createElement("script")),cf(a,"link",e),cB.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},n.set(r,a))}},S:function(e,t,n){if(cH.S(e,t,n),cB&&e){var r=eW(cB).hoistableStyles,a=cq(e);t=t||"default";var o=r.get(a);if(!o){var i={loading:0,preload:null};if(o=cB.querySelector(cW(a)))i.loading=5;else{e=f({rel:"stylesheet",href:e,"data-precedence":t},n),(n=cF.get(a))&&cX(e,n);var l=o=cB.createElement("link");eZ(l),cf(l,"link",e),l._p=new Promise(function(e,t){l.onload=e,l.onerror=t}),l.addEventListener("load",function(){i.loading|=1}),l.addEventListener("error",function(){i.loading|=2}),i.loading|=4,cY(o,t,cB)}o={type:"stylesheet",instance:o,count:1,state:i},r.set(a,o)}}},M:function(e,t){if(cH.M(e,t),cB&&e){var n=eW(cB).hoistableScripts,r=cG(e),a=n.get(r);a||((a=cB.querySelector(cJ(r)))||(e=f({src:e,async:!0,type:"module"},t),(t=cF.get(r))&&c0(e,t),eZ(a=cB.createElement("script")),cf(a,"link",e),cB.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},n.set(r,a))}}};var cB="u"<typeof document?null:document;function cK(e,t,n){if(cB&&"string"==typeof t&&t){var r=tt(t);r='link[rel="'+e+'"][href="'+r+'"]',"string"==typeof n&&(r+='[crossorigin="'+n+'"]'),c$.has(r)||(c$.add(r),e={rel:e,crossOrigin:n,href:t},null===cB.querySelector(r)&&(cf(t=cB.createElement("link"),"link",e),eZ(t),cB.head.appendChild(t)))}}function cV(e,t,n,r){var a=(a=H.current)?cU(a):null;if(!a)throw Error(l(446));switch(e){case"meta":case"title":return null;case"style":return"string"==typeof n.precedence&&"string"==typeof n.href?(t=cq(n.href),(r=(n=eW(a).hoistableStyles).get(t))||(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("stylesheet"===n.rel&&"string"==typeof n.href&&"string"==typeof n.precedence){e=cq(n.href);var o,i,s,c,u=eW(a).hoistableStyles,d=u.get(e);if(d||(a=a.ownerDocument||a,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,d),(u=a.querySelector(cW(e)))&&!u._p&&(d.instance=u,d.state.loading=5),cF.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},cF.set(e,n),u||(o=a,i=e,s=n,c=d.state,o.querySelector('link[rel="preload"][as="style"]['+i+"]")?c.loading=1:(c.preload=i=o.createElement("link"),i.addEventListener("load",function(){return c.loading|=1}),i.addEventListener("error",function(){return c.loading|=2}),cf(i,"link",s),eZ(i),o.head.appendChild(i))))),t&&null===r)throw Error(l(528,""));return d}if(t&&null!==r)throw Error(l(529,""));return null;case"script":return t=n.async,"string"==typeof(n=n.src)&&t&&"function"!=typeof t&&"symbol"!=typeof t?(t=cG(n),(r=(n=eW(a).hoistableScripts).get(t))||(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(l(444,e))}}function cq(e){return'href="'+tt(e)+'"'}function cW(e){return'link[rel="stylesheet"]['+e+"]"}function cZ(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function cG(e){return'[src="'+tt(e)+'"]'}function cJ(e){return"script[async]"+e}function cQ(e,t,n){if(t.count++,null===t.instance)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+tt(n.href)+'"]');if(r)return t.instance=r,eZ(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return eZ(r=(e.ownerDocument||e).createElement("style")),cf(r,"style",a),cY(r,n.precedence,e),t.instance=r;case"stylesheet":a=cq(n.href);var o=e.querySelector(cW(a));if(o)return t.state.loading|=4,t.instance=o,eZ(o),o;r=cZ(n),(a=cF.get(a))&&cX(r,a),eZ(o=(e.ownerDocument||e).createElement("link"));var i=o;return i._p=new Promise(function(e,t){i.onload=e,i.onerror=t}),cf(o,"link",r),t.state.loading|=4,cY(o,n.precedence,e),t.instance=o;case"script":if(o=cG(n.src),a=e.querySelector(cJ(o)))return t.instance=a,eZ(a),a;return r=n,(a=cF.get(o))&&c0(r=f({},n),a),eZ(a=(e=e.ownerDocument||e).createElement("script")),cf(a,"link",r),e.head.appendChild(a),t.instance=a;case"void":return null;default:throw Error(l(443,t.type))}return"stylesheet"===t.type&&0==(4&t.state.loading)&&(r=t.instance,t.state.loading|=4,cY(r,n.precedence,e)),t.instance}function cY(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=r.length?r[r.length-1]:null,o=a,i=0;i<r.length;i++){var l=r[i];if(l.dataset.precedence===t)o=l;else if(o!==a)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=9===n.nodeType?n.head:n).insertBefore(e,t.firstChild)}function cX(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.title&&(e.title=t.title)}function c0(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.integrity&&(e.integrity=t.integrity)}var c1=null;function c2(e,t,n){if(null===c1){var r=new Map,a=c1=new Map;a.set(n,r)}else(r=(a=c1).get(n))||(r=new Map,a.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),a=0;a<n.length;a++){var o=n[a];if(!(o[eH]||o[eL]||"link"===e&&"stylesheet"===o.getAttribute("rel"))&&"http://www.w3.org/2000/svg"!==o.namespaceURI){var i=o.getAttribute(t)||"";i=e+i;var l=r.get(i);l?l.push(o):r.set(i,[o])}}return r}function c4(e,t,n){(e=e.ownerDocument||e).head.insertBefore(n,"title"===t?e.querySelector("head > title"):null)}function c3(e){return"stylesheet"!==e.type||0!=(3&e.state.loading)}var c5=0;function c6(){if(this.count--,0===this.count&&(0===this.imgCount||!this.waitingForImages)){if(this.stylesheets)c9(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var c8=null;function c9(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,c8=new Map,t.forEach(c7,e),c8=null,c6.call(e))}function c7(e,t){if(!(4&t.state.loading)){var n=c8.get(e);if(n)var r=n.get(null);else{n=new Map,c8.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<a.length;o++){var i=a[o];("LINK"===i.nodeName||"not all"!==i.getAttribute("media"))&&(n.set(i.dataset.precedence,i),r=i)}r&&n.set(null,r)}i=(a=t.instance).getAttribute("data-precedence"),(o=n.get(i)||r)===r&&n.set(null,a),n.set(i,a),this.count++,r=c6.bind(this),a.addEventListener("load",r),a.addEventListener("error",r),o?o.parentNode.insertBefore(a,o.nextSibling):(e=9===e.nodeType?e.head:e).insertBefore(a,e.firstChild),t.state.loading|=4}}var ue={$$typeof:x,Provider:null,Consumer:null,_currentValue:R,_currentValue2:R,_threadCount:0};function ut(e,t,n,r,a,o,i,l,s){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=eO(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=eO(0),this.hiddenUpdates=eO(null),this.identifierPrefix=r,this.onUncaughtError=a,this.onCaughtError=o,this.onRecoverableError=i,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=s,this.incompleteTransitions=new Map}function un(e,t,n,r,a,o){a=a?n9:n9,null===r.context?r.context=a:r.pendingContext=a,(r=aS(t)).payload={element:n},null!==(o=void 0===o?null:o)&&(r.callback=o),null!==(n=aO(e,r,t))&&(sl(n,e,t),aC(n,e,t))}function ur(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function ua(e,t){ur(e,t),(e=e.alternate)&&ur(e,t)}function uo(e){if(13===e.tag||31===e.tag){var t=n5(e,0x4000000);null!==t&&sl(t,e,0x4000000),ua(e,0x4000000)}}function ui(e){if(13===e.tag||31===e.tag){var t=so(),n=n5(e,t=e_(t));null!==n&&sl(n,e,t),ua(e,t)}}var ul=!0;function us(e,t,n,r){var a=T.T;T.T=null;var o=A.p;try{A.p=2,uu(e,t,n,r)}finally{A.p=o,T.T=a}}function uc(e,t,n,r){var a=T.T;T.T=null;var o=A.p;try{A.p=8,uu(e,t,n,r)}finally{A.p=o,T.T=a}}function uu(e,t,n,r){if(ul){var a=ud(r);if(null===a)ct(e,t,r,uf,n),uj(e,r);else if(function(e,t,n,r,a){switch(t){case"focusin":return ug=uS(ug,e,t,n,r,a),!0;case"dragenter":return uy=uS(uy,e,t,n,r,a),!0;case"mouseover":return uv=uS(uv,e,t,n,r,a),!0;case"pointerover":var o=a.pointerId;return ub.set(o,uS(ub.get(o)||null,e,t,n,r,a)),!0;case"gotpointercapture":return o=a.pointerId,ux.set(o,uS(ux.get(o)||null,e,t,n,r,a)),!0}return!1}(a,e,t,n,r))r.stopPropagation();else if(uj(e,r),4&t&&-1<uk.indexOf(e)){for(;null!==a;){var o=eV(a);if(null!==o)switch(o.tag){case 3:if((o=o.stateNode).current.memoizedState.isDehydrated){var i=ew(o.pendingLanes);if(0!==i){var l=o;for(l.pendingLanes|=2,l.entangledLanes|=2;i;){var s=1<<31-em(i);l.entanglements[1]|=s,i&=~s}sV(o),0==(6&lI)&&(l4=er()+500,sq(0,!1))}}break;case 31:case 13:null!==(l=n5(o,2))&&sl(l,o,2),sd(),ua(o,2)}if(null===(o=ud(r))&&ct(e,t,r,uf,n),o===a)break;a=o}null!==a&&r.stopPropagation()}else ct(e,t,r,null,n)}}function ud(e){return up(e=tv(e))}var uf=null;function up(e){if(uf=null,null!==(e=eK(e))){var t=s(e);if(null===t)e=null;else{var n=t.tag;if(13===n){if(null!==(e=c(t)))return e;e=null}else if(31===n){if(null!==(e=u(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return uf=e,null}function uh(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(ea()){case eo:return 2;case ei:return 8;case el:case es:return 32;case ec:return 0x10000000;default:return 32}default:return 32}}var um=!1,ug=null,uy=null,uv=null,ub=new Map,ux=new Map,uw=[],uk="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 uj(e,t){switch(e){case"focusin":case"focusout":ug=null;break;case"dragenter":case"dragleave":uy=null;break;case"mouseover":case"mouseout":uv=null;break;case"pointerover":case"pointerout":ub.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ux.delete(t.pointerId)}}function uS(e,t,n,r,a,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[a]},null!==t&&null!==(t=eV(t))&&uo(t)):(e.eventSystemFlags|=r,t=e.targetContainers,null!==a&&-1===t.indexOf(a)&&t.push(a)),e}function uO(e){var t=eK(e.target);if(null!==t){var n=s(t);if(null!==n){if(13===(t=n.tag)){if(null!==(t=c(n))){e.blockedOn=t,eA(e.priority,function(){ui(n)});return}}else if(31===t){if(null!==(t=u(n))){e.blockedOn=t,eA(e.priority,function(){ui(n)});return}}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=3===n.tag?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function uC(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=ud(e.nativeEvent);if(null!==n)return null!==(t=eV(n))&&uo(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);ty=r,n.target.dispatchEvent(r),ty=null,t.shift()}return!0}function uN(e,t,n){uC(e)&&n.delete(t)}function uP(){um=!1,null!==ug&&uC(ug)&&(ug=null),null!==uy&&uC(uy)&&(uy=null),null!==uv&&uC(uv)&&(uv=null),ub.forEach(uN),ux.forEach(uN)}function uE(e,t){e.blockedOn===t&&(e.blockedOn=null,um||(um=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,uP)))}var u_=null;function uz(e){u_!==e&&(u_=e,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){u_===e&&(u_=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],a=e[t+2];if("function"!=typeof r)if(null===up(r||n))continue;else break;var o=eV(n);null!==o&&(e.splice(t,3),t-=3,oQ(o,{pending:!0,data:a,method:n.method,action:r},r,a))}}))}function uT(e){function t(t){return uE(t,e)}null!==ug&&uE(ug,e),null!==uy&&uE(uy,e),null!==uv&&uE(uv,e),ub.forEach(t),ux.forEach(t);for(var n=0;n<uw.length;n++){var r=uw[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<uw.length&&null===(n=uw[0]).blockedOn;)uO(n),null===n.blockedOn&&uw.shift();if(null!=(n=(e.ownerDocument||e).$$reactFormReplay))for(r=0;r<n.length;r+=3){var a=n[r],o=n[r+1],i=a[eI]||null;if("function"==typeof o)i||uz(n);else if(i){var l=null;if(o&&o.hasAttribute("formAction")){if(a=o,i=o[eI]||null)l=i.formAction;else if(null!==up(a))continue}else l=i.action;"function"==typeof l?n[r+1]=l:(n.splice(r,3),r-=3),uz(n)}}}function uA(){function e(e){e.canIntercept&&"react-transition"===e.info&&e.intercept({handler:function(){return new Promise(function(e){return a=e})},focusReset:"manual",scroll:"manual"})}function t(){null!==a&&(a(),a=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&null!=e.url&&navigation.navigate(e.url,{state:e.getState(),info:"react-transition",history:"replace"})}}if("object"==typeof navigation){var r=!1,a=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),null!==a&&(a(),a=null)}}}function uR(e){this._internalRoot=e}function uL(e){this._internalRoot=e}uL.prototype.render=uR.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(l(409));un(t.current,so(),e,t,null,null)},uL.prototype.unmount=uR.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;un(e.current,2,null,e,null,null),sd(),t[eM]=null}},uL.prototype.unstable_scheduleHydration=function(e){if(e){var t=eT();e={blockedOn:null,target:e,priority:t};for(var n=0;n<uw.length&&0!==t&&t<uw[n].priority;n++);uw.splice(n,0,e),0===n&&uO(e)}};var uI=o.version;if("19.2.8"!==uI)throw Error(l(527,uI,"19.2.8"));if(A.findDOMNode=function(e){var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(l(188));throw Error(l(268,e=Object.keys(e).join(",")))}return null===(e=null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=s(e)))throw Error(l(188));return t!==e?null:e}for(var n=e,r=t;;){var a=n.return;if(null===a)break;var o=a.alternate;if(null===o){if(null!==(r=a.return)){n=r;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return d(a),e;if(o===r)return d(a),t;o=o.sibling}throw Error(l(188))}if(n.return!==r.return)n=a,r=o;else{for(var i=!1,c=a.child;c;){if(c===n){i=!0,n=a,r=o;break}if(c===r){i=!0,r=a,n=o;break}c=c.sibling}if(!i){for(c=o.child;c;){if(c===n){i=!0,n=o,r=a;break}if(c===r){i=!0,r=o,n=a;break}c=c.sibling}if(!i)throw Error(l(189))}}if(n.alternate!==r)throw Error(l(190))}if(3!==n.tag)throw Error(l(188));return n.stateNode.current===n?e:t}(t))?function e(t){var n=t.tag;if(5===n||26===n||27===n||6===n)return t;for(t=t.child;null!==t;){if(null!==(n=e(t)))return n;t=t.sibling}return null}(e):null)?null:e.stateNode},"u">typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var uM=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!uM.isDisabled&&uM.supportsFiber)try{ef=uM.inject({bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:T,reconcilerVersion:"19.2.8"}),ep=uM}catch(e){}}t.createRoot=function(e,t){if(!(n=e)||1!==n.nodeType&&9!==n.nodeType&&11!==n.nodeType)throw Error(l(299));var n,r,a,o,i,s=!1,c="",u=id,d=ip,f=ih;return null!=t&&(!0===t.unstable_strictMode&&(s=!0),void 0!==t.identifierPrefix&&(c=t.identifierPrefix),void 0!==t.onUncaughtError&&(u=t.onUncaughtError),void 0!==t.onCaughtError&&(d=t.onCaughtError),void 0!==t.onRecoverableError&&(f=t.onRecoverableError)),r=e,a=1,o=!1,i=s,r=new ut(r,a,o,c,u,d,f,uA,null),a=1,!0===i&&(a|=24),i=re(3,null,null,a),r.current=i,i.stateNode=r,a=r1(),a.refCount++,r.pooledCache=a,a.refCount++,i.memoizedState={element:null,isDehydrated:o,cache:a},ak(i),t=r,e[eM]=t.current,s7(e),new uR(t)}},2310(e,t,n){var r=n(4041);function a(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var i={d:{f:o,r:function(){throw Error(a(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},l=Symbol.for("react.portal"),s=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){return"font"===e?"":"string"==typeof t?"use-credentials"===t?t:"":void 0}t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType)throw Error(a(299));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:l,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},t.preconnect=function(e,t){"string"==typeof e&&(t=t?"string"==typeof(t=t.crossOrigin)?"use-credentials"===t?t:"":void 0:null,i.d.C(e,t))},t.prefetchDNS=function(e){"string"==typeof e&&i.d.D(e)},t.preinit=function(e,t){if("string"==typeof e&&t&&"string"==typeof t.as){var n=t.as,r=c(n,t.crossOrigin),a="string"==typeof t.integrity?t.integrity:void 0,o="string"==typeof t.fetchPriority?t.fetchPriority:void 0;"style"===n?i.d.S(e,"string"==typeof t.precedence?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):"script"===n&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:"string"==typeof t.nonce?t.nonce:void 0})}},t.preinitModule=function(e,t){if("string"==typeof e)if("object"==typeof t&&null!==t){if(null==t.as||"script"===t.as){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0})}}else null==t&&i.d.M(e)},t.preload=function(e,t){if("string"==typeof e&&"object"==typeof t&&null!==t&&"string"==typeof t.as){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0,type:"string"==typeof t.type?t.type:void 0,fetchPriority:"string"==typeof t.fetchPriority?t.fetchPriority:void 0,referrerPolicy:"string"==typeof t.referrerPolicy?t.referrerPolicy:void 0,imageSrcSet:"string"==typeof t.imageSrcSet?t.imageSrcSet:void 0,imageSizes:"string"==typeof t.imageSizes?t.imageSizes:void 0,media:"string"==typeof t.media?t.media:void 0})}},t.preloadModule=function(e,t){if("string"==typeof e)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:"string"==typeof t.as&&"script"!==t.as?t.as:void 0,crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0})}else i.d.m(e)},t.requestFormReset=function(e){i.d.r(e)},t.unstable_batchedUpdates=function(e,t){return e(t)},t.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},t.useFormStatus=function(){return s.H.useHostTransitionStatus()},t.version="19.2.8"},5873(e,t,n){!function e(){if("u">typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(6974)},3144(e,t,n){!function e(){if("u">typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(2310)},1197(e,t){var n=Symbol.for("react.transitional.element");function r(e,t,r){var a=null;if(void 0!==r&&(a=""+r),void 0!==t.key&&(a=""+t.key),"key"in t)for(var o in r={},t)"key"!==o&&(r[o]=t[o]);else r=t;return{$$typeof:n,type:e,key:a,ref:void 0!==(t=r.ref)?t:null,props:r}}t.Fragment=Symbol.for("react.fragment"),t.jsx=r,t.jsxs=r},2062(e,t){var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),h=Symbol.iterator,m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,y={};function v(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||m}function b(){}function x(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||m}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},b.prototype=v.prototype;var w=x.prototype=new b;w.constructor=x,g(w,v.prototype),w.isPureReactComponent=!0;var k=Array.isArray;function j(){}var S={H:null,A:null,T:null,S:null},O=Object.prototype.hasOwnProperty;function C(e,t,r){var a=r.ref;return{$$typeof:n,type:e,key:t,ref:void 0!==a?a:null,props:r}}function N(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var P=/\/+/g;function E(e,t){var n,r;return"object"==typeof e&&null!==e&&null!=e.key?(n=""+e.key,r={"=":"=0",":":"=2"},"$"+n.replace(/[=:]/g,function(e){return r[e]})):t.toString(36)}function _(e,t,a){if(null==e)return e;var o=[],i=0;return!function e(t,a,o,i,l){var s,c,u,d=typeof t;("undefined"===d||"boolean"===d)&&(t=null);var p=!1;if(null===t)p=!0;else switch(d){case"bigint":case"string":case"number":p=!0;break;case"object":switch(t.$$typeof){case n:case r:p=!0;break;case f:return e((p=t._init)(t._payload),a,o,i,l)}}if(p)return l=l(t),p=""===i?"."+E(t,0):i,k(l)?(o="",null!=p&&(o=p.replace(P,"$&/")+"/"),e(l,a,o,"",function(e){return e})):null!=l&&(N(l)&&(s=l,c=o+(null==l.key||t&&t.key===l.key?"":(""+l.key).replace(P,"$&/")+"/")+p,l=C(s.type,c,s.props)),a.push(l)),1;p=0;var m=""===i?".":i+":";if(k(t))for(var g=0;g<t.length;g++)d=m+E(i=t[g],g),p+=e(i,a,o,d,l);else if("function"==typeof(g=null===(u=t)||"object"!=typeof u?null:"function"==typeof(u=h&&u[h]||u["@@iterator"])?u:null))for(t=g.call(t),g=0;!(i=t.next()).done;)d=m+E(i=i.value,g++),p+=e(i,a,o,d,l);else if("object"===d){if("function"==typeof t.then)return e(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"==typeof e.status?e.then(j,j):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(t),a,o,i,l);throw Error("Objects are not valid as a React child (found: "+("[object Object]"===(a=String(t))?"object with keys {"+Object.keys(t).join(", ")+"}":a)+"). If you meant to render a collection of children, use an array instead.")}return p}(e,o,"","",function(e){return t.call(a,e,i++)}),o}function z(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){(0===e._status||-1===e._status)&&(e._status=1,e._result=t)},function(t){(0===e._status||-1===e._status)&&(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var T="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)};t.Activity=p,t.Children={map:_,forEach:function(e,t,n){_(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return _(e,function(){t++}),t},toArray:function(e){return _(e,function(e){return e})||[]},only:function(e){if(!N(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=v,t.Fragment=a,t.Profiler=i,t.PureComponent=x,t.StrictMode=o,t.Suspense=u,t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=S,t.__COMPILER_RUNTIME={__proto__:null,c:function(e){return S.H.useMemoCache(e)}},t.cache=function(e){return function(){return e.apply(null,arguments)}},t.cacheSignal=function(){return null},t.cloneElement=function(e,t,n){if(null==e)throw Error("The argument must be a React element, but you passed "+e+".");var r=g({},e.props),a=e.key;if(null!=t)for(o in void 0!==t.key&&(a=""+t.key),t)O.call(t,o)&&"key"!==o&&"__self"!==o&&"__source"!==o&&("ref"!==o||void 0!==t.ref)&&(r[o]=t[o]);var o=arguments.length-2;if(1===o)r.children=n;else if(1<o){for(var i=Array(o),l=0;l<o;l++)i[l]=arguments[l+2];r.children=i}return C(e.type,a,r)},t.createContext=function(e){return(e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:l,_context:e},e},t.createElement=function(e,t,n){var r,a={},o=null;if(null!=t)for(r in void 0!==t.key&&(o=""+t.key),t)O.call(t,r)&&"key"!==r&&"__self"!==r&&"__source"!==r&&(a[r]=t[r]);var i=arguments.length-2;if(1===i)a.children=n;else if(1<i){for(var l=Array(i),s=0;s<i;s++)l[s]=arguments[s+2];a.children=l}if(e&&e.defaultProps)for(r in i=e.defaultProps)void 0===a[r]&&(a[r]=i[r]);return C(e,o,a)},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=N,t.lazy=function(e){return{$$typeof:f,_payload:{_status:-1,_result:e},_init:z}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=S.T,n={};S.T=n;try{var r=e(),a=S.S;null!==a&&a(n,r),"object"==typeof r&&null!==r&&"function"==typeof r.then&&r.then(j,T)}catch(e){T(e)}finally{null!==t&&null!==n.types&&(t.types=n.types),S.T=t}},t.unstable_useCacheRefresh=function(){return S.H.useCacheRefresh()},t.use=function(e){return S.H.use(e)},t.useActionState=function(e,t,n){return S.H.useActionState(e,t,n)},t.useCallback=function(e,t){return S.H.useCallback(e,t)},t.useContext=function(e){return S.H.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e,t){return S.H.useDeferredValue(e,t)},t.useEffect=function(e,t){return S.H.useEffect(e,t)},t.useEffectEvent=function(e){return S.H.useEffectEvent(e)},t.useId=function(){return S.H.useId()},t.useImperativeHandle=function(e,t,n){return S.H.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return S.H.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return S.H.useLayoutEffect(e,t)},t.useMemo=function(e,t){return S.H.useMemo(e,t)},t.useOptimistic=function(e,t){return S.H.useOptimistic(e,t)},t.useReducer=function(e,t,n){return S.H.useReducer(e,t,n)},t.useRef=function(e){return S.H.useRef(e)},t.useState=function(e){return S.H.useState(e)},t.useSyncExternalStore=function(e,t,n){return S.H.useSyncExternalStore(e,t,n)},t.useTransition=function(){return S.H.useTransition()},t.version="19.2.8"},4041(e,t,n){e.exports=n(2062)},1085(e,t,n){e.exports=n(1197)},6310(e,t){function n(e,t){var n=e.length;for(e.push(t);0<n;){var r=n-1>>>1,a=e[r];if(0<o(a,t))e[r]=t,e[n]=a,n=r;else break}}function r(e){return 0===e.length?null:e[0]}function a(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;for(var r=0,a=e.length,i=a>>>1;r<i;){var l=2*(r+1)-1,s=e[l],c=l+1,u=e[c];if(0>o(s,n))c<a&&0>o(u,s)?(e[r]=u,e[c]=n,r=c):(e[r]=s,e[l]=n,r=l);else if(c<a&&0>o(u,n))e[r]=u,e[c]=n,r=c;else break}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(t.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var i,l=performance;t.unstable_now=function(){return l.now()}}else{var s=Date,c=s.now();t.unstable_now=function(){return s.now()-c}}var u=[],d=[],f=1,p=null,h=3,m=!1,g=!1,y=!1,v=!1,b="function"==typeof setTimeout?setTimeout:null,x="function"==typeof clearTimeout?clearTimeout:null,w="u">typeof setImmediate?setImmediate:null;function k(e){for(var t=r(d);null!==t;){if(null===t.callback)a(d);else if(t.startTime<=e)a(d),t.sortIndex=t.expirationTime,n(u,t);else break;t=r(d)}}function j(e){if(y=!1,k(e),!g)if(null!==r(u))g=!0,S||(S=!0,i());else{var t=r(d);null!==t&&T(j,t.startTime-e)}}var S=!1,O=-1,C=5,N=-1;function P(){return!!v||!(t.unstable_now()-N<C)}function E(){if(v=!1,S){var e=t.unstable_now();N=e;var n=!0;try{e:{g=!1,y&&(y=!1,x(O),O=-1),m=!0;var o=h;try{t:{for(k(e),p=r(u);null!==p&&!(p.expirationTime>e&&P());){var l=p.callback;if("function"==typeof l){p.callback=null,h=p.priorityLevel;var s=l(p.expirationTime<=e);if(e=t.unstable_now(),"function"==typeof s){p.callback=s,k(e),n=!0;break t}p===r(u)&&a(u),k(e)}else a(u);p=r(u)}if(null!==p)n=!0;else{var c=r(d);null!==c&&T(j,c.startTime-e),n=!1}}break e}finally{p=null,h=o,m=!1}}}finally{n?i():S=!1}}}if("function"==typeof w)i=function(){w(E)};else if("u">typeof MessageChannel){var _=new MessageChannel,z=_.port2;_.port1.onmessage=E,i=function(){z.postMessage(null)}}else i=function(){b(E,0)};function T(e,n){O=b(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):C=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return h},t.unstable_next=function(e){switch(h){case 1:case 2:case 3:var t=3;break;default:t=h}var n=h;h=t;try{return e()}finally{h=n}},t.unstable_requestPaint=function(){v=!0},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=h;h=e;try{return t()}finally{h=n}},t.unstable_scheduleCallback=function(e,a,o){var l=t.unstable_now();switch(o="object"==typeof o&&null!==o&&"number"==typeof(o=o.delay)&&0<o?l+o:l,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=0x3fffffff;break;case 4:s=1e4;break;default:s=5e3}return s=o+s,e={id:f++,callback:a,priorityLevel:e,startTime:o,expirationTime:s,sortIndex:-1},o>l?(e.sortIndex=o,n(d,e),null===r(u)&&e===r(d)&&(y?(x(O),O=-1):y=!0,T(j,o-l))):(e.sortIndex=s,n(u,e),g||m||(g=!0,S||(S=!0,i()))),e},t.unstable_shouldYield=P,t.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}},7967(e,t,n){e.exports=n(6310)},3296(e,t,n){var r=n(4041),a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useState,i=r.useEffect,l=r.useLayoutEffect,s=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!a(e,n)}catch(e){return!0}}var u="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),a=r[0].inst,u=r[1];return l(function(){a.value=n,a.getSnapshot=t,c(a)&&u({inst:a})},[e,n,t]),i(function(){return c(a)&&u({inst:a}),e(function(){c(a)&&u({inst:a})})},[e]),s(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},8139(e,t,n){e.exports=n(3296)},2903(e,t,n){let r;n.d(t,{Bd:()=>ef,CY:()=>eO,s9:()=>eS});var a=n(1085);let o=e=>"string"==typeof e,i=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},l=e=>null==e?"":String(e),s=/###/g,c=e=>e&&e.includes("###")?e.replace(s,"."):e,u=e=>!e||o(e),d=(e,t,n)=>{let r=o(t)?t.split("."):t,a=0;for(;a<r.length-1;){if(u(e))return{};let t=c(r[a]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++a}return u(e)?{}:{obj:e,k:c(r[a])}},f=(e,t,n)=>{let{obj:r,k:a}=d(e,t,Object);if(void 0!==r||1===t.length){r[a]=n;return}let o=t[t.length-1],i=t.slice(0,t.length-1),l=d(e,i,Object);for(;void 0===l.obj&&i.length;)o=`${i[i.length-1]}.${o}`,l=d(e,i=i.slice(0,i.length-1),Object),l?.obj&&void 0!==l.obj[`${l.k}.${o}`]&&(l.obj=void 0);l.obj[`${l.k}.${o}`]=n},p=(e,t)=>{let{obj:n,k:r}=d(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},h=(e,t,n)=>{for(let r in t)"__proto__"!==r&&"constructor"!==r&&(Object.prototype.hasOwnProperty.call(e,r)?o(e[r])||e[r]instanceof String||o(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):h(e[r],t[r],n):e[r]=t[r]);return e},m={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},g=e=>o(e)?e.replace(/[&<>"'\/]/g,e=>m[e]):e,y=[" ",",","?","!",";"],v=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(void 0!==t)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),b=(e,t,n=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}let r=t.split(n),a=e;for(let e=0;e<r.length;){let t;if(!a||"object"!=typeof a)return;let o="";for(let i=e;i<r.length;++i)if(i!==e&&(o+=n),o+=r[i],void 0!==(t=a[o])){if(["string","number","boolean"].includes(typeof t)&&i<r.length-1)continue;e+=i-e+1;break}a=t}return a},x=e=>e?.replace(/_/g,"-"),w={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class k{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||w,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(e=e.map(e=>o(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g," "):e),o(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new k(this.logger,{...{prefix:`${this.prefix}:${e}:`},...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new k(this.logger,e)}}var j=new k;class S{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t)return void delete this.observers[e];this.observers[e].delete(t)}}once(e,t){let n=(...r)=>{t(...r),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([n,r])=>{for(let a=0;a<r;a++)n(e,...t)})}}class O extends S{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let a,i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,l=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;e.includes(".")?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):o(n)&&i?a.push(...n.split(i)):a.push(n)));let s=p(this.data,a);return(!s&&!t&&!n&&e.includes(".")&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!s&&l&&o(n))?b(this.data?.[e]?.[t],n,i):s}addResource(e,t,n,r,a={silent:!1}){let o=void 0!==a.keySeparator?a.keySeparator:this.options.keySeparator,i=[e,t];n&&(i=i.concat(o?n.split(o):n)),e.includes(".")&&(i=e.split("."),r=t,t=i[1]),this.addNamespaces(t),f(this.data,i,r),a.silent||this.emit("added",e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(o(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,a,o={silent:!1,skipCopy:!1}){let i=[e,t];e.includes(".")&&(i=e.split("."),r=n,n=t,t=i[1]),this.addNamespaces(t);let l=p(this.data,i)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?h(l,n,a):l={...l,...n},f(this.data,i,l),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var C={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,a){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,a)??t}),t}};let N=Symbol("i18next/PATH_KEY");function P(e,t){let n,r,a,{[N]:o}=e((r=[],(a=Object.create(null)).get=(e,t)=>(n?.revoke?.(),t===N)?r:(r.push(t),(n=Proxy.revocable(e,a)).proxy),Proxy.revocable(Object.create(null),a).proxy)),i=t?.keySeparator??".",l=t?.nsSeparator??":",s=t?.enableSelector==="strict";if(o.length>1&&l){let e=t?.ns,n=s?Array.isArray(e)?e:e?[e]:null:Array.isArray(e)?e:null;if(n&&(s?n:n.length>1?n.slice(1):[]).includes(o[0]))return`${o[0]}${l}${o.slice(1).join(i)}`}return o.join(i)}let E=e=>!o(e)&&"boolean"!=typeof e&&"number"!=typeof e;class _ extends S{constructor(e,t={}){super(),((e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=j.create("translator"),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(null==e)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let a=E(r.res);return!1!==n.returnObjects||!a}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");let r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,a=t.ns||this.options.defaultNS||[],i=n&&e.includes(n),l=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!((e,t,n)=>{t=t||"",n=n||"";let r=y.filter(e=>!t.includes(e)&&!n.includes(e));if(0===r.length)return!0;let a=v.getRegExp(`(${r.map(e=>"?"===e?"\\?":e).join("|")})`),o=!a.test(e);if(!o){let t=e.indexOf(n);t>0&&!a.test(e.substring(0,t))&&(o=!0)}return o})(e,n,r);if(i&&!l){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:o(a)?[a]:a};let i=e.split(n);(n!==r||n===r&&this.options.ns.includes(i[0]))&&(a=i.shift()),e=i.join(r)}return{key:e,namespaces:o(a)?[a]:a}}translate(e,t,n){let r="object"==typeof t?{...t}:t;if("object"!=typeof r&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof r&&(r={...r}),r||(r={}),null==e)return"";"function"==typeof e&&(e=P(e,{...this.options,...r})),Array.isArray(e)||(e=[String(e)]),e=e.map(e=>"function"==typeof e?P(e,{...this.options,...r}):String(e));let a=void 0!==r.returnDetails?r.returnDetails:this.options.returnDetails,i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,{key:l,namespaces:s}=this.extractFromKey(e[e.length-1],r),c=s[s.length-1],u=void 0!==r.nsSeparator?r.nsSeparator:this.options.nsSeparator;void 0===u&&(u=":");let d=r.lng||this.language,f=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()==="cimode")return f?a?{res:`${c}${u}${l}`,usedKey:l,exactUsedKey:l,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(r)}:`${c}${u}${l}`:a?{res:l,usedKey:l,exactUsedKey:l,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(r)}:l;let p=this.resolve(e,r),h=p?.res,m=p?.usedKey||l,g=p?.exactUsedKey||l,y=void 0!==r.joinArrays?r.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,b=void 0!==r.count&&!o(r.count),x=_.hasDefaultValue(r),w=b?this.pluralResolver.getSuffix(d,r.count,r):"",k=r.ordinal&&b?this.pluralResolver.getSuffix(d,r.count,{ordinal:!1}):"",j=b&&!r.ordinal&&0===r.count,S=j&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${w}`]||r[`defaultValue${k}`]||r.defaultValue,O=h;v&&!h&&x&&(O=S);let C=E(O),N=Object.prototype.toString.apply(O);if(v&&O&&C&&!["[object Number]","[object Function]","[object RegExp]"].includes(N)&&!(o(y)&&Array.isArray(O))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,O,{...r,ns:s}):`key '${l} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(r),p):e}if(i){let e=Array.isArray(O),t=e?[]:{},n=e?g:m;for(let e in O)if(Object.prototype.hasOwnProperty.call(O,e)){let a=`${n}${i}${e}`;x&&!h?t[e]=this.translate(a,{...r,defaultValue:E(S)?S[e]:void 0,...{joinArrays:!1,ns:s}}):t[e]=this.translate(a,{...r,joinArrays:!1,ns:s}),t[e]===a&&(t[e]=O[e])}h=t}}else if(v&&o(y)&&Array.isArray(h))(h=h.join(y))&&(h=this.extendTranslation(h,e,r,n));else{let t=!1,a=!1;!this.isValidLookup(h)&&x&&(t=!0,h=S),this.isValidLookup(h)||(a=!0,h=l);let o=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:h,s=x&&S!==h&&this.options.updateMissing;if(a||t||s){if(this.logger.log(s?"updateKey":"missingKey",d,c,b&&!s?`${l}${this.pluralResolver.getSuffix(d,r.count,r)}`:l,s?S:h),i){let e=this.resolve(l,{...r,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(r.lng||this.language):e.push(r.lng||this.language);let n=(e,t,n)=>{let a=x&&n!==h?n:o;this.options.missingKeyHandler?this.options.missingKeyHandler(e,c,t,a,s,r):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,c,t,a,s,r),this.emit("missingKey",e,c,t,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,r);j&&r[`defaultValue${this.options.pluralSeparator}zero`]&&!t.includes(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],l+t,r[`defaultValue${t}`]||S)})}):n(e,l,S))}h=this.extendTranslation(h,e,r,p,n),a&&h===l&&this.options.appendNamespaceToMissingKey&&(h=`${c}${u}${l}`),(a||t)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${u}${l}`:l,t?h:void 0,r))}return a?(p.res=h,p.usedParams=this.getUsedParamsDetails(r),p):h}extendTranslation(e,t,n,r,a){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){let i;n.interpolation&&this.interpolator.init({...n,...{interpolation:{...this.options.interpolation,...n.interpolation}}});let l=o(e)&&(n?.interpolation?.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(l){let t=e.match(this.interpolator.nestingRegexp);i=t&&t.length}let s=n.replace&&!o(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),l){let t=e.match(this.interpolator.nestingRegexp);i<(t&&t.length)&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(...e)=>a?.[0]!==e[0]||n.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),n)),n.interpolation&&this.interpolator.reset()}let i=n.postProcess||this.options.postProcess,l=o(i)?[i]:i;return null!=e&&l?.length&&!1!==n.applyPostProcessor&&(e=C.handle(l,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,a,i,l;return o(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>"function"==typeof e?P(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let u=s.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));let d=void 0!==t.count&&!o(t.count),f=d&&!t.ordinal&&0===t.count,p=void 0!==t.context&&(o(t.context)||"number"==typeof t.context)&&""!==t.context,h=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);u.forEach(e=>{this.isValidLookup(n)||(l=e,!this.checkedLoadedFor[`${h[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(l)&&(this.checkedLoadedFor[`${h[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${h.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach(r=>{let o;if(this.isValidLookup(n))return;i=r;let l=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(l,c,r,e,t);else{let e;d&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,a=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(t.ordinal&&e.startsWith(a)&&l.push(c+e.replace(a,this.options.pluralSeparator)),l.push(c+e),f&&l.push(c+n)),p){let r=`${c}${this.options.contextSeparator||"_"}${t.context}`;l.push(r),d&&(t.ordinal&&e.startsWith(a)&&l.push(r+e.replace(a,this.options.pluralSeparator)),l.push(r+e),f&&l.push(r+n))}}for(;o=l.pop();)this.isValidLookup(n)||(a=o,n=this.getResource(r,e,o,t))}))})}),{res:n,usedKey:r,exactUsedKey:a,usedLng:i,usedNS:l}}isValidLookup(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=e.replace&&!o(e.replace),n=t?e.replace:e;if(t&&void 0!==e.count&&(n={...n,count:e.count}),this.options.interpolation.defaultVariables&&(n={...this.options.interpolation.defaultVariables,...n}),!t)for(let e of(n={...n},["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"]))delete n[e];return n}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith("defaultValue")&&void 0!==e[t])return!0;return!1}}class z{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=j.create("languageUtils"),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(e){if(!(e=x(e))||!e.includes("-"))return null;let t=e.split("-");return 2===t.length||(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(!(e=x(e))||!e.includes("-"))return e;let t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(o(e)&&e.includes("-")){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return(t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t)?t:this.options.lowerCaseLng?e.toLowerCase():e}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){let t;return e?(e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r||(!!e.includes("-")||!!r.includes("-"))&&!!(e.includes("-")&&!r.includes("-")&&e.slice(0,e.indexOf("-"))===r||e.startsWith(r)&&r.length>1))}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),o(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){let n=this.options.fallbackLng,r=Array.isArray(n)?n.join("|"):n;r!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=r);let a=void 0===t||!1===t||o(t),i=void 0===t&&"function"==typeof this.options.fallbackLng,l=o(e)&&a&&!i,s=null;if(l){let n;n=void 0===t?"undefined":!1===t?"boolean:false":`string:${t}`,s=`${e.length}:${e}|${n}`}if(null!==s){let e=this.resolveHierarchyCache[s];if(void 0!==e)return e.slice()}let c=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),u=[],d=e=>{e&&(this.isSupportedCode(e)?u.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return(o(e)&&(e.includes("-")||e.includes("_"))?("languageOnly"!==this.options.load&&d(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&d(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&d(this.getLanguagePartFromCode(e))):o(e)&&d(this.formatLanguageCode(e)),c.forEach(e=>{u.includes(e)||d(this.formatLanguageCode(e))}),null!==s)?(this.resolveHierarchyCache[s]=u,u.slice()):u}}let T={zero:0,one:1,two:2,few:3,many:4,other:5},A={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class R{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=j.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n,r=x("dev"===e?"en":e),a=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:a});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];try{n=new Intl.PluralRules(r,{type:a})}catch(a){if("u"<typeof Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),A;if(!e.match(/-|_/))return A;let r=this.languageUtils.getLanguagePartFromCode(e);n=this.getRule(r,t)}return this.pluralRulesCache[o]=n,n}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return(n||(n=this.getRule("dev",t)),n)?n.resolvedOptions().pluralCategories.sort((e,t)=>T[e]-T[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}let L=(e,t,n,r=".",a=!0)=>{let i,l=void 0!==(i=p(e,n))?i:p(t,n);return!l&&a&&o(n)&&void 0===(l=b(e,n,r))&&(l=b(t,n,r)),l},I=e=>e.replace(/\$/g,"$$$$");class M{constructor(e={}){this.logger=j.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:a,prefixEscaped:o,suffix:i,suffixEscaped:l,formatSeparator:s,unescapeSuffix:c,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:h,nestingOptionsSeparator:m,maxReplaces:y,alwaysFormat:v}=e.interpolation;this.escape=void 0!==t?t:g,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=a?a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):o||"{{",this.suffix=i?i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):l||"}}",this.formatSeparator=s||",",this.unescapePrefix=c?"":u?u.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):"-",this.unescapeSuffix=this.unescapePrefix?"":c?c.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):"",this.nestingPrefix=d?d.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):f||"$t(".replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),this.nestingSuffix=p?p.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):h||")".replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),this.nestingOptionsSeparator=m||",",this.maxReplaces=y||1e3,this.alwaysFormat=void 0!==v&&v,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let a,i,s,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=e=>{if(!e.includes(this.formatSeparator)){let a=L(t,c,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(a,void 0,n,{...r,...t,interpolationkey:e}):a}let a=e.split(this.formatSeparator),o=a.shift().trim(),i=a.join(this.formatSeparator).trim();return this.format(L(t,c,o,this.options.keySeparator,this.options.ignoreJSONStructure),i,n,{...r,...t,interpolationkey:o})};this.resetRegExp(),!this.escapeValue&&"string"==typeof e&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");let d=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,f=r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>e},{regex:this.regexp,safeValue:e=>this.escapeValue?this.escape(e):e}].forEach(t=>{for(s=0;a=t.regex.exec(e);){let n=a[1].trim();if(void 0===(i=u(n)))if("function"==typeof d){let t=d(e,a,r);i=o(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))i="";else if(f){i=a[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),i="";else o(i)||this.useRawValueToEscape||(i=l(i));let c=t.safeValue(i);if(e=e.replace(a[0],I(c)),f?(t.regex.lastIndex+=c.length,t.regex.lastIndex-=a[0].length):t.regex.lastIndex=0,++s>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,a,i,s=(e,t)=>{let n=this.nestingOptionsSeparator;if(!e.includes(n))return e;let r=e.split(RegExp(`${n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}[ ]*{`)),a=`{${r[1]}`;e=r[0];let o=(a=this.interpolate(a,i)).match(/'/g),l=a.match(/"/g);((o?.length??0)%2!=0||l)&&(l?.length??0)%2==0||(a=a.replace(/'/g,'"'));try{i=JSON.parse(a),t&&(i={...t,...i})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${a}`}return i.defaultValue&&i.defaultValue.includes(this.prefix)&&delete i.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let c=[];(i=(i={...n}).replace&&!o(i.replace)?i.replace:i).applyPostProcessor=!1,delete i.defaultValue;let u=/{.*}/s.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(-1!==u&&(c=r[1].slice(u).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,u)),(a=t(s.call(this,r[1].trim(),i),i))&&r[0]===e&&!o(a))return a;o(a)||(a=l(a)),a||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),a=""),c.length&&(a=c.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),a.trim())),e=e.replace(r[0],a),this.regexp.lastIndex=0}return e}}let D=e=>{let t={};return(n,r,a)=>{let o=a;a&&a.interpolationkey&&a.formatParams&&a.formatParams[a.interpolationkey]&&a[a.interpolationkey]&&(o={...o,[a.interpolationkey]:void 0});let i=r+JSON.stringify(o),l=t[i];return l||(l=e(x(r),a),t[i]=l),l(n)}},F=e=>(t,n,r)=>e(x(n),r)(t);class ${constructor(e={}){this.logger=j.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";let n=t.cacheInBuiltFormats?D:F;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=D(t)}format(e,t,n,r={}){if(!t||null==e)return e;let a=t.split(this.formatSeparator),o=[];for(let e=0;e<a.length;e++){let t=a[e];for(;t.indexOf("(")>-1&&!t.includes(")")&&e+1<a.length;)t=`${t}${this.formatSeparator}${a[++e]}`;o.push(t)}return o.reduce((e,t)=>{let{formatName:a,formatOptions:o}=(e=>{let t=e.toLowerCase().trim(),n={};if(e.includes("(")){let r=e.split("(");t=r[0].toLowerCase().trim();let a=r[1].slice(0,-1);"currency"!==t||a.includes(":")?"relativetime"!==t||a.includes(":")?a.split(";").forEach(e=>{if(e){let[t,...r]=e.split(":"),a=r.join(":").trim().replace(/^'+|'+$/g,""),o=t.trim();n[o]||(n[o]=a),"false"===a&&(n[o]=!1),"true"===a&&(n[o]=!0),isNaN(a)||(n[o]=parseInt(a,10))}}):n.range||(n.range=a.trim()):n.currency||(n.currency=a.trim())}return{formatName:t,formatOptions:n}})(t);if(this.formats[a]){let t=e;try{let i=r?.formatParams?.[r.interpolationkey]||{},l=i.locale||i.lng||r.locale||r.lng||n;t=this.formats[a](e,l,{...o,...r,...i})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${a}`),e},e)}}class U extends S{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=j.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let a={},o={},i={},l={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let i=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[i]=2:this.state[i]<0||(1===this.state[i]?void 0===o[i]&&(o[i]=!0):(this.state[i]=1,r=!1,void 0===o[i]&&(o[i]=!0),void 0===a[i]&&(a[i]=!0),void 0===l[t]&&(l[t]=!0)))}),r||(i[e]=!0)}),(Object.keys(a).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(a),pending:Object.keys(o),toLoadLanguages:Object.keys(i),toLoadNamespaces:Object.keys(l)}}loaded(e,t,n){let r=e.split("|"),a=r[0],o=r[1];t&&this.emit("failedLoading",a,o,t),!t&&n&&this.store.addResourceBundle(a,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let i={};this.queue.forEach(n=>{((e,t,n,r)=>{let{obj:a,k:o}=d(e,t,Object);a[o]=a[o]||[],a[o].push(n)})(n.loaded,[a],o),void 0!==n.pending[e]&&(delete n.pending[e],n.pendingCount--),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{i[e]||(i[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{void 0===i[e][t]&&(i[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",i),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,a=this.retryTimeout,o){if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:a,callback:o});this.readingCalls++;let i=(i,l)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}i&&l&&r<this.maxRetries?setTimeout(()=>{this.read(e,t,n,r+1,2*a,o)},a):o(i,l)},l=this.backend[n].bind(this.backend);if(2===l.length){try{let n=l(e,t);n&&"function"==typeof n.then?n.then(e=>i(null,e)).catch(i):i(null,n)}catch(e){i(e)}return}return l(e,t,i)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();o(e)&&(e=this.languageUtils.toResolveHierarchy(e)),o(t)&&(t=[t]);let a=this.queueLoad(e,t,n,r);if(!a.toLoad.length)return a.pending.length||r(),null;a.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){let n=e.split("|"),r=n[0],a=n[1];this.read(r,a,"read",void 0,void 0,(n,o)=>{n&&this.logger.warn(`${t}loading namespace ${a} for language ${r} failed`,n),!n&&o&&this.logger.log(`${t}loaded namespace ${a} for language ${r}`,o),this.loaded(e,n,o)})}saveMissing(e,t,n,r,a,o={},i=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t))return void this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");if(null!=n&&""!==n){if(this.backend?.create){let l={...o,isUpdate:a},s=this.backend.create.bind(this.backend);if(s.length<6)try{let a;(a=5===s.length?s(e,t,n,r,l):s(e,t,n,r))&&"function"==typeof a.then?a.then(e=>i(null,e)).catch(i):i(null,a)}catch(e){i(e)}else s(e,t,n,r,i,l)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}let H=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),o(e[1])&&(t.defaultValue=e[1]),o(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),B=e=>(o(e.ns)&&(e.ns=[e.ns]),o(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),o(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),K=()=>{};class V extends S{constructor(e={},t){if(super(),this.options=B(e),this.services={},this.logger=j,this.modules={external:[]},(e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))})})(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(o(e.ns)?e.defaultNS=e.ns:e.ns.includes("translation")||(e.defaultNS=e.ns[0]));let n=H();this.options={...n,...this.options,...B(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);let r=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?j.init(r(this.modules.logger),this.options):j.init(null,this.options),e=this.modules.formatter?this.modules.formatter:$;let t=new z(this.options);this.store=new O(this.options.resources,this.options);let n=this.services;n.logger=j,n.resourceStore=this.store,n.languageUtils=t,n.pluralResolver=new R(t,{prepend:this.options.pluralSeparator}),e&&(n.formatter=r(e),n.formatter.init&&n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new M(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new U(r(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(n.languageDetector=r(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=r(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new _(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=K),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let a=i(),l=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(n),t(e,n)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),a}loadResources(e,t=K){let n=t,r=o(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()==="cimode"&&(!this.options.preload||0===this.options.preload.length))return n();let e=[],t=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&(e.includes(t)||e.push(t))})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=i();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=K),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&C.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!["cimode","dev"].includes(e)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(!["cimode","dev"].includes(t)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=i();this.emit("languageChanging",e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},a=(a,o)=>{o?this.isLanguageChangingTo===e&&(r(o),this.translator.changeLanguage(o),this.isLanguageChangingTo=void 0,this.emit("languageChanged",o),this.logger.log("languageChanged",o)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(a,(...e)=>this.t(...e))},l=t=>{e||t||!this.services.languageDetector||(t=[]);let n=o(t)?t:t&&t[0],i=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(o(t)?[t]:t);i&&(this.language||r(i),this.translator.language||this.translator.changeLanguage(i),this.services.languageDetector?.cacheUserLanguage?.(i)),this.loadResources(i,e=>{a(e,i)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(e):l(this.services.languageDetector.detect()),n}getFixedT(e,t,n,r){let a=r?.scopeNs,i=(e,t,...r)=>{let o,l;(o="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(r)):{...t}).lng=o.lng||i.lng,o.lngs=o.lngs||i.lngs;let s=void 0!==o.ns&&null!==o.ns;o.ns=o.ns||i.ns,""!==o.keyPrefix&&(o.keyPrefix=o.keyPrefix||n||i.keyPrefix);let c={...this.options,...o};Array.isArray(a)&&!s&&(c.ns=a),"function"==typeof o.keyPrefix&&(o.keyPrefix=P(o.keyPrefix,c));let u=this.options.keySeparator||".";return o.keyPrefix&&Array.isArray(e)?l=e.map(e=>("function"==typeof e&&(e=P(e,c)),`${o.keyPrefix}${u}${e}`)):("function"==typeof e&&(e=P(e,c)),l=o.keyPrefix?`${o.keyPrefix}${u}${e}`:e),this.t(l,o)};return o(e)?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,a=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;let o=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return -1===n||0===n||2===n};if(t.precheck){let e=t.precheck(this,o);if(void 0!==e)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,e)&&(!r||o(a,e)))}loadNamespaces(e,t){let n=i();return this.options.ns?(o(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=i();o(e)&&(e=[e]);let r=this.options.preload||[],a=e.filter(e=>!r.includes(e)&&this.services.languageUtils.isSupportedCode(e));return a.length?(this.options.preload=r.concat(a),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}let t=this.services?.languageUtils||new z(H());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].includes(t.getLanguagePartFromCode(e))||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){let n=new V(e,t);return n.createInstance=V.createInstance,n}cloneInstance(e={},t=K){let n=e.forkResourceStore;n&&delete e.forkResourceStore;let r={...this.options,...e,isClone:!0},a=new V(r);if((void 0!==e.debug||void 0!==e.prefix)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},n&&(a.store=new O(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),r),a.services.resourceStore=a.store),e.interpolation){let t={...H().interpolation,...this.options.interpolation,...e.interpolation},n={...r,interpolation:t};a.services.interpolator=new M(n)}return a.translator=new _(a.services,r),a.translator.on("*",(e,...t)=>{a.emit(e,...t)}),a.init(r,t),a.translator.options=r,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}let q=V.createInstance();q.createInstance,q.dir,q.init,q.loadResources,q.reloadResources,q.use,q.changeLanguage,q.getFixedT,q.t,q.exists,q.setDefaultNamespace,q.hasLoadedNamespace,q.loadNamespaces,q.loadLanguages;var W=n(4041);Object.create(null);let Z=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,G={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"\xa9","&#169;":"\xa9","&reg;":"\xae","&#174;":"\xae","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},J=e=>G[e],Q={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(Z,J),transDefaultProps:void 0},Y=(0,W.createContext)();class X{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}let ee=(e,t,n,r)=>{let a=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(a,"warn","react-i18next::",!0);ei(a[0])&&(a[0]=`react-i18next:: ${a[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...a):console?.warn&&console.warn(...a)},et={},en=(e,t,n,r)=>{ei(n)&&et[n]||(ei(n)&&(et[n]=new Date),ee(e,t,n,r))},er=(e,t)=>()=>{if(e.isInitialized)t();else{let n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},ea=(e,t,n)=>{e.loadNamespaces(t,er(e,n))},eo=(e,t,n,r)=>{if(ei(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return ea(e,n,r);n.forEach(t=>{0>e.options.ns.indexOf(t)&&e.options.ns.push(t)}),e.loadLanguages(t,er(e,r))},ei=e=>"string"==typeof e,el={"&nbsp;":"\xa0","&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&copy;":"\xa9","&reg;":"\xae","&trade;":"™","&hellip;":"…","&ndash;":"–","&mdash;":"—","&lsquo;":"‘","&rsquo;":"’","&sbquo;":"‚","&ldquo;":"“","&rdquo;":"”","&bdquo;":"„","&dagger;":"†","&Dagger;":"‡","&bull;":"•","&prime;":"′","&Prime;":"″","&lsaquo;":"‹","&rsaquo;":"›","&sect;":"\xa7","&para;":"\xb6","&middot;":"\xb7","&ensp;":" ","&emsp;":" ","&thinsp;":" ","&euro;":"€","&pound;":"\xa3","&yen;":"\xa5","&cent;":"\xa2","&curren;":"\xa4","&times;":"\xd7","&divide;":"\xf7","&minus;":"−","&plusmn;":"\xb1","&ne;":"≠","&le;":"≤","&ge;":"≥","&asymp;":"≈","&equiv;":"≡","&infin;":"∞","&int;":"∫","&sum;":"∑","&prod;":"∏","&radic;":"√","&part;":"∂","&permil;":"‰","&deg;":"\xb0","&micro;":"\xb5","&larr;":"←","&uarr;":"↑","&rarr;":"→","&darr;":"↓","&harr;":"↔","&crarr;":"↵","&lArr;":"⇐","&uArr;":"⇑","&rArr;":"⇒","&dArr;":"⇓","&hArr;":"⇔","&alpha;":"α","&beta;":"β","&gamma;":"γ","&delta;":"δ","&epsilon;":"ε","&zeta;":"ζ","&eta;":"η","&theta;":"θ","&iota;":"ι","&kappa;":"κ","&lambda;":"λ","&mu;":"μ","&nu;":"ν","&xi;":"ξ","&omicron;":"ο","&pi;":"π","&rho;":"ρ","&sigma;":"σ","&tau;":"τ","&upsilon;":"υ","&phi;":"φ","&chi;":"χ","&psi;":"ψ","&omega;":"ω","&Alpha;":"Α","&Beta;":"Β","&Gamma;":"Γ","&Delta;":"Δ","&Epsilon;":"Ε","&Zeta;":"Ζ","&Eta;":"Η","&Theta;":"Θ","&Iota;":"Ι","&Kappa;":"Κ","&Lambda;":"Λ","&Mu;":"Μ","&Nu;":"Ν","&Xi;":"Ξ","&Omicron;":"Ο","&Pi;":"Π","&Rho;":"Ρ","&Sigma;":"Σ","&Tau;":"Τ","&Upsilon;":"Υ","&Phi;":"Φ","&Chi;":"Χ","&Psi;":"Ψ","&Omega;":"Ω","&Agrave;":"\xc0","&Aacute;":"\xc1","&Acirc;":"\xc2","&Atilde;":"\xc3","&Auml;":"\xc4","&Aring;":"\xc5","&AElig;":"\xc6","&Ccedil;":"\xc7","&Egrave;":"\xc8","&Eacute;":"\xc9","&Ecirc;":"\xca","&Euml;":"\xcb","&Igrave;":"\xcc","&Iacute;":"\xcd","&Icirc;":"\xce","&Iuml;":"\xcf","&ETH;":"\xd0","&Ntilde;":"\xd1","&Ograve;":"\xd2","&Oacute;":"\xd3","&Ocirc;":"\xd4","&Otilde;":"\xd5","&Ouml;":"\xd6","&Oslash;":"\xd8","&Ugrave;":"\xd9","&Uacute;":"\xda","&Ucirc;":"\xdb","&Uuml;":"\xdc","&Yacute;":"\xdd","&THORN;":"\xde","&szlig;":"\xdf","&agrave;":"\xe0","&aacute;":"\xe1","&acirc;":"\xe2","&atilde;":"\xe3","&auml;":"\xe4","&aring;":"\xe5","&aelig;":"\xe6","&ccedil;":"\xe7","&egrave;":"\xe8","&eacute;":"\xe9","&ecirc;":"\xea","&euml;":"\xeb","&igrave;":"\xec","&iacute;":"\xed","&icirc;":"\xee","&iuml;":"\xef","&eth;":"\xf0","&ntilde;":"\xf1","&ograve;":"\xf2","&oacute;":"\xf3","&ocirc;":"\xf4","&otilde;":"\xf5","&ouml;":"\xf6","&oslash;":"\xf8","&ugrave;":"\xf9","&uacute;":"\xfa","&ucirc;":"\xfb","&uuml;":"\xfc","&yacute;":"\xfd","&thorn;":"\xfe","&yuml;":"\xff","&iexcl;":"\xa1","&iquest;":"\xbf","&fnof;":"ƒ","&circ;":"ˆ","&tilde;":"˜","&OElig;":"Œ","&oelig;":"œ","&Scaron;":"Š","&scaron;":"š","&Yuml;":"Ÿ","&ordf;":"\xaa","&ordm;":"\xba","&macr;":"\xaf","&acute;":"\xb4","&cedil;":"\xb8","&sup1;":"\xb9","&sup2;":"\xb2","&sup3;":"\xb3","&frac14;":"\xbc","&frac12;":"\xbd","&frac34;":"\xbe","&spades;":"♠","&clubs;":"♣","&hearts;":"♥","&diams;":"♦","&loz;":"◊","&oline;":"‾","&frasl;":"⁄","&weierp;":"℘","&image;":"ℑ","&real;":"ℜ","&alefsym;":"ℵ"},es=RegExp(Object.keys(el).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),"g");var ec=n(8139);let eu={t:(e,t)=>{if(ei(t))return t;if("object"==typeof t&&null!==t&&ei(t.defaultValue))return t.defaultValue;if("function"==typeof e)return"";if(Array.isArray(e)){let t=e[e.length-1];return"function"==typeof t?"":t}return e},ready:!1},ed=()=>()=>{},ef=(e,t={})=>{let{i18n:n}=t,{i18n:a,defaultNS:o}=(0,W.useContext)(Y)||{},i=n||a||r;i&&!i.reportNamespaces&&(i.reportNamespaces=new X),i||en(i,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.");let l=(0,W.useMemo)(()=>({...Q,...i?.options?.react,...t}),[i,t]),{useSuspense:s,keyPrefix:c}=l,u=e||o||i?.options?.defaultNS,d=ei(u)?[u]:u||["translation"],f=(0,W.useMemo)(()=>d,d);i?.reportNamespaces?.addUsedNamespaces?.(f);let p=(0,W.useRef)(0),h=(0,W.useCallback)(e=>{if(!i)return ed;let{bindI18n:t,bindI18nStore:n}=l,r=()=>{p.current+=1,e()};return t&&i.on(t,r),n&&i.store.on(n,r),()=>{t&&t.split(" ").forEach(e=>i.off(e,r)),n&&n.split(" ").forEach(e=>i.store.off(e,r))}},[i,l]),m=(0,W.useRef)(),g=(0,W.useCallback)(()=>{if(!i)return eu;let e=!!(i.isInitialized||i.initializedStoreOnce)&&f.every(e=>((e,t,n={})=>t.languages&&t.languages.length?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):(en(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0))(e,i,l)),n=t.lng||i.language,r=p.current,a=m.current;if(a&&a.ready===e&&a.lng===n&&a.keyPrefix===c&&a.revision===r)return a;let o={t:i.getFixedT(n,"fallback"===l.nsMode?f:f[0],c,{scopeNs:f}),ready:e,lng:n,keyPrefix:c,revision:r};return m.current=o,o},[i,f,c,l,t.lng]),[y,v]=(0,W.useState)(0),{t:b,ready:x}=(0,ec.useSyncExternalStore)(h,g,g);(0,W.useEffect)(()=>{if(i&&!x&&!s){let e=()=>v(e=>e+1);t.lng?eo(i,t.lng,f,e):ea(i,f,e)}},[i,t.lng,f,x,s,y]);let w=i||{},k=(0,W.useRef)(null),j=(0,W.useRef)(),S=e=>{let t=Object.getOwnPropertyDescriptors(e);t.__original&&delete t.__original;let n=Object.create(Object.getPrototypeOf(e),t);if(!Object.prototype.hasOwnProperty.call(n,"__original"))try{Object.defineProperty(n,"__original",{value:e,writable:!1,enumerable:!1,configurable:!1})}catch(e){}return n},O=(0,W.useMemo)(()=>{let e=w?.language,t=w;w&&(k.current&&k.current.__original===w?j.current!==e?(k.current=t=S(w),j.current=e):t=k.current:(k.current=t=S(w),j.current=e));let n=x||s?b:(...e)=>(en(i,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),b(...e)),r=[n,t,x];return r.t=n,r.i18n=t,r.ready=x,r},[b,w,x,w.resolvedLanguage,w.language,w.languages]);if(i&&s&&!x){let e=!1;try{e=!1}catch(e){}throw e&&en(i,"SUSPENDED_WHILE_LOADING","useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook"),new Promise(e=>{let n=()=>e();t.lng?eo(i,t.lng,f,n):ea(i,f,n)})}return O};function ep({i18n:e,defaultNS:t,children:n}){let r=(0,W.useMemo)(()=>({i18n:e,defaultNS:t}),[e,t]);return(0,W.createElement)(Y.Provider,{value:r},n)}var eh=JSON.parse('{"app":{"name":"harness-switch","tagline":"Native configuration management","checkingSession":"Checking session…","brandMark":"HS / harness-switch","devMode":"Local development mode: this page is served by a local dev server"},"language":{"toEnglish":"Switch to English","toChinese":"Switch to Chinese","short":"中文"},"theme":{"toLight":"Switch to the light theme","toDark":"Switch to the dark theme"},"login":{"title":"Server configuration control plane","intro":"Activating a profile writes directly to each CLI\'s own configuration files, with no shell setup required.","hint":"Enter the web password printed in the terminal on first launch.","password":"Web password","submitting":"Signing in…","submit":"Sign in"},"nav":{"currentLocalUser":"Current local user","localUser":"Local user","syncUserConfig":"Sync user config","importExisting":"Import existing config","transfer":"Import / Export","githubSync":"GitHub Sync","vault":"Provider vault","signOut":"Sign out","switchHarness":"Switch harness"},"harness":{"subtitle":"Manage profiles and safely write this tool\'s native configuration files.","newProfile":"New profile","current":"Current: {{name}}","currentInactive":"Current: inactive","activeConfig":"Active configuration","activeNamed":"Active \xb7 {{name}}","inactive":"Inactive","active":"Active","activate":"Activate","writeTargets":"Write targets","noTargetFile":"No target file configured","moreFiles_one":"and {{count}} more file","moreFiles_other":"and {{count}} more files","overwriteWarning":"The profile overwrites the target files directly. A backup is taken first; verify connectivity and model availability after switching.","profiles":"Profiles","profileCount_one":"{{count}} custom profile","profileCount_other":"{{count}} custom profiles","noProfiles":"No profiles yet","manualOverride":"Manual override","edit":"Edit {{name}}","delete":"Delete {{name}}","deleteBlocked":"Activate another profile before deleting this one","deleteTitle":"Delete profile?","deleteBody":"This deletes {{harness}} / {{profile}}. {{extra}}This cannot be undone.","deleteAdditiveExtra":"Its provider entry in the configuration file is removed as well. ","official":"Official login","officialActive":"In use","officialSwitch":"Back to official","officialHintClaude":"Use Claude Code\'s own Anthropic account login","officialHintCodex":"Use Codex\'s own ChatGPT / OpenAI account login","application":"Application","writeMode":"Write mode","modeReplace":"Replace current configuration","modeAdditive":"Keep entries and switch pointer"},"profile":{"editTitle":"Edit {{harness}} / {{profile}}","createTitle":"New {{harness}} profile","intro":"Saving writes to {{targets}}.","additiveNote":"This tool\'s config file keeps providers side by side, so switching only moves the current pointer — the other providers you wrote by hand are left alone.","useSharedProvider":"Use a shared provider (vault)","useSharedProviderLabel":"Use a shared provider","keyFromVault":"Key comes from the vault","providerNone":"None (this profile carries its own key)","vaultEmpty":"The vault is empty. Add a provider entry under “Vault” at the top first.","namedEndpoint":"Named endpoint (optional)","namedEndpointLabel":"Named endpoint","endpointNone":"Unset (use the base URL below)","endpointOption":"{{label}} ({{key}})","noEndpoints":"This provider has no named endpoint, so the base URL below is used.","quickFill":"Quick fill:","name":"Profile name","namePlaceholder":"e.g. openrouter-main","renameHint":"Renaming also updates the recorded active profile and the provider id in the native config.","baseUrl":"API base URL","baseUrlPlaceholder":"https://api.example.com/v1","baseUrlFromVault":"The base URL comes from vault endpoint “{{endpoint}}”.","apiKey":"API key","apiKeyKeep":"Leave empty to keep the current key","apiKeyRequiredPlaceholder":"Required","apiKeySharedHint":"This profile references a shared provider; rotate the key in the vault instead.","fallbackModel":"Fallback model (ANTHROPIC_MODEL)","model":"Model","fallbackModelPlaceholder":"Optional; used when no tier matches, e.g. glm-5","modelPlaceholder":"e.g. claude-sonnet-4-5","claudeModelHint":"Leave empty to keep Claude Code\'s default model; map the individual tiers below.","notes":"Notes (optional)","advanced":"Advanced: raw configuration","overridden":"Overridden by hand","saveFirst":"Save this profile first, then reopen it to take over the raw file contents.","save":"Save profile","saving":"Saving…","rawLoading":"Reading what will be written…","rawIntro":"Below is what is currently written to disk, generated from the fields as last saved. Editing any of them counts as taking it over by hand, and the form fields stop affecting that file.","resetToGenerated":"Back to generated","selectPlaceholder":"Select one","mapping":{"title":"Model mapping","intro":"Display names only affect Claude Code\'s /model menu; an empty one shows the actual model ID. Turning on “1M context” appends [1m] to the model ID — only enable it for a model that really supports 1M.","role":"Model role","displayName":"Display name","actualModel":"Model actually requested","oneM":"1M context","defaultTo":"Default: {{model}}","notInMenu":"Not shown in the /model menu","oneMUnsupported":"{{role}} has no 1M variant","enable":"Enable"},"error":{"nameRequired":"Enter a profile name","nameSlash":"A profile name cannot contain / or \\\\","nameTooLong":"A profile name is at most {{max}} characters","baseUrlRequired":"Enter an API base URL","apiKeyRequired":"Enter an API key","modelRequired":"Enter a model name","providerGone":"The referenced provider no longer exists — pick another","endpointGone":"The referenced endpoint no longer exists — pick another","fieldRequired":"Fill in {{label}}","checkFields":"Check the fields marked in red."}},"vault":{"title":"Vault","intro":"A provider entry keeps the API key in one place (AES-256-GCM encrypted, hidden by default) along with reusable endpoints. Profiles can reference an entry here instead of each holding its own copy of the key.","createTitle":"New provider","editTitle":"Edit {{name}}","formIntro":"Set the credential and any reusable named endpoints; saving returns to the list.","loading":"Reading the vault…","entryCount_one":"{{count}} provider entry","entryCount_other":"{{count}} provider entries","add":"New credential","empty":"The vault is empty — add a provider first.","keyConfigured":"Key set","keyMissing":"No key","noEndpoints":"No named endpoint","reveal":"Show {{name}}\'s key","hide":"Hide {{name}}\'s key","edit":"Edit {{name}}","delete":"Delete {{name}}","close":"Close","deleteTitle":"Delete this provider?","deleteBody":"This deletes “{{name}}”. An entry referenced by a profile cannot be deleted — remove the reference first.","deleted":"Deleted.","deleteFailed":"Delete failed","revealFailed":"Could not read the key","name":"Name","namePlaceholder":"e.g. openrouter","apiKey":"API key","apiKeyKeep":"Leave empty to keep the current key","apiKeyRequiredPlaceholder":"Required","notes":"Notes (optional)","endpoints":"Named endpoints (optional)","endpointsHint":"A profile referencing this provider can pick one of these endpoints, whose base URL then wins over the profile\'s own address.","noEndpointDrafts":"No endpoint yet","endpointKeyLabel":"Endpoint {{index}} name","endpointKeyPlaceholder":"id, e.g. default","endpointUrlLabel":"Endpoint {{index}} base URL","endpointUrlPlaceholder":"https://api.example.com/v1","endpointLabelLabel":"Endpoint {{index}} label","endpointLabelPlaceholder":"Display label (optional)","removeEndpoint":"Remove endpoint {{index}}","addEndpoint":"Add endpoint","saving":"Saving…","saveChanges":"Save changes","updated":"Updated.","created":"Provider entry added.","saveFailed":"Save failed","error":{"nameRequired":"Enter a provider name","apiKeyRequired":"Enter an API key","endpointKeyRequired":"Enter an endpoint id","endpointKeyInvalid":"Cannot contain / or \\\\, and is at most {{max}} characters","endpointKeyDuplicate":"Endpoint ids must be unique","endpointUrlRequired":"Enter a base URL","checkFields":"Check the fields marked in red."},"probeEndpointLabel":"Endpoint to test","probeFailed":"Probe request failed"},"activate":{"title":"Activate profile?","body":"This switches {{harness}} to \\"{{profile}}\\" and writes its native configuration files{{changed}}. Target local user: {{user}}. A backup is taken first.","changedFiles_one":", of which {{count}} file will change","changedFiles_other":", of which {{count}} files will change","loadFailed":"Could not read the content to be written: {{reason}}","loading":"Loading the content to be written…","confirm":"Confirm activation"},"env":{"title":"Environment file compatibility","intro":"Switching does not require it. Run this in the relevant shell only when Codex uses environment-variable authentication:","note":"The file contains only variables recognized by each tool. Kimi Code and Pi do not read credentials from the shell, so their sections contain only a comment."},"backup":{"latest":"Latest backup","profile":"Profile","fileCount_one":"{{count}} file","fileCount_other":"{{count}} files","empty":"No snapshots yet","history":"Configuration history","restore":"Restore","restoreTitle":"Restore this snapshot?","restoreBody":"This writes the {{harness}} / {{profile}} configuration files from {{time}} back to disk, overwriting the current content.","confirmRestore":"Confirm restore","current":"Matches disk","loadFailed":"Could not read the snapshot: {{reason}}","loading":"Loading the snapshot…","written":"Restored the files from that snapshot to disk.","historyTitle":"{{harness}} configuration history","historyIntro":"Every write snapshots the original files into the data directory, keeping the last 10. Only this tool’s history is listed; entries that match what is on disk are marked current.","currentBadge":"Current","withDeletions":"includes deletions","restoreHistoryTitle":"Restore this snapshot?","restoreHistoryBody":"Red is what you lose, green is what the restore writes. Confirming overwrites the files on disk from this snapshot; the active profile harness-switch has on record does not roll back with it.","comparing":"Computing the diff…","diffFailed":"Could not load the diff"},"diff":{"delete":"Will delete","create":"Will create","replace":"Will overwrite","same":"No change","rendering":"Rendering the diff…","absent":"(absent)","afterRestore":"↓ after restore","deletedAfterRestore":"(deleted after restore)","bothAbsent":"Absent on both sides"},"drift":{"title":"Configuration drift","recheck":"Re-check drift","checking":"Checking for drift…","noData":"No drift data yet.","none":"No drift","mismatch_one":"{{count}} file differs","mismatch_other":"{{count}} files differ","moreFiles":"and {{count}} more…","viewDiff":"View diff","dialogTitle":"{{harness}} configuration drift","legend":"Red is what is on disk; green is what the active profile would write.","noActiveProfile":"This tool has no active profile.","nothingToCompare":"No active profile, so there is nothing to compare.","allInSync":"Every file matches the active profile.","adopt":"Adopt live configuration","reapply":"Re-apply","reapplyTitle":"Re-apply the active profile?","reapplyBody":"This rewrites {{harness}}\'s native configuration files from the active profile, overwriting local edits on disk. A backup is taken first.","confirmReapply":"Confirm re-apply","reapplyFailed":"Re-apply failed","adoptTitle":"Adopt the live configuration?","adoptBody":"This writes the current on-disk content back into the profile, and later writes will use it as the source. This cannot be undone.","confirmAdopt":"Confirm adopt","adoptFailed":"Adopt failed","reapplied":"Rewrote {{harness}}\'s native configuration files from the active profile.","adopted":"Adopted {{harness}}\'s live configuration into the profile.","status":{"in-sync":"In sync","drifted":"Modified","missing":"Missing","invalid":"Unparseable","unknown":"Unknown"}},"doctor":{"title":"Diagnostics","titleFor":"{{harness}} diagnostics","intro":"Checks tool installation, whether configuration files are readable, writable and parseable, storage permissions, and drift.","checking":"Checking…","notRun":"Diagnostics have not run yet","viewDetails":"View details","rerun":"Run again","close":"Close","updateAvailable":"A new version is available","noChecks":"Nothing to check","countOk":"{{count}} ok","countWarn":"{{count}} warning","countError":"{{count}} error","countUnknown":"{{count}} unknown","status":{"ok":"OK","warn":"Warning","error":"Error","unknown":"Unknown"},"check":{"installFound":"Found the {{bin}} executable","installMissing":"No {{bin}} executable on PATH — the tool may not be installed","installNotRequired":"{{harness}} is typically a web service — no PATH CLI is required","fileMissing":"{{target}} does not exist ({{path}})","fileUnreadable":"{{target}} is not readable ({{path}})","fileUnwritable":"{{target}} is not writable ({{path}})","filePermissive":"{{target}} is readable and writable, but its mode is {{mode}} — group/other can read it; 0600 is recommended","fileOk":"{{target}} exists and is readable and writable ({{path}})","parseOk":"{{target}} parses cleanly","parseFailed":"{{target}} could not be parsed: {{reason}}","parseUnreadable":"{{target}} could not be read: {{reason}}","driftNoProfile":"No active profile, so there is no drift to check","driftInvalid":"The live files contain content that cannot be parsed","driftMismatch_one":"{{count}} file does not match the active profile ({{status}})","driftMismatch_other":"{{count}} files do not match the active profile ({{status}})","driftInSync":"The live files match the active profile","probeNoProfile":"No active profile; connectivity probe skipped","probeOfficialLogin":"{{harness}} is on its built-in account login; no custom endpoint to probe","probeMissingCredential":"Profile {{profile}} has no base URL or API key; cannot probe","probeOk":"Endpoint of profile {{profile}} is reachable","probeFailed":"Connectivity probe failed for profile {{profile}}"}},"notice":{"title":"Written to disk","close":"Close","activated":"{{harness}} switched to \\"{{profile}}\\" (user: {{user}}); its native configuration files have been written.","activatedHint":"Claude Code picks this up immediately; Codex, Kimi Code and Pi need a restart.","officialRestored":"{{harness}} switched back to its official login (user: {{user}}); the third-party API route was removed from the native configuration.","officialHint":"If you have not logged in yet, start the tool in a terminal and complete its official login once.","warningPrefix":"Note: {{message}}","currentUser":"the current user","transferImported":"Import finished.","userSynced":"Sync finished."},"operations":{"undone":"Undid that operation on {{harness}}; both the native configuration files and the recorded active profile are back to where they were.","title":"Operation history","titleFor":"{{harness}} operation history","intro":"Every write to a native configuration file is recorded first, so after a power loss or a killed process the service rolls back whatever was left unfinished on its next start. Undo returns both the configuration files and the recorded active profile to their state before the operation.","loading":"Loading…","empty":"No operations recorded yet","viewDetails":"View details","refresh":"Refresh","close":"Close","count_one":"{{count}} entry","count_other":"{{count}} entries","fileCount_one":"{{count}} file","fileCount_other":"{{count}} files","user":"user {{user}}","undo":"Undo","undoTitle":"Undo this operation?","undoBody":"This restores {{harness}}\'s {{count}} native configuration files to their content before the operation and returns the recorded active profile with them. A snapshot is taken first.","undoFailed":"Undo failed","confirmUndo":"Confirm undo","kind":{"activate":"Switch profile","activate-official":"Back to official login","revoke":"Remove provider","reapply":"Re-write","import":"Import","sync":"Cross-user sync"},"state":{"prepared":"Prepared","applying":"Writing","metadata-committed":"Finishing","committed":"Done","rolled-back":"Rolled back","degraded":"Needs attention"}},"error":{"unknown":"Unknown error","http":{"requestFailed":"Request failed","authenticationRequired":"Sign-in required","crossOriginDenied":"Cross-origin request denied"},"auth":{"invalidPassword":"Incorrect password"},"cli":{"missingArgument":"A required argument is missing"},"profile":{"activeDeleteForbidden":"This profile is in use; activate another one before deleting it"},"adapter":{"modelRequired":"{{harness}} requires a model name","apiKeyRequired":"{{harness}} requires an API key"},"activation":{"officialLoginUnsupported":"{{harness}} does not support official account login","noActiveProfile":"This tool has no active profile, so there is nothing to render","officialProfileCannotAdopt":"The official login is active, so there is no profile to adopt into","adoptUnsupported":"This tool cannot adopt a live configuration"},"provider":{"inUse_one":"This credential is referenced by {{count}} profile; remove the reference first","inUse_other":"This credential is referenced by {{count}} profiles; remove the references first","credentialUnreadable":"Could not read the key for credential {{id}}"},"codex":{"loginCacheTooLarge":"The Codex login cache file is too large and was skipped","loginCacheInvalidJson":"The Codex login cache is not valid JSON","configDirectoryNotRegular":"The Codex configuration directory is not a regular directory","loginCacheNotRegular":"The Codex login cache is not a regular file"},"transfer":{"envelopeInvalid":"Unsupported export file format"},"sync":{"sourceCodexLoginCacheMissing":"The source user has no usable Codex official login cache","sourceEqualsTarget":"The source and target users are the same"},"user":{"notManageable":"User {{username}} is not manageable","notSwitchable":"Cannot switch to user {{username}}","block":{"homeUnsearchable":"No permission to access","homeUnwritable":"No permission to write","storeInaccessible":"Config dir not writable","ownershipRequiresRoot":"Requires running as root","homeMissing":"Home directory missing"}},"storage":{"unreadable":"Could not read {{file}}","quarantineFailed":"Could not quarantine the corrupt {{file}}","corruptQuarantined":"The data store is corrupt. The original was quarantined as {{quarantine}}; restore from a backup before continuing"},"probe":{"badUrl":"Base URL does not parse, or is not http/https","missingBaseUrl":"No base URL supplied; nothing to test","missingApiKey":"No API key supplied; nothing to test","timeout":"Request timed out (10 seconds)","networkError":"Could not reach the endpoint (DNS, refused connection or TLS failure)","unauthorized":"Endpoint reachable but rejected the credential (HTTP {{status}}); check the API key","httpError":"Endpoint returned HTTP {{status}}","invalidResponse":"The response is not a recognized model-catalog format"}},"warning":{"activation":{"envRebuildFailed":"The native configuration was written, but rebuilding env.sh failed","officialEnvRebuildFailed":"The official login was restored, but rebuilding env.sh failed","backfillFailed":"Could not save {{profile}}\'s existing configuration back into the profile"},"provider":{"endpointFallback":"Endpoint {{endpoint}} no longer exists; falling back to the provider\'s first endpoint","reapplyFailed":"Re-apply failed: {{reason}}"},"sync":{"activeReapplyFailed":"The profile store was updated, but automatic re-activation failed: {{reason}}"},"transfer":{"activeRestoreFailed":"Could not restore the active state: {{reason}}"}},"update":{"updating":"Updating…","failed":"Update failed","failedHint":"Run bunx @seaveyon/harness-switch@latest manually","short":"Update","toVersion":"Update to v{{version}}"},"sync":{"title":"Sync from another user","intro":"Copies the source user\'s profiles and the credentials they reference to {{user}}. Active state, backups and native configuration files are not copied by default; migrating the Codex login cache is a separate opt-in.","sourceUser":"Source user","selectUser":"Select a local user","profileCount":"Profiles {{count}}","providerCount":"Credentials {{count}}","conflictCount":"Name conflicts {{count}}","overwriteByHarness":"Overwrite same-named profiles per harness","overwriteHint":"Only checked harnesses are overwritten; unchecked ones keep the current user\'s version.","overwriteHarness":"Overwrite {{harness}}","conflictsInHarness_one":"{{count}} same-named profile","conflictsInHarness_other":"{{count}} same-named profiles","migrateCache":"Migrate the Codex official login cache (auth.json)","migrateCacheHint":"This copies a reusable Codex login session, not ordinary configuration. Choose it only when the target user is entitled to that login.","migrateCacheOverwrite":"The target user already has a login cache; continuing overwrites it and takes a backup first.","storeOnlyHint":"Syncing only writes to the profile store. Activate the profile you want after syncing to make it take effect.","noOtherUsers":"There are no other manageable local login users.","inspecting":"Checking…","inspect":"Check what can be synced","syncing":"Syncing…","syncTo":"Sync to {{user}}","confirmCacheTitle":"Migrate the Codex login cache?","confirmCacheBody":"This copies {{source}}\'s Codex official login cache (auth.json) to {{target}}. {{extra}}Continue only if the target user is entitled to use that login session.","confirmCacheOverwrite":"The target user already has a cache; it will be overwritten and backed up. ","confirmCacheFresh":"The target user will get a new local login cache. ","confirmCacheAction":"Migrate the login cache and sync","done":"Sync complete: {{imported}} added, {{overwritten}} overwritten, {{skipped}} skipped, {{providersCopied}} credentials copied.","cacheMigrated":"The Codex login cache was migrated.","cacheNotMigrated":"The Codex login cache was not migrated."},"transfer":{"title":"Move the whole configuration","intro":"Packs every harness profile, API key, raw file override, and activation state so another machine can reuse them.","exportTitle":"Export everything","exportIntro":"The file is AES-256-GCM encrypted with the transfer passphrase, independent of this machine\'s local key.","passphrase":"Transfer passphrase","passphrasePlaceholder":"At least {{min}} characters","passphraseConfirm":"Confirm the passphrase","passphraseConfirmPlaceholder":"Type it again","passphraseMismatch":"The two passphrases do not match.","includeCache":"Include Codex\'s official login cache (auth.json) in the export","includeCacheHint":"The export stays encrypted with the transfer passphrase, but it will then contain a reusable Codex login session — hand it only to a recipient you trust.","noCacheToExport":"This user has no Codex login cache to export.","encrypting":"Encrypting…","download":"Download the encrypted export","exportedWithCache":"The encrypted export is ready and includes the Codex login cache. The passphrase is not written to the file — keep it separately.","exportedWithoutCache":"The encrypted export is ready, without the Codex login cache. The passphrase is not written to the file — keep it separately.","importTitle":"Import onto this machine","importIntro":"The file is decrypted and checked for conflicts first; nothing is written until you confirm. Profiles of the same name on this machine are kept by default.","pickFile":"Choose a .hsw-backup file","pickFileHint":"The file is decrypted by the server on this machine; nothing is sent to an external service.","notAnExport":"Not a valid harness-switch export file","importPassphrasePlaceholder":"The passphrase set at export time","inspecting":"Checking…","inspect":"Check what would be imported","profileCount_one":"{{count}} profile","profileCount_other":"{{count}} profiles","providerCount_one":"{{count}} credential","providerCount_other":"{{count}} credentials","conflictCount_one":"{{count}} name conflict","conflictCount_other":"{{count}} name conflicts","activeCount_one":"{{count}} activation state","activeCount_other":"{{count}} activation states","harnessProfiles":"{{harness}}: {{count}}","conflictList":"Same name: {{items}}","migrateCache":"Migrate Codex\'s official login cache (auth.json)","migrateCacheHint":"The export contains a reusable Codex login session. It is not written to this machine by default — only pick this if the current user may use that login.","migrateCacheOverwrite":"This machine already has a login cache; continuing overwrites it and creates a backup.","previewStale":"The import options changed — check the contents again before confirming.","conflictPolicy":"Profiles with the same name","policySkip":"Keep this machine’s profile, skip the import","policyOverwrite":"Overwrite this machine’s profile from the export","restoreActive":"Restore the activation state from the export","recheckNeeded":"Check the contents again","confirmImport":"Confirm the import","confirmAuthTitle":"Confirm a change to Codex auth.json?","confirmTitle":"Import every profile?","confirmBody":"This imports {{count}} profiles.","confirmOverwrite_one":"{{count}} of them has the same name and will be overwritten.","confirmOverwrite_other":"{{count}} of them have the same name and will be overwritten.","confirmKeep":"Profiles with the same name are kept, not overwritten.","confirmCacheOverwrite":"In addition, the export\'s full Codex login cache overwrites the one on this machine, with a backup created first.","confirmCacheWrite":"In addition, the export\'s full Codex login cache is written to this machine.","confirmCacheSkip":"The export\'s full Codex login cache is not migrated.","proceedAware":"Understood, import anyway","proceedOverwrite":"Overwrite and import","proceedSafe":"Import safely","importedCount_one":"{{count}} added","importedCount_other":"{{count}} added","overwrittenCount_one":"{{count}} overwritten","overwrittenCount_other":"{{count}} overwritten","providersCopiedCount_one":"{{count}} credential restored","providersCopiedCount_other":"{{count}} credentials restored","skippedCount_one":"{{count}} skipped","skippedCount_other":"{{count}} skipped","activeRestoredCount_one":"{{count}} activation state restored","activeRestoredCount_other":"{{count}} activation states restored","cacheMigrated":"the export\'s Codex login cache was migrated","cacheNotMigrated":"the export\'s Codex login cache was not migrated","importedSummary":"Import complete: {{parts}}.","authEffect":{"openai-api-key":"Restoring the selected Codex profile updates OPENAI_API_KEY in this machine\'s auth.json; that is not the same as migrating the export\'s full official login session.","auth-override":"Restoring the selected Codex profile writes that profile\'s raw auth override into this machine\'s auth.json.","official-cleanup":"Restoring Codex\'s official-login state may clear a leftover OPENAI_API_KEY from this machine\'s auth.json."}},"githubSync":{"title":"GitHub Cloud Sync","intro":"Seamless multi-machine configuration synchronization using your GitHub account. Backups are end-to-end AES-256-GCM encrypted with a master passphrase before storing into a private Gist.","tabDevice":"GitHub OAuth Login","tabToken":"Personal Access Token","deviceIntro":"Click to generate an authorization code, and enter it on the GitHub verification page.","getCode":"Get Device Code","userCode":"User Code","copyCode":"Copy Code","copied":"Copied","openAuthPage":"Open GitHub Verification Page","waitingAuth":"Waiting for GitHub authorization…","waitingAuthInterval":"Waiting for GitHub authorization (polling in {{seconds}}s)…","checkingAuth":"Checking authorization…","checkNow":"I\'ve authorized on GitHub, check now","pendingAuth":"GitHub has not confirmed this code yet (rate-limited or mismatched code). Try regenerating a code or using Token login.","regenerateCode":"Get a new device code","tokenPlaceholder":"Enter GitHub Token with gist permission (ghp_...)","connectToken":"Connect & Sign in","connectedAs":"Connected to GitHub:","disconnect":"Disconnect","lastSynced":"Last synced:","neverSynced":"Never synced","cloudGist":"Cloud Gist:","pushTitle":"Upload to Cloud","pushIntro":"Encrypts all profiles and provider credentials on this machine and uploads to your private Gist.","passphrase":"Sync Passphrase","passphrasePlaceholder":"Passphrase for end-to-end encryption","includeCache":"Include Codex official login session (auth.json)","pushing":"Encrypting and uploading…","pushSuccess":"Successfully synced to GitHub Gist ({{profiles}} profiles, {{vault}} credentials).","pullTitle":"Pull from Cloud","pullIntro":"Downloads the encrypted backup from your private Gist and decrypts it locally.","pullPassphrasePlaceholder":"Sync passphrase set during upload","inspect":"Inspect Cloud Backup","pulling":"Pulling…","confirmPull":"Confirm Sync to Local","pullSuccess":"Cloud sync complete: {{summary}}"},"import":{"title":"Import existing configuration","intro":"Reads what these five tools currently have on disk and picks out the providers that can be adopted. Neither the scan nor the import touches their configuration files; you have to activate a profile yourself before anything is written.","scanning":"Reading the existing configuration…","failed":"Import failed","summary":"Imported {{imported}}, skipped {{skipped}}, created {{providersCreated}} credentials","providerCount_one":"{{count}} provider","providerCount_other":"{{count}} providers","sourceMissing":"missing","sourceRead":"read","sourceUnparsable":"unparseable","select":"Select {{name}}","inUse":"In use","nameTaken":"A profile with this name exists","matchesProvider":"Already in the vault: {{name}}","noBaseUrl":"(no base url)","keyOutsideConfig":"credential is not in the config file","profileName":"Profile name","credentialTarget":"Where to keep the credential","targetProfile":"In this profile itself","targetNewVault":"As a new vault entry","targetExisting":"Link to existing credential: {{name}}","apiKeyFromEnv":"This provider reads its credential from the environment, so it is not in the config file","overwriteExisting":"Overwrite the existing profile with this name","selected":"{{count}} selected","selectPrompt":"Check the providers to adopt","rescan":"Scan again","importSelected":"Import selected"},"scan":{"note":{"unsupported":"This tool does not support scan-and-import yet","noConfigFiles":"No config file for this tool was found on disk","unparsable":"The config file exists but cannot be parsed — fix it before importing","noCandidates":"No importable provider was found in the config file"}},"common":{"cancel":"Cancel","delete":"Delete","listSeparator":", "},"preset":{"zaiAnthropic":"Z.AI (Anthropic compatible)","moonshotAnthropic":"Moonshot (Anthropic compatible)","deepseekAnthropic":"DeepSeek (Anthropic compatible)","openrouter":"OpenRouter","zai":"Z.AI","moonshot":"Moonshot","deepseek":"DeepSeek","cliproxyResponses":"CLIProxy (Responses)"},"probe":{"action":"Test connection","probing":"Testing…","ok":"Reachable \xb7 {{latencyMs}}ms \xb7 {{count}} models","okNoCatalog":"Reachable \xb7 {{latencyMs}}ms \xb7 no model catalog returned","catalogHint":"Fetched {{count}} models; click the model field to pick one from the list.","missingBaseUrl":"Add an endpoint URL before testing."}}'),em=JSON.parse('{"app":{"name":"harness-switch","tagline":"写入原生配置","checkingSession":"正在检查会话…","brandMark":"HS / harness-switch","devMode":"本地开发模式:当前页面由本地 dev server 提供"},"language":{"toEnglish":"Switch to English","toChinese":"Switch to Chinese","short":"EN"},"theme":{"toLight":"切换到浅色主题","toDark":"切换到深色主题"},"login":{"title":"服务器端配置中枢","intro":"激活档案时直接写入各 CLI 自己的配置文件,不依赖你在某个 shell 里 source 过什么。","hint":"输入首次启动时终端打印的 Web 密码。","password":"Web 密码","submitting":"登录中…","submit":"登录"},"nav":{"currentLocalUser":"当前本地用户","localUser":"本地用户","syncUserConfig":"同步用户配置","importExisting":"导入已有配置","transfer":"导入 / 导出","githubSync":"GitHub 同步","vault":"凭据库","signOut":"退出","switchHarness":"切换 Harness"},"harness":{"subtitle":"管理配置档案并安全写入该工具的原生配置文件。","newProfile":"新增配置","current":"当前:{{name}}","currentInactive":"当前:未激活","activeConfig":"当前生效配置","activeNamed":"当前激活 \xb7 {{name}}","inactive":"未激活","active":"已激活","activate":"激活","writeTargets":"写入目标","noTargetFile":"未配置目标文件","moreFiles_one":"以及另外 {{count}} 个文件","moreFiles_other":"以及另外 {{count}} 个文件","overwriteWarning":"配置将直接覆盖目标文件。写入前会自动备份,切换后请验证服务连通性与模型可用性。","profiles":"配置档案","profileCount_one":"{{count}} 个自定义配置","profileCount_other":"{{count}} 个自定义配置","noProfiles":"还没有配置档案","manualOverride":"手动接管","edit":"编辑 {{name}}","delete":"删除 {{name}}","deleteBlocked":"先激活另一个配置,才能删除当前配置","deleteTitle":"删除配置?","deleteBody":"将删除 {{harness}} / {{profile}}。{{extra}}此操作不可撤销。","deleteAdditiveExtra":"它在配置文件里的 provider 条目也会被一并摘掉。","official":"官方登录","officialActive":"已使用","officialSwitch":"切回官方","officialHintClaude":"使用 Claude Code 自身的 Anthropic 账号登录","officialHintCodex":"使用 Codex 自身的 ChatGPT / OpenAI 账号登录","application":"应用","writeMode":"写入模式","modeReplace":"替换当前配置","modeAdditive":"保留并切换指针"},"profile":{"editTitle":"编辑 {{harness}} / {{profile}}","createTitle":"新增 {{harness}} 配置","intro":"保存后会写入 {{targets}}。","additiveNote":"该工具的配置文件按 provider 共存,切换只会移动当前指针,不会删除你手写的其他 provider。","useSharedProvider":"使用共享 Provider(凭据库)","useSharedProviderLabel":"使用共享 Provider","keyFromVault":"密钥由凭据库提供","providerNone":"不使用(本配置自带密钥)","vaultEmpty":"凭据库为空,可先在顶部「凭据库」中新增 Provider 条目。","namedEndpoint":"命名 Endpoint(可选)","namedEndpointLabel":"命名 Endpoint","endpointNone":"不指定(使用下方 Base URL)","endpointOption":"{{label}}({{key}})","noEndpoints":"该 Provider 没有命名 endpoint,将使用下方 Base URL。","quickFill":"快速填充:","name":"配置名称","namePlaceholder":"例如:openrouter-main","renameHint":"修改后会同步更新当前激活状态和原生配置中的 Provider 标识。","baseUrl":"API Base URL","baseUrlPlaceholder":"https://api.example.com/v1","baseUrlFromVault":"Base URL 来自凭据库 endpoint「{{endpoint}}」。","apiKey":"API Key","apiKeyKeep":"留空表示保持不变","apiKeyRequiredPlaceholder":"必填","apiKeySharedHint":"已引用共享 Provider,密钥在「凭据库」中统一轮换。","fallbackModel":"回退模型(ANTHROPIC_MODEL)","model":"模型","fallbackModelPlaceholder":"可选;各档未匹配时使用,例如 glm-5","modelPlaceholder":"例如:claude-sonnet-4-5","claudeModelHint":"留空则沿用 Claude Code 默认模型;可在下面分别映射各模型档位。","notes":"备注(可选)","advanced":"高级:原始配置","overridden":"已手动接管","saveFirst":"先保存这份配置,之后回到编辑界面即可接管原始文件内容。","save":"保存配置","saving":"保存中…","rawLoading":"正在读取将写入的内容…","rawIntro":"下面是当前会写入磁盘的内容,基于最近一次保存的字段生成。改动任意一份即视为手动接管,之后表单字段不再影响这份文件。","resetToGenerated":"恢复为自动生成","selectPlaceholder":"请选择","mapping":{"title":"模型映射","intro":"显示名称仅影响 Claude Code 的 /model 菜单;留空时显示对应的实际模型 ID。开启「1M 上下文」会在模型 ID 末尾追加 [1m],仅在该模型确实支持 1M 时开启。","role":"模型角色","displayName":"显示名称","actualModel":"实际请求模型","oneM":"1M 上下文","defaultTo":"默认:{{model}}","notInMenu":"不显示在 /model 菜单","oneMUnsupported":"{{role}} 不支持 1M","enable":"启用"},"error":{"nameRequired":"请输入配置名称","nameSlash":"配置名称不能包含 / 或 \\\\","nameTooLong":"配置名称最多 {{max}} 个字符","baseUrlRequired":"请输入 API Base URL","apiKeyRequired":"请输入 API Key","modelRequired":"请输入模型名称","providerGone":"引用的 Provider 已不存在,请重新选择","endpointGone":"引用的 Endpoint 已不存在,请重新选择","fieldRequired":"请填写{{label}}","checkFields":"请检查标红的必填项或输入内容。"}},"vault":{"title":"凭据库","intro":"Provider 条目集中保存 API Key(AES-256-GCM 加密,默认不显示明文),并附带可复用的 endpoint。配置档案可以引用这里的条目,而不是各自保存一份密钥。","createTitle":"新增 Provider","editTitle":"编辑 {{name}}","formIntro":"配置凭据和可复用的命名 Endpoint;保存后返回凭据库列表。","loading":"正在读取凭据库…","entryCount_one":"{{count}} 个 Provider 条目","entryCount_other":"{{count}} 个 Provider 条目","add":"新增凭据","empty":"凭据库为空,先新增一个 Provider。","keyConfigured":"密钥已配置","keyMissing":"未配置密钥","noEndpoints":"没有命名 endpoint","reveal":"显示 {{name}} 的密钥","hide":"隐藏 {{name}} 的密钥","edit":"编辑 {{name}}","delete":"删除 {{name}}","close":"关闭","deleteTitle":"删除这个 Provider?","deleteBody":"将删除「{{name}}」。被配置档案引用的条目无法删除,请先移除引用。","deleted":"已删除。","deleteFailed":"删除失败","revealFailed":"无法读取密钥","name":"名称","namePlaceholder":"例如:openrouter","apiKey":"API Key","apiKeyKeep":"留空表示保持不变","apiKeyRequiredPlaceholder":"必填","notes":"备注(可选)","endpoints":"命名 Endpoint(可选)","endpointsHint":"配置档案引用此 Provider 时可以选择某个 endpoint,其 Base URL 优先于配置自身的地址。","noEndpointDrafts":"还没有 endpoint","endpointKeyLabel":"Endpoint {{index}} 名称","endpointKeyPlaceholder":"标识,如 default","endpointUrlLabel":"Endpoint {{index}} Base URL","endpointUrlPlaceholder":"https://api.example.com/v1","endpointLabelLabel":"Endpoint {{index}} 标签","endpointLabelPlaceholder":"显示标签(可选)","removeEndpoint":"移除 Endpoint {{index}}","addEndpoint":"添加 endpoint","saving":"保存中…","saveChanges":"保存修改","updated":"已更新。","created":"已新增 Provider 条目。","saveFailed":"保存失败","error":{"nameRequired":"请输入 Provider 名称","apiKeyRequired":"请输入 API Key","endpointKeyRequired":"请输入 Endpoint 标识","endpointKeyInvalid":"不能包含 / 或 \\\\,且最多 {{max}} 个字符","endpointKeyDuplicate":"Endpoint 标识不能重复","endpointUrlRequired":"请输入 Base URL","checkFields":"请检查标红的必填项。"},"probeEndpointLabel":"选择要测试的 endpoint","probeFailed":"测试请求失败"},"activate":{"title":"激活配置?","body":"将把 {{harness}} 切换到「{{profile}}」并写入原生配置文件{{changed}}。目标本地用户:{{user}}。写入前会自动备份。","changedFiles_one":",其中 {{count}} 个文件将变更","changedFiles_other":",其中 {{count}} 个文件将变更","loadFailed":"无法读取将要写入的内容:{{reason}}","loading":"正在读取将要写入的内容…","confirm":"确认激活"},"env":{"title":"环境变量文件兼容性","intro":"切换本身不需要它。只有 Codex 选择「环境变量」认证方式时才需要在对应 shell 执行:","note":"文件里只会写入对应工具确实认识的变量。Kimi Code 与 Pi 不从 shell 读取凭据,所以它们只有一行注释。"},"backup":{"latest":"最近备份","profile":"配置档案","fileCount_one":"{{count}} 个文件","fileCount_other":"{{count}} 个文件","empty":"还没有历史快照","history":"历史快照","restore":"恢复","restoreTitle":"恢复这份快照?","restoreBody":"将把 {{harness}} / {{profile}} 在 {{time}} 的配置文件写回磁盘,覆盖当前内容。","confirmRestore":"确认恢复","current":"与磁盘一致","loadFailed":"无法读取快照内容:{{reason}}","loading":"正在读取快照…","written":"已把该历史快照的文件写回磁盘。","historyTitle":"{{harness}} 配置历史","historyIntro":"每次写入前都会把原文件快照到数据目录,保留最近 10 份。这里只显示当前工具的历史;与磁盘一致的条目会标成「当前」。","currentBadge":"当前","withDeletions":"含删除","restoreHistoryTitle":"恢复这份历史?","restoreHistoryBody":"红是当前将丢失的内容,绿是恢复后的内容。确认后会按历史快照覆盖磁盘文件,harness-switch 记录的「当前激活」不会随之回退。","comparing":"正在对比差异…","diffFailed":"加载差异失败"},"diff":{"delete":"将删除","create":"将新建","replace":"将覆盖","same":"无变更","rendering":"正在渲染差异…","absent":"(当前不存在)","afterRestore":"↓ 恢复后","deletedAfterRestore":"(恢复后删除)","bothAbsent":"两侧都不存在"},"drift":{"title":"配置漂移","recheck":"重新检查漂移","checking":"正在检查漂移…","noData":"暂无漂移数据。","none":"无漂移","mismatch_one":"{{count}} 个文件不一致","mismatch_other":"{{count}} 个文件不一致","moreFiles":"还有 {{count}} 个文件…","viewDiff":"查看差异","dialogTitle":"{{harness}} 配置漂移","legend":"红色是磁盘现状,绿色是按激活配置应写入的内容。","noActiveProfile":"该工具未激活任何配置。","nothingToCompare":"未激活任何配置,没有可对比的内容。","allInSync":"所有文件与激活配置一致。","adopt":"采纳现场配置","reapply":"重新应用","reapplyTitle":"重新应用激活配置?","reapplyBody":"将按激活配置重新写入 {{harness}} 的原生配置文件,覆盖磁盘上的现场修改。写入前会自动备份。","confirmReapply":"确认重新应用","reapplyFailed":"重新应用失败","adoptTitle":"采纳现场配置?","adoptBody":"将把磁盘上的当前内容回填进配置档案,之后的写入会以现场为准。此操作不可撤销。","confirmAdopt":"确认采纳","adoptFailed":"采纳失败","reapplied":"已按激活配置重新写入 {{harness}} 的原生配置文件。","adopted":"已把 {{harness}} 现场配置回填进配置档案。","status":{"in-sync":"一致","drifted":"已修改","missing":"缺失","invalid":"无法解析","unknown":"未知"}},"doctor":{"title":"诊断","titleFor":"{{harness}} 诊断","intro":"检查工具安装、配置文件可读可写可解析、存储权限与漂移状态。","checking":"正在检查…","notRun":"尚未运行诊断","viewDetails":"查看详情","rerun":"重新诊断","close":"关闭","updateAvailable":"有新版本可用","noChecks":"没有可检查的项目","countOk":"{{count}} 项正常","countWarn":"{{count}} 项警告","countError":"{{count}} 项错误","countUnknown":"{{count}} 项未知","status":{"ok":"正常","warn":"警告","error":"错误","unknown":"未知"},"check":{"installFound":"已找到可执行文件 {{bin}}","installMissing":"未找到可执行文件 {{bin}}(PATH 中不存在),工具可能未安装","installNotRequired":"{{harness}} 以 Web 服务部署,不要求 PATH 上有 CLI","fileMissing":"{{target}} 不存在({{path}})","fileUnreadable":"{{target}} 不可读({{path}})","fileUnwritable":"{{target}} 不可写({{path}})","filePermissive":"{{target}} 存在可读写,但权限为 {{mode}},group/other 可读,建议 0600","fileOk":"{{target}} 存在且可读可写({{path}})","parseOk":"{{target}} 解析正常","parseFailed":"{{target}} 无法解析:{{reason}}","parseUnreadable":"{{target}} 无法读取:{{reason}}","driftNoProfile":"未激活任何配置,无漂移可检查","driftInvalid":"live 文件存在无法解析的内容","driftMismatch_one":"{{count}} 个文件与激活配置不一致({{status}})","driftMismatch_other":"{{count}} 个文件与激活配置不一致({{status}})","driftInSync":"live 文件与激活配置一致","probeNoProfile":"未激活任何配置,跳过连通性探测","probeOfficialLogin":"{{harness}} 处于官方账号登录状态,无自定义端点可探测","probeMissingCredential":"配置 {{profile}} 缺少 Base URL 或 API Key,无法探测","probeOk":"配置 {{profile}} 的端点可达","probeFailed":"配置 {{profile}} 的连通性探测失败"}},"notice":{"title":"已写入磁盘","close":"关闭","activated":"{{harness}} 已切换到「{{profile}}」(用户:{{user}}),原生配置文件已写入。","activatedHint":"Claude Code 会立即生效;Codex、Kimi Code、Pi 需要重新启动进程。","officialRestored":"{{harness}} 已切回官方登录(用户:{{user}}),第三方 API 路由已从原生配置中移除。","officialHint":"如尚未登录,请在终端启动对应工具并完成一次官方登录。","warningPrefix":"注意:{{message}}","currentUser":"当前用户","transferImported":"导入完成。","userSynced":"同步完成。"},"operations":{"undone":"已撤销 {{harness}} 的这次操作,原生配置文件与「当前激活」记录都回到了操作前。","title":"操作记录","titleFor":"{{harness}} 操作记录","intro":"每次写入原生配置都会先落一条记录,断电或进程被杀掉后,服务下次启动会按它把没做完的操作回滚。撤销会把配置文件和「当前激活」一起退回操作前的状态。","loading":"正在加载…","empty":"还没有操作记录","viewDetails":"查看详情","refresh":"刷新","close":"关闭","count_one":"{{count}} 条记录","count_other":"{{count}} 条记录","fileCount_one":"{{count}} 个文件","fileCount_other":"{{count}} 个文件","user":"用户 {{user}}","undo":"撤销","undoTitle":"撤销这次操作?","undoBody":"会把 {{harness}} 的 {{count}} 个原生配置文件恢复成这次操作之前的内容,并把「当前激活」一并退回。这一步本身也会先做一次快照。","undoFailed":"撤销失败","confirmUndo":"确认撤销","kind":{"activate":"切换配置","activate-official":"切回官方登录","revoke":"移除 provider","reapply":"重新写入","import":"导入","sync":"跨用户同步"},"state":{"prepared":"准备中","applying":"写入中","metadata-committed":"收尾中","committed":"已完成","rolled-back":"已回滚","degraded":"需人工处理"}},"error":{"unknown":"未知错误","http":{"requestFailed":"请求失败","authenticationRequired":"需要登录","crossOriginDenied":"跨域请求被拒绝"},"auth":{"invalidPassword":"密码错误"},"cli":{"missingArgument":"缺少必要参数"},"profile":{"activeDeleteForbidden":"该配置正在使用中,请先激活另一个配置再删除"},"adapter":{"modelRequired":"{{harness}} 需要填写模型名称","apiKeyRequired":"{{harness}} 需要填写 API key"},"activation":{"officialLoginUnsupported":"{{harness}} 不支持官方账号登录模式","noActiveProfile":"该工具未激活任何配置,无可渲染的内容","officialProfileCannotAdopt":"当前处于官方登录状态,没有可回填的配置档案","adoptUnsupported":"该工具不支持采纳现场配置"},"provider":{"inUse_one":"该凭据正被 {{count}} 个配置引用,请先解除引用","inUse_other":"该凭据正被 {{count}} 个配置引用,请先解除引用","credentialUnreadable":"无法读取凭据 {{id}} 的密钥"},"codex":{"loginCacheTooLarge":"Codex 登录缓存文件过大,已跳过","loginCacheInvalidJson":"Codex 登录缓存不是合法 JSON","configDirectoryNotRegular":"Codex 配置目录不是普通目录","loginCacheNotRegular":"Codex 登录缓存不是普通文件"},"transfer":{"envelopeInvalid":"不支持的导出文件格式"},"sync":{"sourceCodexLoginCacheMissing":"源用户没有可用的 Codex 官方登录缓存","sourceEqualsTarget":"源用户与目标用户相同"},"user":{"notManageable":"用户 {{username}} 不可管理","notSwitchable":"无法切换到用户 {{username}}","block":{"homeUnsearchable":"没有权限访问","homeUnwritable":"没有权限写入","storeInaccessible":"配置目录不可写","ownershipRequiresRoot":"需要以 root 运行","homeMissing":"主目录不存在"}},"storage":{"unreadable":"无法读取 {{file}}","quarantineFailed":"无法隔离损坏的 {{file}}","corruptQuarantined":"数据存储已损坏,原文件已隔离为 {{quarantine}},请从备份恢复后再继续"},"probe":{"badUrl":"Base URL 无法解析,或不是 http/https","missingBaseUrl":"未提供 Base URL,无法测试","missingApiKey":"未提供 API Key,无法测试","timeout":"请求超时(10 秒)","networkError":"无法连接到端点(DNS、拒绝连接或 TLS 失败)","unauthorized":"端点可达但拒绝了凭据(HTTP {{status}}),请检查 API Key","httpError":"端点返回 HTTP {{status}}","invalidResponse":"响应不是已知的模型目录格式"}},"warning":{"activation":{"envRebuildFailed":"原生配置已写入,但重建 env.sh 失败","officialEnvRebuildFailed":"已恢复官方登录,但重建 env.sh 失败","backfillFailed":"未能把 {{profile}} 的现有配置回填保存"},"provider":{"endpointFallback":"endpoint {{endpoint}} 已不存在,将回退到 provider 首个 endpoint","reapplyFailed":"重新应用失败:{{reason}}"},"sync":{"activeReapplyFailed":"已更新配置库,但自动重新激活失败:{{reason}}"},"transfer":{"activeRestoreFailed":"未能恢复激活状态:{{reason}}"}},"update":{"updating":"更新中…","failed":"更新失败","failedHint":"手动运行 bunx @seaveyon/harness-switch@latest","short":"更新","toVersion":"更新到 v{{version}}"},"sync":{"title":"从其他用户同步","intro":"将来源用户的配置和所引用的凭据复制到 {{user}}。激活状态、备份和原生配置文件默认不会复制;可单独选择迁移 Codex 登录缓存。","sourceUser":"来源用户","selectUser":"选择本地用户","profileCount":"配置 {{count}}","providerCount":"凭据 {{count}}","conflictCount":"同名冲突 {{count}}","overwriteByHarness":"按 Harness 覆盖同名配置","overwriteHint":"只覆盖勾选的 Harness;未勾选的同名配置会保留当前用户版本。","overwriteHarness":"覆盖 {{harness}}","conflictsInHarness_one":"{{count}} 个同名配置","conflictsInHarness_other":"{{count}} 个同名配置","migrateCache":"迁移 Codex 官方登录缓存(auth.json)","migrateCacheHint":"这会复制可复用的 Codex 登录会话,不是普通配置。仅在目标用户可以使用该登录时选择。","migrateCacheOverwrite":"目标用户已有登录缓存;继续后将覆盖它,并自动创建备份。","storeOnlyHint":"同步仅写入配置库。需要生效时,请在同步后手动激活对应配置。","noOtherUsers":"没有其他可管理的本地登录用户。","inspecting":"正在检查…","inspect":"检查可同步内容","syncing":"正在同步…","syncTo":"同步到 {{user}}","confirmCacheTitle":"确认迁移 Codex 登录缓存?","confirmCacheBody":"将把 {{source}} 的 Codex 官方登录缓存(auth.json)复制到 {{target}}。{{extra}}仅当目标用户可以使用这个登录会话时才继续。","confirmCacheOverwrite":"目标用户已有缓存,会被覆盖并创建备份。","confirmCacheFresh":"目标用户将获得新的本地登录缓存。","confirmCacheAction":"迁移登录缓存并同步","done":"同步完成:新增 {{imported}},覆盖 {{overwritten}},跳过 {{skipped}},复制凭据 {{providersCopied}}。","cacheMigrated":"Codex 登录缓存已迁移。","cacheNotMigrated":"Codex 登录缓存未迁移。"},"transfer":{"title":"全局配置迁移","intro":"将全部 Harness 配置、API Key、原始文件覆盖内容和激活状态打包,供其他机器复用。","exportTitle":"导出所有配置","exportIntro":"文件使用迁移密码进行 AES-256-GCM 加密,不依赖当前机器的本地密钥。","passphrase":"迁移密码","passphrasePlaceholder":"至少 {{min}} 个字符","passphraseConfirm":"确认迁移密码","passphraseConfirmPlaceholder":"再次输入","passphraseMismatch":"两次输入的迁移密码不一致。","includeCache":"在导出包中包含 Codex 官方登录缓存(auth.json)","includeCacheHint":"导出包仍会使用迁移密码加密,但其中将含有可复用的 Codex 登录会话;请仅交给可信的接收方。","noCacheToExport":"当前用户没有可导出的 Codex 登录缓存。","encrypting":"正在加密…","download":"下载加密导出包","exportedWithCache":"加密导出包已生成,已包含 Codex 登录缓存。迁移密码不会写入文件,请单独保管。","exportedWithoutCache":"加密导出包已生成,未包含 Codex 登录缓存。迁移密码不会写入文件,请单独保管。","importTitle":"导入到当前机器","importIntro":"先解密并检查冲突,确认后才会写入。默认保留当前机器上的同名配置。","pickFile":"选择 .hsw-backup 文件","pickFileHint":"文件内容在本机服务端解密,不会发送到外部服务。","notAnExport":"不是有效的 harness-switch 导出文件","importPassphrasePlaceholder":"导出时设置的密码","inspecting":"正在检查…","inspect":"检查导入内容","profileCount_one":"{{count}} 个配置","profileCount_other":"{{count}} 个配置","providerCount_one":"{{count}} 条凭据","providerCount_other":"{{count}} 条凭据","conflictCount_one":"{{count}} 个同名冲突","conflictCount_other":"{{count}} 个同名冲突","activeCount_one":"{{count}} 个激活状态","activeCount_other":"{{count}} 个激活状态","harnessProfiles":"{{harness}}:{{count}}","conflictList":"同名项:{{items}}","migrateCache":"迁移 Codex 官方登录缓存(auth.json)","migrateCacheHint":"导出包包含一个可复用的 Codex 登录会话。默认不写入本机;仅在当前用户可以使用该登录时选择。","migrateCacheOverwrite":"本机已有登录缓存;继续后将覆盖它,并自动创建备份。","previewStale":"已修改导入选项,请重新检查内容后再确认导入。","conflictPolicy":"同名配置处理","policySkip":"保留本机配置,跳过导入","policyOverwrite":"使用导出包覆盖本机配置","restoreActive":"恢复导出时的激活状态","recheckNeeded":"请重新检查导入内容","confirmImport":"确认导入","confirmAuthTitle":"确认可能改动 Codex auth.json?","confirmTitle":"确认导入全部配置?","confirmBody":"将导入 {{count}} 个配置。","confirmOverwrite_one":"其中 {{count}} 个同名配置会被覆盖。","confirmOverwrite_other":"其中 {{count}} 个同名配置会被覆盖。","confirmKeep":"同名配置会保留,不会被覆盖。","confirmCacheOverwrite":"此外,导出包内的完整 Codex 官方登录缓存会覆盖本机缓存,并自动创建备份。","confirmCacheWrite":"此外,导出包内的完整 Codex 官方登录缓存会写入本机。","confirmCacheSkip":"不会迁移导出包内的完整 Codex 官方登录缓存。","proceedAware":"了解并继续导入","proceedOverwrite":"覆盖并导入","proceedSafe":"安全导入","importedCount_one":"新增 {{count}} 项","importedCount_other":"新增 {{count}} 项","overwrittenCount_one":"覆盖 {{count}} 项","overwrittenCount_other":"覆盖 {{count}} 项","providersCopiedCount_one":"恢复 {{count}} 条凭据","providersCopiedCount_other":"恢复 {{count}} 条凭据","skippedCount_one":"跳过 {{count}} 项","skippedCount_other":"跳过 {{count}} 项","activeRestoredCount_one":"恢复 {{count}} 个激活状态","activeRestoredCount_other":"恢复 {{count}} 个激活状态","cacheMigrated":"已迁移导出包内的 Codex 登录缓存","cacheNotMigrated":"未迁移导出包内的 Codex 登录缓存","importedSummary":"导入完成:{{parts}}。","authEffect":{"openai-api-key":"恢复选定的 Codex 激活配置会更新本机 auth.json 中的 OPENAI_API_KEY;这不是迁移导出包内的完整官方登录会话。","auth-override":"恢复选定的 Codex 激活配置会按该配置的原始 auth 覆盖内容写入本机 auth.json。","official-cleanup":"恢复 Codex 官方登录状态可能清理本机 auth.json 中遗留的 OPENAI_API_KEY。"}},"githubSync":{"title":"GitHub 云端同步","intro":"通过 GitHub 账号实现多机器无缝同步。配置包使用主密码进行端到端 AES-256-GCM 加密后存入私有 Gist,保护凭据安全。","tabDevice":"GitHub 授权登录","tabToken":"Token 登录","deviceIntro":"点击获取授权码,并在 GitHub 授权页面输入以完成绑定。","getCode":"获取设备授权码","userCode":"用户授权码","copyCode":"复制授权码","copied":"已复制","openAuthPage":"在 GitHub 打开授权页面","waitingAuth":"等待 GitHub 授权中…","waitingAuthInterval":"等待 GitHub 授权中({{seconds}} 秒后轮询)…","checkingAuth":"正在检查授权…","checkNow":"我已在 GitHub 授权,立即检查","pendingAuth":"GitHub 尚未确认该授权码(可能请求频率受限或授权码不一致),请点击「重新获取授权码」后重试,或使用「Token 登录」。","regenerateCode":"重新获取授权码","tokenPlaceholder":"输入具有 gist 权限的 GitHub Token (ghp_...)","connectToken":"连接并登录","connectedAs":"已连接 GitHub:","disconnect":"断开连接","lastSynced":"上次同步:","neverSynced":"尚未同步","cloudGist":"云端 Gist:","pushTitle":"上传到云端","pushIntro":"将当前机器的全部 Profiles 和凭据库加密备份到 GitHub 私有 Gist。","passphrase":"同步主密码","passphrasePlaceholder":"用于端到端加密与解密的密码","includeCache":"包含 Codex 官方登录缓存(auth.json)","pushing":"正在加密并上传…","pushSuccess":"成功上传并同步到云端 Gist({{profiles}} 个配置,{{vault}} 条凭据)。","pullTitle":"从云端拉取","pullIntro":"从 GitHub 私有 Gist 下载加密备份并在本地解密还原。","pullPassphrasePlaceholder":"上传时设置的同步主密码","inspect":"检查云端备份","pulling":"正在拉取…","confirmPull":"确认同步到本地","pullSuccess":"云端同步完成:{{summary}}"},"import":{"title":"导入已有配置","intro":"读取这五个工具当前在磁盘上的配置,挑出可以接管的 provider。扫描和导入都不会改动它们的配置文件;导入后需要你手动激活才会真正写盘。","scanning":"正在读取现有配置…","failed":"导入失败","summary":"导入 {{imported}} 条,跳过 {{skipped}} 条,新建凭据 {{providersCreated}} 条","providerCount_one":"{{count}} 个 provider","providerCount_other":"{{count}} 个 provider","sourceMissing":"缺失","sourceRead":"已读取","sourceUnparsable":"无法解析","select":"选择 {{name}}","inUse":"使用中","nameTaken":"同名配置已存在","matchesProvider":"凭据已在库中:{{name}}","noBaseUrl":"(没有 base url)","keyOutsideConfig":"凭据不在配置文件里","profileName":"配置名称","credentialTarget":"凭据保存方式","targetProfile":"存进这条配置自己","targetNewVault":"抽成新的凭据库条目","targetExisting":"关联已有凭据:{{name}}","apiKeyFromEnv":"这个 provider 从环境变量读取凭据,配置文件里没有","overwriteExisting":"覆盖同名的现有配置","selected":"已选择 {{count}} 条","selectPrompt":"勾选要接管的 provider","rescan":"重新扫描","importSelected":"导入所选"},"scan":{"note":{"unsupported":"该工具暂不支持扫描导入","noConfigFiles":"磁盘上没有找到该工具的配置文件","unparsable":"配置文件存在但无法解析,导入前请先修复它","noCandidates":"配置文件里没有找到可导入的 provider"}},"common":{"cancel":"取消","delete":"删除","listSeparator":"、"},"preset":{"zaiAnthropic":"Z.AI(Anthropic 兼容)","moonshotAnthropic":"Moonshot(Anthropic 兼容)","deepseekAnthropic":"DeepSeek(Anthropic 兼容)","openrouter":"OpenRouter","zai":"Z.AI","moonshot":"Moonshot","deepseek":"DeepSeek","cliproxyResponses":"CLIProxy(Responses)"},"probe":{"action":"测试连接","probing":"正在测试…","ok":"连接正常 \xb7 {{latencyMs}}ms \xb7 {{count}} 个模型","okNoCatalog":"连接正常 \xb7 {{latencyMs}}ms \xb7 端点未提供模型目录","catalogHint":"已获取 {{count}} 个模型,点击“模型”输入框可从列表选择。","missingBaseUrl":"请先填写至少一个 endpoint URL 再测试。"}}'),eg="hs-language",ey="zh-CN",ev={"zh-CN":"zh-CN",en:"en-US"};function eb(e){return"zh-CN"===e||"en"===e}var ex=q.createInstance();function ew(e){"u">typeof document&&(document.documentElement.lang=e)}function ek(e){return ex.on("languageChanged",e),function(){return ex.off("languageChanged",e)}}function ej(){return eb(ex.language)?ex.language:ey}function eS(){var e=(0,W.useSyncExternalStore)(ek,ej,ej),t=(0,W.useCallback)(function(e){try{localStorage.setItem(eg,e)}catch(e){}ex.changeLanguage(e)},[]);return(0,W.useMemo)(function(){return{language:e,locale:ev[e],setLanguage:t}},[e,t])}function eO(e){var t=e.children;return(0,a.jsx)(ep,{i18n:ex,children:t})}ex.use({type:"3rdParty",init(e){((e={})=>{Q={...Q,...e}})(e.options.react),r=e}}).init({lng:function(){try{var e=localStorage.getItem(eg);return eb(e)?e:ey}catch(e){return ey}}(),fallbackLng:ey,supportedLngs:["zh-CN","en"],resources:{"zh-CN":{translation:em},en:{translation:eh}},initAsync:!1,interpolation:{escapeValue:!1},returnNull:!1}),ew(ex.language),ex.on("languageChanged",ew)},2935(e,t,n){n.d(t,{AZ:()=>l,OD:()=>s,PY:()=>i,ec:()=>c});var r=n(4041);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var o="hs-theme";function i(){var e=function(){try{var e=localStorage.getItem(o);return"light"===e||"dark"===e?e:null}catch(e){return null}}();return e||("u">typeof window&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light")}function l(e){document.documentElement.classList.toggle("dark","dark"===e),document.documentElement.style.colorScheme=e;try{localStorage.setItem(o,e)}catch(e){}}function s(e){var t="dark"===e?"light":"dark";return l(t),t}function c(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,r.useState)(function(){return"u">typeof document&&document.documentElement.classList.contains("dark")?"dark":"light"}))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,i=!1;try{for(r=r.call(e);!(o=(t=r.next()).done)&&(a.push(t.value),2!==a.length);o=!0);}catch(e){i=!0,n=e}finally{try{o||null==r.return||r.return()}finally{if(i)throw n}}return a}}(e)||function(e){if(e){if("string"==typeof e)return a(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return a(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=t[0],o=t[1];return(0,r.useEffect)(function(){var e=document.documentElement,t=new MutationObserver(function(){o(e.classList.contains("dark")?"dark":"light")});return t.observe(e,{attributes:!0,attributeFilter:["class"]}),function(){return t.disconnect()}},[]),n}}},u={};function d(e){var t=u[e];if(void 0!==t)return t.exports;var n=u[e]={exports:{}};return c[e](n,n.exports,d),n.exports}d.m=c,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,d.t=function(n,r){if(1&r&&(n=this(n)),8&r||"object"==typeof n&&n&&(4&r&&n.__esModule||16&r&&"function"==typeof n.then))return n;var a=Object.create(null);d.r(a);var o={};e=e||[null,t({}),t([]),t(t)];for(var i=2&r&&n;("object"==typeof i||"function"==typeof i)&&!~e.indexOf(i);i=t(i))Object.getOwnPropertyNames(i).forEach(e=>{o[e]=()=>n[e]});return o.default=()=>n,d.d(a,o),a},d.d=(e,t)=>{for(var n in t)d.o(t,n)&&!d.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},d.f={},d.e=e=>Promise.all(Object.keys(d.f).reduce((t,n)=>(d.f[n](e,t),t),[])),d.k=e=>""+e+".css",d.u=e=>"assets/"+e+"."+({1044:"39aafe87",1045:"21280f56",1050:"46b86852",1064:"d2226313",109:"d185b844",117:"fbce1498",1216:"f58f116a",1266:"b0b77ece",1274:"36c97e4b",1284:"6d1b1fa9",1297:"5aa40a92",1337:"91282e33",1348:"3156645b",1446:"08d331b6",1473:"b0f70164",1495:"98d34a19",1498:"a7a38ca7",1506:"50339f62",1541:"3def363d",1558:"a7617461",1565:"2f21c8e1",1680:"4e882493",1706:"b445c403",1811:"132227bb",1822:"9d44e9b8",1852:"561dcf77",1875:"f9da64a1",193:"86e5680f",1942:"edb657de",197:"be0123ad",1972:"b1548051",198:"2702464a",1981:"4e7751ba",2048:"e0b5be0d",2067:"6433a4bd",2082:"b2643ed0",2185:"248c6b44",2202:"e80e4d18",2227:"cf7e7a88",2234:"f03ed50e",2247:"8cd63431",2301:"5b08aa31",231:"073ec786",233:"9eea8428",2332:"bec77738",234:"e1ec501c",2368:"6d60e76e",2378:"a09f27ac",2411:"1a1e84d8",2426:"12abe760",2536:"d03279a1",2605:"3ae8a730",2645:"52e9596b",2707:"6df3e122",2725:"9a21dc87",2743:"d8ff9d1a",2748:"a74a539c",2751:"3761b15d",278:"06c0a585",2810:"0805c8d3",2816:"52f328bf",2872:"712f11ad",2881:"812773b3",2895:"412a0fef",2918:"ca9f8ee6",2948:"812bfd61",3008:"0e0072bf",3084:"812f46dd",311:"ff658c78",3115:"de6d897d",312:"6893cc70",3121:"abf15015",3123:"bb6961b4",3168:"f70fdbe1",3260:"b9830b0a",331:"5979e79c",3323:"33607bff",333:"62f29c23",3339:"55ba3289",3370:"ac044cd4",3381:"ebf520a0",3384:"97088998",3420:"d26395e2",3432:"9a6cbc9d",3474:"c3b0a117",3502:"713d8997",3520:"8332b3b9",3663:"7e96a229",3707:"9a1cc57e",3712:"ccdacc8b",3724:"c7124c16",379:"3eba2174",3793:"2f8f8fa2",3808:"61543a59",3809:"ea90d219",382:"df49ab73",3844:"ad345570",3853:"0041121c",3886:"4758be08",3911:"67d83e56",3945:"02b410f7",4025:"faefbdf9",4049:"274b3781",4058:"9bd8b6fd",4087:"f5f2aa77",4145:"591efba1",4179:"0e70c02d",4261:"24d2c946",4301:"d36b09ac",438:"c9ddabb1",4405:"195b8807",4429:"20a43aee",4445:"0593f53c",4447:"1f4c2594",4458:"b54836f5",4489:"e05c3f02",4496:"59f9e494",4498:"53895790",452:"bf34842d",4525:"202e71f0",459:"d0de752e",4609:"539adc7e",4613:"2c9412fc",465:"6d0c9900",4655:"817d8c16",4704:"5bd5cd1f",4705:"1b7400d1",4785:"2c122907",4795:"5b28b5a2",4796:"38fc127d",4798:"061be689",4846:"2f6655eb",485:"3fe4cb47",4885:"c0812b9f",4952:"bb1279bd",4983:"565b5198",4992:"abfa216e",4994:"5eac32c7",4996:"46cad67b",5068:"3fa2fa23",5072:"7adfff93",5108:"62165adf",5280:"bc09c97b",5281:"73e94011",5294:"b2f2f0bd",5319:"e6dcabf9",5393:"e6c80ec4",5398:"d0384b7e",5415:"c896e0e1",544:"64addbc4",5453:"08deb63c",5458:"0095414b",5462:"17536a21",5466:"7acd94a7",5518:"57996485",5530:"828452d4",5542:"9162530c",5593:"0776f2d3",5596:"8a7ddea5",5631:"f6c57eaf",5646:"1b33e69c",5661:"164c0709",5678:"c096f6c9",5687:"587f0e75",5703:"5e666028",5708:"164057e0",5712:"cc503220",575:"e898fd86",5752:"e018032d",5813:"cc59df28",5865:"012fa536",5879:"47b8e3c2",590:"8c02fbf9",5917:"87e0acee",5959:"c0de70a1",5970:"31600f7b",6005:"fb7dbdae",6024:"c3f22f35",6070:"6f66b5fa",6084:"26b44499",6085:"cb855236",6093:"bebbe3da",6106:"39b87fca",6122:"f064356d",6150:"5cb126a5",6157:"7eeb3515",616:"a5acd2aa",6226:"dd8f1fd9",6231:"c10ba8f9",6254:"69f98e64",6308:"9f7b0778",6309:"fd92f229",6378:"d0087d79",6380:"6a320a57",6427:"80120ca0",6468:"cd796686",655:"2424b6f0",6551:"1316a8b4",6563:"f0ab8ea9",658:"d1870bbc",659:"43d1bd18",6629:"d5835f7b",670:"cc579966",6729:"711b6a33",6739:"5df85504",6766:"b3b93d6b",6781:"8330074c",6829:"f83cf943",6855:"c3b857c6",6883:"55fcdbea",6900:"abab0925",6956:"8307b311",6959:"7c488de5",698:"ebc84dc0",7015:"a05d0b78",702:"98bd9103",703:"285f3139",7091:"027a641c",7104:"9c59e320",7113:"0dfbe544",7135:"e9ab3841",7143:"612c372b",7198:"dc23f6fa",7228:"5b31dd65",7234:"bec30557",7330:"b15282a7",7342:"6f18177c",7350:"e46146b3",7372:"863b3f51",7387:"78fae2d9",7403:"acdec0cd",7404:"c90b9555",7454:"61df5c53",7459:"91247a0c",7620:"1317e4da",7655:"a8e05941",7662:"5c5fd466",7698:"68eab02c",7714:"6a6656ee",7774:"b546561d",7822:"264595e9",7827:"9a988ed6",7858:"565180cd",7880:"23c4af6f",7921:"796cf6f2",7950:"9222be47",7992:"1bbe27a2",7993:"3e415bcd",8012:"1df6c7ba",8014:"1618a26d",8095:"3b776dc1",8115:"01697474",8134:"2dbefad3",8173:"98e9cda8",8178:"4448a8c8",8189:"726f5bba",8250:"6a31d3db",8252:"46abb10d",826:"55f3327b",8286:"7165c5ae",829:"57aaa21f",8295:"510e74b2",8306:"ffe7fef6",8336:"071bb524",8346:"cfd200d8",8349:"8746a8e4",8375:"0bf25482",8387:"7849a364",8408:"7b3b0706",8423:"da4adde4",8437:"67cbb62b",8439:"4ab411cf",8447:"805e1fbb",8481:"30bb3786",8531:"0e8a1bcd",855:"c45d80d8",857:"47395203",8601:"e90cd434",8671:"f9b853f6",8696:"2db4dd40",8698:"d8c25bfd",8725:"2a97b2e0",8767:"f7dbaf81",877:"0d1df971",8799:"b2bc36a0",8805:"e166d436",8861:"8e37cb89",8943:"d35181ef",9020:"b1614bfe",9048:"8a6be463",9060:"f88d7ff2",9109:"e2cef4ae",9120:"0baa1b3f",9172:"9b1d2d6a",920:"5f971a4e",9279:"7ff451d0",9285:"c26079c7",9297:"7162de0e",9328:"a33ba701",940:"5806c487",9403:"d4200316",9412:"5849ed28",9420:"c4e70fab",9467:"1a7a6c92",9502:"c84dc29b",9556:"97e5f142",9557:"b10d5e41",9597:"c517cbfd",96:"fdb82714",9619:"35683308",9623:"437474fc",9663:"1210b76e",9671:"40a11985",969:"ce9121b3",9695:"84356bbf",9728:"4f98e0ce",9770:"df634bdf",9842:"6faee06c",9886:"1c62a8ff",9888:"e3c97777",9918:"7ac5f09c",9927:"89711a15",9940:"70581af3",9990:"cf02a3de"})[e]+".js",d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},d.l=function(e,t,r,a){if(n[e])return void n[e].push(t);if(void 0!==r)for(var o,i,l=document.getElementsByTagName("script"),s=0;s<l.length;s++){var c=l[s];if(c.getAttribute("src")==e||c.getAttribute("data-rspack")=="@seaveyon/harness-switch-web:"+r){o=c;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,d.nc&&o.setAttribute("nonce",d.nc),o.setAttribute("data-rspack","@seaveyon/harness-switch-web:"+r),o.src=e),n[e]=[t];var u=function(t,r){o.onerror=o.onload=null,clearTimeout(f);var a=n[e];if(delete n[e],o.parentNode&&o.parentNode.removeChild(o),a&&a.forEach(function(e){return e(r)}),t)return t(r)},f=setTimeout(u.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=u.bind(null,o.onerror),o.onload=u.bind(null,o.onload),i&&document.head.appendChild(o)},d.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.nc=void 0,d.p="/",d.rv=()=>"1.7.12",r={1889:0},o="data-rspack-loading",(a=(e,t)=>{r[t]=0})(d.m,0,"1889"),d.f.css=(e,t,n)=>{var i=d.o(r,e)?r[e]:void 0;if(0!==i)if(i)t.push(i[2]);else if(1889==e){var l=new Promise(function(t,n){i=r[e]=[t,n]});t.push(i[2]=l);var s=d.p+d.k(e),c=Error(),u=function(t){if(d.o(r,e)&&(0!==(i=r[e])&&(r[e]=void 0),i))if("load"!==t.type){var n=t&&t.type,o=t&&t.target&&t.target.src;c.message="Loading css chunk "+e+" failed.\n("+n+": "+o+")",c.name="ChunkLoadError",c.type=n,c.request=o,i[1](c)}else a(d.m,e),i[0]()};"u">typeof document?((e,t,n,r,a)=>{var i,l,s="chunk-"+e;if(!r){for(var c=document.getElementsByTagName("link"),u=0;u<c.length;u++){var f=c[u],p=f.getAttribute("href")||f.href;if(p&&!p.startsWith(d.p)&&(p=d.p+(p.startsWith("/")?p.slice(1):p)),"stylesheet"==f.rel&&(p&&p.startsWith(t)||f.getAttribute("data-rspack")=="@seaveyon/harness-switch-web:"+s)){i=f;break}}if(!n)return}i||(l=!0,i=document.createElement("link"),d.nc&&i.setAttribute("nonce",d.nc),i.setAttribute("data-rspack","@seaveyon/harness-switch-web:"+s),i.setAttribute(o,1),i.rel="stylesheet",i.href=t);var h=(e,t)=>{if(i.onerror=i.onload=null,i.removeAttribute(o),clearTimeout(m),t&&"load"!=t.type&&i.parentNode.removeChild(i),n(t),e)return e(t)};if(i.getAttribute(o)){var m=setTimeout(h.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=h.bind(null,i.onerror),i.onload=h.bind(null,i.onload)}else h(void 0,{type:"load",target:i});return r&&r.getAttribute("fetchpriority")&&i.setAttribute("fetchpriority",r.getAttribute("fetchpriority")),r?document.head.insertBefore(i,r):l&&document.head.appendChild(i)})(e,s,u,void 0,0):u({type:"load"})}else r[e]=0},i={1889:0},d.f.j=function(e,t){var n=d.o(i,e)?i[e]:void 0;if(0!==n)if(n)t.push(n[2]);else{var r=new Promise((t,r)=>n=i[e]=[t,r]);t.push(n[2]=r);var a=d.p+d.u(e),o=Error();d.l(a,function(t){if(d.o(i,e)&&(0!==(n=i[e])&&(i[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;o.message="Loading chunk "+e+" failed.\n("+r+": "+a+")",o.name="ChunkLoadError",o.type=r,o.request=a,n[1](o)}},"chunk-"+e,e)}},l=(e,t)=>{var n,r,[a,o,l]=t,s=0;if(a.some(e=>0!==i[e])){for(n in o)d.o(o,n)&&(d.m[n]=o[n]);l&&l(d)}for(e&&e(t);s<a.length;s++)r=a[s],d.o(i,r)&&i[r]&&i[r][0](),i[r]=0},(s=self.webpackChunk_seaveyon_harness_switch_web=self.webpackChunk_seaveyon_harness_switch_web||[]).forEach(l.bind(null,0)),s.push=l.bind(null,s.push.bind(s)),d.ruid="bundler=rspack@1.7.12",(()=>{let e,t,n;var r,a,o,i,l,s,c,u,f,p,h,m,g=d(1085),y=d(4041),v=d.t(y,2),b=d(5873),x=d(2903);let w=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},k=(...e)=>e.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim();var j={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"};let S=(0,y.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:o,iconNode:i,...l},s)=>(0,y.createElement)("svg",{ref:s,...j,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:k("lucide",a),...!o&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(l)&&{"aria-hidden":"true"},...l},[...i.map(([e,t])=>(0,y.createElement)(e,t)),...Array.isArray(o)?o:[o]])),O=(e,t)=>{let n=(0,y.forwardRef)(({className:n,...r},a)=>(0,y.createElement)(S,{ref:a,iconNode:t,className:k(`lucide-${w(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...r}));return n.displayName=w(e),n},C=O("sliders-horizontal",[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]),N=O("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),P=O("file-search",[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4.268 21a2 2 0 0 0 1.727 1H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"ms7g94"}],["path",{d:"m9 18-1.5-1.5",key:"1j6qii"}],["circle",{cx:"5",cy:"14",r:"3",key:"ufru5t"}]]),E=O("arrow-right-left",[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]]),_=O("cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]),z=O("key-round",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]),T=O("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),A=O("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),R=O("user-round",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]),L=O("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),I=O("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]),M=O("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);var D=["claude","codex","kimi","pi","dsh"],F={claude:"Claude Code",codex:"Codex",kimi:"Kimi Code",pi:"Pi",dsh:"DeepSeek Harness"};function $(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:i,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let a=i.prototype,o=Object.keys(a);for(let e=0;e<o.length;e++){let t=o[e];t in n||(n[t]=a[t].bind(n))}}let a=n?.Parent??Object;class o extends a{}function i(e){var t;let a=n?.Parent?new o:this;for(let n of(r(a,e),(t=a._zod).deferred??(t.deferred=[]),a._zod.deferred))n();return a}return Object.defineProperty(o,"name",{value:e}),Object.defineProperty(i,"init",{value:r}),Object.defineProperty(i,Symbol.hasInstance,{value:t=>!!n?.Parent&&t instanceof n.Parent||t?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}Symbol("zod_brand");class U extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class H extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}(f=globalThis).__zod_globalConfig??(f.__zod_globalConfig={});let B=globalThis.__zod_globalConfig;function K(e){return e&&Object.assign(B,e),B}let V=/^[cC][0-9a-z]{6,}$/,q=/^[0-9a-z]+$/,W=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Z=/^[0-9a-vA-V]{20}$/,G=/^[A-Za-z0-9]{27}$/,J=/^[a-zA-Z0-9_-]{21}$/,Q=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Y=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,X=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,ee=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,et=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,en=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,er=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,ea=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,eo=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ei=/^[A-Za-z0-9_-]*$/,el=/^https?$/,es=/^\+[1-9]\d{6,14}$/,ec="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",eu=RegExp(`^${ec}$`);function ed(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}let ef=/^-?\d+(?:\.\d+)?$/,ep=/^(?:true|false)$/i,eh=/^[^A-Z]*$/,em=/^[^a-z]*$/;function eg(e){let t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function ey(e,t){return"bigint"==typeof t?t.toString():t}function ev(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function eb(e){let t=+!!e.startsWith("^"),n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}let ex=Symbol("evaluating");function ew(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==ex)return void 0===r&&(r=ex,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function ek(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ej(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function eS(e){return JSON.stringify(e)}let eO="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function eC(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let eN=ev(()=>{if(B.jitless||"u">typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch(e){return!1}});function eP(e){if(!1===eC(e))return!1;let t=e.constructor;if(void 0===t||"function"!=typeof t)return!0;let n=t.prototype;return!1!==eC(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function eE(e){return eP(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}let e_=new Set(["string","number","symbol"]);function ez(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function eT(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function eA(e){if(!e)return{};if("string"==typeof e)return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");e.error=e.message}return(delete e.message,"string"==typeof e.error)?{...e,error:()=>e.error}:e}function eR(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function eL(e,t){return t.map(t=>(t.path??(t.path=[]),t.path.unshift(e),t))}function eI(e){return"string"==typeof e?e:e?.message}function eM(e,t,n){let r=e.message?e.message:eI(e.inst?._zod.def?.error?.(e))??eI(t?.error?.(e))??eI(n.customError?.(e))??eI(n.localeError?.(e))??"Invalid input",{inst:a,continue:o,input:i,...l}=e;return l.path??(l.path=[]),l.message=r,t?.reportInput&&(l.input=i),l}function eD(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function eF(...e){let[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}let e$=$("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),eU=$("$ZodCheckMaxLength",(e,t)=>{var n;e$.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let a=eD(r);n.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),eH=$("$ZodCheckMinLength",(e,t)=>{var n;e$.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let a=eD(r);n.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),eB=$("$ZodCheckLengthEquals",(e,t)=>{var n;e$.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,a=r.length;if(a===t.length)return;let o=eD(r),i=a>t.length;n.issues.push({origin:o,...i?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),eK=$("$ZodCheckStringFormat",(e,t)=>{var n,r;e$.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),eV=$("$ZodCheckRegex",(e,t)=>{eK.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),eq=$("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=eh),eK.init(e,t)}),eW=$("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=em),eK.init(e,t)}),eZ=$("$ZodCheckIncludes",(e,t)=>{e$.init(e,t);let n=ez(t.includes),r=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),eG=$("$ZodCheckStartsWith",(e,t)=>{e$.init(e,t);let n=RegExp(`^${ez(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),eJ=$("$ZodCheckEndsWith",(e,t)=>{e$.init(e,t);let n=RegExp(`.*${ez(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),eQ=$("$ZodCheckOverwrite",(e,t)=>{e$.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class eY{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let t=e.split("\n").filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length));for(let e of t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e))this.content.push(e)}compile(){return Function(...this?.args,[...(this?.content??[""]).map(e=>` ${e}`)].join("\n"))}}let eX=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,ey,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},e0=$("$ZodError",eX),e1=$("$ZodError",eX,{Parent:Error}),e2=e=>(t,n,r,a)=>{let o=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new U;if(i.issues.length){let t=new(a?.Err??e)(i.issues.map(e=>eM(e,o,K())));throw eO(t,a?.callee),t}return i.value},e4=e=>async(t,n,r,a)=>{let o=r?{...r,async:!0}:{async:!0},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise&&(i=await i),i.issues.length){let t=new(a?.Err??e)(i.issues.map(e=>eM(e,o,K())));throw eO(t,a?.callee),t}return i.value},e3=e=>(t,n,r)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new U;return o.issues.length?{success:!1,error:new(e??e0)(o.issues.map(e=>eM(e,a,K())))}:{success:!0,data:o.value}},e5=e3(e1),e6=e=>async(t,n,r)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(e=>eM(e,a,K())))}:{success:!0,data:o.value}},e8=e6(e1),e9={major:4,minor:4,patch:3},e7=$("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=e9;let r=[...e._zod.def.checks??[]];for(let t of(e._zod.traits.has("$ZodCheck")&&r.unshift(e),r))for(let n of t._zod.onattach)n(e);if(0===r.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r,a=eR(e);for(let o of t){if(o._zod.def.when){if(function(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}(e)||!o._zod.def.when(e))continue}else if(a)continue;let t=e.issues.length,i=o._zod.check(e);if(i instanceof Promise&&n?.async===!1)throw new U;if(r||i instanceof Promise)r=(r??Promise.resolve()).then(async()=>{await i,e.issues.length!==t&&(a||(a=eR(e,t)))});else{if(e.issues.length===t)continue;a||(a=eR(e,t))}}return r?r.then(()=>e):e},n=(n,a,o)=>{if(eR(n))return n.aborted=!0,n;let i=t(a,r,o);if(i instanceof Promise){if(!1===o.async)throw new U;return i.then(t=>e._zod.parse(t,o))}return e._zod.parse(i,o)};e._zod.run=(a,o)=>{if(o.skipChecks)return e._zod.parse(a,o);if("backward"===o.direction){let t=e._zod.parse({value:a.value,issues:[]},{...o,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,a,o)):n(t,a,o)}let i=e._zod.parse(a,o);if(i instanceof Promise){if(!1===o.async)throw new U;return i.then(e=>t(e,r,o))}return t(i,r,o)}}ew(e,"~standard",()=>({validate:t=>{try{let n=e5(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return e8(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}))}),te=$("$ZodString",(e,t)=>{var n;let r;e7.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??(r=(n=e._zod.bag)?`[\\s\\S]{${n?.minimum??0},${n?.maximum??""}}`:"[\\s\\S]*",RegExp(`^${r}$`)),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch(e){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),tt=$("$ZodStringFormat",(e,t)=>{eK.init(e,t),te.init(e,t)}),tn=$("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Y),tt.init(e,t)}),tr=$("$ZodUUID",(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=X(e))}else t.pattern??(t.pattern=X());tt.init(e,t)}),ta=$("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=ee),tt.init(e,t)}),to=$("$ZodURL",(e,t)=>{tt.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===el.source&&!/^https?:\/\//i.test(r))return void n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});let a=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(a.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(a.protocol.endsWith(":")?a.protocol.slice(0,-1):a.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=a.href:n.value=r;return}catch(r){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),ti=$("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),tt.init(e,t)}),tl=$("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=J),tt.init(e,t)}),ts=$("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=V),tt.init(e,t)}),tc=$("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=q),tt.init(e,t)}),tu=$("$ZodULID",(e,t)=>{t.pattern??(t.pattern=W),tt.init(e,t)}),td=$("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Z),tt.init(e,t)}),tf=$("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=G),tt.init(e,t)}),tp=$("$ZodISODateTime",(e,t)=>{let n,r,a;t.pattern??(n=ed({precision:t.precision}),r=["Z"],t.local&&r.push(""),t.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)"),a=`${n}(?:${r.join("|")})`,t.pattern=RegExp(`^${ec}T(?:${a})$`)),tt.init(e,t)}),th=$("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=eu),tt.init(e,t)}),tm=$("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=RegExp(`^${ed(t)}$`)),tt.init(e,t)}),tg=$("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Q),tt.init(e,t)}),ty=$("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=et),tt.init(e,t),e._zod.bag.format="ipv4"}),tv=$("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=en),tt.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),tb=$("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=er),tt.init(e,t)}),tx=$("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=ea),tt.init(e,t),e._zod.check=n=>{let r=n.value.split("/");try{if(2!==r.length)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function tw(e){if(""===e)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}let tk=$("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=eo),tt.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{tw(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}}),tj=$("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=ei),tt.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{!function(e){if(!ei.test(e))return!1;let t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return tw(t.padEnd(4*Math.ceil(t.length/4),"="))}(n.value)&&n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),tS=$("$ZodE164",(e,t)=>{t.pattern??(t.pattern=es),tt.init(e,t)}),tO=$("$ZodJWT",(e,t)=>{tt.init(e,t),e._zod.check=n=>{!function(e,t=null){try{let n=e.split(".");if(3!==n.length)return!1;let[r]=n;if(!r)return!1;let a=JSON.parse(atob(r));if("typ"in a&&a?.typ!=="JWT"||!a.alg||t&&(!("alg"in a)||a.alg!==t))return!1;return!0}catch{return!1}}(n.value,t.alg)&&n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),tC=$("$ZodBoolean",(e,t)=>{e7.init(e,t),e._zod.pattern=ep,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch(e){}let a=n.value;return"boolean"==typeof a||n.issues.push({expected:"boolean",code:"invalid_type",input:a,inst:e}),n}}),tN=$("$ZodUnknown",(e,t)=>{e7.init(e,t),e._zod.parse=e=>e}),tP=$("$ZodNever",(e,t)=>{e7.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function tE(e,t,n){e.issues.length&&t.issues.push(...eL(n,e.issues)),t.value[n]=e.value}let t_=$("$ZodArray",(e,t)=>{e7.init(e,t),e._zod.parse=(n,r)=>{let a=n.value;if(!Array.isArray(a))return n.issues.push({expected:"array",code:"invalid_type",input:a,inst:e}),n;n.value=Array(a.length);let o=[];for(let e=0;e<a.length;e++){let i=a[e],l=t.element._zod.run({value:i,issues:[]},r);l instanceof Promise?o.push(l.then(t=>tE(t,n,e))):tE(l,n,e)}return o.length?Promise.all(o).then(()=>n):n}});function tz(e,t,n,r,a,o){let i=n in r;if(e.issues.length){if(a&&o&&!i)return;t.issues.push(...eL(n,e.issues))}if(!i&&!a){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}void 0===e.value?i&&(t.value[n]=void 0):t.value[n]=e.value}function tT(e){var t;let n=Object.keys(e.shape);for(let t of n)if(!e.shape?.[t]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${t}": expected a Zod schema`);let r=Object.keys(t=e.shape).filter(e=>"optional"===t[e]._zod.optin&&"optional"===t[e]._zod.optout);return{...e,keys:n,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(r)}}function tA(e,t,n,r,a,o){let i=[],l=a.keySet,s=a.catchall._zod,c=s.def.type,u="optional"===s.optin,d="optional"===s.optout;for(let a in t){if("__proto__"===a||l.has(a))continue;if("never"===c){i.push(a);continue}let o=s.run({value:t[a],issues:[]},r);o instanceof Promise?e.push(o.then(e=>tz(e,n,a,t,u,d))):tz(o,n,a,t,u,d)}return(i.length&&n.issues.push({code:"unrecognized_keys",keys:i,input:t,inst:o}),e.length)?Promise.all(e).then(()=>n):n}let tR=$("$ZodObject",(e,t)=>{let n;e7.init(e,t);let r=Object.getOwnPropertyDescriptor(t,"shape");if(!r?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let a=ev(()=>tT(t));ew(e._zod,"propValues",()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values)for(let e of(n[t]??(n[t]=new Set),r.values))n[t].add(e)}return n});let o=t.catchall;e._zod.parse=(t,r)=>{n??(n=a.value);let i=t.value;if(!eC(i))return t.issues.push({expected:"object",code:"invalid_type",input:i,inst:e}),t;t.value={};let l=[],s=n.shape;for(let e of n.keys){let n=s[e],a="optional"===n._zod.optin,o="optional"===n._zod.optout,c=n._zod.run({value:i[e],issues:[]},r);c instanceof Promise?l.push(c.then(n=>tz(n,t,e,i,a,o))):tz(c,t,e,i,a,o)}return o?tA(l,i,t,r,a.value,e):l.length?Promise.all(l).then(()=>t):t}}),tL=$("$ZodObjectJIT",(e,t)=>{let n,r;tR.init(e,t);let a=e._zod.parse,o=ev(()=>tT(t)),i=!B.jitless,l=i&&eN.value,s=t.catchall;e._zod.parse=(c,u)=>{r??(r=o.value);let d=c.value;return eC(d)?i&&l&&u?.async===!1&&!0!==u.jitless?(n||(n=(e=>{let t=new eY(["shape","payload","ctx"]),n=o.value,r=e=>{let t=eS(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");let a=Object.create(null),i=0;for(let e of n.keys)a[e]=`key_${i++}`;for(let o of(t.write("const newResult = {};"),n.keys)){let n=a[o],i=eS(o),l=e[o],s=l?._zod?.optin==="optional",c=l?._zod?.optout==="optional";t.write(`const ${n} = ${r(o)};`),s&&c?t.write(`
2
- if (${n}.issues.length) {
3
- if (${i} in input) {
4
- payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
5
- ...iss,
6
- path: iss.path ? [${i}, ...iss.path] : [${i}]
7
- })));
8
- }
9
- }
10
-
11
- if (${n}.value === undefined) {
12
- if (${i} in input) {
13
- newResult[${i}] = undefined;
14
- }
15
- } else {
16
- newResult[${i}] = ${n}.value;
17
- }
18
-
19
- `):s?t.write(`
20
- if (${n}.issues.length) {
21
- payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
22
- ...iss,
23
- path: iss.path ? [${i}, ...iss.path] : [${i}]
24
- })));
25
- }
26
-
27
- if (${n}.value === undefined) {
28
- if (${i} in input) {
29
- newResult[${i}] = undefined;
30
- }
31
- } else {
32
- newResult[${i}] = ${n}.value;
33
- }
34
-
35
- `):t.write(`
36
- const ${n}_present = ${i} in input;
37
- if (${n}.issues.length) {
38
- payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
39
- ...iss,
40
- path: iss.path ? [${i}, ...iss.path] : [${i}]
41
- })));
42
- }
43
- if (!${n}_present && !${n}.issues.length) {
44
- payload.issues.push({
45
- code: "invalid_type",
46
- expected: "nonoptional",
47
- input: undefined,
48
- path: [${i}]
49
- });
50
- }
51
-
52
- if (${n}_present) {
53
- if (${n}.value === undefined) {
54
- newResult[${i}] = undefined;
55
- } else {
56
- newResult[${i}] = ${n}.value;
57
- }
58
- }
59
-
60
- `)}t.write("payload.value = newResult;"),t.write("return payload;");let l=t.compile();return(t,n)=>l(e,t,n)})(t.shape)),c=n(c,u),s)?tA([],d,c,u,r,e):c:a(c,u):(c.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),c)}});function tI(e,t,n,r){for(let n of e)if(0===n.issues.length)return t.value=n.value,t;let a=e.filter(e=>!eR(e));return 1===a.length?(t.value=a[0].value,a[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>eM(e,r,K())))}),t)}let tM=$("$ZodUnion",(e,t)=>{e7.init(e,t),ew(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),ew(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),ew(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),ew(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>eb(e.source)).join("|")})$`)}});let n=1===t.options.length?t.options[0]._zod.run:null;e._zod.parse=(r,a)=>{if(n)return n(r,a);let o=!1,i=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},a);if(t instanceof Promise)i.push(t),o=!0;else{if(0===t.issues.length)return t;i.push(t)}}return o?Promise.all(i).then(t=>tI(t,r,e,a)):tI(i,r,e,a)}}),tD=$("$ZodIntersection",(e,t)=>{e7.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,a=t.left._zod.run({value:r,issues:[]},n),o=t.right._zod.run({value:r,issues:[]},n);return a instanceof Promise||o instanceof Promise?Promise.all([a,o]).then(([t,n])=>tF(e,t,n)):tF(e,a,o)}});function tF(e,t,n){let r,a=new Map;for(let n of t.issues)if("unrecognized_keys"===n.code)for(let e of(r??(r=n),n.keys))a.has(e)||a.set(e,{}),a.get(e).l=!0;else e.issues.push(n);for(let t of n.issues)if("unrecognized_keys"===t.code)for(let e of t.keys)a.has(e)||a.set(e,{}),a.get(e).r=!0;else e.issues.push(t);let o=[...a].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(o.length&&r&&e.issues.push({...r,keys:o}),eR(e))return e;let i=function e(t,n){if(t===n||t instanceof Date&&n instanceof Date&&+t==+n)return{valid:!0,data:t};if(eP(t)&&eP(n)){let r=Object.keys(n),a=Object.keys(t).filter(e=>-1!==r.indexOf(e)),o={...t,...n};for(let r of a){let a=e(t[r],n[r]);if(!a.valid)return{valid:!1,mergeErrorPath:[r,...a.mergeErrorPath]};o[r]=a.data}return{valid:!0,data:o}}if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let a=0;a<t.length;a++){let o=e(t[a],n[a]);if(!o.valid)return{valid:!1,mergeErrorPath:[a,...o.mergeErrorPath]};r.push(o.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}(t.value,n.value);if(!i.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}let t$=$("$ZodRecord",(e,t)=>{e7.init(e,t),e._zod.parse=(n,r)=>{let a=n.value;if(!eP(a))return n.issues.push({expected:"record",code:"invalid_type",input:a,inst:e}),n;let o=[],i=t.keyType._zod.values;if(i){let l;n.value={};let s=new Set;for(let l of i)if("string"==typeof l||"number"==typeof l||"symbol"==typeof l){s.add("number"==typeof l?l.toString():l);let i=t.keyType._zod.run({value:l,issues:[]},r);if(i instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(i.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:i.issues.map(e=>eM(e,r,K())),input:l,path:[l],inst:e});continue}let c=i.value,u=t.valueType._zod.run({value:a[l],issues:[]},r);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&n.issues.push(...eL(l,e.issues)),n.value[c]=e.value})):(u.issues.length&&n.issues.push(...eL(l,u.issues)),n.value[c]=u.value)}for(let e in a)s.has(e)||(l=l??[]).push(e);l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:a,inst:e,keys:l})}else for(let i of(n.value={},Reflect.ownKeys(a))){if("__proto__"===i||!Object.prototype.propertyIsEnumerable.call(a,i))continue;let l=t.keyType._zod.run({value:i,issues:[]},r);if(l instanceof Promise)throw Error("Async schemas not supported in object keys currently");if("string"==typeof i&&ef.test(i)&&l.issues.length){let e=t.keyType._zod.run({value:Number(i),issues:[]},r);if(e instanceof Promise)throw Error("Async schemas not supported in object keys currently");0===e.issues.length&&(l=e)}if(l.issues.length){"loose"===t.mode?n.value[i]=a[i]:n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(e=>eM(e,r,K())),input:i,path:[i],inst:e});continue}let s=t.valueType._zod.run({value:a[i],issues:[]},r);s instanceof Promise?o.push(s.then(e=>{e.issues.length&&n.issues.push(...eL(i,e.issues)),n.value[l.value]=e.value})):(s.issues.length&&n.issues.push(...eL(i,s.issues)),n.value[l.value]=s.value)}return o.length?Promise.all(o).then(()=>n):n}}),tU=$("$ZodEnum",(e,t)=>{e7.init(e,t);let n=eg(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>e_.has(typeof e)).map(e=>"string"==typeof e?ez(e):e.toString()).join("|")})$`),e._zod.parse=(t,a)=>{let o=t.value;return r.has(o)||t.issues.push({code:"invalid_value",values:n,input:o,inst:e}),t}}),tH=$("$ZodLiteral",(e,t)=>{if(e7.init(e,t),0===t.values.length)throw Error("Cannot create literal schema with no valid values");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>"string"==typeof e?ez(e):e?ez(e.toString()):String(e)).join("|")})$`),e._zod.parse=(r,a)=>{let o=r.value;return n.has(o)||r.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),r}}),tB=$("$ZodTransform",(e,t)=>{e7.init(e,t),e._zod.optin="optional",e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new H(e.constructor.name);let a=t.transform(n.value,n);if(r.async)return(a instanceof Promise?a:Promise.resolve(a)).then(e=>(n.value=e,n.fallback=!0,n));if(a instanceof Promise)throw new U;return n.value=a,n.fallback=!0,n}});function tK(e,t){return void 0===t&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}let tV=$("$ZodOptional",(e,t)=>{e7.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ew(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ew(e._zod,"pattern",()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${eb(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if("optional"===t.innerType._zod.optin){let r=e.value,a=t.innerType._zod.run(e,n);return a instanceof Promise?a.then(e=>tK(e,r)):tK(a,r)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),tq=$("$ZodExactOptional",(e,t)=>{tV.init(e,t),ew(e._zod,"values",()=>t.innerType._zod.values),ew(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),tW=$("$ZodNullable",(e,t)=>{e7.init(e,t),ew(e._zod,"optin",()=>t.innerType._zod.optin),ew(e._zod,"optout",()=>t.innerType._zod.optout),ew(e._zod,"pattern",()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${eb(e.source)}|null)$`):void 0}),ew(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),tZ=$("$ZodDefault",(e,t)=>{e7.init(e,t),e._zod.optin="optional",ew(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>tG(e,t)):tG(r,t)}});function tG(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}let tJ=$("$ZodPrefault",(e,t)=>{e7.init(e,t),e._zod.optin="optional",ew(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),tQ=$("$ZodNonOptional",(e,t)=>{e7.init(e,t),ew(e._zod,"values",()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,r)=>{let a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(t=>tY(t,e)):tY(a,e)}});function tY(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}let tX=$("$ZodCatch",(e,t)=>{e7.init(e,t),e._zod.optin="optional",ew(e._zod,"optout",()=>t.innerType._zod.optout),ew(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>eM(e,n,K()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>eM(e,n,K()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),t0=$("$ZodPipe",(e,t)=>{e7.init(e,t),ew(e._zod,"values",()=>t.in._zod.values),ew(e._zod,"optin",()=>t.in._zod.optin),ew(e._zod,"optout",()=>t.out._zod.optout),ew(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>t1(e,t.in,n)):t1(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>t1(e,t.out,n)):t1(r,t.out,n)}});function t1(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}let t2=$("$ZodReadonly",(e,t)=>{e7.init(e,t),ew(e._zod,"propValues",()=>t.innerType._zod.propValues),ew(e._zod,"values",()=>t.innerType._zod.values),ew(e._zod,"optin",()=>t.innerType?._zod?.optin),ew(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t4):t4(r)}});function t4(e){return e.value=Object.freeze(e.value),e}let t3=$("$ZodCustom",(e,t)=>{e$.init(e,t),e7.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,a=t.fn(r);if(a instanceof Promise)return a.then(t=>t5(t,n,r,e));t5(a,n,r,e)}});function t5(e,t,n,r){if(!e){let e={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(eF(e))}}Symbol("ZodOutput"),Symbol("ZodInput");(p=globalThis).__zod_globalRegistry??(p.__zod_globalRegistry=new class e{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&"object"==typeof n&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}});let t6=globalThis.__zod_globalRegistry;function t8(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...eA(t)})}function t9(e,t){return new eU({check:"max_length",...eA(t),maximum:e})}function t7(e,t){return new eH({check:"min_length",...eA(t),minimum:e})}function ne(e,t){return new eB({check:"length_equals",...eA(t),length:e})}function nt(e){return new eQ({check:"overwrite",tx:e})}function nn(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??t6,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function nr(e,t,n={path:[],schemaPath:[]}){var r;let a=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema;let i={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,i);let l=e._zod.toJSONSchema?.();if(l)i.schema=l;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,i.schema,r);else{let n=i.schema,o=t.processors[a.type];if(!o)throw Error(`[toJSONSchema]: Non-representable type encountered: ${a.type}`);o(e,t,n,r)}let o=e._zod.parent;o&&(i.ref||(i.ref=o),nr(o,t,r),t.seen.get(o).isParent=!0)}let s=t.metadataRegistry.get(e);return s&&Object.assign(i.schema,s),"input"===t.io&&function e(t,n){let r=n??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);let a=t._zod.def;if("transform"===a.type)return!0;if("array"===a.type)return e(a.element,r);if("set"===a.type)return e(a.valueType,r);if("lazy"===a.type)return e(a.getter(),r);if("promise"===a.type||"optional"===a.type||"nonoptional"===a.type||"nullable"===a.type||"readonly"===a.type||"default"===a.type||"prefault"===a.type)return e(a.innerType,r);if("intersection"===a.type)return e(a.left,r)||e(a.right,r);if("record"===a.type||"map"===a.type)return e(a.keyType,r)||e(a.valueType,r);if("pipe"===a.type)return!!t._zod.traits.has("$ZodCodec")||e(a.in,r)||e(a.out,r);if("object"===a.type){for(let t in a.shape)if(e(a.shape[t],r))return!0;return!1}if("union"===a.type){for(let t of a.options)if(e(t,r))return!0;return!1}if("tuple"===a.type){for(let t of a.items)if(e(t,r))return!0;if(a.rest&&e(a.rest,r))return!0}return!1}(e)&&(delete i.schema.examples,delete i.schema.default),"input"===t.io&&"_prefault"in i.schema&&((r=i.schema).default??(r.default=i.schema._prefault)),delete i.schema._prefault,t.seen.get(e).schema}function na(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let a=t=>{if(t[1].schema.$ref)return;let r=t[1],{ref:a,defId:o}=(t=>{let r="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){let n=e.external.registry.get(t[0])?.id,a=e.external.uri??(e=>e);if(n)return{ref:a(n)};let o=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=o,{defId:o,ref:`${a("__shared")}#/${r}/${o}`}}if(t[1]===n)return{ref:"#"};let a=`#/${r}/`,o=t[1].schema.id??`__schema${e.counter++}`;return{defId:o,ref:a+o}})(t);r.def={...r.schema},o&&(r.defId=o);let i=r.schema;for(let e in i)delete i[e];i.$ref=a};if("throw"===e.cycles)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>
61
-
62
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&"ref"===e.reused){a(n);continue}}}function no(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let r=t=>{let n=e.seen.get(t);if(null===n.ref)return;let a=n.def??n.schema,o={...a},i=n.ref;if(n.ref=null,i){r(i);let n=e.seen.get(i),l=n.schema;if(l.$ref&&("draft-07"===e.target||"draft-04"===e.target||"openapi-3.0"===e.target)?(a.allOf=a.allOf??[],a.allOf.push(l)):Object.assign(a,l),Object.assign(a,o),t._zod.parent===i)for(let e in a)"$ref"!==e&&"allOf"!==e&&(e in o||delete a[e]);if(l.$ref&&n.def)for(let e in a)"$ref"!==e&&"allOf"!==e&&e in n.def&&JSON.stringify(a[e])===JSON.stringify(n.def[e])&&delete a[e]}let l=t._zod.parent;if(l&&l!==i){r(l);let t=e.seen.get(l);if(t?.schema.$ref&&(a.$ref=t.schema.$ref,t.def))for(let e in a)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(a[e])===JSON.stringify(t.def[e])&&delete a[e]}e.override({zodSchema:t,jsonSchema:a,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let a={};if("draft-2020-12"===e.target?a.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?a.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?a.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");a.$id=e.external.uri(n)}Object.assign(a,n.def??n.schema);let o=e.metadataRegistry.get(t)?.id;void 0!==o&&a.id===o&&delete a.id;let i=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,i[e.defId]=e.def)}e.external||Object.keys(i).length>0&&("draft-2020-12"===e.target?a.$defs=i:a.definitions=i);try{let n=JSON.parse(JSON.stringify(a));return Object.defineProperty(n,"~standard",{value:{...t["~standard"],jsonSchema:{input:ni(t,"input",e.processors),output:ni(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(e){throw Error("Error converting schema to JSON.")}}let ni=(e,t,n={})=>r=>{let{libraryOptions:a,target:o}=r??{},i=nn({...a??{},target:o,io:t,processors:n});return nr(e,i),na(i,e),no(i,e)},nl={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},ns=(e,t,n,r)=>{let a=e._zod.def;nr(a.innerType,t,r),t.seen.get(e).ref=a.innerType},nc=$("ZodISODateTime",(e,t)=>{tp.init(e,t),nT.init(e,t)}),nu=$("ZodISODate",(e,t)=>{th.init(e,t),nT.init(e,t)}),nd=$("ZodISOTime",(e,t)=>{tm.init(e,t),nT.init(e,t)}),nf=$("ZodISODuration",(e,t)=>{tg.init(e,t),nT.init(e,t)}),np=$("ZodError",(e,t)=>{e0.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>(function(e,t=e=>e.message){let n={_errors:[]},r=(e,a=[])=>{for(let o of e.issues)if("invalid_union"===o.code&&o.errors.length)o.errors.map(e=>r({issues:e},[...a,...o.path]));else if("invalid_key"===o.code)r({issues:o.issues},[...a,...o.path]);else if("invalid_element"===o.code)r({issues:o.issues},[...a,...o.path]);else{let e=[...a,...o.path];if(0===e.length)n._errors.push(t(o));else{let r=n,a=0;for(;a<e.length;){let n=e[a];a===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(o))):r[n]=r[n]||{_errors:[]},r=r[n],a++}}}};return r(e),n})(e,t)},flatten:{value:t=>(function(e,t=e=>e.message){let n={},r=[];for(let a of e.issues)a.path.length>0?(n[a.path[0]]=n[a.path[0]]||[],n[a.path[0]].push(t(a))):r.push(t(a));return{formErrors:r,fieldErrors:n}})(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,ey,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,ey,2)}},isEmpty:{get:()=>0===e.issues.length}})},{Parent:Error}),nh=e2(np),nm=e4(np),ng=e3(np),ny=e6(np),nv=(e,t,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return e2(np)(e,t,r)},nb=(e,t,n)=>e2(np)(e,t,n),nx=async(e,t,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return e4(np)(e,t,r)},nw=async(e,t,n)=>e4(np)(e,t,n),nk=(e,t,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return e3(np)(e,t,r)},nj=(e,t,n)=>e3(np)(e,t,n),nS=async(e,t,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return e6(np)(e,t,r)},nO=async(e,t,n)=>e6(np)(e,t,n),nC=new WeakMap;function nN(e,t,n){let r=Object.getPrototypeOf(e),a=nC.get(r);if(a||(a=new Set,nC.set(r,a)),!a.has(t))for(let e in a.add(t),n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}let nP=$("ZodType",(e,t)=>(e7.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:ni(e,"input"),output:ni(e,"output")}}),e.toJSONSchema=((e,t={})=>n=>{let r=nn({...n,processors:t});return nr(e,r),na(r,e),no(r,e)})(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>nh(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>ng(e,t,n),e.parseAsync=async(t,n)=>nm(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>ny(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>nv(e,t,n),e.decode=(t,n)=>nb(e,t,n),e.encodeAsync=async(t,n)=>nx(e,t,n),e.decodeAsync=async(t,n)=>nw(e,t,n),e.safeEncode=(t,n)=>nk(e,t,n),e.safeDecode=(t,n)=>nj(e,t,n),e.safeEncodeAsync=async(t,n)=>nS(e,t,n),e.safeDecodeAsync=async(t,n)=>nO(e,t,n),nN(e,"ZodType",{check(...e){let t=this.def;return this.clone(ej(t,{checks:[...t.checks??[],...e.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return eT(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(function(e,t={}){return new rv({type:"custom",check:"custom",fn:e,...eA(t)})}(e,t))},superRefine(e,t){return this.check(function(e,t){var n;let r,a;return n=t=>(t.addIssue=e=>{"string"==typeof e?t.issues.push(eF(e,t.value,r._zod.def)):(e.fatal&&(e.continue=!1),e.code??(e.code="custom"),e.input??(e.input=t.value),e.inst??(e.inst=r),e.continue??(e.continue=!r._zod.def.abort),t.issues.push(eF(e)))},e(t.value,t)),(a=new e$({check:"custom",...eA(t)}))._zod.check=n,r=a}(e,t))},overwrite(e){return this.check(nt(e))},optional(){return rl(this)},exactOptional(){var e;return e=this,new rs({type:"optional",innerType:e})},nullable(){return ru(this)},nullish(){return rl(ru(this))},nonoptional(e){var t;return t=this,new rp({type:"nonoptional",innerType:t,...eA(e)})},array(){return n3(this)},or(e){return new n8({type:"union",options:[this,e],...eA(void 0)})},and(e){var t;return t=this,new n9({type:"intersection",left:t,right:e})},transform(e){return rg(this,new ro({type:"transform",transform:e}))},default(e){var t,n;return t=this,n=e,new rd({type:"default",innerType:t,get defaultValue(){return"function"==typeof n?n():eE(n)}})},prefault(e){var t,n;return t=this,n=e,new rf({type:"prefault",innerType:t,get defaultValue(){return"function"==typeof n?n():eE(n)}})},catch(e){var t,n;return t=this,new rh({type:"catch",innerType:t,catchValue:"function"==typeof(n=e)?n:()=>n})},pipe(e){return rg(this,e)},readonly(){var e;return e=this,new ry({type:"readonly",innerType:e})},describe(e){let t=this.clone();return t6.add(t,{description:e}),t},meta(...e){if(0===e.length)return t6.get(this);let t=this.clone();return t6.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get:()=>t6.get(e)?.description,configurable:!0}),e)),nE=$("_ZodString",(e,t)=>{te.init(e,t),nP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{n.type="string";let{minimum:a,maximum:o,format:i,patterns:l,contentEncoding:s}=e._zod.bag;if("number"==typeof a&&(n.minLength=a),"number"==typeof o&&(n.maxLength=o),i&&(n.format=nl[i]??i,""===n.format&&delete n.format,"time"===i&&delete n.format),s&&(n.contentEncoding=s),l&&l.size>0){let e=[...l];1===e.length?n.pattern=e[0].source:e.length>1&&(n.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}})(e,t,n,0);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,nN(e,"_ZodString",{regex(...e){return this.check(function(e,t){return new eV({check:"string_format",format:"regex",...eA(t),pattern:e})}(...e))},includes(...e){return this.check(function(e,t){return new eZ({check:"string_format",format:"includes",...eA(t),includes:e})}(...e))},startsWith(...e){return this.check(function(e,t){return new eG({check:"string_format",format:"starts_with",...eA(t),prefix:e})}(...e))},endsWith(...e){return this.check(function(e,t){return new eJ({check:"string_format",format:"ends_with",...eA(t),suffix:e})}(...e))},min(...e){return this.check(t7(...e))},max(...e){return this.check(t9(...e))},length(...e){return this.check(ne(...e))},nonempty(...e){return this.check(t7(1,...e))},lowercase(e){return this.check(new eq({check:"string_format",format:"lowercase",...eA(e)}))},uppercase(e){return this.check(new eW({check:"string_format",format:"uppercase",...eA(e)}))},trim(){return this.check(nt(e=>e.trim()))},normalize(...e){return this.check(function(e){return nt(t=>t.normalize(e))}(...e))},toLowerCase(){return this.check(nt(e=>e.toLowerCase()))},toUpperCase(){return this.check(nt(e=>e.toUpperCase()))},slugify(){return this.check(nt(e=>e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")))}})}),n_=$("ZodString",(e,t)=>{te.init(e,t),nE.init(e,t),e.email=t=>e.check(new nA({type:"string",format:"email",check:"string_format",abort:!1,...eA(t)})),e.url=t=>e.check(new nI({type:"string",format:"url",check:"string_format",abort:!1,...eA(t)})),e.jwt=t=>e.check(new nQ({type:"string",format:"jwt",check:"string_format",abort:!1,...eA(t)})),e.emoji=t=>e.check(new nM({type:"string",format:"emoji",check:"string_format",abort:!1,...eA(t)})),e.guid=t=>e.check(t8(nR,t)),e.uuid=t=>e.check(new nL({type:"string",format:"uuid",check:"string_format",abort:!1,...eA(t)})),e.uuidv4=t=>e.check(new nL({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...eA(t)})),e.uuidv6=t=>e.check(new nL({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...eA(t)})),e.uuidv7=t=>e.check(new nL({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...eA(t)})),e.nanoid=t=>e.check(new nD({type:"string",format:"nanoid",check:"string_format",abort:!1,...eA(t)})),e.guid=t=>e.check(t8(nR,t)),e.cuid=t=>e.check(new nF({type:"string",format:"cuid",check:"string_format",abort:!1,...eA(t)})),e.cuid2=t=>e.check(new n$({type:"string",format:"cuid2",check:"string_format",abort:!1,...eA(t)})),e.ulid=t=>e.check(new nU({type:"string",format:"ulid",check:"string_format",abort:!1,...eA(t)})),e.base64=t=>e.check(new nZ({type:"string",format:"base64",check:"string_format",abort:!1,...eA(t)})),e.base64url=t=>e.check(new nG({type:"string",format:"base64url",check:"string_format",abort:!1,...eA(t)})),e.xid=t=>e.check(new nH({type:"string",format:"xid",check:"string_format",abort:!1,...eA(t)})),e.ksuid=t=>e.check(new nB({type:"string",format:"ksuid",check:"string_format",abort:!1,...eA(t)})),e.ipv4=t=>e.check(new nK({type:"string",format:"ipv4",check:"string_format",abort:!1,...eA(t)})),e.ipv6=t=>e.check(new nV({type:"string",format:"ipv6",check:"string_format",abort:!1,...eA(t)})),e.cidrv4=t=>e.check(new nq({type:"string",format:"cidrv4",check:"string_format",abort:!1,...eA(t)})),e.cidrv6=t=>e.check(new nW({type:"string",format:"cidrv6",check:"string_format",abort:!1,...eA(t)})),e.e164=t=>e.check(new nJ({type:"string",format:"e164",check:"string_format",abort:!1,...eA(t)})),e.datetime=t=>e.check(new nc({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...eA(t)})),e.date=t=>e.check(new nu({type:"string",format:"date",check:"string_format",...eA(t)})),e.time=t=>e.check(new nd({type:"string",format:"time",check:"string_format",precision:null,...eA(t)})),e.duration=t=>e.check(new nf({type:"string",format:"duration",check:"string_format",...eA(t)}))});function nz(e){return new n_({type:"string",...eA(e)})}let nT=$("ZodStringFormat",(e,t)=>{tt.init(e,t),nE.init(e,t)}),nA=$("ZodEmail",(e,t)=>{ta.init(e,t),nT.init(e,t)}),nR=$("ZodGUID",(e,t)=>{tn.init(e,t),nT.init(e,t)}),nL=$("ZodUUID",(e,t)=>{tr.init(e,t),nT.init(e,t)}),nI=$("ZodURL",(e,t)=>{to.init(e,t),nT.init(e,t)}),nM=$("ZodEmoji",(e,t)=>{ti.init(e,t),nT.init(e,t)}),nD=$("ZodNanoID",(e,t)=>{tl.init(e,t),nT.init(e,t)}),nF=$("ZodCUID",(e,t)=>{ts.init(e,t),nT.init(e,t)}),n$=$("ZodCUID2",(e,t)=>{tc.init(e,t),nT.init(e,t)}),nU=$("ZodULID",(e,t)=>{tu.init(e,t),nT.init(e,t)}),nH=$("ZodXID",(e,t)=>{td.init(e,t),nT.init(e,t)}),nB=$("ZodKSUID",(e,t)=>{tf.init(e,t),nT.init(e,t)}),nK=$("ZodIPv4",(e,t)=>{ty.init(e,t),nT.init(e,t)}),nV=$("ZodIPv6",(e,t)=>{tv.init(e,t),nT.init(e,t)}),nq=$("ZodCIDRv4",(e,t)=>{tb.init(e,t),nT.init(e,t)}),nW=$("ZodCIDRv6",(e,t)=>{tx.init(e,t),nT.init(e,t)}),nZ=$("ZodBase64",(e,t)=>{tk.init(e,t),nT.init(e,t)}),nG=$("ZodBase64URL",(e,t)=>{tj.init(e,t),nT.init(e,t)}),nJ=$("ZodE164",(e,t)=>{tS.init(e,t),nT.init(e,t)}),nQ=$("ZodJWT",(e,t)=>{tO.init(e,t),nT.init(e,t)}),nY=$("ZodBoolean",(e,t)=>{tC.init(e,t),nP.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{t.type="boolean"}});function nX(e){return new nY({type:"boolean",...eA(e)})}let n0=$("ZodUnknown",(e,t)=>{tN.init(e,t),nP.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function n1(){return new n0({type:"unknown"})}let n2=$("ZodNever",(e,t)=>{tP.init(e,t),nP.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{t.not={}}}),n4=$("ZodArray",(e,t)=>{t_.init(e,t),nP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let a=e._zod.def,{minimum:o,maximum:i}=e._zod.bag;"number"==typeof o&&(n.minItems=o),"number"==typeof i&&(n.maxItems=i),n.type="array",n.items=nr(a.element,t,{...r,path:[...r.path,"items"]})})(e,t,n,r),e.element=t.element,nN(e,"ZodArray",{min(e,t){return this.check(t7(e,t))},nonempty(e){return this.check(t7(1,e))},max(e,t){return this.check(t9(e,t))},length(e,t){return this.check(ne(e,t))},unwrap(){return this.element}})});function n3(e,t){return new n4({type:"array",element:e,...eA(t)})}let n5=$("ZodObject",(e,t)=>{tL.init(e,t),nP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let a=e._zod.def;n.type="object",n.properties={};let o=a.shape;for(let e in o)n.properties[e]=nr(o[e],t,{...r,path:[...r.path,"properties",e]});let i=new Set([...new Set(Object.keys(o))].filter(e=>{let n=a.shape[e]._zod;return"input"===t.io?void 0===n.optin:void 0===n.optout}));i.size>0&&(n.required=Array.from(i)),a.catchall?._zod.def.type==="never"?n.additionalProperties=!1:a.catchall?a.catchall&&(n.additionalProperties=nr(a.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):"output"===t.io&&(n.additionalProperties=!1)})(e,t,n,r),ew(e,"shape",()=>t.shape),nN(e,"ZodObject",{keyof(){return rn(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:n1()})},loose(){return this.clone({...this._zod.def,catchall:n1()})},strict(){return this.clone({...this._zod.def,catchall:new n2({type:"never",...eA(void 0)})})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return function(e,t){if(!eP(t))throw Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(void 0!==Object.getOwnPropertyDescriptor(n,e))throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let r=ej(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return ek(this,"shape",n),n}});return eT(e,r)}(this,e)},safeExtend(e){var t=this;if(!eP(e))throw Error("Invalid input to safeExtend: expected a plain object");let n=ej(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e};return ek(this,"shape",n),n}});return eT(t,n)},merge(e){var t=this;if(t._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n=ej(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e._zod.def.shape};return ek(this,"shape",n),n},get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]});return eT(t,n)},pick(e){return function(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let a=ej(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return ek(this,"shape",e),e},checks:[]});return eT(e,a)}(this,e)},omit(e){return function(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let a=ej(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return ek(this,"shape",r),r},checks:[]});return eT(e,a)}(this,e)},partial(...e){return function(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let a=ej(t._zod.def,{get shape(){let r=t._zod.def.shape,a={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(a[t]=e?new e({type:"optional",innerType:r[t]}):r[t])}else for(let t in r)a[t]=e?new e({type:"optional",innerType:r[t]}):r[t];return ek(this,"shape",a),a},checks:[]});return eT(t,a)}(ri,this,e[0])},required(...e){var t,n;let r;return t=this,n=e[0],r=ej(t._zod.def,{get shape(){let e=t._zod.def.shape,r={...e};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(r[t]=new rp({type:"nonoptional",innerType:e[t]}))}else for(let t in e)r[t]=new rp({type:"nonoptional",innerType:e[t]});return ek(this,"shape",r),r}}),eT(t,r)}})});function n6(e,t){return new n5({type:"object",shape:e??{},...eA(t)})}let n8=$("ZodUnion",(e,t)=>{tM.init(e,t),nP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let a,o,i;return o=!1===(a=e._zod.def).inclusive,i=a.options.map((e,n)=>nr(e,t,{...r,path:[...r.path,o?"oneOf":"anyOf",n]})),void(o?n.oneOf=i:n.anyOf=i)},e.options=t.options}),n9=$("ZodIntersection",(e,t)=>{tD.init(e,t),nP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let a,o,i,l;return o=nr((a=e._zod.def).left,t,{...r,path:[...r.path,"allOf",0]}),i=nr(a.right,t,{...r,path:[...r.path,"allOf",1]}),void(n.allOf=[...(l=e=>"allOf"in e&&1===Object.keys(e).length)(o)?o.allOf:[o],...l(i)?i.allOf:[i]])}}),n7=$("ZodRecord",(e,t)=>{t$.init(e,t),nP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let a=e._zod.def;n.type="object";let o=a.keyType,i=o._zod.bag,l=i?.patterns;if("loose"===a.mode&&l&&l.size>0){let e=nr(a.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});for(let t of(n.patternProperties={},l))n.patternProperties[t.source]=e}else("draft-07"===t.target||"draft-2020-12"===t.target)&&(n.propertyNames=nr(a.keyType,t,{...r,path:[...r.path,"propertyNames"]})),n.additionalProperties=nr(a.valueType,t,{...r,path:[...r.path,"additionalProperties"]});let s=o._zod.values;if(s){let e=[...s].filter(e=>"string"==typeof e||"number"==typeof e);e.length>0&&(n.required=e)}})(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function re(e,t,n){return new n7(t&&t._zod?{type:"record",keyType:e,valueType:t,...eA(n)}:{type:"record",keyType:nz(),valueType:e,...eA(t)})}let rt=$("ZodEnum",(e,t)=>{tU.init(e,t),nP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let a;(a=eg(e._zod.def.entries)).every(e=>"number"==typeof e)&&(n.type="number"),a.every(e=>"string"==typeof e)&&(n.type="string"),n.enum=a},e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let a={};for(let r of e)if(n.has(r))a[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new rt({...t,checks:[],...eA(r),entries:a})},e.exclude=(e,r)=>{let a={...t.entries};for(let t of e)if(n.has(t))delete a[t];else throw Error(`Key ${t} not found in enum`);return new rt({...t,checks:[],...eA(r),entries:a})}});function rn(e,t){return new rt({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...eA(t)})}let rr=$("ZodLiteral",(e,t)=>{tH.init(e,t),nP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let a=e._zod.def,o=[];for(let e of a.values)if(void 0===e){if("throw"===t.unrepresentable)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof e)if("throw"===t.unrepresentable)throw Error("BigInt literals cannot be represented in JSON Schema");else o.push(Number(e));else o.push(e);if(0===o.length);else if(1===o.length){let e=o[0];n.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?n.enum=[e]:n.const=e}else o.every(e=>"number"==typeof e)&&(n.type="number"),o.every(e=>"string"==typeof e)&&(n.type="string"),o.every(e=>"boolean"==typeof e)&&(n.type="boolean"),o.every(e=>null===e)&&(n.type="null"),n.enum=o})(e,t,n,0),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function ra(e,t){return new rr({type:"literal",values:Array.isArray(e)?e:[e],...eA(t)})}let ro=$("ZodTransform",(e,t)=>{tB.init(e,t),nP.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Transforms cannot be represented in JSON Schema")})(0,e,0,0),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new H(e.constructor.name);n.addIssue=r=>{"string"==typeof r?n.issues.push(eF(r,n.value,t)):(r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=e),n.issues.push(eF(r)))};let a=t.transform(n.value,n);return a instanceof Promise?a.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=a,n.fallback=!0,n)}}),ri=$("ZodOptional",(e,t)=>{tV.init(e,t),nP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ns(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function rl(e){return new ri({type:"optional",innerType:e})}let rs=$("ZodExactOptional",(e,t)=>{tq.init(e,t),nP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ns(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),rc=$("ZodNullable",(e,t)=>{tW.init(e,t),nP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let a,o,i;return o=nr((a=e._zod.def).innerType,t,r),i=t.seen.get(e),void("openapi-3.0"===t.target?(i.ref=a.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}])},e.unwrap=()=>e._zod.def.innerType});function ru(e){return new rc({type:"nullable",innerType:e})}let rd=$("ZodDefault",(e,t)=>{tZ.init(e,t),nP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let a;nr((a=e._zod.def).innerType,t,r),t.seen.get(e).ref=a.innerType,n.default=JSON.parse(JSON.stringify(a.defaultValue))},e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),rf=$("ZodPrefault",(e,t)=>{tJ.init(e,t),nP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let a;nr((a=e._zod.def).innerType,t,r),t.seen.get(e).ref=a.innerType,"input"===t.io&&(n._prefault=JSON.parse(JSON.stringify(a.defaultValue)))},e.unwrap=()=>e._zod.def.innerType}),rp=$("ZodNonOptional",(e,t)=>{tQ.init(e,t),nP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let a;nr((a=e._zod.def).innerType,t,r),t.seen.get(e).ref=a.innerType},e.unwrap=()=>e._zod.def.innerType}),rh=$("ZodCatch",(e,t)=>{tX.init(e,t),nP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let a,o=e._zod.def;nr(o.innerType,t,r),t.seen.get(e).ref=o.innerType;try{a=o.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}n.default=a})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),rm=$("ZodPipe",(e,t)=>{t0.init(e,t),nP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let a,o,i;return o=(a=e._zod.def).in._zod.traits.has("$ZodTransform"),void(nr(i="input"===t.io?o?a.out:a.in:a.out,t,r),t.seen.get(e).ref=i)},e.in=t.in,e.out=t.out});function rg(e,t){return new rm({type:"pipe",in:e,out:t})}let ry=$("ZodReadonly",(e,t)=>{t2.init(e,t),nP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let a;nr((a=e._zod.def).innerType,t,r),t.seen.get(e).ref=a.innerType,n.readOnly=!0},e.unwrap=()=>e._zod.def.innerType}),rv=$("ZodCustom",(e,t)=>{t3.init(e,t),nP.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Custom types cannot be represented in JSON Schema")})(0,e,0,0)});var rb=nz().trim().min(1,"名称不能为空").max(120,"名称不能超过 ".concat(120," 个字符")).refine(function(e){return!e.includes("/")&&!e.includes("\\")},"名称不能包含斜杠"),rx=function(e){return nz().max(e)},rw=nz().min(1).max(120),rk=rn(D),rj=re(rw,rx(4096)),rS=re(rw,rx(1048576)),rO=rn(["skip","overwrite"]);n6({password:rx(4096)}),n6({name:rb,baseUrl:rx(2048).optional(),apiKey:rx(4096).optional(),model:rx(120).optional(),notes:rx(4096).optional(),extras:rj.optional(),overrides:rS.optional(),providerId:rx(120).optional(),providerEndpoint:rx(120).optional()}).partial();var rC=n3(n6({key:nz().trim().min(1,"endpoint key 不能为空").max(60,"endpoint key 过长").refine(function(e){return!e.includes("/")&&!e.includes("\\")},"endpoint key 不能包含斜杠"),label:rx(120).optional(),baseUrl:nz().trim().min(1,"endpoint 需要 baseUrl").max(2048)})).max(50).refine(function(e){return new Set(e.map(function(e){return e.key})).size===e.length},"endpoint key 不能重复");n6({name:rb,apiKey:nz().min(1,"apiKey 不能为空").max(4096),endpoints:rC.optional(),notes:rx(4096).optional()}),n6({name:rb.optional(),apiKey:rx(4096).optional(),endpoints:rC.optional(),notes:rx(4096).optional()}),n6({sourceUser:nz().trim().min(1,"来源用户不能为空").max(120),conflictPolicy:rO.optional(),overwriteHarnesses:n3(rk).optional(),migrateCodexLoginCache:nX().optional()});var rN=n6({format:ra("harness-switch-encrypted-export"),version:ra(1),kdf:n6({name:ra("scrypt"),salt:nz().min(1)}),cipher:n6({name:ra("aes-256-gcm"),iv:nz().min(1),tag:nz().min(1),data:nz().min(1)})});n6({passphrase:rx(4096),includeCodexLoginCache:nX().optional()}),n6({envelope:rN,passphrase:rx(4096),conflictPolicy:rO.optional(),restoreActive:nX().optional(),migrateCodexLoginCache:nX().optional()});var rP=n6({id:nz().min(1).max(240),name:rb,target:rn(["profile","vault"]),apiKey:rx(4096).optional(),providerId:rx(120).optional(),providerName:rb.optional(),overwrite:nX().optional()});n6({selections:n3(rP).min(1,"请至少选择一条配置").max(200)}),n6({baseUrl:nz().trim().min(1,"baseUrl 不能为空").max(2048),apiKey:rx(4096).optional(),providerId:rx(120).optional()}),n6({endpoint:rx(120).optional()}),n6({clientId:rx(100).optional()}),n6({deviceCode:nz().min(1).max(200),clientId:rx(100).optional()}),n6({token:nz().trim().min(1,"Token 不能为空").max(500)}),n6({passphrase:rx(4096),includeCodexLoginCache:nX().optional()}),n6({passphrase:rx(4096),conflictPolicy:rO.optional(),restoreActive:nX().optional()}),n6({passphrase:rx(4096),conflictPolicy:rO.optional(),restoreActive:nX().optional(),migrateCodexLoginCache:nX().optional()}),n6({});let rE=O("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);function r_(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=function e(t){var n,r,a="";if("string"==typeof t||"number"==typeof t)a+=t;else if("object"==typeof t)if(Array.isArray(t)){var o=t.length;for(n=0;n<o;n++)t[n]&&(r=e(t[n]))&&(a&&(a+=" "),a+=r)}else for(r in t)t[r]&&(a&&(a+=" "),a+=r);return a}(e))&&(r&&(r+=" "),r+=t);return r}let rz=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,rT=(e,t)=>n=>{var r;if((null==t?void 0:t.variants)==null)return r_(e,null==n?void 0:n.class,null==n?void 0:n.className);let{variants:a,defaultVariants:o}=t,i=Object.keys(a).map(e=>{let t=null==n?void 0:n[e],r=null==o?void 0:o[e];if(null===t)return null;let i=rz(t)||rz(r);return a[e][i]}),l=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{});return r_(e,i,null==t||null==(r=t.compoundVariants)?void 0:r.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...o,...l}[t]):({...o,...l})[t]===n})?[...e,n,r]:e},[]),null==n?void 0:n.class,null==n?void 0:n.className)},rA=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),rR=[],rL=(e,t,n)=>{if(0==e.length-t)return n.classGroupId;let r=e[t],a=n.nextPart.get(r);if(a){let n=rL(e,t+1,a);if(n)return n}let o=n.validators;if(null===o)return;let i=0===t?e.join("-"):e.slice(t).join("-"),l=o.length;for(let e=0;e<l;e++){let t=o[e];if(t.validator(i))return t.classGroupId}},rI=(e,t)=>{let n=rA();for(let r in e)rM(e[r],n,r,t);return n},rM=(e,t,n,r)=>{let a=e.length;for(let o=0;o<a;o++)rD(e[o],t,n,r)},rD=(e,t,n,r)=>{"string"==typeof e?rF(e,t,n):"function"==typeof e?r$(e,t,n,r):rU(e,t,n,r)},rF=(e,t,n)=>{(""===e?t:rH(t,e)).classGroupId=n},r$=(e,t,n,r)=>{rB(e)?rM(e(r),t,n,r):(null===t.validators&&(t.validators=[]),t.validators.push({classGroupId:n,validator:e}))},rU=(e,t,n,r)=>{let a=Object.entries(e),o=a.length;for(let e=0;e<o;e++){let[o,i]=a[e];rM(i,rH(t,o),n,r)}},rH=(e,t)=>{let n=e,r=t.split("-"),a=r.length;for(let e=0;e<a;e++){let t=r[e],a=n.nextPart.get(t);a||(a=rA(),n.nextPart.set(t,a)),n=a}return n},rB=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,rK=[],rV=(e,t,n,r,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:a}),rq=/\s+/,rW=e=>{let t;if("string"==typeof e)return e;let n="";for(let r=0;r<e.length;r++)e[r]&&(t=rW(e[r]))&&(n&&(n+=" "),n+=t);return n},rZ=[],rG=e=>{let t=t=>t[e]||rZ;return t.isThemeGetter=!0,t},rJ=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,rQ=/^\((?:(\w[\w-]*):)?(.+)\)$/i,rY=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,rX=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,r0=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,r1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,r2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,r4=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,r3=e=>rY.test(e),r5=e=>!!e&&!Number.isNaN(Number(e)),r6=e=>!!e&&Number.isInteger(Number(e)),r8=e=>e.endsWith("%")&&r5(e.slice(0,-1)),r9=e=>rX.test(e),r7=()=>!0,ae=e=>r0.test(e)&&!r1.test(e),at=()=>!1,an=e=>r2.test(e),ar=e=>r4.test(e),aa=e=>!al(e)&&!am(e),ao=e=>e.startsWith("@container")&&("/"===e[10]&&void 0!==e[11]||"s"===e[11]&&void 0!==e[16]&&e.startsWith("-size/",10)||"n"===e[11]&&void 0!==e[18]&&e.startsWith("-normal/",10)),ai=e=>aj(e,aN,at),al=e=>rJ.test(e),as=e=>aj(e,aP,ae),ac=e=>aj(e,aE,r5),au=e=>aj(e,az,r7),ad=e=>aj(e,a_,at),af=e=>aj(e,aO,at),ap=e=>aj(e,aC,ar),ah=e=>aj(e,aT,an),am=e=>rQ.test(e),ag=e=>aS(e,aP),ay=e=>aS(e,a_),av=e=>aS(e,aO),ab=e=>aS(e,aN),ax=e=>aS(e,aC),aw=e=>aS(e,aT,!0),ak=e=>aS(e,az,!0),aj=(e,t,n)=>{let r=rJ.exec(e);return!!r&&(r[1]?t(r[1]):n(r[2]))},aS=(e,t,n=!1)=>{let r=rQ.exec(e);return!!r&&(r[1]?t(r[1]):n)},aO=e=>"position"===e||"percentage"===e,aC=e=>"image"===e||"url"===e,aN=e=>"length"===e||"size"===e||"bg-size"===e,aP=e=>"length"===e,aE=e=>"number"===e,a_=e=>"family-name"===e,az=e=>"number"===e||"weight"===e,aT=e=>"shadow"===e,aA=((e,...t)=>{let n,r,a,o,i=e=>{let t=r(e);if(t)return t;let o=((e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:o,postfixLookupClassGroupIds:i}=t,l=[],s=e.trim().split(rq),c="";for(let e=s.length-1;e>=0;e-=1){let t,u=s[e],{isExternal:d,modifiers:f,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:m}=n(u);if(d){c=u+(c.length>0?" "+c:c);continue}let g=!!m;if(g){let e=(t=r(h.substring(0,m)))&&i[t]?r(h):void 0;e&&e!==t&&(t=e,g=!1)}else t=r(h);if(!t){if(!g||!(t=r(h))){c=u+(c.length>0?" "+c:c);continue}g=!1}let y=0===f.length?"":1===f.length?f[0]:o(f).join(":"),v=p?y+"!":y,b=v+t;if(l.indexOf(b)>-1)continue;l.push(b);let x=a(t,g);for(let e=0;e<x.length;++e){let t=x[e];l.push(v+t)}c=u+(c.length>0?" "+c:c)}return c})(e,n);return a(e,o),o};return o=l=>{var s;let c;return r=(n={cache:(e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),a=(a,o)=>{n[a]=o,++t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];return void 0!==t?t:void 0!==(t=r[e])?(a(e,t),t):void 0},set(e,t){e in n?n[e]=t:a(e,t)}}})((s=t.reduce((e,t)=>t(e),e())).cacheSize),parseClassName:(e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t,n=[],r=0,a=0,o=0,i=e.length;for(let l=0;l<i;l++){let i=e[l];if(0===r&&0===a){if(":"===i){n.push(e.slice(o,l)),o=l+1;continue}if("/"===i){t=l;continue}}"["===i?r++:"]"===i?r--:"("===i?a++:")"===i&&a--}let l=0===n.length?e:e.slice(o),s=l,c=!1;return l.endsWith("!")?(s=l.slice(0,-1),c=!0):l.startsWith("!")&&(s=l.slice(1),c=!0),rV(n,c,s,t&&t>o?t-o:void 0)};if(t){let e=t+":",n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):rV(rK,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r})(s),sortModifiers:(c=new Map,s.orderSensitiveModifiers.forEach((e,t)=>{c.set(e,1e6+t)}),e=>{let t=[],n=[];for(let r=0;r<e.length;r++){let a=e[r],o="["===a[0],i=c.has(a);o||i?(n.length>0&&(n.sort(),t.push(...n),n=[]),t.push(a)):n.push(a)}return n.length>0&&(n.sort(),t.push(...n)),t}),postfixLookupClassGroupIds:(e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t})(s),...(e=>{let t=(e=>{let{theme:t,classGroups:n}=e;return rI(n,t)})(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]")){var n;let t,r,a;return -1===(n=e).slice(1,-1).indexOf(":")?void 0:(r=(t=n.slice(1,-1)).indexOf(":"),(a=t.slice(0,r))?"arbitrary.."+a:void 0)}let r=e.split("-"),a=+(""===r[0]&&r.length>1);return rL(r,a,t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],a=n[e];if(t){if(a){let e=Array(a.length+t.length);for(let t=0;t<a.length;t++)e[t]=a[t];for(let n=0;n<t.length;n++)e[a.length+n]=t[n];return e}return t}return a||rR}return n[e]||rR}}})(s)}).cache.get,a=n.cache.set,o=i,i(l)},(...e)=>o(((...e)=>{let t,n,r=0,a="";for(;r<e.length;)(t=e[r++])&&(n=rW(t))&&(a&&(a+=" "),a+=n);return a})(...e))})(()=>{let e=rG("color"),t=rG("font"),n=rG("text"),r=rG("font-weight"),a=rG("tracking"),o=rG("leading"),i=rG("breakpoint"),l=rG("container"),s=rG("spacing"),c=rG("radius"),u=rG("shadow"),d=rG("inset-shadow"),f=rG("text-shadow"),p=rG("drop-shadow"),h=rG("blur"),m=rG("perspective"),g=rG("aspect"),y=rG("ease"),v=rG("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],x=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[...x(),am,al],k=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto","contain","none"],S=()=>[am,al,s],O=()=>[r3,"full","auto",...S()],C=()=>[r6,"none","subgrid",am,al],N=()=>["auto",{span:["full",r6,am,al]},r6,am,al],P=()=>[r6,"auto",am,al],E=()=>["auto","min","max","fr",am,al],_=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],z=()=>["start","end","center","stretch","center-safe","end-safe"],T=()=>["auto",...S()],A=()=>[r3,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],R=()=>[r3,"screen","full","dvw","lvw","svw","min","max","fit",...S()],L=()=>[r3,"screen","full","lh","dvh","lvh","svh","min","max","fit",...S()],I=()=>[e,am,al],M=()=>[...x(),av,af,{position:[am,al]}],D=()=>["no-repeat",{repeat:["","x","y","space","round"]}],F=()=>["auto","cover","contain",ab,ai,{size:[am,al]}],$=()=>[r8,ag,as],U=()=>["","none","full",c,am,al],H=()=>["",r5,ag,as],B=()=>["solid","dashed","dotted","double"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],V=()=>[r5,r8,av,af],q=()=>["","none",h,am,al],W=()=>["none",r5,am,al],Z=()=>["none",r5,am,al],G=()=>[r5,am,al],J=()=>[r3,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[r9],breakpoint:[r9],color:[r7],container:[r9],"drop-shadow":[r9],ease:["in","out","in-out"],font:[aa],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[r9],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[r9],shadow:[r9],spacing:["px",r5],text:[r9],"text-shadow":[r9],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",r3,al,am,g]}],container:["container"],"container-type":[{"@container":["","normal","size",am,al]}],"container-named":[ao],columns:[{columns:[r5,al,am,l]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:w()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:O()}],"inset-x":[{"inset-x":O()}],"inset-y":[{"inset-y":O()}],start:[{"inset-s":O(),start:O()}],end:[{"inset-e":O(),end:O()}],"inset-bs":[{"inset-bs":O()}],"inset-be":[{"inset-be":O()}],top:[{top:O()}],right:[{right:O()}],bottom:[{bottom:O()}],left:[{left:O()}],visibility:["visible","invisible","collapse"],z:[{z:[r6,"auto",am,al]}],basis:[{basis:[r3,"full","auto",l,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[r5,r3,"auto","initial","none",al]}],grow:[{grow:["",r5,am,al]}],shrink:[{shrink:["",r5,am,al]}],order:[{order:[r6,"first","last","none",am,al]}],"grid-cols":[{"grid-cols":C()}],"col-start-end":[{col:N()}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":C()}],"row-start-end":[{row:N()}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":E()}],"auto-rows":[{"auto-rows":E()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[..._(),"normal"]}],"justify-items":[{"justify-items":[...z(),"normal"]}],"justify-self":[{"justify-self":["auto",...z()]}],"align-content":[{content:["normal",..._()]}],"align-items":[{items:[...z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...z(),{baseline:["","last"]}]}],"place-content":[{"place-content":_()}],"place-items":[{"place-items":[...z(),"baseline"]}],"place-self":[{"place-self":["auto",...z()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pbs:[{pbs:S()}],pbe:[{pbe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:T()}],mx:[{mx:T()}],my:[{my:T()}],ms:[{ms:T()}],me:[{me:T()}],mbs:[{mbs:T()}],mbe:[{mbe:T()}],mt:[{mt:T()}],mr:[{mr:T()}],mb:[{mb:T()}],ml:[{ml:T()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:A()}],"inline-size":[{inline:["auto",...R()]}],"min-inline-size":[{"min-inline":["auto",...R()]}],"max-inline-size":[{"max-inline":["none",...R()]}],"block-size":[{block:["auto",...L()]}],"min-block-size":[{"min-block":["auto",...L()]}],"max-block-size":[{"max-block":["none",...L()]}],w:[{w:[l,"screen",...A()]}],"min-w":[{"min-w":[l,"screen","none",...A()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[i]},...A()]}],h:[{h:["screen","lh",...A()]}],"min-h":[{"min-h":["screen","lh","none",...A()]}],"max-h":[{"max-h":["screen","lh",...A()]}],"font-size":[{text:["base",n,ag,as]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ak,au]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",r8,al]}],"font-family":[{font:[ay,ad,t]}],"font-features":[{"font-features":[al]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,am,al]}],"line-clamp":[{"line-clamp":[r5,"none",am,ac]}],leading:[{leading:[o,...S()]}],"list-image":[{"list-image":["none",am,al]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",am,al]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:[r5,"from-font","auto",am,as]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[r5,"auto",am,al]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"tab-size":[{tab:[r6,am,al]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",am,al]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",am,al]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:D()}],"bg-size":[{bg:F()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},r6,am,al],radial:["",am,al],conic:[r6,am,al]},ax,ap]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:$()}],"gradient-via-pos":[{via:$()}],"gradient-to-pos":[{to:$()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:U()}],"rounded-s":[{"rounded-s":U()}],"rounded-e":[{"rounded-e":U()}],"rounded-t":[{"rounded-t":U()}],"rounded-r":[{"rounded-r":U()}],"rounded-b":[{"rounded-b":U()}],"rounded-l":[{"rounded-l":U()}],"rounded-ss":[{"rounded-ss":U()}],"rounded-se":[{"rounded-se":U()}],"rounded-ee":[{"rounded-ee":U()}],"rounded-es":[{"rounded-es":U()}],"rounded-tl":[{"rounded-tl":U()}],"rounded-tr":[{"rounded-tr":U()}],"rounded-br":[{"rounded-br":U()}],"rounded-bl":[{"rounded-bl":U()}],"border-w":[{border:H()}],"border-w-x":[{"border-x":H()}],"border-w-y":[{"border-y":H()}],"border-w-s":[{"border-s":H()}],"border-w-e":[{"border-e":H()}],"border-w-bs":[{"border-bs":H()}],"border-w-be":[{"border-be":H()}],"border-w-t":[{"border-t":H()}],"border-w-r":[{"border-r":H()}],"border-w-b":[{"border-b":H()}],"border-w-l":[{"border-l":H()}],"divide-x":[{"divide-x":H()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":H()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...B(),"hidden","none"]}],"divide-style":[{divide:[...B(),"hidden","none"]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...B(),"none","hidden"]}],"outline-offset":[{"outline-offset":[r5,am,al]}],"outline-w":[{outline:["",r5,ag,as]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","none",u,aw,ah]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",d,aw,ah]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[r5,as]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",f,aw,ah]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[r5,am,al]}],"mix-blend":[{"mix-blend":[...K(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":K()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[r5]}],"mask-image-linear-from-pos":[{"mask-linear-from":V()}],"mask-image-linear-to-pos":[{"mask-linear-to":V()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":V()}],"mask-image-t-to-pos":[{"mask-t-to":V()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":V()}],"mask-image-r-to-pos":[{"mask-r-to":V()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":V()}],"mask-image-b-to-pos":[{"mask-b-to":V()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":V()}],"mask-image-l-to-pos":[{"mask-l-to":V()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":V()}],"mask-image-x-to-pos":[{"mask-x-to":V()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":V()}],"mask-image-y-to-pos":[{"mask-y-to":V()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[am,al]}],"mask-image-radial-from-pos":[{"mask-radial-from":V()}],"mask-image-radial-to-pos":[{"mask-radial-to":V()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":x()}],"mask-image-conic-pos":[{"mask-conic":[r5]}],"mask-image-conic-from-pos":[{"mask-conic-from":V()}],"mask-image-conic-to-pos":[{"mask-conic-to":V()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:D()}],"mask-size":[{mask:F()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",am,al]}],filter:[{filter:["","none",am,al]}],blur:[{blur:q()}],brightness:[{brightness:[r5,am,al]}],contrast:[{contrast:[r5,am,al]}],"drop-shadow":[{"drop-shadow":["","none",p,aw,ah]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",r5,am,al]}],"hue-rotate":[{"hue-rotate":[r5,am,al]}],invert:[{invert:["",r5,am,al]}],saturate:[{saturate:[r5,am,al]}],sepia:[{sepia:["",r5,am,al]}],"backdrop-filter":[{"backdrop-filter":["","none",am,al]}],"backdrop-blur":[{"backdrop-blur":q()}],"backdrop-brightness":[{"backdrop-brightness":[r5,am,al]}],"backdrop-contrast":[{"backdrop-contrast":[r5,am,al]}],"backdrop-grayscale":[{"backdrop-grayscale":["",r5,am,al]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[r5,am,al]}],"backdrop-invert":[{"backdrop-invert":["",r5,am,al]}],"backdrop-opacity":[{"backdrop-opacity":[r5,am,al]}],"backdrop-saturate":[{"backdrop-saturate":[r5,am,al]}],"backdrop-sepia":[{"backdrop-sepia":["",r5,am,al]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",am,al]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[r5,"initial",am,al]}],ease:[{ease:["linear","initial",y,am,al]}],delay:[{delay:[r5,am,al]}],animate:[{animate:["none",v,am,al]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,am,al]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:W()}],"rotate-x":[{"rotate-x":W()}],"rotate-y":[{"rotate-y":W()}],"rotate-z":[{"rotate-z":W()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:G()}],"skew-x":[{"skew-x":G()}],"skew-y":[{"skew-y":G()}],transform:[{transform:[am,al,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:J()}],"translate-x":[{"translate-x":J()}],"translate-y":[{"translate-y":J()}],"translate-z":[{"translate-z":J()}],"translate-none":["translate-none"],zoom:[{zoom:[r6,am,al]}],accent:[{accent:I()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",am,al]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":I()}],"scrollbar-track-color":[{"scrollbar-track":I()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mbs":[{"scroll-mbs":S()}],"scroll-mbe":[{"scroll-mbe":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pbs":[{"scroll-pbs":S()}],"scroll-pbe":[{"scroll-pbe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",am,al]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[r5,ag,as,ac]}],stroke:[{stroke:["none",...I()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function aR(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return aA(r_(t))}var aL=rT("inline-flex items-center rounded-full border px-2.5 py-1 text-[11px] font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function aI(e){var t=e.className,n=e.variant,r=function(e,t){if(null==e)return{};var n,r,a,o={};if("u">typeof Reflect&&Reflect.ownKeys){for(a=0,n=Reflect.ownKeys(Object(e));a<n.length;a++)r=n[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}if(o=function(e,t){if(null==e)return{};var n,r,a={},o=Object.getOwnPropertyNames(e);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n]);return a}(e,t),Object.getOwnPropertySymbols)for(a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)r=n[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}(e,["className","variant"]);return(0,g.jsx)("div",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({"data-slot":"badge",className:aR(aL({variant:n}),t)},r))}function aM(e,t,n,r,a,o,i){try{var l=e[o](i),s=l.value}catch(e){n(e);return}l.done?t(s):Promise.resolve(s).then(r,a)}function aD(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function aF(e){return(aF=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a$(e,t){return(a$=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function aU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(aU=function(){return!!e})()}var aH=(0,y.lazy)(function(){var e;return(e=function(){return function(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(i,"next",{value:s(0)}),l(i,"throw",{value:s(1)}),l(i,"return",{value:s(2)}),"function"==typeof Symbol&&l(i,Symbol.iterator,{value:function(){return this}}),i;function s(l){return function(s){var c=[l,s];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&c[0]?r.return:c[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;switch(r=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]<a[3])){o.label=c[1];break}if(6===c[0]&&o.label<a[1]){o.label=a[1],a=c;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(c);break}a[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(e){switch(e.label){case 0:return[4,Promise.all([d.e("6150"),d.e("4952")]).then(d.bind(d,1419))];case 1:return[2,{default:e.sent().PierreFileDiff}]}})},function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function i(e){aM(o,r,a,i,l,"next",e)}function l(e){aM(o,r,a,i,l,"throw",e)}i(void 0)})})()});function aB(e){return null===e.content&&null===e.currentContent?"same":null===e.content?"delete":null===e.currentContent?"create":e.content===e.currentContent?"same":"replace"}function aK(e){var t=e.files;return(0,g.jsx)("div",{className:"space-y-3",children:t.map(function(e){return(0,g.jsx)(aV,{file:e},e.path)})})}function aV(e){var t=e.file,n=(0,x.Bd)().t,r=aB(t);return(0,g.jsxs)("div",{className:"overflow-hidden rounded-xl border",children:[(0,g.jsxs)("div",{className:"flex items-center justify-between gap-2 border-b bg-muted/40 px-3 py-2",children:[(0,g.jsx)("p",{className:"min-w-0 truncate font-mono text-xs",title:t.path,children:t.path}),(0,g.jsx)(aI,{variant:"secondary",children:n("diff.".concat(r))})]}),(0,g.jsx)(aW,{fallback:(0,g.jsx)(aq,{file:t}),children:(0,g.jsx)(y.Suspense,{fallback:(0,g.jsx)("p",{className:"px-3 py-4 text-sm text-muted-foreground",children:n("diff.rendering")}),children:(0,g.jsx)(aH,{file:t})})})]})}function aq(e){var t,n,r=e.file,a=(0,x.Bd)().t;return(0,g.jsxs)("div",{className:"grid gap-2 p-3 font-mono text-xs",children:[(0,g.jsx)("pre",{className:"whitespace-pre-wrap text-red-400/90",children:null!=(t=r.currentContent)?t:a("diff.absent")}),(0,g.jsx)("p",{className:"font-sans text-muted-foreground",children:a("diff.afterRestore")}),(0,g.jsx)("pre",{className:"whitespace-pre-wrap text-emerald-400/90",children:null!=(n=r.content)?n:a("diff.deletedAfterRestore")})]})}var aW=function(e){var t,n;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function r(){var e,t,n,a,o;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");return t=r,n=arguments,t=aF(t),e=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,aU()?Reflect.construct(t,n||[],aF(this).constructor):t.apply(this,n)),o={failed:!1},(a="state")in e?Object.defineProperty(e,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[a]=o,e}return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&a$(r,e),n=[{key:"getDerivedStateFromError",value:function(){return{failed:!0}}}],t=[{key:"render",value:function(){return this.state.failed?this.props.fallback:this.props.children}}],aD(r.prototype,t),n&&aD(r,n),r}(y.Component),aZ=Object.defineProperty,aG=(e,t)=>aZ(e,"name",{value:t,configurable:!0});function aJ(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function aQ(...e){return t=>{let n=!1,r=e.map(e=>{let r=aJ(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];"function"==typeof n?n():aJ(e[t],null)}}}}function aY(...e){return y.useCallback(aQ(...e),e)}aG(aJ,"setRef"),aG(aQ,"composeRefs"),aG(aY,"useComposedRefs");var aX=Object.defineProperty,a0=(e,t)=>aX(e,"name",{value:t,configurable:!0});function a1(e){let t=y.forwardRef((t,n)=>{let{children:r,...a}=t,o=null,i=!1,l=[];a7(r)&&"function"==typeof or&&(r=or(r._payload)),y.Children.forEach(r,e=>{if(a8(e)){i=!0;let t="child"in e.props?e.props.child:e.props.children;a7(t)&&"function"==typeof or&&(t=or(t._payload)),o=a3(e,t),l.push(o?.props?.children)}else l.push(e)}),o?o=y.cloneElement(o,void 0,l):!i&&1===y.Children.count(r)&&y.isValidElement(r)&&(o=r);let s=o?a6(o):void 0,c=aY(n,s);if(!o){if(r||0===r)throw Error(i?on(e):ot(e));return r}let u=a5(a,o.props??{});return o.type!==y.Fragment&&(u.ref=n?c:s),y.cloneElement(o,u)});return t.displayName=`${e}.Slot`,t}a0(a1,"createSlot");var a2=a1("Slot"),a4=Symbol.for("radix.slottable");a0(function(e){let t=a0(e=>"child"in e?e.children(e.child):e.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=a4,t},"createSlottable");var a3=a0((e,t)=>{if("child"in e.props){let t=e.props.child;return y.isValidElement(t)?y.cloneElement(t,void 0,e.props.children(t.props.children)):null}return y.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function a5(e,t){let n={...t};for(let r in t){let a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...e)=>{let t=o(...e);return a(...e),t}:a&&(n[r]=a):"style"===r?n[r]={...a,...o}:"className"===r&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function a6(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(n=(t=Object.getOwnPropertyDescriptor(e,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning)?e.props.ref:e.props.ref||e.ref}function a8(e){return y.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===a4}a0(a5,"mergeProps"),a0(a6,"getElementRef"),a0(a8,"isSlottable");var a9=Symbol.for("react.lazy");function a7(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===a9&&"_payload"in e&&oe(e._payload)}function oe(e){return"object"==typeof e&&null!==e&&"then"in e}a0(a7,"isLazyComponent"),a0(oe,"isPromiseLike");var ot=a0(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),on=a0(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),or=v[" use ".trim().toString()],oa=rT("inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-[10px] text-sm font-medium transition-[color,background-color,border-color,box-shadow,transform] duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/35 focus-visible:ring-offset-2 focus-visible:ring-offset-background active:translate-y-px disabled:pointer-events-none disabled:opacity-50 disabled:active:translate-y-0 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-[0_8px_20px_-10px_color-mix(in_srgb,var(--primary)_65%,transparent)] hover:bg-primary/90 hover:shadow-[0_10px_24px_-10px_color-mix(in_srgb,var(--primary)_80%,transparent)]",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/88",outline:"border border-input bg-card shadow-[0_1px_2px_rgb(20_24_40/0.04)] hover:border-ring/35 hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent/75 hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 px-3 text-xs",lg:"h-11 px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}});function oo(e){var t=e.className,n=e.variant,r=e.size,a=e.asChild,o=function(e,t){if(null==e)return{};var n,r,a,o={};if("u">typeof Reflect&&Reflect.ownKeys){for(a=0,n=Reflect.ownKeys(Object(e));a<n.length;a++)r=n[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}if(o=function(e,t){if(null==e)return{};var n,r,a={},o=Object.getOwnPropertyNames(e);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n]);return a}(e,t),Object.getOwnPropertySymbols)for(a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)r=n[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}(e,["className","variant","size","asChild"]);return(0,g.jsx)(void 0!==a&&a?a2:"button",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({"data-slot":"button",className:aR(oa({variant:n,size:r,className:t}))},o))}var oi=Object.defineProperty,ol=(e,t)=>oi(e,"name",{value:t,configurable:!0}),os=!!("u">typeof window&&window.document&&window.document.createElement);function oc(e,t,{checkForDefaultPrevented:n=!0}={}){return ol(function(r){if(e?.(r),!1===n||!r||!r.defaultPrevented)return t?.(r)},"handleEvent")}function ou(e){if(!os)throw Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}function od(e){return"IFRAME"===e.tagName}ol(oc,"composeEventHandlers"),ol(function(e){if(!os)throw Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window},"getOwnerWindow"),ol(ou,"getOwnerDocument"),ol(function e(t,n=!1){let{activeElement:r}=ou(t);if(!r?.nodeName)return null;if(od(r)&&r.contentDocument)return e(r.contentDocument.body,n);if(n){let e=r.getAttribute("aria-activedescendant");if(e){let t=ou(r).getElementById(e);if(t)return t}}return r},"getActiveElement"),ol(od,"isFrame");var of=Object.defineProperty,op=(e,t)=>of(e,"name",{value:t,configurable:!0});function oh(e,t=[]){let n=[];function r(t,r){let a=y.createContext(r);a.displayName=t+"Context";let o=n.length;n=[...n,r];let i=op(t=>{let{scope:n,children:r,...i}=t,l=n?.[e]?.[o]||a,s=y.useMemo(()=>i,Object.values(i));return(0,g.jsx)(l.Provider,{value:s,children:r})},"Provider");function l(n,i,s={}){let{optional:c=!1}=s,u=i?.[e]?.[o]||a,d=y.useContext(u);if(d)return d;if(void 0!==r)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return i.displayName=t+"Provider",op(l,"useContext"),[i,l]}op(r,"createContext");let a=op(()=>{let t=n.map(e=>y.createContext(e));return op(function(n){let r=n?.[e]||t;return y.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},"useScope")},"createScope");return a.scopeName=e,[r,om(a,...t)]}function om(...e){let t=e[0];if(1===e.length)return t;let n=op(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return op(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let a=n(e)[`__scope${r}`];return{...t,...a}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}op(function(e,t){let n=y.createContext(t);n.displayName=e+"Context";let r=op(e=>{let{children:t,...r}=e,a=y.useMemo(()=>r,Object.values(r));return(0,g.jsx)(n.Provider,{value:a,children:t})},"Provider");function a(r,o={}){let{optional:i=!1}=o,l=y.useContext(n);if(l)return l;if(void 0!==t)return t;if(!i)throw Error(`\`${r}\` must be used within \`${e}\``)}return r.displayName=e+"Provider",op(a,"useContext"),[r,a]},"createContext"),op(oh,"createContextScope"),op(om,"composeContextScopes");var og=globalThis?.document?y.useLayoutEffect:()=>{},oy=Object.defineProperty,ov=v[" useId ".trim().toString()]||(()=>void 0),ob=0;function ox(e){let[t,n]=y.useState(ov());return og(()=>{e||n(e=>e??String(ob++))},[e]),e||(t?`radix-${t}`:"")}oy(ox,"name",{value:"useId",configurable:!0});var ow=Object.defineProperty,ok=v[" useEffectEvent ".trim().toString()],oj=v[" useInsertionEffect ".trim().toString()];function oS(e){if("function"==typeof ok)return ok(e);let t=y.useRef(()=>{throw Error("Cannot call an event handler while rendering.")});return"function"==typeof oj?oj(()=>{t.current=e}):og(()=>{t.current=e}),y.useMemo(()=>(...e)=>t.current?.(...e),[])}ow(oS,"name",{value:"useEffectEvent",configurable:!0});var oO=Object.defineProperty,oC=(e,t)=>oO(e,"name",{value:t,configurable:!0}),oN=v[" useInsertionEffect ".trim().toString()]||og;function oP({prop:e,defaultProp:t,onChange:n=oC(()=>{},"onChange"),caller:r}){let[a,o,i]=oE({defaultProp:t,onChange:n}),l=void 0!==e,s=l?e:a;return[s,y.useCallback(t=>{if(l){let n=o_(t)?t(e):t;n!==e&&i.current?.(n)}else o(t)},[l,e,o,i])]}function oE({defaultProp:e,onChange:t}){let[n,r]=y.useState(e),a=y.useRef(n),o=y.useRef(t);return oN(()=>{o.current=t},[t]),y.useEffect(()=>{a.current!==n&&(o.current?.(n),a.current=n)},[n,a]),[n,r,o]}function o_(e){return"function"==typeof e}oC(oP,"useControllableState"),oC(oE,"useUncontrolledState"),oC(o_,"isFunction");var oz=Symbol("RADIX:SYNC_STATE");oC(function(e,t,n,r){let{prop:a,defaultProp:o,onChange:i,caller:l}=t,s=void 0!==a,c=oS(i),u=[{...n,state:o}];r&&u.push(r);let[d,f]=y.useReducer((t,n)=>{if(n.type===oz)return{...t,state:n.state};let r=e(t,n);return s&&!Object.is(r.state,t.state)&&c(r.state),r},...u),p=d.state,h=y.useRef(p);y.useEffect(()=>{h.current!==p&&(h.current=p,s||c(p))},[p,h,s]);let m=y.useMemo(()=>void 0!==a?{...d,state:a}:d,[d,a]);return y.useEffect(()=>{s&&!Object.is(a,d.state)&&f({type:oz,state:a})},[a,d.state,s]),[m,f]},"useControllableStateReducer");var oT=d(3144),oA=Object.defineProperty,oR=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=a1(`Primitive.${t}`),r=y.forwardRef((e,r)=>{let{asChild:a,...o}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,g.jsx)(a?n:t,{...o,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function oL(e,t){e&&oT.flushSync(()=>e.dispatchEvent(t))}function oI(e){let t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...e)=>t.current?.(...e),[])}oA(oL,"name",{value:"dispatchDiscreteCustomEvent",configurable:!0}),(0,Object.defineProperty)(oI,"name",{value:"useCallbackRef",configurable:!0});var oM=Object.defineProperty,oD=(e,t)=>oM(e,"name",{value:t,configurable:!0}),oF="dismissableLayer.update",o$=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),oU=y.forwardRef(oD(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:l,onDismiss:s,...c}=e,u=y.useContext(o$),[d,f]=y.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=y.useState({}),v=aY(t,f),b=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=x?b.indexOf(x):-1,k=d?b.indexOf(d):-1,j=u.layersWithOutsidePointerEventsDisabled.size>0,S=k>=w,O=y.useRef(!1),C=oK(e=>{o?.(e),l?.(e),e.defaultPrevented||s?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:O,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:y.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return S&&!t},[u.branches,S])}),N=oV(e=>{if(r&&O.current)return;let t=e.target;![...u.branches].some(e=>e.contains(t))&&(i?.(e),l?.(e),e.defaultPrevented||s?.())},p),P=!!d&&k===b.length-1,E=oI(e=>{"Escape"===e.key&&(a?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))});return y.useEffect(()=>{if(P)return p.addEventListener("keydown",E,{capture:!0}),()=>p.removeEventListener("keydown",E,{capture:!0})},[p,P,E]),y.useEffect(()=>{if(d)return n&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(h=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),oq(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),0===u.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=h))}},[d,p,n,u]),y.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),oq())},[d,u]),y.useEffect(()=>{let e=oD(()=>m({}),"handleUpdate");return document.addEventListener(oF,e),()=>document.removeEventListener(oF,e)},[]),(0,g.jsx)(oR.div,{...c,ref:v,style:{pointerEvents:j?S?"auto":"none":void 0,...e.style},onFocusCapture:oc(e.onFocusCapture,N.onFocusCapture),onBlurCapture:oc(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:oc(e.onPointerDownCapture,C.onPointerDownCapture)})},"DismissableLayer"));function oH(){let e=y.useContext(o$),[t,n]=y.useState(null);return y.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}oD(oH,"useDismissableLayerSurface");var oB=oD(()=>!0,"IS_TRUE");function oK(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:a,dismissableSurfaces:o,shouldHandlePointerDownOutside:i=oB}=t,l=oI(e),s=y.useRef(!1),c=y.useRef(!1),u=y.useRef(new Map),d=y.useRef(()=>{});return y.useEffect(()=>{function e(){c.current=!1,a.current=!1,u.current.clear()}function t(){return Array.from(u.current.values()).some(Boolean)}function f(e){if(!c.current)return;let t=e.target;t instanceof Node&&[...o].some(e=>e.contains(t))||u.current.set(e.type,!0),"click"===e.type&&window.setTimeout(()=>{c.current&&d.current()},0)}function p(e){c.current&&u.current.set(e.type,!1)}oD(e,"resetOutsideInteraction"),oD(t,"isOutsideInteractionIntercepted"),oD(f,"handleInteractionCapture"),oD(p,"handleInteractionBubble");let h=oD(o=>{if(o.target&&!s.current){let f=function(){n.removeEventListener("click",d.current);let r=t();e(),r||oW("dismissableLayer.pointerDownOutside",l,p,{discrete:!0})};if(oD(f,"handleAndDispatchPointerDownOutsideEvent"),!i(o.target)){n.removeEventListener("click",d.current),e(),s.current=!1;return}let p={originalEvent:o};c.current=!0,a.current=r&&0===o.button,u.current.clear(),r&&0===o.button?(n.removeEventListener("click",d.current),d.current=f,n.addEventListener("click",d.current,{once:!0})):f()}else n.removeEventListener("click",d.current),e();s.current=!1},"handlePointerDown"),m=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(let e of m)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener("pointerdown",h)},0);return()=>{for(let e of(window.clearTimeout(g),n.removeEventListener("pointerdown",h),n.removeEventListener("click",d.current),m))n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,l,r,a,o,i]),{onPointerDownCapture:oD(()=>s.current=!0,"onPointerDownCapture")}}function oV(e,t=globalThis?.document){let n=oI(e),r=y.useRef(!1);return y.useEffect(()=>{let e=oD(e=>{e.target&&!r.current&&oW("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:oD(()=>r.current=!0,"onFocusCapture"),onBlurCapture:oD(()=>r.current=!1,"onBlurCapture")}}function oq(){let e=new CustomEvent(oF);document.dispatchEvent(e)}function oW(e,t,n,{discrete:r}){let a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?oL(a,o):a.dispatchEvent(o)}oD(oK,"usePointerDownOutside"),oD(oV,"useFocusOutside"),oD(oq,"dispatchUpdate"),oD(oW,"handleAndDispatchCustomEvent");var oZ=Object.defineProperty,oG=(e,t)=>oZ(e,"name",{value:t,configurable:!0}),oJ="focusScope.autoFocusOnMount",oQ="focusScope.autoFocusOnUnmount",oY={bubbles:!1,cancelable:!0},oX=y.forwardRef(oG(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...i}=e,[l,s]=y.useState(null),c=oI(a),u=oI(o),d=y.useRef(null),f=aY(t,s),p=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let e=function(e){if(p.paused||!l)return;let t=e.target;l.contains(t)?d.current=t:o6(d.current,{select:!0})},t=function(e){if(p.paused||!l)return;let t=e.relatedTarget;null!==t&&(l.contains(t)||o6(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&o6(l)};oG(e,"handleFocusIn"),oG(t,"handleFocusOut"),oG(n,"handleMutations"),document.addEventListener("focusin",e),document.addEventListener("focusout",t);let r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[r,l,p.paused]),y.useEffect(()=>{if(l){o8.add(p);let e=document.activeElement;if(!l.contains(e)){let t=new CustomEvent(oJ,oY);l.addEventListener(oJ,c),l.dispatchEvent(t),t.defaultPrevented||(o0(ie(o2(l)),{select:!0}),document.activeElement===e&&o6(l))}return()=>{l.removeEventListener(oJ,c),setTimeout(()=>{let t=new CustomEvent(oQ,oY);l.addEventListener(oQ,u),l.dispatchEvent(t),t.defaultPrevented||o6(e??document.body,{select:!0}),l.removeEventListener(oQ,u),o8.remove(p)},0)}}},[l,c,u,p]);let h=y.useCallback(e=>{if(!n&&!r||p.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,a=document.activeElement;if(t&&a){let t=e.currentTarget,[r,o]=o1(t);r&&o?e.shiftKey||a!==o?e.shiftKey&&a===r&&(e.preventDefault(),n&&o6(o,{select:!0})):(e.preventDefault(),n&&o6(r,{select:!0})):a===t&&e.preventDefault()}},[n,r,p.paused]);return(0,g.jsx)(oR.div,{tabIndex:-1,...i,ref:f,onKeyDown:h})},"FocusScope"));function o0(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(o6(r,{select:t}),document.activeElement!==n)return}function o1(e){let t=o2(e);return[o4(t,e),o4(t.reverse(),e)]}function o2(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:oG(e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}function o4(e,t){let n="function"==typeof t.checkVisibility&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):o3(r,{upTo:t})))return r}function o3(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===t||e!==t);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function o5(e){return e instanceof HTMLInputElement&&"select"in e}function o6(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&o5(e)&&t&&e.select()}}oG(o0,"focusFirst"),oG(o1,"getTabbableEdges"),oG(o2,"getTabbableCandidates"),oG(o4,"findVisible"),oG(o3,"isHidden"),oG(o5,"isSelectableInput"),oG(o6,"focus");var o8=o9();function o9(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),(e=o7(e,t)).unshift(t)},remove(t){e=o7(e,t),e[0]?.resume()}}}function o7(e,t){let n=[...e],r=n.indexOf(t);return -1!==r&&n.splice(r,1),n}function ie(e){return e.filter(e=>"A"!==e.tagName)}oG(o9,"createFocusScopesStack"),oG(o7,"arrayRemove"),oG(ie,"removeLinks");var it=Object.defineProperty,ir=y.forwardRef(it(function(e,t){let{container:n,...r}=e,[a,o]=y.useState(!1);og(()=>o(!0),[]);let i=n||a&&globalThis?.document?.body;return i?oT.createPortal((0,g.jsx)(oR.div,{...r,ref:t}),i):null},"name",{value:"Portal",configurable:!0})),ia=Object.defineProperty,io=(e,t)=>ia(e,"name",{value:t,configurable:!0});function ii(e,t){return y.useReducer((e,n)=>t[e][n]??e,e)}io(ii,"useStateMachine");var il=io(e=>{let{present:t,children:n}=e,r=is(t),a="function"==typeof n?n({present:r.isPresent}):y.Children.only(n),o=iu(r.ref,ip(a));return"function"==typeof n||r.isPresent?y.cloneElement(a,{ref:o}):null},"Presence");function is(e){let[t,n]=y.useState(),r=y.useRef(null),a=y.useRef(e),o=y.useRef("none"),i=y.useRef(void 0),[l,s]=ii(e?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{"mounted"===l?(o.current=i.current??id(r.current),i.current=void 0):o.current="none"},[l]),og(()=>{let t=r.current,n=a.current;if(n!==e){let r=o.current,l=id(t);e?(i.current=l,s("MOUNT")):"none"===l||t?.display==="none"?s("UNMOUNT"):n&&r!==l?s("ANIMATION_OUT"):s("UNMOUNT"),a.current=e}},[e,s]),og(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,i=io(o=>{let i=id(r.current).includes(CSS.escape(o.animationName));if(o.target===t&&i&&(s("ANIMATION_END"),!a.current)){let r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)})}},"handleAnimationEnd"),l=io(e=>{e.target===t&&(o.current=id(r.current))},"handleAnimationStart");return t.addEventListener("animationstart",l),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",l),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}s("ANIMATION_END")},[t,s]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:y.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,i.current=id(t)}else r.current=null;n(e)},[])}}function ic(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function iu(...e){let t=y.useRef(e);return t.current=e,y.useCallback(e=>{let n=t.current,r=!1,a=n.map(t=>{let n=ic(t,e);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let e=0;e<a.length;e++){let t=a[e];"function"==typeof t?t():ic(n[e],null)}}},[])}function id(e){return e?.animationName||"none"}function ip(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(n=(t=Object.getOwnPropertyDescriptor(e,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning)?e.props.ref:e.props.ref||e.ref}io(is,"usePresence"),io(ic,"setRef"),io(iu,"useStableComposedRefs"),io(id,"getAnimationName"),io(ip,"getElementRef");var ih=Object.defineProperty,im=(e,t)=>ih(e,"name",{value:t,configurable:!0}),ig=0,iy=null;function iv(){y.useEffect(()=>{iy||(iy={start:ib(),end:ib()});let{start:e,end:t}=iy;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),ig++,()=>{1===ig&&(iy?.start.remove(),iy?.end.remove(),iy=null),ig=Math.max(0,ig-1)}},[])}function ib(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}im(function(e){return iv(),e.children},"FocusGuards"),im(iv,"useFocusGuards"),im(ib,"createFocusGuard");var ix=function(){return(ix=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};function iw(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)0>t.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}var ik="right-scroll-bar-position",ij="width-before-scroll-bar";function iS(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var iO="u">typeof window?y.useLayoutEffect:y.useEffect,iC=new WeakMap,iN=(void 0===a&&(a={}),(void 0===o&&(o=function(e){return e}),i=[],l=!1,s={read:function(){if(l)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return i.length?i[i.length-1]:null},useMedium:function(e){var t=o(e,l);return i.push(t),function(){i=i.filter(function(e){return e!==t})}},assignSyncMedium:function(e){for(l=!0;i.length;){var t=i;i=[],t.forEach(e)}i={push:function(t){return e(t)},filter:function(){return i}}},assignMedium:function(e){l=!0;var t=[];if(i.length){var n=i;i=[],n.forEach(e),t=i}var r=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(r)};a(),i={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),i}}}}).options=ix({async:!0,ssr:!1},a),s),iP=function(){},iE=y.forwardRef(function(e,t){var n,r,a,o,i=y.useRef(null),l=y.useState({onScrollCapture:iP,onWheelCapture:iP,onTouchMoveCapture:iP}),s=l[0],c=l[1],u=e.forwardProps,d=e.children,f=e.className,p=e.removeScrollBar,h=e.enabled,m=e.shards,g=e.sideCar,v=e.noRelative,b=e.noIsolation,x=e.inert,w=e.allowPinchZoom,k=e.as,j=e.gapMode,S=iw(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=(n=[i,t],r=function(e){return n.forEach(function(t){return iS(t,e)})},(a=(0,y.useState)(function(){return{value:null,callback:r,facade:{get current(){return a.value},set current(value){var e=a.value;e!==value&&(a.value=value,a.callback(value,e))}}}})[0]).callback=r,o=a.facade,iO(function(){var e=iC.get(o);if(e){var t=new Set(e),r=new Set(n),a=o.current;t.forEach(function(e){r.has(e)||iS(e,null)}),r.forEach(function(e){t.has(e)||iS(e,a)})}iC.set(o,n)},[n]),o),C=ix(ix({},S),s);return y.createElement(y.Fragment,null,h&&y.createElement(g,{sideCar:iN,removeScrollBar:p,shards:m,noRelative:v,noIsolation:b,inert:x,setCallbacks:c,allowPinchZoom:!!w,lockRef:i,gapMode:j}),u?y.cloneElement(y.Children.only(d),ix(ix({},C),{ref:O})):y.createElement(void 0===k?"div":k,ix({},C,{className:f,ref:O}),d))});iE.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},iE.classNames={fullWidth:ij,zeroRight:ik};var i_=function(e){var t=e.sideCar,n=iw(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error("Sidecar medium not found");return y.createElement(r,ix({},n))};i_.isSideCarExport=!0;var iz=function(){var e=0,t=null;return{add:function(n){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=m||d.nc;return t&&e.setAttribute("nonce",t),e}())){var r,a;(r=t).styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),a=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(a)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},iT=function(){var e=iz();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},iA=function(){var e=iT();return function(t){return e(t.styles,t.dynamic),null}},iR={left:0,top:0,right:0,gap:0},iL=function(e){return parseInt(e||"",10)||0},iI=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],a=t["padding"===e?"paddingRight":"marginRight"];return[iL(n),iL(r),iL(a)]},iM=function(e){if(void 0===e&&(e="margin"),"u"<typeof window)return iR;var t=iI(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},iD=iA(),iF="data-scroll-locked",i$=function(e,t,n,r){var a=e.left,o=e.top,i=e.right,l=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(l,"px ").concat(r,";\n }\n body[").concat(iF,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(a,"px;\n padding-top: ").concat(o,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(l,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(ik," {\n right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(ij," {\n margin-right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(ik," .").concat(ik," {\n right: 0 ").concat(r,";\n }\n \n .").concat(ij," .").concat(ij," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(iF,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},iU=function(){var e=parseInt(document.body.getAttribute(iF)||"0",10);return isFinite(e)?e:0},iH=function(){y.useEffect(function(){return document.body.setAttribute(iF,(iU()+1).toString()),function(){var e=iU()-1;e<=0?document.body.removeAttribute(iF):document.body.setAttribute(iF,e.toString())}},[])},iB=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=void 0===r?"margin":r;iH();var o=y.useMemo(function(){return iM(a)},[a]);return y.createElement(iD,{styles:i$(o,!t,a,n?"":"!important")})},iK=!1;if("u">typeof window)try{var iV=Object.defineProperty({},"passive",{get:function(){return iK=!0,!0}});window.addEventListener("test",iV,iV),window.removeEventListener("test",iV,iV)}catch(e){iK=!1}var iq=!!iK&&{passive:!1},iW=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&(n.overflowY!==n.overflowX||"TEXTAREA"===e.tagName||"visible"!==n[t])},iZ=function(e,t){var n=t.ownerDocument,r=t;do{if("u">typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),iG(e,r)){var a=iJ(e,r);if(a[1]>a[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},iG=function(e,t){return"v"===e?iW(t,"overflowY"):iW(t,"overflowX")},iJ=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},iQ=function(e,t,n,r,a){var o,i=(o=window.getComputedStyle(t).direction,"h"===e&&"rtl"===o?-1:1),l=i*r,s=n.target,c=t.contains(s),u=!1,d=l>0,f=0,p=0;do{if(!s)break;var h=iJ(e,s),m=h[0],g=h[1]-h[2]-i*m;(m||g)&&iG(e,s)&&(f+=g,p+=m);var y=s.parentNode;s=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return d&&(a&&1>Math.abs(f)||!a&&l>f)?u=!0:!d&&(a&&1>Math.abs(p)||!a&&-l>p)&&(u=!0),u},iY=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},iX=function(e){return[e.deltaX,e.deltaY]},i0=function(e){return e&&"current"in e?e.current:e},i1=0,i2=[];let i4=(c=function(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),a=y.useState(i1++)[0],o=y.useState(iA)[0],i=y.useRef(e);y.useEffect(function(){i.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var t=(function(e,t,n){if(n||2==arguments.length)for(var r,a=0,o=t.length;a<o;a++)!r&&a in t||(r||(r=Array.prototype.slice.call(t,0,a)),r[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))})([e.lockRef.current],(e.shards||[]).map(i0),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var l=y.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var a,o=iY(e),l=n.current,s="deltaX"in e?e.deltaX:l[0]-o[0],c="deltaY"in e?e.deltaY:l[1]-o[1],u=e.target,d=Math.abs(s)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var h=iZ(d,u);if(!h)return!0;if(h?a=d:(a="v"===d?"h":"v",h=iZ(d,u)),!h)return!1;if(!r.current&&"changedTouches"in e&&(s||c)&&(r.current=a),!a)return!0;var m=r.current||a;return iQ(m,t,e,"h"===m?s:c,!0)},[]),s=y.useCallback(function(e){if(i2.length&&i2[i2.length-1]===o){var n="deltaY"in e?iX(e):iY(e),r=t.current.filter(function(t){var r;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(r=t.delta,r[0]===n[0]&&r[1]===n[1])})[0];if(r&&r.should){e.cancelable&&e.preventDefault();return}if(!r){var a=(i.current.shards||[]).map(i0).filter(Boolean).filter(function(t){return t.contains(e.target)});(a.length>0?l(e,a[0]):!i.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),c=y.useCallback(function(e,n,r,a){var o={name:e,delta:n,target:r,should:a,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(r)};t.current.push(o),setTimeout(function(){t.current=t.current.filter(function(e){return e!==o})},1)},[]),u=y.useCallback(function(e){n.current=iY(e),r.current=void 0},[]),d=y.useCallback(function(t){c(t.type,iX(t),t.target,l(t,e.lockRef.current))},[]),f=y.useCallback(function(t){c(t.type,iY(t),t.target,l(t,e.lockRef.current))},[]);y.useEffect(function(){return i2.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",s,iq),document.addEventListener("touchmove",s,iq),document.addEventListener("touchstart",u,iq),function(){i2=i2.filter(function(e){return e!==o}),document.removeEventListener("wheel",s,iq),document.removeEventListener("touchmove",s,iq),document.removeEventListener("touchstart",u,iq)}},[]);var p=e.removeScrollBar,h=e.inert;return y.createElement(y.Fragment,null,h?y.createElement(o,{styles:"\n .block-interactivity-".concat(a," {pointer-events: none;}\n .allow-interactivity-").concat(a," {pointer-events: all;}\n")}):null,p?y.createElement(iB,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},iN.useMedium(c),i_);var i3=y.forwardRef(function(e,t){return y.createElement(iE,ix({},e,{ref:t,sideCar:i4}))});i3.classNames=iE.classNames;var i5=new WeakMap,i6=new WeakMap,i8={},i9=0,i7=function(e){return e&&(e.host||i7(e.parentNode))},le=function(e,t,n,r){var a=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var n=i7(e);return n&&t.contains(n)?n:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)}).filter(function(e){return!!e});i8[n]||(i8[n]=new WeakMap);var o=i8[n],i=[],l=new Set,s=new Set(a),c=function(e){!e||l.has(e)||(l.add(e),c(e.parentNode))};a.forEach(c);var u=function(e){!e||s.has(e)||Array.prototype.forEach.call(e.children,function(e){if(l.has(e))u(e);else try{var t=e.getAttribute(r),a=null!==t&&"false"!==t,s=(i5.get(e)||0)+1,c=(o.get(e)||0)+1;i5.set(e,s),o.set(e,c),i.push(e),1===s&&a&&i6.set(e,!0),1===c&&e.setAttribute(n,"true"),a||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return u(t),l.clear(),i9++,function(){i.forEach(function(e){var t=i5.get(e)-1,a=o.get(e)-1;i5.set(e,t),o.set(e,a),t||(i6.has(e)||e.removeAttribute(r),i6.delete(e)),a||e.removeAttribute(n)}),--i9||(i5=new WeakMap,i5=new WeakMap,i6=new WeakMap,i8={})}},lt=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=t||("u"<typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),le(r,a,n,"aria-hidden")):function(){return null}},ln=Object.defineProperty,lr=(e,t)=>ln(e,"name",{value:t,configurable:!0}),la="Dialog",[lo,li]=oh(la),[ll,ls]=lo(la),lc=lr(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:i=!0}=e,l=y.useRef(null),s=y.useRef(null),[c,u]=oP({prop:r,defaultProp:a??!1,onChange:o,caller:la}),[d,f]=y.useState(0),[p,h]=y.useState(0);return(0,g.jsx)(ll,{scope:t,triggerRef:l,contentRef:s,contentId:ox(),titleId:ox(),descriptionId:ox(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:h,open:c,onOpenChange:u,onOpenToggle:y.useCallback(()=>u(e=>!e),[u]),modal:i,children:n})},"Dialog"),lu=y.forwardRef(lr(function(e,t){let{__scopeDialog:n,...r}=e,a=ls("DialogTrigger",n),o=aY(t,a.triggerRef);return(0,g.jsx)(oR.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":lN(a.open),...r,ref:o,onClick:oc(e.onClick,a.onOpenToggle)})},"DialogTrigger")),ld="DialogPortal",[lf,lp]=lo(ld,{forceMount:void 0}),lh=lr(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:a}=e,o=ls(ld,t);return(0,g.jsx)(lf,{scope:t,forceMount:n,children:y.Children.map(r,e=>(0,g.jsx)(il,{present:n||o.open,children:(0,g.jsx)(ir,{asChild:!0,container:a,children:e})}))})},"DialogPortal"),lm="DialogOverlay",lg=y.forwardRef(lr(function(e,t){let n=lp(lm,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=ls(lm,e.__scopeDialog);return o.modal?(0,g.jsx)(il,{present:r||o.open,children:(0,g.jsx)(lv,{...a,ref:t})}):null},"DialogOverlay")),ly=a1("DialogOverlay.RemoveScroll"),lv=y.forwardRef(lr(function(e,t){let{__scopeDialog:n,...r}=e,a=ls(lm,n),o=aY(t,oH());return(0,g.jsx)(i3,{as:ly,allowPinchZoom:!0,shards:[a.contentRef],children:(0,g.jsx)(oR.div,{"data-state":lN(a.open),...r,ref:o,style:{pointerEvents:"auto",...r.style}})})},"DialogOverlayImpl")),lb="DialogContent",lx=y.forwardRef(lr(function(e,t){let n=lp(lb,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=ls(lb,e.__scopeDialog);return(0,g.jsx)(il,{present:r||o.open,children:o.modal?(0,g.jsx)(lw,{...a,ref:t}):(0,g.jsx)(lk,{...a,ref:t})})},"DialogContent")),lw=y.forwardRef(lr(function(e,t){let n=ls(lb,e.__scopeDialog),r=y.useRef(null),a=aY(t,n.contentRef,r);return y.useEffect(()=>{let e=r.current;if(e)return lt(e)},[]),(0,g.jsx)(lj,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:oc(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:oc(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:oc(e.onFocusOutside,e=>e.preventDefault())})},"DialogContentModal")),lk=y.forwardRef(lr(function(e,t){let n=ls(lb,e.__scopeDialog),r=y.useRef(!1),a=y.useRef(!1);return(0,g.jsx)(lj,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(a.current=!0));let o=t.target;n.triggerRef.current?.contains(o)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&a.current&&t.preventDefault()}})},"DialogContentNonModal")),lj=y.forwardRef(lr(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,...i}=e,l=ls(lb,n);return iv(),(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(oX,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:o,children:(0,g.jsx)(oU,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionPresent?l.descriptionId:void 0,"aria-labelledby":l.titlePresent?l.titleId:void 0,"data-state":lN(l.open),...i,ref:t,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1)})})})},"DialogContentImpl")),lS=y.forwardRef(lr(function(e,t){let{__scopeDialog:n,...r}=e,a=ls("DialogTitle",n),{setTitleCount:o}=a;return og(()=>(o(e=>e+1),()=>o(e=>e-1)),[o]),(0,g.jsx)(oR.h2,{id:a.titleId,...r,ref:t})},"DialogTitle")),lO=y.forwardRef(lr(function(e,t){let{__scopeDialog:n,...r}=e,a=ls("DialogDescription",n),{setDescriptionCount:o}=a;return og(()=>(o(e=>e+1),()=>o(e=>e-1)),[o]),(0,g.jsx)(oR.p,{id:a.descriptionId,...r,ref:t})},"DialogDescription")),lC=y.forwardRef(lr(function(e,t){let{__scopeDialog:n,...r}=e,a=ls("DialogClose",n);return(0,g.jsx)(oR.button,{type:"button",...r,ref:t,onClick:oc(e.onClick,()=>a.onOpenChange(!1))})},"DialogClose"));function lN(e){return e?"open":"closed"}lr(lN,"getState");let lP=O("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function lE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function l_(e,t){if(null==e)return{};var n,r,a,o={};if("u">typeof Reflect&&Reflect.ownKeys){for(a=0,n=Reflect.ownKeys(Object(e));a<n.length;a++)r=n[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}if(o=function(e,t){if(null==e)return{};var n,r,a={},o=Object.getOwnPropertyNames(e);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n]);return a}(e,t),Object.getOwnPropertySymbols)for(a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)r=n[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function lz(e){var t=e.className,n=l_(e,["className"]);return(0,g.jsx)(lg,lE({"data-slot":"dialog-overlay",className:aR("fixed inset-0 z-50 bg-black/70 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t)},n))}function lT(e){var t,n,r=e.className,a=e.children,o=l_(e,["className","children"]);return(0,g.jsxs)(lh,{children:[(0,g.jsx)(lz,{}),(0,g.jsxs)(lx,(t=lE({"data-slot":"dialog-content",className:aR("fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border bg-card p-6 shadow-2xl duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-2xl",r)},o),n=n={children:[a,(0,g.jsxs)(lC,{className:"absolute right-4 top-4 cursor-pointer rounded-sm opacity-70 ring-offset-background transition-[opacity,background-color] hover:bg-accent hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 active:bg-accent/80 disabled:pointer-events-none",children:[(0,g.jsx)(lP,{className:"size-4"}),(0,g.jsx)("span",{className:"sr-only",children:"Close"})]})]},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))]})}function lA(e){var t=e.className,n=l_(e,["className"]);return(0,g.jsx)("div",lE({"data-slot":"dialog-header",className:aR("flex flex-col space-y-1.5 text-center sm:text-left",t)},n))}function lR(e){var t=e.className,n=l_(e,["className"]);return(0,g.jsx)("div",lE({"data-slot":"dialog-footer",className:aR("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t)},n))}function lL(e){var t=e.className,n=l_(e,["className"]);return(0,g.jsx)(lS,lE({"data-slot":"dialog-title",className:aR("text-lg font-semibold leading-none tracking-tight",t)},n))}function lI(e){var t=e.className,n=l_(e,["className"]);return(0,g.jsx)(lO,lE({"data-slot":"dialog-description",className:aR("text-sm text-muted-foreground",t)},n))}function lM(e,t,n,r,a,o,i){try{var l=e[o](i),s=l.value}catch(e){n(e);return}l.done?t(s):Promise.resolve(s).then(r,a)}function lD(e,t,n){return(lD=lB()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var a=new(Function.bind.apply(e,r));return n&&lU(a,n.prototype),a}).apply(null,arguments)}function lF(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l$(e){return(l$=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function lU(e,t){return(lU=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function lH(e){var t="function"==typeof Map?new Map:void 0;return(lH=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return lD(e,arguments,l$(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),lU(n,e)})(e)}function lB(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(lB=function(){return!!e})()}var lK=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function t(e,n){var r,a,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!(this instanceof t))throw TypeError("Cannot call a class as a function");return r=t,a=[n],r=l$(r),lF(o=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,lB()?Reflect.construct(r,a||[],l$(this).constructor):r.apply(this,a)),"status",void 0),lF(o,"code",void 0),lF(o,"params",void 0),o.status=e,o.name="ApiError",o.code=i.code,o.params=i.params,o}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&lU(t,e),t}(lH(Error));function lV(e){return"/api/harnesses/".concat(e,"/profiles")}function lq(e,t){return"".concat(lV(e),"/").concat(encodeURIComponent(t))}function lW(e){return e?"/api/backups/".concat(encodeURIComponent(e)):"/api/backups"}function lZ(){return"/api/providers"}function lG(e){return"".concat(lZ(),"/").concat(encodeURIComponent(e))}function lJ(e){return e?"/api/drift/".concat(encodeURIComponent(e)):"/api/drift"}function lQ(){return"/api/scan"}function lY(e){return e?"/api/operations?harness=".concat(encodeURIComponent(e)):"/api/operations"}function lX(e){var t;return(t=function(e){var t,n,r,a,o,i=arguments;return function(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(i,"next",{value:s(0)}),l(i,"throw",{value:s(1)}),l(i,"return",{value:s(2)}),"function"==typeof Symbol&&l(i,Symbol.iterator,{value:function(){return this}}),i;function s(l){return function(s){var c=[l,s];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&c[0]?r.return:c[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;switch(r=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]<a[3])){o.label=c[1];break}if(6===c[0]&&o.label<a[1]){o.label=a[1],a=c;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(c);break}a[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(l){switch(l.label){case 0:var s,c;return n=new Headers((t=i.length>1&&void 0!==i[1]?i[1]:{}).headers),t.body&&!n.has("Content-Type")&&n.set("Content-Type","application/json"),[4,fetch(e,(s=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){lF(e,t,n[t])})}return e}({credentials:"include"},t),c=c={headers:n},Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(c)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(c)).forEach(function(e){Object.defineProperty(s,e,Object.getOwnPropertyDescriptor(c,e))}),s))];case 1:return[4,(r=l.sent()).json().catch(function(){return{}})];case 2:if(a=l.sent(),!r.ok)throw new lK(r.status,null!=(o=a.error)?o:"",{code:a.code,params:a.params});return[2,a]}})},function(){var e=this,n=arguments;return new Promise(function(r,a){var o=t.apply(e,n);function i(e){lM(o,r,a,i,l,"next",e)}function l(e){lM(o,r,a,i,l,"throw",e)}i(void 0)})}).apply(this,arguments)}function l0(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function l1(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function l2(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function l4(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function l3(e){return e.startsWith("warning.")||e.startsWith("error.")?e:"error.".concat(e)}function l5(e){return e.code?{key:l3(e.code),params:e.params,scope:e.scope,fallback:e.message}:{key:"error.unknown",fallback:e.message,scope:e.scope}}function l6(e){return l1(e,lK)?l5({message:e.message,code:e.code,params:e.params}):{key:"error.unknown",fallback:l1(e,Error)?e.message:String(e)}}function l8(e,t){var n=l6(e);return"error.unknown"===n.key?l4(l2({},n),{key:t}):n}var l9=new Set(["drift.adoptFailed","drift.reapplyFailed","vault.deleteFailed","vault.saveFailed","vault.revealFailed","operations.undoFailed","import.failed","activate.loadFailed","backup.loadFailed","backup.diffFailed"]);function l7(e,t){if(t.fallback&&("error.unknown"===t.key||l9.has(t.key))){var n,r,a,o=null!=(a=t.fallback)?a:t.key;return t.scope?"".concat(t.scope,": ").concat(o):o}var i=Object.fromEntries(Object.entries(null!=(n=t.paramKeys)?n:{}).map(function(t){var n=function(e){if(Array.isArray(e))return e}(t)||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,i=!1;try{for(r=r.call(e);!(o=(t=r.next()).done)&&(a.push(t.value),2!==a.length);o=!0);}catch(e){i=!0,n=e}finally{try{o||null==r.return||r.return()}finally{if(i)throw n}}return a}}(t)||function(e){if(e){if("string"==typeof e)return l0(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l0(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();return[n[0],e(n[1])]})),l=e(t.key,l4(l2({},t.params,i),{defaultValue:null!=(r=t.fallback)?r:t.key}));return t.scope?"".concat(t.scope,": ").concat(l):l}let se=e=>{let t,n=new Set,r=(e,r)=>{let a="function"==typeof e?e(t):e;if(!Object.is(a,t)){let e=t;t=(null!=r?r:"object"!=typeof a||null===a)?a:Object.assign({},t,a),n.forEach(n=>n(t,e))}},a=()=>t,o={setState:r,getState:a,getInitialState:()=>i,subscribe:e=>(n.add(e),()=>n.delete(e))},i=t=e(r,a,o);return o};function st(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function sn(e,t,n,r,a,o,i){try{var l=e[o](i),s=l.value}catch(e){n(e);return}l.done?t(s):Promise.resolve(s).then(r,a)}function sr(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function i(e){sn(o,r,a,i,l,"next",e)}function l(e){sn(o,r,a,i,l,"throw",e)}i(void 0)})}}function sa(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function so(e){return function(e){if(Array.isArray(e))return st(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return st(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return st(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function si(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(i,"next",{value:s(0)}),l(i,"throw",{value:s(1)}),l(i,"return",{value:s(2)}),"function"==typeof Symbol&&l(i,Symbol.iterator,{value:function(){return this}}),i;function s(l){return function(s){var c=[l,s];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&c[0]?r.return:c[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;switch(r=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]<a[3])){o.label=c[1];break}if(6===c[0]&&o.label<a[1]){o.label=a[1],a=c;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(c);break}a[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}function sl(e,t,n){var r,a;return t?{key:e,params:(r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},n),a=a={user:t},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(a)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(a)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(a,e))}),r)}:{key:e,params:n,paramKeys:{user:"notice.currentUser"}}}var ss=(t=(r=function(e,t){return{sessionChecked:!1,authenticated:!1,currentUser:"",users:[],usersLoading:!1,loading:!1,error:null,envFile:"",harnesses:[],backups:[],notice:null,providers:null,providersLoading:!1,providersError:null,doctor:null,doctorUpdatedAvailable:!1,doctorLoading:!1,doctorError:null,drift:null,driftLoading:!1,driftError:null,scan:null,scanLoading:!1,scanError:null,operations:null,operationsLoading:!1,operationsError:null,loadSession:function(){return sr(function(){var n;return si(this,function(r){switch(r.label){case 0:return r.trys.push([0,5,,6]),[4,lX("/api/auth/session")];case 1:return e({authenticated:!0,sessionChecked:!0,currentUser:r.sent().currentUser,error:null}),[4,t().loadUsers()];case 2:return r.sent(),[4,Promise.all([t().loadHarnesses(),t().loadBackups()])];case 3:return r.sent(),[4,t().loadDrift()];case 4:return r.sent(),[3,6];case 5:return e({authenticated:!1,sessionChecked:!0,error:sa(n=r.sent(),lK)&&401===n.status?null:l6(n)}),[3,6];case 6:return[2]}})})()},login:function(n){return sr(function(){var r;return si(this,function(a){switch(a.label){case 0:e({loading:!0,error:null}),a.label=1;case 1:return a.trys.push([1,5,,6]),[4,lX("/api/auth/login",{method:"POST",body:JSON.stringify({password:n})})];case 2:return e({authenticated:!0,loading:!1,currentUser:a.sent().currentUser}),[4,t().loadUsers()];case 3:return a.sent(),[4,t().loadHarnesses()];case 4:return a.sent(),[3,6];case 5:throw e({loading:!1,error:l6(r=a.sent())}),r;case 6:return[2]}})})()},logout:function(){return sr(function(){return si(this,function(t){switch(t.label){case 0:return[4,lX("/api/auth/logout",{method:"POST"})];case 1:return t.sent(),e({authenticated:!1,currentUser:"",users:[],harnesses:[],backups:[],envFile:"",providers:null,doctor:null,doctorUpdatedAvailable:!1,drift:null}),[2]}})})()},loadUsers:function(){return sr(function(){var t;return si(this,function(n){switch(n.label){case 0:e({usersLoading:!0}),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,lX("/api/users")];case 2:return e({users:(t=n.sent()).items,currentUser:t.currentUser,usersLoading:!1}),[3,4];case 3:return e({usersLoading:!1,error:l6(n.sent())}),[3,4];case 4:return[2]}})})()},switchUser:function(n){return sr(function(){var r;return si(this,function(a){switch(a.label){case 0:if(!n||n===t().currentUser)return[2];e({usersLoading:!0,loading:!0,error:null}),a.label=1;case 1:return a.trys.push([1,5,,6]),[4,lX("/api/users/".concat(encodeURIComponent(n),"/select"),{method:"POST"})];case 2:return a.sent(),e({currentUser:n,harnesses:[],backups:[],envFile:"",providers:null,doctor:null,doctorUpdatedAvailable:!1,drift:null}),[4,t().loadUsers()];case 3:return a.sent(),[4,Promise.all([t().loadHarnesses(),t().loadBackups()])];case 4:return a.sent(),e({usersLoading:!1,loading:!1}),[3,6];case 5:throw e({usersLoading:!1,loading:!1,error:l6(r=a.sent())}),r;case 6:return[2]}})})()},loadHarnesses:function(){return sr(function(){var n,r;return si(this,function(a){switch(a.label){case 0:e({loading:!0,error:null}),a.label=1;case 1:return a.trys.push([1,4,,5]),[4,lX("/api/harnesses")];case 2:return e({harnesses:(n=a.sent()).items,envFile:n.envFile,loading:!1}),[4,t().loadDrift()];case 3:return a.sent(),[3,5];case 4:if(sa(r=a.sent(),lK)&&401===r.status)return e({authenticated:!1,loading:!1,harnesses:[]}),[2];return e({loading:!1,error:l6(r)}),[3,5];case 5:return[2]}})})()},createProfile:function(e,n){return sr(function(){return si(this,function(r){switch(r.label){case 0:return[4,lX(lV(e),{method:"POST",body:JSON.stringify(n)})];case 1:return r.sent(),[4,t().loadHarnesses()];case 2:return r.sent(),[2]}})})()},updateProfile:function(e,n,r){return sr(function(){return si(this,function(a){switch(a.label){case 0:return[4,lX(lq(e,n),{method:"PATCH",body:JSON.stringify(r)})];case 1:return a.sent(),[4,t().loadHarnesses()];case 2:return a.sent(),[2]}})})()},deleteProfile:function(e,n){return sr(function(){return si(this,function(r){switch(r.label){case 0:return[4,lX(lq(e,n),{method:"DELETE"})];case 1:return r.sent(),[4,t().loadHarnesses()];case 2:return r.sent(),[2]}})})()},activateProfile:function(n,r){return sr(function(){var a,o,i,l;return si(this,function(s){switch(s.label){case 0:return[4,lX("".concat(lq(n,r),"/activate"),{method:"POST"})];case 1:return i=s.sent(),l=null!=(a=null==(o=t().harnesses.find(function(e){return e.id===n}))?void 0:o.label)?a:n,e({notice:[sl("notice.activated",t().currentUser,{harness:l,profile:r}),{key:"notice.activatedHint"}].concat(so(i.warnings.map(l5)))}),[4,t().loadHarnesses()];case 2:return s.sent(),[2]}})})()},activateOfficial:function(n){return sr(function(){var r,a,o,i;return si(this,function(l){switch(l.label){case 0:return[4,lX("/api/harnesses/".concat(n,"/official/activate"),{method:"POST"})];case 1:return o=l.sent(),i=null!=(r=null==(a=t().harnesses.find(function(e){return e.id===n}))?void 0:a.label)?r:n,e({notice:[sl("notice.officialRestored",t().currentUser,{harness:i}),{key:"notice.officialHint"}].concat(so(o.warnings.map(l5)))}),[4,t().loadHarnesses()];case 2:return l.sent(),[2]}})})()},previewProfile:function(e,t){return sr(function(){return si(this,function(n){switch(n.label){case 0:return[4,lX("".concat(lq(e,t),"/preview"))];case 1:return[2,n.sent().targets]}})})()},loadBackups:function(){return sr(function(){var t;return si(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,lX(lW())];case 1:return e({backups:n.sent().items}),[3,3];case 2:return sa(t=n.sent(),lK)&&401===t.status||e({error:l6(t)}),[3,3];case 3:return[2]}})})()},loadBackupDetail:function(e){return sr(function(){return si(this,function(t){return[2,lX(lW(e))]})})()},restoreBackup:function(n){return sr(function(){return si(this,function(r){switch(r.label){case 0:return[4,lX("".concat(lW(n),"/restore"),{method:"POST"})];case 1:return r.sent(),e({notice:[{key:"backup.written"}]}),[4,Promise.all([t().loadHarnesses(),t().loadBackups()])];case 2:return r.sent(),[2]}})})()},loadProviders:function(){return sr(function(){var t;return si(this,function(n){switch(n.label){case 0:e({providersLoading:!0,providersError:null}),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,lX(lZ())];case 2:return e({providers:n.sent().items,providersLoading:!1}),[3,4];case 3:if(sa(t=n.sent(),lK)&&401===t.status)return e({authenticated:!1,providersLoading:!1,providers:[]}),[2];return e({providersLoading:!1,providersError:l6(t)}),[3,4];case 4:return[2]}})})()},createProvider:function(e){return sr(function(){return si(this,function(n){switch(n.label){case 0:return[4,lX(lZ(),{method:"POST",body:JSON.stringify(e)})];case 1:return n.sent(),[4,t().loadProviders()];case 2:return n.sent(),[2]}})})()},updateProvider:function(e,n){return sr(function(){var r;return si(this,function(a){switch(a.label){case 0:return[4,lX(lG(e),{method:"PATCH",body:JSON.stringify(n)})];case 1:return r=a.sent(),[4,t().loadProviders()];case 2:return a.sent(),[4,t().loadHarnesses()];case 3:return a.sent(),[4,t().loadDrift()];case 4:return a.sent(),[2,r]}})})()},deleteProvider:function(e){return sr(function(){return si(this,function(n){switch(n.label){case 0:return[4,lX(lG(e),{method:"DELETE"})];case 1:return n.sent(),[4,t().loadProviders()];case 2:return n.sent(),[2]}})})()},revealProvider:function(e){return sr(function(){return si(this,function(t){return[2,lX("".concat(lG(e),"/reveal"))]})})()},probeDraft:function(e){return sr(function(){return si(this,function(t){switch(t.label){case 0:return[4,lX("/api/probe",{method:"POST",body:JSON.stringify(e)})];case 1:return[2,t.sent().result]}})})()},probeProfile:function(e,t){return sr(function(){return si(this,function(n){switch(n.label){case 0:return[4,lX("".concat(lq(e,t),"/probe"),{method:"POST",body:JSON.stringify({})})];case 1:return[2,n.sent().result]}})})()},probeVaultEntry:function(e,t){return sr(function(){return si(this,function(n){switch(n.label){case 0:return[4,lX("".concat(lG(e),"/probe"),{method:"POST",body:JSON.stringify(t?{endpoint:t}:{})})];case 1:return[2,n.sent().result]}})})()},loadDoctor:function(n){return sr(function(){var r,a,o;return si(this,function(i){switch(i.label){case 0:e({doctorLoading:!0,doctorError:null}),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,lX(n?"/api/doctor?harness=".concat(encodeURIComponent(n)):"/api/doctor")];case 2:return a=i.sent(),e({doctor:so((null!=(r=t().doctor)?r:[]).filter(function(e){return e.harness!==n})).concat(so(a.items.filter(function(e){return e.harness===n}))),doctorUpdatedAvailable:a.updatedAvailable,doctorLoading:!1}),[3,4];case 3:if(sa(o=i.sent(),lK)&&401===o.status)return e({authenticated:!1,doctorLoading:!1,doctor:[]}),[2];return e({doctorLoading:!1,doctorError:l6(o)}),[3,4];case 4:return[2]}})})()},loadDrift:function(){return sr(function(){var t,n;return si(this,function(r){switch(r.label){case 0:e({driftLoading:!0,driftError:null}),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,lX(lJ())];case 2:return e({drift:null!=(t=r.sent().items)?t:[],driftLoading:!1}),[3,4];case 3:if(sa(n=r.sent(),lK)&&401===n.status)return e({authenticated:!1,driftLoading:!1,drift:[]}),[2];return e({driftLoading:!1,driftError:l6(n)}),[3,4];case 4:return[2]}})})()},reapplyDrift:function(n){return sr(function(){var r,a,o;return si(this,function(i){switch(i.label){case 0:return[4,lX("".concat(lJ(n),"/reapply"),{method:"POST"})];case 1:return o=i.sent(),e({notice:[{key:"drift.reapplied",params:{harness:null!=(r=null==(a=t().harnesses.find(function(e){return e.id===n}))?void 0:a.label)?r:n}}]}),[4,t().loadDrift()];case 2:return i.sent(),[2,o.files]}})})()},adoptDrift:function(n){return sr(function(){var r,a,o;return si(this,function(i){switch(i.label){case 0:return[4,lX("".concat(lJ(n),"/adopt"),{method:"POST"})];case 1:return o=i.sent(),e({notice:[{key:"drift.adopted",params:{harness:null!=(r=null==(a=t().harnesses.find(function(e){return e.id===n}))?void 0:a.label)?r:n}}]}),[4,t().loadHarnesses()];case 2:return i.sent(),[2,o]}})})()},loadScan:function(){return sr(function(){var t;return si(this,function(n){switch(n.label){case 0:e({scanLoading:!0,scanError:null}),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,lX(lQ())];case 2:return e({scan:n.sent().items,scanLoading:!1}),[3,4];case 3:if(sa(t=n.sent(),lK)&&401===t.status)return e({authenticated:!1,scanLoading:!1,scan:[]}),[2];return e({scanLoading:!1,scanError:l6(t)}),[3,4];case 4:return[2]}})})()},importScan:function(e){return sr(function(){var n;return si(this,function(r){switch(r.label){case 0:return[4,lX("".concat(lQ(),"/import"),{method:"POST",body:JSON.stringify({selections:e})})];case 1:return n=r.sent(),[4,Promise.all([t().loadHarnesses(),t().loadProviders(),t().loadScan()])];case 2:return r.sent(),[2,n]}})})()},loadOperations:function(n){return sr(function(){var r,a,o;return si(this,function(i){switch(i.label){case 0:e({operationsLoading:!0,operationsError:null}),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,lX(lY(n))];case 2:return a=i.sent(),e({operations:so((null!=(r=t().operations)?r:[]).filter(function(e){return e.harness!==n})).concat(so(a.items.filter(function(e){return e.harness===n}))),operationsLoading:!1}),[3,4];case 3:if(sa(o=i.sent(),lK)&&401===o.status)return e({authenticated:!1,operationsLoading:!1,operations:[]}),[2];return e({operationsLoading:!1,operationsError:l6(o)}),[3,4];case 4:return[2]}})})()},undoOperation:function(n){return sr(function(){var r,a,o;return si(this,function(i){switch(i.label){case 0:return[4,lX("".concat(lY(),"/").concat(encodeURIComponent(n),"/undo"),{method:"POST"})];case 1:return o=i.sent().receipt,e({notice:[{key:"operations.undone",params:{harness:null!=(r=null==(a=t().harnesses.find(function(e){return e.id===o.harness}))?void 0:a.label)?r:o.harness}}]}),[4,Promise.all([t().loadHarnesses(),t().loadBackups(),t().loadOperations(o.harness)])];case 2:return i.sent(),[2]}})})()},setNotice:function(t){return e({notice:t})},clearNotice:function(){return e({notice:null})}}},se(r)),Object.assign(n=e=>(function(e,t=e=>e){let n=y.useSyncExternalStore(e.subscribe,y.useCallback(()=>t(e.getState()),[e,t]),y.useCallback(()=>t(e.getInitialState()),[e,t]));return y.useDebugValue(n),n})(t,e),t),n);function sc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function su(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,a=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],i=!0,l=!1;try{for(a=a.call(e);!(i=(n=a.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){l=!0,r=e}finally{try{i||null==a.return||a.return()}finally{if(l)throw r}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return sc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sc(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sd(e){var t,n=e.harnessId,r=(0,x.s9)().locale,a=(0,x.Bd)().t,o=ss(function(e){return e.backups}),i=ss(function(e){return e.loadBackups}),l=ss(function(e){return e.loadBackupDetail}),s=ss(function(e){return e.restoreBackup}),c=su((0,y.useState)(!1),2),u=c[0],d=c[1],f=su((0,y.useState)(null),2),p=f[0],h=f[1],m=su((0,y.useState)(null),2),v=m[0],b=m[1],w=su((0,y.useState)(null),2),k=w[0],j=w[1],S=su((0,y.useState)(!1),2),O=S[0],C=S[1],N=o.filter(function(e){return e.harness===n}),P=null!=(t=o.find(function(e){return e.id===p}))?t:null,E=F[n];return(0,y.useEffect)(function(){i()},[i]),(0,y.useEffect)(function(){d(!1),h(null)},[n]),(0,y.useEffect)(function(){if(!p){b(null),j(null),C(!1);return}var e=!1;return b(null),j(null),C(!0),l(p).then(function(t){e||b(t)}).catch(function(t){e||j(l8(t,"backup.diffFailed"))}).finally(function(){e||C(!1)}),function(){e=!0}},[p,l]),(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(oo,{className:"w-full justify-between",size:"sm",variant:"outline",onClick:function(){return d(!0)},children:[(0,g.jsx)(rE,{}),a("backup.history"),N.length>0?(0,g.jsx)(aI,{variant:"secondary",children:N.length}):null]}),(0,g.jsx)(lc,{open:u,onOpenChange:d,children:(0,g.jsxs)(lT,{className:"max-w-xl",children:[(0,g.jsxs)(lA,{children:[(0,g.jsx)(lL,{children:a("backup.historyTitle",{harness:E})}),(0,g.jsx)(lI,{children:a("backup.historyIntro")})]}),0===N.length?(0,g.jsx)("p",{className:"py-6 text-center text-sm text-muted-foreground",children:a("backup.empty")}):(0,g.jsx)("ul",{className:"max-h-80 divide-y overflow-y-auto rounded-xl border",children:N.map(function(e){var t,n,o;return(0,g.jsxs)("li",{className:"flex items-center gap-3 px-3 py-2.5 hover:bg-muted/30",children:[(0,g.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,g.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,g.jsx)("p",{className:"truncate text-sm font-medium",children:e.profile}),e.current?(0,g.jsx)(aI,{children:a("backup.currentBadge")}):null]}),(0,g.jsxs)("p",{className:"truncate text-xs text-muted-foreground",children:[(t=e.createdAt,n=r,Number.isNaN((o=new Date(t)).getTime())?t:o.toLocaleString(n))," \xb7"," ",a("backup.fileCount",{count:e.files.length}),e.files.some(function(e){return!e.existed})?" \xb7 ".concat(a("backup.withDeletions")):""]})]}),e.current?null:(0,g.jsx)(oo,{size:"sm",variant:"outline",className:"shrink-0",onClick:function(){return h(e.id)},children:a("backup.restore")})]},e.id)})})]})}),(0,g.jsx)(lc,{open:null!==P,onOpenChange:function(e){return!e&&h(null)},children:(0,g.jsxs)(lT,{className:"flex max-h-[85vh] w-[min(64rem,calc(100vw-2rem))] max-w-5xl flex-col overflow-hidden",children:[(0,g.jsxs)(lA,{children:[(0,g.jsx)(lL,{children:a("backup.restoreHistoryTitle")}),(0,g.jsx)(lI,{children:a("backup.restoreHistoryBody")})]}),(0,g.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[O?(0,g.jsx)("p",{className:"py-8 text-center text-sm text-muted-foreground",children:a("backup.comparing")}):null,k?(0,g.jsx)("p",{className:"py-8 text-center text-sm text-destructive",children:l7(a,k)}):null,v?(0,g.jsx)(aK,{files:v.files}):null]}),(0,g.jsxs)(lR,{children:[(0,g.jsx)(oo,{variant:"outline",onClick:function(){return h(null)},children:a("common.cancel")}),(0,g.jsx)(oo,{disabled:O||null!==k||null===v,onClick:function(){p&&s(p).then(function(){h(null),d(!1)})},children:a("backup.confirmRestore")})]})]})})]})}let sf=O("stethoscope",[["path",{d:"M11 2v2",key:"1539x4"}],["path",{d:"M5 2v2",key:"1yf1q8"}],["path",{d:"M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1",key:"rb5t3r"}],["path",{d:"M8 15a6 6 0 0 0 12 0v-3",key:"x18d4x"}],["circle",{cx:"20",cy:"10",r:"2",key:"ts1r5v"}]]),sp=O("refresh-ccw",[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]]),sh=O("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);var sm={ok:"bg-emerald-500",warn:"bg-amber-500",error:"bg-red-500",unknown:"bg-slate-400"};function sg(e){var t,n=e.harnessId,r=e.open,a=e.onOpenChange,o=(0,x.Bd)().t,i=ss(function(e){return e.doctor}),l=ss(function(e){return e.doctorLoading}),s=ss(function(e){return e.doctorError}),c=ss(function(e){return e.doctorUpdatedAvailable}),u=ss(function(e){return e.loadDoctor}),d=null!=(t=null==i?void 0:i.find(function(e){return e.harness===n}))?t:null;(0,y.useEffect)(function(){r&&null===d&&u(n)},[r,d,n,u]);var f=function(e){var t={ok:0,warn:0,error:0,unknown:0};if(!e)return t;var n=!0,r=!1,a=void 0;try{for(var o,i=e.checks[Symbol.iterator]();!(n=(o=i.next()).done);n=!0){var l=o.value;t[l.status]++}}catch(e){r=!0,a=e}finally{try{n||null==i.return||i.return()}finally{if(r)throw a}}return t}(d),p=F[n];return(0,g.jsx)(lc,{open:r,onOpenChange:a,children:(0,g.jsxs)(lT,{className:"flex max-h-[88vh] flex-col gap-0 overflow-hidden p-0 sm:max-w-2xl",children:[(0,g.jsxs)(lA,{className:"shrink-0 space-y-1.5 px-6 pb-4 pt-6 pr-12",children:[(0,g.jsx)(lL,{children:o("doctor.titleFor",{harness:p})}),(0,g.jsx)(lI,{children:o("doctor.intro")})]}),(0,g.jsxs)("div",{className:"min-h-0 flex-1 space-y-4 overflow-y-auto overscroll-contain px-6",children:[l&&null===d?(0,g.jsx)("p",{className:"py-6 text-center text-sm text-muted-foreground",children:o("doctor.checking")}):null,s?(0,g.jsx)("p",{className:"text-sm text-destructive",children:l7(o,s)}):null,d?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[f.ok>0?(0,g.jsx)(aI,{variant:"secondary",children:o("doctor.countOk",{count:f.ok})}):null,f.warn>0?(0,g.jsx)(aI,{variant:"outline",className:"border-amber-500/30 text-amber-700 dark:text-amber-300",children:o("doctor.countWarn",{count:f.warn})}):null,f.error>0?(0,g.jsx)(aI,{variant:"destructive",children:o("doctor.countError",{count:f.error})}):null,f.unknown>0?(0,g.jsx)(aI,{variant:"outline",children:o("doctor.countUnknown",{count:f.unknown})}):null,c?(0,g.jsxs)("span",{className:"ml-auto flex items-center gap-1 text-xs text-emerald-600 dark:text-emerald-400",children:[(0,g.jsx)(sh,{className:"size-3.5"}),o("doctor.updateAvailable")]}):null]}),(0,g.jsx)(sy,{checks:d.checks})]}):null,null!==d||l||s?null:(0,g.jsx)("p",{className:"py-6 text-center text-sm text-muted-foreground",children:o("doctor.notRun")})]}),(0,g.jsxs)(lR,{className:"shrink-0 px-6 py-4",children:[(0,g.jsxs)(oo,{variant:"outline",disabled:l,onClick:function(){u(n)},children:[(0,g.jsx)(sp,{className:l?"animate-spin":void 0}),o("doctor.rerun")]}),(0,g.jsx)(oo,{onClick:function(){return a(!1)},children:o("doctor.close")})]})]})})}function sy(e){var t=e.checks,n=(0,x.Bd)().t;return 0===t.length?(0,g.jsx)("p",{className:"text-sm text-muted-foreground",children:n("doctor.noChecks")}):(0,g.jsx)("ul",{className:"divide-y rounded-xl border",children:t.map(function(e){var t;return(0,g.jsxs)("li",{className:"flex items-start gap-3 px-3 py-2.5",children:[(0,g.jsx)("span",{className:aR("mt-1.5 size-2 shrink-0 rounded-full",sm[e.status]),"aria-hidden":!0}),(0,g.jsx)("div",{className:"min-w-0 flex-1",children:(0,g.jsxs)("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-0.5",children:[(0,g.jsx)("p",{className:"text-sm leading-relaxed",children:l7(n,{key:null!=(t=e.code)?t:"doctor.unknownCheck",params:e.params,fallback:e.label})}),(0,g.jsx)("span",{className:"font-mono text-[10px] uppercase text-muted-foreground",children:n("doctor.status.".concat(e.status))})]})})]},e.id)})})}var sv=Object.defineProperty,sb=(e,t)=>sv(e,"name",{value:t,configurable:!0}),[sx,sw]=oh("AlertDialog",[li]),sk=li(),sj=sb(e=>{let{__scopeAlertDialog:t,...n}=e,r=sk(t);return(0,g.jsx)(lc,{...r,...n,modal:!0})},"AlertDialog");y.forwardRef(sb(function(e,t){let{__scopeAlertDialog:n,...r}=e,a=sk(n);return(0,g.jsx)(lu,{...a,...r,ref:t})},"AlertDialogTrigger"));var sS=sb(e=>{let{__scopeAlertDialog:t,...n}=e,r=sk(t);return(0,g.jsx)(lh,{...r,...n})},"AlertDialogPortal"),sO=y.forwardRef(sb(function(e,t){let{__scopeAlertDialog:n,...r}=e,a=sk(n);return(0,g.jsx)(lg,{...a,...r,ref:t})},"AlertDialogOverlay")),[sC,sN]=sx("AlertDialogContent"),sP=y.forwardRef(sb(function(e,t){let{__scopeAlertDialog:n,children:r,...a}=e,o=sk(n),i=aY(t,y.useRef(null)),l=y.useRef(null);return(0,g.jsx)(sC,{scope:n,cancelRef:l,children:(0,g.jsx)(lx,{role:"alertdialog",...o,...a,ref:i,onOpenAutoFocus:oc(a.onOpenAutoFocus,e=>{e.preventDefault(),l.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:r})})},"AlertDialogContent")),sE=y.forwardRef(sb(function(e,t){let{__scopeAlertDialog:n,...r}=e,a=sk(n);return(0,g.jsx)(lS,{...a,...r,ref:t})},"AlertDialogTitle")),s_=y.forwardRef(sb(function(e,t){let{__scopeAlertDialog:n,...r}=e,a=sk(n);return(0,g.jsx)(lO,{...a,...r,ref:t})},"AlertDialogDescription")),sz=y.forwardRef(sb(function(e,t){let{__scopeAlertDialog:n,...r}=e,a=sk(n);return(0,g.jsx)(lC,{...a,...r,ref:t})},"AlertDialogAction")),sT=y.forwardRef(sb(function(e,t){let{__scopeAlertDialog:n,...r}=e,{cancelRef:a}=sN("AlertDialogCancel",n),o=sk(n),i=aY(t,a);return(0,g.jsx)(lC,{...o,...r,ref:i})},"AlertDialogCancel"));function sA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function sR(e,t){if(null==e)return{};var n,r,a,o={};if("u">typeof Reflect&&Reflect.ownKeys){for(a=0,n=Reflect.ownKeys(Object(e));a<n.length;a++)r=n[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}if(o=function(e,t){if(null==e)return{};var n,r,a={},o=Object.getOwnPropertyNames(e);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n]);return a}(e,t),Object.getOwnPropertySymbols)for(a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)r=n[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function sL(e){var t=e.className,n=sR(e,["className"]);return(0,g.jsx)(sO,sA({"data-slot":"alert-dialog-overlay",className:aR("fixed inset-0 z-50 bg-black/70 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t)},n))}function sI(e){var t=e.className,n=sR(e,["className"]);return(0,g.jsxs)(sS,{children:[(0,g.jsx)(sL,{}),(0,g.jsx)(sP,sA({"data-slot":"alert-dialog-content",className:aR("fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border bg-card p-6 shadow-2xl duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-2xl",t)},n))]})}function sM(e){var t=e.className,n=sR(e,["className"]);return(0,g.jsx)("div",sA({className:aR("flex flex-col space-y-2 text-center sm:text-left",t)},n))}function sD(e){var t=e.className,n=sR(e,["className"]);return(0,g.jsx)("div",sA({className:aR("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t)},n))}function sF(e){var t=e.className,n=sR(e,["className"]);return(0,g.jsx)(sE,sA({className:aR("text-lg font-semibold",t)},n))}function s$(e){var t=e.className,n=sR(e,["className"]);return(0,g.jsx)(s_,sA({className:aR("text-sm text-muted-foreground",t)},n))}function sU(e){var t=e.className,n=sR(e,["className"]);return(0,g.jsx)(sz,sA({className:aR(oa(),t)},n))}function sH(e){var t=e.className,n=sR(e,["className"]);return(0,g.jsx)(sT,sA({className:aR(oa({variant:"outline"}),"mt-2 sm:mt-0",t)},n))}function sB(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function sK(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,a=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],i=!0,l=!1;try{for(a=a.call(e);!(i=(n=a.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){l=!0,r=e}finally{try{i||null==a.return||a.return()}finally{if(l)throw r}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return sB(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sB(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sV(e){switch(e){case"in-sync":return"border-transparent bg-emerald-500/15 text-emerald-600 dark:text-emerald-400";case"drifted":return"border-amber-500/30 text-amber-700 dark:text-amber-300";case"missing":case"invalid":return"border-transparent bg-destructive/15 text-destructive";default:return""}}function sq(e){var t,n=e.harness,r=e.open,a=e.onOpenChange,o=(0,x.Bd)().t,i=ss(function(e){return e.drift}),l=ss(function(e){return e.driftLoading}),s=ss(function(e){return e.reapplyDrift}),c=ss(function(e){return e.adoptDrift}),u=sK((0,y.useState)(null),2),d=u[0],f=u[1],p=sK((0,y.useState)(null),2),h=p[0],m=p[1],v=(0,y.useMemo)(function(){var e;return null!=(e=null==i?void 0:i.find(function(e){return e.harness===n.id}))?e:null},[i,n.id]),b=null!=(t=null==v?void 0:v.files.filter(function(e){return"in-sync"!==e.status}))?t:[],w=(null==v?void 0:v.active)===!0;return(0,g.jsxs)(lc,{open:r,onOpenChange:a,children:[(0,g.jsxs)(lT,{className:"flex max-h-[85vh] w-[min(64rem,calc(100vw-2rem))] max-w-5xl flex-col overflow-hidden",children:[(0,g.jsxs)(lA,{children:[(0,g.jsx)(lL,{children:o("drift.dialogTitle",{harness:n.label})}),(0,g.jsx)(lI,{children:o(w?"drift.legend":"drift.noActiveProfile")})]}),(0,g.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[l&&null===v?(0,g.jsx)("p",{className:"py-8 text-center text-sm text-muted-foreground",children:o("drift.checking")}):null,null!==v||l?null:(0,g.jsx)("p",{className:"py-8 text-center text-sm text-muted-foreground",children:o("drift.noData")}),v&&!w?(0,g.jsx)("p",{className:"py-8 text-center text-sm text-muted-foreground",children:o("drift.nothingToCompare")}):null,v&&w?(0,g.jsx)("div",{className:"space-y-3",children:0===b.length?(0,g.jsx)("p",{className:"py-4 text-center text-sm text-muted-foreground",children:o("drift.allInSync")}):b.map(function(e){return(0,g.jsx)(sW,{file:e},e.key)})}):null]}),h?(0,g.jsx)("p",{className:"text-sm text-destructive",children:l7(o,h)}):null,(0,g.jsxs)(lR,{children:[(0,g.jsx)(oo,{variant:"outline",disabled:null===v||!w,onClick:function(){return f("adopt")},children:o("drift.adopt")}),(0,g.jsx)(oo,{disabled:null===v||!w,onClick:function(){return f("reapply")},children:o("drift.reapply")})]})]}),(0,g.jsx)(sj,{open:"reapply"===d,onOpenChange:function(e){return!e&&f(null)},children:(0,g.jsxs)(sI,{children:[(0,g.jsxs)(sM,{children:[(0,g.jsx)(sF,{children:o("drift.reapplyTitle")}),(0,g.jsx)(s$,{children:o("drift.reapplyBody",{harness:n.label})})]}),(0,g.jsxs)(sD,{children:[(0,g.jsx)(sH,{children:o("common.cancel")}),(0,g.jsx)(sU,{onClick:function(){f(null),m(null),s(n.id).then(function(){return a(!1)}).catch(function(e){m(l8(e,"drift.reapplyFailed"))})},children:o("drift.confirmReapply")})]})]})}),(0,g.jsx)(sj,{open:"adopt"===d,onOpenChange:function(e){return!e&&f(null)},children:(0,g.jsxs)(sI,{children:[(0,g.jsxs)(sM,{children:[(0,g.jsx)(sF,{children:o("drift.adoptTitle")}),(0,g.jsx)(s$,{children:o("drift.adoptBody")})]}),(0,g.jsxs)(sD,{children:[(0,g.jsx)(sH,{children:o("common.cancel")}),(0,g.jsx)(sU,{onClick:function(){f(null),m(null),c(n.id).then(function(){return a(!1)}).catch(function(e){m(l8(e,"drift.adoptFailed"))})},children:o("drift.confirmAdopt")})]})]})})]})}function sW(e){var t=e.file,n=(0,x.Bd)().t;return(0,g.jsxs)("div",{className:"space-y-1.5",children:[(0,g.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,g.jsx)(aI,{className:sV(t.status),children:n("drift.status.".concat(t.status))}),(0,g.jsx)("p",{className:"min-w-0 truncate font-mono text-xs text-muted-foreground",title:t.path,children:t.path})]}),(0,g.jsx)(aK,{files:[{path:t.path,existed:null!==t.currentContent,content:t.expectedContent,currentContent:t.currentContent}]})]})}function sZ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function sG(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,a=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],i=!0,l=!1;try{for(a=a.call(e);!(i=(n=a.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){l=!0,r=e}finally{try{i||null==a.return||a.return()}finally{if(l)throw r}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return sZ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sZ(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sJ(e){var t,n,r,a=e.harness,o=(0,x.Bd)().t,i=ss(function(e){return e.doctor}),l=ss(function(e){return e.doctorLoading}),s=ss(function(e){return e.doctorError}),c=ss(function(e){return e.loadDoctor}),u=ss(function(e){return e.drift}),d=ss(function(e){return e.driftLoading}),f=ss(function(e){return e.driftError}),p=ss(function(e){return e.loadDrift}),h=sG((0,y.useState)(!1),2),m=h[0],v=h[1],b=sG((0,y.useState)(!1),2),w=b[0],k=b[1],j=null!=(t=null==i?void 0:i.find(function(e){return e.harness===a.id}))?t:null,S=null!=(n=null==u?void 0:u.find(function(e){return e.harness===a.id}))?n:null,O=null!=(r=null==S?void 0:S.files.filter(function(e){return"in-sync"!==e.status}))?r:[],C=null!==S&&S.active&&O.length>0&&"in-sync"!==S.status;return(0,y.useEffect)(function(){c(a.id)},[a.id,c]),(0,y.useEffect)(function(){null===u&&p()},[u,p]),(0,g.jsxs)("section",{className:"rounded-2xl border bg-card p-5 shadow-[0_12px_34px_-28px_rgb(36_39_70/0.38)]",children:[(0,g.jsxs)("div",{className:"flex items-center gap-2",children:[(0,g.jsx)(sf,{className:"size-4 text-primary"}),(0,g.jsx)("h3",{className:"font-semibold",children:o("doctor.title")}),(0,g.jsx)("span",{className:"ml-auto",children:(0,g.jsx)(oo,{size:"icon",variant:"ghost","aria-label":o("doctor.rerun"),onClick:function(){c(a.id),p()},children:(0,g.jsx)(sp,{className:l||d?"animate-spin":void 0})})})]}),(0,g.jsxs)("div",{className:"mt-4 space-y-3",children:[s?(0,g.jsx)("p",{className:"text-sm text-destructive",children:l7(o,s)}):null===j?(0,g.jsx)("p",{className:"text-sm text-muted-foreground",children:o("doctor.checking")}):(0,g.jsx)(sQ,{report:j}),f?(0,g.jsx)("p",{className:"text-sm text-destructive",children:l7(o,f)}):null===S?(0,g.jsx)("p",{className:"text-sm text-muted-foreground",children:o("drift.checking")}):(0,g.jsxs)("div",{className:"space-y-2",children:[(0,g.jsx)(sY,{report:S}),O.length>0?(0,g.jsxs)("ul",{className:"space-y-1",children:[O.slice(0,3).map(function(e){return(0,g.jsxs)("li",{className:"flex items-center gap-2 text-xs",children:[(0,g.jsx)("span",{className:"size-1.5 shrink-0 rounded-full bg-destructive/70"}),(0,g.jsx)("span",{className:"truncate font-mono text-muted-foreground",children:e.path.split("/").pop()}),(0,g.jsx)("span",{className:"ml-auto shrink-0 font-mono text-[11px] text-muted-foreground",children:o("drift.status.".concat(e.status))})]},e.key)}),O.length>3?(0,g.jsx)("li",{className:"pl-3.5 text-xs text-muted-foreground",children:o("drift.moreFiles",{count:O.length-3})}):null]}):null]})]}),(0,g.jsxs)("div",{className:"mt-4 grid gap-2 ".concat(C?"grid-cols-2":"grid-cols-1"),children:[(0,g.jsx)(oo,{size:"sm",variant:"outline",disabled:null===j,onClick:function(){return v(!0)},children:o("doctor.viewDetails")}),C?(0,g.jsx)(oo,{size:"sm",variant:"outline",onClick:function(){return k(!0)},children:o("drift.viewDiff")}):null]}),(0,g.jsx)(sg,{harnessId:a.id,open:m,onOpenChange:v}),(0,g.jsx)(sq,{harness:a,open:w,onOpenChange:k})]})}function sQ(e){var t=e.report,n=(0,x.Bd)().t,r=function(e){var t={ok:0,warn:0,error:0,unknown:0},n=!0,r=!1,a=void 0;try{for(var o,i=e.checks[Symbol.iterator]();!(n=(o=i.next()).done);n=!0){var l=o.value;t[l.status]++}}catch(e){r=!0,a=e}finally{try{n||null==i.return||i.return()}finally{if(r)throw a}}return t}(t),a=["error","warn","ok","unknown"].filter(function(e){return r[e]>0});return 0===a.length?(0,g.jsx)("p",{className:"text-sm text-muted-foreground",children:n("doctor.noChecks")}):(0,g.jsx)("div",{className:"flex flex-wrap gap-2",children:a.map(function(e){var t,a;return(0,g.jsx)(aI,{variant:"error"===(t=e)?"destructive":"ok"===t?"secondary":"outline",className:"warn"===e?"border-amber-500/30 text-amber-700 dark:text-amber-300":void 0,children:n("doctor.count".concat((a=e,"".concat(a[0].toUpperCase()).concat(a.slice(1)))),{count:r[e]})},e)})})}function sY(e){var t=e.report,n=(0,x.Bd)().t;if(!t.active)return(0,g.jsx)(aI,{variant:"secondary",children:n("harness.inactive")});if("in-sync"===t.status)return(0,g.jsx)(aI,{variant:"secondary",children:n("drift.none")});if("drifted"===t.status){var r=t.files.filter(function(e){return"in-sync"!==e.status}).length;return(0,g.jsx)(aI,{variant:"outline",className:"border-amber-500/30 text-amber-700 dark:text-amber-300",children:n("drift.mismatch",{count:r})})}return(0,g.jsx)(aI,{className:sV(t.status),children:n("drift.status.".concat(t.status))})}let sX=O("github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]),s0=O("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),s1=O("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]),s2=O("cloud-upload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]),s4=O("cloud-download",[["path",{d:"M12 13v8l-4-4",key:"1f5nwf"}],["path",{d:"m12 21 4-4",key:"1lfcce"}],["path",{d:"M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284",key:"ui1hmy"}]]),s3=O("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),s5=O("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),s6=O("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),s8=O("key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);function s9(e){let[t,n]=y.useState(void 0);return og(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,a;if(!Array.isArray(t)||!t.length)return;let o=t[0];if("borderBoxSize"in o){let e=o.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,a=t.blockSize}else r=e.offsetWidth,a=e.offsetHeight;n({width:r,height:a})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}(0,Object.defineProperty)(s9,"name",{value:"useSize",configurable:!0});var s7=Object.defineProperty,ce=(e,t)=>s7(e,"name",{value:t,configurable:!0}),ct="Checkbox",[cn,cr]=oh(ct),[ca,co]=cn(ct);function ci(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:a,disabled:o,form:i,name:l,onCheckedChange:s,required:c,value:u="on",internal_do_not_use_render:d}=e,[f,p]=oP({prop:n,defaultProp:a??!1,onChange:s,caller:ct}),[h,m]=y.useState(null),[v,b]=y.useState(null),x=y.useRef(!1),[w,k]=y.useReducer(e=>e+1,0),j=!h||!!i||!!h.closest("form"),S={checked:f,disabled:o,setChecked:p,control:h,setControl:m,name:l,form:i,value:u,hasConsumerStoppedPropagationRef:x,userInteractionCount:w,onUserInteraction:k,required:c,defaultChecked:!cf(a)&&a,isFormControl:j,bubbleInput:v,setBubbleInput:b};return(0,g.jsx)(ca,{scope:t,...S,children:cd(d)?d(S):r})}ce(ci,"CheckboxProvider");var cl=y.forwardRef(ce(function({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},a){let{control:o,value:i,disabled:l,checked:s,required:c,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,onUserInteraction:p,isFormControl:h,bubbleInput:m}=co("CheckboxTrigger",e),v=aY(a,u),b=y.useRef(s);return y.useEffect(()=>{let e=o?.form;if(e){let t=ce(()=>d(b.current),"reset");return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[o,d]),(0,g.jsx)(oR.button,{type:"button",role:"checkbox","aria-checked":cf(s)?"mixed":s,"aria-required":c,"data-state":cp(s),"data-disabled":l?"":void 0,disabled:l,value:i,...r,ref:v,onKeyDown:oc(t,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:oc(n,e=>{p(),d(e=>!!cf(e)||!e),m&&h&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})},"CheckboxTrigger")),cs=y.forwardRef(ce(function(e,t){let{__scopeCheckbox:n,name:r,checked:a,defaultChecked:o,required:i,disabled:l,value:s,onCheckedChange:c,form:u,...d}=e;return(0,g.jsx)(ci,{__scopeCheckbox:n,checked:a,defaultChecked:o,disabled:l,required:i,onCheckedChange:c,name:r,form:u,value:s,internal_do_not_use_render:({isFormControl:e})=>(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(cl,{...d,ref:t,__scopeCheckbox:n}),e&&(0,g.jsx)(cu,{__scopeCheckbox:n})]})})},"Checkbox")),cc=y.forwardRef(ce(function(e,t){let{__scopeCheckbox:n,forceMount:r,...a}=e,o=co("CheckboxIndicator",n);return(0,g.jsx)(il,{present:r||cf(o.checked)||!0===o.checked,children:(0,g.jsx)(oR.span,{"data-state":cp(o.checked),"data-disabled":o.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})},"CheckboxIndicator")),cu=y.forwardRef(ce(function({__scopeCheckbox:e,onClick:t,...n},r){let{control:a,hasConsumerStoppedPropagationRef:o,userInteractionCount:i,checked:l,defaultChecked:s,required:c,disabled:u,name:d,value:f,form:p,bubbleInput:h,setBubbleInput:m}=co("CheckboxBubbleInput",e),v=aY(r,m),b=s9(a),x=y.useRef(!1),w=y.useRef(l),k=y.useRef(i);y.useEffect(()=>{if(!h)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set,t=i!==k.current;k.current=i;let n=w.current!==l;w.current=l;let r=!(t&&o.current);if(n&&e){x.current=!t;let n=new Event("click",{bubbles:r});h.indeterminate=cf(l),e.call(h,!cf(l)&&l),h.dispatchEvent(n),x.current=!1}},[h,l,o,i]);let j=y.useRef(!cf(l)&&l);return(0,g.jsx)(oR.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??j.current,required:c,disabled:u,name:d,value:f,form:p,...n,tabIndex:-1,ref:v,onClick:oc(t,e=>{x.current&&e.stopPropagation()}),style:{...n.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"CheckboxBubbleInput"));function cd(e){return"function"==typeof e}function cf(e){return"indeterminate"===e}function cp(e){return cf(e)?"indeterminate":e?"checked":"unchecked"}function ch(e){var t,n,r=e.className,a=function(e,t){if(null==e)return{};var n,r,a,o={};if("u">typeof Reflect&&Reflect.ownKeys){for(a=0,n=Reflect.ownKeys(Object(e));a<n.length;a++)r=n[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}if(o=function(e,t){if(null==e)return{};var n,r,a={},o=Object.getOwnPropertyNames(e);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n]);return a}(e,t),Object.getOwnPropertySymbols)for(a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)r=n[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}(e,["className"]);return(0,g.jsx)(cs,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({"data-slot":"checkbox",className:aR("peer size-4 shrink-0 cursor-pointer rounded-[5px] border border-input bg-card shadow-[0_1px_2px_rgb(20_24_40/0.04)] outline-none transition-[border-color,box-shadow,background-color] hover:border-ring/35 focus-visible:border-ring/50 focus-visible:ring-2 focus-visible:ring-ring/20 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 aria-invalid:focus-visible:border-destructive aria-invalid:focus-visible:ring-destructive/25 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",r)},a),n=n={children:(0,g.jsx)(cc,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current",children:(0,g.jsx)(s5,{className:"size-3",strokeWidth:3.5})})},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))}function cm(e){var t=e.className,n=e.type,r=function(e,t){if(null==e)return{};var n,r,a,o={};if("u">typeof Reflect&&Reflect.ownKeys){for(a=0,n=Reflect.ownKeys(Object(e));a<n.length;a++)r=n[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}if(o=function(e,t){if(null==e)return{};var n,r,a={},o=Object.getOwnPropertyNames(e);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n]);return a}(e,t),Object.getOwnPropertySymbols)for(a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)r=n[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}(e,["className","type"]);return(0,g.jsx)("input",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({type:n,"data-slot":"input",className:aR("flex h-10 w-full rounded-[10px] border border-input bg-card px-3 py-1 text-base shadow-[0_1px_2px_rgb(20_24_40/0.04)] transition-[border-color,box-shadow] file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/20 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 aria-invalid:focus-visible:border-destructive aria-invalid:focus-visible:ring-destructive/25 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t)},r))}ce(cd,"isFunction"),ce(cf,"isIndeterminate"),ce(cp,"getState");var cg=Object.defineProperty,cy=y.forwardRef(cg(function(e,t){return(0,g.jsx)(oR.label,{...e,ref:t,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}})},"name",{value:"Label",configurable:!0}));function cv(e){var t=e.className,n=function(e,t){if(null==e)return{};var n,r,a,o={};if("u">typeof Reflect&&Reflect.ownKeys){for(a=0,n=Reflect.ownKeys(Object(e));a<n.length;a++)r=n[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}if(o=function(e,t){if(null==e)return{};var n,r,a={},o=Object.getOwnPropertyNames(e);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n]);return a}(e,t),Object.getOwnPropertySymbols)for(a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)r=n[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}(e,["className"]);return(0,g.jsx)(cy,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({"data-slot":"label",className:aR("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",t)},n))}function cb(e,[t,n]){return Math.min(n,Math.max(t,e))}(0,Object.defineProperty)(cb,"name",{value:"clamp",configurable:!0});var cx=Object.defineProperty,cw=(e,t)=>cx(e,"name",{value:t,configurable:!0});function ck(e){let t=e+"CollectionProvider",[n,r]=oh(t),[a,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=cw(e=>{let{scope:t,children:n}=e,r=y.useRef(null),o=y.useRef(new Map).current;return(0,g.jsx)(a,{scope:t,itemMap:o,collectionRef:r,children:n})},"CollectionProvider");i.displayName=t;let l=e+"CollectionSlot",s=a1(l),c=y.forwardRef((e,t)=>{let{scope:n,children:r}=e,a=aY(t,o(l,n).collectionRef);return(0,g.jsx)(s,{ref:a,children:r})});c.displayName=l;let u=e+"CollectionItemSlot",d="data-radix-collection-item",f=a1(u),p=y.forwardRef((e,t)=>{let{scope:n,children:r,...a}=e,i=y.useRef(null),l=aY(t,i),s=o(u,n);return y.useEffect(()=>(s.itemMap.set(i,{ref:i,...a}),()=>void s.itemMap.delete(i))),(0,g.jsx)(f,{...{[d]:""},ref:l,children:r})});function h(t){let n=o(e+"CollectionConsumer",t);return y.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return p.displayName=u,cw(h,"useCollection"),[{Provider:i,Slot:c,ItemSlot:p},h,r]}cw(ck,"createCollection");var cj=new WeakMap,cS=class e extends Map{static{cw(this,"OrderedDict")}#e;constructor(e){super(e),this.#e=[...super.keys()],cj.set(this,!0)}set(e,t){return cj.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){let r,a=this.has(t),o=this.#e.length,i=cN(e),l=i>=0?i:o+i,s=l<0||l>=o?-1:l;if(s===this.size||a&&s===this.size-1||-1===s)return this.set(t,n),this;let c=this.size+ +!a;i<0&&l++;let u=[...this.#e],d=!1;for(let e=l;e<c;e++)if(l===e){let o=u[e];u[e]===t&&(o=u[e+1]),a&&this.delete(t),r=this.get(o),this.set(t,n)}else{d||u[e-1]!==t||(d=!0);let n=u[d?e:e-1],a=r;r=this.get(n),this.delete(n),this.set(n,a)}return this}with(t,n,r){let a=new e(this);return a.insert(t,n,r),a}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);return -1===r?this:this.insert(r,t,n)}after(e){let t=this.#e.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);return -1===r?this:this.insert(r+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=cO(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=cO(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return cO(this.#e,e)}from(e,t){let n=this.indexOf(e);if(-1===n)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(-1===n)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return -1}filter(t,n){let r=[],a=0;for(let e of this)Reflect.apply(t,n,[e,a,this])&&r.push(e),a++;return new e(r)}map(t,n){let r=[],a=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,a,this])]),a++;return new e(r)}reduce(...e){let[t,n]=e,r=0,a=n??this.at(0);for(let n of this)a=0===r&&1===e.length?n:Reflect.apply(t,this,[a,n,r,this]),r++;return a}reduceRight(...e){let[t,n]=e,r=n??this.at(-1);for(let n=this.size-1;n>=0;n--){let a=this.at(n);r=n===this.size-1&&1===e.length?a:Reflect.apply(t,this,[r,a,n,this])}return r}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e,a=this.size-1;if(void 0===t)return r;t<0&&(t+=this.size),void 0!==n&&n>0&&(a=n-1);for(let e=t;e<=a;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function cO(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let n=cC(e,t);return -1===n?void 0:e[n]}function cC(e,t){let n=e.length,r=cN(t),a=r>=0?r:n+r;return a<0||a>=n?-1:a}function cN(e){return e!=e||0===e?0:Math.trunc(e)}function cP(e,t){if(e===t)return!0;if("object"!=typeof e||"object"!=typeof t||null==e||null==t)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}function cE(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function c_(e,t){return e[1].element&&t[1].element?cE(e[1].element,t[1].element)?-1:1:0}function cz(e){return new MutationObserver(t=>{for(let n of t)if("childList"===n.type)return void e()})}cw(cO,"at"),cw(cC,"toSafeIndex"),cw(cN,"toSafeInteger"),cw(function(e){let t=e+"CollectionProvider",[n,r]=oh(t),[a,o]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new cS,setItemMap:cw(()=>void 0,"setItemMap")}),i=cw(({state:e,...t})=>e?(0,g.jsx)(s,{...t,state:e}):(0,g.jsx)(l,{...t}),"CollectionProvider");i.displayName=t;let l=cw(e=>{let t=m();return(0,g.jsx)(s,{...e,state:t})},"CollectionInit");l.displayName=t+"Init";let s=cw(e=>{let{scope:t,children:n,state:r}=e,o=y.useRef(null),[i,l]=y.useState(null),s=aY(o,l),[c,u]=r;return y.useEffect(()=>{if(!i)return;let e=cz(()=>{});return e.observe(i,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[i]),(0,g.jsx)(a,{scope:t,itemMap:c,setItemMap:u,collectionRef:s,collectionRefObject:o,collectionElement:i,children:n})},"CollectionProviderImpl");s.displayName=t+"Impl";let c=e+"CollectionSlot",u=a1(c),d=y.forwardRef((e,t)=>{let{scope:n,children:r}=e,a=aY(t,o(c,n).collectionRef);return(0,g.jsx)(u,{ref:a,children:r})});d.displayName=c;let f=e+"CollectionItemSlot",p=a1(f),h=y.forwardRef((e,t)=>{let{scope:n,children:r,...a}=e,i=y.useRef(null),[l,s]=y.useState(null),c=aY(t,i,s),{setItemMap:u}=o(f,n),d=y.useRef(a);cP(d.current,a)||(d.current=a);let h=d.current;return y.useEffect(()=>(u(e=>l?e.has(l)?e.set(l,{...h,element:l}).toSorted(c_):(e.set(l,{...h,element:l}),e.toSorted(c_)):e),()=>{u(e=>l&&e.has(l)?(e.delete(l),new cS(e)):e)}),[l,h,u]),(0,g.jsx)(p,{"data-radix-collection-item":"",ref:c,children:r})});function m(){return y.useState(new cS)}function v(t){let{itemMap:n}=o(e+"CollectionConsumer",t);return n}return h.displayName=f,cw(m,"useInitCollection"),cw(v,"useCollection"),[{Provider:i,Slot:d,ItemSlot:h},{createCollectionScope:r,useCollection:v,useInitCollection:m}]},"createCollection"),cw(cP,"shallowEqual"),cw(cE,"isElementPreceding"),cw(c_,"sortByDocumentPosition"),cw(cz,"getChildListObserver");var cT=Object.defineProperty,cA=y.createContext(void 0);function cR(e){let t=y.useContext(cA);return e||t||"ltr"}cT(cR,"name",{value:"useDirection",configurable:!0});let cL=["top","right","bottom","left"],cI=Math.min,cM=Math.max,cD=Math.round,cF=Math.floor,c$=e=>({x:e,y:e}),cU={left:"right",right:"left",bottom:"top",top:"bottom"};function cH(e,t){return"function"==typeof e?e(t):e}function cB(e){return e.split("-")[0]}function cK(e){return e.split("-")[1]}function cV(e){return"x"===e?"y":"x"}function cq(e){return"y"===e?"height":"width"}function cW(e){let t=e[0];return"t"===t||"b"===t?"y":"x"}function cZ(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}let cG=["left","right"],cJ=["right","left"],cQ=["top","bottom"],cY=["bottom","top"];function cX(e){let t=cB(e);return cU[t]+e.slice(t.length)}function c0(e){var t,n,r,a;return"number"!=typeof e?{top:null!=(t=e.top)?t:0,right:null!=(n=e.right)?n:0,bottom:null!=(r=e.bottom)?r:0,left:null!=(a=e.left)?a:0}:{top:e,right:e,bottom:e,left:e}}function c1(e){let{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function c2(e,t,n){let r,{reference:a,floating:o}=e,i=cW(t),l=cV(cW(t)),s=cq(l),c=cB(t),u=a.x+a.width/2-o.width/2,d=a.y+a.height/2-o.height/2,f=a[s]/2-o[s]/2;switch(c){case"top":r={x:u,y:a.y-o.height};break;case"bottom":r={x:u,y:a.y+a.height};break;case"right":r={x:a.x+a.width,y:d};break;case"left":r={x:a.x-o.width,y:d};break;default:r={x:a.x,y:a.y}}let p=cK(t);return p&&(r[l]+=f*("end"===p?1:-1)*(n&&"y"===i?-1:1)),r}async function c4(e,t){var n;void 0===t&&(t={});let{x:r,y:a,platform:o,rects:i,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=cH(t,e),h=c0(p),m=l[f?"floating"===d?"reference":"floating":d],g=c1(await o.getClippingRect({element:null==(n=await (null==o.isElement?void 0:o.isElement(m)))||n?m:m.contextElement||await (null==o.getDocumentElement?void 0:o.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:s})),y="floating"===d?{x:r,y:a,width:i.floating.width,height:i.floating.height}:i.reference,v=await (null==o.getOffsetParent?void 0:o.getOffsetParent(l.floating)),b=await (null==o.isElement?void 0:o.isElement(v))&&await (null==o.getScale?void 0:o.getScale(v))||{x:1,y:1},x=c1(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:v,strategy:s}):y);return{top:(g.top-x.top+h.top)/b.y,bottom:(x.bottom-g.bottom+h.bottom)/b.y,left:(g.left-x.left+h.left)/b.x,right:(x.right-g.right+h.right)/b.x}}let c3=async(e,t,n)=>{let{placement:r="bottom",strategy:a="absolute",middleware:o=[],platform:i}=n,l=i.detectOverflow?i:{...i,detectOverflow:c4},s=await (null==i.isRTL?void 0:i.isRTL(t)),c=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:u,y:d}=c2(c,r,s),f=r,p=0,h={};for(let n=0;n<o.length;n++){let m=o[n];if(!m)continue;let{name:g,fn:y}=m,{x:v,y:b,data:x,reset:w}=await y({x:u,y:d,initialPlacement:r,placement:f,strategy:a,middlewareData:h,rects:c,platform:l,elements:{reference:e,floating:t}});u=null!=v?v:u,d=null!=b?b:d,h[g]={...h[g],...x},w&&p<50&&(p++,"object"==typeof w&&(w.placement&&(f=w.placement),w.rects&&(c=!0===w.rects?await i.getElementRects({reference:e,floating:t,strategy:a}):w.rects),{x:u,y:d}=c2(c,f,s)),n=-1)}return{x:u,y:d,placement:f,strategy:a,middlewareData:h}};function c5(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function c6(e){return cL.some(t=>e[t]>=0)}let c8=new Set(["left","top"]);async function c9(e,t){let{placement:n,platform:r,elements:a}=e,o=await (null==r.isRTL?void 0:r.isRTL(a.floating)),i=cB(n),l=cK(n),s="y"===cW(n),c=c8.has(i)?-1:1,u=o&&s?-1:1,d=cH(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&"number"==typeof h&&(p="end"===l?-1*h:h),s?{x:p*u,y:f*c}:{x:f*c,y:p*u}}function c7(){return"u">typeof window}function ue(e){return ur(e)?(e.nodeName||"").toLowerCase():"#document"}function ut(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function un(e){var t;return null==(t=(ur(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function ur(e){return!!c7()&&(e instanceof Node||e instanceof ut(e).Node)}function ua(e){return!!c7()&&(e instanceof Element||e instanceof ut(e).Element)}function uo(e){return!!c7()&&(e instanceof HTMLElement||e instanceof ut(e).HTMLElement)}function ui(e){return!(!c7()||"u"<typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof ut(e).ShadowRoot)}function ul(e){let{overflow:t,overflowX:n,overflowY:r,display:a}=um(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==a&&"contents"!==a}function us(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}let uc=/transform|translate|scale|rotate|perspective|filter/,uu=/paint|layout|strict|content/,ud=e=>!!e&&"none"!==e;function uf(e){let t=ua(e)?um(e):e;return ud(t.transform)||ud(t.translate)||ud(t.scale)||ud(t.rotate)||ud(t.perspective)||!up()&&(ud(t.backdropFilter)||ud(t.filter))||uc.test(t.willChange||"")||uu.test(t.contain||"")}function up(){return null==e&&(e="u">typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),e}function uh(e){return/^(html|body|#document)$/.test(ue(e))}function um(e){return ut(e).getComputedStyle(e)}function ug(e){return ua(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function uy(e){if("html"===ue(e))return e;let t=e.assignedSlot||e.parentNode||ui(e)&&e.host||un(e);return ui(t)?t.host:t}function uv(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let a=function e(t){let n=uy(t);return uh(n)?(t.ownerDocument||t).body:uo(n)&&ul(n)?n:e(n)}(e),o=a===(null==(r=e.ownerDocument)?void 0:r.body),i=ut(a);if(!o)return t.concat(a,uv(a,[],n));{let e=ub(i);return t.concat(i,i.visualViewport||[],ul(a)?a:[],e&&n?uv(e):[])}}function ub(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ux(e){let t=um(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,a=uo(e),o=a?e.offsetWidth:n,i=a?e.offsetHeight:r,l=cD(n)!==o||cD(r)!==i;return l&&(n=o,r=i),{width:n,height:r,$:l}}function uw(e){return ua(e)?e:e.contextElement}function uk(e){let t=uw(e);if(!uo(t))return c$(1);let n=t.getBoundingClientRect(),{width:r,height:a,$:o}=ux(t),i=(o?cD(n.width):n.width)/r,l=(o?cD(n.height):n.height)/a;return i&&Number.isFinite(i)||(i=1),l&&Number.isFinite(l)||(l=1),{x:i,y:l}}let uj=c$(0);function uS(e){let t=ut(e);return up()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:uj}function uO(e,t,n,r){var a;void 0===t&&(t=!1),void 0===n&&(n=!1);let o=e.getBoundingClientRect(),i=uw(e),l=c$(1);t&&(r?ua(r)&&(l=uk(r)):l=uk(e));let s=(void 0===(a=n)&&(a=!1),r&&a&&r===ut(i))?uS(i):c$(0),c=(o.left+s.x)/l.x,u=(o.top+s.y)/l.y,d=o.width/l.x,f=o.height/l.y;if(i&&r){let e=ut(i),t=ua(r)?ut(r):r,n=e,a=ub(n);for(;a&&t!==n;){let e=uk(a),t=a.getBoundingClientRect(),r=um(a),o=t.left+(a.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(a.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,u*=e.y,d*=e.x,f*=e.y,c+=o,u+=i,a=ub(n=ut(a))}}return c1({width:d,height:f,x:c,y:u})}function uC(e,t){let n=ug(e).scrollLeft;return t?t.left+n:uO(un(e)).left+n}function uN(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-uC(e,n),y:n.top+t.scrollTop}}function uP(e,t,n){var r;let a;if("viewport"===t||"layoutViewport"===t)a=function(e,t,n){void 0===n&&(n="viewport");let r="layoutViewport"===n,a=ut(e),o=un(e),i=a.visualViewport,l=o.clientWidth,s=o.clientHeight,c=0,u=0;if(i){let e=!up()||"fixed"===t;r?e||(c=-i.offsetLeft,u=-i.offsetTop):(l=i.width,s=i.height,e&&(c=i.offsetLeft,u=i.offsetTop))}if(0>=uC(o)){let e=o.ownerDocument,t=e.body,n=getComputedStyle(t),r="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(o.clientWidth-t.clientWidth-r),i="stable both-edges"===getComputedStyle(o).scrollbarGutter?a/2:a;i<=25&&(l-=i)}return{width:l,height:s,x:c,y:u}}(e,n,t);else if("document"===t){let t,n,o,i,l,s;t=ug(r=un(e)),n=r.ownerDocument.body,o=cM(r.scrollWidth,r.clientWidth,n.scrollWidth,n.clientWidth),i=cM(r.scrollHeight,r.clientHeight,n.scrollHeight,n.clientHeight),l=-t.scrollLeft+uC(r),s=-t.scrollTop,"rtl"===um(n).direction&&(l+=cM(r.clientWidth,n.clientWidth)-o),a={width:o,height:i,x:l,y:s}}else if(ua(t)){let e,r,o,i,l,s;r=(e=uO(t,!0,"fixed"===n)).top+t.clientTop,o=e.left+t.clientLeft,i=uk(t),l=t.clientWidth*i.x,s=t.clientHeight*i.y,a={width:l,height:s,x:o*i.x,y:r*i.y}}else{let n=uS(e);a={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return c1(a)}function uE(e){return"static"===um(e).position}function u_(e,t){if(!uo(e)||"fixed"===um(e).position)return null;if(t)return t(e);let n=e.offsetParent;return un(e)===n&&(n=n.ownerDocument.body),n}function uz(e,t){var n;let r=ut(e);if(us(e))return r;if(!uo(e)){let t=uy(e);for(;t&&!uh(t);){if(ua(t)&&!uE(t))return t;t=uy(t)}return r}let a=u_(e,t);for(;a&&(n=a,/^(table|td|th)$/.test(ue(n)))&&uE(a);)a=u_(a,t);return a&&uh(a)&&uE(a)&&!uf(a)?r:a||function(e){let t=uy(e);for(;uo(t)&&!uh(t);){if(uf(t))return t;if(us(t))break;t=uy(t)}return null}(e)||r}let uT=async function(e){let t=this.getOffsetParent||uz,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=uo(t),a=un(t),o="fixed"===n,i=uO(e,!0,o,t),l={scrollLeft:0,scrollTop:0},s=c$(0);if((r||!o)&&(("body"!==ue(t)||ul(a))&&(l=ug(t)),r)){let e=uO(t,!0,o,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}!r&&a&&(s.x=uC(a));let c=!a||r||o?c$(0):uN(a,l);return{x:i.left+l.scrollLeft-s.x-c.x,y:i.top+l.scrollTop-s.y-c.y,width:i.width,height:i.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},uA={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e,o="fixed"===a,i=un(r),l=!!t&&us(t.floating);if(r===i||l&&o)return n;let s={scrollLeft:0,scrollTop:0},c=c$(1),u=c$(0),d=uo(r);if((d||!o)&&(("body"!==ue(r)||ul(i))&&(s=ug(r)),d)){let e=uO(r);c=uk(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=!i||d||o?c$(0):uN(i,s);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-s.scrollTop*c.y+u.y+f.y}},getDocumentElement:un,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e,o=[..."clippingAncestors"===n?us(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=uv(e,[],!1).filter(e=>ua(e)&&"body"!==ue(e)),a=null,o="fixed"===um(e).position,i=o?uy(e):e;for(;ua(i)&&!uh(i);){let e=um(i),t=uf(i),n=a?a.position:o?"fixed":"";t||"fixed"!==n&&("absolute"!==n||"static"!==e.position)?a=e:r=r.filter(e=>e!==i),i=uy(i)}return t.set(e,r),r}(t,this._c):[].concat(n),r],i=uP(t,o[0],a),l=i.top,s=i.right,c=i.bottom,u=i.left;for(let e=1;e<o.length;e++){let n=uP(t,o[e],a);l=cM(n.top,l),s=cI(n.right,s),c=cI(n.bottom,c),u=cM(n.left,u)}return{width:s-u,height:c-l,x:u,y:l}},getOffsetParent:uz,getElementRects:uT,getClientRects:function(e){return e.getClientRects?Array.from(e.getClientRects()):[]},getDimensions:function(e){let{width:t,height:n}=ux(e);return{width:t,height:n}},getScale:uk,isElement:ua,isRTL:function(e){return"rtl"===um(e).direction}};function uR(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}let uL=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:a,rects:o,platform:i,elements:l,middlewareData:s}=t,{element:c,padding:u=0}=cH(e,t)||{};if(null==c)return{};let d=c0(u),f={x:n,y:r},p=cV(cW(a)),h=cq(p),m=await i.getDimensions(c),g="y"===p,y=g?"clientHeight":"clientWidth",v=o.reference[h]+o.reference[p]-f[p]-o.floating[h],b=f[p]-o.reference[p],x=await (null==i.getOffsetParent?void 0:i.getOffsetParent(c)),w=x?x[y]:0;w&&await (null==i.isElement?void 0:i.isElement(x))||(w=l.floating[y]||o.floating[h]);let k=w/2-m[h]/2-1,j=cI(d[g?"top":"left"],k),S=cI(d[g?"bottom":"right"],k),O=w-m[h]-S,C=w/2-m[h]/2+(v/2-b/2),N=cM(j,cI(C,O)),P=!s.arrow&&null!=cK(a)&&C!==N&&o.reference[h]/2-(C<j?j:S)-m[h]/2<0,E=P?C<j?C-j:C-O:0;return{[p]:f[p]+E,data:{[p]:N,centerOffset:C-N-E,...P&&{alignmentOffset:E}},reset:P}}});var uI="u">typeof document?y.useLayoutEffect:function(){};function uM(e,t){let n,r,a;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!uM(e[r],t[r]))return!1;return!0}if((n=(a=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,a[r]))return!1;for(r=n;0!=r--;){let n=a[r];if(("_owner"!==n||!e.$$typeof)&&!uM(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function uD(e){return"u"<typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function uF(e,t){let n=uD(e);return Math.round(t*n)/n}function u$(e){let t=y.useRef(e);return uI(()=>{t.current=e}),t}var uU=Object.defineProperty,uH=(e,t)=>uU(e,"name",{value:t,configurable:!0}),uB="Popper",[uK,uV]=oh(uB),[uq,uW]=uK(uB),uZ=uH(e=>{let{__scopePopper:t,children:n}=e,[r,a]=y.useState(null),[o,i]=y.useState(void 0);return(0,g.jsx)(uq,{scope:t,anchor:r,onAnchorChange:a,placementState:o,setPlacementState:i,children:n})},"Popper"),uG=y.forwardRef(uH(function(e,t){let{__scopePopper:n,virtualRef:r,...a}=e,o=uW("PopperAnchor",n),i=y.useRef(null),l=o.onAnchorChange,s=aY(t,y.useCallback(e=>{i.current=e,e&&l(e)},[l])),c=y.useRef(null);y.useEffect(()=>{if(!r)return;let e=c.current;c.current=r.current,e!==c.current&&l(c.current)});let u=o.placementState&&u2(o.placementState),d=u?.[0],f=u?.[1];return r?null:(0,g.jsx)(oR.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...a,ref:s})},"PopperAnchor")),uJ="PopperContent",[uQ,uY]=uK(uJ),uX=y.forwardRef(uH(function(e,t){var n,r,a,o,i,l,s,c,u,d,f,p,h,m,v,b,x,w,k,j,S;let O,C,N,P,E,_,{__scopePopper:z,side:T="bottom",sideOffset:A=0,align:R="center",alignOffset:L=0,arrowPadding:I=0,avoidCollisions:M=!0,collisionBoundary:D=[],collisionPadding:F=0,sticky:$="partial",hideWhenDetached:U=!1,updatePositionStrategy:H="optimized",onPlaced:B,...K}=e,V=uW(uJ,z),[q,W]=y.useState(null),Z=aY(t,W),[G,J]=y.useState(null),Q=s9(G),Y=Q?.width??0,X=Q?.height??0,ee="number"==typeof F?F:{top:0,right:0,bottom:0,left:0,...F},et=Array.isArray(D)?D:[D],en=et.length>0,er={padding:ee,boundary:et.filter(u0),altBoundary:en},{refs:ea,floatingStyles:eo,placement:ei,isPositioned:el,middlewareData:es}=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:o,floating:i}={},transform:l=!0,whileElementsMounted:s,open:c}=e,[u,d]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=y.useState(r);uM(f,r)||p(r);let[h,m]=y.useState(null),[g,v]=y.useState(null),b=y.useCallback(e=>{e!==j.current&&(j.current=e,m(e))},[]),x=y.useCallback(e=>{e!==S.current&&(S.current=e,v(e))},[]),w=o||h,k=i||g,j=y.useRef(null),S=y.useRef(null),O=y.useRef(u),C=null!=s,N=u$(s),P=u$(a),E=u$(c),_=y.useCallback(()=>{var e,r;let a,o,i;if(!j.current||!S.current)return;let l={placement:t,strategy:n,middleware:f};P.current&&(l.platform=P.current),(e=j.current,r=S.current,a=new Map,o=null!=l?l:{},i={...uA,...o.platform,_c:a},c3(e,r,{...o,platform:i})).then(e=>{let t={...e,isPositioned:!1!==E.current};z.current&&!uM(O.current,t)&&(O.current=t,oT.flushSync(()=>{d(t)}))})},[f,t,n,P,E]);uI(()=>{!1===c&&O.current.isPositioned&&(O.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[c]);let z=y.useRef(!1);uI(()=>(z.current=!0,()=>{z.current=!1}),[]),uI(()=>{if(w&&(j.current=w),k&&(S.current=k),w&&k){if(N.current)return N.current(w,k,_);_()}},[w,k,_,N,C]);let T=y.useMemo(()=>({reference:j,floating:S,setReference:b,setFloating:x}),[b,x]),A=y.useMemo(()=>({reference:w,floating:k}),[w,k]),R=y.useMemo(()=>{let e={position:n,left:0,top:0};if(!A.floating)return e;let t=uF(A.floating,u.x),r=uF(A.floating,u.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...uD(A.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,l,A.floating,u.x,u.y]);return y.useMemo(()=>({...u,update:_,refs:T,elements:A,floatingStyles:R}),[u,_,T,A,R])}({strategy:"fixed",placement:T+("center"!==R?"-"+R:""),whileElementsMounted:uH((...e)=>(function(e,t,n,r){let a;void 0===r&&(r={});let{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:c=!1}=r,u=uw(e),d=o||i?[...u?uv(u):[],...t?uv(t):[]]:[];d.forEach(e=>{o&&e.addEventListener("scroll",n),i&&e.addEventListener("resize",n)});let f=u&&s?function(e,t,n){let r,a=null,o=un(e);function i(){var e;clearTimeout(r),null==(e=a)||e.disconnect(),a=null}function l(n,s){void 0===n&&(n=!1),void 0===s&&(s=1),i();let c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(n||t(),!f||!p)return;let h={rootMargin:-cF(d)+"px "+-cF(o.clientWidth-(u+f))+"px "+-cF(o.clientHeight-(d+p))+"px "+-cF(u)+"px",threshold:cM(0,cI(1,s))||1},m=!0;function g(t){let n=t[0].intersectionRatio;if(!uR(c,e.getBoundingClientRect()))return l();if(n!==s){if(!m)return l();n?l(!1,n):r=setTimeout(()=>{l(!1,1e-7)},1e3)}m=!1}try{a=new IntersectionObserver(g,{...h,root:o.ownerDocument})}catch(e){a=new IntersectionObserver(g,h)}a.observe(e)}let s=ut(e),c=()=>l(n);return s.addEventListener("resize",c),l(!0),()=>{s.removeEventListener("resize",c),i()}}(u,n,i):null,p=-1,h=null;l&&(h=new ResizeObserver(e=>{let[r]=e;r&&r.target===u&&h&&t&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=h)||e.observe(t)})),n()}),u&&!c&&h.observe(u),t&&h.observe(t));let m=c?uO(e):null;return c&&function t(){let r=uO(e);m&&!uR(m,r)&&n(),m=r,a=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==f||f(),null==(e=h)||e.disconnect(),h=null,c&&cancelAnimationFrame(a)}})(...e,{animationFrame:"always"===H}),"whileElementsMounted"),elements:{reference:V.anchor},middleware:[{name:(O={name:"offset",options:a=n={mainAxis:A+X,alignmentAxis:L},async fn(e){var t,n;let{x:r,y:o,placement:i,middlewareData:l}=e,s=await c9(e,a);return i===(null==(t=l.offset)?void 0:t.placement)&&null!=(n=l.arrow)&&n.alignmentOffset?{}:{x:r+s.x,y:o+s.y,data:{...s,placement:i}}}}).name,fn:O.fn,options:[n,r]},M&&{name:(C={name:"shift",options:u=s={mainAxis:!0,crossAxis:!1,limiter:"partial"===$?{fn:(void 0===(l=o)&&(l={}),{options:l,fn(e){var t,n,r,a;let{x:o,y:i,placement:s,rects:c,middlewareData:u}=e,{offset:d=0,mainAxis:f=!0,crossAxis:p=!0}=cH(l,e),h={x:o,y:i},m=cW(s),g=cV(m),y=h[g],v=h[m],b=cH(d,e),x="number"==typeof b?{mainAxis:b,crossAxis:0}:{mainAxis:null!=(t=b.mainAxis)?t:0,crossAxis:null!=(n=b.crossAxis)?n:0};if(f){let e="y"===g?"height":"width",t=c.reference[g]-c.floating[e]+x.mainAxis,n=c.reference[g]+c.reference[e]-x.mainAxis;y<t?y=t:y>n&&(y=n)}if(p){let e="y"===g?"width":"height",t=c8.has(cB(s)),n=c.reference[m]-c.floating[e]+(t&&(null==(r=u.offset)?void 0:r[m])||0)+(t?0:x.crossAxis),o=c.reference[m]+c.reference[e]+(t?0:(null==(a=u.offset)?void 0:a[m])||0)-(t?x.crossAxis:0);v<n?v=n:v>o&&(v=o)}return{[g]:y,[m]:v}}}).fn,options:[o,i]}:void 0,...er},async fn(e){let{x:t,y:n,placement:r,platform:a}=e,{mainAxis:o=!0,crossAxis:i=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=cH(u,e),c={x:t,y:n},d=await a.detectOverflow(e,s),f=cW(r),p=cV(f),h=c[p],m=c[f],g=(e,t)=>cM(t+d["y"===e?"top":"left"],cI(t,t-d["y"===e?"bottom":"right"]));o&&(h=g(p,h)),i&&(m=g(f,m));let y=l.fn({...e,[p]:h,[f]:m});return{...y,data:{x:y.x-t,y:y.y-n,enabled:{[p]:o,[f]:i}}}}}).name,fn:C.fn,options:[s,c]},M&&{name:(N={name:"flip",options:p=d={...er},async fn(e){var t,n,r,a,o,i,l,s;let c,u,d,{placement:f,middlewareData:h,rects:m,initialPlacement:g,platform:y,elements:v}=e,{mainAxis:b=!0,crossAxis:x=!0,fallbackPlacements:w,fallbackStrategy:k="bestFit",fallbackAxisSideDirection:j="none",flipAlignment:S=!0,...O}=cH(p,e);if(null!=(t=h.arrow)&&t.alignmentOffset)return{};let C=cB(f),N=cW(g),P=cB(g)===g,E=await (null==y.isRTL?void 0:y.isRTL(v.floating)),_=w||(P||!S?[cX(g)]:(c=cX(g),[cZ(g),c,cZ(c)])),z="none"!==j;!w&&z&&_.push(...(u=cK(g),d=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?cJ:cG;return t?cG:cJ;case"left":case"right":return t?cQ:cY;default:return[]}}(cB(g),"start"===j,E),u&&(d=d.map(e=>e+"-"+u),S&&(d=d.concat(d.map(cZ)))),d));let T=[g,..._],A=await y.detectOverflow(e,O),R=[],L=(null==(n=h.flip)?void 0:n.overflows)||[];if(b&&R.push(A[C]),x){let e,t,n,r,a=(i=f,l=m,void 0===(s=E)&&(s=!1),e=cK(i),n=cq(t=cV(cW(i))),r="x"===t?e===(s?"end":"start")?"right":"left":"start"===e?"bottom":"top",l.reference[n]>l.floating[n]&&(r=cX(r)),[r,cX(r)]);R.push(A[a[0]],A[a[1]])}if(L=[...L,{placement:f,overflows:R}],!R.every(e=>e<=0)){let e=((null==(r=h.flip)?void 0:r.index)||0)+1,t=T[e];if(t&&("alignment"!==x||N===cW(t)||L.every(e=>cW(e.placement)!==N||e.overflows[0]>0)))return{data:{index:e,overflows:L},reset:{placement:t}};let n=null==(a=L.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:a.placement;if(!n)switch(k){case"bestFit":{let e=null==(o=L.filter(e=>{if(z){let t=cW(e.placement);return t===N||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:o[0];e&&(n=e);break}case"initialPlacement":n=g}if(f!==n)return{reset:{placement:n}}}return{}}}).name,fn:N.fn,options:[d,f]},{name:(P={name:"size",options:v=h={...er,apply:uH(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:a,height:o}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${a}px`),i.setProperty("--radix-popper-anchor-height",`${o}px`)},"apply")},async fn(e){let t,n,{placement:r,rects:a,platform:o,elements:i}=e,{apply:l=()=>{},...s}=cH(v,e),c=await o.detectOverflow(e,s),u=cB(r),d=cK(r),f="y"===cW(r),{width:p,height:h}=a.floating;"top"===u||"bottom"===u?(t=u,n=d===(await (null==o.isRTL?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(n=u,t="end"===d?"top":"bottom");let m=h-c.top-c.bottom,g=p-c.left-c.right,y=cI(h-c[t],m),b=cI(p-c[n],g),x=e.middlewareData.shift,w=!x,k=y,j=b;null!=x&&x.enabled.x&&(j=g),null!=x&&x.enabled.y&&(k=m),w&&!d&&(f?j=p-2*cM(c.left,c.right):k=h-2*cM(c.top,c.bottom)),await l({...e,availableWidth:j,availableHeight:k});let S=await o.getDimensions(i.floating);return p!==S.width||h!==S.height?{reset:{rects:!0}}:{}}}).name,fn:P.fn,options:[h,m]},G&&{name:(E={name:"arrow",options:w=b={element:G,padding:I},fn(e){let{element:t,padding:n}="function"==typeof w?w(e):w;return t&&({}).hasOwnProperty.call(t,"current")?null!=t.current?uL({element:t.current,padding:n}).fn(e):{}:t?uL({element:t,padding:n}).fn(e):{}}}).name,fn:E.fn,options:[b,x]},u1({arrowWidth:Y,arrowHeight:X}),U&&{name:(_={name:"hide",options:S=k={strategy:"referenceHidden",...er,boundary:en?er.boundary:void 0},async fn(e){let{rects:t,platform:n}=e,{strategy:r="referenceHidden",...a}=cH(S,e);switch(r){case"referenceHidden":{let r=c5(await n.detectOverflow(e,{...a,elementContext:"reference"}),t.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:c6(r)}}}case"escaped":{let r=c5(await n.detectOverflow(e,{...a,altBoundary:!0}),t.floating);return{data:{escapedOffsets:r,escaped:c6(r)}}}default:return{}}}}).name,fn:_.fn,options:[k,j]}]}),ec=V.setPlacementState;og(()=>(ec(ei),()=>{ec(void 0)}),[ei,ec]);let[eu,ed]=u2(ei),ef=oI(B);og(()=>{el&&ef?.()},[el,ef]);let ep=es.arrow?.x,eh=es.arrow?.y,em=es.arrow?.centerOffset!==0,[eg,ey]=y.useState();return og(()=>{q&&ey(window.getComputedStyle(q).zIndex)},[q]),(0,g.jsx)("div",{ref:ea.setFloating,"data-radix-popper-content-wrapper":"",style:{...eo,transform:el?eo.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:eg,"--radix-popper-transform-origin":[es.transformOrigin?.x,es.transformOrigin?.y].join(" "),...es.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,g.jsx)(uQ,{scope:z,placedSide:eu,placedAlign:ed,onArrowChange:J,arrowX:ep,arrowY:eh,shouldHideArrow:em,children:(0,g.jsx)(oR.div,{"data-side":eu,"data-align":ed,...K,ref:Z,style:{...K.style,animation:el?K.style?.animation:"none"}})})})},"PopperContent"));function u0(e){return null!==e}uH(u0,"isNotNull");var u1=uH(e=>({name:"transformOrigin",options:e,fn(t){let{placement:n,rects:r,middlewareData:a}=t,o=a.arrow?.centerOffset!==0,i=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[s,c]=u2(n),u={start:"0%",center:"50%",end:"100%"}[c],d=(a.arrow?.x??0)+i/2,f=(a.arrow?.y??0)+l/2,p="",h="";return"bottom"===s?(p=o?u:`${d}px`,h=`${-l}px`):"top"===s?(p=o?u:`${d}px`,h=`${r.floating.height+l}px`):"right"===s?(p=`${-l}px`,h=o?u:`${f}px`):"left"===s&&(p=`${r.floating.width+l}px`,h=o?u:`${f}px`),{data:{x:p,y:h}}}}),"transformOrigin");function u2(e){let[t,n="center"]=e.split("-");return[t,n]}function u4(e){let t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}uH(u2,"getSideAndAlignFromPlacement"),(0,Object.defineProperty)(u4,"name",{value:"usePrevious",configurable:!0});var u3=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),u5=Object.defineProperty,u6=(e,t)=>u5(e,"name",{value:t,configurable:!0}),u8=[" ","Enter","ArrowUp","ArrowDown"],u9=[" ","Enter"],u7="Select",[de,dt,dn]=ck(u7),[dr,da]=oh(u7,[dn,uV]),di=uV(),[dl,ds]=dr(u7),[dc,du]=dr(u7);function dd(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:o,value:i,defaultValue:l,onValueChange:s,dir:c,name:u,autoComplete:d,disabled:f,required:p,form:h,internal_do_not_use_render:m}=e,v=di(t),[b,x]=y.useState(null),[w,k]=y.useState(null),[j,S]=y.useState(!1),O=cR(c),[C,N]=oP({prop:r,defaultProp:a??!1,onChange:o,caller:u7}),[P,E]=oP({prop:i,defaultProp:l,onChange:s,caller:u7}),_=y.useRef(null),z=y.useRef(P);y.useEffect(()=>{let e=h?b?.ownerDocument.getElementById(h):b?.form;if(e instanceof HTMLFormElement){let t=u6(()=>E(z.current),"reset");return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[h,b,E]);let T=!b||!!h||!!b.closest("form"),[A,R]=y.useState(new Set),L=ox(),I=Array.from(A).map(e=>e.props.value).join(";"),M=y.useCallback(e=>{R(t=>new Set(t).add(e))},[]),D=y.useCallback(e=>{R(t=>{let n=new Set(t);return n.delete(e),n})},[]),F={required:p,trigger:b,onTriggerChange:x,valueNode:w,onValueNodeChange:k,valueNodeHasChildren:j,onValueNodeHasChildrenChange:S,contentId:L,value:P,onValueChange:E,open:C,onOpenChange:N,dir:O,triggerPointerDownPosRef:_,disabled:f,name:u,autoComplete:d,form:h,nativeOptions:A,nativeSelectKey:I,isFormControl:T};return(0,g.jsx)(uZ,{...v,children:(0,g.jsx)(dl,{scope:t,...F,children:(0,g.jsx)(de.Provider,{scope:t,children:(0,g.jsx)(dc,{scope:t,onNativeOptionAdd:M,onNativeOptionRemove:D,children:dG(m)?m(F):n})})})})}u6(dd,"SelectProvider");var df=u6(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,g.jsx)(dd,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,g.jsxs)(g.Fragment,{children:[n,e?(0,g.jsx)(dZ,{__scopeSelect:t}):null]})})},"Select"),dp=y.forwardRef(u6(function(e,t){let{__scopeSelect:n,disabled:r=!1,...a}=e,o=di(n),i=ds("SelectTrigger",n),l=i.disabled||r,s=aY(t,i.onTriggerChange),c=dt(n),u=y.useRef("touch"),[d,f,p]=dQ(e=>{let t=c().filter(e=>!e.disabled),n=t.find(e=>e.value===i.value),r=dY(t,e,n);void 0!==r&&i.onValueChange(r.value)}),h=u6(e=>{l||(i.onOpenChange(!0),p()),e&&(i.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},"handleOpen");return(0,g.jsx)(uG,{asChild:!0,...o,children:(0,g.jsx)(oR.button,{type:"button",role:"combobox","aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":dJ(i.value)?"":void 0,...a,ref:s,onClick:oc(a.onClick,e=>{e.currentTarget.focus(),"mouse"!==u.current&&h(e)}),onPointerDown:oc(a.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(h(e),e.preventDefault())}),onKeyDown:oc(a.onKeyDown,e=>{let t=""!==d.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||f(e.key),(!t||" "!==e.key)&&u8.includes(e.key)&&(h(),e.preventDefault())})})})},"SelectTrigger")),dh=y.forwardRef(u6(function(e,t){let{__scopeSelect:n,className:r,style:a,children:o,placeholder:i="",...l}=e,s=ds("SelectValue",n),{onValueNodeHasChildrenChange:c}=s,u=void 0!==o,d=aY(t,s.onValueNodeChange);og(()=>{c(u)},[c,u]);let f=dJ(s.value);return(0,g.jsx)(oR.span,{...l,asChild:!f&&l.asChild,ref:d,style:{pointerEvents:"none"},children:(0,g.jsx)(y.Fragment,{children:f?i:o},f?"placeholder":"value")})},"SelectValue")),dm=y.forwardRef(u6(function(e,t){let{__scopeSelect:n,children:r,...a}=e;return(0,g.jsx)(oR.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})},"SelectIcon")),[dg,dy]=dr("SelectPortal",{forceMount:void 0}),dv=u6(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,g.jsx)(dg,{scope:e.__scopeSelect,forceMount:n,children:(0,g.jsx)(ir,{asChild:!0,...r})})},"SelectPortal"),db="SelectContent",dx=y.forwardRef(u6(function(e,t){let n=dy(db,e.__scopeSelect),{forceMount:r=n.forceMount,...a}=e,o=ds(db,e.__scopeSelect),[i,l]=y.useState();return og(()=>{l(new DocumentFragment)},[]),(0,g.jsx)(il,{present:r||o.open,children:({present:e})=>e?(0,g.jsx)(dO,{...a,ref:t}):(0,g.jsx)(dw,{...a,fragment:i})})},"SelectContent")),dw=y.forwardRef(u6(function(e,t){let{__scopeSelect:n,children:r,fragment:a}=e;return a?oT.createPortal((0,g.jsx)(dk,{scope:n,children:(0,g.jsx)(de.Slot,{scope:n,children:(0,g.jsx)("div",{ref:t,children:r})})}),a):null},"SelectContentFragment")),[dk,dj]=dr(db),dS=a1("SelectContent.RemoveScroll"),dO=y.forwardRef(u6(function(e,t){let{__scopeSelect:n}=e,{position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:o,onPointerDownOutside:i,side:l,sideOffset:s,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:v,...b}=e,x=ds(db,n),[w,k]=y.useState(null),[j,S]=y.useState(null),O=aY(t,k),[C,N]=y.useState(null),[P,E]=y.useState(null),_=dt(n),[z,T]=y.useState(!1),A=y.useRef(!1);y.useEffect(()=>{if(w)return lt(w)},[w]),iv();let R=y.useCallback(e=>{let[t,...n]=_().map(e=>e.ref.current),[r]=n.slice(-1),a=document.activeElement;for(let n of e)if(n===a||(n?.scrollIntoView({block:"nearest"}),n===t&&j&&(j.scrollTop=0),n===r&&j&&(j.scrollTop=j.scrollHeight),n?.focus(),document.activeElement!==a))return},[_,j]),L=y.useCallback(()=>R([C,w]),[R,C,w]);y.useEffect(()=>{z&&L()},[z,L]);let{onOpenChange:I,triggerPointerDownPosRef:M}=x;y.useEffect(()=>{if(w){let e={x:0,y:0},t=u6(t=>{e={x:Math.abs(Math.round(t.pageX)-(M.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(M.current?.y??0))}},"handlePointerMove"),n=u6(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(w)||I(!1),document.removeEventListener("pointermove",t),M.current=null},"handlePointerUp");return null!==M.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[w,I,M]),y.useEffect(()=>{let e=u6(()=>I(!1),"close");return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[I]);let[D,F]=dQ(e=>{let t=_().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=dY(t,e,n);r&&setTimeout(()=>r.ref.current?.focus())}),$=y.useCallback((e,t,n)=>{let r=!A.current&&!n;(void 0!==x.value&&x.value===t||r)&&(N(e),r&&(A.current=!0))},[x.value]),U=y.useCallback(()=>w?.focus(),[w]),H=y.useCallback((e,t,n)=>{let r=!A.current&&!n;(void 0!==x.value&&x.value===t||r)&&E(e)},[x.value]),B="popper"===r?dN:dC;return(0,g.jsx)(dk,{scope:n,content:w,viewport:j,onViewportChange:S,itemRefCallback:$,selectedItem:C,onItemLeave:U,itemTextRefCallback:H,focusSelectedItem:L,selectedItemText:P,position:r,isPositioned:z,searchRef:D,children:(0,g.jsx)(i3,{as:dS,allowPinchZoom:!0,children:(0,g.jsx)(oX,{asChild:!0,trapped:x.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:oc(a,e=>{x.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,g.jsx)(oU,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:(0,g.jsx)(B,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:e=>e.preventDefault(),...b,...B===dN?{side:l,sideOffset:s,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:v}:{},onPlaced:()=>T(!0),ref:O,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:oc(b.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||F(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=_().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>R(t)),e.preventDefault()}})})})})})})},"SelectContentImpl")),dC=y.forwardRef(u6(function(e,t){let{__scopeSelect:n,onPlaced:r,...a}=e,o=ds(db,n),i=dj(db,n),[l,s]=y.useState(null),[c,u]=y.useState(null),d=aY(t,u),f=dt(n),p=y.useRef(!1),h=y.useRef(!0),{viewport:m,selectedItem:v,selectedItemText:b,focusSelectedItem:x}=i,w=y.useCallback(()=>{if(o.trigger&&o.valueNode&&l&&c&&m&&v&&b){let e=o.trigger.getBoundingClientRect(),t=c.getBoundingClientRect(),n=o.valueNode.getBoundingClientRect(),a=b.getBoundingClientRect();if("rtl"!==o.dir){let r=a.left-t.left,o=n.left-r,i=e.left-o,s=e.width+i,c=Math.max(s,t.width),u=cb(o,[10,Math.max(10,window.innerWidth-10-c)]);l.style.minWidth=s+"px",l.style.left=u+"px"}else{let r=t.right-a.right,o=window.innerWidth-n.right-r,i=window.innerWidth-e.right-o,s=e.width+i,c=Math.max(s,t.width),u=cb(o,[10,Math.max(10,window.innerWidth-10-c)]);l.style.minWidth=s+"px",l.style.right=u+"px"}let i=f(),s=window.innerHeight-20,u=m.scrollHeight,d=window.getComputedStyle(c),h=parseInt(d.borderTopWidth,10),g=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),x=h+g+u+parseInt(d.paddingBottom,10)+y,w=Math.min(5*v.offsetHeight,x),k=window.getComputedStyle(m),j=parseInt(k.paddingTop,10),S=parseInt(k.paddingBottom,10),O=e.top+e.height/2-10,C=v.offsetHeight/2,N=h+g+(v.offsetTop+C);if(N<=O){let e=i.length>0&&v===i[i.length-1].ref.current;l.style.bottom="0px";let t=Math.max(s-O,C+(e?S:0)+(c.clientHeight-m.offsetTop-m.offsetHeight)+y);l.style.height=N+t+"px"}else{let e=i.length>0&&v===i[0].ref.current;l.style.top="0px";let t=Math.max(O,h+m.offsetTop+(e?j:0)+C);l.style.height=t+(x-N)+"px",m.scrollTop=N-O+m.offsetTop}l.style.margin="10px 0",l.style.minHeight=w+"px",l.style.maxHeight=s+"px",r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,o.trigger,o.valueNode,l,c,m,v,b,o.dir,r]);og(()=>w(),[w]);let[k,j]=y.useState();og(()=>{c&&j(window.getComputedStyle(c).zIndex)},[c]);let S=y.useCallback(e=>{e&&!0===h.current&&(w(),x?.(),h.current=!1)},[w,x]);return(0,g.jsx)(dP,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:p,onScrollButtonChange:S,children:(0,g.jsx)("div",{ref:s,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:(0,g.jsx)(oR.div,{...a,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})},"SelectItemAlignedPosition")),dN=y.forwardRef(u6(function(e,t){let{__scopeSelect:n,align:r="start",collisionPadding:a=10,...o}=e,i=di(n);return(0,g.jsx)(uX,{...i,...o,ref:t,align:r,collisionPadding:a,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition")),[dP,dE]=dr(db,{}),d_="SelectViewport",dz=y.forwardRef(u6(function(e,t){let{__scopeSelect:n,nonce:r,...a}=e,o=dj(d_,n),i=dE(d_,n),l=aY(t,o.onViewportChange),s=y.useRef(0);return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),(0,g.jsx)(de.Slot,{scope:n,children:(0,g.jsx)(oR.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:oc(a.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=i;if(r?.current&&n){let e=Math.abs(s.current-t.scrollTop);if(e>0){let r=window.innerHeight-20,a=Math.max(parseFloat(n.style.minHeight),parseFloat(n.style.height));if(a<r){let o=a+e,i=Math.min(r,o),l=o-i;n.style.height=i+"px","0px"===n.style.bottom&&(t.scrollTop=l>0?l:0,n.style.justifyContent="flex-end")}}}s.current=t.scrollTop})})})]})},"SelectViewport")),[dT,dA]=dr("SelectGroup"),dR=y.forwardRef(u6(function(e,t){let{__scopeSelect:n,...r}=e,a=dA("SelectLabel",n);return(0,g.jsx)(oR.div,{id:a.id,...r,ref:t})},"SelectLabel")),dL="SelectItem",[dI,dM]=dr(dL),dD=y.forwardRef(u6(function(e,t){let{__scopeSelect:n,value:r,disabled:a=!1,textValue:o,...i}=e,l=ds(dL,n),s=dj(dL,n),c=l.value===r,[u,d]=y.useState(o??""),[f,p]=y.useState(!1),h=aY(t,oI(e=>s.itemRefCallback?.(e,r,a))),m=ox(),v=y.useRef("touch"),b=u6(()=>{a||(l.onValueChange(r),l.onOpenChange(!1))},"handleSelect");return(0,g.jsx)(dI,{scope:n,value:r,disabled:a,textId:m,isSelected:c,onItemTextChange:y.useCallback(e=>{d(t=>t||(e?.textContent??"").trim())},[]),children:(0,g.jsx)(de.ItemSlot,{scope:n,value:r,disabled:a,textValue:u,children:(0,g.jsx)(oR.div,{role:"option","aria-labelledby":m,"data-highlighted":f?"":void 0,"aria-selected":c&&f,"data-state":c?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...i,ref:h,onFocus:oc(i.onFocus,()=>p(!0)),onBlur:oc(i.onBlur,()=>p(!1)),onClick:oc(i.onClick,()=>{"mouse"!==v.current&&b()}),onPointerUp:oc(i.onPointerUp,()=>{"mouse"===v.current&&b()}),onPointerDown:oc(i.onPointerDown,e=>{v.current=e.pointerType}),onPointerMove:oc(i.onPointerMove,e=>{v.current=e.pointerType,a?s.onItemLeave?.():"mouse"===v.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:oc(i.onPointerLeave,e=>{e.currentTarget===document.activeElement&&s.onItemLeave?.()}),onKeyDown:oc(i.onKeyDown,e=>{a||e.target!==e.currentTarget||(s.searchRef?.current===""||" "!==e.key)&&(u9.includes(e.key)&&b()," "===e.key&&e.preventDefault())})})})})},"SelectItem")),dF="SelectItemText",d$=y.forwardRef(u6(function(e,t){let{__scopeSelect:n,className:r,style:a,...o}=e,i=ds(dF,n),l=dj(dF,n),s=dM(dF,n),c=du(dF,n),[u,d]=y.useState(null),f=oI(e=>l.itemTextRefCallback?.(e,s.value,s.disabled)),p=aY(t,d,s.onItemTextChange,f),h=u?.textContent,m=y.useMemo(()=>(0,g.jsx)("option",{value:s.value,disabled:s.disabled,children:h},s.value),[s.disabled,s.value,h]),{onNativeOptionAdd:v,onNativeOptionRemove:b}=c;return og(()=>(v(m),()=>b(m)),[v,b,m]),(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(oR.span,{id:s.textId,...o,ref:p}),s.isSelected&&i.valueNode&&!i.valueNodeHasChildren&&!dJ(i.value)?oT.createPortal(o.children,i.valueNode):null]})},"SelectItemText")),dU=y.forwardRef(u6(function(e,t){let{__scopeSelect:n,...r}=e;return dM("SelectItemIndicator",n).isSelected?(0,g.jsx)(oR.span,{"aria-hidden":!0,...r,ref:t}):null},"SelectItemIndicator")),dH="SelectScrollUpButton",dB=y.forwardRef(u6(function(e,t){let n=dj(dH,e.__scopeSelect),r=dE(dH,e.__scopeSelect),[a,o]=y.useState(!1),i=aY(t,r.onScrollButtonChange);return og(()=>{if(n.viewport&&n.isPositioned){let e=function(){o(t.scrollTop>0)};u6(e,"handleScroll");let t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),a?(0,g.jsx)(dq,{...e,ref:i,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null},"SelectScrollUpButton")),dK="SelectScrollDownButton",dV=y.forwardRef(u6(function(e,t){let n=dj(dK,e.__scopeSelect),r=dE(dK,e.__scopeSelect),[a,o]=y.useState(!1),i=aY(t,r.onScrollButtonChange);return og(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;o(Math.ceil(t.scrollTop)<e)};u6(e,"handleScroll");let t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),a?(0,g.jsx)(dq,{...e,ref:i,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null},"SelectScrollDownButton")),dq=y.forwardRef(u6(function(e,t){let{__scopeSelect:n,onAutoScroll:r,...a}=e,o=dj("SelectScrollButton",n),i=y.useRef(null),l=dt(n),s=y.useCallback(()=>{null!==i.current&&(window.clearInterval(i.current),i.current=null)},[]);return y.useEffect(()=>()=>s(),[s]),og(()=>{let e=l().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[l]),(0,g.jsx)(oR.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:oc(a.onPointerDown,()=>{null===i.current&&(i.current=window.setInterval(r,50))}),onPointerMove:oc(a.onPointerMove,()=>{o.onItemLeave?.(),null===i.current&&(i.current=window.setInterval(r,50))}),onPointerLeave:oc(a.onPointerLeave,()=>{s()})})},"SelectScrollButtonImpl")),dW=y.forwardRef(u6(function(e,t){let{__scopeSelect:n,...r}=e;return(0,g.jsx)(oR.div,{"aria-hidden":!0,...r,ref:t})},"SelectSeparator")),dZ=y.forwardRef(u6(function({__scopeSelect:e,...t},n){let r=ds("SelectBubbleInput",e),{value:a,onValueChange:o,required:i,disabled:l,name:s,autoComplete:c,form:u}=r,{nativeOptions:d,nativeSelectKey:f}=r,p=y.useRef(null),h=aY(n,p),m=a??"",v=u4(m),b=Array.from(d).some(e=>(e.props.value??"")==="");return y.useEffect(()=>{let e=p.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(v!==m&&t){let n=new Event("change",{bubbles:!0});t.call(e,m),e.dispatchEvent(n)}},[v,m]),(0,g.jsxs)(oR.select,{"aria-hidden":!0,required:i,tabIndex:-1,name:s,autoComplete:c,disabled:l,form:u,onChange:e=>o(e.target.value),...t,style:{...u3,...t.style},ref:h,defaultValue:m,children:[dJ(a)&&!b?(0,g.jsx)("option",{value:""}):null,Array.from(d)]},f)},"SelectBubbleInput"));function dG(e){return"function"==typeof e}function dJ(e){return""===e||void 0===e}function dQ(e){let t=oI(e),n=y.useRef(""),r=y.useRef(0),a=y.useCallback(e=>{t(n.current+e)},[t]),o=y.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,a,o]}function dY(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,a=n?e.indexOf(n):-1,o=dX(e,Math.max(a,0));1===r.length&&(o=o.filter(e=>e!==n));let i=o.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return i!==n?i:void 0}function dX(e,t){return e.map((n,r)=>e[(t+r)%e.length])}u6(dG,"isFunction"),u6(dJ,"shouldShowPlaceholder"),u6(dQ,"useTypeaheadSearch"),u6(dY,"findNextItem"),u6(dX,"wrapArray");let d0=O("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);function d1(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function d2(e){if(Array.isArray(e))return e}function d4(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function d3(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function d5(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function d6(e,t){if(null==e)return{};var n,r,a,o={};if("u">typeof Reflect&&Reflect.ownKeys){for(a=0,n=Reflect.ownKeys(Object(e));a<n.length;a++)r=n[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}if(o=function(e,t){if(null==e)return{};var n,r,a={},o=Object.getOwnPropertyNames(e);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n]);return a}(e,t),Object.getOwnPropertySymbols)for(a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)r=n[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function d8(e,t){return d2(e)||function(e,t){var n,r,a=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],i=!0,l=!1;try{for(a=a.call(e);!(i=(n=a.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){l=!0,r=e}finally{try{i||null==a.return||a.return()}finally{if(l)throw r}}return o}}(e,t)||d7(e,t)||d4()}function d9(e){return d2(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||d7(e)||d4()}function d7(e,t){if(e){if("string"==typeof e)return d1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d1(e,t)}}var fe=y.forwardRef(function(e,t){var n=d9([e,t]),r=n[0],a=n.slice(1),o=r.className,i=r.children,l=d6(r,["className","children"]),s=d8(a,1)[0];return(0,g.jsxs)(dp,d5(d3({ref:s,"data-slot":"select-trigger",className:aR("flex h-10 w-full cursor-pointer items-center justify-between gap-2 rounded-[10px] border border-input bg-card px-3 py-2 text-sm text-foreground shadow-[0_1px_2px_rgb(20_24_40/0.04)] outline-none transition-[border-color,box-shadow,background-color] hover:border-ring/35 focus-visible:border-ring/50 focus-visible:ring-2 focus-visible:ring-ring/20 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 aria-invalid:focus-visible:border-destructive aria-invalid:focus-visible:ring-destructive/25 disabled:pointer-events-none disabled:opacity-50 data-[placeholder]:text-muted-foreground [&>span]:truncate",o)},l),{children:[i,(0,g.jsx)(dm,{asChild:!0,children:(0,g.jsx)(A,{className:"size-4 shrink-0 text-muted-foreground"})})]}))});fe.displayName=dp.displayName;var ft=y.forwardRef(function(e,t){var n=d9([e,t]),r=n[0],a=n.slice(1),o=r.className,i=d6(r,["className"]),l=d8(a,1)[0];return(0,g.jsx)(dB,d5(d3({ref:l,className:aR("flex cursor-default items-center justify-center py-1",o)},i),{children:(0,g.jsx)(d0,{className:"size-4"})}))});ft.displayName=dB.displayName;var fn=y.forwardRef(function(e,t){var n=d9([e,t]),r=n[0],a=n.slice(1),o=r.className,i=d6(r,["className"]),l=d8(a,1)[0];return(0,g.jsx)(dV,d5(d3({ref:l,className:aR("flex cursor-default items-center justify-center py-1",o)},i),{children:(0,g.jsx)(A,{className:"size-4"})}))});fn.displayName=dV.displayName;var fr=y.forwardRef(function(e,t){var n=d9([e,t]),r=n[0],a=n.slice(1),o=r.className,i=r.children,l=r.position,s=void 0===l?"popper":l,c=r.sideOffset,u=d6(r,["className","children","position","sideOffset"]),d=d8(a,1)[0];return(0,g.jsx)(dv,{children:(0,g.jsxs)(dx,d5(d3({ref:d,"data-slot":"select-content",position:s,sideOffset:void 0===c?6:c,className:aR("relative z-50 max-h-[min(20rem,var(--radix-select-content-available-height))] min-w-[8rem] overflow-hidden rounded-xl border border-border/80 bg-popover text-popover-foreground shadow-[0_18px_50px_rgb(22_27_45/0.14)] data-[state=closed]:animate-out data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","popper"===s&&"data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o)},u),{children:[(0,g.jsx)(ft,{}),(0,g.jsx)(dz,{className:aR("p-1.5","popper"===s&&"w-full min-w-[var(--radix-select-trigger-width)]"),children:i}),(0,g.jsx)(fn,{})]}))})});fr.displayName=dx.displayName,y.forwardRef(function(e,t){var n=d9([e,t]),r=n[0],a=n.slice(1),o=r.className,i=d6(r,["className"]),l=d8(a,1)[0];return(0,g.jsx)(dR,d3({ref:l,className:aR("px-2 py-1.5 text-xs font-semibold text-muted-foreground",o)},i))}).displayName=dR.displayName;var fa=y.forwardRef(function(e,t){var n=d9([e,t]),r=n[0],a=n.slice(1),o=r.className,i=r.children,l=d6(r,["className","children"]),s=d8(a,1)[0];return(0,g.jsxs)(dD,d5(d3({ref:s,"data-slot":"select-item",className:aR("relative flex w-full cursor-pointer select-none items-center rounded-lg py-2 pr-8 pl-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",o)},l),{children:[(0,g.jsx)(d$,{children:i}),(0,g.jsx)("span",{className:"absolute right-2 flex size-4 items-center justify-center text-primary",children:(0,g.jsx)(dU,{children:(0,g.jsx)(s5,{className:"size-4",strokeWidth:2.5})})})]}))});function fo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function fi(e,t,n,r,a,o,i){try{var l=e[o](i),s=l.value}catch(e){n(e);return}l.done?t(s):Promise.resolve(s).then(r,a)}function fl(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function i(e){fi(o,r,a,i,l,"next",e)}function l(e){fi(o,r,a,i,l,"throw",e)}i(void 0)})}}function fs(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,a=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],i=!0,l=!1;try{for(a=a.call(e);!(i=(n=a.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){l=!0,r=e}finally{try{i||null==a.return||a.return()}finally{if(l)throw r}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return fo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fo(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fc(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(i,"next",{value:s(0)}),l(i,"throw",{value:s(1)}),l(i,"return",{value:s(2)}),"function"==typeof Symbol&&l(i,Symbol.iterator,{value:function(){return this}}),i;function s(l){return function(s){var c=[l,s];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&c[0]?r.return:c[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;switch(r=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]<a[3])){o.label=c[1];break}if(6===c[0]&&o.label<a[1]){o.label=a[1],a=c;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(c);break}a[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}function fu(e){var t=e.open,n=e.onOpenChange,r=(0,x.Bd)().t,a=ss(function(e){return e.loadHarnesses}),o=ss(function(e){return e.setNotice}),i=fs((0,y.useState)(null),2),l=i[0],s=i[1],c=fs((0,y.useState)(!1),2),u=c[0],d=c[1],f=fs((0,y.useState)(null),2),p=f[0],h=f[1],m=fs((0,y.useState)(null),2),v=m[0],b=m[1],w=fs((0,y.useState)("device"),2),k=w[0],j=w[1],S=fs((0,y.useState)("push"),2),O=S[0],C=S[1],P=fs((0,y.useState)(null),2),E=P[0],z=P[1],T=fs((0,y.useState)(!1),2),A=T[0],R=T[1],M=fs((0,y.useState)(!1),2),D=M[0],$=M[1],U=fs((0,y.useState)(!1),2),H=U[0],B=U[1],K=fs((0,y.useState)(5),2),V=K[0],q=K[1],W=(0,y.useRef)(null),Z=fs((0,y.useState)(""),2),G=Z[0],J=Z[1],Q=fs((0,y.useState)(!1),2),Y=Q[0],X=Q[1],ee=fs((0,y.useState)(""),2),et=ee[0],en=ee[1],er=fs((0,y.useState)(!1),2),ea=er[0],eo=er[1],ei=fs((0,y.useState)(!1),2),el=ei[0],es=ei[1],ec=fs((0,y.useState)(""),2),eu=ec[0],ed=ec[1],ef=fs((0,y.useState)("skip"),2),ep=ef[0],eh=ef[1],em=fs((0,y.useState)(!0),2),eg=em[0],ey=em[1],ev=fs((0,y.useState)(!1),2),eb=ev[0],ex=ev[1],ew=fs((0,y.useState)(null),2),ek=ew[0],ej=ew[1],eS=fs((0,y.useState)(null),2),eO=eS[0],eC=eS[1],eN=fs((0,y.useState)(!1),2),eP=eN[0],eE=eN[1],e_=fs((0,y.useState)(!1),2),ez=e_[0],eT=e_[1];function eA(){return fl(function(){return fc(this,function(e){switch(e.label){case 0:d(!0),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,lX("/api/github/status")];case 2:return s(e.sent()),[3,5];case 3:return h(l6(e.sent())),[3,5];case 4:return d(!1),[7];case 5:return[2]}})})()}function eR(){return fl(function(){var e;return fc(this,function(t){switch(t.label){case 0:h(null),b(null),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,lX("/api/github/device/code",{method:"POST",body:JSON.stringify({})})];case 2:return z(e=t.sent()),eI(e.deviceCode,e.interval),[3,4];case 3:return h(l6(t.sent())),[3,4];case 4:return[2]}})})()}function eL(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return fl(function(){var n,a,o;return fc(this,function(i){switch(i.label){case 0:if(!(n=e||(null==E?void 0:E.deviceCode)))return[2];t&&(B(!0),h(null),b(null)),i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,lX("/api/github/device/poll",{method:"POST",body:JSON.stringify({deviceCode:n})})];case 2:return"authorized"===(a=i.sent()).status?(W.current&&clearInterval(W.current),$(!1),z(null),b("GitHub 授权成功!欢迎 ".concat(a.username||"")),eA()):"expired"===a.status?(W.current&&clearInterval(W.current),$(!1),h(l6(a.error||"授权已过期,请重新获取授权码"))):"error"===a.status?(W.current&&clearInterval(W.current),$(!1),h(l6(a.error||"授权失败,请重试"))):"pending"===a.status&&(a.interval&&a.interval>5&&(q(a.interval),eI(n,a.interval)),t&&b(r("githubSync.pendingAuth"))),[3,5];case 3:return o=i.sent(),t&&h(l6(o)),[3,5];case 4:return t&&B(!1),[7];case 5:return[2]}})})()}function eI(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;W.current&&clearInterval(W.current),$(!0),q(t),W.current=setInterval(function(){eL(e,!1)},1e3*Math.max(t,5))}return(0,y.useEffect)(function(){t?(h(null),b(null),eA()):(W.current&&(clearInterval(W.current),W.current=null),$(!1),z(null),ej(null))},[t]),(0,y.useEffect)(function(){return function(){W.current&&clearInterval(W.current)}},[]),(0,g.jsx)(lc,{open:t,onOpenChange:n,children:(0,g.jsxs)(lT,{className:"max-h-[90vh] overflow-y-auto sm:max-w-2xl",children:[(0,g.jsxs)(lA,{children:[(0,g.jsxs)("div",{className:"flex items-center gap-2",children:[(0,g.jsx)(_,{className:"size-5 text-primary"}),(0,g.jsx)(lL,{children:r("githubSync.title")})]}),(0,g.jsx)(lI,{children:r("githubSync.intro")})]}),p&&(0,g.jsx)("div",{className:"rounded-lg border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive",children:l7(r,p)}),v&&(0,g.jsx)("div",{className:"rounded-lg border border-emerald-500/40 bg-emerald-500/10 p-3 text-sm text-emerald-600 dark:text-emerald-400",children:v}),(null==l?void 0:l.connected)?(0,g.jsxs)("div",{className:"space-y-6",children:[(0,g.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-4 rounded-xl border bg-muted/40 p-4",children:[(0,g.jsxs)("div",{className:"flex items-center gap-3",children:[l.avatarUrl?(0,g.jsx)("img",{src:l.avatarUrl,alt:l.username,className:"size-10 rounded-full border"}):(0,g.jsx)(sX,{className:"size-10 text-muted-foreground"}),(0,g.jsxs)("div",{children:[(0,g.jsxs)("div",{className:"flex items-center gap-2",children:[(0,g.jsx)("span",{className:"font-semibold",children:l.username}),(0,g.jsxs)(aI,{variant:"secondary",className:"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400",children:[(0,g.jsx)(s0,{className:"mr-1 size-3"}),"已连接"]})]}),(0,g.jsxs)("p",{className:"text-xs text-muted-foreground",children:[r("githubSync.lastSynced")," ",l.lastSyncedAt?new Date(l.lastSyncedAt).toLocaleString():r("githubSync.neverSynced")]}),l.gistId&&(0,g.jsxs)("div",{className:"mt-1 flex items-center gap-1.5 text-xs text-muted-foreground",children:[(0,g.jsx)("span",{children:r("githubSync.cloudGist")}),(0,g.jsxs)("a",{href:"https://gist.github.com/".concat(l.username?"".concat(l.username,"/"):"").concat(l.gistId),target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-primary hover:underline font-mono",children:[l.gistId.slice(0,8),"…",(0,g.jsx)(s1,{className:"size-3"})]})]})]})]}),(0,g.jsxs)("div",{className:"flex items-center gap-2",children:[(0,g.jsx)(oo,{variant:"outline",size:"sm",onClick:function(){eA()},disabled:u,children:(0,g.jsx)(N,{className:"size-4 ".concat(u?"animate-spin":"")})}),(0,g.jsxs)(oo,{variant:"ghost",size:"sm",onClick:function(){fl(function(){return fc(this,function(e){switch(e.label){case 0:h(null),b(null),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,lX("/api/github/disconnect",{method:"POST"})];case 2:return e.sent(),s({connected:!1}),ej(null),b("已断开与 GitHub 的连接"),[3,4];case 3:return h(l6(e.sent())),[3,4];case 4:return[2]}})})()},children:[(0,g.jsx)(I,{className:"mr-1 size-4"}),r("githubSync.disconnect")]})]})]}),(0,g.jsxs)("div",{className:"space-y-4",children:[(0,g.jsxs)("div",{className:"grid grid-cols-2 rounded-lg bg-muted p-1",children:[(0,g.jsxs)("button",{type:"button",className:aR("flex items-center justify-center gap-2 rounded-md py-1.5 text-sm font-medium transition-colors","push"===O?"bg-background shadow-sm text-foreground":"text-muted-foreground hover:text-foreground"),onClick:function(){return C("push")},children:[(0,g.jsx)(s2,{className:"size-4"}),r("githubSync.pushTitle")]}),(0,g.jsxs)("button",{type:"button",className:aR("flex items-center justify-center gap-2 rounded-md py-1.5 text-sm font-medium transition-colors","pull"===O?"bg-background shadow-sm text-foreground":"text-muted-foreground hover:text-foreground"),onClick:function(){return C("pull")},children:[(0,g.jsx)(s4,{className:"size-4"}),r("githubSync.pullTitle")]})]}),"push"===O&&(0,g.jsxs)("div",{className:"space-y-4 pt-1",children:[(0,g.jsx)("p",{className:"text-sm text-muted-foreground",children:r("githubSync.pushIntro")}),(0,g.jsxs)("div",{className:"space-y-2",children:[(0,g.jsx)(cv,{htmlFor:"push-passphrase",children:r("githubSync.passphrase")}),(0,g.jsxs)("div",{className:"relative",children:[(0,g.jsx)(L,{className:"absolute left-3 top-2.5 size-4 text-muted-foreground"}),(0,g.jsx)(cm,{id:"push-passphrase",type:"password",className:"pl-9",placeholder:r("githubSync.passphrasePlaceholder"),value:et,onChange:function(e){return en(e.target.value)}})]})]}),(0,g.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,g.jsx)(ch,{id:"push-codex-cache",checked:ea,onCheckedChange:function(e){return eo(!!e)}}),(0,g.jsx)(cv,{htmlFor:"push-codex-cache",className:"text-sm font-normal",children:r("githubSync.includeCache")})]}),(0,g.jsxs)(oo,{className:"w-full",disabled:!et||el,onClick:function(){fl(function(){var e;return fc(this,function(t){switch(t.label){case 0:if(!et)return[2];es(!0),h(null),b(null),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,lX("/api/github/push",{method:"POST",body:JSON.stringify({passphrase:et,includeCodexLoginCache:ea})})];case 2:return b(r("githubSync.pushSuccess",{profiles:(e=t.sent()).exportedProfilesCount,vault:e.exportedVaultCount})),eA(),[3,5];case 3:return h(l6(t.sent())),[3,5];case 4:return es(!1),[7];case 5:return[2]}})})()},children:[(0,g.jsx)(s2,{className:"mr-2 size-4"}),el?r("githubSync.pushing"):r("githubSync.pushTitle")]})]}),"pull"===O&&(0,g.jsxs)("div",{className:"space-y-4 pt-1",children:[(0,g.jsx)("p",{className:"text-sm text-muted-foreground",children:r("githubSync.pullIntro")}),(0,g.jsxs)("div",{className:"space-y-2",children:[(0,g.jsx)(cv,{htmlFor:"pull-passphrase",children:r("githubSync.passphrase")}),(0,g.jsxs)("div",{className:"relative",children:[(0,g.jsx)(L,{className:"absolute left-3 top-2.5 size-4 text-muted-foreground"}),(0,g.jsx)(cm,{id:"pull-passphrase",type:"password",className:"pl-9",placeholder:r("githubSync.pullPassphrasePlaceholder"),value:eu,onChange:function(e){ed(e.target.value),ej(null)}})]})]}),(0,g.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:(0,g.jsxs)("div",{className:"space-y-2",children:[(0,g.jsx)(cv,{children:r("transfer.conflictPolicy")}),(0,g.jsxs)(df,{value:ep,onValueChange:function(e){eh(e),ej(null)},children:[(0,g.jsx)(fe,{children:(0,g.jsx)(dh,{})}),(0,g.jsxs)(fr,{children:[(0,g.jsx)(fa,{value:"skip",children:r("transfer.policySkip")}),(0,g.jsx)(fa,{value:"overwrite",children:r("transfer.policyOverwrite")})]})]})]})}),(0,g.jsxs)("div",{className:"space-y-2",children:[(0,g.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,g.jsx)(ch,{id:"pull-restore-active",checked:eg,onCheckedChange:function(e){ey(!!e),ej(null)}}),(0,g.jsx)(cv,{htmlFor:"pull-restore-active",className:"text-sm font-normal",children:r("transfer.restoreActive")})]}),(0,g.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,g.jsx)(ch,{id:"pull-migrate-cache",checked:eb,onCheckedChange:function(e){ex(!!e)}}),(0,g.jsx)(cv,{htmlFor:"pull-migrate-cache",className:"text-sm font-normal",children:r("transfer.migrateCache")})]})]}),ek?(0,g.jsxs)("div",{className:"space-y-4 rounded-xl border bg-muted/20 p-4",children:[(0,g.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 border-b pb-3",children:[(0,g.jsx)("span",{className:"font-semibold text-sm",children:"云端备份检查结果"}),(0,g.jsxs)("span",{className:"text-xs text-muted-foreground",children:["备份时间: ",eO?new Date(eO).toLocaleString():""]})]}),(0,g.jsxs)("div",{className:"grid grid-cols-2 gap-2 text-sm sm:grid-cols-4",children:[(0,g.jsxs)("div",{className:"rounded-lg border bg-background p-2 text-center",children:[(0,g.jsx)("div",{className:"font-bold text-lg",children:ek.profileCount}),(0,g.jsx)("div",{className:"text-xs text-muted-foreground",children:"配置数量"})]}),(0,g.jsxs)("div",{className:"rounded-lg border bg-background p-2 text-center",children:[(0,g.jsx)("div",{className:"font-bold text-lg",children:ek.providerCount}),(0,g.jsx)("div",{className:"text-xs text-muted-foreground",children:"凭据数量"})]}),(0,g.jsxs)("div",{className:"rounded-lg border bg-background p-2 text-center",children:[(0,g.jsx)("div",{className:"font-bold text-lg text-amber-500",children:ek.conflicts.length}),(0,g.jsx)("div",{className:"text-xs text-muted-foreground",children:"同名冲突"})]}),(0,g.jsxs)("div",{className:"rounded-lg border bg-background p-2 text-center",children:[(0,g.jsx)("div",{className:"font-bold text-lg",children:ek.activeCount}),(0,g.jsx)("div",{className:"text-xs text-muted-foreground",children:"激活状态"})]})]}),ek.conflicts.length>0&&(0,g.jsxs)("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/10 p-3 text-xs text-amber-700 dark:text-amber-300",children:[(0,g.jsxs)("div",{className:"flex items-center gap-1 font-semibold",children:[(0,g.jsx)(s3,{className:"size-4"}),"发现同名配置:"]}),(0,g.jsx)("div",{className:"mt-1",children:ek.conflicts.map(function(e){return"".concat(F[e.harness]||e.harness,"/").concat(e.name)}).join("、")}),(0,g.jsxs)("div",{className:"mt-1",children:["当前策略:","skip"===ep?"保留本机,跳过导入":"覆盖本机同名配置"]})]}),(0,g.jsxs)(oo,{className:"w-full",disabled:ez,onClick:function(){fl(function(){var e;return fc(this,function(t){switch(t.label){case 0:if(!eu)return[2];eT(!0),h(null),b(null),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,lX("/api/github/pull",{method:"POST",body:JSON.stringify({passphrase:eu,conflictPolicy:ep,restoreActive:eg,migrateCodexLoginCache:eb})})];case 2:var n,i,l;return e=t.sent(),a(),n=e,i=r,l=[],n.imported>0&&l.push(i("transfer.importedCount",{count:n.imported})),n.overwritten>0&&l.push(i("transfer.overwrittenCount",{count:n.overwritten})),n.providersCopied>0&&l.push(i("transfer.providersCopiedCount",{count:n.providersCopied})),n.skipped>0&&l.push(i("transfer.skippedCount",{count:n.skipped})),n.activeRestored>0&&l.push(i("transfer.activeRestoredCount",{count:n.activeRestored})),b(r("githubSync.pullSuccess",{summary:l.join(",")||"无变动"})),o(e.warnings.length>0?e.warnings.map(l5):[{key:"transfer.imported"}]),ej(null),eA(),[3,5];case 3:return h(l6(t.sent())),[3,5];case 4:return eT(!1),[7];case 5:return[2]}})})()},children:[(0,g.jsx)(s4,{className:"mr-2 size-4"}),ez?r("githubSync.pulling"):r("githubSync.confirmPull")]})]}):(0,g.jsxs)(oo,{variant:"outline",className:"w-full",disabled:!eu||eP,onClick:function(){fl(function(){var e,t;return fc(this,function(n){switch(n.label){case 0:if(!eu)return[2];eE(!0),h(null),b(null),n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,lX("/api/github/pull/preview",{method:"POST",body:JSON.stringify({passphrase:eu,conflictPolicy:ep,restoreActive:eg})})];case 2:return ej((e=n.sent()).preview),eC(e.gistUpdatedAt),[3,5];case 3:return t=n.sent(),ej(null),h(l6(t)),[3,5];case 4:return eE(!1),[7];case 5:return[2]}})})()},children:[(0,g.jsx)(N,{className:"mr-2 size-4 ".concat(eP?"animate-spin":"")}),eP?r("transfer.inspecting"):r("githubSync.inspect")]})]})]})]}):(0,g.jsxs)("div",{className:"space-y-4",children:[(0,g.jsxs)("div",{className:"grid grid-cols-2 rounded-lg bg-muted p-1",children:[(0,g.jsx)("button",{type:"button",className:aR("flex items-center justify-center gap-2 rounded-md py-1.5 text-sm font-medium transition-colors","device"===k?"bg-background shadow-sm text-foreground":"text-muted-foreground hover:text-foreground"),onClick:function(){return j("device")},children:r("githubSync.tabDevice")}),(0,g.jsx)("button",{type:"button",className:aR("flex items-center justify-center gap-2 rounded-md py-1.5 text-sm font-medium transition-colors","token"===k?"bg-background shadow-sm text-foreground":"text-muted-foreground hover:text-foreground"),onClick:function(){return j("token")},children:r("githubSync.tabToken")})]}),"device"===k&&(0,g.jsxs)("div",{className:"space-y-4 pt-1",children:[(0,g.jsx)("p",{className:"text-sm text-muted-foreground",children:r("githubSync.deviceIntro")}),E?(0,g.jsxs)("div",{className:"space-y-4 rounded-xl border bg-muted/30 p-4",children:[(0,g.jsxs)("div",{className:"space-y-1 text-center",children:[(0,g.jsx)("span",{className:"text-xs text-muted-foreground",children:r("githubSync.userCode")}),(0,g.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,g.jsx)("code",{className:"rounded-md bg-background px-3 py-1.5 font-mono text-2xl font-bold tracking-widest text-primary border",children:E.userCode}),(0,g.jsx)(oo,{variant:"outline",size:"icon",onClick:function(){(null==E?void 0:E.userCode)&&(navigator.clipboard.writeText(E.userCode),R(!0),setTimeout(function(){return R(!1)},2e3))},children:A?(0,g.jsx)(s5,{className:"size-4 text-emerald-500"}):(0,g.jsx)(s6,{className:"size-4"})})]})]}),(0,g.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,g.jsx)(oo,{className:"w-full",asChild:!0,children:(0,g.jsxs)("a",{href:E.verificationUri,target:"_blank",rel:"noopener noreferrer",children:[(0,g.jsx)(s1,{className:"mr-2 size-4"}),r("githubSync.openAuthPage")]})}),(0,g.jsxs)(oo,{type:"button",variant:"secondary",className:"w-full",disabled:H,onClick:function(){(null==E?void 0:E.deviceCode)&&eL(E.deviceCode,!0)},children:[(0,g.jsx)(N,{className:"mr-2 size-4 ".concat(H?"animate-spin":"")}),H?r("githubSync.checkingAuth"):r("githubSync.checkNow")]}),(0,g.jsxs)("div",{className:"flex items-center justify-between pt-1",children:[(0,g.jsx)(oo,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground hover:text-foreground h-auto p-1",onClick:function(){eR()},children:r("githubSync.regenerateCode")}),D&&(0,g.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[(0,g.jsx)(N,{className:"size-3 animate-spin"}),V>5?r("githubSync.waitingAuthInterval",{seconds:V}):r("githubSync.waitingAuth")]})]})]})]}):(0,g.jsxs)(oo,{className:"w-full",onClick:function(){eR()},children:[(0,g.jsx)(sX,{className:"mr-2 size-4"}),r("githubSync.getCode")]})]}),"token"===k&&(0,g.jsxs)("div",{className:"space-y-4 pt-1",children:[(0,g.jsxs)("div",{className:"space-y-2",children:[(0,g.jsx)(cv,{htmlFor:"github-pat",children:"Personal Access Token"}),(0,g.jsxs)("div",{className:"relative",children:[(0,g.jsx)(s8,{className:"absolute left-3 top-2.5 size-4 text-muted-foreground"}),(0,g.jsx)(cm,{id:"github-pat",type:"password",className:"pl-9",placeholder:r("githubSync.tokenPlaceholder"),value:G,onChange:function(e){return J(e.target.value)}})]}),(0,g.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Token 需具备 ",(0,g.jsx)("code",{className:"text-primary font-mono",children:"gist"})," ","权限以读写加密配置文件。"]})]}),(0,g.jsxs)(oo,{className:"w-full",disabled:!G.trim()||Y,onClick:function(){fl(function(){var e;return fc(this,function(t){switch(t.label){case 0:if(!G.trim())return[2];X(!0),h(null),b(null),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,lX("/api/github/token",{method:"POST",body:JSON.stringify({token:G.trim()})})];case 2:return s(e=t.sent()),J(""),b("GitHub 连接成功!欢迎 ".concat(e.username||"")),[3,5];case 3:return h(l6(t.sent())),[3,5];case 4:return X(!1),[7];case 5:return[2]}})})()},children:[(0,g.jsx)(sX,{className:"mr-2 size-4"}),Y?"连接中…":r("githubSync.connectToken")]})]})]})]})})}fa.displayName=dD.displayName,y.forwardRef(function(e,t){var n=d9([e,t]),r=n[0],a=n.slice(1),o=r.className,i=d6(r,["className"]),l=d8(a,1)[0];return(0,g.jsx)(dW,d3({ref:l,className:aR("-mx-1 my-1 h-px bg-border",o)},i))}).displayName=dW.displayName;let fd=O("circle-user-round",[["path",{d:"M18 20a6 6 0 0 0-12 0",key:"1qehca"}],["circle",{cx:"12",cy:"10",r:"4",key:"1h16sb"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),ff=O("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]),fp=O("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]),fh=O("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);function fm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function fg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,a=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],i=!0,l=!1;try{for(a=a.call(e);!(i=(n=a.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){l=!0,r=e}finally{try{i||null==a.return||a.return()}finally{if(l)throw r}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return fm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fm(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fy(e){var t,n=e.harness,r=e.profile,a=e.open,o=e.onOpenChange,i=(0,x.Bd)().t,l=ss(function(e){return e.previewProfile}),s=ss(function(e){return e.activateProfile}),c=ss(function(e){return e.currentUser}),u=fg((0,y.useState)(null),2),d=u[0],f=u[1],p=fg((0,y.useState)(null),2),h=p[0],m=p[1];(0,y.useEffect)(function(){if(a){var e=!1;return f(null),m(null),l(n.id,r.name).then(function(t){e||f(t)}).catch(function(t){e||m(l6(t))}),function(){e=!0}}},[a,n.id,r.name,l]);var v=null!=(t=null==d?void 0:d.map(function(e){return{path:e.path,existed:null!==e.currentContent,content:e.content,currentContent:e.currentContent}}))?t:[],b=v.filter(function(e){return"same"!==aB(e)}).length;return(0,g.jsx)(sj,{open:a,onOpenChange:o,children:(0,g.jsxs)(sI,{className:"max-h-[85dvh] overflow-y-auto sm:max-w-4xl",children:[(0,g.jsxs)(sM,{children:[(0,g.jsx)(sF,{children:i("activate.title")}),(0,g.jsx)(s$,{children:i("activate.body",{harness:n.label,profile:r.name,changed:b>0?i("activate.changedFiles",{count:b}):"",user:c||i("notice.currentUser")})})]}),h?(0,g.jsx)("p",{className:"text-sm text-destructive",children:i("activate.loadFailed",{reason:l7(i,h)})}):null===d?(0,g.jsx)("p",{className:"py-6 text-center text-sm text-muted-foreground",children:i("activate.loading")}):(0,g.jsx)("div",{className:"max-h-[52dvh] overflow-y-auto rounded-xl border p-3",children:(0,g.jsx)(aK,{files:v})}),(0,g.jsxs)(sD,{children:[(0,g.jsx)(sH,{children:i("common.cancel")}),(0,g.jsx)(sU,{onClick:function(){s(n.id,r.name),o(!1)},children:i("activate.confirm")})]})]})})}function fv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function fb(e,t){if(null==e)return{};var n,r,a,o={};if("u">typeof Reflect&&Reflect.ownKeys){for(a=0,n=Reflect.ownKeys(Object(e));a<n.length;a++)r=n[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}if(o=function(e,t){if(null==e)return{};var n,r,a={},o=Object.getOwnPropertyNames(e);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n]);return a}(e,t),Object.getOwnPropertySymbols)for(a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)r=n[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function fx(e){var t=e.className,n=fb(e,["className"]);return(0,g.jsx)("div",fv({"data-slot":"card",className:aR("rounded-2xl border bg-card text-card-foreground shadow-[0_12px_34px_-26px_rgb(36_39_70/0.38)]",t)},n))}function fw(e){var t=e.className,n=fb(e,["className"]);return(0,g.jsx)("div",fv({"data-slot":"card-title",className:aR("font-semibold leading-none tracking-tight",t)},n))}function fk(e){var t=e.className,n=fb(e,["className"]);return(0,g.jsx)("div",fv({"data-slot":"card-description",className:aR("text-sm text-muted-foreground",t)},n))}function fj(e){var t=e.className,n=fb(e,["className"]);return(0,g.jsx)("div",fv({"data-slot":"card-content",className:aR("p-5 pt-0",t)},n))}function fS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function fO(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,a=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],i=!0,l=!1;try{for(a=a.call(e);!(i=(n=a.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){l=!0,r=e}finally{try{i||null==a.return||a.return()}finally{if(l)throw r}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return fS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fS(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fC(e){var t,n,r,a,o,i,l,s,c,u=e.harness,d=e.onAdd,f=e.onEdit,p=e.extraActions,h=(0,x.Bd)().t,m=ss(function(e){return e.activateOfficial}),v=ss(function(e){return e.deleteProfile}),b=fO((0,y.useState)(null),2),w=b[0],k=b[1],j=fO((0,y.useState)(null),2),S=j[0],O=j[1],C=(null==(r=u.active)?void 0:r.official)?h("harness.official"):null!=(t=null==(a=u.active)?void 0:a.name)?t:null;return(0,g.jsxs)("div",{className:"space-y-6",children:[(0,g.jsx)(fx,{className:"overflow-hidden border-primary/10",children:(0,g.jsxs)(fj,{className:"p-5 sm:p-6",children:[(0,g.jsxs)("div",{className:"grid gap-5 sm:grid-cols-[minmax(0,1fr)_minmax(15rem,0.85fr)] sm:divide-x",children:[(0,g.jsxs)("div",{className:"min-w-0 sm:pr-5",children:[(0,g.jsxs)("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[(0,g.jsx)("span",{className:"size-2 rounded-full bg-primary shadow-[0_0_0_4px_rgb(99_91_255/0.1)]"}),h("harness.activeConfig")]}),(0,g.jsx)(fw,{className:"mt-3 truncate text-xl",children:null===C?h("harness.inactive"):h("harness.activeNamed",{name:C})}),(0,g.jsx)(fk,{className:"mt-1",children:null===C?h("harness.currentInactive"):h("harness.current",{name:C})})]}),(0,g.jsxs)("div",{className:"min-w-0 sm:pl-5",children:[(0,g.jsx)("p",{className:"text-xs text-muted-foreground",children:h("harness.writeTargets")}),(0,g.jsx)("p",{className:"mt-3 truncate font-mono text-sm",children:null!=(n=null==(o=u.targets[0])?void 0:o.path)?n:h("harness.noTargetFile")}),u.targets.length>1?(0,g.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:h("harness.moreFiles",{count:u.targets.length-1})}):null]})]}),(0,g.jsxs)("div",{className:"mt-5 flex items-start gap-3 border-t pt-4 text-sm text-muted-foreground",children:[(0,g.jsx)("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-primary/[0.08] text-primary",children:(0,g.jsx)(s0,{className:"size-4"})}),(0,g.jsx)("p",{className:"pt-1 leading-relaxed",children:h("harness.overwriteWarning")})]})]})}),(0,g.jsxs)("section",{children:[(0,g.jsxs)("div",{className:"mb-3 flex items-center justify-between gap-3",children:[(0,g.jsxs)("div",{children:[(0,g.jsx)("h3",{className:"text-sm font-semibold",children:h("harness.profiles")}),(0,g.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:h("harness.profileCount",{count:u.profiles.length})})]}),p]}),(0,g.jsxs)("div",{className:"space-y-3",children:[u.supportsOfficialAuth?(0,g.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded-xl border bg-card px-4 py-4 shadow-[0_10px_28px_-26px_rgb(36_39_70/0.38)]",children:[(0,g.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,g.jsx)("span",{className:"flex size-10 shrink-0 items-center justify-center rounded-xl bg-muted text-muted-foreground",children:(0,g.jsx)(fd,{className:"size-4"})}),(0,g.jsxs)("div",{className:"min-w-0",children:[(0,g.jsxs)("div",{className:"flex items-center gap-2",children:[(0,g.jsx)("p",{className:"font-medium",children:h("harness.official")}),(null==(i=u.active)?void 0:i.official)?(0,g.jsx)(aI,{variant:"secondary",children:h("harness.active")}):null]}),(0,g.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:"claude"===u.id?h("harness.officialHintClaude"):h("harness.officialHintCodex")})]})]}),(0,g.jsx)(oo,{size:"sm",variant:(null==(l=u.active)?void 0:l.official)?"secondary":"outline",disabled:null==(s=u.active)?void 0:s.official,onClick:function(){m(u.id)},children:(null==(c=u.active)?void 0:c.official)?h("harness.officialActive"):h("harness.officialSwitch")})]}):null,0===u.profiles.length?(0,g.jsxs)("div",{className:"rounded-xl border border-dashed bg-card/60 px-5 py-8 text-center",children:[(0,g.jsx)("p",{className:"text-sm text-muted-foreground",children:h("harness.noProfiles")}),(0,g.jsxs)(oo,{className:"mt-4",size:"sm",onClick:d,children:[(0,g.jsx)(T,{}),h("harness.newProfile")]})]}):u.profiles.map(function(e){var t,n,r=(null==(t=u.active)?void 0:t.official)!==!0&&(null==(n=u.active)?void 0:n.name)===e.name;return(0,g.jsxs)("div",{className:aR("flex flex-col gap-4 rounded-xl border bg-card px-4 py-4 shadow-[0_10px_28px_-26px_rgb(36_39_70/0.38)] transition-[border-color,background-color,box-shadow] sm:flex-row sm:items-center sm:justify-between",r?"border-primary/20 bg-primary/[0.035] shadow-[0_12px_30px_-24px_rgb(99_91_255/0.35)]":"hover:border-primary/15 hover:bg-card/85"),children:[(0,g.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[(0,g.jsx)("span",{className:aR("mt-2 size-2 shrink-0 rounded-full",r?"bg-primary":"bg-muted-foreground/30")}),(0,g.jsxs)("div",{className:"min-w-0",children:[(0,g.jsxs)("div",{className:"flex items-center gap-2",children:[(0,g.jsx)("p",{className:"font-medium",children:e.name}),r?(0,g.jsx)(aI,{children:h("harness.active")}):null,e.overriddenTargets.length>0?(0,g.jsx)(aI,{variant:"outline",children:h("harness.manualOverride")}):null]}),(0,g.jsx)("p",{className:"mt-1 truncate font-mono text-xs text-muted-foreground",children:e.baseUrl}),e.model?(0,g.jsx)("p",{className:"mt-0.5 font-mono text-xs text-muted-foreground",children:e.model}):null]})]}),(0,g.jsxs)("div",{className:"flex shrink-0 items-center gap-1.5 self-end sm:self-auto",children:[(0,g.jsxs)(oo,{size:"sm",variant:r?"secondary":"outline",onClick:function(){return O(e)},children:[r?null:(0,g.jsx)(ff,{}),r?h("harness.active"):h("harness.activate")]}),(0,g.jsx)(oo,{size:"icon",variant:"ghost","aria-label":h("harness.edit",{name:e.name}),onClick:function(){return f(e)},children:(0,g.jsx)(fp,{})}),(0,g.jsx)(oo,{size:"icon",variant:"ghost","aria-label":h("harness.delete",{name:e.name}),disabled:r,title:r?h("harness.deleteBlocked"):void 0,onClick:function(){return k(e.name)},children:(0,g.jsx)(fh,{className:r?void 0:"text-destructive"})})]})]},e.name)})]})]}),S?(0,g.jsx)(fy,{harness:u,profile:S,open:!0,onOpenChange:function(e){return!e&&O(null)}}):null,(0,g.jsx)(sj,{open:null!==w,onOpenChange:function(e){return!e&&k(null)},children:(0,g.jsxs)(sI,{children:[(0,g.jsxs)(sM,{children:[(0,g.jsx)(sF,{children:h("harness.deleteTitle")}),(0,g.jsx)(s$,{children:h("harness.deleteBody",{harness:u.label,profile:null!=w?w:"",extra:"additive"===u.mode?h("harness.deleteAdditiveExtra"):""})})]}),(0,g.jsxs)(sD,{children:[(0,g.jsx)(sH,{children:h("common.cancel")}),(0,g.jsx)(sU,{onClick:function(){w&&v(u.id,w)},children:h("common.delete")})]})]})})]})}function fN(e){return(fN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var fP=["size","style"];function fE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function f_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fE(Object(n),!0).forEach(function(t){var r,a,o;r=e,a=t,o=n[t],(a=function(e){var t=function(e,t){if("object"!=fN(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=fN(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==fN(t)?t:String(t)}(a))in r?Object.defineProperty(r,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[a]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fE(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var fz=(0,y.memo)(function(e){var t=e.size,n=void 0===t?"1em":t,r=e.style,a=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,fP);return(0,g.jsxs)("svg",f_(f_({height:n,style:f_({flex:"none",lineHeight:1},r),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},a),{},{children:[(0,g.jsx)("title",{children:"Claude Code"}),(0,g.jsx)("path",{clipRule:"evenodd",d:"M20.998 10.949H24v3.102h-3v3.028h-1.487V20H18v-2.921h-1.487V20H15v-2.921H9V20H7.488v-2.921H6V20H4.487v-2.921H3V14.05H0V10.95h3V5h17.998v5.949zM6 10.949h1.488V8.102H6v2.847zm10.51 0H18V8.102h-1.49v2.847z",fill:"#D97757",fillRule:"evenodd"})]}))});let fT=/\p{Lu}?\p{Ll}+|[0-9]+|\p{Lu}+(?!\p{Ll})|\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{L}+/gu;var fA=function(e){var t=(0,y.useId)(),n="lobe-icons-".concat(Array.from(e.match(fT)??[]).map(e=>e.toLowerCase()).join("-"),"-").concat(t);return(0,y.useMemo)(function(){return{fill:"url(#".concat(n,")"),id:n}},[e])},fR="Codex";function fL(e){return(fL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var fI=["size","style"];function fM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function fD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fM(Object(n),!0).forEach(function(t){var r,a,o;r=e,a=t,o=n[t],(a=function(e){var t=function(e,t){if("object"!=fL(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=fL(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==fL(t)?t:String(t)}(a))in r?Object.defineProperty(r,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[a]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var fF=(0,y.memo)(function(e){var t=e.size,n=void 0===t?"1em":t,r=e.style,a=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,fI),o=fA(fR),i=o.id,l=o.fill;return(0,g.jsxs)("svg",fD(fD({height:n,style:fD({flex:"none",lineHeight:1},r),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},a),{},{children:[(0,g.jsx)("title",{children:fR}),(0,g.jsx)("path",{d:"M19.503 0H4.496A4.496 4.496 0 000 4.496v15.007A4.496 4.496 0 004.496 24h15.007A4.496 4.496 0 0024 19.503V4.496A4.496 4.496 0 0019.503 0z",fill:"#fff"}),(0,g.jsx)("path",{d:"M9.064 3.344a4.578 4.578 0 012.285-.312c1 .115 1.891.54 2.673 1.275.01.01.024.017.037.021a.09.09 0 00.043 0 4.55 4.55 0 013.046.275l.047.022.116.057a4.581 4.581 0 012.188 2.399c.209.51.313 1.041.315 1.595a4.24 4.24 0 01-.134 1.223.123.123 0 00.03.115c.594.607.988 1.33 1.183 2.17.289 1.425-.007 2.71-.887 3.854l-.136.166a4.548 4.548 0 01-2.201 1.388.123.123 0 00-.081.076c-.191.551-.383 1.023-.74 1.494-.9 1.187-2.222 1.846-3.711 1.838-1.187-.006-2.239-.44-3.157-1.302a.107.107 0 00-.105-.024c-.388.125-.78.143-1.204.138a4.441 4.441 0 01-1.945-.466 4.544 4.544 0 01-1.61-1.335c-.152-.202-.303-.392-.414-.617a5.81 5.81 0 01-.37-.961 4.582 4.582 0 01-.014-2.298.124.124 0 00.006-.056.085.085 0 00-.027-.048 4.467 4.467 0 01-1.034-1.651 3.896 3.896 0 01-.251-1.192 5.189 5.189 0 01.141-1.6c.337-1.112.982-1.985 1.933-2.618.212-.141.413-.251.601-.33.215-.089.43-.164.646-.227a.098.098 0 00.065-.066 4.51 4.51 0 01.829-1.615 4.535 4.535 0 011.837-1.388zm3.482 10.565a.637.637 0 000 1.272h3.636a.637.637 0 100-1.272h-3.636zM8.462 9.23a.637.637 0 00-1.106.631l1.272 2.224-1.266 2.136a.636.636 0 101.095.649l1.454-2.455a.636.636 0 00.005-.64L8.462 9.23z",fill:l}),(0,g.jsx)("defs",{children:(0,g.jsxs)("linearGradient",{gradientUnits:"userSpaceOnUse",id:i,x1:"12",x2:"12",y1:"3",y2:"21",children:[(0,g.jsx)("stop",{stopColor:"#B1A7FF"}),(0,g.jsx)("stop",{offset:".5",stopColor:"#7A9DFF"}),(0,g.jsx)("stop",{offset:"1",stopColor:"#3941FF"})]})})]}))});function f$(e){return(f$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var fU=["size","style"];function fH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function fB(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fH(Object(n),!0).forEach(function(t){var r,a,o;r=e,a=t,o=n[t],(a=function(e){var t=function(e,t){if("object"!=f$(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=f$(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==f$(t)?t:String(t)}(a))in r?Object.defineProperty(r,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[a]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fH(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var fK=(0,y.memo)(function(e){var t=e.size,n=void 0===t?"1em":t,r=e.style,a=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,fU);return(0,g.jsxs)("svg",fB(fB({height:n,style:fB({flex:"none",lineHeight:1},r),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},a),{},{children:[(0,g.jsx)("title",{children:"DeepSeek"}),(0,g.jsx)("path",{d:"M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z",fill:"#4D6BFE"})]}))});function fV(e){return(fV="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var fq=["size","style"];function fW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function fZ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fW(Object(n),!0).forEach(function(t){var r,a,o;r=e,a=t,o=n[t],(a=function(e){var t=function(e,t){if("object"!=fV(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=fV(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==fV(t)?t:String(t)}(a))in r?Object.defineProperty(r,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[a]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fW(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var fG=(0,y.memo)(function(e){var t=e.size,n=void 0===t?"1em":t,r=e.style,a=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,fq);return(0,g.jsxs)("svg",fZ(fZ({fill:"currentColor",fillRule:"evenodd",height:n,style:fZ({flex:"none",lineHeight:1},r),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},a),{},{children:[(0,g.jsx)("title",{children:"Kimi"}),(0,g.jsx)("path",{d:"M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z"}),(0,g.jsx)("path",{d:"M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z"})]}))});function fJ(e){return(fJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var fQ=["size","style"];function fY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function fX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fY(Object(n),!0).forEach(function(t){var r,a,o;r=e,a=t,o=n[t],(a=function(e){var t=function(e,t){if("object"!=fJ(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=fJ(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==fJ(t)?t:String(t)}(a))in r?Object.defineProperty(r,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[a]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var f0={claude:fz,codex:fF,kimi:fG,pi:(0,y.memo)(function(e){var t=e.size,n=void 0===t?"1em":t,r=e.style,a=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,fQ);return(0,g.jsxs)("svg",fX(fX({fill:"currentColor",fillRule:"evenodd",height:n,style:fX({flex:"none",lineHeight:1},r),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},a),{},{children:[(0,g.jsx)("title",{children:"Pi"}),(0,g.jsx)("path",{clipRule:"evenodd",d:"M1 1h16.5v11H12v5.5H6.5V23H1V1zm5.5 5.5V12H12V6.5H6.5z"}),(0,g.jsx)("path",{d:"M17.5 12H23v11h-5.5V12z"})]}))}),dsh:fK};function f1(e){var t=e.id,n=e.className,r=f0[t];return(0,g.jsx)(r,{"aria-hidden":!0,className:aR("size-5",n)})}let f2=O("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),f4=O("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);function f3(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function f5(e,t,n,r,a,o,i){try{var l=e[o](i),s=l.value}catch(e){n(e);return}l.done?t(s):Promise.resolve(s).then(r,a)}function f6(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f8(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){f6(e,t,n[t])})}return e}function f9(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,a=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],i=!0,l=!1;try{for(a=a.call(e);!(i=(n=a.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){l=!0,r=e}finally{try{i||null==a.return||a.return()}finally{if(l)throw r}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return f3(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f3(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f7(e){var t=e.open,n=e.onOpenChange,r=(0,x.Bd)().t,a=ss(function(e){return e.scan}),o=ss(function(e){return e.scanLoading}),i=ss(function(e){return e.scanError}),l=ss(function(e){return e.loadScan}),s=ss(function(e){return e.importScan}),c=ss(function(e){return e.providers}),u=ss(function(e){return e.loadProviders}),d=f9((0,y.useState)({}),2),f=d[0],p=d[1],h=f9((0,y.useState)(!1),2),m=h[0],v=h[1],b=f9((0,y.useState)(null),2),w=b[0],k=b[1],j=f9((0,y.useState)(null),2),S=j[0],O=j[1];(0,y.useEffect)(function(){t&&(O(null),k(null),l(),u())},[t,l,u]),(0,y.useEffect)(function(){a&&p(function(e){var t={},n=!0,r=!1,o=void 0;try{for(var i,l=a[Symbol.iterator]();!(n=(i=l.next()).done);n=!0){var s=i.value,c=!0,u=!1,d=void 0;try{for(var f,p=s.candidates[Symbol.iterator]();!(c=(f=p.next()).done);c=!0){var h,m,g=f.value;t[g.id]=null!=(h=e[g.id])?h:{selected:!1,name:g.suggestedName,target:g.matchesProvider?"vault":"profile",providerId:null!=(m=g.matchesProvider)?m:"",apiKey:"",overwrite:!1}}}catch(e){u=!0,d=e}finally{try{c||null==p.return||p.return()}finally{if(u)throw d}}}}catch(e){r=!0,o=e}finally{try{n||null==l.return||l.return()}finally{if(r)throw o}}return t})},[a]);var C=(null!=a?a:[]).flatMap(function(e){return e.candidates}).filter(function(e){var t;return null==(t=f[e.id])?void 0:t.selected}),N=C.filter(function(e){var t=f[e.id],n=!e.apiKeyPresent&&!t.apiKey.trim(),r="vault"===t.target&&""!==t.providerId;return!t.name.trim()||n&&!r});return(0,g.jsx)(lc,{open:t,onOpenChange:n,children:(0,g.jsxs)(lT,{className:"flex max-h-[85vh] w-[min(56rem,calc(100vw-2rem))] max-w-3xl flex-col overflow-hidden",children:[(0,g.jsxs)(lA,{children:[(0,g.jsx)(lL,{children:r("import.title")}),(0,g.jsx)(lI,{children:r("import.intro")})]}),(0,g.jsxs)("div",{className:"min-h-0 flex-1 space-y-4 overflow-y-auto pr-1",children:[o?(0,g.jsxs)("p",{className:"flex items-center justify-center gap-2 py-10 text-sm text-muted-foreground",children:[(0,g.jsx)(f2,{className:"size-4 animate-spin"}),r("import.scanning")]}):null,i?(0,g.jsx)("p",{className:"py-6 text-sm text-destructive",children:l7(r,i)}):null,S?(0,g.jsxs)("div",{className:"rounded-xl border border-emerald-500/40 bg-emerald-500/5 px-4 py-3 text-sm",children:[(0,g.jsxs)("p",{className:"flex items-center gap-2 font-medium",children:[(0,g.jsx)(f4,{className:"size-4 text-emerald-600"}),r("import.summary",{imported:S.imported,skipped:S.skipped,providersCreated:S.providersCreated})]}),S.warnings.map(function(e){return(0,g.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:l7(r,e)},e.key+e.scope)})]}):null,(null!=a?a:[]).map(function(e){var t,n,a;return(0,g.jsxs)("section",{className:"rounded-2xl border bg-card px-4 py-3",children:[(0,g.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,g.jsx)("h3",{className:"text-sm font-semibold",children:e.label}),e.candidates.length>0?(0,g.jsx)(aI,{variant:"secondary",children:r("import.providerCount",{count:e.candidates.length})}):null]}),(0,g.jsx)("ul",{className:"mt-2 space-y-0.5",children:e.sources.map(function(e){return(0,g.jsxs)("li",{className:"truncate font-mono text-[11px] text-muted-foreground",children:[e.path," \xb7"," ",e.exists?e.parsable?r("import.sourceRead"):r("import.sourceUnparsable"):r("import.sourceMissing")]},e.key)})}),0===e.candidates.length?(0,g.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:(t=r,(n=e).note||n.noteCode?l7(t,{key:null!=(a=n.noteCode)?a:"scan.note.unknown",fallback:n.note}):"")}):(0,g.jsx)("ul",{className:"mt-3 space-y-3",children:e.candidates.map(function(e){return(0,g.jsx)(pe,{candidate:e,choice:f[e.id],providers:null!=c?c:[],onChange:function(t){var n;return n=e.id,void p(function(e){var r,a;return r=f8({},e),a=null!=(a=f6({},n,f8({},e[n],t)))?a:{},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(a)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(a)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(a,e))}),r})}},e.id)})})]},e.harness)})]}),w?(0,g.jsx)("p",{className:"text-sm text-destructive",children:l7(r,w)}):null,(0,g.jsxs)(lR,{className:"items-center",children:[(0,g.jsx)("span",{className:"mr-auto text-xs text-muted-foreground",children:C.length>0?r("import.selected",{count:C.length}):r("import.selectPrompt")}),(0,g.jsxs)(oo,{variant:"outline",onClick:function(){l()},disabled:o,children:[(0,g.jsx)(P,{}),r("import.rescan")]}),(0,g.jsxs)(oo,{disabled:0===C.length||N.length>0||m,onClick:function(){var e;(e=function(){var e;return function(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(i,"next",{value:s(0)}),l(i,"throw",{value:s(1)}),l(i,"return",{value:s(2)}),"function"==typeof Symbol&&l(i,Symbol.iterator,{value:function(){return this}}),i;function s(l){return function(s){var c=[l,s];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&c[0]?r.return:c[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;switch(r=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]<a[3])){o.label=c[1];break}if(6===c[0]&&o.label<a[1]){o.label=a[1],a=c;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(c);break}a[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(t){switch(t.label){case 0:v(!0),k(null),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,s(C.map(function(e){var t=f[e.id];return f8({id:e.id,name:t.name.trim(),target:t.target},"vault"===t.target&&t.providerId?{providerId:t.providerId}:{},t.apiKey.trim()?{apiKey:t.apiKey.trim()}:{},t.overwrite?{overwrite:!0}:{})}))];case 2:return O({imported:(e=t.sent()).imported,skipped:e.skipped,providersCreated:e.providersCreated,warnings:e.warnings.map(l5)}),p({}),[3,5];case 3:return k(l8(t.sent(),"import.failed")),[3,5];case 4:return v(!1),[7];case 5:return[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function i(e){f5(o,r,a,i,l,"next",e)}function l(e){f5(o,r,a,i,l,"throw",e)}i(void 0)})})()},children:[m?(0,g.jsx)(f2,{className:"animate-spin"}):null,r("import.importSelected")]})]})]})})}function pe(e){var t=e.candidate,n=e.choice,r=e.providers,a=e.onChange,o=(0,x.Bd)().t;if(!n)return null;var i="vault"===n.target&&""!==n.providerId,l=!t.apiKeyPresent&&!i;return(0,g.jsx)("li",{className:"rounded-xl border bg-background px-3 py-3",children:(0,g.jsxs)("div",{className:"flex items-start gap-3",children:[(0,g.jsx)(ch,{className:"mt-1",checked:n.selected,onCheckedChange:function(e){return a({selected:!0===e})},"aria-label":o("import.select",{name:t.sourceKey})}),(0,g.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,g.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,g.jsx)("span",{className:"truncate font-mono text-sm",children:t.sourceKey}),t.active?(0,g.jsx)(aI,{children:o("import.inUse")}):null,t.conflictsWith?(0,g.jsx)(aI,{variant:"secondary",children:o("import.nameTaken")}):null,t.matchesProvider?(0,g.jsx)(aI,{variant:"secondary",children:o("import.matchesProvider",{name:t.matchesProvider})}):null]}),(0,g.jsxs)("p",{className:"mt-0.5 truncate text-xs text-muted-foreground",children:[t.baseUrl||o("import.noBaseUrl"),t.model?" \xb7 ".concat(t.model):"",t.apiKeyPresent?" \xb7 ".concat(t.apiKeyPreview):" \xb7 ".concat(o("import.keyOutsideConfig"))]}),n.selected?(0,g.jsxs)("div",{className:"mt-3 grid gap-3 sm:grid-cols-2",children:[(0,g.jsxs)("div",{className:"space-y-1.5",children:[(0,g.jsx)(cv,{htmlFor:"name-".concat(t.id),children:o("import.profileName")}),(0,g.jsx)(cm,{id:"name-".concat(t.id),value:n.name,onChange:function(e){return a({name:e.target.value})}})]}),(0,g.jsxs)("div",{className:"space-y-1.5",children:[(0,g.jsx)(cv,{htmlFor:"target-".concat(t.id),children:o("import.credentialTarget")}),(0,g.jsxs)(df,{value:"vault"===n.target?n.providerId||"new-vault":"profile",onValueChange:function(e){return a("profile"===e?{target:"profile",providerId:""}:"new-vault"===e?{target:"vault",providerId:""}:{target:"vault",providerId:e})},children:[(0,g.jsx)(fe,{id:"target-".concat(t.id),children:(0,g.jsx)(dh,{})}),(0,g.jsxs)(fr,{children:[(0,g.jsx)(fa,{value:"profile",children:o("import.targetProfile")}),(0,g.jsx)(fa,{value:"new-vault",children:o("import.targetNewVault")}),r.map(function(e){return(0,g.jsx)(fa,{value:e.id,children:o("import.targetExisting",{name:e.name})},e.id)})]})]})]}),l?(0,g.jsxs)("div",{className:"space-y-1.5 sm:col-span-2",children:[(0,g.jsx)(cv,{htmlFor:"key-".concat(t.id),children:"API key"}),(0,g.jsx)(cm,{id:"key-".concat(t.id),type:"password",value:n.apiKey,placeholder:o("import.apiKeyFromEnv"),onChange:function(e){return a({apiKey:e.target.value})}})]}):null,t.conflictsWith?(0,g.jsxs)("label",{className:"flex items-center gap-2 text-xs text-muted-foreground sm:col-span-2",children:[(0,g.jsx)(ch,{checked:n.overwrite,onCheckedChange:function(e){return a({overwrite:!0===e})}}),o("import.overwriteExisting")]}):null]}):null]})]})})}let pt=O("languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);function pn(){var e=(0,x.Bd)().t,t=(0,x.s9)(),n=t.language,r=t.setLanguage,a="en"===n,o=e(a?"language.toChinese":"language.toEnglish");return(0,g.jsxs)(oo,{type:"button",size:"sm",variant:"outline","aria-label":o,title:o,onClick:function(){return r(a?"zh-CN":"en")},children:[(0,g.jsx)(pt,{}),(0,g.jsx)("span",{className:"hidden sm:inline",children:e("language.short")})]})}function pr(){var e=(0,x.Bd)().t,t=ss(function(e){return e.notice}),n=ss(function(e){return e.clearNotice});return((0,y.useEffect)(function(){if(t){var e=window.setTimeout(function(){return n()},8e3);return function(){return window.clearTimeout(e)}}},[t,n]),t)?(0,g.jsxs)("div",{role:"status",className:"fixed bottom-4 right-4 z-50 w-[min(28rem,calc(100vw-2rem))] rounded-2xl border bg-card p-4 shadow-[0_18px_50px_-24px_rgb(36_39_70/0.45)]",children:[(0,g.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,g.jsx)("p",{className:"text-sm font-medium",children:e("notice.title")}),(0,g.jsx)(oo,{size:"sm",variant:"ghost",onClick:n,children:e("notice.close")})]}),t.map(function(t){var n;return(0,g.jsx)("p",{className:"mt-2 text-sm leading-relaxed text-muted-foreground",children:l7(e,t)},"".concat(t.key,"-").concat(null!=(n=t.scope)?n:""))})]}):null}let pa=O("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);function po(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function pi(e,t,n,r,a,o,i){try{var l=e[o](i),s=l.value}catch(e){n(e);return}l.done?t(s):Promise.resolve(s).then(r,a)}function pl(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,a=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],i=!0,l=!1;try{for(a=a.call(e);!(i=(n=a.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){l=!0,r=e}finally{try{i||null==a.return||a.return()}finally{if(l)throw r}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return po(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return po(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ps(e){var t,n,r=e.harnessId,a=e.open,o=e.onOpenChange,i=(0,x.s9)().locale,l=(0,x.Bd)().t,s=ss(function(e){return e.operations}),c=ss(function(e){return e.operationsLoading}),u=ss(function(e){return e.operationsError}),d=ss(function(e){return e.loadOperations}),f=ss(function(e){return e.undoOperation}),p=pl((0,y.useState)(null),2),h=p[0],m=p[1],v=pl((0,y.useState)(!1),2),b=v[0],w=v[1],k=pl((0,y.useState)(null),2),j=k[0],S=k[1],O=null!=(t=null==s?void 0:s.filter(function(e){return e.harness===r}))?t:[],C=F[r];return(0,y.useEffect)(function(){a&&(S(null),d(r))},[a,r,d]),(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(lc,{open:a,onOpenChange:o,children:(0,g.jsxs)(lT,{className:"flex max-h-[85vh] w-[min(52rem,calc(100vw-2rem))] max-w-2xl flex-col gap-0 overflow-hidden p-0",children:[(0,g.jsxs)(lA,{className:"shrink-0 space-y-1.5 px-6 pb-4 pt-6 pr-12",children:[(0,g.jsx)(lL,{children:l("operations.titleFor",{harness:C})}),(0,g.jsx)(lI,{children:l("operations.intro")})]}),(0,g.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto overscroll-contain px-6",children:[c&&0===O.length?(0,g.jsxs)("p",{className:"flex items-center justify-center gap-2 py-10 text-sm text-muted-foreground",children:[(0,g.jsx)(f2,{className:"size-4 animate-spin"}),l("operations.loading")]}):null,u?(0,g.jsx)("p",{className:"py-6 text-sm text-destructive",children:l7(l,u)}):null,c||0!==O.length?null:(0,g.jsx)("p",{className:"py-10 text-center text-sm text-muted-foreground",children:l("operations.empty")}),O.length>0?(0,g.jsx)("ul",{className:"divide-y rounded-xl border",children:O.map(function(e){var t,n,r,a,o;return(0,g.jsxs)("li",{className:"flex items-center gap-3 px-3 py-2.5",children:[(0,g.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,g.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,g.jsxs)("span",{className:"truncate text-sm font-medium",children:[l("operations.kind.".concat(e.kind))," \xb7 ",e.profile]}),(0,g.jsx)(aI,{variant:"degraded"===(n=e.state)?"destructive":"committed"===n?"default":"secondary",children:l("operations.state.".concat(e.state))})]}),(0,g.jsxs)("p",{className:"truncate text-xs text-muted-foreground",children:[(r=null!=(t=e.finishedAt)?t:e.startedAt,a=i,Number.isNaN((o=new Date(r)).getTime())?r:o.toLocaleString(a))," \xb7"," ",l("operations.user",{user:e.user})," \xb7"," ",l("operations.fileCount",{count:e.files.length})]}),e.note?(0,g.jsx)("p",{className:"truncate text-xs text-muted-foreground",children:e.note}):null]}),(0,g.jsxs)(oo,{size:"sm",variant:"outline",className:"shrink-0",disabled:!e.undoable,onClick:function(){return m(e)},children:[(0,g.jsx)(pa,{}),l("operations.undo")]})]},e.id)})}):null]}),(0,g.jsx)(lR,{className:"shrink-0 px-6 py-4",children:(0,g.jsx)(oo,{onClick:function(){return o(!1)},children:l("operations.close")})})]})}),(0,g.jsx)(lc,{open:null!==h,onOpenChange:function(e){return!e&&m(null)},children:(0,g.jsxs)(lT,{className:"max-w-lg",children:[(0,g.jsxs)(lA,{children:[(0,g.jsx)(lL,{children:l("operations.undoTitle")}),(0,g.jsx)(lI,{children:h?l("operations.undoBody",{harness:null!=(n=F[h.harness])?n:h.harness,count:h.files.length}):""})]}),j?(0,g.jsx)("p",{className:"text-sm text-destructive",children:l7(l,j)}):null,(0,g.jsxs)(lR,{children:[(0,g.jsx)(oo,{variant:"outline",onClick:function(){return m(null)},children:l("common.cancel")}),(0,g.jsxs)(oo,{disabled:b,onClick:function(){var e;(e=function(){return function(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(i,"next",{value:s(0)}),l(i,"throw",{value:s(1)}),l(i,"return",{value:s(2)}),"function"==typeof Symbol&&l(i,Symbol.iterator,{value:function(){return this}}),i;function s(l){return function(s){var c=[l,s];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&c[0]?r.return:c[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;switch(r=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]<a[3])){o.label=c[1];break}if(6===c[0]&&o.label<a[1]){o.label=a[1],a=c;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(c);break}a[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(e){switch(e.label){case 0:if(!h)return[2];w(!0),S(null),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,f(h.id)];case 2:return e.sent(),m(null),[3,5];case 3:return S(l8(e.sent(),"operations.undoFailed")),[3,5];case 4:return w(!1),[7];case 5:return[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function i(e){pi(o,r,a,i,l,"next",e)}function l(e){pi(o,r,a,i,l,"throw",e)}i(void 0)})})()},children:[b?(0,g.jsx)(f2,{className:"animate-spin"}):null,l("operations.confirmUndo")]})]})]})})]})}function pc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function pu(e){var t,n,r=e.harness,a=(0,x.Bd)().t,o=ss(function(e){return e.operations}),i=ss(function(e){return e.operationsLoading}),l=ss(function(e){return e.operationsError}),s=ss(function(e){return e.loadOperations}),c=function(e){if(Array.isArray(e))return e}(t=(0,y.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,i=!1;try{for(r=r.call(e);!(o=(t=r.next()).done)&&(a.push(t.value),2!==a.length);o=!0);}catch(e){i=!0,n=e}finally{try{o||null==r.return||r.return()}finally{if(i)throw n}}return a}}(t)||function(e){if(e){if("string"==typeof e)return pc(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return pc(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),u=c[0],d=c[1],f=null!=(n=null==o?void 0:o.filter(function(e){return e.harness===r.id}))?n:[];return(0,y.useEffect)(function(){s(r.id)},[r.id,s]),(0,g.jsxs)("section",{className:"rounded-2xl border bg-card p-5 shadow-[0_12px_34px_-28px_rgb(36_39_70/0.38)]",children:[(0,g.jsxs)("div",{className:"flex items-center gap-2",children:[(0,g.jsx)(rE,{className:"size-4 text-primary"}),(0,g.jsx)("h3",{className:"font-semibold",children:a("operations.title")}),(0,g.jsx)("span",{className:"ml-auto",children:(0,g.jsx)(oo,{size:"icon",variant:"ghost","aria-label":a("operations.refresh"),onClick:function(){s(r.id)},children:(0,g.jsx)(sp,{className:i?"animate-spin":void 0})})})]}),(0,g.jsx)("div",{className:"mt-4",children:l?(0,g.jsx)("p",{className:"text-sm text-destructive",children:l7(a,l)}):null===o||i?(0,g.jsx)("p",{className:"text-sm text-muted-foreground",children:a("operations.loading")}):0===f.length?(0,g.jsx)("p",{className:"text-sm text-muted-foreground",children:a("operations.empty")}):(0,g.jsx)("p",{className:"text-sm text-muted-foreground",children:a("operations.count",{count:f.length})})}),(0,g.jsx)(oo,{className:"mt-4 w-full",size:"sm",variant:"outline",disabled:null===o,onClick:function(){return d(!0)},children:a("operations.viewDetails")}),(0,g.jsx)(ps,{harnessId:r.id,open:u,onOpenChange:d})]})}let pd=O("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),pf=O("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),pp=O("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);function ph(e){var t=e.result,n=(0,x.Bd)().t;if(t.ok){var r,a,o,i,l=null!=(a=null==(i=t.models)?void 0:i.length)?a:0;return(0,g.jsxs)("span",{className:"flex items-center gap-1.5 text-sm text-emerald-600 dark:text-emerald-400",children:[(0,g.jsx)(f4,{className:"size-4 shrink-0","aria-hidden":!0}),n(l>0?"probe.ok":"probe.okNoCatalog",{latencyMs:null!=(o=t.latencyMs)?o:"?",count:l})]})}return(0,g.jsxs)("span",{className:"flex items-center gap-1.5 text-sm text-destructive",children:[(0,g.jsx)(pp,{className:"size-4 shrink-0","aria-hidden":!0}),l7(n,l5({code:t.code,params:t.params,message:null!=(r=t.message)?r:""}))]})}function pm(e){var t=e.className,n=function(e,t){if(null==e)return{};var n,r,a,o={};if("u">typeof Reflect&&Reflect.ownKeys){for(a=0,n=Reflect.ownKeys(Object(e));a<n.length;a++)r=n[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}if(o=function(e,t){if(null==e)return{};var n,r,a={},o=Object.getOwnPropertyNames(e);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n]);return a}(e,t),Object.getOwnPropertySymbols)for(a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)r=n[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}(e,["className"]);return(0,g.jsx)("textarea",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({"data-slot":"textarea",className:aR("flex min-h-[60px] w-full rounded-[10px] border border-input bg-card px-3 py-2 text-base shadow-[0_1px_2px_rgb(20_24_40/0.04)] transition-[border-color,box-shadow] placeholder:text-muted-foreground focus-visible:border-ring/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/20 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 aria-invalid:focus-visible:border-destructive aria-invalid:focus-visible:ring-destructive/25 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t)},n))}function pg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function py(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function pv(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function pb(e){return function(e){if(Array.isArray(e))return pg(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return pg(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return pg(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var px=[{id:"openrouter",baseUrl:"https://openrouter.ai/api/v1"},{id:"zai",baseUrl:"https://api.z.ai/api/paas/v4",model:"glm-4.6"},{id:"moonshot",baseUrl:"https://api.moonshot.cn/v1"},{id:"deepseek",baseUrl:"https://api.deepseek.com/v1"}],pw={id:"cliproxyResponses",baseUrl:"https://api.seavey.ai/cliproxy/v1",model:"gpt-5.6-sol"},pk={claude:[{id:"zaiAnthropic",baseUrl:"https://api.z.ai/api/anthropic",model:"glm-4.6"},{id:"moonshotAnthropic",baseUrl:"https://api.moonshot.cn/anthropic"},{id:"deepseekAnthropic",baseUrl:"https://api.deepseek.com/anthropic"}],codex:px,kimi:px,pi:[pv(py({},pw),{extras:{api:"openai-responses",reasoning:"true"}})].concat(pb(px)),dsh:[pv(py({},pw),{extras:{api:"openai-responses",reasoningEfforts:"low,medium,high,xhigh,max"}})].concat(pb(px))};function pj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function pS(e,t,n,r,a,o,i){try{var l=e[o](i),s=l.value}catch(e){n(e);return}l.done?t(s):Promise.resolve(s).then(r,a)}function pO(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function i(e){pS(o,r,a,i,l,"next",e)}function l(e){pS(o,r,a,i,l,"throw",e)}i(void 0)})}}function pC(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pN(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){pC(e,t,n[t])})}return e}function pP(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function pE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,a=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],i=!0,l=!1;try{for(a=a.call(e);!(i=(n=a.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){l=!0,r=e}finally{try{i||null==a.return||a.return()}finally{if(l)throw r}}return o}}(e,t)||p_(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p_(e,t){if(e){if("string"==typeof e)return pj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pj(e,t)}}function pz(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(i,"next",{value:s(0)}),l(i,"throw",{value:s(1)}),l(i,"return",{value:s(2)}),"function"==typeof Symbol&&l(i,Symbol.iterator,{value:function(){return this}}),i;function s(l){return function(s){var c=[l,s];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&c[0]?r.return:c[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;switch(r=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]<a[3])){o.label=c[1];break}if(6===c[0]&&o.label<a[1]){o.label=a[1],a=c;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(c);break}a[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var pT=[{role:"Sonnet",modelKey:"sonnetModel",nameKey:"sonnetModelName",oneMKey:"sonnetModel1m"},{role:"Opus",modelKey:"opusModel",nameKey:"opusModelName",oneMKey:"opusModel1m"},{role:"Fable",modelKey:"fableModel",nameKey:"fableModelName",oneMKey:"fableModel1m"},{role:"Haiku",modelKey:"haikuModel",nameKey:"haikuModelName",oneMKey:null}],pA="subagentModel",pR="subagentModel1m",pL=new Set(((function(e){if(Array.isArray(e))return pj(e)})(u=pT.flatMap(function(e){var t=e.modelKey,n=e.nameKey,r=e.oneMKey;return r?[t,n,r]:[t,n]}))||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(u)||p_(u)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([pA,pR]));function pI(e){var t,n,r,a,o,i,l,s,c,u=e.harness,d=e.profile,f=e.onOpenChange,p=(0,x.Bd)().t,h=ss(function(e){return e.createProfile}),m=ss(function(e){return e.updateProfile}),v=ss(function(e){return e.previewProfile}),b=ss(function(e){return e.providers}),w=ss(function(e){return e.loadProviders}),k=ss(function(e){return e.probeDraft}),j=ss(function(e){return e.probeProfile}),S=null!==d,O=pE((0,y.useState)(null!=(t=null==d?void 0:d.name)?t:""),2),C=O[0],N=O[1],P=pE((0,y.useState)(null!=(n=null==d?void 0:d.baseUrl)?n:""),2),E=P[0],_=P[1],z=pE((0,y.useState)(""),2),T=z[0],R=z[1],L=pE((0,y.useState)(null!=(r=null==d?void 0:d.model)?r:""),2),I=L[0],M=L[1],D=pE((0,y.useState)(null!=(a=null==d?void 0:d.notes)?a:""),2),F=D[0],$=D[1],U=pE((0,y.useState)(function(){return function(e,t){var n={},r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done);r=!0){var s,c,u=i.value;n[u.key]=null!=(s=null!=(c=null==t?void 0:t.extras[u.key])?c:u.defaultValue)?s:""}}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return n}(u.fields,d)}),2),H=U[0],B=U[1],K=pE((0,y.useState)({}),2),V=K[0],q=K[1],W=pE((0,y.useState)(null!=(o=null==d?void 0:d.providerId)?o:""),2),Z=W[0],G=W[1],J=pE((0,y.useState)(null!=(i=null==d?void 0:d.providerEndpoint)?i:""),2),Q=J[0],Y=J[1],X=pE((0,y.useState)(!1),2),ee=X[0],et=X[1],en=pE((0,y.useState)(null),2),er=en[0],ea=en[1],eo=pE((0,y.useState)(null),2),ei=eo[0],el=eo[1],es=pE((0,y.useState)(!1),2),ec=es[0],eu=es[1],ed=pE((0,y.useState)({}),2),ef=ed[0],ep=ed[1],eh=pE((0,y.useState)(!1),2),em=eh[0],eg=eh[1],ey=pE((0,y.useState)(null),2),ev=ey[0],eb=ey[1],ex=null!=b?b:[],ew=null!=(l=ex.find(function(e){return e.id===Z}))?l:null,ek=null==ew?void 0:ew.endpoints.find(function(e){return e.key===Q}),ej=(null==ev?void 0:ev.ok)&&null!=(s=ev.models)?s:[];(0,y.useEffect)(function(){eb(null)},[E,T,Z,Q]);var eS=null!==b&&""!==Z&&null===ew,eO=null!==ew&&""!==Q&&void 0===ek,eC="claude"===u.id?u.fields.filter(function(e){return!pL.has(e.key)}):u.fields,eN="claude"===u.id?eC.filter(function(e){return"authVar"===e.key}):eC,eP="claude"===u.id?eC.filter(function(e){return"authVar"!==e.key}):[];function eE(){return pO(function(){var e;return pz(this,function(t){switch(t.label){case 0:if(!d)return[2];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,v(u.id,d.name)];case 2:return ea(e=t.sent()),q(Object.fromEntries(e.filter(function(e){return e.overridden}).map(function(e){return[e.key,e.content]}))),[3,4];case 3:return el(l6(t.sent())),[3,4];case 4:return[2]}})})()}function e_(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];ep(function(e){if(!t.some(function(t){return e[t]}))return e;var n=pN({},e),r=!0,a=!1,o=void 0;try{for(var i,l=t[Symbol.iterator]();!(r=(i=l.next()).done);r=!0){var s=i.value;delete n[s]}}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return n})}function ez(){var e;return ew&&Q&&null!=(e=null==ek?void 0:ek.baseUrl)?e:E}return(0,y.useEffect)(function(){null===b&&w()},[b,w]),(0,g.jsx)(lc,{open:!0,onOpenChange:f,children:(0,g.jsx)(lT,{className:"max-h-[92vh] w-[calc(100vw-2rem)] overflow-hidden p-0 sm:max-w-[1120px]",children:(0,g.jsxs)("form",{onSubmit:function(e){return pO(function(){var t,n;return pz(this,function(r){switch(r.label){case 0:if(e.preventDefault(),!function(){var e={},t=C.trim();t?t.includes("/")||t.includes("\\")?e.name={key:"profile.error.nameSlash"}:t.length>120&&(e.name={key:"profile.error.nameTooLong",params:{max:120}}):e.name={key:"profile.error.nameRequired"},ez().trim()||(e.baseUrl={key:"profile.error.baseUrlRequired"}),S||null!==ew||T.trim()||(e.apiKey={key:"profile.error.apiKeyRequired"}),u.modelRequired&&!I.trim()&&(e.model={key:"profile.error.modelRequired"}),eS&&(e.providerId={key:"profile.error.providerGone"}),eO&&(e.providerEndpoint={key:"profile.error.endpointGone"});var n=!0,r=!1,a=void 0;try{for(var o,i=u.fields[Symbol.iterator]();!(n=(o=i.next()).done);n=!0){var l,s=o.value;!s.required||(null==(l=H[s.key])?void 0:l.trim())||(e["extra:".concat(s.key)]={key:"profile.error.fieldRequired",params:{label:s.label}})}}catch(e){r=!0,a=e}finally{try{n||null==i.return||i.return()}finally{if(r)throw a}}return ep(e),!(Object.keys(e).length>0)||(el({key:"profile.error.checkFields"}),!1)}())return[2];eu(!0),el(null),r.label=1;case 1:if(r.trys.push([1,6,7,8]),n=pN({name:C,baseUrl:ew&&Q&&null!=(t=null==ek?void 0:ek.baseUrl)?t:E,model:I,notes:F,extras:H},Z?pN({providerId:Z},Q?{providerEndpoint:Q}:{}):S?{providerId:""}:{},ew?{}:{apiKey:T||void 0}),!S)return[3,3];return[4,m(u.id,d.name,pP(pN({},n),{overrides:V}))];case 2:return r.sent(),[3,5];case 3:return[4,h(u.id,n)];case 4:r.sent(),r.label=5;case 5:return f(!1),[3,8];case 6:return el(l6(r.sent())),[3,8];case 7:return eu(!1),[7];case 8:return[2]}})})()},noValidate:!0,className:"flex max-h-[92vh] min-h-0 flex-col",children:[(0,g.jsxs)(lA,{className:"shrink-0 border-b bg-card px-6 py-5 pr-12",children:[(0,g.jsx)(lL,{children:S?p("profile.editTitle",{harness:u.label,profile:d.name}):p("profile.createTitle",{harness:u.label})}),(0,g.jsxs)(lI,{children:[p("profile.intro",{targets:u.targets.map(function(e){return e.label}).join(p("common.listSeparator"))}),"additive"===u.mode?p("profile.additiveNote"):""]})]}),(0,g.jsxs)("div",{"data-slot":"profile-dialog-scroll",className:"flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-6 py-5",children:[(0,g.jsxs)("div",{"data-slot":"provider-reference-fields",className:"space-y-3 rounded-xl border p-3",children:[(0,g.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,g.jsx)(cv,{htmlFor:"provider-select",className:"font-medium",children:p("profile.useSharedProvider")}),ew?(0,g.jsx)(aI,{variant:"secondary",children:p("profile.keyFromVault")}):null]}),(0,g.jsxs)(df,{value:Z,onValueChange:function(e){G(e);var t,n,r=ex.find(function(t){return t.id===e});Y(null!=(t=null==r||null==(n=r.endpoints[0])?void 0:n.key)?t:""),e_("providerId","providerEndpoint","baseUrl","apiKey")},children:[(0,g.jsx)(fe,{id:"provider-select","aria-label":p("profile.useSharedProviderLabel"),"aria-invalid":!!ef.providerId||void 0,"aria-describedby":ef.providerId?"provider-select-error":void 0,children:(0,g.jsx)(dh,{placeholder:p("profile.providerNone")})}),(0,g.jsxs)(fr,{children:[(0,g.jsx)(fa,{value:"",children:p("profile.providerNone")}),ex.map(function(e){return(0,g.jsx)(fa,{value:e.id,children:e.name},e.id)})]})]}),ef.providerId?(0,g.jsx)("p",{id:"provider-select-error",className:"text-xs text-destructive",children:l7(p,ef.providerId)}):null,0===ex.length?(0,g.jsx)("p",{className:"text-xs text-muted-foreground",children:p("profile.vaultEmpty")}):null,ew?(0,g.jsxs)("div",{className:"space-y-2",children:[(0,g.jsx)(cv,{htmlFor:"provider-endpoint",children:p("profile.namedEndpoint")}),(0,g.jsxs)(df,{value:Q,onValueChange:function(e){Y(e),e_("providerEndpoint","baseUrl")},children:[(0,g.jsx)(fe,{id:"provider-endpoint","aria-label":p("profile.namedEndpointLabel"),"aria-invalid":!!ef.providerEndpoint||void 0,"aria-describedby":ef.providerEndpoint?"provider-endpoint-error":void 0,children:(0,g.jsx)(dh,{placeholder:p("profile.endpointNone")})}),(0,g.jsxs)(fr,{children:[(0,g.jsx)(fa,{value:"",children:p("profile.endpointNone")}),ew.endpoints.map(function(e){return(0,g.jsx)(fa,{value:e.key,children:e.label?p("profile.endpointOption",{label:e.label,key:e.key}):e.key},e.key)})]})]}),ef.providerEndpoint?(0,g.jsx)("p",{id:"provider-endpoint-error",className:"text-xs text-destructive",children:l7(p,ef.providerEndpoint)}):null,0===ew.endpoints.length?(0,g.jsx)("p",{className:"text-xs text-muted-foreground",children:p("profile.noEndpoints")}):null]}):null]}),(0,g.jsx)(pD,{harnessId:u.id,onPick:function(e){_(e.baseUrl),e_("baseUrl"),e.model&&(M(e.model),e_("model")),e.extras&&B(function(t){return pN({},t,e.extras)})}}),(0,g.jsxs)("div",{className:"grid gap-x-4 gap-y-3 sm:grid-cols-2",children:[(0,g.jsxs)("div",{className:"space-y-2 sm:col-span-2",children:[(0,g.jsx)(cv,{htmlFor:"name",children:p("profile.name")}),(0,g.jsx)(cm,{id:"name",value:C,onChange:function(e){N(e.target.value),e_("name")},placeholder:p("profile.namePlaceholder"),"aria-invalid":!!ef.name||void 0,"aria-describedby":ef.name?"profile-name-error":void 0}),ef.name?(0,g.jsx)("p",{id:"profile-name-error",className:"text-xs text-destructive",children:l7(p,ef.name)}):null,S?(0,g.jsx)("p",{className:"text-xs text-muted-foreground",children:p("profile.renameHint")}):null]}),(0,g.jsxs)("div",{className:"space-y-2 sm:col-span-2",children:[(0,g.jsx)(cv,{htmlFor:"baseUrl",children:p("profile.baseUrl")}),(0,g.jsx)(cm,{id:"baseUrl",value:ew&&Q&&null!=(c=null==ek?void 0:ek.baseUrl)?c:E,onChange:function(e){_(e.target.value),e_("baseUrl")},placeholder:p("profile.baseUrlPlaceholder"),disabled:null!==ew&&""!==Q,"aria-invalid":!!ef.baseUrl||void 0,"aria-describedby":ef.baseUrl?"profile-base-url-error":void 0}),ef.baseUrl?(0,g.jsx)("p",{id:"profile-base-url-error",className:"text-xs text-destructive",children:l7(p,ef.baseUrl)}):null,ew&&Q?(0,g.jsx)("p",{className:"text-xs text-muted-foreground",children:p("profile.baseUrlFromVault",{endpoint:Q})}):null]}),(0,g.jsxs)("div",{className:"space-y-2",children:[(0,g.jsx)(cv,{htmlFor:"apiKey",children:p("profile.apiKey")}),(0,g.jsx)(cm,{id:"apiKey",type:"password",value:T,onChange:function(e){R(e.target.value),e_("apiKey")},placeholder:ew?p("profile.keyFromVault"):S?p("profile.apiKeyKeep"):p("profile.apiKeyRequiredPlaceholder"),disabled:null!==ew,"aria-invalid":!!ef.apiKey||void 0,"aria-describedby":ef.apiKey?"profile-api-key-error":void 0}),ef.apiKey?(0,g.jsx)("p",{id:"profile-api-key-error",className:"text-xs text-destructive",children:l7(p,ef.apiKey)}):null,ew?(0,g.jsx)("p",{className:"text-xs text-muted-foreground",children:p("profile.apiKeySharedHint")}):null]}),(0,g.jsxs)("div",{className:"space-y-2",children:[(0,g.jsx)(cv,{htmlFor:"model",children:"claude"===u.id?p("profile.fallbackModel"):p("profile.model")}),(0,g.jsx)(cm,{id:"model",value:I,list:ej.length>0?"profile-model-options":void 0,onChange:function(e){M(e.target.value),e_("model")},placeholder:"claude"===u.id?p("profile.fallbackModelPlaceholder"):p("profile.modelPlaceholder"),"aria-invalid":!!ef.model||void 0,"aria-describedby":ef.model?"profile-model-error":void 0}),ej.length>0?(0,g.jsx)("datalist",{id:"profile-model-options",children:ej.map(function(e){return(0,g.jsx)("option",{value:e},e)})}):null,ef.model?(0,g.jsx)("p",{id:"profile-model-error",className:"text-xs text-destructive",children:l7(p,ef.model)}):null,"claude"===u.id?(0,g.jsx)("p",{className:"text-xs text-muted-foreground",children:p("profile.claudeModelHint")}):null]}),(0,g.jsxs)("div",{className:"space-y-2 sm:col-span-2",children:[(0,g.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,g.jsxs)(oo,{type:"button",variant:"outline",size:"sm",onClick:function(){return pO(function(){var e,t;return pz(this,function(n){switch(n.label){case 0:if(!(e=ez().trim()))return ep(function(e){return pP(pN({},e),{baseUrl:{key:"profile.error.baseUrlRequired"}})}),[2];eg(!0),el(null),eb(null),n.label=1;case 1:if(n.trys.push([1,7,8,9]),!(ew||T.trim()))return[3,3];return[4,k(pN({baseUrl:e},ew?{providerId:Z}:{apiKey:T}))];case 2:case 4:return t=n.sent(),[3,6];case 3:if(!(S&&d))return[3,5];return[4,j(u.id,d.name)];case 5:return ep(function(e){return pP(pN({},e),{apiKey:{key:"profile.error.apiKeyRequired"}})}),[2];case 6:return eb(t),[3,9];case 7:return el(l6(n.sent())),[3,9];case 8:return eg(!1),[7];case 9:return[2]}})})()},disabled:em,children:[em?(0,g.jsx)(f2,{className:"animate-spin"}):null,em?p("probe.probing"):p("probe.action")]}),ev?(0,g.jsx)(ph,{result:ev}):null]}),(null==ev?void 0:ev.ok)&&ej.length>0?(0,g.jsx)("p",{className:"text-xs text-muted-foreground",children:p("probe.catalogHint")}):null]}),eN.map(function(e){var t;return(0,g.jsx)(pF,{field:e,value:null!=(t=H[e.key])?t:"",error:ef["extra:".concat(e.key)],onChange:function(t){B(function(n){return pP(pN({},n),pC({},e.key,t))}),e_("extra:".concat(e.key))}},e.key)}),"claude"===u.id?(0,g.jsx)(pH,{fields:u.fields,values:H,errors:ef,onChange:function(e,t){B(function(n){return pP(pN({},n),pC({},e,t))}),e_("extra:".concat(e))}}):null,eP.map(function(e){var t;return(0,g.jsx)(pF,{field:e,value:null!=(t=H[e.key])?t:"",error:ef["extra:".concat(e.key)],onChange:function(t){B(function(n){return pP(pN({},n),pC({},e.key,t))}),e_("extra:".concat(e.key))}},e.key)}),(0,g.jsxs)("div",{className:"space-y-2 sm:col-span-2",children:[(0,g.jsx)(cv,{htmlFor:"notes",children:p("profile.notes")}),(0,g.jsx)(pm,{id:"notes",rows:2,value:F,onChange:function(e){return $(e.target.value)}})]})]}),(0,g.jsxs)("div",{className:"rounded-xl border",children:[(0,g.jsxs)("button",{type:"button",onClick:function(){var e=!ee;et(e),e&&null===er&&eE()},className:"flex w-full cursor-pointer items-center gap-2 px-3 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground active:bg-accent/80 ".concat(ee?"rounded-t-xl":"rounded-xl"),children:[ee?(0,g.jsx)(A,{className:"size-4"}):(0,g.jsx)(pd,{className:"size-4"}),p("profile.advanced"),d&&d.overriddenTargets.length>0?(0,g.jsx)(aI,{variant:"secondary",children:p("profile.overridden")}):null]}),ee?(0,g.jsx)("div",{className:"space-y-4 border-t px-3 py-3",children:S?(0,g.jsx)(pM,{targets:er,overrides:V,onEdit:function(e,t){return q(function(n){return pP(pN({},n),pC({},e,t))})},onReset:function(e){q(function(t){var n=pN({},t);return delete n[e],n}),eE()}}):(0,g.jsx)("p",{className:"text-sm text-muted-foreground",children:p("profile.saveFirst")})}):null]}),ei?(0,g.jsx)("p",{className:"text-sm text-destructive",children:l7(p,ei)}):null]}),(0,g.jsxs)(lR,{className:"shrink-0 border-t bg-card px-6 py-4",children:[(0,g.jsx)(oo,{type:"button",variant:"outline",onClick:function(){return f(!1)},children:p("common.cancel")}),(0,g.jsx)(oo,{type:"submit",disabled:ec,children:ec?p("profile.saving"):p("profile.save")})]})]})})})}function pM(e){var t=e.targets,n=e.overrides,r=e.onEdit,a=e.onReset,o=(0,x.Bd)().t;return null===t?(0,g.jsx)("p",{className:"text-sm text-muted-foreground",children:o("profile.rawLoading")}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("p",{className:"text-xs text-muted-foreground",children:o("profile.rawIntro")}),t.map(function(e){var t,i=void 0!==n[e.key];return(0,g.jsxs)("div",{className:"space-y-2",children:[(0,g.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,g.jsx)(cv,{htmlFor:"raw-".concat(e.key),className:"font-mono text-xs",children:e.path}),i?(0,g.jsxs)(oo,{type:"button",size:"sm",variant:"ghost",onClick:function(){return a(e.key)},children:[(0,g.jsx)(pf,{}),o("profile.resetToGenerated")]}):null]}),(0,g.jsx)(pm,{id:"raw-".concat(e.key),rows:10,spellCheck:!1,className:"font-mono text-xs",value:null!=(t=n[e.key])?t:e.content,onChange:function(t){return r(e.key,t.target.value)}})]},e.key)})]})}function pD(e){var t,n=e.harnessId,r=e.onPick,a=(0,x.Bd)().t,o=null!=(t=pk[n])?t:[];return 0===o.length?null:(0,g.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,g.jsx)("span",{className:"text-xs text-muted-foreground",children:a("profile.quickFill")}),o.map(function(e){return(0,g.jsx)(oo,{type:"button",size:"sm",variant:"outline",onClick:function(){return r(e)},children:a("preset.".concat(e.id))},e.id)})]})}function pF(e){var t,n,r=e.field,a=e.value,o=e.error,i=e.onChange,l=(0,x.Bd)().t,s="extra-".concat(r.key);return(0,g.jsxs)("div",{className:"textarea"===r.kind||r.fullWidth?"space-y-2 sm:col-span-2":"space-y-2",children:[(0,g.jsx)(cv,{htmlFor:s,children:r.label}),"select"===r.kind?(0,g.jsxs)(df,{value:a,onValueChange:i,children:[(0,g.jsx)(fe,{id:s,"aria-label":r.label,"aria-invalid":!!o||void 0,"aria-describedby":o?"".concat(s,"-error"):void 0,children:(0,g.jsx)(dh,{placeholder:null!=(t=r.placeholder)?t:l("profile.selectPlaceholder")})}),(0,g.jsx)(fr,{children:null==(n=r.options)?void 0:n.map(function(e){return(0,g.jsx)(fa,{value:e.value,children:e.label},e.value)})})]}):"textarea"===r.kind?(0,g.jsx)(pm,{id:s,rows:3,value:a,placeholder:r.placeholder,className:"font-mono text-xs","aria-invalid":!!o||void 0,"aria-describedby":o?"".concat(s,"-error"):void 0,onChange:function(e){return i(e.target.value)}}):(0,g.jsx)(cm,{id:s,type:"password"===r.kind?"password":"text",value:a,placeholder:r.placeholder,"aria-invalid":!!o||void 0,"aria-describedby":o?"".concat(s,"-error"):void 0,onChange:function(e){return i(e.target.value)}}),o?(0,g.jsx)("p",{id:"".concat(s,"-error"),className:"text-xs text-destructive",children:l7(l,o)}):null,r.help?(0,g.jsx)("p",{className:"text-xs text-muted-foreground",children:r.help}):null]})}var p$="md:grid-cols-[6.5rem_minmax(0,1fr)_minmax(0,1fr)_8.5rem]",pU="grid gap-2 rounded-lg border bg-card/70 p-3 ".concat(p$," md:items-start md:gap-3 md:border-0 md:bg-transparent md:p-0");function pH(e){var t,n=e.fields,r=e.values,a=e.errors,o=e.onChange,i=(0,x.Bd)().t,l=new Map(n.map(function(e){return[e.key,e]})),s=l.get(pA);return(0,g.jsxs)("section",{"data-slot":"claude-model-mapping",className:"space-y-4 rounded-xl border bg-muted/15 p-4 sm:col-span-2 sm:p-5",children:[(0,g.jsxs)("div",{className:"space-y-1",children:[(0,g.jsx)("h3",{className:"text-base font-semibold",children:i("profile.mapping.title")}),(0,g.jsx)("p",{className:"text-sm text-muted-foreground",children:i("profile.mapping.intro")})]}),(0,g.jsxs)("div",{className:"hidden gap-3 px-1 text-xs font-medium text-muted-foreground md:grid ".concat(p$),children:[(0,g.jsx)("span",{children:i("profile.mapping.role")}),(0,g.jsx)("span",{children:i("profile.mapping.displayName")}),(0,g.jsx)("span",{children:i("profile.mapping.actualModel")}),(0,g.jsx)("span",{children:i("profile.mapping.oneM")})]}),(0,g.jsxs)("div",{className:"space-y-3",children:[pT.map(function(e){var t,n,s,c=e.role,u=e.modelKey,d=e.nameKey,f=e.oneMKey,p=l.get(u),h=l.get(d);if(!p||!h)return null;var m=a["extra:".concat(u)],y=a["extra:".concat(d)];return(0,g.jsxs)("div",{className:pU,children:[(0,g.jsxs)("div",{className:"flex h-10 items-center rounded-lg border bg-muted/45 px-3 text-sm font-medium",children:[c,p.required?(0,g.jsx)("span",{className:"ml-1 text-destructive",children:"*"}):null]}),(0,g.jsxs)("div",{className:"space-y-1.5",children:[(0,g.jsx)(cv,{htmlFor:"extra-".concat(d),className:"text-xs md:sr-only",children:h.label}),(0,g.jsx)(cm,{id:"extra-".concat(d),value:null!=(t=r[d])?t:"",placeholder:(null==(s=r[u])?void 0:s.trim())?i("profile.mapping.defaultTo",{model:r[u].trim()}):h.placeholder,"aria-invalid":!!y||void 0,"aria-describedby":y?"extra-".concat(d,"-error"):void 0,onChange:function(e){return o(d,e.target.value)}}),y?(0,g.jsx)("p",{id:"extra-".concat(d,"-error"),className:"text-xs text-destructive",children:l7(i,y)}):null]}),(0,g.jsxs)("div",{className:"space-y-1.5",children:[(0,g.jsx)(cv,{htmlFor:"extra-".concat(u),className:"text-xs md:sr-only",children:p.label}),(0,g.jsx)(cm,{id:"extra-".concat(u),value:null!=(n=r[u])?n:"",placeholder:p.placeholder,"aria-invalid":!!m||void 0,"aria-describedby":m?"extra-".concat(u,"-error"):void 0,onChange:function(e){return o(u,e.target.value)}}),m?(0,g.jsx)("p",{id:"extra-".concat(u,"-error"),className:"text-xs text-destructive",children:l7(i,m)}):null]}),(0,g.jsx)(pB,{role:c,field:f?l.get(f):void 0,value:f?r[f]:void 0,error:f?a["extra:".concat(f)]:void 0,onChange:o})]},c)}),s?(0,g.jsxs)("div",{className:pU,children:[(0,g.jsx)("div",{className:"flex h-10 items-center rounded-lg border bg-muted/45 px-3 text-sm font-medium",children:"Subagent"}),(0,g.jsx)("div",{className:"flex h-10 items-center rounded-lg border bg-muted/30 px-3 text-sm text-muted-foreground",children:i("profile.mapping.notInMenu")}),(0,g.jsxs)("div",{className:"space-y-1.5",children:[(0,g.jsx)(cv,{htmlFor:"extra-subagentModel",className:"text-xs md:sr-only",children:s.label}),(0,g.jsx)(cm,{id:"extra-subagentModel",value:null!=(t=r.subagentModel)?t:"",placeholder:s.placeholder,"aria-invalid":!!a["extra:subagentModel"]||void 0,"aria-describedby":a["extra:subagentModel"]?"extra-subagentModel-error":void 0,onChange:function(e){return o("subagentModel",e.target.value)}}),a["extra:subagentModel"]?(0,g.jsx)("p",{id:"extra-subagentModel-error",className:"text-xs text-destructive",children:l7(i,a["extra:subagentModel"])}):null]}),(0,g.jsx)(pB,{role:"Subagent",field:l.get(pR),value:r[pR],error:a["extra:".concat(pR)],onChange:o})]}):null]})]})}function pB(e){var t=e.role,n=e.field,r=e.value,a=e.error,o=e.onChange,i=(0,x.Bd)().t;if(!n)return(0,g.jsx)("div",{"data-slot":"one-m-unsupported",className:"flex h-10 items-center rounded-lg border border-dashed bg-muted/20 px-3 text-sm text-muted-foreground",children:i("profile.mapping.oneMUnsupported",{role:t})});var l="extra-".concat(n.key);return(0,g.jsxs)("div",{className:"space-y-1.5",children:[(0,g.jsx)("div",{className:"flex h-10 items-center",children:(0,g.jsxs)("label",{htmlFor:l,className:"flex cursor-pointer items-center gap-2 text-sm text-muted-foreground",children:[(0,g.jsx)(ch,{id:l,checked:"true"===r,"aria-label":n.label,"aria-invalid":!!a||void 0,"aria-describedby":a?"".concat(l,"-error"):void 0,onCheckedChange:function(e){return o(n.key,!0===e?"true":"false")}}),(0,g.jsx)("span",{className:"md:hidden",children:n.label}),(0,g.jsx)("span",{className:"hidden md:inline",children:i("profile.mapping.enable")})]})}),a?(0,g.jsx)("p",{id:"".concat(l,"-error"),className:"text-xs text-destructive",children:l7(i,a)}):null]})}let pK=O("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),pV=O("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);function pq(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function pW(e,t,n,r,a,o,i){try{var l=e[o](i),s=l.value}catch(e){n(e);return}l.done?t(s):Promise.resolve(s).then(r,a)}function pZ(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function i(e){pW(o,r,a,i,l,"next",e)}function l(e){pW(o,r,a,i,l,"throw",e)}i(void 0)})}}function pG(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pJ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){pG(e,t,n[t])})}return e}function pQ(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function pY(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,a=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],i=!0,l=!1;try{for(a=a.call(e);!(i=(n=a.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){l=!0,r=e}finally{try{i||null==a.return||a.return()}finally{if(l)throw r}}return o}}(e,t)||p0(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pX(e){return function(e){if(Array.isArray(e))return pq(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||p0(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p0(e,t){if(e){if("string"==typeof e)return pq(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pq(e,t)}}function p1(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(i,"next",{value:s(0)}),l(i,"throw",{value:s(1)}),l(i,"return",{value:s(2)}),"function"==typeof Symbol&&l(i,Symbol.iterator,{value:function(){return this}}),i;function s(l){return function(s){var c=[l,s];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&c[0]?r.return:c[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;switch(r=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]<a[3])){o.label=c[1];break}if(6===c[0]&&o.label<a[1]){o.label=a[1],a=c;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(c);break}a[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}function p2(e){var t,n=e.open,r=e.onOpenChange,a=(0,x.s9)().locale,o=(0,x.Bd)().t,i=ss(function(e){return e.providers}),l=ss(function(e){return e.providersLoading}),s=ss(function(e){return e.providersError}),c=ss(function(e){return e.loadProviders}),u=ss(function(e){return e.deleteProvider}),d=pY((0,y.useState)({kind:"list"}),2),f=d[0],p=d[1],h=pY((0,y.useState)(null),2),m=h[0],v=h[1],b=pY((0,y.useState)(null),2),w=b[0],k=b[1],j=pY((0,y.useState)(null),2),S=j[0],O=j[1],C=pY((0,y.useState)(null),2),N=C[0],P=C[1],E=pY((0,y.useState)({}),2),_=E[0],z=E[1],A=ss(function(e){return e.revealProvider});(0,y.useEffect)(function(){n&&(p({kind:"list"}),v(null),k(null),P(null),null===i&&c())},[n,i,c]);var R=null!=i?i:[];return(0,g.jsxs)(lc,{open:n,onOpenChange:r,children:[(0,g.jsxs)(lT,{className:"max-h-[88vh] overflow-y-auto sm:max-w-2xl",children:[(0,g.jsxs)(lA,{children:[(0,g.jsx)(lL,{children:"create"===f.kind?o("vault.createTitle"):"edit"===f.kind?o("vault.editTitle",{name:f.entry.name}):o("vault.title")}),(0,g.jsx)(lI,{children:"list"===f.kind?o("vault.intro"):o("vault.formIntro")})]}),l&&0===R.length?(0,g.jsx)("p",{className:"py-6 text-center text-sm text-muted-foreground",children:o("vault.loading")}):null,s?(0,g.jsx)("p",{className:"text-sm text-destructive",children:l7(o,s)}):null,"create"===f.kind||"edit"===f.kind?(0,g.jsx)(p4,{entry:"edit"===f.kind?f.entry:null,onCancel:function(){p({kind:"list"}),k(null)},onSaved:function(e){p({kind:"list"}),v(e),k(null)}}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,g.jsx)("p",{className:"text-xs text-muted-foreground",children:o("vault.entryCount",{count:R.length})}),(0,g.jsxs)(oo,{size:"sm",onClick:function(){return p({kind:"create"})},children:[(0,g.jsx)(T,{}),o("vault.add")]})]}),m?(0,g.jsx)("div",{className:"rounded-xl bg-emerald-500/10 px-3 py-2 text-sm text-emerald-600 dark:text-emerald-400",children:m.map(function(e){return(0,g.jsx)("p",{children:l7(o,e)},e.key+e.scope)})}):null,w?(0,g.jsx)("p",{className:"text-sm text-destructive",children:l7(o,w)}):null,0===R.length?(0,g.jsx)("p",{className:"py-6 text-center text-sm text-muted-foreground",children:o("vault.empty")}):(0,g.jsx)("ul",{className:"max-h-80 divide-y overflow-y-auto rounded-xl border",children:R.map(function(e){var t,n,r;return(0,g.jsxs)("li",{className:"px-4 py-3",children:[(0,g.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,g.jsxs)("div",{className:"min-w-0",children:[(0,g.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,g.jsx)("p",{className:"font-medium",children:e.name}),e.apiKeyConfigured?(0,g.jsx)(aI,{variant:"secondary",children:o("vault.keyConfigured")}):(0,g.jsx)(aI,{variant:"outline",children:o("vault.keyMissing")}),(0,g.jsx)("span",{className:"font-mono text-[11px] text-muted-foreground",children:(t=e.updatedAt,n=a,Number.isNaN((r=new Date(t)).getTime())?t:r.toLocaleString(n))})]}),e.notes?(0,g.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:e.notes}):null,e.endpoints.length>0?(0,g.jsx)("ul",{className:"mt-2 space-y-1",children:e.endpoints.map(function(e){return(0,g.jsxs)("li",{className:"flex flex-wrap items-center gap-x-2 gap-y-0.5",children:[(0,g.jsx)("code",{className:"font-mono text-xs",children:e.key}),(0,g.jsx)("span",{className:"break-all font-mono text-[11px] text-muted-foreground",children:e.baseUrl})]},e.key)})}):(0,g.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:o("vault.noEndpoints")})]}),(0,g.jsxs)("div",{className:"flex shrink-0 items-center gap-1.5",children:[(0,g.jsx)(oo,{size:"icon",variant:"ghost","aria-label":void 0!==_[e.id]?o("vault.hide",{name:e.name}):o("vault.reveal",{name:e.name}),onClick:function(){pZ(function(){var t;return p1(this,function(n){switch(n.label){case 0:if(void 0!==_[e.id])return z(function(t){var n=pJ({},t);return delete n[e.id],n}),[2];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,A(e.id)];case 2:return t=n.sent().apiKey,z(function(n){return pQ(pJ({},n),pG({},e.id,t))}),[3,4];case 3:return k(l8(n.sent(),"vault.revealFailed")),[3,4];case 4:return[2]}})})()},children:void 0!==_[e.id]?(0,g.jsx)(pK,{}):(0,g.jsx)(pV,{})}),(0,g.jsx)(oo,{size:"icon",variant:"ghost","aria-label":o("vault.edit",{name:e.name}),onClick:function(){p({kind:"edit",entry:e}),k(null)},children:(0,g.jsx)(fp,{})}),(0,g.jsx)(oo,{size:"icon",variant:"ghost","aria-label":o("vault.delete",{name:e.name}),onClick:function(){P(null),O(e)},children:(0,g.jsx)(fh,{className:"text-destructive"})})]})]}),void 0!==_[e.id]?(0,g.jsx)("p",{className:"mt-2 break-all rounded-lg bg-muted/60 px-3 py-2 font-mono text-xs",children:_[e.id]}):null]},e.id)})})]}),"list"===f.kind?(0,g.jsx)(lR,{children:(0,g.jsx)(oo,{variant:"outline",onClick:function(){return r(!1)},children:o("vault.close")})}):null]}),(0,g.jsx)(sj,{open:null!==S,onOpenChange:function(e){return!e&&O(null)},children:(0,g.jsxs)(sI,{children:[(0,g.jsxs)(sM,{children:[(0,g.jsx)(sF,{children:o("vault.deleteTitle")}),(0,g.jsx)(s$,{children:o("vault.deleteBody",{name:null!=(t=null==S?void 0:S.name)?t:""})})]}),N?(0,g.jsx)("p",{className:"text-sm text-destructive",children:l7(o,N)}):null,(0,g.jsxs)(sD,{children:[(0,g.jsx)(sH,{children:o("common.cancel")}),(0,g.jsx)(sU,{onClick:function(e){e.preventDefault(),S&&pZ(function(){return p1(this,function(e){switch(e.label){case 0:P(null),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,u(S.id)];case 2:return e.sent(),O(null),v([{key:"vault.deleted"}]),[3,4];case 3:return P(l8(e.sent(),"vault.deleteFailed")),[3,4];case 4:return[2]}})})()},children:o("common.delete")})]})]})})]})}function p4(e){var t,n,r=e.entry,a=e.onCancel,o=e.onSaved,i=(0,x.Bd)().t,l=ss(function(e){return e.createProvider}),s=ss(function(e){return e.updateProvider}),c=ss(function(e){return e.probeDraft}),u=null!==r,d=pY((0,y.useState)(null!=(t=null==r?void 0:r.name)?t:""),2),f=d[0],p=d[1],h=pY((0,y.useState)(""),2),m=h[0],v=h[1],b=pY((0,y.useState)(null!=(n=null==r?void 0:r.notes)?n:""),2),w=b[0],k=b[1],j=pY((0,y.useState)(function(){var e;return(null!=(e=null==r?void 0:r.endpoints)?e:[]).map(function(e){return{key:e.key,baseUrl:e.baseUrl,label:e.label}})}),2),S=j[0],O=j[1],C=pY((0,y.useState)(!1),2),N=C[0],P=C[1],E=pY((0,y.useState)(null),2),_=E[0],z=E[1],A=pY((0,y.useState)({}),2),R=A[0],L=A[1],I=pY((0,y.useState)({}),2),M=I[0],D=I[1],F=pY((0,y.useState)(!1),2),$=F[0],U=F[1],H=pY((0,y.useState)(null),2),B=H[0],K=H[1],V=pY((0,y.useState)(null),2),q=V[0],W=V[1],Z=pY((0,y.useState)(0),2),G=Z[0],J=Z[1],Q=JSON.stringify(S);function Y(e,t){O(function(n){return n.map(function(n,r){return r===e?pJ({},n,t):n})}),D(function(n){if(!n[e])return n;var r=pJ({},n),a=pJ({},r[e]);return void 0!==t.key&&delete a.key,void 0!==t.baseUrl&&delete a.baseUrl,0===Object.keys(a).length?delete r[e]:r[e]=a,r})}return(0,y.useEffect)(function(){K(null),W(null)},[m,Q]),(0,g.jsxs)("form",{onSubmit:function(e){return pZ(function(){var t,n,a,i,c,d,p,h,g,y,v,b;return p1(this,function(x){switch(x.label){case 0:e.preventDefault(),t=S.map(function(e){return{key:e.key.trim(),label:e.label.trim(),baseUrl:e.baseUrl.trim()}}),n=pJ({},f.trim()?{}:{name:{key:"vault.error.nameRequired"}},u||m.trim()?{}:{apiKey:{key:"vault.error.apiKeyRequired"}}),a=new Map,i=!0,c=!1,d=void 0;try{for(p=t[Symbol.iterator]();!(i=(h=p.next()).done);i=!0)(g=h.value).key&&a.set(g.key,(null!=(y=a.get(g.key))?y:0)+1)}catch(e){c=!0,d=e}finally{try{i||null==p.return||p.return()}finally{if(c)throw d}}if(v=Object.fromEntries(t.flatMap(function(e,t){var n,r={};return e.key?e.key.includes("/")||e.key.includes("\\")||e.key.length>60?r.key={key:"vault.error.endpointKeyInvalid",params:{max:60}}:(null!=(n=a.get(e.key))?n:0)>1&&(r.key={key:"vault.error.endpointKeyDuplicate"}):r.key={key:"vault.error.endpointKeyRequired"},e.baseUrl||(r.baseUrl={key:"vault.error.endpointUrlRequired"}),Object.keys(r).length>0?[[t,r]]:[]})),L(n),D(v),Object.keys(n).length>0||Object.keys(v).length>0)return z({key:"vault.error.checkFields"}),[2];b={name:f.trim(),notes:w.trim()||void 0,endpoints:t},P(!0),z(null),x.label=1;case 1:if(x.trys.push([1,6,7,8]),!(u&&r))return[3,3];return[4,s(r.id,pJ({},b,m.trim()?{apiKey:m.trim()}:{}))];case 2:return o([{key:"vault.updated"}].concat(pX(x.sent().warnings.map(l5)))),[3,5];case 3:return[4,l(pQ(pJ({},b),{apiKey:m.trim()}))];case 4:x.sent(),o([{key:"vault.created"}]),x.label=5;case 5:return[3,8];case 6:return z(l8(x.sent(),"vault.saveFailed")),[3,8];case 7:return P(!1),[7];case 8:return[2]}})})()},noValidate:!0,className:"space-y-4",children:[(0,g.jsxs)("div",{className:"grid gap-x-4 gap-y-3 sm:grid-cols-2",children:[(0,g.jsxs)("div",{className:"space-y-2 sm:col-span-2",children:[(0,g.jsx)(cv,{htmlFor:"provider-name",children:i("vault.name")}),(0,g.jsx)(cm,{id:"provider-name",value:f,onChange:function(e){p(e.target.value),L(function(e){return pQ(pJ({},e),{name:void 0})})},placeholder:i("vault.namePlaceholder"),"aria-invalid":!!R.name||void 0,"aria-describedby":R.name?"provider-name-error":void 0}),R.name?(0,g.jsx)("p",{id:"provider-name-error",className:"text-xs text-destructive",children:l7(i,R.name)}):null]}),(0,g.jsxs)("div",{className:"space-y-2 sm:col-span-2",children:[(0,g.jsx)(cv,{htmlFor:"provider-api-key",children:i("vault.apiKey")}),(0,g.jsx)(cm,{id:"provider-api-key",type:"password",value:m,onChange:function(e){v(e.target.value),L(function(e){return pQ(pJ({},e),{apiKey:void 0})})},placeholder:u?i("vault.apiKeyKeep"):i("vault.apiKeyRequiredPlaceholder"),"aria-invalid":!!R.apiKey||void 0,"aria-describedby":R.apiKey?"provider-api-key-error":void 0}),R.apiKey?(0,g.jsx)("p",{id:"provider-api-key-error",className:"text-xs text-destructive",children:l7(i,R.apiKey)}):null]}),(0,g.jsxs)("div",{className:"space-y-2 sm:col-span-2",children:[(0,g.jsx)(cv,{htmlFor:"provider-notes",children:i("vault.notes")}),(0,g.jsx)(pm,{id:"provider-notes",rows:2,value:w,onChange:function(e){return k(e.target.value)}})]})]}),(0,g.jsxs)("div",{className:"space-y-2",children:[(0,g.jsx)(cv,{children:i("vault.endpoints")}),(0,g.jsx)("p",{className:"text-xs text-muted-foreground",children:i("vault.endpointsHint")}),0===S.length?(0,g.jsx)("p",{className:"rounded-xl border border-dashed px-3 py-3 text-center text-xs text-muted-foreground",children:i("vault.noEndpointDrafts")}):(0,g.jsx)("div",{className:"space-y-2",children:S.map(function(e,t){var n,r,a,o,l,s;return(0,g.jsxs)("div",{className:"grid items-start gap-2 sm:grid-cols-[10rem_minmax(0,1fr)_minmax(0,1fr)_auto]",children:[(0,g.jsxs)("div",{className:"space-y-1.5",children:[(0,g.jsx)(cm,{"aria-label":i("vault.endpointKeyLabel",{index:t+1}),value:e.key,onChange:function(e){return Y(t,{key:e.target.value})},placeholder:i("vault.endpointKeyPlaceholder"),"aria-invalid":null!=(n=M[t])&&!!n.key||void 0,"aria-describedby":(null==(r=M[t])?void 0:r.key)?"endpoint-".concat(t,"-key-error"):void 0}),(null==(a=M[t])?void 0:a.key)?(0,g.jsx)("p",{id:"endpoint-".concat(t,"-key-error"),className:"text-xs text-destructive",children:l7(i,M[t].key)}):null]}),(0,g.jsxs)("div",{className:"space-y-1.5",children:[(0,g.jsx)(cm,{"aria-label":i("vault.endpointUrlLabel",{index:t+1}),value:e.baseUrl,onChange:function(e){return Y(t,{baseUrl:e.target.value})},placeholder:i("vault.endpointUrlPlaceholder"),"aria-invalid":null!=(o=M[t])&&!!o.baseUrl||void 0,"aria-describedby":(null==(l=M[t])?void 0:l.baseUrl)?"endpoint-".concat(t,"-url-error"):void 0}),(null==(s=M[t])?void 0:s.baseUrl)?(0,g.jsx)("p",{id:"endpoint-".concat(t,"-url-error"),className:"text-xs text-destructive",children:l7(i,M[t].baseUrl)}):null]}),(0,g.jsx)(cm,{"aria-label":i("vault.endpointLabelLabel",{index:t+1}),value:e.label,onChange:function(e){return Y(t,{label:e.target.value})},placeholder:i("vault.endpointLabelPlaceholder")}),(0,g.jsx)(oo,{type:"button",size:"icon",variant:"ghost","aria-label":i("vault.removeEndpoint",{index:t+1}),onClick:function(){O(function(e){return e.filter(function(e,n){return n!==t})}),D({})},children:(0,g.jsx)(fh,{})})]},t)})}),(0,g.jsxs)(oo,{type:"button",size:"sm",variant:"outline",onClick:function(){return O(function(e){return pX(e).concat([{key:"",baseUrl:"",label:""}])})},children:[(0,g.jsx)(T,{}),i("vault.addEndpoint")]}),(0,g.jsx)(p3,{options:S.map(function(e,t){return{index:t,key:e.key,baseUrl:e.baseUrl}}).filter(function(e){return e.baseUrl.trim()}),targetIndex:G,onTargetChange:J,hasStoredKey:u,hasTypedKey:m.trim().length>0,onMissingKey:function(){return L(function(e){return pQ(pJ({},e),{apiKey:{key:"vault.error.apiKeyRequired"}})})},probing:$,result:B,probeError:q,onProbe:function(){return pZ(function(){var e,t,n,a;return p1(this,function(o){switch(o.label){case 0:if(!(n=null!=(e=(t=S.map(function(e,t){return{endpoint:e,index:t}}).filter(function(e){return""!==e.endpoint.baseUrl.trim()})).find(function(e){return e.index===G}))?e:t[0]))return K(null),W({key:"probe.missingBaseUrl"}),[2];if(!u&&!m.trim())return K(null),W(null),L(function(e){return pQ(pJ({},e),{apiKey:{key:"vault.error.apiKeyRequired"}})}),[2];U(!0),W(null),K(null),o.label=1;case 1:return o.trys.push([1,3,4,5]),[4,c(pJ({baseUrl:n.endpoint.baseUrl},m.trim()?{apiKey:m}:{providerId:null!=(a=null==r?void 0:r.id)?a:""}))];case 2:return K(o.sent()),[3,5];case 3:return W(l8(o.sent(),"vault.probeFailed")),[3,5];case 4:return U(!1),[7];case 5:return[2]}})})()}})]}),_?(0,g.jsx)("p",{className:"text-sm text-destructive",children:l7(i,_)}):null,(0,g.jsxs)(lR,{className:"flex-row justify-end gap-2 space-x-0",children:[(0,g.jsx)(oo,{type:"button",variant:"outline",className:"min-w-24",onClick:a,children:i("common.cancel")}),(0,g.jsx)(oo,{type:"submit",className:"min-w-24",disabled:N,children:N?i("vault.saving"):u?i("vault.saveChanges"):i("vault.add")})]})]})}function p3(e){var t,n,r=e.options,a=e.targetIndex,o=e.onTargetChange,i=e.hasStoredKey,l=e.hasTypedKey,s=e.onMissingKey,c=e.probing,u=e.result,d=e.probeError,f=e.onProbe,p=(0,x.Bd)().t;if(0===r.length&&!i)return null;var h=null!=(t=r.find(function(e){return e.index===a}))?t:r[0];return(0,g.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-t pt-3",children:[(0,g.jsxs)(oo,{type:"button",variant:"outline",size:"sm",disabled:c||0===r.length&&!l,onClick:function(){l||i?f():s()},children:[c?(0,g.jsx)(f2,{className:"animate-spin"}):null,p(c?"probe.probing":"probe.action")]}),r.length>1?(0,g.jsxs)(df,{value:String(null!=(n=null==h?void 0:h.index)?n:""),onValueChange:function(e){return o(Number(e))},children:[(0,g.jsx)(fe,{className:"h-9 w-56","aria-label":p("vault.probeEndpointLabel"),children:(0,g.jsx)(dh,{})}),(0,g.jsx)(fr,{children:r.map(function(e){return(0,g.jsx)(fa,{value:String(e.index),children:e.key||e.baseUrl},e.index)})})]}):null,d?(0,g.jsxs)("span",{className:"flex items-center gap-1.5 text-sm text-destructive",children:[(0,g.jsx)(pp,{className:"size-4 shrink-0","aria-hidden":!0}),l7(p,d)]}):u?(0,g.jsx)(ph,{result:u}):null]})}let p5=O("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),p6=O("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);var p8=d(2935);function p9(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function p7(){var e,t=(0,x.Bd)().t,n=function(e){if(Array.isArray(e))return e}(e=(0,y.useState)("light"))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,i=!1;try{for(r=r.call(e);!(o=(t=r.next()).done)&&(a.push(t.value),2!==a.length);o=!0);}catch(e){i=!0,n=e}finally{try{o||null==r.return||r.return()}finally{if(i)throw n}}return a}}(e)||function(e){if(e){if("string"==typeof e)return p9(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return p9(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],a=n[1];return(0,y.useEffect)(function(){var e=(0,p8.PY)();a(e),(0,p8.AZ)(e)},[]),(0,g.jsx)(oo,{type:"button",size:"icon",variant:"outline","aria-label":t("dark"===r?"theme.toLight":"theme.toDark"),onClick:function(){return a(function(e){return(0,p8.OD)(e)})},children:"dark"===r?(0,g.jsx)(p5,{}):(0,g.jsx)(p6,{})})}let he=O("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]),ht=O("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]),hn=O("file-lock-2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v1",key:"jmtmu2"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["rect",{width:"8",height:"5",x:"2",y:"13",rx:"1",key:"10y5wo"}],["path",{d:"M8 13v-2a2 2 0 1 0-4 0v2",key:"1pdxzg"}]]);function hr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ha(e,t,n,r,a,o,i){try{var l=e[o](i),s=l.value}catch(e){n(e);return}l.done?t(s):Promise.resolve(s).then(r,a)}function ho(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function i(e){ha(o,r,a,i,l,"next",e)}function l(e){ha(o,r,a,i,l,"throw",e)}i(void 0)})}}function hi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,a=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],i=!0,l=!1;try{for(a=a.call(e);!(i=(n=a.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){l=!0,r=e}finally{try{i||null==a.return||a.return()}finally{if(l)throw r}}return o}}(e,t)||hl(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hl(e,t){if(e){if("string"==typeof e)return hr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hr(e,t)}}function hs(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(i,"next",{value:s(0)}),l(i,"throw",{value:s(1)}),l(i,"return",{value:s(2)}),"function"==typeof Symbol&&l(i,Symbol.iterator,{value:function(){return this}}),i;function s(l){return function(s){var c=[l,s];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&c[0]?r.return:c[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;switch(r=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]<a[3])){o.label=c[1];break}if(6===c[0]&&o.label<a[1]){o.label=a[1],a=c;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(c);break}a[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}function hc(e){var t,n,r,a=e.open,o=e.onOpenChange,i=(0,x.Bd)().t,l=ss(function(e){return e.loadHarnesses}),s=ss(function(e){return e.setNotice}),c=(0,y.useRef)(null),u=hi((0,y.useState)(""),2),d=u[0],f=u[1],p=hi((0,y.useState)(""),2),h=p[0],m=p[1],v=hi((0,y.useState)(null),2),b=v[0],w=v[1],k=hi((0,y.useState)(!1),2),j=k[0],S=k[1],O=hi((0,y.useState)(null),2),C=O[0],N=O[1],P=hi((0,y.useState)(""),2),E=P[0],_=P[1],z=hi((0,y.useState)(""),2),T=z[0],A=z[1],R=hi((0,y.useState)(null),2),L=R[0],I=R[1],M=hi((0,y.useState)(!1),2),D=M[0],$=M[1],U=hi((0,y.useState)(!1),2),H=U[0],B=U[1],K=hi((0,y.useState)("skip"),2),V=K[0],q=K[1],W=hi((0,y.useState)(!0),2),Z=W[0],G=W[1],J=hi((0,y.useState)(!1),2),Q=J[0],Y=J[1],X=hi((0,y.useState)(null),2),ee=X[0],et=X[1],en=hi((0,y.useState)(null),2),er=en[0],ea=en[1],eo=hi((0,y.useState)(null),2),ei=eo[0],el=eo[1];(0,y.useEffect)(function(){if(!a){S(!1),B(!1),$(!1),Y(!1);return}var e=!1;return lX("/api/transfer/export/preview").then(function(t){e||(w(t),S(!0===t.codexLoginCacheAvailable))}).catch(function(){e||w(null)}),function(){e=!0}},[a]);var es=d.length>=8&&d===h&&null===ee,ec=null!==C&&T.length>=8&&null===ee,eu=(null==L?void 0:L.conflictPolicy)===V&&(null==L?void 0:L.restoreActive)===Z,ed=null!==L&&eu&&!D&&null===ee,ef=L&&eu&&!D?function(e,t){switch(t){case"openai-api-key":return e("transfer.authEffect.openai-api-key");case"auth-override":return e("transfer.authEffect.auth-override");case"official-cleanup":return e("transfer.authEffect.official-cleanup");case"none":return null}}(i,L.codexActivationAuthEffect):null;return(0,g.jsx)(lc,{open:a,onOpenChange:o,children:(0,g.jsxs)(lT,{className:"max-h-[90vh] overflow-x-hidden overflow-y-auto sm:max-w-2xl",children:[(0,g.jsxs)(lA,{children:[(0,g.jsx)(lL,{children:i("transfer.title")}),(0,g.jsx)(lI,{children:i("transfer.intro")})]}),(0,g.jsxs)("section",{className:"space-y-4 rounded-2xl border bg-muted/25 p-4",children:[(0,g.jsxs)("div",{className:"flex items-start gap-3",children:[(0,g.jsx)("span",{className:"flex size-9 shrink-0 items-center justify-center rounded-xl bg-primary/10 text-primary",children:(0,g.jsx)(he,{className:"size-4"})}),(0,g.jsxs)("div",{children:[(0,g.jsx)("h3",{className:"font-semibold",children:i("transfer.exportTitle")}),(0,g.jsx)("p",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:i("transfer.exportIntro")})]})]}),(0,g.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,g.jsxs)("div",{className:"space-y-2",children:[(0,g.jsx)(cv,{htmlFor:"export-passphrase",children:i("transfer.passphrase")}),(0,g.jsx)(cm,{id:"export-passphrase",type:"password",autoComplete:"new-password",value:d,onChange:function(e){return f(e.target.value)},placeholder:i("transfer.passphrasePlaceholder",{min:8})})]}),(0,g.jsxs)("div",{className:"space-y-2",children:[(0,g.jsx)(cv,{htmlFor:"export-passphrase-confirm",children:i("transfer.passphraseConfirm")}),(0,g.jsx)(cm,{id:"export-passphrase-confirm",type:"password",autoComplete:"new-password",value:h,onChange:function(e){return m(e.target.value)},placeholder:i("transfer.passphraseConfirmPlaceholder")})]})]}),h&&d!==h?(0,g.jsx)("p",{className:"text-xs text-destructive",children:i("transfer.passphraseMismatch")}):null,(null==b?void 0:b.codexLoginCacheAvailable)?(0,g.jsx)("label",{className:"block space-y-2 rounded-xl border border-amber-500/30 bg-amber-500/5 p-3 text-sm",children:(0,g.jsxs)("span",{className:"flex cursor-pointer items-start gap-3",children:[(0,g.jsx)(ch,{checked:j,onCheckedChange:function(e){return S(!0===e)},className:"mt-0.5"}),(0,g.jsxs)("span",{className:"min-w-0",children:[(0,g.jsx)("span",{className:"block font-medium",children:i("transfer.includeCache")}),(0,g.jsx)("span",{className:"mt-1 block text-xs leading-relaxed text-muted-foreground",children:i("transfer.includeCacheHint")})]})]})}):b?(0,g.jsx)("p",{className:"text-xs text-muted-foreground",children:i("transfer.noCacheToExport")}):null,(0,g.jsxs)(oo,{type:"button",onClick:function(){ho(function(){return hs(this,function(e){switch(e.label){case 0:et("export"),el(null),ea(null),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,lX("/api/transfer/export",{method:"POST",body:JSON.stringify({passphrase:d,includeCodexLoginCache:j})})];case 2:var t,n,r,a,o;return t=e.sent(),n=new Date().toISOString().slice(0,10),r=new Blob(["".concat(JSON.stringify(t,null,2),"\n")],{type:"application/json"}),a=URL.createObjectURL(r),(o=document.createElement("a")).href=a,o.download="harness-switch-".concat(n,".hsw-backup"),o.click(),URL.revokeObjectURL(a),ea(j?i("transfer.exportedWithCache"):i("transfer.exportedWithoutCache")),[3,5];case 3:return el(l6(e.sent())),[3,5];case 4:return et(null),[7];case 5:return[2]}})})()},disabled:!es,children:[(0,g.jsx)(he,{}),"export"===ee?i("transfer.encrypting"):i("transfer.download")]})]}),(0,g.jsxs)("section",{className:"space-y-4 rounded-2xl border p-4",children:[(0,g.jsxs)("div",{className:"flex items-start gap-3",children:[(0,g.jsx)("span",{className:"flex size-9 shrink-0 items-center justify-center rounded-xl bg-primary/10 text-primary",children:(0,g.jsx)(ht,{className:"size-4"})}),(0,g.jsxs)("div",{children:[(0,g.jsx)("h3",{className:"font-semibold",children:i("transfer.importTitle")}),(0,g.jsx)("p",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:i("transfer.importIntro")})]})]}),(0,g.jsx)("input",{ref:c,type:"file",accept:".hsw-backup,application/json",className:"sr-only",onChange:function(e){var t,n;n=null==(t=e.target.files)?void 0:t[0],ho(function(){var e,t,r;return hs(this,function(a){switch(a.label){case 0:if(I(null),$(!1),Y(!1),B(!1),ea(null),el(null),!n)return N(null),_(""),[2];a.label=1;case 1:return a.trys.push([1,3,,4]),t=JSON.parse,[4,n.text()];case 2:if("harness-switch-encrypted-export"!==(e=t.apply(JSON,[a.sent()])).format||1!==e.version)return el({key:"transfer.notAnExport"}),N(null),_(""),[2];return N(e),_(n.name),[3,4];case 3:return r=a.sent(),N(null),_(""),el(l6(r)),[3,4];case 4:return[2]}})})()}}),(0,g.jsxs)("button",{type:"button",className:"flex w-full cursor-pointer items-center gap-3 rounded-xl border border-dashed bg-muted/20 px-4 py-4 text-left transition-colors hover:border-primary/40 hover:bg-primary/5",onClick:function(){var e;return null==(e=c.current)?void 0:e.click()},children:[(0,g.jsx)(hn,{className:"size-5 text-primary"}),(0,g.jsxs)("span",{className:"min-w-0",children:[(0,g.jsx)("span",{className:"block truncate text-sm font-medium",children:E||i("transfer.pickFile")}),(0,g.jsx)("span",{className:"mt-0.5 block text-xs text-muted-foreground",children:i("transfer.pickFileHint")})]})]}),(0,g.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-end",children:[(0,g.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,g.jsx)(cv,{htmlFor:"import-passphrase",children:i("transfer.passphrase")}),(0,g.jsx)(cm,{id:"import-passphrase",type:"password",value:T,onChange:function(e){A(e.target.value),I(null),$(!1),Y(!1),B(!1)},placeholder:i("transfer.importPassphrasePlaceholder")})]}),(0,g.jsx)(oo,{type:"button",variant:"outline",disabled:!ec,onClick:function(){ho(function(){var e,t,n;return hs(this,function(r){switch(r.label){case 0:if(!C)return[2];et("preview"),el(null),ea(null),r.label=1;case 1:return r.trys.push([1,3,4,5]),[4,lX("/api/transfer/preview",{method:"POST",body:JSON.stringify({envelope:C,passphrase:T,conflictPolicy:V,restoreActive:Z})})];case 2:return I(t=r.sent()),$(!1),Y(!1),B((null==(e=t.codexLoginCache)?void 0:e.available)===!0&&!0===t.codexLoginCache.migrationNeeded),[3,5];case 3:return n=r.sent(),I(null),el(l6(n)),[3,5];case 4:return et(null),[7];case 5:return[2]}})})()},children:"preview"===ee?i("transfer.inspecting"):i("transfer.inspect")})]}),L?(0,g.jsxs)("div",{className:"space-y-4 rounded-xl border bg-card p-4",children:[(0,g.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,g.jsx)(aI,{children:i("transfer.profileCount",{count:L.profileCount})}),(0,g.jsx)(aI,{variant:"secondary",children:i("transfer.providerCount",{count:L.providerCount})}),(0,g.jsx)(aI,{variant:L.conflicts.length>0?"outline":"secondary",children:i("transfer.conflictCount",{count:L.conflicts.length})}),(0,g.jsx)(aI,{variant:"secondary",children:i("transfer.activeCount",{count:L.activeCount})})]}),(0,g.jsx)("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-xs text-muted-foreground",children:L.harnesses.map(function(e){return(0,g.jsx)("span",{children:i("transfer.harnessProfiles",{harness:F[e.harness],count:e.profiles})},e.harness)})}),L.conflicts.length>0?(0,g.jsx)("div",{className:"rounded-xl bg-amber-500/10 px-3 py-2 text-xs leading-relaxed text-amber-700 dark:text-amber-300",children:i("transfer.conflictList",{items:L.conflicts.map(function(e){return"".concat(F[e.harness]," / ").concat(e.name)}).join(i("common.listSeparator"))})}):null,(null==(t=L.codexLoginCache)?void 0:t.available)&&L.codexLoginCache.migrationNeeded?(0,g.jsxs)("label",{className:"block space-y-2 rounded-xl border border-amber-500/30 bg-amber-500/5 p-3 text-sm",children:[(0,g.jsxs)("span",{className:"flex cursor-pointer items-start gap-3",children:[(0,g.jsx)(ch,{checked:H,onCheckedChange:function(e){return B(!0===e)},className:"mt-0.5"}),(0,g.jsxs)("span",{className:"min-w-0",children:[(0,g.jsx)("span",{className:"block font-medium",children:i("transfer.migrateCache")}),(0,g.jsx)("span",{className:"mt-1 block text-xs leading-relaxed text-muted-foreground",children:i("transfer.migrateCacheHint")})]})]}),(null==(n=L.codexLoginCache)?void 0:n.targetExists)?(0,g.jsx)("span",{className:"block text-xs leading-relaxed text-amber-700 dark:text-amber-300",children:i("transfer.migrateCacheOverwrite")}):null]}):null,ef?(0,g.jsx)("div",{className:"rounded-xl border border-amber-500/30 bg-amber-500/5 px-3 py-2 text-xs leading-relaxed text-amber-700 dark:text-amber-300",children:ef}):null,D?(0,g.jsx)("p",{className:"text-xs text-amber-700 dark:text-amber-300",children:i("transfer.previewStale")}):null,(0,g.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,g.jsxs)("div",{className:"space-y-2",children:[(0,g.jsx)(cv,{htmlFor:"conflict-policy",children:i("transfer.conflictPolicy")}),(0,g.jsxs)(df,{value:V,onValueChange:function(e){q(e),$(!0),Y(!1)},children:[(0,g.jsx)(fe,{id:"conflict-policy",children:(0,g.jsx)(dh,{})}),(0,g.jsxs)(fr,{children:[(0,g.jsx)(fa,{value:"skip",children:i("transfer.policySkip")}),(0,g.jsx)(fa,{value:"overwrite",children:i("transfer.policyOverwrite")})]})]})]}),(0,g.jsxs)("label",{className:"flex cursor-pointer items-center gap-3 rounded-xl border px-3 py-2 text-sm",children:[(0,g.jsx)(ch,{checked:Z,onCheckedChange:function(e){G(!0===e),$(!0),Y(!1)}}),i("transfer.restoreActive")]})]}),(0,g.jsxs)(oo,{type:"button",disabled:!ed,onClick:function(){return Y(!0)},children:[(0,g.jsx)(ht,{}),D?i("transfer.recheckNeeded"):i("transfer.confirmImport")]}),(0,g.jsx)(sj,{open:Q,onOpenChange:Y,children:(0,g.jsxs)(sI,{children:[(0,g.jsxs)(sM,{children:[(0,g.jsx)(sF,{children:ef?i("transfer.confirmAuthTitle"):i("transfer.confirmTitle")}),(0,g.jsxs)(s$,{children:[i("transfer.confirmBody",{count:L.profileCount}),"overwrite"===V&&L.conflicts.length>0?i("transfer.confirmOverwrite",{count:L.conflicts.length}):i("transfer.confirmKeep"),H?(null==(r=L.codexLoginCache)?void 0:r.targetExists)?i("transfer.confirmCacheOverwrite"):i("transfer.confirmCacheWrite"):i("transfer.confirmCacheSkip"),ef?" ".concat(ef):null]})]}),(0,g.jsxs)(sD,{children:[(0,g.jsx)(sH,{children:i("common.cancel")}),(0,g.jsx)(sU,{onClick:function(){ho(function(){var e;return hs(this,function(t){switch(t.label){case 0:if(!C||!L||D)return[2];Y(!1),et("import"),el(null),t.label=1;case 1:return t.trys.push([1,4,5,6]),[4,lX("/api/transfer/import",{method:"POST",body:JSON.stringify({envelope:C,passphrase:T,conflictPolicy:V,restoreActive:Z,migrateCodexLoginCache:H})})];case 2:return e=t.sent(),[4,l()];case 3:var n,r,a,c;return t.sent(),s((c=[(n=i)("transfer.importedCount",{count:(r=e).imported})],r.overwritten>0&&c.push(n("transfer.overwrittenCount",{count:r.overwritten})),r.providersCopied>0&&c.push(n("transfer.providersCopiedCount",{count:r.providersCopied})),r.skipped>0&&c.push(n("transfer.skippedCount",{count:r.skipped})),r.activeRestored>0&&c.push(n("transfer.activeRestoredCount",{count:r.activeRestored})),c.push(n(r.codexLoginCacheMigrated?"transfer.cacheMigrated":"transfer.cacheNotMigrated")),[{key:"transfer.importedSummary",params:{parts:c.join(n("common.listSeparator"))}}].concat(function(e){if(Array.isArray(e))return hr(e)}(a=r.warnings.map(function(e){return l5(e)}))||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||hl(a)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))),I(null),$(!1),B(!1),o(!1),[3,6];case 4:return el(l6(t.sent())),[3,6];case 5:return et(null),[7];case 6:return[2]}})})()},children:ef?i("transfer.proceedAware"):"overwrite"===V?i("transfer.proceedOverwrite"):i("transfer.proceedSafe")})]})]})})]}):null]}),er?(0,g.jsx)("p",{className:"text-sm text-emerald-600 dark:text-emerald-400",children:er}):null,ei?(0,g.jsx)("p",{className:"text-sm text-destructive",children:l7(i,ei)}):null]})})}function hu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function hd(e,t,n,r,a,o,i){try{var l=e[o](i),s=l.value}catch(e){n(e);return}l.done?t(s):Promise.resolve(s).then(r,a)}function hf(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,a=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],i=!0,l=!1;try{for(a=a.call(e);!(i=(n=a.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){l=!0,r=e}finally{try{i||null==a.return||a.return()}finally{if(l)throw r}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return hu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hu(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hp(){var e=(0,x.Bd)().t,t=hf((0,y.useState)(null),2),n=t[0],r=t[1],a=hf((0,y.useState)(null),2),o=a[0],i=a[1],l=hf((0,y.useState)("idle"),2),s=l[0],c=l[1];return((0,y.useEffect)(function(){var e=!1;return lX("/api/update/check").then(function(t){!e&&(r(t.current),t.updateAvailable&&t.latest&&i(t.latest))}).catch(function(){}),function(){e=!0}},[]),"updating"===s)?(0,g.jsxs)("span",{className:"flex h-6 shrink-0 items-center gap-1.5 whitespace-nowrap rounded-md bg-muted/70 px-2 font-mono text-[11px] text-muted-foreground",children:[(0,g.jsx)(f2,{className:"size-3 shrink-0 animate-spin"}),e("update.updating")]}):"failed"===s?(0,g.jsx)("span",{title:e("update.failedHint"),className:"flex h-6 shrink-0 items-center whitespace-nowrap rounded-md bg-destructive/10 px-2 font-mono text-[11px] text-destructive",children:e("update.failed")}):o?(0,g.jsxs)(oo,{variant:"outline",size:"sm","aria-label":e("update.toVersion",{version:o}),className:"h-6 shrink-0 gap-1 whitespace-nowrap px-2 font-mono text-[11px]",onClick:function(){var e;(e=function(){var e;return function(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(i,"next",{value:s(0)}),l(i,"throw",{value:s(1)}),l(i,"return",{value:s(2)}),"function"==typeof Symbol&&l(i,Symbol.iterator,{value:function(){return this}}),i;function s(l){return function(s){var c=[l,s];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&c[0]?r.return:c[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;switch(r=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]<a[3])){o.label=c[1];break}if(6===c[0]&&o.label<a[1]){o.label=a[1],a=c;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(c);break}a[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(t){switch(t.label){case 0:c("updating"),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,lX("/api/update",{method:"POST"})];case 2:case 3:return t.sent(),[3,4];case 4:e=Date.now()+18e4,t.label=5;case 5:if(!(Date.now()<e))return[3,11];return[4,new Promise(function(e){return setTimeout(e,2500)})];case 6:t.sent(),t.label=7;case 7:return t.trys.push([7,9,,10]),[4,lX("/api/version")];case 8:if(t.sent().version!==n)return window.location.reload(),[2];return[3,10];case 9:return t.sent(),[3,10];case 10:return[3,5];case 11:return c("failed"),[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function i(e){hd(o,r,a,i,l,"next",e)}function l(e){hd(o,r,a,i,l,"throw",e)}i(void 0)})})()},children:[(0,g.jsx)(sh,{className:"size-3 shrink-0"}),(0,g.jsx)("span",{className:"sm:hidden",children:e("update.short")}),(0,g.jsx)("span",{className:"hidden sm:inline",children:e("update.toVersion",{version:o})})]}):null}let hh=O("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);function hm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function hg(e,t,n,r,a,o,i){try{var l=e[o](i),s=l.value}catch(e){n(e);return}l.done?t(s):Promise.resolve(s).then(r,a)}function hy(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function i(e){hg(o,r,a,i,l,"next",e)}function l(e){hg(o,r,a,i,l,"throw",e)}i(void 0)})}}function hv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,a=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],i=!0,l=!1;try{for(a=a.call(e);!(i=(n=a.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){l=!0,r=e}finally{try{i||null==a.return||a.return()}finally{if(l)throw r}}return o}}(e,t)||hx(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hb(e){return function(e){if(Array.isArray(e))return hm(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||hx(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hx(e,t){if(e){if("string"==typeof e)return hm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hm(e,t)}}function hw(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(i,"next",{value:s(0)}),l(i,"throw",{value:s(1)}),l(i,"return",{value:s(2)}),"function"==typeof Symbol&&l(i,Symbol.iterator,{value:function(){return this}}),i;function s(l){return function(s){var c=[l,s];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&c[0]?r.return:c[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;switch(r=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]<a[3])){o.label=c[1];break}if(6===c[0]&&o.label<a[1]){o.label=a[1],a=c;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(c);break}a[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}function hk(e){var t=e.open,n=e.onOpenChange,r=(0,x.Bd)().t,a=ss(function(e){return e.users}),o=ss(function(e){return e.currentUser}),i=ss(function(e){return e.loadHarnesses}),l=ss(function(e){return e.loadProviders}),s=ss(function(e){return e.setNotice}),c=(0,y.useMemo)(function(){return a.filter(function(e){return e.username!==o&&!1!==e.manageable})},[a,o]),u=hv((0,y.useState)(""),2),d=u[0],f=u[1],p=hv((0,y.useState)(null),2),h=p[0],m=p[1],v=hv((0,y.useState)([]),2),b=v[0],w=v[1],k=hv((0,y.useState)(!1),2),j=k[0],S=k[1],O=hv((0,y.useState)(!1),2),C=O[0],N=O[1],P=hv((0,y.useState)(!1),2),E=P[0],_=P[1],z=hv((0,y.useState)(null),2),T=z[0],A=z[1],R=(0,y.useMemo)(function(){return D.flatMap(function(e){var t,n=null!=(t=null==h?void 0:h.conflicts.filter(function(t){return t.harness===e}).length)?t:0;return n>0?[{harness:e,count:n}]:[]})},[h]),L=o||r("notice.currentUser");function I(){return hy(function(){var e;return hw(this,function(t){switch(t.label){case 0:if(!d||!h)return[2];_(!0),A(null),t.label=1;case 1:return t.trys.push([1,4,5,6]),[4,lX("/api/users/sync",{method:"POST",body:JSON.stringify({sourceUser:d,conflictPolicy:"skip",overwriteHarnesses:b,migrateCodexLoginCache:j})})];case 2:return e=t.sent(),[4,Promise.all([i(),l()])];case 3:return t.sent(),s([{key:"sync.done",params:{imported:e.imported,overwritten:e.overwritten,skipped:e.skipped,providersCopied:e.providersCopied}},{key:e.codexLoginCacheMigrated?"sync.cacheMigrated":"sync.cacheNotMigrated"}].concat(hb(e.warnings.map(function(e){return l5(e)})))),n(!1),[3,6];case 4:return A(l6(t.sent())),[3,6];case 5:return _(!1),[7];case 6:return[2]}})})()}return(0,y.useEffect)(function(){t&&(f(function(e){var t,n;return c.some(function(t){return t.username===e})?e:null!=(t=null==(n=c[0])?void 0:n.username)?t:""}),m(null),w([]),S(!1),N(!1),A(null))},[t,c]),(0,g.jsx)(lc,{open:t,onOpenChange:n,children:(0,g.jsxs)(lT,{className:"flex max-h-[calc(100dvh-1rem)] w-[calc(100vw-1rem)] max-w-xl flex-col gap-0 overflow-hidden p-0 sm:max-h-[90dvh] sm:w-full",children:[(0,g.jsxs)(lA,{className:"shrink-0 border-b px-5 py-4 pr-12 text-left sm:px-6",children:[(0,g.jsx)(lL,{children:r("sync.title")}),(0,g.jsx)(lI,{children:r("sync.intro",{user:L})})]}),(0,g.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto overscroll-contain px-4 py-4 sm:px-6",children:[c.length>0?(0,g.jsxs)("div",{className:"space-y-5",children:[(0,g.jsxs)("div",{className:"space-y-2",children:[(0,g.jsx)(cv,{htmlFor:"sync-source-user",children:r("sync.sourceUser")}),(0,g.jsxs)(df,{value:d,onValueChange:function(e){f(e),m(null),w([]),S(!1)},children:[(0,g.jsx)(fe,{id:"sync-source-user",children:(0,g.jsx)(dh,{placeholder:r("sync.selectUser")})}),(0,g.jsx)(fr,{children:c.map(function(e){return(0,g.jsxs)(fa,{value:e.username,children:[e.username," \xb7 ",e.homeDir]},e.username)})})]})]}),h?(0,g.jsxs)("div",{className:"space-y-4 rounded-2xl border bg-muted/25 p-4",children:[(0,g.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,g.jsx)(aI,{variant:"secondary",children:r("sync.profileCount",{count:h.profileCount})}),(0,g.jsx)(aI,{variant:"secondary",children:r("sync.providerCount",{count:h.providerCount})}),(0,g.jsx)(aI,{variant:h.conflicts.length>0?"destructive":"outline",children:r("sync.conflictCount",{count:h.conflicts.length})})]}),h.conflicts.length>0?(0,g.jsxs)("div",{className:"space-y-3",children:[(0,g.jsxs)("div",{className:"space-y-1",children:[(0,g.jsx)(cv,{children:r("sync.overwriteByHarness")}),(0,g.jsx)("p",{className:"text-xs leading-relaxed text-muted-foreground",children:r("sync.overwriteHint")})]}),(0,g.jsx)("div",{className:"grid gap-2 sm:grid-cols-2",children:R.map(function(e){var t=e.harness,n=e.count;return(0,g.jsxs)("label",{className:"flex cursor-pointer items-start gap-3 rounded-xl border bg-background/70 p-3 text-sm",children:[(0,g.jsx)(ch,{checked:b.includes(t),onCheckedChange:function(e){return w(function(n){return!0===e?hb(n).concat([t]):n.filter(function(e){return e!==t})})},className:"mt-0.5"}),(0,g.jsxs)("span",{children:[(0,g.jsx)("span",{className:"block font-medium",children:r("sync.overwriteHarness",{harness:F[t]})}),(0,g.jsx)("span",{className:"mt-1 block text-xs text-muted-foreground",children:r("sync.conflictsInHarness",{count:n})})]})]},t)})})]}):null,h.codexLoginCache.available&&h.codexLoginCache.migrationNeeded?(0,g.jsxs)("label",{className:"block space-y-3 rounded-xl border bg-background/70 p-3 text-sm",children:[(0,g.jsxs)("span",{className:"flex cursor-pointer items-start gap-3",children:[(0,g.jsx)(ch,{checked:j,onCheckedChange:function(e){return S(!0===e)},className:"mt-0.5"}),(0,g.jsxs)("span",{children:[(0,g.jsx)("span",{className:"block font-medium",children:r("sync.migrateCache")}),(0,g.jsx)("span",{className:"mt-1 block text-xs leading-relaxed text-muted-foreground",children:r("sync.migrateCacheHint")})]})]}),h.codexLoginCache.targetExists?(0,g.jsx)("span",{className:"block rounded-lg bg-amber-500/10 px-3 py-2 text-xs leading-relaxed text-amber-700 dark:text-amber-300",children:r("sync.migrateCacheOverwrite")}):null]}):null,(0,g.jsx)("p",{className:"text-xs leading-relaxed text-muted-foreground",children:r("sync.storeOnlyHint")})]}):null]}):(0,g.jsxs)("div",{className:"flex items-start gap-3 rounded-2xl border bg-muted/25 p-4",children:[(0,g.jsx)(hh,{className:"mt-0.5 size-5 text-muted-foreground"}),(0,g.jsx)("p",{className:"text-sm text-muted-foreground",children:r("sync.noOtherUsers")})]}),T?(0,g.jsx)("p",{className:"mt-4 text-sm text-destructive",children:l7(r,T)}):null]}),(0,g.jsx)(lR,{className:"shrink-0 border-t bg-card px-4 py-3 pb-[max(.75rem,env(safe-area-inset-bottom))] sm:px-6 sm:py-4",children:h?j?(0,g.jsxs)(sj,{open:C,onOpenChange:N,children:[(0,g.jsxs)(oo,{className:"w-full sm:w-auto",disabled:E,onClick:function(){return N(!0)},children:[(0,g.jsx)(s6,{}),E?r("sync.syncing"):r("sync.syncTo",{user:L})]}),(0,g.jsxs)(sI,{children:[(0,g.jsxs)(sM,{children:[(0,g.jsx)(sF,{children:r("sync.confirmCacheTitle")}),(0,g.jsx)(s$,{children:r("sync.confirmCacheBody",{source:d,target:L,extra:h.codexLoginCache.targetExists?r("sync.confirmCacheOverwrite"):r("sync.confirmCacheFresh")})})]}),(0,g.jsxs)(sD,{children:[(0,g.jsx)(sH,{children:r("common.cancel")}),(0,g.jsx)(sU,{onClick:function(){I()},children:r("sync.confirmCacheAction")})]})]})]}):(0,g.jsxs)(oo,{className:"w-full sm:w-auto",disabled:E,onClick:function(){I()},children:[(0,g.jsx)(s6,{}),E?r("sync.syncing"):r("sync.syncTo",{user:L})]}):(0,g.jsxs)(oo,{className:"w-full sm:w-auto",disabled:!d||E,onClick:function(){hy(function(){var e;return hw(this,function(t){switch(t.label){case 0:if(!d)return[2];_(!0),A(null),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,lX("/api/users/sync/preview",{method:"POST",body:JSON.stringify({sourceUser:d})})];case 2:return m(t.sent()),w([]),S(!1),N(!1),[3,5];case 3:return e=t.sent(),m(null),w([]),A(l6(e)),[3,5];case 4:return _(!1),[7];case 5:return[2]}})})()},children:[(0,g.jsx)(s6,{}),E?r("sync.inspecting"):r("sync.inspect")]})})]})})}function hj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function hS(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,y.useState)(null))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,i=!1;try{for(r=r.call(e);!(o=(t=r.next()).done)&&(a.push(t.value),2!==a.length);o=!0);}catch(e){i=!0,n=e}finally{try{o||null==r.return||r.return()}finally{if(i)throw n}}return a}}(e)||function(e){if(e){if("string"==typeof e)return hj(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return hj(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=t[0],r=t[1];return((0,y.useEffect)(function(){var e=!1;return lX("/api/version").then(function(t){e||r(t.version)}).catch(function(){}),function(){e=!0}},[]),n)?(0,g.jsxs)("span",{className:"shrink-0 whitespace-nowrap rounded-md bg-muted/70 px-1.5 py-0.5 font-mono text-[11px] text-muted-foreground",children:["v",n]}):null}function hO(){return(0,x.Bd)().t,null}function hC(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function hN(e,t,n,r,a,o,i){try{var l=e[o](i),s=l.value}catch(e){n(e);return}l.done?t(s):Promise.resolve(s).then(r,a)}function hP(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function i(e){hN(o,r,a,i,l,"next",e)}function l(e){hN(o,r,a,i,l,"throw",e)}i(void 0)})}}function hE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,a=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],i=!0,l=!1;try{for(a=a.call(e);!(i=(n=a.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){l=!0,r=e}finally{try{i||null==a.return||a.return()}finally{if(l)throw r}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return hC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hC(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h_(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(i,"next",{value:s(0)}),l(i,"throw",{value:s(1)}),l(i,"return",{value:s(2)}),"function"==typeof Symbol&&l(i,Symbol.iterator,{value:function(){return this}}),i;function s(l){return function(s){var c=[l,s];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&c[0]?r.return:c[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;switch(r=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]<a[3])){o.label=c[1];break}if(6===c[0]&&o.label<a[1]){o.label=a[1],a=c;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(c);break}a[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}function hz(){var e,t,n,r=(0,x.s9)().locale,a=(0,x.Bd)().t,o=ss(function(e){return e.harnesses}),i=ss(function(e){return e.envFile}),l=ss(function(e){return e.backups}),s=hE((0,y.useState)(null),2),c=s[0],u=s[1],d=hE((0,y.useState)(!1),2),f=d[0],p=d[1],h=hE((0,y.useState)(!1),2),m=h[0],v=h[1],b=hE((0,y.useState)(!1),2),w=b[0],k=b[1],j=hE((0,y.useState)(!1),2),S=j[0],O=j[1],R=hE((0,y.useState)(!1),2),L=R[0],I=R[1],M=hE((0,y.useState)("claude"),2),D=M[0],F=M[1],$=o.find(function(e){return e.id===(null==c?void 0:c.harnessId)}),U=null!=(e=o.find(function(e){return e.id===D}))?e:o[0];return(0,g.jsxs)("div",{className:"min-h-[100dvh] bg-background",children:[(0,g.jsx)("header",{className:"sticky top-0 z-20 border-b bg-card/90 backdrop-blur-xl",children:(0,g.jsxs)("div",{className:"flex min-h-20 flex-wrap items-center justify-between gap-x-4 gap-y-2 px-4 py-2 sm:px-6",children:[(0,g.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,g.jsx)("span",{className:"flex size-10 shrink-0 items-center justify-center rounded-xl bg-primary text-primary-foreground shadow-[0_10px_24px_-12px_rgb(99_91_255/0.8)]",children:(0,g.jsx)(C,{className:"size-5"})}),(0,g.jsxs)("div",{className:"min-w-0",children:[(0,g.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,g.jsx)("h1",{className:"min-w-0 flex-1 truncate text-base font-semibold tracking-tight",children:"harness-switch"}),(0,g.jsx)(hS,{}),(0,g.jsx)(hO,{}),(0,g.jsx)(hp,{})]}),(0,g.jsx)("p",{className:"truncate text-xs text-muted-foreground",children:a("app.tagline")})]})]}),(0,g.jsxs)("div",{className:"ml-auto flex shrink-0 items-center gap-2",children:[(0,g.jsxs)(oo,{variant:"outline",size:"sm",onClick:function(){return O(!0)},children:[(0,g.jsx)(N,{}),(0,g.jsx)("span",{className:"hidden lg:inline",children:a("nav.syncUserConfig")})]}),(0,g.jsxs)(oo,{variant:"outline",size:"sm",onClick:function(){return I(!0)},children:[(0,g.jsx)(P,{}),(0,g.jsx)("span",{className:"hidden lg:inline",children:a("nav.importExisting")})]}),(0,g.jsxs)(oo,{variant:"outline",size:"sm",onClick:function(){return p(!0)},children:[(0,g.jsx)(E,{}),(0,g.jsx)("span",{className:"hidden sm:inline",children:a("nav.transfer")})]}),(0,g.jsxs)(oo,{variant:"outline",size:"sm",onClick:function(){return v(!0)},children:[(0,g.jsx)(_,{}),(0,g.jsx)("span",{className:"hidden sm:inline",children:a("nav.githubSync")})]}),(0,g.jsxs)(oo,{variant:"outline",size:"sm",onClick:function(){return k(!0)},children:[(0,g.jsx)(z,{}),(0,g.jsx)("span",{className:"hidden sm:inline",children:a("nav.vault")})]}),(0,g.jsx)(pn,{}),(0,g.jsx)(p7,{}),(0,g.jsx)(hT,{})]})]})}),(0,g.jsxs)("div",{className:"grid xl:grid-cols-[17rem_minmax(0,1fr)_18rem]",children:[(0,g.jsx)(hA,{harnesses:o,value:null==U?void 0:U.id,onChange:F}),U?(0,g.jsxs)("main",{role:"tabpanel",id:"harness-panel-".concat(U.id),"aria-labelledby":"harness-tab-".concat(U.id),className:"min-w-0 space-y-6 p-4 sm:p-6 xl:p-8",children:[(0,g.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,g.jsxs)("div",{children:[(0,g.jsx)("h2",{className:"text-2xl font-semibold tracking-tight",children:U.label}),(0,g.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:a("harness.subtitle")})]}),(0,g.jsxs)(oo,{className:"self-start sm:self-auto",onClick:function(){return u({harnessId:U.id,profile:null})},children:[(0,g.jsx)(T,{}),a("harness.newProfile")]})]}),(0,g.jsx)(fC,{harness:U,onAdd:function(){return u({harnessId:U.id,profile:null})},onEdit:function(e){return u({harnessId:U.id,profile:e})}}),(0,g.jsxs)("details",{className:"group rounded-2xl border bg-card px-5 py-4 text-sm shadow-[0_12px_34px_-28px_rgb(36_39_70/0.35)]",children:[(0,g.jsxs)("summary",{className:"flex cursor-pointer list-none items-center justify-between gap-3 font-medium",children:[(0,g.jsx)("span",{className:"font-mono text-[13px]",children:a("env.title")}),(0,g.jsx)(A,{className:"size-4 text-muted-foreground transition-transform group-open:rotate-180"})]}),(0,g.jsx)("p",{className:"mt-4 leading-relaxed text-muted-foreground",children:a("env.intro")}),(0,g.jsxs)("code",{className:"mt-3 block rounded-xl bg-muted/70 px-4 py-3 font-mono text-[13px]",children:["source ",i||"~/.harness-switch/env.sh"]}),(0,g.jsx)("p",{className:"mt-3 leading-relaxed text-muted-foreground",children:a("env.note")})]})]}):null,U?(0,g.jsx)(hR,{harness:U,latestBackup:l.find(function(e){return e.harness===U.id}),locale:r}):null]}),c&&$?(0,g.jsx)(pI,{harness:$,profile:c.profile,onOpenChange:function(e){return!e&&u(null)}},"".concat(c.harnessId,"-").concat(null!=(t=null==(n=c.profile)?void 0:n.name)?t:"new")):null,(0,g.jsx)(hc,{open:f,onOpenChange:p}),(0,g.jsx)(fu,{open:m,onOpenChange:v}),(0,g.jsx)(p2,{open:w,onOpenChange:k}),(0,g.jsx)(hk,{open:S,onOpenChange:O}),(0,g.jsx)(f7,{open:L,onOpenChange:I}),(0,g.jsx)(pr,{})]})}function hT(){var e=(0,x.Bd)().t,t=ss(function(e){return e.logout}),n=ss(function(e){return e.users}),r=ss(function(e){return e.currentUser}),a=ss(function(e){return e.usersLoading}),o=ss(function(e){return e.switchUser}),i=hE((0,y.useState)(!1),2),l=i[0],s=i[1],c=(0,y.useRef)(null);return(0,y.useEffect)(function(){var e=function(e){var t;(null==(t=c.current)?void 0:t.contains(e.target))||s(!1)};if(l)return window.addEventListener("pointerdown",e),function(){return window.removeEventListener("pointerdown",e)}},[l]),(0,g.jsxs)("div",{ref:c,className:"relative",children:[(0,g.jsxs)(oo,{variant:"outline",size:"sm","aria-label":e("nav.currentLocalUser"),"aria-expanded":l,"aria-haspopup":"menu",disabled:a,onClick:function(){return s(function(e){return!e})},children:[(0,g.jsx)(R,{}),(0,g.jsx)("span",{className:"max-w-28 truncate",children:r||e("nav.localUser")}),(0,g.jsx)(A,{className:aR("transition-transform",l&&"rotate-180")})]}),l?(0,g.jsxs)("div",{role:"menu","aria-label":e("nav.currentLocalUser"),className:"absolute right-0 top-full z-30 mt-2 w-52 rounded-xl border bg-popover p-1 text-popover-foreground shadow-lg",children:[(0,g.jsx)("div",{className:"px-3 py-2 text-xs text-muted-foreground",children:e("nav.currentLocalUser")}),n.map(function(t){var n,i=!1===t.manageable,l=i?l7(e,{key:t.blockCode?l3(t.blockCode):"error.user.notSwitchable",params:t.blockParams,fallback:t.blockReason}):"",c=a||t.username===r||i;return(0,g.jsxs)("button",{type:"button",role:"menuitemradio","aria-checked":t.username===r,disabled:c,title:i?null!=(n=t.blockReason)?n:l:void 0,onClick:function(){var e;e=t.username,hP(function(){return h_(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,o(e)];case 1:return t.sent(),s(!1),[3,3];case 2:return t.sent(),[3,3];case 3:return[2]}})})()},className:aR("flex w-full flex-col items-start rounded-lg px-3 py-2 text-left text-sm transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/35",c?"cursor-default opacity-60":"cursor-pointer hover:bg-accent hover:text-accent-foreground"),children:[(0,g.jsxs)("span",{className:"flex w-full items-center gap-1.5",children:[i?(0,g.jsx)(L,{className:"size-3 shrink-0","aria-hidden":!0}):null,(0,g.jsx)("span",{className:"truncate",children:t.username})]}),i?(0,g.jsx)("span",{className:"mt-0.5 text-xs leading-snug text-muted-foreground",children:l}):null]},t.username)}),(0,g.jsx)("div",{className:"my-1 border-t"}),(0,g.jsxs)("button",{type:"button",role:"menuitem",disabled:a,onClick:function(){hP(function(){return h_(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,t()];case 1:return e.sent(),s(!1),[3,3];case 2:return e.sent(),[3,3];case 3:return[2]}})})()},className:aR("flex w-full items-center gap-2 rounded-lg px-3 py-2 text-left text-sm text-destructive transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/35",a?"cursor-default opacity-60":"cursor-pointer hover:bg-destructive/10"),children:[(0,g.jsx)(I,{className:"size-4"}),e("nav.signOut")]})]}):null]})}function hA(e){var t=e.harnesses,n=e.value,r=e.onChange,a=(0,x.Bd)().t;return(0,g.jsx)("div",{role:"tablist","aria-label":a("nav.switchHarness"),"aria-orientation":"vertical",className:"flex gap-2 overflow-x-auto border-b bg-card/45 p-3 xl:min-h-[calc(100dvh-80px)] xl:flex-col xl:overflow-x-visible xl:border-b-0 xl:border-r xl:p-4",children:t.map(function(e,o){var i,l,s,c=e.id===n,u=(null==(l=e.active)?void 0:l.official)?a("harness.official"):null!=(i=null==(s=e.active)?void 0:s.name)?i:null;return(0,g.jsxs)("button",{type:"button",role:"tab",id:"harness-tab-".concat(e.id),"aria-controls":"harness-panel-".concat(e.id),"aria-selected":c,tabIndex:c?0:-1,onClick:function(){return r(e.id)},onKeyDown:function(e){return function(e,n){var a="ArrowLeft"===e.key||"ArrowUp"===e.key,o="ArrowRight"===e.key||"ArrowDown"===e.key;if(a||o||"Home"===e.key||"End"===e.key){e.preventDefault();var i=n;i="Home"===e.key?0:"End"===e.key?t.length-1:(n+(o?1:-1)+t.length)%t.length;var l=t[i];if(l){r(l.id);var s,c,u=null==(s=e.currentTarget.parentElement)?void 0:s.querySelectorAll('[role="tab"]');null==u||null==(c=u[i])||c.focus()}}}(e,o)},className:aR("flex min-w-[12rem] shrink-0 cursor-pointer items-center gap-3 rounded-xl px-3 py-3 text-left transition-[color,background-color,box-shadow,transform] duration-150 active:translate-y-px xl:min-w-0 xl:w-full",c?"bg-primary/[0.09] text-primary shadow-[inset_0_0_0_1px_rgb(99_91_255/0.13)]":"text-muted-foreground hover:bg-card hover:text-foreground"),children:[(0,g.jsx)("span",{className:aR("flex size-10 shrink-0 items-center justify-center rounded-xl border bg-card shadow-[0_4px_12px_-8px_rgb(36_39_70/0.28)]",c?"border-primary/20":"border-border"),children:(0,g.jsx)(f1,{id:e.id})}),(0,g.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,g.jsx)("span",{className:"block truncate text-sm font-medium text-current",children:e.label}),(0,g.jsx)("span",{className:"mt-0.5 block truncate font-mono text-[11px] text-muted-foreground",children:null===u?a("harness.currentInactive"):a("harness.current",{name:u})})]}),(0,g.jsx)("span",{className:"font-mono text-[11px] text-muted-foreground",children:e.profiles.length})]},e.id)})})}function hR(e){var t=e.harness,n=e.latestBackup,r=e.locale,a=(0,x.Bd)().t;return(0,g.jsx)("aside",{className:"border-t bg-card/35 p-4 sm:p-6 xl:min-h-[calc(100dvh-80px)] xl:border-l xl:border-t-0 xl:p-5",children:(0,g.jsxs)("div",{className:"space-y-4 xl:sticky xl:top-[100px]",children:[(0,g.jsxs)("section",{className:"rounded-2xl border bg-card p-5 shadow-[0_12px_34px_-28px_rgb(36_39_70/0.38)]",children:[(0,g.jsxs)("div",{className:"flex items-center gap-2",children:[(0,g.jsx)(M,{className:"size-4 text-primary"}),(0,g.jsx)("h3",{className:"font-semibold",children:a("harness.writeTargets")})]}),(0,g.jsxs)("div",{className:"mt-5 space-y-4",children:[(0,g.jsxs)("div",{children:[(0,g.jsx)("p",{className:"text-xs text-muted-foreground",children:a("harness.application")}),(0,g.jsx)("p",{className:"mt-1 text-sm font-medium",children:t.label})]}),t.targets.map(function(e){return(0,g.jsxs)("div",{children:[(0,g.jsx)("p",{className:"text-xs text-muted-foreground",children:e.label}),(0,g.jsx)("p",{className:"mt-1 break-all font-mono text-xs leading-relaxed",children:e.path})]},e.key)}),(0,g.jsxs)("div",{children:[(0,g.jsx)("p",{className:"text-xs text-muted-foreground",children:a("harness.writeMode")}),(0,g.jsx)("p",{className:"mt-1 text-sm",children:a("replace"===t.mode?"harness.modeReplace":"harness.modeAdditive")})]})]})]}),(0,g.jsx)(sJ,{harness:t}),(0,g.jsx)(pu,{harness:t}),(0,g.jsxs)("section",{className:"rounded-2xl border bg-card p-5 shadow-[0_12px_34px_-28px_rgb(36_39_70/0.38)]",children:[(0,g.jsx)("h3",{className:"font-semibold",children:a("backup.latest")}),n?(0,g.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,g.jsxs)("div",{children:[(0,g.jsx)("p",{className:"text-xs text-muted-foreground",children:a("backup.profile")}),(0,g.jsx)("p",{className:"mt-1 truncate text-sm font-medium",children:n.profile})]}),(0,g.jsxs)("p",{className:"font-mono text-[11px] leading-relaxed text-muted-foreground",children:[new Date(n.createdAt).toLocaleString(r)," \xb7"," ",a("backup.fileCount",{count:n.files.length})]})]}):(0,g.jsx)("p",{className:"mt-3 text-sm text-muted-foreground",children:a("backup.empty")}),(0,g.jsx)("div",{className:"mt-4 border-t pt-4",children:(0,g.jsx)(sd,{harnessId:t.id})})]})]})})}function hL(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function hI(e,t,n,r,a,o,i){try{var l=e[o](i),s=l.value}catch(e){n(e);return}l.done?t(s):Promise.resolve(s).then(r,a)}function hM(){var e,t=(0,x.Bd)().t,n=ss(function(e){return e.login}),r=ss(function(e){return e.loading}),a=function(e){if(Array.isArray(e))return e}(e=(0,y.useState)(null))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,i=!1;try{for(r=r.call(e);!(o=(t=r.next()).done)&&(a.push(t.value),2!==a.length);o=!0);}catch(e){i=!0,n=e}finally{try{o||null==r.return||r.return()}finally{if(i)throw n}}return a}}(e)||function(e){if(e){if("string"==typeof e)return hL(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return hL(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=a[0],i=a[1];return(0,g.jsxs)("main",{className:"grid min-h-[100dvh] lg:grid-cols-2",children:[(0,g.jsxs)("section",{className:"hidden flex-col justify-between border-r bg-card p-10 lg:flex",children:[(0,g.jsx)("p",{className:"font-mono text-xs text-muted-foreground",children:t("app.brandMark")}),(0,g.jsxs)("div",{className:"max-w-sm space-y-3",children:[(0,g.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:t("login.title")}),(0,g.jsx)("p",{className:"text-sm leading-relaxed text-muted-foreground",children:t("login.intro")})]}),(0,g.jsxs)("div",{className:"flex gap-2",children:[(0,g.jsx)(pn,{}),(0,g.jsx)(p7,{})]})]}),(0,g.jsx)("section",{className:"flex items-center justify-center px-4 py-10",children:(0,g.jsxs)("form",{className:"w-full max-w-sm space-y-5",onSubmit:function(e){var t;return(t=function(){var t,r;return function(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(i,"next",{value:s(0)}),l(i,"throw",{value:s(1)}),l(i,"return",{value:s(2)}),"function"==typeof Symbol&&l(i,Symbol.iterator,{value:function(){return this}}),i;function s(l){return function(s){var c=[l,s];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&c[0]?r.return:c[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;switch(r=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]<a[3])){o.label=c[1];break}if(6===c[0]&&o.label<a[1]){o.label=a[1],a=c;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(c);break}a[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(a){switch(a.label){case 0:e.preventDefault(),t=new FormData(e.currentTarget),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,n(String(null!=(r=t.get("password"))?r:""))];case 2:return a.sent(),[3,4];case 3:return i(l6(a.sent())),[3,4];case 4:return[2]}})},function(){var e=this,n=arguments;return new Promise(function(r,a){var o=t.apply(e,n);function i(e){hI(o,r,a,i,l,"next",e)}function l(e){hI(o,r,a,i,l,"throw",e)}i(void 0)})})()},children:[(0,g.jsxs)("div",{className:"flex items-start justify-between gap-3 lg:hidden",children:[(0,g.jsxs)("div",{children:[(0,g.jsx)("p",{className:"font-mono text-xs text-muted-foreground",children:t("app.brandMark")}),(0,g.jsx)("h1",{className:"mt-2 text-2xl font-semibold tracking-tight",children:t("login.title")})]}),(0,g.jsxs)("div",{className:"flex gap-2",children:[(0,g.jsx)(pn,{}),(0,g.jsx)(p7,{})]})]}),(0,g.jsx)("p",{className:"text-sm text-muted-foreground",children:t("login.hint")}),(0,g.jsxs)("div",{className:"space-y-2",children:[(0,g.jsx)(cv,{htmlFor:"password",children:t("login.password")}),(0,g.jsx)(cm,{id:"password",name:"password",type:"password",autoFocus:!0,required:!0})]}),o?(0,g.jsx)("p",{className:"text-sm text-destructive",children:l7(t,o)}):null,(0,g.jsx)(oo,{className:"w-full",type:"submit",disabled:r,children:t(r?"login.submitting":"login.submit")})]})})]})}(0,b.createRoot)(document.getElementById("root")).render((0,g.jsx)(y.StrictMode,{children:(0,g.jsx)(x.CY,{children:(0,g.jsx)(function(){var e=(0,x.Bd)().t,t=ss(function(e){return e.sessionChecked}),n=ss(function(e){return e.authenticated}),r=ss(function(e){return e.loadSession});return((0,y.useEffect)(function(){r()},[r]),t)?n?(0,g.jsx)(hz,{}):(0,g.jsx)(hM,{}):(0,g.jsx)("div",{className:"flex min-h-[100dvh] items-center justify-center text-sm text-muted-foreground",children:e("app.checkingSession")})},{})})}))})()})();