@seaveyon/harness-switch 0.19.0 → 0.20.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.
- package/README.md +11 -2
- package/dist/harness-switch.js +287 -18
- package/package.json +1 -1
- package/public/assets/main.c80926e5.css +2 -0
- package/public/assets/main.ff8bf9b3.js +62 -0
- package/public/index.html +1 -1
- package/public/assets/main.6f32f876.js +0 -62
- package/public/assets/main.df7f242e.css +0 -2
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
(()=>{"use strict";var e,t,n,r,a,o,i,l,s,u={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 u(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 c(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 E=Symbol.iterator;function P(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=E&&e[E]||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 V(e,t){switch(F(H,t),F(U,e),F($,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?uy(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)e=uv(t=uy(t),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}D($),F($,e)}function K(){D($),D(U),D(H)}function W(e){null!==e.memoizedState&&F(B,e);var t=$.current,n=uv(t,e.type);t!==n&&(F(U,e),F($,n))}function q(e){U.current===e&&(D($),D(U)),B.current===e&&(D(B),ce._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 J=!1;function G(e,t){if(!e||J)return"";J=!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"),u=l.split("\n");for(a=r=0;r<s.length&&!s[r].includes("DetermineComponentFrameRoot");)r++;for(;a<u.length&&!u[a].includes("DetermineComponentFrameRoot");)a++;if(r===s.length||a===u.length)for(r=s.length-1,a=u.length-1;1<=r&&0<=a&&s[r]!==u[a];)a--;for(;1<=r&&0<=a;r--,a--)if(s[r]!==u[a]){if(1!==r||1!==a)do if(r--,a--,0>a||s[r]!==u[a]){var c="\n"+s[r].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=r&&0<=a);break}}}finally{J=!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 G(e.type,!1);case 11:return G(e.type.render,!1);case 1:return G(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,eu=a.unstable_IdlePriority,ec=a.log,ed=a.unstable_setDisableYieldValue,ef=null,ep=null;function eh(e){if("function"==typeof ec&&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 eE(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 eP(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:ch(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 eV(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=uI(e);null!==e;){if(n=e[eL])return n;e=uI(e)}return t}n=(e=n).parentNode}return null}function eK(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 eW(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e.stateNode;throw Error(l(33))}function eq(e){var t=e[eU];return t||(t=e[eU]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function eZ(e){e[eH]=!0}var eJ=new Set,eG={};function eQ(e,t){eY(e,t),eY(e+"Capture",t)}function eY(e,t){for(eG[e]=t,e=0;e<t.length;e++)eJ.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 tu=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 tc(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||tu.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&&tc(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&tc(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=eK(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 tE=null,tP=null,t_=null;function tz(){if(t_)return t_;var e,t,n=tP,r=n.length,a="value"in tE?tE.value:tE.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}),tV=tL(tB),tK=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}}),tW=tL(tK),tq=tL(f({},tK,{dataTransfer:0})),tZ=tL(f({},tB,{relatedTarget:0})),tJ=tL(f({},tU,{animationName:0,elapsedTime:0,pseudoElement:0})),tG=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({},tK,{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({},tK,{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 nu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!ns[e.type]:"textarea"===t}function nc(e,t,n,r){tb?tx?tx.push(r):tx=[r]:tb=r,0<(t=ur(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(eW(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=[];nc(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 nE(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 nP(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=ur(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"),nV=nU("animationstart"),nK=nU("transitionrun"),nW=nU("transitionstart"),nq=nU("transitioncancel"),nZ=nU("transitionend"),nJ=new Map,nG="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){nJ.set(e,t),eQ(t,[e])}nG.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 ru=new WeakMap;function rc(e,t){if("object"==typeof e&&null!==e){var n=ru.get(e);return void 0!==n?n:(t={value:e,source:t,stack:Q(t)},ru.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,rE=null,rP=!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(rc(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||uu(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:rP=!1;return;case 27:case 3:rP=!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||ub(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=uL(e)}else if(31===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(l(317));rC=uL(e)}else 27===n?(n=rC,uC(e.type)?(e=uR,uR=null,rC=e):rC=n):rC=rO?uA(e.stateNode.nextSibling):null;return!0}function rL(){rC=rO=null,rN=!1}function rI(){var e=rE;return null!==e&&(null===lX?lX=e:lX.push.apply(lX,e),rE=null),e}function rM(e){null===rE?rE=[e]:rE.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 rV(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 u=0;u<t.length;u++)if(s.context===t[u]){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 rK(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(ce):e=[ce])}a=a.return}null!==e&&rV(t,e,n,r),t.flags|=262144}function rW(e){for(e=e.firstContext;null!==e;){if(!nO(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function rq(e){rF=e,r$=null,null!==(e=e.dependencies)&&(e.firstContext=null)}function rZ(e){return rG(rF,e)}function rJ(e,t){return null===rF&&rq(e),rG(e,t)}function rG(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 ac=t,ar}}function au(e){try{return(0,e._init)(e._payload)}catch(e){if(null!==e&&"object"==typeof e&&"function"==typeof e.then)throw ac=e,ar;throw e}}var ac=null;function ad(){if(null===ac)throw Error(l(459));var e=ac;return ac=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 u(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&&au(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 c(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=au(t),n)}if(z(t)||P(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,rJ(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?u(e,t,n,r):null;case m:return n.key===a?c(e,t,n,r):null;case O:return p(e,t,n=au(n),r)}if(z(n)||P(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,rJ(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 u(t,e=e.get(null===r.key?n:r.key)||null,r,a);case m:return c(t,e=e.get(null===r.key?n:r.key)||null,r,a);case O:return y(e,t,n,r=au(r),a)}if(z(r)||P(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,rJ(t,r),a);ay(t,r)}return null}return function(s,u,c,d){try{ah=0;var v=function s(u,c,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!==c;){if(c.key===b){if((b=d.type)===g){if(7===c.tag){n(u,c.sibling),(v=a(c,d.props.children)).return=u,u=v;break e}}else if(c.elementType===b||"object"==typeof b&&null!==b&&b.$$typeof===O&&au(b)===c.type){n(u,c.sibling),ag(v=a(c,d.props),d),v.return=u,u=v;break e}n(u,c);break}t(u,c),c=c.sibling}d.type===g?(v=ro(d.props.children,u.mode,v,d.key)).return=u:(ag(v=ra(d.type,d.key,d.props,null,u.mode,v),d),v.return=u),u=v}return i(u);case m:e:{for(b=d.key;null!==c;){if(c.key===b)if(4===c.tag&&c.stateNode.containerInfo===d.containerInfo&&c.stateNode.implementation===d.implementation){n(u,c.sibling),(v=a(c,d.children||[])).return=u,u=v;break e}else{n(u,c);break}t(u,c),c=c.sibling}(v=rs(d,u.mode,v)).return=u,u=v}return i(u);case O:return s(u,c,d=au(d),v)}if(z(d))return function(a,i,l,s){for(var u=null,c=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===c?u=g:c.sibling=g,c=g,d=m}if(h===l.length)return n(a,d),rN&&rx(a,h),u;if(null===d){for(;h<l.length;h++)null!==(d=f(a,l[h],s))&&(i=o(d,i,h),null===c?u=d:c.sibling=d,c=d);return rN&&rx(a,h),u}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===c?u=m:c.sibling=m,c=m);return e&&d.forEach(function(e){return t(a,e)}),rN&&rx(a,h),u}(u,c,d,v);if(P(d)){if("function"!=typeof(b=P(d)))throw Error(l(150));return function(a,i,s,u){if(null==s)throw Error(l(151));for(var c=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,u);if(null===b){null===h&&(h=g);break}e&&h&&null===b.alternate&&t(a,h),i=o(b,i,m),null===d?c=b:d.sibling=b,d=b,h=g}if(v.done)return n(a,h),rN&&rx(a,m),c;if(null===h){for(;!v.done;m++,v=s.next())null!==(v=f(a,v.value,u))&&(i=o(v,i,m),null===d?c=v:d.sibling=v,d=v);return rN&&rx(a,m),c}for(h=r(h);!v.done;m++,v=s.next())null!==(v=y(h,a,m,v.value,u))&&(e&&null!==v.alternate&&h.delete(null===v.key?m:v.key),i=o(v,i,m),null===d?c=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),rN&&rx(a,m),c}(u,c,d=b.call(d),v)}if("function"==typeof d.then)return s(u,c,am(d),v);if(d.$$typeof===x)return s(u,c,rJ(u,d),v);ay(u,d)}return"string"==typeof d&&""!==d||"number"==typeof d||"bigint"==typeof d?(d=""+d,null!==c&&6===c.tag?(n(u,c.sibling),(v=a(c,d)).return=u):(n(u,c),(v=ri(d,u.mode,v)).return=u),i(u=v)):n(u,c)}(s,u,c,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,eE(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 aE=!1;function aP(){if(aE){var e=r6;if(null!==e)throw e}}function a_(e,t,n,r){aE=!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,u=s.next;s.next=null,null===i?o=u:i.next=u,i=s;var c=e.alternate;null!==c&&(l=(c=c.updateQueue).lastBaseUpdate)!==i&&(null===l?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=s)}if(null!==o){var d=a.baseState;for(i=0,c=u=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&&(aE=!0),null!==c&&(c=c.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===c?(u=c=h,s=d):c=c.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===c&&(s=d),a.baseState=s,a.firstBaseUpdate=u,a.lastBaseUpdate=c,null===o&&(a.shared.lanes=0),lq|=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=lK),F(aA,t),lK=e|t.baseLanes}function aI(){F(aR,lK),F(aA,aA.current)}function aM(){lK=aR.current,D(aA),D(aR)}var aD=M(null),aF=null;function a$(e){var t=e.alternate;F(aK,1&aK.current),F(aD,e),null===aF&&(null===t||null!==aA.current?aF=e:null!==t.memoizedState&&(aF=e))}function aU(e){F(aK,aK.current),F(aD,e),null===aF&&(aF=e)}function aH(e){22===e.tag?(F(aK,aK.current),F(aD,e),null===aF&&(aF=e)):aB(e)}function aB(){F(aK,aK.current),F(aD,aD.current)}function aV(e){D(aD),aF===e&&(aF=null),D(aK)}var aK=M(0);function aW(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||uz(n)||uT(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 aq=0,aZ=null,aJ=null,aG=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 aq=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!==aJ&&null!==aJ.next;if(aq=0,aG=aJ=aZ=null,aQ=!1,a1=0,a2=null,t)throw Error(l(300));null===e||iw||null!==(e=e.dependencies)&&rW(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,aG=aJ=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!==aJ?aJ.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}aq=0,aG=aJ=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===aG?aZ.memoizedState=aG=e:aG=aG.next=e,aG}function oa(){if(null===aJ){var e=aZ.alternate;e=null!==e?e.memoizedState:null}else e=aJ.next;var t=null===aG?aZ.memoizedState:aG.next;if(null!==t)aG=t,aJ=e;else{if(null===e){if(null===aZ.alternate)throw Error(l(467));throw Error(l(310))}e={memoizedState:(aJ=e).memoizedState,baseState:aJ.baseState,baseQueue:aJ.baseQueue,queue:aJ.queue,next:null},null===aG?aZ.memoizedState=aG=e:aG=aG.next=e}return aG}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===aG?t.memoizedState:aG.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 ou(e,t){return"function"==typeof t?t(e):t}function oc(e){return od(oa(),aJ,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,u=null,c=t,d=!1;do{var f=-0x20000001&c.lane;if(f!==c.lane?(lF&f)===f:(aq&f)===f){var p=c.revertLane;if(0===p)null!==u&&(u=u.next={lane:0,revertLane:0,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),f===r5&&(d=!0);else if((aq&p)===p){c=c.next,p===r5&&(d=!0);continue}else f={lane:0,revertLane:c.revertLane,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},null===u?(s=u=f,i=o):u=u.next=f,aZ.lanes|=p,lq|=p;f=c.action,aX&&n(o,f),o=c.hasEagerState?c.eagerState:n(o,f)}else p={lane:f,revertLane:c.revertLane,gesture:c.gesture,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},null===u?(s=u=p,i=o):u=u.next=p,aZ.lanes|=f,lq|=f;c=c.next}while(null!==c&&c!==t);if(null===u?i=o:u.next=s,!nO(o,e.memoizedState)&&(iw=!0,d&&null!==(n=r6)))throw n;e.memoizedState=o,e.baseState=i,e.baseQueue=u,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((aJ||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!==aG&&1&aG.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&aq)||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:ou,lastRenderedState:e},t}function ox(e,t,n,r){return e.baseState=n,od(e,aJ,"function"==typeof r?r:ou)}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 oE(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=rP;8!==a.nodeType;)if(!o||null===(a=uA(a.nextSibling))){a=null;break t}a="F!"===(o=a.data)||"F"===o?a:null}if(a){rC=uA(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 oP(e){return o_(oa(),aJ,e)}function o_(e,t,n){if(t=od(e,t,oN)[0],e=oc(ou)[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=aJ;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!==aJ&&null!==r&&a5(r,aJ.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 oV(){}function oK(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 oW(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 oq(e,t,n){return void 0===n||0!=(0x40000000&aq)&&0==(261930&lF)?e.memoizedState=t:(e.memoizedState=n,e=si(),aZ.lanes|=e,lq|=e,n)}function oZ(e,t,n,r){return nO(n,t)?n:null!==aA.current?(nO(e=oq(e,n,r),t)||(iw=!0),e):0==(42&aq)||0!=(0x40000000&aq)&&0==(261930&lF)?(iw=!0,e.memoizedState=n):(e=si(),aZ.lanes|=e,lq|=e,t)}function oJ(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(),u=T.S;if(null!==u&&u(l,s),null!==s&&"object"==typeof s&&"function"==typeof s.then){var c,d,f=(c=[],d={status:"pending",value:null,reason:null,then:function(e){c.push(e)}},s.then(function(){d.status="fulfilled",d.value=r;for(var e=0;e<c.length;e++)(0,c[e])(r)},function(e){for(d.status="rejected",d.reason=e,e=0;e<c.length;e++)(0,c[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 oG(){}function oQ(e,t,n,r){if(5!==e.tag)throw Error(l(476));var a=oY(e).queue;oJ(e,a,t,R,null===n?oG: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:ou,lastRenderedState:R},next:null}).next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ou,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(ce)}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,eE(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:oV,useDeferredValue:function(e,t){return oq(or(),e,t)},useTransition:function(){var e=ob(!1);return e=oJ.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:oE,useActionState:oE,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:oK,useContext:rZ,useEffect:oD,useImperativeHandle:oB,useInsertionEffect:o$,useLayoutEffect:oU,useMemo:oW,useReducer:oc,useRef:oR,useState:function(){return oc(ou)},useDebugValue:oV,useDeferredValue:function(e,t){return oZ(oa(),aJ.memoizedState,e,t)},useTransition:function(){var e=oc(ou)[0],t=oa().memoizedState;return["boolean"==typeof e?e:oi(e),t]},useSyncExternalStore:op,useId:o1,useHostTransitionStatus:o0,useFormState:oP,useActionState:oP,useOptimistic:function(e,t){return ox(oa(),aJ,e,t)},useMemoCache:os,useCacheRefresh:o2};ia.useEffectEvent=oF;var io={readContext:rZ,use:ol,useCallback:oK,useContext:rZ,useEffect:oD,useImperativeHandle:oB,useInsertionEffect:o$,useLayoutEffect:oU,useMemo:oW,useReducer:of,useRef:oR,useState:function(){return of(ou)},useDebugValue:oV,useDeferredValue:function(e,t){var n=oa();return null===aJ?oq(n,e,t):oZ(n,aJ.memoizedState,e,t)},useTransition:function(){var e=of(ou)[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!==aJ?ox(n,aJ,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 iu(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 ic(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(rq(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),iW(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,!iq(e,a)){var i=o.memoizedProps;if((n=null!==(n=n.compare)?n:nC)(i,r)&&e.ref===t.ref)return iW(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,!iq(e,a))return t.lanes=e.lanes,iW(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 iE(e,t,o,n,r)}if(0==(0x20000000&n))return r=t.lanes=0x20000000,iE(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 iE(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&&rK(e,t,r,!0),t.childLanes=a,null}function iP(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=iP(t,t.pendingProps),e.flags|=2,aV(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(rq(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),iW(e,t,a))}function iA(e,t,n,r,a,o){return(rq(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),iW(e,t,o))}function iR(e,t,n,r,a){if(rq(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),aP(),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=ic(n,l);o.props=s;var u=o.context,c=n.contextType;i=n9,"object"==typeof c&&null!==c&&(i=rZ(c));var d=n.getDerivedStateFromProps;c="function"==typeof d||"function"==typeof o.getSnapshotBeforeUpdate,l=t.pendingProps!==l,c||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(l||u!==i)&&iu(t,o,r,i),aw=!1;var f=t.memoizedState;o.state=f,a_(t,r,o,a),aP(),u=t.memoizedState,l||f!==u||aw?("function"==typeof d&&(ii(t,n,d,r),u=t.memoizedState),(s=aw||is(t,n,s,r,f,u,i))?(c||"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=u),o.props=r,o.state=u,o.context=i,r=s):("function"==typeof o.componentDidMount&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,aj(e,t),c=ic(n,i=t.memoizedProps),o.props=c,d=t.pendingProps,f=o.context,u=n.contextType,s=n9,"object"==typeof u&&null!==u&&(s=rZ(u)),(u="function"==typeof(l=n.getDerivedStateFromProps)||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(i!==d||f!==s)&&iu(t,o,r,s),aw=!1,f=t.memoizedState,o.state=f,a_(t,r,o,a),aP();var p=t.memoizedState;i!==d||f!==p||aw||null!==e&&null!==e.dependencies&&rW(e.dependencies)?("function"==typeof l&&(ii(t,n,l,r),p=t.memoizedState),(c=aw||is(t,n,c,r,f,p,s)||null!==e&&null!==e.dependencies&&rW(e.dependencies))?(u||"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=c):("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=iW(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|=lG),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&aK.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=u_(e,rP))&&"&"!==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 uT(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 u=e.memoizedState;if(null!==u&&null!==(s=u.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),uT(s)){if(r=s.nextSibling&&s.nextSibling.dataset)var c=r.dgst;r=c,(a=Error(l(419))).stack="",a.digest=r,rM({value:a,source:null,stack:null}),t=iH(e,t,n)}else if(iw||rK(e,t,n,!1),r=0!=(n&e.childLanes),iw||r){if(null!==(r=lM)&&0!==(a=eP(r,n))&&a!==u.retryLane)throw u.retryLane=a,n5(e,a),sl(r,e,a),ix;uz(s)||sv(),t=iH(e,t,n)}else uz(s)?(t.flags|=192,t.child=e.child,t=null):(e=u.treeContext,rC=uA(s.nextSibling),rO=t,rN=!0,rE=null,rP=!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,c=(u=e.child).sibling,(a=rn(u,{mode:"hidden",children:a.children})).subtreeFlags=0x3e00000&u.subtreeFlags,null!==c?s=rn(c,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)?(u=r0._currentValue,o=o.parent!==u?{parent:u,pool:u}: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 iV(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 iK(e,t,n){var r=t.pendingProps,a=r.revealOrder,o=r.tail;r=r.children;var i=aK.current,l=0!=(2&i);if(l?(i=1&i|2,t.flags|=128):i&=1,F(aK,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===aW(e)&&(a=n),n=n.sibling;null===(n=a)?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),iV(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===aW(e)){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}iV(t,!0,n,null,o,r);break;case"together":iV(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function iW(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),lq|=t.lanes,0==(n&t.childLanes)){if(null===e)return null;else if(rK(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 iq(e,t){return 0!=(e.lanes&t)||!!(null!==(e=e.dependencies)&&rW(e))}function iZ(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps)iw=!0;else{if(!iq(e,n)&&0==(128&t.flags))return iw=!1,function(e,t,n){switch(t.tag){case 3:V(t,t.stateNode.containerInfo),rU(t,r0,e.memoizedState.cache),rL();break;case 27:case 5:W(t);break;case 4:V(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=iW(e,t,n))?e.sibling:null}a$(t);break;case 19:var a=0!=(128&e.flags);if((r=0!=(n&t.childLanes))||(rK(e,t,n,!1),r=0!=(n&t.childLanes)),a){if(r)return iK(e,t,n);t.flags|=128}if(null!==(a=t.memoizedState)&&(a.rendering=null,a.tail=null,a.lastEffect=null),F(aK,aK.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 iW(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=au(t.elementType),t.type=e,"function"==typeof e)rt(e)?(r=ic(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=ic(r=t.type,t.pendingProps),iR(e,t,r,a,n);case 3:e:{if(V(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&&rV(t,[r0],n,!0),aP(),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=rc(Error(l(424)),t)),t=iL(e,t,r,n);break e}else for(rC=uA((e=9===(e=t.stateNode.containerInfo).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e).firstChild),rO=t,rN=!0,rE=null,rP=!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=iW(e,t,n);break e}ik(e,t,r,n)}t=t.child}return t;case 26:return iz(e,t),null===e?(n=uK(t.type,null,t.pendingProps,null))?t.memoizedState=n:rN||(n=t.type,e=t.pendingProps,(r=ug(H.current).createElement(n))[eL]=t,r[eI]=e,uf(r,n,e),eZ(r),t.stateNode=r):t.memoizedState=uK(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return W(t),null===e&&rN&&(r=t.stateNode=uM(t.type,t.pendingProps,H.current),rO=t,rP=!0,a=rC,uC(t.type)?(uR=a,rC=uA(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=uA(e.nextSibling)))break}return null}(r,t.type,t.pendingProps,rP))?(t.stateNode=r,rO=t,rC=uA(r.firstChild),rP=!1,a=!0):a=!1),a||rz(t)),W(t),a=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,r=o.children,ub(a,o)?r=null:null!==i&&ub(a,i)&&(t.flags|=32),null!==t.memoizedState&&(ce._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=uA(e.nextSibling)))return null;return e}(n,t.pendingProps,rP))?(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 V(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,rq(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 iK(e,t,n);case 31:var s=e,u=t,c=n,d=u.pendingProps,f=0!=(128&u.flags);if(u.flags&=-129,null===s){if(rN){if("hidden"===d.mode)return s=iP(u,d),u.lanes=0x20000000,iN(null,s);if(aU(u),(s=rC)?null!==(s=null!==(s=u_(s,rP))&&"&"===s.data?s:null)&&(u.memoizedState={dehydrated:s,treeContext:null!==ry?{id:rv,overflow:rb}:null,retryLane:0x20000000,hydrationErrors:null},(c=rl(s)).return=u,u.child=c,rO=u,rC=null):s=null,null===s)throw rz(u);return u.lanes=0x20000000,null}return iP(u,d)}var p=s.memoizedState;if(null!==p){var h=p.dehydrated;if(aU(u),f)if(256&u.flags)u.flags&=-257,u=i_(s,u,c);else if(null!==u.memoizedState)u.child=s.child,u.flags|=128,u=null;else throw Error(l(558));else if(iw||rK(s,u,c,!1),f=0!=(c&s.childLanes),iw||f){if(null!==(d=lM)&&0!==(h=eP(d,c))&&h!==p.retryLane)throw p.retryLane=h,n5(s,h),sl(d,s,h),ix;sv(),u=i_(s,u,c)}else s=p.treeContext,rC=uA(h.nextSibling),rO=u,rN=!0,rE=null,rP=!1,null!==s&&rS(u,s),u=iP(u,d),u.flags|=4096;return u}return(s=rn(s.child,{mode:d.mode,children:d.children})).ref=u.ref,u.child=s,s.return=u,s;case 22:return iC(e,t,n,t.pendingProps);case 24:return rq(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),aP()),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&&rV(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 iJ(e){e.flags|=4}function iG(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 ac=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,!u3(t))if(sm())e.flags|=8192;else throw ac=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),K();break;case 26:case 27:case 5:q(t);break;case 4:K();break;case 31:null!==t.memoizedState&&aV(t);break;case 13:aV(t);break;case 19:D(aK);break;case 10:rH(t.type);break;case 22:case 23:aV(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=ic(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,u=null,c=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":u=f;default:r.hasOwnProperty(h)||uc(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":c=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&&uc(e,t,p,h,r,f)}}tn(e,i,s,u,c,d,o,a);return;case"select":for(o in h=i=s=p=null,n)if(u=n[o],n.hasOwnProperty(o)&&null!=u)switch(o){case"value":break;case"multiple":h=u;default:r.hasOwnProperty(o)||uc(e,t,o,null,r,u)}for(a in r)if(o=r[a],u=n[a],r.hasOwnProperty(a)&&(null!=o||null!=u))switch(a){case"value":p=o;break;case"defaultValue":s=o;break;case"multiple":i=o;default:o!==u&&uc(e,t,a,o,r,u)}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:uc(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&&uc(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:uc(e,t,m,null,r,p));for(u in r)p=r[u],h=n[u],r.hasOwnProperty(u)&&p!==h&&(null!=p||null!=h)&&("selected"===u?e.selected=p&&"function"!=typeof p&&"symbol"!=typeof p:uc(e,t,u,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)&&uc(e,t,g,null,r,p);for(c in r)if(p=r[c],h=n[c],r.hasOwnProperty(c)&&p!==h&&(null!=p||null!=h))switch(c){case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(l(137,t));break;default:uc(e,t,c,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)&&ud(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)&&ud(e,t,d,p,r,h);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&null!=p&&!r.hasOwnProperty(v)&&uc(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)&&uc(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&&uC(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&&uC(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&&uC(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]);uf(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 lu(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=ic(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 u=o.shared.hiddenCallbacks;if(null!==u)for(o.shared.hiddenCallbacks=null,o=0;o<u.length;o++)az(u[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 lc=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=lc,a=ld;uC(n.type)&&(lc=n.stateNode,ld=!1),lf(e,t,n),uD(n.stateNode),lc=r,ld=a;break;case 5:lo||i8(n,t);case 6:if(r=lc,a=ld,lc=null,lf(e,t,n),lc=r,ld=a,null!==lc)if(ld)try{(9===lc.nodeType?lc.body:"HTML"===lc.nodeName?lc.ownerDocument.body:lc).removeChild(n.stateNode)}catch(e){sA(n,t,e)}else try{lc.removeChild(n.stateNode)}catch(e){sA(n,t,e)}break;case 18:null!==lc&&(ld?(uN(9===(e=lc).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,n.stateNode),cT(e)):uN(lc,n.stateNode));break;case 4:r=lc,a=ld,lc=n.stateNode.containerInfo,ld=!0,lf(e,t,n),lc=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{cT(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{cT(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(uC(s.type)){lc=s.stateNode,ld=!1;break e}break;case 5:lc=s.stateNode,ld=!1;break e;case 3:case 4:lc=s.stateNode.containerInfo,ld=!0;break e}s=s.return}if(null===lc)throw Error(l(160));lp(o,i,a),lc=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"))),uf(o,r,n),o[eL]=e,eZ(o),r=o;break e;case"link":var i=u2("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}}uf(o=a.createElement(r),r,n),a.head.appendChild(o);break;case"meta":if(i=u2("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}}uf(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 u4(a,e.type,e.stateNode);else e.stateNode=uQ(a,r,e.memoizedProps);else o!==r?(null===o?null!==n.stateNode&&(n=n.stateNode).parentNode.removeChild(n):o.count--,null===r?u4(a,e.type,e.stateNode):uQ(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(u1=null,a=lv,lv=uU(t.containerInfo),ly(t,e),lv=a,lx(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{cT(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=uU(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 u=null!==n&&null!==n.memoizedState,c=la,d=lo;if(la=c||a,lo=d||u,ly(t,e),lo=d,la=c,lx(e),8192&r)e:for((t=e.stateNode)._visibility=a?-2&t._visibility:1|t._visibility,a&&(null===n||u||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:uD(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){u=n=t;try{if(o=u.stateNode,a)i=o.style,"function"==typeof i.setProperty?i.setProperty("display","none","important"):i.display="none";else{s=u.stateNode;var f=u.memoizedProps.style,p=null!=f&&f.hasOwnProperty("display")?f.display:null;s.style.display=null==p||"boolean"==typeof p?"":(""+p).trim()}}catch(e){sA(u,u.return,e)}}}else if(6===t.tag){if(null===n){u=t;try{u.stateNode.nodeValue=a?"":u.memoizedProps}catch(e){sA(u,u.return,e)}}}else if(18===t.tag){if(null===n){u=t;try{var h=u.stateNode;a?uE(h,!0):uE(u.stateNode,!1)}catch(e){sA(u,u.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 u=n.stateNode.containerInfo,c=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&&uC(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,c,u);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;)lu(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 lE(e,t,n){if(e.subtreeFlags&lN)for(e=e.child;null!==e;)lP(e,t,n),e=e.sibling}function lP(e,t,n){switch(e.tag){case 26:lE(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=uW(r.href),o=t.querySelector(uq(a));if(o){null!==(t=o._p)&&"object"==typeof t&&"function"==typeof t.then&&(e.count++,e=u6.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=o,eZ(o);return}o=t.ownerDocument||t,r=uZ(r),(a=uF.get(a))&&uX(r,a),eZ(o=o.createElement("link"));var i=o;i._p=new Promise(function(e,t){i.onload=e,i.onerror=t}),uf(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=u6.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}(n,lv,e.memoizedState,e.memoizedProps);break;case 5:default:lE(e,t,n);break;case 3:case 4:var r=lv;lv=uU(e.stateNode.containerInfo),lE(e,t,n),lv=r;break;case 22:null===e.memoizedState&&(null!==(r=e.alternate)&&null!==r.memoizedState?(r=lN,lN=0x1000000,lE(e,t,n),lN=r):lE(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,lV=!1,lK=0,lW=0,lq=0,lZ=0,lJ=0,lG=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===lG)if(0==(0x20000000&lF)||rN){var e=eb;0==(3932160&(eb<<=1))&&(eb=262144),lG=e}else lG=0x20000000;return null!==(e=aD.current)&&(e.flags|=32),lG}function sl(e,t,n){(e===lM&&(2===l$||9===l$)||null!==e.cancelPendingCommit)&&(sp(e,0),sc(e,lF,lG,!1)),eC(e,n),(0==(2&lI)||e!==lM)&&(e===lM&&(0==(2&lI)&&(lZ|=n),4===lW&&sc(e,lF,lG,!1)),sK(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),sK(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?u3(i):s.stateNode.complete){l$=0,lU=null;var u=s.sibling;if(null!==u)lD=u;else{var c=s.return;null!==c?(lD=c,sj(c)):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(),lW=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(),lW)}(e,t):sb(e,t,!0),o=r;;){if(0===a)lB&&!r&&sc(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(lV&&!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),sc(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:sc(r,t,lG,!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(sc(r,t,lG,!lH),0!==ek(r,0,!0))break e;l7=t,r.timeoutHandle=uw(su.bind(null,r,n,lX,l3,l0,t,lG,lZ,lQ,lH,o,"Throttled",-0,0),a);break e}su(r,n,lX,l3,l0,t,lG,lZ,lQ,lH,o,null,-0,0)}}break}sK(e)}function su(e,t,n,r,a,o,i,l,s,u,c,d,f,p){if(e.timeoutHandle=-1,8192&(d=t.subtreeFlags)||0x1002000==(0x1002000&d)){lP(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&&u9(h,h.stylesheets),g=0<h.count||0<h.imgCount?function(e){var t=setTimeout(function(){if(h.stylesheets&&u9(h,h.stylesheets),h.unsuspend){var e=h.unsuspend;h.unsuspend=null,e()}},6e4+m);0<h.imgBytes&&0===u5&&(u5=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&&up(i)){for(i=0,l=a.responseEnd,r+=1;r<n.length;r++){var s=n[r],u=s.startTime;if(u>l)break;var c=s.transferSize,d=s.initiatorType;c&&up(d)&&(i+=c*((s=s.responseEnd)<l?1:(l-u)/(s-u)))}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&&u9(h,h.stylesheets),h.unsuspend)){var e=h.unsuspend;h.unsuspend=null,e()}},(h.imgBytes>u5?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,c,d,null,f,p)),sc(e,o,i,!u);return}}sO(e,t,o,n,r,a,i,l,s)}function sc(e,t,n,r){t&=~lJ,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)||(sW(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,uk(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),lV=!1,lQ=lG=lJ=lZ=lq=lW=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 lK=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&&(lW=1,im(e,rc(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(){lW=4,lH||(4194048&lF)!==lF&&null!==aD.current||(lB=!0),0==(0x7ffffff&lq)&&0==(0x7ffffff&lZ)||null===lM||sc(lM,lF,lG,!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=lW;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 u=l$;if(l$=0,lU=null,sk(e,l,s,u),n&&lB){i=0;break e}break;default:u=l$,l$=0,lU=null,sk(e,l,s,u)}}(function(){for(;null!==lD;)sx(lD)})(),i=lW;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,lK);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,lK),lK)}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)&&rK(t,n,a,!0),null!==(n=aD.current)){switch(n.tag){case 31:case 13:return null===aF?sv():null===n.alternate&&0===lW&&(lW=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(rc(e=Error(l(422),{cause:r}),n))):(r!==r_&&rM(rc(t=Error(l(423),{cause:r}),n)),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=rc(r,n),a=iy(e.stateNode,r,a),aN(e,a),4!==lW&&(lW=2)),!1;var o=Error(l(520),{cause:r});if(o=rc(o,n),null===lY?lY=[o]:lY.push(o),4!==lW&&(lW=2),null===t)return!0;r=rc(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)){lW=1,im(e,rc(n,e.current)),lD=null;return}}catch(t){if(null!==a)throw lD=a,t;lW=1,im(e,rc(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),K(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(null===e||null===e.child)&&(rR(t)?iJ(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?(iJ(t),null!==o?(i0(t),iQ(t,o)):(i0(t),iG(t,a,null,r,n))):o?o!==e.memoizedState?(iJ(t),i0(t),iQ(t,o)):(i0(t),t.flags&=-0x1000001):((e=e.memoizedProps)!==r&&iJ(t),i0(t),iG(t,a,e,r,n)),null;case 27:if(q(t),n=H.current,a=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==r&&iJ(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=uM(a,r,n),iJ(t))}return i0(t),null;case 5:if(q(t),a=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==r&&iJ(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=ug(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,uf(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&&iJ(t)}}return i0(t),iG(t,t.type,null===e?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&iJ(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||uu(e.nodeValue,n)))||rz(t,!0)}else(e=ug(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 aV(t),t;return aV(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 aV(t),t;return aV(t),null}}if(aV(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 K(),null===e&&s7(t.stateNode.containerInfo),i0(t),null;case 10:return rH(t.type),i0(t),null;case 19:if(D(aK),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!==lW||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(o=aW(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(aK,1&aK.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=aW(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=aK.current,F(aK,a?1&n|2:1&n),rN&&rx(t,r.treeForkCount),e;return i0(t),null;case 22:case 23:return aV(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,lK);if(null!==n){lD=n;return}if(null!==(t=t.sibling)){lD=t;return}lD=t=e}while(null!==t);0===lW&&(lW=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),K(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return q(t),null;case 31:if(null!==t.memoizedState){if(aV(t),null===t.alternate)throw Error(l(340));rL()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 13:if(aV(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(aK),null;case 4:return K(),null;case 10:return rH(t.type),null;case 22:case 23:return aV(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);lW=6,lD=null}function sO(e,t,n,r,a,o,i,s,u){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,u=e.hiddenUpdates;for(n=i&~n;0<n;){var c=31-em(n),d=1<<c;l[c]=0,s[c]=-1;var f=u[c];if(null!==f)for(u[c]=null,c=0;c<f.length;c++){var p=f[c];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,u),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,uh=cl,n_(e=nP(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,u=-1,c=-1,d=0,f=0,p=e,h=null;t:for(;;){for(;p!==n||0!==o&&3!==p.nodeType||(u=s+o),p!==i||0!==r&&3!==p.nodeType||(c=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&&(u=s),h===i&&++f===r&&(c=s),null!==(a=p.nextSibling))break;h=(p=h).parentNode}p=a}n=-1===u||-1===c?null:{start:u,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(um={focusedElem:e,selectionRange:n},cl=!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=ic(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))uP(e);else if(1===n)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":uP(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(),sE()}}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=um,i=nP(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 u=s.start,c=s.end;if(void 0===c&&(c=u),"selectionStart"in l)l.selectionStart=u,l.selectionEnd=Math.min(c,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=nE(l,m),v=nE(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}}cl=!!uh,um=uh=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{lu(e,t.alternate,t)}finally{lI=a,A.p=r,T.T=n}}l6=3}}function sE(){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,sP(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_(),sK(e),a=e.pendingLanes,0!=(261930&n)&&0!=(42&a)?e===sa?sr++:(sr=0,sa=e):sr=0,sW(0,!1)}}function sP(e,t){0==(e.pooledCacheLanes&=t)&&null!=(t=e.pooledCache)&&(e.pooledCache=null,r2(t))}function s_(){return sC(),sN(),sE(),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,sW(0,!1),ep&&"function"==typeof ep.onPostCommitFiberRoot)try{ep.onPostCommitFiberRoot(ef,o)}catch(e){}return!0}finally{A.p=a,T.T=r,sP(e,t)}}function sT(e,t,n){t=rc(n,t),t=iy(e.stateNode,t,2),null!==(e=aO(e,t,2))&&(eC(e,2),sK(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=rc(n,e),null!==(r=aO(t,n=iv(2),2))&&(ib(n,r,t,e),eC(r,2),sK(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)||(lV=!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===lW||3===lW&&(0x3c00000&lF)===lF&&300>er()-l1?0==(2&lI)&&sp(e,0):lJ|=n,lQ===lF&&(lQ=0)),sK(e)}function sI(e,t){0===t&&(t=eS()),null!==(e=n5(e,t))&&(eC(e,t),sK(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,sV=0;function sK(e){e!==s$&&null===e.next&&(null===s$?sF=s$=e:s$=s$.next=e),sH=!0,sU||(sU=!0,uS(function(){0!=(6&lI)?X(eo,sq):sZ()}))}function sW(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 sq(){sZ()}function sZ(){sH=sU=!1;var e,t=0;0===sV||((e=window.event)&&"popstate"===e.type?e===ux||(ux=e,0):(ux=null,1))||(t=sV);for(var n=er(),r=null,a=sF;null!==a;){var o=a.next,i=sJ(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||sW(t,!1),0!==sV&&(sV=0)}function sJ(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=eu}return n=X(n,r=sG.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 sG(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),sJ(e,er()),null!=e.callbackNode&&e.callbackNode===n?sG.bind(null,e):null)}function sQ(e,t){if(s_())return null;ss(e,t,!0)}function sY(){if(0===sV){var e=r5;0===e&&(e=ev,0==(261888&(ev<<=1))&&(ev=256)),sV=e}return sV}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<nG.length;s1++){var s2=nG[s1];nQ(s2.toLowerCase(),"on"+(s2[0].toUpperCase()+s2.slice(1)))}nQ(nH,"onAnimationEnd"),nQ(nB,"onAnimationIteration"),nQ(nV,"onAnimationStart"),nQ("dblclick","onDoubleClick"),nQ("focusin","onFocus"),nQ("focusout","onBlur"),nQ(nK,"onTransitionRun"),nQ(nW,"onTransitionStart"),nQ(nq,"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,u=l.currentTarget;if(l=l.listener,s!==o&&a.isPropagationStopped())break e;o=l,a.currentTarget=u;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,u=l.currentTarget,l=l.listener,s!==o&&a.isPropagationStopped())break e;o=l,a.currentTarget=u;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)||(ue(t,e,2,!1),n.add(r))}function s8(e,t,n){var r=0;t&&(r|=4),ue(n,e,r,t)}var s9="_reactListening"+Math.random().toString(36).slice(2);function s7(e){if(!e[s9]){e[s9]=!0,eJ.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 ue(e,t,n,r){switch(ch(t)){case 2:var a=cs;break;case 8:a=cu;break;default:a=cc}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 ut(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 u=i.tag;if((3===u||4===u)&&i.stateNode.containerInfo===a)return;i=i.return}for(;null!==l;){if(null===(i=eV(l)))return;if(5===(u=i.tag)||6===u||26===u||27===u){r=o=i;continue e}l=l.parentNode}}r=r.return}tj(function(){var r=o,a=tv(n),i=[];e:{var l=nJ.get(e);if(void 0!==l){var u=tH,c=e;switch(e){case"keypress":if(0===tT(n))break e;case"keydown":case"keyup":u=t4;break;case"focusin":c="focus",u=tZ;break;case"focusout":c="blur",u=tZ;break;case"beforeblur":case"afterblur":u=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":u=tW;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=tq;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=t5;break;case nH:case nB:case nV:u=tJ;break;case nZ:u=t6;break;case"scroll":case"scrollend":u=tV;break;case"wheel":u=t8;break;case"copy":case"cut":case"paste":u=tG;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=t3;break;case"toggle":case"beforetoggle":u=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(un(m,g,h)),f)break;m=m.return}0<d.length&&(l=new u(l,c,null,n,a),i.push({event:l,listeners:d}))}}if(0==(7&t)){if((l="mouseover"===e||"pointerover"===e,u="mouseout"===e||"pointerout"===e,!(l&&n!==ty&&(c=n.relatedTarget||n.fromElement)&&(eV(c)||c[eM])))&&(u||l)&&(l=a.window===a?a:(l=a.ownerDocument)?l.defaultView||l.parentWindow:window,u?(c=n.relatedTarget||n.toElement,u=r,null!==(c=c?eV(c):null)&&(f=s(c),d=c.tag,c!==f||5!==d&&27!==d&&6!==d)&&(c=null)):(u=null,c=r),u!==c)){if(d=tW,g="onMouseLeave",p="onMouseEnter",m="mouse",("pointerout"===e||"pointerover"===e)&&(d=t3,g="onPointerLeave",p="onPointerEnter",m="pointer"),f=null==u?l:eW(u),h=null==c?l:eW(c),(l=new d(g,m+"leave",u,n,a)).target=f,l.relatedTarget=h,g=null,eV(a)===r&&((d=new d(p,m+"enter",c,n,a)).target=h,d.relatedTarget=f,g=d),f=g,u&&c)t:{for(d=ua,p=u,m=c,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!==u&&uo(i,l,u,d,!1),null!==c&&null!==f&&uo(i,f,c,d,!0)}e:{if("select"===(u=(l=r?eW(r):window).nodeName&&l.nodeName.toLowerCase())||"input"===u&&"file"===l.type)var b=nm;else if(nu(l))if(ng)b=nS;else{b=nk;var x=nw}else(u=l.nodeName)&&"input"===u.toLowerCase()&&("checkbox"===l.type||"radio"===l.type)?b=nj:r&&tf(r.elementType)&&(b=nm);if(b&&(b=b(e,r))){nc(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?eW(r):window,e){case"focusin":(nu(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()):(tP="value"in(tE=a)?tE.value:tE.textContent,nl=!0)),0<(x=ur(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_=tP=tE=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=ur(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!==sV){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 un(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ur(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(un(e,a,o)),null!=(a=tS(e,t))&&r.push(un(e,a,o))),3===e.tag)return r;e=e.return}return[]}function ua(e){if(null===e)return null;do e=e.return;while(e&&5!==e.tag&&27!==e.tag);return e||null}function uo(e,t,n,r,a){for(var o=t._reactName,i=[];null!==n&&n!==r;){var l=n,s=l.alternate,u=l.stateNode;if(l=l.tag,null!==s&&s===r)break;5!==l&&26!==l&&27!==l||null===u||(s=u,a?null!=(u=tS(n,o))&&i.unshift(un(n,u,s)):a||null!=(u=tS(n,o))&&i.push(un(n,u,s))),n=n.return}0!==i.length&&e.push({event:t,listeners:i})}var ui=/\r\n?/g,ul=/\u0000|\uFFFD/g;function us(e){return("string"==typeof e?e:""+e).replace(ui,"\n").replace(ul,"")}function uu(e,t){return t=us(t),us(e)===t}function uc(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&&uc(e,t,"name",a.name,a,null),uc(e,t,"formEncType",a.formEncType,a,null),uc(e,t,"formMethod",a.formMethod,a,null),uc(e,t,"formTarget",a.formTarget,a,null)):(uc(e,t,"encType",a.encType,a,null),uc(e,t,"method",a.method,a,null),uc(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 ud(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(!eG.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 uf(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:uc(e,t,r,i,n,null)}}o&&uc(e,t,"srcSet",n.srcSet,n,null),a&&uc(e,t,"src",n.src,n,null);return;case"input":s6("invalid",e);var s=r=i=o=null,u=null,c=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":u=d;break;case"defaultChecked":c=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:uc(e,t,a,d,n,null)}}tr(e,r,s,u,c,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:uc(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:uc(e,t,i,s,n,null)}tl(e,a,o,r);return;case"option":for(u in n)n.hasOwnProperty(u)&&null!=(a=n[u])&&("selected"===u?e.selected=a&&"function"!=typeof a&&"symbol"!=typeof a:uc(e,t,u,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(c in n)if(n.hasOwnProperty(c)&&null!=(a=n[c]))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,t));default:uc(e,t,c,a,n,null)}return;default:if(tf(t)){for(d in n)n.hasOwnProperty(d)&&void 0!==(a=n[d])&&ud(e,t,d,a,n,void 0);return}}for(s in n)n.hasOwnProperty(s)&&null!=(a=n[s])&&uc(e,t,s,a,n,null)}function up(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}var uh=null,um=null;function ug(e){return 9===e.nodeType?e:e.ownerDocument}function uy(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 uv(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 ub(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 ux=null,uw="function"==typeof setTimeout?setTimeout:void 0,uk="function"==typeof clearTimeout?clearTimeout:void 0,uj="function"==typeof Promise?Promise:void 0,uS="function"==typeof queueMicrotask?queueMicrotask:void 0!==uj?function(e){return uj.resolve(null).then(e).catch(uO)}:uw;function uO(e){setTimeout(function(){throw e})}function uC(e){return"head"===e}function uN(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),cT(t);return}r--}else if("$"===n||"$?"===n||"$~"===n||"$!"===n||"&"===n)r++;else if("html"===n)uD(e.ownerDocument.documentElement);else if("head"===n){uD(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&&uD(e.ownerDocument.body);n=a}while(n);cT(t)}function uE(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 uP(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":uP(n),eB(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if("stylesheet"===n.rel.toLowerCase())continue}e.removeChild(n)}}function u_(e,t){for(;8!==e.nodeType;)if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!t||null===(e=uA(e.nextSibling)))return null;return e}function uz(e){return"$?"===e.data||"$~"===e.data}function uT(e){return"$!"===e.data||"$?"===e.data&&"loading"!==e.ownerDocument.readyState}function uA(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 uR=null;function uL(e){e=e.nextSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n||"/&"===n){if(0===t)return uA(e.nextSibling);t--}else"$"!==n&&"$!"!==n&&"$?"!==n&&"$~"!==n&&"&"!==n||t++}e=e.nextSibling}return null}function uI(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 uM(e,t,n){switch(t=ug(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 uD(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);eB(e)}var uF=new Map,u$=new Set;function uU(e){return"function"==typeof e.getRootNode?e.getRootNode():9===e.nodeType?e:e.ownerDocument}var uH=A.d;A.d={f:function(){var e=uH.f(),t=sd();return e||t},r:function(e){var t=eK(e);null!==t&&5===t.tag&&"form"===t.type?oX(t):uH.r(e)},D:function(e){uH.D(e),uV("dns-prefetch",e,null)},C:function(e,t){uH.C(e,t),uV("preconnect",e,t)},L:function(e,t,n){if(uH.L(e,t,n),uB&&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=uW(e);break;case"script":a=uJ(e)}uF.has(a)||(e=f({rel:"preload",href:"image"===t&&n&&n.imageSrcSet?void 0:e,as:t},n),uF.set(a,e),null!==uB.querySelector(r)||"style"===t&&uB.querySelector(uq(a))||"script"===t&&uB.querySelector(uG(a))||(uf(t=uB.createElement("link"),"link",e),eZ(t),uB.head.appendChild(t)))}},m:function(e,t){if(uH.m(e,t),uB&&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=uJ(e)}if(!uF.has(a)&&(e=f({rel:"modulepreload",href:e},t),uF.set(a,e),null===uB.querySelector(r))){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(uB.querySelector(uG(a)))return}uf(n=uB.createElement("link"),"link",e),eZ(n),uB.head.appendChild(n)}}},X:function(e,t){if(uH.X(e,t),uB&&e){var n=eq(uB).hoistableScripts,r=uJ(e),a=n.get(r);a||((a=uB.querySelector(uG(r)))||(e=f({src:e,async:!0},t),(t=uF.get(r))&&u0(e,t),eZ(a=uB.createElement("script")),uf(a,"link",e),uB.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},n.set(r,a))}},S:function(e,t,n){if(uH.S(e,t,n),uB&&e){var r=eq(uB).hoistableStyles,a=uW(e);t=t||"default";var o=r.get(a);if(!o){var i={loading:0,preload:null};if(o=uB.querySelector(uq(a)))i.loading=5;else{e=f({rel:"stylesheet",href:e,"data-precedence":t},n),(n=uF.get(a))&&uX(e,n);var l=o=uB.createElement("link");eZ(l),uf(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,uY(o,t,uB)}o={type:"stylesheet",instance:o,count:1,state:i},r.set(a,o)}}},M:function(e,t){if(uH.M(e,t),uB&&e){var n=eq(uB).hoistableScripts,r=uJ(e),a=n.get(r);a||((a=uB.querySelector(uG(r)))||(e=f({src:e,async:!0,type:"module"},t),(t=uF.get(r))&&u0(e,t),eZ(a=uB.createElement("script")),uf(a,"link",e),uB.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},n.set(r,a))}}};var uB="u"<typeof document?null:document;function uV(e,t,n){if(uB&&"string"==typeof t&&t){var r=tt(t);r='link[rel="'+e+'"][href="'+r+'"]',"string"==typeof n&&(r+='[crossorigin="'+n+'"]'),u$.has(r)||(u$.add(r),e={rel:e,crossOrigin:n,href:t},null===uB.querySelector(r)&&(uf(t=uB.createElement("link"),"link",e),eZ(t),uB.head.appendChild(t)))}}function uK(e,t,n,r){var a=(a=H.current)?uU(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=uW(n.href),(r=(n=eq(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=uW(n.href);var o,i,s,u,c=eq(a).hoistableStyles,d=c.get(e);if(d||(a=a.ownerDocument||a,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,d),(c=a.querySelector(uq(e)))&&!c._p&&(d.instance=c,d.state.loading=5),uF.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},uF.set(e,n),c||(o=a,i=e,s=n,u=d.state,o.querySelector('link[rel="preload"][as="style"]['+i+"]")?u.loading=1:(u.preload=i=o.createElement("link"),i.addEventListener("load",function(){return u.loading|=1}),i.addEventListener("error",function(){return u.loading|=2}),uf(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=uJ(n),(r=(n=eq(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 uW(e){return'href="'+tt(e)+'"'}function uq(e){return'link[rel="stylesheet"]['+e+"]"}function uZ(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function uJ(e){return'[src="'+tt(e)+'"]'}function uG(e){return"script[async]"+e}function uQ(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")),uf(r,"style",a),uY(r,n.precedence,e),t.instance=r;case"stylesheet":a=uW(n.href);var o=e.querySelector(uq(a));if(o)return t.state.loading|=4,t.instance=o,eZ(o),o;r=uZ(n),(a=uF.get(a))&&uX(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}),uf(o,"link",r),t.state.loading|=4,uY(o,n.precedence,e),t.instance=o;case"script":if(o=uJ(n.src),a=e.querySelector(uG(o)))return t.instance=a,eZ(a),a;return r=n,(a=uF.get(o))&&u0(r=f({},n),a),eZ(a=(e=e.ownerDocument||e).createElement("script")),uf(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,uY(r,n.precedence,e)),t.instance}function uY(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 uX(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.title&&(e.title=t.title)}function u0(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.integrity&&(e.integrity=t.integrity)}var u1=null;function u2(e,t,n){if(null===u1){var r=new Map,a=u1=new Map;a.set(n,r)}else(r=(a=u1).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 u4(e,t,n){(e=e.ownerDocument||e).head.insertBefore(n,"title"===t?e.querySelector("head > title"):null)}function u3(e){return"stylesheet"!==e.type||0!=(3&e.state.loading)}var u5=0;function u6(){if(this.count--,0===this.count&&(0===this.imgCount||!this.waitingForImages)){if(this.stylesheets)u9(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var u8=null;function u9(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,u8=new Map,t.forEach(u7,e),u8=null,u6.call(e))}function u7(e,t){if(!(4&t.state.loading)){var n=u8.get(e);if(n)var r=n.get(null);else{n=new Map,u8.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=u6.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 ce={$$typeof:x,Provider:null,Consumer:null,_currentValue:R,_currentValue2:R,_threadCount:0};function ct(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 cn(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 cr(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function ca(e,t){cr(e,t),(e=e.alternate)&&cr(e,t)}function co(e){if(13===e.tag||31===e.tag){var t=n5(e,0x4000000);null!==t&&sl(t,e,0x4000000),ca(e,0x4000000)}}function ci(e){if(13===e.tag||31===e.tag){var t=so(),n=n5(e,t=e_(t));null!==n&&sl(n,e,t),ca(e,t)}}var cl=!0;function cs(e,t,n,r){var a=T.T;T.T=null;var o=A.p;try{A.p=2,cc(e,t,n,r)}finally{A.p=o,T.T=a}}function cu(e,t,n,r){var a=T.T;T.T=null;var o=A.p;try{A.p=8,cc(e,t,n,r)}finally{A.p=o,T.T=a}}function cc(e,t,n,r){if(cl){var a=cd(r);if(null===a)ut(e,t,r,cf,n),cj(e,r);else if(function(e,t,n,r,a){switch(t){case"focusin":return cg=cS(cg,e,t,n,r,a),!0;case"dragenter":return cy=cS(cy,e,t,n,r,a),!0;case"mouseover":return cv=cS(cv,e,t,n,r,a),!0;case"pointerover":var o=a.pointerId;return cb.set(o,cS(cb.get(o)||null,e,t,n,r,a)),!0;case"gotpointercapture":return o=a.pointerId,cx.set(o,cS(cx.get(o)||null,e,t,n,r,a)),!0}return!1}(a,e,t,n,r))r.stopPropagation();else if(cj(e,r),4&t&&-1<ck.indexOf(e)){for(;null!==a;){var o=eK(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}sK(o),0==(6&lI)&&(l4=er()+500,sW(0,!1))}}break;case 31:case 13:null!==(l=n5(o,2))&&sl(l,o,2),sd(),ca(o,2)}if(null===(o=cd(r))&&ut(e,t,r,cf,n),o===a)break;a=o}null!==a&&r.stopPropagation()}else ut(e,t,r,null,n)}}function cd(e){return cp(e=tv(e))}var cf=null;function cp(e){if(cf=null,null!==(e=eV(e))){var t=s(e);if(null===t)e=null;else{var n=t.tag;if(13===n){if(null!==(e=u(t)))return e;e=null}else if(31===n){if(null!==(e=c(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 cf=e,null}function ch(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"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 eu:return 0x10000000;default:return 32}default:return 32}}var cm=!1,cg=null,cy=null,cv=null,cb=new Map,cx=new Map,cw=[],ck="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 cj(e,t){switch(e){case"focusin":case"focusout":cg=null;break;case"dragenter":case"dragleave":cy=null;break;case"mouseover":case"mouseout":cv=null;break;case"pointerover":case"pointerout":cb.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":cx.delete(t.pointerId)}}function cS(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=eK(t))&&co(t)):(e.eventSystemFlags|=r,t=e.targetContainers,null!==a&&-1===t.indexOf(a)&&t.push(a)),e}function cO(e){var t=eV(e.target);if(null!==t){var n=s(t);if(null!==n){if(13===(t=n.tag)){if(null!==(t=u(n))){e.blockedOn=t,eA(e.priority,function(){ci(n)});return}}else if(31===t){if(null!==(t=c(n))){e.blockedOn=t,eA(e.priority,function(){ci(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 cC(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=cd(e.nativeEvent);if(null!==n)return null!==(t=eK(n))&&co(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 cN(e,t,n){cC(e)&&n.delete(t)}function cE(){cm=!1,null!==cg&&cC(cg)&&(cg=null),null!==cy&&cC(cy)&&(cy=null),null!==cv&&cC(cv)&&(cv=null),cb.forEach(cN),cx.forEach(cN)}function cP(e,t){e.blockedOn===t&&(e.blockedOn=null,cm||(cm=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,cE)))}var c_=null;function cz(e){c_!==e&&(c_=e,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){c_===e&&(c_=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===cp(r||n))continue;else break;var o=eK(n);null!==o&&(e.splice(t,3),t-=3,oQ(o,{pending:!0,data:a,method:n.method,action:r},r,a))}}))}function cT(e){function t(t){return cP(t,e)}null!==cg&&cP(cg,e),null!==cy&&cP(cy,e),null!==cv&&cP(cv,e),cb.forEach(t),cx.forEach(t);for(var n=0;n<cw.length;n++){var r=cw[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<cw.length&&null===(n=cw[0]).blockedOn;)cO(n),null===n.blockedOn&&cw.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||cz(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!==cp(a))continue}else l=i.action;"function"==typeof l?n[r+1]=l:(n.splice(r,3),r-=3),cz(n)}}}function cA(){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 cR(e){this._internalRoot=e}function cL(e){this._internalRoot=e}cL.prototype.render=cR.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(l(409));cn(t.current,so(),e,t,null,null)},cL.prototype.unmount=cR.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;cn(e.current,2,null,e,null,null),sd(),t[eM]=null}},cL.prototype.unstable_scheduleHydration=function(e){if(e){var t=eT();e={blockedOn:null,target:e,priority:t};for(var n=0;n<cw.length&&0!==t&&t<cw[n].priority;n++);cw.splice(n,0,e),0===n&&cO(e)}};var cI=o.version;if("19.2.8"!==cI)throw Error(l(527,cI,"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,u=a.child;u;){if(u===n){i=!0,n=a,r=o;break}if(u===r){i=!0,r=a,n=o;break}u=u.sibling}if(!i){for(u=o.child;u;){if(u===n){i=!0,n=o,r=a;break}if(u===r){i=!0,r=o,n=a;break}u=u.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 cM=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!cM.isDisabled&&cM.supportsFiber)try{ef=cM.inject({bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:T,reconcilerVersion:"19.2.8"}),ep=cM}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,u="",c=id,d=ip,f=ih;return null!=t&&(!0===t.unstable_strictMode&&(s=!0),void 0!==t.identifierPrefix&&(u=t.identifierPrefix),void 0!==t.onUncaughtError&&(c=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 ct(r,a,o,u,c,d,f,cA,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 cR(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 u(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=u(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=u(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=u(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=u(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"),u=Symbol.for("react.forward_ref"),c=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 E=/\/+/g;function P(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,u,c,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?"."+P(t,0):i,k(l)?(o="",null!=p&&(o=p.replace(E,"$&/")+"/"),e(l,a,o,"",function(e){return e})):null!=l&&(N(l)&&(s=l,u=o+(null==l.key||t&&t.key===l.key?"":(""+l.key).replace(E,"$&/")+"/")+p,l=C(s.type,u,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+P(i=t[g],g),p+=e(i,a,o,d,l);else if("function"==typeof(g=null===(c=t)||"object"!=typeof c?null:"function"==typeof(c=h&&c[h]||c["@@iterator"])?c:null))for(t=g.call(t),g=0;!(i=t.next()).done;)d=m+P(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=c,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:u,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],u=l+1,c=e[u];if(0>o(s,n))u<a&&0>o(c,s)?(e[r]=c,e[u]=n,r=u):(e[r]=s,e[l]=n,r=l);else if(u<a&&0>o(c,n))e[r]=c,e[u]=n,r=u;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,u=s.now();t.unstable_now=function(){return s.now()-u}}var c=[],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(c,t);else break;t=r(d)}}function j(e){if(y=!1,k(e),!g)if(null!==r(c))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 E(){return!!v||!(t.unstable_now()-N<C)}function P(){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(c);null!==p&&!(p.expirationTime>e&&E());){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(c)&&a(c),k(e)}else a(c);p=r(c)}if(null!==p)n=!0;else{var u=r(d);null!==u&&T(j,u.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(P)};else if("u">typeof MessageChannel){var _=new MessageChannel,z=_.port2;_.port1.onmessage=P,i=function(){z.postMessage(null)}}else i=function(){b(P,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(c)&&e===r(d)&&(y?(x(O),O=-1):y=!0,T(j,o-l))):(e.sortIndex=s,n(c,e),g||m||(g=!0,S||(S=!0,i()))),e},t.unstable_shouldYield=E,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 u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!a(e,n)}catch(e){return!0}}var c="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,c=r[1];return l(function(){a.value=n,a.getSnapshot=t,u(a)&&c({inst:a})},[e,n,t]),i(function(){return u(a)&&c({inst:a}),e(function(){u(a)&&c({inst:a})})},[e]),s(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},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,u=e=>e&&e.includes("###")?e.replace(s,"."):e,c=e=>!e||o(e),d=(e,t,n)=>{let r=o(t)?t.split("."):t,a=0;for(;a<r.length-1;){if(c(e))return{};let t=u(r[a]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++a}return c(e)?{}:{obj:e,k:u(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={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},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 E(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 P=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=P(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=E(e,{...this.options,...r})),Array.isArray(e)||(e=[String(e)]),e=e.map(e=>"function"==typeof e?E(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),u=s[s.length-1],c=void 0!==r.nsSeparator?r.nsSeparator:this.options.nsSeparator;void 0===c&&(c=":");let d=r.lng||this.language,f=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()==="cimode")return f?a?{res:`${u}${c}${l}`,usedKey:l,exactUsedKey:l,usedLng:d,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:`${u}${c}${l}`:a?{res:l,usedKey:l,exactUsedKey:l,usedLng:d,usedNS:u,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=P(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:P(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,u,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,u,t,a,s,r):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,u,t,a,s,r),this.emit("missingKey",e,u,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=`${u}${c}${l}`),(a||t)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${c}${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?E(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),u=s.key;r=u;let c=s.namespaces;this.options.fallbackNS&&(c=c.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);c.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=[u];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(l,u,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(u+e.replace(a,this.options.pluralSeparator)),l.push(u+e),f&&l.push(u+n)),p){let r=`${u}${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 u=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),c=[],d=e=>{e&&(this.isSupportedCode(e)?c.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)),u.forEach(e=>{c.includes(e)||d(this.formatLanguageCode(e))}),null!==s)?(this.resolveHierarchyCache[s]=c,c.slice()):c}}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:u,unescapePrefix:c,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=u?"":c?c.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):"-",this.unescapeSuffix=this.unescapePrefix?"":u?u.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,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(!e.includes(this.formatSeparator)){let a=L(t,u,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,u,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=c(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 u=t.safeValue(i);if(e=e.replace(a[0],I(u)),f?(t.regex.lastIndex+=u.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 u=[];(i=(i={...n}).replace&&!o(i.replace)?i.replace:i).applyPostProcessor=!1,delete i.defaultValue;let c=/{.*}/s.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(-1!==c&&(u=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),(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=""),u.length&&(a=u.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),V=()=>{};class K 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=V),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=V){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=V),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 u={...this.options,...o};Array.isArray(a)&&!s&&(u.ns=a),"function"==typeof o.keyPrefix&&(o.keyPrefix=E(o.keyPrefix,u));let c=this.options.keySeparator||".";return o.keyPrefix&&Array.isArray(e)?l=e.map(e=>("function"==typeof e&&(e=E(e,u)),`${o.keyPrefix}${c}${e}`)):("function"==typeof e&&(e=E(e,u)),l=o.keyPrefix?`${o.keyPrefix}${c}${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 K(e,t);return n.createInstance=K.createInstance,n}cloneInstance(e={},t=V){let n=e.forkResourceStore;n&&delete e.forkResourceStore;let r={...this.options,...e,isClone:!0},a=new K(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 W=K.createInstance();W.createInstance,W.dir,W.init,W.loadResources,W.reloadResources,W.use,W.changeLanguage,W.getFixedT,W.t,W.exists,W.setDefaultNamespace,W.hasLoadedNamespace,W.loadNamespaces,W.loadLanguages;var q=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,J={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"\xa9","©":"\xa9","®":"\xae","®":"\xae","…":"…","…":"…","/":"/","/":"/"},G=e=>J[e],Q={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(Z,G),transDefaultProps:void 0},Y=(0,q.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={" ":"\xa0","&":"&","<":"<",">":">",""":'"',"'":"'","©":"\xa9","®":"\xae","™":"™","…":"…","–":"–","—":"—","‘":"‘","’":"’","‚":"‚","“":"“","”":"”","„":"„","†":"†","‡":"‡","•":"•","′":"′","″":"″","‹":"‹","›":"›","§":"\xa7","¶":"\xb6","·":"\xb7"," ":" "," ":" "," ":" ","€":"€","£":"\xa3","¥":"\xa5","¢":"\xa2","¤":"\xa4","×":"\xd7","÷":"\xf7","−":"−","±":"\xb1","≠":"≠","≤":"≤","≥":"≥","≈":"≈","≡":"≡","∞":"∞","∫":"∫","∑":"∑","∏":"∏","√":"√","∂":"∂","‰":"‰","°":"\xb0","µ":"\xb5","←":"←","↑":"↑","→":"→","↓":"↓","↔":"↔","↵":"↵","⇐":"⇐","⇑":"⇑","⇒":"⇒","⇓":"⇓","⇔":"⇔","α":"α","β":"β","γ":"γ","δ":"δ","ε":"ε","ζ":"ζ","η":"η","θ":"θ","ι":"ι","κ":"κ","λ":"λ","μ":"μ","ν":"ν","ξ":"ξ","ο":"ο","π":"π","ρ":"ρ","σ":"σ","τ":"τ","υ":"υ","φ":"φ","χ":"χ","ψ":"ψ","ω":"ω","Α":"Α","Β":"Β","Γ":"Γ","Δ":"Δ","Ε":"Ε","Ζ":"Ζ","Η":"Η","Θ":"Θ","Ι":"Ι","Κ":"Κ","Λ":"Λ","Μ":"Μ","Ν":"Ν","Ξ":"Ξ","Ο":"Ο","Π":"Π","Ρ":"Ρ","Σ":"Σ","Τ":"Τ","Υ":"Υ","Φ":"Φ","Χ":"Χ","Ψ":"Ψ","Ω":"Ω","À":"\xc0","Á":"\xc1","Â":"\xc2","Ã":"\xc3","Ä":"\xc4","Å":"\xc5","Æ":"\xc6","Ç":"\xc7","È":"\xc8","É":"\xc9","Ê":"\xca","Ë":"\xcb","Ì":"\xcc","Í":"\xcd","Î":"\xce","Ï":"\xcf","Ð":"\xd0","Ñ":"\xd1","Ò":"\xd2","Ó":"\xd3","Ô":"\xd4","Õ":"\xd5","Ö":"\xd6","Ø":"\xd8","Ù":"\xd9","Ú":"\xda","Û":"\xdb","Ü":"\xdc","Ý":"\xdd","Þ":"\xde","ß":"\xdf","à":"\xe0","á":"\xe1","â":"\xe2","ã":"\xe3","ä":"\xe4","å":"\xe5","æ":"\xe6","ç":"\xe7","è":"\xe8","é":"\xe9","ê":"\xea","ë":"\xeb","ì":"\xec","í":"\xed","î":"\xee","ï":"\xef","ð":"\xf0","ñ":"\xf1","ò":"\xf2","ó":"\xf3","ô":"\xf4","õ":"\xf5","ö":"\xf6","ø":"\xf8","ù":"\xf9","ú":"\xfa","û":"\xfb","ü":"\xfc","ý":"\xfd","þ":"\xfe","ÿ":"\xff","¡":"\xa1","¿":"\xbf","ƒ":"ƒ","ˆ":"ˆ","˜":"˜","Œ":"Œ","œ":"œ","Š":"Š","š":"š","Ÿ":"Ÿ","ª":"\xaa","º":"\xba","¯":"\xaf","´":"\xb4","¸":"\xb8","¹":"\xb9","²":"\xb2","³":"\xb3","¼":"\xbc","½":"\xbd","¾":"\xbe","♠":"♠","♣":"♣","♥":"♥","♦":"♦","◊":"◊","‾":"‾","⁄":"⁄","℘":"℘","ℑ":"ℑ","ℜ":"ℜ","ℵ":"ℵ"},es=RegExp(Object.keys(el).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),"g");var eu=n(8139);let ec={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,q.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,q.useMemo)(()=>({...Q,...i?.options?.react,...t}),[i,t]),{useSuspense:s,keyPrefix:u}=l,c=e||o||i?.options?.defaultNS,d=ei(c)?[c]:c||["translation"],f=(0,q.useMemo)(()=>d,d);i?.reportNamespaces?.addUsedNamespaces?.(f);let p=(0,q.useRef)(0),h=(0,q.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,q.useRef)(),g=(0,q.useCallback)(()=>{if(!i)return ec;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===u&&a.revision===r)return a;let o={t:i.getFixedT(n,"fallback"===l.nsMode?f:f[0],u,{scopeNs:f}),ready:e,lng:n,keyPrefix:u,revision:r};return m.current=o,o},[i,f,u,l,t.lng]),[y,v]=(0,q.useState)(0),{t:b,ready:x}=(0,eu.useSyncExternalStore)(h,g,g);(0,q.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,q.useRef)(null),j=(0,q.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,q.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,q.useMemo)(()=>({i18n:e,defaultNS:t}),[e,t]);return(0,q.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","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."}},"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","probeDisabled":"The connectivity probe is off by default in the MVP; no network request was made"}},"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"},"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"}},"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."}},"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)"}}'),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":"导入 / 导出","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":"请检查标红的必填项。"}},"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 文件与激活配置一致","probeDisabled":"连通性探测在 MVP 中默认关闭,未发起网络请求"}},"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}} 不可管理"},"storage":{"unreadable":"无法读取 {{file}}","quarantineFailed":"无法隔离损坏的 {{file}}","corruptQuarantined":"数据存储已损坏,原文件已隔离为 {{quarantine}},请从备份恢复后再继续"}},"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。"}},"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)"}}'),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=W.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,q.useSyncExternalStore)(ek,ej,ej),t=(0,q.useCallback)(function(e){try{localStorage.setItem(eg,e)}catch(e){}ex.changeLanguage(e)},[]);return(0,q.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)}},c={};function d(e){var t=c[e];if(void 0!==t)return t.exports;var n=c[e]={exports:{}};return u[e](n,n.exports,d),n.exports}d.m=u,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:"6b981159",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 u=l[s];if(u.getAttribute("src")==e||u.getAttribute("data-rspack")=="@seaveyon/harness-switch-web:"+r){o=u;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 c=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(c.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=c.bind(null,o.onerror),o.onload=c.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),u=Error(),c=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;u.message="Loading css chunk "+e+" failed.\n("+n+": "+o+")",u.name="ChunkLoadError",u.type=n,u.request=o,i[1](u)}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 u=document.getElementsByTagName("link"),c=0;c<u.length;c++){var f=u[c],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,c,void 0,0):c({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,u,c,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"}]]),E=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"}]]),P=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("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"}]]),z=O("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),T=O("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),A=O("user-round",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]),R=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"}]]),L=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 I=["claude","codex","kimi","pi","dsh"],M={claude:"Claude Code",codex:"Codex",kimi:"Kimi Code",pi:"Pi",dsh:"DeepSeek Harness"};function D(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 F extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class $ extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}(f=globalThis).__zod_globalConfig??(f.__zod_globalConfig={});let U=globalThis.__zod_globalConfig;function H(e){return e&&Object.assign(U,e),U}let B=/^[cC][0-9a-z]{6,}$/,V=/^[0-9a-z]+$/,K=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,W=/^[0-9a-vA-V]{20}$/,q=/^[A-Za-z0-9]{27}$/,Z=/^[a-zA-Z0-9_-]{21}$/,J=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,G=/^([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})$/,Q=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)$/,Y=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,X=/^(?:(?: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])$/,ee=/^(([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}|:))$/,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])\/([0-9]|[1-2][0-9]|3[0-2])$/,en=/^(([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])$/,er=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ea=/^[A-Za-z0-9_-]*$/,eo=/^https?$/,ei=/^\+[1-9]\d{6,14}$/,el="(?:(?:\\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])))",es=RegExp(`^${el}$`);function eu(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 ec=/^-?\d+(?:\.\d+)?$/,ed=/^(?:true|false)$/i,ef=/^[^A-Z]*$/,ep=/^[^a-z]*$/;function eh(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 em(e,t){return"bigint"==typeof t?t.toString():t}function eg(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function ey(e){let t=+!!e.startsWith("^"),n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}let ev=Symbol("evaluating");function eb(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==ev)return void 0===r&&(r=ev,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function ex(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ew(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function ek(e){return JSON.stringify(e)}let ej="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function eS(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let eO=eg(()=>{if(U.jitless||"u">typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch(e){return!1}});function eC(e){if(!1===eS(e))return!1;let t=e.constructor;if(void 0===t||"function"!=typeof t)return!0;let n=t.prototype;return!1!==eS(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function eN(e){return eC(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}let eE=new Set(["string","number","symbol"]);function eP(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function e_(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function ez(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 eT(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 eA(e,t){return t.map(t=>(t.path??(t.path=[]),t.path.unshift(e),t))}function eR(e){return"string"==typeof e?e:e?.message}function eL(e,t,n){let r=e.message?e.message:eR(e.inst?._zod.def?.error?.(e))??eR(t?.error?.(e))??eR(n.customError?.(e))??eR(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 eI(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function eM(...e){let[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}let eD=D("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),eF=D("$ZodCheckMaxLength",(e,t)=>{var n;eD.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=eI(r);n.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),e$=D("$ZodCheckMinLength",(e,t)=>{var n;eD.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=eI(r);n.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),eU=D("$ZodCheckLengthEquals",(e,t)=>{var n;eD.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=eI(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})}}),eH=D("$ZodCheckStringFormat",(e,t)=>{var n,r;eD.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=()=>{})}),eB=D("$ZodCheckRegex",(e,t)=>{eH.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})}}),eV=D("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=ef),eH.init(e,t)}),eK=D("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=ep),eH.init(e,t)}),eW=D("$ZodCheckIncludes",(e,t)=>{eD.init(e,t);let n=eP(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})}}),eq=D("$ZodCheckStartsWith",(e,t)=>{eD.init(e,t);let n=RegExp(`^${eP(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})}}),eZ=D("$ZodCheckEndsWith",(e,t)=>{eD.init(e,t);let n=RegExp(`.*${eP(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})}}),eJ=D("$ZodCheckOverwrite",(e,t)=>{eD.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class eG{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 eQ=(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,em,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},eY=D("$ZodError",eQ),eX=D("$ZodError",eQ,{Parent:Error}),e0=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 F;if(i.issues.length){let t=new(a?.Err??e)(i.issues.map(e=>eL(e,o,H())));throw ej(t,a?.callee),t}return i.value},e1=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=>eL(e,o,H())));throw ej(t,a?.callee),t}return i.value},e2=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 F;return o.issues.length?{success:!1,error:new(e??eY)(o.issues.map(e=>eL(e,a,H())))}:{success:!0,data:o.value}},e4=e2(eX),e3=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=>eL(e,a,H())))}:{success:!0,data:o.value}},e5=e3(eX),e6={major:4,minor:4,patch:3},e8=D("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=e6;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=eT(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 F;if(r||i instanceof Promise)r=(r??Promise.resolve()).then(async()=>{await i,e.issues.length!==t&&(a||(a=eT(e,t)))});else{if(e.issues.length===t)continue;a||(a=eT(e,t))}}return r?r.then(()=>e):e},n=(n,a,o)=>{if(eT(n))return n.aborted=!0,n;let i=t(a,r,o);if(i instanceof Promise){if(!1===o.async)throw new F;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 F;return i.then(e=>t(e,r,o))}return t(i,r,o)}}eb(e,"~standard",()=>({validate:t=>{try{let n=e4(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return e5(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}))}),e9=D("$ZodString",(e,t)=>{var n;let r;e8.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}}),e7=D("$ZodStringFormat",(e,t)=>{eH.init(e,t),e9.init(e,t)}),te=D("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=G),e7.init(e,t)}),tt=D("$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=Q(e))}else t.pattern??(t.pattern=Q());e7.init(e,t)}),tn=D("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Y),e7.init(e,t)}),tr=D("$ZodURL",(e,t)=>{e7.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===eo.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})}}}),ta=D("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),e7.init(e,t)}),to=D("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Z),e7.init(e,t)}),ti=D("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=B),e7.init(e,t)}),tl=D("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=V),e7.init(e,t)}),ts=D("$ZodULID",(e,t)=>{t.pattern??(t.pattern=K),e7.init(e,t)}),tu=D("$ZodXID",(e,t)=>{t.pattern??(t.pattern=W),e7.init(e,t)}),tc=D("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=q),e7.init(e,t)}),td=D("$ZodISODateTime",(e,t)=>{let n,r,a;t.pattern??(n=eu({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(`^${el}T(?:${a})$`)),e7.init(e,t)}),tf=D("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=es),e7.init(e,t)}),tp=D("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=RegExp(`^${eu(t)}$`)),e7.init(e,t)}),th=D("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=J),e7.init(e,t)}),tm=D("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=X),e7.init(e,t),e._zod.bag.format="ipv4"}),tg=D("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=ee),e7.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})}}}),ty=D("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=et),e7.init(e,t)}),tv=D("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=en),e7.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 tb(e){if(""===e)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}let tx=D("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=er),e7.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{tb(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}}),tw=D("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=ea),e7.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{!function(e){if(!ea.test(e))return!1;let t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return tb(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})}}),tk=D("$ZodE164",(e,t)=>{t.pattern??(t.pattern=ei),e7.init(e,t)}),tj=D("$ZodJWT",(e,t)=>{e7.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})}}),tS=D("$ZodBoolean",(e,t)=>{e8.init(e,t),e._zod.pattern=ed,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}}),tO=D("$ZodUnknown",(e,t)=>{e8.init(e,t),e._zod.parse=e=>e}),tC=D("$ZodNever",(e,t)=>{e8.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function tN(e,t,n){e.issues.length&&t.issues.push(...eA(n,e.issues)),t.value[n]=e.value}let tE=D("$ZodArray",(e,t)=>{e8.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=>tN(t,n,e))):tN(l,n,e)}return o.length?Promise.all(o).then(()=>n):n}});function tP(e,t,n,r,a,o){let i=n in r;if(e.issues.length){if(a&&o&&!i)return;t.issues.push(...eA(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 t_(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 tz(e,t,n,r,a,o){let i=[],l=a.keySet,s=a.catchall._zod,u=s.def.type,c="optional"===s.optin,d="optional"===s.optout;for(let a in t){if("__proto__"===a||l.has(a))continue;if("never"===u){i.push(a);continue}let o=s.run({value:t[a],issues:[]},r);o instanceof Promise?e.push(o.then(e=>tP(e,n,a,t,c,d))):tP(o,n,a,t,c,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 tT=D("$ZodObject",(e,t)=>{let n;e8.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=eg(()=>t_(t));eb(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(!eS(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,u=n._zod.run({value:i[e],issues:[]},r);u instanceof Promise?l.push(u.then(n=>tP(n,t,e,i,a,o))):tP(u,t,e,i,a,o)}return o?tz(l,i,t,r,a.value,e):l.length?Promise.all(l).then(()=>t):t}}),tA=D("$ZodObjectJIT",(e,t)=>{let n,r;tT.init(e,t);let a=e._zod.parse,o=eg(()=>t_(t)),i=!U.jitless,l=i&&eO.value,s=t.catchall;e._zod.parse=(u,c)=>{r??(r=o.value);let d=u.value;return eS(d)?i&&l&&c?.async===!1&&!0!==c.jitless?(n||(n=(e=>{let t=new eG(["shape","payload","ctx"]),n=o.value,r=e=>{let t=ek(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=ek(o),l=e[o],s=l?._zod?.optin==="optional",u=l?._zod?.optout==="optional";t.write(`const ${n} = ${r(o)};`),s&&u?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)),u=n(u,c),s)?tz([],d,u,c,r,e):u:a(u,c):(u.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),u)}});function tR(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=>!eT(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=>eL(e,r,H())))}),t)}let tL=D("$ZodUnion",(e,t)=>{e8.init(e,t),eb(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),eb(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),eb(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),eb(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=>ey(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=>tR(t,r,e,a)):tR(i,r,e,a)}}),tI=D("$ZodIntersection",(e,t)=>{e8.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])=>tM(e,t,n)):tM(e,a,o)}});function tM(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}),eT(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(eC(t)&&eC(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 tD=D("$ZodRecord",(e,t)=>{e8.init(e,t),e._zod.parse=(n,r)=>{let a=n.value;if(!eC(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=>eL(e,r,H())),input:l,path:[l],inst:e});continue}let u=i.value,c=t.valueType._zod.run({value:a[l],issues:[]},r);c instanceof Promise?o.push(c.then(e=>{e.issues.length&&n.issues.push(...eA(l,e.issues)),n.value[u]=e.value})):(c.issues.length&&n.issues.push(...eA(l,c.issues)),n.value[u]=c.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&&ec.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=>eL(e,r,H())),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(...eA(i,e.issues)),n.value[l.value]=e.value})):(s.issues.length&&n.issues.push(...eA(i,s.issues)),n.value[l.value]=s.value)}return o.length?Promise.all(o).then(()=>n):n}}),tF=D("$ZodEnum",(e,t)=>{e8.init(e,t);let n=eh(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>eE.has(typeof e)).map(e=>"string"==typeof e?eP(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}}),t$=D("$ZodLiteral",(e,t)=>{if(e8.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?eP(e):e?eP(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}}),tU=D("$ZodTransform",(e,t)=>{e8.init(e,t),e._zod.optin="optional",e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new $(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 F;return n.value=a,n.fallback=!0,n}});function tH(e,t){return void 0===t&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}let tB=D("$ZodOptional",(e,t)=>{e8.init(e,t),e._zod.optin="optional",e._zod.optout="optional",eb(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),eb(e._zod,"pattern",()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${ey(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=>tH(e,r)):tH(a,r)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),tV=D("$ZodExactOptional",(e,t)=>{tB.init(e,t),eb(e._zod,"values",()=>t.innerType._zod.values),eb(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),tK=D("$ZodNullable",(e,t)=>{e8.init(e,t),eb(e._zod,"optin",()=>t.innerType._zod.optin),eb(e._zod,"optout",()=>t.innerType._zod.optout),eb(e._zod,"pattern",()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${ey(e.source)}|null)$`):void 0}),eb(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)}),tW=D("$ZodDefault",(e,t)=>{e8.init(e,t),e._zod.optin="optional",eb(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=>tq(e,t)):tq(r,t)}});function tq(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}let tZ=D("$ZodPrefault",(e,t)=>{e8.init(e,t),e._zod.optin="optional",eb(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))}),tJ=D("$ZodNonOptional",(e,t)=>{e8.init(e,t),eb(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=>tG(t,e)):tG(a,e)}});function tG(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 tQ=D("$ZodCatch",(e,t)=>{e8.init(e,t),e._zod.optin="optional",eb(e._zod,"optout",()=>t.innerType._zod.optout),eb(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=>eL(e,n,H()))},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=>eL(e,n,H()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),tY=D("$ZodPipe",(e,t)=>{e8.init(e,t),eb(e._zod,"values",()=>t.in._zod.values),eb(e._zod,"optin",()=>t.in._zod.optin),eb(e._zod,"optout",()=>t.out._zod.optout),eb(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=>tX(e,t.in,n)):tX(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>tX(e,t.out,n)):tX(r,t.out,n)}});function tX(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 t0=D("$ZodReadonly",(e,t)=>{e8.init(e,t),eb(e._zod,"propValues",()=>t.innerType._zod.propValues),eb(e._zod,"values",()=>t.innerType._zod.values),eb(e._zod,"optin",()=>t.innerType?._zod?.optin),eb(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(t1):t1(r)}});function t1(e){return e.value=Object.freeze(e.value),e}let t2=D("$ZodCustom",(e,t)=>{eD.init(e,t),e8.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=>t4(t,n,r,e));t4(a,n,r,e)}});function t4(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(eM(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 t3=globalThis.__zod_globalRegistry;function t5(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ez(t)})}function t6(e,t){return new eF({check:"max_length",...ez(t),maximum:e})}function t8(e,t){return new e$({check:"min_length",...ez(t),minimum:e})}function t9(e,t){return new eU({check:"length_equals",...ez(t),length:e})}function t7(e){return new eJ({check:"overwrite",tx:e})}function ne(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??t3,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 nt(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),nt(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 nn(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 nr(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:na(t,"input",e.processors),output:na(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(e){throw Error("Error converting schema to JSON.")}}let na=(e,t,n={})=>r=>{let{libraryOptions:a,target:o}=r??{},i=ne({...a??{},target:o,io:t,processors:n});return nt(e,i),nn(i,e),nr(i,e)},no={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},ni=(e,t,n,r)=>{let a=e._zod.def;nt(a.innerType,t,r),t.seen.get(e).ref=a.innerType},nl=D("ZodISODateTime",(e,t)=>{td.init(e,t),n_.init(e,t)}),ns=D("ZodISODate",(e,t)=>{tf.init(e,t),n_.init(e,t)}),nu=D("ZodISOTime",(e,t)=>{tp.init(e,t),n_.init(e,t)}),nc=D("ZodISODuration",(e,t)=>{th.init(e,t),n_.init(e,t)}),nd=D("ZodError",(e,t)=>{eY.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,em,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,em,2)}},isEmpty:{get:()=>0===e.issues.length}})},{Parent:Error}),nf=e0(nd),np=e1(nd),nh=e2(nd),nm=e3(nd),ng=(e,t,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return e0(nd)(e,t,r)},ny=(e,t,n)=>e0(nd)(e,t,n),nv=async(e,t,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return e1(nd)(e,t,r)},nb=async(e,t,n)=>e1(nd)(e,t,n),nx=(e,t,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return e2(nd)(e,t,r)},nw=(e,t,n)=>e2(nd)(e,t,n),nk=async(e,t,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return e3(nd)(e,t,r)},nj=async(e,t,n)=>e3(nd)(e,t,n),nS=new WeakMap;function nO(e,t,n){let r=Object.getPrototypeOf(e),a=nS.get(r);if(a||(a=new Set,nS.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 nC=D("ZodType",(e,t)=>(e8.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:na(e,"input"),output:na(e,"output")}}),e.toJSONSchema=((e,t={})=>n=>{let r=ne({...n,processors:t});return nt(e,r),nn(r,e),nr(r,e)})(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>nf(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>nh(e,t,n),e.parseAsync=async(t,n)=>np(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>nm(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>ng(e,t,n),e.decode=(t,n)=>ny(e,t,n),e.encodeAsync=async(t,n)=>nv(e,t,n),e.decodeAsync=async(t,n)=>nb(e,t,n),e.safeEncode=(t,n)=>nx(e,t,n),e.safeDecode=(t,n)=>nw(e,t,n),e.safeEncodeAsync=async(t,n)=>nk(e,t,n),e.safeDecodeAsync=async(t,n)=>nj(e,t,n),nO(e,"ZodType",{check(...e){let t=this.def;return this.clone(ew(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 e_(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 rg({type:"custom",check:"custom",fn:e,...ez(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(eM(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(eM(e)))},e(t.value,t)),(a=new eD({check:"custom",...ez(t)}))._zod.check=n,r=a}(e,t))},overwrite(e){return this.check(t7(e))},optional(){return ro(this)},exactOptional(){var e;return e=this,new ri({type:"optional",innerType:e})},nullable(){return rs(this)},nullish(){return ro(rs(this))},nonoptional(e){var t;return t=this,new rd({type:"nonoptional",innerType:t,...ez(e)})},array(){return n2(this)},or(e){return new n5({type:"union",options:[this,e],...ez(void 0)})},and(e){var t;return t=this,new n6({type:"intersection",left:t,right:e})},transform(e){return rh(this,new rr({type:"transform",transform:e}))},default(e){var t,n;return t=this,n=e,new ru({type:"default",innerType:t,get defaultValue(){return"function"==typeof n?n():eN(n)}})},prefault(e){var t,n;return t=this,n=e,new rc({type:"prefault",innerType:t,get defaultValue(){return"function"==typeof n?n():eN(n)}})},catch(e){var t,n;return t=this,new rf({type:"catch",innerType:t,catchValue:"function"==typeof(n=e)?n:()=>n})},pipe(e){return rh(this,e)},readonly(){var e;return e=this,new rm({type:"readonly",innerType:e})},describe(e){let t=this.clone();return t3.add(t,{description:e}),t},meta(...e){if(0===e.length)return t3.get(this);let t=this.clone();return t3.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:()=>t3.get(e)?.description,configurable:!0}),e)),nN=D("_ZodString",(e,t)=>{e9.init(e,t),nC.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=no[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,nO(e,"_ZodString",{regex(...e){return this.check(function(e,t){return new eB({check:"string_format",format:"regex",...ez(t),pattern:e})}(...e))},includes(...e){return this.check(function(e,t){return new eW({check:"string_format",format:"includes",...ez(t),includes:e})}(...e))},startsWith(...e){return this.check(function(e,t){return new eq({check:"string_format",format:"starts_with",...ez(t),prefix:e})}(...e))},endsWith(...e){return this.check(function(e,t){return new eZ({check:"string_format",format:"ends_with",...ez(t),suffix:e})}(...e))},min(...e){return this.check(t8(...e))},max(...e){return this.check(t6(...e))},length(...e){return this.check(t9(...e))},nonempty(...e){return this.check(t8(1,...e))},lowercase(e){return this.check(new eV({check:"string_format",format:"lowercase",...ez(e)}))},uppercase(e){return this.check(new eK({check:"string_format",format:"uppercase",...ez(e)}))},trim(){return this.check(t7(e=>e.trim()))},normalize(...e){return this.check(function(e){return t7(t=>t.normalize(e))}(...e))},toLowerCase(){return this.check(t7(e=>e.toLowerCase()))},toUpperCase(){return this.check(t7(e=>e.toUpperCase()))},slugify(){return this.check(t7(e=>e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")))}})}),nE=D("ZodString",(e,t)=>{e9.init(e,t),nN.init(e,t),e.email=t=>e.check(new nz({type:"string",format:"email",check:"string_format",abort:!1,...ez(t)})),e.url=t=>e.check(new nR({type:"string",format:"url",check:"string_format",abort:!1,...ez(t)})),e.jwt=t=>e.check(new nJ({type:"string",format:"jwt",check:"string_format",abort:!1,...ez(t)})),e.emoji=t=>e.check(new nL({type:"string",format:"emoji",check:"string_format",abort:!1,...ez(t)})),e.guid=t=>e.check(t5(nT,t)),e.uuid=t=>e.check(new nA({type:"string",format:"uuid",check:"string_format",abort:!1,...ez(t)})),e.uuidv4=t=>e.check(new nA({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ez(t)})),e.uuidv6=t=>e.check(new nA({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ez(t)})),e.uuidv7=t=>e.check(new nA({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ez(t)})),e.nanoid=t=>e.check(new nI({type:"string",format:"nanoid",check:"string_format",abort:!1,...ez(t)})),e.guid=t=>e.check(t5(nT,t)),e.cuid=t=>e.check(new nM({type:"string",format:"cuid",check:"string_format",abort:!1,...ez(t)})),e.cuid2=t=>e.check(new nD({type:"string",format:"cuid2",check:"string_format",abort:!1,...ez(t)})),e.ulid=t=>e.check(new nF({type:"string",format:"ulid",check:"string_format",abort:!1,...ez(t)})),e.base64=t=>e.check(new nW({type:"string",format:"base64",check:"string_format",abort:!1,...ez(t)})),e.base64url=t=>e.check(new nq({type:"string",format:"base64url",check:"string_format",abort:!1,...ez(t)})),e.xid=t=>e.check(new n$({type:"string",format:"xid",check:"string_format",abort:!1,...ez(t)})),e.ksuid=t=>e.check(new nU({type:"string",format:"ksuid",check:"string_format",abort:!1,...ez(t)})),e.ipv4=t=>e.check(new nH({type:"string",format:"ipv4",check:"string_format",abort:!1,...ez(t)})),e.ipv6=t=>e.check(new nB({type:"string",format:"ipv6",check:"string_format",abort:!1,...ez(t)})),e.cidrv4=t=>e.check(new nV({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ez(t)})),e.cidrv6=t=>e.check(new nK({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ez(t)})),e.e164=t=>e.check(new nZ({type:"string",format:"e164",check:"string_format",abort:!1,...ez(t)})),e.datetime=t=>e.check(new nl({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ez(t)})),e.date=t=>e.check(new ns({type:"string",format:"date",check:"string_format",...ez(t)})),e.time=t=>e.check(new nu({type:"string",format:"time",check:"string_format",precision:null,...ez(t)})),e.duration=t=>e.check(new nc({type:"string",format:"duration",check:"string_format",...ez(t)}))});function nP(e){return new nE({type:"string",...ez(e)})}let n_=D("ZodStringFormat",(e,t)=>{e7.init(e,t),nN.init(e,t)}),nz=D("ZodEmail",(e,t)=>{tn.init(e,t),n_.init(e,t)}),nT=D("ZodGUID",(e,t)=>{te.init(e,t),n_.init(e,t)}),nA=D("ZodUUID",(e,t)=>{tt.init(e,t),n_.init(e,t)}),nR=D("ZodURL",(e,t)=>{tr.init(e,t),n_.init(e,t)}),nL=D("ZodEmoji",(e,t)=>{ta.init(e,t),n_.init(e,t)}),nI=D("ZodNanoID",(e,t)=>{to.init(e,t),n_.init(e,t)}),nM=D("ZodCUID",(e,t)=>{ti.init(e,t),n_.init(e,t)}),nD=D("ZodCUID2",(e,t)=>{tl.init(e,t),n_.init(e,t)}),nF=D("ZodULID",(e,t)=>{ts.init(e,t),n_.init(e,t)}),n$=D("ZodXID",(e,t)=>{tu.init(e,t),n_.init(e,t)}),nU=D("ZodKSUID",(e,t)=>{tc.init(e,t),n_.init(e,t)}),nH=D("ZodIPv4",(e,t)=>{tm.init(e,t),n_.init(e,t)}),nB=D("ZodIPv6",(e,t)=>{tg.init(e,t),n_.init(e,t)}),nV=D("ZodCIDRv4",(e,t)=>{ty.init(e,t),n_.init(e,t)}),nK=D("ZodCIDRv6",(e,t)=>{tv.init(e,t),n_.init(e,t)}),nW=D("ZodBase64",(e,t)=>{tx.init(e,t),n_.init(e,t)}),nq=D("ZodBase64URL",(e,t)=>{tw.init(e,t),n_.init(e,t)}),nZ=D("ZodE164",(e,t)=>{tk.init(e,t),n_.init(e,t)}),nJ=D("ZodJWT",(e,t)=>{tj.init(e,t),n_.init(e,t)}),nG=D("ZodBoolean",(e,t)=>{tS.init(e,t),nC.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{t.type="boolean"}});function nQ(e){return new nG({type:"boolean",...ez(e)})}let nY=D("ZodUnknown",(e,t)=>{tO.init(e,t),nC.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function nX(){return new nY({type:"unknown"})}let n0=D("ZodNever",(e,t)=>{tC.init(e,t),nC.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{t.not={}}}),n1=D("ZodArray",(e,t)=>{tE.init(e,t),nC.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=nt(a.element,t,{...r,path:[...r.path,"items"]})})(e,t,n,r),e.element=t.element,nO(e,"ZodArray",{min(e,t){return this.check(t8(e,t))},nonempty(e){return this.check(t8(1,e))},max(e,t){return this.check(t6(e,t))},length(e,t){return this.check(t9(e,t))},unwrap(){return this.element}})});function n2(e,t){return new n1({type:"array",element:e,...ez(t)})}let n4=D("ZodObject",(e,t)=>{tA.init(e,t),nC.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]=nt(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=nt(a.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):"output"===t.io&&(n.additionalProperties=!1)})(e,t,n,r),eb(e,"shape",()=>t.shape),nO(e,"ZodObject",{keyof(){return re(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:nX()})},loose(){return this.clone({...this._zod.def,catchall:nX()})},strict(){return this.clone({...this._zod.def,catchall:new n0({type:"never",...ez(void 0)})})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return function(e,t){if(!eC(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=ew(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return ex(this,"shape",n),n}});return e_(e,r)}(this,e)},safeExtend(e){var t=this;if(!eC(e))throw Error("Invalid input to safeExtend: expected a plain object");let n=ew(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e};return ex(this,"shape",n),n}});return e_(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=ew(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e._zod.def.shape};return ex(this,"shape",n),n},get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]});return e_(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=ew(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 ex(this,"shape",e),e},checks:[]});return e_(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=ew(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 ex(this,"shape",r),r},checks:[]});return e_(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=ew(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 ex(this,"shape",a),a},checks:[]});return e_(t,a)}(ra,this,e[0])},required(...e){var t,n;let r;return t=this,n=e[0],r=ew(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 rd({type:"nonoptional",innerType:e[t]}))}else for(let t in e)r[t]=new rd({type:"nonoptional",innerType:e[t]});return ex(this,"shape",r),r}}),e_(t,r)}})});function n3(e,t){return new n4({type:"object",shape:e??{},...ez(t)})}let n5=D("ZodUnion",(e,t)=>{tL.init(e,t),nC.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)=>nt(e,t,{...r,path:[...r.path,o?"oneOf":"anyOf",n]})),void(o?n.oneOf=i:n.anyOf=i)},e.options=t.options}),n6=D("ZodIntersection",(e,t)=>{tI.init(e,t),nC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let a,o,i,l;return o=nt((a=e._zod.def).left,t,{...r,path:[...r.path,"allOf",0]}),i=nt(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]])}}),n8=D("ZodRecord",(e,t)=>{tD.init(e,t),nC.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=nt(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=nt(a.keyType,t,{...r,path:[...r.path,"propertyNames"]})),n.additionalProperties=nt(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 n9(e,t,n){return new n8(t&&t._zod?{type:"record",keyType:e,valueType:t,...ez(n)}:{type:"record",keyType:nP(),valueType:e,...ez(t)})}let n7=D("ZodEnum",(e,t)=>{tF.init(e,t),nC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let a;(a=eh(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 n7({...t,checks:[],...ez(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 n7({...t,checks:[],...ez(r),entries:a})}});function re(e,t){return new n7({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...ez(t)})}let rt=D("ZodLiteral",(e,t)=>{t$.init(e,t),nC.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 rn(e,t){return new rt({type:"literal",values:Array.isArray(e)?e:[e],...ez(t)})}let rr=D("ZodTransform",(e,t)=>{tU.init(e,t),nC.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 $(e.constructor.name);n.addIssue=r=>{"string"==typeof r?n.issues.push(eM(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(eM(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)}}),ra=D("ZodOptional",(e,t)=>{tB.init(e,t),nC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ni(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ro(e){return new ra({type:"optional",innerType:e})}let ri=D("ZodExactOptional",(e,t)=>{tV.init(e,t),nC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ni(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),rl=D("ZodNullable",(e,t)=>{tK.init(e,t),nC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let a,o,i;return o=nt((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 rs(e){return new rl({type:"nullable",innerType:e})}let ru=D("ZodDefault",(e,t)=>{tW.init(e,t),nC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let a;nt((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}),rc=D("ZodPrefault",(e,t)=>{tZ.init(e,t),nC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let a;nt((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}),rd=D("ZodNonOptional",(e,t)=>{tJ.init(e,t),nC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let a;nt((a=e._zod.def).innerType,t,r),t.seen.get(e).ref=a.innerType},e.unwrap=()=>e._zod.def.innerType}),rf=D("ZodCatch",(e,t)=>{tQ.init(e,t),nC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let a,o=e._zod.def;nt(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}),rp=D("ZodPipe",(e,t)=>{tY.init(e,t),nC.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(nt(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 rh(e,t){return new rp({type:"pipe",in:e,out:t})}let rm=D("ZodReadonly",(e,t)=>{t0.init(e,t),nC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let a;nt((a=e._zod.def).innerType,t,r),t.seen.get(e).ref=a.innerType,n.readOnly=!0},e.unwrap=()=>e._zod.def.innerType}),rg=D("ZodCustom",(e,t)=>{t2.init(e,t),nC.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 ry=nP().trim().min(1,"名称不能为空").max(120,"名称不能超过 ".concat(120," 个字符")).refine(function(e){return!e.includes("/")&&!e.includes("\\")},"名称不能包含斜杠"),rv=function(e){return nP().max(e)},rb=nP().min(1).max(120),rx=re(I),rw=n9(rb,rv(4096)),rk=n9(rb,rv(1048576)),rj=re(["skip","overwrite"]);n3({password:rv(4096)}),n3({name:ry,baseUrl:rv(2048).optional(),apiKey:rv(4096).optional(),model:rv(120).optional(),notes:rv(4096).optional(),extras:rw.optional(),overrides:rk.optional(),providerId:rv(120).optional(),providerEndpoint:rv(120).optional()}).partial();var rS=n2(n3({key:nP().trim().min(1,"endpoint key 不能为空").max(60,"endpoint key 过长").refine(function(e){return!e.includes("/")&&!e.includes("\\")},"endpoint key 不能包含斜杠"),label:rv(120).optional(),baseUrl:nP().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 不能重复");n3({name:ry,apiKey:nP().min(1,"apiKey 不能为空").max(4096),endpoints:rS.optional(),notes:rv(4096).optional()}),n3({name:ry.optional(),apiKey:rv(4096).optional(),endpoints:rS.optional(),notes:rv(4096).optional()}),n3({sourceUser:nP().trim().min(1,"来源用户不能为空").max(120),conflictPolicy:rj.optional(),overwriteHarnesses:n2(rx).optional(),migrateCodexLoginCache:nQ().optional()});var rO=n3({format:rn("harness-switch-encrypted-export"),version:rn(1),kdf:n3({name:rn("scrypt"),salt:nP().min(1)}),cipher:n3({name:rn("aes-256-gcm"),iv:nP().min(1),tag:nP().min(1),data:nP().min(1)})});n3({passphrase:rv(4096),includeCodexLoginCache:nQ().optional()}),n3({envelope:rO,passphrase:rv(4096),conflictPolicy:rj.optional(),restoreActive:nQ().optional(),migrateCodexLoginCache:nQ().optional()});var rC=n3({id:nP().min(1).max(240),name:ry,target:re(["profile","vault"]),apiKey:rv(4096).optional(),providerId:rv(120).optional(),providerName:ry.optional(),overwrite:nQ().optional()});n3({selections:n2(rC).min(1,"请至少选择一条配置").max(200)}),n3({});let rN=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 rE(){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 rP=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,r_=(e,t)=>n=>{var r;if((null==t?void 0:t.variants)==null)return rE(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=rP(t)||rP(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 rE(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)},rz=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),rT=[],rA=(e,t,n)=>{if(0==e.length-t)return n.classGroupId;let r=e[t],a=n.nextPart.get(r);if(a){let n=rA(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}},rR=(e,t)=>{let n=rz();for(let r in e)rL(e[r],n,r,t);return n},rL=(e,t,n,r)=>{let a=e.length;for(let o=0;o<a;o++)rI(e[o],t,n,r)},rI=(e,t,n,r)=>{"string"==typeof e?rM(e,t,n):"function"==typeof e?rD(e,t,n,r):rF(e,t,n,r)},rM=(e,t,n)=>{(""===e?t:r$(t,e)).classGroupId=n},rD=(e,t,n,r)=>{rU(e)?rL(e(r),t,n,r):(null===t.validators&&(t.validators=[]),t.validators.push({classGroupId:n,validator:e}))},rF=(e,t,n,r)=>{let a=Object.entries(e),o=a.length;for(let e=0;e<o;e++){let[o,i]=a[e];rL(i,r$(t,o),n,r)}},r$=(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=rz(),n.nextPart.set(t,a)),n=a}return n},rU=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,rH=[],rB=(e,t,n,r,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:a}),rV=/\s+/,rK=e=>{let t;if("string"==typeof e)return e;let n="";for(let r=0;r<e.length;r++)e[r]&&(t=rK(e[r]))&&(n&&(n+=" "),n+=t);return n},rW=[],rq=e=>{let t=t=>t[e]||rW;return t.isThemeGetter=!0,t},rZ=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,rJ=/^\((?:(\w[\w-]*):)?(.+)\)$/i,rG=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,rQ=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,rY=/\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$/,rX=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,r0=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,r1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,r2=e=>rG.test(e),r4=e=>!!e&&!Number.isNaN(Number(e)),r3=e=>!!e&&Number.isInteger(Number(e)),r5=e=>e.endsWith("%")&&r4(e.slice(0,-1)),r6=e=>rQ.test(e),r8=()=>!0,r9=e=>rY.test(e)&&!rX.test(e),r7=()=>!1,ae=e=>r0.test(e),at=e=>r1.test(e),an=e=>!ao(e)&&!ap(e),ar=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)),aa=e=>aw(e,aO,r7),ao=e=>rZ.test(e),ai=e=>aw(e,aC,r9),al=e=>aw(e,aN,r4),as=e=>aw(e,aP,r8),au=e=>aw(e,aE,r7),ac=e=>aw(e,aj,r7),ad=e=>aw(e,aS,at),af=e=>aw(e,a_,ae),ap=e=>rJ.test(e),ah=e=>ak(e,aC),am=e=>ak(e,aE),ag=e=>ak(e,aj),ay=e=>ak(e,aO),av=e=>ak(e,aS),ab=e=>ak(e,a_,!0),ax=e=>ak(e,aP,!0),aw=(e,t,n)=>{let r=rZ.exec(e);return!!r&&(r[1]?t(r[1]):n(r[2]))},ak=(e,t,n=!1)=>{let r=rJ.exec(e);return!!r&&(r[1]?t(r[1]):n)},aj=e=>"position"===e||"percentage"===e,aS=e=>"image"===e||"url"===e,aO=e=>"length"===e||"size"===e||"bg-size"===e,aC=e=>"length"===e,aN=e=>"number"===e,aE=e=>"family-name"===e,aP=e=>"number"===e||"weight"===e,a_=e=>"shadow"===e,az=((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(rV),u="";for(let e=s.length-1;e>=0;e-=1){let t,c=s[e],{isExternal:d,modifiers:f,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:m}=n(c);if(d){u=c+(u.length>0?" "+u:u);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))){u=c+(u.length>0?" "+u:u);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)}u=c+(u.length>0?" "+u:u)}return u})(e,n);return a(e,o),o};return o=l=>{var s;let u;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,u=!1;return l.endsWith("!")?(s=l.slice(0,-1),u=!0):l.startsWith("!")&&(s=l.slice(1),u=!0),rB(n,u,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)):rB(rH,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r})(s),sortModifiers:(u=new Map,s.orderSensitiveModifiers.forEach((e,t)=>{u.set(e,1e6+t)}),e=>{let t=[],n=[];for(let r=0;r<e.length;r++){let a=e[r],o="["===a[0],i=u.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 rR(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 rA(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||rT}return n[e]||rT}}})(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=rK(t))&&(a&&(a+=" "),a+=n);return a})(...e))})(()=>{let e=rq("color"),t=rq("font"),n=rq("text"),r=rq("font-weight"),a=rq("tracking"),o=rq("leading"),i=rq("breakpoint"),l=rq("container"),s=rq("spacing"),u=rq("radius"),c=rq("shadow"),d=rq("inset-shadow"),f=rq("text-shadow"),p=rq("drop-shadow"),h=rq("blur"),m=rq("perspective"),g=rq("aspect"),y=rq("ease"),v=rq("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(),ap,ao],k=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto","contain","none"],S=()=>[ap,ao,s],O=()=>[r2,"full","auto",...S()],C=()=>[r3,"none","subgrid",ap,ao],N=()=>["auto",{span:["full",r3,ap,ao]},r3,ap,ao],E=()=>[r3,"auto",ap,ao],P=()=>["auto","min","max","fr",ap,ao],_=()=>["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=()=>[r2,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],R=()=>[r2,"screen","full","dvw","lvw","svw","min","max","fit",...S()],L=()=>[r2,"screen","full","lh","dvh","lvh","svh","min","max","fit",...S()],I=()=>[e,ap,ao],M=()=>[...x(),ag,ac,{position:[ap,ao]}],D=()=>["no-repeat",{repeat:["","x","y","space","round"]}],F=()=>["auto","cover","contain",ay,aa,{size:[ap,ao]}],$=()=>[r5,ah,ai],U=()=>["","none","full",u,ap,ao],H=()=>["",r4,ah,ai],B=()=>["solid","dashed","dotted","double"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],K=()=>[r4,r5,ag,ac],W=()=>["","none",h,ap,ao],q=()=>["none",r4,ap,ao],Z=()=>["none",r4,ap,ao],J=()=>[r4,ap,ao],G=()=>[r2,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[r6],breakpoint:[r6],color:[r8],container:[r6],"drop-shadow":[r6],ease:["in","out","in-out"],font:[an],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[r6],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[r6],shadow:[r6],spacing:["px",r4],text:[r6],"text-shadow":[r6],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",r2,ao,ap,g]}],container:["container"],"container-type":[{"@container":["","normal","size",ap,ao]}],"container-named":[ar],columns:[{columns:[r4,ao,ap,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:[r3,"auto",ap,ao]}],basis:[{basis:[r2,"full","auto",l,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[r4,r2,"auto","initial","none",ao]}],grow:[{grow:["",r4,ap,ao]}],shrink:[{shrink:["",r4,ap,ao]}],order:[{order:[r3,"first","last","none",ap,ao]}],"grid-cols":[{"grid-cols":C()}],"col-start-end":[{col:N()}],"col-start":[{"col-start":E()}],"col-end":[{"col-end":E()}],"grid-rows":[{"grid-rows":C()}],"row-start-end":[{row:N()}],"row-start":[{"row-start":E()}],"row-end":[{"row-end":E()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":P()}],"auto-rows":[{"auto-rows":P()}],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,ah,ai]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ax,as]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",r5,ao]}],"font-family":[{font:[am,au,t]}],"font-features":[{"font-features":[ao]}],"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,ap,ao]}],"line-clamp":[{"line-clamp":[r4,"none",ap,al]}],leading:[{leading:[o,...S()]}],"list-image":[{"list-image":["none",ap,ao]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ap,ao]}],"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:[r4,"from-font","auto",ap,ai]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[r4,"auto",ap,ao]}],"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:[r3,ap,ao]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ap,ao]}],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",ap,ao]}],"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"]},r3,ap,ao],radial:["",ap,ao],conic:[r3,ap,ao]},av,ad]}],"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":[r4,ap,ao]}],"outline-w":[{outline:["",r4,ah,ai]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","none",c,ab,af]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",d,ab,af]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[r4,ai]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",f,ab,af]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[r4,ap,ao]}],"mix-blend":[{"mix-blend":[...V(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":V()}],"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":[r4]}],"mask-image-linear-from-pos":[{"mask-linear-from":K()}],"mask-image-linear-to-pos":[{"mask-linear-to":K()}],"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":K()}],"mask-image-t-to-pos":[{"mask-t-to":K()}],"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":K()}],"mask-image-r-to-pos":[{"mask-r-to":K()}],"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":K()}],"mask-image-b-to-pos":[{"mask-b-to":K()}],"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":K()}],"mask-image-l-to-pos":[{"mask-l-to":K()}],"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":K()}],"mask-image-x-to-pos":[{"mask-x-to":K()}],"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":K()}],"mask-image-y-to-pos":[{"mask-y-to":K()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[ap,ao]}],"mask-image-radial-from-pos":[{"mask-radial-from":K()}],"mask-image-radial-to-pos":[{"mask-radial-to":K()}],"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":[r4]}],"mask-image-conic-from-pos":[{"mask-conic-from":K()}],"mask-image-conic-to-pos":[{"mask-conic-to":K()}],"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",ap,ao]}],filter:[{filter:["","none",ap,ao]}],blur:[{blur:W()}],brightness:[{brightness:[r4,ap,ao]}],contrast:[{contrast:[r4,ap,ao]}],"drop-shadow":[{"drop-shadow":["","none",p,ab,af]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",r4,ap,ao]}],"hue-rotate":[{"hue-rotate":[r4,ap,ao]}],invert:[{invert:["",r4,ap,ao]}],saturate:[{saturate:[r4,ap,ao]}],sepia:[{sepia:["",r4,ap,ao]}],"backdrop-filter":[{"backdrop-filter":["","none",ap,ao]}],"backdrop-blur":[{"backdrop-blur":W()}],"backdrop-brightness":[{"backdrop-brightness":[r4,ap,ao]}],"backdrop-contrast":[{"backdrop-contrast":[r4,ap,ao]}],"backdrop-grayscale":[{"backdrop-grayscale":["",r4,ap,ao]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[r4,ap,ao]}],"backdrop-invert":[{"backdrop-invert":["",r4,ap,ao]}],"backdrop-opacity":[{"backdrop-opacity":[r4,ap,ao]}],"backdrop-saturate":[{"backdrop-saturate":[r4,ap,ao]}],"backdrop-sepia":[{"backdrop-sepia":["",r4,ap,ao]}],"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",ap,ao]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[r4,"initial",ap,ao]}],ease:[{ease:["linear","initial",y,ap,ao]}],delay:[{delay:[r4,ap,ao]}],animate:[{animate:["none",v,ap,ao]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,ap,ao]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:q()}],"rotate-x":[{"rotate-x":q()}],"rotate-y":[{"rotate-y":q()}],"rotate-z":[{"rotate-z":q()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:J()}],"skew-x":[{"skew-x":J()}],"skew-y":[{"skew-y":J()}],transform:[{transform:[ap,ao,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:G()}],"translate-x":[{"translate-x":G()}],"translate-y":[{"translate-y":G()}],"translate-z":[{"translate-z":G()}],"translate-none":["translate-none"],zoom:[{zoom:[r3,ap,ao]}],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",ap,ao]}],"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",ap,ao]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[r4,ah,ai,al]}],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 aT(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return az(rE(t))}var aA=r_("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 aR(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:aT(aA({variant:n}),t)},r))}function aL(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 aI(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 aM(e){return(aM=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function aD(e,t){return(aD=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function aF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(aF=function(){return!!e})()}var a$=(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 u=[l,s];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&u[0]?r.return:u[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,u[1])).done)return a;switch(r=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,r=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]<a[3])){o.label=u[1];break}if(6===u[0]&&o.label<a[1]){o.label=a[1],a=u;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(u);break}a[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(e){u=[6,e],r=0}finally{n=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[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){aL(o,r,a,i,l,"next",e)}function l(e){aL(o,r,a,i,l,"throw",e)}i(void 0)})})()});function aU(e){return null===e.content&&null===e.currentContent?"same":null===e.content?"delete":null===e.currentContent?"create":e.content===e.currentContent?"same":"replace"}function aH(e){var t=e.files;return(0,g.jsx)("div",{className:"space-y-3",children:t.map(function(e){return(0,g.jsx)(aB,{file:e},e.path)})})}function aB(e){var t=e.file,n=(0,x.Bd)().t,r=aU(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)(aR,{variant:"secondary",children:n("diff.".concat(r))})]}),(0,g.jsx)(aK,{fallback:(0,g.jsx)(aV,{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)(a$,{file:t})})})]})}function aV(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 aK=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=aM(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,aF()?Reflect.construct(t,n||[],aM(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&&aD(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}}],aI(r.prototype,t),n&&aI(r,n),r}(y.Component),aW=Object.defineProperty,aq=(e,t)=>aW(e,"name",{value:t,configurable:!0});function aZ(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function aJ(...e){return t=>{let n=!1,r=e.map(e=>{let r=aZ(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():aZ(e[t],null)}}}}function aG(...e){return y.useCallback(aJ(...e),e)}aq(aZ,"setRef"),aq(aJ,"composeRefs"),aq(aG,"useComposedRefs");var aQ=Object.defineProperty,aY=(e,t)=>aQ(e,"name",{value:t,configurable:!0});function aX(e){let t=y.forwardRef((t,n)=>{let{children:r,...a}=t,o=null,i=!1,l=[];a8(r)&&"function"==typeof ot&&(r=ot(r._payload)),y.Children.forEach(r,e=>{if(a5(e)){i=!0;let t="child"in e.props?e.props.child:e.props.children;a8(t)&&"function"==typeof ot&&(t=ot(t._payload)),o=a2(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?a3(o):void 0,u=aG(n,s);if(!o){if(r||0===r)throw Error(i?oe(e):a7(e));return r}let c=a4(a,o.props??{});return o.type!==y.Fragment&&(c.ref=n?u:s),y.cloneElement(o,c)});return t.displayName=`${e}.Slot`,t}aY(aX,"createSlot");var a0=aX("Slot"),a1=Symbol.for("radix.slottable");aY(function(e){let t=aY(e=>"child"in e?e.children(e.child):e.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=a1,t},"createSlottable");var a2=aY((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 a4(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 a3(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 a5(e){return y.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===a1}aY(a4,"mergeProps"),aY(a3,"getElementRef"),aY(a5,"isSlottable");var a6=Symbol.for("react.lazy");function a8(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===a6&&"_payload"in e&&a9(e._payload)}function a9(e){return"object"==typeof e&&null!==e&&"then"in e}aY(a8,"isLazyComponent"),aY(a9,"isPromiseLike");var a7=aY(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),oe=aY(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),ot=v[" use ".trim().toString()],on=r_("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 or(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?a0:"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:aT(on({variant:n,size:r,className:t}))},o))}var oa=Object.defineProperty,oo=(e,t)=>oa(e,"name",{value:t,configurable:!0}),oi=!!("u">typeof window&&window.document&&window.document.createElement);function ol(e,t,{checkForDefaultPrevented:n=!0}={}){return oo(function(r){if(e?.(r),!1===n||!r||!r.defaultPrevented)return t?.(r)},"handleEvent")}function os(e){if(!oi)throw Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}function ou(e){return"IFRAME"===e.tagName}oo(ol,"composeEventHandlers"),oo(function(e){if(!oi)throw Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window},"getOwnerWindow"),oo(os,"getOwnerDocument"),oo(function e(t,n=!1){let{activeElement:r}=os(t);if(!r?.nodeName)return null;if(ou(r)&&r.contentDocument)return e(r.contentDocument.body,n);if(n){let e=r.getAttribute("aria-activedescendant");if(e){let t=os(r).getElementById(e);if(t)return t}}return r},"getActiveElement"),oo(ou,"isFrame");var oc=Object.defineProperty,od=(e,t)=>oc(e,"name",{value:t,configurable:!0});function of(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=od(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:u=!1}=s,c=i?.[e]?.[o]||a,d=y.useContext(c);if(d)return d;if(void 0!==r)return r;if(!u)throw Error(`\`${n}\` must be used within \`${t}\``)}return i.displayName=t+"Provider",od(l,"useContext"),[i,l]}od(r,"createContext");let a=od(()=>{let t=n.map(e=>y.createContext(e));return od(function(n){let r=n?.[e]||t;return y.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},"useScope")},"createScope");return a.scopeName=e,[r,op(a,...t)]}function op(...e){let t=e[0];if(1===e.length)return t;let n=od(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return od(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}od(function(e,t){let n=y.createContext(t);n.displayName=e+"Context";let r=od(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",od(a,"useContext"),[r,a]},"createContext"),od(of,"createContextScope"),od(op,"composeContextScopes");var oh=globalThis?.document?y.useLayoutEffect:()=>{},om=Object.defineProperty,og=v[" useId ".trim().toString()]||(()=>void 0),oy=0;function ov(e){let[t,n]=y.useState(og());return oh(()=>{e||n(e=>e??String(oy++))},[e]),e||(t?`radix-${t}`:"")}om(ov,"name",{value:"useId",configurable:!0});var ob=Object.defineProperty,ox=v[" useEffectEvent ".trim().toString()],ow=v[" useInsertionEffect ".trim().toString()];function ok(e){if("function"==typeof ox)return ox(e);let t=y.useRef(()=>{throw Error("Cannot call an event handler while rendering.")});return"function"==typeof ow?ow(()=>{t.current=e}):oh(()=>{t.current=e}),y.useMemo(()=>(...e)=>t.current?.(...e),[])}ob(ok,"name",{value:"useEffectEvent",configurable:!0});var oj=Object.defineProperty,oS=(e,t)=>oj(e,"name",{value:t,configurable:!0}),oO=v[" useInsertionEffect ".trim().toString()]||oh;function oC({prop:e,defaultProp:t,onChange:n=oS(()=>{},"onChange"),caller:r}){let[a,o,i]=oN({defaultProp:t,onChange:n}),l=void 0!==e,s=l?e:a;return[s,y.useCallback(t=>{if(l){let n=oE(t)?t(e):t;n!==e&&i.current?.(n)}else o(t)},[l,e,o,i])]}function oN({defaultProp:e,onChange:t}){let[n,r]=y.useState(e),a=y.useRef(n),o=y.useRef(t);return oO(()=>{o.current=t},[t]),y.useEffect(()=>{a.current!==n&&(o.current?.(n),a.current=n)},[n,a]),[n,r,o]}function oE(e){return"function"==typeof e}oS(oC,"useControllableState"),oS(oN,"useUncontrolledState"),oS(oE,"isFunction");var oP=Symbol("RADIX:SYNC_STATE");oS(function(e,t,n,r){let{prop:a,defaultProp:o,onChange:i,caller:l}=t,s=void 0!==a,u=ok(i),c=[{...n,state:o}];r&&c.push(r);let[d,f]=y.useReducer((t,n)=>{if(n.type===oP)return{...t,state:n.state};let r=e(t,n);return s&&!Object.is(r.state,t.state)&&u(r.state),r},...c),p=d.state,h=y.useRef(p);y.useEffect(()=>{h.current!==p&&(h.current=p,s||u(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:oP,state:a})},[a,d.state,s]),[m,f]},"useControllableStateReducer");var o_=d(3144),oz=Object.defineProperty,oT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=aX(`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 oA(e,t){e&&o_.flushSync(()=>e.dispatchEvent(t))}function oR(e){let t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...e)=>t.current?.(...e),[])}oz(oA,"name",{value:"dispatchDiscreteCustomEvent",configurable:!0}),(0,Object.defineProperty)(oR,"name",{value:"useCallbackRef",configurable:!0});var oL=Object.defineProperty,oI=(e,t)=>oL(e,"name",{value:t,configurable:!0}),oM="dismissableLayer.update",oD=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),oF=y.forwardRef(oI(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:l,onDismiss:s,...u}=e,c=y.useContext(oD),[d,f]=y.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=y.useState({}),v=aG(t,f),b=Array.from(c.layers),[x]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),w=x?b.indexOf(x):-1,k=d?b.indexOf(d):-1,j=c.layersWithOutsidePointerEventsDisabled.size>0,S=k>=w,O=y.useRef(!1),C=oH(e=>{o?.(e),l?.(e),e.defaultPrevented||s?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:O,dismissableSurfaces:c.dismissableSurfaces,shouldHandlePointerDownOutside:y.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...c.branches].some(t=>t.contains(e));return S&&!t},[c.branches,S])}),N=oB(e=>{if(r&&O.current)return;let t=e.target;![...c.branches].some(e=>e.contains(t))&&(i?.(e),l?.(e),e.defaultPrevented||s?.())},p),E=!!d&&k===b.length-1,P=oR(e=>{"Escape"===e.key&&(a?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))});return y.useEffect(()=>{if(E)return p.addEventListener("keydown",P,{capture:!0}),()=>p.removeEventListener("keydown",P,{capture:!0})},[p,E,P]),y.useEffect(()=>{if(d)return n&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(h=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),oV(),()=>{n&&(c.layersWithOutsidePointerEventsDisabled.delete(d),0===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=h))}},[d,p,n,c]),y.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),oV())},[d,c]),y.useEffect(()=>{let e=oI(()=>m({}),"handleUpdate");return document.addEventListener(oM,e),()=>document.removeEventListener(oM,e)},[]),(0,g.jsx)(oT.div,{...u,ref:v,style:{pointerEvents:j?S?"auto":"none":void 0,...e.style},onFocusCapture:ol(e.onFocusCapture,N.onFocusCapture),onBlurCapture:ol(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:ol(e.onPointerDownCapture,C.onPointerDownCapture)})},"DismissableLayer"));function o$(){let e=y.useContext(oD),[t,n]=y.useState(null);return y.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}oI(o$,"useDismissableLayerSurface");var oU=oI(()=>!0,"IS_TRUE");function oH(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:a,dismissableSurfaces:o,shouldHandlePointerDownOutside:i=oU}=t,l=oR(e),s=y.useRef(!1),u=y.useRef(!1),c=y.useRef(new Map),d=y.useRef(()=>{});return y.useEffect(()=>{function e(){u.current=!1,a.current=!1,c.current.clear()}function t(){return Array.from(c.current.values()).some(Boolean)}function f(e){if(!u.current)return;let t=e.target;t instanceof Node&&[...o].some(e=>e.contains(t))||c.current.set(e.type,!0),"click"===e.type&&window.setTimeout(()=>{u.current&&d.current()},0)}function p(e){u.current&&c.current.set(e.type,!1)}oI(e,"resetOutsideInteraction"),oI(t,"isOutsideInteractionIntercepted"),oI(f,"handleInteractionCapture"),oI(p,"handleInteractionBubble");let h=oI(o=>{if(o.target&&!s.current){let f=function(){n.removeEventListener("click",d.current);let r=t();e(),r||oK("dismissableLayer.pointerDownOutside",l,p,{discrete:!0})};if(oI(f,"handleAndDispatchPointerDownOutsideEvent"),!i(o.target)){n.removeEventListener("click",d.current),e(),s.current=!1;return}let p={originalEvent:o};u.current=!0,a.current=r&&0===o.button,c.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:oI(()=>s.current=!0,"onPointerDownCapture")}}function oB(e,t=globalThis?.document){let n=oR(e),r=y.useRef(!1);return y.useEffect(()=>{let e=oI(e=>{e.target&&!r.current&&oK("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:oI(()=>r.current=!0,"onFocusCapture"),onBlurCapture:oI(()=>r.current=!1,"onBlurCapture")}}function oV(){let e=new CustomEvent(oM);document.dispatchEvent(e)}function oK(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?oA(a,o):a.dispatchEvent(o)}oI(oH,"usePointerDownOutside"),oI(oB,"useFocusOutside"),oI(oV,"dispatchUpdate"),oI(oK,"handleAndDispatchCustomEvent");var oW=Object.defineProperty,oq=(e,t)=>oW(e,"name",{value:t,configurable:!0}),oZ="focusScope.autoFocusOnMount",oJ="focusScope.autoFocusOnUnmount",oG={bubbles:!1,cancelable:!0},oQ=y.forwardRef(oq(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...i}=e,[l,s]=y.useState(null),u=oR(a),c=oR(o),d=y.useRef(null),f=aG(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:o3(d.current,{select:!0})},t=function(e){if(p.paused||!l)return;let t=e.relatedTarget;null!==t&&(l.contains(t)||o3(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&o3(l)};oq(e,"handleFocusIn"),oq(t,"handleFocusOut"),oq(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){o5.add(p);let e=document.activeElement;if(!l.contains(e)){let t=new CustomEvent(oZ,oG);l.addEventListener(oZ,u),l.dispatchEvent(t),t.defaultPrevented||(oY(o9(o0(l)),{select:!0}),document.activeElement===e&&o3(l))}return()=>{l.removeEventListener(oZ,u),setTimeout(()=>{let t=new CustomEvent(oJ,oG);l.addEventListener(oJ,c),l.dispatchEvent(t),t.defaultPrevented||o3(e??document.body,{select:!0}),l.removeEventListener(oJ,c),o5.remove(p)},0)}}},[l,u,c,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]=oX(t);r&&o?e.shiftKey||a!==o?e.shiftKey&&a===r&&(e.preventDefault(),n&&o3(o,{select:!0})):(e.preventDefault(),n&&o3(r,{select:!0})):a===t&&e.preventDefault()}},[n,r,p.paused]);return(0,g.jsx)(oT.div,{tabIndex:-1,...i,ref:f,onKeyDown:h})},"FocusScope"));function oY(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(o3(r,{select:t}),document.activeElement!==n)return}function oX(e){let t=o0(e);return[o1(t,e),o1(t.reverse(),e)]}function o0(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:oq(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 o1(e,t){let n="function"==typeof t.checkVisibility&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):o2(r,{upTo:t})))return r}function o2(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 o4(e){return e instanceof HTMLInputElement&&"select"in e}function o3(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&o4(e)&&t&&e.select()}}oq(oY,"focusFirst"),oq(oX,"getTabbableEdges"),oq(o0,"getTabbableCandidates"),oq(o1,"findVisible"),oq(o2,"isHidden"),oq(o4,"isSelectableInput"),oq(o3,"focus");var o5=o6();function o6(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),(e=o8(e,t)).unshift(t)},remove(t){e=o8(e,t),e[0]?.resume()}}}function o8(e,t){let n=[...e],r=n.indexOf(t);return -1!==r&&n.splice(r,1),n}function o9(e){return e.filter(e=>"A"!==e.tagName)}oq(o6,"createFocusScopesStack"),oq(o8,"arrayRemove"),oq(o9,"removeLinks");var o7=Object.defineProperty,ie=y.forwardRef(o7(function(e,t){let{container:n,...r}=e,[a,o]=y.useState(!1);oh(()=>o(!0),[]);let i=n||a&&globalThis?.document?.body;return i?o_.createPortal((0,g.jsx)(oT.div,{...r,ref:t}),i):null},"name",{value:"Portal",configurable:!0})),it=Object.defineProperty,ir=(e,t)=>it(e,"name",{value:t,configurable:!0});function ia(e,t){return y.useReducer((e,n)=>t[e][n]??e,e)}ir(ia,"useStateMachine");var io=ir(e=>{let{present:t,children:n}=e,r=ii(t),a="function"==typeof n?n({present:r.isPresent}):y.Children.only(n),o=is(r.ref,ic(a));return"function"==typeof n||r.isPresent?y.cloneElement(a,{ref:o}):null},"Presence");function ii(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]=ia(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??iu(r.current),i.current=void 0):o.current="none"},[l]),oh(()=>{let t=r.current,n=a.current;if(n!==e){let r=o.current,l=iu(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]),oh(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,i=ir(o=>{let i=iu(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=ir(e=>{e.target===t&&(o.current=iu(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=iu(t)}else r.current=null;n(e)},[])}}function il(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function is(...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=il(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():il(n[e],null)}}},[])}function iu(e){return e?.animationName||"none"}function ic(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}ir(ii,"usePresence"),ir(il,"setRef"),ir(is,"useStableComposedRefs"),ir(iu,"getAnimationName"),ir(ic,"getElementRef");var id=Object.defineProperty,ip=(e,t)=>id(e,"name",{value:t,configurable:!0}),ih=0,im=null;function ig(){y.useEffect(()=>{im||(im={start:iy(),end:iy()});let{start:e,end:t}=im;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),ih++,()=>{1===ih&&(im?.start.remove(),im?.end.remove(),im=null),ih=Math.max(0,ih-1)}},[])}function iy(){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}ip(function(e){return ig(),e.children},"FocusGuards"),ip(ig,"useFocusGuards"),ip(iy,"createFocusGuard");var iv=function(){return(iv=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 ib(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 ix="right-scroll-bar-position",iw="width-before-scroll-bar";function ik(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var ij="u">typeof window?y.useLayoutEffect:y.useEffect,iS=new WeakMap,iO=(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=iv({async:!0,ssr:!1},a),s),iC=function(){},iN=y.forwardRef(function(e,t){var n,r,a,o,i=y.useRef(null),l=y.useState({onScrollCapture:iC,onWheelCapture:iC,onTouchMoveCapture:iC}),s=l[0],u=l[1],c=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=ib(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 ik(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,ij(function(){var e=iS.get(o);if(e){var t=new Set(e),r=new Set(n),a=o.current;t.forEach(function(e){r.has(e)||ik(e,null)}),r.forEach(function(e){t.has(e)||ik(e,a)})}iS.set(o,n)},[n]),o),C=iv(iv({},S),s);return y.createElement(y.Fragment,null,h&&y.createElement(g,{sideCar:iO,removeScrollBar:p,shards:m,noRelative:v,noIsolation:b,inert:x,setCallbacks:u,allowPinchZoom:!!w,lockRef:i,gapMode:j}),c?y.cloneElement(y.Children.only(d),iv(iv({},C),{ref:O})):y.createElement(void 0===k?"div":k,iv({},C,{className:f,ref:O}),d))});iN.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},iN.classNames={fullWidth:iw,zeroRight:ix};var iE=function(e){var t=e.sideCar,n=ib(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,iv({},n))};iE.isSideCarExport=!0;var iP=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)}}},i_=function(){var e=iP();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},iz=function(){var e=i_();return function(t){return e(t.styles,t.dynamic),null}},iT={left:0,top:0,right:0,gap:0},iA=function(e){return parseInt(e||"",10)||0},iR=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[iA(n),iA(r),iA(a)]},iL=function(e){if(void 0===e&&(e="margin"),"u"<typeof window)return iT;var t=iR(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])}},iI=iz(),iM="data-scroll-locked",iD=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(iM,"] {\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(ix," {\n right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(iw," {\n margin-right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(ix," .").concat(ix," {\n right: 0 ").concat(r,";\n }\n \n .").concat(iw," .").concat(iw," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(iM,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},iF=function(){var e=parseInt(document.body.getAttribute(iM)||"0",10);return isFinite(e)?e:0},i$=function(){y.useEffect(function(){return document.body.setAttribute(iM,(iF()+1).toString()),function(){var e=iF()-1;e<=0?document.body.removeAttribute(iM):document.body.setAttribute(iM,e.toString())}},[])},iU=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=void 0===r?"margin":r;i$();var o=y.useMemo(function(){return iL(a)},[a]);return y.createElement(iI,{styles:iD(o,!t,a,n?"":"!important")})},iH=!1;if("u">typeof window)try{var iB=Object.defineProperty({},"passive",{get:function(){return iH=!0,!0}});window.addEventListener("test",iB,iB),window.removeEventListener("test",iB,iB)}catch(e){iH=!1}var iV=!!iH&&{passive:!1},iK=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])},iW=function(e,t){var n=t.ownerDocument,r=t;do{if("u">typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),iq(e,r)){var a=iZ(e,r);if(a[1]>a[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},iq=function(e,t){return"v"===e?iK(t,"overflowY"):iK(t,"overflowX")},iZ=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},iJ=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,u=t.contains(s),c=!1,d=l>0,f=0,p=0;do{if(!s)break;var h=iZ(e,s),m=h[0],g=h[1]-h[2]-i*m;(m||g)&&iq(e,s)&&(f+=g,p+=m);var y=s.parentNode;s=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return d&&(a&&1>Math.abs(f)||!a&&l>f)?c=!0:!d&&(a&&1>Math.abs(p)||!a&&-l>p)&&(c=!0),c},iG=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},iQ=function(e){return[e.deltaX,e.deltaY]},iY=function(e){return e&&"current"in e?e.current:e},iX=0,i0=[];let i1=(u=function(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),a=y.useState(iX++)[0],o=y.useState(iz)[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(iY),!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=iG(e),l=n.current,s="deltaX"in e?e.deltaX:l[0]-o[0],u="deltaY"in e?e.deltaY:l[1]-o[1],c=e.target,d=Math.abs(s)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===c||p.contains(c)))return!1;var h=iW(d,c);if(!h)return!0;if(h?a=d:(a="v"===d?"h":"v",h=iW(d,c)),!h)return!1;if(!r.current&&"changedTouches"in e&&(s||u)&&(r.current=a),!a)return!0;var m=r.current||a;return iJ(m,t,e,"h"===m?s:u,!0)},[]),s=y.useCallback(function(e){if(i0.length&&i0[i0.length-1]===o){var n="deltaY"in e?iQ(e):iG(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(iY).filter(Boolean).filter(function(t){return t.contains(e.target)});(a.length>0?l(e,a[0]):!i.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),u=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)},[]),c=y.useCallback(function(e){n.current=iG(e),r.current=void 0},[]),d=y.useCallback(function(t){u(t.type,iQ(t),t.target,l(t,e.lockRef.current))},[]),f=y.useCallback(function(t){u(t.type,iG(t),t.target,l(t,e.lockRef.current))},[]);y.useEffect(function(){return i0.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",s,iV),document.addEventListener("touchmove",s,iV),document.addEventListener("touchstart",c,iV),function(){i0=i0.filter(function(e){return e!==o}),document.removeEventListener("wheel",s,iV),document.removeEventListener("touchmove",s,iV),document.removeEventListener("touchstart",c,iV)}},[]);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(iU,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},iO.useMedium(u),iE);var i2=y.forwardRef(function(e,t){return y.createElement(iN,iv({},e,{ref:t,sideCar:i1}))});i2.classNames=iN.classNames;var i4=new WeakMap,i3=new WeakMap,i5={},i6=0,i8=function(e){return e&&(e.host||i8(e.parentNode))},i9=function(e,t,n,r){var a=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var n=i8(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});i5[n]||(i5[n]=new WeakMap);var o=i5[n],i=[],l=new Set,s=new Set(a),u=function(e){!e||l.has(e)||(l.add(e),u(e.parentNode))};a.forEach(u);var c=function(e){!e||s.has(e)||Array.prototype.forEach.call(e.children,function(e){if(l.has(e))c(e);else try{var t=e.getAttribute(r),a=null!==t&&"false"!==t,s=(i4.get(e)||0)+1,u=(o.get(e)||0)+1;i4.set(e,s),o.set(e,u),i.push(e),1===s&&a&&i3.set(e,!0),1===u&&e.setAttribute(n,"true"),a||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return c(t),l.clear(),i6++,function(){i.forEach(function(e){var t=i4.get(e)-1,a=o.get(e)-1;i4.set(e,t),o.set(e,a),t||(i3.has(e)||e.removeAttribute(r),i3.delete(e)),a||e.removeAttribute(n)}),--i6||(i4=new WeakMap,i4=new WeakMap,i3=new WeakMap,i5={})}},i7=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"))),i9(r,a,n,"aria-hidden")):function(){return null}},le=Object.defineProperty,lt=(e,t)=>le(e,"name",{value:t,configurable:!0}),ln="Dialog",[lr,la]=of(ln),[lo,li]=lr(ln),ll=lt(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:i=!0}=e,l=y.useRef(null),s=y.useRef(null),[u,c]=oC({prop:r,defaultProp:a??!1,onChange:o,caller:ln}),[d,f]=y.useState(0),[p,h]=y.useState(0);return(0,g.jsx)(lo,{scope:t,triggerRef:l,contentRef:s,contentId:ov(),titleId:ov(),descriptionId:ov(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:h,open:u,onOpenChange:c,onOpenToggle:y.useCallback(()=>c(e=>!e),[c]),modal:i,children:n})},"Dialog"),ls=y.forwardRef(lt(function(e,t){let{__scopeDialog:n,...r}=e,a=li("DialogTrigger",n),o=aG(t,a.triggerRef);return(0,g.jsx)(oT.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":lO(a.open),...r,ref:o,onClick:ol(e.onClick,a.onOpenToggle)})},"DialogTrigger")),lu="DialogPortal",[lc,ld]=lr(lu,{forceMount:void 0}),lf=lt(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:a}=e,o=li(lu,t);return(0,g.jsx)(lc,{scope:t,forceMount:n,children:y.Children.map(r,e=>(0,g.jsx)(io,{present:n||o.open,children:(0,g.jsx)(ie,{asChild:!0,container:a,children:e})}))})},"DialogPortal"),lp="DialogOverlay",lh=y.forwardRef(lt(function(e,t){let n=ld(lp,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=li(lp,e.__scopeDialog);return o.modal?(0,g.jsx)(io,{present:r||o.open,children:(0,g.jsx)(lg,{...a,ref:t})}):null},"DialogOverlay")),lm=aX("DialogOverlay.RemoveScroll"),lg=y.forwardRef(lt(function(e,t){let{__scopeDialog:n,...r}=e,a=li(lp,n),o=aG(t,o$());return(0,g.jsx)(i2,{as:lm,allowPinchZoom:!0,shards:[a.contentRef],children:(0,g.jsx)(oT.div,{"data-state":lO(a.open),...r,ref:o,style:{pointerEvents:"auto",...r.style}})})},"DialogOverlayImpl")),ly="DialogContent",lv=y.forwardRef(lt(function(e,t){let n=ld(ly,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=li(ly,e.__scopeDialog);return(0,g.jsx)(io,{present:r||o.open,children:o.modal?(0,g.jsx)(lb,{...a,ref:t}):(0,g.jsx)(lx,{...a,ref:t})})},"DialogContent")),lb=y.forwardRef(lt(function(e,t){let n=li(ly,e.__scopeDialog),r=y.useRef(null),a=aG(t,n.contentRef,r);return y.useEffect(()=>{let e=r.current;if(e)return i7(e)},[]),(0,g.jsx)(lw,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:ol(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:ol(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:ol(e.onFocusOutside,e=>e.preventDefault())})},"DialogContentModal")),lx=y.forwardRef(lt(function(e,t){let n=li(ly,e.__scopeDialog),r=y.useRef(!1),a=y.useRef(!1);return(0,g.jsx)(lw,{...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")),lw=y.forwardRef(lt(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,...i}=e,l=li(ly,n);return ig(),(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(oQ,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:o,children:(0,g.jsx)(oF,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionPresent?l.descriptionId:void 0,"aria-labelledby":l.titlePresent?l.titleId:void 0,"data-state":lO(l.open),...i,ref:t,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1)})})})},"DialogContentImpl")),lk=y.forwardRef(lt(function(e,t){let{__scopeDialog:n,...r}=e,a=li("DialogTitle",n),{setTitleCount:o}=a;return oh(()=>(o(e=>e+1),()=>o(e=>e-1)),[o]),(0,g.jsx)(oT.h2,{id:a.titleId,...r,ref:t})},"DialogTitle")),lj=y.forwardRef(lt(function(e,t){let{__scopeDialog:n,...r}=e,a=li("DialogDescription",n),{setDescriptionCount:o}=a;return oh(()=>(o(e=>e+1),()=>o(e=>e-1)),[o]),(0,g.jsx)(oT.p,{id:a.descriptionId,...r,ref:t})},"DialogDescription")),lS=y.forwardRef(lt(function(e,t){let{__scopeDialog:n,...r}=e,a=li("DialogClose",n);return(0,g.jsx)(oT.button,{type:"button",...r,ref:t,onClick:ol(e.onClick,()=>a.onOpenChange(!1))})},"DialogClose"));function lO(e){return e?"open":"closed"}lt(lO,"getState");let lC=O("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function lN(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 lE(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 lP(e){var t=e.className,n=lE(e,["className"]);return(0,g.jsx)(lh,lN({"data-slot":"dialog-overlay",className:aT("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 l_(e){var t,n,r=e.className,a=e.children,o=lE(e,["className","children"]);return(0,g.jsxs)(lf,{children:[(0,g.jsx)(lP,{}),(0,g.jsxs)(lv,(t=lN({"data-slot":"dialog-content",className:aT("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)(lS,{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)(lC,{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 lz(e){var t=e.className,n=lE(e,["className"]);return(0,g.jsx)("div",lN({"data-slot":"dialog-header",className:aT("flex flex-col space-y-1.5 text-center sm:text-left",t)},n))}function lT(e){var t=e.className,n=lE(e,["className"]);return(0,g.jsx)("div",lN({"data-slot":"dialog-footer",className:aT("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t)},n))}function lA(e){var t=e.className,n=lE(e,["className"]);return(0,g.jsx)(lk,lN({"data-slot":"dialog-title",className:aT("text-lg font-semibold leading-none tracking-tight",t)},n))}function lR(e){var t=e.className,n=lE(e,["className"]);return(0,g.jsx)(lj,lN({"data-slot":"dialog-description",className:aT("text-sm text-muted-foreground",t)},n))}function lL(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 lI(e,t,n){return(lI=lU()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var a=new(Function.bind.apply(e,r));return n&&lF(a,n.prototype),a}).apply(null,arguments)}function lM(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lD(e){return(lD=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function lF(e,t){return(lF=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l$(e){var t="function"==typeof Map?new Map:void 0;return(l$=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 lI(e,arguments,lD(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),lF(n,e)})(e)}function lU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(lU=function(){return!!e})()}var lH=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=lD(r),lM(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,lU()?Reflect.construct(r,a||[],lD(this).constructor):r.apply(this,a)),"status",void 0),lM(o,"code",void 0),lM(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&&lF(t,e),t}(l$(Error));function lB(e){return"/api/harnesses/".concat(e,"/profiles")}function lV(e,t){return"".concat(lB(e),"/").concat(encodeURIComponent(t))}function lK(e){return e?"/api/backups/".concat(encodeURIComponent(e)):"/api/backups"}function lW(){return"/api/providers"}function lq(e){return"".concat(lW(),"/").concat(encodeURIComponent(e))}function lZ(e){return e?"/api/drift/".concat(encodeURIComponent(e)):"/api/drift"}function lJ(){return"/api/scan"}function lG(e){return e?"/api/operations?harness=".concat(encodeURIComponent(e)):"/api/operations"}function lQ(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 u=[l,s];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&u[0]?r.return:u[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,u[1])).done)return a;switch(r=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,r=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]<a[3])){o.label=u[1];break}if(6===u[0]&&o.label<a[1]){o.label=a[1],a=u;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(u);break}a[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(e){u=[6,e],r=0}finally{n=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}(this,function(l){switch(l.label){case 0:var s,u;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){lM(e,t,n[t])})}return e}({credentials:"include"},t),u=u={headers:n},Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(u)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(u)).forEach(function(e){Object.defineProperty(s,e,Object.getOwnPropertyDescriptor(u,e))}),s))];case 1:return[4,(r=l.sent()).json().catch(function(){return{}})];case 2:if(a=l.sent(),!r.ok)throw new lH(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){lL(o,r,a,i,l,"next",e)}function l(e){lL(o,r,a,i,l,"throw",e)}i(void 0)})}).apply(this,arguments)}function lY(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 lX(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function l0(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 l1(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 l2(e){var t;return e.code?{key:(t=e.code).startsWith("warning.")||t.startsWith("error.")?t:"error.".concat(t),params:e.params,scope:e.scope,fallback:e.message}:{key:"error.unknown",fallback:e.message,scope:e.scope}}function l4(e){return lX(e,lH)?l2({message:e.message,code:e.code,params:e.params}):{key:"error.unknown",fallback:lX(e,Error)?e.message:String(e)}}function l3(e,t){var n=l4(e);return"error.unknown"===n.key?l1(l0({},n),{key:t}):n}var l5=new Set(["drift.adoptFailed","drift.reapplyFailed","vault.deleteFailed","vault.saveFailed","vault.revealFailed","operations.undoFailed","import.failed","activate.loadFailed","backup.loadFailed","backup.diffFailed"]);function l6(e,t){if(t.fallback&&("error.unknown"===t.key||l5.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 lY(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 lY(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,l1(l0({},t.params,i),{defaultValue:null!=(r=t.fallback)?r:t.key}));return t.scope?"".concat(t.scope,": ").concat(l):l}let l8=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 l9(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 l7(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 se(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function i(e){l7(o,r,a,i,l,"next",e)}function l(e){l7(o,r,a,i,l,"throw",e)}i(void 0)})}}function st(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function sn(e){return function(e){if(Array.isArray(e))return l9(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 l9(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 l9(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 sr(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 u=[l,s];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&u[0]?r.return:u[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,u[1])).done)return a;switch(r=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,r=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]<a[3])){o.label=u[1];break}if(6===u[0]&&o.label<a[1]){o.label=a[1],a=u;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(u);break}a[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(e){u=[6,e],r=0}finally{n=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}function sa(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 so=(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 se(function(){var n;return sr(this,function(r){switch(r.label){case 0:return r.trys.push([0,5,,6]),[4,lQ("/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:st(n=r.sent(),lH)&&401===n.status?null:l4(n)}),[3,6];case 6:return[2]}})})()},login:function(n){return se(function(){var r;return sr(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,lQ("/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:l4(r=a.sent())}),r;case 6:return[2]}})})()},logout:function(){return se(function(){return sr(this,function(t){switch(t.label){case 0:return[4,lQ("/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 se(function(){var t;return sr(this,function(n){switch(n.label){case 0:e({usersLoading:!0}),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,lQ("/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:l4(n.sent())}),[3,4];case 4:return[2]}})})()},switchUser:function(n){return se(function(){var r;return sr(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,lQ("/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:l4(r=a.sent())}),r;case 6:return[2]}})})()},loadHarnesses:function(){return se(function(){var n,r;return sr(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,lQ("/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(st(r=a.sent(),lH)&&401===r.status)return e({authenticated:!1,loading:!1,harnesses:[]}),[2];return e({loading:!1,error:l4(r)}),[3,5];case 5:return[2]}})})()},createProfile:function(e,n){return se(function(){return sr(this,function(r){switch(r.label){case 0:return[4,lQ(lB(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 se(function(){return sr(this,function(a){switch(a.label){case 0:return[4,lQ(lV(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 se(function(){return sr(this,function(r){switch(r.label){case 0:return[4,lQ(lV(e,n),{method:"DELETE"})];case 1:return r.sent(),[4,t().loadHarnesses()];case 2:return r.sent(),[2]}})})()},activateProfile:function(n,r){return se(function(){var a,o,i,l;return sr(this,function(s){switch(s.label){case 0:return[4,lQ("".concat(lV(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:[sa("notice.activated",t().currentUser,{harness:l,profile:r}),{key:"notice.activatedHint"}].concat(sn(i.warnings.map(l2)))}),[4,t().loadHarnesses()];case 2:return s.sent(),[2]}})})()},activateOfficial:function(n){return se(function(){var r,a,o,i;return sr(this,function(l){switch(l.label){case 0:return[4,lQ("/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:[sa("notice.officialRestored",t().currentUser,{harness:i}),{key:"notice.officialHint"}].concat(sn(o.warnings.map(l2)))}),[4,t().loadHarnesses()];case 2:return l.sent(),[2]}})})()},previewProfile:function(e,t){return se(function(){return sr(this,function(n){switch(n.label){case 0:return[4,lQ("".concat(lV(e,t),"/preview"))];case 1:return[2,n.sent().targets]}})})()},loadBackups:function(){return se(function(){var t;return sr(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,lQ(lK())];case 1:return e({backups:n.sent().items}),[3,3];case 2:return st(t=n.sent(),lH)&&401===t.status||e({error:l4(t)}),[3,3];case 3:return[2]}})})()},loadBackupDetail:function(e){return se(function(){return sr(this,function(t){return[2,lQ(lK(e))]})})()},restoreBackup:function(n){return se(function(){return sr(this,function(r){switch(r.label){case 0:return[4,lQ("".concat(lK(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 se(function(){var t;return sr(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,lQ(lW())];case 2:return e({providers:n.sent().items,providersLoading:!1}),[3,4];case 3:if(st(t=n.sent(),lH)&&401===t.status)return e({authenticated:!1,providersLoading:!1,providers:[]}),[2];return e({providersLoading:!1,providersError:l4(t)}),[3,4];case 4:return[2]}})})()},createProvider:function(e){return se(function(){return sr(this,function(n){switch(n.label){case 0:return[4,lQ(lW(),{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 se(function(){var r;return sr(this,function(a){switch(a.label){case 0:return[4,lQ(lq(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 se(function(){return sr(this,function(n){switch(n.label){case 0:return[4,lQ(lq(e),{method:"DELETE"})];case 1:return n.sent(),[4,t().loadProviders()];case 2:return n.sent(),[2]}})})()},revealProvider:function(e){return se(function(){return sr(this,function(t){return[2,lQ("".concat(lq(e),"/reveal"))]})})()},loadDoctor:function(n){return se(function(){var r,a,o;return sr(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,lQ(n?"/api/doctor?harness=".concat(encodeURIComponent(n)):"/api/doctor")];case 2:return a=i.sent(),e({doctor:sn((null!=(r=t().doctor)?r:[]).filter(function(e){return e.harness!==n})).concat(sn(a.items.filter(function(e){return e.harness===n}))),doctorUpdatedAvailable:a.updatedAvailable,doctorLoading:!1}),[3,4];case 3:if(st(o=i.sent(),lH)&&401===o.status)return e({authenticated:!1,doctorLoading:!1,doctor:[]}),[2];return e({doctorLoading:!1,doctorError:l4(o)}),[3,4];case 4:return[2]}})})()},loadDrift:function(){return se(function(){var t,n;return sr(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,lQ(lZ())];case 2:return e({drift:null!=(t=r.sent().items)?t:[],driftLoading:!1}),[3,4];case 3:if(st(n=r.sent(),lH)&&401===n.status)return e({authenticated:!1,driftLoading:!1,drift:[]}),[2];return e({driftLoading:!1,driftError:l4(n)}),[3,4];case 4:return[2]}})})()},reapplyDrift:function(n){return se(function(){var r,a,o;return sr(this,function(i){switch(i.label){case 0:return[4,lQ("".concat(lZ(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 se(function(){var r,a,o;return sr(this,function(i){switch(i.label){case 0:return[4,lQ("".concat(lZ(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 se(function(){var t;return sr(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,lQ(lJ())];case 2:return e({scan:n.sent().items,scanLoading:!1}),[3,4];case 3:if(st(t=n.sent(),lH)&&401===t.status)return e({authenticated:!1,scanLoading:!1,scan:[]}),[2];return e({scanLoading:!1,scanError:l4(t)}),[3,4];case 4:return[2]}})})()},importScan:function(e){return se(function(){var n;return sr(this,function(r){switch(r.label){case 0:return[4,lQ("".concat(lJ(),"/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 se(function(){var r,a,o;return sr(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,lQ(lG(n))];case 2:return a=i.sent(),e({operations:sn((null!=(r=t().operations)?r:[]).filter(function(e){return e.harness!==n})).concat(sn(a.items.filter(function(e){return e.harness===n}))),operationsLoading:!1}),[3,4];case 3:if(st(o=i.sent(),lH)&&401===o.status)return e({authenticated:!1,operationsLoading:!1,operations:[]}),[2];return e({operationsLoading:!1,operationsError:l4(o)}),[3,4];case 4:return[2]}})})()},undoOperation:function(n){return se(function(){var r,a,o;return sr(this,function(i){switch(i.label){case 0:return[4,lQ("".concat(lG(),"/").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})}}},l8(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 si(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 sl(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 si(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 si(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 ss(e){var t,n=e.harnessId,r=(0,x.s9)().locale,a=(0,x.Bd)().t,o=so(function(e){return e.backups}),i=so(function(e){return e.loadBackups}),l=so(function(e){return e.loadBackupDetail}),s=so(function(e){return e.restoreBackup}),u=sl((0,y.useState)(!1),2),c=u[0],d=u[1],f=sl((0,y.useState)(null),2),p=f[0],h=f[1],m=sl((0,y.useState)(null),2),v=m[0],b=m[1],w=sl((0,y.useState)(null),2),k=w[0],j=w[1],S=sl((0,y.useState)(!1),2),O=S[0],C=S[1],N=o.filter(function(e){return e.harness===n}),E=null!=(t=o.find(function(e){return e.id===p}))?t:null,P=M[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(l3(t,"backup.diffFailed"))}).finally(function(){e||C(!1)}),function(){e=!0}},[p,l]),(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(or,{className:"w-full justify-between",size:"sm",variant:"outline",onClick:function(){return d(!0)},children:[(0,g.jsx)(rN,{}),a("backup.history"),N.length>0?(0,g.jsx)(aR,{variant:"secondary",children:N.length}):null]}),(0,g.jsx)(ll,{open:c,onOpenChange:d,children:(0,g.jsxs)(l_,{className:"max-w-xl",children:[(0,g.jsxs)(lz,{children:[(0,g.jsx)(lA,{children:a("backup.historyTitle",{harness:P})}),(0,g.jsx)(lR,{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)(aR,{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)(or,{size:"sm",variant:"outline",className:"shrink-0",onClick:function(){return h(e.id)},children:a("backup.restore")})]},e.id)})})]})}),(0,g.jsx)(ll,{open:null!==E,onOpenChange:function(e){return!e&&h(null)},children:(0,g.jsxs)(l_,{className:"flex max-h-[85vh] w-[min(64rem,calc(100vw-2rem))] max-w-5xl flex-col overflow-hidden",children:[(0,g.jsxs)(lz,{children:[(0,g.jsx)(lA,{children:a("backup.restoreHistoryTitle")}),(0,g.jsx)(lR,{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:l6(a,k)}):null,v?(0,g.jsx)(aH,{files:v.files}):null]}),(0,g.jsxs)(lT,{children:[(0,g.jsx)(or,{variant:"outline",onClick:function(){return h(null)},children:a("common.cancel")}),(0,g.jsx)(or,{disabled:O||null!==k||null===v,onClick:function(){p&&s(p).then(function(){h(null),d(!1)})},children:a("backup.confirmRestore")})]})]})})]})}let su=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"}]]),sc=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"}]]),sd=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 sf={ok:"bg-emerald-500",warn:"bg-amber-500",error:"bg-red-500",unknown:"bg-slate-400"};function sp(e){var t,n=e.harnessId,r=e.open,a=e.onOpenChange,o=(0,x.Bd)().t,i=so(function(e){return e.doctor}),l=so(function(e){return e.doctorLoading}),s=so(function(e){return e.doctorError}),u=so(function(e){return e.doctorUpdatedAvailable}),c=so(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&&c(n)},[r,d,n,c]);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=M[n];return(0,g.jsx)(ll,{open:r,onOpenChange:a,children:(0,g.jsxs)(l_,{className:"flex max-h-[88vh] flex-col gap-0 overflow-hidden p-0 sm:max-w-2xl",children:[(0,g.jsxs)(lz,{className:"shrink-0 space-y-1.5 px-6 pb-4 pt-6 pr-12",children:[(0,g.jsx)(lA,{children:o("doctor.titleFor",{harness:p})}),(0,g.jsx)(lR,{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:l6(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)(aR,{variant:"secondary",children:o("doctor.countOk",{count:f.ok})}):null,f.warn>0?(0,g.jsx)(aR,{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)(aR,{variant:"destructive",children:o("doctor.countError",{count:f.error})}):null,f.unknown>0?(0,g.jsx)(aR,{variant:"outline",children:o("doctor.countUnknown",{count:f.unknown})}):null,u?(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)(sd,{className:"size-3.5"}),o("doctor.updateAvailable")]}):null]}),(0,g.jsx)(sh,{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)(lT,{className:"shrink-0 px-6 py-4",children:[(0,g.jsxs)(or,{variant:"outline",disabled:l,onClick:function(){c(n)},children:[(0,g.jsx)(sc,{className:l?"animate-spin":void 0}),o("doctor.rerun")]}),(0,g.jsx)(or,{onClick:function(){return a(!1)},children:o("doctor.close")})]})]})})}function sh(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:aT("mt-1.5 size-2 shrink-0 rounded-full",sf[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:l6(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 sm=Object.defineProperty,sg=(e,t)=>sm(e,"name",{value:t,configurable:!0}),[sy,sv]=of("AlertDialog",[la]),sb=la(),sx=sg(e=>{let{__scopeAlertDialog:t,...n}=e,r=sb(t);return(0,g.jsx)(ll,{...r,...n,modal:!0})},"AlertDialog");y.forwardRef(sg(function(e,t){let{__scopeAlertDialog:n,...r}=e,a=sb(n);return(0,g.jsx)(ls,{...a,...r,ref:t})},"AlertDialogTrigger"));var sw=sg(e=>{let{__scopeAlertDialog:t,...n}=e,r=sb(t);return(0,g.jsx)(lf,{...r,...n})},"AlertDialogPortal"),sk=y.forwardRef(sg(function(e,t){let{__scopeAlertDialog:n,...r}=e,a=sb(n);return(0,g.jsx)(lh,{...a,...r,ref:t})},"AlertDialogOverlay")),[sj,sS]=sy("AlertDialogContent"),sO=y.forwardRef(sg(function(e,t){let{__scopeAlertDialog:n,children:r,...a}=e,o=sb(n),i=aG(t,y.useRef(null)),l=y.useRef(null);return(0,g.jsx)(sj,{scope:n,cancelRef:l,children:(0,g.jsx)(lv,{role:"alertdialog",...o,...a,ref:i,onOpenAutoFocus:ol(a.onOpenAutoFocus,e=>{e.preventDefault(),l.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:r})})},"AlertDialogContent")),sC=y.forwardRef(sg(function(e,t){let{__scopeAlertDialog:n,...r}=e,a=sb(n);return(0,g.jsx)(lk,{...a,...r,ref:t})},"AlertDialogTitle")),sN=y.forwardRef(sg(function(e,t){let{__scopeAlertDialog:n,...r}=e,a=sb(n);return(0,g.jsx)(lj,{...a,...r,ref:t})},"AlertDialogDescription")),sE=y.forwardRef(sg(function(e,t){let{__scopeAlertDialog:n,...r}=e,a=sb(n);return(0,g.jsx)(lS,{...a,...r,ref:t})},"AlertDialogAction")),sP=y.forwardRef(sg(function(e,t){let{__scopeAlertDialog:n,...r}=e,{cancelRef:a}=sS("AlertDialogCancel",n),o=sb(n),i=aG(t,a);return(0,g.jsx)(lS,{...o,...r,ref:i})},"AlertDialogCancel"));function s_(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 sz(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 sT(e){var t=e.className,n=sz(e,["className"]);return(0,g.jsx)(sk,s_({"data-slot":"alert-dialog-overlay",className:aT("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 sA(e){var t=e.className,n=sz(e,["className"]);return(0,g.jsxs)(sw,{children:[(0,g.jsx)(sT,{}),(0,g.jsx)(sO,s_({"data-slot":"alert-dialog-content",className:aT("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 sR(e){var t=e.className,n=sz(e,["className"]);return(0,g.jsx)("div",s_({className:aT("flex flex-col space-y-2 text-center sm:text-left",t)},n))}function sL(e){var t=e.className,n=sz(e,["className"]);return(0,g.jsx)("div",s_({className:aT("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t)},n))}function sI(e){var t=e.className,n=sz(e,["className"]);return(0,g.jsx)(sC,s_({className:aT("text-lg font-semibold",t)},n))}function sM(e){var t=e.className,n=sz(e,["className"]);return(0,g.jsx)(sN,s_({className:aT("text-sm text-muted-foreground",t)},n))}function sD(e){var t=e.className,n=sz(e,["className"]);return(0,g.jsx)(sE,s_({className:aT(on(),t)},n))}function sF(e){var t=e.className,n=sz(e,["className"]);return(0,g.jsx)(sP,s_({className:aT(on({variant:"outline"}),"mt-2 sm:mt-0",t)},n))}function s$(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 s$(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 s$(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 sH(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 sB(e){var t,n=e.harness,r=e.open,a=e.onOpenChange,o=(0,x.Bd)().t,i=so(function(e){return e.drift}),l=so(function(e){return e.driftLoading}),s=so(function(e){return e.reapplyDrift}),u=so(function(e){return e.adoptDrift}),c=sU((0,y.useState)(null),2),d=c[0],f=c[1],p=sU((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)(ll,{open:r,onOpenChange:a,children:[(0,g.jsxs)(l_,{className:"flex max-h-[85vh] w-[min(64rem,calc(100vw-2rem))] max-w-5xl flex-col overflow-hidden",children:[(0,g.jsxs)(lz,{children:[(0,g.jsx)(lA,{children:o("drift.dialogTitle",{harness:n.label})}),(0,g.jsx)(lR,{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)(sV,{file:e},e.key)})}):null]}),h?(0,g.jsx)("p",{className:"text-sm text-destructive",children:l6(o,h)}):null,(0,g.jsxs)(lT,{children:[(0,g.jsx)(or,{variant:"outline",disabled:null===v||!w,onClick:function(){return f("adopt")},children:o("drift.adopt")}),(0,g.jsx)(or,{disabled:null===v||!w,onClick:function(){return f("reapply")},children:o("drift.reapply")})]})]}),(0,g.jsx)(sx,{open:"reapply"===d,onOpenChange:function(e){return!e&&f(null)},children:(0,g.jsxs)(sA,{children:[(0,g.jsxs)(sR,{children:[(0,g.jsx)(sI,{children:o("drift.reapplyTitle")}),(0,g.jsx)(sM,{children:o("drift.reapplyBody",{harness:n.label})})]}),(0,g.jsxs)(sL,{children:[(0,g.jsx)(sF,{children:o("common.cancel")}),(0,g.jsx)(sD,{onClick:function(){f(null),m(null),s(n.id).then(function(){return a(!1)}).catch(function(e){m(l3(e,"drift.reapplyFailed"))})},children:o("drift.confirmReapply")})]})]})}),(0,g.jsx)(sx,{open:"adopt"===d,onOpenChange:function(e){return!e&&f(null)},children:(0,g.jsxs)(sA,{children:[(0,g.jsxs)(sR,{children:[(0,g.jsx)(sI,{children:o("drift.adoptTitle")}),(0,g.jsx)(sM,{children:o("drift.adoptBody")})]}),(0,g.jsxs)(sL,{children:[(0,g.jsx)(sF,{children:o("common.cancel")}),(0,g.jsx)(sD,{onClick:function(){f(null),m(null),u(n.id).then(function(){return a(!1)}).catch(function(e){m(l3(e,"drift.adoptFailed"))})},children:o("drift.confirmAdopt")})]})]})})]})}function sV(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)(aR,{className:sH(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)(aH,{files:[{path:t.path,existed:null!==t.currentContent,content:t.expectedContent,currentContent:t.currentContent}]})]})}function sK(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 sW(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 sK(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 sK(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 sq(e){var t,n,r,a=e.harness,o=(0,x.Bd)().t,i=so(function(e){return e.doctor}),l=so(function(e){return e.doctorLoading}),s=so(function(e){return e.doctorError}),u=so(function(e){return e.loadDoctor}),c=so(function(e){return e.drift}),d=so(function(e){return e.driftLoading}),f=so(function(e){return e.driftError}),p=so(function(e){return e.loadDrift}),h=sW((0,y.useState)(!1),2),m=h[0],v=h[1],b=sW((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==c?void 0:c.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(){u(a.id)},[a.id,u]),(0,y.useEffect)(function(){null===c&&p()},[c,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)(su,{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)(or,{size:"icon",variant:"ghost","aria-label":o("doctor.rerun"),onClick:function(){u(a.id),p()},children:(0,g.jsx)(sc,{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:l6(o,s)}):null===j?(0,g.jsx)("p",{className:"text-sm text-muted-foreground",children:o("doctor.checking")}):(0,g.jsx)(sZ,{report:j}),f?(0,g.jsx)("p",{className:"text-sm text-destructive",children:l6(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)(sJ,{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)(or,{size:"sm",variant:"outline",disabled:null===j,onClick:function(){return v(!0)},children:o("doctor.viewDetails")}),C?(0,g.jsx)(or,{size:"sm",variant:"outline",onClick:function(){return k(!0)},children:o("drift.viewDiff")}):null]}),(0,g.jsx)(sp,{harnessId:a.id,open:m,onOpenChange:v}),(0,g.jsx)(sB,{harness:a,open:w,onOpenChange:k})]})}function sZ(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)(aR,{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 sJ(e){var t=e.report,n=(0,x.Bd)().t;if(!t.active)return(0,g.jsx)(aR,{variant:"secondary",children:n("harness.inactive")});if("in-sync"===t.status)return(0,g.jsx)(aR,{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)(aR,{variant:"outline",className:"border-amber-500/30 text-amber-700 dark:text-amber-300",children:n("drift.mismatch",{count:r})})}return(0,g.jsx)(aR,{className:sH(t.status),children:n("drift.status.".concat(t.status))})}let sG=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"}]]),sQ=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"}]]),sY=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"}]]),sX=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"}]]),s0=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 s1(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 s2(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 s1(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 s1(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 s4(e){var t,n=e.harness,r=e.profile,a=e.open,o=e.onOpenChange,i=(0,x.Bd)().t,l=so(function(e){return e.previewProfile}),s=so(function(e){return e.activateProfile}),u=so(function(e){return e.currentUser}),c=s2((0,y.useState)(null),2),d=c[0],f=c[1],p=s2((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(l4(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"!==aU(e)}).length;return(0,g.jsx)(sx,{open:a,onOpenChange:o,children:(0,g.jsxs)(sA,{className:"max-h-[85dvh] overflow-y-auto sm:max-w-2xl",children:[(0,g.jsxs)(sR,{children:[(0,g.jsx)(sI,{children:i("activate.title")}),(0,g.jsx)(sM,{children:i("activate.body",{harness:n.label,profile:r.name,changed:b>0?i("activate.changedFiles",{count:b}):"",user:u||i("notice.currentUser")})})]}),h?(0,g.jsx)("p",{className:"text-sm text-destructive",children:i("activate.loadFailed",{reason:l6(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)(aH,{files:v})}),(0,g.jsxs)(sL,{children:[(0,g.jsx)(sF,{children:i("common.cancel")}),(0,g.jsx)(sD,{onClick:function(){s(n.id,r.name),o(!1)},children:i("activate.confirm")})]})]})})}function s3(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 s5(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 s6(e){var t=e.className,n=s5(e,["className"]);return(0,g.jsx)("div",s3({"data-slot":"card",className:aT("rounded-2xl border bg-card text-card-foreground shadow-[0_12px_34px_-26px_rgb(36_39_70/0.38)]",t)},n))}function s8(e){var t=e.className,n=s5(e,["className"]);return(0,g.jsx)("div",s3({"data-slot":"card-title",className:aT("font-semibold leading-none tracking-tight",t)},n))}function s9(e){var t=e.className,n=s5(e,["className"]);return(0,g.jsx)("div",s3({"data-slot":"card-description",className:aT("text-sm text-muted-foreground",t)},n))}function s7(e){var t=e.className,n=s5(e,["className"]);return(0,g.jsx)("div",s3({"data-slot":"card-content",className:aT("p-5 pt-0",t)},n))}function ue(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 ut(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 ue(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 ue(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 un(e){var t,n,r,a,o,i,l,s,u,c=e.harness,d=e.onAdd,f=e.onEdit,p=e.extraActions,h=(0,x.Bd)().t,m=so(function(e){return e.activateOfficial}),v=so(function(e){return e.deleteProfile}),b=ut((0,y.useState)(null),2),w=b[0],k=b[1],j=ut((0,y.useState)(null),2),S=j[0],O=j[1],C=(null==(r=c.active)?void 0:r.official)?h("harness.official"):null!=(t=null==(a=c.active)?void 0:a.name)?t:null;return(0,g.jsxs)("div",{className:"space-y-6",children:[(0,g.jsx)(s6,{className:"overflow-hidden border-primary/10",children:(0,g.jsxs)(s7,{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)(s8,{className:"mt-3 truncate text-xl",children:null===C?h("harness.inactive"):h("harness.activeNamed",{name:C})}),(0,g.jsx)(s9,{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=c.targets[0])?void 0:o.path)?n:h("harness.noTargetFile")}),c.targets.length>1?(0,g.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:h("harness.moreFiles",{count:c.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)(sG,{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:c.profiles.length})})]}),p]}),(0,g.jsxs)("div",{className:"space-y-3",children:[c.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)(sQ,{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=c.active)?void 0:i.official)?(0,g.jsx)(aR,{variant:"secondary",children:h("harness.active")}):null]}),(0,g.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:"claude"===c.id?h("harness.officialHintClaude"):h("harness.officialHintCodex")})]})]}),(0,g.jsx)(or,{size:"sm",variant:(null==(l=c.active)?void 0:l.official)?"secondary":"outline",disabled:null==(s=c.active)?void 0:s.official,onClick:function(){m(c.id)},children:(null==(u=c.active)?void 0:u.official)?h("harness.officialActive"):h("harness.officialSwitch")})]}):null,0===c.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)(or,{className:"mt-4",size:"sm",onClick:d,children:[(0,g.jsx)(z,{}),h("harness.newProfile")]})]}):c.profiles.map(function(e){var t,n,r=(null==(t=c.active)?void 0:t.official)!==!0&&(null==(n=c.active)?void 0:n.name)===e.name;return(0,g.jsxs)("div",{className:aT("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:aT("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)(aR,{children:h("harness.active")}):null,e.overriddenTargets.length>0?(0,g.jsx)(aR,{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)(or,{size:"sm",variant:r?"secondary":"outline",onClick:function(){return O(e)},children:[r?null:(0,g.jsx)(sY,{}),r?h("harness.active"):h("harness.activate")]}),(0,g.jsx)(or,{size:"icon",variant:"ghost","aria-label":h("harness.edit",{name:e.name}),onClick:function(){return f(e)},children:(0,g.jsx)(sX,{})}),(0,g.jsx)(or,{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)(s0,{className:r?void 0:"text-destructive"})})]})]},e.name)})]})]}),S?(0,g.jsx)(s4,{harness:c,profile:S,open:!0,onOpenChange:function(e){return!e&&O(null)}}):null,(0,g.jsx)(sx,{open:null!==w,onOpenChange:function(e){return!e&&k(null)},children:(0,g.jsxs)(sA,{children:[(0,g.jsxs)(sR,{children:[(0,g.jsx)(sI,{children:h("harness.deleteTitle")}),(0,g.jsx)(sM,{children:h("harness.deleteBody",{harness:c.label,profile:null!=w?w:"",extra:"additive"===c.mode?h("harness.deleteAdditiveExtra"):""})})]}),(0,g.jsxs)(sL,{children:[(0,g.jsx)(sF,{children:h("common.cancel")}),(0,g.jsx)(sD,{onClick:function(){w&&v(c.id,w)},children:h("common.delete")})]})]})})]})}function ur(e){return(ur="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 ua=["size","style"];function uo(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 ui(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uo(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"!=ur(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ur(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ur(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)):uo(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ul=(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,ua);return(0,g.jsxs)("svg",ui(ui({height:n,style:ui({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 us=/\p{Lu}?\p{Ll}+|[0-9]+|\p{Lu}+(?!\p{Ll})|\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{L}+/gu;var uu=function(e){var t=(0,y.useId)(),n="lobe-icons-".concat(Array.from(e.match(us)??[]).map(e=>e.toLowerCase()).join("-"),"-").concat(t);return(0,y.useMemo)(function(){return{fill:"url(#".concat(n,")"),id:n}},[e])},uc="Codex";function ud(e){return(ud="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 uf=["size","style"];function up(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 uh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?up(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"!=ud(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ud(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ud(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)):up(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var um=(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,uf),o=uu(uc),i=o.id,l=o.fill;return(0,g.jsxs)("svg",uh(uh({height:n,style:uh({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:uc}),(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 ug(e){return(ug="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 uy=["size","style"];function uv(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 ub(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uv(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"!=ug(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ug(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ug(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)):uv(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ux=(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,uy);return(0,g.jsxs)("svg",ub(ub({height:n,style:ub({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 uw(e){return(uw="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 uk=["size","style"];function uj(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 uS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uj(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"!=uw(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=uw(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==uw(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)):uj(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var uO=(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,uk);return(0,g.jsxs)("svg",uS(uS({fill:"currentColor",fillRule:"evenodd",height:n,style:uS({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 uC(e){return(uC="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 uN=["size","style"];function uE(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 uP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uE(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"!=uC(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=uC(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==uC(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)):uE(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var u_={claude:ul,codex:um,kimi:uO,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,uN);return(0,g.jsxs)("svg",uP(uP({fill:"currentColor",fillRule:"evenodd",height:n,style:uP({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:ux};function uz(e){var t=e.id,n=e.className,r=u_[t];return(0,g.jsx)(r,{"aria-hidden":!0,className:aT("size-5",n)})}let uT=O("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),uA=O("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);function uR(e){let[t,n]=y.useState(void 0);return oh(()=>{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)(uR,"name",{value:"useSize",configurable:!0});var uL=Object.defineProperty,uI=(e,t)=>uL(e,"name",{value:t,configurable:!0}),uM="Checkbox",[uD,uF]=of(uM),[u$,uU]=uD(uM);function uH(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:a,disabled:o,form:i,name:l,onCheckedChange:s,required:u,value:c="on",internal_do_not_use_render:d}=e,[f,p]=oC({prop:n,defaultProp:a??!1,onChange:s,caller:uM}),[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:c,hasConsumerStoppedPropagationRef:x,userInteractionCount:w,onUserInteraction:k,required:u,defaultChecked:!uZ(a)&&a,isFormControl:j,bubbleInput:v,setBubbleInput:b};return(0,g.jsx)(u$,{scope:t,...S,children:uq(d)?d(S):r})}uI(uH,"CheckboxProvider");var uB=y.forwardRef(uI(function({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},a){let{control:o,value:i,disabled:l,checked:s,required:u,setControl:c,setChecked:d,hasConsumerStoppedPropagationRef:f,onUserInteraction:p,isFormControl:h,bubbleInput:m}=uU("CheckboxTrigger",e),v=aG(a,c),b=y.useRef(s);return y.useEffect(()=>{let e=o?.form;if(e){let t=uI(()=>d(b.current),"reset");return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[o,d]),(0,g.jsx)(oT.button,{type:"button",role:"checkbox","aria-checked":uZ(s)?"mixed":s,"aria-required":u,"data-state":uJ(s),"data-disabled":l?"":void 0,disabled:l,value:i,...r,ref:v,onKeyDown:ol(t,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:ol(n,e=>{p(),d(e=>!!uZ(e)||!e),m&&h&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})},"CheckboxTrigger")),uV=y.forwardRef(uI(function(e,t){let{__scopeCheckbox:n,name:r,checked:a,defaultChecked:o,required:i,disabled:l,value:s,onCheckedChange:u,form:c,...d}=e;return(0,g.jsx)(uH,{__scopeCheckbox:n,checked:a,defaultChecked:o,disabled:l,required:i,onCheckedChange:u,name:r,form:c,value:s,internal_do_not_use_render:({isFormControl:e})=>(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(uB,{...d,ref:t,__scopeCheckbox:n}),e&&(0,g.jsx)(uW,{__scopeCheckbox:n})]})})},"Checkbox")),uK=y.forwardRef(uI(function(e,t){let{__scopeCheckbox:n,forceMount:r,...a}=e,o=uU("CheckboxIndicator",n);return(0,g.jsx)(io,{present:r||uZ(o.checked)||!0===o.checked,children:(0,g.jsx)(oT.span,{"data-state":uJ(o.checked),"data-disabled":o.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})},"CheckboxIndicator")),uW=y.forwardRef(uI(function({__scopeCheckbox:e,onClick:t,...n},r){let{control:a,hasConsumerStoppedPropagationRef:o,userInteractionCount:i,checked:l,defaultChecked:s,required:u,disabled:c,name:d,value:f,form:p,bubbleInput:h,setBubbleInput:m}=uU("CheckboxBubbleInput",e),v=aG(r,m),b=uR(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=uZ(l),e.call(h,!uZ(l)&&l),h.dispatchEvent(n),x.current=!1}},[h,l,o,i]);let j=y.useRef(!uZ(l)&&l);return(0,g.jsx)(oT.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??j.current,required:u,disabled:c,name:d,value:f,form:p,...n,tabIndex:-1,ref:v,onClick:ol(t,e=>{x.current&&e.stopPropagation()}),style:{...n.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"CheckboxBubbleInput"));function uq(e){return"function"==typeof e}function uZ(e){return"indeterminate"===e}function uJ(e){return uZ(e)?"indeterminate":e?"checked":"unchecked"}uI(uq,"isFunction"),uI(uZ,"isIndeterminate"),uI(uJ,"getState");let uG=O("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);function uQ(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)(uV,(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:aT("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)(uK,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current",children:(0,g.jsx)(uG,{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 uY(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:aT("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))}var uX=Object.defineProperty,u0=y.forwardRef(uX(function(e,t){return(0,g.jsx)(oT.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 u1(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)(u0,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:aT("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",t)},n))}function u2(e,[t,n]){return Math.min(n,Math.max(t,e))}(0,Object.defineProperty)(u2,"name",{value:"clamp",configurable:!0});var u4=Object.defineProperty,u3=(e,t)=>u4(e,"name",{value:t,configurable:!0});function u5(e){let t=e+"CollectionProvider",[n,r]=of(t),[a,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=u3(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=aX(l),u=y.forwardRef((e,t)=>{let{scope:n,children:r}=e,a=aG(t,o(l,n).collectionRef);return(0,g.jsx)(s,{ref:a,children:r})});u.displayName=l;let c=e+"CollectionItemSlot",d="data-radix-collection-item",f=aX(c),p=y.forwardRef((e,t)=>{let{scope:n,children:r,...a}=e,i=y.useRef(null),l=aG(t,i),s=o(c,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=c,u3(h,"useCollection"),[{Provider:i,Slot:u,ItemSlot:p},h,r]}u3(u5,"createCollection");var u6=new WeakMap,u8=class e extends Map{static{u3(this,"OrderedDict")}#e;constructor(e){super(e),this.#e=[...super.keys()],u6.set(this,!0)}set(e,t){return u6.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=ce(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 u=this.size+ +!a;i<0&&l++;let c=[...this.#e],d=!1;for(let e=l;e<u;e++)if(l===e){let o=c[e];c[e]===t&&(o=c[e+1]),a&&this.delete(t),r=this.get(o),this.set(t,n)}else{d||c[e-1]!==t||(d=!0);let n=c[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=u9(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=u9(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return u9(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 u9(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let n=u7(e,t);return -1===n?void 0:e[n]}function u7(e,t){let n=e.length,r=ce(t),a=r>=0?r:n+r;return a<0||a>=n?-1:a}function ce(e){return e!=e||0===e?0:Math.trunc(e)}function ct(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 cn(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function cr(e,t){return e[1].element&&t[1].element?cn(e[1].element,t[1].element)?-1:1:0}function ca(e){return new MutationObserver(t=>{for(let n of t)if("childList"===n.type)return void e()})}u3(u9,"at"),u3(u7,"toSafeIndex"),u3(ce,"toSafeInteger"),u3(function(e){let t=e+"CollectionProvider",[n,r]=of(t),[a,o]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new u8,setItemMap:u3(()=>void 0,"setItemMap")}),i=u3(({state:e,...t})=>e?(0,g.jsx)(s,{...t,state:e}):(0,g.jsx)(l,{...t}),"CollectionProvider");i.displayName=t;let l=u3(e=>{let t=m();return(0,g.jsx)(s,{...e,state:t})},"CollectionInit");l.displayName=t+"Init";let s=u3(e=>{let{scope:t,children:n,state:r}=e,o=y.useRef(null),[i,l]=y.useState(null),s=aG(o,l),[u,c]=r;return y.useEffect(()=>{if(!i)return;let e=ca(()=>{});return e.observe(i,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[i]),(0,g.jsx)(a,{scope:t,itemMap:u,setItemMap:c,collectionRef:s,collectionRefObject:o,collectionElement:i,children:n})},"CollectionProviderImpl");s.displayName=t+"Impl";let u=e+"CollectionSlot",c=aX(u),d=y.forwardRef((e,t)=>{let{scope:n,children:r}=e,a=aG(t,o(u,n).collectionRef);return(0,g.jsx)(c,{ref:a,children:r})});d.displayName=u;let f=e+"CollectionItemSlot",p=aX(f),h=y.forwardRef((e,t)=>{let{scope:n,children:r,...a}=e,i=y.useRef(null),[l,s]=y.useState(null),u=aG(t,i,s),{setItemMap:c}=o(f,n),d=y.useRef(a);ct(d.current,a)||(d.current=a);let h=d.current;return y.useEffect(()=>(c(e=>l?e.has(l)?e.set(l,{...h,element:l}).toSorted(cr):(e.set(l,{...h,element:l}),e.toSorted(cr)):e),()=>{c(e=>l&&e.has(l)?(e.delete(l),new u8(e)):e)}),[l,h,c]),(0,g.jsx)(p,{"data-radix-collection-item":"",ref:u,children:r})});function m(){return y.useState(new u8)}function v(t){let{itemMap:n}=o(e+"CollectionConsumer",t);return n}return h.displayName=f,u3(m,"useInitCollection"),u3(v,"useCollection"),[{Provider:i,Slot:d,ItemSlot:h},{createCollectionScope:r,useCollection:v,useInitCollection:m}]},"createCollection"),u3(ct,"shallowEqual"),u3(cn,"isElementPreceding"),u3(cr,"sortByDocumentPosition"),u3(ca,"getChildListObserver");var co=Object.defineProperty,ci=y.createContext(void 0);function cl(e){let t=y.useContext(ci);return e||t||"ltr"}co(cl,"name",{value:"useDirection",configurable:!0});let cs=["top","right","bottom","left"],cu=Math.min,cc=Math.max,cd=Math.round,cf=Math.floor,cp=e=>({x:e,y:e}),ch={left:"right",right:"left",bottom:"top",top:"bottom"};function cm(e,t){return"function"==typeof e?e(t):e}function cg(e){return e.split("-")[0]}function cy(e){return e.split("-")[1]}function cv(e){return"x"===e?"y":"x"}function cb(e){return"y"===e?"height":"width"}function cx(e){let t=e[0];return"t"===t||"b"===t?"y":"x"}function cw(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}let ck=["left","right"],cj=["right","left"],cS=["top","bottom"],cO=["bottom","top"];function cC(e){let t=cg(e);return ch[t]+e.slice(t.length)}function cN(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 cE(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 cP(e,t,n){let r,{reference:a,floating:o}=e,i=cx(t),l=cv(cx(t)),s=cb(l),u=cg(t),c=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(u){case"top":r={x:c,y:a.y-o.height};break;case"bottom":r={x:c,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=cy(t);return p&&(r[l]+=f*("end"===p?1:-1)*(n&&"y"===i?-1:1)),r}async function c_(e,t){var n;void 0===t&&(t={});let{x:r,y:a,platform:o,rects:i,elements:l,strategy:s}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=cm(t,e),h=cN(p),m=l[f?"floating"===d?"reference":"floating":d],g=cE(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:u,rootBoundary:c,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=cE(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 cz=async(e,t,n)=>{let{placement:r="bottom",strategy:a="absolute",middleware:o=[],platform:i}=n,l=i.detectOverflow?i:{...i,detectOverflow:c_},s=await (null==i.isRTL?void 0:i.isRTL(t)),u=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:c,y:d}=cP(u,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:c,y:d,initialPlacement:r,placement:f,strategy:a,middlewareData:h,rects:u,platform:l,elements:{reference:e,floating:t}});c=null!=v?v:c,d=null!=b?b:d,h[g]={...h[g],...x},w&&p<50&&(p++,"object"==typeof w&&(w.placement&&(f=w.placement),w.rects&&(u=!0===w.rects?await i.getElementRects({reference:e,floating:t,strategy:a}):w.rects),{x:c,y:d}=cP(u,f,s)),n=-1)}return{x:c,y:d,placement:f,strategy:a,middlewareData:h}};function cT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function cA(e){return cs.some(t=>e[t]>=0)}let cR=new Set(["left","top"]);async function cL(e,t){let{placement:n,platform:r,elements:a}=e,o=await (null==r.isRTL?void 0:r.isRTL(a.floating)),i=cg(n),l=cy(n),s="y"===cx(n),u=cR.has(i)?-1:1,c=o&&s?-1:1,d=cm(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*c,y:f*u}:{x:f*u,y:p*c}}function cI(){return"u">typeof window}function cM(e){return c$(e)?(e.nodeName||"").toLowerCase():"#document"}function cD(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function cF(e){var t;return null==(t=(c$(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function c$(e){return!!cI()&&(e instanceof Node||e instanceof cD(e).Node)}function cU(e){return!!cI()&&(e instanceof Element||e instanceof cD(e).Element)}function cH(e){return!!cI()&&(e instanceof HTMLElement||e instanceof cD(e).HTMLElement)}function cB(e){return!(!cI()||"u"<typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof cD(e).ShadowRoot)}function cV(e){let{overflow:t,overflowX:n,overflowY:r,display:a}=cY(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==a&&"contents"!==a}function cK(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}let cW=/transform|translate|scale|rotate|perspective|filter/,cq=/paint|layout|strict|content/,cZ=e=>!!e&&"none"!==e;function cJ(e){let t=cU(e)?cY(e):e;return cZ(t.transform)||cZ(t.translate)||cZ(t.scale)||cZ(t.rotate)||cZ(t.perspective)||!cG()&&(cZ(t.backdropFilter)||cZ(t.filter))||cW.test(t.willChange||"")||cq.test(t.contain||"")}function cG(){return null==e&&(e="u">typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),e}function cQ(e){return/^(html|body|#document)$/.test(cM(e))}function cY(e){return cD(e).getComputedStyle(e)}function cX(e){return cU(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function c0(e){if("html"===cM(e))return e;let t=e.assignedSlot||e.parentNode||cB(e)&&e.host||cF(e);return cB(t)?t.host:t}function c1(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let a=function e(t){let n=c0(t);return cQ(n)?(t.ownerDocument||t).body:cH(n)&&cV(n)?n:e(n)}(e),o=a===(null==(r=e.ownerDocument)?void 0:r.body),i=cD(a);if(!o)return t.concat(a,c1(a,[],n));{let e=c2(i);return t.concat(i,i.visualViewport||[],cV(a)?a:[],e&&n?c1(e):[])}}function c2(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function c4(e){let t=cY(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,a=cH(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 c3(e){return cU(e)?e:e.contextElement}function c5(e){let t=c3(e);if(!cH(t))return cp(1);let n=t.getBoundingClientRect(),{width:r,height:a,$:o}=c4(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 c6=cp(0);function c8(e){let t=cD(e);return cG()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:c6}function c9(e,t,n,r){var a;void 0===t&&(t=!1),void 0===n&&(n=!1);let o=e.getBoundingClientRect(),i=c3(e),l=cp(1);t&&(r?cU(r)&&(l=c5(r)):l=c5(e));let s=(void 0===(a=n)&&(a=!1),r&&a&&r===cD(i))?c8(i):cp(0),u=(o.left+s.x)/l.x,c=(o.top+s.y)/l.y,d=o.width/l.x,f=o.height/l.y;if(i&&r){let e=cD(i),t=cU(r)?cD(r):r,n=e,a=c2(n);for(;a&&t!==n;){let e=c5(a),t=a.getBoundingClientRect(),r=cY(a),o=t.left+(a.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(a.clientTop+parseFloat(r.paddingTop))*e.y;u*=e.x,c*=e.y,d*=e.x,f*=e.y,u+=o,c+=i,a=c2(n=cD(a))}}return cE({width:d,height:f,x:u,y:c})}function c7(e,t){let n=cX(e).scrollLeft;return t?t.left+n:c9(cF(e)).left+n}function de(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-c7(e,n),y:n.top+t.scrollTop}}function dt(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=cD(e),o=cF(e),i=a.visualViewport,l=o.clientWidth,s=o.clientHeight,u=0,c=0;if(i){let e=!cG()||"fixed"===t;r?e||(u=-i.offsetLeft,c=-i.offsetTop):(l=i.width,s=i.height,e&&(u=i.offsetLeft,c=i.offsetTop))}if(0>=c7(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:u,y:c}}(e,n,t);else if("document"===t){let t,n,o,i,l,s;t=cX(r=cF(e)),n=r.ownerDocument.body,o=cc(r.scrollWidth,r.clientWidth,n.scrollWidth,n.clientWidth),i=cc(r.scrollHeight,r.clientHeight,n.scrollHeight,n.clientHeight),l=-t.scrollLeft+c7(r),s=-t.scrollTop,"rtl"===cY(n).direction&&(l+=cc(r.clientWidth,n.clientWidth)-o),a={width:o,height:i,x:l,y:s}}else if(cU(t)){let e,r,o,i,l,s;r=(e=c9(t,!0,"fixed"===n)).top+t.clientTop,o=e.left+t.clientLeft,i=c5(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=c8(e);a={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return cE(a)}function dn(e){return"static"===cY(e).position}function dr(e,t){if(!cH(e)||"fixed"===cY(e).position)return null;if(t)return t(e);let n=e.offsetParent;return cF(e)===n&&(n=n.ownerDocument.body),n}function da(e,t){var n;let r=cD(e);if(cK(e))return r;if(!cH(e)){let t=c0(e);for(;t&&!cQ(t);){if(cU(t)&&!dn(t))return t;t=c0(t)}return r}let a=dr(e,t);for(;a&&(n=a,/^(table|td|th)$/.test(cM(n)))&&dn(a);)a=dr(a,t);return a&&cQ(a)&&dn(a)&&!cJ(a)?r:a||function(e){let t=c0(e);for(;cH(t)&&!cQ(t);){if(cJ(t))return t;if(cK(t))break;t=c0(t)}return null}(e)||r}let di=async function(e){let t=this.getOffsetParent||da,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=cH(t),a=cF(t),o="fixed"===n,i=c9(e,!0,o,t),l={scrollLeft:0,scrollTop:0},s=cp(0);if((r||!o)&&(("body"!==cM(t)||cV(a))&&(l=cX(t)),r)){let e=c9(t,!0,o,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}!r&&a&&(s.x=c7(a));let u=!a||r||o?cp(0):de(a,l);return{x:i.left+l.scrollLeft-s.x-u.x,y:i.top+l.scrollTop-s.y-u.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}}},dl={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e,o="fixed"===a,i=cF(r),l=!!t&&cK(t.floating);if(r===i||l&&o)return n;let s={scrollLeft:0,scrollTop:0},u=cp(1),c=cp(0),d=cH(r);if((d||!o)&&(("body"!==cM(r)||cV(i))&&(s=cX(r)),d)){let e=c9(r);u=c5(r),c.x=e.x+r.clientLeft,c.y=e.y+r.clientTop}let f=!i||d||o?cp(0):de(i,s);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-s.scrollLeft*u.x+c.x+f.x,y:n.y*u.y-s.scrollTop*u.y+c.y+f.y}},getDocumentElement:cF,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e,o=[..."clippingAncestors"===n?cK(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=c1(e,[],!1).filter(e=>cU(e)&&"body"!==cM(e)),a=null,o="fixed"===cY(e).position,i=o?c0(e):e;for(;cU(i)&&!cQ(i);){let e=cY(i),t=cJ(i),n=a?a.position:o?"fixed":"";t||"fixed"!==n&&("absolute"!==n||"static"!==e.position)?a=e:r=r.filter(e=>e!==i),i=c0(i)}return t.set(e,r),r}(t,this._c):[].concat(n),r],i=dt(t,o[0],a),l=i.top,s=i.right,u=i.bottom,c=i.left;for(let e=1;e<o.length;e++){let n=dt(t,o[e],a);l=cc(n.top,l),s=cu(n.right,s),u=cu(n.bottom,u),c=cc(n.left,c)}return{width:s-c,height:u-l,x:c,y:l}},getOffsetParent:da,getElementRects:di,getClientRects:function(e){return e.getClientRects?Array.from(e.getClientRects()):[]},getDimensions:function(e){let{width:t,height:n}=c4(e);return{width:t,height:n}},getScale:c5,isElement:cU,isRTL:function(e){return"rtl"===cY(e).direction}};function ds(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}let du=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:u,padding:c=0}=cm(e,t)||{};if(null==u)return{};let d=cN(c),f={x:n,y:r},p=cv(cx(a)),h=cb(p),m=await i.getDimensions(u),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(u)),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=cu(d[g?"top":"left"],k),S=cu(d[g?"bottom":"right"],k),O=w-m[h]-S,C=w/2-m[h]/2+(v/2-b/2),N=cc(j,cu(C,O)),E=!s.arrow&&null!=cy(a)&&C!==N&&o.reference[h]/2-(C<j?j:S)-m[h]/2<0,P=E?C<j?C-j:C-O:0;return{[p]:f[p]+P,data:{[p]:N,centerOffset:C-N-P,...E&&{alignmentOffset:P}},reset:E}}});var dc="u">typeof document?y.useLayoutEffect:function(){};function dd(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(!dd(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)&&!dd(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function df(e){return"u"<typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function dp(e,t){let n=df(e);return Math.round(t*n)/n}function dh(e){let t=y.useRef(e);return dc(()=>{t.current=e}),t}var dm=Object.defineProperty,dg=(e,t)=>dm(e,"name",{value:t,configurable:!0}),dy="Popper",[dv,db]=of(dy),[dx,dw]=dv(dy),dk=dg(e=>{let{__scopePopper:t,children:n}=e,[r,a]=y.useState(null),[o,i]=y.useState(void 0);return(0,g.jsx)(dx,{scope:t,anchor:r,onAnchorChange:a,placementState:o,setPlacementState:i,children:n})},"Popper"),dj=y.forwardRef(dg(function(e,t){let{__scopePopper:n,virtualRef:r,...a}=e,o=dw("PopperAnchor",n),i=y.useRef(null),l=o.onAnchorChange,s=aG(t,y.useCallback(e=>{i.current=e,e&&l(e)},[l])),u=y.useRef(null);y.useEffect(()=>{if(!r)return;let e=u.current;u.current=r.current,e!==u.current&&l(u.current)});let c=o.placementState&&d_(o.placementState),d=c?.[0],f=c?.[1];return r?null:(0,g.jsx)(oT.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...a,ref:s})},"PopperAnchor")),dS="PopperContent",[dO,dC]=dv(dS),dN=y.forwardRef(dg(function(e,t){var n,r,a,o,i,l,s,u,c,d,f,p,h,m,v,b,x,w,k,j,S;let O,C,N,E,P,_,{__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,...V}=e,K=dw(dS,z),[W,q]=y.useState(null),Z=aG(t,q),[J,G]=y.useState(null),Q=uR(J),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(dE),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:u}=e,[c,d]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=y.useState(r);dd(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(c),C=null!=s,N=dh(s),E=dh(a),P=dh(u),_=y.useCallback(()=>{var e,r;let a,o,i;if(!j.current||!S.current)return;let l={placement:t,strategy:n,middleware:f};E.current&&(l.platform=E.current),(e=j.current,r=S.current,a=new Map,o=null!=l?l:{},i={...dl,...o.platform,_c:a},cz(e,r,{...o,platform:i})).then(e=>{let t={...e,isPositioned:!1!==P.current};z.current&&!dd(O.current,t)&&(O.current=t,o_.flushSync(()=>{d(t)}))})},[f,t,n,E,P]);dc(()=>{!1===u&&O.current.isPositioned&&(O.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[u]);let z=y.useRef(!1);dc(()=>(z.current=!0,()=>{z.current=!1}),[]),dc(()=>{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=dp(A.floating,c.x),r=dp(A.floating,c.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...df(A.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,l,A.floating,c.x,c.y]);return y.useMemo(()=>({...c,update:_,refs:T,elements:A,floatingStyles:R}),[c,_,T,A,R])}({strategy:"fixed",placement:T+("center"!==R?"-"+R:""),whileElementsMounted:dg((...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:u=!1}=r,c=c3(e),d=o||i?[...c?c1(c):[],...t?c1(t):[]]:[];d.forEach(e=>{o&&e.addEventListener("scroll",n),i&&e.addEventListener("resize",n)});let f=c&&s?function(e,t,n){let r,a=null,o=cF(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 u=e.getBoundingClientRect(),{left:c,top:d,width:f,height:p}=u;if(n||t(),!f||!p)return;let h={rootMargin:-cf(d)+"px "+-cf(o.clientWidth-(c+f))+"px "+-cf(o.clientHeight-(d+p))+"px "+-cf(c)+"px",threshold:cc(0,cu(1,s))||1},m=!0;function g(t){let n=t[0].intersectionRatio;if(!ds(u,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=cD(e),u=()=>l(n);return s.addEventListener("resize",u),l(!0),()=>{s.removeEventListener("resize",u),i()}}(c,n,i):null,p=-1,h=null;l&&(h=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&h&&t&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=h)||e.observe(t)})),n()}),c&&!u&&h.observe(c),t&&h.observe(t));let m=u?c9(e):null;return u&&function t(){let r=c9(e);m&&!ds(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,u&&cancelAnimationFrame(a)}})(...e,{animationFrame:"always"===H}),"whileElementsMounted"),elements:{reference:K.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 cL(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:c=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:u,middlewareData:c}=e,{offset:d=0,mainAxis:f=!0,crossAxis:p=!0}=cm(l,e),h={x:o,y:i},m=cx(s),g=cv(m),y=h[g],v=h[m],b=cm(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=u.reference[g]-u.floating[e]+x.mainAxis,n=u.reference[g]+u.reference[e]-x.mainAxis;y<t?y=t:y>n&&(y=n)}if(p){let e="y"===g?"width":"height",t=cR.has(cg(s)),n=u.reference[m]-u.floating[e]+(t&&(null==(r=c.offset)?void 0:r[m])||0)+(t?0:x.crossAxis),o=u.reference[m]+u.reference[e]+(t?0:(null==(a=c.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}=cm(c,e),u={x:t,y:n},d=await a.detectOverflow(e,s),f=cx(r),p=cv(f),h=u[p],m=u[f],g=(e,t)=>cc(t+d["y"===e?"top":"left"],cu(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,u]},M&&{name:(N={name:"flip",options:p=d={...er},async fn(e){var t,n,r,a,o,i,l,s;let u,c,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}=cm(p,e);if(null!=(t=h.arrow)&&t.alignmentOffset)return{};let C=cg(f),N=cx(g),E=cg(g)===g,P=await (null==y.isRTL?void 0:y.isRTL(v.floating)),_=w||(E||!S?[cC(g)]:(u=cC(g),[cw(g),u,cw(u)])),z="none"!==j;!w&&z&&_.push(...(c=cy(g),d=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?cj:ck;return t?ck:cj;case"left":case"right":return t?cS:cO;default:return[]}}(cg(g),"start"===j,P),c&&(d=d.map(e=>e+"-"+c),S&&(d=d.concat(d.map(cw)))),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=P)&&(s=!1),e=cy(i),n=cb(t=cv(cx(i))),r="x"===t?e===(s?"end":"start")?"right":"left":"start"===e?"bottom":"top",l.reference[n]>l.floating[n]&&(r=cC(r)),[r,cC(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===cx(t)||L.every(e=>cx(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=cx(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:(E={name:"size",options:v=h={...er,apply:dg(({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}=cm(v,e),u=await o.detectOverflow(e,s),c=cg(r),d=cy(r),f="y"===cx(r),{width:p,height:h}=a.floating;"top"===c||"bottom"===c?(t=c,n=d===(await (null==o.isRTL?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(n=c,t="end"===d?"top":"bottom");let m=h-u.top-u.bottom,g=p-u.left-u.right,y=cu(h-u[t],m),b=cu(p-u[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*cc(u.left,u.right):k=h-2*cc(u.top,u.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:E.fn,options:[h,m]},J&&{name:(P={name:"arrow",options:w=b={element:J,padding:I},fn(e){let{element:t,padding:n}="function"==typeof w?w(e):w;return t&&({}).hasOwnProperty.call(t,"current")?null!=t.current?du({element:t.current,padding:n}).fn(e):{}:t?du({element:t,padding:n}).fn(e):{}}}).name,fn:P.fn,options:[b,x]},dP({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}=cm(S,e);switch(r){case"referenceHidden":{let r=cT(await n.detectOverflow(e,{...a,elementContext:"reference"}),t.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:cA(r)}}}case"escaped":{let r=cT(await n.detectOverflow(e,{...a,altBoundary:!0}),t.floating);return{data:{escapedOffsets:r,escaped:cA(r)}}}default:return{}}}}).name,fn:_.fn,options:[k,j]}]}),eu=K.setPlacementState;oh(()=>(eu(ei),()=>{eu(void 0)}),[ei,eu]);let[ec,ed]=d_(ei),ef=oR(B);oh(()=>{el&&ef?.()},[el,ef]);let ep=es.arrow?.x,eh=es.arrow?.y,em=es.arrow?.centerOffset!==0,[eg,ey]=y.useState();return oh(()=>{W&&ey(window.getComputedStyle(W).zIndex)},[W]),(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)(dO,{scope:z,placedSide:ec,placedAlign:ed,onArrowChange:G,arrowX:ep,arrowY:eh,shouldHideArrow:em,children:(0,g.jsx)(oT.div,{"data-side":ec,"data-align":ed,...V,ref:Z,style:{...V.style,animation:el?V.style?.animation:"none"}})})})},"PopperContent"));function dE(e){return null!==e}dg(dE,"isNotNull");var dP=dg(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,u]=d_(n),c={start:"0%",center:"50%",end:"100%"}[u],d=(a.arrow?.x??0)+i/2,f=(a.arrow?.y??0)+l/2,p="",h="";return"bottom"===s?(p=o?c:`${d}px`,h=`${-l}px`):"top"===s?(p=o?c:`${d}px`,h=`${r.floating.height+l}px`):"right"===s?(p=`${-l}px`,h=o?c:`${f}px`):"left"===s&&(p=`${r.floating.width+l}px`,h=o?c:`${f}px`),{data:{x:p,y:h}}}}),"transformOrigin");function d_(e){let[t,n="center"]=e.split("-");return[t,n]}function dz(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])}dg(d_,"getSideAndAlignFromPlacement"),(0,Object.defineProperty)(dz,"name",{value:"usePrevious",configurable:!0});var dT=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"}),dA=Object.defineProperty,dR=(e,t)=>dA(e,"name",{value:t,configurable:!0}),dL=[" ","Enter","ArrowUp","ArrowDown"],dI=[" ","Enter"],dM="Select",[dD,dF,d$]=u5(dM),[dU,dH]=of(dM,[d$,db]),dB=db(),[dV,dK]=dU(dM),[dW,dq]=dU(dM);function dZ(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:o,value:i,defaultValue:l,onValueChange:s,dir:u,name:c,autoComplete:d,disabled:f,required:p,form:h,internal_do_not_use_render:m}=e,v=dB(t),[b,x]=y.useState(null),[w,k]=y.useState(null),[j,S]=y.useState(!1),O=cl(u),[C,N]=oC({prop:r,defaultProp:a??!1,onChange:o,caller:dM}),[E,P]=oC({prop:i,defaultProp:l,onChange:s,caller:dM}),_=y.useRef(null),z=y.useRef(E);y.useEffect(()=>{let e=h?b?.ownerDocument.getElementById(h):b?.form;if(e instanceof HTMLFormElement){let t=dR(()=>P(z.current),"reset");return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[h,b,P]);let T=!b||!!h||!!b.closest("form"),[A,R]=y.useState(new Set),L=ov(),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:E,onValueChange:P,open:C,onOpenChange:N,dir:O,triggerPointerDownPosRef:_,disabled:f,name:c,autoComplete:d,form:h,nativeOptions:A,nativeSelectKey:I,isFormControl:T};return(0,g.jsx)(dk,{...v,children:(0,g.jsx)(dV,{scope:t,...F,children:(0,g.jsx)(dD.Provider,{scope:t,children:(0,g.jsx)(dW,{scope:t,onNativeOptionAdd:M,onNativeOptionRemove:D,children:fk(m)?m(F):n})})})})}dR(dZ,"SelectProvider");var dJ=dR(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,g.jsx)(dZ,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,g.jsxs)(g.Fragment,{children:[n,e?(0,g.jsx)(fw,{__scopeSelect:t}):null]})})},"Select"),dG=y.forwardRef(dR(function(e,t){let{__scopeSelect:n,disabled:r=!1,...a}=e,o=dB(n),i=dK("SelectTrigger",n),l=i.disabled||r,s=aG(t,i.onTriggerChange),u=dF(n),c=y.useRef("touch"),[d,f,p]=fS(e=>{let t=u().filter(e=>!e.disabled),n=t.find(e=>e.value===i.value),r=fO(t,e,n);void 0!==r&&i.onValueChange(r.value)}),h=dR(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)(dj,{asChild:!0,...o,children:(0,g.jsx)(oT.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":fj(i.value)?"":void 0,...a,ref:s,onClick:ol(a.onClick,e=>{e.currentTarget.focus(),"mouse"!==c.current&&h(e)}),onPointerDown:ol(a.onPointerDown,e=>{c.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:ol(a.onKeyDown,e=>{let t=""!==d.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||f(e.key),(!t||" "!==e.key)&&dL.includes(e.key)&&(h(),e.preventDefault())})})})},"SelectTrigger")),dQ=y.forwardRef(dR(function(e,t){let{__scopeSelect:n,className:r,style:a,children:o,placeholder:i="",...l}=e,s=dK("SelectValue",n),{onValueNodeHasChildrenChange:u}=s,c=void 0!==o,d=aG(t,s.onValueNodeChange);oh(()=>{u(c)},[u,c]);let f=fj(s.value);return(0,g.jsx)(oT.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")),dY=y.forwardRef(dR(function(e,t){let{__scopeSelect:n,children:r,...a}=e;return(0,g.jsx)(oT.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})},"SelectIcon")),[dX,d0]=dU("SelectPortal",{forceMount:void 0}),d1=dR(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,g.jsx)(dX,{scope:e.__scopeSelect,forceMount:n,children:(0,g.jsx)(ie,{asChild:!0,...r})})},"SelectPortal"),d2="SelectContent",d4=y.forwardRef(dR(function(e,t){let n=d0(d2,e.__scopeSelect),{forceMount:r=n.forceMount,...a}=e,o=dK(d2,e.__scopeSelect),[i,l]=y.useState();return oh(()=>{l(new DocumentFragment)},[]),(0,g.jsx)(io,{present:r||o.open,children:({present:e})=>e?(0,g.jsx)(d9,{...a,ref:t}):(0,g.jsx)(d3,{...a,fragment:i})})},"SelectContent")),d3=y.forwardRef(dR(function(e,t){let{__scopeSelect:n,children:r,fragment:a}=e;return a?o_.createPortal((0,g.jsx)(d5,{scope:n,children:(0,g.jsx)(dD.Slot,{scope:n,children:(0,g.jsx)("div",{ref:t,children:r})})}),a):null},"SelectContentFragment")),[d5,d6]=dU(d2),d8=aX("SelectContent.RemoveScroll"),d9=y.forwardRef(dR(function(e,t){let{__scopeSelect:n}=e,{position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:o,onPointerDownOutside:i,side:l,sideOffset:s,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:v,...b}=e,x=dK(d2,n),[w,k]=y.useState(null),[j,S]=y.useState(null),O=aG(t,k),[C,N]=y.useState(null),[E,P]=y.useState(null),_=dF(n),[z,T]=y.useState(!1),A=y.useRef(!1);y.useEffect(()=>{if(w)return i7(w)},[w]),ig();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=dR(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=dR(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=dR(()=>I(!1),"close");return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[I]);let[D,F]=fS(e=>{let t=_().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=fO(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)&&P(e)},[x.value]),B="popper"===r?fe:d7;return(0,g.jsx)(d5,{scope:n,content:w,viewport:j,onViewportChange:S,itemRefCallback:$,selectedItem:C,onItemLeave:U,itemTextRefCallback:H,focusSelectedItem:L,selectedItemText:E,position:r,isPositioned:z,searchRef:D,children:(0,g.jsx)(i2,{as:d8,allowPinchZoom:!0,children:(0,g.jsx)(oQ,{asChild:!0,trapped:x.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:ol(a,e=>{x.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,g.jsx)(oF,{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===fe?{side:l,sideOffset:s,align:u,alignOffset:c,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:ol(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")),d7=y.forwardRef(dR(function(e,t){let{__scopeSelect:n,onPlaced:r,...a}=e,o=dK(d2,n),i=d6(d2,n),[l,s]=y.useState(null),[u,c]=y.useState(null),d=aG(t,c),f=dF(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&&u&&m&&v&&b){let e=o.trigger.getBoundingClientRect(),t=u.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,u=Math.max(s,t.width),c=u2(o,[10,Math.max(10,window.innerWidth-10-u)]);l.style.minWidth=s+"px",l.style.left=c+"px"}else{let r=t.right-a.right,o=window.innerWidth-n.right-r,i=window.innerWidth-e.right-o,s=e.width+i,u=Math.max(s,t.width),c=u2(o,[10,Math.max(10,window.innerWidth-10-u)]);l.style.minWidth=s+"px",l.style.right=c+"px"}let i=f(),s=window.innerHeight-20,c=m.scrollHeight,d=window.getComputedStyle(u),h=parseInt(d.borderTopWidth,10),g=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),x=h+g+c+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)+(u.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,u,m,v,b,o.dir,r]);oh(()=>w(),[w]);let[k,j]=y.useState();oh(()=>{u&&j(window.getComputedStyle(u).zIndex)},[u]);let S=y.useCallback(e=>{e&&!0===h.current&&(w(),x?.(),h.current=!1)},[w,x]);return(0,g.jsx)(ft,{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)(oT.div,{...a,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})},"SelectItemAlignedPosition")),fe=y.forwardRef(dR(function(e,t){let{__scopeSelect:n,align:r="start",collisionPadding:a=10,...o}=e,i=dB(n);return(0,g.jsx)(dN,{...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")),[ft,fn]=dU(d2,{}),fr="SelectViewport",fa=y.forwardRef(dR(function(e,t){let{__scopeSelect:n,nonce:r,...a}=e,o=d6(fr,n),i=fn(fr,n),l=aG(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)(dD.Slot,{scope:n,children:(0,g.jsx)(oT.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:ol(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")),[fo,fi]=dU("SelectGroup"),fl=y.forwardRef(dR(function(e,t){let{__scopeSelect:n,...r}=e,a=fi("SelectLabel",n);return(0,g.jsx)(oT.div,{id:a.id,...r,ref:t})},"SelectLabel")),fs="SelectItem",[fu,fc]=dU(fs),fd=y.forwardRef(dR(function(e,t){let{__scopeSelect:n,value:r,disabled:a=!1,textValue:o,...i}=e,l=dK(fs,n),s=d6(fs,n),u=l.value===r,[c,d]=y.useState(o??""),[f,p]=y.useState(!1),h=aG(t,oR(e=>s.itemRefCallback?.(e,r,a))),m=ov(),v=y.useRef("touch"),b=dR(()=>{a||(l.onValueChange(r),l.onOpenChange(!1))},"handleSelect");return(0,g.jsx)(fu,{scope:n,value:r,disabled:a,textId:m,isSelected:u,onItemTextChange:y.useCallback(e=>{d(t=>t||(e?.textContent??"").trim())},[]),children:(0,g.jsx)(dD.ItemSlot,{scope:n,value:r,disabled:a,textValue:c,children:(0,g.jsx)(oT.div,{role:"option","aria-labelledby":m,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...i,ref:h,onFocus:ol(i.onFocus,()=>p(!0)),onBlur:ol(i.onBlur,()=>p(!1)),onClick:ol(i.onClick,()=>{"mouse"!==v.current&&b()}),onPointerUp:ol(i.onPointerUp,()=>{"mouse"===v.current&&b()}),onPointerDown:ol(i.onPointerDown,e=>{v.current=e.pointerType}),onPointerMove:ol(i.onPointerMove,e=>{v.current=e.pointerType,a?s.onItemLeave?.():"mouse"===v.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ol(i.onPointerLeave,e=>{e.currentTarget===document.activeElement&&s.onItemLeave?.()}),onKeyDown:ol(i.onKeyDown,e=>{a||e.target!==e.currentTarget||(s.searchRef?.current===""||" "!==e.key)&&(dI.includes(e.key)&&b()," "===e.key&&e.preventDefault())})})})})},"SelectItem")),ff="SelectItemText",fp=y.forwardRef(dR(function(e,t){let{__scopeSelect:n,className:r,style:a,...o}=e,i=dK(ff,n),l=d6(ff,n),s=fc(ff,n),u=dq(ff,n),[c,d]=y.useState(null),f=oR(e=>l.itemTextRefCallback?.(e,s.value,s.disabled)),p=aG(t,d,s.onItemTextChange,f),h=c?.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}=u;return oh(()=>(v(m),()=>b(m)),[v,b,m]),(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(oT.span,{id:s.textId,...o,ref:p}),s.isSelected&&i.valueNode&&!i.valueNodeHasChildren&&!fj(i.value)?o_.createPortal(o.children,i.valueNode):null]})},"SelectItemText")),fh=y.forwardRef(dR(function(e,t){let{__scopeSelect:n,...r}=e;return fc("SelectItemIndicator",n).isSelected?(0,g.jsx)(oT.span,{"aria-hidden":!0,...r,ref:t}):null},"SelectItemIndicator")),fm="SelectScrollUpButton",fg=y.forwardRef(dR(function(e,t){let n=d6(fm,e.__scopeSelect),r=fn(fm,e.__scopeSelect),[a,o]=y.useState(!1),i=aG(t,r.onScrollButtonChange);return oh(()=>{if(n.viewport&&n.isPositioned){let e=function(){o(t.scrollTop>0)};dR(e,"handleScroll");let t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),a?(0,g.jsx)(fb,{...e,ref:i,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null},"SelectScrollUpButton")),fy="SelectScrollDownButton",fv=y.forwardRef(dR(function(e,t){let n=d6(fy,e.__scopeSelect),r=fn(fy,e.__scopeSelect),[a,o]=y.useState(!1),i=aG(t,r.onScrollButtonChange);return oh(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;o(Math.ceil(t.scrollTop)<e)};dR(e,"handleScroll");let t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),a?(0,g.jsx)(fb,{...e,ref:i,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null},"SelectScrollDownButton")),fb=y.forwardRef(dR(function(e,t){let{__scopeSelect:n,onAutoScroll:r,...a}=e,o=d6("SelectScrollButton",n),i=y.useRef(null),l=dF(n),s=y.useCallback(()=>{null!==i.current&&(window.clearInterval(i.current),i.current=null)},[]);return y.useEffect(()=>()=>s(),[s]),oh(()=>{let e=l().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[l]),(0,g.jsx)(oT.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:ol(a.onPointerDown,()=>{null===i.current&&(i.current=window.setInterval(r,50))}),onPointerMove:ol(a.onPointerMove,()=>{o.onItemLeave?.(),null===i.current&&(i.current=window.setInterval(r,50))}),onPointerLeave:ol(a.onPointerLeave,()=>{s()})})},"SelectScrollButtonImpl")),fx=y.forwardRef(dR(function(e,t){let{__scopeSelect:n,...r}=e;return(0,g.jsx)(oT.div,{"aria-hidden":!0,...r,ref:t})},"SelectSeparator")),fw=y.forwardRef(dR(function({__scopeSelect:e,...t},n){let r=dK("SelectBubbleInput",e),{value:a,onValueChange:o,required:i,disabled:l,name:s,autoComplete:u,form:c}=r,{nativeOptions:d,nativeSelectKey:f}=r,p=y.useRef(null),h=aG(n,p),m=a??"",v=dz(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)(oT.select,{"aria-hidden":!0,required:i,tabIndex:-1,name:s,autoComplete:u,disabled:l,form:c,onChange:e=>o(e.target.value),...t,style:{...dT,...t.style},ref:h,defaultValue:m,children:[fj(a)&&!b?(0,g.jsx)("option",{value:""}):null,Array.from(d)]},f)},"SelectBubbleInput"));function fk(e){return"function"==typeof e}function fj(e){return""===e||void 0===e}function fS(e){let t=oR(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 fO(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=fC(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 fC(e,t){return e.map((n,r)=>e[(t+r)%e.length])}dR(fk,"isFunction"),dR(fj,"shouldShowPlaceholder"),dR(fS,"useTypeaheadSearch"),dR(fO,"findNextItem"),dR(fC,"wrapArray");let fN=O("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);function fE(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 fP(e){if(Array.isArray(e))return e}function f_(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function fz(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 fT(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 fA(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 fR(e,t){return fP(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)||fI(e,t)||f_()}function fL(e){return fP(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||fI(e)||f_()}function fI(e,t){if(e){if("string"==typeof e)return fE(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 fE(e,t)}}var fM=y.forwardRef(function(e,t){var n=fL([e,t]),r=n[0],a=n.slice(1),o=r.className,i=r.children,l=fA(r,["className","children"]),s=fR(a,1)[0];return(0,g.jsxs)(dG,fT(fz({ref:s,"data-slot":"select-trigger",className:aT("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)(dY,{asChild:!0,children:(0,g.jsx)(T,{className:"size-4 shrink-0 text-muted-foreground"})})]}))});fM.displayName=dG.displayName;var fD=y.forwardRef(function(e,t){var n=fL([e,t]),r=n[0],a=n.slice(1),o=r.className,i=fA(r,["className"]),l=fR(a,1)[0];return(0,g.jsx)(fg,fT(fz({ref:l,className:aT("flex cursor-default items-center justify-center py-1",o)},i),{children:(0,g.jsx)(fN,{className:"size-4"})}))});fD.displayName=fg.displayName;var fF=y.forwardRef(function(e,t){var n=fL([e,t]),r=n[0],a=n.slice(1),o=r.className,i=fA(r,["className"]),l=fR(a,1)[0];return(0,g.jsx)(fv,fT(fz({ref:l,className:aT("flex cursor-default items-center justify-center py-1",o)},i),{children:(0,g.jsx)(T,{className:"size-4"})}))});fF.displayName=fv.displayName;var f$=y.forwardRef(function(e,t){var n=fL([e,t]),r=n[0],a=n.slice(1),o=r.className,i=r.children,l=r.position,s=void 0===l?"popper":l,u=r.sideOffset,c=fA(r,["className","children","position","sideOffset"]),d=fR(a,1)[0];return(0,g.jsx)(d1,{children:(0,g.jsxs)(d4,fT(fz({ref:d,"data-slot":"select-content",position:s,sideOffset:void 0===u?6:u,className:aT("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)},c),{children:[(0,g.jsx)(fD,{}),(0,g.jsx)(fa,{className:aT("p-1.5","popper"===s&&"w-full min-w-[var(--radix-select-trigger-width)]"),children:i}),(0,g.jsx)(fF,{})]}))})});f$.displayName=d4.displayName,y.forwardRef(function(e,t){var n=fL([e,t]),r=n[0],a=n.slice(1),o=r.className,i=fA(r,["className"]),l=fR(a,1)[0];return(0,g.jsx)(fl,fz({ref:l,className:aT("px-2 py-1.5 text-xs font-semibold text-muted-foreground",o)},i))}).displayName=fl.displayName;var fU=y.forwardRef(function(e,t){var n=fL([e,t]),r=n[0],a=n.slice(1),o=r.className,i=r.children,l=fA(r,["className","children"]),s=fR(a,1)[0];return(0,g.jsxs)(fd,fT(fz({ref:s,"data-slot":"select-item",className:aT("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)(fp,{children:i}),(0,g.jsx)("span",{className:"absolute right-2 flex size-4 items-center justify-center text-primary",children:(0,g.jsx)(fh,{children:(0,g.jsx)(uG,{className:"size-4",strokeWidth:2.5})})})]}))});function fH(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 fB(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 fV(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fK(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){fV(e,t,n[t])})}return e}function fW(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 fH(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 fH(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 fq(e){var t=e.open,n=e.onOpenChange,r=(0,x.Bd)().t,a=so(function(e){return e.scan}),o=so(function(e){return e.scanLoading}),i=so(function(e){return e.scanError}),l=so(function(e){return e.loadScan}),s=so(function(e){return e.importScan}),u=so(function(e){return e.providers}),c=so(function(e){return e.loadProviders}),d=fW((0,y.useState)({}),2),f=d[0],p=d[1],h=fW((0,y.useState)(!1),2),m=h[0],v=h[1],b=fW((0,y.useState)(null),2),w=b[0],k=b[1],j=fW((0,y.useState)(null),2),S=j[0],O=j[1];(0,y.useEffect)(function(){t&&(O(null),k(null),l(),c())},[t,l,c]),(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,u=!0,c=!1,d=void 0;try{for(var f,p=s.candidates[Symbol.iterator]();!(u=(f=p.next()).done);u=!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){c=!0,d=e}finally{try{u||null==p.return||p.return()}finally{if(c)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)(ll,{open:t,onOpenChange:n,children:(0,g.jsxs)(l_,{className:"flex max-h-[85vh] w-[min(56rem,calc(100vw-2rem))] max-w-3xl flex-col overflow-hidden",children:[(0,g.jsxs)(lz,{children:[(0,g.jsx)(lA,{children:r("import.title")}),(0,g.jsx)(lR,{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)(uT,{className:"size-4 animate-spin"}),r("import.scanning")]}):null,i?(0,g.jsx)("p",{className:"py-6 text-sm text-destructive",children:l6(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)(uA,{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:l6(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)(aR,{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?l6(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)(fZ,{candidate:e,choice:f[e.id],providers:null!=u?u:[],onChange:function(t){var n;return n=e.id,void p(function(e){var r,a;return r=fK({},e),a=null!=(a=fV({},n,fK({},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:l6(r,w)}):null,(0,g.jsxs)(lT,{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)(or,{variant:"outline",onClick:function(){l()},disabled:o,children:[(0,g.jsx)(E,{}),r("import.rescan")]}),(0,g.jsxs)(or,{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 u=[l,s];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&u[0]?r.return:u[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,u[1])).done)return a;switch(r=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,r=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]<a[3])){o.label=u[1];break}if(6===u[0]&&o.label<a[1]){o.label=a[1],a=u;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(u);break}a[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(e){u=[6,e],r=0}finally{n=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[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 fK({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(l2)}),p({}),[3,5];case 3:return k(l3(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){fB(o,r,a,i,l,"next",e)}function l(e){fB(o,r,a,i,l,"throw",e)}i(void 0)})})()},children:[m?(0,g.jsx)(uT,{className:"animate-spin"}):null,r("import.importSelected")]})]})]})})}function fZ(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)(uQ,{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)(aR,{children:o("import.inUse")}):null,t.conflictsWith?(0,g.jsx)(aR,{variant:"secondary",children:o("import.nameTaken")}):null,t.matchesProvider?(0,g.jsx)(aR,{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)(u1,{htmlFor:"name-".concat(t.id),children:o("import.profileName")}),(0,g.jsx)(uY,{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)(u1,{htmlFor:"target-".concat(t.id),children:o("import.credentialTarget")}),(0,g.jsxs)(dJ,{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)(fM,{id:"target-".concat(t.id),children:(0,g.jsx)(dQ,{})}),(0,g.jsxs)(f$,{children:[(0,g.jsx)(fU,{value:"profile",children:o("import.targetProfile")}),(0,g.jsx)(fU,{value:"new-vault",children:o("import.targetNewVault")}),r.map(function(e){return(0,g.jsx)(fU,{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)(u1,{htmlFor:"key-".concat(t.id),children:"API key"}),(0,g.jsx)(uY,{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)(uQ,{checked:n.overwrite,onCheckedChange:function(e){return a({overwrite:!0===e})}}),o("import.overwriteExisting")]}):null]}):null]})]})})}fU.displayName=fd.displayName,y.forwardRef(function(e,t){var n=fL([e,t]),r=n[0],a=n.slice(1),o=r.className,i=fA(r,["className"]),l=fR(a,1)[0];return(0,g.jsx)(fx,fz({ref:l,className:aT("-mx-1 my-1 h-px bg-border",o)},i))}).displayName=fx.displayName;let fJ=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 fG(){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)(or,{type:"button",size:"sm",variant:"outline","aria-label":o,title:o,onClick:function(){return r(a?"zh-CN":"en")},children:[(0,g.jsx)(fJ,{}),(0,g.jsx)("span",{className:"hidden sm:inline",children:e("language.short")})]})}function fQ(){var e=(0,x.Bd)().t,t=so(function(e){return e.notice}),n=so(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)(or,{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:l6(e,t)},"".concat(t.key,"-").concat(null!=(n=t.scope)?n:""))})]}):null}let fY=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 fX(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 f0(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 f1(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 fX(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 fX(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 f2(e){var t,n,r=e.harnessId,a=e.open,o=e.onOpenChange,i=(0,x.s9)().locale,l=(0,x.Bd)().t,s=so(function(e){return e.operations}),u=so(function(e){return e.operationsLoading}),c=so(function(e){return e.operationsError}),d=so(function(e){return e.loadOperations}),f=so(function(e){return e.undoOperation}),p=f1((0,y.useState)(null),2),h=p[0],m=p[1],v=f1((0,y.useState)(!1),2),b=v[0],w=v[1],k=f1((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=M[r];return(0,y.useEffect)(function(){a&&(S(null),d(r))},[a,r,d]),(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(ll,{open:a,onOpenChange:o,children:(0,g.jsxs)(l_,{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)(lz,{className:"shrink-0 space-y-1.5 px-6 pb-4 pt-6 pr-12",children:[(0,g.jsx)(lA,{children:l("operations.titleFor",{harness:C})}),(0,g.jsx)(lR,{children:l("operations.intro")})]}),(0,g.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto overscroll-contain px-6",children:[u&&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)(uT,{className:"size-4 animate-spin"}),l("operations.loading")]}):null,c?(0,g.jsx)("p",{className:"py-6 text-sm text-destructive",children:l6(l,c)}):null,u||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)(aR,{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)(or,{size:"sm",variant:"outline",className:"shrink-0",disabled:!e.undoable,onClick:function(){return m(e)},children:[(0,g.jsx)(fY,{}),l("operations.undo")]})]},e.id)})}):null]}),(0,g.jsx)(lT,{className:"shrink-0 px-6 py-4",children:(0,g.jsx)(or,{onClick:function(){return o(!1)},children:l("operations.close")})})]})}),(0,g.jsx)(ll,{open:null!==h,onOpenChange:function(e){return!e&&m(null)},children:(0,g.jsxs)(l_,{className:"max-w-lg",children:[(0,g.jsxs)(lz,{children:[(0,g.jsx)(lA,{children:l("operations.undoTitle")}),(0,g.jsx)(lR,{children:h?l("operations.undoBody",{harness:null!=(n=M[h.harness])?n:h.harness,count:h.files.length}):""})]}),j?(0,g.jsx)("p",{className:"text-sm text-destructive",children:l6(l,j)}):null,(0,g.jsxs)(lT,{children:[(0,g.jsx)(or,{variant:"outline",onClick:function(){return m(null)},children:l("common.cancel")}),(0,g.jsxs)(or,{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 u=[l,s];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&u[0]?r.return:u[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,u[1])).done)return a;switch(r=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,r=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]<a[3])){o.label=u[1];break}if(6===u[0]&&o.label<a[1]){o.label=a[1],a=u;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(u);break}a[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(e){u=[6,e],r=0}finally{n=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[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(l3(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){f0(o,r,a,i,l,"next",e)}function l(e){f0(o,r,a,i,l,"throw",e)}i(void 0)})})()},children:[b?(0,g.jsx)(uT,{className:"animate-spin"}):null,l("operations.confirmUndo")]})]})]})})]})}function f4(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 f3(e){var t,n,r=e.harness,a=(0,x.Bd)().t,o=so(function(e){return e.operations}),i=so(function(e){return e.operationsLoading}),l=so(function(e){return e.operationsError}),s=so(function(e){return e.loadOperations}),u=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 f4(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 f4(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.")}(),c=u[0],d=u[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)(rN,{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)(or,{size:"icon",variant:"ghost","aria-label":a("operations.refresh"),onClick:function(){s(r.id)},children:(0,g.jsx)(sc,{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:l6(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)(or,{className:"mt-4 w-full",size:"sm",variant:"outline",disabled:null===o,onClick:function(){return d(!0)},children:a("operations.viewDetails")}),(0,g.jsx)(f2,{harnessId:r.id,open:c,onOpenChange:d})]})}let f5=O("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),f6=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"}]]);function f8(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:aT("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 f9(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 f7(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 pe(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 pt(e){return function(e){if(Array.isArray(e))return f9(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 f9(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 f9(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 pn=[{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"}],pr={id:"cliproxyResponses",baseUrl:"https://api.seavey.ai/cliproxy/v1",model:"gpt-5.6-sol"},pa={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:pn,kimi:pn,pi:[pe(f7({},pr),{extras:{api:"openai-responses",reasoning:"true"}})].concat(pt(pn)),dsh:[pe(f7({},pr),{extras:{api:"openai-responses",reasoningEfforts:"low,medium,high,xhigh,max"}})].concat(pt(pn))};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){return 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)})}}function ps(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pu(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){ps(e,t,n[t])})}return e}function pc(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 pd(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)||pf(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 pf(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)}}function pp(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 u=[l,s];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&u[0]?r.return:u[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,u[1])).done)return a;switch(r=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,r=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]<a[3])){o.label=u[1];break}if(6===u[0]&&o.label<a[1]){o.label=a[1],a=u;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(u);break}a[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(e){u=[6,e],r=0}finally{n=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}var ph=[{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}],pm="subagentModel",pg="subagentModel1m",py=new Set(((function(e){if(Array.isArray(e))return po(e)})(c=ph.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)}(c)||pf(c)||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([pm,pg]));function pv(e){var t,n,r,a,o,i,l,s,u=e.harness,c=e.profile,d=e.onOpenChange,f=(0,x.Bd)().t,p=so(function(e){return e.createProfile}),h=so(function(e){return e.updateProfile}),m=so(function(e){return e.previewProfile}),v=so(function(e){return e.providers}),b=so(function(e){return e.loadProviders}),w=null!==c,k=pd((0,y.useState)(null!=(t=null==c?void 0:c.name)?t:""),2),j=k[0],S=k[1],O=pd((0,y.useState)(null!=(n=null==c?void 0:c.baseUrl)?n:""),2),C=O[0],N=O[1],E=pd((0,y.useState)(""),2),P=E[0],_=E[1],z=pd((0,y.useState)(null!=(r=null==c?void 0:c.model)?r:""),2),A=z[0],R=z[1],L=pd((0,y.useState)(null!=(a=null==c?void 0:c.notes)?a:""),2),I=L[0],M=L[1],D=pd((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,u,c=i.value;n[c.key]=null!=(s=null!=(u=null==t?void 0:t.extras[c.key])?u:c.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,c)}),2),F=D[0],$=D[1],U=pd((0,y.useState)({}),2),H=U[0],B=U[1],V=pd((0,y.useState)(null!=(o=null==c?void 0:c.providerId)?o:""),2),K=V[0],W=V[1],q=pd((0,y.useState)(null!=(i=null==c?void 0:c.providerEndpoint)?i:""),2),Z=q[0],J=q[1],G=pd((0,y.useState)(!1),2),Q=G[0],Y=G[1],X=pd((0,y.useState)(null),2),ee=X[0],et=X[1],en=pd((0,y.useState)(null),2),er=en[0],ea=en[1],eo=pd((0,y.useState)(!1),2),ei=eo[0],el=eo[1],es=pd((0,y.useState)({}),2),eu=es[0],ec=es[1],ed=null!=v?v:[],ef=null!=(l=ed.find(function(e){return e.id===K}))?l:null,ep=null==ef?void 0:ef.endpoints.find(function(e){return e.key===Z}),eh=null!==v&&""!==K&&null===ef,em=null!==ef&&""!==Z&&void 0===ep,eg="claude"===u.id?u.fields.filter(function(e){return!py.has(e.key)}):u.fields,ey="claude"===u.id?eg.filter(function(e){return"authVar"===e.key}):eg,ev="claude"===u.id?eg.filter(function(e){return"authVar"!==e.key}):[];function eb(){return pl(function(){var e;return pp(this,function(t){switch(t.label){case 0:if(!c)return[2];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,m(u.id,c.name)];case 2:return et(e=t.sent()),B(Object.fromEntries(e.filter(function(e){return e.overridden}).map(function(e){return[e.key,e.content]}))),[3,4];case 3:return ea(l4(t.sent())),[3,4];case 4:return[2]}})})()}function ex(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];ec(function(e){if(!t.some(function(t){return e[t]}))return e;var n=pu({},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})}return(0,y.useEffect)(function(){null===v&&b()},[v,b]),(0,g.jsx)(ll,{open:!0,onOpenChange:d,children:(0,g.jsx)(l_,{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 pl(function(){var t,n;return pp(this,function(r){switch(r.label){case 0:if(e.preventDefault(),!function(){var e={},t=j.trim(),n=ef&&Z&&null!=(i=null==ep?void 0:ep.baseUrl)?i:C;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"},n.trim()||(e.baseUrl={key:"profile.error.baseUrlRequired"}),w||null!==ef||P.trim()||(e.apiKey={key:"profile.error.apiKeyRequired"}),u.modelRequired&&!A.trim()&&(e.model={key:"profile.error.modelRequired"}),eh&&(e.providerId={key:"profile.error.providerGone"}),em&&(e.providerEndpoint={key:"profile.error.endpointGone"});var r=!0,a=!1,o=void 0;try{for(var i,l,s=u.fields[Symbol.iterator]();!(r=(l=s.next()).done);r=!0){var c,d=l.value;!d.required||(null==(c=F[d.key])?void 0:c.trim())||(e["extra:".concat(d.key)]={key:"profile.error.fieldRequired",params:{label:d.label}})}}catch(e){a=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(a)throw o}}return ec(e),!(Object.keys(e).length>0)||(ea({key:"profile.error.checkFields"}),!1)}())return[2];el(!0),ea(null),r.label=1;case 1:if(r.trys.push([1,6,7,8]),n=pu({name:j,baseUrl:ef&&Z&&null!=(t=null==ep?void 0:ep.baseUrl)?t:C,model:A,notes:I,extras:F},K?pu({providerId:K},Z?{providerEndpoint:Z}:{}):w?{providerId:""}:{},ef?{}:{apiKey:P||void 0}),!w)return[3,3];return[4,h(u.id,c.name,pc(pu({},n),{overrides:H}))];case 2:return r.sent(),[3,5];case 3:return[4,p(u.id,n)];case 4:r.sent(),r.label=5;case 5:return d(!1),[3,8];case 6:return ea(l4(r.sent())),[3,8];case 7:return el(!1),[7];case 8:return[2]}})})()},noValidate:!0,className:"flex max-h-[92vh] min-h-0 flex-col",children:[(0,g.jsxs)(lz,{className:"shrink-0 border-b bg-card px-6 py-5 pr-12",children:[(0,g.jsx)(lA,{children:w?f("profile.editTitle",{harness:u.label,profile:c.name}):f("profile.createTitle",{harness:u.label})}),(0,g.jsxs)(lR,{children:[f("profile.intro",{targets:u.targets.map(function(e){return e.label}).join(f("common.listSeparator"))}),"additive"===u.mode?f("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)(u1,{htmlFor:"provider-select",className:"font-medium",children:f("profile.useSharedProvider")}),ef?(0,g.jsx)(aR,{variant:"secondary",children:f("profile.keyFromVault")}):null]}),(0,g.jsxs)(dJ,{value:K,onValueChange:function(e){W(e);var t,n,r=ed.find(function(t){return t.id===e});J(null!=(t=null==r||null==(n=r.endpoints[0])?void 0:n.key)?t:""),ex("providerId","providerEndpoint","baseUrl","apiKey")},children:[(0,g.jsx)(fM,{id:"provider-select","aria-label":f("profile.useSharedProviderLabel"),"aria-invalid":!!eu.providerId||void 0,"aria-describedby":eu.providerId?"provider-select-error":void 0,children:(0,g.jsx)(dQ,{placeholder:f("profile.providerNone")})}),(0,g.jsxs)(f$,{children:[(0,g.jsx)(fU,{value:"",children:f("profile.providerNone")}),ed.map(function(e){return(0,g.jsx)(fU,{value:e.id,children:e.name},e.id)})]})]}),eu.providerId?(0,g.jsx)("p",{id:"provider-select-error",className:"text-xs text-destructive",children:l6(f,eu.providerId)}):null,0===ed.length?(0,g.jsx)("p",{className:"text-xs text-muted-foreground",children:f("profile.vaultEmpty")}):null,ef?(0,g.jsxs)("div",{className:"space-y-2",children:[(0,g.jsx)(u1,{htmlFor:"provider-endpoint",children:f("profile.namedEndpoint")}),(0,g.jsxs)(dJ,{value:Z,onValueChange:function(e){J(e),ex("providerEndpoint","baseUrl")},children:[(0,g.jsx)(fM,{id:"provider-endpoint","aria-label":f("profile.namedEndpointLabel"),"aria-invalid":!!eu.providerEndpoint||void 0,"aria-describedby":eu.providerEndpoint?"provider-endpoint-error":void 0,children:(0,g.jsx)(dQ,{placeholder:f("profile.endpointNone")})}),(0,g.jsxs)(f$,{children:[(0,g.jsx)(fU,{value:"",children:f("profile.endpointNone")}),ef.endpoints.map(function(e){return(0,g.jsx)(fU,{value:e.key,children:e.label?f("profile.endpointOption",{label:e.label,key:e.key}):e.key},e.key)})]})]}),eu.providerEndpoint?(0,g.jsx)("p",{id:"provider-endpoint-error",className:"text-xs text-destructive",children:l6(f,eu.providerEndpoint)}):null,0===ef.endpoints.length?(0,g.jsx)("p",{className:"text-xs text-muted-foreground",children:f("profile.noEndpoints")}):null]}):null]}),(0,g.jsx)(px,{harnessId:u.id,onPick:function(e){N(e.baseUrl),ex("baseUrl"),e.model&&(R(e.model),ex("model")),e.extras&&$(function(t){return pu({},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)(u1,{htmlFor:"name",children:f("profile.name")}),(0,g.jsx)(uY,{id:"name",value:j,onChange:function(e){S(e.target.value),ex("name")},placeholder:f("profile.namePlaceholder"),"aria-invalid":!!eu.name||void 0,"aria-describedby":eu.name?"profile-name-error":void 0}),eu.name?(0,g.jsx)("p",{id:"profile-name-error",className:"text-xs text-destructive",children:l6(f,eu.name)}):null,w?(0,g.jsx)("p",{className:"text-xs text-muted-foreground",children:f("profile.renameHint")}):null]}),(0,g.jsxs)("div",{className:"space-y-2 sm:col-span-2",children:[(0,g.jsx)(u1,{htmlFor:"baseUrl",children:f("profile.baseUrl")}),(0,g.jsx)(uY,{id:"baseUrl",value:ef&&Z&&null!=(s=null==ep?void 0:ep.baseUrl)?s:C,onChange:function(e){N(e.target.value),ex("baseUrl")},placeholder:f("profile.baseUrlPlaceholder"),disabled:null!==ef&&""!==Z,"aria-invalid":!!eu.baseUrl||void 0,"aria-describedby":eu.baseUrl?"profile-base-url-error":void 0}),eu.baseUrl?(0,g.jsx)("p",{id:"profile-base-url-error",className:"text-xs text-destructive",children:l6(f,eu.baseUrl)}):null,ef&&Z?(0,g.jsx)("p",{className:"text-xs text-muted-foreground",children:f("profile.baseUrlFromVault",{endpoint:Z})}):null]}),(0,g.jsxs)("div",{className:"space-y-2",children:[(0,g.jsx)(u1,{htmlFor:"apiKey",children:f("profile.apiKey")}),(0,g.jsx)(uY,{id:"apiKey",type:"password",value:P,onChange:function(e){_(e.target.value),ex("apiKey")},placeholder:ef?f("profile.keyFromVault"):w?f("profile.apiKeyKeep"):f("profile.apiKeyRequiredPlaceholder"),disabled:null!==ef,"aria-invalid":!!eu.apiKey||void 0,"aria-describedby":eu.apiKey?"profile-api-key-error":void 0}),eu.apiKey?(0,g.jsx)("p",{id:"profile-api-key-error",className:"text-xs text-destructive",children:l6(f,eu.apiKey)}):null,ef?(0,g.jsx)("p",{className:"text-xs text-muted-foreground",children:f("profile.apiKeySharedHint")}):null]}),(0,g.jsxs)("div",{className:"space-y-2",children:[(0,g.jsx)(u1,{htmlFor:"model",children:"claude"===u.id?f("profile.fallbackModel"):f("profile.model")}),(0,g.jsx)(uY,{id:"model",value:A,onChange:function(e){R(e.target.value),ex("model")},placeholder:"claude"===u.id?f("profile.fallbackModelPlaceholder"):f("profile.modelPlaceholder"),"aria-invalid":!!eu.model||void 0,"aria-describedby":eu.model?"profile-model-error":void 0}),eu.model?(0,g.jsx)("p",{id:"profile-model-error",className:"text-xs text-destructive",children:l6(f,eu.model)}):null,"claude"===u.id?(0,g.jsx)("p",{className:"text-xs text-muted-foreground",children:f("profile.claudeModelHint")}):null]}),ey.map(function(e){var t;return(0,g.jsx)(pw,{field:e,value:null!=(t=F[e.key])?t:"",error:eu["extra:".concat(e.key)],onChange:function(t){$(function(n){return pc(pu({},n),ps({},e.key,t))}),ex("extra:".concat(e.key))}},e.key)}),"claude"===u.id?(0,g.jsx)(pS,{fields:u.fields,values:F,errors:eu,onChange:function(e,t){$(function(n){return pc(pu({},n),ps({},e,t))}),ex("extra:".concat(e))}}):null,ev.map(function(e){var t;return(0,g.jsx)(pw,{field:e,value:null!=(t=F[e.key])?t:"",error:eu["extra:".concat(e.key)],onChange:function(t){$(function(n){return pc(pu({},n),ps({},e.key,t))}),ex("extra:".concat(e.key))}},e.key)}),(0,g.jsxs)("div",{className:"space-y-2 sm:col-span-2",children:[(0,g.jsx)(u1,{htmlFor:"notes",children:f("profile.notes")}),(0,g.jsx)(f8,{id:"notes",rows:2,value:I,onChange:function(e){return M(e.target.value)}})]})]}),(0,g.jsxs)("div",{className:"rounded-xl border",children:[(0,g.jsxs)("button",{type:"button",onClick:function(){var e=!Q;Y(e),e&&null===ee&&eb()},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(Q?"rounded-t-xl":"rounded-xl"),children:[Q?(0,g.jsx)(T,{className:"size-4"}):(0,g.jsx)(f5,{className:"size-4"}),f("profile.advanced"),c&&c.overriddenTargets.length>0?(0,g.jsx)(aR,{variant:"secondary",children:f("profile.overridden")}):null]}),Q?(0,g.jsx)("div",{className:"space-y-4 border-t px-3 py-3",children:w?(0,g.jsx)(pb,{targets:ee,overrides:H,onEdit:function(e,t){return B(function(n){return pc(pu({},n),ps({},e,t))})},onReset:function(e){B(function(t){var n=pu({},t);return delete n[e],n}),eb()}}):(0,g.jsx)("p",{className:"text-sm text-muted-foreground",children:f("profile.saveFirst")})}):null]}),er?(0,g.jsx)("p",{className:"text-sm text-destructive",children:l6(f,er)}):null]}),(0,g.jsxs)(lT,{className:"shrink-0 border-t bg-card px-6 py-4",children:[(0,g.jsx)(or,{type:"button",variant:"outline",onClick:function(){return d(!1)},children:f("common.cancel")}),(0,g.jsx)(or,{type:"submit",disabled:ei,children:ei?f("profile.saving"):f("profile.save")})]})]})})})}function pb(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)(u1,{htmlFor:"raw-".concat(e.key),className:"font-mono text-xs",children:e.path}),i?(0,g.jsxs)(or,{type:"button",size:"sm",variant:"ghost",onClick:function(){return a(e.key)},children:[(0,g.jsx)(f6,{}),o("profile.resetToGenerated")]}):null]}),(0,g.jsx)(f8,{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 px(e){var t,n=e.harnessId,r=e.onPick,a=(0,x.Bd)().t,o=null!=(t=pa[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)(or,{type:"button",size:"sm",variant:"outline",onClick:function(){return r(e)},children:a("preset.".concat(e.id))},e.id)})]})}function pw(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)(u1,{htmlFor:s,children:r.label}),"select"===r.kind?(0,g.jsxs)(dJ,{value:a,onValueChange:i,children:[(0,g.jsx)(fM,{id:s,"aria-label":r.label,"aria-invalid":!!o||void 0,"aria-describedby":o?"".concat(s,"-error"):void 0,children:(0,g.jsx)(dQ,{placeholder:null!=(t=r.placeholder)?t:l("profile.selectPlaceholder")})}),(0,g.jsx)(f$,{children:null==(n=r.options)?void 0:n.map(function(e){return(0,g.jsx)(fU,{value:e.value,children:e.label},e.value)})})]}):"textarea"===r.kind?(0,g.jsx)(f8,{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)(uY,{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:l6(l,o)}):null,r.help?(0,g.jsx)("p",{className:"text-xs text-muted-foreground",children:r.help}):null]})}var pk="md:grid-cols-[6.5rem_minmax(0,1fr)_minmax(0,1fr)_8.5rem]",pj="grid gap-2 rounded-lg border bg-card/70 p-3 ".concat(pk," md:items-start md:gap-3 md:border-0 md:bg-transparent md:p-0");function pS(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(pm);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(pk),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:[ph.map(function(e){var t,n,s,u=e.role,c=e.modelKey,d=e.nameKey,f=e.oneMKey,p=l.get(c),h=l.get(d);if(!p||!h)return null;var m=a["extra:".concat(c)],y=a["extra:".concat(d)];return(0,g.jsxs)("div",{className:pj,children:[(0,g.jsxs)("div",{className:"flex h-10 items-center rounded-lg border bg-muted/45 px-3 text-sm font-medium",children:[u,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)(u1,{htmlFor:"extra-".concat(d),className:"text-xs md:sr-only",children:h.label}),(0,g.jsx)(uY,{id:"extra-".concat(d),value:null!=(t=r[d])?t:"",placeholder:(null==(s=r[c])?void 0:s.trim())?i("profile.mapping.defaultTo",{model:r[c].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:l6(i,y)}):null]}),(0,g.jsxs)("div",{className:"space-y-1.5",children:[(0,g.jsx)(u1,{htmlFor:"extra-".concat(c),className:"text-xs md:sr-only",children:p.label}),(0,g.jsx)(uY,{id:"extra-".concat(c),value:null!=(n=r[c])?n:"",placeholder:p.placeholder,"aria-invalid":!!m||void 0,"aria-describedby":m?"extra-".concat(c,"-error"):void 0,onChange:function(e){return o(c,e.target.value)}}),m?(0,g.jsx)("p",{id:"extra-".concat(c,"-error"),className:"text-xs text-destructive",children:l6(i,m)}):null]}),(0,g.jsx)(pO,{role:u,field:f?l.get(f):void 0,value:f?r[f]:void 0,error:f?a["extra:".concat(f)]:void 0,onChange:o})]},u)}),s?(0,g.jsxs)("div",{className:pj,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)(u1,{htmlFor:"extra-subagentModel",className:"text-xs md:sr-only",children:s.label}),(0,g.jsx)(uY,{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:l6(i,a["extra:subagentModel"])}):null]}),(0,g.jsx)(pO,{role:"Subagent",field:l.get(pg),value:r[pg],error:a["extra:".concat(pg)],onChange:o})]}):null]})]})}function pO(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)(uQ,{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:l6(i,a)}):null]})}let pC=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"}]]),pN=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 pE(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 pP(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 p_(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function i(e){pP(o,r,a,i,l,"next",e)}function l(e){pP(o,r,a,i,l,"throw",e)}i(void 0)})}}function pz(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pT(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){pz(e,t,n[t])})}return e}function pA(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 pR(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)||pI(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 pL(e){return function(e){if(Array.isArray(e))return pE(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||pI(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 pI(e,t){if(e){if("string"==typeof e)return pE(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 pE(e,t)}}function pM(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 u=[l,s];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&u[0]?r.return:u[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,u[1])).done)return a;switch(r=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,r=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]<a[3])){o.label=u[1];break}if(6===u[0]&&o.label<a[1]){o.label=a[1],a=u;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(u);break}a[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(e){u=[6,e],r=0}finally{n=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}function pD(e){var t,n=e.open,r=e.onOpenChange,a=(0,x.s9)().locale,o=(0,x.Bd)().t,i=so(function(e){return e.providers}),l=so(function(e){return e.providersLoading}),s=so(function(e){return e.providersError}),u=so(function(e){return e.loadProviders}),c=so(function(e){return e.deleteProvider}),d=pR((0,y.useState)({kind:"list"}),2),f=d[0],p=d[1],h=pR((0,y.useState)(null),2),m=h[0],v=h[1],b=pR((0,y.useState)(null),2),w=b[0],k=b[1],j=pR((0,y.useState)(null),2),S=j[0],O=j[1],C=pR((0,y.useState)(null),2),N=C[0],E=C[1],P=pR((0,y.useState)({}),2),_=P[0],T=P[1],A=so(function(e){return e.revealProvider});(0,y.useEffect)(function(){n&&(p({kind:"list"}),v(null),k(null),E(null),null===i&&u())},[n,i,u]);var R=null!=i?i:[];return(0,g.jsxs)(ll,{open:n,onOpenChange:r,children:[(0,g.jsxs)(l_,{className:"max-h-[88vh] overflow-y-auto sm:max-w-2xl",children:[(0,g.jsxs)(lz,{children:[(0,g.jsx)(lA,{children:"create"===f.kind?o("vault.createTitle"):"edit"===f.kind?o("vault.editTitle",{name:f.entry.name}):o("vault.title")}),(0,g.jsx)(lR,{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:l6(o,s)}):null,"create"===f.kind||"edit"===f.kind?(0,g.jsx)(pF,{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)(or,{size:"sm",onClick:function(){return p({kind:"create"})},children:[(0,g.jsx)(z,{}),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:l6(o,e)},e.key+e.scope)})}):null,w?(0,g.jsx)("p",{className:"text-sm text-destructive",children:l6(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)(aR,{variant:"secondary",children:o("vault.keyConfigured")}):(0,g.jsx)(aR,{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)(or,{size:"icon",variant:"ghost","aria-label":void 0!==_[e.id]?o("vault.hide",{name:e.name}):o("vault.reveal",{name:e.name}),onClick:function(){p_(function(){var t;return pM(this,function(n){switch(n.label){case 0:if(void 0!==_[e.id])return T(function(t){var n=pT({},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,T(function(n){return pA(pT({},n),pz({},e.id,t))}),[3,4];case 3:return k(l3(n.sent(),"vault.revealFailed")),[3,4];case 4:return[2]}})})()},children:void 0!==_[e.id]?(0,g.jsx)(pC,{}):(0,g.jsx)(pN,{})}),(0,g.jsx)(or,{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)(sX,{})}),(0,g.jsx)(or,{size:"icon",variant:"ghost","aria-label":o("vault.delete",{name:e.name}),onClick:function(){E(null),O(e)},children:(0,g.jsx)(s0,{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)(lT,{children:(0,g.jsx)(or,{variant:"outline",onClick:function(){return r(!1)},children:o("vault.close")})}):null]}),(0,g.jsx)(sx,{open:null!==S,onOpenChange:function(e){return!e&&O(null)},children:(0,g.jsxs)(sA,{children:[(0,g.jsxs)(sR,{children:[(0,g.jsx)(sI,{children:o("vault.deleteTitle")}),(0,g.jsx)(sM,{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:l6(o,N)}):null,(0,g.jsxs)(sL,{children:[(0,g.jsx)(sF,{children:o("common.cancel")}),(0,g.jsx)(sD,{onClick:function(e){e.preventDefault(),S&&p_(function(){return pM(this,function(e){switch(e.label){case 0:E(null),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,c(S.id)];case 2:return e.sent(),O(null),v([{key:"vault.deleted"}]),[3,4];case 3:return E(l3(e.sent(),"vault.deleteFailed")),[3,4];case 4:return[2]}})})()},children:o("common.delete")})]})]})})]})}function pF(e){var t,n,r=e.entry,a=e.onCancel,o=e.onSaved,i=(0,x.Bd)().t,l=so(function(e){return e.createProvider}),s=so(function(e){return e.updateProvider}),u=null!==r,c=pR((0,y.useState)(null!=(t=null==r?void 0:r.name)?t:""),2),d=c[0],f=c[1],p=pR((0,y.useState)(""),2),h=p[0],m=p[1],v=pR((0,y.useState)(null!=(n=null==r?void 0:r.notes)?n:""),2),b=v[0],w=v[1],k=pR((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),j=k[0],S=k[1],O=pR((0,y.useState)(!1),2),C=O[0],N=O[1],E=pR((0,y.useState)(null),2),P=E[0],_=E[1],T=pR((0,y.useState)({}),2),A=T[0],R=T[1],L=pR((0,y.useState)({}),2),I=L[0],M=L[1];function D(e,t){S(function(n){return n.map(function(n,r){return r===e?pT({},n,t):n})}),M(function(n){if(!n[e])return n;var r=pT({},n),a=pT({},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,g.jsxs)("form",{onSubmit:function(e){return p_(function(){var t,n,a,i,c,f,p,m,g,y,v,x;return pM(this,function(w){switch(w.label){case 0:e.preventDefault(),t=j.map(function(e){return{key:e.key.trim(),label:e.label.trim(),baseUrl:e.baseUrl.trim()}}),n=pT({},d.trim()?{}:{name:{key:"vault.error.nameRequired"}},u||h.trim()?{}:{apiKey:{key:"vault.error.apiKeyRequired"}}),a=new Map,i=!0,c=!1,f=void 0;try{for(p=t[Symbol.iterator]();!(i=(m=p.next()).done);i=!0)(g=m.value).key&&a.set(g.key,(null!=(y=a.get(g.key))?y:0)+1)}catch(e){c=!0,f=e}finally{try{i||null==p.return||p.return()}finally{if(c)throw f}}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]]:[]})),R(n),M(v),Object.keys(n).length>0||Object.keys(v).length>0)return _({key:"vault.error.checkFields"}),[2];x={name:d.trim(),notes:b.trim()||void 0,endpoints:t},N(!0),_(null),w.label=1;case 1:if(w.trys.push([1,6,7,8]),!(u&&r))return[3,3];return[4,s(r.id,pT({},x,h.trim()?{apiKey:h.trim()}:{}))];case 2:return o([{key:"vault.updated"}].concat(pL(w.sent().warnings.map(l2)))),[3,5];case 3:return[4,l(pA(pT({},x),{apiKey:h.trim()}))];case 4:w.sent(),o([{key:"vault.created"}]),w.label=5;case 5:return[3,8];case 6:return _(l3(w.sent(),"vault.saveFailed")),[3,8];case 7:return N(!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)(u1,{htmlFor:"provider-name",children:i("vault.name")}),(0,g.jsx)(uY,{id:"provider-name",value:d,onChange:function(e){f(e.target.value),R(function(e){return pA(pT({},e),{name:void 0})})},placeholder:i("vault.namePlaceholder"),"aria-invalid":!!A.name||void 0,"aria-describedby":A.name?"provider-name-error":void 0}),A.name?(0,g.jsx)("p",{id:"provider-name-error",className:"text-xs text-destructive",children:l6(i,A.name)}):null]}),(0,g.jsxs)("div",{className:"space-y-2 sm:col-span-2",children:[(0,g.jsx)(u1,{htmlFor:"provider-api-key",children:i("vault.apiKey")}),(0,g.jsx)(uY,{id:"provider-api-key",type:"password",value:h,onChange:function(e){m(e.target.value),R(function(e){return pA(pT({},e),{apiKey:void 0})})},placeholder:u?i("vault.apiKeyKeep"):i("vault.apiKeyRequiredPlaceholder"),"aria-invalid":!!A.apiKey||void 0,"aria-describedby":A.apiKey?"provider-api-key-error":void 0}),A.apiKey?(0,g.jsx)("p",{id:"provider-api-key-error",className:"text-xs text-destructive",children:l6(i,A.apiKey)}):null]}),(0,g.jsxs)("div",{className:"space-y-2 sm:col-span-2",children:[(0,g.jsx)(u1,{htmlFor:"provider-notes",children:i("vault.notes")}),(0,g.jsx)(f8,{id:"provider-notes",rows:2,value:b,onChange:function(e){return w(e.target.value)}})]})]}),(0,g.jsxs)("div",{className:"space-y-2",children:[(0,g.jsx)(u1,{children:i("vault.endpoints")}),(0,g.jsx)("p",{className:"text-xs text-muted-foreground",children:i("vault.endpointsHint")}),0===j.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:j.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)(uY,{"aria-label":i("vault.endpointKeyLabel",{index:t+1}),value:e.key,onChange:function(e){return D(t,{key:e.target.value})},placeholder:i("vault.endpointKeyPlaceholder"),"aria-invalid":null!=(n=I[t])&&!!n.key||void 0,"aria-describedby":(null==(r=I[t])?void 0:r.key)?"endpoint-".concat(t,"-key-error"):void 0}),(null==(a=I[t])?void 0:a.key)?(0,g.jsx)("p",{id:"endpoint-".concat(t,"-key-error"),className:"text-xs text-destructive",children:l6(i,I[t].key)}):null]}),(0,g.jsxs)("div",{className:"space-y-1.5",children:[(0,g.jsx)(uY,{"aria-label":i("vault.endpointUrlLabel",{index:t+1}),value:e.baseUrl,onChange:function(e){return D(t,{baseUrl:e.target.value})},placeholder:i("vault.endpointUrlPlaceholder"),"aria-invalid":null!=(o=I[t])&&!!o.baseUrl||void 0,"aria-describedby":(null==(l=I[t])?void 0:l.baseUrl)?"endpoint-".concat(t,"-url-error"):void 0}),(null==(s=I[t])?void 0:s.baseUrl)?(0,g.jsx)("p",{id:"endpoint-".concat(t,"-url-error"),className:"text-xs text-destructive",children:l6(i,I[t].baseUrl)}):null]}),(0,g.jsx)(uY,{"aria-label":i("vault.endpointLabelLabel",{index:t+1}),value:e.label,onChange:function(e){return D(t,{label:e.target.value})},placeholder:i("vault.endpointLabelPlaceholder")}),(0,g.jsx)(or,{type:"button",size:"icon",variant:"ghost","aria-label":i("vault.removeEndpoint",{index:t+1}),onClick:function(){S(function(e){return e.filter(function(e,n){return n!==t})}),M({})},children:(0,g.jsx)(s0,{})})]},t)})}),(0,g.jsxs)(or,{type:"button",size:"sm",variant:"outline",onClick:function(){return S(function(e){return pL(e).concat([{key:"",baseUrl:"",label:""}])})},children:[(0,g.jsx)(z,{}),i("vault.addEndpoint")]})]}),P?(0,g.jsx)("p",{className:"text-sm text-destructive",children:l6(i,P)}):null,(0,g.jsxs)(lT,{className:"flex-row justify-end gap-2 space-x-0",children:[(0,g.jsx)(or,{type:"button",variant:"outline",className:"min-w-24",onClick:a,children:i("common.cancel")}),(0,g.jsx)(or,{type:"submit",className:"min-w-24",disabled:C,children:C?i("vault.saving"):u?i("vault.saveChanges"):i("vault.add")})]})]})}let p$=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"}]]),pU=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 pH="hs-theme";function pB(e){document.documentElement.classList.toggle("dark","dark"===e),document.documentElement.style.colorScheme=e;try{localStorage.setItem(pH,e)}catch(e){}}function pV(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 pK(){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 pV(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 pV(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,t=(e=function(){try{var e=localStorage.getItem(pH);return"light"===e||"dark"===e?e:null}catch(e){return null}}())?e:"u">typeof window&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";a(t),pB(t)},[]),(0,g.jsx)(or,{type:"button",size:"icon",variant:"outline","aria-label":t("dark"===r?"theme.toLight":"theme.toDark"),onClick:function(){return a(function(e){var t;return pB(t="dark"===e?"light":"dark"),t})},children:"dark"===r?(0,g.jsx)(p$,{}):(0,g.jsx)(pU,{})})}let pW=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"}]]),pq=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"}]]),pZ=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 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 pG(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 pQ(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function i(e){pG(o,r,a,i,l,"next",e)}function l(e){pG(o,r,a,i,l,"throw",e)}i(void 0)})}}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)||pX(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,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 p0(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 u=[l,s];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&u[0]?r.return:u[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,u[1])).done)return a;switch(r=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,r=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]<a[3])){o.label=u[1];break}if(6===u[0]&&o.label<a[1]){o.label=a[1],a=u;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(u);break}a[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(e){u=[6,e],r=0}finally{n=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}function p1(e){var t,n,r,a=e.open,o=e.onOpenChange,i=(0,x.Bd)().t,l=so(function(e){return e.loadHarnesses}),s=so(function(e){return e.setNotice}),u=(0,y.useRef)(null),c=pY((0,y.useState)(""),2),d=c[0],f=c[1],p=pY((0,y.useState)(""),2),h=p[0],m=p[1],v=pY((0,y.useState)(null),2),b=v[0],w=v[1],k=pY((0,y.useState)(!1),2),j=k[0],S=k[1],O=pY((0,y.useState)(null),2),C=O[0],N=O[1],E=pY((0,y.useState)(""),2),P=E[0],_=E[1],z=pY((0,y.useState)(""),2),T=z[0],A=z[1],R=pY((0,y.useState)(null),2),L=R[0],I=R[1],D=pY((0,y.useState)(!1),2),F=D[0],$=D[1],U=pY((0,y.useState)(!1),2),H=U[0],B=U[1],V=pY((0,y.useState)("skip"),2),K=V[0],W=V[1],q=pY((0,y.useState)(!0),2),Z=q[0],J=q[1],G=pY((0,y.useState)(!1),2),Q=G[0],Y=G[1],X=pY((0,y.useState)(null),2),ee=X[0],et=X[1],en=pY((0,y.useState)(null),2),er=en[0],ea=en[1],eo=pY((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 S(!1),lQ("/api/transfer/export/preview").then(function(t){e||w(t)}).catch(function(){e||w(null)}),function(){e=!0}},[a]);var es=d.length>=8&&d===h&&null===ee,eu=null!==C&&T.length>=8&&null===ee,ec=(null==L?void 0:L.conflictPolicy)===K&&(null==L?void 0:L.restoreActive)===Z,ed=null!==L&&ec&&!F&&null===ee,ef=L&&ec&&!F?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)(ll,{open:a,onOpenChange:o,children:(0,g.jsxs)(l_,{className:"max-h-[90vh] overflow-y-auto sm:max-w-2xl",children:[(0,g.jsxs)(lz,{children:[(0,g.jsx)(lA,{children:i("transfer.title")}),(0,g.jsx)(lR,{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)(pW,{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)(u1,{htmlFor:"export-passphrase",children:i("transfer.passphrase")}),(0,g.jsx)(uY,{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)(u1,{htmlFor:"export-passphrase-confirm",children:i("transfer.passphraseConfirm")}),(0,g.jsx)(uY,{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:"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)(uQ,{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: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)(or,{type:"button",onClick:function(){pQ(function(){return p0(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,lQ("/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(l4(e.sent())),[3,5];case 4:return et(null),[7];case 5:return[2]}})})()},disabled:!es,children:[(0,g.jsx)(pW,{}),"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)(pq,{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:u,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],pQ(function(){var e,t,r;return p0(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(l4(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=u.current)?void 0:e.click()},children:[(0,g.jsx)(pZ,{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:P||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)(u1,{htmlFor:"import-passphrase",children:i("transfer.passphrase")}),(0,g.jsx)(uY,{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)(or,{type:"button",variant:"outline",disabled:!eu,onClick:function(){pQ(function(){var e;return p0(this,function(t){switch(t.label){case 0:if(!C)return[2];et("preview"),el(null),ea(null),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,lQ("/api/transfer/preview",{method:"POST",body:JSON.stringify({envelope:C,passphrase:T,conflictPolicy:K,restoreActive:Z})})];case 2:return I(t.sent()),$(!1),Y(!1),B(!1),[3,5];case 3:return e=t.sent(),I(null),el(l4(e)),[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)(aR,{children:i("transfer.profileCount",{count:L.profileCount})}),(0,g.jsx)(aR,{variant:"secondary",children:i("transfer.providerCount",{count:L.providerCount})}),(0,g.jsx)(aR,{variant:L.conflicts.length>0?"outline":"secondary",children:i("transfer.conflictCount",{count:L.conflicts.length})}),(0,g.jsx)(aR,{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:M[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(M[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:"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)(uQ,{checked:H,onCheckedChange:function(e){return B(!0===e)},className:"mt-0.5"}),(0,g.jsxs)("span",{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,F?(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)(u1,{htmlFor:"conflict-policy",children:i("transfer.conflictPolicy")}),(0,g.jsxs)(dJ,{value:K,onValueChange:function(e){W(e),$(!0),Y(!1)},children:[(0,g.jsx)(fM,{id:"conflict-policy",children:(0,g.jsx)(dQ,{})}),(0,g.jsxs)(f$,{children:[(0,g.jsx)(fU,{value:"skip",children:i("transfer.policySkip")}),(0,g.jsx)(fU,{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)(uQ,{checked:Z,onCheckedChange:function(e){J(!0===e),$(!0),Y(!1)}}),i("transfer.restoreActive")]})]}),(0,g.jsxs)(or,{type:"button",disabled:!ed,onClick:function(){return Y(!0)},children:[(0,g.jsx)(pq,{}),F?i("transfer.recheckNeeded"):i("transfer.confirmImport")]}),(0,g.jsx)(sx,{open:Q,onOpenChange:Y,children:(0,g.jsxs)(sA,{children:[(0,g.jsxs)(sR,{children:[(0,g.jsx)(sI,{children:ef?i("transfer.confirmAuthTitle"):i("transfer.confirmTitle")}),(0,g.jsxs)(sM,{children:[i("transfer.confirmBody",{count:L.profileCount}),"overwrite"===K&&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)(sL,{children:[(0,g.jsx)(sF,{children:i("common.cancel")}),(0,g.jsx)(sD,{onClick:function(){pQ(function(){var e;return p0(this,function(t){switch(t.label){case 0:if(!C||!L||F)return[2];Y(!1),et("import"),el(null),t.label=1;case 1:return t.trys.push([1,4,5,6]),[4,lQ("/api/transfer/import",{method:"POST",body:JSON.stringify({envelope:C,passphrase:T,conflictPolicy:K,restoreActive:Z,migrateCodexLoginCache:H})})];case 2:return e=t.sent(),[4,l()];case 3:var n,r,a,u;return t.sent(),s((u=[(n=i)("transfer.importedCount",{count:(r=e).imported})],r.overwritten>0&&u.push(n("transfer.overwrittenCount",{count:r.overwritten})),r.providersCopied>0&&u.push(n("transfer.providersCopiedCount",{count:r.providersCopied})),r.skipped>0&&u.push(n("transfer.skippedCount",{count:r.skipped})),r.activeRestored>0&&u.push(n("transfer.activeRestoredCount",{count:r.activeRestored})),u.push(n(r.codexLoginCacheMigrated?"transfer.cacheMigrated":"transfer.cacheNotMigrated")),[{key:"transfer.importedSummary",params:{parts:u.join(n("common.listSeparator"))}}].concat(function(e){if(Array.isArray(e))return pJ(e)}(a=r.warnings.map(function(e){return l2(e)}))||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||pX(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(l4(t.sent())),[3,6];case 5:return et(null),[7];case 6:return[2]}})})()},children:ef?i("transfer.proceedAware"):"overwrite"===K?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:l6(i,ei)}):null]})})}function p2(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 p4(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 p3(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 p2(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 p2(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 p5(){var e=(0,x.Bd)().t,t=p3((0,y.useState)(null),2),n=t[0],r=t[1],a=p3((0,y.useState)(null),2),o=a[0],i=a[1],l=p3((0,y.useState)("idle"),2),s=l[0],u=l[1];return((0,y.useEffect)(function(){var e=!1;return lQ("/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)(uT,{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)(or,{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 u=[l,s];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&u[0]?r.return:u[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,u[1])).done)return a;switch(r=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,r=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]<a[3])){o.label=u[1];break}if(6===u[0]&&o.label<a[1]){o.label=a[1],a=u;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(u);break}a[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(e){u=[6,e],r=0}finally{n=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}(this,function(t){switch(t.label){case 0:u("updating"),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,lQ("/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,lQ("/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 u("failed"),[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function i(e){p4(o,r,a,i,l,"next",e)}function l(e){p4(o,r,a,i,l,"throw",e)}i(void 0)})})()},children:[(0,g.jsx)(sd,{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 p6=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"}]]),p8=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"}]]);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(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 he(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function i(e){p7(o,r,a,i,l,"next",e)}function l(e){p7(o,r,a,i,l,"throw",e)}i(void 0)})}}function ht(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)||hr(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 hn(e){return function(e){if(Array.isArray(e))return p9(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||hr(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 hr(e,t){if(e){if("string"==typeof e)return p9(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 p9(e,t)}}function ha(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 u=[l,s];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&u[0]?r.return:u[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,u[1])).done)return a;switch(r=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,r=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]<a[3])){o.label=u[1];break}if(6===u[0]&&o.label<a[1]){o.label=a[1],a=u;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(u);break}a[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(e){u=[6,e],r=0}finally{n=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}function ho(e){var t=e.open,n=e.onOpenChange,r=(0,x.Bd)().t,a=so(function(e){return e.users}),o=so(function(e){return e.currentUser}),i=so(function(e){return e.loadHarnesses}),l=so(function(e){return e.loadProviders}),s=so(function(e){return e.setNotice}),u=(0,y.useMemo)(function(){return a.filter(function(e){return e.username!==o})},[a,o]),c=ht((0,y.useState)(""),2),d=c[0],f=c[1],p=ht((0,y.useState)(null),2),h=p[0],m=p[1],v=ht((0,y.useState)([]),2),b=v[0],w=v[1],k=ht((0,y.useState)(!1),2),j=k[0],S=k[1],O=ht((0,y.useState)(!1),2),C=O[0],N=O[1],E=ht((0,y.useState)(!1),2),P=E[0],_=E[1],z=ht((0,y.useState)(null),2),T=z[0],A=z[1],R=(0,y.useMemo)(function(){return I.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 D(){return he(function(){var e;return ha(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,lQ("/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(hn(e.warnings.map(function(e){return l2(e)})))),n(!1),[3,6];case 4:return A(l4(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 u.some(function(t){return t.username===e})?e:null!=(t=null==(n=u[0])?void 0:n.username)?t:""}),m(null),w([]),S(!1),N(!1),A(null))},[t,u]),(0,g.jsx)(ll,{open:t,onOpenChange:n,children:(0,g.jsxs)(l_,{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)(lz,{className:"shrink-0 border-b px-5 py-4 pr-12 text-left sm:px-6",children:[(0,g.jsx)(lA,{children:r("sync.title")}),(0,g.jsx)(lR,{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:[u.length>0?(0,g.jsxs)("div",{className:"space-y-5",children:[(0,g.jsxs)("div",{className:"space-y-2",children:[(0,g.jsx)(u1,{htmlFor:"sync-source-user",children:r("sync.sourceUser")}),(0,g.jsxs)(dJ,{value:d,onValueChange:function(e){f(e),m(null),w([]),S(!1)},children:[(0,g.jsx)(fM,{id:"sync-source-user",children:(0,g.jsx)(dQ,{placeholder:r("sync.selectUser")})}),(0,g.jsx)(f$,{children:u.map(function(e){return(0,g.jsxs)(fU,{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)(aR,{variant:"secondary",children:r("sync.profileCount",{count:h.profileCount})}),(0,g.jsx)(aR,{variant:"secondary",children:r("sync.providerCount",{count:h.providerCount})}),(0,g.jsx)(aR,{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)(u1,{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)(uQ,{checked:b.includes(t),onCheckedChange:function(e){return w(function(n){return!0===e?hn(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:M[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)(uQ,{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)(p6,{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:l6(r,T)}):null]}),(0,g.jsx)(lT,{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)(sx,{open:C,onOpenChange:N,children:[(0,g.jsxs)(or,{className:"w-full sm:w-auto",disabled:P,onClick:function(){return N(!0)},children:[(0,g.jsx)(p8,{}),P?r("sync.syncing"):r("sync.syncTo",{user:L})]}),(0,g.jsxs)(sA,{children:[(0,g.jsxs)(sR,{children:[(0,g.jsx)(sI,{children:r("sync.confirmCacheTitle")}),(0,g.jsx)(sM,{children:r("sync.confirmCacheBody",{source:d,target:L,extra:h.codexLoginCache.targetExists?r("sync.confirmCacheOverwrite"):r("sync.confirmCacheFresh")})})]}),(0,g.jsxs)(sL,{children:[(0,g.jsx)(sF,{children:r("common.cancel")}),(0,g.jsx)(sD,{onClick:function(){D()},children:r("sync.confirmCacheAction")})]})]})]}):(0,g.jsxs)(or,{className:"w-full sm:w-auto",disabled:P,onClick:function(){D()},children:[(0,g.jsx)(p8,{}),P?r("sync.syncing"):r("sync.syncTo",{user:L})]}):(0,g.jsxs)(or,{className:"w-full sm:w-auto",disabled:!d||P,onClick:function(){he(function(){var e;return ha(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,lQ("/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(l4(e)),[3,5];case 4:return _(!1),[7];case 5:return[2]}})})()},children:[(0,g.jsx)(p8,{}),P?r("sync.inspecting"):r("sync.inspect")]})})]})})}function hi(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 hl(){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 hi(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 hi(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 lQ("/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 hs(){return(0,x.Bd)().t,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 hc(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 hd(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function i(e){hc(o,r,a,i,l,"next",e)}function l(e){hc(o,r,a,i,l,"throw",e)}i(void 0)})}}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(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 u=[l,s];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&u[0]?r.return:u[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,u[1])).done)return a;switch(r=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,r=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]<a[3])){o.label=u[1];break}if(6===u[0]&&o.label<a[1]){o.label=a[1],a=u;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(u);break}a[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(e){u=[6,e],r=0}finally{n=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}function hh(){var e,t,n,r=(0,x.s9)().locale,a=(0,x.Bd)().t,o=so(function(e){return e.harnesses}),i=so(function(e){return e.envFile}),l=so(function(e){return e.backups}),s=hf((0,y.useState)(null),2),u=s[0],c=s[1],d=hf((0,y.useState)(!1),2),f=d[0],p=d[1],h=hf((0,y.useState)(!1),2),m=h[0],v=h[1],b=hf((0,y.useState)(!1),2),w=b[0],k=b[1],j=hf((0,y.useState)(!1),2),S=j[0],O=j[1],A=hf((0,y.useState)("claude"),2),R=A[0],L=A[1],I=o.find(function(e){return e.id===(null==u?void 0:u.harnessId)}),M=null!=(e=o.find(function(e){return e.id===R}))?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)(hl,{}),(0,g.jsx)(hs,{}),(0,g.jsx)(p5,{})]}),(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)(or,{variant:"outline",size:"sm",onClick:function(){return k(!0)},children:[(0,g.jsx)(N,{}),(0,g.jsx)("span",{className:"hidden lg:inline",children:a("nav.syncUserConfig")})]}),(0,g.jsxs)(or,{variant:"outline",size:"sm",onClick:function(){return O(!0)},children:[(0,g.jsx)(E,{}),(0,g.jsx)("span",{className:"hidden lg:inline",children:a("nav.importExisting")})]}),(0,g.jsxs)(or,{variant:"outline",size:"sm",onClick:function(){return p(!0)},children:[(0,g.jsx)(P,{}),(0,g.jsx)("span",{className:"hidden sm:inline",children:a("nav.transfer")})]}),(0,g.jsxs)(or,{variant:"outline",size:"sm",onClick:function(){return v(!0)},children:[(0,g.jsx)(_,{}),(0,g.jsx)("span",{className:"hidden sm:inline",children:a("nav.vault")})]}),(0,g.jsx)(fG,{}),(0,g.jsx)(pK,{}),(0,g.jsx)(hm,{})]})]})}),(0,g.jsxs)("div",{className:"grid xl:grid-cols-[17rem_minmax(0,1fr)_18rem]",children:[(0,g.jsx)(hg,{harnesses:o,value:null==M?void 0:M.id,onChange:L}),M?(0,g.jsxs)("main",{role:"tabpanel",id:"harness-panel-".concat(M.id),"aria-labelledby":"harness-tab-".concat(M.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:M.label}),(0,g.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:a("harness.subtitle")})]}),(0,g.jsxs)(or,{className:"self-start sm:self-auto",onClick:function(){return c({harnessId:M.id,profile:null})},children:[(0,g.jsx)(z,{}),a("harness.newProfile")]})]}),(0,g.jsx)(un,{harness:M,onAdd:function(){return c({harnessId:M.id,profile:null})},onEdit:function(e){return c({harnessId:M.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)(T,{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,M?(0,g.jsx)(hy,{harness:M,latestBackup:l.find(function(e){return e.harness===M.id}),locale:r}):null]}),u&&I?(0,g.jsx)(pv,{harness:I,profile:u.profile,onOpenChange:function(e){return!e&&c(null)}},"".concat(u.harnessId,"-").concat(null!=(t=null==(n=u.profile)?void 0:n.name)?t:"new")):null,(0,g.jsx)(p1,{open:f,onOpenChange:p}),(0,g.jsx)(pD,{open:m,onOpenChange:v}),(0,g.jsx)(ho,{open:w,onOpenChange:k}),(0,g.jsx)(fq,{open:S,onOpenChange:O}),(0,g.jsx)(fQ,{})]})}function hm(){var e=(0,x.Bd)().t,t=so(function(e){return e.logout}),n=so(function(e){return e.users}),r=so(function(e){return e.currentUser}),a=so(function(e){return e.usersLoading}),o=so(function(e){return e.switchUser}),i=hf((0,y.useState)(!1),2),l=i[0],s=i[1],u=(0,y.useRef)(null);return(0,y.useEffect)(function(){var e=function(e){var t;(null==(t=u.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:u,className:"relative",children:[(0,g.jsxs)(or,{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)(A,{}),(0,g.jsx)("span",{className:"max-w-28 truncate",children:r||e("nav.localUser")}),(0,g.jsx)(T,{className:aT("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(e){return(0,g.jsx)("button",{type:"button",role:"menuitemradio","aria-checked":e.username===r,disabled:a||e.username===r,onClick:function(){var t;t=e.username,hd(function(){return hp(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,o(t)];case 1:return e.sent(),s(!1),[3,3];case 2:return e.sent(),[3,3];case 3:return[2]}})})()},className:"flex w-full cursor-pointer items-center rounded-lg px-3 py-2 text-left text-sm hover:bg-accent disabled:cursor-default disabled:opacity-60",children:e.username},e.username)}),(0,g.jsx)("div",{className:"my-1 border-t"}),(0,g.jsxs)("button",{type:"button",role:"menuitem",disabled:a,onClick:function(){hd(function(){return hp(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:"flex w-full cursor-pointer items-center gap-2 rounded-lg px-3 py-2 text-left text-sm text-destructive hover:bg-destructive/10 disabled:cursor-default disabled:opacity-60",children:[(0,g.jsx)(R,{className:"size-4"}),e("nav.signOut")]})]}):null]})}function hg(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,u=e.id===n,c=(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":u,tabIndex:u?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,u,c=null==(s=e.currentTarget.parentElement)?void 0:s.querySelectorAll('[role="tab"]');null==c||null==(u=c[i])||u.focus()}}}(e,o)},className:aT("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",u?"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:aT("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)]",u?"border-primary/20":"border-border"),children:(0,g.jsx)(uz,{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===c?a("harness.currentInactive"):a("harness.current",{name:c})})]}),(0,g.jsx)("span",{className:"font-mono text-[11px] text-muted-foreground",children:e.profiles.length})]},e.id)})})}function hy(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)(L,{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)(sq,{harness:t}),(0,g.jsx)(f3,{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)(ss,{harnessId:t.id})})]})]})})}function hv(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 hb(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 hx(){var e,t=(0,x.Bd)().t,n=so(function(e){return e.login}),r=so(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 hv(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 hv(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)(fG,{}),(0,g.jsx)(pK,{})]})]}),(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 u=[l,s];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&u[0]?r.return:u[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,u[1])).done)return a;switch(r=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,r=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]<a[3])){o.label=u[1];break}if(6===u[0]&&o.label<a[1]){o.label=a[1],a=u;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(u);break}a[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(e){u=[6,e],r=0}finally{n=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[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(l4(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){hb(o,r,a,i,l,"next",e)}function l(e){hb(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)(fG,{}),(0,g.jsx)(pK,{})]})]}),(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)(u1,{htmlFor:"password",children:t("login.password")}),(0,g.jsx)(uY,{id:"password",name:"password",type:"password",autoFocus:!0,required:!0})]}),o?(0,g.jsx)("p",{className:"text-sm text-destructive",children:l6(t,o)}):null,(0,g.jsx)(or,{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=so(function(e){return e.sessionChecked}),n=so(function(e){return e.authenticated}),r=so(function(e){return e.loadSession});return((0,y.useEffect)(function(){r()},[r]),t)?n?(0,g.jsx)(hh,{}):(0,g.jsx)(hx,{}):(0,g.jsx)("div",{className:"flex min-h-[100dvh] items-center justify-center text-sm text-muted-foreground",children:e("app.checkingSession")})},{})})}))})()})();
|