@seaveyon/harness-switch 0.26.0 → 0.27.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.
@@ -0,0 +1,62 @@
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 P=Symbol.iterator;function E(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=P&&e[P]||e["@@iterator"])?e:null}var _=Symbol.for("react.client.reference"),z=Array.isArray,T=o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,A=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R={pending:!1,data:null,method:null,action:null},I=[],L=-1;function M(e){return{current:e}}function D(e){0>L||(e.current=I[L],I[L]=null,L--)}function F(e,t){I[++L]=e.current,e.current=t}var $=M(null),U=M(null),H=M(null),B=M(null);function K(e,t){switch(F(H,t),F(U,e),F($,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?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 V(){D($),D(U),D(H)}function q(e){null!==e.memoizedState&&F(B,e);var t=$.current,n=uv(t,e.type);t!==n&&(F(U,e),F($,n))}function W(e){U.current===e&&(D($),D(U)),B.current===e&&(D(B),ce._currentValue=R)}function Z(e){if(void 0===tL)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);tL=t&&t[1]||"",tM=-1<e.stack.indexOf("\n at")?" (<anonymous>)":-1<e.stack.indexOf("@")?"@unknown:0:0":""}return"\n"+tL+e+tM}var G=!1;function J(e,t){if(!e||G)return"";G=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&"function"==typeof n.catch&&n.catch(function(){})}}catch(e){if(e&&r&&"string"==typeof e.stack)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=r.DetermineComponentFrameRoot(),i=o[0],l=o[1];if(i&&l){var s=i.split("\n"),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{G=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Z(n):""}function Q(e){try{var t="",n=null;do t+=function(e,t){switch(e.tag){case 26:case 27:case 5:return Z(e.type);case 16:return Z("Lazy");case 13:return e.child!==t&&null!==t?Z("Suspense Fallback"):Z("Suspense");case 19:return Z("SuspenseList");case 0:case 15:return J(e.type,!1);case 11:return J(e.type.render,!1);case 1:return J(e.type,!0);case 31:return Z("Activity");default:return""}}(e,n),n=e,e=e.return;while(e);return t}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}var Y=Object.prototype.hasOwnProperty,X=a.unstable_scheduleCallback,ee=a.unstable_cancelCallback,et=a.unstable_shouldYield,en=a.unstable_requestPaint,er=a.unstable_now,ea=a.unstable_getCurrentPriorityLevel,eo=a.unstable_ImmediatePriority,ei=a.unstable_UserBlockingPriority,el=a.unstable_NormalPriority,es=a.unstable_LowPriority,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 eP(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-em(n),a=1<<r;a&t|e[r]&t&&(e[r]|=t),n&=~a}}function eE(e,t){var n=t&-t;return 0!=((n=0!=(42&n)?1:e_(n))&(e.suspendedLanes|t))?0:n}function e_(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 0x1000000:case 0x2000000:e=128;break;case 0x10000000:e=0x8000000;break;default:e=0}return e}function ez(e){return 2<(e&=-e)?8<e?0!=(0x7ffffff&e)?32:0x10000000:8:2}function eT(){var e=A.p;return 0!==e?e:void 0===(e=window.event)?32: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),eI="__reactFiber$"+eR,eL="__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[eI],delete e[eL],delete e[eD],delete e[eF],delete e[e$]}function eK(e){var t=e[eI];if(t)return t;for(var n=e.parentNode;n;){if(t=n[eM]||n[eI]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=uL(e);null!==e;){if(n=e[eI])return n;e=uL(e)}return t}n=(e=n).parentNode}return null}function eV(e){if(e=e[eI]||e[eM]){var t=e.tag;if(5===t||6===t||13===t||31===t||26===t||27===t||3===t)return e}return null}function eq(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e.stateNode;throw Error(l(33))}function eW(e){var t=e[eU];return t||(t=e[eU]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function eZ(e){e[eH]=!0}var eG=new Set,eJ={};function eQ(e,t){eY(e,t),eY(e+"Capture",t)}function eY(e,t){for(eJ[e]=t,e=0;e<t.length;e++)eG.add(t[e])}var eX=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),e0={},e1={};function e2(e,t,n){if(Y.call(e1,t)||!Y.call(e0,t)&&(eX.test(t)?e1[t]=!0:(e0[t]=!0,!1)))if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if("data-"!==r&&"aria-"!==r)return void e.removeAttribute(t)}e.setAttribute(t,""+n)}}function e4(e,t,n){if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function e3(e,t,n,r){if(null===r)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+r)}}function e5(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function e6(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function e8(e){if(!e._valueTracker){var t=e6(e)?"checked":"value";e._valueTracker=function(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&void 0!==r&&"function"==typeof r.get&&"function"==typeof r.set){var a=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(e){n=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e,t,""+e[t])}}function e9(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=e6(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function e7(e){if(void 0===(e=e||("u">typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var te=/[\n"\\]/g;function tt(e){return e.replace(te,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function tn(e,t,n,r,a,o,i,l){e.name="",null!=i&&"function"!=typeof i&&"symbol"!=typeof i&&"boolean"!=typeof i?e.type=i:e.removeAttribute("type"),null!=t?"number"===i?(0===t&&""===e.value||e.value!=t)&&(e.value=""+e5(t)):e.value!==""+e5(t)&&(e.value=""+e5(t)):"submit"!==i&&"reset"!==i||e.removeAttribute("value"),null!=t?ta(e,i,e5(t)):null!=n?ta(e,i,e5(n)):null!=r&&e.removeAttribute("value"),null==a&&null!=o&&(e.defaultChecked=!!o),null!=a&&(e.checked=a&&"function"!=typeof a&&"symbol"!=typeof a),null!=l&&"function"!=typeof l&&"symbol"!=typeof l&&"boolean"!=typeof l?e.name=""+e5(l):e.removeAttribute("name")}function tr(e,t,n,r,a,o,i,l){if(null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o&&(e.type=o),null!=t||null!=n){if(("submit"===o||"reset"===o)&&null==t)return void e8(e);n=null!=n?""+e5(n):"",t=null!=t?""+e5(t):n,l||t===e.value||(e.value=t),e.defaultValue=t}r="function"!=typeof(r=null!=r?r:a)&&"symbol"!=typeof r&&!!r,e.checked=l?e.checked:!!r,e.defaultChecked=!!r,null!=i&&"function"!=typeof i&&"symbol"!=typeof i&&"boolean"!=typeof i&&(e.name=i),e8(e)}function ta(e,t,n){"number"===t&&e7(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function to(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&r&&(e[n].defaultSelected=!0)}else{for(a=0,n=""+e5(n),t=null;a<e.length;a++){if(e[a].value===n){e[a].selected=!0,r&&(e[a].defaultSelected=!0);return}null!==t||e[a].disabled||(t=e[a])}null!==t&&(t.selected=!0)}}function ti(e,t,n){if(null!=t&&((t=""+e5(t))!==e.value&&(e.value=t),null==n)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=null!=n?""+e5(n):""}function tl(e,t,n,r){if(null==t){if(null!=r){if(null!=n)throw Error(l(92));if(z(r)){if(1<r.length)throw Error(l(93));r=r[0]}n=r}null==n&&(n=""),t=n}e.defaultValue=n=e5(t),(r=e.textContent)===n&&""!==r&&null!==r&&(e.value=r),e8(e)}function ts(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType){n.nodeValue=t;return}}e.textContent=t}var 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=eV(e);if(t&&(e=t.stateNode)){var n=e[eL]||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[eL]||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[eL]||null;if(null===r)return null;switch(n=r[t],t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r="button"!==(e=e.type)&&"input"!==e&&"select"!==e&&"textarea"!==e),e=!r;break;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(l(231,t,typeof n));return n}var tO="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement,tC=!1;if(tO)try{var tN={};Object.defineProperty(tN,"passive",{get:function(){tC=!0}}),window.addEventListener("test",tN,tN),window.removeEventListener("test",tN,tN)}catch(e){tC=!1}var tP=null,tE=null,t_=null;function tz(){if(t_)return t_;var e,t,n=tE,r=n.length,a="value"in tP?tP.value:tP.textContent,o=a.length;for(e=0;e<r&&n[e]===a[e];e++);var i=r-e;for(t=1;t<=i&&n[r-t]===a[o-t];t++);return t_=a.slice(e,1<t?1-t:void 0)}function tT(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function tA(){return!0}function tR(){return!1}function tI(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 tL,tM,tD,tF,t$,tU={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},tH=tI(tU),tB=f({},tU,{view:0,detail:0}),tK=tI(tB),tV=f({},tB,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:t2,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==t$&&(t$&&"mousemove"===e.type?(tD=e.screenX-t$.screenX,tF=e.screenY-t$.screenY):tF=tD=0,t$=e),tD)},movementY:function(e){return"movementY"in e?e.movementY:tF}}),tq=tI(tV),tW=tI(f({},tV,{dataTransfer:0})),tZ=tI(f({},tB,{relatedTarget:0})),tG=tI(f({},tU,{animationName:0,elapsedTime:0,pseudoElement:0})),tJ=tI(f({},tU,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),tQ=tI(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=tI(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=tI(f({},tV,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),t5=tI(f({},tB,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:t2})),t6=tI(f({},tU,{propertyName:0,elapsedTime:0,pseudoElement:0})),t8=tI(f({},tV,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),t9=tI(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(eq(e)))return e}function nm(e,t){if("change"===e)return t}var ng=!1;if(tO){if(tO){var ny="oninput"in document;if(!ny){var nv=document.createElement("div");nv.setAttribute("oninput","return;"),ny="function"==typeof nv.oninput}r=ny}else r=!1;ng=r&&(!document.documentMode||9<document.documentMode)}function nb(){nd&&(nd.detachEvent("onpropertychange",nx),nf=nd=null)}function nx(e){if("value"===e.propertyName&&nh(nf)){var t=[];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 nP(e,t){var n,r=nN(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=nN(r)}}function nE(e){e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;for(var t=e7(e.document);t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(n)e=t.contentWindow;else break;t=e7(e.document)}return t}function n_(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var nz=tO&&"documentMode"in document&&11>=document.documentMode,nT=null,nA=null,nR=null,nI=!1;function nL(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;nI||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"),nK=nU("animationstart"),nV=nU("transitionrun"),nq=nU("transitionstart"),nW=nU("transitioncancel"),nZ=nU("transitionend"),nG=new Map,nJ="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function nQ(e,t){nG.set(e,t),eQ(t,[e])}nJ.push("scrollEnd");var nY="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},nX=[],n0=0,n1=0;function n2(){for(var e=n0,t=n1=n0=0;t<e;){var n=nX[t];nX[t++]=null;var r=nX[t];nX[t++]=null;var a=nX[t];nX[t++]=null;var o=nX[t];if(nX[t++]=null,null!==r&&null!==a){var i=r.pending;null===i?a.next=a:(a.next=i.next,i.next=a),r.pending=a}0!==o&&n6(n,a,o)}}function n4(e,t,n,r){nX[n0++]=e,nX[n0++]=t,nX[n0++]=n,nX[n0++]=r,n1|=r,e.lanes|=r,null!==(e=e.alternate)&&(e.lanes|=r)}function n3(e,t,n,r){return n4(e,t,n,r),n8(e)}function n5(e,t){return n4(e,null,null,t),n8(e)}function n6(e,t,n){e.lanes|=n;var r=e.alternate;null!==r&&(r.lanes|=n);for(var a=!1,o=e.return;null!==o;)o.childLanes|=n,null!==(r=o.alternate)&&(r.childLanes|=n),22===o.tag&&(null===(e=o.stateNode)||1&e._visibility||(a=!0)),e=o,o=o.return;return 3===e.tag?(o=e.stateNode,a&&null!==t&&(a=31-em(n),null===(r=(e=o.hiddenUpdates)[a])?e[a]=[t]:r.push(t),t.lane=0x20000000|n),o):null}function n8(e){if(50<sr)throw sr=0,sa=null,Error(l(185));for(var t=e.return;null!==t;)t=(e=t).return;return 3===e.tag?e.stateNode:null}var n9={};function n7(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function re(e,t,n,r){return new n7(e,t,n,r)}function rt(e){return!(!(e=e.prototype)||!e.isReactComponent)}function rn(e,t){var n=e.alternate;return null===n?((n=re(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=0x3e00000&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function rr(e,t){e.flags&=0x3e00002;var n=e.alternate;return null===n?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,e.dependencies=null===(t=n.dependencies)?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ra(e,t,n,r,a,o){var i=0;if(r=e,"function"==typeof e)rt(e)&&(i=1);else if("string"==typeof e)i=!function(e,t,n){if(1===n||null!=t.itemProp)return!1;switch(e){case"meta":case"title":return!0;case"style":if("string"!=typeof t.precedence||"string"!=typeof t.href||""===t.href)break;return!0;case"link":if("string"!=typeof t.rel||"string"!=typeof t.href||""===t.href||t.onLoad||t.onError)break;if("stylesheet"===t.rel)return e=t.disabled,"string"==typeof t.precedence&&null==e;return!0;case"script":if(t.async&&"function"!=typeof t.async&&"symbol"!=typeof t.async&&!t.onLoad&&!t.onError&&t.src&&"string"==typeof t.src)return!0}return!1}(e,n,$.current)?"html"===e||"head"===e||"body"===e?27:5:26;else e:switch(e){case C:return(e=re(31,n,t,a)).elementType=C,e.lanes=o,e;case g:return ro(n.children,a,o,t);case y:i=8,a|=24;break;case v:return(e=re(12,n,t,2|a)).elementType=v,e.lanes=o,e;case k:return(e=re(13,n,t,a)).elementType=k,e.lanes=o,e;case j:return(e=re(19,n,t,a)).elementType=j,e.lanes=o,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case x:i=10;break e;case b:i=9;break e;case w:i=11;break e;case S:i=14;break e;case O:i=16,r=null;break e}i=29,n=Error(l(130,null===e?"null":typeof e,"")),r=null}return(t=re(i,n,t,a)).elementType=e,t.type=r,t.lanes=o,t}function ro(e,t,n,r){return(e=re(7,e,r,t)).lanes=n,e}function ri(e,t,n){return(e=re(6,e,null,t)).lanes=n,e}function rl(e){var t=re(18,null,null,0);return t.stateNode=e,t}function rs(e,t,n){return(t=re(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var 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,rP=null,rE=!1,r_=Error(l(519));function rz(e){var t=Error(l(418,1<arguments.length&&void 0!==arguments[1]&&arguments[1]?"text":"HTML",""));throw rM(rc(t,e)),r_}function rT(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[eI]=e,t[eL]=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:rE=!1;return;case 27:case 3:rE=!0;return;default:rO=rO.return}}function rR(e){if(e!==rO)return!1;if(!rN)return rA(e),rN=!0,!1;var t,n=e.tag;if((t=3!==n&&27!==n)&&((t=5===n)&&(t="form"===(t=e.type)||"button"===t||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=uI(e)}else if(31===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(l(317));rC=uI(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 rI(){rC=rO=null,rN=!1}function rL(){var e=rP;return null!==e&&(null===lX?lX=e:lX.push.apply(lX,e),rP=null),e}function rM(e){null===rP?rP=[e]:rP.push(e)}var rD=M(null),rF=null,r$=null;function rU(e,t,n){F(rD,t._currentValue),t._currentValue=n}function rH(e){e._currentValue=rD.current,D(rD)}function rB(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function rK(e,t,n,r){var a=e.child;for(null!==a&&(a.return=e);null!==a;){var o=a.dependencies;if(null!==o){var i=a.child;o=o.firstContext;e:for(;null!==o;){var s=o;o=a;for(var 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 rV(e,t,n,r){e=null;for(var a=t,o=!1;null!==a;){if(!o){if(0!=(524288&a.flags))o=!0;else if(0!=(262144&a.flags))break}if(10===a.tag){var i=a.alternate;if(null===i)throw Error(l(387));if(null!==(i=i.memoizedProps)){var s=a.type;nO(a.pendingProps.value,i.value)||(null!==e?e.push(s):e=[s])}}else if(a===B.current){if(null===(i=a.alternate))throw Error(l(387));i.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(null!==e?e.push(ce):e=[ce])}a=a.return}null!==e&&rK(t,e,n,r),t.flags|=262144}function rq(e){for(e=e.firstContext;null!==e;){if(!nO(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function rW(e){rF=e,r$=null,null!==(e=e.dependencies)&&(e.firstContext=null)}function rZ(e){return rJ(rF,e)}function rG(e,t){return null===rF&&rW(e),rJ(e,t)}function rJ(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},null===r$){if(null===e)throw Error(l(308));r$=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else r$=r$.next=t;return n}var rQ="u">typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},rY=a.unstable_scheduleCallback,rX=a.unstable_NormalPriority,r0={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function r1(){return{controller:new rQ,data:new Map,refCount:0}}function r2(e){e.refCount--,0===e.refCount&&rY(rX,function(){e.controller.abort()})}var r4=null,r3=0,r5=0,r6=null;function r8(){if(0==--r3&&null!==r4){null!==r6&&(r6.status="fulfilled");var e=r4;r4=null,r5=0,r6=null;for(var t=0;t<e.length;t++)(0,e[t])()}}var r9=T.S;T.S=function(e,t){l2=er(),"object"==typeof t&&null!==t&&"function"==typeof t.then&&function(e){if(null===r4){var t=r4=[];r3=0,r5=sY(),r6={status:"pending",value:void 0,then:function(e){t.push(e)}}}r3++,e.then(r8,r8)}(t),null!==r9&&r9(e,t)};var r7=M(null);function ae(){var e=r7.current;return null!==e?e:lM.pooledCache}function at(e,t){null===t?F(r7,r7.current):F(r7,t.pool)}function an(){var e=ae();return null===e?null:{parent:r0._currentValue,pool:e}}var ar=Error(l(460)),aa=Error(l(474)),ao=Error(l(542)),ai={then:function(){}};function al(e){return"fulfilled"===(e=e.status)||"rejected"===e}function as(e,t,n){switch(void 0===(n=e[n])?e.push(t):n!==t&&(t.then(tg,tg),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw af(e=t.reason),e;default:if("string"==typeof t.status)t.then(tg,tg);else{if(null!==(e=lM)&&100<e.shellSuspendCounter)throw Error(l(482));(e=t).status="pending",e.then(function(e){if("pending"===t.status){var n=t;n.status="fulfilled",n.value=e}},function(e){if("pending"===t.status){var n=t;n.status="rejected",n.reason=e}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw af(e=t.reason),e}throw 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)||E(t))return(t=ro(t,e.mode,n,null)).return=e,t;if("function"==typeof t.then)return f(e,am(t),n);if(t.$$typeof===x)return f(e,rG(e,t),n);ay(e,t)}return null}function p(e,t,n,r){var a=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n||"bigint"==typeof n)return null!==a?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case h:return n.key===a?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)||E(n))return null!==a?null:d(e,t,n,r,null);if("function"==typeof n.then)return p(e,t,am(n),r);if(n.$$typeof===x)return p(e,t,rG(e,n),r);ay(e,n)}return null}function y(e,t,n,r,a){if("string"==typeof r&&""!==r||"number"==typeof r||"bigint"==typeof r)return s(t,e=e.get(n)||null,""+r,a);if("object"==typeof r&&null!==r){switch(r.$$typeof){case h:return 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)||E(r))return d(t,e=e.get(n)||null,r,a,null);if("function"==typeof r.then)return y(e,t,n,am(r),a);if(r.$$typeof===x)return y(e,t,n,rG(t,r),a);ay(t,r)}return null}return function(s,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(E(d)){if("function"!=typeof(b=E(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,rG(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&lL)){var a=r.pending;return null===a?t.next=t:(t.next=a.next,a.next=t),r.pending=t,t=n8(e),n6(e,null,n),t}return n4(e,r,t,n),n8(e)}function aC(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194048&n))){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,eP(e,n)}}function aN(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var a=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var i={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===o?a=o=i:o=o.next=i,n=n.next}while(null!==n);null===o?a=o=t:o=o.next=t}else a=o=t;n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:o,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var aP=!1;function aE(){if(aP){var e=r6;if(null!==e)throw e}}function a_(e,t,n,r){aP=!1;var a=e.updateQueue;aw=!1;var o=a.firstBaseUpdate,i=a.lastBaseUpdate,l=a.shared.pending;if(null!==l){a.shared.pending=null;var s=l,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&&(aP=!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),lW|=i,e.lanes=i,e.memoizedState=d}}function az(e,t){if("function"!=typeof e)throw Error(l(191,e));e.call(t)}function aT(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;e<n.length;e++)az(n[e],t)}var aA=M(null),aR=M(0);function aI(e,t){F(aR,e=lV),F(aA,t),lV=e|t.baseLanes}function aL(){F(aR,lV),F(aA,aA.current)}function aM(){lV=aR.current,D(aA),D(aR)}var aD=M(null),aF=null;function a$(e){var t=e.alternate;F(aV,1&aV.current),F(aD,e),null===aF&&(null===t||null!==aA.current?aF=e:null!==t.memoizedState&&(aF=e))}function aU(e){F(aV,aV.current),F(aD,e),null===aF&&(aF=e)}function aH(e){22===e.tag?(F(aV,aV.current),F(aD,e),null===aF&&(aF=e)):aB(e)}function aB(){F(aV,aV.current),F(aD,aD.current)}function aK(e){D(aD),aF===e&&(aF=null),D(aV)}var aV=M(0);function aq(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||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 aW=0,aZ=null,aG=null,aJ=null,aQ=!1,aY=!1,aX=!1,a0=0,a1=0,a2=null,a4=0;function a3(){throw Error(l(321))}function a5(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!nO(e[n],t[n]))return!1;return!0}function a6(e,t,n,r,a,o){return aW=o,aZ=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,T.H=null===e||null===e.memoizedState?ir:ia,aX=!1,o=n(r,a),aX=!1,aY&&(o=a9(t,n,r,a)),a8(e),o}function a8(e){T.H=it;var t=null!==aG&&null!==aG.next;if(aW=0,aJ=aG=aZ=null,aQ=!1,a1=0,a2=null,t)throw Error(l(300));null===e||iw||null!==(e=e.dependencies)&&rq(e)&&(iw=!0)}function a9(e,t,n,r){aZ=e;var a=0;do{if(aY&&(a2=null),a1=0,aY=!1,25<=a)throw Error(l(301));if(a+=1,aJ=aG=null,null!=e.updateQueue){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,null!=o.memoCache&&(o.memoCache.index=0)}T.H=io,o=t(n,r)}while(aY);return o}function a7(){var e=T.H,t=e.useState()[0];return t="function"==typeof t.then?oi(t):t,e=e.useState()[0],(null!==aG?aG.memoizedState:null)!==e&&(aZ.flags|=1024),t}function oe(){var e=0!==a0;return a0=0,e}function ot(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function on(e){if(aQ){for(e=e.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}aQ=!1}aW=0,aJ=aG=aZ=null,aY=!1,a1=a0=0,a2=null}function or(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===aJ?aZ.memoizedState=aJ=e:aJ=aJ.next=e,aJ}function oa(){if(null===aG){var e=aZ.alternate;e=null!==e?e.memoizedState:null}else e=aG.next;var t=null===aJ?aZ.memoizedState:aJ.next;if(null!==t)aJ=t,aG=e;else{if(null===e){if(null===aZ.alternate)throw Error(l(467));throw Error(l(310))}e={memoizedState:(aG=e).memoizedState,baseState:aG.baseState,baseQueue:aG.baseQueue,queue:aG.queue,next:null},null===aJ?aZ.memoizedState=aJ=e:aJ=aJ.next=e}return aJ}function oo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function oi(e){var t=a1;return a1+=1,null===a2&&(a2=[]),e=as(a2,e,t),t=aZ,null===(null===aJ?t.memoizedState:aJ.next)&&(T.H=null===(t=t.alternate)||null===t.memoizedState?ir:ia),e}function ol(e){if(null!==e&&"object"==typeof e){if("function"==typeof e.then)return oi(e);if(e.$$typeof===x)return rZ(e)}throw Error(l(438,String(e)))}function os(e){var t=null,n=aZ.updateQueue;if(null!==n&&(t=n.memoCache),null==t){var r=aZ.alternate;null!==r&&null!==(r=r.updateQueue)&&null!=(r=r.memoCache)&&(t={data:r.data.map(function(e){return e.slice()}),index:0})}if(null==t&&(t={data:[],index:0}),null===n&&(n=oo(),aZ.updateQueue=n),n.memoCache=t,void 0===(n=t.data[t.index]))for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=N;return t.index++,n}function ou(e,t){return"function"==typeof t?t(e):t}function oc(e){return od(oa(),aG,e)}function od(e,t,n){var r=e.queue;if(null===r)throw Error(l(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(null!==o){if(null!==a){var i=a.next;a.next=o.next,o.next=i}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,null===a)e.memoizedState=o;else{t=a.next;var s=i=null,u=null,c=t,d=!1;do{var f=-0x20000001&c.lane;if(f!==c.lane?(lF&f)===f:(aW&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((aW&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,lW|=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,lW|=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((aG||a).memoizedState,n);if(i&&(a.memoizedState=n,iw=!0),a=a.queue,oD(og.bind(null,r,a,e),[e]),a.getSnapshot!==t||i||null!==aJ&&1&aJ.memoizedState.tag){if(r.flags|=2048,oA(9,{destroy:void 0},om.bind(null,r,a,n,t),null),null===lM)throw Error(l(349));o||0!=(127&aW)||oh(r,t,n)}return n}function oh(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=aZ.updateQueue)?(t=oo(),aZ.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function om(e,t,n,r){t.value=n,t.getSnapshot=r,oy(t)&&ov(e)}function og(e,t,n){return n(function(){oy(t)&&ov(e)})}function oy(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!nO(e,n)}catch(e){return!0}}function ov(e){var t=n5(e,2);null!==t&&sl(t,e,2)}function ob(e){var t=or();if("function"==typeof e){var n=e;if(e=n(),aX){eh(!0);try{n()}finally{eh(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ou,lastRenderedState:e},t}function ox(e,t,n,r){return e.baseState=n,od(e,aG,"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 oP(e,t){if(rN){var n=lM.formState;if(null!==n){e:{var r=aZ;if(rN){if(rC){t:{for(var a=rC,o=rE;8!==a.nodeType;)if(!o||null===(a=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 oE(e){return o_(oa(),aG,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=aG;if(null!==n)return o_(t,n,e);oa(),t=t.memoizedState;var r=(n=oa()).queue.dispatch;return n.memoizedState=e,[t,r,!1]}function oA(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},null===(t=aZ.updateQueue)&&(t=oo(),aZ.updateQueue=t),null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function oR(){return oa().memoizedState}function oI(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 oL(e,t,n,r){var a=oa();r=void 0===r?null:r;var o=a.memoizedState.inst;null!==aG&&null!==r&&a5(r,aG.memoizedState.deps)?a.memoizedState=oA(t,o,n,r):(aZ.flags|=e,a.memoizedState=oA(1|t,o,n,r))}function oM(e,t){oI(8390656,8,e,t)}function oD(e,t){oL(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&lL))throw Error(l(440));return t.impl.apply(void 0,arguments)}}function o$(e,t){return oL(4,2,e,t)}function oU(e,t){return oL(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,oL(4,4,oH.bind(null,t,e),n)}function oK(){}function oV(e,t){var n=oa();t=void 0===t?null:t;var r=n.memoizedState;return null!==t&&a5(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function oq(e,t){var n=oa();t=void 0===t?null:t;var r=n.memoizedState;if(null!==t&&a5(t,r[1]))return r[0];if(r=e(),aX){eh(!0);try{e()}finally{eh(!1)}}return n.memoizedState=[r,t],r}function oW(e,t,n){return void 0===n||0!=(0x40000000&aW)&&0==(261930&lF)?e.memoizedState=t:(e.memoizedState=n,e=si(),aZ.lanes|=e,lW|=e,n)}function oZ(e,t,n,r){return nO(n,t)?n:null!==aA.current?(nO(e=oW(e,n,r),t)||(iw=!0),e):0==(42&aW)||0!=(0x40000000&aW)&&0==(261930&lF)?(iw=!0,e.memoizedState=n):(e=si(),aZ.lanes|=e,lW|=e,t)}function oG(e,t,n,r,a){var o=A.p;A.p=0!==o&&8>o?o:8;var i=T.T,l={};T.T=l,o8(e,!1,t,n);try{var s=a(),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 oJ(){}function oQ(e,t,n,r){if(5!==e.tag)throw Error(l(476));var a=oY(e).queue;oG(e,a,t,R,null===n?oJ:function(){return oX(e),n(r)})}function oY(e){var t=e.memoizedState;if(null!==t)return t;var n={};return(t={memoizedState:R,baseState:R,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer: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,eP(e,n)}}var it={readContext:rZ,use:ol,useCallback:a3,useContext:a3,useEffect:a3,useImperativeHandle:a3,useLayoutEffect:a3,useInsertionEffect:a3,useMemo:a3,useReducer:a3,useRef:a3,useState:a3,useDebugValue:a3,useDeferredValue:a3,useTransition:a3,useSyncExternalStore:a3,useId:a3,useHostTransitionStatus:a3,useFormState:a3,useActionState:a3,useOptimistic:a3,useMemoCache:a3,useCacheRefresh:a3};it.useEffectEvent=a3;var ir={readContext:rZ,use:ol,useCallback:function(e,t){return or().memoizedState=[e,void 0===t?null:t],e},useContext:rZ,useEffect:oM,useImperativeHandle:function(e,t,n){n=null!=n?n.concat([e]):null,oI(4194308,4,oH.bind(null,t,e),n)},useLayoutEffect:function(e,t){return oI(4194308,4,e,t)},useInsertionEffect:function(e,t){oI(4,2,e,t)},useMemo:function(e,t){var n=or();t=void 0===t?null:t;var r=e();if(aX){eh(!0);try{e()}finally{eh(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=or();if(void 0!==n){var a=n(t);if(aX){eh(!0);try{n(t)}finally{eh(!1)}}}else a=t;return r.memoizedState=r.baseState=a,r.queue=e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},e=e.dispatch=o3.bind(null,aZ,e),[r.memoizedState,e]},useRef:function(e){return or().memoizedState={current:e}},useState:function(e){var t=(e=ob(e)).queue,n=o5.bind(null,aZ,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:oK,useDeferredValue:function(e,t){return oW(or(),e,t)},useTransition:function(){var e=ob(!1);return e=oG.bind(null,aZ,e.queue,!0,!1),or().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=aZ,a=or();if(rN){if(void 0===n)throw Error(l(407));n=n()}else{if(n=t(),null===lM)throw Error(l(349));0!=(127&lF)||oh(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,oM(og.bind(null,r,o,e),[e]),r.flags|=2048,oA(9,{destroy:void 0},om.bind(null,r,o,n,t),null),n},useId:function(){var e=or(),t=lM.identifierPrefix;if(rN){var n=rb,r=rv;t="_"+t+"R_"+(n=(r&~(1<<32-em(r)-1)).toString(32)+n),0<(n=a0++)&&(t+="H"+n.toString(32)),t+="_"}else t="_"+t+"r_"+(n=a4++).toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:o0,useFormState:oP,useActionState:oP,useOptimistic:function(e){var t=or();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=o8.bind(null,aZ,!0,n),n.dispatch=t,[e,t]},useMemoCache:os,useCacheRefresh:function(){return or().memoizedState=o4.bind(null,aZ)},useEffectEvent:function(e){var t=or(),n={impl:e};return t.memoizedState=n,function(){if(0!=(2&lL))throw Error(l(440));return n.impl.apply(void 0,arguments)}}},ia={readContext:rZ,use:ol,useCallback:oV,useContext:rZ,useEffect:oD,useImperativeHandle:oB,useInsertionEffect:o$,useLayoutEffect:oU,useMemo:oq,useReducer:oc,useRef:oR,useState:function(){return oc(ou)},useDebugValue:oK,useDeferredValue:function(e,t){return oZ(oa(),aG.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:oE,useActionState:oE,useOptimistic:function(e,t){return ox(oa(),aG,e,t)},useMemoCache:os,useCacheRefresh:o2};ia.useEffectEvent=oF;var io={readContext:rZ,use:ol,useCallback:oV,useContext:rZ,useEffect:oD,useImperativeHandle:oB,useInsertionEffect:o$,useLayoutEffect:oU,useMemo:oq,useReducer:of,useRef:oR,useState:function(){return of(ou)},useDebugValue:oK,useDeferredValue:function(e,t){var n=oa();return null===aG?oW(n,e,t):oZ(n,aG.memoizedState,e,t)},useTransition:function(){var e=of(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!==aG?ox(n,aG,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:os,useCacheRefresh:o2};function ii(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:f({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}io.useEffectEvent=oF;var il={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=so(),a=aS(r);a.payload=t,null!=n&&(a.callback=n),null!==(t=aO(e,a,r))&&(sl(t,e,r),aC(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=so(),a=aS(r);a.tag=1,a.payload=t,null!=n&&(a.callback=n),null!==(t=aO(e,a,r))&&(sl(t,e,r),aC(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=so(),r=aS(n);r.tag=2,null!=t&&(r.callback=t),null!==(t=aO(e,r,n))&&(sl(t,e,n),aC(t,e,n))}};function is(e,t,n,r,a,o,i){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,i):!t.prototype||!t.prototype.isPureReactComponent||!nC(n,r)||!nC(a,o)}function 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(rW(t),r=a6(e,t,n,i,o,a),l=oe(),null===e||iw)?(rN&&l&&rk(t),t.flags|=1,ik(e,t,r,a),t.child):(ot(e,t,a),iq(e,t,a))}function iS(e,t,n,r,a){if(null===e){var o=n.type;return"function"!=typeof o||rt(o)||void 0!==o.defaultProps||null!==n.compare?((e=ra(n.type,null,r,t,t.mode,a)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,iO(e,t,o,r,a))}if(o=e.child,!iW(e,a)){var i=o.memoizedProps;if((n=null!==(n=n.compare)?n:nC)(i,r)&&e.ref===t.ref)return iq(e,t,a)}return t.flags|=1,(e=rn(o,r)).ref=t.ref,e.return=t,t.child=e}function iO(e,t,n,r,a){if(null!==e){var o=e.memoizedProps;if(nC(o,r)&&e.ref===t.ref)if(iw=!1,t.pendingProps=r=o,!iW(e,a))return t.lanes=e.lanes,iq(e,t,a);else 0!=(131072&e.flags)&&(iw=!0)}return iT(e,t,n,r,a)}function iC(e,t,n,r){var a=r.children,o=null!==e?e.memoizedState:null;if(null===e&&null===t.stateNode&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),"hidden"===r.mode){if(0!=(128&t.flags)){if(o=null!==o?o.baseLanes|n:n,null!==e){for(a=0,r=t.child=e.child;null!==r;)a=a|r.lanes|r.childLanes,r=r.sibling;r=a&~o}else r=0,t.child=null;return iP(e,t,o,n,r)}if(0==(0x20000000&n))return r=t.lanes=0x20000000,iP(e,t,null!==o?o.baseLanes|n:n,n,r);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&at(t,null!==o?o.cachePool:null),null!==o?aI(t,o):aL(),aH(t)}else null!==o?(at(t,o.cachePool),aI(t,o),aB(t),t.memoizedState=null):(null!==e&&at(t,null),aL(),aB(t));return ik(e,t,a,n),t.child}function iN(e,t){return null!==e&&22===e.tag||null!==t.stateNode||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function iP(e,t,n,r,a){var o=ae();return t.memoizedState={baseLanes:n,cachePool:o=null===o?null:{parent:r0._currentValue,pool:o}},null!==e&&at(t,null),aL(),aH(t),null!==e&&rV(e,t,r,!0),t.childLanes=a,null}function iE(e,t){return(t=iU({mode:t.mode,children:t.children},e.mode)).ref=e.ref,e.child=t,t.return=e,t}function i_(e,t,n){return ab(t,e.child,null,n),e=iE(t,t.pendingProps),e.flags|=2,aK(t),t.memoizedState=null,e}function iz(e,t){var n=t.ref;if(null===n)null!==e&&null!==e.ref&&(t.flags|=4194816);else{if("function"!=typeof n&&"object"!=typeof n)throw Error(l(284));(null===e||e.ref!==n)&&(t.flags|=4194816)}}function iT(e,t,n,r,a){return(rW(t),n=a6(e,t,n,r,void 0,a),r=oe(),null===e||iw)?(rN&&r&&rk(t),t.flags|=1,ik(e,t,n,a),t.child):(ot(e,t,a),iq(e,t,a))}function iA(e,t,n,r,a,o){return(rW(t),t.updateQueue=null,n=a9(t,r,n,a),a8(e),r=oe(),null===e||iw)?(rN&&r&&rk(t),t.flags|=1,ik(e,t,n,o),t.child):(ot(e,t,o),iq(e,t,o))}function iR(e,t,n,r,a){if(rW(t),null===t.stateNode){var o=n9,i=n.contextType;"object"==typeof i&&null!==i&&(o=rZ(i)),t.memoizedState=null!==(o=new n(r,o)).state&&void 0!==o.state?o.state:null,o.updater=il,t.stateNode=o,o._reactInternals=t,(o=t.stateNode).props=r,o.state=t.memoizedState,o.refs={},ak(t),i=n.contextType,o.context="object"==typeof i&&null!==i?rZ(i):n9,o.state=t.memoizedState,"function"==typeof(i=n.getDerivedStateFromProps)&&(ii(t,n,i,r),o.state=t.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(i=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),i!==o.state&&il.enqueueReplaceState(o,o.state,null),a_(t,r,o,a),aE(),o.state=t.memoizedState),"function"==typeof o.componentDidMount&&(t.flags|=4194308),r=!0}else if(null===e){o=t.stateNode;var l=t.memoizedProps,s=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),aE(),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),aE();var p=t.memoizedState;i!==d||f!==p||aw||null!==e&&null!==e.dependencies&&rq(e.dependencies)?("function"==typeof l&&(ii(t,n,l,r),p=t.memoizedState),(c=aw||is(t,n,c,r,f,p,s)||null!==e&&null!==e.dependencies&&rq(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=iq(e,t,a),e}function iI(e,t,n,r){return rI(),t.flags|=256,ik(e,t,n,r),t.child}var iL={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function iM(e){return{baseLanes:e,cachePool:an()}}function iD(e,t,n){return e=null!==e?e.childLanes&~n:0,t&&(e|=lJ),e}function iF(e,t,n){var r,a=t.pendingProps,o=!1,i=0!=(128&t.flags);if((r=i)||(r=(null===e||null!==e.memoizedState)&&0!=(2&aV.current)),r&&(o=!0,t.flags&=-129),r=0!=(32&t.flags),t.flags&=-33,null===e){if(rN){if(o?a$(t):aB(t),(e=rC)?null!==(e=null!==(e=u_(e,rE))&&"&"!==e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==ry?{id:rv,overflow:rb}:null,retryLane:0x20000000,hydrationErrors:null},(n=rl(e)).return=t,t.child=n,rO=t,rC=null):e=null,null===e)throw rz(t);return 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=iL,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=iL,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||rV(e,t,n,!1),r=0!=(n&e.childLanes),iw||r){if(null!==(r=lM)&&0!==(a=eE(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,rP=null,rE=!1,null!==e&&rS(t,e),t=i$(t,a.children),t.flags|=4096);return t}return o?(aB(t),s=a.fallback,o=t.mode,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=iL,iN(e.child,a)):(a$(t),e=(n=e.child).sibling,(n=rn(n,{mode:"visible",children:a.children})).return=t,n.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n)}function i$(e,t){return(t=iU({mode:"visible",children:t},e.mode)).return=e,e.child=t}function iU(e,t){return(e=re(22,e,null,t)).lanes=0,e}function iH(e,t,n){return ab(t,e.child,null,n),e=i$(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function iB(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),rB(e.return,t,n)}function iK(e,t,n,r,a,o){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:a,treeForkCount:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=a,i.treeForkCount=o)}function iV(e,t,n){var r=t.pendingProps,a=r.revealOrder,o=r.tail;r=r.children;var i=aV.current,l=0!=(2&i);if(l?(i=1&i|2,t.flags|=128):i&=1,F(aV,i),ik(e,t,r,n),r=rN?rh:0,!l&&null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&iB(e,n,t);else if(19===e.tag)iB(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(a){case"forwards":for(a=null,n=t.child;null!==n;)null!==(e=n.alternate)&&null===aq(e)&&(a=n),n=n.sibling;null===(n=a)?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),iK(t,!1,a,n,o,r);break;case"backwards":case"unstable_legacy-backwards":for(n=null,a=t.child,t.child=null;null!==a;){if(null!==(e=a.alternate)&&null===aq(e)){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}iK(t,!0,n,null,o,r);break;case"together":iK(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function iq(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),lW|=t.lanes,0==(n&t.childLanes)){if(null===e)return null;else if(rV(e,t,n,!1),0==(n&t.childLanes))return null}if(null!==e&&t.child!==e.child)throw Error(l(153));if(null!==t.child){for(n=rn(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=rn(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function iW(e,t){return 0!=(e.lanes&t)||!!(null!==(e=e.dependencies)&&rq(e))}function iZ(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps)iw=!0;else{if(!iW(e,n)&&0==(128&t.flags))return iw=!1,function(e,t,n){switch(t.tag){case 3:K(t,t.stateNode.containerInfo),rU(t,r0,e.memoizedState.cache),rI();break;case 27:case 5:q(t);break;case 4:K(t,t.stateNode.containerInfo);break;case 10:rU(t,t.type,t.memoizedProps.value);break;case 31:if(null!==t.memoizedState)return t.flags|=128,aU(t),null;break;case 13:var r=t.memoizedState;if(null!==r){if(null!==r.dehydrated)return a$(t),t.flags|=128,null;if(0!=(n&t.child.childLanes))return iF(e,t,n);return a$(t),null!==(e=iq(e,t,n))?e.sibling:null}a$(t);break;case 19:var a=0!=(128&e.flags);if((r=0!=(n&t.childLanes))||(rV(e,t,n,!1),r=0!=(n&t.childLanes)),a){if(r)return iV(e,t,n);t.flags|=128}if(null!==(a=t.memoizedState)&&(a.rendering=null,a.tail=null,a.lastEffect=null),F(aV,aV.current),!r)return null;break;case 22:return t.lanes=0,iC(e,t,n,t.pendingProps);case 24:rU(t,r0,e.memoizedState.cache)}return iq(e,t,n)}(e,t,n);iw=0!=(131072&e.flags)}else iw=!1,rN&&0!=(1048576&t.flags)&&rw(t,rh,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=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(K(t,t.stateNode.containerInfo),null===e)throw Error(l(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,aj(e,t),a_(t,r,null,n);var i=t.memoizedState;if(rU(t,r0,r=i.cache),r!==o.cache&&rK(t,[r0],n,!0),aE(),r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=iI(e,t,r,n);break e}else if(r!==a){rM(a=rc(Error(l(424)),t)),t=iI(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,rP=null,rE=!0,n=ax(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling;else{if(rI(),r===a){t=iq(e,t,n);break e}ik(e,t,r,n)}t=t.child}return t;case 26:return iz(e,t),null===e?(n=uV(t.type,null,t.pendingProps,null))?t.memoizedState=n:rN||(n=t.type,e=t.pendingProps,(r=ug(H.current).createElement(n))[eI]=t,r[eL]=e,uf(r,n,e),eZ(r),t.stateNode=r):t.memoizedState=uV(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return q(t),null===e&&rN&&(r=t.stateNode=uM(t.type,t.pendingProps,H.current),rO=t,rE=!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,rE))?(t.stateNode=r,rO=t,rC=uA(r.firstChild),rE=!1,a=!0):a=!1),a||rz(t)),q(t),a=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,r=o.children,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,rE))?(t.stateNode=n,rO=t,rC=null,e=!0):e=!1),e||rz(t)),null;case 13:return iF(e,t,n);case 4:return K(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=ab(t,null,r,n):ik(e,t,r,n),t.child;case 11:return ij(e,t,t.type,t.pendingProps,n);case 7:return ik(e,t,t.pendingProps,n),t.child;case 8:case 12:return ik(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,rU(t,t.type,r.value),ik(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,rW(t),r=r(a=rZ(a)),t.flags|=1,ik(e,t,r,n),t.child;case 14:return iS(e,t,t.type,t.pendingProps,n);case 15:return iO(e,t,t.type,t.pendingProps,n);case 19:return iV(e,t,n);case 31:var s=e,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=iE(u,d),u.lanes=0x20000000,iN(null,s);if(aU(u),(s=rC)?null!==(s=null!==(s=u_(s,rE))&&"&"===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 iE(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||rV(s,u,c,!1),f=0!=(c&s.childLanes),iw||f){if(null!==(d=lM)&&0!==(h=eE(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,rP=null,rE=!1,null!==s&&rS(u,s),u=iE(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 rW(t),r=rZ(r0),null===e?(null===(a=ae())&&(a=lM,o=r1(),a.pooledCache=o,o.refCount++,null!==o&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},ak(t),rU(t,r0,a)):(0!=(e.lanes&n)&&(aj(e,t),a_(t,null,null,n),aE()),a=e.memoizedState,o=t.memoizedState,a.parent!==r?(a={parent:r,cache:r},t.memoizedState=a,0===t.lanes&&(t.memoizedState=t.updateQueue.baseState=a),rU(t,r0,r)):(rU(t,r0,r=o.cache),r!==a.cache&&rK(t,[r0],n,!0))),ik(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(l(156,t.tag))}function iG(e){e.flags|=4}function iJ(e,t,n,r,a){if((t=0!=(32&e.mode))&&(t=!1),t){if(e.flags|=0x1000000,(0x13ffff40&a)===a)if(e.stateNode.complete)e.flags|=8192;else if(sm())e.flags|=8192;else throw 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),V();break;case 26:case 27:case 5:W(t);break;case 4:V();break;case 31:null!==t.memoizedState&&aK(t);break;case 13:aK(t);break;case 19:D(aV);break;case 10:rH(t.type);break;case 22:case 23:aK(t),aM(),null!==e&&D(r7);break;case 24:rH(r0)}}function i2(e,t){try{var n=t.updateQueue,r=null!==n?n.lastEffect:null;if(null!==r){var a=r.next;n=a;do{if((n.tag&e)===e){r=void 0;var o=n.create;n.inst.destroy=r=o()}n=n.next}while(n!==a)}}catch(e){sA(t,t.return,e)}}function i4(e,t,n){try{var r=t.updateQueue,a=null!==r?r.lastEffect:null;if(null!==a){var o=a.next;r=o;do{if((r.tag&e)===e){var i=r.inst,l=i.destroy;if(void 0!==l){i.destroy=void 0,a=t;try{l()}catch(e){sA(a,n,e)}}}r=r.next}while(r!==o)}}catch(e){sA(t,t.return,e)}}function i3(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{aT(t,n)}catch(t){sA(e,e.return,t)}}}function i5(e,t,n){n.props=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[eL]=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[eI]=e,t[eL]=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[eI]||"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[eI]=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[eI]=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?uP(h,!0):uP(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 lP(e,t,n){if(e.subtreeFlags&lN)for(e=e.child;null!==e;)lE(e,t,n),e=e.sibling}function lE(e,t,n){switch(e.tag){case 26:lP(e,t,n),e.flags&lN&&null!==e.memoizedState&&function(e,t,n,r){if("stylesheet"===n.type&&("string"!=typeof r.media||!1!==matchMedia(r.media).matches)&&0==(4&n.state.loading)){if(null===n.instance){var a=uq(r.href),o=t.querySelector(uW(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:lP(e,t,n);break;case 3:case 4:var r=lv;lv=uU(e.stateNode.containerInfo),lP(e,t,n),lv=r;break;case 22:null===e.memoizedState&&(null!==(r=e.alternate)&&null!==r.memoizedState?(r=lN,lN=0x1000000,lP(e,t,n),lN=r):lP(e,t,n))}}function l_(e){var t=e.alternate;if(null!==t&&null!==(e=t.child)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(null!==e)}}function lz(e){var t=e.deletions;if(0!=(16&e.flags)){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];ls=r,lA(r,e)}l_(e)}if(10256&e.subtreeFlags)for(e=e.child;null!==e;)lT(e),e=e.sibling}function lT(e){switch(e.tag){case 0:case 11:case 15:lz(e),2048&e.flags&&i4(9,e,e.return);break;case 3:case 12:default:lz(e);break;case 22:var t=e.stateNode;null!==e.memoizedState&&2&t._visibility&&(null===e.return||13!==e.return.tag)?(t._visibility&=-3,function e(t){var n=t.deletions;if(0!=(16&t.flags)){if(null!==n)for(var r=0;r<n.length;r++){var a=n[r];ls=a,lA(a,t)}l_(t)}for(t=t.child;null!==t;){switch((n=t).tag){case 0:case 11:case 15:i4(8,n,n.return),e(n);break;case 22:2&(r=n.stateNode)._visibility&&(r._visibility&=-3,e(n));break;default:e(n)}t=t.sibling}}(e)):lz(e)}}function lA(e,t){for(;null!==ls;){var n=ls;switch(n.tag){case 0:case 11:case 15:i4(8,n,t);break;case 23:case 22:if(null!==n.memoizedState&&null!==n.memoizedState.cachePool){var r=n.memoizedState.cachePool.pool;null!=r&&r.refCount++}break;case 24:r2(n.memoizedState.cache)}if(null!==(r=n.child))r.return=n,ls=r;else for(n=e;null!==ls;){var a=(r=ls).sibling,o=r.return;if(!function e(t){var n=t.alternate;null!==n&&(t.alternate=null,e(n)),t.child=null,t.deletions=null,t.sibling=null,5===t.tag&&null!==(n=t.stateNode)&&eB(n),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}(r),r===n){ls=null;break}if(null!==a){a.return=o,ls=a;break}ls=o}}}var lR={getCacheForType:function(e){var t=rZ(r0),n=t.data.get(e);return void 0===n&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return rZ(r0).controller.signal}},lI="function"==typeof WeakMap?WeakMap:Map,lL=0,lM=null,lD=null,lF=0,l$=0,lU=null,lH=!1,lB=!1,lK=!1,lV=0,lq=0,lW=0,lZ=0,lG=0,lJ=0,lQ=0,lY=null,lX=null,l0=!1,l1=0,l2=0,l4=1/0,l3=null,l5=null,l6=0,l8=null,l9=null,l7=0,se=0,st=null,sn=null,sr=0,sa=null;function so(){return 0!=(2&lL)&&0!==lF?lF&-lF:null!==T.T?sY():eT()}function si(){if(0===lJ)if(0==(0x20000000&lF)||rN){var e=eb;0==(3932160&(eb<<=1))&&(eb=262144),lJ=e}else lJ=0x20000000;return null!==(e=aD.current)&&(e.flags|=32),lJ}function sl(e,t,n){(e===lM&&(2===l$||9===l$)||null!==e.cancelPendingCommit)&&(sp(e,0),sc(e,lF,lJ,!1)),eC(e,n),(0==(2&lL)||e!==lM)&&(e===lM&&(0==(2&lL)&&(lZ|=n),4===lq&&sc(e,lF,lJ,!1)),sV(e))}function ss(e,t,n){if(0!=(6&lL))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=lL;lL|=2;var r=sg(),a=sy();lM!==e||lF!==t?(l3=null,l4=er()+500,sp(e,t)):lB=ej(e,t);e:for(;;)try{if(0!==l$&&null!==lD){t=lD;var o=lU;t:switch(l$){case 1:l$=0,lU=null,sk(e,t,o,1);break;case 2:case 9:if(al(o)){l$=0,lU=null,sw(t);break}t=function(){2!==l$&&9!==l$||lM!==e||(l$=7),sV(e)},o.then(t,t);break e;case 3:l$=7;break e;case 4:l$=5;break e;case 7:al(o)?(l$=0,lU=null,sw(t)):(l$=0,lU=null,sk(e,t,o,7));break;case 5:var i=null;switch(lD.tag){case 26:i=lD.memoizedState;case 5:case 27:var s=lD;if(i?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(),lq=6;break e;default:throw Error(l(462))}}for(;null!==lD&&!et();)sx(lD);break}catch(t){sh(e,t)}return(r$=rF=null,T.H=r,T.A=a,lL=n,null!==lD)?0:(lM=null,lF=0,n2(),lq)}(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(lK&&!s){e.errorRecoveryDisabledLanes|=o,lZ|=o,a=4;break e}o=lX,lX=a,null!==o&&(null===lX?lX=o:lX.push.apply(lX,o))}a=i}if(o=!1,2!==a)continue}}if(1===a){sp(e,0),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,lJ,!lH);break e;case 2:lX=null;break;case 3:case 5:break;default:throw Error(l(329))}if((0x3c00000&t)===t&&10<(a=l1+300-er())){if(sc(r,t,lJ,!lH),0!==ek(r,0,!0))break e;l7=t,r.timeoutHandle=uw(su.bind(null,r,n,lX,l3,l0,t,lJ,lZ,lQ,lH,o,"Throttled",-0,0),a);break e}su(r,n,lX,l3,l0,t,lJ,lZ,lQ,lH,o,null,-0,0)}}break}sV(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)){lE(t,o,d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:tg});var h,m,g=(0x3c00000&o)===o?l1-er():(4194048&o)===o?l2-er():0;if(null!==(h=d,m=g,h.stylesheets&&0===h.count&&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&=~lG,t&=~lZ,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var a=t;0<a;){var o=31-em(a),i=1<<o;r[o]=-1,a&=~i}0!==n&&eN(e,n,t)}function sd(){return 0!=(6&lL)||(sq(0,!1),!1)}function sf(){if(null!==lD){if(0===l$)var e=lD.return;else e=lD,r$=rF=null,on(e),ap=null,ah=0,e=lD;for(;null!==e;)i1(e.alternate,e),e=e.return;lD=null}}function sp(e,t){var n=e.timeoutHandle;-1!==n&&(e.timeoutHandle=-1,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),lK=!1,lQ=lJ=lG=lZ=lW=lq=0,lX=lY=null,l0=!1,0!=(8&t)&&(t|=32&t);var r=e.entangledLanes;if(0!==r)for(e=e.entanglements,r&=t;0<r;){var a=31-em(r),o=1<<a;t|=e[a],r&=~o}return lV=t,n2(),n}function sh(e,t){aZ=null,T.H=it,t===ar||t===ao?(t=ad(),l$=3):t===aa?(t=ad(),l$=4):l$=t===ix?8:null!==t&&"object"==typeof t&&"function"==typeof t.then?6:1,lU=t,null===lD&&(lq=1,im(e,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(){lq=4,lH||(4194048&lF)!==lF&&null!==aD.current||(lB=!0),0==(0x7ffffff&lW)&&0==(0x7ffffff&lZ)||null===lM||sc(lM,lF,lJ,!1)}function sb(e,t,n){var r=lL;lL|=2;var a=sg(),o=sy();(lM!==e||lF!==t)&&(l3=null,sp(e,t)),t=!1;var i=lq;e:for(;;)try{if(0!==l$&&null!==lD){var l=lD,s=lU;switch(l$){case 8:sf(),i=6;break e;case 3:case 2:case 9:case 6:null===aD.current&&(t=!0);var 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=lq;break}catch(t){sh(e,t)}return t&&e.shellSuspendCounter++,r$=rF=null,lL=r,T.H=a,T.A=o,null===lD&&(lM=null,lF=0,n2()),i}function sx(e){var t=iZ(e.alternate,e,lV);e.memoizedProps=e.pendingProps,null===t?sj(e):lD=t}function sw(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=iA(n,t,t.pendingProps,t.type,void 0,lF);break;case 11:t=iA(n,t,t.pendingProps,t.type.render,t.ref,lF);break;case 5:on(t);default:i1(n,t),t=iZ(n,t=lD=rr(t,lV),lV)}e.memoizedProps=e.pendingProps,null===t?sj(e):lD=t}function sk(e,t,n,r){r$=rF=null,on(t),ap=null,ah=0;var a=t.return;try{if(function(e,t,n,r,a){if(n.flags|=32768,null!==r&&"object"==typeof r&&"function"==typeof r.then){if(null!==(t=n.alternate)&&rV(t,n,a,!0),null!==(n=aD.current)){switch(n.tag){case 31:case 13:return null===aF?sv():null===n.alternate&&0===lq&&(lq=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===ai?n.flags|=16384:(null===(t=n.updateQueue)?n.updateQueue=new Set([r]):t.add(r),sR(e,r,a)),!1;case 22:return n.flags|=65536,r===ai?n.flags|=16384:(null===(t=n.updateQueue)?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):null===(n=t.retryQueue)?t.retryQueue=new Set([r]):n.add(r),sR(e,r,a)),!1}throw Error(l(435,n.tag))}return sR(e,r,a),sv(),!1}if(rN)return null!==(t=aD.current)?(0==(65536&t.flags)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==r_&&rM(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!==lq&&(lq=2)),!1;var o=Error(l(520),{cause:r});if(o=rc(o,n),null===lY?lY=[o]:lY.push(o),4!==lq&&(lq=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)){lq=1,im(e,rc(n,e.current)),lD=null;return}}catch(t){if(null!==a)throw lD=a,t;lq=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),V(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(null===e||null===e.child)&&(rR(t)?iG(t):null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,rL())),i0(t),null;case 26:var a=t.type,o=t.memoizedState;return null===e?(iG(t),null!==o?(i0(t),iQ(t,o)):(i0(t),iJ(t,a,null,r,n))):o?o!==e.memoizedState?(iG(t),i0(t),iQ(t,o)):(i0(t),t.flags&=-0x1000001):((e=e.memoizedProps)!==r&&iG(t),i0(t),iJ(t,a,e,r,n)),null;case 27:if(W(t),n=H.current,a=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==r&&iG(t);else{if(!r){if(null===t.stateNode)throw Error(l(166));return i0(t),null}e=$.current,rR(t)?rT(t,e):(t.stateNode=e=uM(a,r,n),iG(t))}return i0(t),null;case 5:if(W(t),a=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==r&&iG(t);else{if(!r){if(null===t.stateNode)throw Error(l(166));return i0(t),null}if(o=$.current,rR(t))rT(t,o);else{var i=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[eI]=t,o[eL]=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&&iG(t)}}return i0(t),iJ(t,t.type,null===e?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&iG(t);else{if("string"!=typeof r&&null===t.stateNode)throw Error(l(166));if(e=H.current,rR(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,null!==(a=rO))switch(a.tag){case 27:case 5:r=a.memoizedProps}e[eI]=t,(e=!!(e.nodeValue===n||null!==r&&!0===r.suppressHydrationWarning||uu(e.nodeValue,n)))||rz(t,!0)}else(e=ug(e).createTextNode(r))[eI]=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[eI]=t}else rI(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;i0(t),e=!1}else n=rL(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e){if(256&t.flags)return aK(t),t;return aK(t),null}if(0!=(128&t.flags))throw Error(l(558))}return i0(t),null;case 13:if(r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(a=rR(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(l(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(l(317));a[eI]=t}else rI(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;i0(t),a=!1}else a=rL(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a){if(256&t.flags)return aK(t),t;return aK(t),null}}if(aK(t),0!=(128&t.flags))return t.lanes=n,t;return n=null!==r,e=null!==e&&null!==e.memoizedState,n&&(r=t.child,a=null,null!==r.alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(a=r.alternate.memoizedState.cachePool.pool),o=null,null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),iY(t,t.updateQueue),i0(t),null;case 4:return V(),null===e&&s7(t.stateNode.containerInfo),i0(t),null;case 10:return rH(t.type),i0(t),null;case 19:if(D(aV),null===(r=t.memoizedState))return i0(t),null;if(a=0!=(128&t.flags),null===(o=r.rendering))if(a)iX(r,!1);else{if(0!==lq||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(o=aq(e))){for(t.flags|=128,iX(r,!1),t.updateQueue=e=o.updateQueue,iY(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)rr(n,e),n=n.sibling;return F(aV,1&aV.current|2),rN&&rx(t,r.treeForkCount),t.child}e=e.sibling}null!==r.tail&&er()>l4&&(t.flags|=128,a=!0,iX(r,!1),t.lanes=4194304)}else{if(!a)if(null!==(e=aq(o))){if(t.flags|=128,a=!0,t.updateQueue=e=e.updateQueue,iY(t,e),iX(r,!0),null===r.tail&&"hidden"===r.tailMode&&!o.alternate&&!rN)return i0(t),null}else 2*er()-r.renderingStartTime>l4&&0x20000000!==n&&(t.flags|=128,a=!0,iX(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(null!==(e=r.last)?e.sibling=o:t.child=o,r.last=o)}if(null!==r.tail)return e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=er(),e.sibling=null,n=aV.current,F(aV,a?1&n|2:1&n),rN&&rx(t,r.treeForkCount),e;return i0(t),null;case 22:case 23:return aK(t),aM(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?0!=(0x20000000&n)&&0==(128&t.flags)&&(i0(t),6&t.subtreeFlags&&(t.flags|=8192)):i0(t),null!==(n=t.updateQueue)&&iY(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&D(r7),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),rH(r0),i0(t),null;case 25:case 30:return null}throw Error(l(156,t.tag))}(t.alternate,t,lV);if(null!==n){lD=n;return}if(null!==(t=t.sibling)){lD=t;return}lD=t=e}while(null!==t);0===lq&&(lq=5)}function sS(e,t){do{var n=function(e,t){switch(rj(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return rH(r0),V(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return W(t),null;case 31:if(null!==t.memoizedState){if(aK(t),null===t.alternate)throw Error(l(340));rI()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 13:if(aK(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(l(340));rI()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return D(aV),null;case 4:return V(),null;case 10:return rH(t.type),null;case 22:case 23:return aK(t),aM(),null!==e&&D(r7),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return rH(r0),null;default:return null}}(e.alternate,e);if(null!==n){n.flags&=32767,lD=n;return}if(null!==(n=e.return)&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&null!==(e=e.sibling)){lD=e;return}lD=e=n}while(null!==e);lq=6,lD=null}function sO(e,t,n,r,a,o,i,s,u){e.cancelPendingCommit=null;do s_();while(0!==l6);if(0!=(6&lL))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=lL,lL|=4;try{!function(e,t){if(e=e.containerInfo,uh=cl,n_(e=nE(e))){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var a,o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch(e){n=null;break e}var s=0,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))uE(e);else if(1===n)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":uE(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{lL=i,A.p=a,T.T=r}}l6=1,sC(),sN(),sP()}}function sC(){if(1===l6){l6=0;var e=l8,t=l9,n=0!=(13878&t.flags);if(0!=(13878&t.subtreeFlags)||n){n=T.T,T.T=null;var r=A.p;A.p=2;var a=lL;lL|=4;try{lb(t,e);var o=um,i=nE(e.containerInfo),l=o.focusedElem,s=o.selectionRange;if(i!==l&&l&&l.ownerDocument&&function e(t,n){return!!t&&!!n&&(t===n||(!t||3!==t.nodeType)&&(n&&3===n.nodeType?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}(l.ownerDocument.documentElement,l)){if(null!==s&&n_(l)){var 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=nP(l,m),v=nP(l,g);if(y&&v&&(1!==p.rangeCount||p.anchorNode!==y.node||p.anchorOffset!==y.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var b=d.createRange();b.setStart(y.node,y.offset),p.removeAllRanges(),m>g?(p.addRange(b),p.extend(v.node,v.offset)):(b.setEnd(v.node,v.offset),p.addRange(b))}}}}for(d=[],p=l;p=p.parentNode;)1===p.nodeType&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for("function"==typeof l.focus&&l.focus(),l=0;l<d.length;l++){var x=d[l];x.element.scrollLeft=x.left,x.element.scrollTop=x.top}}cl=!!uh,um=uh=null}finally{lL=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=lL;lL|=4;try{lu(e,t.alternate,t)}finally{lL=a,A.p=r,T.T=n}}l6=3}}function sP(){if(4===l6||3===l6){l6=0,en();var e=l8,t=l9,n=l7,r=sn;0!=(10256&t.subtreeFlags)||0!=(10256&t.flags)?l6=5:(l6=0,l9=l8=null,sE(e,e.pendingLanes));var a=e.pendingLanes;if(0===a&&(l5=null),ez(n),t=t.stateNode,ep&&"function"==typeof ep.onCommitFiberRoot)try{ep.onCommitFiberRoot(ef,t,void 0,128==(128&t.current.flags))}catch(e){}if(null!==r){t=T.T,a=A.p,A.p=2,T.T=null;try{for(var o=e.onRecoverableError,i=0;i<r.length;i++){var l=r[i];o(l.value,{componentStack:l.stack})}}finally{T.T=t,A.p=a}}0!=(3&l7)&&s_(),sV(e),a=e.pendingLanes,0!=(261930&n)&&0!=(42&a)?e===sa?sr++:(sr=0,sa=e):sr=0,sq(0,!1)}}function sE(e,t){0==(e.pooledCacheLanes&=t)&&null!=(t=e.pooledCache)&&(e.pooledCache=null,r2(t))}function s_(){return sC(),sN(),sP(),sz()}function sz(){if(5!==l6)return!1;var e=l8,t=se;se=0;var n=ez(l7),r=T.T,a=A.p;try{A.p=32>n?32:n,T.T=null,n=st,st=null;var o=l8,i=l7;if(l6=0,l9=l8=null,l7=0,0!=(6&lL))throw Error(l(331));var s=lL;if(lL|=4,lT(o.current),lO(o,o.current,i,n),lL=s,sq(0,!1),ep&&"function"==typeof ep.onPostCommitFiberRoot)try{ep.onPostCommitFiberRoot(ef,o)}catch(e){}return!0}finally{A.p=a,T.T=r,sE(e,t)}}function sT(e,t,n){t=rc(n,t),t=iy(e.stateNode,t,2),null!==(e=aO(e,t,2))&&(eC(e,2),sV(e))}function sA(e,t,n){if(3===e.tag)sT(e,e,n);else for(;null!==t;){if(3===t.tag){sT(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===l5||!l5.has(r))){e=rc(n,e),null!==(r=aO(t,n=iv(2),2))&&(ib(n,r,t,e),eC(r,2),sV(r));break}}t=t.return}}function sR(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new lI;var a=new Set;r.set(t,a)}else void 0===(a=r.get(t))&&(a=new Set,r.set(t,a));a.has(n)||(lK=!0,a.add(n),e=sI.bind(null,e,t,n),t.then(e,e))}function sI(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,lM===e&&(lF&n)===n&&(4===lq||3===lq&&(0x3c00000&lF)===lF&&300>er()-l1?0==(2&lL)&&sp(e,0):lG|=n,lQ===lF&&(lQ=0)),sV(e)}function sL(e,t){0===t&&(t=eS()),null!==(e=n5(e,t))&&(eC(e,t),sV(e))}function sM(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),sL(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),sL(e,n)}var sF=null,s$=null,sU=!1,sH=!1,sB=!1,sK=0;function sV(e){e!==s$&&null===e.next&&(null===s$?sF=s$=e:s$=s$.next=e),sH=!0,sU||(sU=!0,uS(function(){0!=(6&lL)?X(eo,sW):sZ()}))}function sq(e,t){if(!sB&&sH){sB=!0;do for(var n=!1,r=sF;null!==r;){if(!t)if(0!==e){var a=r.pendingLanes;if(0===a)var o=0;else{var i=r.suspendedLanes,l=r.pingedLanes;o=0xc000095&(o=(1<<31-em(42|e)+1)-1&(a&~(i&~l)))?0xc000095&o|1:o?2|o:0}0!==o&&(n=!0,sQ(r,o))}else o=lF,0==(3&(o=ek(r,r===lM?o:0,null!==r.cancelPendingCommit||-1!==r.timeoutHandle)))||ej(r,o)||(n=!0,sQ(r,o));r=r.next}while(n);sB=!1}}function sW(){sZ()}function sZ(){sH=sU=!1;var e,t=0;0===sK||((e=window.event)&&"popstate"===e.type?e===ux||(ux=e,0):(ux=null,1))||(t=sK);for(var n=er(),r=null,a=sF;null!==a;){var o=a.next,i=sG(a,n);0===i?(a.next=null,null===r?sF=o:r.next=o,null===o&&(s$=r)):(r=a,(0!==t||0!=(3&i))&&(sH=!0)),a=o}0!==l6&&5!==l6||sq(t,!1),0!==sK&&(sK=0)}function sG(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,o=-0x3c00001&e.pendingLanes;0<o;){var i=31-em(o),l=1<<i,s=a[i];-1===s?(0==(l&n)||0!=(l&r))&&(a[i]=function(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return -1}}(l,t)):s<=t&&(e.expiredLanes|=l),o&=~l}if(t=lM,n=lF,n=ek(e,e===t?n:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle),r=e.callbackNode,0===n||e===t&&(2===l$||9===l$)||null!==e.cancelPendingCommit)return null!==r&&null!==r&&ee(r),e.callbackNode=null,e.callbackPriority=0;if(0==(3&n)||ej(e,n)){if((t=n&-n)===e.callbackPriority)return t;switch(null!==r&&ee(r),ez(n)){case 2:case 8:n=ei;break;case 32:default:n=el;break;case 0x10000000:n=eu}return n=X(n,r=sJ.bind(null,e)),e.callbackPriority=t,e.callbackNode=n,t}return null!==r&&null!==r&&ee(r),e.callbackPriority=2,e.callbackNode=null,2}function sJ(e,t){if(0!==l6&&5!==l6)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(s_()&&e.callbackNode!==n)return null;var r=lF;return 0===(r=ek(e,e===lM?r:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle))?null:(ss(e,r,t),sG(e,er()),null!=e.callbackNode&&e.callbackNode===n?sJ.bind(null,e):null)}function sQ(e,t){if(s_())return null;ss(e,t,!0)}function sY(){if(0===sK){var e=r5;0===e&&(e=ev,0==(261888&(ev<<=1))&&(ev=256)),sK=e}return sK}function sX(e){return null==e||"symbol"==typeof e||"boolean"==typeof e?null:"function"==typeof e?e:tm(""+e)}function s0(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}for(var s1=0;s1<nJ.length;s1++){var s2=nJ[s1];nQ(s2.toLowerCase(),"on"+(s2[0].toUpperCase()+s2.slice(1)))}nQ(nH,"onAnimationEnd"),nQ(nB,"onAnimationIteration"),nQ(nK,"onAnimationStart"),nQ("dblclick","onDoubleClick"),nQ("focusin","onFocus"),nQ("focusout","onBlur"),nQ(nV,"onTransitionRun"),nQ(nq,"onTransitionStart"),nQ(nW,"onTransitionCancel"),nQ(nZ,"onTransitionEnd"),eY("onMouseEnter",["mouseout","mouseover"]),eY("onMouseLeave",["mouseout","mouseover"]),eY("onPointerEnter",["pointerout","pointerover"]),eY("onPointerLeave",["pointerout","pointerover"]),eQ("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),eQ("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),eQ("onBeforeInput",["compositionend","keypress","textInput","paste"]),eQ("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),eQ("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),eQ("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var s4="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),s3=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(s4));function s5(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],a=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var i=r.length-1;0<=i;i--){var l=r[i],s=l.instance,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,eG.forEach(function(t){"selectionchange"!==t&&(s3.has(t)||s8(t,!1,e),s8(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[s9]||(t[s9]=!0,s8("selectionchange",!1,t))}}function 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=eK(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=nG.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=tq;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=tW;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=t5;break;case nH:case nB:case nK:u=tG;break;case nZ:u=t6;break;case"scroll":case"scrollend":u=tK;break;case"wheel":u=t8;break;case"copy":case"cut":case"paste":u=tJ;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)&&(eK(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?eK(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=tq,g="onMouseLeave",p="onMouseEnter",m="mouse",("pointerout"===e||"pointerover"===e)&&(d=t3,g="onPointerLeave",p="onPointerEnter",m="pointer"),f=null==u?l:eq(u),h=null==c?l:eq(c),(l=new d(g,m+"leave",u,n,a)).target=f,l.relatedTarget=h,g=null,eK(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?eq(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?eq(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":nI=!0;break;case"contextmenu":case"mouseup":case"dragend":nI=!1,nL(i,n,a);break;case"selectionchange":if(nz)break;case"keydown":case"keyup":nL(i,n,a)}if(ne)t:{switch(e){case"compositionstart":var w="onCompositionStart";break t;case"compositionend":w="onCompositionEnd";break t;case"compositionupdate":w="onCompositionUpdate";break t}w=void 0}else nl?no(e,n)&&(w="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(w="onCompositionStart");w&&(nr&&"ko"!==n.locale&&(nl||"onCompositionStart"!==w?"onCompositionEnd"===w&&nl&&(y=tz()):(tE="value"in(tP=a)?tP.value:tP.textContent,nl=!0)),0<(x=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_=tE=tP=null,nl=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return nr&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(w=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[eL]||null).action),S=n.submitter;S&&null!==(k=(k=S[eL]||null)?sX(k.formAction):S.getAttribute("formAction"))&&(j=k,S=null);var O=new tH("action","action",null,n,a);i.push({event:O,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(0!==sK){var e=S?s0(a,S):new FormData(a);oQ(r,{pending:!0,data:e,method:a.method,action:j},null,e)}}else"function"==typeof j&&(O.preventDefault(),oQ(r,{pending:!0,data:e=S?s0(a,S):new FormData(a),method:a.method,action:j},j,e))},currentTarget:a}]})}}s5(i,t)})}function 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(!eJ.hasOwnProperty(n))e:{if("o"===n[0]&&"n"===n[1]&&(a=n.endsWith("Capture"),t=n.slice(2,a?n.length-7:void 0),"function"==typeof(o=null!=(o=e[eL]||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 uP(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 uE(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":uE(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 uI(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 uL(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=eV(e);null!==t&&5===t.tag&&"form"===t.type?oX(t):uH.r(e)},D:function(e){uH.D(e),uK("dns-prefetch",e,null)},C:function(e,t){uH.C(e,t),uK("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=uq(e);break;case"script":a=uG(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(uW(a))||"script"===t&&uB.querySelector(uJ(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=uG(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(uJ(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=eW(uB).hoistableScripts,r=uG(e),a=n.get(r);a||((a=uB.querySelector(uJ(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=eW(uB).hoistableStyles,a=uq(e);t=t||"default";var o=r.get(a);if(!o){var i={loading:0,preload:null};if(o=uB.querySelector(uW(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=eW(uB).hoistableScripts,r=uG(e),a=n.get(r);a||((a=uB.querySelector(uJ(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 uK(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 uV(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=uq(n.href),(r=(n=eW(a).hoistableStyles).get(t))||(r={type:"style",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if("stylesheet"===n.rel&&"string"==typeof n.href&&"string"==typeof n.precedence){e=uq(n.href);var o,i,s,u,c=eW(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(uW(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=uG(n),(r=(n=eW(a).hoistableScripts).get(t))||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,e))}}function uq(e){return'href="'+tt(e)+'"'}function uW(e){return'link[rel="stylesheet"]['+e+"]"}function uZ(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function uG(e){return'[src="'+tt(e)+'"]'}function uJ(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=uq(n.href);var o=e.querySelector(uW(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=uG(n.src),a=e.querySelector(uJ(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[eI]||"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=eV(a);if(null!==o)switch(o.tag){case 3:if((o=o.stateNode).current.memoizedState.isDehydrated){var i=ew(o.pendingLanes);if(0!==i){var l=o;for(l.pendingLanes|=2,l.entangledLanes|=2;i;){var s=1<<31-em(i);l.entanglements[1]|=s,i&=~s}sV(o),0==(6&lL)&&(l4=er()+500,sq(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=eK(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=eV(t))&&co(t)):(e.eventSystemFlags|=r,t=e.targetContainers,null!==a&&-1===t.indexOf(a)&&t.push(a)),e}function cO(e){var t=eK(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=eV(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 cP(){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 cE(e,t){e.blockedOn===t&&(e.blockedOn=null,cm||(cm=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,cP)))}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=eV(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 cE(t,e)}null!==cg&&cE(cg,e),null!==cy&&cE(cy,e),null!==cv&&cE(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[eL]||null;if("function"==typeof o)i||cz(n);else if(i){var l=null;if(o&&o.hasAttribute("formAction")){if(a=o,i=o[eL]||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 cI(e){this._internalRoot=e}cI.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)},cI.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}},cI.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 cL=o.version;if("19.2.8"!==cL)throw Error(l(527,cL,"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 P=/\/+/g;function E(e,t){var n,r;return"object"==typeof e&&null!==e&&null!=e.key?(n=""+e.key,r={"=":"=0",":":"=2"},"$"+n.replace(/[=:]/g,function(e){return r[e]})):t.toString(36)}function _(e,t,a){if(null==e)return e;var o=[],i=0;return!function e(t,a,o,i,l){var s,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?"."+E(t,0):i,k(l)?(o="",null!=p&&(o=p.replace(P,"$&/")+"/"),e(l,a,o,"",function(e){return e})):null!=l&&(N(l)&&(s=l,u=o+(null==l.key||t&&t.key===l.key?"":(""+l.key).replace(P,"$&/")+"/")+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+E(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+E(i=i.value,g++),p+=e(i,a,o,d,l);else if("object"===d){if("function"==typeof t.then)return e(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"==typeof e.status?e.then(j,j):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(t),a,o,i,l);throw Error("Objects are not valid as a React child (found: "+("[object Object]"===(a=String(t))?"object with keys {"+Object.keys(t).join(", ")+"}":a)+"). If you meant to render a collection of children, use an array instead.")}return p}(e,o,"","",function(e){return t.call(a,e,i++)}),o}function z(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){(0===e._status||-1===e._status)&&(e._status=1,e._result=t)},function(t){(0===e._status||-1===e._status)&&(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var T="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)};t.Activity=p,t.Children={map:_,forEach:function(e,t,n){_(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return _(e,function(){t++}),t},toArray:function(e){return _(e,function(e){return e})||[]},only:function(e){if(!N(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=v,t.Fragment=a,t.Profiler=i,t.PureComponent=x,t.StrictMode=o,t.Suspense=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 P(){return!!v||!(t.unstable_now()-N<C)}function E(){if(v=!1,S){var e=t.unstable_now();N=e;var n=!0;try{e:{g=!1,y&&(y=!1,x(O),O=-1),m=!0;var o=h;try{t:{for(k(e),p=r(c);null!==p&&!(p.expirationTime>e&&P());){var l=p.callback;if("function"==typeof l){p.callback=null,h=p.priorityLevel;var s=l(p.expirationTime<=e);if(e=t.unstable_now(),"function"==typeof s){p.callback=s,k(e),n=!0;break t}p===r(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(E)};else if("u">typeof MessageChannel){var _=new MessageChannel,z=_.port2;_.port1.onmessage=E,i=function(){z.postMessage(null)}}else i=function(){b(E,0)};function T(e,n){O=b(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):C=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return h},t.unstable_next=function(e){switch(h){case 1:case 2:case 3:var t=3;break;default:t=h}var n=h;h=t;try{return e()}finally{h=n}},t.unstable_requestPaint=function(){v=!0},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=h;h=e;try{return t()}finally{h=n}},t.unstable_scheduleCallback=function(e,a,o){var l=t.unstable_now();switch(o="object"==typeof o&&null!==o&&"number"==typeof(o=o.delay)&&0<o?l+o:l,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=0x3fffffff;break;case 4:s=1e4;break;default:s=5e3}return s=o+s,e={id:f++,callback:a,priorityLevel:e,startTime:o,expirationTime:s,sortIndex:-1},o>l?(e.sortIndex=o,n(d,e),null===r(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=P,t.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}},7967(e,t,n){e.exports=n(6310)},3296(e,t,n){var r=n(4041),a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useState,i=r.useEffect,l=r.useLayoutEffect,s=r.useDebugValue;function 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)},1434(e,t,n){let r;n.d(t,{Ru:()=>eb,CY:()=>eS,s9:()=>ej,Bd:()=>eh});var a,o=n(1085),i=n(5186);let l=e=>"string"==typeof e,s=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},u=e=>null==e?"":String(e),c=/###/g,d=e=>e&&e.includes("###")?e.replace(c,"."):e,f=e=>!e||l(e),p=(e,t,n)=>{let r=l(t)?t.split("."):t,a=0;for(;a<r.length-1;){if(f(e))return{};let t=d(r[a]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++a}return f(e)?{}:{obj:e,k:d(r[a])}},h=(e,t,n)=>{let{obj:r,k:a}=p(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=p(e,i,Object);for(;void 0===l.obj&&i.length;)o=`${i[i.length-1]}.${o}`,l=p(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},m=(e,t)=>{let{obj:n,k:r}=p(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},g=(e,t,n)=>{for(let r in t)"__proto__"!==r&&"constructor"!==r&&(Object.prototype.hasOwnProperty.call(e,r)?l(e[r])||e[r]instanceof String||l(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):g(e[r],t[r],n):e[r]=t[r]);return e},y={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},v=e=>l(e)?e.replace(/[&<>"'\/]/g,e=>y[e]):e,b=[" ",",","?","!",";"],x=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),w=(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},k=e=>e?.replace(/_/g,"-"),j={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 S{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||j,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=>l(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g," "):e),l(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new S(this.logger,{...{prefix:`${this.prefix}:${e}:`},...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new S(this.logger,e)}}var O=new S;class C{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 N extends C{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,o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;e.includes(".")?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):l(n)&&o?a.push(...n.split(o)):a.push(n)));let s=m(this.data,a);return(!s&&!t&&!n&&e.includes(".")&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!s&&i&&l(n))?w(this.data?.[e]?.[t],n,o):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),h(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)(l(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=m(this.data,i)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?g(l,n,a):l={...l,...n},h(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 P={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 E=Symbol("i18next/PATH_KEY");function _(e,t){let n,r,a,{[E]:o}=e((r=[],(a=Object.create(null)).get=(e,t)=>(n?.revoke?.(),t===E)?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 z=e=>!l(e)&&"boolean"!=typeof e&&"number"!=typeof e;class T extends C{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=O.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=z(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||[],o=n&&e.includes(n),i=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!((e,t,n)=>{t=t||"",n=n||"";let r=b.filter(e=>!t.includes(e)&&!n.includes(e));if(0===r.length)return!0;let a=x.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(o&&!i){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:l(a)?[a]:a};let o=e.split(n);(n!==r||n===r&&this.options.ns.includes(o[0]))&&(a=o.shift()),e=o.join(r)}return{key:e,namespaces:l(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,{...this.options,...r})),Array.isArray(e)||(e=[String(e)]),e=e.map(e=>"function"==typeof e?_(e,{...this.options,...r}):String(e));let a=void 0!==r.returnDetails?r.returnDetails:this.options.returnDetails,o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,{key:i,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}${i}`,usedKey:i,exactUsedKey:i,usedLng:d,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:`${u}${c}${i}`:a?{res:i,usedKey:i,exactUsedKey:i,usedLng:d,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:i;let p=this.resolve(e,r),h=p?.res,m=p?.usedKey||i,g=p?.exactUsedKey||i,y=void 0!==r.joinArrays?r.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,b=void 0!==r.count&&!l(r.count),x=T.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=z(O),N=Object.prototype.toString.apply(O);if(v&&O&&C&&!["[object Number]","[object Function]","[object RegExp]"].includes(N)&&!(l(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 '${i} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(r),p):e}if(o){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}${o}${e}`;x&&!h?t[e]=this.translate(a,{...r,defaultValue:z(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&&l(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=i);let l=(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?`${i}${this.pluralResolver.getSuffix(d,r.count,r)}`:i,s?S:h),o){let e=this.resolve(i,{...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:l;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],i+t,r[`defaultValue${t}`]||S)})}):n(e,i,S))}h=this.extendTranslation(h,e,r,p,n),a&&h===i&&this.options.appendNamespaceToMissingKey&&(h=`${u}${c}${i}`),(a||t)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${c}${i}`:i,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 o;n.interpolation&&this.interpolator.init({...n,...{interpolation:{...this.options.interpolation,...n.interpolation}}});let i=l(e)&&(n?.interpolation?.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(i){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!l(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),i){let t=e.match(this.interpolator.nestingRegexp);o<(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 o=n.postProcess||this.options.postProcess,i=l(o)?[o]:o;return null!=e&&i?.length&&!1!==n.applyPostProcessor&&(e=P.handle(i,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,a,o,i;return l(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>"function"==typeof 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&&!l(t.count),f=d&&!t.ordinal&&0===t.count,p=void 0!==t.context&&(l(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)||(i=e,!this.checkedLoadedFor[`${h[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(i)&&(this.checkedLoadedFor[`${h[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${h.join(", ")}" won't get resolved as namespace "${i}" 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 i;if(this.isValidLookup(n))return;o=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(;i=l.pop();)this.isValidLookup(n)||(a=i,n=this.getResource(r,e,i,t))}))})}),{res:n,usedKey:r,exactUsedKey:a,usedLng:o,usedNS:i}}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&&!l(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 A{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=O.create("languageUtils"),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(e){if(!(e=k(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=k(e))||!e.includes("-"))return e;let t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(l(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)),l(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||l(t),o=void 0===t&&"function"==typeof this.options.fallbackLng,i=l(e)&&a&&!o,s=null;if(i){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(l(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))):l(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 R={zero:0,one:1,two:2,few:3,many:4,other:5},I={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class L{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=O.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n,r=k("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!"),I;if(!e.match(/-|_/))return I;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)=>R[e]-R[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 M=(e,t,n,r=".",a=!0)=>{let o,i=void 0!==(o=m(e,n))?o:m(t,n);return!i&&a&&l(n)&&void 0===(i=w(e,n,r))&&(i=w(t,n,r)),i},D=e=>e.replace(/\$/g,"$$$$");class F{constructor(e={}){this.logger=O.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:g,alwaysFormat:y}=e.interpolation;this.escape=void 0!==t?t:v,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=g||1e3,this.alwaysFormat=void 0!==y&&y,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,o,i,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(!e.includes(this.formatSeparator)){let a=M(t,s,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(M(t,s,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(i=0;a=t.regex.exec(e);){let n=a[1].trim();if(void 0===(o=c(n)))if("function"==typeof d){let t=d(e,a,r);o=l(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))o="";else if(f){o=a[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),o="";else l(o)||this.useRawValueToEscape||(o=u(o));let s=t.safeValue(o);if(e=e.replace(a[0],D(s)),f?(t.regex.lastIndex+=s.length,t.regex.lastIndex-=a[0].length):t.regex.lastIndex=0,++i>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,a,o,i=(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 i=(a=this.interpolate(a,o)).match(/'/g),l=a.match(/"/g);((i?.length??0)%2!=0||l)&&(l?.length??0)%2==0||(a=a.replace(/'/g,'"'));try{o=JSON.parse(a),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${a}`}return o.defaultValue&&o.defaultValue.includes(this.prefix)&&delete o.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];(o=(o={...n}).replace&&!l(o.replace)?o.replace:o).applyPostProcessor=!1,delete o.defaultValue;let c=/{.*}/s.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(-1!==c&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),(a=t(i.call(this,r[1].trim(),o),o))&&r[0]===e&&!l(a))return a;l(a)||(a=u(a)),a||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),a=""),s.length&&(a=s.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 $=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(k(r),a),t[i]=l),l(n)}},U=e=>(t,n,r)=>e(k(n),r)(t);class H{constructor(e={}){this.logger=O.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";let n=t.cacheInBuiltFormats?$:U;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()]=$(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 B extends C{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=O.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}=p(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();l(e)&&(e=this.languageUtils.toResolveHierarchy(e)),l(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 K=()=>({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]),l(e[1])&&(t.defaultValue=e[1]),l(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}),V=e=>(l(e.ns)&&(e.ns=[e.ns]),l(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),l(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),q=()=>{};class W extends C{constructor(e={},t){if(super(),this.options=V(e),this.services={},this.logger=O,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&&(l(e.ns)?e.defaultNS=e.ns:e.ns.includes("translation")||(e.defaultNS=e.ns[0]));let n=K();this.options={...n,...this.options,...V(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?O.init(r(this.modules.logger),this.options):O.init(null,this.options),e=this.modules.formatter?this.modules.formatter:H;let t=new A(this.options);this.store=new N(this.options.resources,this.options);let n=this.services;n.logger=O,n.resourceStore=this.store,n.languageUtils=t,n.pluralResolver=new L(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 F(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new B(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 T(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=q),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=s(),o=()=>{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?o():setTimeout(o,0),a}loadResources(e,t=q){let n=t,r=l(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=s();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=q),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&&P.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=s();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))},o=t=>{e||t||!this.services.languageDetector||(t=[]);let n=l(t)?t:t&&t[0],o=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(l(t)?[t]:t);o&&(this.language||r(o),this.translator.language||this.translator.changeLanguage(o),this.services.languageDetector?.cacheUserLanguage?.(o)),this.loadResources(o,e=>{a(e,o)})};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(o):this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),n}getFixedT(e,t,n,r){let a=r?.scopeNs,o=(e,t,...r)=>{let i,l;(i="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(r)):{...t}).lng=i.lng||o.lng,i.lngs=i.lngs||o.lngs;let s=void 0!==i.ns&&null!==i.ns;i.ns=i.ns||o.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||n||o.keyPrefix);let u={...this.options,...i};Array.isArray(a)&&!s&&(u.ns=a),"function"==typeof i.keyPrefix&&(i.keyPrefix=_(i.keyPrefix,u));let c=this.options.keySeparator||".";return i.keyPrefix&&Array.isArray(e)?l=e.map(e=>("function"==typeof e&&(e=_(e,u)),`${i.keyPrefix}${c}${e}`)):("function"==typeof e&&(e=_(e,u)),l=i.keyPrefix?`${i.keyPrefix}${c}${e}`:e),this.t(l,i)};return l(e)?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}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=s();return this.options.ns?(l(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=s();l(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 A(K());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 W(e,t);return n.createInstance=W.createInstance,n}cloneInstance(e={},t=q){let n=e.forkResourceStore;n&&delete e.forkResourceStore;let r={...this.options,...e,isClone:!0},a=new W(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 N(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={...K().interpolation,...this.options.interpolation,...e.interpolation},n={...r,interpolation:t};a.services.interpolator=new F(n)}return a.translator=new T(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 Z=W.createInstance();Z.createInstance,Z.dir,Z.init,Z.loadResources,Z.reloadResources,Z.use,Z.changeLanguage,Z.getFixedT,Z.t,Z.exists,Z.setDefaultNamespace,Z.hasLoadedNamespace,Z.loadNamespaces,Z.loadLanguages;var G=n(4041);Object.create(null);let J=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Q={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"\xa9","&#169;":"\xa9","&reg;":"\xae","&#174;":"\xae","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},Y=e=>Q[e],X={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(J,Y),transDefaultProps:void 0},ee=(0,G.createContext)();class et{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}let en=(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);es(a[0])&&(a[0]=`react-i18next:: ${a[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...a):console?.warn&&console.warn(...a)},er={},ea=(e,t,n,r)=>{es(n)&&er[n]||(es(n)&&(er[n]=new Date),en(e,t,n,r))},eo=(e,t)=>()=>{if(e.isInitialized)t();else{let n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},ei=(e,t,n)=>{e.loadNamespaces(t,eo(e,n))},el=(e,t,n,r)=>{if(es(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return ei(e,n,r);n.forEach(t=>{0>e.options.ns.indexOf(t)&&e.options.ns.push(t)}),e.loadLanguages(t,eo(e,r))},es=e=>"string"==typeof e,eu={"&nbsp;":"\xa0","&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&copy;":"\xa9","&reg;":"\xae","&trade;":"™","&hellip;":"…","&ndash;":"–","&mdash;":"—","&lsquo;":"‘","&rsquo;":"’","&sbquo;":"‚","&ldquo;":"“","&rdquo;":"”","&bdquo;":"„","&dagger;":"†","&Dagger;":"‡","&bull;":"•","&prime;":"′","&Prime;":"″","&lsaquo;":"‹","&rsaquo;":"›","&sect;":"\xa7","&para;":"\xb6","&middot;":"\xb7","&ensp;":" ","&emsp;":" ","&thinsp;":" ","&euro;":"€","&pound;":"\xa3","&yen;":"\xa5","&cent;":"\xa2","&curren;":"\xa4","&times;":"\xd7","&divide;":"\xf7","&minus;":"−","&plusmn;":"\xb1","&ne;":"≠","&le;":"≤","&ge;":"≥","&asymp;":"≈","&equiv;":"≡","&infin;":"∞","&int;":"∫","&sum;":"∑","&prod;":"∏","&radic;":"√","&part;":"∂","&permil;":"‰","&deg;":"\xb0","&micro;":"\xb5","&larr;":"←","&uarr;":"↑","&rarr;":"→","&darr;":"↓","&harr;":"↔","&crarr;":"↵","&lArr;":"⇐","&uArr;":"⇑","&rArr;":"⇒","&dArr;":"⇓","&hArr;":"⇔","&alpha;":"α","&beta;":"β","&gamma;":"γ","&delta;":"δ","&epsilon;":"ε","&zeta;":"ζ","&eta;":"η","&theta;":"θ","&iota;":"ι","&kappa;":"κ","&lambda;":"λ","&mu;":"μ","&nu;":"ν","&xi;":"ξ","&omicron;":"ο","&pi;":"π","&rho;":"ρ","&sigma;":"σ","&tau;":"τ","&upsilon;":"υ","&phi;":"φ","&chi;":"χ","&psi;":"ψ","&omega;":"ω","&Alpha;":"Α","&Beta;":"Β","&Gamma;":"Γ","&Delta;":"Δ","&Epsilon;":"Ε","&Zeta;":"Ζ","&Eta;":"Η","&Theta;":"Θ","&Iota;":"Ι","&Kappa;":"Κ","&Lambda;":"Λ","&Mu;":"Μ","&Nu;":"Ν","&Xi;":"Ξ","&Omicron;":"Ο","&Pi;":"Π","&Rho;":"Ρ","&Sigma;":"Σ","&Tau;":"Τ","&Upsilon;":"Υ","&Phi;":"Φ","&Chi;":"Χ","&Psi;":"Ψ","&Omega;":"Ω","&Agrave;":"\xc0","&Aacute;":"\xc1","&Acirc;":"\xc2","&Atilde;":"\xc3","&Auml;":"\xc4","&Aring;":"\xc5","&AElig;":"\xc6","&Ccedil;":"\xc7","&Egrave;":"\xc8","&Eacute;":"\xc9","&Ecirc;":"\xca","&Euml;":"\xcb","&Igrave;":"\xcc","&Iacute;":"\xcd","&Icirc;":"\xce","&Iuml;":"\xcf","&ETH;":"\xd0","&Ntilde;":"\xd1","&Ograve;":"\xd2","&Oacute;":"\xd3","&Ocirc;":"\xd4","&Otilde;":"\xd5","&Ouml;":"\xd6","&Oslash;":"\xd8","&Ugrave;":"\xd9","&Uacute;":"\xda","&Ucirc;":"\xdb","&Uuml;":"\xdc","&Yacute;":"\xdd","&THORN;":"\xde","&szlig;":"\xdf","&agrave;":"\xe0","&aacute;":"\xe1","&acirc;":"\xe2","&atilde;":"\xe3","&auml;":"\xe4","&aring;":"\xe5","&aelig;":"\xe6","&ccedil;":"\xe7","&egrave;":"\xe8","&eacute;":"\xe9","&ecirc;":"\xea","&euml;":"\xeb","&igrave;":"\xec","&iacute;":"\xed","&icirc;":"\xee","&iuml;":"\xef","&eth;":"\xf0","&ntilde;":"\xf1","&ograve;":"\xf2","&oacute;":"\xf3","&ocirc;":"\xf4","&otilde;":"\xf5","&ouml;":"\xf6","&oslash;":"\xf8","&ugrave;":"\xf9","&uacute;":"\xfa","&ucirc;":"\xfb","&uuml;":"\xfc","&yacute;":"\xfd","&thorn;":"\xfe","&yuml;":"\xff","&iexcl;":"\xa1","&iquest;":"\xbf","&fnof;":"ƒ","&circ;":"ˆ","&tilde;":"˜","&OElig;":"Œ","&oelig;":"œ","&Scaron;":"Š","&scaron;":"š","&Yuml;":"Ÿ","&ordf;":"\xaa","&ordm;":"\xba","&macr;":"\xaf","&acute;":"\xb4","&cedil;":"\xb8","&sup1;":"\xb9","&sup2;":"\xb2","&sup3;":"\xb3","&frac14;":"\xbc","&frac12;":"\xbd","&frac34;":"\xbe","&spades;":"♠","&clubs;":"♣","&hearts;":"♥","&diams;":"♦","&loz;":"◊","&oline;":"‾","&frasl;":"⁄","&weierp;":"℘","&image;":"ℑ","&real;":"ℜ","&alefsym;":"ℵ"},ec=RegExp(Object.keys(eu).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),"g");var ed=n(8139);let ef={t:(e,t)=>{if(es(t))return t;if("object"==typeof t&&null!==t&&es(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},ep=()=>()=>{},eh=(e,t={})=>{let{i18n:n}=t,{i18n:a,defaultNS:o}=(0,G.useContext)(ee)||{},i=n||a||r;i&&!i.reportNamespaces&&(i.reportNamespaces=new et),i||ea(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,G.useMemo)(()=>({...X,...i?.options?.react,...t}),[i,t]),{useSuspense:s,keyPrefix:u}=l,c=e||o||i?.options?.defaultNS,d=es(c)?[c]:c||["translation"],f=(0,G.useMemo)(()=>d,d);i?.reportNamespaces?.addUsedNamespaces?.(f);let p=(0,G.useRef)(0),h=(0,G.useCallback)(e=>{if(!i)return ep;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,G.useRef)(),g=(0,G.useCallback)(()=>{if(!i)return ef;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}}):(ea(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,G.useState)(0),{t:b,ready:x}=(0,ed.useSyncExternalStore)(h,g,g);(0,G.useEffect)(()=>{if(i&&!x&&!s){let e=()=>v(e=>e+1);t.lng?el(i,t.lng,f,e):ei(i,f,e)}},[i,t.lng,f,x,s,y]);let w=i||{},k=(0,G.useRef)(null),j=(0,G.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,G.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)=>(ea(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&&ea(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?el(i,t.lng,f,n):ei(i,f,n)})}return O};function em({i18n:e,defaultNS:t,children:n}){let r=(0,G.useMemo)(()=>({i18n:e,defaultNS:t}),[e,t]);return(0,G.createElement)(ee.Provider,{value:r},n)}function eg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ey="hs-language",ev={"zh-CN":"zh-CN",en:"en-US"},eb=Z.createInstance();function ex(e){"u">typeof document&&(document.documentElement.lang=e)}function ew(e){return eb.on("languageChanged",e),function(){return eb.off("languageChanged",e)}}function ek(){return(0,i.lX)(eb.language)?eb.language:i.gI}function ej(){var e=(0,G.useSyncExternalStore)(ew,ek,ek),t=(0,G.useCallback)(function(e){try{localStorage.setItem(ey,e)}catch(e){}eb.changeLanguage(e)},[]);return(0,G.useMemo)(function(){return{language:e,locale:ev[e],setLanguage:t}},[e,t])}function eS(e){var t=e.children;return(0,o.jsx)(em,{i18n:eb,children:t})}eb.use({type:"3rdParty",init(e){((e={})=>{X={...X,...e}})(e.options.react),r=e}}).init({lng:function(){try{var e=localStorage.getItem(ey);return(0,i.lX)(e)?e:i.gI}catch(e){return i.gI}}(),fallbackLng:i.gI,supportedLngs:function(e){if(Array.isArray(e))return eg(e)}(a=i.Yj)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||function(e){if(e){if("string"==typeof e)return eg(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 eg(e,void 0)}}(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.")}(),resources:{"zh-CN":{translation:i.jF["zh-CN"]},en:{translation:i.jF.en}},initAsync:!1,interpolation:{escapeValue:!1},returnNull:!1}),ex(eb.language),eb.on("languageChanged",ex)},2935(e,t,n){n.d(t,{AZ:()=>l,OD:()=>s,PY:()=>i,ec:()=>u});var r=n(4041);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var o="hs-theme";function i(){var e=function(){try{var e=localStorage.getItem(o);return"light"===e||"dark"===e?e:null}catch(e){return null}}();return e||("u">typeof window&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light")}function l(e){document.documentElement.classList.toggle("dark","dark"===e),document.documentElement.style.colorScheme=e;try{localStorage.setItem(o,e)}catch(e){}}function s(e){var t="dark"===e?"light":"dark";return l(t),t}function u(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,r.useState)(function(){return"u">typeof document&&document.documentElement.classList.contains("dark")?"dark":"light"}))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,i=!1;try{for(r=r.call(e);!(o=(t=r.next()).done)&&(a.push(t.value),2!==a.length);o=!0);}catch(e){i=!0,n=e}finally{try{o||null==r.return||r.return()}finally{if(i)throw n}}return a}}(e)||function(e){if(e){if("string"==typeof e)return a(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return a(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=t[0],o=t[1];return(0,r.useEffect)(function(){var e=document.documentElement,t=new MutationObserver(function(){o(e.classList.contains("dark")?"dark":"light")});return t.observe(e,{attributes:!0,attributeFilter:["class"]}),function(){return t.disconnect()}},[]),n}},5186(e,t,n){n.d(t,{jF:()=>f,gI:()=>c,oo:()=>o,Yj:()=>u,lX:()=>d,RP:()=>i});var r,a,o=["claude","codex","kimi","pi","dsh"],i={claude:"Claude Code",codex:"Codex",kimi:"Kimi Code",pi:"Pi",dsh:"DeepSeek Harness"},l=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","transfer":"Move configuration","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","addCustomProvider":"Add custom provider","current":"Current: {{name}}","currentInactive":"Current: inactive","activeConfig":"Active configuration","defaultModel":"Default model","activeNamed":"Active \xb7 {{name}}","inactive":"Inactive","active":"Active","activate":"Activate","setDefault":"Set as default","default":"Default","deepseekOfficial":"DeepSeek official","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","providers":"Providers","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","officialHintKimi":"Use Kimi Code\'s own Kimi account login (the OAuth credential written by /login)","application":"Application","writeMode":"Write mode","modeReplace":"Replace current configuration","modeAdditive":"Keep entries and switch pointer"},"profile":{"editTitle":"Edit {{harness}} / {{profile}}","createTitle":"New {{harness}} profile","intro":"Saving writes to {{targets}}.","additiveNote":"This tool\'s config file keeps providers side by side, so switching only moves the current pointer — the other providers you wrote by hand are left alone.","useSharedProvider":"Use a shared provider (vault)","useSharedProviderLabel":"Use a shared provider","keyFromVault":"Key comes from the vault","providerNone":"None (this profile carries its own key)","vaultEmpty":"The vault is empty. Add a provider entry under “Vault” at the top first.","namedEndpoint":"Named endpoint (optional)","namedEndpointLabel":"Named endpoint","endpointNone":"Unset (use the base URL below)","endpointOption":"{{label}} ({{key}})","noEndpoints":"This provider has no named endpoint, so the base URL below is used.","quickFill":"Quick fill:","name":"Profile name","namePlaceholder":"e.g. openrouter-main","renameHint":"Renaming also updates the recorded active profile and the provider id in the native config.","baseUrl":"API base URL","baseUrlPlaceholder":"https://api.example.com/v1","baseUrlFromVault":"The base URL comes from vault endpoint “{{endpoint}}”.","apiKey":"API key","apiKeyKeep":"Leave empty to keep the current key","apiKeyRequiredPlaceholder":"Required","apiKeySharedHint":"This profile references a shared provider; rotate the key in the vault instead.","fallbackModel":"Fallback model (ANTHROPIC_MODEL)","model":"Model","fallbackModelPlaceholder":"Optional; used when no tier matches, e.g. glm-5","modelPlaceholder":"e.g. claude-sonnet-4-5","claudeModelHint":"Leave empty to keep Claude Code\'s default model; map the individual tiers below.","notes":"Notes (optional)","advanced":"Advanced: raw configuration","overridden":"Overridden by hand","saveFirst":"Save this profile first, then reopen it to take over the raw file contents.","save":"Save profile","saving":"Saving…","rawLoading":"Reading what will be written…","rawIntro":"Below is what is currently written to disk, generated from the fields as last saved. Editing any of them counts as taking it over by hand, and the form fields stop affecting that file.","resetToGenerated":"Back to generated","selectPlaceholder":"Select one","mapping":{"title":"Model mapping","intro":"Display names only affect Claude Code\'s /model menu; an empty one shows the actual model ID. Turning on “1M context” appends [1m] to the model ID — only enable it for a model that really supports 1M.","role":"Model role","displayName":"Display name","actualModel":"Model actually requested","oneM":"1M context","defaultTo":"Default: {{model}}","notInMenu":"Not shown in the /model menu","oneMUnsupported":"{{role}} has no 1M variant","enable":"Enable"},"error":{"nameRequired":"Enter a profile name","nameSlash":"A profile name cannot contain / or \\\\","nameTooLong":"A profile name is at most {{max}} characters","baseUrlRequired":"Enter an API base URL","apiKeyRequired":"Enter an API key","modelRequired":"Enter a model name","providerGone":"The referenced provider no longer exists — pick another","endpointGone":"The referenced endpoint no longer exists — pick another","fieldRequired":"Fill in {{label}}","checkFields":"Check the fields marked in red."}},"vault":{"title":"Vault","intro":"A provider entry keeps the API key in one place (AES-256-GCM encrypted, hidden by default) along with reusable endpoints. Profiles can reference an entry here instead of each holding its own copy of the key.","createTitle":"New provider","editTitle":"Edit {{name}}","formIntro":"Set the credential and any reusable named endpoints; saving returns to the list.","loading":"Reading the vault…","entryCount_one":"{{count}} provider entry","entryCount_other":"{{count}} provider entries","add":"New credential","empty":"The vault is empty — add a provider first.","keyConfigured":"Key set","keyMissing":"No key","noEndpoints":"No named endpoint","reveal":"Show {{name}}\'s key","hide":"Hide {{name}}\'s key","edit":"Edit {{name}}","delete":"Delete {{name}}","close":"Close","deleteTitle":"Delete this provider?","deleteBody":"This deletes “{{name}}”. An entry referenced by a profile cannot be deleted — remove the reference first.","deleted":"Deleted.","deleteFailed":"Delete failed","revealFailed":"Could not read the key","name":"Name","namePlaceholder":"e.g. openrouter","apiKey":"API key","apiKeyKeep":"Leave empty to keep the current key","apiKeyRequiredPlaceholder":"Required","notes":"Notes (optional)","endpoints":"Named endpoints (optional)","endpointsHint":"A profile referencing this provider can pick one of these endpoints, whose base URL then wins over the profile\'s own address.","noEndpointDrafts":"No endpoint yet","endpointKeyLabel":"Endpoint {{index}} name","endpointKeyPlaceholder":"id, e.g. default","endpointUrlLabel":"Endpoint {{index}} base URL","endpointUrlPlaceholder":"https://api.example.com/v1","endpointLabelLabel":"Endpoint {{index}} label","endpointLabelPlaceholder":"Display label (optional)","removeEndpoint":"Remove endpoint {{index}}","addEndpoint":"Add endpoint","saving":"Saving…","saveChanges":"Save changes","updated":"Updated.","created":"Provider entry added.","saveFailed":"Save failed","error":{"nameRequired":"Enter a provider name","apiKeyRequired":"Enter an API key","endpointKeyRequired":"Enter an endpoint id","endpointKeyInvalid":"Cannot contain / or \\\\, and is at most {{max}} characters","endpointKeyDuplicate":"Endpoint ids must be unique","endpointUrlRequired":"Enter a base URL","checkFields":"Check the fields marked in red."},"probeEndpointLabel":"Endpoint to test","probeFailed":"Probe request failed"},"activate":{"title":"Activate profile?","officialTitle":"Return to official login?","body":"This switches {{harness}} to \\"{{profile}}\\" and writes its native configuration files{{changed}}. Target local user: {{user}}. A backup is taken first.","officialBody":"This returns {{harness}} to its official login 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","executing":"Writing…","failed":"Writing failed: {{reason}}. The configuration was not switched; fix the issue and retry.","retry":"Retry activation","retryPreview":"Reload preview"},"env":{"title":"Environment file compatibility","intro":"Switching does not require it. Run this in the relevant shell only when Codex uses environment-variable authentication:","note":"The file contains only variables recognized by each tool. Kimi Code and Pi do not read credentials from the shell, so their sections contain only a comment."},"backup":{"latest":"Latest backup","profile":"Profile","fileCount_one":"{{count}} file","fileCount_other":"{{count}} files","empty":"No snapshots yet","history":"Configuration history","restore":"Restore","restoreTitle":"Restore this snapshot?","restoreBody":"This writes the {{harness}} / {{profile}} configuration files from {{time}} back to disk, overwriting the current content.","confirmRestore":"Confirm restore","current":"Matches disk","loadFailed":"Could not read the snapshot: {{reason}}","loading":"Loading the snapshot…","written":"Restored the files from that snapshot to disk.","historyTitle":"{{harness}} configuration history","historyIntro":"Every write snapshots the original files into the data directory, keeping the last 10. Only this tool’s history is listed; entries that match what is on disk are marked current.","currentBadge":"Current","withDeletions":"includes deletions","restoreHistoryTitle":"Restore this snapshot?","restoreHistoryBody":"Red is what you lose, green is what the restore writes. Confirming overwrites the files on disk from this snapshot; the active profile harness-switch has on record does not roll back with it.","comparing":"Computing the diff…","diffFailed":"Could not load the diff"},"diff":{"delete":"Will delete","create":"Will create","replace":"Will overwrite","same":"No change","rendering":"Rendering the diff…","absent":"(absent)","afterRestore":"↓ after restore","deletedAfterRestore":"(deleted after restore)","bothAbsent":"Absent on both sides"},"drift":{"title":"Configuration drift","recheck":"Re-check drift","checking":"Checking for drift…","noData":"No drift data yet.","none":"No drift","mismatch_one":"{{count}} file differs","mismatch_other":"{{count}} files differ","moreFiles":"and {{count}} more…","viewDiff":"View diff","dialogTitle":"{{harness}} configuration drift","legend":"Red is what is on disk; green is what the active profile would write.","noActiveProfile":"This tool has no active profile.","nothingToCompare":"No active profile, so there is nothing to compare.","allInSync":"Every file matches the active profile.","adopt":"Adopt live configuration","reapply":"Re-apply","reapplyTitle":"Re-apply the active profile?","reapplyBody":"This rewrites {{harness}}\'s native configuration files from the active profile, overwriting local edits on disk. A backup is taken first.","confirmReapply":"Confirm re-apply","reapplyFailed":"Re-apply failed","adoptTitle":"Adopt the live configuration?","adoptBody":"This writes the current on-disk content back into the profile, and later writes will use it as the source. This cannot be undone.","confirmAdopt":"Confirm adopt","adoptFailed":"Adopt failed","reapplied":"Rewrote {{harness}}\'s native configuration files from the active profile.","adopted":"Adopted {{harness}}\'s live configuration into the profile.","status":{"in-sync":"In sync","drifted":"Modified","missing":"Missing","invalid":"Unparseable","unknown":"Unknown"}},"doctor":{"title":"Diagnostics","titleFor":"{{harness}} diagnostics","intro":"Checks tool installation, whether configuration files are readable, writable and parseable, storage permissions, and drift.","checking":"Checking…","notRun":"Diagnostics have not run yet","viewDetails":"View details","rerun":"Run again","close":"Close","updateAvailable":"A new version is available","noChecks":"Nothing to check","countOk":"{{count}} ok","countWarn":"{{count}} warning","countError":"{{count}} error","countUnknown":"{{count}} unknown","status":{"ok":"OK","warn":"Warning","error":"Error","unknown":"Unknown"},"check":{"installFound":"Found the {{bin}} executable","installMissing":"No {{bin}} executable on PATH — the tool may not be installed","installNotRequired":"{{harness}} is typically a web service — no PATH CLI is required","fileMissing":"{{target}} does not exist ({{path}})","fileUnreadable":"{{target}} is not readable ({{path}})","fileUnwritable":"{{target}} is not writable ({{path}})","filePermissive":"{{target}} is readable and writable, but its mode is {{mode}} — group/other can read it; 0600 is recommended","fileOk":"{{target}} exists and is readable and writable ({{path}})","parseOk":"{{target}} parses cleanly","parseFailed":"{{target}} could not be parsed: {{reason}}","parseUnreadable":"{{target}} could not be read: {{reason}}","driftNoProfile":"No active profile, so there is no drift to check","driftInvalid":"The live files contain content that cannot be parsed","driftMismatch_one":"{{count}} file does not match the active profile ({{status}})","driftMismatch_other":"{{count}} files do not match the active profile ({{status}})","driftInSync":"The live files match the active profile","probeNoProfile":"No active profile; connectivity probe skipped","probeOfficialLogin":"{{harness}} is on its built-in account login; no custom endpoint to probe","probeMissingCredential":"Profile {{profile}} has no base URL or API key; cannot probe","probeOk":"Endpoint of profile {{profile}} is reachable","probeFailed":"Connectivity probe failed for profile {{profile}}"}},"notice":{"switchDone":"Switch complete","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","invalidRequest":"The request data is invalid","internalServerError":"Internal server error","authenticationRequired":"Sign-in required","crossOriginDenied":"Cross-origin request denied"},"auth":{"invalidPassword":"Incorrect password"},"github":{"notConnected":"Connect GitHub before continuing","authFailed":"GitHub authorization failed; sign in again","gistNotFound":"No harness-switch backup Gist was found in GitHub","deviceCodeExpired":"The device code expired; get a new one","rateLimitExceeded":"GitHub API rate limit exceeded; try again later"},"cli":{"missingArgument":"A required argument is missing"},"profile":{"activeDeleteForbidden":"This profile is in use; activate another one before deleting it","alreadyExists":"A profile with this name already exists","notFound":"Profile not found","endpointNotFound":"Endpoint {{endpoint}} was not found","apiKeyRequired":"Enter an API key","nameRequired":"Enter a profile name","nameInvalid":"A profile name cannot contain slashes","nameTooLong":"A profile name is too long"},"adapter":{"modelRequired":"{{harness}} requires a model name","apiKeyRequired":"{{harness}} requires an API key","nativeConfigInvalid":"{{path}} is not valid {{format}} configuration","unknownTarget":"The adapter produced an unknown target {{key}}"},"activation":{"officialLoginUnsupported":"{{harness}} does not support official account login","officialLoginMissing":"No official login entry was found for {{harness}}; complete its official login in a terminal once first","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","manualOverridesPreventAdopt":"Manual overrides would be lost by adoption; restore generated files first","officialProfileAlreadyExists":"A DeepSeek official profile already exists; edit it instead"},"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}}","notFound":"Provider not found","nameRequired":"Enter a provider name","apiKeyRequired":"Enter an API key","endpointsInvalid":"Endpoints must be an array","endpointKeyRequired":"Enter an endpoint id","endpointKeyInvalid":"An endpoint id contains invalid characters","endpointKeyDuplicate":"Endpoint {{key}} is duplicated","endpointUrlRequired":"Enter a base URL for endpoint {{key}}"},"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","invalidConflictPolicy":"The conflict policy is invalid"},"harness":{"notFound":"Harness not found"},"file":{"notRegular":"{{file}} is not a regular file","outsideManagedDirectory":"{{file}} is outside the managed directories","ownershipRequiresRoot":"Changing ownership of {{path}} requires running as root"},"scan":{"apiKeyRequired":"No credential could be extracted; enter an API key first"},"backup":{"targetInvalid":"{{path}} is not a valid {{harness}} backup target","invalidId":"The backup id is invalid","notFound":"Backup not found","fileNotOwned":"The backup references a file that {{harness}} does not own","payloadMissing":"Backup data for {{file}} is missing","payloadNameInvalid":"The backup payload name is invalid"},"operation":{"alreadyUndone":"This operation has already been undone","incomplete":"This operation has not finished; wait or restart the server to recover it","backupMissing":"Backup {{backupId}} for operation {{id}} has been rotated away","storageUnknown":"The operation refers to unknown storage {{key}}","snapshotMissing":"Operation {{id}} is missing the {{key}} snapshot","invalidId":"The operation id is invalid","notFound":"Operation not found"},"user":{"notManageable":"User {{username}} is not manageable","notSwitchable":"Cannot switch to user {{username}}","block":{"homeUnsearchable":"No permission to access","homeUnwritable":"No permission to write","storeInaccessible":"Config dir not writable","ownershipRequiresRoot":"Requires running as root","homeMissing":"Home directory missing"}},"storage":{"unreadable":"Could not read {{file}}","quarantineFailed":"Could not quarantine the corrupt {{file}}","corruptQuarantined":"The data store is corrupt. The original was quarantined as {{quarantine}}; restore from a backup before continuing"},"probe":{"badUrl":"Base URL does not parse, or is not http/https","missingBaseUrl":"No base URL supplied; nothing to test","missingApiKey":"No API key supplied; nothing to test","timeout":"Request timed out (10 seconds)","networkError":"Could not reach the endpoint (DNS, refused connection or TLS failure)","unauthorized":"Endpoint reachable but rejected the credential (HTTP {{status}}); check the API key","httpError":"Endpoint returned HTTP {{status}}","invalidResponse":"The response is not a recognized model-catalog format"}},"warning":{"activation":{"envRebuildFailed":"The native configuration was written, but rebuilding env.sh failed","officialEnvRebuildFailed":"The official login was restored, but rebuilding env.sh failed","backfillFailed":"Could not save {{profile}}\'s existing configuration back into the profile"},"provider":{"endpointFallback":"Endpoint {{endpoint}} no longer exists; falling back to the provider\'s first endpoint","reapplyFailed":"Re-apply failed: {{reason}}"},"sync":{"activeReapplyFailed":"The profile store was updated, but automatic re-activation failed: {{reason}}"},"transfer":{"activeRestoreFailed":"Could not restore the active state: {{reason}}"}},"update":{"updating":"Updating…","failed":"Update failed","failedHint":"Run bunx @seaveyon/harness-switch@latest manually","short":"Update","toVersion":"Update to v{{version}}"},"sync":{"title":"Sync from another user","intro":"Copies the source user\'s profiles and the credentials they reference to {{user}}. Active state, backups and native configuration files are not copied by default; migrating the Codex login cache is a separate opt-in.","sourceUser":"Source user","selectUser":"Select a local user","profileCount":"Profiles {{count}}","providerCount":"Credentials {{count}}","conflictCount":"Name conflicts {{count}}","overwriteByHarness":"Overwrite same-named profiles per harness","overwriteHint":"Only checked harnesses are overwritten; unchecked ones keep the current user\'s version.","overwriteHarness":"Overwrite {{harness}}","conflictsInHarness_one":"{{count}} same-named profile","conflictsInHarness_other":"{{count}} same-named profiles","migrateCache":"Migrate the Codex official login cache (auth.json)","migrateCacheHint":"This copies a reusable Codex login session, not ordinary configuration. Choose it only when the target user is entitled to that login.","migrateCacheOverwrite":"The target user already has a login cache; continuing overwrites it and takes a backup first.","storeOnlyHint":"Syncing only writes to the profile store. Activate the profile you want after syncing to make it take effect.","noOtherUsers":"There are no other manageable local login users.","inspecting":"Checking…","inspect":"Check what can be synced","syncing":"Syncing…","syncTo":"Sync to {{user}}","confirmCacheTitle":"Migrate the Codex login cache?","confirmCacheBody":"This copies {{source}}\'s Codex official login cache (auth.json) to {{target}}. {{extra}}Continue only if the target user is entitled to use that login session.","confirmCacheOverwrite":"The target user already has a cache; it will be overwritten and backed up. ","confirmCacheFresh":"The target user will get a new local login cache. ","confirmCacheAction":"Migrate the login cache and sync","done":"Sync complete: {{imported}} added, {{overwritten}} overwritten, {{skipped}} skipped, {{providersCopied}} credentials copied.","cacheMigrated":"The Codex login cache was migrated.","cacheNotMigrated":"The Codex login cache was not migrated."},"transfer":{"title":"Move configuration","intro":"Bring profiles and credentials onto this machine, or pack them up to take along. Every source writes to this manager’s own store.","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.","encrypting":"Encrypting…","download":"Download the encrypted export","exported":"The encrypted export is ready. 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}}","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.","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."},"sourceLabel":"Pick a source","sources":{"scan":"Config already here","user":"Another local user","file":"Encrypted file","gist":"GitHub Gist"},"currentPolicy":"Current policy: {{policy}}","importing":"Importing…"},"githubSync":{"title":"GitHub Cloud Sync","intro":"Seamless multi-machine configuration synchronization using your GitHub account. Backups are end-to-end AES-256-GCM encrypted with a master passphrase before storing into a private Gist.","tabDevice":"GitHub OAuth Login","tabToken":"Personal Access Token","deviceIntro":"Enter the user code on GitHub to complete binding.","openAuthPage":"Authorize on GitHub","getCode":"Get Device Code","userCode":"User Code","copyCode":"Copy Code","copied":"Copied","waitingAuth":"Waiting for GitHub authorization…","waitingAuthInterval":"Waiting for GitHub authorization (polling in {{seconds}}s)…","checkingAuth":"Checking authorization…","checkNow":"Check now","regenerateCode":"Get a new device code","tokenPlaceholder":"Enter GitHub Token with gist permission (ghp_...)","connectToken":"Connect & Sign in","connecting":"Connecting…","disconnect":"Disconnect","lastSynced":"Last synced:","neverSynced":"Never synced","cloudGist":"Cloud Gist:","pushTitle":"Upload to Cloud","pushIntro":"Encrypts all profiles and provider credentials on this machine and uploads to your private Gist.","passphrase":"Sync Passphrase","passphrasePlaceholder":"Passphrase for end-to-end encryption","pushing":"Encrypting and uploading…","pushSuccess":"Successfully synced to GitHub Gist ({{profiles}} profiles, {{vault}} credentials).","pullTitle":"Pull from Cloud","pullIntro":"Downloads the encrypted backup from your private Gist and decrypts it locally.","pullPassphrasePlaceholder":"Sync passphrase set during upload","inspect":"Inspect Cloud Backup","pulling":"Pulling…","confirmPull":"Confirm Sync to Local","pullSuccess":"Cloud sync complete: {{summary}}","authorized":"GitHub authorized — welcome, {{user}}.","connected":"GitHub connected — welcome, {{user}}.","disconnected":"Disconnected from GitHub.","codeExpired":"The authorization code expired — request a new one.","authFailed":"Authorization failed — try again.","connectedBadge":"Connected","refreshStatus":"Refresh status","previewTitle":"What the cloud backup holds","backedUpAt":"Backed up {{time}}","tokenLabel":"Personal access token","tokenScopeHint":"The token needs the gist scope to read and write the encrypted config file."},"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","close":"Close","closeDialog":"Close dialog","apiKey":"API key","listSeparator":", "},"preset":{"zaiAnthropic":"Z.AI (Anthropic compatible)","moonshotAnthropic":"Moonshot (Anthropic compatible)","deepseekAnthropic":"DeepSeek (Anthropic compatible)","openrouter":"OpenRouter","zai":"Z.AI","moonshot":"Moonshot","deepseek":"DeepSeek","cliproxyResponses":"CLIProxy (Responses)"},"probe":{"action":"Test connection","probing":"Testing…","ok":"Reachable \xb7 {{latencyMs}}ms \xb7 {{count}} models","okNoCatalog":"Reachable \xb7 {{latencyMs}}ms \xb7 no model catalog returned","catalogHint":"Fetched {{count}} models; click the model field to pick one from the list.","missingBaseUrl":"Add an endpoint URL before testing."}}'),s=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":"本地用户","transfer":"配置迁移","vault":"凭据库","signOut":"退出","switchHarness":"切换 Harness"},"harness":{"subtitle":"管理配置档案并安全写入该工具的原生配置文件。","newProfile":"新增配置","addCustomProvider":"添加自定义提供方","current":"当前:{{name}}","currentInactive":"当前:未激活","activeConfig":"当前生效配置","defaultModel":"默认模型","activeNamed":"当前激活 \xb7 {{name}}","inactive":"未激活","active":"已激活","activate":"激活","setDefault":"设为默认","default":"默认","deepseekOfficial":"DeepSeek 官方","writeTargets":"写入目标","noTargetFile":"未配置目标文件","moreFiles_one":"以及另外 {{count}} 个文件","moreFiles_other":"以及另外 {{count}} 个文件","overwriteWarning":"配置将直接覆盖目标文件。写入前会自动备份,切换后请验证服务连通性与模型可用性。","profiles":"配置档案","providers":"提供方","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 账号登录","officialHintKimi":"使用 Kimi Code 自身的 Kimi 账号登录(/login 写入的 OAuth 凭据)","application":"应用","writeMode":"写入模式","modeReplace":"替换当前配置","modeAdditive":"保留并切换指针"},"profile":{"editTitle":"编辑 {{harness}} / {{profile}}","createTitle":"新增 {{harness}} 配置","intro":"保存后会写入 {{targets}}。","additiveNote":"该工具的配置文件按 provider 共存,切换只会移动当前指针,不会删除你手写的其他 provider。","useSharedProvider":"使用共享 Provider(凭据库)","useSharedProviderLabel":"使用共享 Provider","keyFromVault":"密钥由凭据库提供","providerNone":"不使用(本配置自带密钥)","vaultEmpty":"凭据库为空,可先在顶部「凭据库」中新增 Provider 条目。","namedEndpoint":"命名 Endpoint(可选)","namedEndpointLabel":"命名 Endpoint","endpointNone":"不指定(使用下方 Base URL)","endpointOption":"{{label}}({{key}})","noEndpoints":"该 Provider 没有命名 endpoint,将使用下方 Base URL。","quickFill":"快速填充:","name":"配置名称","namePlaceholder":"例如:openrouter-main","renameHint":"修改后会同步更新当前激活状态和原生配置中的 Provider 标识。","baseUrl":"API Base URL","baseUrlPlaceholder":"https://api.example.com/v1","baseUrlFromVault":"Base URL 来自凭据库 endpoint「{{endpoint}}」。","apiKey":"API Key","apiKeyKeep":"留空表示保持不变","apiKeyRequiredPlaceholder":"必填","apiKeySharedHint":"已引用共享 Provider,密钥在「凭据库」中统一轮换。","fallbackModel":"回退模型(ANTHROPIC_MODEL)","model":"模型","fallbackModelPlaceholder":"可选;各档未匹配时使用,例如 glm-5","modelPlaceholder":"例如:claude-sonnet-4-5","claudeModelHint":"留空则沿用 Claude Code 默认模型;可在下面分别映射各模型档位。","notes":"备注(可选)","advanced":"高级:原始配置","overridden":"已手动接管","saveFirst":"先保存这份配置,之后回到编辑界面即可接管原始文件内容。","save":"保存配置","saving":"保存中…","rawLoading":"正在读取将写入的内容…","rawIntro":"下面是当前会写入磁盘的内容,基于最近一次保存的字段生成。改动任意一份即视为手动接管,之后表单字段不再影响这份文件。","resetToGenerated":"恢复为自动生成","selectPlaceholder":"请选择","mapping":{"title":"模型映射","intro":"显示名称仅影响 Claude Code 的 /model 菜单;留空时显示对应的实际模型 ID。开启「1M 上下文」会在模型 ID 末尾追加 [1m],仅在该模型确实支持 1M 时开启。","role":"模型角色","displayName":"显示名称","actualModel":"实际请求模型","oneM":"1M 上下文","defaultTo":"默认:{{model}}","notInMenu":"不显示在 /model 菜单","oneMUnsupported":"{{role}} 不支持 1M","enable":"启用"},"error":{"nameRequired":"请输入配置名称","nameSlash":"配置名称不能包含 / 或 \\\\","nameTooLong":"配置名称最多 {{max}} 个字符","baseUrlRequired":"请输入 API Base URL","apiKeyRequired":"请输入 API Key","modelRequired":"请输入模型名称","providerGone":"引用的 Provider 已不存在,请重新选择","endpointGone":"引用的 Endpoint 已不存在,请重新选择","fieldRequired":"请填写{{label}}","checkFields":"请检查标红的必填项或输入内容。"}},"vault":{"title":"凭据库","intro":"Provider 条目集中保存 API Key(AES-256-GCM 加密,默认不显示明文),并附带可复用的 endpoint。配置档案可以引用这里的条目,而不是各自保存一份密钥。","createTitle":"新增 Provider","editTitle":"编辑 {{name}}","formIntro":"配置凭据和可复用的命名 Endpoint;保存后返回凭据库列表。","loading":"正在读取凭据库…","entryCount_one":"{{count}} 个 Provider 条目","entryCount_other":"{{count}} 个 Provider 条目","add":"新增凭据","empty":"凭据库为空,先新增一个 Provider。","keyConfigured":"密钥已配置","keyMissing":"未配置密钥","noEndpoints":"没有命名 endpoint","reveal":"显示 {{name}} 的密钥","hide":"隐藏 {{name}} 的密钥","edit":"编辑 {{name}}","delete":"删除 {{name}}","close":"关闭","deleteTitle":"删除这个 Provider?","deleteBody":"将删除「{{name}}」。被配置档案引用的条目无法删除,请先移除引用。","deleted":"已删除。","deleteFailed":"删除失败","revealFailed":"无法读取密钥","name":"名称","namePlaceholder":"例如:openrouter","apiKey":"API Key","apiKeyKeep":"留空表示保持不变","apiKeyRequiredPlaceholder":"必填","notes":"备注(可选)","endpoints":"命名 Endpoint(可选)","endpointsHint":"配置档案引用此 Provider 时可以选择某个 endpoint,其 Base URL 优先于配置自身的地址。","noEndpointDrafts":"还没有 endpoint","endpointKeyLabel":"Endpoint {{index}} 名称","endpointKeyPlaceholder":"标识,如 default","endpointUrlLabel":"Endpoint {{index}} Base URL","endpointUrlPlaceholder":"https://api.example.com/v1","endpointLabelLabel":"Endpoint {{index}} 标签","endpointLabelPlaceholder":"显示标签(可选)","removeEndpoint":"移除 Endpoint {{index}}","addEndpoint":"添加 endpoint","saving":"保存中…","saveChanges":"保存修改","updated":"已更新。","created":"已新增 Provider 条目。","saveFailed":"保存失败","error":{"nameRequired":"请输入 Provider 名称","apiKeyRequired":"请输入 API Key","endpointKeyRequired":"请输入 Endpoint 标识","endpointKeyInvalid":"不能包含 / 或 \\\\,且最多 {{max}} 个字符","endpointKeyDuplicate":"Endpoint 标识不能重复","endpointUrlRequired":"请输入 Base URL","checkFields":"请检查标红的必填项。"},"probeEndpointLabel":"选择要测试的 endpoint","probeFailed":"测试请求失败"},"activate":{"title":"激活配置?","officialTitle":"切回官方登录?","body":"将把 {{harness}} 切换到「{{profile}}」并写入原生配置文件{{changed}}。目标本地用户:{{user}}。写入前会自动备份。","officialBody":"将把 {{harness}} 切回官方登录并写入原生配置文件{{changed}}。目标本地用户:{{user}}。写入前会自动备份。","changedFiles_one":",其中 {{count}} 个文件将变更","changedFiles_other":",其中 {{count}} 个文件将变更","loadFailed":"无法读取将要写入的内容:{{reason}}","loading":"正在读取将要写入的内容…","confirm":"确认激活","executing":"正在写入…","failed":"写入失败:{{reason}}。配置未切换,请修正后重试。","retry":"重试激活","retryPreview":"重新读取预览"},"env":{"title":"环境变量文件兼容性","intro":"切换本身不需要它。只有 Codex 选择「环境变量」认证方式时才需要在对应 shell 执行:","note":"文件里只会写入对应工具确实认识的变量。Kimi Code 与 Pi 不从 shell 读取凭据,所以它们只有一行注释。"},"backup":{"latest":"最近备份","profile":"配置档案","fileCount_one":"{{count}} 个文件","fileCount_other":"{{count}} 个文件","empty":"还没有历史快照","history":"历史快照","restore":"恢复","restoreTitle":"恢复这份快照?","restoreBody":"将把 {{harness}} / {{profile}} 在 {{time}} 的配置文件写回磁盘,覆盖当前内容。","confirmRestore":"确认恢复","current":"与磁盘一致","loadFailed":"无法读取快照内容:{{reason}}","loading":"正在读取快照…","written":"已把该历史快照的文件写回磁盘。","historyTitle":"{{harness}} 配置历史","historyIntro":"每次写入前都会把原文件快照到数据目录,保留最近 10 份。这里只显示当前工具的历史;与磁盘一致的条目会标成「当前」。","currentBadge":"当前","withDeletions":"含删除","restoreHistoryTitle":"恢复这份历史?","restoreHistoryBody":"红是当前将丢失的内容,绿是恢复后的内容。确认后会按历史快照覆盖磁盘文件,harness-switch 记录的「当前激活」不会随之回退。","comparing":"正在对比差异…","diffFailed":"加载差异失败"},"diff":{"delete":"将删除","create":"将新建","replace":"将覆盖","same":"无变更","rendering":"正在渲染差异…","absent":"(当前不存在)","afterRestore":"↓ 恢复后","deletedAfterRestore":"(恢复后删除)","bothAbsent":"两侧都不存在"},"drift":{"title":"配置漂移","recheck":"重新检查漂移","checking":"正在检查漂移…","noData":"暂无漂移数据。","none":"无漂移","mismatch_one":"{{count}} 个文件不一致","mismatch_other":"{{count}} 个文件不一致","moreFiles":"还有 {{count}} 个文件…","viewDiff":"查看差异","dialogTitle":"{{harness}} 配置漂移","legend":"红色是磁盘现状,绿色是按激活配置应写入的内容。","noActiveProfile":"该工具未激活任何配置。","nothingToCompare":"未激活任何配置,没有可对比的内容。","allInSync":"所有文件与激活配置一致。","adopt":"采纳现场配置","reapply":"重新应用","reapplyTitle":"重新应用激活配置?","reapplyBody":"将按激活配置重新写入 {{harness}} 的原生配置文件,覆盖磁盘上的现场修改。写入前会自动备份。","confirmReapply":"确认重新应用","reapplyFailed":"重新应用失败","adoptTitle":"采纳现场配置?","adoptBody":"将把磁盘上的当前内容回填进配置档案,之后的写入会以现场为准。此操作不可撤销。","confirmAdopt":"确认采纳","adoptFailed":"采纳失败","reapplied":"已按激活配置重新写入 {{harness}} 的原生配置文件。","adopted":"已把 {{harness}} 现场配置回填进配置档案。","status":{"in-sync":"一致","drifted":"已修改","missing":"缺失","invalid":"无法解析","unknown":"未知"}},"doctor":{"title":"诊断","titleFor":"{{harness}} 诊断","intro":"检查工具安装、配置文件可读可写可解析、存储权限与漂移状态。","checking":"正在检查…","notRun":"尚未运行诊断","viewDetails":"查看详情","rerun":"重新诊断","close":"关闭","updateAvailable":"有新版本可用","noChecks":"没有可检查的项目","countOk":"{{count}} 项正常","countWarn":"{{count}} 项警告","countError":"{{count}} 项错误","countUnknown":"{{count}} 项未知","status":{"ok":"正常","warn":"警告","error":"错误","unknown":"未知"},"check":{"installFound":"已找到可执行文件 {{bin}}","installMissing":"未找到可执行文件 {{bin}}(PATH 中不存在),工具可能未安装","installNotRequired":"{{harness}} 以 Web 服务部署,不要求 PATH 上有 CLI","fileMissing":"{{target}} 不存在({{path}})","fileUnreadable":"{{target}} 不可读({{path}})","fileUnwritable":"{{target}} 不可写({{path}})","filePermissive":"{{target}} 存在可读写,但权限为 {{mode}},group/other 可读,建议 0600","fileOk":"{{target}} 存在且可读可写({{path}})","parseOk":"{{target}} 解析正常","parseFailed":"{{target}} 无法解析:{{reason}}","parseUnreadable":"{{target}} 无法读取:{{reason}}","driftNoProfile":"未激活任何配置,无漂移可检查","driftInvalid":"live 文件存在无法解析的内容","driftMismatch_one":"{{count}} 个文件与激活配置不一致({{status}})","driftMismatch_other":"{{count}} 个文件与激活配置不一致({{status}})","driftInSync":"live 文件与激活配置一致","probeNoProfile":"未激活任何配置,跳过连通性探测","probeOfficialLogin":"{{harness}} 处于官方账号登录状态,无自定义端点可探测","probeMissingCredential":"配置 {{profile}} 缺少 Base URL 或 API Key,无法探测","probeOk":"配置 {{profile}} 的端点可达","probeFailed":"配置 {{profile}} 的连通性探测失败"}},"notice":{"switchDone":"切换完成","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":"请求失败","invalidRequest":"请求数据无效","internalServerError":"服务器内部错误","authenticationRequired":"需要登录","crossOriginDenied":"跨域请求被拒绝"},"auth":{"invalidPassword":"密码错误"},"github":{"notConnected":"请先连接 GitHub","authFailed":"GitHub 授权失败,请重新登录","gistNotFound":"GitHub 中未找到 harness-switch 备份 Gist","deviceCodeExpired":"设备授权码已过期,请重新获取","rateLimitExceeded":"GitHub API 请求速率超限,请稍后再试"},"cli":{"missingArgument":"缺少必要参数"},"profile":{"activeDeleteForbidden":"该配置正在使用中,请先激活另一个配置再删除","alreadyExists":"同名配置已经存在","notFound":"未找到配置","endpointNotFound":"未找到 endpoint {{endpoint}}","apiKeyRequired":"请填写 API key","nameRequired":"请填写配置名称","nameInvalid":"配置名称不能包含斜杠","nameTooLong":"配置名称过长"},"adapter":{"modelRequired":"{{harness}} 需要填写模型名称","apiKeyRequired":"{{harness}} 需要填写 API key","nativeConfigInvalid":"{{path}} 不是合法的 {{format}} 配置","unknownTarget":"适配器产生了未知写入目标 {{key}}"},"activation":{"officialLoginUnsupported":"{{harness}} 不支持官方账号登录模式","officialLoginMissing":"未检测到 {{harness}} 的官方登录条目,请先在终端完成一次官方登录","noActiveProfile":"该工具未激活任何配置,无可渲染的内容","officialProfileCannotAdopt":"当前处于官方登录状态,没有可回填的配置档案","adoptUnsupported":"该工具不支持采纳现场配置","manualOverridesPreventAdopt":"采纳会丢弃手动覆盖的内容;请先恢复为自动生成","officialProfileAlreadyExists":"DeepSeek 官方配置已存在,请直接编辑它"},"provider":{"inUse_one":"该凭据正被 {{count}} 个配置引用,请先解除引用","inUse_other":"该凭据正被 {{count}} 个配置引用,请先解除引用","credentialUnreadable":"无法读取凭据 {{id}} 的密钥","notFound":"未找到 provider","nameRequired":"请填写 provider 名称","apiKeyRequired":"请填写 API key","endpointsInvalid":"endpoints 必须是数组","endpointKeyRequired":"请填写 endpoint 标识","endpointKeyInvalid":"endpoint 标识包含无效字符","endpointKeyDuplicate":"endpoint {{key}} 重复","endpointUrlRequired":"请填写 endpoint {{key}} 的 Base URL"},"codex":{"loginCacheTooLarge":"Codex 登录缓存文件过大,已跳过","loginCacheInvalidJson":"Codex 登录缓存不是合法 JSON","configDirectoryNotRegular":"Codex 配置目录不是普通目录","loginCacheNotRegular":"Codex 登录缓存不是普通文件"},"transfer":{"envelopeInvalid":"不支持的导出文件格式"},"sync":{"sourceCodexLoginCacheMissing":"源用户没有可用的 Codex 官方登录缓存","sourceEqualsTarget":"源用户与目标用户相同","invalidConflictPolicy":"冲突处理策略无效"},"harness":{"notFound":"未找到工具"},"file":{"notRegular":"{{file}} 不是普通文件","outsideManagedDirectory":"{{file}} 位于可管理目录之外","ownershipRequiresRoot":"修改 {{path}} 的所有权需要以 root 运行"},"scan":{"apiKeyRequired":"这条配置里没有可提取的凭据,请先填写 API key"},"backup":{"targetInvalid":"{{path}} 不是 {{harness}} 的有效备份目标","invalidId":"备份 ID 无效","notFound":"未找到备份","fileNotOwned":"备份引用了 {{harness}} 不拥有的文件","payloadMissing":"备份中缺少 {{file}} 的内容","payloadNameInvalid":"备份内容文件名无效"},"operation":{"alreadyUndone":"该操作已经撤销过了","incomplete":"该操作尚未完成,请等待或重启服务以自动恢复","backupMissing":"操作 {{id}} 的备份 {{backupId}} 已被轮换删除","storageUnknown":"操作引用了未知的存储文件 {{key}}","snapshotMissing":"操作 {{id}} 缺少 {{key}} 的快照","invalidId":"操作 ID 无效","notFound":"未找到操作"},"user":{"notManageable":"用户 {{username}} 不可管理","notSwitchable":"无法切换到用户 {{username}}","block":{"homeUnsearchable":"没有权限访问","homeUnwritable":"没有权限写入","storeInaccessible":"配置目录不可写","ownershipRequiresRoot":"需要以 root 运行","homeMissing":"主目录不存在"}},"storage":{"unreadable":"无法读取 {{file}}","quarantineFailed":"无法隔离损坏的 {{file}}","corruptQuarantined":"数据存储已损坏,原文件已隔离为 {{quarantine}},请从备份恢复后再继续"},"probe":{"badUrl":"Base URL 无法解析,或不是 http/https","missingBaseUrl":"未提供 Base URL,无法测试","missingApiKey":"未提供 API Key,无法测试","timeout":"请求超时(10 秒)","networkError":"无法连接到端点(DNS、拒绝连接或 TLS 失败)","unauthorized":"端点可达但拒绝了凭据(HTTP {{status}}),请检查 API Key","httpError":"端点返回 HTTP {{status}}","invalidResponse":"响应不是已知的模型目录格式"}},"warning":{"activation":{"envRebuildFailed":"原生配置已写入,但重建 env.sh 失败","officialEnvRebuildFailed":"已恢复官方登录,但重建 env.sh 失败","backfillFailed":"未能把 {{profile}} 的现有配置回填保存"},"provider":{"endpointFallback":"endpoint {{endpoint}} 已不存在,将回退到 provider 首个 endpoint","reapplyFailed":"重新应用失败:{{reason}}"},"sync":{"activeReapplyFailed":"已更新配置库,但自动重新激活失败:{{reason}}"},"transfer":{"activeRestoreFailed":"未能恢复激活状态:{{reason}}"}},"update":{"updating":"更新中…","failed":"更新失败","failedHint":"手动运行 bunx @seaveyon/harness-switch@latest","short":"更新","toVersion":"更新到 v{{version}}"},"sync":{"title":"从其他用户同步","intro":"将来源用户的配置和所引用的凭据复制到 {{user}}。激活状态、备份和原生配置文件默认不会复制;可单独选择迁移 Codex 登录缓存。","sourceUser":"来源用户","selectUser":"选择本地用户","profileCount":"配置 {{count}}","providerCount":"凭据 {{count}}","conflictCount":"同名冲突 {{count}}","overwriteByHarness":"按 Harness 覆盖同名配置","overwriteHint":"只覆盖勾选的 Harness;未勾选的同名配置会保留当前用户版本。","overwriteHarness":"覆盖 {{harness}}","conflictsInHarness_one":"{{count}} 个同名配置","conflictsInHarness_other":"{{count}} 个同名配置","migrateCache":"迁移 Codex 官方登录缓存(auth.json)","migrateCacheHint":"这会复制可复用的 Codex 登录会话,不是普通配置。仅在目标用户可以使用该登录时选择。","migrateCacheOverwrite":"目标用户已有登录缓存;继续后将覆盖它,并自动创建备份。","storeOnlyHint":"同步仅写入配置库。需要生效时,请在同步后手动激活对应配置。","noOtherUsers":"没有其他可管理的本地登录用户。","inspecting":"正在检查…","inspect":"检查可同步内容","syncing":"正在同步…","syncTo":"同步到 {{user}}","confirmCacheTitle":"确认迁移 Codex 登录缓存?","confirmCacheBody":"将把 {{source}} 的 Codex 官方登录缓存(auth.json)复制到 {{target}}。{{extra}}仅当目标用户可以使用这个登录会话时才继续。","confirmCacheOverwrite":"目标用户已有缓存,会被覆盖并创建备份。","confirmCacheFresh":"目标用户将获得新的本地登录缓存。","confirmCacheAction":"迁移登录缓存并同步","done":"同步完成:新增 {{imported}},覆盖 {{overwritten}},跳过 {{skipped}},复制凭据 {{providersCopied}}。","cacheMigrated":"Codex 登录缓存已迁移。","cacheNotMigrated":"Codex 登录缓存未迁移。"},"transfer":{"title":"配置迁移","intro":"把配置档案和凭据搬进这台机器,或打包带走。所有来源写入的都是本管理器自己的配置库。","exportTitle":"导出所有配置","exportIntro":"文件使用迁移密码进行 AES-256-GCM 加密,不依赖当前机器的本地密钥。","passphrase":"迁移密码","passphrasePlaceholder":"至少 {{min}} 个字符","passphraseConfirm":"确认迁移密码","passphraseConfirmPlaceholder":"再次输入","passphraseMismatch":"两次输入的迁移密码不一致。","encrypting":"正在加密…","download":"下载加密导出包","exported":"加密导出包已生成。迁移密码不会写入文件,请单独保管。","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}}","previewStale":"已修改导入选项,请重新检查内容后再确认导入。","conflictPolicy":"同名配置处理","policySkip":"保留本机配置,跳过导入","policyOverwrite":"使用导出包覆盖本机配置","restoreActive":"恢复导出时的激活状态","recheckNeeded":"请重新检查导入内容","confirmImport":"确认导入","confirmAuthTitle":"确认可能改动 Codex auth.json?","confirmTitle":"确认导入全部配置?","confirmBody":"将导入 {{count}} 个配置。","confirmOverwrite_one":"其中 {{count}} 个同名配置会被覆盖。","confirmOverwrite_other":"其中 {{count}} 个同名配置会被覆盖。","confirmKeep":"同名配置会保留,不会被覆盖。","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。"},"sourceLabel":"选择来源","sources":{"scan":"本机现有配置","user":"其他本地用户","file":"加密文件","gist":"GitHub Gist"},"currentPolicy":"当前策略:{{policy}}","importing":"正在导入…"},"githubSync":{"title":"GitHub 云端同步","intro":"通过 GitHub 账号实现多机器无缝同步。配置包使用主密码进行端到端 AES-256-GCM 加密后存入私有 Gist,保护凭据安全。","tabDevice":"GitHub 授权登录","tabToken":"Token 登录","deviceIntro":"在 GitHub 输入下方授权码即可完成绑定。","openAuthPage":"前往 GitHub 授权","getCode":"获取设备授权码","userCode":"用户授权码","copyCode":"复制授权码","copied":"已复制","waitingAuth":"等待 GitHub 授权中…","waitingAuthInterval":"等待 GitHub 授权中({{seconds}} 秒后轮询)…","checkingAuth":"正在检查授权…","checkNow":"立即检查","regenerateCode":"重新获取授权码","tokenPlaceholder":"输入具有 gist 权限的 GitHub Token (ghp_...)","connectToken":"连接并登录","connecting":"连接中…","disconnect":"断开连接","lastSynced":"上次同步:","neverSynced":"尚未同步","cloudGist":"云端 Gist:","pushTitle":"上传到云端","pushIntro":"将当前机器的全部 Profiles 和凭据库加密备份到 GitHub 私有 Gist。","passphrase":"同步主密码","passphrasePlaceholder":"用于端到端加密与解密的密码","pushing":"正在加密并上传…","pushSuccess":"成功上传并同步到云端 Gist({{profiles}} 个配置,{{vault}} 条凭据)。","pullTitle":"从云端拉取","pullIntro":"从 GitHub 私有 Gist 下载加密备份并在本地解密还原。","pullPassphrasePlaceholder":"上传时设置的同步主密码","inspect":"检查云端备份","pulling":"正在拉取…","confirmPull":"确认同步到本地","pullSuccess":"云端同步完成:{{summary}}","authorized":"GitHub 授权成功,欢迎 {{user}}。","connected":"GitHub 连接成功,欢迎 {{user}}。","disconnected":"已断开与 GitHub 的连接。","codeExpired":"授权码已过期,请重新获取。","authFailed":"授权失败,请重试。","connectedBadge":"已连接","refreshStatus":"刷新状态","previewTitle":"云端备份检查结果","backedUpAt":"备份时间:{{time}}","tokenLabel":"Personal Access Token","tokenScopeHint":"Token 需具备 gist 权限,才能读写加密配置文件。"},"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":"删除","close":"关闭","closeDialog":"关闭对话框","apiKey":"API 密钥","listSeparator":"、"},"preset":{"zaiAnthropic":"Z.AI(Anthropic 兼容)","moonshotAnthropic":"Moonshot(Anthropic 兼容)","deepseekAnthropic":"DeepSeek(Anthropic 兼容)","openrouter":"OpenRouter","zai":"Z.AI","moonshot":"Moonshot","deepseek":"DeepSeek","cliproxyResponses":"CLIProxy(Responses)"},"probe":{"action":"测试连接","probing":"正在测试…","ok":"连接正常 \xb7 {{latencyMs}}ms \xb7 {{count}} 个模型","okNoCatalog":"连接正常 \xb7 {{latencyMs}}ms \xb7 端点未提供模型目录","catalogHint":"已获取 {{count}} 个模型,点击“模型”输入框可从列表选择。","missingBaseUrl":"请先填写至少一个 endpoint URL 再测试。"}}'),u=["zh-CN","en"],c="zh-CN";function d(e){return u.includes(e)}var f={en:l,"zh-CN":s};function p(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 h extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class m extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}(r=globalThis).__zod_globalConfig??(r.__zod_globalConfig={});let g=globalThis.__zod_globalConfig;function y(e){return e&&Object.assign(g,e),g}let v=/^[cC][0-9a-z]{6,}$/,b=/^[0-9a-z]+$/,x=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,w=/^[0-9a-vA-V]{20}$/,k=/^[A-Za-z0-9]{27}$/,j=/^[a-zA-Z0-9_-]{21}$/,S=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,O=/^([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})$/,C=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)$/,N=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,P=/^(?:(?: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])$/,E=/^(([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}|:))$/,_=/^((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])$/,z=/^(([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])$/,T=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,A=/^[A-Za-z0-9_-]*$/,R=/^https?$/,I=/^\+[1-9]\d{6,14}$/,L="(?:(?:\\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])))",M=RegExp(`^${L}$`);function D(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 F=/^-?\d+(?:\.\d+)?$/,$=/^(?:true|false)$/i,U=/^[^A-Z]*$/,H=/^[^a-z]*$/;function B(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 K(e,t){return"bigint"==typeof t?t.toString():t}function V(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function q(e){let t=+!!e.startsWith("^"),n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}let W=Symbol("evaluating");function Z(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==W)return void 0===r&&(r=W,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function G(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function J(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function Q(e){return JSON.stringify(e)}let Y="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function X(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let ee=V(()=>{if(g.jitless||"u">typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch(e){return!1}});function et(e){if(!1===X(e))return!1;let t=e.constructor;if(void 0===t||"function"!=typeof t)return!0;let n=t.prototype;return!1!==X(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function en(e){return et(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}let er=new Set(["string","number","symbol"]);function ea(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function eo(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function ei(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 el(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 es(e,t){return t.map(t=>(t.path??(t.path=[]),t.path.unshift(e),t))}function eu(e){return"string"==typeof e?e:e?.message}function ec(e,t,n){let r=e.message?e.message:eu(e.inst?._zod.def?.error?.(e))??eu(t?.error?.(e))??eu(n.customError?.(e))??eu(n.localeError?.(e))??"Invalid input",{inst:a,continue:o,input:i,...l}=e;return l.path??(l.path=[]),l.message=r,t?.reportInput&&(l.input=i),l}function ed(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function ef(...e){let[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}let ep=p("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),eh=p("$ZodCheckMaxLength",(e,t)=>{var n;ep.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let a=ed(r);n.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),em=p("$ZodCheckMinLength",(e,t)=>{var n;ep.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let a=ed(r);n.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),eg=p("$ZodCheckLengthEquals",(e,t)=>{var n;ep.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,a=r.length;if(a===t.length)return;let o=ed(r),i=a>t.length;n.issues.push({origin:o,...i?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),ey=p("$ZodCheckStringFormat",(e,t)=>{var n,r;ep.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),ev=p("$ZodCheckRegex",(e,t)=>{ey.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})}}),eb=p("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=U),ey.init(e,t)}),ex=p("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=H),ey.init(e,t)}),ew=p("$ZodCheckIncludes",(e,t)=>{ep.init(e,t);let n=ea(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})}}),ek=p("$ZodCheckStartsWith",(e,t)=>{ep.init(e,t);let n=RegExp(`^${ea(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),ej=p("$ZodCheckEndsWith",(e,t)=>{ep.init(e,t);let n=RegExp(`.*${ea(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})}}),eS=p("$ZodCheckOverwrite",(e,t)=>{ep.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class eO{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 eC=(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,K,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},eN=p("$ZodError",eC),eP=p("$ZodError",eC,{Parent:Error}),eE=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 h;if(i.issues.length){let t=new(a?.Err??e)(i.issues.map(e=>ec(e,o,y())));throw Y(t,a?.callee),t}return i.value},e_=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=>ec(e,o,y())));throw Y(t,a?.callee),t}return i.value},ez=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 h;return o.issues.length?{success:!1,error:new(e??eN)(o.issues.map(e=>ec(e,a,y())))}:{success:!0,data:o.value}},eT=ez(eP),eA=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=>ec(e,a,y())))}:{success:!0,data:o.value}},eR=eA(eP),eI={major:4,minor:4,patch:3},eL=p("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=eI;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=el(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 h;if(r||i instanceof Promise)r=(r??Promise.resolve()).then(async()=>{await i,e.issues.length!==t&&(a||(a=el(e,t)))});else{if(e.issues.length===t)continue;a||(a=el(e,t))}}return r?r.then(()=>e):e},n=(n,a,o)=>{if(el(n))return n.aborted=!0,n;let i=t(a,r,o);if(i instanceof Promise){if(!1===o.async)throw new h;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 h;return i.then(e=>t(e,r,o))}return t(i,r,o)}}Z(e,"~standard",()=>({validate:t=>{try{let n=eT(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return eR(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}))}),eM=p("$ZodString",(e,t)=>{var n;let r;eL.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}}),eD=p("$ZodStringFormat",(e,t)=>{ey.init(e,t),eM.init(e,t)}),eF=p("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=O),eD.init(e,t)}),e$=p("$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=C(e))}else t.pattern??(t.pattern=C());eD.init(e,t)}),eU=p("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=N),eD.init(e,t)}),eH=p("$ZodURL",(e,t)=>{eD.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===R.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})}}}),eB=p("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),eD.init(e,t)}),eK=p("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=j),eD.init(e,t)}),eV=p("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=v),eD.init(e,t)}),eq=p("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=b),eD.init(e,t)}),eW=p("$ZodULID",(e,t)=>{t.pattern??(t.pattern=x),eD.init(e,t)}),eZ=p("$ZodXID",(e,t)=>{t.pattern??(t.pattern=w),eD.init(e,t)}),eG=p("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=k),eD.init(e,t)}),eJ=p("$ZodISODateTime",(e,t)=>{let n,r,a;t.pattern??(n=D({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(`^${L}T(?:${a})$`)),eD.init(e,t)}),eQ=p("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=M),eD.init(e,t)}),eY=p("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=RegExp(`^${D(t)}$`)),eD.init(e,t)}),eX=p("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=S),eD.init(e,t)}),e0=p("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=P),eD.init(e,t),e._zod.bag.format="ipv4"}),e1=p("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=E),eD.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})}}}),e2=p("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=_),eD.init(e,t)}),e4=p("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=z),eD.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 e3(e){if(""===e)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}let e5=p("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=T),eD.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{e3(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}}),e6=p("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=A),eD.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{!function(e){if(!A.test(e))return!1;let t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return e3(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})}}),e8=p("$ZodE164",(e,t)=>{t.pattern??(t.pattern=I),eD.init(e,t)}),e9=p("$ZodJWT",(e,t)=>{eD.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})}}),e7=p("$ZodBoolean",(e,t)=>{eL.init(e,t),e._zod.pattern=$,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}}),te=p("$ZodUnknown",(e,t)=>{eL.init(e,t),e._zod.parse=e=>e}),tt=p("$ZodNever",(e,t)=>{eL.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(...es(n,e.issues)),t.value[n]=e.value}let tr=p("$ZodArray",(e,t)=>{eL.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 ta(e,t,n,r,a,o){let i=n in r;if(e.issues.length){if(a&&o&&!i)return;t.issues.push(...es(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 to(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 ti(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=>ta(e,n,a,t,c,d))):ta(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 tl=p("$ZodObject",(e,t)=>{let n;eL.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=V(()=>to(t));Z(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(!X(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=>ta(n,t,e,i,a,o))):ta(u,t,e,i,a,o)}return o?ti(l,i,t,r,a.value,e):l.length?Promise.all(l).then(()=>t):t}}),ts=p("$ZodObjectJIT",(e,t)=>{let n,r;tl.init(e,t);let a=e._zod.parse,o=V(()=>to(t)),i=!g.jitless,l=i&&ee.value,s=t.catchall;e._zod.parse=(u,c)=>{r??(r=o.value);let d=u.value;return X(d)?i&&l&&c?.async===!1&&!0!==c.jitless?(n||(n=(e=>{let t=new eO(["shape","payload","ctx"]),n=o.value,r=e=>{let t=Q(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=Q(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)?ti([],d,u,c,r,e):u:a(u,c):(u.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),u)}});function tu(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=>!el(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=>ec(e,r,y())))}),t)}let tc=p("$ZodUnion",(e,t)=>{eL.init(e,t),Z(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),Z(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),Z(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),Z(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=>q(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=>tu(t,r,e,a)):tu(i,r,e,a)}}),td=p("$ZodIntersection",(e,t)=>{eL.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,a=t.left._zod.run({value:r,issues:[]},n),o=t.right._zod.run({value:r,issues:[]},n);return a instanceof Promise||o instanceof Promise?Promise.all([a,o]).then(([t,n])=>tf(e,t,n)):tf(e,a,o)}});function tf(e,t,n){let r,a=new Map;for(let n of t.issues)if("unrecognized_keys"===n.code)for(let e of(r??(r=n),n.keys))a.has(e)||a.set(e,{}),a.get(e).l=!0;else e.issues.push(n);for(let t of n.issues)if("unrecognized_keys"===t.code)for(let e of t.keys)a.has(e)||a.set(e,{}),a.get(e).r=!0;else e.issues.push(t);let o=[...a].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(o.length&&r&&e.issues.push({...r,keys:o}),el(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(et(t)&&et(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 tp=p("$ZodRecord",(e,t)=>{eL.init(e,t),e._zod.parse=(n,r)=>{let a=n.value;if(!et(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=>ec(e,r,y())),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(...es(l,e.issues)),n.value[u]=e.value})):(c.issues.length&&n.issues.push(...es(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&&F.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=>ec(e,r,y())),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(...es(i,e.issues)),n.value[l.value]=e.value})):(s.issues.length&&n.issues.push(...es(i,s.issues)),n.value[l.value]=s.value)}return o.length?Promise.all(o).then(()=>n):n}}),th=p("$ZodEnum",(e,t)=>{eL.init(e,t);let n=B(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>er.has(typeof e)).map(e=>"string"==typeof e?ea(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}}),tm=p("$ZodLiteral",(e,t)=>{if(eL.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?ea(e):e?ea(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}}),tg=p("$ZodTransform",(e,t)=>{eL.init(e,t),e._zod.optin="optional",e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new m(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 h;return n.value=a,n.fallback=!0,n}});function ty(e,t){return void 0===t&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}let tv=p("$ZodOptional",(e,t)=>{eL.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Z(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Z(e._zod,"pattern",()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${q(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=>ty(e,r)):ty(a,r)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),tb=p("$ZodExactOptional",(e,t)=>{tv.init(e,t),Z(e._zod,"values",()=>t.innerType._zod.values),Z(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),tx=p("$ZodNullable",(e,t)=>{eL.init(e,t),Z(e._zod,"optin",()=>t.innerType._zod.optin),Z(e._zod,"optout",()=>t.innerType._zod.optout),Z(e._zod,"pattern",()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${q(e.source)}|null)$`):void 0}),Z(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=p("$ZodDefault",(e,t)=>{eL.init(e,t),e._zod.optin="optional",Z(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=>tk(e,t)):tk(r,t)}});function tk(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}let tj=p("$ZodPrefault",(e,t)=>{eL.init(e,t),e._zod.optin="optional",Z(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))}),tS=p("$ZodNonOptional",(e,t)=>{eL.init(e,t),Z(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=>tO(t,e)):tO(a,e)}});function tO(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 tC=p("$ZodCatch",(e,t)=>{eL.init(e,t),e._zod.optin="optional",Z(e._zod,"optout",()=>t.innerType._zod.optout),Z(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=>ec(e,n,y()))},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=>ec(e,n,y()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),tN=p("$ZodPipe",(e,t)=>{eL.init(e,t),Z(e._zod,"values",()=>t.in._zod.values),Z(e._zod,"optin",()=>t.in._zod.optin),Z(e._zod,"optout",()=>t.out._zod.optout),Z(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=>tP(e,t.in,n)):tP(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>tP(e,t.out,n)):tP(r,t.out,n)}});function tP(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 tE=p("$ZodReadonly",(e,t)=>{eL.init(e,t),Z(e._zod,"propValues",()=>t.innerType._zod.propValues),Z(e._zod,"values",()=>t.innerType._zod.values),Z(e._zod,"optin",()=>t.innerType?._zod?.optin),Z(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(t_):t_(r)}});function t_(e){return e.value=Object.freeze(e.value),e}let tz=p("$ZodCustom",(e,t)=>{ep.init(e,t),eL.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=>tT(t,n,r,e));tT(a,n,r,e)}});function tT(e,t,n,r){if(!e){let e={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(ef(e))}}Symbol("ZodOutput"),Symbol("ZodInput");(a=globalThis).__zod_globalRegistry??(a.__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 tA=globalThis.__zod_globalRegistry;function tR(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ei(t)})}function tI(e,t){return new eh({check:"max_length",...ei(t),maximum:e})}function tL(e,t){return new em({check:"min_length",...ei(t),minimum:e})}function tM(e,t){return new eg({check:"length_equals",...ei(t),length:e})}function tD(e){return new eS({check:"overwrite",tx:e})}function tF(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??tA,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 t$(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),t$(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 tU(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 tH(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:tB(t,"input",e.processors),output:tB(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(e){throw Error("Error converting schema to JSON.")}}let tB=(e,t,n={})=>r=>{let{libraryOptions:a,target:o}=r??{},i=tF({...a??{},target:o,io:t,processors:n});return t$(e,i),tU(i,e),tH(i,e)},tK={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},tV=(e,t,n,r)=>{let a=e._zod.def;t$(a.innerType,t,r),t.seen.get(e).ref=a.innerType},tq=p("ZodISODateTime",(e,t)=>{eJ.init(e,t),no.init(e,t)}),tW=p("ZodISODate",(e,t)=>{eQ.init(e,t),no.init(e,t)}),tZ=p("ZodISOTime",(e,t)=>{eY.init(e,t),no.init(e,t)}),tG=p("ZodISODuration",(e,t)=>{eX.init(e,t),no.init(e,t)}),tJ=p("ZodError",(e,t)=>{eN.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,K,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,K,2)}},isEmpty:{get:()=>0===e.issues.length}})},{Parent:Error}),tQ=eE(tJ),tY=e_(tJ),tX=ez(tJ),t0=eA(tJ),t1=(e,t,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return eE(tJ)(e,t,r)},t2=(e,t,n)=>eE(tJ)(e,t,n),t4=async(e,t,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return e_(tJ)(e,t,r)},t3=async(e,t,n)=>e_(tJ)(e,t,n),t5=(e,t,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return ez(tJ)(e,t,r)},t6=(e,t,n)=>ez(tJ)(e,t,n),t8=async(e,t,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return eA(tJ)(e,t,r)},t9=async(e,t,n)=>eA(tJ)(e,t,n),t7=new WeakMap;function ne(e,t,n){let r=Object.getPrototypeOf(e),a=t7.get(r);if(a||(a=new Set,t7.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 nt=p("ZodType",(e,t)=>(eL.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:tB(e,"input"),output:tB(e,"output")}}),e.toJSONSchema=((e,t={})=>n=>{let r=tF({...n,processors:t});return t$(e,r),tU(r,e),tH(r,e)})(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>tQ(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>tX(e,t,n),e.parseAsync=async(t,n)=>tY(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>t0(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>t1(e,t,n),e.decode=(t,n)=>t2(e,t,n),e.encodeAsync=async(t,n)=>t4(e,t,n),e.decodeAsync=async(t,n)=>t3(e,t,n),e.safeEncode=(t,n)=>t5(e,t,n),e.safeDecode=(t,n)=>t6(e,t,n),e.safeEncodeAsync=async(t,n)=>t8(e,t,n),e.safeDecodeAsync=async(t,n)=>t9(e,t,n),ne(e,"ZodType",{check(...e){let t=this.def;return this.clone(J(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 eo(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 n1({type:"custom",check:"custom",fn:e,...ei(t)})}(e,t))},superRefine(e,t){return this.check(function(e,t){var n;let r,a;return n=t=>(t.addIssue=e=>{"string"==typeof e?t.issues.push(ef(e,t.value,r._zod.def)):(e.fatal&&(e.continue=!1),e.code??(e.code="custom"),e.input??(e.input=t.value),e.inst??(e.inst=r),e.continue??(e.continue=!r._zod.def.abort),t.issues.push(ef(e)))},e(t.value,t)),(a=new ep({check:"custom",...ei(t)}))._zod.check=n,r=a}(e,t))},overwrite(e){return this.check(tD(e))},optional(){return nK(this)},exactOptional(){var e;return e=this,new nV({type:"optional",innerType:e})},nullable(){return nW(this)},nullish(){return nK(nW(this))},nonoptional(e){var t;return t=this,new nJ({type:"nonoptional",innerType:t,...ei(e)})},array(){return nz(this)},or(e){return new nR({type:"union",options:[this,e],...ei(void 0)})},and(e){var t;return t=this,new nI({type:"intersection",left:t,right:e})},transform(e){return nX(this,new nH({type:"transform",transform:e}))},default(e){var t,n;return t=this,n=e,new nZ({type:"default",innerType:t,get defaultValue(){return"function"==typeof n?n():en(n)}})},prefault(e){var t,n;return t=this,n=e,new nG({type:"prefault",innerType:t,get defaultValue(){return"function"==typeof n?n():en(n)}})},catch(e){var t,n;return t=this,new nQ({type:"catch",innerType:t,catchValue:"function"==typeof(n=e)?n:()=>n})},pipe(e){return nX(this,e)},readonly(){var e;return e=this,new n0({type:"readonly",innerType:e})},describe(e){let t=this.clone();return tA.add(t,{description:e}),t},meta(...e){if(0===e.length)return tA.get(this);let t=this.clone();return tA.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:()=>tA.get(e)?.description,configurable:!0}),e)),nn=p("_ZodString",(e,t)=>{eM.init(e,t),nt.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=tK[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,ne(e,"_ZodString",{regex(...e){return this.check(function(e,t){return new ev({check:"string_format",format:"regex",...ei(t),pattern:e})}(...e))},includes(...e){return this.check(function(e,t){return new ew({check:"string_format",format:"includes",...ei(t),includes:e})}(...e))},startsWith(...e){return this.check(function(e,t){return new ek({check:"string_format",format:"starts_with",...ei(t),prefix:e})}(...e))},endsWith(...e){return this.check(function(e,t){return new ej({check:"string_format",format:"ends_with",...ei(t),suffix:e})}(...e))},min(...e){return this.check(tL(...e))},max(...e){return this.check(tI(...e))},length(...e){return this.check(tM(...e))},nonempty(...e){return this.check(tL(1,...e))},lowercase(e){return this.check(new eb({check:"string_format",format:"lowercase",...ei(e)}))},uppercase(e){return this.check(new ex({check:"string_format",format:"uppercase",...ei(e)}))},trim(){return this.check(tD(e=>e.trim()))},normalize(...e){return this.check(function(e){return tD(t=>t.normalize(e))}(...e))},toLowerCase(){return this.check(tD(e=>e.toLowerCase()))},toUpperCase(){return this.check(tD(e=>e.toUpperCase()))},slugify(){return this.check(tD(e=>e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")))}})}),nr=p("ZodString",(e,t)=>{eM.init(e,t),nn.init(e,t),e.email=t=>e.check(new ni({type:"string",format:"email",check:"string_format",abort:!1,...ei(t)})),e.url=t=>e.check(new nu({type:"string",format:"url",check:"string_format",abort:!1,...ei(t)})),e.jwt=t=>e.check(new nS({type:"string",format:"jwt",check:"string_format",abort:!1,...ei(t)})),e.emoji=t=>e.check(new nc({type:"string",format:"emoji",check:"string_format",abort:!1,...ei(t)})),e.guid=t=>e.check(tR(nl,t)),e.uuid=t=>e.check(new ns({type:"string",format:"uuid",check:"string_format",abort:!1,...ei(t)})),e.uuidv4=t=>e.check(new ns({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ei(t)})),e.uuidv6=t=>e.check(new ns({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ei(t)})),e.uuidv7=t=>e.check(new ns({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ei(t)})),e.nanoid=t=>e.check(new nd({type:"string",format:"nanoid",check:"string_format",abort:!1,...ei(t)})),e.guid=t=>e.check(tR(nl,t)),e.cuid=t=>e.check(new nf({type:"string",format:"cuid",check:"string_format",abort:!1,...ei(t)})),e.cuid2=t=>e.check(new np({type:"string",format:"cuid2",check:"string_format",abort:!1,...ei(t)})),e.ulid=t=>e.check(new nh({type:"string",format:"ulid",check:"string_format",abort:!1,...ei(t)})),e.base64=t=>e.check(new nw({type:"string",format:"base64",check:"string_format",abort:!1,...ei(t)})),e.base64url=t=>e.check(new nk({type:"string",format:"base64url",check:"string_format",abort:!1,...ei(t)})),e.xid=t=>e.check(new nm({type:"string",format:"xid",check:"string_format",abort:!1,...ei(t)})),e.ksuid=t=>e.check(new ng({type:"string",format:"ksuid",check:"string_format",abort:!1,...ei(t)})),e.ipv4=t=>e.check(new ny({type:"string",format:"ipv4",check:"string_format",abort:!1,...ei(t)})),e.ipv6=t=>e.check(new nv({type:"string",format:"ipv6",check:"string_format",abort:!1,...ei(t)})),e.cidrv4=t=>e.check(new nb({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ei(t)})),e.cidrv6=t=>e.check(new nx({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ei(t)})),e.e164=t=>e.check(new nj({type:"string",format:"e164",check:"string_format",abort:!1,...ei(t)})),e.datetime=t=>e.check(new tq({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ei(t)})),e.date=t=>e.check(new tW({type:"string",format:"date",check:"string_format",...ei(t)})),e.time=t=>e.check(new tZ({type:"string",format:"time",check:"string_format",precision:null,...ei(t)})),e.duration=t=>e.check(new tG({type:"string",format:"duration",check:"string_format",...ei(t)}))});function na(e){return new nr({type:"string",...ei(e)})}let no=p("ZodStringFormat",(e,t)=>{eD.init(e,t),nn.init(e,t)}),ni=p("ZodEmail",(e,t)=>{eU.init(e,t),no.init(e,t)}),nl=p("ZodGUID",(e,t)=>{eF.init(e,t),no.init(e,t)}),ns=p("ZodUUID",(e,t)=>{e$.init(e,t),no.init(e,t)}),nu=p("ZodURL",(e,t)=>{eH.init(e,t),no.init(e,t)}),nc=p("ZodEmoji",(e,t)=>{eB.init(e,t),no.init(e,t)}),nd=p("ZodNanoID",(e,t)=>{eK.init(e,t),no.init(e,t)}),nf=p("ZodCUID",(e,t)=>{eV.init(e,t),no.init(e,t)}),np=p("ZodCUID2",(e,t)=>{eq.init(e,t),no.init(e,t)}),nh=p("ZodULID",(e,t)=>{eW.init(e,t),no.init(e,t)}),nm=p("ZodXID",(e,t)=>{eZ.init(e,t),no.init(e,t)}),ng=p("ZodKSUID",(e,t)=>{eG.init(e,t),no.init(e,t)}),ny=p("ZodIPv4",(e,t)=>{e0.init(e,t),no.init(e,t)}),nv=p("ZodIPv6",(e,t)=>{e1.init(e,t),no.init(e,t)}),nb=p("ZodCIDRv4",(e,t)=>{e2.init(e,t),no.init(e,t)}),nx=p("ZodCIDRv6",(e,t)=>{e4.init(e,t),no.init(e,t)}),nw=p("ZodBase64",(e,t)=>{e5.init(e,t),no.init(e,t)}),nk=p("ZodBase64URL",(e,t)=>{e6.init(e,t),no.init(e,t)}),nj=p("ZodE164",(e,t)=>{e8.init(e,t),no.init(e,t)}),nS=p("ZodJWT",(e,t)=>{e9.init(e,t),no.init(e,t)}),nO=p("ZodBoolean",(e,t)=>{e7.init(e,t),nt.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{t.type="boolean"}});function nC(e){return new nO({type:"boolean",...ei(e)})}let nN=p("ZodUnknown",(e,t)=>{te.init(e,t),nt.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function nP(){return new nN({type:"unknown"})}let nE=p("ZodNever",(e,t)=>{tt.init(e,t),nt.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{t.not={}}}),n_=p("ZodArray",(e,t)=>{tr.init(e,t),nt.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=t$(a.element,t,{...r,path:[...r.path,"items"]})})(e,t,n,r),e.element=t.element,ne(e,"ZodArray",{min(e,t){return this.check(tL(e,t))},nonempty(e){return this.check(tL(1,e))},max(e,t){return this.check(tI(e,t))},length(e,t){return this.check(tM(e,t))},unwrap(){return this.element}})});function nz(e,t){return new n_({type:"array",element:e,...ei(t)})}let nT=p("ZodObject",(e,t)=>{ts.init(e,t),nt.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]=t$(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=t$(a.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):"output"===t.io&&(n.additionalProperties=!1)})(e,t,n,r),Z(e,"shape",()=>t.shape),ne(e,"ZodObject",{keyof(){return nF(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:nP()})},loose(){return this.clone({...this._zod.def,catchall:nP()})},strict(){return this.clone({...this._zod.def,catchall:new nE({type:"never",...ei(void 0)})})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return function(e,t){if(!et(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=J(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return G(this,"shape",n),n}});return eo(e,r)}(this,e)},safeExtend(e){var t=this;if(!et(e))throw Error("Invalid input to safeExtend: expected a plain object");let n=J(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e};return G(this,"shape",n),n}});return eo(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=J(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e._zod.def.shape};return G(this,"shape",n),n},get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]});return eo(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=J(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 G(this,"shape",e),e},checks:[]});return eo(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=J(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 G(this,"shape",r),r},checks:[]});return eo(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=J(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 G(this,"shape",a),a},checks:[]});return eo(t,a)}(nB,this,e[0])},required(...e){var t,n;let r;return t=this,n=e[0],r=J(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 nJ({type:"nonoptional",innerType:e[t]}))}else for(let t in e)r[t]=new nJ({type:"nonoptional",innerType:e[t]});return G(this,"shape",r),r}}),eo(t,r)}})});function nA(e,t){return new nT({type:"object",shape:e??{},...ei(t)})}let nR=p("ZodUnion",(e,t)=>{tc.init(e,t),nt.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)=>t$(e,t,{...r,path:[...r.path,o?"oneOf":"anyOf",n]})),void(o?n.oneOf=i:n.anyOf=i)},e.options=t.options}),nI=p("ZodIntersection",(e,t)=>{td.init(e,t),nt.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let a,o,i,l;return o=t$((a=e._zod.def).left,t,{...r,path:[...r.path,"allOf",0]}),i=t$(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]])}}),nL=p("ZodRecord",(e,t)=>{tp.init(e,t),nt.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=t$(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=t$(a.keyType,t,{...r,path:[...r.path,"propertyNames"]})),n.additionalProperties=t$(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 nM(e,t,n){return new nL(t&&t._zod?{type:"record",keyType:e,valueType:t,...ei(n)}:{type:"record",keyType:na(),valueType:e,...ei(t)})}let nD=p("ZodEnum",(e,t)=>{th.init(e,t),nt.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let a;(a=B(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 nD({...t,checks:[],...ei(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 nD({...t,checks:[],...ei(r),entries:a})}});function nF(e,t){return new nD({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...ei(t)})}let n$=p("ZodLiteral",(e,t)=>{tm.init(e,t),nt.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 nU(e,t){return new n$({type:"literal",values:Array.isArray(e)?e:[e],...ei(t)})}let nH=p("ZodTransform",(e,t)=>{tg.init(e,t),nt.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 m(e.constructor.name);n.addIssue=r=>{"string"==typeof r?n.issues.push(ef(r,n.value,t)):(r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=e),n.issues.push(ef(r)))};let a=t.transform(n.value,n);return a instanceof Promise?a.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=a,n.fallback=!0,n)}}),nB=p("ZodOptional",(e,t)=>{tv.init(e,t),nt.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tV(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function nK(e){return new nB({type:"optional",innerType:e})}let nV=p("ZodExactOptional",(e,t)=>{tb.init(e,t),nt.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tV(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),nq=p("ZodNullable",(e,t)=>{tx.init(e,t),nt.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let a,o,i;return o=t$((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 nW(e){return new nq({type:"nullable",innerType:e})}let nZ=p("ZodDefault",(e,t)=>{tw.init(e,t),nt.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let a;t$((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}),nG=p("ZodPrefault",(e,t)=>{tj.init(e,t),nt.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let a;t$((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}),nJ=p("ZodNonOptional",(e,t)=>{tS.init(e,t),nt.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let a;t$((a=e._zod.def).innerType,t,r),t.seen.get(e).ref=a.innerType},e.unwrap=()=>e._zod.def.innerType}),nQ=p("ZodCatch",(e,t)=>{tC.init(e,t),nt.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let a,o=e._zod.def;t$(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}),nY=p("ZodPipe",(e,t)=>{tN.init(e,t),nt.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(t$(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 nX(e,t){return new nY({type:"pipe",in:e,out:t})}let n0=p("ZodReadonly",(e,t)=>{tE.init(e,t),nt.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let a;t$((a=e._zod.def).innerType,t,r),t.seen.get(e).ref=a.innerType,n.readOnly=!0},e.unwrap=()=>e._zod.def.innerType}),n1=p("ZodCustom",(e,t)=>{tz.init(e,t),nt.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 n2=na().trim().min(1,"名称不能为空").max(120,"名称不能超过 ".concat(120," 个字符")).refine(function(e){return!e.includes("/")&&!e.includes("\\")},"名称不能包含斜杠"),n4=function(e){return na().max(e)},n3=na().min(1).max(120),n5=nF(o),n6=nM(n3,n4(4096)),n8=nM(n3,n4(1048576)),n9=nF(["skip","overwrite"]);nA({password:na().trim().min(1,"password 不能为空").max(4096)}),nA({name:n2,baseUrl:n4(2048).optional(),apiKey:n4(4096).optional(),model:n4(120).optional(),notes:n4(4096).optional(),extras:n6.optional(),overrides:n8.optional(),providerId:n4(120).optional(),providerEndpoint:n4(120).optional()}).partial();var n7=nz(nA({key:na().trim().min(1,"endpoint key 不能为空").max(60,"endpoint key 过长").refine(function(e){return!e.includes("/")&&!e.includes("\\")},"endpoint key 不能包含斜杠"),label:n4(120).optional(),baseUrl:na().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 不能重复");nA({name:n2,apiKey:na().min(1,"apiKey 不能为空").max(4096),endpoints:n7.optional(),notes:n4(4096).optional()}),nA({name:n2.optional(),apiKey:n4(4096).optional(),endpoints:n7.optional(),notes:n4(4096).optional()}),nA({sourceUser:na().trim().min(1,"来源用户不能为空").max(120),conflictPolicy:n9.optional(),overwriteHarnesses:nz(n5).optional(),migrateCodexLoginCache:nC().optional()});var re=nA({format:nU("harness-switch-encrypted-export"),version:nU(1),kdf:nA({name:nU("scrypt"),salt:na().min(1)}),cipher:nA({name:nU("aes-256-gcm"),iv:na().min(1),tag:na().min(1),data:na().min(1)})});nA({passphrase:n4(4096),includeCodexLoginCache:nC().optional()}),nA({envelope:re,passphrase:n4(4096),conflictPolicy:n9.optional(),restoreActive:nC().optional(),migrateCodexLoginCache:nC().optional()});var rt=nA({id:na().min(1).max(240),name:n2,target:nF(["profile","vault"]),apiKey:n4(4096).optional(),providerId:n4(120).optional(),providerName:n2.optional(),overwrite:nC().optional()});nA({selections:nz(rt).min(1,"请至少选择一条配置").max(200)}),nA({baseUrl:na().trim().min(1,"baseUrl 不能为空").max(2048),apiKey:n4(4096).optional(),providerId:n4(120).optional()}),nA({endpoint:n4(120).optional()}),nA({clientId:n4(100).optional()}),nA({deviceCode:na().min(1).max(200),clientId:n4(100).optional()}),nA({token:na().trim().min(1,"Token 不能为空").max(500)}),nA({passphrase:n4(4096),includeCodexLoginCache:nC().optional()}),nA({passphrase:n4(4096),conflictPolicy:n9.optional(),restoreActive:nC().optional()}),nA({passphrase:n4(4096),conflictPolicy:n9.optional(),restoreActive:nC().optional(),migrateCodexLoginCache:nC().optional()})}},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+"."+({38:"4f37f008",403:"83e8a5aa",703:"74dabcc4",780:"6c88bbeb",886:"215586f6",911:"fae0dbda",952:"906cea7c",997:"79084a9d"})[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={889:0},o="data-rspack-loading",(a=(e,t)=>{r[t]=0})(d.m,0,"889"),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(889==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={889: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=d(1085),m=d(4041),g=d.t(m,2),y=d(5873),v=d(1434);let b=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)},x=(...e)=>e.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim();var w={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 k=(0,m.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:o,iconNode:i,...l},s)=>(0,m.createElement)("svg",{ref:s,...w,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:x("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,m.createElement)(e,t)),...Array.isArray(o)?o:[o]])),j=(e,t)=>{let n=(0,m.forwardRef)(({className:n,...r},a)=>(0,m.createElement)(k,{ref:a,iconNode:t,className:x(`lucide-${b(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...r}));return n.displayName=b(e),n},S=j("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=j("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"}]]),C=j("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),N=j("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),P=j("user-round",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]),E=j("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),_=j("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"}]]),z=j("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 T=d(5186);let A=j("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);function R(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=function e(t){var n,r,a="";if("string"==typeof t||"number"==typeof t)a+=t;else if("object"==typeof t)if(Array.isArray(t)){var o=t.length;for(n=0;n<o;n++)t[n]&&(r=e(t[n]))&&(a&&(a+=" "),a+=r)}else for(r in t)t[r]&&(a&&(a+=" "),a+=r);return a}(e))&&(r&&(r+=" "),r+=t);return r}let I=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,L=(e,t)=>n=>{var r;if((null==t?void 0:t.variants)==null)return R(e,null==n?void 0:n.class,null==n?void 0:n.className);let{variants:a,defaultVariants:o}=t,i=Object.keys(a).map(e=>{let t=null==n?void 0:n[e],r=null==o?void 0:o[e];if(null===t)return null;let i=I(t)||I(r);return a[e][i]}),l=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{});return R(e,i,null==t||null==(r=t.compoundVariants)?void 0:r.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...o,...l}[t]):({...o,...l})[t]===n})?[...e,n,r]:e},[]),null==n?void 0:n.class,null==n?void 0:n.className)},M=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),D=[],F=(e,t,n)=>{if(0==e.length-t)return n.classGroupId;let r=e[t],a=n.nextPart.get(r);if(a){let n=F(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}},$=(e,t)=>{let n=M();for(let r in e)U(e[r],n,r,t);return n},U=(e,t,n,r)=>{let a=e.length;for(let o=0;o<a;o++)H(e[o],t,n,r)},H=(e,t,n,r)=>{"string"==typeof e?B(e,t,n):"function"==typeof e?K(e,t,n,r):V(e,t,n,r)},B=(e,t,n)=>{(""===e?t:q(t,e)).classGroupId=n},K=(e,t,n,r)=>{W(e)?U(e(r),t,n,r):(null===t.validators&&(t.validators=[]),t.validators.push({classGroupId:n,validator:e}))},V=(e,t,n,r)=>{let a=Object.entries(e),o=a.length;for(let e=0;e<o;e++){let[o,i]=a[e];U(i,q(t,o),n,r)}},q=(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=M(),n.nextPart.set(t,a)),n=a}return n},W=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,Z=[],G=(e,t,n,r,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:a}),J=/\s+/,Q=e=>{let t;if("string"==typeof e)return e;let n="";for(let r=0;r<e.length;r++)e[r]&&(t=Q(e[r]))&&(n&&(n+=" "),n+=t);return n},Y=[],X=e=>{let t=t=>t[e]||Y;return t.isThemeGetter=!0,t},ee=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,et=/^\((?:(\w[\w-]*):)?(.+)\)$/i,en=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,er=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ea=/\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$/,eo=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ei=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,el=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,es=e=>en.test(e),eu=e=>!!e&&!Number.isNaN(Number(e)),ec=e=>!!e&&Number.isInteger(Number(e)),ed=e=>e.endsWith("%")&&eu(e.slice(0,-1)),ef=e=>er.test(e),ep=()=>!0,eh=e=>ea.test(e)&&!eo.test(e),em=()=>!1,eg=e=>ei.test(e),ey=e=>el.test(e),ev=e=>!ew(e)&&!eE(e),eb=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)),ex=e=>eM(e,eU,em),ew=e=>ee.test(e),ek=e=>eM(e,eH,eh),ej=e=>eM(e,eB,eu),eS=e=>eM(e,eV,ep),eO=e=>eM(e,eK,em),eC=e=>eM(e,eF,em),eN=e=>eM(e,e$,ey),eP=e=>eM(e,eq,eg),eE=e=>et.test(e),e_=e=>eD(e,eH),ez=e=>eD(e,eK),eT=e=>eD(e,eF),eA=e=>eD(e,eU),eR=e=>eD(e,e$),eI=e=>eD(e,eq,!0),eL=e=>eD(e,eV,!0),eM=(e,t,n)=>{let r=ee.exec(e);return!!r&&(r[1]?t(r[1]):n(r[2]))},eD=(e,t,n=!1)=>{let r=et.exec(e);return!!r&&(r[1]?t(r[1]):n)},eF=e=>"position"===e||"percentage"===e,e$=e=>"image"===e||"url"===e,eU=e=>"length"===e||"size"===e||"bg-size"===e,eH=e=>"length"===e,eB=e=>"number"===e,eK=e=>"family-name"===e,eV=e=>"number"===e||"weight"===e,eq=e=>"shadow"===e,eW=((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(J),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),G(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)):G(Z,!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 $(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 F(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||D}return n[e]||D}}})(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=Q(t))&&(a&&(a+=" "),a+=n);return a})(...e))})(()=>{let e=X("color"),t=X("font"),n=X("text"),r=X("font-weight"),a=X("tracking"),o=X("leading"),i=X("breakpoint"),l=X("container"),s=X("spacing"),u=X("radius"),c=X("shadow"),d=X("inset-shadow"),f=X("text-shadow"),p=X("drop-shadow"),h=X("blur"),m=X("perspective"),g=X("aspect"),y=X("ease"),v=X("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(),eE,ew],k=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto","contain","none"],S=()=>[eE,ew,s],O=()=>[es,"full","auto",...S()],C=()=>[ec,"none","subgrid",eE,ew],N=()=>["auto",{span:["full",ec,eE,ew]},ec,eE,ew],P=()=>[ec,"auto",eE,ew],E=()=>["auto","min","max","fr",eE,ew],_=()=>["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=()=>[es,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],R=()=>[es,"screen","full","dvw","lvw","svw","min","max","fit",...S()],I=()=>[es,"screen","full","lh","dvh","lvh","svh","min","max","fit",...S()],L=()=>[e,eE,ew],M=()=>[...x(),eT,eC,{position:[eE,ew]}],D=()=>["no-repeat",{repeat:["","x","y","space","round"]}],F=()=>["auto","cover","contain",eA,ex,{size:[eE,ew]}],$=()=>[ed,e_,ek],U=()=>["","none","full",u,eE,ew],H=()=>["",eu,e_,ek],B=()=>["solid","dashed","dotted","double"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],V=()=>[eu,ed,eT,eC],q=()=>["","none",h,eE,ew],W=()=>["none",eu,eE,ew],Z=()=>["none",eu,eE,ew],G=()=>[eu,eE,ew],J=()=>[es,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ef],breakpoint:[ef],color:[ep],container:[ef],"drop-shadow":[ef],ease:["in","out","in-out"],font:[ev],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ef],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ef],shadow:[ef],spacing:["px",eu],text:[ef],"text-shadow":[ef],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",es,ew,eE,g]}],container:["container"],"container-type":[{"@container":["","normal","size",eE,ew]}],"container-named":[eb],columns:[{columns:[eu,ew,eE,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:[ec,"auto",eE,ew]}],basis:[{basis:[es,"full","auto",l,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[eu,es,"auto","initial","none",ew]}],grow:[{grow:["",eu,eE,ew]}],shrink:[{shrink:["",eu,eE,ew]}],order:[{order:[ec,"first","last","none",eE,ew]}],"grid-cols":[{"grid-cols":C()}],"col-start-end":[{col:N()}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":C()}],"row-start-end":[{row:N()}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":E()}],"auto-rows":[{"auto-rows":E()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[..._(),"normal"]}],"justify-items":[{"justify-items":[...z(),"normal"]}],"justify-self":[{"justify-self":["auto",...z()]}],"align-content":[{content:["normal",..._()]}],"align-items":[{items:[...z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...z(),{baseline:["","last"]}]}],"place-content":[{"place-content":_()}],"place-items":[{"place-items":[...z(),"baseline"]}],"place-self":[{"place-self":["auto",...z()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pbs:[{pbs:S()}],pbe:[{pbe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:T()}],mx:[{mx:T()}],my:[{my:T()}],ms:[{ms:T()}],me:[{me:T()}],mbs:[{mbs:T()}],mbe:[{mbe:T()}],mt:[{mt:T()}],mr:[{mr:T()}],mb:[{mb:T()}],ml:[{ml:T()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:A()}],"inline-size":[{inline:["auto",...R()]}],"min-inline-size":[{"min-inline":["auto",...R()]}],"max-inline-size":[{"max-inline":["none",...R()]}],"block-size":[{block:["auto",...I()]}],"min-block-size":[{"min-block":["auto",...I()]}],"max-block-size":[{"max-block":["none",...I()]}],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,e_,ek]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,eL,eS]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ed,ew]}],"font-family":[{font:[ez,eO,t]}],"font-features":[{"font-features":[ew]}],"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,eE,ew]}],"line-clamp":[{"line-clamp":[eu,"none",eE,ej]}],leading:[{leading:[o,...S()]}],"list-image":[{"list-image":["none",eE,ew]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",eE,ew]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:[eu,"from-font","auto",eE,ek]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[eu,"auto",eE,ew]}],"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:[ec,eE,ew]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",eE,ew]}],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",eE,ew]}],"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"]},ec,eE,ew],radial:["",eE,ew],conic:[ec,eE,ew]},eR,eN]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:$()}],"gradient-via-pos":[{via:$()}],"gradient-to-pos":[{to:$()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],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:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-bs":[{"border-bs":L()}],"border-color-be":[{"border-be":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...B(),"none","hidden"]}],"outline-offset":[{"outline-offset":[eu,eE,ew]}],"outline-w":[{outline:["",eu,e_,ek]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",c,eI,eP]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",d,eI,eP]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[eu,ek]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",f,eI,eP]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[eu,eE,ew]}],"mix-blend":[{"mix-blend":[...K(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":K()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[eu]}],"mask-image-linear-from-pos":[{"mask-linear-from":V()}],"mask-image-linear-to-pos":[{"mask-linear-to":V()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":V()}],"mask-image-t-to-pos":[{"mask-t-to":V()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":V()}],"mask-image-r-to-pos":[{"mask-r-to":V()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":V()}],"mask-image-b-to-pos":[{"mask-b-to":V()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":V()}],"mask-image-l-to-pos":[{"mask-l-to":V()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":V()}],"mask-image-x-to-pos":[{"mask-x-to":V()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":V()}],"mask-image-y-to-pos":[{"mask-y-to":V()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[eE,ew]}],"mask-image-radial-from-pos":[{"mask-radial-from":V()}],"mask-image-radial-to-pos":[{"mask-radial-to":V()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"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":[eu]}],"mask-image-conic-from-pos":[{"mask-conic-from":V()}],"mask-image-conic-to-pos":[{"mask-conic-to":V()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"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",eE,ew]}],filter:[{filter:["","none",eE,ew]}],blur:[{blur:q()}],brightness:[{brightness:[eu,eE,ew]}],contrast:[{contrast:[eu,eE,ew]}],"drop-shadow":[{"drop-shadow":["","none",p,eI,eP]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",eu,eE,ew]}],"hue-rotate":[{"hue-rotate":[eu,eE,ew]}],invert:[{invert:["",eu,eE,ew]}],saturate:[{saturate:[eu,eE,ew]}],sepia:[{sepia:["",eu,eE,ew]}],"backdrop-filter":[{"backdrop-filter":["","none",eE,ew]}],"backdrop-blur":[{"backdrop-blur":q()}],"backdrop-brightness":[{"backdrop-brightness":[eu,eE,ew]}],"backdrop-contrast":[{"backdrop-contrast":[eu,eE,ew]}],"backdrop-grayscale":[{"backdrop-grayscale":["",eu,eE,ew]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[eu,eE,ew]}],"backdrop-invert":[{"backdrop-invert":["",eu,eE,ew]}],"backdrop-opacity":[{"backdrop-opacity":[eu,eE,ew]}],"backdrop-saturate":[{"backdrop-saturate":[eu,eE,ew]}],"backdrop-sepia":[{"backdrop-sepia":["",eu,eE,ew]}],"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",eE,ew]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[eu,"initial",eE,ew]}],ease:[{ease:["linear","initial",y,eE,ew]}],delay:[{delay:[eu,eE,ew]}],animate:[{animate:["none",v,eE,ew]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,eE,ew]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:W()}],"rotate-x":[{"rotate-x":W()}],"rotate-y":[{"rotate-y":W()}],"rotate-z":[{"rotate-z":W()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:G()}],"skew-x":[{"skew-x":G()}],"skew-y":[{"skew-y":G()}],transform:[{transform:[eE,ew,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:J()}],"translate-x":[{"translate-x":J()}],"translate-y":[{"translate-y":J()}],"translate-z":[{"translate-z":J()}],"translate-none":["translate-none"],zoom:[{zoom:[ec,eE,ew]}],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"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",eE,ew]}],"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":L()}],"scrollbar-track-color":[{"scrollbar-track":L()}],"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",eE,ew]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[eu,e_,ek,ej]}],stroke:[{stroke:["none",...L()]}],"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 eZ(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return eW(R(t))}var eG=L("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 eJ(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,h.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:eZ(eG({variant:n}),t)},r))}function eQ(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 eY(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 eX(e){return(eX=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function e0(e,t){return(e0=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function e1(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(e1=function(){return!!e})()}var e2=(0,m.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("780"),d.e("38")]).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){eQ(o,r,a,i,l,"next",e)}function l(e){eQ(o,r,a,i,l,"throw",e)}i(void 0)})})()});function e4(e){return null===e.content&&null===e.currentContent?"same":null===e.content?"delete":null===e.currentContent?"create":e.content===e.currentContent?"same":"replace"}function e3(e){var t=e.files;return(0,h.jsx)("div",{className:"space-y-3",children:t.map(function(e){return(0,h.jsx)(e5,{file:e},e.path)})})}function e5(e){var t=e.file,n=(0,v.Bd)().t,r=e4(t);return(0,h.jsxs)("div",{className:"overflow-hidden rounded-xl border",children:[(0,h.jsxs)("div",{className:"flex items-center justify-between gap-2 border-b bg-muted/40 px-3 py-2",children:[(0,h.jsx)("p",{className:"min-w-0 truncate font-mono text-xs",title:t.path,children:t.path}),(0,h.jsx)(eJ,{variant:"secondary",children:n("diff.".concat(r))})]}),(0,h.jsx)(e8,{fallback:(0,h.jsx)(e6,{file:t}),children:(0,h.jsx)(m.Suspense,{fallback:(0,h.jsx)("p",{className:"px-3 py-4 text-sm text-muted-foreground",children:n("diff.rendering")}),children:(0,h.jsx)(e2,{file:t})})})]})}function e6(e){var t,n,r=e.file,a=(0,v.Bd)().t;return(0,h.jsxs)("div",{className:"grid gap-2 p-3 font-mono text-xs",children:[(0,h.jsx)("pre",{className:"whitespace-pre-wrap text-red-400/90",children:null!=(t=r.currentContent)?t:a("diff.absent")}),(0,h.jsx)("p",{className:"font-sans text-muted-foreground",children:a("diff.afterRestore")}),(0,h.jsx)("pre",{className:"whitespace-pre-wrap text-emerald-400/90",children:null!=(n=r.content)?n:a("diff.deletedAfterRestore")})]})}var e8=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=eX(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,e1()?Reflect.construct(t,n||[],eX(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&&e0(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}}],eY(r.prototype,t),n&&eY(r,n),r}(m.Component),e9=Object.defineProperty,e7=(e,t)=>e9(e,"name",{value:t,configurable:!0});function te(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function tt(...e){return t=>{let n=!1,r=e.map(e=>{let r=te(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():te(e[t],null)}}}}function tn(...e){return m.useCallback(tt(...e),e)}e7(te,"setRef"),e7(tt,"composeRefs"),e7(tn,"useComposedRefs");var tr=Object.defineProperty,ta=(e,t)=>tr(e,"name",{value:t,configurable:!0});function to(e){let t=m.forwardRef((t,n)=>{let{children:r,...a}=t,o=null,i=!1,l=[];tp(r)&&"function"==typeof ty&&(r=ty(r._payload)),m.Children.forEach(r,e=>{if(td(e)){i=!0;let t="child"in e.props?e.props.child:e.props.children;tp(t)&&"function"==typeof ty&&(t=ty(t._payload)),o=ts(e,t),l.push(o?.props?.children)}else l.push(e)}),o?o=m.cloneElement(o,void 0,l):!i&&1===m.Children.count(r)&&m.isValidElement(r)&&(o=r);let s=o?tc(o):void 0,u=tn(n,s);if(!o){if(r||0===r)throw Error(i?tg(e):tm(e));return r}let c=tu(a,o.props??{});return o.type!==m.Fragment&&(c.ref=n?u:s),m.cloneElement(o,c)});return t.displayName=`${e}.Slot`,t}ta(to,"createSlot");var ti=to("Slot"),tl=Symbol.for("radix.slottable");ta(function(e){let t=ta(e=>"child"in e?e.children(e.child):e.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=tl,t},"createSlottable");var ts=ta((e,t)=>{if("child"in e.props){let t=e.props.child;return m.isValidElement(t)?m.cloneElement(t,void 0,e.props.children(t.props.children)):null}return m.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function tu(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 tc(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 td(e){return m.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===tl}ta(tu,"mergeProps"),ta(tc,"getElementRef"),ta(td,"isSlottable");var tf=Symbol.for("react.lazy");function tp(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===tf&&"_payload"in e&&th(e._payload)}function th(e){return"object"==typeof e&&null!==e&&"then"in e}ta(tp,"isLazyComponent"),ta(th,"isPromiseLike");var tm=ta(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),tg=ta(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),ty=g[" use ".trim().toString()],tv=L("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 tb(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,h.jsx)(void 0!==a&&a?ti:"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:eZ(tv({variant:n,size:r,className:t}))},o))}var tx=Object.defineProperty,tw=(e,t)=>tx(e,"name",{value:t,configurable:!0}),tk=!!("u">typeof window&&window.document&&window.document.createElement);function tj(e,t,{checkForDefaultPrevented:n=!0}={}){return tw(function(r){if(e?.(r),!1===n||!r||!r.defaultPrevented)return t?.(r)},"handleEvent")}function tS(e){if(!tk)throw Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}function tO(e){return"IFRAME"===e.tagName}tw(tj,"composeEventHandlers"),tw(function(e){if(!tk)throw Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window},"getOwnerWindow"),tw(tS,"getOwnerDocument"),tw(function e(t,n=!1){let{activeElement:r}=tS(t);if(!r?.nodeName)return null;if(tO(r)&&r.contentDocument)return e(r.contentDocument.body,n);if(n){let e=r.getAttribute("aria-activedescendant");if(e){let t=tS(r).getElementById(e);if(t)return t}}return r},"getActiveElement"),tw(tO,"isFrame");var tC=Object.defineProperty,tN=(e,t)=>tC(e,"name",{value:t,configurable:!0});function tP(e,t=[]){let n=[];function r(t,r){let a=m.createContext(r);a.displayName=t+"Context";let o=n.length;n=[...n,r];let i=tN(t=>{let{scope:n,children:r,...i}=t,l=n?.[e]?.[o]||a,s=m.useMemo(()=>i,Object.values(i));return(0,h.jsx)(l.Provider,{value:s,children:r})},"Provider");function l(n,i,s={}){let{optional:u=!1}=s,c=i?.[e]?.[o]||a,d=m.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",tN(l,"useContext"),[i,l]}tN(r,"createContext");let a=tN(()=>{let t=n.map(e=>m.createContext(e));return tN(function(n){let r=n?.[e]||t;return m.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},"useScope")},"createScope");return a.scopeName=e,[r,tE(a,...t)]}function tE(...e){let t=e[0];if(1===e.length)return t;let n=tN(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return tN(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let a=n(e)[`__scope${r}`];return{...t,...a}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}tN(function(e,t){let n=m.createContext(t);n.displayName=e+"Context";let r=tN(e=>{let{children:t,...r}=e,a=m.useMemo(()=>r,Object.values(r));return(0,h.jsx)(n.Provider,{value:a,children:t})},"Provider");function a(r,o={}){let{optional:i=!1}=o,l=m.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",tN(a,"useContext"),[r,a]},"createContext"),tN(tP,"createContextScope"),tN(tE,"composeContextScopes");var t_=globalThis?.document?m.useLayoutEffect:()=>{},tz=Object.defineProperty,tT=g[" useId ".trim().toString()]||(()=>void 0),tA=0;function tR(e){let[t,n]=m.useState(tT());return t_(()=>{e||n(e=>e??String(tA++))},[e]),e||(t?`radix-${t}`:"")}tz(tR,"name",{value:"useId",configurable:!0});var tI=Object.defineProperty,tL=g[" useEffectEvent ".trim().toString()],tM=g[" useInsertionEffect ".trim().toString()];function tD(e){if("function"==typeof tL)return tL(e);let t=m.useRef(()=>{throw Error("Cannot call an event handler while rendering.")});return"function"==typeof tM?tM(()=>{t.current=e}):t_(()=>{t.current=e}),m.useMemo(()=>(...e)=>t.current?.(...e),[])}tI(tD,"name",{value:"useEffectEvent",configurable:!0});var tF=Object.defineProperty,t$=(e,t)=>tF(e,"name",{value:t,configurable:!0}),tU=g[" useInsertionEffect ".trim().toString()]||t_;function tH({prop:e,defaultProp:t,onChange:n=t$(()=>{},"onChange"),caller:r}){let[a,o,i]=tB({defaultProp:t,onChange:n}),l=void 0!==e,s=l?e:a;return[s,m.useCallback(t=>{if(l){let n=tK(t)?t(e):t;n!==e&&i.current?.(n)}else o(t)},[l,e,o,i])]}function tB({defaultProp:e,onChange:t}){let[n,r]=m.useState(e),a=m.useRef(n),o=m.useRef(t);return tU(()=>{o.current=t},[t]),m.useEffect(()=>{a.current!==n&&(o.current?.(n),a.current=n)},[n,a]),[n,r,o]}function tK(e){return"function"==typeof e}t$(tH,"useControllableState"),t$(tB,"useUncontrolledState"),t$(tK,"isFunction");var tV=Symbol("RADIX:SYNC_STATE");t$(function(e,t,n,r){let{prop:a,defaultProp:o,onChange:i,caller:l}=t,s=void 0!==a,u=tD(i),c=[{...n,state:o}];r&&c.push(r);let[d,f]=m.useReducer((t,n)=>{if(n.type===tV)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=m.useRef(p);m.useEffect(()=>{h.current!==p&&(h.current=p,s||u(p))},[p,h,s]);let g=m.useMemo(()=>void 0!==a?{...d,state:a}:d,[d,a]);return m.useEffect(()=>{s&&!Object.is(a,d.state)&&f({type:tV,state:a})},[a,d.state,s]),[g,f]},"useControllableStateReducer");var tq=d(3144),tW=Object.defineProperty,tZ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=to(`Primitive.${t}`),r=m.forwardRef((e,r)=>{let{asChild:a,...o}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,h.jsx)(a?n:t,{...o,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function tG(e,t){e&&tq.flushSync(()=>e.dispatchEvent(t))}function tJ(e){let t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>(...e)=>t.current?.(...e),[])}tW(tG,"name",{value:"dispatchDiscreteCustomEvent",configurable:!0}),(0,Object.defineProperty)(tJ,"name",{value:"useCallbackRef",configurable:!0});var tQ=Object.defineProperty,tY=(e,t)=>tQ(e,"name",{value:t,configurable:!0}),tX="dismissableLayer.update",t0=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),t1=m.forwardRef(tY(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:l,onDismiss:s,...u}=e,c=m.useContext(t0),[d,p]=m.useState(null),g=d?.ownerDocument??globalThis?.document,[,y]=m.useState({}),v=tn(t,p),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=m.useRef(!1),C=t3(e=>{o?.(e),l?.(e),e.defaultPrevented||s?.()},{ownerDocument:g,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:O,dismissableSurfaces:c.dismissableSurfaces,shouldHandlePointerDownOutside:m.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...c.branches].some(t=>t.contains(e));return S&&!t},[c.branches,S])}),N=t5(e=>{if(r&&O.current)return;let t=e.target;![...c.branches].some(e=>e.contains(t))&&(i?.(e),l?.(e),e.defaultPrevented||s?.())},g),P=!!d&&k===b.length-1,E=tJ(e=>{"Escape"===e.key&&(a?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))});return m.useEffect(()=>{if(P)return g.addEventListener("keydown",E,{capture:!0}),()=>g.removeEventListener("keydown",E,{capture:!0})},[g,P,E]),m.useEffect(()=>{if(d)return n&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(f=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),t6(),()=>{n&&(c.layersWithOutsidePointerEventsDisabled.delete(d),0===c.layersWithOutsidePointerEventsDisabled.size&&(g.body.style.pointerEvents=f))}},[d,g,n,c]),m.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),t6())},[d,c]),m.useEffect(()=>{let e=tY(()=>y({}),"handleUpdate");return document.addEventListener(tX,e),()=>document.removeEventListener(tX,e)},[]),(0,h.jsx)(tZ.div,{...u,ref:v,style:{pointerEvents:j?S?"auto":"none":void 0,...e.style},onFocusCapture:tj(e.onFocusCapture,N.onFocusCapture),onBlurCapture:tj(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:tj(e.onPointerDownCapture,C.onPointerDownCapture)})},"DismissableLayer"));function t2(){let e=m.useContext(t0),[t,n]=m.useState(null);return m.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}tY(t2,"useDismissableLayerSurface");var t4=tY(()=>!0,"IS_TRUE");function t3(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:a,dismissableSurfaces:o,shouldHandlePointerDownOutside:i=t4}=t,l=tJ(e),s=m.useRef(!1),u=m.useRef(!1),c=m.useRef(new Map),d=m.useRef(()=>{});return m.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)}tY(e,"resetOutsideInteraction"),tY(t,"isOutsideInteractionIntercepted"),tY(f,"handleInteractionCapture"),tY(p,"handleInteractionBubble");let h=tY(o=>{if(o.target&&!s.current){let f=function(){n.removeEventListener("click",d.current);let r=t();e(),r||t8("dismissableLayer.pointerDownOutside",l,p,{discrete:!0})};if(tY(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:tY(()=>s.current=!0,"onPointerDownCapture")}}function t5(e,t=globalThis?.document){let n=tJ(e),r=m.useRef(!1);return m.useEffect(()=>{let e=tY(e=>{e.target&&!r.current&&t8("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:tY(()=>r.current=!0,"onFocusCapture"),onBlurCapture:tY(()=>r.current=!1,"onBlurCapture")}}function t6(){let e=new CustomEvent(tX);document.dispatchEvent(e)}function t8(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?tG(a,o):a.dispatchEvent(o)}tY(t3,"usePointerDownOutside"),tY(t5,"useFocusOutside"),tY(t6,"dispatchUpdate"),tY(t8,"handleAndDispatchCustomEvent");var t9=Object.defineProperty,t7=(e,t)=>t9(e,"name",{value:t,configurable:!0}),ne="focusScope.autoFocusOnMount",nt="focusScope.autoFocusOnUnmount",nn={bubbles:!1,cancelable:!0},nr=m.forwardRef(t7(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...i}=e,[l,s]=m.useState(null),u=tJ(a),c=tJ(o),d=m.useRef(null),f=tn(t,s),p=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(r){let e=function(e){if(p.paused||!l)return;let t=e.target;l.contains(t)?d.current=t:nc(d.current,{select:!0})},t=function(e){if(p.paused||!l)return;let t=e.relatedTarget;null!==t&&(l.contains(t)||nc(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&nc(l)};t7(e,"handleFocusIn"),t7(t,"handleFocusOut"),t7(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]),m.useEffect(()=>{if(l){nd.add(p);let e=document.activeElement;if(!l.contains(e)){let t=new CustomEvent(ne,nn);l.addEventListener(ne,u),l.dispatchEvent(t),t.defaultPrevented||(na(nh(ni(l)),{select:!0}),document.activeElement===e&&nc(l))}return()=>{l.removeEventListener(ne,u),setTimeout(()=>{let t=new CustomEvent(nt,nn);l.addEventListener(nt,c),l.dispatchEvent(t),t.defaultPrevented||nc(e??document.body,{select:!0}),l.removeEventListener(nt,c),nd.remove(p)},0)}}},[l,u,c,p]);let g=m.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]=no(t);r&&o?e.shiftKey||a!==o?e.shiftKey&&a===r&&(e.preventDefault(),n&&nc(o,{select:!0})):(e.preventDefault(),n&&nc(r,{select:!0})):a===t&&e.preventDefault()}},[n,r,p.paused]);return(0,h.jsx)(tZ.div,{tabIndex:-1,...i,ref:f,onKeyDown:g})},"FocusScope"));function na(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(nc(r,{select:t}),document.activeElement!==n)return}function no(e){let t=ni(e);return[nl(t,e),nl(t.reverse(),e)]}function ni(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:t7(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 nl(e,t){let n="function"==typeof t.checkVisibility&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):ns(r,{upTo:t})))return r}function ns(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 nu(e){return e instanceof HTMLInputElement&&"select"in e}function nc(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&nu(e)&&t&&e.select()}}t7(na,"focusFirst"),t7(no,"getTabbableEdges"),t7(ni,"getTabbableCandidates"),t7(nl,"findVisible"),t7(ns,"isHidden"),t7(nu,"isSelectableInput"),t7(nc,"focus");var nd=nf();function nf(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),(e=np(e,t)).unshift(t)},remove(t){e=np(e,t),e[0]?.resume()}}}function np(e,t){let n=[...e],r=n.indexOf(t);return -1!==r&&n.splice(r,1),n}function nh(e){return e.filter(e=>"A"!==e.tagName)}t7(nf,"createFocusScopesStack"),t7(np,"arrayRemove"),t7(nh,"removeLinks");var nm=Object.defineProperty,ng=m.forwardRef(nm(function(e,t){let{container:n,...r}=e,[a,o]=m.useState(!1);t_(()=>o(!0),[]);let i=n||a&&globalThis?.document?.body;return i?tq.createPortal((0,h.jsx)(tZ.div,{...r,ref:t}),i):null},"name",{value:"Portal",configurable:!0})),ny=Object.defineProperty,nv=(e,t)=>ny(e,"name",{value:t,configurable:!0});function nb(e,t){return m.useReducer((e,n)=>t[e][n]??e,e)}nv(nb,"useStateMachine");var nx=nv(e=>{let{present:t,children:n}=e,r=nw(t),a="function"==typeof n?n({present:r.isPresent}):m.Children.only(n),o=nj(r.ref,nO(a));return"function"==typeof n||r.isPresent?m.cloneElement(a,{ref:o}):null},"Presence");function nw(e){let[t,n]=m.useState(),r=m.useRef(null),a=m.useRef(e),o=m.useRef("none"),i=m.useRef(void 0),[l,s]=nb(e?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{"mounted"===l?(o.current=i.current??nS(r.current),i.current=void 0):o.current="none"},[l]),t_(()=>{let t=r.current,n=a.current;if(n!==e){let r=o.current,l=nS(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]),t_(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,i=nv(o=>{let i=nS(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=nv(e=>{e.target===t&&(o.current=nS(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:m.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,i.current=nS(t)}else r.current=null;n(e)},[])}}function nk(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function nj(...e){let t=m.useRef(e);return t.current=e,m.useCallback(e=>{let n=t.current,r=!1,a=n.map(t=>{let n=nk(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():nk(n[e],null)}}},[])}function nS(e){return e?.animationName||"none"}function nO(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}nv(nw,"usePresence"),nv(nk,"setRef"),nv(nj,"useStableComposedRefs"),nv(nS,"getAnimationName"),nv(nO,"getElementRef");var nC=Object.defineProperty,nN=(e,t)=>nC(e,"name",{value:t,configurable:!0}),nP=0,nE=null;function n_(){m.useEffect(()=>{nE||(nE={start:nz(),end:nz()});let{start:e,end:t}=nE;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),nP++,()=>{1===nP&&(nE?.start.remove(),nE?.end.remove(),nE=null),nP=Math.max(0,nP-1)}},[])}function nz(){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}nN(function(e){return n_(),e.children},"FocusGuards"),nN(n_,"useFocusGuards"),nN(nz,"createFocusGuard");var nT=function(){return(nT=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 nA(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 nR="right-scroll-bar-position",nI="width-before-scroll-bar";function nL(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var nM="u">typeof window?m.useLayoutEffect:m.useEffect,nD=new WeakMap,nF=(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=nT({async:!0,ssr:!1},a),s),n$=function(){},nU=m.forwardRef(function(e,t){var n,r,a,o,i=m.useRef(null),l=m.useState({onScrollCapture:n$,onWheelCapture:n$,onTouchMoveCapture:n$}),s=l[0],u=l[1],c=e.forwardProps,d=e.children,f=e.className,p=e.removeScrollBar,h=e.enabled,g=e.shards,y=e.sideCar,v=e.noRelative,b=e.noIsolation,x=e.inert,w=e.allowPinchZoom,k=e.as,j=e.gapMode,S=nA(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 nL(t,e)})},(a=(0,m.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,nM(function(){var e=nD.get(o);if(e){var t=new Set(e),r=new Set(n),a=o.current;t.forEach(function(e){r.has(e)||nL(e,null)}),r.forEach(function(e){t.has(e)||nL(e,a)})}nD.set(o,n)},[n]),o),C=nT(nT({},S),s);return m.createElement(m.Fragment,null,h&&m.createElement(y,{sideCar:nF,removeScrollBar:p,shards:g,noRelative:v,noIsolation:b,inert:x,setCallbacks:u,allowPinchZoom:!!w,lockRef:i,gapMode:j}),c?m.cloneElement(m.Children.only(d),nT(nT({},C),{ref:O})):m.createElement(void 0===k?"div":k,nT({},C,{className:f,ref:O}),d))});nU.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},nU.classNames={fullWidth:nI,zeroRight:nR};var nH=function(e){var t=e.sideCar,n=nA(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 m.createElement(r,nT({},n))};nH.isSideCarExport=!0;var nB=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=p||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)}}},nK=function(){var e=nB();return function(t,n){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},nV=function(){var e=nK();return function(t){return e(t.styles,t.dynamic),null}},nq={left:0,top:0,right:0,gap:0},nW=function(e){return parseInt(e||"",10)||0},nZ=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[nW(n),nW(r),nW(a)]},nG=function(e){if(void 0===e&&(e="margin"),"u"<typeof window)return nq;var t=nZ(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])}},nJ=nV(),nQ="data-scroll-locked",nY=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(nQ,"] {\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(nR," {\n right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(nI," {\n margin-right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(nR," .").concat(nR," {\n right: 0 ").concat(r,";\n }\n \n .").concat(nI," .").concat(nI," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(nQ,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},nX=function(){var e=parseInt(document.body.getAttribute(nQ)||"0",10);return isFinite(e)?e:0},n0=function(){m.useEffect(function(){return document.body.setAttribute(nQ,(nX()+1).toString()),function(){var e=nX()-1;e<=0?document.body.removeAttribute(nQ):document.body.setAttribute(nQ,e.toString())}},[])},n1=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=void 0===r?"margin":r;n0();var o=m.useMemo(function(){return nG(a)},[a]);return m.createElement(nJ,{styles:nY(o,!t,a,n?"":"!important")})},n2=!1;if("u">typeof window)try{var n4=Object.defineProperty({},"passive",{get:function(){return n2=!0,!0}});window.addEventListener("test",n4,n4),window.removeEventListener("test",n4,n4)}catch(e){n2=!1}var n3=!!n2&&{passive:!1},n5=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])},n6=function(e,t){var n=t.ownerDocument,r=t;do{if("u">typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),n8(e,r)){var a=n9(e,r);if(a[1]>a[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},n8=function(e,t){return"v"===e?n5(t,"overflowY"):n5(t,"overflowX")},n9=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},n7=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=n9(e,s),m=h[0],g=h[1]-h[2]-i*m;(m||g)&&n8(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},re=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},rt=function(e){return[e.deltaX,e.deltaY]},rn=function(e){return e&&"current"in e?e.current:e},rr=0,ra=[];let ro=(u=function(e){var t=m.useRef([]),n=m.useRef([0,0]),r=m.useRef(),a=m.useState(rr++)[0],o=m.useState(nV)[0],i=m.useRef(e);m.useEffect(function(){i.current=e},[e]),m.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(rn),!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=m.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var a,o=re(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=n6(d,c);if(!h)return!0;if(h?a=d:(a="v"===d?"h":"v",h=n6(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 n7(m,t,e,"h"===m?s:u,!0)},[]),s=m.useCallback(function(e){if(ra.length&&ra[ra.length-1]===o){var n="deltaY"in e?rt(e):re(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(rn).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=m.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=m.useCallback(function(e){n.current=re(e),r.current=void 0},[]),d=m.useCallback(function(t){u(t.type,rt(t),t.target,l(t,e.lockRef.current))},[]),f=m.useCallback(function(t){u(t.type,re(t),t.target,l(t,e.lockRef.current))},[]);m.useEffect(function(){return ra.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",s,n3),document.addEventListener("touchmove",s,n3),document.addEventListener("touchstart",c,n3),function(){ra=ra.filter(function(e){return e!==o}),document.removeEventListener("wheel",s,n3),document.removeEventListener("touchmove",s,n3),document.removeEventListener("touchstart",c,n3)}},[]);var p=e.removeScrollBar,h=e.inert;return m.createElement(m.Fragment,null,h?m.createElement(o,{styles:"\n .block-interactivity-".concat(a," {pointer-events: none;}\n .allow-interactivity-").concat(a," {pointer-events: all;}\n")}):null,p?m.createElement(n1,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},nF.useMedium(u),nH);var ri=m.forwardRef(function(e,t){return m.createElement(nU,nT({},e,{ref:t,sideCar:ro}))});ri.classNames=nU.classNames;var rl=new WeakMap,rs=new WeakMap,ru={},rc=0,rd=function(e){return e&&(e.host||rd(e.parentNode))},rf=function(e,t,n,r){var a=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var n=rd(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});ru[n]||(ru[n]=new WeakMap);var o=ru[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=(rl.get(e)||0)+1,u=(o.get(e)||0)+1;rl.set(e,s),o.set(e,u),i.push(e),1===s&&a&&rs.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(),rc++,function(){i.forEach(function(e){var t=rl.get(e)-1,a=o.get(e)-1;rl.set(e,t),o.set(e,a),t||(rs.has(e)||e.removeAttribute(r),rs.delete(e)),a||e.removeAttribute(n)}),--rc||(rl=new WeakMap,rl=new WeakMap,rs=new WeakMap,ru={})}},rp=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"))),rf(r,a,n,"aria-hidden")):function(){return null}},rh=Object.defineProperty,rm=(e,t)=>rh(e,"name",{value:t,configurable:!0}),rg="Dialog",[ry,rv]=tP(rg),[rb,rx]=ry(rg),rw=rm(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:i=!0}=e,l=m.useRef(null),s=m.useRef(null),[u,c]=tH({prop:r,defaultProp:a??!1,onChange:o,caller:rg}),[d,f]=m.useState(0),[p,g]=m.useState(0);return(0,h.jsx)(rb,{scope:t,triggerRef:l,contentRef:s,contentId:tR(),titleId:tR(),descriptionId:tR(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:g,open:u,onOpenChange:c,onOpenToggle:m.useCallback(()=>c(e=>!e),[c]),modal:i,children:n})},"Dialog"),rk=m.forwardRef(rm(function(e,t){let{__scopeDialog:n,...r}=e,a=rx("DialogTrigger",n),o=tn(t,a.triggerRef);return(0,h.jsx)(tZ.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":rF(a.open),...r,ref:o,onClick:tj(e.onClick,a.onOpenToggle)})},"DialogTrigger")),rj="DialogPortal",[rS,rO]=ry(rj,{forceMount:void 0}),rC=rm(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:a}=e,o=rx(rj,t);return(0,h.jsx)(rS,{scope:t,forceMount:n,children:m.Children.map(r,e=>(0,h.jsx)(nx,{present:n||o.open,children:(0,h.jsx)(ng,{asChild:!0,container:a,children:e})}))})},"DialogPortal"),rN="DialogOverlay",rP=m.forwardRef(rm(function(e,t){let n=rO(rN,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=rx(rN,e.__scopeDialog);return o.modal?(0,h.jsx)(nx,{present:r||o.open,children:(0,h.jsx)(r_,{...a,ref:t})}):null},"DialogOverlay")),rE=to("DialogOverlay.RemoveScroll"),r_=m.forwardRef(rm(function(e,t){let{__scopeDialog:n,...r}=e,a=rx(rN,n),o=tn(t,t2());return(0,h.jsx)(ri,{as:rE,allowPinchZoom:!0,shards:[a.contentRef],children:(0,h.jsx)(tZ.div,{"data-state":rF(a.open),...r,ref:o,style:{pointerEvents:"auto",...r.style}})})},"DialogOverlayImpl")),rz="DialogContent",rT=m.forwardRef(rm(function(e,t){let n=rO(rz,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=rx(rz,e.__scopeDialog);return(0,h.jsx)(nx,{present:r||o.open,children:o.modal?(0,h.jsx)(rA,{...a,ref:t}):(0,h.jsx)(rR,{...a,ref:t})})},"DialogContent")),rA=m.forwardRef(rm(function(e,t){let n=rx(rz,e.__scopeDialog),r=m.useRef(null),a=tn(t,n.contentRef,r);return m.useEffect(()=>{let e=r.current;if(e)return rp(e)},[]),(0,h.jsx)(rI,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:tj(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:tj(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:tj(e.onFocusOutside,e=>e.preventDefault())})},"DialogContentModal")),rR=m.forwardRef(rm(function(e,t){let n=rx(rz,e.__scopeDialog),r=m.useRef(!1),a=m.useRef(!1);return(0,h.jsx)(rI,{...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")),rI=m.forwardRef(rm(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,...i}=e,l=rx(rz,n);return n_(),(0,h.jsx)(h.Fragment,{children:(0,h.jsx)(nr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:o,children:(0,h.jsx)(t1,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionPresent?l.descriptionId:void 0,"aria-labelledby":l.titlePresent?l.titleId:void 0,"data-state":rF(l.open),...i,ref:t,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1)})})})},"DialogContentImpl")),rL=m.forwardRef(rm(function(e,t){let{__scopeDialog:n,...r}=e,a=rx("DialogTitle",n),{setTitleCount:o}=a;return t_(()=>(o(e=>e+1),()=>o(e=>e-1)),[o]),(0,h.jsx)(tZ.h2,{id:a.titleId,...r,ref:t})},"DialogTitle")),rM=m.forwardRef(rm(function(e,t){let{__scopeDialog:n,...r}=e,a=rx("DialogDescription",n),{setDescriptionCount:o}=a;return t_(()=>(o(e=>e+1),()=>o(e=>e-1)),[o]),(0,h.jsx)(tZ.p,{id:a.descriptionId,...r,ref:t})},"DialogDescription")),rD=m.forwardRef(rm(function(e,t){let{__scopeDialog:n,...r}=e,a=rx("DialogClose",n);return(0,h.jsx)(tZ.button,{type:"button",...r,ref:t,onClick:tj(e.onClick,()=>a.onOpenChange(!1))})},"DialogClose"));function rF(e){return e?"open":"closed"}rm(rF,"getState");let r$=j("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function rU(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 rH(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 rB(e){var t=e.className,n=rH(e,["className"]);return(0,h.jsx)(rP,rU({"data-slot":"dialog-overlay",className:eZ("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 rK(e){var t,n,r=e.className,a=e.children,o=rH(e,["className","children"]),i=(0,v.Bd)().t;return(0,h.jsxs)(rC,{children:[(0,h.jsx)(rB,{}),(0,h.jsxs)(rT,(t=rU({"data-slot":"dialog-content",className:eZ("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,h.jsxs)(rD,{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,h.jsx)(r$,{className:"size-4"}),(0,h.jsx)("span",{className:"sr-only",children:i("common.closeDialog")})]})]},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 rV(e){var t=e.className,n=rH(e,["className"]);return(0,h.jsx)("div",rU({"data-slot":"dialog-header",className:eZ("flex flex-col space-y-1.5 text-center sm:text-left",t)},n))}function rq(e){var t=e.className,n=rH(e,["className"]);return(0,h.jsx)("div",rU({"data-slot":"dialog-footer",className:eZ("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t)},n))}function rW(e){var t=e.className,n=rH(e,["className"]);return(0,h.jsx)(rL,rU({"data-slot":"dialog-title",className:eZ("text-lg font-semibold leading-none tracking-tight",t)},n))}function rZ(e){var t=e.className,n=rH(e,["className"]);return(0,h.jsx)(rM,rU({"data-slot":"dialog-description",className:eZ("text-sm text-muted-foreground",t)},n))}function rG(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 rJ(e,t,n){return(rJ=r1()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var a=new(Function.bind.apply(e,r));return n&&rX(a,n.prototype),a}).apply(null,arguments)}function rQ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rY(e){return(rY=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function rX(e,t){return(rX=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function r0(e){var t="function"==typeof Map?new Map:void 0;return(r0=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 rJ(e,arguments,rY(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),rX(n,e)})(e)}function r1(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(r1=function(){return!!e})()}var r2=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,l=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=rY(r),rQ(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,r1()?Reflect.construct(r,a||[],rY(this).constructor):r.apply(this,a)),"status",void 0),rQ(o,"code",void 0),rQ(o,"params",void 0),o.status=e,o.name="ApiError",o.code=l.code,o.params=null!=(i=l.data)?i:l.params,o}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&rX(t,e),t}(r0(Error));function r4(e){return"/api/harnesses/".concat(e,"/profiles")}function r3(e,t){return"".concat(r4(e),"/").concat(encodeURIComponent(t))}function r5(e){return e?"/api/backups/".concat(encodeURIComponent(e)):"/api/backups"}function r6(){return"/api/providers"}function r8(e){return"".concat(r6(),"/").concat(encodeURIComponent(e))}function r9(e){return e?"/api/drift/".concat(encodeURIComponent(e)):"/api/drift"}function r7(){return"/api/scan"}function ae(e){return e?"/api/operations?harness=".concat(encodeURIComponent(e)):"/api/operations"}function at(e){var t;return(t=function(e){var t,n,r,a,o,i,l,s=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(u){switch(u.label){case 0:var c,d;return(n=new Headers((t=s.length>1&&void 0!==s[1]?s[1]:{}).headers)).set("Accept-Language",v.Ru.language),t.body&&!n.has("Content-Type")&&n.set("Content-Type","application/json"),[4,fetch(e,(c=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){rQ(e,t,n[t])})}return e}({credentials:"include"},t),d=d={headers:n},Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(d)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(d)).forEach(function(e){Object.defineProperty(c,e,Object.getOwnPropertyDescriptor(d,e))}),c))];case 1:return[4,(r=u.sent()).json().catch(function(){return{}})];case 2:if(a=u.sent(),!r.ok)throw new r2(r.status,null!=(o=null!=(i=a.msg)?i:a.error)?o:"",{code:a.code,data:null!=(l=a.data)?l: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){rG(o,r,a,i,l,"next",e)}function l(e){rG(o,r,a,i,l,"throw",e)}i(void 0)})}).apply(this,arguments)}function an(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 ar(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function aa(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 ao(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 ai(e){return e.startsWith("warning.")||e.startsWith("error.")?e:"error.".concat(e)}function al(e){return e.code?{key:ai(e.code),params:e.params,scope:e.scope,fallback:e.message}:{key:"error.unknown",fallback:e.message,scope:e.scope}}function as(e){return ar(e,r2)?al({message:e.message,code:e.code,params:e.params}):{key:"error.unknown",fallback:ar(e,Error)?e.message:String(e)}}function au(e,t){var n=as(e);return"error.unknown"===n.key?ao(aa({},n),{key:t}):n}var ac=new Set(["drift.adoptFailed","drift.reapplyFailed","vault.deleteFailed","vault.saveFailed","vault.revealFailed","operations.undoFailed","import.failed","activate.loadFailed","backup.loadFailed","backup.diffFailed"]);function ad(e,t){if(t.fallback&&("error.unknown"===t.key||ac.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 an(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 an(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,ao(aa({},t.params,i),{defaultValue:null!=(r=t.fallback)?r:t.key}));return t.scope?"".concat(t.scope,": ").concat(l):l}let af=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 ap(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 ah(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 am(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function i(e){ah(o,r,a,i,l,"next",e)}function l(e){ah(o,r,a,i,l,"throw",e)}i(void 0)})}}function ag(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function ay(e){return function(e){if(Array.isArray(e))return ap(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 ap(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 ap(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 av(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 ab=(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 am(function(){var n;return av(this,function(r){switch(r.label){case 0:return r.trys.push([0,5,,6]),[4,at("/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:ag(n=r.sent(),r2)&&401===n.status?null:as(n)}),[3,6];case 6:return[2]}})})()},login:function(n){return am(function(){var r;return av(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,at("/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:as(r=a.sent())}),r;case 6:return[2]}})})()},logout:function(){return am(function(){return av(this,function(t){switch(t.label){case 0:return[4,at("/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 am(function(){var t;return av(this,function(n){switch(n.label){case 0:e({usersLoading:!0}),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,at("/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:as(n.sent())}),[3,4];case 4:return[2]}})})()},switchUser:function(n){return am(function(){var r;return av(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,at("/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:as(r=a.sent())}),r;case 6:return[2]}})})()},loadHarnesses:function(){return am(function(){var n,r;return av(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,at("/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(ag(r=a.sent(),r2)&&401===r.status)return e({authenticated:!1,loading:!1,harnesses:[]}),[2];return e({loading:!1,error:as(r)}),[3,5];case 5:return[2]}})})()},createProfile:function(e,n){return am(function(){return av(this,function(r){switch(r.label){case 0:return[4,at(r4(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 am(function(){return av(this,function(a){switch(a.label){case 0:return[4,at(r3(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 am(function(){return av(this,function(r){switch(r.label){case 0:return[4,at(r3(e,n),{method:"DELETE"})];case 1:return r.sent(),[4,t().loadHarnesses()];case 2:return r.sent(),[2]}})})()},activateProfile:function(n,r){return am(function(){return av(this,function(a){switch(a.label){case 0:return[4,at("".concat(r3(n,r),"/activate"),{method:"POST"})];case 1:return e({notice:[{key:"notice.switchDone"}].concat(ay(a.sent().warnings.map(al)))}),[4,t().loadHarnesses()];case 2:return a.sent(),[2]}})})()},activateOfficial:function(n){return am(function(){return av(this,function(r){switch(r.label){case 0:return[4,at("/api/harnesses/".concat(n,"/official/activate"),{method:"POST"})];case 1:return e({notice:[{key:"notice.switchDone"}].concat(ay(r.sent().warnings.map(al)))}),[4,t().loadHarnesses()];case 2:return r.sent(),[2]}})})()},previewProfile:function(e,t){return am(function(){return av(this,function(n){switch(n.label){case 0:return[4,at("".concat(r3(e,t),"/preview"))];case 1:return[2,n.sent().targets]}})})()},previewOfficial:function(e){return am(function(){return av(this,function(t){switch(t.label){case 0:return[4,at("/api/harnesses/".concat(e,"/official/preview"))];case 1:return[2,t.sent().targets]}})})()},loadBackups:function(){return am(function(){var t;return av(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,at(r5())];case 1:return e({backups:n.sent().items}),[3,3];case 2:return ag(t=n.sent(),r2)&&401===t.status||e({error:as(t)}),[3,3];case 3:return[2]}})})()},loadBackupDetail:function(e){return am(function(){return av(this,function(t){return[2,at(r5(e))]})})()},restoreBackup:function(n){return am(function(){return av(this,function(r){switch(r.label){case 0:return[4,at("".concat(r5(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 am(function(){var t;return av(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,at(r6())];case 2:return e({providers:n.sent().items,providersLoading:!1}),[3,4];case 3:if(ag(t=n.sent(),r2)&&401===t.status)return e({authenticated:!1,providersLoading:!1,providers:[]}),[2];return e({providersLoading:!1,providersError:as(t)}),[3,4];case 4:return[2]}})})()},createProvider:function(e){return am(function(){return av(this,function(n){switch(n.label){case 0:return[4,at(r6(),{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 am(function(){var r;return av(this,function(a){switch(a.label){case 0:return[4,at(r8(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 am(function(){return av(this,function(n){switch(n.label){case 0:return[4,at(r8(e),{method:"DELETE"})];case 1:return n.sent(),[4,t().loadProviders()];case 2:return n.sent(),[2]}})})()},revealProvider:function(e){return am(function(){return av(this,function(t){return[2,at("".concat(r8(e),"/reveal"))]})})()},probeDraft:function(e){return am(function(){return av(this,function(t){switch(t.label){case 0:return[4,at("/api/probe",{method:"POST",body:JSON.stringify(e)})];case 1:return[2,t.sent().result]}})})()},probeProfile:function(e,t){return am(function(){return av(this,function(n){switch(n.label){case 0:return[4,at("".concat(r3(e,t),"/probe"),{method:"POST",body:JSON.stringify({})})];case 1:return[2,n.sent().result]}})})()},probeVaultEntry:function(e,t){return am(function(){return av(this,function(n){switch(n.label){case 0:return[4,at("".concat(r8(e),"/probe"),{method:"POST",body:JSON.stringify(t?{endpoint:t}:{})})];case 1:return[2,n.sent().result]}})})()},loadDoctor:function(n){return am(function(){var r,a,o;return av(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,at(n?"/api/doctor?harness=".concat(encodeURIComponent(n)):"/api/doctor")];case 2:return a=i.sent(),e({doctor:ay((null!=(r=t().doctor)?r:[]).filter(function(e){return e.harness!==n})).concat(ay(a.items.filter(function(e){return e.harness===n}))),doctorUpdatedAvailable:a.updatedAvailable,doctorLoading:!1}),[3,4];case 3:if(ag(o=i.sent(),r2)&&401===o.status)return e({authenticated:!1,doctorLoading:!1,doctor:[]}),[2];return e({doctorLoading:!1,doctorError:as(o)}),[3,4];case 4:return[2]}})})()},loadDrift:function(){return am(function(){var t,n;return av(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,at(r9())];case 2:return e({drift:null!=(t=r.sent().items)?t:[],driftLoading:!1}),[3,4];case 3:if(ag(n=r.sent(),r2)&&401===n.status)return e({authenticated:!1,driftLoading:!1,drift:[]}),[2];return e({driftLoading:!1,driftError:as(n)}),[3,4];case 4:return[2]}})})()},reapplyDrift:function(n){return am(function(){var r,a,o;return av(this,function(i){switch(i.label){case 0:return[4,at("".concat(r9(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 am(function(){var r,a,o;return av(this,function(i){switch(i.label){case 0:return[4,at("".concat(r9(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 am(function(){var t;return av(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,at(r7())];case 2:return e({scan:n.sent().items,scanLoading:!1}),[3,4];case 3:if(ag(t=n.sent(),r2)&&401===t.status)return e({authenticated:!1,scanLoading:!1,scan:[]}),[2];return e({scanLoading:!1,scanError:as(t)}),[3,4];case 4:return[2]}})})()},importScan:function(e){return am(function(){var n;return av(this,function(r){switch(r.label){case 0:return[4,at("".concat(r7(),"/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 am(function(){var r,a,o;return av(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,at(ae(n))];case 2:return a=i.sent(),e({operations:ay((null!=(r=t().operations)?r:[]).filter(function(e){return e.harness!==n})).concat(ay(a.items.filter(function(e){return e.harness===n}))),operationsLoading:!1}),[3,4];case 3:if(ag(o=i.sent(),r2)&&401===o.status)return e({authenticated:!1,operationsLoading:!1,operations:[]}),[2];return e({operationsLoading:!1,operationsError:as(o)}),[3,4];case 4:return[2]}})})()},undoOperation:function(n){return am(function(){var r,a,o;return av(this,function(i){switch(i.label){case 0:return[4,at("".concat(ae(),"/").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})}}},af(r)),Object.assign(n=e=>(function(e,t=e=>e){let n=m.useSyncExternalStore(e.subscribe,m.useCallback(()=>t(e.getState()),[e,t]),m.useCallback(()=>t(e.getInitialState()),[e,t]));return m.useDebugValue(n),n})(t,e),t),n);function ax(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 aw(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 ax(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 ax(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 ak(e){var t,n=e.harnessId,r=(0,v.s9)().locale,a=(0,v.Bd)().t,o=ab(function(e){return e.backups}),i=ab(function(e){return e.loadBackups}),l=ab(function(e){return e.loadBackupDetail}),s=ab(function(e){return e.restoreBackup}),u=aw((0,m.useState)(!1),2),c=u[0],d=u[1],f=aw((0,m.useState)(null),2),p=f[0],g=f[1],y=aw((0,m.useState)(null),2),b=y[0],x=y[1],w=aw((0,m.useState)(null),2),k=w[0],j=w[1],S=aw((0,m.useState)(!1),2),O=S[0],C=S[1],N=o.filter(function(e){return e.harness===n}),P=null!=(t=o.find(function(e){return e.id===p}))?t:null,E=T.RP[n];return(0,m.useEffect)(function(){i()},[i]),(0,m.useEffect)(function(){d(!1),g(null)},[n]),(0,m.useEffect)(function(){if(!p){x(null),j(null),C(!1);return}var e=!1;return x(null),j(null),C(!0),l(p).then(function(t){e||x(t)}).catch(function(t){e||j(au(t,"backup.diffFailed"))}).finally(function(){e||C(!1)}),function(){e=!0}},[p,l]),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(tb,{className:"w-full justify-between",size:"sm",variant:"outline",onClick:function(){return d(!0)},children:[(0,h.jsx)(A,{}),a("backup.history"),N.length>0?(0,h.jsx)(eJ,{variant:"secondary",children:N.length}):null]}),(0,h.jsx)(rw,{open:c,onOpenChange:d,children:(0,h.jsxs)(rK,{className:"max-w-xl",children:[(0,h.jsxs)(rV,{children:[(0,h.jsx)(rW,{children:a("backup.historyTitle",{harness:E})}),(0,h.jsx)(rZ,{children:a("backup.historyIntro")})]}),0===N.length?(0,h.jsx)("p",{className:"py-6 text-center text-sm text-muted-foreground",children:a("backup.empty")}):(0,h.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,h.jsxs)("li",{className:"flex items-center gap-3 px-3 py-2.5 hover:bg-muted/30",children:[(0,h.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,h.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,h.jsx)("p",{className:"truncate text-sm font-medium",children:e.profile}),e.current?(0,h.jsx)(eJ,{children:a("backup.currentBadge")}):null]}),(0,h.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,h.jsx)(tb,{size:"sm",variant:"outline",className:"shrink-0",onClick:function(){return g(e.id)},children:a("backup.restore")})]},e.id)})})]})}),(0,h.jsx)(rw,{open:null!==P,onOpenChange:function(e){return!e&&g(null)},children:(0,h.jsxs)(rK,{className:"flex max-h-[85vh] w-[min(64rem,calc(100vw-2rem))] max-w-5xl flex-col overflow-hidden",children:[(0,h.jsxs)(rV,{children:[(0,h.jsx)(rW,{children:a("backup.restoreHistoryTitle")}),(0,h.jsx)(rZ,{children:a("backup.restoreHistoryBody")})]}),(0,h.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[O?(0,h.jsx)("p",{className:"py-8 text-center text-sm text-muted-foreground",children:a("backup.comparing")}):null,k?(0,h.jsx)("p",{className:"py-8 text-center text-sm text-destructive",children:ad(a,k)}):null,b?(0,h.jsx)(e3,{files:b.files}):null]}),(0,h.jsxs)(rq,{children:[(0,h.jsx)(tb,{variant:"outline",onClick:function(){return g(null)},children:a("common.cancel")}),(0,h.jsx)(tb,{disabled:O||null!==k||null===b,onClick:function(){p&&s(p).then(function(){g(null),d(!1)})},children:a("backup.confirmRestore")})]})]})})]})}function aj(e){var t=e.className;return(0,h.jsxs)("span",{"aria-hidden":"true",className:eZ("relative inline-block size-6 overflow-hidden rounded-[26%]",t),children:[(0,h.jsx)("img",{alt:"",className:"size-full object-cover dark:hidden",draggable:!1,src:"/brand-mark-light.png"}),(0,h.jsx)("img",{alt:"",className:"hidden size-full object-cover dark:block",draggable:!1,src:"/brand-mark-dark.png"})]})}let aS=j("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"}]]),aO=j("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"}]]),aC=j("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"}]]),aN=j("cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]),aP=j("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"}]]),aE=j("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"}]]);var a_=Object.defineProperty,az=(e,t)=>a_(e,"name",{value:t,configurable:!0}),[aT,aA]=tP("AlertDialog",[rv]),aR=rv(),aI=az(e=>{let{__scopeAlertDialog:t,...n}=e,r=aR(t);return(0,h.jsx)(rw,{...r,...n,modal:!0})},"AlertDialog");m.forwardRef(az(function(e,t){let{__scopeAlertDialog:n,...r}=e,a=aR(n);return(0,h.jsx)(rk,{...a,...r,ref:t})},"AlertDialogTrigger"));var aL=az(e=>{let{__scopeAlertDialog:t,...n}=e,r=aR(t);return(0,h.jsx)(rC,{...r,...n})},"AlertDialogPortal"),aM=m.forwardRef(az(function(e,t){let{__scopeAlertDialog:n,...r}=e,a=aR(n);return(0,h.jsx)(rP,{...a,...r,ref:t})},"AlertDialogOverlay")),[aD,aF]=aT("AlertDialogContent"),a$=m.forwardRef(az(function(e,t){let{__scopeAlertDialog:n,children:r,...a}=e,o=aR(n),i=tn(t,m.useRef(null)),l=m.useRef(null);return(0,h.jsx)(aD,{scope:n,cancelRef:l,children:(0,h.jsx)(rT,{role:"alertdialog",...o,...a,ref:i,onOpenAutoFocus:tj(a.onOpenAutoFocus,e=>{e.preventDefault(),l.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:r})})},"AlertDialogContent")),aU=m.forwardRef(az(function(e,t){let{__scopeAlertDialog:n,...r}=e,a=aR(n);return(0,h.jsx)(rL,{...a,...r,ref:t})},"AlertDialogTitle")),aH=m.forwardRef(az(function(e,t){let{__scopeAlertDialog:n,...r}=e,a=aR(n);return(0,h.jsx)(rM,{...a,...r,ref:t})},"AlertDialogDescription")),aB=m.forwardRef(az(function(e,t){let{__scopeAlertDialog:n,...r}=e,a=aR(n);return(0,h.jsx)(rD,{...a,...r,ref:t})},"AlertDialogAction")),aK=m.forwardRef(az(function(e,t){let{__scopeAlertDialog:n,...r}=e,{cancelRef:a}=aF("AlertDialogCancel",n),o=aR(n),i=tn(t,a);return(0,h.jsx)(rD,{...o,...r,ref:i})},"AlertDialogCancel"));function aV(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 aq(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 aW(e){var t=e.className,n=aq(e,["className"]);return(0,h.jsx)(aM,aV({"data-slot":"alert-dialog-overlay",className:eZ("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 aZ(e){var t=e.className,n=aq(e,["className"]);return(0,h.jsxs)(aL,{children:[(0,h.jsx)(aW,{}),(0,h.jsx)(a$,aV({"data-slot":"alert-dialog-content",className:eZ("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 aG(e){var t=e.className,n=aq(e,["className"]);return(0,h.jsx)("div",aV({className:eZ("flex flex-col space-y-2 text-center sm:text-left",t)},n))}function aJ(e){var t=e.className,n=aq(e,["className"]);return(0,h.jsx)("div",aV({className:eZ("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t)},n))}function aQ(e){var t=e.className,n=aq(e,["className"]);return(0,h.jsx)(aU,aV({className:eZ("text-lg font-semibold",t)},n))}function aY(e){var t=e.className,n=aq(e,["className"]);return(0,h.jsx)(aH,aV({className:eZ("text-sm text-muted-foreground",t)},n))}function aX(e){var t=e.className,n=aq(e,["className"]);return(0,h.jsx)(aB,aV({className:eZ(tv(),t)},n))}function a0(e){var t=e.className,n=aq(e,["className"]);return(0,h.jsx)(aK,aV({className:eZ(tv({variant:"outline"}),"mt-2 sm:mt-0",t)},n))}function a1(e){let[t,n]=m.useState(void 0);return t_(()=>{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)(a1,"name",{value:"useSize",configurable:!0});var a2=Object.defineProperty,a4=(e,t)=>a2(e,"name",{value:t,configurable:!0}),a3="Checkbox",[a5,a6]=tP(a3),[a8,a9]=a5(a3);function a7(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]=tH({prop:n,defaultProp:a??!1,onChange:s,caller:a3}),[g,y]=m.useState(null),[v,b]=m.useState(null),x=m.useRef(!1),[w,k]=m.useReducer(e=>e+1,0),j=!g||!!i||!!g.closest("form"),S={checked:f,disabled:o,setChecked:p,control:g,setControl:y,name:l,form:i,value:c,hasConsumerStoppedPropagationRef:x,userInteractionCount:w,onUserInteraction:k,required:u,defaultChecked:!oo(a)&&a,isFormControl:j,bubbleInput:v,setBubbleInput:b};return(0,h.jsx)(a8,{scope:t,...S,children:oa(d)?d(S):r})}a4(a7,"CheckboxProvider");var oe=m.forwardRef(a4(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:g,bubbleInput:y}=a9("CheckboxTrigger",e),v=tn(a,c),b=m.useRef(s);return m.useEffect(()=>{let e=o?.form;if(e){let t=a4(()=>d(b.current),"reset");return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[o,d]),(0,h.jsx)(tZ.button,{type:"button",role:"checkbox","aria-checked":oo(s)?"mixed":s,"aria-required":u,"data-state":oi(s),"data-disabled":l?"":void 0,disabled:l,value:i,...r,ref:v,onKeyDown:tj(t,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:tj(n,e=>{p(),d(e=>!!oo(e)||!e),y&&g&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})},"CheckboxTrigger")),ot=m.forwardRef(a4(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,h.jsx)(a7,{__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,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(oe,{...d,ref:t,__scopeCheckbox:n}),e&&(0,h.jsx)(or,{__scopeCheckbox:n})]})})},"Checkbox")),on=m.forwardRef(a4(function(e,t){let{__scopeCheckbox:n,forceMount:r,...a}=e,o=a9("CheckboxIndicator",n);return(0,h.jsx)(nx,{present:r||oo(o.checked)||!0===o.checked,children:(0,h.jsx)(tZ.span,{"data-state":oi(o.checked),"data-disabled":o.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})},"CheckboxIndicator")),or=m.forwardRef(a4(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:g,setBubbleInput:y}=a9("CheckboxBubbleInput",e),v=tn(r,y),b=a1(a),x=m.useRef(!1),w=m.useRef(l),k=m.useRef(i);m.useEffect(()=>{if(!g)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});g.indeterminate=oo(l),e.call(g,!oo(l)&&l),g.dispatchEvent(n),x.current=!1}},[g,l,o,i]);let j=m.useRef(!oo(l)&&l);return(0,h.jsx)(tZ.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:tj(t,e=>{x.current&&e.stopPropagation()}),style:{...n.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"CheckboxBubbleInput"));function oa(e){return"function"==typeof e}function oo(e){return"indeterminate"===e}function oi(e){return oo(e)?"indeterminate":e?"checked":"unchecked"}a4(oa,"isFunction"),a4(oo,"isIndeterminate"),a4(oi,"getState");let ol=j("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);function os(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,h.jsx)(ot,(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:eZ("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,h.jsx)(on,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current",children:(0,h.jsx)(ol,{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))}var ou=Object.defineProperty,oc=m.forwardRef(ou(function(e,t){return(0,h.jsx)(tZ.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 od(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,h.jsx)(oc,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:eZ("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",t)},n))}function of(e,[t,n]){return Math.min(n,Math.max(t,e))}(0,Object.defineProperty)(of,"name",{value:"clamp",configurable:!0});var op=Object.defineProperty,oh=(e,t)=>op(e,"name",{value:t,configurable:!0});function om(e){let t=e+"CollectionProvider",[n,r]=tP(t),[a,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=oh(e=>{let{scope:t,children:n}=e,r=m.useRef(null),o=m.useRef(new Map).current;return(0,h.jsx)(a,{scope:t,itemMap:o,collectionRef:r,children:n})},"CollectionProvider");i.displayName=t;let l=e+"CollectionSlot",s=to(l),u=m.forwardRef((e,t)=>{let{scope:n,children:r}=e,a=tn(t,o(l,n).collectionRef);return(0,h.jsx)(s,{ref:a,children:r})});u.displayName=l;let c=e+"CollectionItemSlot",d="data-radix-collection-item",f=to(c),p=m.forwardRef((e,t)=>{let{scope:n,children:r,...a}=e,i=m.useRef(null),l=tn(t,i),s=o(c,n);return m.useEffect(()=>(s.itemMap.set(i,{ref:i,...a}),()=>void s.itemMap.delete(i))),(0,h.jsx)(f,{...{[d]:""},ref:l,children:r})});function g(t){let n=o(e+"CollectionConsumer",t);return m.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,oh(g,"useCollection"),[{Provider:i,Slot:u,ItemSlot:p},g,r]}oh(om,"createCollection");var og=new WeakMap,oy=class e extends Map{static{oh(this,"OrderedDict")}#e;constructor(e){super(e),this.#e=[...super.keys()],og.set(this,!0)}set(e,t){return og.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=ox(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=ov(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=ov(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return ov(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 ov(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let n=ob(e,t);return -1===n?void 0:e[n]}function ob(e,t){let n=e.length,r=ox(t),a=r>=0?r:n+r;return a<0||a>=n?-1:a}function ox(e){return e!=e||0===e?0:Math.trunc(e)}function ow(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 ok(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function oj(e,t){return e[1].element&&t[1].element?ok(e[1].element,t[1].element)?-1:1:0}function oS(e){return new MutationObserver(t=>{for(let n of t)if("childList"===n.type)return void e()})}oh(ov,"at"),oh(ob,"toSafeIndex"),oh(ox,"toSafeInteger"),oh(function(e){let t=e+"CollectionProvider",[n,r]=tP(t),[a,o]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new oy,setItemMap:oh(()=>void 0,"setItemMap")}),i=oh(({state:e,...t})=>e?(0,h.jsx)(s,{...t,state:e}):(0,h.jsx)(l,{...t}),"CollectionProvider");i.displayName=t;let l=oh(e=>{let t=y();return(0,h.jsx)(s,{...e,state:t})},"CollectionInit");l.displayName=t+"Init";let s=oh(e=>{let{scope:t,children:n,state:r}=e,o=m.useRef(null),[i,l]=m.useState(null),s=tn(o,l),[u,c]=r;return m.useEffect(()=>{if(!i)return;let e=oS(()=>{});return e.observe(i,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[i]),(0,h.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=to(u),d=m.forwardRef((e,t)=>{let{scope:n,children:r}=e,a=tn(t,o(u,n).collectionRef);return(0,h.jsx)(c,{ref:a,children:r})});d.displayName=u;let f=e+"CollectionItemSlot",p=to(f),g=m.forwardRef((e,t)=>{let{scope:n,children:r,...a}=e,i=m.useRef(null),[l,s]=m.useState(null),u=tn(t,i,s),{setItemMap:c}=o(f,n),d=m.useRef(a);ow(d.current,a)||(d.current=a);let g=d.current;return m.useEffect(()=>(c(e=>l?e.has(l)?e.set(l,{...g,element:l}).toSorted(oj):(e.set(l,{...g,element:l}),e.toSorted(oj)):e),()=>{c(e=>l&&e.has(l)?(e.delete(l),new oy(e)):e)}),[l,g,c]),(0,h.jsx)(p,{"data-radix-collection-item":"",ref:u,children:r})});function y(){return m.useState(new oy)}function v(t){let{itemMap:n}=o(e+"CollectionConsumer",t);return n}return g.displayName=f,oh(y,"useInitCollection"),oh(v,"useCollection"),[{Provider:i,Slot:d,ItemSlot:g},{createCollectionScope:r,useCollection:v,useInitCollection:y}]},"createCollection"),oh(ow,"shallowEqual"),oh(ok,"isElementPreceding"),oh(oj,"sortByDocumentPosition"),oh(oS,"getChildListObserver");var oO=Object.defineProperty,oC=m.createContext(void 0);function oN(e){let t=m.useContext(oC);return e||t||"ltr"}oO(oN,"name",{value:"useDirection",configurable:!0});let oP=["top","right","bottom","left"],oE=Math.min,o_=Math.max,oz=Math.round,oT=Math.floor,oA=e=>({x:e,y:e}),oR={left:"right",right:"left",bottom:"top",top:"bottom"};function oI(e,t){return"function"==typeof e?e(t):e}function oL(e){return e.split("-")[0]}function oM(e){return e.split("-")[1]}function oD(e){return"x"===e?"y":"x"}function oF(e){return"y"===e?"height":"width"}function o$(e){let t=e[0];return"t"===t||"b"===t?"y":"x"}function oU(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}let oH=["left","right"],oB=["right","left"],oK=["top","bottom"],oV=["bottom","top"];function oq(e){let t=oL(e);return oR[t]+e.slice(t.length)}function oW(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 oZ(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 oG(e,t,n){let r,{reference:a,floating:o}=e,i=o$(t),l=oD(o$(t)),s=oF(l),u=oL(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=oM(t);return p&&(r[l]+=f*("end"===p?1:-1)*(n&&"y"===i?-1:1)),r}async function oJ(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}=oI(t,e),h=oW(p),m=l[f?"floating"===d?"reference":"floating":d],g=oZ(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=oZ(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 oQ=async(e,t,n)=>{let{placement:r="bottom",strategy:a="absolute",middleware:o=[],platform:i}=n,l=i.detectOverflow?i:{...i,detectOverflow:oJ},s=await (null==i.isRTL?void 0:i.isRTL(t)),u=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:c,y:d}=oG(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}=oG(u,f,s)),n=-1)}return{x:c,y:d,placement:f,strategy:a,middlewareData:h}};function oY(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function oX(e){return oP.some(t=>e[t]>=0)}let o0=new Set(["left","top"]);async function o1(e,t){let{placement:n,platform:r,elements:a}=e,o=await (null==r.isRTL?void 0:r.isRTL(a.floating)),i=oL(n),l=oM(n),s="y"===o$(n),u=o0.has(i)?-1:1,c=o&&s?-1:1,d=oI(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 o2(){return"u">typeof window}function o4(e){return o6(e)?(e.nodeName||"").toLowerCase():"#document"}function o3(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function o5(e){var t;return null==(t=(o6(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function o6(e){return!!o2()&&(e instanceof Node||e instanceof o3(e).Node)}function o8(e){return!!o2()&&(e instanceof Element||e instanceof o3(e).Element)}function o9(e){return!!o2()&&(e instanceof HTMLElement||e instanceof o3(e).HTMLElement)}function o7(e){return!(!o2()||"u"<typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof o3(e).ShadowRoot)}function ie(e){let{overflow:t,overflowX:n,overflowY:r,display:a}=iu(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==a&&"contents"!==a}function it(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}let ir=/transform|translate|scale|rotate|perspective|filter/,ia=/paint|layout|strict|content/,io=e=>!!e&&"none"!==e;function ii(e){let t=o8(e)?iu(e):e;return io(t.transform)||io(t.translate)||io(t.scale)||io(t.rotate)||io(t.perspective)||!il()&&(io(t.backdropFilter)||io(t.filter))||ir.test(t.willChange||"")||ia.test(t.contain||"")}function il(){return null==e&&(e="u">typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),e}function is(e){return/^(html|body|#document)$/.test(o4(e))}function iu(e){return o3(e).getComputedStyle(e)}function ic(e){return o8(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function id(e){if("html"===o4(e))return e;let t=e.assignedSlot||e.parentNode||o7(e)&&e.host||o5(e);return o7(t)?t.host:t}function ip(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let a=function e(t){let n=id(t);return is(n)?(t.ownerDocument||t).body:o9(n)&&ie(n)?n:e(n)}(e),o=a===(null==(r=e.ownerDocument)?void 0:r.body),i=o3(a);if(!o)return t.concat(a,ip(a,[],n));{let e=ih(i);return t.concat(i,i.visualViewport||[],ie(a)?a:[],e&&n?ip(e):[])}}function ih(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function im(e){let t=iu(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,a=o9(e),o=a?e.offsetWidth:n,i=a?e.offsetHeight:r,l=oz(n)!==o||oz(r)!==i;return l&&(n=o,r=i),{width:n,height:r,$:l}}function ig(e){return o8(e)?e:e.contextElement}function iy(e){let t=ig(e);if(!o9(t))return oA(1);let n=t.getBoundingClientRect(),{width:r,height:a,$:o}=im(t),i=(o?oz(n.width):n.width)/r,l=(o?oz(n.height):n.height)/a;return i&&Number.isFinite(i)||(i=1),l&&Number.isFinite(l)||(l=1),{x:i,y:l}}let iv=oA(0);function ib(e){let t=o3(e);return il()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:iv}function ix(e,t,n,r){var a;void 0===t&&(t=!1),void 0===n&&(n=!1);let o=e.getBoundingClientRect(),i=ig(e),l=oA(1);t&&(r?o8(r)&&(l=iy(r)):l=iy(e));let s=(void 0===(a=n)&&(a=!1),r&&a&&r===o3(i))?ib(i):oA(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=o3(i),t=o8(r)?o3(r):r,n=e,a=ih(n);for(;a&&t!==n;){let e=iy(a),t=a.getBoundingClientRect(),r=iu(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=ih(n=o3(a))}}return oZ({width:d,height:f,x:u,y:c})}function iw(e,t){let n=ic(e).scrollLeft;return t?t.left+n:ix(o5(e)).left+n}function ik(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-iw(e,n),y:n.top+t.scrollTop}}function ij(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=o3(e),o=o5(e),i=a.visualViewport,l=o.clientWidth,s=o.clientHeight,u=0,c=0;if(i){let e=!il()||"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>=iw(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=ic(r=o5(e)),n=r.ownerDocument.body,o=o_(r.scrollWidth,r.clientWidth,n.scrollWidth,n.clientWidth),i=o_(r.scrollHeight,r.clientHeight,n.scrollHeight,n.clientHeight),l=-t.scrollLeft+iw(r),s=-t.scrollTop,"rtl"===iu(n).direction&&(l+=o_(r.clientWidth,n.clientWidth)-o),a={width:o,height:i,x:l,y:s}}else if(o8(t)){let e,r,o,i,l,s;r=(e=ix(t,!0,"fixed"===n)).top+t.clientTop,o=e.left+t.clientLeft,i=iy(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=ib(e);a={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return oZ(a)}function iS(e){return"static"===iu(e).position}function iO(e,t){if(!o9(e)||"fixed"===iu(e).position)return null;if(t)return t(e);let n=e.offsetParent;return o5(e)===n&&(n=n.ownerDocument.body),n}function iC(e,t){var n;let r=o3(e);if(it(e))return r;if(!o9(e)){let t=id(e);for(;t&&!is(t);){if(o8(t)&&!iS(t))return t;t=id(t)}return r}let a=iO(e,t);for(;a&&(n=a,/^(table|td|th)$/.test(o4(n)))&&iS(a);)a=iO(a,t);return a&&is(a)&&iS(a)&&!ii(a)?r:a||function(e){let t=id(e);for(;o9(t)&&!is(t);){if(ii(t))return t;if(it(t))break;t=id(t)}return null}(e)||r}let iN=async function(e){let t=this.getOffsetParent||iC,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=o9(t),a=o5(t),o="fixed"===n,i=ix(e,!0,o,t),l={scrollLeft:0,scrollTop:0},s=oA(0);if((r||!o)&&(("body"!==o4(t)||ie(a))&&(l=ic(t)),r)){let e=ix(t,!0,o,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}!r&&a&&(s.x=iw(a));let u=!a||r||o?oA(0):ik(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}}},iP={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e,o="fixed"===a,i=o5(r),l=!!t&&it(t.floating);if(r===i||l&&o)return n;let s={scrollLeft:0,scrollTop:0},u=oA(1),c=oA(0),d=o9(r);if((d||!o)&&(("body"!==o4(r)||ie(i))&&(s=ic(r)),d)){let e=ix(r);u=iy(r),c.x=e.x+r.clientLeft,c.y=e.y+r.clientTop}let f=!i||d||o?oA(0):ik(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:o5,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e,o=[..."clippingAncestors"===n?it(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=ip(e,[],!1).filter(e=>o8(e)&&"body"!==o4(e)),a=null,o="fixed"===iu(e).position,i=o?id(e):e;for(;o8(i)&&!is(i);){let e=iu(i),t=ii(i),n=a?a.position:o?"fixed":"";t||"fixed"!==n&&("absolute"!==n||"static"!==e.position)?a=e:r=r.filter(e=>e!==i),i=id(i)}return t.set(e,r),r}(t,this._c):[].concat(n),r],i=ij(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=ij(t,o[e],a);l=o_(n.top,l),s=oE(n.right,s),u=oE(n.bottom,u),c=o_(n.left,c)}return{width:s-c,height:u-l,x:c,y:l}},getOffsetParent:iC,getElementRects:iN,getClientRects:function(e){return e.getClientRects?Array.from(e.getClientRects()):[]},getDimensions:function(e){let{width:t,height:n}=im(e);return{width:t,height:n}},getScale:iy,isElement:o8,isRTL:function(e){return"rtl"===iu(e).direction}};function iE(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}let i_=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}=oI(e,t)||{};if(null==u)return{};let d=oW(c),f={x:n,y:r},p=oD(o$(a)),h=oF(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=oE(d[g?"top":"left"],k),S=oE(d[g?"bottom":"right"],k),O=w-m[h]-S,C=w/2-m[h]/2+(v/2-b/2),N=o_(j,oE(C,O)),P=!s.arrow&&null!=oM(a)&&C!==N&&o.reference[h]/2-(C<j?j:S)-m[h]/2<0,E=P?C<j?C-j:C-O:0;return{[p]:f[p]+E,data:{[p]:N,centerOffset:C-N-E,...P&&{alignmentOffset:E}},reset:P}}});var iz="u">typeof document?m.useLayoutEffect:function(){};function iT(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(!iT(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)&&!iT(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function iA(e){return"u"<typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function iR(e,t){let n=iA(e);return Math.round(t*n)/n}function iI(e){let t=m.useRef(e);return iz(()=>{t.current=e}),t}var iL=Object.defineProperty,iM=(e,t)=>iL(e,"name",{value:t,configurable:!0}),iD="Popper",[iF,i$]=tP(iD),[iU,iH]=iF(iD),iB=iM(e=>{let{__scopePopper:t,children:n}=e,[r,a]=m.useState(null),[o,i]=m.useState(void 0);return(0,h.jsx)(iU,{scope:t,anchor:r,onAnchorChange:a,placementState:o,setPlacementState:i,children:n})},"Popper"),iK=m.forwardRef(iM(function(e,t){let{__scopePopper:n,virtualRef:r,...a}=e,o=iH("PopperAnchor",n),i=m.useRef(null),l=o.onAnchorChange,s=tn(t,m.useCallback(e=>{i.current=e,e&&l(e)},[l])),u=m.useRef(null);m.useEffect(()=>{if(!r)return;let e=u.current;u.current=r.current,e!==u.current&&l(u.current)});let c=o.placementState&&iQ(o.placementState),d=c?.[0],f=c?.[1];return r?null:(0,h.jsx)(tZ.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...a,ref:s})},"PopperAnchor")),iV="PopperContent",[iq,iW]=iF(iV),iZ=m.forwardRef(iM(function(e,t){var n,r,a,o,i,l,s,u,c,d,f,p,g,y,v,b,x,w,k,j,S;let O,C,N,P,E,_,{__scopePopper:z,side:T="bottom",sideOffset:A=0,align:R="center",alignOffset:I=0,arrowPadding:L=0,avoidCollisions:M=!0,collisionBoundary:D=[],collisionPadding:F=0,sticky:$="partial",hideWhenDetached:U=!1,updatePositionStrategy:H="optimized",onPlaced:B,...K}=e,V=iH(iV,z),[q,W]=m.useState(null),Z=tn(t,W),[G,J]=m.useState(null),Q=a1(G),Y=Q?.width??0,X=Q?.height??0,ee="number"==typeof F?F:{top:0,right:0,bottom:0,left:0,...F},et=Array.isArray(D)?D:[D],en=et.length>0,er={padding:ee,boundary:et.filter(iG),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]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=m.useState(r);iT(f,r)||p(r);let[h,g]=m.useState(null),[y,v]=m.useState(null),b=m.useCallback(e=>{e!==j.current&&(j.current=e,g(e))},[]),x=m.useCallback(e=>{e!==S.current&&(S.current=e,v(e))},[]),w=o||h,k=i||y,j=m.useRef(null),S=m.useRef(null),O=m.useRef(c),C=null!=s,N=iI(s),P=iI(a),E=iI(u),_=m.useCallback(()=>{var e,r;let a,o,i;if(!j.current||!S.current)return;let l={placement:t,strategy:n,middleware:f};P.current&&(l.platform=P.current),(e=j.current,r=S.current,a=new Map,o=null!=l?l:{},i={...iP,...o.platform,_c:a},oQ(e,r,{...o,platform:i})).then(e=>{let t={...e,isPositioned:!1!==E.current};z.current&&!iT(O.current,t)&&(O.current=t,tq.flushSync(()=>{d(t)}))})},[f,t,n,P,E]);iz(()=>{!1===u&&O.current.isPositioned&&(O.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[u]);let z=m.useRef(!1);iz(()=>(z.current=!0,()=>{z.current=!1}),[]),iz(()=>{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=m.useMemo(()=>({reference:j,floating:S,setReference:b,setFloating:x}),[b,x]),A=m.useMemo(()=>({reference:w,floating:k}),[w,k]),R=m.useMemo(()=>{let e={position:n,left:0,top:0};if(!A.floating)return e;let t=iR(A.floating,c.x),r=iR(A.floating,c.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...iA(A.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,l,A.floating,c.x,c.y]);return m.useMemo(()=>({...c,update:_,refs:T,elements:A,floatingStyles:R}),[c,_,T,A,R])}({strategy:"fixed",placement:T+("center"!==R?"-"+R:""),whileElementsMounted:iM((...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=ig(e),d=o||i?[...c?ip(c):[],...t?ip(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=o5(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:-oT(d)+"px "+-oT(o.clientWidth-(c+f))+"px "+-oT(o.clientHeight-(d+p))+"px "+-oT(c)+"px",threshold:o_(0,oE(1,s))||1},m=!0;function g(t){let n=t[0].intersectionRatio;if(!iE(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=o3(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?ix(e):null;return u&&function t(){let r=ix(e);m&&!iE(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:V.anchor},middleware:[{name:(O={name:"offset",options:a=n={mainAxis:A+X,alignmentAxis:I},async fn(e){var t,n;let{x:r,y:o,placement:i,middlewareData:l}=e,s=await o1(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}=oI(l,e),h={x:o,y:i},m=o$(s),g=oD(m),y=h[g],v=h[m],b=oI(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=o0.has(oL(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}=oI(c,e),u={x:t,y:n},d=await a.detectOverflow(e,s),f=o$(r),p=oD(f),h=u[p],m=u[f],g=(e,t)=>o_(t+d["y"===e?"top":"left"],oE(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}=oI(p,e);if(null!=(t=h.arrow)&&t.alignmentOffset)return{};let C=oL(f),N=o$(g),P=oL(g)===g,E=await (null==y.isRTL?void 0:y.isRTL(v.floating)),_=w||(P||!S?[oq(g)]:(u=oq(g),[oU(g),u,oU(u)])),z="none"!==j;!w&&z&&_.push(...(c=oM(g),d=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?oB:oH;return t?oH:oB;case"left":case"right":return t?oK:oV;default:return[]}}(oL(g),"start"===j,E),c&&(d=d.map(e=>e+"-"+c),S&&(d=d.concat(d.map(oU)))),d));let T=[g,..._],A=await y.detectOverflow(e,O),R=[],I=(null==(n=h.flip)?void 0:n.overflows)||[];if(b&&R.push(A[C]),x){let e,t,n,r,a=(i=f,l=m,void 0===(s=E)&&(s=!1),e=oM(i),n=oF(t=oD(o$(i))),r="x"===t?e===(s?"end":"start")?"right":"left":"start"===e?"bottom":"top",l.reference[n]>l.floating[n]&&(r=oq(r)),[r,oq(r)]);R.push(A[a[0]],A[a[1]])}if(I=[...I,{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===o$(t)||I.every(e=>o$(e.placement)!==N||e.overflows[0]>0)))return{data:{index:e,overflows:I},reset:{placement:t}};let n=null==(a=I.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=I.filter(e=>{if(z){let t=o$(e.placement);return t===N||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:o[0];e&&(n=e);break}case"initialPlacement":n=g}if(f!==n)return{reset:{placement:n}}}return{}}}).name,fn:N.fn,options:[d,f]},{name:(P={name:"size",options:v=g={...er,apply:iM(({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}=oI(v,e),u=await o.detectOverflow(e,s),c=oL(r),d=oM(r),f="y"===o$(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=oE(h-u[t],m),b=oE(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*o_(u.left,u.right):k=h-2*o_(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:P.fn,options:[g,y]},G&&{name:(E={name:"arrow",options:w=b={element:G,padding:L},fn(e){let{element:t,padding:n}="function"==typeof w?w(e):w;return t&&({}).hasOwnProperty.call(t,"current")?null!=t.current?i_({element:t.current,padding:n}).fn(e):{}:t?i_({element:t,padding:n}).fn(e):{}}}).name,fn:E.fn,options:[b,x]},iJ({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}=oI(S,e);switch(r){case"referenceHidden":{let r=oY(await n.detectOverflow(e,{...a,elementContext:"reference"}),t.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:oX(r)}}}case"escaped":{let r=oY(await n.detectOverflow(e,{...a,altBoundary:!0}),t.floating);return{data:{escapedOffsets:r,escaped:oX(r)}}}default:return{}}}}).name,fn:_.fn,options:[k,j]}]}),eu=V.setPlacementState;t_(()=>(eu(ei),()=>{eu(void 0)}),[ei,eu]);let[ec,ed]=iQ(ei),ef=tJ(B);t_(()=>{el&&ef?.()},[el,ef]);let ep=es.arrow?.x,eh=es.arrow?.y,em=es.arrow?.centerOffset!==0,[eg,ey]=m.useState();return t_(()=>{q&&ey(window.getComputedStyle(q).zIndex)},[q]),(0,h.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,h.jsx)(iq,{scope:z,placedSide:ec,placedAlign:ed,onArrowChange:J,arrowX:ep,arrowY:eh,shouldHideArrow:em,children:(0,h.jsx)(tZ.div,{"data-side":ec,"data-align":ed,...K,ref:Z,style:{...K.style,animation:el?K.style?.animation:"none"}})})})},"PopperContent"));function iG(e){return null!==e}iM(iG,"isNotNull");var iJ=iM(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]=iQ(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 iQ(e){let[t,n="center"]=e.split("-");return[t,n]}function iY(e){let t=m.useRef({value:e,previous:e});return m.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}iM(iQ,"getSideAndAlignFromPlacement"),(0,Object.defineProperty)(iY,"name",{value:"usePrevious",configurable:!0});var iX=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"}),i0=Object.defineProperty,i1=(e,t)=>i0(e,"name",{value:t,configurable:!0}),i2=[" ","Enter","ArrowUp","ArrowDown"],i4=[" ","Enter"],i3="Select",[i5,i6,i8]=om(i3),[i9,i7]=tP(i3,[i8,i$]),le=i$(),[lt,ln]=i9(i3),[lr,la]=i9(i3);function lo(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:g,internal_do_not_use_render:y}=e,v=le(t),[b,x]=m.useState(null),[w,k]=m.useState(null),[j,S]=m.useState(!1),O=oN(u),[C,N]=tH({prop:r,defaultProp:a??!1,onChange:o,caller:i3}),[P,E]=tH({prop:i,defaultProp:l,onChange:s,caller:i3}),_=m.useRef(null),z=m.useRef(P);m.useEffect(()=>{let e=g?b?.ownerDocument.getElementById(g):b?.form;if(e instanceof HTMLFormElement){let t=i1(()=>E(z.current),"reset");return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[g,b,E]);let T=!b||!!g||!!b.closest("form"),[A,R]=m.useState(new Set),I=tR(),L=Array.from(A).map(e=>e.props.value).join(";"),M=m.useCallback(e=>{R(t=>new Set(t).add(e))},[]),D=m.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:I,value:P,onValueChange:E,open:C,onOpenChange:N,dir:O,triggerPointerDownPosRef:_,disabled:f,name:c,autoComplete:d,form:g,nativeOptions:A,nativeSelectKey:L,isFormControl:T};return(0,h.jsx)(iB,{...v,children:(0,h.jsx)(lt,{scope:t,...F,children:(0,h.jsx)(i5.Provider,{scope:t,children:(0,h.jsx)(lr,{scope:t,onNativeOptionAdd:M,onNativeOptionRemove:D,children:lB(y)?y(F):n})})})})}i1(lo,"SelectProvider");var li=i1(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,h.jsx)(lo,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,h.jsxs)(h.Fragment,{children:[n,e?(0,h.jsx)(lH,{__scopeSelect:t}):null]})})},"Select"),ll=m.forwardRef(i1(function(e,t){let{__scopeSelect:n,disabled:r=!1,...a}=e,o=le(n),i=ln("SelectTrigger",n),l=i.disabled||r,s=tn(t,i.onTriggerChange),u=i6(n),c=m.useRef("touch"),[d,f,p]=lV(e=>{let t=u().filter(e=>!e.disabled),n=t.find(e=>e.value===i.value),r=lq(t,e,n);void 0!==r&&i.onValueChange(r.value)}),g=i1(e=>{l||(i.onOpenChange(!0),p()),e&&(i.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},"handleOpen");return(0,h.jsx)(iK,{asChild:!0,...o,children:(0,h.jsx)(tZ.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":lK(i.value)?"":void 0,...a,ref:s,onClick:tj(a.onClick,e=>{e.currentTarget.focus(),"mouse"!==c.current&&g(e)}),onPointerDown:tj(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&&(g(e),e.preventDefault())}),onKeyDown:tj(a.onKeyDown,e=>{let t=""!==d.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||f(e.key),(!t||" "!==e.key)&&i2.includes(e.key)&&(g(),e.preventDefault())})})})},"SelectTrigger")),ls=m.forwardRef(i1(function(e,t){let{__scopeSelect:n,className:r,style:a,children:o,placeholder:i="",...l}=e,s=ln("SelectValue",n),{onValueNodeHasChildrenChange:u}=s,c=void 0!==o,d=tn(t,s.onValueNodeChange);t_(()=>{u(c)},[u,c]);let f=lK(s.value);return(0,h.jsx)(tZ.span,{...l,asChild:!f&&l.asChild,ref:d,style:{pointerEvents:"none"},children:(0,h.jsx)(m.Fragment,{children:f?i:o},f?"placeholder":"value")})},"SelectValue")),lu=m.forwardRef(i1(function(e,t){let{__scopeSelect:n,children:r,...a}=e;return(0,h.jsx)(tZ.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})},"SelectIcon")),[lc,ld]=i9("SelectPortal",{forceMount:void 0}),lf=i1(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,h.jsx)(lc,{scope:e.__scopeSelect,forceMount:n,children:(0,h.jsx)(ng,{asChild:!0,...r})})},"SelectPortal"),lp="SelectContent",lh=m.forwardRef(i1(function(e,t){let n=ld(lp,e.__scopeSelect),{forceMount:r=n.forceMount,...a}=e,o=ln(lp,e.__scopeSelect),[i,l]=m.useState();return t_(()=>{l(new DocumentFragment)},[]),(0,h.jsx)(nx,{present:r||o.open,children:({present:e})=>e?(0,h.jsx)(lb,{...a,ref:t}):(0,h.jsx)(lm,{...a,fragment:i})})},"SelectContent")),lm=m.forwardRef(i1(function(e,t){let{__scopeSelect:n,children:r,fragment:a}=e;return a?tq.createPortal((0,h.jsx)(lg,{scope:n,children:(0,h.jsx)(i5.Slot,{scope:n,children:(0,h.jsx)("div",{ref:t,children:r})})}),a):null},"SelectContentFragment")),[lg,ly]=i9(lp),lv=to("SelectContent.RemoveScroll"),lb=m.forwardRef(i1(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:g,hideWhenDetached:y,avoidCollisions:v,...b}=e,x=ln(lp,n),[w,k]=m.useState(null),[j,S]=m.useState(null),O=tn(t,k),[C,N]=m.useState(null),[P,E]=m.useState(null),_=i6(n),[z,T]=m.useState(!1),A=m.useRef(!1);m.useEffect(()=>{if(w)return rp(w)},[w]),n_();let R=m.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]),I=m.useCallback(()=>R([C,w]),[R,C,w]);m.useEffect(()=>{z&&I()},[z,I]);let{onOpenChange:L,triggerPointerDownPosRef:M}=x;m.useEffect(()=>{if(w){let e={x:0,y:0},t=i1(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=i1(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(w)||L(!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,L,M]),m.useEffect(()=>{let e=i1(()=>L(!1),"close");return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[L]);let[D,F]=lV(e=>{let t=_().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=lq(t,e,n);r&&setTimeout(()=>r.ref.current?.focus())}),$=m.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=m.useCallback(()=>w?.focus(),[w]),H=m.useCallback((e,t,n)=>{let r=!A.current&&!n;(void 0!==x.value&&x.value===t||r)&&E(e)},[x.value]),B="popper"===r?lw:lx;return(0,h.jsx)(lg,{scope:n,content:w,viewport:j,onViewportChange:S,itemRefCallback:$,selectedItem:C,onItemLeave:U,itemTextRefCallback:H,focusSelectedItem:I,selectedItemText:P,position:r,isPositioned:z,searchRef:D,children:(0,h.jsx)(ri,{as:lv,allowPinchZoom:!0,children:(0,h.jsx)(nr,{asChild:!0,trapped:x.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:tj(a,e=>{x.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,h.jsx)(t1,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:(0,h.jsx)(B,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:e=>e.preventDefault(),...b,...B===lw?{side:l,sideOffset:s,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:g,hideWhenDetached:y,avoidCollisions:v}:{},onPlaced:()=>T(!0),ref:O,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:tj(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")),lx=m.forwardRef(i1(function(e,t){let{__scopeSelect:n,onPlaced:r,...a}=e,o=ln(lp,n),i=ly(lp,n),[l,s]=m.useState(null),[u,c]=m.useState(null),d=tn(t,c),f=i6(n),p=m.useRef(!1),g=m.useRef(!0),{viewport:y,selectedItem:v,selectedItemText:b,focusSelectedItem:x}=i,w=m.useCallback(()=>{if(o.trigger&&o.valueNode&&l&&u&&y&&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=of(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=of(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=y.scrollHeight,d=window.getComputedStyle(u),h=parseInt(d.borderTopWidth,10),m=parseInt(d.paddingTop,10),g=parseInt(d.borderBottomWidth,10),x=h+m+c+parseInt(d.paddingBottom,10)+g,w=Math.min(5*v.offsetHeight,x),k=window.getComputedStyle(y),j=parseInt(k.paddingTop,10),S=parseInt(k.paddingBottom,10),O=e.top+e.height/2-10,C=v.offsetHeight/2,N=h+m+(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-y.offsetTop-y.offsetHeight)+g);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+y.offsetTop+(e?j:0)+C);l.style.height=t+(x-N)+"px",y.scrollTop=N-O+y.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,y,v,b,o.dir,r]);t_(()=>w(),[w]);let[k,j]=m.useState();t_(()=>{u&&j(window.getComputedStyle(u).zIndex)},[u]);let S=m.useCallback(e=>{e&&!0===g.current&&(w(),x?.(),g.current=!1)},[w,x]);return(0,h.jsx)(lk,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:p,onScrollButtonChange:S,children:(0,h.jsx)("div",{ref:s,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:(0,h.jsx)(tZ.div,{...a,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})},"SelectItemAlignedPosition")),lw=m.forwardRef(i1(function(e,t){let{__scopeSelect:n,align:r="start",collisionPadding:a=10,...o}=e,i=le(n);return(0,h.jsx)(iZ,{...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")),[lk,lj]=i9(lp,{}),lS="SelectViewport",lO=m.forwardRef(i1(function(e,t){let{__scopeSelect:n,nonce:r,...a}=e,o=ly(lS,n),i=lj(lS,n),l=tn(t,o.onViewportChange),s=m.useRef(0);return(0,h.jsxs)(h.Fragment,{children:[(0,h.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,h.jsx)(i5.Slot,{scope:n,children:(0,h.jsx)(tZ.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:tj(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")),[lC,lN]=i9("SelectGroup"),lP=m.forwardRef(i1(function(e,t){let{__scopeSelect:n,...r}=e,a=lN("SelectLabel",n);return(0,h.jsx)(tZ.div,{id:a.id,...r,ref:t})},"SelectLabel")),lE="SelectItem",[l_,lz]=i9(lE),lT=m.forwardRef(i1(function(e,t){let{__scopeSelect:n,value:r,disabled:a=!1,textValue:o,...i}=e,l=ln(lE,n),s=ly(lE,n),u=l.value===r,[c,d]=m.useState(o??""),[f,p]=m.useState(!1),g=tn(t,tJ(e=>s.itemRefCallback?.(e,r,a))),y=tR(),v=m.useRef("touch"),b=i1(()=>{a||(l.onValueChange(r),l.onOpenChange(!1))},"handleSelect");return(0,h.jsx)(l_,{scope:n,value:r,disabled:a,textId:y,isSelected:u,onItemTextChange:m.useCallback(e=>{d(t=>t||(e?.textContent??"").trim())},[]),children:(0,h.jsx)(i5.ItemSlot,{scope:n,value:r,disabled:a,textValue:c,children:(0,h.jsx)(tZ.div,{role:"option","aria-labelledby":y,"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:g,onFocus:tj(i.onFocus,()=>p(!0)),onBlur:tj(i.onBlur,()=>p(!1)),onClick:tj(i.onClick,()=>{"mouse"!==v.current&&b()}),onPointerUp:tj(i.onPointerUp,()=>{"mouse"===v.current&&b()}),onPointerDown:tj(i.onPointerDown,e=>{v.current=e.pointerType}),onPointerMove:tj(i.onPointerMove,e=>{v.current=e.pointerType,a?s.onItemLeave?.():"mouse"===v.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:tj(i.onPointerLeave,e=>{e.currentTarget===document.activeElement&&s.onItemLeave?.()}),onKeyDown:tj(i.onKeyDown,e=>{a||e.target!==e.currentTarget||(s.searchRef?.current===""||" "!==e.key)&&(i4.includes(e.key)&&b()," "===e.key&&e.preventDefault())})})})})},"SelectItem")),lA="SelectItemText",lR=m.forwardRef(i1(function(e,t){let{__scopeSelect:n,className:r,style:a,...o}=e,i=ln(lA,n),l=ly(lA,n),s=lz(lA,n),u=la(lA,n),[c,d]=m.useState(null),f=tJ(e=>l.itemTextRefCallback?.(e,s.value,s.disabled)),p=tn(t,d,s.onItemTextChange,f),g=c?.textContent,y=m.useMemo(()=>(0,h.jsx)("option",{value:s.value,disabled:s.disabled,children:g},s.value),[s.disabled,s.value,g]),{onNativeOptionAdd:v,onNativeOptionRemove:b}=u;return t_(()=>(v(y),()=>b(y)),[v,b,y]),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(tZ.span,{id:s.textId,...o,ref:p}),s.isSelected&&i.valueNode&&!i.valueNodeHasChildren&&!lK(i.value)?tq.createPortal(o.children,i.valueNode):null]})},"SelectItemText")),lI=m.forwardRef(i1(function(e,t){let{__scopeSelect:n,...r}=e;return lz("SelectItemIndicator",n).isSelected?(0,h.jsx)(tZ.span,{"aria-hidden":!0,...r,ref:t}):null},"SelectItemIndicator")),lL="SelectScrollUpButton",lM=m.forwardRef(i1(function(e,t){let n=ly(lL,e.__scopeSelect),r=lj(lL,e.__scopeSelect),[a,o]=m.useState(!1),i=tn(t,r.onScrollButtonChange);return t_(()=>{if(n.viewport&&n.isPositioned){let e=function(){o(t.scrollTop>0)};i1(e,"handleScroll");let t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),a?(0,h.jsx)(l$,{...e,ref:i,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null},"SelectScrollUpButton")),lD="SelectScrollDownButton",lF=m.forwardRef(i1(function(e,t){let n=ly(lD,e.__scopeSelect),r=lj(lD,e.__scopeSelect),[a,o]=m.useState(!1),i=tn(t,r.onScrollButtonChange);return t_(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;o(Math.ceil(t.scrollTop)<e)};i1(e,"handleScroll");let t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),a?(0,h.jsx)(l$,{...e,ref:i,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null},"SelectScrollDownButton")),l$=m.forwardRef(i1(function(e,t){let{__scopeSelect:n,onAutoScroll:r,...a}=e,o=ly("SelectScrollButton",n),i=m.useRef(null),l=i6(n),s=m.useCallback(()=>{null!==i.current&&(window.clearInterval(i.current),i.current=null)},[]);return m.useEffect(()=>()=>s(),[s]),t_(()=>{let e=l().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[l]),(0,h.jsx)(tZ.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:tj(a.onPointerDown,()=>{null===i.current&&(i.current=window.setInterval(r,50))}),onPointerMove:tj(a.onPointerMove,()=>{o.onItemLeave?.(),null===i.current&&(i.current=window.setInterval(r,50))}),onPointerLeave:tj(a.onPointerLeave,()=>{s()})})},"SelectScrollButtonImpl")),lU=m.forwardRef(i1(function(e,t){let{__scopeSelect:n,...r}=e;return(0,h.jsx)(tZ.div,{"aria-hidden":!0,...r,ref:t})},"SelectSeparator")),lH=m.forwardRef(i1(function({__scopeSelect:e,...t},n){let r=ln("SelectBubbleInput",e),{value:a,onValueChange:o,required:i,disabled:l,name:s,autoComplete:u,form:c}=r,{nativeOptions:d,nativeSelectKey:f}=r,p=m.useRef(null),g=tn(n,p),y=a??"",v=iY(y),b=Array.from(d).some(e=>(e.props.value??"")==="");return m.useEffect(()=>{let e=p.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(v!==y&&t){let n=new Event("change",{bubbles:!0});t.call(e,y),e.dispatchEvent(n)}},[v,y]),(0,h.jsxs)(tZ.select,{"aria-hidden":!0,required:i,tabIndex:-1,name:s,autoComplete:u,disabled:l,form:c,onChange:e=>o(e.target.value),...t,style:{...iX,...t.style},ref:g,defaultValue:y,children:[lK(a)&&!b?(0,h.jsx)("option",{value:""}):null,Array.from(d)]},f)},"SelectBubbleInput"));function lB(e){return"function"==typeof e}function lK(e){return""===e||void 0===e}function lV(e){let t=tJ(e),n=m.useRef(""),r=m.useRef(0),a=m.useCallback(e=>{t(n.current+e)},[t]),o=m.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return m.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,a,o]}function lq(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=lW(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 lW(e,t){return e.map((n,r)=>e[(t+r)%e.length])}i1(lB,"isFunction"),i1(lK,"shouldShowPlaceholder"),i1(lV,"useTypeaheadSearch"),i1(lq,"findNextItem"),i1(lW,"wrapArray");let lZ=j("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);function lG(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 lJ(e){if(Array.isArray(e))return e}function lQ(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function lY(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 lX(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 l0(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 l1(e,t){return lJ(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)||l4(e,t)||lQ()}function l2(e){return lJ(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||l4(e)||lQ()}function l4(e,t){if(e){if("string"==typeof e)return lG(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 lG(e,t)}}var l3=m.forwardRef(function(e,t){var n=l2([e,t]),r=n[0],a=n.slice(1),o=r.className,i=r.children,l=l0(r,["className","children"]),s=l1(a,1)[0];return(0,h.jsxs)(ll,lX(lY({ref:s,"data-slot":"select-trigger",className:eZ("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,h.jsx)(lu,{asChild:!0,children:(0,h.jsx)(N,{className:"size-4 shrink-0 text-muted-foreground"})})]}))});l3.displayName=ll.displayName;var l5=m.forwardRef(function(e,t){var n=l2([e,t]),r=n[0],a=n.slice(1),o=r.className,i=l0(r,["className"]),l=l1(a,1)[0];return(0,h.jsx)(lM,lX(lY({ref:l,className:eZ("flex cursor-default items-center justify-center py-1",o)},i),{children:(0,h.jsx)(lZ,{className:"size-4"})}))});l5.displayName=lM.displayName;var l6=m.forwardRef(function(e,t){var n=l2([e,t]),r=n[0],a=n.slice(1),o=r.className,i=l0(r,["className"]),l=l1(a,1)[0];return(0,h.jsx)(lF,lX(lY({ref:l,className:eZ("flex cursor-default items-center justify-center py-1",o)},i),{children:(0,h.jsx)(N,{className:"size-4"})}))});l6.displayName=lF.displayName;var l8=m.forwardRef(function(e,t){var n=l2([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=l0(r,["className","children","position","sideOffset"]),d=l1(a,1)[0];return(0,h.jsx)(lf,{children:(0,h.jsxs)(lh,lX(lY({ref:d,"data-slot":"select-content",position:s,sideOffset:void 0===u?6:u,className:eZ("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,h.jsx)(l5,{}),(0,h.jsx)(lO,{className:eZ("p-1.5","popper"===s&&"w-full min-w-[var(--radix-select-trigger-width)]"),children:i}),(0,h.jsx)(l6,{})]}))})});l8.displayName=lh.displayName,m.forwardRef(function(e,t){var n=l2([e,t]),r=n[0],a=n.slice(1),o=r.className,i=l0(r,["className"]),l=l1(a,1)[0];return(0,h.jsx)(lP,lY({ref:l,className:eZ("px-2 py-1.5 text-xs font-semibold text-muted-foreground",o)},i))}).displayName=lP.displayName;var l9=m.forwardRef(function(e,t){var n=l2([e,t]),r=n[0],a=n.slice(1),o=r.className,i=r.children,l=l0(r,["className","children"]),s=l1(a,1)[0];return(0,h.jsxs)(lT,lX(lY({ref:s,"data-slot":"select-item",className:eZ("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,h.jsx)(lR,{children:i}),(0,h.jsx)("span",{className:"absolute right-2 flex size-4 items-center justify-center text-primary",children:(0,h.jsx)(lI,{children:(0,h.jsx)(ol,{className:"size-4",strokeWidth:2.5})})})]}))});function l7(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 se(e,t){if(e){if("string"==typeof e)return l7(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 l7(e,t)}}function st(e){var t,n=e.preview,r=e.conflictPolicy,a=e.restoreActive,o=e.stale,i=e.pending,l=e.canImport,s=e.onPolicyChange,u=e.onRestoreActiveChange,c=e.onConfirm,d=e.meta,f=e.idPrefix,p=(0,v.Bd)().t,g=function(e){if(Array.isArray(e))return e}(t=(0,m.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)||se(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),y=g[0],b=g[1],x=o?null: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}}(p,n.codexActivationAuthEffect);return(0,h.jsxs)("div",{className:"space-y-4 rounded-xl border bg-card p-4",children:[d?(0,h.jsx)("div",{className:"flex flex-wrap items-center justify-between gap-2 border-b pb-3 text-xs text-muted-foreground",children:d}):null,(0,h.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,h.jsx)(eJ,{children:p("transfer.profileCount",{count:n.profileCount})}),(0,h.jsx)(eJ,{variant:"secondary",children:p("transfer.providerCount",{count:n.providerCount})}),(0,h.jsx)(eJ,{variant:n.conflicts.length>0?"outline":"secondary",children:p("transfer.conflictCount",{count:n.conflicts.length})}),(0,h.jsx)(eJ,{variant:"secondary",children:p("transfer.activeCount",{count:n.activeCount})})]}),(0,h.jsx)("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-xs text-muted-foreground",children:n.harnesses.map(function(e){return(0,h.jsx)("span",{children:p("transfer.harnessProfiles",{harness:T.RP[e.harness],count:e.profiles})},e.harness)})}),n.conflicts.length>0?(0,h.jsxs)("div",{className:"space-y-1 rounded-xl bg-amber-500/10 px-3 py-2 text-xs leading-relaxed text-amber-700 dark:text-amber-300",children:[(0,h.jsx)("p",{children:p("transfer.conflictList",{items:n.conflicts.map(function(e){return"".concat(T.RP[e.harness]," / ").concat(e.name)}).join(p("common.listSeparator"))})}),(0,h.jsx)("p",{children:p("transfer.currentPolicy",{policy:"skip"===r?p("transfer.policySkip"):p("transfer.policyOverwrite")})})]}):null,x?(0,h.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:x}):null,o?(0,h.jsx)("p",{className:"text-xs text-amber-700 dark:text-amber-300",children:p("transfer.previewStale")}):null,(0,h.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,h.jsxs)("div",{className:"space-y-2",children:[(0,h.jsx)(od,{htmlFor:"".concat(f,"-conflict-policy"),children:p("transfer.conflictPolicy")}),(0,h.jsxs)(li,{value:r,onValueChange:function(e){return s(e)},children:[(0,h.jsx)(l3,{id:"".concat(f,"-conflict-policy"),children:(0,h.jsx)(ls,{})}),(0,h.jsxs)(l8,{children:[(0,h.jsx)(l9,{value:"skip",children:p("transfer.policySkip")}),(0,h.jsx)(l9,{value:"overwrite",children:p("transfer.policyOverwrite")})]})]})]}),(0,h.jsxs)("label",{className:"flex cursor-pointer items-center gap-3 rounded-xl border px-3 py-2 text-sm",children:[(0,h.jsx)(os,{checked:a,onCheckedChange:function(e){return u(!0===e)}}),p("transfer.restoreActive")]})]}),(0,h.jsxs)(tb,{type:"button",disabled:!l,onClick:function(){return b(!0)},children:[(0,h.jsx)(aP,{}),o?p("transfer.recheckNeeded"):i?p("transfer.importing"):p("transfer.confirmImport")]}),(0,h.jsx)(aI,{open:y,onOpenChange:b,children:(0,h.jsxs)(aZ,{children:[(0,h.jsxs)(aG,{children:[(0,h.jsx)(aQ,{children:x?p("transfer.confirmAuthTitle"):p("transfer.confirmTitle")}),(0,h.jsxs)(aY,{children:[p("transfer.confirmBody",{count:n.profileCount}),"overwrite"===r&&n.conflicts.length>0?p("transfer.confirmOverwrite",{count:n.conflicts.length}):p("transfer.confirmKeep"),x?" ".concat(x):null]})]}),(0,h.jsxs)(aJ,{children:[(0,h.jsx)(a0,{children:p("common.cancel")}),(0,h.jsx)(aX,{onClick:function(){b(!1),c()},children:x?p("transfer.proceedAware"):"overwrite"===r?p("transfer.proceedOverwrite"):p("transfer.proceedSafe")})]})]})})]})}function sn(e,t){var n,r=[e("transfer.importedCount",{count:t.imported})];return t.overwritten>0&&r.push(e("transfer.overwrittenCount",{count:t.overwritten})),t.providersCopied>0&&r.push(e("transfer.providersCopiedCount",{count:t.providersCopied})),t.skipped>0&&r.push(e("transfer.skippedCount",{count:t.skipped})),t.activeRestored>0&&r.push(e("transfer.activeRestoredCount",{count:t.activeRestored})),r.push(e(t.codexLoginCacheMigrated?"transfer.cacheMigrated":"transfer.cacheNotMigrated")),[{key:"transfer.importedSummary",params:{parts:r.join(e("common.listSeparator"))}}].concat(function(e){if(Array.isArray(e))return l7(e)}(n=t.warnings.map(function(e){return al(e)}))||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||se(n)||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){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,h.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:eZ("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))}function sa(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 so(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 si(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function i(e){so(o,r,a,i,l,"next",e)}function l(e){so(o,r,a,i,l,"throw",e)}i(void 0)})}}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 sa(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 sa(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,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 su(e){var t=e.fetchPreview,n=e.runImport,r=e.onImported,a=sl((0,m.useState)(null),2),o=a[0],i=a[1],l=sl((0,m.useState)(!1),2),s=l[0],u=l[1],c=sl((0,m.useState)("skip"),2),d=c[0],f=c[1],p=sl((0,m.useState)(!0),2),h=p[0],g=p[1],y=sl((0,m.useState)(null),2),v=y[0],b=y[1],x=sl((0,m.useState)(null),2),w=x[0],k=x[1],j=(0,m.useCallback)(function(){i(null),u(!1)},[]),S=(0,m.useCallback)(function(){j(),k(null),b(null)},[j]),O=(0,m.useCallback)(function(){return si(function(){var e;return ss(this,function(n){switch(n.label){case 0:b("preview"),k(null),n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,t({conflictPolicy:d,restoreActive:h})];case 2:return i(n.sent()),u(!1),[3,5];case 3:return e=n.sent(),i(null),k(as(e)),[3,5];case 4:return b(null),[7];case 5:return[2]}})})()},[t,d,h]),C=(0,m.useCallback)(function(){return si(function(){var e;return ss(this,function(t){switch(t.label){case 0:if(!o||s)return[2];b("import"),k(null),t.label=1;case 1:return t.trys.push([1,4,5,6]),[4,n({conflictPolicy:d,restoreActive:h})];case 2:return e=t.sent(),j(),[4,r(e)];case 3:return t.sent(),[3,6];case 4:return k(as(t.sent())),[3,6];case 5:return b(null),[7];case 6:return[2]}})})()},[o,s,n,d,h,j,r]),N=(null==o?void 0:o.conflictPolicy)===d&&(null==o?void 0:o.restoreActive)===h;return{preview:o,conflictPolicy:d,restoreActive:h,pending:v,error:w,setError:k,stale:s||null!==o&&!N,canImport:null!==o&&N&&!s&&null===v,inspect:O,confirm:C,invalidate:j,reset:S,changePolicy:(0,m.useCallback)(function(e){f(e),u(!0)},[]),changeRestoreActive:(0,m.useCallback)(function(e){g(e),u(!0)},[])}}function sc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function sd(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 sf(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function i(e){sd(o,r,a,i,l,"next",e)}function l(e){sd(o,r,a,i,l,"throw",e)}i(void 0)})}}function sp(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 sh(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,a=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],i=!0,l=!1;try{for(a=a.call(e);!(i=(n=a.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){l=!0,r=e}finally{try{i||null==a.return||a.return()}finally{if(l)throw r}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return sc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sc(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sm(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 sg(e){var t=e.onDone,n=(0,v.Bd)().t,r=ab(function(e){return e.loadHarnesses}),a=ab(function(e){return e.setNotice}),o=(0,m.useRef)(null),i=sh((0,m.useState)("import"),2),l=i[0],s=i[1],u=sh((0,m.useState)(""),2),c=u[0],d=u[1],f=sh((0,m.useState)(""),2),p=f[0],g=f[1],y=sh((0,m.useState)(!1),2),b=y[0],x=y[1],w=sh((0,m.useState)(null),2),k=w[0],j=w[1],S=sh((0,m.useState)(null),2),O=S[0],C=S[1],N=sh((0,m.useState)(null),2),P=N[0],E=N[1],_=sh((0,m.useState)(""),2),z=_[0],T=_[1],A=sh((0,m.useState)(""),2),R=A[0],I=A[1],L=sh((0,m.useState)(null),2),M=L[0],D=L[1],F=su({fetchPreview:function(e){return at("/api/transfer/preview",{method:"POST",body:JSON.stringify(sp({envelope:P,passphrase:R},e))})},runImport:function(e){var t,n;return at("/api/transfer/import",{method:"POST",body:JSON.stringify((t=sp({envelope:P,passphrase:R},e),n=n={migrateCodexLoginCache:!0},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))})},onImported:function(e){return sf(function(){return sm(this,function(o){switch(o.label){case 0:return[4,r()];case 1:return o.sent(),a(sn(n,e)),t(),[2]}})})()}}),$=c.length>=8&&c===p&&!b,U=null!==P&&R.length>=8&&null===F.pending,H="export"===l?k:null!=M?M:F.error;return(0,h.jsxs)("div",{className:"space-y-5",children:[(0,h.jsx)("div",{className:"grid grid-cols-2 rounded-lg bg-muted p-1",children:["import","export"].map(function(e){return(0,h.jsxs)("button",{type:"button","aria-pressed":l===e,className:l===e?"flex items-center justify-center gap-2 rounded-md bg-background py-1.5 text-sm font-medium text-foreground shadow-sm":"flex cursor-pointer items-center justify-center gap-2 rounded-md py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:text-foreground",onClick:function(){return s(e)},children:["import"===e?(0,h.jsx)(aP,{className:"size-4"}):(0,h.jsx)(aE,{className:"size-4"}),"import"===e?n("transfer.importTitle"):n("transfer.exportTitle")]},e)})}),"export"===l?(0,h.jsxs)("div",{className:"space-y-4",children:[(0,h.jsx)("p",{className:"text-sm leading-relaxed text-muted-foreground",children:n("transfer.exportIntro")}),(0,h.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,h.jsxs)("div",{className:"space-y-2",children:[(0,h.jsx)(od,{htmlFor:"export-passphrase",children:n("transfer.passphrase")}),(0,h.jsx)(sr,{id:"export-passphrase",type:"password",autoComplete:"new-password",value:c,onChange:function(e){return d(e.target.value)},placeholder:n("transfer.passphrasePlaceholder",{min:8})})]}),(0,h.jsxs)("div",{className:"space-y-2",children:[(0,h.jsx)(od,{htmlFor:"export-passphrase-confirm",children:n("transfer.passphraseConfirm")}),(0,h.jsx)(sr,{id:"export-passphrase-confirm",type:"password",autoComplete:"new-password",value:p,onChange:function(e){return g(e.target.value)},placeholder:n("transfer.passphraseConfirmPlaceholder")})]})]}),p&&c!==p?(0,h.jsx)("p",{className:"text-xs text-destructive",children:n("transfer.passphraseMismatch")}):null,(0,h.jsxs)(tb,{type:"button",onClick:function(){sf(function(){return sm(this,function(e){switch(e.label){case 0:x(!0),j(null),C(null),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,at("/api/transfer/export",{method:"POST",body:JSON.stringify({passphrase:c,includeCodexLoginCache:!0})})];case 2:var t,r,a,o,i;return t=e.sent(),r=new Date().toISOString().slice(0,10),a=new Blob(["".concat(JSON.stringify(t,null,2),"\n")],{type:"application/json"}),o=URL.createObjectURL(a),(i=document.createElement("a")).href=o,i.download="harness-switch-".concat(r,".hsw-backup"),i.click(),URL.revokeObjectURL(o),C(n("transfer.exported")),[3,5];case 3:return j(as(e.sent())),[3,5];case 4:return x(!1),[7];case 5:return[2]}})})()},disabled:!$,children:[(0,h.jsx)(aE,{}),b?n("transfer.encrypting"):n("transfer.download")]})]}):(0,h.jsxs)("div",{className:"space-y-4",children:[(0,h.jsx)("p",{className:"text-sm leading-relaxed text-muted-foreground",children:n("transfer.importIntro")}),(0,h.jsx)("input",{ref:o,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],sf(function(){var e,t,r;return sm(this,function(a){switch(a.label){case 0:if(F.reset(),D(null),C(null),!n)return E(null),T(""),[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 D({key:"transfer.notAnExport"}),E(null),T(""),[2];return E(e),T(n.name),[3,4];case 3:return r=a.sent(),E(null),T(""),D(as(r)),[3,4];case 4:return[2]}})})()}}),(0,h.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=o.current)?void 0:e.click()},children:[(0,h.jsx)(aC,{className:"size-5 text-primary"}),(0,h.jsxs)("span",{className:"min-w-0",children:[(0,h.jsx)("span",{className:"block truncate text-sm font-medium",children:z||n("transfer.pickFile")}),(0,h.jsx)("span",{className:"mt-0.5 block text-xs text-muted-foreground",children:n("transfer.pickFileHint")})]})]}),(0,h.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-end",children:[(0,h.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,h.jsx)(od,{htmlFor:"import-passphrase",children:n("transfer.passphrase")}),(0,h.jsx)(sr,{id:"import-passphrase",type:"password",value:R,onChange:function(e){I(e.target.value),F.invalidate()},placeholder:n("transfer.importPassphrasePlaceholder")})]}),(0,h.jsx)(tb,{type:"button",variant:"outline",disabled:!U,onClick:function(){F.inspect()},children:"preview"===F.pending?n("transfer.inspecting"):n("transfer.inspect")})]}),F.preview?(0,h.jsx)(st,{idPrefix:"file",preview:F.preview,conflictPolicy:F.conflictPolicy,restoreActive:F.restoreActive,stale:F.stale,pending:"import"===F.pending,canImport:F.canImport,onPolicyChange:F.changePolicy,onRestoreActiveChange:F.changeRestoreActive,onConfirm:function(){F.confirm()}}):null]}),O?(0,h.jsx)("p",{className:"text-sm text-emerald-600 dark:text-emerald-400",children:O}):null,H?(0,h.jsx)("p",{className:"text-sm text-destructive",children:ad(n,H)}):null]})}l9.displayName=lT.displayName,m.forwardRef(function(e,t){var n=l2([e,t]),r=n[0],a=n.slice(1),o=r.className,i=l0(r,["className"]),l=l1(a,1)[0];return(0,h.jsx)(lU,lY({ref:l,className:eZ("-mx-1 my-1 h-px bg-border",o)},i))}).displayName=lU.displayName;let sy=j("github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]),sv=j("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"}]]),sb=j("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]),sx=j("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"}]]),sw=j("cloud-upload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]),sk=j("cloud-download",[["path",{d:"M12 13v8l-4-4",key:"1f5nwf"}],["path",{d:"m12 21 4-4",key:"1lfcce"}],["path",{d:"M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284",key:"ui1hmy"}]]),sj=j("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"}]]),sS=j("key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);function sO(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 sC(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 sN(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function i(e){sC(o,r,a,i,l,"next",e)}function l(e){sC(o,r,a,i,l,"throw",e)}i(void 0)})}}function sP(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 sE(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 sO(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 sO(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 s_(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 sz(e){var t=e.onDone,n=(0,v.Bd)().t,r=(0,v.s9)().locale,a=ab(function(e){return e.loadHarnesses}),o=ab(function(e){return e.setNotice}),i=sE((0,m.useState)(null),2),l=i[0],s=i[1],u=sE((0,m.useState)(!1),2),c=u[0],d=u[1],f=sE((0,m.useState)(null),2),p=f[0],g=f[1],y=sE((0,m.useState)(null),2),b=y[0],x=y[1],w=sE((0,m.useState)("device"),2),k=w[0],j=w[1],S=sE((0,m.useState)("push"),2),O=S[0],C=S[1],N=sE((0,m.useState)(null),2),P=N[0],z=N[1],T=sE((0,m.useState)(!1),2),A=T[0],R=T[1],I=sE((0,m.useState)(!1),2),L=I[0],M=I[1],D=sE((0,m.useState)(!1),2),F=D[0],$=D[1],U=sE((0,m.useState)(!1),2),H=U[0],B=U[1],K=sE((0,m.useState)(5),2),V=K[0],q=K[1],W=(0,m.useRef)(null),Z=sE((0,m.useState)(""),2),G=Z[0],J=Z[1],Q=sE((0,m.useState)(!1),2),Y=Q[0],X=Q[1],ee=sE((0,m.useState)(""),2),et=ee[0],en=ee[1],er=sE((0,m.useState)(!1),2),ea=er[0],eo=er[1],ei=sE((0,m.useState)(""),2),el=ei[0],es=ei[1],eu=sE((0,m.useState)(null),2),ec=eu[0],ed=eu[1],ef=su({fetchPreview:function(e){return sN(function(){var t;return s_(this,function(n){switch(n.label){case 0:return[4,at("/api/github/pull/preview",{method:"POST",body:JSON.stringify(sP({passphrase:el},e))})];case 1:return ed((t=n.sent()).gistUpdatedAt),[2,t.preview]}})})()},runImport:function(e){var t,n;return at("/api/github/pull",{method:"POST",body:JSON.stringify((t=sP({passphrase:el},e),n=n={migrateCodexLoginCache:!0},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))})},onImported:function(e){return sN(function(){return s_(this,function(r){switch(r.label){case 0:return[4,a()];case 1:return r.sent(),o(sn(n,e)),t(),[2]}})})()}});function ep(){W.current&&(clearInterval(W.current),W.current=null),$(!1)}function eh(){return sN(function(){return s_(this,function(e){switch(e.label){case 0:d(!0),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,at("/api/github/status")];case 2:return s.apply(void 0,[e.sent()]),[3,5];case 3:return g(as(e.sent())),[3,5];case 4:return d(!1),[7];case 5:return[2]}})})()}function em(){return sN(function(){var e;return s_(this,function(t){switch(t.label){case 0:M(!0),g(null),x(null),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,at("/api/github/device/code",{method:"POST",body:JSON.stringify({})})];case 2:return z(e=t.sent()),ey(e.deviceCode,e.interval),[3,5];case 3:return g(as(t.sent())),[3,5];case 4:return M(!1),[7];case 5:return[2]}})})()}function eg(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return sN(function(){var n,r,a,o;return s_(this,function(i){switch(i.label){case 0:if(!(n=e||(null==P?void 0:P.deviceCode)))return[2];t&&(B(!0),g(null),x(null)),i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,at("/api/github/device/poll",{method:"POST",body:JSON.stringify({deviceCode:n})})];case 2:return"authorized"===(r=i.sent()).status?(ep(),z(null),x({key:"githubSync.authorized",params:{user:null!=(a=r.username)?a:""}}),eh()):"expired"===r.status?(ep(),g(r.error?as(r.error):{key:"githubSync.codeExpired"})):"error"===r.status?(ep(),g(r.error?as(r.error):{key:"githubSync.authFailed"})):"pending"===r.status&&r.interval&&r.interval>5&&(q(r.interval),ey(n,r.interval)),[3,5];case 3:return o=i.sent(),t&&g(as(o)),[3,5];case 4:return t&&B(!1),[7];case 5:return[2]}})})()}function ey(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;W.current&&clearInterval(W.current),$(!0),q(t),W.current=setInterval(function(){eg(e,!1)},1e3*Math.max(t,5))}function ev(){(null==P?void 0:P.userCode)&&(navigator.clipboard.writeText(P.userCode),R(!0),setTimeout(function(){return R(!1)},2e3))}return(0,m.useEffect)(function(){return eh(),function(){W.current&&clearInterval(W.current)}},[]),(0,h.jsxs)("div",{className:"space-y-5",children:[p?(0,h.jsx)("div",{className:"rounded-lg border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive",children:ad(n,p)}):null,b?(0,h.jsx)("div",{className:"rounded-lg border border-emerald-500/40 bg-emerald-500/10 p-3 text-sm text-emerald-600 dark:text-emerald-400",children:ad(n,b)}):null,(null==l?void 0:l.connected)?(0,h.jsxs)("div",{className:"space-y-5",children:[(0,h.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-4 rounded-xl border bg-muted/40 p-4",children:[(0,h.jsxs)("div",{className:"flex items-center gap-3",children:[l.avatarUrl?(0,h.jsx)("img",{src:l.avatarUrl,alt:l.username,className:"size-10 rounded-full border"}):(0,h.jsx)(sy,{className:"size-10 text-muted-foreground"}),(0,h.jsxs)("div",{children:[(0,h.jsxs)("div",{className:"flex items-center gap-2",children:[(0,h.jsx)("span",{className:"font-semibold",children:l.username}),(0,h.jsxs)(eJ,{variant:"secondary",className:"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400",children:[(0,h.jsx)(sv,{className:"mr-1 size-3"}),n("githubSync.connectedBadge")]})]}),(0,h.jsxs)("p",{className:"text-xs text-muted-foreground",children:[n("githubSync.lastSynced")," ",l.lastSyncedAt?new Date(l.lastSyncedAt).toLocaleString(r):n("githubSync.neverSynced")]}),l.gistId?(0,h.jsxs)("div",{className:"mt-1 flex items-center gap-1.5 text-xs text-muted-foreground",children:[(0,h.jsx)("span",{children:n("githubSync.cloudGist")}),(0,h.jsxs)("a",{href:"https://gist.github.com/".concat(l.username?"".concat(l.username,"/"):"").concat(l.gistId),target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 font-mono text-primary hover:underline",children:[l.gistId.slice(0,8),"…",(0,h.jsx)(sb,{className:"size-3"})]})]}):null]})]}),(0,h.jsxs)("div",{className:"flex items-center gap-2",children:[(0,h.jsx)(tb,{variant:"outline",size:"sm",onClick:function(){eh()},disabled:c,"aria-label":n("githubSync.refreshStatus"),children:(0,h.jsx)(sx,{className:eZ("size-4",c&&"animate-spin")})}),(0,h.jsxs)(tb,{variant:"outline",size:"sm",className:"text-destructive hover:border-destructive/30 hover:bg-destructive/10 hover:text-destructive",onClick:function(){sN(function(){return s_(this,function(e){switch(e.label){case 0:g(null),x(null),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,at("/api/github/disconnect",{method:"POST"})];case 2:return e.sent(),s({connected:!1}),ef.reset(),x({key:"githubSync.disconnected"}),[3,4];case 3:return g(as(e.sent())),[3,4];case 4:return[2]}})})()},children:[(0,h.jsx)(_,{className:"mr-1.5 size-4"}),n("githubSync.disconnect")]})]})]}),(0,h.jsx)("div",{className:"grid grid-cols-2 rounded-lg bg-muted p-1",children:["push","pull"].map(function(e){return(0,h.jsxs)("button",{type:"button","aria-pressed":O===e,className:eZ("flex items-center justify-center gap-2 rounded-md py-1.5 text-sm font-medium transition-colors",O===e?"bg-background text-foreground shadow-sm":"cursor-pointer text-muted-foreground hover:text-foreground"),onClick:function(){return C(e)},children:["push"===e?(0,h.jsx)(sw,{className:"size-4"}):(0,h.jsx)(sk,{className:"size-4"}),"push"===e?n("githubSync.pushTitle"):n("githubSync.pullTitle")]},e)})}),"push"===O?(0,h.jsxs)("div",{className:"space-y-4",children:[(0,h.jsx)("p",{className:"text-sm leading-relaxed text-muted-foreground",children:n("githubSync.pushIntro")}),(0,h.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-end",children:[(0,h.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,h.jsx)(od,{htmlFor:"push-passphrase",children:n("githubSync.passphrase")}),(0,h.jsxs)("div",{className:"relative",children:[(0,h.jsx)(E,{className:"absolute left-3 top-2.5 size-4 text-muted-foreground"}),(0,h.jsx)(sr,{id:"push-passphrase",type:"password",className:"pl-9",placeholder:n("githubSync.passphrasePlaceholder"),value:et,onChange:function(e){return en(e.target.value)}})]})]}),(0,h.jsxs)(tb,{disabled:!et||ea,onClick:function(){sN(function(){var e;return s_(this,function(t){switch(t.label){case 0:if(!et)return[2];eo(!0),g(null),x(null),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,at("/api/github/push",{method:"POST",body:JSON.stringify({passphrase:et,includeCodexLoginCache:!0})})];case 2:return x({key:"githubSync.pushSuccess",params:{profiles:(e=t.sent()).exportedProfilesCount,vault:e.exportedVaultCount}}),eh(),[3,5];case 3:return g(as(t.sent())),[3,5];case 4:return eo(!1),[7];case 5:return[2]}})})()},children:[(0,h.jsx)(sw,{className:"mr-1.5 size-4"}),ea?n("githubSync.pushing"):n("githubSync.pushTitle")]})]})]}):(0,h.jsxs)("div",{className:"space-y-4",children:[(0,h.jsx)("p",{className:"text-sm leading-relaxed text-muted-foreground",children:n("githubSync.pullIntro")}),(0,h.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-end",children:[(0,h.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,h.jsx)(od,{htmlFor:"pull-passphrase",children:n("githubSync.passphrase")}),(0,h.jsxs)("div",{className:"relative",children:[(0,h.jsx)(E,{className:"absolute left-3 top-2.5 size-4 text-muted-foreground"}),(0,h.jsx)(sr,{id:"pull-passphrase",type:"password",className:"pl-9",placeholder:n("githubSync.pullPassphrasePlaceholder"),value:el,onChange:function(e){es(e.target.value),ef.invalidate()}})]})]}),(0,h.jsxs)(tb,{variant:"outline",disabled:!el||null!==ef.pending,onClick:function(){ef.inspect()},children:[(0,h.jsx)(sx,{className:eZ("mr-1.5 size-4","preview"===ef.pending&&"animate-spin")}),"preview"===ef.pending?n("transfer.inspecting"):n("githubSync.inspect")]})]}),ef.preview?(0,h.jsx)(st,{idPrefix:"gist",preview:ef.preview,conflictPolicy:ef.conflictPolicy,restoreActive:ef.restoreActive,stale:ef.stale,pending:"import"===ef.pending,canImport:ef.canImport,onPolicyChange:ef.changePolicy,onRestoreActiveChange:ef.changeRestoreActive,onConfirm:function(){ef.confirm()},meta:(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("span",{className:"font-medium text-foreground",children:n("githubSync.previewTitle")}),ec?(0,h.jsx)("span",{children:n("githubSync.backedUpAt",{time:new Date(ec).toLocaleString(r)})}):null]})}):null]})]}):(0,h.jsxs)("div",{className:"space-y-4",children:[(0,h.jsx)("p",{className:"text-sm leading-relaxed text-muted-foreground",children:n("githubSync.intro")}),(0,h.jsx)("div",{className:"grid grid-cols-2 rounded-lg bg-muted p-1",children:["device","token"].map(function(e){return(0,h.jsx)("button",{type:"button","aria-pressed":k===e,className:eZ("flex items-center justify-center gap-2 rounded-md py-1.5 text-sm font-medium transition-colors",k===e?"bg-background text-foreground shadow-sm":"cursor-pointer text-muted-foreground hover:text-foreground"),onClick:function(){return j(e)},children:"device"===e?n("githubSync.tabDevice"):n("githubSync.tabToken")},e)})}),"device"===k?P?(0,h.jsxs)("div",{className:"space-y-5 rounded-2xl border bg-muted/20 p-5",children:[(0,h.jsxs)("div",{className:"flex flex-col items-center justify-center space-y-2",children:[(0,h.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:n("githubSync.userCode")}),(0,h.jsxs)("button",{type:"button",onClick:ev,className:"group inline-flex cursor-pointer items-center gap-3 rounded-xl border border-primary/20 bg-background/90 px-5 py-2.5 font-mono text-3xl font-extrabold tracking-widest text-primary transition-colors hover:border-primary/50 hover:bg-primary/5",title:n("githubSync.copyCode"),children:[(0,h.jsx)("span",{children:P.userCode}),(0,h.jsx)("span",{className:"rounded-md bg-primary/10 p-1 text-primary transition-colors group-hover:bg-primary/20",children:A?(0,h.jsx)(ol,{className:"size-4 text-emerald-600 dark:text-emerald-400"}):(0,h.jsx)(sj,{className:"size-4"})})]}),A?(0,h.jsx)("p",{className:"text-xs font-medium text-emerald-600 dark:text-emerald-400",children:n("githubSync.copied")}):null]}),(0,h.jsxs)("div",{className:"flex flex-col items-center space-y-3",children:[(0,h.jsx)(tb,{className:"px-6 font-semibold",asChild:!0,children:(0,h.jsxs)("a",{href:P.verificationUri,target:"_blank",rel:"noopener noreferrer",onClick:ev,children:[(0,h.jsx)(sb,{className:"mr-1.5 size-4"}),n("githubSync.openAuthPage")]})}),(0,h.jsxs)("div",{className:"flex w-full items-center justify-between rounded-xl border border-border/40 bg-background/50 px-3 py-2 text-xs text-muted-foreground",children:[(0,h.jsxs)("div",{className:"flex items-center gap-2",children:[(0,h.jsx)(sx,{className:eZ("size-3.5 text-primary",(F||H)&&"animate-spin")}),(0,h.jsx)("span",{children:H?n("githubSync.checkingAuth"):F&&V>5?n("githubSync.waitingAuthInterval",{seconds:V}):n("githubSync.waitingAuth")})]}),(0,h.jsxs)("div",{className:"flex items-center gap-2",children:[(0,h.jsx)("button",{type:"button",className:"cursor-pointer font-medium text-primary hover:underline disabled:opacity-50",disabled:H,onClick:function(){eg(P.deviceCode,!0)},children:n("githubSync.checkNow")}),(0,h.jsx)("span",{children:"\xb7"}),(0,h.jsx)("button",{type:"button",className:"cursor-pointer text-muted-foreground hover:text-foreground",onClick:function(){em()},children:n("githubSync.regenerateCode")})]})]})]})]}):(0,h.jsxs)("div",{className:"space-y-4",children:[(0,h.jsx)("p",{className:"text-sm text-muted-foreground",children:n("githubSync.deviceIntro")}),(0,h.jsx)("div",{className:"flex justify-center",children:(0,h.jsxs)(tb,{className:"px-6",disabled:L,onClick:function(){em()},children:[(0,h.jsx)(sy,{className:"mr-2 size-4"}),L?n("githubSync.checkingAuth"):n("githubSync.getCode")]})})]}):(0,h.jsxs)("div",{className:"space-y-4",children:[(0,h.jsxs)("div",{className:"space-y-2",children:[(0,h.jsx)(od,{htmlFor:"github-pat",children:n("githubSync.tokenLabel")}),(0,h.jsxs)("div",{className:"relative",children:[(0,h.jsx)(sS,{className:"absolute left-3 top-2.5 size-4 text-muted-foreground"}),(0,h.jsx)(sr,{id:"github-pat",type:"password",className:"pl-9",placeholder:n("githubSync.tokenPlaceholder"),value:G,onChange:function(e){return J(e.target.value)}})]}),(0,h.jsx)("p",{className:"text-xs leading-relaxed text-muted-foreground",children:n("githubSync.tokenScopeHint")})]}),(0,h.jsxs)(tb,{disabled:!G.trim()||Y,onClick:function(){sN(function(){var e,t;return s_(this,function(n){switch(n.label){case 0:if(!G.trim())return[2];X(!0),g(null),x(null),n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,at("/api/github/token",{method:"POST",body:JSON.stringify({token:G.trim()})})];case 2:return s(t=n.sent()),J(""),x({key:"githubSync.connected",params:{user:null!=(e=t.username)?e:""}}),[3,5];case 3:return g(as(n.sent())),[3,5];case 4:return X(!1),[7];case 5:return[2]}})})()},children:[(0,h.jsx)(sy,{className:"mr-2 size-4"}),Y?n("githubSync.connecting"):n("githubSync.connectToken")]})]})]})]})}let sT=j("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),sA=j("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);function sR(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 sI(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 sL(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sM(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){sL(e,t,n[t])})}return e}function sD(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 sR(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 sR(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 sF(){var e=(0,v.Bd)().t,t=ab(function(e){return e.scan}),n=ab(function(e){return e.scanLoading}),r=ab(function(e){return e.scanError}),a=ab(function(e){return e.loadScan}),o=ab(function(e){return e.importScan}),i=ab(function(e){return e.providers}),l=ab(function(e){return e.loadProviders}),s=sD((0,m.useState)({}),2),u=s[0],c=s[1],d=sD((0,m.useState)(!1),2),f=d[0],p=d[1],g=sD((0,m.useState)(null),2),y=g[0],b=g[1],x=sD((0,m.useState)(null),2),w=x[0],k=x[1];(0,m.useEffect)(function(){a(),l()},[a,l]),(0,m.useEffect)(function(){t&&c(function(e){var n={},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,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;n[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){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return n})},[t]);var j=(null!=t?t:[]).flatMap(function(e){return e.candidates}).filter(function(e){var t;return null==(t=u[e.id])?void 0:t.selected}),S=j.filter(function(e){var t=u[e.id],n=!e.apiKeyPresent&&!t.apiKey.trim(),r="vault"===t.target&&""!==t.providerId;return!t.name.trim()||n&&!r});return(0,h.jsxs)("div",{className:"space-y-4",children:[(0,h.jsx)("p",{className:"text-sm leading-relaxed text-muted-foreground",children:e("import.intro")}),n?(0,h.jsxs)("p",{className:"flex items-center justify-center gap-2 py-10 text-sm text-muted-foreground",children:[(0,h.jsx)(sT,{className:"size-4 animate-spin"}),e("import.scanning")]}):null,r?(0,h.jsx)("p",{className:"py-6 text-sm text-destructive",children:ad(e,r)}):null,w?(0,h.jsxs)("div",{className:"rounded-xl border border-emerald-500/40 bg-emerald-500/5 px-4 py-3 text-sm",children:[(0,h.jsxs)("p",{className:"flex items-center gap-2 font-medium",children:[(0,h.jsx)(sA,{className:"size-4 text-emerald-600"}),e("import.summary",{imported:w.imported,skipped:w.skipped,providersCreated:w.providersCreated})]}),w.warnings.map(function(t){return(0,h.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:ad(e,t)},t.key+t.scope)})]}):null,(null!=t?t:[]).map(function(t){var n,r,a;return(0,h.jsxs)("section",{className:"rounded-2xl border bg-card px-4 py-3",children:[(0,h.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,h.jsx)("h3",{className:"text-sm font-semibold",children:t.label}),t.candidates.length>0?(0,h.jsx)(eJ,{variant:"secondary",children:e("import.providerCount",{count:t.candidates.length})}):null]}),(0,h.jsx)("ul",{className:"mt-2 space-y-0.5",children:t.sources.map(function(t){return(0,h.jsxs)("li",{className:"truncate font-mono text-[11px] text-muted-foreground",children:[t.path," \xb7"," ",t.exists?t.parsable?e("import.sourceRead"):e("import.sourceUnparsable"):e("import.sourceMissing")]},t.key)})}),0===t.candidates.length?(0,h.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:(n=e,(r=t).note||r.noteCode?ad(n,{key:null!=(a=r.noteCode)?a:"scan.note.unknown",fallback:r.note}):"")}):(0,h.jsx)("ul",{className:"mt-3 space-y-3",children:t.candidates.map(function(e){return(0,h.jsx)(s$,{candidate:e,choice:u[e.id],providers:null!=i?i:[],onChange:function(t){var n;return n=e.id,void c(function(e){var r,a;return r=sM({},e),a=null!=(a=sL({},n,sM({},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)})})]},t.harness)}),y?(0,h.jsx)("p",{className:"text-sm text-destructive",children:ad(e,y)}):null,(0,h.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,h.jsx)("span",{className:"mr-auto text-xs text-muted-foreground",children:j.length>0?e("import.selected",{count:j.length}):e("import.selectPrompt")}),(0,h.jsxs)(tb,{variant:"outline",onClick:function(){a()},disabled:n,children:[(0,h.jsx)(aS,{}),e("import.rescan")]}),(0,h.jsxs)(tb,{disabled:0===j.length||S.length>0||f,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:p(!0),b(null),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,o(j.map(function(e){var t=u[e.id];return sM({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 k({imported:(e=t.sent()).imported,skipped:e.skipped,providersCreated:e.providersCreated,warnings:e.warnings.map(al)}),c({}),[3,5];case 3:return b(au(t.sent(),"import.failed")),[3,5];case 4:return p(!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){sI(o,r,a,i,l,"next",e)}function l(e){sI(o,r,a,i,l,"throw",e)}i(void 0)})})()},children:[f?(0,h.jsx)(sT,{className:"animate-spin"}):null,e("import.importSelected")]})]})]})}function s$(e){var t=e.candidate,n=e.choice,r=e.providers,a=e.onChange,o=(0,v.Bd)().t;if(!n)return null;var i="vault"===n.target&&""!==n.providerId,l=!t.apiKeyPresent&&!i;return(0,h.jsx)("li",{className:"rounded-xl border bg-background px-3 py-3",children:(0,h.jsxs)("div",{className:"flex items-start gap-3",children:[(0,h.jsx)(os,{className:"mt-1",checked:n.selected,onCheckedChange:function(e){return a({selected:!0===e})},"aria-label":o("import.select",{name:t.sourceKey})}),(0,h.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,h.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,h.jsx)("span",{className:"truncate font-mono text-sm",children:t.sourceKey}),t.active?(0,h.jsx)(eJ,{children:o("import.inUse")}):null,t.conflictsWith?(0,h.jsx)(eJ,{variant:"secondary",children:o("import.nameTaken")}):null,t.matchesProvider?(0,h.jsx)(eJ,{variant:"secondary",children:o("import.matchesProvider",{name:t.matchesProvider})}):null]}),(0,h.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,h.jsxs)("div",{className:"mt-3 grid gap-3 sm:grid-cols-2",children:[(0,h.jsxs)("div",{className:"space-y-1.5",children:[(0,h.jsx)(od,{htmlFor:"name-".concat(t.id),children:o("import.profileName")}),(0,h.jsx)(sr,{id:"name-".concat(t.id),value:n.name,onChange:function(e){return a({name:e.target.value})}})]}),(0,h.jsxs)("div",{className:"space-y-1.5",children:[(0,h.jsx)(od,{htmlFor:"target-".concat(t.id),children:o("import.credentialTarget")}),(0,h.jsxs)(li,{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,h.jsx)(l3,{id:"target-".concat(t.id),children:(0,h.jsx)(ls,{})}),(0,h.jsxs)(l8,{children:[(0,h.jsx)(l9,{value:"profile",children:o("import.targetProfile")}),(0,h.jsx)(l9,{value:"new-vault",children:o("import.targetNewVault")}),r.map(function(e){return(0,h.jsx)(l9,{value:e.id,children:o("import.targetExisting",{name:e.name})},e.id)})]})]})]}),l?(0,h.jsxs)("div",{className:"space-y-1.5 sm:col-span-2",children:[(0,h.jsx)(od,{htmlFor:"key-".concat(t.id),children:o("common.apiKey")}),(0,h.jsx)(sr,{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,h.jsxs)("label",{className:"flex items-center gap-2 text-xs text-muted-foreground sm:col-span-2",children:[(0,h.jsx)(os,{checked:n.overwrite,onCheckedChange:function(e){return a({overwrite:!0===e})}}),o("import.overwriteExisting")]}):null]}):null]})]})})}function sU(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 sH(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 sB(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function i(e){sH(o,r,a,i,l,"next",e)}function l(e){sH(o,r,a,i,l,"throw",e)}i(void 0)})}}function sK(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,a=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],i=!0,l=!1;try{for(a=a.call(e);!(i=(n=a.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){l=!0,r=e}finally{try{i||null==a.return||a.return()}finally{if(l)throw r}}return o}}(e,t)||sq(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sV(e){return function(e){if(Array.isArray(e))return sU(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||sq(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 sq(e,t){if(e){if("string"==typeof e)return sU(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 sU(e,t)}}function sW(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 sZ(e){var t=e.onDone,n=(0,v.Bd)().t,r=ab(function(e){return e.users}),a=ab(function(e){return e.currentUser}),o=ab(function(e){return e.loadHarnesses}),i=ab(function(e){return e.loadProviders}),l=ab(function(e){return e.setNotice}),s=(0,m.useMemo)(function(){return r.filter(function(e){return e.username!==a&&!1!==e.manageable})},[r,a]),u=sK((0,m.useState)(""),2),c=u[0],d=u[1],f=sK((0,m.useState)(null),2),p=f[0],g=f[1],y=sK((0,m.useState)([]),2),b=y[0],x=y[1],w=sK((0,m.useState)(!1),2),k=w[0],j=w[1],S=sK((0,m.useState)(!1),2),O=S[0],C=S[1],N=sK((0,m.useState)(!1),2),P=N[0],E=N[1],_=sK((0,m.useState)(null),2),z=_[0],A=_[1],R=(0,m.useMemo)(function(){return T.oo.flatMap(function(e){var t,n=null!=(t=null==p?void 0:p.conflicts.filter(function(t){return t.harness===e}).length)?t:0;return n>0?[{harness:e,count:n}]:[]})},[p]),I=a||n("notice.currentUser");function L(){return sB(function(){var e;return sW(this,function(n){switch(n.label){case 0:if(!c||!p)return[2];E(!0),A(null),n.label=1;case 1:return n.trys.push([1,4,5,6]),[4,at("/api/users/sync",{method:"POST",body:JSON.stringify({sourceUser:c,conflictPolicy:"skip",overwriteHarnesses:b,migrateCodexLoginCache:k})})];case 2:return e=n.sent(),[4,Promise.all([o(),i()])];case 3:return n.sent(),l([{key:"sync.done",params:{imported:e.imported,overwritten:e.overwritten,skipped:e.skipped,providersCopied:e.providersCopied}},{key:e.codexLoginCacheMigrated?"sync.cacheMigrated":"sync.cacheNotMigrated"}].concat(sV(e.warnings.map(function(e){return al(e)})))),t(),[3,6];case 4:return A(as(n.sent())),[3,6];case 5:return E(!1),[7];case 6:return[2]}})})()}return(0,m.useEffect)(function(){d(function(e){var t,n;return s.some(function(t){return t.username===e})?e:null!=(t=null==(n=s[0])?void 0:n.username)?t:""})},[s]),0===s.length?(0,h.jsxs)("div",{className:"flex items-start gap-3 rounded-2xl border bg-muted/25 p-4",children:[(0,h.jsx)(aO,{className:"mt-0.5 size-5 text-muted-foreground"}),(0,h.jsx)("p",{className:"text-sm text-muted-foreground",children:n("sync.noOtherUsers")})]}):(0,h.jsxs)("div",{className:"space-y-5",children:[(0,h.jsx)("p",{className:"text-sm leading-relaxed text-muted-foreground",children:n("sync.intro",{user:I})}),(0,h.jsxs)("div",{className:"space-y-2",children:[(0,h.jsx)(od,{htmlFor:"sync-source-user",children:n("sync.sourceUser")}),(0,h.jsxs)(li,{value:c,onValueChange:function(e){d(e),g(null),x([]),j(!1)},children:[(0,h.jsx)(l3,{id:"sync-source-user",children:(0,h.jsx)(ls,{placeholder:n("sync.selectUser")})}),(0,h.jsx)(l8,{children:s.map(function(e){return(0,h.jsxs)(l9,{value:e.username,children:[e.username," \xb7 ",e.homeDir]},e.username)})})]})]}),p?(0,h.jsxs)("div",{className:"space-y-4 rounded-2xl border bg-muted/25 p-4",children:[(0,h.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,h.jsx)(eJ,{variant:"secondary",children:n("sync.profileCount",{count:p.profileCount})}),(0,h.jsx)(eJ,{variant:"secondary",children:n("sync.providerCount",{count:p.providerCount})}),(0,h.jsx)(eJ,{variant:p.conflicts.length>0?"destructive":"outline",children:n("sync.conflictCount",{count:p.conflicts.length})})]}),p.conflicts.length>0?(0,h.jsxs)("div",{className:"space-y-3",children:[(0,h.jsxs)("div",{className:"space-y-1",children:[(0,h.jsx)(od,{children:n("sync.overwriteByHarness")}),(0,h.jsx)("p",{className:"text-xs leading-relaxed text-muted-foreground",children:n("sync.overwriteHint")})]}),(0,h.jsx)("div",{className:"grid gap-2 sm:grid-cols-2",children:R.map(function(e){var t=e.harness,r=e.count;return(0,h.jsxs)("label",{className:"flex cursor-pointer items-start gap-3 rounded-xl border bg-background/70 p-3 text-sm",children:[(0,h.jsx)(os,{checked:b.includes(t),onCheckedChange:function(e){return x(function(n){return!0===e?sV(n).concat([t]):n.filter(function(e){return e!==t})})},className:"mt-0.5"}),(0,h.jsxs)("span",{children:[(0,h.jsx)("span",{className:"block font-medium",children:n("sync.overwriteHarness",{harness:T.RP[t]})}),(0,h.jsx)("span",{className:"mt-1 block text-xs text-muted-foreground",children:n("sync.conflictsInHarness",{count:r})})]})]},t)})})]}):null,p.codexLoginCache.available&&p.codexLoginCache.migrationNeeded?(0,h.jsxs)("label",{className:"block space-y-3 rounded-xl border bg-background/70 p-3 text-sm",children:[(0,h.jsxs)("span",{className:"flex cursor-pointer items-start gap-3",children:[(0,h.jsx)(os,{checked:k,onCheckedChange:function(e){return j(!0===e)},className:"mt-0.5"}),(0,h.jsxs)("span",{children:[(0,h.jsx)("span",{className:"block font-medium",children:n("sync.migrateCache")}),(0,h.jsx)("span",{className:"mt-1 block text-xs leading-relaxed text-muted-foreground",children:n("sync.migrateCacheHint")})]})]}),p.codexLoginCache.targetExists?(0,h.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:n("sync.migrateCacheOverwrite")}):null]}):null,(0,h.jsx)("p",{className:"text-xs leading-relaxed text-muted-foreground",children:n("sync.storeOnlyHint")})]}):null,z?(0,h.jsx)("p",{className:"text-sm text-destructive",children:ad(n,z)}):null,p?k?(0,h.jsxs)(aI,{open:O,onOpenChange:C,children:[(0,h.jsxs)(tb,{disabled:P,onClick:function(){return C(!0)},children:[(0,h.jsx)(sj,{}),P?n("sync.syncing"):n("sync.syncTo",{user:I})]}),(0,h.jsxs)(aZ,{children:[(0,h.jsxs)(aG,{children:[(0,h.jsx)(aQ,{children:n("sync.confirmCacheTitle")}),(0,h.jsx)(aY,{children:n("sync.confirmCacheBody",{source:c,target:I,extra:p.codexLoginCache.targetExists?n("sync.confirmCacheOverwrite"):n("sync.confirmCacheFresh")})})]}),(0,h.jsxs)(aJ,{children:[(0,h.jsx)(a0,{children:n("common.cancel")}),(0,h.jsx)(aX,{onClick:function(){L()},children:n("sync.confirmCacheAction")})]})]})]}):(0,h.jsxs)(tb,{disabled:P,onClick:function(){L()},children:[(0,h.jsx)(sj,{}),P?n("sync.syncing"):n("sync.syncTo",{user:I})]}):(0,h.jsxs)(tb,{disabled:!c||P,onClick:function(){sB(function(){var e;return sW(this,function(t){switch(t.label){case 0:if(!c)return[2];E(!0),A(null),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,at("/api/users/sync/preview",{method:"POST",body:JSON.stringify({sourceUser:c})})];case 2:return g(t.sent()),x([]),j(!1),C(!1),[3,5];case 3:return e=t.sent(),g(null),x([]),A(as(e)),[3,5];case 4:return E(!1),[7];case 5:return[2]}})})()},children:[(0,h.jsx)(sj,{}),P?n("sync.inspecting"):n("sync.inspect")]})]})}function sG(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var sJ=[{id:"scan",icon:aS},{id:"user",icon:aO},{id:"file",icon:aC},{id:"gist",icon:aN}];function sQ(e){var t,n=e.open,r=e.onOpenChange,a=(0,v.Bd)().t,o=function(e){if(Array.isArray(e))return e}(t=(0,m.useState)("scan"))||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 sG(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 sG(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.")}(),i=o[0],l=o[1];return(0,h.jsx)(rw,{open:n,onOpenChange:r,children:(0,h.jsxs)(rK,{className:"flex max-h-[calc(100dvh-1rem)] w-[calc(100vw-1rem)] max-w-4xl flex-col gap-0 overflow-hidden p-0 sm:max-h-[90dvh] sm:w-full",children:[(0,h.jsxs)(rV,{className:"shrink-0 border-b px-5 py-4 pr-12 text-left sm:px-6",children:[(0,h.jsx)(rW,{children:a("transfer.title")}),(0,h.jsx)(rZ,{children:a("transfer.intro")})]}),(0,h.jsxs)("div",{className:"grid min-h-0 flex-1 sm:grid-cols-[13rem_minmax(0,1fr)]",children:[(0,h.jsx)("div",{role:"tablist","aria-label":a("transfer.sourceLabel"),"aria-orientation":"vertical",className:"flex gap-2 overflow-x-auto border-b bg-card/45 p-3 sm:flex-col sm:overflow-x-visible sm:overflow-y-auto sm:border-b-0 sm:border-r",children:sJ.map(function(e,t){var n=e.id===i,r=e.icon;return(0,h.jsxs)("button",{type:"button",role:"tab",id:"transfer-tab-".concat(e.id),"aria-controls":"transfer-panel-".concat(e.id),"aria-selected":n,tabIndex:n?0:-1,onClick:function(){return l(e.id)},onKeyDown:function(e){return function(e,t){var n,r,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=t;i="Home"===e.key?0:"End"===e.key?sJ.length-1:(t+(o?1:-1)+sJ.length)%sJ.length,l(sJ[i].id);var s=null==(n=e.currentTarget.parentElement)?void 0:n.querySelectorAll('[role="tab"]');null==s||null==(r=s[i])||r.focus()}}(e,t)},className:eZ("flex shrink-0 cursor-pointer items-center gap-2.5 rounded-xl px-3 py-2.5 text-left text-sm transition-[color,background-color,box-shadow,transform] duration-150 active:translate-y-px sm:w-full",n?"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,h.jsx)(r,{className:"size-4 shrink-0"}),(0,h.jsx)("span",{className:"whitespace-nowrap font-medium sm:whitespace-normal",children:a("transfer.sources.".concat(e.id))})]},e.id)})}),(0,h.jsxs)("div",{role:"tabpanel",id:"transfer-panel-".concat(i),"aria-labelledby":"transfer-tab-".concat(i),className:"min-h-0 overflow-y-auto overscroll-contain px-4 py-5 pb-[max(1.25rem,env(safe-area-inset-bottom))] sm:px-6",children:["scan"===i?(0,h.jsx)(sF,{}):null,"user"===i?(0,h.jsx)(sZ,{onDone:function(){return r(!1)}}):null,"file"===i?(0,h.jsx)(sg,{onDone:function(){return r(!1)}}):null,"gist"===i?(0,h.jsx)(sz,{onDone:function(){return r(!1)}}):null]})]})]})})}let sY=j("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"}]]),sX=j("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"}]]),s0=j("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 s1={ok:"bg-emerald-500",warn:"bg-amber-500",error:"bg-red-500",unknown:"bg-slate-400"};function s2(e){var t,n=e.harnessId,r=e.open,a=e.onOpenChange,o=(0,v.Bd)().t,i=ab(function(e){return e.doctor}),l=ab(function(e){return e.doctorLoading}),s=ab(function(e){return e.doctorError}),u=ab(function(e){return e.doctorUpdatedAvailable}),c=ab(function(e){return e.loadDoctor}),d=null!=(t=null==i?void 0:i.find(function(e){return e.harness===n}))?t:null;(0,m.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=T.RP[n];return(0,h.jsx)(rw,{open:r,onOpenChange:a,children:(0,h.jsxs)(rK,{className:"flex max-h-[88vh] flex-col gap-0 overflow-hidden p-0 sm:max-w-2xl",children:[(0,h.jsxs)(rV,{className:"shrink-0 space-y-1.5 px-6 pb-4 pt-6 pr-12",children:[(0,h.jsx)(rW,{children:o("doctor.titleFor",{harness:p})}),(0,h.jsx)(rZ,{children:o("doctor.intro")})]}),(0,h.jsxs)("div",{className:"min-h-0 flex-1 space-y-4 overflow-y-auto overscroll-contain px-6",children:[l&&null===d?(0,h.jsx)("p",{className:"py-6 text-center text-sm text-muted-foreground",children:o("doctor.checking")}):null,s?(0,h.jsx)("p",{className:"text-sm text-destructive",children:ad(o,s)}):null,d?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[f.ok>0?(0,h.jsx)(eJ,{variant:"secondary",children:o("doctor.countOk",{count:f.ok})}):null,f.warn>0?(0,h.jsx)(eJ,{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,h.jsx)(eJ,{variant:"destructive",children:o("doctor.countError",{count:f.error})}):null,f.unknown>0?(0,h.jsx)(eJ,{variant:"outline",children:o("doctor.countUnknown",{count:f.unknown})}):null,u?(0,h.jsxs)("span",{className:"ml-auto flex items-center gap-1 text-xs text-emerald-600 dark:text-emerald-400",children:[(0,h.jsx)(s0,{className:"size-3.5"}),o("doctor.updateAvailable")]}):null]}),(0,h.jsx)(s4,{checks:d.checks})]}):null,null!==d||l||s?null:(0,h.jsx)("p",{className:"py-6 text-center text-sm text-muted-foreground",children:o("doctor.notRun")})]}),(0,h.jsxs)(rq,{className:"shrink-0 px-6 py-4",children:[(0,h.jsxs)(tb,{variant:"outline",disabled:l,onClick:function(){c(n)},children:[(0,h.jsx)(sX,{className:l?"animate-spin":void 0}),o("doctor.rerun")]}),(0,h.jsx)(tb,{onClick:function(){return a(!1)},children:o("doctor.close")})]})]})})}function s4(e){var t=e.checks,n=(0,v.Bd)().t;return 0===t.length?(0,h.jsx)("p",{className:"text-sm text-muted-foreground",children:n("doctor.noChecks")}):(0,h.jsx)("ul",{className:"divide-y rounded-xl border",children:t.map(function(e){var t;return(0,h.jsxs)("li",{className:"flex items-start gap-3 px-3 py-2.5",children:[(0,h.jsx)("span",{className:eZ("mt-1.5 size-2 shrink-0 rounded-full",s1[e.status]),"aria-hidden":!0}),(0,h.jsx)("div",{className:"min-w-0 flex-1",children:(0,h.jsxs)("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-0.5",children:[(0,h.jsx)("p",{className:"text-sm leading-relaxed",children:ad(n,{key:null!=(t=e.code)?t:"doctor.unknownCheck",params:e.params,fallback:e.label})}),(0,h.jsx)("span",{className:"font-mono text-[10px] uppercase text-muted-foreground",children:n("doctor.status.".concat(e.status))})]})})]},e.id)})})}function s3(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 s5(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 s3(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 s3(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 s6(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 s8(e){var t,n=e.harness,r=e.open,a=e.onOpenChange,o=(0,v.Bd)().t,i=ab(function(e){return e.drift}),l=ab(function(e){return e.driftLoading}),s=ab(function(e){return e.reapplyDrift}),u=ab(function(e){return e.adoptDrift}),c=s5((0,m.useState)(null),2),d=c[0],f=c[1],p=s5((0,m.useState)(null),2),g=p[0],y=p[1],b=(0,m.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]),x=null!=(t=null==b?void 0:b.files.filter(function(e){return"in-sync"!==e.status}))?t:[],w=(null==b?void 0:b.active)===!0;return(0,h.jsxs)(rw,{open:r,onOpenChange:a,children:[(0,h.jsxs)(rK,{className:"flex max-h-[85vh] w-[min(64rem,calc(100vw-2rem))] max-w-5xl flex-col overflow-hidden",children:[(0,h.jsxs)(rV,{children:[(0,h.jsx)(rW,{children:o("drift.dialogTitle",{harness:n.label})}),(0,h.jsx)(rZ,{children:o(w?"drift.legend":"drift.noActiveProfile")})]}),(0,h.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[l&&null===b?(0,h.jsx)("p",{className:"py-8 text-center text-sm text-muted-foreground",children:o("drift.checking")}):null,null!==b||l?null:(0,h.jsx)("p",{className:"py-8 text-center text-sm text-muted-foreground",children:o("drift.noData")}),b&&!w?(0,h.jsx)("p",{className:"py-8 text-center text-sm text-muted-foreground",children:o("drift.nothingToCompare")}):null,b&&w?(0,h.jsx)("div",{className:"space-y-3",children:0===x.length?(0,h.jsx)("p",{className:"py-4 text-center text-sm text-muted-foreground",children:o("drift.allInSync")}):x.map(function(e){return(0,h.jsx)(s9,{file:e},e.key)})}):null]}),g?(0,h.jsx)("p",{className:"text-sm text-destructive",children:ad(o,g)}):null,(0,h.jsxs)(rq,{children:[(0,h.jsx)(tb,{variant:"outline",disabled:null===b||!w,onClick:function(){return f("adopt")},children:o("drift.adopt")}),(0,h.jsx)(tb,{disabled:null===b||!w,onClick:function(){return f("reapply")},children:o("drift.reapply")})]})]}),(0,h.jsx)(aI,{open:"reapply"===d,onOpenChange:function(e){return!e&&f(null)},children:(0,h.jsxs)(aZ,{children:[(0,h.jsxs)(aG,{children:[(0,h.jsx)(aQ,{children:o("drift.reapplyTitle")}),(0,h.jsx)(aY,{children:o("drift.reapplyBody",{harness:n.label})})]}),(0,h.jsxs)(aJ,{children:[(0,h.jsx)(a0,{children:o("common.cancel")}),(0,h.jsx)(aX,{onClick:function(){f(null),y(null),s(n.id).then(function(){return a(!1)}).catch(function(e){y(au(e,"drift.reapplyFailed"))})},children:o("drift.confirmReapply")})]})]})}),(0,h.jsx)(aI,{open:"adopt"===d,onOpenChange:function(e){return!e&&f(null)},children:(0,h.jsxs)(aZ,{children:[(0,h.jsxs)(aG,{children:[(0,h.jsx)(aQ,{children:o("drift.adoptTitle")}),(0,h.jsx)(aY,{children:o("drift.adoptBody")})]}),(0,h.jsxs)(aJ,{children:[(0,h.jsx)(a0,{children:o("common.cancel")}),(0,h.jsx)(aX,{onClick:function(){f(null),y(null),u(n.id).then(function(){return a(!1)}).catch(function(e){y(au(e,"drift.adoptFailed"))})},children:o("drift.confirmAdopt")})]})]})})]})}function s9(e){var t=e.file,n=(0,v.Bd)().t;return(0,h.jsxs)("div",{className:"space-y-1.5",children:[(0,h.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,h.jsx)(eJ,{className:s6(t.status),children:n("drift.status.".concat(t.status))}),(0,h.jsx)("p",{className:"min-w-0 truncate font-mono text-xs text-muted-foreground",title:t.path,children:t.path})]}),(0,h.jsx)(e3,{files:[{path:t.path,existed:null!==t.currentContent,content:t.expectedContent,currentContent:t.currentContent}]})]})}function s7(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 ue(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 s7(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 s7(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 ut(e){var t,n,r,a=e.harness,o=(0,v.Bd)().t,i=ab(function(e){return e.doctor}),l=ab(function(e){return e.doctorLoading}),s=ab(function(e){return e.doctorError}),u=ab(function(e){return e.loadDoctor}),c=ab(function(e){return e.drift}),d=ab(function(e){return e.driftLoading}),f=ab(function(e){return e.driftError}),p=ab(function(e){return e.loadDrift}),g=ue((0,m.useState)(!1),2),y=g[0],b=g[1],x=ue((0,m.useState)(!1),2),w=x[0],k=x[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,m.useEffect)(function(){u(a.id)},[a.id,u]),(0,m.useEffect)(function(){null===c&&p()},[c,p]),(0,h.jsxs)("section",{className:"rounded-2xl border bg-card p-5 shadow-[0_12px_34px_-28px_rgb(36_39_70/0.38)]",children:[(0,h.jsxs)("div",{className:"flex items-center gap-2",children:[(0,h.jsx)(sY,{className:"size-4 text-primary"}),(0,h.jsx)("h3",{className:"font-semibold",children:o("doctor.title")}),(0,h.jsx)("span",{className:"ml-auto",children:(0,h.jsx)(tb,{size:"icon",variant:"ghost","aria-label":o("doctor.rerun"),onClick:function(){u(a.id),p()},children:(0,h.jsx)(sX,{className:l||d?"animate-spin":void 0})})})]}),(0,h.jsxs)("div",{className:"mt-4 space-y-3",children:[s?(0,h.jsx)("p",{className:"text-sm text-destructive",children:ad(o,s)}):null===j?(0,h.jsx)("p",{className:"text-sm text-muted-foreground",children:o("doctor.checking")}):(0,h.jsx)(un,{report:j}),f?(0,h.jsx)("p",{className:"text-sm text-destructive",children:ad(o,f)}):null===S?(0,h.jsx)("p",{className:"text-sm text-muted-foreground",children:o("drift.checking")}):(0,h.jsxs)("div",{className:"space-y-2",children:[(0,h.jsx)(ur,{report:S}),O.length>0?(0,h.jsxs)("ul",{className:"space-y-1",children:[O.slice(0,3).map(function(e){return(0,h.jsxs)("li",{className:"flex items-center gap-2 text-xs",children:[(0,h.jsx)("span",{className:"size-1.5 shrink-0 rounded-full bg-destructive/70"}),(0,h.jsx)("span",{className:"truncate font-mono text-muted-foreground",children:e.path.split("/").pop()}),(0,h.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,h.jsx)("li",{className:"pl-3.5 text-xs text-muted-foreground",children:o("drift.moreFiles",{count:O.length-3})}):null]}):null]})]}),(0,h.jsxs)("div",{className:"mt-4 grid gap-2 ".concat(C?"grid-cols-2":"grid-cols-1"),children:[(0,h.jsx)(tb,{size:"sm",variant:"outline",disabled:null===j,onClick:function(){return b(!0)},children:o("doctor.viewDetails")}),C?(0,h.jsx)(tb,{size:"sm",variant:"outline",onClick:function(){return k(!0)},children:o("drift.viewDiff")}):null]}),(0,h.jsx)(s2,{harnessId:a.id,open:y,onOpenChange:b}),(0,h.jsx)(s8,{harness:a,open:w,onOpenChange:k})]})}function un(e){var t=e.report,n=(0,v.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,h.jsx)("p",{className:"text-sm text-muted-foreground",children:n("doctor.noChecks")}):(0,h.jsx)("div",{className:"flex flex-wrap gap-2",children:a.map(function(e){var t,a;return(0,h.jsx)(eJ,{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 ur(e){var t=e.report,n=(0,v.Bd)().t;if(!t.active)return(0,h.jsx)(eJ,{variant:"secondary",children:n("harness.inactive")});if("in-sync"===t.status)return(0,h.jsx)(eJ,{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,h.jsx)(eJ,{variant:"outline",className:"border-amber-500/30 text-amber-700 dark:text-amber-300",children:n("drift.mismatch",{count:r})})}return(0,h.jsx)(eJ,{className:s6(t.status),children:n("drift.status.".concat(t.status))})}let ua=j("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"}]]),uo=j("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"}]]),ui=j("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"}]]),ul=j("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 us(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 uu(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 uc(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 us(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 us(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 ud(e){var t,n=e.harness,r=e.profile,a=e.official,o=void 0!==a&&a,i=e.open,l=e.onOpenChange,s=(0,v.Bd)().t,u=ab(function(e){return e.previewProfile}),c=ab(function(e){return e.previewOfficial}),d=ab(function(e){return e.activateProfile}),f=ab(function(e){return e.activateOfficial}),p=ab(function(e){return e.currentUser}),g=o?s("harness.official"):null==r?void 0:r.name,y=uc((0,m.useState)(null),2),b=y[0],x=y[1],w=uc((0,m.useState)(null),2),k=w[0],j=w[1],S=uc((0,m.useState)(null),2),O=S[0],C=S[1],N=uc((0,m.useState)(!1),2),P=N[0],E=N[1],_=uc((0,m.useState)(0),2),z=_[0],T=_[1];(0,m.useEffect)(function(){if(i){var e=!1;return x(null),j(null),C(null),E(!1),(o?c(n.id):u(n.id,null!=g?g:"")).then(function(t){e||x(t)}).catch(function(t){e||j(as(t))}),function(){e=!0}}},[i,n.id,o,z,c,u,g]);var A=null!=(t=null==b?void 0:b.map(function(e){return{path:e.path,existed:null!==e.currentContent,content:e.content,currentContent:e.currentContent}}))?t:[],R=A.filter(function(e){return"same"!==e4(e)}).length;return(0,h.jsx)(aI,{open:i,onOpenChange:l,children:(0,h.jsxs)(aZ,{className:"max-h-[85dvh] overflow-y-auto sm:max-w-4xl",children:[(0,h.jsxs)(aG,{children:[(0,h.jsx)(aQ,{children:s(o?"activate.officialTitle":"activate.title")}),(0,h.jsx)(aY,{children:s(o?"activate.officialBody":"activate.body",{harness:n.label,profile:null!=g?g:"",changed:R>0?s("activate.changedFiles",{count:R}):"",user:p||s("notice.currentUser")})})]}),k?(0,h.jsx)("p",{className:"text-sm text-destructive",children:s("activate.loadFailed",{reason:ad(s,k)})}):null===b?(0,h.jsx)("p",{className:"py-6 text-center text-sm text-muted-foreground",children:s("activate.loading")}):(0,h.jsx)("div",{className:"max-h-[52dvh] overflow-y-auto rounded-xl border p-3",children:(0,h.jsx)(e3,{files:A})}),O?(0,h.jsx)("p",{className:"text-sm text-destructive",children:s("activate.failed",{reason:ad(s,O)})}):null,(0,h.jsxs)(aJ,{children:[(0,h.jsx)(a0,{disabled:P,children:s("common.cancel")}),k?(0,h.jsx)(aX,{onClick:function(e){e.preventDefault(),T(function(e){return e+1})},children:s("activate.retryPreview")}):(0,h.jsx)(aX,{disabled:null===b||P,onClick:function(e){var t;return(t=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(t){switch(t.label){case 0:if(e.preventDefault(),!b||P)return[2];E(!0),C(null),t.label=1;case 1:if(t.trys.push([1,6,7,8]),!o)return[3,3];return[4,f(n.id)];case 2:return t.sent(),[3,5];case 3:return[4,d(n.id,null!=g?g:"")];case 4:t.sent(),t.label=5;case 5:return l(!1),[3,8];case 6:return C(as(t.sent())),[3,8];case 7:return E(!1),[7];case 8:return[2]}})},function(){var e=this,n=arguments;return new Promise(function(r,a){var o=t.apply(e,n);function i(e){uu(o,r,a,i,l,"next",e)}function l(e){uu(o,r,a,i,l,"throw",e)}i(void 0)})})()},children:s(P?"activate.executing":O?"activate.retry":"activate.confirm")})]})]})})}function uf(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 up(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 uh(e){var t=e.className,n=up(e,["className"]);return(0,h.jsx)("div",uf({"data-slot":"card",className:eZ("rounded-2xl border bg-card text-card-foreground shadow-[0_12px_34px_-26px_rgb(36_39_70/0.38)]",t)},n))}function um(e){var t=e.className,n=up(e,["className"]);return(0,h.jsx)("div",uf({"data-slot":"card-title",className:eZ("font-semibold leading-none tracking-tight",t)},n))}function ug(e){var t=e.className,n=up(e,["className"]);return(0,h.jsx)("div",uf({"data-slot":"card-description",className:eZ("text-sm text-muted-foreground",t)},n))}function uy(e){var t=e.className,n=up(e,["className"]);return(0,h.jsx)("div",uf({"data-slot":"card-content",className:eZ("p-5 pt-0",t)},n))}function uv(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 ub(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 uv(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 uv(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 ux(e){var t,n,r,a,o,i,l,s,u,c=e.harness,d=e.onAdd,f=e.onEdit,p=e.extraActions,g=(0,v.Bd)().t,y=ab(function(e){return e.deleteProfile}),b=ub((0,m.useState)(null),2),x=b[0],w=b[1],k=ub((0,m.useState)(null),2),j=k[0],S=k[1],O=ub((0,m.useState)(!1),2),N=O[0],P=O[1],E=c.profiles.filter(function(e){return"official"===e.extras.providerType}).length,_=(null==(r=c.active)?void 0:r.official)?g("harness.official"):null!=(t=null==(a=c.active)?void 0:a.name)?t:null;return(0,h.jsxs)("div",{className:"space-y-6",children:[(0,h.jsx)(uh,{className:"overflow-hidden border-primary/10",children:(0,h.jsxs)(uy,{className:"p-5 sm:p-6",children:[(0,h.jsxs)("div",{className:"grid gap-5 sm:grid-cols-[minmax(0,1fr)_minmax(15rem,0.85fr)] sm:divide-x",children:[(0,h.jsxs)("div",{className:"min-w-0 sm:pr-5",children:[(0,h.jsxs)("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[(0,h.jsx)("span",{className:"size-2 rounded-full bg-primary shadow-[0_0_0_4px_rgb(99_91_255/0.1)]"}),"dsh"===c.id?g("harness.defaultModel"):g("harness.activeConfig")]}),(0,h.jsx)(um,{className:"mt-3 truncate text-xl",children:null===_?g("harness.inactive"):g("harness.activeNamed",{name:_})}),(0,h.jsx)(ug,{className:"mt-1",children:null===_?g("harness.currentInactive"):g("harness.current",{name:_})})]}),(0,h.jsxs)("div",{className:"min-w-0 sm:pl-5",children:[(0,h.jsx)("p",{className:"text-xs text-muted-foreground",children:g("harness.writeTargets")}),(0,h.jsx)("p",{className:"mt-3 truncate font-mono text-sm",children:null!=(n=null==(o=c.targets[0])?void 0:o.path)?n:g("harness.noTargetFile")}),c.targets.length>1?(0,h.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:g("harness.moreFiles",{count:c.targets.length-1})}):null]})]}),(0,h.jsxs)("div",{className:"mt-5 flex items-start gap-3 border-t pt-4 text-sm text-muted-foreground",children:[(0,h.jsx)("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-primary/[0.08] text-primary",children:(0,h.jsx)(sv,{className:"size-4"})}),(0,h.jsx)("p",{className:"pt-1 leading-relaxed",children:g("harness.overwriteWarning")})]})]})}),(0,h.jsxs)("section",{children:[(0,h.jsxs)("div",{className:"mb-3 flex items-center justify-between gap-3",children:[(0,h.jsxs)("div",{children:[(0,h.jsx)("h3",{className:"text-sm font-semibold",children:"dsh"===c.id?g("harness.providers"):g("harness.profiles")}),(0,h.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:g("harness.profileCount",{count:c.profiles.length})})]}),p]}),(0,h.jsxs)("div",{className:"space-y-3",children:[c.supportsOfficialAuth?(0,h.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,h.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,h.jsx)("span",{className:"flex size-10 shrink-0 items-center justify-center rounded-xl bg-muted text-muted-foreground",children:(0,h.jsx)(ua,{className:"size-4"})}),(0,h.jsxs)("div",{className:"min-w-0",children:[(0,h.jsxs)("div",{className:"flex items-center gap-2",children:[(0,h.jsx)("p",{className:"font-medium",children:g("harness.official")}),(null==(i=c.active)?void 0:i.official)?(0,h.jsx)(eJ,{variant:"secondary",children:g("harness.active")}):null]}),(0,h.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:"claude"===c.id?g("harness.officialHintClaude"):"kimi"===c.id?g("harness.officialHintKimi"):g("harness.officialHintCodex")})]})]}),(0,h.jsx)(tb,{size:"sm",variant:(null==(l=c.active)?void 0:l.official)?"secondary":"outline",disabled:null==(s=c.active)?void 0:s.official,onClick:function(){return P(!0)},children:(null==(u=c.active)?void 0:u.official)?g("harness.officialActive"):g("harness.officialSwitch")})]}):null,0===c.profiles.length?(0,h.jsxs)("div",{className:"rounded-xl border border-dashed bg-card/60 px-5 py-8 text-center",children:[(0,h.jsx)("p",{className:"text-sm text-muted-foreground",children:g("harness.noProfiles")}),(0,h.jsxs)(tb,{className:"mt-4",size:"sm",onClick:d,children:[(0,h.jsx)(C,{}),g("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,a="dsh"===c.id&&"official"===e.extras.providerType;return(0,h.jsxs)("div",{className:eZ("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,h.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[(0,h.jsx)("span",{className:eZ("mt-2 size-2 shrink-0 rounded-full",r?"bg-primary":"bg-muted-foreground/30")}),(0,h.jsxs)("div",{className:"min-w-0",children:[(0,h.jsxs)("div",{className:"flex items-center gap-2",children:[(0,h.jsx)("p",{className:"font-medium",children:a?g("harness.deepseekOfficial"):e.name}),r?(0,h.jsx)(eJ,{children:"dsh"===c.id?g("harness.default"):g("harness.active")}):null,a?(0,h.jsx)(eJ,{variant:"secondary",children:g("harness.official")}):null,e.overriddenTargets.length>0?(0,h.jsx)(eJ,{variant:"outline",children:g("harness.manualOverride")}):null]}),(0,h.jsx)("p",{className:"mt-1 truncate font-mono text-xs text-muted-foreground",children:e.baseUrl}),e.model?(0,h.jsx)("p",{className:"mt-0.5 font-mono text-xs text-muted-foreground",children:e.model}):null]})]}),(0,h.jsxs)("div",{className:"flex shrink-0 items-center gap-1.5 self-end sm:self-auto",children:[(0,h.jsxs)(tb,{size:"sm",variant:r?"secondary":"outline",onClick:function(){return S(e)},disabled:r,children:[r?null:(0,h.jsx)(uo,{}),r?"dsh"===c.id?g("harness.default"):g("harness.active"):"dsh"===c.id?g("harness.setDefault"):g("harness.activate")]}),(0,h.jsx)(tb,{size:"icon",variant:"ghost","aria-label":g("harness.edit",{name:e.name}),onClick:function(){return f(e)},children:(0,h.jsx)(ui,{})}),(0,h.jsx)(tb,{size:"icon",variant:"ghost","aria-label":g("harness.delete",{name:e.name}),disabled:r||a&&1===E,title:r?g("harness.deleteBlocked"):void 0,onClick:function(){return w(e.name)},children:(0,h.jsx)(ul,{className:r||a&&1===E?void 0:"text-destructive"})})]})]},e.name)})]})]}),j?(0,h.jsx)(ud,{harness:c,profile:j,open:!0,onOpenChange:function(e){return!e&&S(null)}}):null,N?(0,h.jsx)(ud,{harness:c,official:!0,open:!0,onOpenChange:function(e){return!e&&P(!1)}}):null,(0,h.jsx)(aI,{open:null!==x,onOpenChange:function(e){return!e&&w(null)},children:(0,h.jsxs)(aZ,{children:[(0,h.jsxs)(aG,{children:[(0,h.jsx)(aQ,{children:g("harness.deleteTitle")}),(0,h.jsx)(aY,{children:g("harness.deleteBody",{harness:c.label,profile:null!=x?x:"",extra:"additive"===c.mode?g("harness.deleteAdditiveExtra"):""})})]}),(0,h.jsxs)(aJ,{children:[(0,h.jsx)(a0,{children:g("common.cancel")}),(0,h.jsx)(aX,{onClick:function(){x&&y(c.id,x)},children:g("common.delete")})]})]})})]})}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,m.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,h.jsxs)("svg",uS(uS({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,h.jsx)("title",{children:"Claude Code"}),(0,h.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 uC=/\p{Lu}?\p{Ll}+|[0-9]+|\p{Lu}+(?!\p{Ll})|\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{L}+/gu;var uN=function(e){var t=(0,m.useId)(),n="lobe-icons-".concat(Array.from(e.match(uC)??[]).map(e=>e.toLowerCase()).join("-"),"-").concat(t);return(0,m.useMemo)(function(){return{fill:"url(#".concat(n,")"),id:n}},[e])},uP="Codex";function uE(e){return(uE="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 u_=["size","style"];function uz(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 uT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uz(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"!=uE(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=uE(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==uE(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)):uz(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var uA=(0,m.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,u_),o=uN(uP),i=o.id,l=o.fill;return(0,h.jsxs)("svg",uT(uT({height:n,style:uT({flex:"none",lineHeight:1},r),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},a),{},{children:[(0,h.jsx)("title",{children:uP}),(0,h.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,h.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,h.jsx)("defs",{children:(0,h.jsxs)("linearGradient",{gradientUnits:"userSpaceOnUse",id:i,x1:"12",x2:"12",y1:"3",y2:"21",children:[(0,h.jsx)("stop",{stopColor:"#B1A7FF"}),(0,h.jsx)("stop",{offset:".5",stopColor:"#7A9DFF"}),(0,h.jsx)("stop",{offset:"1",stopColor:"#3941FF"})]})})]}))});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 uI=["size","style"];function uL(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 uM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uL(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)):uL(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var uD=(0,m.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,uI);return(0,h.jsxs)("svg",uM(uM({height:n,style:uM({flex:"none",lineHeight:1},r),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},a),{},{children:[(0,h.jsx)("title",{children:"DeepSeek"}),(0,h.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 uF(e){return(uF="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 u$=["size","style"];function uU(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?uU(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"!=uF(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=uF(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==uF(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)):uU(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var uB=(0,m.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,u$);return(0,h.jsxs)("svg",uH(uH({fill:"currentColor",fillRule:"evenodd",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,h.jsx)("title",{children:"Kimi"}),(0,h.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,h.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 uK(e){return(uK="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 uV=["size","style"];function uq(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 uW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uq(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"!=uK(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=uK(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==uK(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)):uq(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var uZ={claude:uO,codex:uA,kimi:uB,pi:(0,m.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,uV);return(0,h.jsxs)("svg",uW(uW({fill:"currentColor",fillRule:"evenodd",height:n,style:uW({flex:"none",lineHeight:1},r),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},a),{},{children:[(0,h.jsx)("title",{children:"Pi"}),(0,h.jsx)("path",{clipRule:"evenodd",d:"M1 1h16.5v11H12v5.5H6.5V23H1V1zm5.5 5.5V12H12V6.5H6.5z"}),(0,h.jsx)("path",{d:"M17.5 12H23v11h-5.5V12z"})]}))}),dsh:uD};function uG(e){var t=e.id,n=e.className,r=uZ[t];return(0,h.jsx)(r,{"aria-hidden":!0,className:eZ("size-5",n)})}let uJ=j("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 uQ(){var e=(0,v.Bd)().t,t=(0,v.s9)(),n=t.language,r=t.setLanguage,a="en"===n,o=e(a?"language.toChinese":"language.toEnglish");return(0,h.jsxs)(tb,{type:"button",size:"sm",variant:"outline","aria-label":o,title:o,onClick:function(){return r(a?"zh-CN":"en")},children:[(0,h.jsx)(uJ,{}),(0,h.jsx)("span",{className:"hidden sm:inline",children:e("language.short")})]})}let uY=Array(12).fill(0),uX=({visible:e,className:t})=>m.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},m.createElement("div",{className:"sonner-spinner"},uY.map((e,t)=>m.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${t}`})))),u0=m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},m.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),u1=m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},m.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),u2=m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},m.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),u4=m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},m.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),u3=m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},m.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),m.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),u5=1,u6=e=>{var t;return"number"==typeof(null==e?void 0:e.id)||(null==e||null==(t=e.id)?void 0:t.length)>0?e.id:u5++},u8=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),this.getActiveToasts().forEach(t=>e(t)),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e],this.trimHistory()},this.trimHistory=()=>{let e=this.toasts.length-100;e<=0||(this.toasts=this.toasts.filter(t=>!(e>0&&this.dismissedToasts.has(t.id))||(this.dismissedToasts.delete(t.id),e--,!1)))},this.create=e=>{let{message:t,...n}=e,r=u6(e),a=this.pendingDismissals.get(r);void 0!==a&&(cancelAnimationFrame(a),this.pendingDismissals.delete(r),this.dismissedToasts.delete(r));let o=this.dismissedToasts.has(r),i=void 0===e.dismissible||e.dismissible;return o&&(this.dismissedToasts.delete(r),this.toasts=this.toasts.filter(e=>e.id!==r)),(o?void 0:this.toasts.find(e=>e.id===r))?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:i,title:t}):n):this.addToast({title:t,...n,dismissible:i,id:r}),r},this.dismiss=e=>{if(null==e)return this.getActiveToasts().forEach(e=>{this.dismissedToasts.add(e.id),this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e;this.dismissedToasts.add(e);let t=this.pendingDismissals.get(e);return void 0!==t&&cancelAnimationFrame(t),this.pendingDismissals.set(e,requestAnimationFrame(()=>{this.pendingDismissals.delete(e),this.subscribers.forEach(t=>t({id:e,dismiss:!0}))})),e},this.message=(e,t)=>this.create({...t,message:e,type:void 0}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{let n,r;if(!t)return;void 0!==t.loading&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:"function"!=typeof t.description?t.description:void 0}));let a=Promise.resolve(e instanceof Function?e():e),o=void 0!==r,i=a.then(async e=>{if(n=["resolve",e],m.isValidElement(e))o=!1,this.create({id:r,type:"default",message:e});else if(u9(e)&&!e.ok){o=!1;let n="function"==typeof t.error?await t.error(`HTTP error! status: ${e.status}`):t.error,a="function"==typeof t.description?await t.description(`HTTP error! status: ${e.status}`):t.description,i="object"!=typeof n||m.isValidElement(n)?{message:n}:n;this.create({id:r,type:"error",description:a,...i})}else if(e instanceof Error){o=!1;let n="function"==typeof t.error?await t.error(e):t.error,a="function"==typeof t.description?await t.description(e):t.description,i="object"!=typeof n||m.isValidElement(n)?{message:n}:n;this.create({id:r,type:"error",description:a,...i})}else if(void 0!==t.success){o=!1;let n="function"==typeof t.success?await t.success(e):t.success,a="function"==typeof t.description?await t.description(e):t.description,i="object"!=typeof n||m.isValidElement(n)?{message:n}:n;this.create({id:r,type:"success",description:a,...i})}}).catch(async e=>{if(n=["reject",e],void 0!==t.error){o=!1;let n="function"==typeof t.error?await t.error(e):t.error,a="function"==typeof t.description?await t.description(e):t.description,i="object"!=typeof n||m.isValidElement(n)?{message:n}:n;this.create({id:r,type:"error",description:a,...i})}}).finally(()=>{o&&(this.dismiss(r),r=void 0),null==t.finally||t.finally.call(t)}),l=()=>new Promise((e,t)=>i.then(()=>"reject"===n[0]?t(n[1]):e(n[1])).catch(t));return"string"!=typeof r&&"number"!=typeof r?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(e,t)=>{let n=u6(t);return this.create({...t,jsx:e(n),id:n,type:void 0}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}},u9=e=>e&&"object"==typeof e&&"ok"in e&&"boolean"==typeof e.ok&&"status"in e&&"number"==typeof e.status,u7=Object.assign((e,t)=>u8.message(e,t),{success:u8.success,info:u8.info,warning:u8.warning,error:u8.error,custom:u8.custom,message:u8.message,promise:u8.promise,dismiss:u8.dismiss,loading:u8.loading},{getHistory:()=>u8.toasts,getToasts:()=>u8.getActiveToasts()});function ce(e){return void 0!==e.label}function ct(...e){return e.filter(Boolean).join(" ")}!function(e){if(!e||"u"<typeof document)return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");let cn=e=>{var t,n,r,a,o,i,l,s,u,c,d;let{invert:f,toast:p,unstyled:h,interacting:g,setHeights:y,visibleToasts:v,heights:b,index:x,toasts:w,expanded:k,removeToast:j,defaultRichColors:S,closeButton:O,style:C,cancelButtonStyle:N,actionButtonStyle:P,className:E="",descriptionClassName:_="",duration:z,position:T,gap:A,expandByDefault:R,classNames:I,icons:L,closeButtonAriaLabel:M="Close toast"}=e,[D,F]=m.useState(null),[$,U]=m.useState(null),[H,B]=m.useState(!1),[K,V]=m.useState(!1),[q,W]=m.useState(!1),[Z,G]=m.useState(!1),[J,Q]=m.useState(!1),[Y,X]=m.useState(0),[ee,et]=m.useState(0),en=m.useRef(p.duration||z||4e3),er=m.useRef(null),ea=m.useRef(null),eo=0===x,ei=x+1<=v,el=p.type,es=null!=el?el:"default",eu=!1!==p.dismissible,ec=p.className||"",ed=p.descriptionClassName||"",ef=m.useMemo(()=>b.findIndex(e=>e.toastId===p.id)||0,[b,p.id]),ep=m.useMemo(()=>{var e;return null!=(e=p.closeButton)?e:O},[p.closeButton,O]),eh=m.useMemo(()=>p.duration||z||4e3,[p.duration,z]),em=m.useRef(0),eg=m.useRef(0),ey=m.useRef(0),ev=m.useRef(null),[eb,ex]=T.split("-"),ew=m.useMemo(()=>b.reduce((e,t,n)=>n>=ef?e:e+t.height,0),[b,ef]),ek=(()=>{let[e,t]=m.useState(document.hidden);return m.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[]),e})(),ej=m.useMemo(()=>{var t;return null!=(t=e.swipeDirections)?t:function(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}(T)},[e.swipeDirections,T]),eS=p.invert||f,eO="loading"===el;eg.current=m.useMemo(()=>ef*A+ew,[ef,ew]),m.useEffect(()=>{en.current=eh},[eh]),m.useEffect(()=>{B(!0)},[]),m.useEffect(()=>{let e=ea.current;if(e){let t=e.getBoundingClientRect().height;return et(t),y(e=>[{toastId:p.id,height:t,position:p.position},...e]),()=>y(e=>e.filter(e=>e.toastId!==p.id))}},[y,p.id]),m.useLayoutEffect(()=>{if(!H)return;let e=ea.current,t=e.style.height;e.style.height="auto";let n=e.getBoundingClientRect().height;e.style.height=t,et(n),y(e=>e.find(e=>e.toastId===p.id)?e.map(e=>e.toastId===p.id?{...e,height:n}:e):[{toastId:p.id,height:n,position:p.position},...e])},[H,p.title,p.description,y,p.id,p.jsx,p.action,p.cancel]);let eC=m.useCallback(()=>{V(!0),X(eg.current),y(e=>e.filter(e=>e.toastId!==p.id)),setTimeout(()=>{j(p)},200)},[p,j,y,eg]);function eN(){var e,t;return(null==L?void 0:L.loading)?m.createElement("div",{className:ct(null==I?void 0:I.loader,null==p||null==(t=p.classNames)?void 0:t.loader,"sonner-loader"),"data-visible":"loading"===el},L.loading):m.createElement(uX,{className:ct(null==I?void 0:I.loader,null==p||null==(e=p.classNames)?void 0:e.loader),visible:"loading"===el})}m.useEffect(()=>{let e;if((!p.promise||"loading"!==el)&&p.duration!==1/0&&"loading"!==p.type){if(k||g||ek){if(ey.current<em.current){let e=new Date().getTime()-em.current;en.current=en.current-e}ey.current=new Date().getTime()}else en.current!==1/0&&(em.current=new Date().getTime(),e=setTimeout(()=>{null==p.onAutoClose||p.onAutoClose.call(p,p),eC()},en.current));return()=>clearTimeout(e)}},[k,g,p,el,ek,eC]),m.useEffect(()=>{p.delete&&(eC(),null==p.onDismiss||p.onDismiss.call(p,p))},[eC,p.delete]);let eP=p.icon||(null==L?void 0:L[el])||(e=>{switch(e){case"success":return u0;case"info":return u2;case"warning":return u1;case"error":return u4;default:return null}})(el);return m.createElement("li",{tabIndex:0,ref:ea,className:ct(E,ec,null==I?void 0:I.toast,null==p||null==(t=p.classNames)?void 0:t.toast,null==I?void 0:I[es],null==p||null==(n=p.classNames)?void 0:n[es]),"data-sonner-toast":"","data-rich-colors":null!=(c=p.richColors)?c:S,"data-styled":!(p.jsx||p.unstyled||h),"data-mounted":H,"data-promise":!!p.promise,"data-swiped":J,"data-removed":K,"data-visible":ei,"data-y-position":eb,"data-x-position":ex,"data-index":x,"data-front":eo,"data-swiping":q,"data-dismissible":eu,"data-type":el,"data-invert":eS,"data-swipe-out":Z,"data-swipe-direction":$,"data-expanded":!!(k||R&&H),"data-testid":p.testId,style:{"--index":x,"--toasts-before":x,"--z-index":w.length-x,"--offset":`${K?Y:eg.current}px`,"--initial-height":R?"auto":`${ee}px`,...C,...p.style},onDragEnd:()=>{W(!1),F(null),ev.current=null},onPointerDown:e=>{2===e.button||eO||!eu||(er.current=new Date,X(eg.current),e.target.setPointerCapture(e.pointerId),"BUTTON"!==e.target.tagName&&(W(!0),ev.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{var e,t,n,r,a;if(Z||!eu)return;ev.current=null;let o=Number((null==(e=ea.current)?void 0:e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),i=Number((null==(t=ea.current)?void 0:t.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),l=new Date().getTime()-(null==(n=er.current)?void 0:n.getTime()),s="x"===D?o:i,u=Math.abs(s)/l;if(("x"===D?ej.includes(o>0?"right":"left"):ej.includes(i>0?"bottom":"top"))&&(Math.abs(s)>=45||u>.11)){X(eg.current),null==p.onDismiss||p.onDismiss.call(p,p),"x"===D?U(o>0?"right":"left"):U(i>0?"down":"up"),eC(),G(!0);return}null==(r=ea.current)||r.style.setProperty("--swipe-amount-x","0px"),null==(a=ea.current)||a.style.setProperty("--swipe-amount-y","0px"),Q(!1),W(!1),F(null)},onPointerMove:e=>{var t,n,r;if(!ev.current||!eu||(null==(t=window.getSelection())?void 0:t.toString().length)>0)return;let a=e.clientY-ev.current.y,o=e.clientX-ev.current.x;!D&&(Math.abs(o)>1||Math.abs(a)>1)&&F(Math.abs(o)>Math.abs(a)?"x":"y");let i={x:0,y:0},l=e=>1/(1.5+Math.abs(e)/20);if("y"===D){if(ej.includes("top")||ej.includes("bottom"))if(ej.includes("top")&&a<0||ej.includes("bottom")&&a>0)i.y=a;else{let e=a*l(a);i.y=Math.abs(e)<Math.abs(a)?e:a}}else if("x"===D&&(ej.includes("left")||ej.includes("right")))if(ej.includes("left")&&o<0||ej.includes("right")&&o>0)i.x=o;else{let e=o*l(o);i.x=Math.abs(e)<Math.abs(o)?e:o}(Math.abs(i.x)>0||Math.abs(i.y)>0)&&Q(!0),null==(n=ea.current)||n.style.setProperty("--swipe-amount-x",`${i.x}px`),null==(r=ea.current)||r.style.setProperty("--swipe-amount-y",`${i.y}px`)}},ep&&!p.jsx&&"loading"!==el?m.createElement("button",{"aria-label":M,"data-disabled":eO,"data-close-button":!0,onClick:eO||!eu?()=>{}:()=>{eC(),null==p.onDismiss||p.onDismiss.call(p,p)},className:ct(null==I?void 0:I.closeButton,null==p||null==(r=p.classNames)?void 0:r.closeButton)},null!=(d=null==L?void 0:L.close)?d:u3):null,(el||p.icon||p.promise)&&null!==p.icon&&((null==L?void 0:L[el])!==null||p.icon)?m.createElement("div",{"data-icon":"",className:ct(null==I?void 0:I.icon,null==p||null==(a=p.classNames)?void 0:a.icon)},"loading"===el?p.icon||eN():p.promise?eN():null,"loading"!==el?eP:null):null,m.createElement("div",{"data-content":"",className:ct(null==I?void 0:I.content,null==p||null==(o=p.classNames)?void 0:o.content)},m.createElement("div",{"data-title":"",className:ct(null==I?void 0:I.title,null==p||null==(i=p.classNames)?void 0:i.title)},p.jsx?p.jsx:"function"==typeof p.title?p.title():p.title),p.description?m.createElement("div",{"data-description":"",className:ct(_,ed,null==I?void 0:I.description,null==p||null==(l=p.classNames)?void 0:l.description)},"function"==typeof p.description?p.description():p.description):null),m.isValidElement(p.cancel)?p.cancel:p.cancel&&ce(p.cancel)?m.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||N,onClick:e=>{!ce(p.cancel)||eu&&(null==p.cancel.onClick||p.cancel.onClick.call(p.cancel,e),eC())},className:ct(null==I?void 0:I.cancelButton,null==p||null==(s=p.classNames)?void 0:s.cancelButton)},p.cancel.label):null,m.isValidElement(p.action)?p.action:p.action&&ce(p.action)?m.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||P,onClick:e=>{!ce(p.action)||(null==p.action.onClick||p.action.onClick.call(p.action,e),e.defaultPrevented||eC())},className:ct(null==I?void 0:I.actionButton,null==p||null==(u=p.classNames)?void 0:u.actionButton)},p.action.label):null)};function cr(){if("u"<typeof window||"u"<typeof document)return"ltr";let e=document.documentElement.getAttribute("dir");return"auto"!==e&&e?e:window.getComputedStyle(document.documentElement).direction}let ca=m.forwardRef(function(e,t){let{id:n,invert:r,position:a="bottom-right",hotkey:o=["altKey","KeyT"],expand:i,closeButton:l,className:s,offset:u,mobileOffset:c,theme:d="light",richColors:f,duration:p,style:h,visibleToasts:g=3,toastOptions:y,dir:v=cr(),gap:b=14,icons:x,customAriaLabel:w,containerAriaLabel:k="Notifications"}=e,[j,S]=m.useState([]),O=m.useMemo(()=>n?j.filter(e=>e.toasterId===n):j.filter(e=>!e.toasterId),[j,n]),C=m.useMemo(()=>Array.from(new Set([a].concat(O.filter(e=>e.position).map(e=>e.position)))),[O,a]),[N,P]=m.useState([]),[E,_]=m.useState(!1),[z,T]=m.useState(!1),[A,R]=m.useState("system"!==d?d:"u">typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),I=m.useRef(null),L=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),M=m.useRef(null),D=m.useRef(!1),F=m.useCallback(e=>{S(t=>{var n;return(null==(n=t.find(t=>t.id===e.id))?void 0:n.delete)||u8.dismiss(e.id),t.filter(({id:t})=>t!==e.id)})},[]);return m.useEffect(()=>u8.subscribe(e=>{e.dismiss?requestAnimationFrame(()=>{S(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))}):setTimeout(()=>{tq.flushSync(()=>{S(t=>{let n=t.findIndex(t=>t.id===e.id);return -1!==n?[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]:[e,...t]})})})}),[]),m.useEffect(()=>{if("system"!==d)return void R(d);if("system"===d&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?R("dark"):R("light")),"u"<typeof window)return;let e=window.matchMedia("(prefers-color-scheme: dark)");try{e.addEventListener("change",({matches:e})=>{e?R("dark"):R("light")})}catch(t){e.addListener(({matches:e})=>{try{e?R("dark"):R("light")}catch(e){console.error(e)}})}},[d]),m.useEffect(()=>{j.length<=1&&_(!1)},[j]),m.useEffect(()=>{let e=e=>{var t,n;o.length>0&&o.every(t=>e[t]||e.code===t)&&(_(!0),null==(n=I.current)||n.focus()),"Escape"===e.code&&(document.activeElement===I.current||(null==(t=I.current)?void 0:t.contains(document.activeElement)))&&_(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[o]),m.useEffect(()=>{if(I.current)return()=>{M.current&&(M.current.focus({preventScroll:!0}),M.current=null,D.current=!1)}},[I.current]),m.createElement("section",{ref:t,"aria-label":null!=w?w:`${k} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},C.map((t,n)=>{var a;let o,[d,w]=t.split("-");return O.length?m.createElement("ol",{key:t,dir:"auto"===v?cr():v,tabIndex:-1,ref:I,className:s,"data-sonner-toaster":!0,"data-sonner-theme":A,"data-y-position":d,"data-x-position":w,style:{"--front-toast-height":`${(null==(a=N[0])?void 0:a.height)||0}px`,"--width":"356px","--gap":`${b}px`,...h,...(o={},[u,c].forEach((e,t)=>{let n=1===t,r=n?"--mobile-offset":"--offset",a=n?"16px":"24px";function i(e){["top","right","bottom","left"].forEach(t=>{o[`${r}-${t}`]="number"==typeof e?`${e}px`:e})}"number"==typeof e||"string"==typeof e?i(e):"object"==typeof e?["top","right","bottom","left"].forEach(t=>{void 0===e[t]?o[`${r}-${t}`]=a:o[`${r}-${t}`]="number"==typeof e[t]?`${e[t]}px`:e[t]}):i(a)}),o)},onBlur:e=>{D.current&&!e.currentTarget.contains(e.relatedTarget)&&(D.current=!1,M.current&&(M.current.focus({preventScroll:!0}),M.current=null))},onFocus:e=>{!(e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible)&&(D.current||(D.current=!0,M.current=e.relatedTarget))},onMouseEnter:()=>_(!0),onMouseMove:()=>_(!0),onMouseLeave:()=>{z||_(!1)},onDragEnd:()=>_(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||T(!0)},onPointerUp:()=>T(!1)},O.filter(e=>!e.position&&0===n||e.position===t).map((n,a)=>{var o,s;return m.createElement(cn,{key:n.id,icons:x,index:a,toast:n,defaultRichColors:f,duration:null!=(o=null==y?void 0:y.duration)?o:p,className:null==y?void 0:y.className,descriptionClassName:null==y?void 0:y.descriptionClassName,invert:r,visibleToasts:g,closeButton:null!=(s=null==y?void 0:y.closeButton)?s:l,interacting:z,position:t,style:null==y?void 0:y.style,unstyled:null==y?void 0:y.unstyled,classNames:null==y?void 0:y.classNames,cancelButtonStyle:null==y?void 0:y.cancelButtonStyle,actionButtonStyle:null==y?void 0:y.actionButtonStyle,closeButtonAriaLabel:null==y?void 0:y.closeButtonAriaLabel,removeToast:F,toasts:O.filter(e=>e.position==n.position),heights:N.filter(e=>e.position==n.position),setHeights:P,expandByDefault:i,gap:b,expanded:E,swipeDirections:e.swipeDirections})})):null}))});var co=d(2935);function ci(e){var t=(0,co.ec)();return(0,h.jsx)(ca,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}({theme:t,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"}},e))}function cl(){var e=(0,v.Bd)().t,t=ab(function(e){return e.notice}),n=ab(function(e){return e.clearNotice});return(0,m.useEffect)(function(){if(t){var 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,u=ad(e,s);s.key.startsWith("warning.")?u7.warning(u):u7.success(u)}}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}n()}},[t,n,e]),(0,h.jsx)(ci,{position:"top-center",richColors:!0})}let cs=j("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 cu(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 cc(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 cd(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 cu(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 cu(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 cf(e){var t,n,r=e.harnessId,a=e.open,o=e.onOpenChange,i=(0,v.s9)().locale,l=(0,v.Bd)().t,s=ab(function(e){return e.operations}),u=ab(function(e){return e.operationsLoading}),c=ab(function(e){return e.operationsError}),d=ab(function(e){return e.loadOperations}),f=ab(function(e){return e.undoOperation}),p=cd((0,m.useState)(null),2),g=p[0],y=p[1],b=cd((0,m.useState)(!1),2),x=b[0],w=b[1],k=cd((0,m.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=T.RP[r];return(0,m.useEffect)(function(){a&&(S(null),d(r))},[a,r,d]),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(rw,{open:a,onOpenChange:o,children:(0,h.jsxs)(rK,{className:"flex max-h-[85vh] w-[min(52rem,calc(100vw-2rem))] max-w-2xl flex-col gap-0 overflow-hidden p-0",children:[(0,h.jsxs)(rV,{className:"shrink-0 space-y-1.5 px-6 pb-4 pt-6 pr-12",children:[(0,h.jsx)(rW,{children:l("operations.titleFor",{harness:C})}),(0,h.jsx)(rZ,{children:l("operations.intro")})]}),(0,h.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto overscroll-contain px-6",children:[u&&0===O.length?(0,h.jsxs)("p",{className:"flex items-center justify-center gap-2 py-10 text-sm text-muted-foreground",children:[(0,h.jsx)(sT,{className:"size-4 animate-spin"}),l("operations.loading")]}):null,c?(0,h.jsx)("p",{className:"py-6 text-sm text-destructive",children:ad(l,c)}):null,u||0!==O.length?null:(0,h.jsx)("p",{className:"py-10 text-center text-sm text-muted-foreground",children:l("operations.empty")}),O.length>0?(0,h.jsx)("ul",{className:"divide-y rounded-xl border",children:O.map(function(e){var t,n,r,a,o;return(0,h.jsxs)("li",{className:"flex items-center gap-3 px-3 py-2.5",children:[(0,h.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,h.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,h.jsxs)("span",{className:"truncate text-sm font-medium",children:[l("operations.kind.".concat(e.kind))," \xb7 ",e.profile]}),(0,h.jsx)(eJ,{variant:"degraded"===(n=e.state)?"destructive":"committed"===n?"default":"secondary",children:l("operations.state.".concat(e.state))})]}),(0,h.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,h.jsx)("p",{className:"truncate text-xs text-muted-foreground",children:e.note}):null]}),(0,h.jsxs)(tb,{size:"sm",variant:"outline",className:"shrink-0",disabled:!e.undoable,onClick:function(){return y(e)},children:[(0,h.jsx)(cs,{}),l("operations.undo")]})]},e.id)})}):null]}),(0,h.jsx)(rq,{className:"shrink-0 px-6 py-4",children:(0,h.jsx)(tb,{onClick:function(){return o(!1)},children:l("operations.close")})})]})}),(0,h.jsx)(rw,{open:null!==g,onOpenChange:function(e){return!e&&y(null)},children:(0,h.jsxs)(rK,{className:"max-w-lg",children:[(0,h.jsxs)(rV,{children:[(0,h.jsx)(rW,{children:l("operations.undoTitle")}),(0,h.jsx)(rZ,{children:g?l("operations.undoBody",{harness:null!=(n=T.RP[g.harness])?n:g.harness,count:g.files.length}):""})]}),j?(0,h.jsx)("p",{className:"text-sm text-destructive",children:ad(l,j)}):null,(0,h.jsxs)(rq,{children:[(0,h.jsx)(tb,{variant:"outline",onClick:function(){return y(null)},children:l("common.cancel")}),(0,h.jsxs)(tb,{disabled:x,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(!g)return[2];w(!0),S(null),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,f(g.id)];case 2:return e.sent(),y(null),[3,5];case 3:return S(au(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){cc(o,r,a,i,l,"next",e)}function l(e){cc(o,r,a,i,l,"throw",e)}i(void 0)})})()},children:[x?(0,h.jsx)(sT,{className:"animate-spin"}):null,l("operations.confirmUndo")]})]})]})})]})}function cp(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 ch(e){var t,n,r=e.harness,a=(0,v.Bd)().t,o=ab(function(e){return e.operations}),i=ab(function(e){return e.operationsLoading}),l=ab(function(e){return e.operationsError}),s=ab(function(e){return e.loadOperations}),u=function(e){if(Array.isArray(e))return e}(t=(0,m.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 cp(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 cp(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,m.useEffect)(function(){s(r.id)},[r.id,s]),(0,h.jsxs)("section",{className:"rounded-2xl border bg-card p-5 shadow-[0_12px_34px_-28px_rgb(36_39_70/0.38)]",children:[(0,h.jsxs)("div",{className:"flex items-center gap-2",children:[(0,h.jsx)(A,{className:"size-4 text-primary"}),(0,h.jsx)("h3",{className:"font-semibold",children:a("operations.title")}),(0,h.jsx)("span",{className:"ml-auto",children:(0,h.jsx)(tb,{size:"icon",variant:"ghost","aria-label":a("operations.refresh"),onClick:function(){s(r.id)},children:(0,h.jsx)(sX,{className:i?"animate-spin":void 0})})})]}),(0,h.jsx)("div",{className:"mt-4",children:l?(0,h.jsx)("p",{className:"text-sm text-destructive",children:ad(a,l)}):null===o||i?(0,h.jsx)("p",{className:"text-sm text-muted-foreground",children:a("operations.loading")}):0===f.length?(0,h.jsx)("p",{className:"text-sm text-muted-foreground",children:a("operations.empty")}):(0,h.jsx)("p",{className:"text-sm text-muted-foreground",children:a("operations.count",{count:f.length})})}),(0,h.jsx)(tb,{className:"mt-4 w-full",size:"sm",variant:"outline",disabled:null===o,onClick:function(){return d(!0)},children:a("operations.viewDetails")}),(0,h.jsx)(cf,{harnessId:r.id,open:c,onOpenChange:d})]})}let cm=j("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),cg=j("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"}]]),cy=j("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);function cv(e){var t=e.result,n=(0,v.Bd)().t;if(t.ok){var r,a,o,i,l=null!=(a=null==(i=t.models)?void 0:i.length)?a:0;return(0,h.jsxs)("span",{className:"flex items-center gap-1.5 text-sm text-emerald-600 dark:text-emerald-400",children:[(0,h.jsx)(sA,{className:"size-4 shrink-0","aria-hidden":!0}),n(l>0?"probe.ok":"probe.okNoCatalog",{latencyMs:null!=(o=t.latencyMs)?o:"?",count:l})]})}return(0,h.jsxs)("span",{className:"flex items-center gap-1.5 text-sm text-destructive",children:[(0,h.jsx)(cy,{className:"size-4 shrink-0","aria-hidden":!0}),ad(n,al({code:t.code,params:t.params,message:null!=(r=t.message)?r:""}))]})}function cb(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,h.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:eZ("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 cx(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 cw(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 ck(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 cj(e){return function(e){if(Array.isArray(e))return cx(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 cx(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 cx(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 cS=[{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"}],cO={id:"cliproxyResponses",baseUrl:"https://api.seavey.ai/cliproxy/v1",model:"gpt-5.6-sol"},cC={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:cS,kimi:cS,pi:[ck(cw({},cO),{extras:{api:"openai-responses",reasoning:"true"}})].concat(cj(cS)),dsh:[ck(cw({},cO),{extras:{api:"openai-responses",reasoningEfforts:"low,medium,high,xhigh,max"}})].concat(cj(cS))};function cN(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 cP(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 cE(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function i(e){cP(o,r,a,i,l,"next",e)}function l(e){cP(o,r,a,i,l,"throw",e)}i(void 0)})}}function c_(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cz(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){c_(e,t,n[t])})}return e}function cT(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 cA(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)||cR(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 cR(e,t){if(e){if("string"==typeof e)return cN(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 cN(e,t)}}function cI(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 cL=[{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}],cM="subagentModel",cD="subagentModel1m",cF=new Set(((function(e){if(Array.isArray(e))return cN(e)})(c=cL.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)||cR(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([cM,cD]));function c$(e){var t,n,r,a,o,i,l,s,u,c,d=e.harness,f=e.profile,p=e.onOpenChange,g=(0,v.Bd)().t,y=ab(function(e){return e.createProfile}),b=ab(function(e){return e.updateProfile}),x=ab(function(e){return e.previewProfile}),w=ab(function(e){return e.providers}),k=ab(function(e){return e.loadProviders}),j=ab(function(e){return e.probeDraft}),S=ab(function(e){return e.probeProfile}),O=null!==f,C=cA((0,m.useState)(null!=(t=null==f?void 0:f.name)?t:""),2),P=C[0],E=C[1],_=cA((0,m.useState)(null!=(n=null==f?void 0:f.baseUrl)?n:""),2),z=_[0],T=_[1],A=cA((0,m.useState)(""),2),R=A[0],I=A[1],L=cA((0,m.useState)(null!=(r=null==f?void 0:f.model)?r:""),2),M=L[0],D=L[1],F=cA((0,m.useState)(null!=(a=null==f?void 0:f.notes)?a:""),2),$=F[0],U=F[1],H=cA((0,m.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}(d.fields,f)}),2),B=H[0],K=H[1],V=cA((0,m.useState)({}),2),q=V[0],W=V[1],Z=cA((0,m.useState)(null!=(o=null==f?void 0:f.providerId)?o:""),2),G=Z[0],J=Z[1],Q=cA((0,m.useState)(null!=(i=null==f?void 0:f.providerEndpoint)?i:""),2),Y=Q[0],X=Q[1],ee=cA((0,m.useState)(!1),2),et=ee[0],en=ee[1],er=cA((0,m.useState)(null),2),ea=er[0],eo=er[1],ei=cA((0,m.useState)(null),2),el=ei[0],es=ei[1],eu=cA((0,m.useState)(!1),2),ec=eu[0],ed=eu[1],ef=cA((0,m.useState)({}),2),ep=ef[0],eh=ef[1],em=cA((0,m.useState)(!1),2),eg=em[0],ey=em[1],ev=cA((0,m.useState)(null),2),eb=ev[0],ex=ev[1],ew=null!=w?w:[],ek=null!=(l=ew.find(function(e){return e.id===G}))?l:null,ej=null==ek?void 0:ek.endpoints.find(function(e){return e.key===Y}),eS=(null==eb?void 0:eb.ok)&&null!=(s=eb.models)?s:[];(0,m.useEffect)(function(){ex(null)},[z,R,G,Y]);var eO=null!==w&&""!==G&&null===ek,eC=null!==ek&&""!==Y&&void 0===ej,eN="dsh"===d.id?d.fields.find(function(e){return"providerType"===e.key}):void 0,eP="dsh"===d.id&&"official"===B.providerType,eE="claude"===d.id?d.fields.filter(function(e){return!cF.has(e.key)}):"dsh"===d.id?d.fields.filter(function(e){return"providerType"!==e.key&&(!eP||["models","contextWindow","maxTokens"].includes(e.key))}):d.fields,e_=eP?[]:"claude"===d.id?eE.filter(function(e){return"authVar"===e.key}):eE,ez="claude"===d.id?eE.filter(function(e){return"authVar"!==e.key}):[];function eT(){return cE(function(){var e;return cI(this,function(t){switch(t.label){case 0:if(!f)return[2];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,x(d.id,f.name)];case 2:return eo(e=t.sent()),W(Object.fromEntries(e.filter(function(e){return e.overridden}).map(function(e){return[e.key,e.content]}))),[3,4];case 3:return es(as(t.sent())),[3,4];case 4:return[2]}})})()}function eA(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];eh(function(e){if(!t.some(function(t){return e[t]}))return e;var n=cz({},e),r=!0,a=!1,o=void 0;try{for(var i,l=t[Symbol.iterator]();!(r=(i=l.next()).done);r=!0){var s=i.value;delete n[s]}}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return n})}function eR(){var e;return ek&&Y&&null!=(e=null==ej?void 0:ej.baseUrl)?e:z}return(0,m.useEffect)(function(){null===w&&k()},[w,k]),(0,h.jsx)(rw,{open:!0,onOpenChange:p,children:(0,h.jsx)(rK,{className:"max-h-[92vh] w-[calc(100vw-2rem)] overflow-hidden p-0 sm:max-w-[1120px]",children:(0,h.jsxs)("form",{onSubmit:function(e){return cE(function(){var t,n;return cI(this,function(r){switch(r.label){case 0:if(e.preventDefault(),!function(){var e={},t=P.trim();t?t.includes("/")||t.includes("\\")?e.name={key:"profile.error.nameSlash"}:t.length>120&&(e.name={key:"profile.error.nameTooLong",params:{max:120}}):e.name={key:"profile.error.nameRequired"},eR().trim()||(e.baseUrl={key:"profile.error.baseUrlRequired"}),O||null!==ek||R.trim()||(e.apiKey={key:"profile.error.apiKeyRequired"}),d.modelRequired&&!M.trim()&&(e.model={key:"profile.error.modelRequired"}),eO&&(e.providerId={key:"profile.error.providerGone"}),eC&&(e.providerEndpoint={key:"profile.error.endpointGone"});var n=!0,r=!1,a=void 0;try{for(var o,i=d.fields[Symbol.iterator]();!(n=(o=i.next()).done);n=!0){var l,s=o.value;!s.required||(null==(l=B[s.key])?void 0:l.trim())||(e["extra:".concat(s.key)]={key:"profile.error.fieldRequired",params:{label:s.label}})}}catch(e){r=!0,a=e}finally{try{n||null==i.return||i.return()}finally{if(r)throw a}}return eh(e),!(Object.keys(e).length>0)||(es({key:"profile.error.checkFields"}),!1)}())return[2];ed(!0),es(null),r.label=1;case 1:if(r.trys.push([1,6,7,8]),n=cz({name:eP?"deepseek-official":P,baseUrl:eP?z||"https://api.deepseek.com":ek&&Y&&null!=(t=null==ej?void 0:ej.baseUrl)?t:z,model:eP?M||"deepseek-v4-flash":M,notes:$,extras:B},G?cz({providerId:G},Y?{providerEndpoint:Y}:{}):O?{providerId:""}:{},ek?{}:{apiKey:R||void 0}),!O)return[3,3];return[4,b(d.id,f.name,cT(cz({},n),{overrides:q}))];case 2:return r.sent(),[3,5];case 3:return[4,y(d.id,n)];case 4:r.sent(),r.label=5;case 5:return p(!1),[3,8];case 6:return es(as(r.sent())),[3,8];case 7:return ed(!1),[7];case 8:return[2]}})})()},noValidate:!0,className:"flex max-h-[92vh] min-h-0 flex-col",children:[(0,h.jsxs)(rV,{className:"shrink-0 border-b bg-card px-6 py-5 pr-12",children:[(0,h.jsx)(rW,{children:O?g("profile.editTitle",{harness:d.label,profile:f.name}):g("profile.createTitle",{harness:d.label})}),(0,h.jsxs)(rZ,{children:[g("profile.intro",{targets:d.targets.map(function(e){return e.label}).join(g("common.listSeparator"))}),"additive"===d.mode?g("profile.additiveNote"):""]})]}),(0,h.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:[eN&&!(O&&eP)?(0,h.jsx)(cB,{field:eN,value:null!=(u=B.providerType)?u:"custom",onChange:function(e){K(function(t){return cz(cT(cz({},t),{providerType:e}),"official"===e?{models:t.models||"deepseek-v4-flash\ndeepseek-v4-pro\ndeepseek-v4-flash-vision-exp"}:{})}),"official"===e&&(E("deepseek-official"),T("https://api.deepseek.com"),D("deepseek-v4-flash"),J(""),X(""))}}):null,eP?null:(0,h.jsxs)("div",{"data-slot":"provider-reference-fields",className:"space-y-3 rounded-xl border p-3",children:[(0,h.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,h.jsx)(od,{htmlFor:"provider-select",className:"font-medium",children:g("profile.useSharedProvider")}),ek?(0,h.jsx)(eJ,{variant:"secondary",children:g("profile.keyFromVault")}):null]}),(0,h.jsxs)(li,{value:G,onValueChange:function(e){J(e);var t,n,r=ew.find(function(t){return t.id===e});X(null!=(t=null==r||null==(n=r.endpoints[0])?void 0:n.key)?t:""),eA("providerId","providerEndpoint","baseUrl","apiKey")},children:[(0,h.jsx)(l3,{id:"provider-select","aria-label":g("profile.useSharedProviderLabel"),"aria-invalid":!!ep.providerId||void 0,"aria-describedby":ep.providerId?"provider-select-error":void 0,children:(0,h.jsx)(ls,{placeholder:g("profile.providerNone")})}),(0,h.jsxs)(l8,{children:[(0,h.jsx)(l9,{value:"",children:g("profile.providerNone")}),ew.map(function(e){return(0,h.jsx)(l9,{value:e.id,children:e.name},e.id)})]})]}),ep.providerId?(0,h.jsx)("p",{id:"provider-select-error",className:"text-xs text-destructive",children:ad(g,ep.providerId)}):null,0===ew.length?(0,h.jsx)("p",{className:"text-xs text-muted-foreground",children:g("profile.vaultEmpty")}):null,ek?(0,h.jsxs)("div",{className:"space-y-2",children:[(0,h.jsx)(od,{htmlFor:"provider-endpoint",children:g("profile.namedEndpoint")}),(0,h.jsxs)(li,{value:Y,onValueChange:function(e){X(e),eA("providerEndpoint","baseUrl")},children:[(0,h.jsx)(l3,{id:"provider-endpoint","aria-label":g("profile.namedEndpointLabel"),"aria-invalid":!!ep.providerEndpoint||void 0,"aria-describedby":ep.providerEndpoint?"provider-endpoint-error":void 0,children:(0,h.jsx)(ls,{placeholder:g("profile.endpointNone")})}),(0,h.jsxs)(l8,{children:[(0,h.jsx)(l9,{value:"",children:g("profile.endpointNone")}),ek.endpoints.map(function(e){return(0,h.jsx)(l9,{value:e.key,children:e.label?g("profile.endpointOption",{label:e.label,key:e.key}):e.key},e.key)})]})]}),ep.providerEndpoint?(0,h.jsx)("p",{id:"provider-endpoint-error",className:"text-xs text-destructive",children:ad(g,ep.providerEndpoint)}):null,0===ek.endpoints.length?(0,h.jsx)("p",{className:"text-xs text-muted-foreground",children:g("profile.noEndpoints")}):null]}):null]}),eP?null:(0,h.jsx)(cH,{harnessId:d.id,onPick:function(e){T(e.baseUrl),eA("baseUrl"),e.model&&(D(e.model),eA("model")),e.extras&&K(function(t){return cz({},t,e.extras)})}}),(0,h.jsxs)("div",{className:"grid gap-x-4 gap-y-3 sm:grid-cols-2",children:[eP?null:(0,h.jsxs)("div",{className:"space-y-2 sm:col-span-2",children:[(0,h.jsx)(od,{htmlFor:"name",children:g("profile.name")}),(0,h.jsx)(sr,{id:"name",value:P,onChange:function(e){E(e.target.value),eA("name")},placeholder:g("profile.namePlaceholder"),"aria-invalid":!!ep.name||void 0,"aria-describedby":ep.name?"profile-name-error":void 0}),ep.name?(0,h.jsx)("p",{id:"profile-name-error",className:"text-xs text-destructive",children:ad(g,ep.name)}):null,O?(0,h.jsx)("p",{className:"text-xs text-muted-foreground",children:g("profile.renameHint")}):null]}),eP?null:(0,h.jsxs)("div",{className:"space-y-2 sm:col-span-2",children:[(0,h.jsx)(od,{htmlFor:"baseUrl",children:g("profile.baseUrl")}),(0,h.jsx)(sr,{id:"baseUrl",value:ek&&Y&&null!=(c=null==ej?void 0:ej.baseUrl)?c:z,onChange:function(e){T(e.target.value),eA("baseUrl")},placeholder:g("profile.baseUrlPlaceholder"),disabled:null!==ek&&""!==Y,"aria-invalid":!!ep.baseUrl||void 0,"aria-describedby":ep.baseUrl?"profile-base-url-error":void 0}),ep.baseUrl?(0,h.jsx)("p",{id:"profile-base-url-error",className:"text-xs text-destructive",children:ad(g,ep.baseUrl)}):null,ek&&Y?(0,h.jsx)("p",{className:"text-xs text-muted-foreground",children:g("profile.baseUrlFromVault",{endpoint:Y})}):null]}),(0,h.jsxs)("div",{className:"space-y-2",children:[(0,h.jsx)(od,{htmlFor:"apiKey",children:g("profile.apiKey")}),(0,h.jsx)(sr,{id:"apiKey",type:"password",value:R,onChange:function(e){I(e.target.value),eA("apiKey")},placeholder:ek?g("profile.keyFromVault"):O?g("profile.apiKeyKeep"):g("profile.apiKeyRequiredPlaceholder"),disabled:null!==ek,"aria-invalid":!!ep.apiKey||void 0,"aria-describedby":ep.apiKey?"profile-api-key-error":void 0}),ep.apiKey?(0,h.jsx)("p",{id:"profile-api-key-error",className:"text-xs text-destructive",children:ad(g,ep.apiKey)}):null,ek?(0,h.jsx)("p",{className:"text-xs text-muted-foreground",children:g("profile.apiKeySharedHint")}):null]}),eP?null:(0,h.jsxs)("div",{className:"space-y-2",children:[(0,h.jsx)(od,{htmlFor:"model",children:"claude"===d.id?g("profile.fallbackModel"):g("profile.model")}),(0,h.jsx)(sr,{id:"model",value:M,list:eS.length>0?"profile-model-options":void 0,onChange:function(e){D(e.target.value),eA("model")},placeholder:"claude"===d.id?g("profile.fallbackModelPlaceholder"):g("profile.modelPlaceholder"),"aria-invalid":!!ep.model||void 0,"aria-describedby":ep.model?"profile-model-error":void 0}),eS.length>0?(0,h.jsx)("datalist",{id:"profile-model-options",children:eS.map(function(e){return(0,h.jsx)("option",{value:e},e)})}):null,ep.model?(0,h.jsx)("p",{id:"profile-model-error",className:"text-xs text-destructive",children:ad(g,ep.model)}):null,"claude"===d.id?(0,h.jsx)("p",{className:"text-xs text-muted-foreground",children:g("profile.claudeModelHint")}):null]}),eP?null:(0,h.jsxs)("div",{className:"space-y-2 sm:col-span-2",children:[(0,h.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,h.jsxs)(tb,{type:"button",variant:"outline",size:"sm",onClick:function(){return cE(function(){var e,t;return cI(this,function(n){switch(n.label){case 0:if(!(e=eR().trim()))return eh(function(e){return cT(cz({},e),{baseUrl:{key:"profile.error.baseUrlRequired"}})}),[2];ey(!0),es(null),ex(null),n.label=1;case 1:if(n.trys.push([1,7,8,9]),!(ek||R.trim()))return[3,3];return[4,j(cz({baseUrl:e},ek?{providerId:G}:{apiKey:R}))];case 2:case 4:return t=n.sent(),[3,6];case 3:if(!(O&&f))return[3,5];return[4,S(d.id,f.name)];case 5:return eh(function(e){return cT(cz({},e),{apiKey:{key:"profile.error.apiKeyRequired"}})}),[2];case 6:return ex(t),[3,9];case 7:return es(as(n.sent())),[3,9];case 8:return ey(!1),[7];case 9:return[2]}})})()},disabled:eg,children:[eg?(0,h.jsx)(sT,{className:"animate-spin"}):null,eg?g("probe.probing"):g("probe.action")]}),eb?(0,h.jsx)(cv,{result:eb}):null]}),(null==eb?void 0:eb.ok)&&eS.length>0?(0,h.jsx)("p",{className:"text-xs text-muted-foreground",children:g("probe.catalogHint")}):null]}),e_.map(function(e){var t;return(0,h.jsx)(cB,{field:e,value:null!=(t=B[e.key])?t:"",error:ep["extra:".concat(e.key)],onChange:function(t){K(function(n){return cT(cz({},n),c_({},e.key,t))}),eA("extra:".concat(e.key))}},e.key)}),"claude"===d.id?(0,h.jsx)(cq,{fields:d.fields,values:B,errors:ep,onChange:function(e,t){K(function(n){return cT(cz({},n),c_({},e,t))}),eA("extra:".concat(e))}}):null,ez.map(function(e){var t;return(0,h.jsx)(cB,{field:e,value:null!=(t=B[e.key])?t:"",error:ep["extra:".concat(e.key)],onChange:function(t){K(function(n){return cT(cz({},n),c_({},e.key,t))}),eA("extra:".concat(e.key))}},e.key)}),(0,h.jsxs)("div",{className:"space-y-2 sm:col-span-2",children:[(0,h.jsx)(od,{htmlFor:"notes",children:g("profile.notes")}),(0,h.jsx)(cb,{id:"notes",rows:2,value:$,onChange:function(e){return U(e.target.value)}})]})]}),(0,h.jsxs)("div",{className:"rounded-xl border",children:[(0,h.jsxs)("button",{type:"button",onClick:function(){var e=!et;en(e),e&&null===ea&&eT()},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(et?"rounded-t-xl":"rounded-xl"),children:[et?(0,h.jsx)(N,{className:"size-4"}):(0,h.jsx)(cm,{className:"size-4"}),g("profile.advanced"),f&&f.overriddenTargets.length>0?(0,h.jsx)(eJ,{variant:"secondary",children:g("profile.overridden")}):null]}),et?(0,h.jsx)("div",{className:"space-y-4 border-t px-3 py-3",children:O?(0,h.jsx)(cU,{targets:ea,overrides:q,onEdit:function(e,t){return W(function(n){return cT(cz({},n),c_({},e,t))})},onReset:function(e){W(function(t){var n=cz({},t);return delete n[e],n}),eT()}}):(0,h.jsx)("p",{className:"text-sm text-muted-foreground",children:g("profile.saveFirst")})}):null]}),el?(0,h.jsx)("p",{className:"text-sm text-destructive",children:ad(g,el)}):null]}),(0,h.jsxs)(rq,{className:"shrink-0 border-t bg-card px-6 py-4",children:[(0,h.jsx)(tb,{type:"button",variant:"outline",onClick:function(){return p(!1)},children:g("common.cancel")}),(0,h.jsx)(tb,{type:"submit",disabled:ec,children:ec?g("profile.saving"):g("profile.save")})]})]})})})}function cU(e){var t=e.targets,n=e.overrides,r=e.onEdit,a=e.onReset,o=(0,v.Bd)().t;return null===t?(0,h.jsx)("p",{className:"text-sm text-muted-foreground",children:o("profile.rawLoading")}):(0,h.jsxs)(h.Fragment,{children:[(0,h.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,h.jsxs)("div",{className:"space-y-2",children:[(0,h.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,h.jsx)(od,{htmlFor:"raw-".concat(e.key),className:"font-mono text-xs",children:e.path}),i?(0,h.jsxs)(tb,{type:"button",size:"sm",variant:"ghost",onClick:function(){return a(e.key)},children:[(0,h.jsx)(cg,{}),o("profile.resetToGenerated")]}):null]}),(0,h.jsx)(cb,{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 cH(e){var t,n=e.harnessId,r=e.onPick,a=(0,v.Bd)().t,o=null!=(t=cC[n])?t:[];return 0===o.length?null:(0,h.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,h.jsx)("span",{className:"text-xs text-muted-foreground",children:a("profile.quickFill")}),o.map(function(e){return(0,h.jsx)(tb,{type:"button",size:"sm",variant:"outline",onClick:function(){return r(e)},children:a("preset.".concat(e.id))},e.id)})]})}function cB(e){var t,n,r=e.field,a=e.value,o=e.error,i=e.onChange,l=(0,v.Bd)().t,s="extra-".concat(r.key);return(0,h.jsxs)("div",{className:"textarea"===r.kind||r.fullWidth?"space-y-2 sm:col-span-2":"space-y-2",children:[(0,h.jsx)(od,{htmlFor:s,children:r.label}),"select"===r.kind?(0,h.jsxs)(li,{value:a,onValueChange:i,children:[(0,h.jsx)(l3,{id:s,"aria-label":r.label,"aria-invalid":!!o||void 0,"aria-describedby":o?"".concat(s,"-error"):void 0,children:(0,h.jsx)(ls,{placeholder:null!=(t=r.placeholder)?t:l("profile.selectPlaceholder")})}),(0,h.jsx)(l8,{children:null==(n=r.options)?void 0:n.map(function(e){return(0,h.jsx)(l9,{value:e.value,children:e.label},e.value)})})]}):"textarea"===r.kind?(0,h.jsx)(cb,{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,h.jsx)(sr,{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,h.jsx)("p",{id:"".concat(s,"-error"),className:"text-xs text-destructive",children:ad(l,o)}):null,r.help?(0,h.jsx)("p",{className:"text-xs text-muted-foreground",children:r.help}):null]})}var cK="md:grid-cols-[6.5rem_minmax(0,1fr)_minmax(0,1fr)_8.5rem]",cV="grid gap-2 rounded-lg border bg-card/70 p-3 ".concat(cK," md:items-start md:gap-3 md:border-0 md:bg-transparent md:p-0");function cq(e){var t,n=e.fields,r=e.values,a=e.errors,o=e.onChange,i=(0,v.Bd)().t,l=new Map(n.map(function(e){return[e.key,e]})),s=l.get(cM);return(0,h.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,h.jsxs)("div",{className:"space-y-1",children:[(0,h.jsx)("h3",{className:"text-base font-semibold",children:i("profile.mapping.title")}),(0,h.jsx)("p",{className:"text-sm text-muted-foreground",children:i("profile.mapping.intro")})]}),(0,h.jsxs)("div",{className:"hidden gap-3 px-1 text-xs font-medium text-muted-foreground md:grid ".concat(cK),children:[(0,h.jsx)("span",{children:i("profile.mapping.role")}),(0,h.jsx)("span",{children:i("profile.mapping.displayName")}),(0,h.jsx)("span",{children:i("profile.mapping.actualModel")}),(0,h.jsx)("span",{children:i("profile.mapping.oneM")})]}),(0,h.jsxs)("div",{className:"space-y-3",children:[cL.map(function(e){var t,n,s,u=e.role,c=e.modelKey,d=e.nameKey,f=e.oneMKey,p=l.get(c),m=l.get(d);if(!p||!m)return null;var g=a["extra:".concat(c)],y=a["extra:".concat(d)];return(0,h.jsxs)("div",{className:cV,children:[(0,h.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,h.jsx)("span",{className:"ml-1 text-destructive",children:"*"}):null]}),(0,h.jsxs)("div",{className:"space-y-1.5",children:[(0,h.jsx)(od,{htmlFor:"extra-".concat(d),className:"text-xs md:sr-only",children:m.label}),(0,h.jsx)(sr,{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()}):m.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,h.jsx)("p",{id:"extra-".concat(d,"-error"),className:"text-xs text-destructive",children:ad(i,y)}):null]}),(0,h.jsxs)("div",{className:"space-y-1.5",children:[(0,h.jsx)(od,{htmlFor:"extra-".concat(c),className:"text-xs md:sr-only",children:p.label}),(0,h.jsx)(sr,{id:"extra-".concat(c),value:null!=(n=r[c])?n:"",placeholder:p.placeholder,"aria-invalid":!!g||void 0,"aria-describedby":g?"extra-".concat(c,"-error"):void 0,onChange:function(e){return o(c,e.target.value)}}),g?(0,h.jsx)("p",{id:"extra-".concat(c,"-error"),className:"text-xs text-destructive",children:ad(i,g)}):null]}),(0,h.jsx)(cW,{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,h.jsxs)("div",{className:cV,children:[(0,h.jsx)("div",{className:"flex h-10 items-center rounded-lg border bg-muted/45 px-3 text-sm font-medium",children:"Subagent"}),(0,h.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,h.jsxs)("div",{className:"space-y-1.5",children:[(0,h.jsx)(od,{htmlFor:"extra-subagentModel",className:"text-xs md:sr-only",children:s.label}),(0,h.jsx)(sr,{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,h.jsx)("p",{id:"extra-subagentModel-error",className:"text-xs text-destructive",children:ad(i,a["extra:subagentModel"])}):null]}),(0,h.jsx)(cW,{role:"Subagent",field:l.get(cD),value:r[cD],error:a["extra:".concat(cD)],onChange:o})]}):null]})]})}function cW(e){var t=e.role,n=e.field,r=e.value,a=e.error,o=e.onChange,i=(0,v.Bd)().t;if(!n)return(0,h.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,h.jsxs)("div",{className:"space-y-1.5",children:[(0,h.jsx)("div",{className:"flex h-10 items-center",children:(0,h.jsxs)("label",{htmlFor:l,className:"flex cursor-pointer items-center gap-2 text-sm text-muted-foreground",children:[(0,h.jsx)(os,{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,h.jsx)("span",{className:"md:hidden",children:n.label}),(0,h.jsx)("span",{className:"hidden md:inline",children:i("profile.mapping.enable")})]})}),a?(0,h.jsx)("p",{id:"".concat(l,"-error"),className:"text-xs text-destructive",children:ad(i,a)}):null]})}let cZ=j("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"}]]),cG=j("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 cJ(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 cQ(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 cY(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function i(e){cQ(o,r,a,i,l,"next",e)}function l(e){cQ(o,r,a,i,l,"throw",e)}i(void 0)})}}function cX(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c0(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){cX(e,t,n[t])})}return e}function c1(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 c2(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)||c3(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 c4(e){return function(e){if(Array.isArray(e))return cJ(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||c3(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 c3(e,t){if(e){if("string"==typeof e)return cJ(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 cJ(e,t)}}function c5(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 c6(e){var t,n=e.open,r=e.onOpenChange,a=(0,v.s9)().locale,o=(0,v.Bd)().t,i=ab(function(e){return e.providers}),l=ab(function(e){return e.providersLoading}),s=ab(function(e){return e.providersError}),u=ab(function(e){return e.loadProviders}),c=ab(function(e){return e.deleteProvider}),d=c2((0,m.useState)({kind:"list"}),2),f=d[0],p=d[1],g=c2((0,m.useState)(null),2),y=g[0],b=g[1],x=c2((0,m.useState)(null),2),w=x[0],k=x[1],j=c2((0,m.useState)(null),2),S=j[0],O=j[1],N=c2((0,m.useState)(null),2),P=N[0],E=N[1],_=c2((0,m.useState)({}),2),z=_[0],T=_[1],A=ab(function(e){return e.revealProvider});(0,m.useEffect)(function(){n&&(p({kind:"list"}),b(null),k(null),E(null),null===i&&u())},[n,i,u]);var R=null!=i?i:[];return(0,h.jsxs)(rw,{open:n,onOpenChange:r,children:[(0,h.jsxs)(rK,{className:"max-h-[88vh] overflow-y-auto sm:max-w-2xl",children:[(0,h.jsxs)(rV,{children:[(0,h.jsx)(rW,{children:"create"===f.kind?o("vault.createTitle"):"edit"===f.kind?o("vault.editTitle",{name:f.entry.name}):o("vault.title")}),(0,h.jsx)(rZ,{children:"list"===f.kind?o("vault.intro"):o("vault.formIntro")})]}),l&&0===R.length?(0,h.jsx)("p",{className:"py-6 text-center text-sm text-muted-foreground",children:o("vault.loading")}):null,s?(0,h.jsx)("p",{className:"text-sm text-destructive",children:ad(o,s)}):null,"create"===f.kind||"edit"===f.kind?(0,h.jsx)(c8,{entry:"edit"===f.kind?f.entry:null,onCancel:function(){p({kind:"list"}),k(null)},onSaved:function(e){p({kind:"list"}),b(e),k(null)}}):(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,h.jsx)("p",{className:"text-xs text-muted-foreground",children:o("vault.entryCount",{count:R.length})}),(0,h.jsxs)(tb,{size:"sm",onClick:function(){return p({kind:"create"})},children:[(0,h.jsx)(C,{}),o("vault.add")]})]}),y?(0,h.jsx)("div",{className:"rounded-xl bg-emerald-500/10 px-3 py-2 text-sm text-emerald-600 dark:text-emerald-400",children:y.map(function(e){return(0,h.jsx)("p",{children:ad(o,e)},e.key+e.scope)})}):null,w?(0,h.jsx)("p",{className:"text-sm text-destructive",children:ad(o,w)}):null,0===R.length?(0,h.jsx)("p",{className:"py-6 text-center text-sm text-muted-foreground",children:o("vault.empty")}):(0,h.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,h.jsxs)("li",{className:"px-4 py-3",children:[(0,h.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,h.jsxs)("div",{className:"min-w-0",children:[(0,h.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,h.jsx)("p",{className:"font-medium",children:e.name}),e.apiKeyConfigured?(0,h.jsx)(eJ,{variant:"secondary",children:o("vault.keyConfigured")}):(0,h.jsx)(eJ,{variant:"outline",children:o("vault.keyMissing")}),(0,h.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,h.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:e.notes}):null,e.endpoints.length>0?(0,h.jsx)("ul",{className:"mt-2 space-y-1",children:e.endpoints.map(function(e){return(0,h.jsxs)("li",{className:"flex flex-wrap items-center gap-x-2 gap-y-0.5",children:[(0,h.jsx)("code",{className:"font-mono text-xs",children:e.key}),(0,h.jsx)("span",{className:"break-all font-mono text-[11px] text-muted-foreground",children:e.baseUrl})]},e.key)})}):(0,h.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:o("vault.noEndpoints")})]}),(0,h.jsxs)("div",{className:"flex shrink-0 items-center gap-1.5",children:[(0,h.jsx)(tb,{size:"icon",variant:"ghost","aria-label":void 0!==z[e.id]?o("vault.hide",{name:e.name}):o("vault.reveal",{name:e.name}),onClick:function(){cY(function(){var t;return c5(this,function(n){switch(n.label){case 0:if(void 0!==z[e.id])return T(function(t){var n=c0({},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 c1(c0({},n),cX({},e.id,t))}),[3,4];case 3:return k(au(n.sent(),"vault.revealFailed")),[3,4];case 4:return[2]}})})()},children:void 0!==z[e.id]?(0,h.jsx)(cZ,{}):(0,h.jsx)(cG,{})}),(0,h.jsx)(tb,{size:"icon",variant:"ghost","aria-label":o("vault.edit",{name:e.name}),onClick:function(){p({kind:"edit",entry:e}),k(null)},children:(0,h.jsx)(ui,{})}),(0,h.jsx)(tb,{size:"icon",variant:"ghost","aria-label":o("vault.delete",{name:e.name}),onClick:function(){E(null),O(e)},children:(0,h.jsx)(ul,{className:"text-destructive"})})]})]}),void 0!==z[e.id]?(0,h.jsx)("p",{className:"mt-2 break-all rounded-lg bg-muted/60 px-3 py-2 font-mono text-xs",children:z[e.id]}):null]},e.id)})})]}),"list"===f.kind?(0,h.jsx)(rq,{children:(0,h.jsx)(tb,{variant:"outline",onClick:function(){return r(!1)},children:o("vault.close")})}):null]}),(0,h.jsx)(aI,{open:null!==S,onOpenChange:function(e){return!e&&O(null)},children:(0,h.jsxs)(aZ,{children:[(0,h.jsxs)(aG,{children:[(0,h.jsx)(aQ,{children:o("vault.deleteTitle")}),(0,h.jsx)(aY,{children:o("vault.deleteBody",{name:null!=(t=null==S?void 0:S.name)?t:""})})]}),P?(0,h.jsx)("p",{className:"text-sm text-destructive",children:ad(o,P)}):null,(0,h.jsxs)(aJ,{children:[(0,h.jsx)(a0,{children:o("common.cancel")}),(0,h.jsx)(aX,{onClick:function(e){e.preventDefault(),S&&cY(function(){return c5(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),b([{key:"vault.deleted"}]),[3,4];case 3:return E(au(e.sent(),"vault.deleteFailed")),[3,4];case 4:return[2]}})})()},children:o("common.delete")})]})]})})]})}function c8(e){var t,n,r=e.entry,a=e.onCancel,o=e.onSaved,i=(0,v.Bd)().t,l=ab(function(e){return e.createProvider}),s=ab(function(e){return e.updateProvider}),u=ab(function(e){return e.probeDraft}),c=null!==r,d=c2((0,m.useState)(null!=(t=null==r?void 0:r.name)?t:""),2),f=d[0],p=d[1],g=c2((0,m.useState)(""),2),y=g[0],b=g[1],x=c2((0,m.useState)(null!=(n=null==r?void 0:r.notes)?n:""),2),w=x[0],k=x[1],j=c2((0,m.useState)(function(){var e;return(null!=(e=null==r?void 0:r.endpoints)?e:[]).map(function(e){return{key:e.key,baseUrl:e.baseUrl,label:e.label}})}),2),S=j[0],O=j[1],N=c2((0,m.useState)(!1),2),P=N[0],E=N[1],_=c2((0,m.useState)(null),2),z=_[0],T=_[1],A=c2((0,m.useState)({}),2),R=A[0],I=A[1],L=c2((0,m.useState)({}),2),M=L[0],D=L[1],F=c2((0,m.useState)(!1),2),$=F[0],U=F[1],H=c2((0,m.useState)(null),2),B=H[0],K=H[1],V=c2((0,m.useState)(null),2),q=V[0],W=V[1],Z=c2((0,m.useState)(0),2),G=Z[0],J=Z[1],Q=JSON.stringify(S);function Y(e,t){O(function(n){return n.map(function(n,r){return r===e?c0({},n,t):n})}),D(function(n){if(!n[e])return n;var r=c0({},n),a=c0({},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,m.useEffect)(function(){K(null),W(null)},[y,Q]),(0,h.jsxs)("form",{onSubmit:function(e){return cY(function(){var t,n,a,i,u,d,p,h,m,g,v,b;return c5(this,function(x){switch(x.label){case 0:e.preventDefault(),t=S.map(function(e){return{key:e.key.trim(),label:e.label.trim(),baseUrl:e.baseUrl.trim()}}),n=c0({},f.trim()?{}:{name:{key:"vault.error.nameRequired"}},c||y.trim()?{}:{apiKey:{key:"vault.error.apiKeyRequired"}}),a=new Map,i=!0,u=!1,d=void 0;try{for(p=t[Symbol.iterator]();!(i=(h=p.next()).done);i=!0)(m=h.value).key&&a.set(m.key,(null!=(g=a.get(m.key))?g:0)+1)}catch(e){u=!0,d=e}finally{try{i||null==p.return||p.return()}finally{if(u)throw d}}if(v=Object.fromEntries(t.flatMap(function(e,t){var n,r={};return e.key?e.key.includes("/")||e.key.includes("\\")||e.key.length>60?r.key={key:"vault.error.endpointKeyInvalid",params:{max:60}}:(null!=(n=a.get(e.key))?n:0)>1&&(r.key={key:"vault.error.endpointKeyDuplicate"}):r.key={key:"vault.error.endpointKeyRequired"},e.baseUrl||(r.baseUrl={key:"vault.error.endpointUrlRequired"}),Object.keys(r).length>0?[[t,r]]:[]})),I(n),D(v),Object.keys(n).length>0||Object.keys(v).length>0)return T({key:"vault.error.checkFields"}),[2];b={name:f.trim(),notes:w.trim()||void 0,endpoints:t},E(!0),T(null),x.label=1;case 1:if(x.trys.push([1,6,7,8]),!(c&&r))return[3,3];return[4,s(r.id,c0({},b,y.trim()?{apiKey:y.trim()}:{}))];case 2:return o([{key:"vault.updated"}].concat(c4(x.sent().warnings.map(al)))),[3,5];case 3:return[4,l(c1(c0({},b),{apiKey:y.trim()}))];case 4:x.sent(),o([{key:"vault.created"}]),x.label=5;case 5:return[3,8];case 6:return T(au(x.sent(),"vault.saveFailed")),[3,8];case 7:return E(!1),[7];case 8:return[2]}})})()},noValidate:!0,className:"space-y-4",children:[(0,h.jsxs)("div",{className:"grid gap-x-4 gap-y-3 sm:grid-cols-2",children:[(0,h.jsxs)("div",{className:"space-y-2 sm:col-span-2",children:[(0,h.jsx)(od,{htmlFor:"provider-name",children:i("vault.name")}),(0,h.jsx)(sr,{id:"provider-name",value:f,onChange:function(e){p(e.target.value),I(function(e){return c1(c0({},e),{name:void 0})})},placeholder:i("vault.namePlaceholder"),"aria-invalid":!!R.name||void 0,"aria-describedby":R.name?"provider-name-error":void 0}),R.name?(0,h.jsx)("p",{id:"provider-name-error",className:"text-xs text-destructive",children:ad(i,R.name)}):null]}),(0,h.jsxs)("div",{className:"space-y-2 sm:col-span-2",children:[(0,h.jsx)(od,{htmlFor:"provider-api-key",children:i("vault.apiKey")}),(0,h.jsx)(sr,{id:"provider-api-key",type:"password",value:y,onChange:function(e){b(e.target.value),I(function(e){return c1(c0({},e),{apiKey:void 0})})},placeholder:c?i("vault.apiKeyKeep"):i("vault.apiKeyRequiredPlaceholder"),"aria-invalid":!!R.apiKey||void 0,"aria-describedby":R.apiKey?"provider-api-key-error":void 0}),R.apiKey?(0,h.jsx)("p",{id:"provider-api-key-error",className:"text-xs text-destructive",children:ad(i,R.apiKey)}):null]}),(0,h.jsxs)("div",{className:"space-y-2 sm:col-span-2",children:[(0,h.jsx)(od,{htmlFor:"provider-notes",children:i("vault.notes")}),(0,h.jsx)(cb,{id:"provider-notes",rows:2,value:w,onChange:function(e){return k(e.target.value)}})]})]}),(0,h.jsxs)("div",{className:"space-y-2",children:[(0,h.jsx)(od,{children:i("vault.endpoints")}),(0,h.jsx)("p",{className:"text-xs text-muted-foreground",children:i("vault.endpointsHint")}),0===S.length?(0,h.jsx)("p",{className:"rounded-xl border border-dashed px-3 py-3 text-center text-xs text-muted-foreground",children:i("vault.noEndpointDrafts")}):(0,h.jsx)("div",{className:"space-y-2",children:S.map(function(e,t){var n,r,a,o,l,s;return(0,h.jsxs)("div",{className:"grid items-start gap-2 sm:grid-cols-[10rem_minmax(0,1fr)_minmax(0,1fr)_auto]",children:[(0,h.jsxs)("div",{className:"space-y-1.5",children:[(0,h.jsx)(sr,{"aria-label":i("vault.endpointKeyLabel",{index:t+1}),value:e.key,onChange:function(e){return Y(t,{key:e.target.value})},placeholder:i("vault.endpointKeyPlaceholder"),"aria-invalid":null!=(n=M[t])&&!!n.key||void 0,"aria-describedby":(null==(r=M[t])?void 0:r.key)?"endpoint-".concat(t,"-key-error"):void 0}),(null==(a=M[t])?void 0:a.key)?(0,h.jsx)("p",{id:"endpoint-".concat(t,"-key-error"),className:"text-xs text-destructive",children:ad(i,M[t].key)}):null]}),(0,h.jsxs)("div",{className:"space-y-1.5",children:[(0,h.jsx)(sr,{"aria-label":i("vault.endpointUrlLabel",{index:t+1}),value:e.baseUrl,onChange:function(e){return Y(t,{baseUrl:e.target.value})},placeholder:i("vault.endpointUrlPlaceholder"),"aria-invalid":null!=(o=M[t])&&!!o.baseUrl||void 0,"aria-describedby":(null==(l=M[t])?void 0:l.baseUrl)?"endpoint-".concat(t,"-url-error"):void 0}),(null==(s=M[t])?void 0:s.baseUrl)?(0,h.jsx)("p",{id:"endpoint-".concat(t,"-url-error"),className:"text-xs text-destructive",children:ad(i,M[t].baseUrl)}):null]}),(0,h.jsx)(sr,{"aria-label":i("vault.endpointLabelLabel",{index:t+1}),value:e.label,onChange:function(e){return Y(t,{label:e.target.value})},placeholder:i("vault.endpointLabelPlaceholder")}),(0,h.jsx)(tb,{type:"button",size:"icon",variant:"ghost","aria-label":i("vault.removeEndpoint",{index:t+1}),onClick:function(){O(function(e){return e.filter(function(e,n){return n!==t})}),D({})},children:(0,h.jsx)(ul,{})})]},t)})}),(0,h.jsxs)(tb,{type:"button",size:"sm",variant:"outline",onClick:function(){return O(function(e){return c4(e).concat([{key:"",baseUrl:"",label:""}])})},children:[(0,h.jsx)(C,{}),i("vault.addEndpoint")]}),(0,h.jsx)(c9,{options:S.map(function(e,t){return{index:t,key:e.key,baseUrl:e.baseUrl}}).filter(function(e){return e.baseUrl.trim()}),targetIndex:G,onTargetChange:J,hasStoredKey:c,hasTypedKey:y.trim().length>0,onMissingKey:function(){return I(function(e){return c1(c0({},e),{apiKey:{key:"vault.error.apiKeyRequired"}})})},probing:$,result:B,probeError:q,onProbe:function(){return cY(function(){var e,t,n,a;return c5(this,function(o){switch(o.label){case 0:if(!(n=null!=(e=(t=S.map(function(e,t){return{endpoint:e,index:t}}).filter(function(e){return""!==e.endpoint.baseUrl.trim()})).find(function(e){return e.index===G}))?e:t[0]))return K(null),W({key:"probe.missingBaseUrl"}),[2];if(!c&&!y.trim())return K(null),W(null),I(function(e){return c1(c0({},e),{apiKey:{key:"vault.error.apiKeyRequired"}})}),[2];U(!0),W(null),K(null),o.label=1;case 1:return o.trys.push([1,3,4,5]),[4,u(c0({baseUrl:n.endpoint.baseUrl},y.trim()?{apiKey:y}:{providerId:null!=(a=null==r?void 0:r.id)?a:""}))];case 2:return K(o.sent()),[3,5];case 3:return W(au(o.sent(),"vault.probeFailed")),[3,5];case 4:return U(!1),[7];case 5:return[2]}})})()}})]}),z?(0,h.jsx)("p",{className:"text-sm text-destructive",children:ad(i,z)}):null,(0,h.jsxs)(rq,{className:"flex-row justify-end gap-2 space-x-0",children:[(0,h.jsx)(tb,{type:"button",variant:"outline",className:"min-w-24",onClick:a,children:i("common.cancel")}),(0,h.jsx)(tb,{type:"submit",className:"min-w-24",disabled:P,children:P?i("vault.saving"):c?i("vault.saveChanges"):i("vault.add")})]})]})}function c9(e){var t,n,r=e.options,a=e.targetIndex,o=e.onTargetChange,i=e.hasStoredKey,l=e.hasTypedKey,s=e.onMissingKey,u=e.probing,c=e.result,d=e.probeError,f=e.onProbe,p=(0,v.Bd)().t;if(0===r.length&&!i)return null;var m=null!=(t=r.find(function(e){return e.index===a}))?t:r[0];return(0,h.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-t pt-3",children:[(0,h.jsxs)(tb,{type:"button",variant:"outline",size:"sm",disabled:u||0===r.length&&!l,onClick:function(){l||i?f():s()},children:[u?(0,h.jsx)(sT,{className:"animate-spin"}):null,p(u?"probe.probing":"probe.action")]}),r.length>1?(0,h.jsxs)(li,{value:String(null!=(n=null==m?void 0:m.index)?n:""),onValueChange:function(e){return o(Number(e))},children:[(0,h.jsx)(l3,{className:"h-9 w-56","aria-label":p("vault.probeEndpointLabel"),children:(0,h.jsx)(ls,{})}),(0,h.jsx)(l8,{children:r.map(function(e){return(0,h.jsx)(l9,{value:String(e.index),children:e.key||e.baseUrl},e.index)})})]}):null,d?(0,h.jsxs)("span",{className:"flex items-center gap-1.5 text-sm text-destructive",children:[(0,h.jsx)(cy,{className:"size-4 shrink-0","aria-hidden":!0}),ad(p,d)]}):c?(0,h.jsx)(cv,{result:c}):null]})}let c7=j("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"}]]),de=j("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"}]]);function dt(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 dn(){var e,t=(0,v.Bd)().t,n=function(e){if(Array.isArray(e))return e}(e=(0,m.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 dt(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 dt(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,m.useEffect)(function(){var e=(0,co.PY)();a(e),(0,co.AZ)(e)},[]),(0,h.jsx)(tb,{type:"button",size:"icon",variant:"outline","aria-label":t("dark"===r?"theme.toLight":"theme.toDark"),onClick:function(){return a(function(e){return(0,co.OD)(e)})},children:"dark"===r?(0,h.jsx)(c7,{}):(0,h.jsx)(de,{})})}function dr(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 da(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 di(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 dr(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 dr(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 dl(){var e=(0,v.Bd)().t,t=di((0,m.useState)(null),2),n=t[0],r=t[1],a=di((0,m.useState)(null),2),o=a[0],i=a[1],l=di((0,m.useState)("idle"),2),s=l[0],u=l[1];return((0,m.useEffect)(function(){var e=!1;return at("/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,h.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,h.jsx)(sT,{className:"size-3 shrink-0 animate-spin"}),e("update.updating")]}):"failed"===s?(0,h.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,h.jsxs)(tb,{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,at("/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,at("/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){da(o,r,a,i,l,"next",e)}function l(e){da(o,r,a,i,l,"throw",e)}i(void 0)})})()},children:[(0,h.jsx)(s0,{className:"size-3 shrink-0"}),(0,h.jsx)("span",{className:"sm:hidden",children:e("update.short")}),(0,h.jsx)("span",{className:"hidden sm:inline",children:e("update.toVersion",{version:o})})]}):null}function ds(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 du(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,m.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 ds(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 ds(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,m.useEffect)(function(){var e=!1;return at("/api/version").then(function(t){e||r(t.version)}).catch(function(){}),function(){e=!0}},[]),n)?(0,h.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 dc(){return(0,v.Bd)().t,null}function dd(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 df(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 dp(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function i(e){df(o,r,a,i,l,"next",e)}function l(e){df(o,r,a,i,l,"throw",e)}i(void 0)})}}function dh(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 dd(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 dd(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 dm(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 dg(){var e,t,n,r=(0,v.s9)().locale,a=(0,v.Bd)().t,o=ab(function(e){return e.harnesses}),i=ab(function(e){return e.envFile}),l=ab(function(e){return e.backups}),s=dh((0,m.useState)(null),2),u=s[0],c=s[1],d=dh((0,m.useState)(!1),2),f=d[0],p=d[1],g=dh((0,m.useState)(!1),2),y=g[0],b=g[1],x=dh((0,m.useState)("claude"),2),w=x[0],k=x[1],j=o.find(function(e){return e.id===(null==u?void 0:u.harnessId)}),P=null!=(e=o.find(function(e){return e.id===w}))?e:o[0];return(0,h.jsxs)("div",{className:"min-h-[100dvh] bg-background",children:[(0,h.jsx)("header",{className:"sticky top-0 z-20 border-b bg-card/90 backdrop-blur-xl",children:(0,h.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,h.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,h.jsx)(aj,{className:"size-10 shrink-0 ring-1 ring-black/5 dark:ring-white/10"}),(0,h.jsxs)("div",{className:"min-w-0",children:[(0,h.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,h.jsx)("h1",{className:"min-w-0 flex-1 truncate text-base font-semibold tracking-tight",children:"harness-switch"}),(0,h.jsx)(du,{}),(0,h.jsx)(dc,{}),(0,h.jsx)(dl,{})]}),(0,h.jsx)("p",{className:"truncate text-xs text-muted-foreground",children:a("app.tagline")})]})]}),(0,h.jsxs)("div",{className:"ml-auto flex shrink-0 items-center gap-2",children:[(0,h.jsxs)(tb,{variant:"outline",size:"sm",onClick:function(){return p(!0)},children:[(0,h.jsx)(S,{}),(0,h.jsx)("span",{className:"hidden sm:inline",children:a("nav.transfer")})]}),(0,h.jsxs)(tb,{variant:"outline",size:"sm",onClick:function(){return b(!0)},children:[(0,h.jsx)(O,{}),(0,h.jsx)("span",{className:"hidden sm:inline",children:a("nav.vault")})]}),(0,h.jsx)(uQ,{}),(0,h.jsx)(dn,{}),(0,h.jsx)(dy,{})]})]})}),(0,h.jsxs)("div",{className:"grid xl:grid-cols-[17rem_minmax(0,1fr)_18rem]",children:[(0,h.jsx)(dv,{harnesses:o,value:null==P?void 0:P.id,onChange:k}),P?(0,h.jsxs)("main",{role:"tabpanel",id:"harness-panel-".concat(P.id),"aria-labelledby":"harness-tab-".concat(P.id),className:"min-w-0 space-y-6 p-4 sm:p-6 xl:p-8",children:[(0,h.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,h.jsxs)("div",{children:[(0,h.jsx)("h2",{className:"text-2xl font-semibold tracking-tight",children:P.label}),(0,h.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:a("harness.subtitle")})]}),(0,h.jsxs)(tb,{className:"self-start sm:self-auto",onClick:function(){return c({harnessId:P.id,profile:null})},children:[(0,h.jsx)(C,{}),a("dsh"===P.id?"harness.addCustomProvider":"harness.newProfile")]})]}),(0,h.jsx)(ux,{harness:P,onAdd:function(){return c({harnessId:P.id,profile:null})},onEdit:function(e){return c({harnessId:P.id,profile:e})}}),(0,h.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,h.jsxs)("summary",{className:"flex cursor-pointer list-none items-center justify-between gap-3 font-medium",children:[(0,h.jsx)("span",{className:"font-mono text-[13px]",children:a("env.title")}),(0,h.jsx)(N,{className:"size-4 text-muted-foreground transition-transform group-open:rotate-180"})]}),(0,h.jsx)("p",{className:"mt-4 leading-relaxed text-muted-foreground",children:a("env.intro")}),(0,h.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,h.jsx)("p",{className:"mt-3 leading-relaxed text-muted-foreground",children:a("env.note")})]})]}):null,P?(0,h.jsx)(db,{harness:P,latestBackup:l.find(function(e){return e.harness===P.id}),locale:r}):null]}),u&&j?(0,h.jsx)(c$,{harness:j,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,h.jsx)(sQ,{open:f,onOpenChange:p}),(0,h.jsx)(c6,{open:y,onOpenChange:b}),(0,h.jsx)(cl,{})]})}function dy(){var e=(0,v.Bd)().t,t=ab(function(e){return e.logout}),n=ab(function(e){return e.users}),r=ab(function(e){return e.currentUser}),a=ab(function(e){return e.usersLoading}),o=ab(function(e){return e.switchUser}),i=dh((0,m.useState)(!1),2),l=i[0],s=i[1],u=(0,m.useRef)(null);return(0,m.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,h.jsxs)("div",{ref:u,className:"relative",children:[(0,h.jsxs)(tb,{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,h.jsx)(P,{}),(0,h.jsx)("span",{className:"max-w-28 truncate",children:r||e("nav.localUser")}),(0,h.jsx)(N,{className:eZ("transition-transform",l&&"rotate-180")})]}),l?(0,h.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,h.jsx)("div",{className:"px-3 py-2 text-xs text-muted-foreground",children:e("nav.currentLocalUser")}),n.map(function(t){var n,i=!1===t.manageable,l=i?ad(e,{key:t.blockCode?ai(t.blockCode):"error.user.notSwitchable",params:t.blockParams,fallback:t.blockReason}):"",u=a||t.username===r||i;return(0,h.jsxs)("button",{type:"button",role:"menuitemradio","aria-checked":t.username===r,disabled:u,title:i?null!=(n=t.blockReason)?n:l:void 0,onClick:function(){var e;e=t.username,dp(function(){return dm(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,o(e)];case 1:return t.sent(),s(!1),[3,3];case 2:return t.sent(),[3,3];case 3:return[2]}})})()},className:eZ("flex w-full flex-col items-start rounded-lg px-3 py-2 text-left text-sm transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/35",u?"cursor-default opacity-60":"cursor-pointer hover:bg-accent hover:text-accent-foreground"),children:[(0,h.jsxs)("span",{className:"flex w-full items-center gap-1.5",children:[i?(0,h.jsx)(E,{className:"size-3 shrink-0","aria-hidden":!0}):null,(0,h.jsx)("span",{className:"truncate",children:t.username})]}),i?(0,h.jsx)("span",{className:"mt-0.5 text-xs leading-snug text-muted-foreground",children:l}):null]},t.username)}),(0,h.jsx)("div",{className:"my-1 border-t"}),(0,h.jsxs)("button",{type:"button",role:"menuitem",disabled:a,onClick:function(){dp(function(){return dm(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:eZ("flex w-full items-center gap-2 rounded-lg px-3 py-2 text-left text-sm text-destructive transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/35",a?"cursor-default opacity-60":"cursor-pointer hover:bg-destructive/10"),children:[(0,h.jsx)(_,{className:"size-4"}),e("nav.signOut")]})]}):null]})}function dv(e){var t=e.harnesses,n=e.value,r=e.onChange,a=(0,v.Bd)().t;return(0,h.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:sticky xl:top-20 xl:h-[calc(100dvh-80px)] xl:flex-col xl:self-start xl:overflow-x-visible xl:overflow-y-auto 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,h.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:eZ("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,h.jsx)("span",{className:eZ("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,h.jsx)(uG,{id:e.id})}),(0,h.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,h.jsx)("span",{className:"block truncate text-sm font-medium text-current",children:e.label}),(0,h.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,h.jsx)("span",{className:"font-mono text-[11px] text-muted-foreground",children:e.profiles.length})]},e.id)})})}function db(e){var t=e.harness,n=e.latestBackup,r=e.locale,a=(0,v.Bd)().t;return(0,h.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,h.jsxs)("div",{className:"space-y-4 xl:sticky xl:top-[100px]",children:[(0,h.jsxs)("section",{className:"rounded-2xl border bg-card p-5 shadow-[0_12px_34px_-28px_rgb(36_39_70/0.38)]",children:[(0,h.jsxs)("div",{className:"flex items-center gap-2",children:[(0,h.jsx)(z,{className:"size-4 text-primary"}),(0,h.jsx)("h3",{className:"font-semibold",children:a("harness.writeTargets")})]}),(0,h.jsxs)("div",{className:"mt-5 space-y-4",children:[(0,h.jsxs)("div",{children:[(0,h.jsx)("p",{className:"text-xs text-muted-foreground",children:a("harness.application")}),(0,h.jsx)("p",{className:"mt-1 text-sm font-medium",children:t.label})]}),t.targets.map(function(e){return(0,h.jsxs)("div",{children:[(0,h.jsx)("p",{className:"text-xs text-muted-foreground",children:e.label}),(0,h.jsx)("p",{className:"mt-1 break-all font-mono text-xs leading-relaxed",children:e.path})]},e.key)}),(0,h.jsxs)("div",{children:[(0,h.jsx)("p",{className:"text-xs text-muted-foreground",children:a("harness.writeMode")}),(0,h.jsx)("p",{className:"mt-1 text-sm",children:a("replace"===t.mode?"harness.modeReplace":"harness.modeAdditive")})]})]})]}),(0,h.jsx)(ut,{harness:t}),(0,h.jsx)(ch,{harness:t}),(0,h.jsxs)("section",{className:"rounded-2xl border bg-card p-5 shadow-[0_12px_34px_-28px_rgb(36_39_70/0.38)]",children:[(0,h.jsx)("h3",{className:"font-semibold",children:a("backup.latest")}),n?(0,h.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,h.jsxs)("div",{children:[(0,h.jsx)("p",{className:"text-xs text-muted-foreground",children:a("backup.profile")}),(0,h.jsx)("p",{className:"mt-1 truncate text-sm font-medium",children:n.profile})]}),(0,h.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,h.jsx)("p",{className:"mt-3 text-sm text-muted-foreground",children:a("backup.empty")}),(0,h.jsx)("div",{className:"mt-4 border-t pt-4",children:(0,h.jsx)(ak,{harnessId:t.id})})]})]})})}function dx(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 dw(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 dk(){var e,t=(0,v.Bd)().t,n=ab(function(e){return e.login}),r=ab(function(e){return e.loading}),a=function(e){if(Array.isArray(e))return e}(e=(0,m.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 dx(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 dx(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,h.jsxs)("main",{className:"grid min-h-[100dvh] lg:grid-cols-2",children:[(0,h.jsxs)("section",{className:"hidden flex-col justify-between border-r bg-card p-10 lg:flex",children:[(0,h.jsxs)("div",{className:"flex items-center gap-3",children:[(0,h.jsx)(aj,{className:"size-9 ring-1 ring-black/5 dark:ring-white/10"}),(0,h.jsx)("p",{className:"font-mono text-xs text-muted-foreground",children:t("app.brandMark")})]}),(0,h.jsxs)("div",{className:"max-w-sm space-y-3",children:[(0,h.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:t("login.title")}),(0,h.jsx)("p",{className:"text-sm leading-relaxed text-muted-foreground",children:t("login.intro")})]}),(0,h.jsxs)("div",{className:"flex gap-2",children:[(0,h.jsx)(uQ,{}),(0,h.jsx)(dn,{})]})]}),(0,h.jsx)("section",{className:"flex items-center justify-center px-4 py-10",children:(0,h.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(as(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){dw(o,r,a,i,l,"next",e)}function l(e){dw(o,r,a,i,l,"throw",e)}i(void 0)})})()},children:[(0,h.jsxs)("div",{className:"flex items-start justify-between gap-3 lg:hidden",children:[(0,h.jsxs)("div",{children:[(0,h.jsxs)("div",{className:"flex items-center gap-2",children:[(0,h.jsx)(aj,{className:"size-7 ring-1 ring-black/5 dark:ring-white/10"}),(0,h.jsx)("p",{className:"font-mono text-xs text-muted-foreground",children:t("app.brandMark")})]}),(0,h.jsx)("h1",{className:"mt-2 text-2xl font-semibold tracking-tight",children:t("login.title")})]}),(0,h.jsxs)("div",{className:"flex gap-2",children:[(0,h.jsx)(uQ,{}),(0,h.jsx)(dn,{})]})]}),(0,h.jsx)("p",{className:"text-sm text-muted-foreground",children:t("login.hint")}),(0,h.jsxs)("div",{className:"space-y-2",children:[(0,h.jsx)(od,{htmlFor:"password",children:t("login.password")}),(0,h.jsx)(sr,{id:"password",name:"password",type:"password",autoFocus:!0,required:!0})]}),o?(0,h.jsx)("p",{className:"text-sm text-destructive",children:ad(t,o)}):null,(0,h.jsx)(tb,{className:"w-full",type:"submit",disabled:r,children:t(r?"login.submitting":"login.submit")})]})})]})}(0,y.createRoot)(document.getElementById("root")).render((0,h.jsx)(m.StrictMode,{children:(0,h.jsx)(v.CY,{children:(0,h.jsx)(function(){var e=(0,v.Bd)().t,t=ab(function(e){return e.sessionChecked}),n=ab(function(e){return e.authenticated}),r=ab(function(e){return e.loadSession});return((0,m.useEffect)(function(){r()},[r]),t)?n?(0,h.jsx)(dg,{}):(0,h.jsx)(dk,{}):(0,h.jsx)("div",{className:"flex min-h-[100dvh] items-center justify-center text-sm text-muted-foreground",children:e("app.checkingSession")})},{})})}))})()})();