openrod 0.2.0-rc.2 → 0.2.0-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index.esm-Cj6nXjOx.js","assets/index.esm-BqjC2fhp.js","assets/index.esm-Z1y-oluO.js","assets/terminal-view-BjA2bW9M.js","assets/terminal-view-6GBZ9nXN.css"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index.esm-Cj6nXjOx.js","assets/index.esm-BqjC2fhp.js","assets/index.esm-Z1y-oluO.js","assets/terminal-view-S8Vmk00v.js","assets/terminal-view-6GBZ9nXN.css"])))=>i.map(i=>d[i]);
2
2
  var EP=Object.defineProperty;var RP=(e,t,r)=>t in e?EP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var an=(e,t,r)=>RP(e,typeof t!="symbol"?t+"":t,r);function AP(e,t){for(var r=0;r<t.length;r++){const a=t[r];if(typeof a!="string"&&!Array.isArray(a)){for(const i in a)if(i!=="default"&&!(i in e)){const c=Object.getOwnPropertyDescriptor(a,i);c&&Object.defineProperty(e,i,c.get?c:{enumerable:!0,get:()=>a[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))a(i);new MutationObserver(i=>{for(const c of i)if(c.type==="childList")for(const u of c.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&a(u)}).observe(document,{childList:!0,subtree:!0});function r(i){const c={};return i.integrity&&(c.integrity=i.integrity),i.referrerPolicy&&(c.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?c.credentials="include":i.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function a(i){if(i.ep)return;i.ep=!0;const c=r(i);fetch(i.href,c)}})();function VR(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nv={exports:{}},_d={};/**
3
3
  * @license React
4
4
  * react-jsx-runtime.production.js
@@ -47,7 +47,7 @@ var EP=Object.defineProperty;var RP=(e,t,r)=>t in e?EP(e,t,{enumerable:!0,config
47
47
  `+me[d].replace(" at new "," at ");return s.displayName&&ze.includes("<anonymous>")&&(ze=ze.replace("<anonymous>",s.displayName)),ze}while(1<=d&&0<=y);break}}}finally{ge=!1,Error.prepareStackTrace=l}return(l=s?s.displayName||s.name:"")?Ae(l):""}function Fe(s,o){switch(s.tag){case 26:case 27:case 5:return Ae(s.type);case 16:return Ae("Lazy");case 13:return s.child!==o&&o!==null?Ae("Suspense Fallback"):Ae("Suspense");case 19:return Ae("SuspenseList");case 0:case 15:return Pe(s.type,!1);case 11:return Pe(s.type.render,!1);case 1:return Pe(s.type,!0);case 31:return Ae("Activity");case 30:return Ae("ViewTransition");default:return""}}function _e(s){try{var o="",l=null;do o+=Fe(s,l),l=s,s=s.return;while(s);return o}catch(d){return`
48
48
  Error generating stack: `+d.message+`
49
49
  `+d.stack}}var Xe=Object.prototype.hasOwnProperty,Je=e.unstable_scheduleCallback,ct=e.unstable_cancelCallback,At=e.unstable_shouldYield,rt=e.unstable_requestPaint,be=e.unstable_now,Ue=e.unstable_getCurrentPriorityLevel,Qe=e.unstable_ImmediatePriority,xt=e.unstable_UserBlockingPriority,Ke=e.unstable_NormalPriority,Be=e.unstable_LowPriority,jt=e.unstable_IdlePriority,Ze=e.log,Tt=e.unstable_setDisableYieldValue,je=null,Ye=null;function et(s){if(typeof Ze=="function"&&Tt(s),Ye&&typeof Ye.setStrictMode=="function")try{Ye.setStrictMode(je,s)}catch{}}var it=Math.clz32?Math.clz32:cn,lt=Math.log,wt=Math.LN2;function cn(s){return s>>>=0,s===0?32:31-(lt(s)/wt|0)|0}var Gt=256,fn=262144,Bn=4194304;function Kn(s){var o=s&42;if(o!==0)return o;switch(s&-s){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 s&-s;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function ce(s,o,l){var d=s.pendingLanes;if(d===0)return 0;var y=0,j=s.suspendedLanes,I=s.pingedLanes;s=s.warmLanes;var J=d&134217727;return J!==0?(d=J&~j,d!==0?y=Kn(d):(I&=J,I!==0?y=Kn(I):l||(l=J&~s,l!==0&&(y=Kn(l))))):(J=d&~j,J!==0?y=Kn(J):I!==0?y=Kn(I):l||(l=d&~s,l!==0&&(y=Kn(l)))),y===0?0:o!==0&&o!==y&&(o&j)===0&&(j=y&-y,l=o&-o,j>=l||j===32&&(l&4194048)!==0)?o:y}function tt(s,o){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&o)===0}function Et(s,o){(o&8)!==0&&(o|=o&32);var l=s.entangledLanes;if(l!==0)for(s=s.entanglements,l&=o;0<l;){var d=31-it(l),y=1<<d;o|=s[d],l&=~y}return o}function rn(s,o){switch(s){case 1:case 2:case 4:case 8:case 64:return o+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 o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function xn(){var s=Bn;return Bn<<=1,(Bn&62914560)===0&&(Bn=4194304),s}function Wt(s){for(var o=[],l=0;31>l;l++)o.push(s);return o}function un(s,o){s.pendingLanes|=o,o!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function ns(s,o,l,d,y,j){var I=s.pendingLanes;s.pendingLanes=l,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=l,s.entangledLanes&=l,s.errorRecoveryDisabledLanes&=l,s.shellSuspendCounter=0;var J=s.entanglements,me=s.expirationTimes,Ne=s.hiddenUpdates;for(l=I&~l;0<l;){var ze=31-it(l),$e=1<<ze;J[ze]=0,me[ze]=-1;var we=Ne[ze];if(we!==null)for(Ne[ze]=null,ze=0;ze<we.length;ze++){var Me=we[ze];Me!==null&&(Me.lane&=-536870913)}l&=~$e}d!==0&&Jn(s,d,0),j!==0&&y===0&&s.tag!==0&&(s.suspendedLanes|=j&~(I&~o))}function Jn(s,o,l){s.pendingLanes|=o,s.suspendedLanes&=~o;var d=31-it(o);s.entangledLanes|=o,s.entanglements[d]=s.entanglements[d]|1073741824|l&261930}function wo(s,o){var l=s.entangledLanes|=o;for(s=s.entanglements;l;){var d=31-it(l),y=1<<d;y&o|s[d]&o&&(s[d]|=o),l&=~y}}function jo(s,o){var l=o&-o;return l=(l&42)!==0?1:cr(l),(l&(s.suspendedLanes|o))!==0?0:l}function cr(s){switch(s){case 2:s=1;break;case 8:s=4;break;case 32:s=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:s=128;break;case 268435456:s=134217728;break;default:s=0}return s}function Fs(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function ds(){var s=le.p;return s!==0?s:(s=window.event,s===void 0?32:UC(s.type))}function Ms(s,o){var l=le.p;try{return le.p=s,o()}finally{le.p=l}}var Pn=Math.random().toString(36).slice(2),Un="__reactFiber$"+Pn,Os="__reactProps$"+Pn,Nr="__reactContainer$"+Pn,Gu="__reactEvents$"+Pn,gc="__reactListeners$"+Pn,xc="__reactHandles$"+Pn,ai="__reactResources$"+Pn,cl="__reactMarker$"+Pn,bc="__reactLoad$"+Pn;function vc(s){delete s[Un],delete s[Os],delete s[gc],delete s[xc]}function So(s){var o;if(o=s[Un])return o;for(var l=s.parentNode;l;){if(o=l[Nr]||l[Un]){if(l=o.alternate,o.child!==null||l!==null&&l.child!==null)for(s=jC(s);s!==null;){if(l=s[Un])return l;s=jC(s)}return o}s=l,l=s.parentNode}return null}function ul(s){if(s=s[Un]||s[Nr]){var o=s.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return s}return null}function De(s){var o=s.tag;if(o===5||o===26||o===27||o===6)return s.stateNode;throw Error(a(33))}function Ge(s){var o=s[ai];return o||(o=s[ai]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function qe(s){s[cl]=!0}function bt(s){s[bc]=void 0}var zt=new Set,Mt={};function Bt(s,o){Nn(s,o),Nn(s+"Capture",o)}function Nn(s,o){for(Mt[s]=o,s=0;s<o.length;s++)zt.add(o[s])}var hn=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]*$"),Ct={},It={};function on(s){return Xe.call(It,s)?!0:Xe.call(Ct,s)?!1:hn.test(s)?It[s]=!0:(Ct[s]=!0,!1)}var St=!1;function fs(){var s=St;return St=!1,s}function Hn(s,o,l){if(on(o))if(l===null)s.removeAttribute(o);else{switch(typeof l){case"undefined":case"function":case"symbol":s.removeAttribute(o);return;case"boolean":var d=o.toLowerCase().slice(0,5);if(d!=="data-"&&d!=="aria-"){s.removeAttribute(o);return}}s.setAttribute(o,l)}}function Cr(s,o,l){if(l===null)s.removeAttribute(o);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(o);return}s.setAttribute(o,l)}}function ss(s,o,l,d){if(d===null)s.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(l);return}s.setAttributeNS(o,l,d)}}function rs(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function yc(s){var o=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function qu(s,o,l){var d=Object.getOwnPropertyDescriptor(s.constructor.prototype,o);if(!s.hasOwnProperty(o)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var y=d.get,j=d.set;return Object.defineProperty(s,o,{configurable:!0,get:function(){return y.call(this)},set:function(I){l=""+I,j.call(this,I)}}),Object.defineProperty(s,o,{enumerable:d.enumerable}),{getValue:function(){return l},setValue:function(I){l=""+I},stopTracking:function(){s._valueTracker=null,delete s[o]}}}}function ja(s){if(!s._valueTracker){var o=yc(s)?"checked":"value";s._valueTracker=qu(s,o,""+s[o])}}function wc(s){if(!s)return!1;var o=s._valueTracker;if(!o)return!0;var l=o.getValue(),d="";return s&&(d=yc(s)?s.checked?"true":"false":s.value),s=d,s!==l?(o.setValue(s),!0):!1}var dh=/[\n"\\]/g;function _n(s){return s.replace(dh,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function Gs(s,o,l,d,y,j,I,J){s.name="",I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"?s.type=I:s.removeAttribute("type"),o!=null?I==="number"?(o===0&&s.value===""||s.value!=o)&&(s.value=""+rs(o)):s.value!==""+rs(o)&&(s.value=""+rs(o)):I!=="submit"&&I!=="reset"||s.removeAttribute("value"),o!=null?I==="number"&&s.value==o?jc(s,rs(s.value)):jc(s,rs(o)):l!=null?jc(s,rs(l)):d!=null&&s.removeAttribute("value"),y==null&&j!=null&&(s.defaultChecked=!!j),y!=null&&(s.checked=y&&typeof y!="function"&&typeof y!="symbol"),J!=null&&typeof J!="function"&&typeof J!="symbol"&&typeof J!="boolean"?s.name=""+rs(J):s.removeAttribute("name")}function ii(s,o,l,d,y,j,I,J){if(j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"&&(s.type=j),o!=null||l!=null){if(!(j!=="submit"&&j!=="reset"||o!=null)){ja(s);return}l=l!=null?""+rs(l):"",o=o!=null?""+rs(o):l,J||o===s.value||(s.value=o),s.defaultValue=o}d=d??y,d=typeof d!="function"&&typeof d!="symbol"&&!!d,s.checked=J?s.checked:!!d,s.defaultChecked=!!d,I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"&&(s.name=I),ja(s)}function jc(s,o){s.defaultValue!==""+o&&(s.defaultValue=""+o)}function ur(s,o,l,d){if(s=s.options,o){o={};for(var y=0;y<l.length;y++)o["$"+l[y]]=!0;for(l=0;l<s.length;l++)y=o.hasOwnProperty("$"+s[l].value),s[l].selected!==y&&(s[l].selected=y),y&&d&&(s[l].defaultSelected=!0)}else{for(l=""+rs(l),o=null,y=0;y<s.length;y++){if(s[y].value===l){s[y].selected=!0,d&&(s[y].defaultSelected=!0);return}o!==null||s[y].disabled||(o=s[y])}o!==null&&(o.selected=!0)}}function Sc(s,o,l){if(o!=null&&(o=""+rs(o),o!==s.value&&(s.value=o),l==null)){s.defaultValue!==o&&(s.defaultValue=o);return}s.defaultValue=l!=null?""+rs(l):""}function kr(s,o,l,d){if(o==null){if(d!=null){if(l!=null)throw Error(a(92));if(ye(d)){if(1<d.length)throw Error(a(93));d=d[0]}l=d}l==null&&(l=""),o=l}l=rs(o),s.defaultValue=l,d=s.textContent,d===l&&d!==""&&d!==null&&(s.value=d),ja(s)}function Js(s,o){if(o){var l=s.firstChild;if(l&&l===s.lastChild&&l.nodeType===3){l.nodeValue=o;return}}s.textContent=o}var li=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 Yu(s,o,l){var d=o.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?d?s.setProperty(o,""):o==="float"?s.cssFloat="":s[o]="":d?s.setProperty(o,l):typeof l!="number"||l===0||li.has(o)?o==="float"?s.cssFloat=l:s[o]=(""+l).trim():s[o]=l+"px"}function Tr(s,o,l){if(o!=null&&typeof o!="object")throw Error(a(62));if(s=s.style,l!=null){for(var d in l)!l.hasOwnProperty(d)||o!=null&&o.hasOwnProperty(d)||(d.indexOf("--")===0?s.setProperty(d,""):d==="float"?s.cssFloat="":s[d]="",St=!0);for(var y in o)d=o[y],o.hasOwnProperty(y)&&l[y]!==d&&(Yu(s,y,d),St=!0)}else for(var j in o)o.hasOwnProperty(j)&&Yu(s,j,o[j])}function dl(s){if(s.indexOf("-")===-1)return!1;switch(s){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 Ku=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"],["maskType","mask-type"],["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"]]),Xu=/^[\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 Ds(s){return Xu.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}function er(){}var fl=null;function hl(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var Zt=null,Ss=null;function Zr(s){var o=ul(s);if(o&&(s=o.stateNode)){var l=s[Os]||null;e:switch(s=o.stateNode,o.type){case"input":if(Gs(s,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),o=l.name,l.type==="radio"&&o!=null){for(l=s;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+_n(""+o)+'"][type="radio"]'),o=0;o<l.length;o++){var d=l[o];if(d!==s&&d.form===s.form){var y=d[Os]||null;if(!y)throw Error(a(90));Gs(d,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name)}}for(o=0;o<l.length;o++)d=l[o],d.form===s.form&&wc(d)}break e;case"textarea":Sc(s,l.value,l.defaultValue);break e;case"select":o=l.value,o!=null&&ur(s,!!l.multiple,o,!1)}}}var Er=!1;function ml(s,o,l){if(Er)return s(o,l);Er=!0;try{var d=s(o);return d}finally{if(Er=!1,(Zt!==null||Ss!==null)&&(dm(),Zt&&(o=Zt,s=Ss,Ss=Zt=null,Zr(o),s)))for(o=0;o<s.length;o++)Zr(s[o])}}function Sa(s,o){var l=s.stateNode;if(l===null)return null;var d=l[Os]||null;if(d===null)return null;l=d[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(s=s.type,d=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!d;break e;default:s=!1}if(s)return null;if(l&&typeof l!="function")throw Error(a(231,o,typeof l));return l}var zs=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),pl=!1;if(zs)try{var Wu={};Object.defineProperty(Wu,"passive",{get:function(){pl=!0}}),window.addEventListener("test",Wu,Wu),window.removeEventListener("test",Wu,Wu)}catch{pl=!1}var ci=null,Bx=null,fh=null;function ej(){if(fh)return fh;var s,o=Bx,l=o.length,d,y="value"in ci?ci.value:ci.textContent,j=y.length;for(s=0;s<l&&o[s]===y[s];s++);var I=l-s;for(d=1;d<=I&&o[l-d]===y[j-d];d++);return fh=y.slice(s,1<d?1-d:void 0)}function hh(s){var o=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&o===13&&(s=13)):s=o,s===10&&(s=13),32<=s||s===13?s:0}function mh(){return!0}function tj(){return!1}function tr(s){function o(l,d,y,j,I){this._reactName=l,this._targetInst=y,this.type=d,this.nativeEvent=j,this.target=I,this.currentTarget=null;for(var J in s)s.hasOwnProperty(J)&&(l=s[J],this[J]=l?l(j):j[J]);return this.isDefaultPrevented=(j.defaultPrevented!=null?j.defaultPrevented:j.returnValue===!1)?mh:tj,this.isPropagationStopped=tj,this}return k(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=mh)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=mh)},persist:function(){},isPersistent:mh}),o}var ui={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ph=tr(ui),Qu=k({},ui,{view:0,detail:0}),JD=tr(Qu),Vx,Ux,Zu,gh=k({},Qu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fx,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==Zu&&(Zu&&s.type==="mousemove"?(Vx=s.screenX-Zu.screenX,Ux=s.screenY-Zu.screenY):Ux=Vx=0,Zu=s),Vx)},movementY:function(s){return"movementY"in s?s.movementY:Ux}}),nj=tr(gh),ez=k({},gh,{dataTransfer:0}),tz=tr(ez),nz=k({},Qu,{relatedTarget:0}),Hx=tr(nz),sz=k({},ui,{animationName:0,elapsedTime:0,pseudoElement:0}),rz=tr(sz),oz=k({},ui,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),az=tr(oz),iz=k({},ui,{data:0}),sj=tr(iz),lz={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},cz={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"},uz={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function dz(s){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(s):(s=uz[s])?!!o[s]:!1}function Fx(){return dz}var fz=k({},Qu,{key:function(s){if(s.key){var o=lz[s.key]||s.key;if(o!=="Unidentified")return o}return s.type==="keypress"?(s=hh(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?cz[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fx,charCode:function(s){return s.type==="keypress"?hh(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?hh(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),hz=tr(fz),mz=k({},gh,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),rj=tr(mz),pz=k({},ui,{submitter:0}),gz=tr(pz),xz=k({},Qu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fx}),bz=tr(xz),vz=k({},ui,{propertyName:0,elapsedTime:0,pseudoElement:0}),yz=tr(vz),wz=k({},gh,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),jz=tr(wz),Sz=k({},ui,{newState:0,oldState:0,source:0}),Nz=tr(Sz),Cz=[9,13,27,32],Gx=zs&&"CompositionEvent"in window,Ju=null;zs&&"documentMode"in document&&(Ju=document.documentMode);var kz=zs&&"TextEvent"in window&&!Ju,oj=zs&&(!Gx||Ju&&8<Ju&&11>=Ju),aj=" ",ij=!1;function lj(s,o){switch(s){case"keyup":return Cz.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function cj(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Nc=!1;function Tz(s,o){switch(s){case"compositionend":return cj(o);case"keypress":return o.which!==32?null:(ij=!0,aj);case"textInput":return s=o.data,s===aj&&ij?null:s;default:return null}}function Ez(s,o){if(Nc)return s==="compositionend"||!Gx&&lj(s,o)?(s=ej(),fh=Bx=ci=null,Nc=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return oj&&o.locale!=="ko"?null:o.data;default:return null}}var Rz={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 uj(s){var o=s&&s.nodeName&&s.nodeName.toLowerCase();return o==="input"?!!Rz[s.type]:o==="textarea"}function dj(s,o,l,d){Zt?Ss?Ss.push(d):Ss=[d]:Zt=d,o=xm(o,"onChange"),0<o.length&&(l=new ph("onChange","change",null,l,d),s.push({event:l,listeners:o}))}var ed=null,td=null;function Az(s){ZN(s,0)}function xh(s){var o=De(s);if(wc(o))return s}function fj(s,o){if(s==="change")return o}var hj=!1;if(zs){var qx;if(zs){var Yx="oninput"in document;if(!Yx){var mj=document.createElement("div");mj.setAttribute("oninput","return;"),Yx=typeof mj.oninput=="function"}qx=Yx}else qx=!1;hj=qx&&(!document.documentMode||9<document.documentMode)}function pj(){ed&&(ed.detachEvent("onpropertychange",gj),td=ed=null)}function gj(s){if(s.propertyName==="value"&&xh(td)){var o=[];dj(o,td,s,hl(s)),ml(Az,o)}}function Mz(s,o,l){s==="focusin"?(pj(),ed=o,td=l,ed.attachEvent("onpropertychange",gj)):s==="focusout"&&pj()}function Oz(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return xh(td)}function Dz(s,o){if(s==="click")return xh(o)}function zz(s,o){if(s==="input"||s==="change")return xh(o)}function Iz(s,o){return s===o&&(s!==0||1/s===1/o)||s!==s&&o!==o}var Rr=typeof Object.is=="function"?Object.is:Iz;function nd(s,o){if(Rr(s,o))return!0;if(typeof s!="object"||s===null||typeof o!="object"||o===null)return!1;var l=Object.keys(s),d=Object.keys(o);if(l.length!==d.length)return!1;for(d=0;d<l.length;d++){var y=l[d];if(!Xe.call(o,y)||!Rr(s[y],o[y]))return!1}return!0}function Kx(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}function xj(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function bj(s,o){var l=xj(s);s=0;for(var d;l;){if(l.nodeType===3){if(d=s+l.textContent.length,s<=o&&d>=o)return{node:l,offset:o-s};s=d}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=xj(l)}}function vj(s,o){return s&&o?s===o?!0:s&&s.nodeType===3?!1:o&&o.nodeType===3?vj(s,o.parentNode):"contains"in s?s.contains(o):s.compareDocumentPosition?!!(s.compareDocumentPosition(o)&16):!1:!1}function yj(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var o=Kx(s.document);o instanceof s.HTMLIFrameElement;){try{var l=typeof o.contentWindow.location.href=="string"}catch{l=!1}if(l)s=o.contentWindow;else break;o=Kx(s.document)}return o}function Xx(s){var o=s&&s.nodeName&&s.nodeName.toLowerCase();return o&&(o==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||o==="textarea"||s.contentEditable==="true")}var Pz=zs&&"documentMode"in document&&11>=document.documentMode,Cc=null,Wx=null,sd=null,Qx=!1;function wj(s,o,l){var d=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Qx||Cc==null||Cc!==Kx(d)||(d=Cc,"selectionStart"in d&&Xx(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),sd&&nd(sd,d)||(sd=d,d=xm(Wx,"onSelect"),0<d.length&&(o=new ph("onSelect","select",null,o,l),s.push({event:o,listeners:d}),o.target=Cc)))}function gl(s,o){var l={};return l[s.toLowerCase()]=o.toLowerCase(),l["Webkit"+s]="webkit"+o,l["Moz"+s]="moz"+o,l}var kc={animationend:gl("Animation","AnimationEnd"),animationiteration:gl("Animation","AnimationIteration"),animationstart:gl("Animation","AnimationStart"),transitionrun:gl("Transition","TransitionRun"),transitionstart:gl("Transition","TransitionStart"),transitioncancel:gl("Transition","TransitionCancel"),transitionend:gl("Transition","TransitionEnd")},Zx={},jj={};zs&&(jj=document.createElement("div").style,"AnimationEvent"in window||(delete kc.animationend.animation,delete kc.animationiteration.animation,delete kc.animationstart.animation),"TransitionEvent"in window||delete kc.transitionend.transition);function xl(s){if(Zx[s])return Zx[s];if(!kc[s])return s;var o=kc[s],l;for(l in o)if(o.hasOwnProperty(l)&&l in jj)return Zx[s]=o[l];return s}var Sj=xl("animationend"),Nj=xl("animationiteration"),Cj=xl("animationstart"),_z=xl("transitionrun"),Lz=xl("transitionstart"),$z=xl("transitioncancel"),kj=xl("transitionend"),Tj=new Map,Jx="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(" ");Jx.push("scrollEnd");function No(s,o){Tj.set(s,o),Bt(o,[s])}var Bz=0;function Na(s,o){if(s.name!=null&&s.name!=="auto")return s.name;if(o.autoName!==null)return o.autoName;s=Eo.identifierPrefix;var l=Bz++;return s="_"+s+"t_"+l.toString(32)+"_",o.autoName=s}function Ej(s){if(s==null||typeof s=="string")return s;var o=null,l=qc;if(l!==null)for(var d=0;d<l.length;d++){var y=s[l[d]];if(y!=null){if(y==="none")return"none";o=o==null?y:o+(" "+y)}}return o??s.default}function Ca(s,o){return s=Ej(s),o=Ej(o),o==null?s==="auto"?null:s:o==="auto"?null:o}var bh=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},Jr=[],Tc=0,eb=0;function vh(){for(var s=Tc,o=eb=Tc=0;o<s;){var l=Jr[o];Jr[o++]=null;var d=Jr[o];Jr[o++]=null;var y=Jr[o];Jr[o++]=null;var j=Jr[o];if(Jr[o++]=null,d!==null&&y!==null){var I=d.pending;I===null?y.next=y:(y.next=I.next,I.next=y),d.pending=y}j!==0&&Rj(l,y,j)}}function yh(s,o,l,d){Jr[Tc++]=s,Jr[Tc++]=o,Jr[Tc++]=l,Jr[Tc++]=d,eb|=d,s.lanes|=d,s=s.alternate,s!==null&&(s.lanes|=d)}function tb(s,o,l,d){return yh(s,o,l,d),wh(s)}function bl(s,o){return yh(s,null,null,o),wh(s)}function Rj(s,o,l){s.lanes|=l;var d=s.alternate;d!==null&&(d.lanes|=l);for(var y=!1,j=s.return;j!==null;)j.childLanes|=l,d=j.alternate,d!==null&&(d.childLanes|=l),j.tag===22&&(s=j.stateNode,s===null||s._visibility&1||(y=!0)),s=j,j=j.return;return s.tag===3?(j=s.stateNode,y&&o!==null&&(y=31-it(l),s=j.hiddenUpdates,d=s[y],d===null?s[y]=[o]:d.push(o),o.lane=l|536870912),j):null}function wh(s){if(50<Cd)throw Cd=0,um=null,Error(a(185));for(var o=s.return;o!==null;)s=o,o=s.return;return s.tag===3?s.stateNode:null}var Ec={};function Vz(s,o,l,d){this.tag=s,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function dr(s,o,l,d){return new Vz(s,o,l,d)}function nb(s){return s=s.prototype,!(!s||!s.isReactComponent)}function ka(s,o){var l=s.alternate;return l===null?(l=dr(s.tag,o,s.key,s.mode),l.elementType=s.elementType,l.type=s.type,l.stateNode=s.stateNode,l.alternate=s,s.alternate=l):(l.pendingProps=o,l.type=s.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=s.flags&1206910976,l.childLanes=s.childLanes,l.lanes=s.lanes,l.child=s.child,l.memoizedProps=s.memoizedProps,l.memoizedState=s.memoizedState,l.updateQueue=s.updateQueue,o=s.dependencies,l.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},l.sibling=s.sibling,l.index=s.index,l.ref=s.ref,l.refCleanup=s.refCleanup,l}function Aj(s,o){s.flags&=1206910978;var l=s.alternate;return l===null?(s.childLanes=0,s.lanes=o,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=l.childLanes,s.lanes=l.lanes,s.child=l.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=l.memoizedProps,s.memoizedState=l.memoizedState,s.updateQueue=l.updateQueue,s.type=l.type,o=l.dependencies,s.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),s}function jh(s,o,l,d,y,j){var I=0;if(d=s,typeof d=="function")nb(d)&&(I=1);else if(typeof d=="string")I=pP(s,l,Ce.current)?26:s==="html"||s==="head"||s==="body"?27:5;else e:switch(d){case L:return s=dr(31,l,o,y),s.elementType=L,s.lanes=j,s;case H:return vl(l.children,y,j,o);case G:I=8,y|=24;break;case B:return s=dr(12,l,o,y|2),s.elementType=B,s.lanes=j,s;case W:return s=dr(13,l,o,y),s.elementType=W,s.lanes=j,s;case q:return s=dr(19,l,o,y),s.elementType=q,s.lanes=j,s;case X:case $:return s=y|32,s=dr(30,l,o,s),s.elementType=$,s.lanes=j,s.stateNode={autoName:null,paired:null,clones:null,ref:null},s;default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case V:I=10;break e;case P:I=9;break e;case Y:I=11;break e;case ee:I=14;break e;case z:I=16,d=null;break e}I=29,l=Error(a(130,s===null?"null":typeof s,"")),d=null}return o=dr(I,l,o,y),o.elementType=s,o.type=d,o.lanes=j,o}function vl(s,o,l,d){return s=dr(7,s,d,o),s.lanes=l,s}function sb(s,o,l){return s=dr(6,s,null,o),s.lanes=l,s}function Mj(s){var o=dr(18,null,null,0);return o.stateNode=s,o}function rb(s,o,l){return o=dr(4,s.children!==null?s.children:[],s.key,o),o.lanes=l,o.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},o}var Oj=new WeakMap;function eo(s,o){if(typeof s=="object"&&s!==null){var l=Oj.get(s);return l!==void 0?l:(o={value:s,source:o,stack:_e(o)},Oj.set(s,o),o)}return{value:s,source:o,stack:_e(o)}}var Rc=[],Ac=0,Sh=null,rd=0,to=[],no=0,di=null,Vo=1,Uo="";function Ta(s,o){Rc[Ac++]=rd,Rc[Ac++]=Sh,Sh=s,rd=o}function Dj(s,o,l){to[no++]=Vo,to[no++]=Uo,to[no++]=di,di=s;var d=Vo;s=Uo;var y=32-it(d)-1;d&=~(1<<y),l+=1;var j=32-it(o)+y;if(30<j){var I=y-y%5;j=(d&(1<<I)-1).toString(32),d>>=I,y-=I,Vo=1<<32-it(o)+y|l<<y|d,Uo=j+s}else Vo=1<<j|l<<y|d,Uo=s}function Nh(s){s.return!==null&&(Ta(s,1),Dj(s,1,0))}function ob(s){for(;s===Sh;)Sh=Rc[--Ac],Rc[Ac]=null,rd=Rc[--Ac],Rc[Ac]=null;for(;s===di;)di=to[--no],to[no]=null,Uo=to[--no],to[no]=null,Vo=to[--no],to[no]=null}function zj(s,o){to[no++]=Vo,to[no++]=Uo,to[no++]=di,Vo=o.id,Uo=o.overflow,di=s}var Ns=null,Mn=null,Vt=!1,fi=null,so=!1,ab=Error(a(519));function hi(s){var o=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw od(eo(o,s)),ab}function Ij(s){var o=s.stateNode,l=s.type,d=s.memoizedProps;switch(o[Un]=s,o[Os]=d,l){case"dialog":Yt("cancel",o),Yt("close",o);break;case"iframe":case"object":case"embed":Yt("load",o);break;case"video":case"audio":for(l=0;l<Td.length;l++)Yt(Td[l],o);break;case"source":Yt("error",o);break;case"img":case"image":case"link":Yt("error",o),Yt("load",o);break;case"details":Yt("toggle",o);break;case"input":Yt("invalid",o),ii(o,d.value,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name,!0);break;case"select":Yt("invalid",o);break;case"textarea":Yt("invalid",o),kr(o,d.value,d.defaultValue,d.children)}l=d.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||o.textContent===""+l||d.suppressHydrationWarning===!0||nC(o.textContent,l)?(d.popover!=null&&(Yt("beforetoggle",o),Yt("toggle",o)),d.onScroll!=null&&Yt("scroll",o),d.onScrollEnd!=null&&Yt("scrollend",o),d.onClick!=null&&(o.onclick=er),o=!0):o=!1,o||hi(s,!0)}function Ch(s){for(Ns=s.return;Ns;)switch(Ns.tag){case 5:case 31:case 13:so=!1;return;case 27:case 3:so=!0;return;default:Ns=Ns.return}}function Mc(s){if(s!==Ns)return!1;if(!Vt)return Ch(s),Vt=!0,!1;var o=s.tag,l;if((l=o!==3&&o!==27)&&((l=o===5)&&(l=s.type,l=!(l!=="form"&&l!=="button")||P0(s.type,s.memoizedProps)),l=!l),l&&Mn&&hi(s),Ch(s),o===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(a(317));Mn=wC(s)}else if(o===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(a(317));Mn=wC(s)}else o===27?(o=Mn,Ri(s.type)?(s=G0,G0=null,Mn=s):Mn=o):Mn=Ns?oo(s.stateNode.nextSibling):null;return!0}function yl(){Mn=Ns=null,Vt=!1}function ib(){var s=fi;return s!==null&&(mr===null?mr=s:mr.push.apply(mr,s),fi=null),s}function od(s){fi===null?fi=[s]:fi.push(s)}var lb=pe(null),wl=null,Ea=null;function mi(s,o,l){ve(lb,o._currentValue),o._currentValue=l}function Ra(s){s._currentValue=lb.current,ue(lb)}function kh(s,o,l){for(;s!==null;){var d=s.alternate;if((s.childLanes&o)!==o?(s.childLanes|=o,d!==null&&(d.childLanes|=o)):d!==null&&(d.childLanes&o)!==o&&(d.childLanes|=o),s===l)break;s=s.return}}function cb(s,o,l,d){var y=s.child;for(y!==null&&(y.return=s);y!==null;){var j=y.dependencies;if(j!==null){var I=y.child;j=j.firstContext;e:for(;j!==null;){var J=j;j=y;for(var me=0;me<o.length;me++)if(J.context===o[me]){j.lanes|=l,J=j.alternate,J!==null&&(J.lanes|=l),kh(j.return,l,s),d||(I=null);break e}j=J.next}}else if(y.tag===18){if(I=y.return,I===null)throw Error(a(341));I.lanes|=l,j=I.alternate,j!==null&&(j.lanes|=l),kh(I,l,s),I=null}else y.tag===13&&y.memoizedState!==null&&y.memoizedState.dehydrated===null?(y.lanes|=l,I=y.alternate,I!==null&&(I.lanes|=l),kh(y.return,l,s),I=y.child,I=I!==null?I.sibling:null):I=y.child;if(I!==null)I.return=y;else for(I=y;I!==null;){if(I===s){I=null;break}if(y=I.sibling,y!==null){y.return=I.return,I=y;break}I=I.return}y=I}}function jl(s,o,l,d){s=null;for(var y=o,j=!1;y!==null;){if(!j){if((y.flags&524288)!==0)j=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var I=y.alternate;if(I===null)throw Error(a(387));if(I=I.memoizedProps,I!==null){var J=y.type;Rr(y.pendingProps.value,I.value)||(s!==null?s.push(J):s=[J])}}else if(y===Te.current){if(I=y.alternate,I===null)throw Error(a(387));I.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(s!==null?s.push(nu):s=[nu])}y=y.return}return s!==null&&cb(o,s,l,d),o.flags|=262144,s!==null}function Th(s){for(s=s.firstContext;s!==null;){if(!Rr(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function Sl(s){wl=s,Ea=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function Is(s){return Pj(wl,s)}function Eh(s,o){return wl===null&&Sl(s),Pj(s,o)}function Pj(s,o){var l=o._currentValue;if(o={context:o,memoizedValue:l,next:null},Ea===null){if(s===null)throw Error(a(308));Ea=o,s.dependencies={lanes:0,firstContext:o},s.flags|=524288}else Ea=Ea.next=o;return l}var Uz=typeof AbortController<"u"?AbortController:function(){var s=[],o=this.signal={aborted:!1,addEventListener:function(l,d){s.push(d)}};this.abort=function(){o.aborted=!0,s.forEach(function(l){return l()})}},Hz=e.unstable_scheduleCallback,Fz=e.unstable_NormalPriority,os={$$typeof:V,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ub(){return{controller:new Uz,data:new Map,refCount:0}}function ad(s){s.refCount--,s.refCount===0&&Hz(Fz,function(){s.controller.abort()})}function _j(s,o){if((s.pendingLanes&4194048)!==0){var l=s.transitionTypes;for(l===null&&(l=s.transitionTypes=[]),s=0;s<o.length;s++){var d=o[s];l.indexOf(d)===-1&&l.push(d)}}}var id=null;function Gz(s){var o=s.transitionTypes;return s.transitionTypes=null,o}var ld=null,db=0,Nl=0,Oc=null;function qz(s,o){if(ld===null){var l=ld=[];db=0,Nl=T0(),Oc={status:"pending",value:void 0,then:function(d){l.push(d)}}}return db++,o.then(Lj,Lj),o}function Lj(){if(--db===0&&(id=null,ld!==null)){Oc!==null&&(Oc.status="fulfilled");var s=ld;ld=null,Nl=0,Oc=null;for(var o=0;o<s.length;o++)(0,s[o])()}}function Yz(s,o){var l=[],d={status:"pending",value:null,reason:null,then:function(y){l.push(y)}};return s.then(function(){d.status="fulfilled",d.value=o;for(var y=0;y<l.length;y++)(0,l[y])(o)},function(y){for(d.status="rejected",d.reason=y,y=0;y<l.length;y++)(0,l[y])(void 0)}),d}var $j=ae.S;ae.S=function(s,o){if(MN=be(),typeof o=="object"&&o!==null&&typeof o.then=="function"&&qz(s,o),id!==null)for(var l=Wc;l!==null;)_j(l,id),l=l.next;if(l=s.types,l!==null){for(var d=Wc;d!==null;)_j(d,l),d=d.next;if(Nl!==0){d=id,d===null&&(d=id=[]);for(var y=0;y<l.length;y++){var j=l[y];d.indexOf(j)===-1&&d.push(j)}}}$j!==null&&$j(s,o)};var Cl=pe(null);function fb(){var s=Cl.current;return s!==null?s:An.pooledCache}function Rh(s,o){o===null?ve(Cl,Cl.current):ve(Cl,o.pool)}function Bj(){var s=fb();return s===null?null:{parent:os._currentValue,pool:s}}var Dc=Error(a(460)),hb=Error(a(474)),Ah=Error(a(542)),Mh={then:function(){}};function Vj(s){return s=s.status,s==="fulfilled"||s==="rejected"}function Uj(s,o,l){switch(l=s[l],l===void 0?s.push(o):l!==o&&(o.then(er,er),o=l),o.status){case"fulfilled":return o.value;case"rejected":throw s=o.reason,Fj(s),s===void 0&&!("reason"in o)?Error(a(600)):s;default:if(typeof o.status=="string")o.then(er,er);else{if(s=An,s!==null&&100<s.shellSuspendCounter)throw Error(a(482));s=o,s.status="pending",s.then(function(d){if(o.status==="pending"){var y=o;y.status="fulfilled",y.value=d}},function(d){if(o.status==="pending"){var y=o;y.status="rejected",y.reason=d}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw s=o.reason,Fj(s),s}throw Tl=o,Dc}}function kl(s){try{var o=s._init;return o(s._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Tl=l,Dc):l}}var Tl=null;function Hj(){if(Tl===null)throw Error(a(459));var s=Tl;return Tl=null,s}function Fj(s){if(s===Dc||s===Ah)throw Error(a(483))}var zc=null,cd=0;function Oh(s){var o=cd;return cd+=1,zc===null&&(zc=[]),Uj(zc,s,o)}function pi(s,o){o=o.props.ref,s.ref=o!==void 0?o:null}function Dh(s,o){throw o.$$typeof===O?Error(a(525)):(s=Object.prototype.toString.call(o),Error(a(31,s==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":s)))}function Gj(s){function o(Se,xe){if(s){var Ee=Se.deletions;Ee===null?(Se.deletions=[xe],Se.flags|=16):Ee.push(xe)}}function l(Se,xe){if(!s)return null;for(;xe!==null;)o(Se,xe),xe=xe.sibling;return null}function d(Se){for(var xe=new Map;Se!==null;)Se.key===null?xe.set(Se.index,Se):xe.set(Se.key,Se),Se=Se.sibling;return xe}function y(Se,xe){return Se=ka(Se,xe),Se.index=0,Se.sibling=null,Se}function j(Se,xe,Ee){return Se.index=Ee,s?(Ee=Se.alternate,Ee!==null?(Ee=Ee.index,Ee<xe?(Se.flags|=2,xe):Ee):(Se.flags|=134217730,xe)):(Se.flags|=1048576,xe)}function I(Se){return s&&Se.alternate===null&&(Se.flags|=134217730),Se}function J(Se,xe,Ee,Le){return xe===null||xe.tag!==6?(xe=sb(Ee,Se.mode,Le),xe.return=Se,xe):(xe=y(xe,Ee),xe.return=Se,xe)}function me(Se,xe,Ee,Le){var ut=Ee.type;return ut===H?(Se=ze(Se,xe,Ee.props.children,Le,Ee.key),pi(Se,Ee),Se):xe!==null&&(xe.elementType===ut||typeof ut=="object"&&ut!==null&&ut.$$typeof===z&&kl(ut)===xe.type)?(xe=y(xe,Ee.props),pi(xe,Ee),xe.return=Se,xe):(xe=jh(Ee.type,Ee.key,Ee.props,null,Se.mode,Le),pi(xe,Ee),xe.return=Se,xe)}function Ne(Se,xe,Ee,Le){return xe===null||xe.tag!==4||xe.stateNode.containerInfo!==Ee.containerInfo||xe.stateNode.implementation!==Ee.implementation?(xe=rb(Ee,Se.mode,Le),xe.return=Se,xe):(xe=y(xe,Ee.children||[]),xe.return=Se,xe)}function ze(Se,xe,Ee,Le,ut){return xe===null||xe.tag!==7?(xe=vl(Ee,Se.mode,Le,ut),xe.return=Se,xe):(xe=y(xe,Ee),xe.return=Se,xe)}function $e(Se,xe,Ee){if(typeof xe=="string"&&xe!==""||typeof xe=="number"||typeof xe=="bigint")return xe=sb(""+xe,Se.mode,Ee),xe.return=Se,xe;if(typeof xe=="object"&&xe!==null){switch(xe.$$typeof){case D:return Ee=jh(xe.type,xe.key,xe.props,null,Se.mode,Ee),pi(Ee,xe),Ee.return=Se,Ee;case _:return xe=rb(xe,Se.mode,Ee),xe.return=Se,xe;case z:return xe=kl(xe),$e(Se,xe,Ee)}if(ye(xe)||K(xe))return xe=vl(xe,Se.mode,Ee,null),xe.return=Se,xe;if(typeof xe.then=="function")return $e(Se,Oh(xe),Ee);if(xe.$$typeof===V)return $e(Se,Eh(Se,xe),Ee);Dh(Se,xe)}return null}function we(Se,xe,Ee,Le){var ut=xe!==null?xe.key:null;if(typeof Ee=="string"&&Ee!==""||typeof Ee=="number"||typeof Ee=="bigint")return ut!==null?null:J(Se,xe,""+Ee,Le);if(typeof Ee=="object"&&Ee!==null){switch(Ee.$$typeof){case D:return Ee.key===ut?me(Se,xe,Ee,Le):null;case _:return Ee.key===ut?Ne(Se,xe,Ee,Le):null;case z:return Ee=kl(Ee),we(Se,xe,Ee,Le)}if(ye(Ee)||K(Ee))return ut!==null?null:ze(Se,xe,Ee,Le,null);if(typeof Ee.then=="function")return we(Se,xe,Oh(Ee),Le);if(Ee.$$typeof===V)return we(Se,xe,Eh(Se,Ee),Le);Dh(Se,Ee)}return null}function Me(Se,xe,Ee,Le,ut){if(typeof Le=="string"&&Le!==""||typeof Le=="number"||typeof Le=="bigint")return Se=Se.get(Ee)||null,J(xe,Se,""+Le,ut);if(typeof Le=="object"&&Le!==null){switch(Le.$$typeof){case D:return Se=Se.get(Le.key===null?Ee:Le.key)||null,me(xe,Se,Le,ut);case _:return Se=Se.get(Le.key===null?Ee:Le.key)||null,Ne(xe,Se,Le,ut);case z:return Le=kl(Le),Me(Se,xe,Ee,Le,ut)}if(ye(Le)||K(Le))return Se=Se.get(Ee)||null,ze(xe,Se,Le,ut,null);if(typeof Le.then=="function")return Me(Se,xe,Ee,Oh(Le),ut);if(Le.$$typeof===V)return Me(Se,xe,Ee,Eh(xe,Le),ut);Dh(xe,Le)}return null}function ot(Se,xe,Ee,Le){for(var ut=null,Xt=null,vt=xe,Rt=xe=0,ls=null;vt!==null&&Rt<Ee.length;Rt++){vt.index>Rt?(ls=vt,vt=null):ls=vt.sibling;var Jt=we(Se,vt,Ee[Rt],Le);if(Jt===null){vt===null&&(vt=ls);break}s&&vt&&Jt.alternate===null&&o(Se,vt),xe=j(Jt,xe,Rt),Xt===null?ut=Jt:Xt.sibling=Jt,Xt=Jt,vt=ls}if(Rt===Ee.length)return l(Se,vt),Vt&&Ta(Se,Rt),ut;if(vt===null){for(;Rt<Ee.length;Rt++)vt=$e(Se,Ee[Rt],Le),vt!==null&&(xe=j(vt,xe,Rt),Xt===null?ut=vt:Xt.sibling=vt,Xt=vt);return Vt&&Ta(Se,Rt),ut}for(vt=d(vt);Rt<Ee.length;Rt++)ls=Me(vt,Se,Rt,Ee[Rt],Le),ls!==null&&(s&&(Jt=ls.alternate,Jt!==null&&vt.delete(Jt.key===null?Rt:Jt.key)),xe=j(ls,xe,Rt),Xt===null?ut=ls:Xt.sibling=ls,Xt=ls);return s&&vt.forEach(function(zi){return o(Se,zi)}),Vt&&Ta(Se,Rt),ut}function mt(Se,xe,Ee,Le){if(Ee==null)throw Error(a(151));for(var ut=null,Xt=null,vt=xe,Rt=xe=0,ls=null,Jt=Ee.next();vt!==null&&!Jt.done;Rt++,Jt=Ee.next()){vt.index>Rt?(ls=vt,vt=null):ls=vt.sibling;var zi=we(Se,vt,Jt.value,Le);if(zi===null){vt===null&&(vt=ls);break}s&&vt&&zi.alternate===null&&o(Se,vt),xe=j(zi,xe,Rt),Xt===null?ut=zi:Xt.sibling=zi,Xt=zi,vt=ls}if(Jt.done)return l(Se,vt),Vt&&Ta(Se,Rt),ut;if(vt===null){for(;!Jt.done;Rt++,Jt=Ee.next())Jt=$e(Se,Jt.value,Le),Jt!==null&&(xe=j(Jt,xe,Rt),Xt===null?ut=Jt:Xt.sibling=Jt,Xt=Jt);return Vt&&Ta(Se,Rt),ut}for(vt=d(vt);!Jt.done;Rt++,Jt=Ee.next())Jt=Me(vt,Se,Rt,Jt.value,Le),Jt!==null&&(s&&(ls=Jt.alternate,ls!==null&&vt.delete(ls.key===null?Rt:ls.key)),xe=j(Jt,xe,Rt),Xt===null?ut=Jt:Xt.sibling=Jt,Xt=Jt);return s&&vt.forEach(function(TP){return o(Se,TP)}),Vt&&Ta(Se,Rt),ut}function Lt(Se,xe,Ee,Le){if(typeof Ee=="object"&&Ee!==null&&Ee.type===H&&Ee.key===null&&Ee.props.ref===void 0&&(Ee=Ee.props.children),typeof Ee=="object"&&Ee!==null){switch(Ee.$$typeof){case D:e:{for(var ut=Ee.key;xe!==null;){if(xe.key===ut){if(ut=Ee.type,ut===H){if(xe.tag===7){l(Se,xe.sibling),Le=y(xe,Ee.props.children),pi(Le,Ee),Le.return=Se,Se=Le;break e}}else if(xe.elementType===ut||typeof ut=="object"&&ut!==null&&ut.$$typeof===z&&kl(ut)===xe.type){l(Se,xe.sibling),Le=y(xe,Ee.props),pi(Le,Ee),Le.return=Se,Se=Le;break e}l(Se,xe);break}else o(Se,xe);xe=xe.sibling}Ee.type===H?(Le=vl(Ee.props.children,Se.mode,Le,Ee.key),pi(Le,Ee),Le.return=Se,Se=Le):(Le=jh(Ee.type,Ee.key,Ee.props,null,Se.mode,Le),pi(Le,Ee),Le.return=Se,Se=Le)}return I(Se);case _:e:{for(ut=Ee.key;xe!==null;){if(xe.key===ut)if(xe.tag===4&&xe.stateNode.containerInfo===Ee.containerInfo&&xe.stateNode.implementation===Ee.implementation){l(Se,xe.sibling),Le=y(xe,Ee.children||[]),Le.return=Se,Se=Le;break e}else{l(Se,xe);break}else o(Se,xe);xe=xe.sibling}Le=rb(Ee,Se.mode,Le),Le.return=Se,Se=Le}return I(Se);case z:return Ee=kl(Ee),Lt(Se,xe,Ee,Le)}if(ye(Ee))return ot(Se,xe,Ee,Le);if(K(Ee)){if(ut=K(Ee),typeof ut!="function")throw Error(a(150));return Ee=ut.call(Ee),mt(Se,xe,Ee,Le)}if(typeof Ee.then=="function")return Lt(Se,xe,Oh(Ee),Le);if(Ee.$$typeof===V)return Lt(Se,xe,Eh(Se,Ee),Le);Dh(Se,Ee)}return typeof Ee=="string"&&Ee!==""||typeof Ee=="number"||typeof Ee=="bigint"?(Ee=""+Ee,xe!==null&&xe.tag===6?(l(Se,xe.sibling),Le=y(xe,Ee),Le.return=Se,Se=Le):(l(Se,xe),Le=sb(Ee,Se.mode,Le),Le.return=Se,Se=Le),I(Se)):l(Se,xe)}return function(Se,xe,Ee,Le){try{cd=0;var ut=Lt(Se,xe,Ee,Le);return zc=null,ut}catch(vt){if(vt===Dc||vt===Ah)throw vt;var Xt=dr(29,vt,null,Se.mode);return Xt.lanes=Le,Xt.return=Se,Xt}finally{}}}var El=Gj(!0),qj=Gj(!1),gi=!1;function mb(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function pb(s,o){s=s.updateQueue,o.updateQueue===s&&(o.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function xi(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function bi(s,o,l){var d=s.updateQueue;if(d===null)return null;if(d=d.shared,(dn&2)!==0){var y=d.pending;return y===null?o.next=o:(o.next=y.next,y.next=o),d.pending=o,o=wh(s),Rj(s,null,l),o}return yh(s,d,o,l),wh(s)}function ud(s,o,l){if(o=o.updateQueue,o!==null&&(o=o.shared,(l&4194048)!==0)){var d=o.lanes;d&=s.pendingLanes,l|=d,o.lanes=l,wo(s,l)}}function gb(s,o){var l=s.updateQueue,d=s.alternate;if(d!==null&&(d=d.updateQueue,l===d)){var y=null,j=null;if(l=l.firstBaseUpdate,l!==null){do{var I={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};j===null?y=j=I:j=j.next=I,l=l.next}while(l!==null);j===null?y=j=o:j=j.next=o}else y=j=o;l={baseState:d.baseState,firstBaseUpdate:y,lastBaseUpdate:j,shared:d.shared,callbacks:d.callbacks},s.updateQueue=l;return}s=l.lastBaseUpdate,s===null?l.firstBaseUpdate=o:s.next=o,l.lastBaseUpdate=o}var xb=!1;function dd(){if(xb){var s=Oc;if(s!==null)throw s}}function fd(s,o,l,d){xb=!1;var y=s.updateQueue;gi=!1;var j=y.firstBaseUpdate,I=y.lastBaseUpdate,J=y.shared.pending;if(J!==null){y.shared.pending=null;var me=J,Ne=me.next;me.next=null,I===null?j=Ne:I.next=Ne,I=me;var ze=s.alternate;ze!==null&&(ze=ze.updateQueue,J=ze.lastBaseUpdate,J!==I&&(J===null?ze.firstBaseUpdate=Ne:J.next=Ne,ze.lastBaseUpdate=me))}if(j!==null){var $e=y.baseState;I=0,ze=Ne=me=null,J=j;do{var we=J.lane&-536870913,Me=we!==J.lane;if(Me?(Kt&we)===we:(d&we)===we){we!==0&&we===Nl&&(xb=!0),ze!==null&&(ze=ze.next={lane:0,tag:J.tag,payload:J.payload,callback:null,next:null});e:{var ot=s,mt=J;we=o;var Lt=l;switch(mt.tag){case 1:if(ot=mt.payload,typeof ot=="function"){$e=ot.call(Lt,$e,we);break e}$e=ot;break e;case 3:ot.flags=ot.flags&-65537|128;case 0:if(ot=mt.payload,we=typeof ot=="function"?ot.call(Lt,$e,we):ot,we==null)break e;$e=k({},$e,we);break e;case 2:gi=!0}}we=J.callback,we!==null&&(s.flags|=64,Me&&(s.flags|=8192),Me=y.callbacks,Me===null?y.callbacks=[we]:Me.push(we))}else Me={lane:we,tag:J.tag,payload:J.payload,callback:J.callback,next:null},ze===null?(Ne=ze=Me,me=$e):ze=ze.next=Me,I|=we;if(J=J.next,J===null){if(J=y.shared.pending,J===null)break;Me=J,J=Me.next,Me.next=null,y.lastBaseUpdate=Me,y.shared.pending=null}}while(!0);ze===null&&(me=$e),y.baseState=me,y.firstBaseUpdate=Ne,y.lastBaseUpdate=ze,j===null&&(y.shared.lanes=0),Ci|=I,s.lanes=I,s.memoizedState=$e}}function Yj(s,o){if(typeof s!="function")throw Error(a(191,s));s.call(o)}function Kj(s,o){var l=s.callbacks;if(l!==null)for(s.callbacks=null,s=0;s<l.length;s++)Yj(l[s],o)}var vi=pe(null),zh=pe(0);function Xj(s,o){s=za,ve(zh,s),ve(vi,o),za=s|o.baseLanes}function bb(){ve(zh,za),ve(vi,vi.current)}function vb(){za=zh.current,ue(vi),ue(zh)}var Ps=pe(null),qs=null;function yi(s){var o=s.alternate;ve(_s,_s.current&1),ve(Ps,s),qs===null&&(o===null||vi.current!==null||o.memoizedState!==null)&&(qs=s)}function yb(s){ve(_s,_s.current),ve(Ps,s),qs===null&&(qs=s)}function Wj(s){s.tag===22?(ve(_s,_s.current),ve(Ps,s),qs===null&&(qs=s)):wi()}function wi(){ve(_s,_s.current),ve(Ps,Ps.current)}function Ar(s){ue(Ps),qs===s&&(qs=null),ue(_s)}var _s=pe(0);function hd(s,o){ve(Ps,Ps.current),ve(_s,o)}function wb(s){ue(_s),ue(Ps),qs===s&&(qs=null)}function Ih(s){for(var o=s;o!==null;){if(o.tag===13){var l=o.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||H0(l)||F0(l)))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!=="independent"){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===s)break;for(;o.sibling===null;){if(o.return===null||o.return===s)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var Aa=0,_t=null,Cn=null,as=null,Ph=!1,Ic=!1,Rl=!1,_h=0,md=0,Pc=null,Kz=0;function Xn(){throw Error(a(321))}function jb(s,o){if(o===null)return!1;for(var l=0;l<o.length&&l<s.length;l++)if(!Rr(s[l],o[l]))return!1;return!0}function Sb(s,o,l,d,y,j){return Aa=j,_t=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,ae.H=s===null||s.memoizedState===null?DS:zS,Rl=!1,j=l(d,y),Rl=!1,Ic&&(j=Zj(o,l,d,y)),Qj(s),j}function Qj(s){ae.H=Fh;var o=Cn!==null&&Cn.next!==null;if(Aa=0,as=Cn=_t=null,Ph=!1,md=0,Pc=null,o)throw Error(a(300));s===null||is||(s=s.dependencies,s!==null&&Th(s)&&(is=!0))}function Zj(s,o,l,d){_t=s;var y=0;do{if(Ic&&(Pc=null),md=0,Ic=!1,25<=y)throw Error(a(301));if(y+=1,as=Cn=null,s.updateQueue!=null){var j=s.updateQueue;j.lastEffect=null,j.events=null,j.stores=null,j.memoCache!=null&&(j.memoCache.index=0)}ae.H=nI,j=o(l,d)}while(Ic);return j}function Xz(){var s=ae.H,o=s.useState()[0];return o=typeof o.then=="function"?pd(o):o,s=s.useState()[0],(Cn!==null?Cn.memoizedState:null)!==s&&(_t.flags|=1024),o}function Nb(){var s=_h!==0;return _h=0,s}function Cb(s,o,l){o.updateQueue=s.updateQueue,o.flags&=-2053,s.lanes&=~l}function kb(s){if(Ph){for(s=s.memoizedState;s!==null;){var o=s.queue;o!==null&&(o.pending=null),s=s.next}Ph=!1}Aa=0,as=Cn=_t=null,Ic=!1,md=_h=0,Pc=null}function nr(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return as===null?_t.memoizedState=as=s:as=as.next=s,as}function es(){if(Cn===null){var s=_t.alternate;s=s!==null?s.memoizedState:null}else s=Cn.next;var o=as===null?_t.memoizedState:as.next;if(o!==null)as=o,Cn=s;else{if(s===null)throw _t.alternate===null?Error(a(467)):Error(a(310));Cn=s,s={memoizedState:Cn.memoizedState,baseState:Cn.baseState,baseQueue:Cn.baseQueue,queue:Cn.queue,next:null},as===null?_t.memoizedState=as=s:as=as.next=s}return as}function Lh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function pd(s){var o=md;return md+=1,Pc===null&&(Pc=[]),s=Uj(Pc,s,o),o=_t,(as===null?o.memoizedState:as.next)===null&&(o=o.alternate,ae.H=o===null||o.memoizedState===null?DS:zS),s}function $h(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return pd(s);if(s.$$typeof===U)return;if(s.$$typeof===V)return Is(s)}throw Error(a(438,String(s)))}function Tb(s){var o=null,l=_t.updateQueue;if(l!==null&&(o=l.memoCache),o==null){var d=_t.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(o={data:d.data.map(function(y){return y.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),l===null&&(l=Lh(),_t.updateQueue=l),l.memoCache=o,l=o.data[o.index],l===void 0)for(l=o.data[o.index]=Array(s),d=0;d<s;d++)l[d]=te;return o.index++,l}function Ma(s,o){return typeof o=="function"?o(s):o}function Bh(s){var o=es();return Eb(o,Cn,s)}function Eb(s,o,l){var d=s.queue;if(d===null)throw Error(a(311));d.lastRenderedReducer=l;var y=s.baseQueue,j=d.pending;if(j!==null){if(y!==null){var I=y.next;y.next=j.next,j.next=I}o.baseQueue=y=j,d.pending=null}if(j=s.baseState,y===null)s.memoizedState=j;else{o=y.next;var J=I=null,me=null,Ne=o,ze=!1;do{var $e=Ne.lane&-536870913;if($e!==Ne.lane?(Kt&$e)===$e:(Aa&$e)===$e){var we=Ne.revertLane;if(we===0)me!==null&&(me=me.next={lane:0,revertLane:0,gesture:null,action:Ne.action,hasEagerState:Ne.hasEagerState,eagerState:Ne.eagerState,next:null}),$e===Nl&&(ze=!0);else if((Aa&we)===we){Ne=Ne.next,we===Nl&&(ze=!0);continue}else $e={lane:0,revertLane:Ne.revertLane,gesture:null,action:Ne.action,hasEagerState:Ne.hasEagerState,eagerState:Ne.eagerState,next:null},me===null?(J=me=$e,I=j):me=me.next=$e,_t.lanes|=we,Ci|=we;$e=Ne.action,Rl&&l(j,$e),j=Ne.hasEagerState?Ne.eagerState:l(j,$e)}else we={lane:$e,revertLane:Ne.revertLane,gesture:Ne.gesture,action:Ne.action,hasEagerState:Ne.hasEagerState,eagerState:Ne.eagerState,next:null},me===null?(J=me=we,I=j):me=me.next=we,_t.lanes|=$e,Ci|=$e;Ne=Ne.next}while(Ne!==null&&Ne!==o);if(me===null?I=j:me.next=J,!Rr(j,s.memoizedState)&&(is=!0,ze&&(l=Oc,l!==null)))throw l;s.memoizedState=j,s.baseState=I,s.baseQueue=me,d.lastRenderedState=j}return y===null&&(d.lanes=0),[s.memoizedState,d.dispatch]}function Rb(s){var o=es(),l=o.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=s;var d=l.dispatch,y=l.pending,j=o.memoizedState;if(y!==null){l.pending=null;var I=y=y.next;do j=s(j,I.action),I=I.next;while(I!==y);Rr(j,o.memoizedState)||(is=!0),o.memoizedState=j,o.baseQueue===null&&(o.baseState=j),l.lastRenderedState=j}return[j,d]}function Jj(s,o,l){var d=_t,y=es(),j=Vt;if(j){if(l===void 0)throw Error(a(407));l=l()}else l=o();var I=!Rr((Cn||y).memoizedState,l);if(I&&(y.memoizedState=l,is=!0),y=y.queue,Ob(nS.bind(null,d,y,s),[s]),s=y.getSnapshot!==o||I||as!==null&&(as.memoizedState.tag&1)!==0,_c(s?9:8,{destroy:void 0},tS.bind(null,d,y,l,o),null),s){if(d.flags|=2048,An===null)throw Error(a(349));j||(Aa&127)!==0||eS(d,o,l)}return l}function eS(s,o,l){s.flags|=16384,s={getSnapshot:o,value:l},o=_t.updateQueue,o===null?(o=Lh(),_t.updateQueue=o,o.stores=[s]):(l=o.stores,l===null?o.stores=[s]:l.push(s))}function tS(s,o,l,d){o.value=l,o.getSnapshot=d,sS(o)&&rS(s)}function nS(s,o,l){return l(function(){sS(o)&&rS(s)})}function sS(s){var o=s.getSnapshot;s=s.value;try{var l=o();return!Rr(s,l)}catch{return!0}}function rS(s){var o=bl(s,2);o!==null&&pr(o,s,2)}function Ab(s){var o=nr();if(typeof s=="function"){var l=s;if(s=l(),Rl){et(!0);try{l()}finally{et(!1)}}}return o.memoizedState=o.baseState=s,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ma,lastRenderedState:s},o}function oS(s,o,l,d){return s.baseState=l,Eb(s,Cn,typeof d=="function"?d:Ma)}function Wz(s,o,l,d,y){if(Hh(s))throw Error(a(485));if(s=o.action,s!==null){var j={payload:y,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(I){j.listeners.push(I)}};ae.T!==null?l(!0):j.isTransition=!1,d(j),l=o.pending,l===null?(j.next=o.pending=j,aS(o,j)):(j.next=l.next,o.pending=l.next=j)}}function aS(s,o){var l=o.action,d=o.payload,y=s.state;if(o.isTransition){var j=ae.T,I={};I.types=j!==null?j.types:null,ae.T=I;try{var J=l(y,d),me=ae.S;me!==null&&me(I,J),iS(s,o,J)}catch(Ne){Mb(s,o,Ne)}finally{j!==null&&I.types!==null&&(j.types=I.types),ae.T=j}}else try{j=l(y,d),iS(s,o,j)}catch(Ne){Mb(s,o,Ne)}}function iS(s,o,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(d){lS(s,o,d)},function(d){return Mb(s,o,d)}):lS(s,o,l)}function lS(s,o,l){o.status="fulfilled",o.value=l,cS(o),s.state=l,o=s.pending,o!==null&&(l=o.next,l===o?s.pending=null:(l=l.next,o.next=l,aS(s,l)))}function Mb(s,o,l){var d=s.pending;if(s.pending=null,d!==null){d=d.next;do o.status="rejected",o.reason=l,cS(o),o=o.next;while(o!==d)}s.action=null}function cS(s){s=s.listeners;for(var o=0;o<s.length;o++)(0,s[o])()}function uS(s,o){return o}function dS(s,o){if(Vt){var l=An.formState;if(l!==null){e:{var d=_t;if(Vt){if(Mn){t:{for(var y=Mn,j=so;y.nodeType!==8;){if(!j){y=null;break t}if(y=oo(y.nextSibling),y===null){y=null;break t}}j=y.data,y=j==="F!"||j==="F"?y:null}if(y){Mn=oo(y.nextSibling),d=y.data==="F!";break e}}hi(d)}d=!1}d&&(o=l[0])}}return l=nr(),l.memoizedState=l.baseState=o,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:uS,lastRenderedState:o},l.queue=d,l=AS.bind(null,_t,d),d.dispatch=l,d=Ab(!1),j=_b.bind(null,_t,!1,d.queue),d=nr(),y={state:o,dispatch:null,action:s,pending:null},d.queue=y,l=Wz.bind(null,_t,y,j,l),y.dispatch=l,d.memoizedState=s,[o,l,!1]}function fS(s){var o=es();return hS(o,Cn,s)}function hS(s,o,l){if(o=Eb(s,o,uS)[0],s=Bh(Ma)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var d=pd(o)}catch(I){throw I===Dc?Ah:I}else d=o;o=es();var y=o.queue,j=y.dispatch;return l!==o.memoizedState&&(_t.flags|=2048,_c(9,{destroy:void 0},Qz.bind(null,y,l),null)),[d,j,s]}function Qz(s,o){s.action=o}function mS(s){var o=es(),l=Cn;if(l!==null)return hS(o,l,s);es(),o=o.memoizedState,l=es();var d=l.queue.dispatch;return l.memoizedState=s,[o,d,!1]}function _c(s,o,l,d){return s={tag:s,create:l,deps:d,inst:o,next:null},o=_t.updateQueue,o===null&&(o=Lh(),_t.updateQueue=o),l=o.lastEffect,l===null?o.lastEffect=s.next=s:(d=l.next,l.next=s,s.next=d,o.lastEffect=s),s}function pS(){return es().memoizedState}function Vh(s,o,l,d){var y=nr();_t.flags|=s,y.memoizedState=_c(1|o,{destroy:void 0},l,d===void 0?null:d)}function Uh(s,o,l,d){var y=es();d=d===void 0?null:d;var j=y.memoizedState.inst;Cn!==null&&d!==null&&jb(d,Cn.memoizedState.deps)?y.memoizedState=_c(o,j,l,d):(_t.flags|=s,y.memoizedState=_c(1|o,j,l,d))}function gS(s,o){Vh(8390656,8,s,o)}function Ob(s,o){Uh(2048,8,s,o)}function Zz(s){_t.flags|=4;var o=_t.updateQueue;if(o===null)o=Lh(),_t.updateQueue=o,o.events=[s];else{var l=o.events;l===null?o.events=[s]:l.push(s)}}function xS(s){var o=es().memoizedState;return Zz({ref:o,nextImpl:s}),function(){if((dn&2)!==0)throw Error(a(440));return o.impl.apply(void 0,arguments)}}function bS(s,o){return Uh(4,2,s,o)}function vS(s,o){return Uh(4,4,s,o)}function yS(s,o){if(typeof o=="function"){s=s();var l=o(s);return function(){typeof l=="function"?l():o(null)}}if(o!=null)return s=s(),o.current=s,function(){o.current=null}}function wS(s,o,l){l=l!=null?l.concat([s]):null,Uh(4,4,yS.bind(null,o,s),l)}function Db(){}function jS(s,o){var l=es();o=o===void 0?null:o;var d=l.memoizedState;return o!==null&&jb(o,d[1])?d[0]:(l.memoizedState=[s,o],s)}function SS(s,o){var l=es();o=o===void 0?null:o;var d=l.memoizedState;if(o!==null&&jb(o,d[1]))return d[0];if(d=s(),Rl){et(!0);try{s()}finally{et(!1)}}return l.memoizedState=[d,o],d}function zb(s,o,l){return l===void 0||(Aa&1073741824)!==0&&(Kt&261930)===0?s.memoizedState=o:(s.memoizedState=l,s=DN(),_t.lanes|=s,Ci|=s,l)}function NS(s,o,l,d){return Rr(l,o)?l:vi.current!==null?(s=zb(s,l,d),Rr(s,o)||(is=!0),s):(Aa&106)===0||(Aa&1073741824)!==0&&(Kt&261930)===0?(is=!0,s.memoizedState=l):(s=DN(),_t.lanes|=s,Ci|=s,o)}function CS(s,o,l,d,y){var j=le.p;le.p=j!==0&&8>j?j:8;var I=ae.T,J={};J.types=I!==null?I.types:null,ae.T=J,_b(s,!1,o,l);try{var me=y(),Ne=ae.S;if(Ne!==null&&Ne(J,me),me!==null&&typeof me=="object"&&typeof me.then=="function"){var ze=Yz(me,d);gd(s,o,ze,zr(s))}else gd(s,o,d,zr(s))}catch($e){gd(s,o,{then:function(){},status:"rejected",reason:$e},zr())}finally{le.p=j,I!==null&&J.types!==null&&(I.types=J.types),ae.T=I}}function Jz(){}function Ib(s,o,l,d){if(s.tag!==5)throw Error(a(476));var y=kS(s).queue;CS(s,y,o,re,l===null?Jz:function(){return TS(s),l(d)})}function kS(s){var o=s.memoizedState;if(o!==null)return o;o={memoizedState:re,baseState:re,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ma,lastRenderedState:re},next:null};var l={};return o.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ma,lastRenderedState:l},next:null},s.memoizedState=o,s=s.alternate,s!==null&&(s.memoizedState=o),o}function TS(s){var o=kS(s);o.next===null&&(o=s.alternate.memoizedState),gd(s,o.next.queue,{},zr())}function Pb(){return Is(nu)}function ES(){return es().memoizedState}function RS(){return es().memoizedState}function eI(s){for(var o=s.return;o!==null;){switch(o.tag){case 24:case 3:var l=zr();s=xi(l);var d=bi(o,s,l);d!==null&&(pr(d,o,l),ud(d,o,l)),o={cache:ub()},s.payload=o;return}o=o.return}}function tI(s,o,l){var d=zr();l={lane:d,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Hh(s)?MS(o,l):(l=tb(s,o,l,d),l!==null&&(pr(l,s,d),OS(l,o,d)))}function AS(s,o,l){var d=zr();gd(s,o,l,d)}function gd(s,o,l,d){var y={lane:d,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Hh(s))MS(o,y);else{var j=s.alternate;if(s.lanes===0&&(j===null||j.lanes===0)&&(j=o.lastRenderedReducer,j!==null))try{var I=o.lastRenderedState,J=j(I,l);if(y.hasEagerState=!0,y.eagerState=J,Rr(J,I))return yh(s,o,y,0),An===null&&vh(),!1}catch{}finally{}if(l=tb(s,o,y,d),l!==null)return pr(l,s,d),OS(l,o,d),!0}return!1}function _b(s,o,l,d){if(d={lane:2,revertLane:T0(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},Hh(s)){if(o)throw Error(a(479))}else o=tb(s,l,d,2),o!==null&&pr(o,s,2)}function Hh(s){var o=s.alternate;return s===_t||o!==null&&o===_t}function MS(s,o){Ic=Ph=!0;var l=s.pending;l===null?o.next=o:(o.next=l.next,l.next=o),s.pending=o}function OS(s,o,l){if((l&4194048)!==0){var d=o.lanes;d&=s.pendingLanes,l|=d,o.lanes=l,wo(s,l)}}var Fh={readContext:Is,use:$h,useCallback:Xn,useContext:Xn,useEffect:Xn,useImperativeHandle:Xn,useLayoutEffect:Xn,useInsertionEffect:Xn,useMemo:Xn,useReducer:Xn,useRef:Xn,useState:Xn,useDebugValue:Xn,useDeferredValue:Xn,useTransition:Xn,useSyncExternalStore:Xn,useId:Xn,useHostTransitionStatus:Xn,useFormState:Xn,useActionState:Xn,useOptimistic:Xn,useMemoCache:Xn,useCacheRefresh:Xn,useEffectEvent:Xn},DS={readContext:Is,use:$h,useCallback:function(s,o){return nr().memoizedState=[s,o===void 0?null:o],s},useContext:Is,useEffect:gS,useImperativeHandle:function(s,o,l){l=l!=null?l.concat([s]):null,Vh(4194308,4,yS.bind(null,o,s),l)},useLayoutEffect:function(s,o){return Vh(4194308,4,s,o)},useInsertionEffect:function(s,o){Vh(4,2,s,o)},useMemo:function(s,o){var l=nr();o=o===void 0?null:o;var d=s();if(Rl){et(!0);try{s()}finally{et(!1)}}return l.memoizedState=[d,o],d},useReducer:function(s,o,l){var d=nr();if(l!==void 0){var y=l(o);if(Rl){et(!0);try{l(o)}finally{et(!1)}}}else y=o;return d.memoizedState=d.baseState=y,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:y},d.queue=s,s=s.dispatch=tI.bind(null,_t,s),[d.memoizedState,s]},useRef:function(s){var o=nr();return s={current:s},o.memoizedState=s},useState:function(s){s=Ab(s);var o=s.queue,l=AS.bind(null,_t,o);return o.dispatch=l,[s.memoizedState,l]},useDebugValue:Db,useDeferredValue:function(s,o){var l=nr();return zb(l,s,o)},useTransition:function(){var s=Ab(!1);return s=CS.bind(null,_t,s.queue,!0,!1),nr().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,o,l){var d=_t,y=nr();if(Vt){if(l===void 0)throw Error(a(407));l=l()}else{if(l=o(),An===null)throw Error(a(349));(Kt&127)!==0||eS(d,o,l)}y.memoizedState=l;var j={value:l,getSnapshot:o};return y.queue=j,gS(nS.bind(null,d,j,s),[s]),d.flags|=2048,_c(9,{destroy:void 0},tS.bind(null,d,j,l,o),null),l},useId:function(){var s=nr(),o=An.identifierPrefix;if(Vt){var l=Uo,d=Vo;l=(d&~(1<<32-it(d)-1)).toString(32)+l,o="_"+o+"R_"+l,l=_h++,0<l&&(o+="H"+l.toString(32)),o+="_"}else l=Kz++,o="_"+o+"r_"+l.toString(32)+"_";return s.memoizedState=o},useHostTransitionStatus:Pb,useFormState:dS,useActionState:dS,useOptimistic:function(s){var o=nr();o.memoizedState=o.baseState=s;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=l,o=_b.bind(null,_t,!0,l),l.dispatch=o,[s,o]},useMemoCache:Tb,useCacheRefresh:function(){return nr().memoizedState=eI.bind(null,_t)},useEffectEvent:function(s){var o=nr(),l={impl:s};return o.memoizedState=l,function(){if((dn&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}},zS={readContext:Is,use:$h,useCallback:jS,useContext:Is,useEffect:Ob,useImperativeHandle:wS,useInsertionEffect:bS,useLayoutEffect:vS,useMemo:SS,useReducer:Bh,useRef:pS,useState:function(){return Bh(Ma)},useDebugValue:Db,useDeferredValue:function(s,o){var l=es();return NS(l,Cn.memoizedState,s,o)},useTransition:function(){var s=Bh(Ma)[0],o=es().memoizedState;return[typeof s=="boolean"?s:pd(s),o]},useSyncExternalStore:Jj,useId:ES,useHostTransitionStatus:Pb,useFormState:fS,useActionState:fS,useOptimistic:function(s,o){var l=es();return oS(l,Cn,s,o)},useMemoCache:Tb,useCacheRefresh:RS,useEffectEvent:xS},nI={readContext:Is,use:$h,useCallback:jS,useContext:Is,useEffect:Ob,useImperativeHandle:wS,useInsertionEffect:bS,useLayoutEffect:vS,useMemo:SS,useReducer:Rb,useRef:pS,useState:function(){return Rb(Ma)},useDebugValue:Db,useDeferredValue:function(s,o){var l=es();return Cn===null?zb(l,s,o):NS(l,Cn.memoizedState,s,o)},useTransition:function(){var s=Rb(Ma)[0],o=es().memoizedState;return[typeof s=="boolean"?s:pd(s),o]},useSyncExternalStore:Jj,useId:ES,useHostTransitionStatus:Pb,useFormState:mS,useActionState:mS,useOptimistic:function(s,o){var l=es();return Cn!==null?oS(l,Cn,s,o):(l.baseState=s,[s,l.queue.dispatch])},useMemoCache:Tb,useCacheRefresh:RS,useEffectEvent:xS};function Lb(s,o,l,d){o=s.memoizedState,l=l(d,o),l=l==null?o:k({},o,l),s.memoizedState=l,s.lanes===0&&(s.updateQueue.baseState=l)}var $b={enqueueSetState:function(s,o,l){s=s._reactInternals;var d=zr(),y=xi(d);y.payload=o,l!=null&&(y.callback=l),o=bi(s,y,d),o!==null&&(pr(o,s,d),ud(o,s,d))},enqueueReplaceState:function(s,o,l){s=s._reactInternals;var d=zr(),y=xi(d);y.tag=1,y.payload=o,l!=null&&(y.callback=l),o=bi(s,y,d),o!==null&&(pr(o,s,d),ud(o,s,d))},enqueueForceUpdate:function(s,o){s=s._reactInternals;var l=zr(),d=xi(l);d.tag=2,o!=null&&(d.callback=o),o=bi(s,d,l),o!==null&&(pr(o,s,l),ud(o,s,l))}};function IS(s,o,l,d,y,j,I){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(d,j,I):o.prototype&&o.prototype.isPureReactComponent?!nd(l,d)||!nd(y,j):!0}function PS(s,o,l,d){s=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(l,d),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(l,d),o.state!==s&&$b.enqueueReplaceState(o,o.state,null)}function Al(s,o){var l=o;if("ref"in o){l={};for(var d in o)d!=="ref"&&(l[d]=o[d])}if(s=s.defaultProps){l===o&&(l=k({},l));for(var y in s)l[y]===void 0&&(l[y]=s[y])}return l}function _S(s){bh(s)}function LS(s){console.error(s)}function $S(s){bh(s)}function Gh(s,o){try{var l=s.onUncaughtError;l(o.value,{componentStack:o.stack})}catch(d){setTimeout(function(){throw d})}}function BS(s,o,l){try{var d=s.onCaughtError;d(l.value,{componentStack:l.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function Bb(s,o,l){return l=xi(l),l.tag=3,l.payload={element:null},l.callback=function(){Gh(s,o)},l}function VS(s){return s=xi(s),s.tag=3,s}function US(s,o,l,d){var y=l.type.getDerivedStateFromError;if(typeof y=="function"){var j=d.value;s.payload=function(){return y(j)},s.callback=function(){BS(o,l,d)}}var I=l.stateNode;I!==null&&typeof I.componentDidCatch=="function"&&(s.callback=function(){BS(o,l,d),typeof y!="function"&&(ki===null?ki=new Set([this]):ki.add(this));var J=d.stack;this.componentDidCatch(d.value,{componentStack:J!==null?J:""})})}function sI(s,o,l,d,y){if(l.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){if(o=l.alternate,o!==null&&jl(o,l,y,!0),l=Ps.current,l!==null){switch(l.tag){case 31:case 13:case 19:return qs===null?fm():l.alternate===null&&Wn===0&&(Wn=3),l.flags&=-257,l.flags|=65536,l.lanes=y,d===Mh?l.flags|=16384:(o=l.updateQueue,o===null?l.updateQueue=new Set([d]):o.add(d),N0(s,d,y)),!1;case 22:return l.flags|=65536,d===Mh?l.flags|=16384:(o=l.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([d])},l.updateQueue=o):(l=o.retryQueue,l===null?o.retryQueue=new Set([d]):l.add(d)),N0(s,d,y)),!1}throw Error(a(435,l.tag))}return N0(s,d,y),fm(),!1}if(Vt)return o=Ps.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=y,d!==ab&&(s=Error(a(422),{cause:d}),od(eo(s,l)))):(d!==ab&&(o=Error(a(423),{cause:d}),od(eo(o,l))),s=s.current.alternate,s.flags|=65536,y&=-y,s.lanes|=y,d=eo(d,l),y=Bb(s.stateNode,d,y),gb(s,y),Wn!==4&&(Wn=2)),!1;var j=Error(a(520),{cause:d});if(j=eo(j,l),Nd===null?Nd=[j]:Nd.push(j),Wn!==4&&(Wn=2),o===null)return!0;d=eo(d,l),l=o;do{switch(l.tag){case 3:return l.flags|=65536,s=y&-y,l.lanes|=s,s=Bb(l.stateNode,d,s),gb(l,s),!1;case 1:if(o=l.type,j=l.stateNode,(l.flags&128)===0&&(typeof o.getDerivedStateFromError=="function"||j!==null&&typeof j.componentDidCatch=="function"&&(ki===null||!ki.has(j))))return l.flags|=65536,y&=-y,l.lanes|=y,y=VS(y),US(y,s,l,d),gb(l,y),!1;break;case 22:if(l.memoizedState!==null)return l.flags|=65536,!1}l=l.return}while(l!==null);return!1}var Vb=Error(a(461)),is=!1;function hs(s,o,l,d){o.child=s===null?qj(o,null,l,d):El(o,s.child,l,d)}function HS(s,o,l,d,y){l=l.render;var j=o.ref;if("ref"in d){var I={};for(var J in d)J!=="ref"&&(I[J]=d[J])}else I=d;return Sl(o),d=Sb(s,o,l,I,j,y),J=Nb(),s!==null&&!is?(Cb(s,o,y),Oa(s,o,y)):(Vt&&J&&Nh(o),o.flags|=1,hs(s,o,d,y),o.child)}function FS(s,o,l,d,y){if(s===null){var j=l.type;return typeof j=="function"&&!nb(j)&&j.defaultProps===void 0&&l.compare===null?(o.tag=15,o.type=j,GS(s,o,j,d,y)):(s=jh(l.type,null,d,o,o.mode,y),s.ref=o.ref,s.return=o,o.child=s)}if(j=s.child,!Xb(s,y)){var I=j.memoizedProps;if(l=l.compare,l=l!==null?l:nd,l(I,d)&&s.ref===o.ref)return Oa(s,o,y)}return o.flags|=1,s=ka(j,d),s.ref=o.ref,s.return=o,o.child=s}function GS(s,o,l,d,y){if(s!==null){var j=s.memoizedProps;if(nd(j,d)&&s.ref===o.ref)if(is=!1,o.pendingProps=d=j,Xb(s,y))(s.flags&131072)!==0&&(is=!0);else return o.lanes=s.lanes,Oa(s,o,y)}return Ub(s,o,l,d,y)}function qS(s,o,l,d){var y=d.children,j=s!==null?s.memoizedState:null;if(s===null&&o.stateNode===null&&(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.mode==="hidden"){if((o.flags&128)!==0){if(j=j!==null?j.baseLanes|l:l,s!==null){for(d=o.child=s.child,y=0;d!==null;)y=y|d.lanes|d.childLanes,d=d.sibling;d=y&~j}else d=0,o.child=null;return YS(s,o,j,l,d)}if((l&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},s!==null&&Rh(o,j!==null?j.cachePool:null),j!==null?Xj(o,j):bb(),Wj(o);else return d=o.lanes=536870912,YS(s,o,j!==null?j.baseLanes|l:l,l,d)}else j!==null?(Rh(o,j.cachePool),Xj(o,j),wi(),o.memoizedState=null):(s!==null&&Rh(o,null),bb(),wi());return hs(s,o,y,l),o.child}function xd(s,o){return s!==null&&s.tag===22||o.stateNode!==null||(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function YS(s,o,l,d,y){var j=fb();return j=j===null?null:{parent:os._currentValue,pool:j},o.memoizedState={baseLanes:l,cachePool:j},s!==null&&Rh(o,null),bb(),Wj(o),s!==null&&jl(s,o,d,!0),o.childLanes=y,null}function qh(s,o){return o=Yh({mode:o.mode,children:o.children},s.mode),o.ref=s.ref,s.child=o,o.return=s,o}function KS(s,o,l){return El(o,s.child,null,l),s=qh(o,o.pendingProps),s.flags|=2,Ar(o),o.memoizedState=null,s}function rI(s,o,l){var d=o.pendingProps,y=(o.flags&128)!==0;if(o.flags&=-129,s===null){if(Vt){if(d.mode==="hidden")return s=qh(o,d),o.lanes=536870912,s.memoizedState={baseLanes:0,cachePool:null},xd(null,s);if(yb(o),(s=Mn)?(s=yC(s,so),s=s!==null&&s.data==="&"?s:null,s!==null&&(o.memoizedState={dehydrated:s,treeContext:di!==null?{id:Vo,overflow:Uo}:null,retryLane:536870912,hydrationErrors:null},l=Mj(s),l.return=o,o.child=l,Ns=o,Mn=null)):s=null,s===null)throw hi(o);return o.lanes=536870912,null}return qh(o,d)}var j=s.memoizedState;if(j!==null){var I=j.dehydrated;if(yb(o),y)if(o.flags&256)o.flags&=-257,o=KS(s,o,l);else if(o.memoizedState!==null)o.child=s.child,o.flags|=128,o=null;else throw Error(a(558));else if(is||jl(s,o,l,!1),y=(l&s.childLanes)!==0,is||y){if(vi.current===null){if(d=An,d!==null&&(I=jo(d,l),I!==0&&I!==j.retryLane))throw j.retryLane=I,bl(s,I),pr(d,s,I),Vb;fm()}o=KS(s,o,l)}else s=j.treeContext,Mn=oo(I.nextSibling),Ns=o,Vt=!0,fi=null,so=!1,s!==null&&zj(o,s),o=qh(o,d),o.flags|=134221824;return o}return s=ka(s.child,{mode:d.mode,children:d.children}),s.ref=o.ref,o.child=s,s.return=o,s}function Lc(s,o){var l=o.ref;if(l===null)s!==null&&s.ref!==null&&(o.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(a(284));(s===null||s.ref!==l)&&(o.flags|=4194816)}}function Ub(s,o,l,d,y){return Sl(o),l=Sb(s,o,l,d,void 0,y),d=Nb(),s!==null&&!is?(Cb(s,o,y),Oa(s,o,y)):(Vt&&d&&Nh(o),o.flags|=1,hs(s,o,l,y),o.child)}function XS(s,o,l,d,y,j){return Sl(o),o.updateQueue=null,l=Zj(o,d,l,y),Qj(s),d=Nb(),s!==null&&!is?(Cb(s,o,j),Oa(s,o,j)):(Vt&&d&&Nh(o),o.flags|=1,hs(s,o,l,j),o.child)}function WS(s,o,l,d,y){if(Sl(o),o.stateNode===null){var j=Ec,I=l.contextType;typeof I=="object"&&I!==null&&(j=Is(I)),j=new l(d,j),o.memoizedState=j.state!==null&&j.state!==void 0?j.state:null,j.updater=$b,o.stateNode=j,j._reactInternals=o,j=o.stateNode,j.props=d,j.state=o.memoizedState,j.refs={},mb(o),I=l.contextType,j.context=typeof I=="object"&&I!==null?Is(I):Ec,j.state=o.memoizedState,I=l.getDerivedStateFromProps,typeof I=="function"&&(Lb(o,l,I,d),j.state=o.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof j.getSnapshotBeforeUpdate=="function"||typeof j.UNSAFE_componentWillMount!="function"&&typeof j.componentWillMount!="function"||(I=j.state,typeof j.componentWillMount=="function"&&j.componentWillMount(),typeof j.UNSAFE_componentWillMount=="function"&&j.UNSAFE_componentWillMount(),I!==j.state&&$b.enqueueReplaceState(j,j.state,null),fd(o,d,j,y),dd(),j.state=o.memoizedState),typeof j.componentDidMount=="function"&&(o.flags|=4194308),d=!0}else if(s===null){j=o.stateNode;var J=o.memoizedProps,me=Al(l,J);j.props=me;var Ne=j.context,ze=l.contextType;I=Ec,typeof ze=="object"&&ze!==null&&(I=Is(ze));var $e=l.getDerivedStateFromProps;ze=typeof $e=="function"||typeof j.getSnapshotBeforeUpdate=="function",J=o.pendingProps!==J,ze||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(J||Ne!==I)&&PS(o,j,d,I),gi=!1;var we=o.memoizedState;j.state=we,fd(o,d,j,y),dd(),Ne=o.memoizedState,J||we!==Ne||gi?(typeof $e=="function"&&(Lb(o,l,$e,d),Ne=o.memoizedState),(me=gi||IS(o,l,me,d,we,Ne,I))?(ze||typeof j.UNSAFE_componentWillMount!="function"&&typeof j.componentWillMount!="function"||(typeof j.componentWillMount=="function"&&j.componentWillMount(),typeof j.UNSAFE_componentWillMount=="function"&&j.UNSAFE_componentWillMount()),typeof j.componentDidMount=="function"&&(o.flags|=4194308)):(typeof j.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=d,o.memoizedState=Ne),j.props=d,j.state=Ne,j.context=I,d=me):(typeof j.componentDidMount=="function"&&(o.flags|=4194308),d=!1)}else{j=o.stateNode,pb(s,o),I=o.memoizedProps,ze=Al(l,I),j.props=ze,$e=o.pendingProps,we=j.context,Ne=l.contextType,me=Ec,typeof Ne=="object"&&Ne!==null&&(me=Is(Ne)),J=l.getDerivedStateFromProps,(Ne=typeof J=="function"||typeof j.getSnapshotBeforeUpdate=="function")||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(I!==$e||we!==me)&&PS(o,j,d,me),gi=!1,we=o.memoizedState,j.state=we,fd(o,d,j,y),dd();var Me=o.memoizedState;I!==$e||we!==Me||gi||s!==null&&s.dependencies!==null&&Th(s.dependencies)?(typeof J=="function"&&(Lb(o,l,J,d),Me=o.memoizedState),(ze=gi||IS(o,l,ze,d,we,Me,me)||s!==null&&s.dependencies!==null&&Th(s.dependencies))?(Ne||typeof j.UNSAFE_componentWillUpdate!="function"&&typeof j.componentWillUpdate!="function"||(typeof j.componentWillUpdate=="function"&&j.componentWillUpdate(d,Me,me),typeof j.UNSAFE_componentWillUpdate=="function"&&j.UNSAFE_componentWillUpdate(d,Me,me)),typeof j.componentDidUpdate=="function"&&(o.flags|=4),typeof j.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof j.componentDidUpdate!="function"||I===s.memoizedProps&&we===s.memoizedState||(o.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||I===s.memoizedProps&&we===s.memoizedState||(o.flags|=1024),o.memoizedProps=d,o.memoizedState=Me),j.props=d,j.state=Me,j.context=me,d=ze):(typeof j.componentDidUpdate!="function"||I===s.memoizedProps&&we===s.memoizedState||(o.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||I===s.memoizedProps&&we===s.memoizedState||(o.flags|=1024),d=!1)}return j=d,Lc(s,o),d=(o.flags&128)!==0,j||d?(j=o.stateNode,l=d&&typeof l.getDerivedStateFromError!="function"?null:j.render(),o.flags|=1,s!==null&&d?(o.child=El(o,s.child,null,y),o.child=El(o,null,l,y)):hs(s,o,l,y),o.memoizedState=j.state,s=o.child):s=Oa(s,o,y),s}function QS(s,o,l,d){return yl(),o.flags|=256,hs(s,o,l,d),o.child}var Hb={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Fb(s){return{baseLanes:s,cachePool:Bj()}}function Gb(s,o,l){return s=s!==null?s.childLanes&~l:0,o&&(s|=Dr),s}function ZS(s,o,l){var d=o.pendingProps,y=!1,j=(o.flags&128)!==0,I;if((I=j)||(I=s!==null&&s.memoizedState===null?!1:(_s.current&2)!==0),I&&(y=!0,o.flags&=-129),I=(o.flags&32)!==0,o.flags&=-33,s===null){if(Vt){if(y?yi(o):wi(),(s=Mn)?(s=yC(s,so),s=s!==null&&s.data!=="&"?s:null,s!==null&&(o.memoizedState={dehydrated:s,treeContext:di!==null?{id:Vo,overflow:Uo}:null,retryLane:536870912,hydrationErrors:null},l=Mj(s),l.return=o,o.child=l,Ns=o,Mn=null)):s=null,s===null)throw hi(o);return F0(s)?o.lanes=32:o.lanes=536870912,null}return j=d.children,d=d.fallback,y?(wi(),y=o.mode,j=Yh({mode:"hidden",children:j},y),d=vl(d,y,l,null),j.return=o,d.return=o,j.sibling=d,o.child=j,d=o.child,d.memoizedState=Fb(l),d.childLanes=Gb(s,I,l),o.memoizedState=Hb,xd(null,d)):(yi(o),qb(o,j))}var J=s.memoizedState;if(J!==null){var me=J.dehydrated;if(me!==null)return oI(s,o,j,I,d,me,J,l)}return y?(wi(),y=d.fallback,j=o.mode,J=s.child,me=J.sibling,d=ka(J,{mode:"hidden",children:d.children}),d.subtreeFlags=J.subtreeFlags&1206910976,me!==null?y=ka(me,y):(y=vl(y,j,l,null),y.flags|=2),y.return=o,d.return=o,d.sibling=y,o.child=d,xd(null,d),d=o.child,y=s.child.memoizedState,y===null?y=Fb(l):(j=y.cachePool,j!==null?(J=os._currentValue,j=j.parent!==J?{parent:J,pool:J}:j):j=Bj(),y={baseLanes:y.baseLanes|l,cachePool:j}),d.memoizedState=y,d.childLanes=Gb(s,I,l),o.memoizedState=Hb,xd(s.child,d)):(yi(o),l=s.child,s=l.sibling,l=ka(l,{mode:"visible",children:d.children}),l.return=o,l.sibling=null,s!==null&&(I=o.deletions,I===null?(o.deletions=[s],o.flags|=16):I.push(s)),o.child=l,o.memoizedState=null,l)}function qb(s,o){return o=Yh({mode:"visible",children:o},s.mode),o.return=s,s.child=o}function Yh(s,o){return s=dr(22,s,null,o),s.lanes=0,s}function Kh(s,o,l){return El(o,s.child,null,l),s=qb(o,o.pendingProps.children),s.flags|=2,o.memoizedState=null,s}function oI(s,o,l,d,y,j,I,J){if(l)return o.flags&256?(yi(o),o.flags&=-257,Kh(s,o,J)):o.memoizedState!==null?(wi(),o.child=s.child,o.flags|=128,null):(wi(),j=y.fallback,I=o.mode,y=Yh({mode:"visible",children:y.children},I),j=vl(j,I,J,null),j.flags|=2,y.return=o,j.return=o,y.sibling=j,o.child=y,El(o,s.child,null,J),y=o.child,y.memoizedState=Fb(J),y.childLanes=Gb(s,d,J),o.memoizedState=Hb,xd(null,y));if(yi(o),F0(j)){if(d=j.nextSibling&&j.nextSibling.dataset,d)var me=d.dgst;return d=me,d!==""&&(y=Error(a(419)),y.stack="",y.digest=d,od({value:y,source:null,stack:null})),Kh(s,o,J)}if(is||jl(s,o,J,!1),d=(J&s.childLanes)!==0,is||d){if(vi.current!==null)return Kh(s,o,J);if(d=An,d!==null&&(y=jo(d,J),y!==0&&y!==I.retryLane))throw I.retryLane=y,bl(s,y),pr(d,s,y),Vb;return H0(j)||fm(),Kh(s,o,J)}return H0(j)?(o.flags|=192,o.child=s.child,null):(s=I.treeContext,Mn=oo(j.nextSibling),Ns=o,Vt=!0,fi=null,so=!1,s!==null&&zj(o,s),o=qb(o,y.children),o.flags|=134221824,o)}function JS(s,o,l){s.lanes|=o;var d=s.alternate;d!==null&&(d.lanes|=o),kh(s.return,o,l)}function eN(s){for(var o=null;s!==null;){var l=s.alternate;l!==null&&Ih(l)===null&&(o=s),s=s.sibling}return o}function Xh(s,o,l,d,y,j){var I=s.memoizedState;I===null?s.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:d,tail:l,tailMode:y,treeForkCount:j}:(I.isBackwards=o,I.rendering=null,I.renderingStartTime=0,I.last=d,I.tail=l,I.tailMode=y,I.treeForkCount=j)}function Yb(s){var o=s.child;for(s.child=null;o!==null;){var l=o.sibling;o.sibling=s.child,s.child=o,o=l}}function Kb(s,o,l){var d=o.pendingProps,y=d.revealOrder,j=d.tail;d=d.children;var I=_s.current;if(o.flags&128)return hd(o,I),null;var J=(I&2)!==0;if(J?(I=I&1|2,o.flags|=128):I&=1,hd(o,I),y==="backwards"&&s!==null?(Yb(s),hs(s,o,d,l),Yb(s)):hs(s,o,d,l),d=Vt?rd:0,!J&&s!==null&&(s.flags&128)!==0)e:for(s=o.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&JS(s,l,o);else if(s.tag===19)JS(s,l,o);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===o)break e;for(;s.sibling===null;){if(s.return===null||s.return===o)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}switch(y){case"backwards":l=eN(o.child),l===null?(y=o.child,o.child=null):(y=l.sibling,l.sibling=null,Yb(o)),Xh(o,!0,y,null,j,d);break;case"unstable_legacy-backwards":for(l=null,y=o.child,o.child=null;y!==null;){if(s=y.alternate,s!==null&&Ih(s)===null){o.child=y;break}s=y.sibling,y.sibling=l,l=y,y=s}Xh(o,!0,l,null,j,d);break;case"together":Xh(o,!1,null,null,void 0,d);break;case"independent":o.memoizedState=null;break;default:l=eN(o.child),l===null?(y=o.child,o.child=null):(y=l.sibling,l.sibling=null),Xh(o,!1,y,l,j,d)}return o.child}function tN(s,o,l){var d=o.pendingProps;return mi(o,o.type,d.value),hs(s,o,d.children,l),o.child}function Oa(s,o,l){if(s!==null&&(o.dependencies=s.dependencies),Ci|=o.lanes,(l&o.childLanes)===0)if(s!==null){if(jl(s,o,l,!1),(l&o.childLanes)===0)return null}else return null;if(s!==null&&o.child!==s.child)throw Error(a(153));if(o.child!==null){for(s=o.child,l=ka(s,s.pendingProps),o.child=l,l.return=o;s.sibling!==null;)s=s.sibling,l=l.sibling=ka(s,s.pendingProps),l.return=o;l.sibling=null}return o.child}function Xb(s,o){return(s.lanes&o)!==0?!0:(s=s.dependencies,!!(s!==null&&Th(s)))}function aI(s,o,l){switch(o.tag){case 3:oe(o,o.stateNode.containerInfo),mi(o,os,s.memoizedState.cache),yl();break;case 27:case 5:Re(o);break;case 4:oe(o,o.stateNode.containerInfo);break;case 10:mi(o,o.type,o.memoizedProps.value);break;case 31:if(o.memoizedState!==null)return o.flags|=128,yb(o),null;break;case 13:var d=o.memoizedState;if(d!==null){if(d.dehydrated!==null)return yi(o),o.flags|=128,null;d=jl(s,o,l,!1);var y=o.child.childLanes;return d||(l&y)!==0?ZS(s,o,l):(yi(o),s=Oa(s,o,l),s!==null?s.sibling:null)}yi(o);break;case 19:if(o.flags&128)return Kb(s,o,l);if(y=(s.flags&128)!==0,d=(l&o.childLanes)!==0,d||(jl(s,o,l,!1),d=(l&o.childLanes)!==0),y){if(d)return Kb(s,o,l);o.flags|=128}if(y=o.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),hd(o,_s.current),d)break;return null;case 22:return o.lanes=0,qS(s,o,l,o.pendingProps);case 24:mi(o,os,s.memoizedState.cache)}return Oa(s,o,l)}function nN(s,o,l){if(s!==null)if(s.memoizedProps!==o.pendingProps)is=!0;else{if(!Xb(s,l)&&(o.flags&128)===0)return is=!1,aI(s,o,l);is=(s.flags&131072)!==0}else is=!1,Vt&&(o.flags&1048576)!==0&&Dj(o,rd,o.index);switch(o.lanes=0,o.tag){case 16:e:{var d=o.pendingProps;if(s=kl(o.elementType),o.type=s,typeof s=="function")nb(s)?(d=Al(s,d),o.tag=1,o=WS(null,o,s,d,l)):(o.tag=0,o=Ub(null,o,s,d,l));else{if(s!=null){var y=s.$$typeof;if(y===Y){o.tag=11,o=HS(null,o,s,d,l);break e}else if(y===ee){o.tag=14,o=FS(null,o,s,d,l);break e}else if(y===V){o.tag=10,o.type=s,o=tN(null,o,l);break e}}throw o=ne(s)||s,Error(a(306,o,""))}}return o;case 0:return Ub(s,o,o.type,o.pendingProps,l);case 1:return d=o.type,y=Al(d,o.pendingProps),WS(s,o,d,y,l);case 3:e:{if(oe(o,o.stateNode.containerInfo),s===null)throw Error(a(387));d=o.pendingProps;var j=o.memoizedState;y=j.element,pb(s,o),fd(o,d,null,l);var I=o.memoizedState;if(d=I.cache,mi(o,os,d),d!==j.cache&&cb(o,[os],l,!0),dd(),d=I.element,j.isDehydrated)if(j={element:d,isDehydrated:!1,cache:I.cache},o.updateQueue.baseState=j,o.memoizedState=j,o.flags&256){o=QS(s,o,d,l);break e}else if(d!==y){y=eo(Error(a(424)),o),od(y),o=QS(s,o,d,l);break e}else{switch(s=o.stateNode.containerInfo,s.nodeType){case 9:s=s.body;break;default:s=s.nodeName==="HTML"?s.ownerDocument.body:s}for(Mn=oo(s.firstChild),Ns=o,Vt=!0,fi=null,so=!0,l=qj(o,null,d,l),o.child=l;l;)l.flags=l.flags&-3|134221824,l=l.sibling}else{if(yl(),d===y){o=Oa(s,o,l);break e}hs(s,o,d,l)}o=o.child}return o;case 26:return Lc(s,o),s===null?(l=TC(o.type,null,o.pendingProps,null))?o.memoizedState=l:Vt||(o.stateNode=aC(o.type,o.pendingProps,de.current,o)):o.memoizedState=TC(o.type,s.memoizedProps,o.pendingProps,s.memoizedState),null;case 27:return Re(o),s===null&&Vt&&(d=o.stateNode=SC(o.type,o.pendingProps,de.current),Ns=o,so=!0,y=Mn,Ri(o.type)?(G0=y,Mn=oo(d.firstChild)):Mn=y),hs(s,o,o.pendingProps.children,l),Lc(s,o),s===null&&(o.flags|=4194304),o.child;case 5:return s===null&&Vt&&((y=d=Mn)&&(d=eP(d,o.type,o.pendingProps,so),d!==null?(o.stateNode=d,Ns=o,Mn=oo(d.firstChild),so=!1,y=!0):y=!1),y||hi(o)),Re(o),y=o.type,j=o.pendingProps,I=s!==null?s.memoizedProps:null,d=j.children,P0(y,j)?d=null:I!==null&&P0(y,I)&&(o.flags|=32),o.memoizedState!==null&&(y=Sb(s,o,Xz,null,null,l),nu._currentValue=y),Lc(s,o),hs(s,o,d,l),o.child;case 6:return s===null&&Vt&&((s=l=Mn)&&(l=tP(l,o.pendingProps,so),l!==null?(o.stateNode=l,Ns=o,Mn=null,s=!0):s=!1),s||hi(o)),null;case 13:return ZS(s,o,l);case 4:return oe(o,o.stateNode.containerInfo),d=o.pendingProps,s===null?o.child=El(o,null,d,l):hs(s,o,d,l),o.child;case 11:return HS(s,o,o.type,o.pendingProps,l);case 7:return d=o.pendingProps,Lc(s,o),hs(s,o,d,l),o.child;case 8:return hs(s,o,o.pendingProps.children,l),o.child;case 12:return hs(s,o,o.pendingProps.children,l),o.child;case 10:return tN(s,o,l);case 9:return y=o.type._context,d=o.pendingProps.children,Sl(o),y=Is(y),d=d(y),o.flags|=1,hs(s,o,d,l),o.child;case 14:return FS(s,o,o.type,o.pendingProps,l);case 15:return GS(s,o,o.type,o.pendingProps,l);case 19:return Kb(s,o,l);case 31:return rI(s,o,l);case 22:return qS(s,o,l,o.pendingProps);case 24:return Sl(o),d=Is(os),s===null?(y=fb(),y===null&&(y=An,j=ub(),y.pooledCache=j,j.refCount++,j!==null&&(y.pooledCacheLanes|=l),y=j),o.memoizedState={parent:d,cache:y},mb(o),mi(o,os,y)):((s.lanes&l)!==0&&(pb(s,o),fd(o,null,null,l),dd()),y=s.memoizedState,j=o.memoizedState,y.parent!==d?(y={parent:d,cache:d},o.memoizedState=y,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=y),mi(o,os,d)):(d=j.cache,mi(o,os,d),d!==y.cache&&cb(o,[os],l,!0))),hs(s,o,o.pendingProps.children,l),o.child;case 30:return o.stateNode===null&&(o.stateNode={autoName:null,paired:null,clones:null,ref:null}),d=o.pendingProps,d.name!=null&&d.name!=="auto"?o.flags|=s===null?18882560:18874368:Vt&&Nh(o),s!==null&&s.memoizedProps.name!==d.name?o.flags|=4194816:Lc(s,o),hs(s,o,d.children,l),o.child;case 29:throw o.pendingProps}throw Error(a(156,o.tag))}function Da(s){s.flags|=4}function Wb(s,o,l,d,y){var j;if((j=(s.mode&32)!==0)&&(j=l===null?MC(o,d):MC(o,d)&&(d.src!==l.src||d.srcSet!==l.srcSet)),j){if(s.flags|=16777216,(y&335544128)===y)if(s.stateNode.complete)s.flags|=8192;else if(_N())s.flags|=8192;else throw Tl=Mh,hb}else s.flags&=-16777217}function sN(s,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!OC(o))if(_N())s.flags|=8192;else throw Tl=Mh,hb}function Wh(s,o){o!==null&&(s.flags|=4),s.flags&16384&&(o=s.tag!==22?xn():536870912,s.lanes|=o,Hc|=o)}function bd(s,o){if(!Vt)switch(s.tailMode){case"visible":break;case"collapsed":for(var l=s.tail,d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?o||s.tail===null?s.tail=null:s.tail.sibling=null:d.sibling=null;break;default:for(o=s.tail,l=null;o!==null;)o.alternate!==null&&(l=o),o=o.sibling;l===null?s.tail=null:l.sibling=null}}function On(s){var o=s.alternate!==null&&s.alternate.child===s.child,l=0,d=0;if(o)for(var y=s.child;y!==null;)l|=y.lanes|y.childLanes,d|=y.subtreeFlags&1206910976,d|=y.flags&1206910976,y.return=s,y=y.sibling;else for(y=s.child;y!==null;)l|=y.lanes|y.childLanes,d|=y.subtreeFlags,d|=y.flags,y.return=s,y=y.sibling;return s.subtreeFlags|=d,s.childLanes=l,o}function iI(s,o,l){var d=o.pendingProps;switch(ob(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return On(o),null;case 1:return On(o),null;case 3:return l=o.stateNode,d=null,s!==null&&(d=s.memoizedState.cache),o.memoizedState.cache!==d&&(o.flags|=2048),Ra(os),fe(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(s===null||s.child===null)&&(Mc(o)?Da(o):s===null||s.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,ib())),On(o),null;case 26:var y=o.type,j=o.memoizedState;return s===null?(Da(o),j!==null?(On(o),sN(o,j)):(On(o),Wb(o,y,null,d,l))):j?j!==s.memoizedState?(Da(o),On(o),sN(o,j)):(On(o),o.flags&=-16777217):(s=s.memoizedProps,s!==d&&Da(o),On(o),Wb(o,y,s,d,l)),null;case 27:if(Oe(o),l=de.current,y=o.type,s!==null&&o.stateNode!=null)s.memoizedProps!==d&&Da(o);else{if(!d){if(o.stateNode===null)throw Error(a(166));return On(o),o.subtreeFlags&=-33554433,null}s=Ce.current,Mc(o)?Ij(o):(s=SC(y,d,l),o.stateNode=s,Da(o))}return On(o),o.subtreeFlags&=-33554433,null;case 5:if(Oe(o),y=o.type,s!==null&&o.stateNode!=null)s.memoizedProps!==d&&Da(o);else{if(!d){if(o.stateNode===null)throw Error(a(166));return On(o),o.subtreeFlags&=-33554433,null}if(j=Ce.current,Mc(o))Ij(o);else{var I=Rd(de.current);switch(j){case 1:j=I.createElementNS("http://www.w3.org/2000/svg",y);break;case 2:j=I.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;default:switch(y){case"svg":j=I.createElementNS("http://www.w3.org/2000/svg",y);break;case"math":j=I.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;case"script":j=I.createElement("div"),j.innerHTML="<script><\/script>",j=j.removeChild(j.firstChild);break;case"select":j=typeof d.is=="string"?I.createElement("select",{is:d.is}):I.createElement("select"),d.multiple?j.multiple=!0:d.size&&(j.size=d.size);break;default:j=typeof d.is=="string"?I.createElement(y,{is:d.is}):I.createElement(y)}}j[Un]=o,j[Os]=d;e:for(I=o.child;I!==null;){if(I.tag===5||I.tag===6)j.appendChild(I.stateNode);else if(I.tag!==4&&I.tag!==27&&I.child!==null){I.child.return=I,I=I.child;continue}if(I===o)break e;for(;I.sibling===null;){if(I.return===null||I.return===o)break e;I=I.return}I.sibling.return=I.return,I=I.sibling}o.stateNode=j;e:switch($s(j,y,d),y){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}d&&Da(o)}}return On(o),o.subtreeFlags&=-33554433,Wb(o,o.type,s===null?null:s.memoizedProps,o.pendingProps,l),null;case 6:if(s&&o.stateNode!=null)s.memoizedProps!==d&&Da(o);else{if(typeof d!="string"&&o.stateNode===null)throw Error(a(166));if(s=de.current,Mc(o)){if(s=o.stateNode,l=o.memoizedProps,d=null,y=Ns,y!==null)switch(y.tag){case 27:case 5:d=y.memoizedProps}s[Un]=o,s=!!(s.nodeValue===l||d!==null&&d.suppressHydrationWarning===!0||nC(s.nodeValue,l)),s||hi(o,!0)}else s=Rd(s).createTextNode(d),s[Un]=o,o.stateNode=s}return On(o),null;case 31:if(l=o.memoizedState,s===null||s.memoizedState!==null){if(d=Mc(o),l!==null){if(s===null){if(!d)throw Error(a(318));if(s=o.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(a(557));s[Un]=o}else yl(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;On(o),s=!1}else l=ib(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=l),s=!0;if(!s)return o.flags&256?(Ar(o),o):(Ar(o),null);if((o.flags&128)!==0)throw Error(a(558))}return On(o),null;case 13:if(d=o.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(y=Mc(o),d!==null&&d.dehydrated!==null){if(s===null){if(!y)throw Error(a(318));if(y=o.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(a(317));y[Un]=o}else yl(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;On(o),y=!1}else y=ib(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=y),y=!0;if(!y)return o.flags&256?(Ar(o),o):(Ar(o),null)}return Ar(o),(o.flags&128)!==0?(o.lanes=l,o):(l=d!==null,s=s!==null&&s.memoizedState!==null,l&&(d=o.child,y=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(y=d.alternate.memoizedState.cachePool.pool),j=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(j=d.memoizedState.cachePool.pool),j!==y&&(d.flags|=2048)),l!==s&&l&&(o.child.flags|=8192),Wh(o,o.updateQueue),On(o),null);case 4:return fe(),s===null&&M0(o.stateNode.containerInfo),o.flags|=67108864,On(o),null;case 10:return Ra(o.type),On(o),null;case 19:if(wb(o),d=o.memoizedState,d===null)return On(o),null;if(y=(o.flags&128)!==0,j=d.rendering,j===null)if(y)bd(d,!1);else{if(Wn!==0||s!==null&&(s.flags&128)!==0)for(s=o.child;s!==null;){if(j=Ih(s),j!==null){for(o.flags|=128,bd(d,!1),s=j.updateQueue,o.updateQueue=s,Wh(o,s),o.subtreeFlags=0,s=l,l=o.child;l!==null;)Aj(l,s),l=l.sibling;return hd(o,_s.current&1|2),Vt&&Ta(o,d.treeForkCount),o.child}s=s.sibling}d.tail!==null&&be()>lm&&(o.flags|=128,y=!0,bd(d,!1),o.lanes=4194304)}else{if(!y)if(s=Ih(j),s!==null){if(o.flags|=128,y=!0,s=s.updateQueue,o.updateQueue=s,Wh(o,s),bd(d,!0),d.tail===null&&d.tailMode!=="collapsed"&&d.tailMode!=="visible"&&!j.alternate&&!Vt)return On(o),null}else 2*be()-d.renderingStartTime>lm&&l!==536870912&&(o.flags|=128,y=!0,bd(d,!1),o.lanes=4194304);d.isBackwards?(j.sibling=o.child,o.child=j):(s=d.last,s!==null?s.sibling=j:o.child=j,d.last=j)}if(d.tail!==null){s=d.tail;e:{for(l=s;l!==null;){if(l.alternate!==null){l=!1;break e}l=l.sibling}l=!0}return d.rendering=s,d.tail=s.sibling,d.renderingStartTime=be(),s.sibling=null,j=_s.current,j=y?j&1|2:j&1,d.tailMode==="visible"||d.tailMode==="collapsed"||!l||Vt?hd(o,j):(l=j,ve(Ps,o),ve(_s,l),qs===null&&(qs=o)),Vt&&Ta(o,d.treeForkCount),s}return On(o),null;case 22:case 23:return Ar(o),vb(),d=o.memoizedState!==null,s!==null?s.memoizedState!==null!==d&&(o.flags|=8192):d&&(o.flags|=8192),d?(l&536870912)!==0&&(o.flags&128)===0&&(On(o),o.subtreeFlags&6&&(o.flags|=8192)):On(o),l=o.updateQueue,l!==null&&Wh(o,l.retryQueue),l=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(l=s.memoizedState.cachePool.pool),d=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),d!==l&&(o.flags|=2048),s!==null&&ue(Cl),null;case 24:return l=null,s!==null&&(l=s.memoizedState.cache),o.memoizedState.cache!==l&&(o.flags|=2048),Ra(os),On(o),null;case 25:return null;case 30:return o.flags|=33554432,On(o),null}throw Error(a(156,o.tag))}function lI(s,o){switch(ob(o),o.tag){case 1:return s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 3:return Ra(os),fe(),s=o.flags,(s&65536)!==0&&(s&128)===0?(o.flags=s&-65537|128,o):null;case 26:case 27:case 5:return Oe(o),null;case 31:if(o.memoizedState!==null){if(Ar(o),o.alternate===null)throw Error(a(340));yl()}return s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 13:if(Ar(o),s=o.memoizedState,s!==null&&s.dehydrated!==null){if(o.alternate===null)throw Error(a(340));yl()}return s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 19:return wb(o),s=o.flags,s&65536?(o.flags=s&-65537|128,s=o.memoizedState,s!==null&&(s.rendering=null,s.tail=null),o.flags|=4,o):null;case 4:return fe(),null;case 10:return Ra(o.type),null;case 22:case 23:return Ar(o),vb(),s!==null&&ue(Cl),s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 24:return Ra(os),null;case 25:return null;default:return null}}function rN(s,o){switch(ob(o),o.tag){case 3:Ra(os),fe();break;case 26:case 27:case 5:Oe(o);break;case 4:fe();break;case 31:o.memoizedState!==null&&Ar(o);break;case 13:Ar(o);break;case 19:wb(o);break;case 10:Ra(o.type);break;case 22:case 23:Ar(o),vb(),s!==null&&ue(Cl);break;case 24:Ra(os)}}function vd(s,o){try{var l=o.updateQueue,d=l!==null?l.lastEffect:null;if(d!==null){var y=d.next;l=y;do{if((l.tag&s)===s){d=void 0;var j=l.create,I=l.inst;d=j(),I.destroy=d}l=l.next}while(l!==y)}}catch(J){vn(o,o.return,J)}}function ji(s,o,l){try{var d=o.updateQueue,y=d!==null?d.lastEffect:null;if(y!==null){var j=y.next;d=j;do{if((d.tag&s)===s){var I=d.inst,J=I.destroy;if(J!==void 0){I.destroy=void 0,y=o;var me=l,Ne=J;try{Ne()}catch(ze){vn(y,me,ze)}}}d=d.next}while(d!==j)}}catch(ze){vn(o,o.return,ze)}}function oN(s){var o=s.updateQueue;if(o!==null){var l=s.stateNode;try{Kj(o,l)}catch(d){vn(s,s.return,d)}}}function aN(s,o,l){l.props=Al(s.type,s.memoizedProps),l.state=s.memoizedState;try{l.componentWillUnmount()}catch(d){vn(s,o,d)}}function Ho(s,o){try{var l=s.ref;if(l!==null){switch(s.tag){case 26:case 27:case 5:var d=s.stateNode;break;case 30:var y=s.stateNode,j=Na(s.memoizedProps,y);(y.ref===null||y.ref.name!==j)&&(y.ref=hC(j)),d=y.ref;break;case 7:if(s.stateNode===null){var I=new Ir(s);p(s.child,!1,ZI,I,void 0,void 0),s.stateNode=I}d=s.stateNode;break;default:d=s.stateNode}typeof l=="function"?s.refCleanup=l(d):l.current=d}}catch(J){vn(s,o,J)}}function Ls(s,o){var l=s.ref,d=s.refCleanup;if(l!==null)if(typeof d=="function")try{d()}catch(y){vn(s,o,y)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(y){vn(s,o,y)}else l.current=null}function Qh(s,o){if((s.tag===5||s.tag===27||s.tag===6)&&s.alternate===null&&o!==null)for(var l=0;l<o.length;l++)vC(s.stateNode,o[l])}function iN(s){for(var o=s.return;o!==null&&(Zb(o)&&vC(s.stateNode,o.stateNode),!Qb(o));)o=o.return}function yd(s){for(var o=s.return;o!==null&&(Zb(o)&&JI(s.stateNode,o.stateNode),!Qb(o));)o=o.return}function Qb(s){return s.tag===5||s.tag===3||s.tag===27}function Zb(s){return s&&s.tag===7&&s.stateNode!==null}function Jb(s){var o=s.type,l=s.memoizedProps,d=s.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":l.autoFocus&&d.focus();break e;case"img":l.src?d.src=l.src:l.srcSet&&(d.srcset=l.srcSet)}}catch(y){vn(s,s.return,y)}}function e0(s,o,l){try{var d=s.stateNode;zI(d,s.type,l,o),d[Os]=o}catch(y){vn(s,s.return,y)}}function lN(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&Ri(s.type)||s.tag===4}function t0(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||lN(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&Ri(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function n0(s,o,l,d){var y=s.tag;if(y===5||y===6)y=s.stateNode,o?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(y,o):(o=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,o.appendChild(y),l=l._reactRootContainer,l!=null||o.onclick!==null||(o.onclick=er)),Qh(s,d),St=!0;else if(y!==4&&(y===27&&(Qh(s,d),d=null,Ri(s.type)&&(l=s.stateNode,o=null)),s=s.child,s!==null))for(n0(s,o,l,d),s=s.sibling;s!==null;)n0(s,o,l,d),s=s.sibling}function Zh(s,o,l,d){var y=s.tag;if(y===5||y===6)y=s.stateNode,o?l.insertBefore(y,o):l.appendChild(y),Qh(s,d),St=!0;else if(y!==4&&(y===27&&(Qh(s,d),d=null,Ri(s.type)&&(l=s.stateNode)),s=s.child,s!==null))for(Zh(s,o,l,d),s=s.sibling;s!==null;)Zh(s,o,l,d),s=s.sibling}function cN(s){var o=s.stateNode,l=s.memoizedProps;try{for(var d=s.type,y=o.attributes;y.length;)o.removeAttributeNode(y[0]);$s(o,d,l),o[Un]=s,o[Os]=l}catch(j){vn(s,s.return,j)}}var Jh=!1,Mr=null;function uN(s){(s.tag===30||(s.subtreeFlags&33554432)!==0)&&(Jh=!0)}var Fo=null;function dN(){var s=Fo;return Fo=null,s}var fr=0;function $c(s,o,l,d,y){return fr=0,fN(s.child,o,l,d,y)}function fN(s,o,l,d,y){for(var j=!1;s!==null;){if(s.tag===5){var I=s.stateNode;if(d!==null){var J=$0(I);d.push(J),J.view&&(j=!0)}else j||$0(I).view&&(j=!0);Jh=!0,dC(I,fr===0?o:o+"_"+fr,l),fr++}else(s.tag!==22||s.memoizedState===null)&&(s.tag===30&&y||fN(s.child,o,l,d,y)&&(j=!0));s=s.sibling}return j}function Go(s,o){for(;s!==null;)s.tag===5?fC(s.stateNode,s.memoizedProps):(s.tag!==22||s.memoizedState===null)&&(s.tag===30&&o||Go(s.child,o)),s=s.sibling}function em(s){if((s.subtreeFlags&18874368)!==0)for(s=s.child;s!==null;){if((s.tag!==22||s.memoizedState===null)&&(em(s),s.tag===30&&(s.flags&18874368)!==0&&s.stateNode.paired)){var o=s.memoizedProps;if(o.name==null||o.name==="auto")throw Error(a(544));var l=o.name;o=Ca(o.default,o.share),o!=="none"&&($c(s,l,o,null,!1)||Go(s.child,!1))}s=s.sibling}}function s0(s,o){if(s.tag===30){var l=s.stateNode,d=s.memoizedProps,y=Na(d,l),j=Ca(d.default,l.paired?d.share:d.enter);j!=="none"?$c(s,y,j,null,!1)?(em(s),l.paired||o||Yc(s,d.onEnter)):Go(s.child,!1):em(s)}else if((s.subtreeFlags&33554432)!==0)for(s=s.child;s!==null;)s0(s,o),s=s.sibling;else em(s)}function r0(s){if(Mr!==null&&Mr.size!==0){var o=Mr;if((s.subtreeFlags&18874368)!==0)for(s=s.child;s!==null;){if(s.tag!==22||s.memoizedState===null){if(s.tag===30&&(s.flags&18874368)!==0){var l=s.memoizedProps,d=l.name;if(d!=null&&d!=="auto"){var y=o.get(d);if(y!==void 0){var j=Ca(l.default,l.share);if(j!=="none"&&($c(s,d,j,null,!1)?(j=s.stateNode,y.paired=j,j.paired=y,Yc(s,l.onShare)):Go(s.child,!1)),o.delete(d),o.size===0)break}}}r0(s)}s=s.sibling}}}function o0(s){if(s.tag===30){var o=s.memoizedProps,l=Na(o,s.stateNode),d=Mr!==null?Mr.get(l):void 0,y=Ca(o.default,d!==void 0?o.share:o.exit);y!=="none"&&($c(s,l,y,null,!1)?d!==void 0?(y=s.stateNode,d.paired=y,y.paired=d,Mr.delete(l),Yc(s,o.onShare)):Yc(s,o.onExit):Go(s.child,!1)),Mr!==null&&r0(s)}else if((s.subtreeFlags&33554432)!==0)for(s=s.child;s!==null;)o0(s),s=s.sibling;else Mr!==null&&r0(s)}function hN(s){for(s=s.child;s!==null;){if(s.tag===30){var o=s.memoizedProps,l=Na(o,s.stateNode);o=Ca(o.default,o.update),s.flags&=-5,o!=="none"&&$c(s,l,o,s.memoizedState=[],!1)}else(s.subtreeFlags&33554432)!==0&&hN(s);s=s.sibling}}function a0(s){if((s.subtreeFlags&18874368)!==0)for(s=s.child;s!==null;){if(s.tag!==22||s.memoizedState===null){if(s.tag===30&&(s.flags&18874368)!==0){var o=s.stateNode;o.paired!==null&&(o.paired=null,Go(s.child,!1))}a0(s)}s=s.sibling}}function tm(s){if(s.tag===30)s.stateNode.paired=null,Go(s.child,!1),a0(s);else if((s.subtreeFlags&33554432)!==0)for(s=s.child;s!==null;)tm(s),s=s.sibling;else a0(s)}function mN(s){for(s=s.child;s!==null;)s.tag===30?Go(s.child,!1):(s.subtreeFlags&33554432)!==0&&mN(s),s=s.sibling}function i0(s,o,l,d,y,j,I){for(var J=!1;o!==null;){if(o.tag===5){var me=o.stateNode;if(j!==null&&fr<j.length){var Ne=j[fr],ze=$0(me);(Ne.view||ze.view)&&(J=!0);var $e;if($e=(s.flags&4)===0)if(ze.clip)$e=!0;else{$e=Ne.rect;var we=ze.rect;$e=$e.y!==we.y||$e.x!==we.x||$e.height!==we.height||$e.width!==we.width}$e&&(s.flags|=4),ze.abs?ze=!Ne.abs:(Ne=Ne.rect,ze=ze.rect,ze=Ne.height!==ze.height||Ne.width!==ze.width),ze&&(s.flags|=32)}else s.flags|=32;(s.flags&4)!==0&&dC(me,fr===0?l:l+"_"+fr,y),J&&(s.flags&4)!==0||(Fo===null&&(Fo=[]),Fo.push(me,fr===0?d:d+"_"+fr,o.memoizedProps)),fr++}else(o.tag!==22||o.memoizedState===null)&&(o.tag===30&&I?s.flags|=o.flags&32:i0(s,o.child,l,d,y,j,I)&&(J=!0));o=o.sibling}return J}function pN(s,o){for(s=s.child;s!==null;){if(s.tag===30){var l=s.memoizedProps,d=s.stateNode,y=Na(l,d),j=Ca(l.default,l.update),I;I=s.memoizedState,s.memoizedState=null,d=s;var J=s.child;fr=0,y=i0(d,J,y,y,j,I,!1),(s.flags&4)!==0&&y&&Yc(s,l.onUpdate)}else(s.subtreeFlags&33554432)!==0&&pN(s);s=s.sibling}}var Cs=!1,mn=!1,qo=!1,l0=!1,gN=typeof WeakSet=="function"?WeakSet:Set,ks=null,Yo=!1,wd=!1,nm=!1,c0=!1;function cI(s,o,l){if(s=s.containerInfo,z0=su,s=yj(s),Xx(s)){if("selectionStart"in s)var d={start:s.selectionStart,end:s.selectionEnd};else e:{d=(d=s.ownerDocument)&&d.defaultView||window;var y=d.getSelection&&d.getSelection();if(y&&y.rangeCount!==0){d=y.anchorNode;var j=y.anchorOffset,I=y.focusNode;y=y.focusOffset;try{d.nodeType,I.nodeType}catch{d=null;break e}var J=0,me=-1,Ne=-1,ze=0,$e=0,we=s,Me=null;t:for(;;){for(var ot;we!==d||j!==0&&we.nodeType!==3||(me=J+j),we!==I||y!==0&&we.nodeType!==3||(Ne=J+y),we.nodeType===3&&(J+=we.nodeValue.length),(ot=we.firstChild)!==null;)Me=we,we=ot;for(;;){if(we===s)break t;if(Me===d&&++ze===j&&(me=J),Me===I&&++$e===y&&(Ne=J),(ot=we.nextSibling)!==null)break;we=Me,Me=we.parentNode}we=ot}d=me===-1||Ne===-1?null:{start:me,end:Ne}}else d=null}d=d||{start:0,end:0}}else d=null;for(I0={focusedElem:s,selectionRange:d},su=!1,l=(l&335544064)===l,ks=o,o=l?9270:1024;ks!==null;){if(s=ks,l&&(d=s.deletions,d!==null))for(j=0;j<d.length;j++)l&&o0(d[j]);if(s.alternate===null&&(s.flags&2)!==0)l&&uN(s),sm(l);else{if(s.tag===22){if(d=s.alternate,s.memoizedState!==null){d!==null&&d.memoizedState===null&&l&&o0(d),sm(l);continue}else if(d!==null&&d.memoizedState!==null){l&&uN(s),sm(l);continue}}d=s.child,(s.subtreeFlags&o)!==0&&d!==null?(d.return=s,ks=d):(l&&hN(s),sm(l))}}Mr=null}function sm(s){for(;ks!==null;){var o=ks,l=s,d=o.alternate,y=o.flags;switch(o.tag){case 0:case 11:case 15:break;case 1:if((y&1024)!==0&&d!==null){l=void 0,y=d.memoizedProps,d=d.memoizedState;var j=o.stateNode;try{var I=Al(o.type,y);l=j.getSnapshotBeforeUpdate(I,d),j.__reactInternalSnapshotBeforeUpdate=l}catch(J){vn(o,o.return,J)}}break;case 3:if((y&1024)!==0){if(d=o.stateNode.containerInfo,l=d.nodeType,l===9)U0(d);else if(l===1)switch(d.nodeName){case"HEAD":case"HTML":case"BODY":U0(d);break;default:d.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:l&&d!==null&&(l=Na(d.memoizedProps,d.stateNode),y=o.memoizedProps,y=Ca(y.default,y.update),y!=="none"&&$c(d,l,y,d.memoizedState=[],!0));break;default:if((y&1024)!==0)throw Error(a(163))}if(d=o.sibling,d!==null){d.return=o.return,ks=d;break}ks=o.return}}function xN(s,o,l){var d=l.flags;switch(l.tag){case 0:case 11:case 15:Ko(s,l),d&4&&vd(5,l);break;case 1:if(Ko(s,l),d&4)if(s=l.stateNode,o===null)try{s.componentDidMount()}catch(I){vn(l,l.return,I)}else{var y=Al(l.type,o.memoizedProps);o=o.memoizedState;try{s.componentDidUpdate(y,o,s.__reactInternalSnapshotBeforeUpdate)}catch(I){vn(l,l.return,I)}}d&64&&oN(l),d&512&&Ho(l,l.return);break;case 3:if(Ko(s,l),d&64&&(s=l.updateQueue,s!==null)){if(o=null,l.child!==null)switch(l.child.tag){case 27:case 5:o=l.child.stateNode;break;case 1:o=l.child.stateNode}try{Kj(s,o)}catch(I){vn(l,l.return,I)}}break;case 27:o===null&&d&4&&cN(l);case 26:case 5:Ko(s,l),o===null&&d&4&&Jb(l),d&512&&Ho(l,l.return);break;case 12:Ko(s,l);break;case 31:Ko(s,l),d&4&&wN(s,l);break;case 13:Ko(s,l),d&4&&jN(s,l),d&64&&(s=l.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(l=wI.bind(null,l),nP(s,l))));break;case 22:if(d=l.memoizedState!==null||Cs,!d){var j=o!==null&&o.memoizedState!==null||mn;o=Cs,y=mn,Cs=d,(mn=j)&&!y?(d=2,(l.subtreeFlags&8772)!==0&&(d|=1),To(s,l,d)):Ko(s,l),Cs=o,mn=y}break;case 30:Ko(s,l),d&512&&Ho(l,l.return);break;case 7:d&512&&Ho(l,l.return);default:Ko(s,l)}}function u0(s,o){for(s=s.child;s!==null;)bN(s,o),s=s.sibling}function bN(s,o){switch(s.tag){case 5:case 26:try{var l=s.stateNode;if(o){var d=l.style;typeof d.setProperty=="function"?d.setProperty("display","none","important"):d.display="none"}else{var y=s.stateNode,j=s.memoizedProps.style,I=j!=null&&j.hasOwnProperty("display")?j.display:null;y.style.display=I==null||typeof I=="boolean"?"":(""+I).trim()}}catch(me){vn(s,s.return,me)}d0(s,o);break;case 6:try{s.stateNode.nodeValue=o?"":s.memoizedProps,St=!0}catch(me){vn(s,s.return,me)}break;case 18:try{var J=s.stateNode;o?uC(J,!0):uC(s.stateNode,!1)}catch(me){vn(s,s.return,me)}break;case 22:case 23:s.memoizedState===null&&u0(s,o);break;default:u0(s,o)}}function d0(s,o){if(s.subtreeFlags&67108864)for(s=s.child;s!==null;){e:{var l=s,d=o;switch(l.tag){case 4:bN(l,d);break e;case 22:l.memoizedState===null&&d0(l,d);break e;default:d0(l,d)}}s=s.sibling}}function vN(s){var o=s.alternate;o!==null&&(s.alternate=null,vN(o)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(o=s.stateNode,o!==null&&vc(o)),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}var Vn=null,hr=!1;function Co(s,o,l){for(l=l.child;l!==null;)yN(s,o,l),l=l.sibling}function yN(s,o,l){if(Ye&&typeof Ye.onCommitFiberUnmount=="function")try{Ye.onCommitFiberUnmount(je,l)}catch{}switch(l.tag){case 26:mn||Ls(l,o),Co(s,o,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&!mn&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:mn||Ls(l,o),yd(l);var d=Vn,y=hr;Ri(l.type)&&(Vn=l.stateNode,hr=!1),Co(s,o,l),NC(l.stateNode,l.type,l.memoizedProps),Vn=d,hr=y;break;case 5:mn||Ls(l,o),yd(l);case 6:if(l.tag===6&&yd(l),d=Vn,y=hr,Vn=null,Co(s,o,l),Vn=d,hr=y,Vn!==null)if(hr)try{(Vn.nodeType===9?Vn.body:Vn.nodeName==="HTML"?Vn.ownerDocument.body:Vn).removeChild(l.stateNode),St=!0}catch(j){vn(l,o,j)}else try{Vn.removeChild(l.stateNode),St=!0}catch(j){vn(l,o,j)}break;case 18:Vn!==null&&(hr?(s=Vn,cC(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,l.stateNode),ru(s)):cC(Vn,l.stateNode));break;case 4:d=Vn,y=hr,Vn=l.stateNode.containerInfo,hr=!0,Co(s,o,l),Vn=d,hr=y;break;case 0:case 11:case 14:case 15:ji(2,l,o),mn||ji(4,l,o),Co(s,o,l);break;case 1:mn||(Ls(l,o),d=l.stateNode,typeof d.componentWillUnmount=="function"&&aN(l,o,d)),Co(s,o,l);break;case 21:Co(s,o,l);break;case 22:mn=(d=mn)||l.memoizedState!==null,Co(s,o,l),mn=d;break;case 30:Ls(l,o),Co(s,o,l);break;case 7:mn||Ls(l,o),Co(s,o,l);break;default:Co(s,o,l)}}function wN(s,o){if(o.memoizedState===null&&(s=o.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{ru(s)}catch(l){vn(o,o.return,l)}}}function jN(s,o){if(o.memoizedState===null&&(s=o.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{ru(s)}catch(l){vn(o,o.return,l)}}function uI(s){switch(s.tag){case 31:case 13:case 19:var o=s.stateNode;return o===null&&(o=s.stateNode=new gN),o;case 22:return s=s.stateNode,o=s._retryCache,o===null&&(o=s._retryCache=new gN),o;default:throw Error(a(435,s.tag))}}function rm(s,o){var l=uI(s);o.forEach(function(d){if(!l.has(d)){l.add(d);var y=jI.bind(null,s,d);d.then(y,y)}})}function sr(s,o,l){var d=o.deletions;if(d!==null)for(var y=0;y<d.length;y++){var j=d[y],I=s,J=o,me=J;e:for(;me!==null;){switch(me.tag){case 27:if(Ri(me.type)){Vn=me.stateNode,hr=!1;break e}break;case 5:Vn=me.stateNode,hr=!1;break e;case 3:case 4:Vn=me.stateNode.containerInfo,hr=!0;break e}me=me.return}if(Vn===null)throw Error(a(160));yN(I,J,j),Vn=null,hr=!1,I=j.alternate,I!==null&&(I.return=null),j.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)SN(o,s,l),o=o.sibling}var ko=null;function SN(s,o,l){var d=s.alternate,y=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(y&4&&(d=s.updateQueue,d=d!==null?d.events:null,d!==null))for(var j=0;j<d.length;j++){var I=d[j];I.ref.impl=I.nextImpl}sr(o,s,l),rr(s),y&4&&(ji(3,s,s.return),vd(3,s),ji(5,s,s.return));break;case 1:sr(o,s,l),rr(s),y&512&&(mn||d===null||Ls(d,d.return)),y&64&&Cs&&(s=s.updateQueue,s!==null&&(o=s.callbacks,o!==null&&(l=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=l===null?o:l.concat(o))));break;case 26:if(j=ko,sr(o,s,l),rr(s),y&512&&(mn||d===null||Ls(d,d.return)),y&4)if(y=d!==null?d.memoizedState:null,l=s.memoizedState,d===null)if(l===null)if(s.stateNode===null)if(Cs)s.stateNode=aC(s.type,s.memoizedProps,o.containerInfo,s);else{e:{o=s.type,l=s.memoizedProps,y=j.ownerDocument||j;t:switch(o){case"title":d=y.getElementsByTagName("title")[0],(!d||d[cl]||d[Un]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=y.createElement(o),y.head.insertBefore(d,y.querySelector("head > title"))),$s(d,o,l),d[Un]=s,qe(d),o=d;break e;case"link":if(j=AC("link","href",y).get(o+(l.href||""))){for(I=0;I<j.length;I++)if(d=j[I],d.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&d.getAttribute("rel")===(l.rel==null?null:l.rel)&&d.getAttribute("title")===(l.title==null?null:l.title)&&d.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){j.splice(I,1);break t}}d=y.createElement(o),$s(d,o,l),y.head.appendChild(d);break;case"meta":if(j=AC("meta","content",y).get(o+(l.content||""))){for(I=0;I<j.length;I++)if(d=j[I],d.getAttribute("content")===(l.content==null?null:""+l.content)&&d.getAttribute("name")===(l.name==null?null:l.name)&&d.getAttribute("property")===(l.property==null?null:l.property)&&d.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&d.getAttribute("charset")===(l.charSet==null?null:l.charSet)){j.splice(I,1);break t}}d=y.createElement(o),$s(d,o,l),y.head.appendChild(d);break;default:throw Error(a(468,o))}d[Un]=s,qe(d),o=d}s.stateNode=o}else Cs||X0(j,s.type,s.stateNode);else s.stateNode=RC(j,l,s.memoizedProps);else y!==l?(y===null?(o=d.stateNode,o===null||mn||o.parentNode.removeChild(o)):y.count--,l===null?Cs||X0(j,s.type,s.stateNode):RC(j,l,s.memoizedProps)):l===null&&s.stateNode!==null&&e0(s,s.memoizedProps,d.memoizedProps);break;case 27:sr(o,s,l),rr(s),y&512&&(mn||d===null||Ls(d,d.return)),d!==null&&y&4&&e0(s,s.memoizedProps,d.memoizedProps);break;case 5:if(j=qo,qo=!1,sr(o,s,l),qo=j,rr(s),y&512&&(mn||d===null||Ls(d,d.return)),s.flags&32){o=s.stateNode;try{Js(o,""),St=!0}catch(ze){vn(s,s.return,ze)}}y&4&&s.stateNode!=null&&(o=s.memoizedProps,e0(s,o,d!==null?d.memoizedProps:o)),y&1024&&(l0=!0);break;case 6:if(sr(o,s,l),rr(s),y&4){if(s.stateNode===null)throw Error(a(162));o=s.memoizedProps,l=s.stateNode;try{l.nodeValue=o,St=!0}catch(ze){vn(s,s.return,ze)}}break;case 3:if(St=!1,vm=null,j=ko,ko=Ad(o.containerInfo),sr(o,s,l),ko=j,rr(s),y&4&&d!==null&&d.memoizedState.isDehydrated)try{ru(o.containerInfo)}catch(ze){vn(s,s.return,ze)}l0&&(l0=!1,NN(s)),St=!1;break;case 4:y=qo,qo=Cs,d=fs(),j=ko,ko=Ad(s.stateNode.containerInfo),sr(o,s,l),rr(s),ko=j,St&&wd&&(nm=!0),St=d,qo=y;break;case 12:sr(o,s,l),rr(s);break;case 31:sr(o,s,l),rr(s),y&4&&(o=s.updateQueue,o!==null&&(s.updateQueue=null,rm(s,o)));break;case 13:sr(o,s,l),rr(s),s.child.flags&8192&&s.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(im=be()),y&4&&(o=s.updateQueue,o!==null&&(s.updateQueue=null,rm(s,o)));break;case 22:j=s.memoizedState!==null,I=d!==null&&d.memoizedState!==null;var J=Cs,me=mn,Ne=qo;Cs=J||j,qo=Ne||j,mn=me||I,sr(o,s,l),mn=me,qo=Ne,Cs=J,rr(s),y&8192&&(o=s.stateNode,o._visibility=j?o._visibility&-2:o._visibility|1,!j||d===null||I||Cs||mn||(o=I||mn,l=Cs,d=mn,Cs=j||Cs,mn=o,Si(s,2),Cs=l,mn=d),!j&&qo||u0(s,j)),y&4&&(o=s.updateQueue,o!==null&&(l=o.retryQueue,l!==null&&(o.retryQueue=null,rm(s,l))));break;case 19:sr(o,s,l),rr(s),y&4&&(o=s.updateQueue,o!==null&&(s.updateQueue=null,rm(s,o)));break;case 30:y&512&&(mn||d===null||Ls(d,d.return)),y=fs(),j=wd,I=(l&335544064)===l,J=s.memoizedProps,wd=I&&Ca(J.default,J.update)!=="none",sr(o,s,l),rr(s),I&&d!==null&&St&&(s.flags|=4),wd=j,St=y;break;case 21:break;case 7:y&512&&(mn||d===null||Ls(d,d.return)),d&&d.stateNode!==null&&(d.stateNode._fragmentFiber=s);default:sr(o,s,l),rr(s)}}function rr(s){var o=s.flags;if(o&2){try{for(var l,d=s.return;d!==null;){if(lN(d)){l=d;break}d=d.return}d=null;for(var y=s.return;y!==null;){if(Zb(y)){var j=y.stateNode;d===null?d=[j]:d.push(j)}if(Qb(y))break;y=y.return}var I=d;if(l==null)throw Error(a(160));switch(l.tag){case 27:var J=l.stateNode,me=t0(s);Zh(s,me,J,I);break;case 5:var Ne=l.stateNode;l.flags&32&&(Js(Ne,""),l.flags&=-33);var ze=t0(s);Zh(s,ze,Ne,I);break;case 3:case 4:var $e=l.stateNode.containerInfo,we=t0(s);n0(s,we,$e,I);break;default:throw Error(a(161))}}catch(Me){vn(s,s.return,Me)}s.flags&=-3}o&4096&&(s.flags&=-4097)}function NN(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var o=s;NN(o),o.tag===5&&o.flags&1024&&(o=o.stateNode,su=!0,o.reset(),su=!1),s=s.sibling}}function Bc(s,o){if(o.subtreeFlags&9270)for(o=o.child;o!==null;)CN(o,s),o=o.sibling;else pN(o)}function CN(s,o){var l=s.alternate;if(l===null)s0(s,!1);else switch(s.tag){case 3:if(c0=Yo=!1,dN(),Bc(o,s),!Yo&&!nm){if(s=Fo,s!==null)for(var d=0;d<s.length;d+=3){l=s[d];var y=s[d+1];fC(l,s[d+2]),l=l.ownerDocument.documentElement,l!==null&&l.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+y+")"})}s=o.containerInfo,s=s.nodeType===9?s.documentElement:s.ownerDocument.documentElement,s!==null&&s.style.viewTransitionName===""&&(s.style.viewTransitionName="none",s.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),s.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),c0=!0}Fo=null;break;case 5:Bc(o,s);break;case 4:d=Yo,Yo=!1,Bc(o,s),Yo&&(nm=!0),Yo=d;break;case 22:s.memoizedState===null&&(l.memoizedState!==null?s0(s,!1):Bc(o,s));break;case 30:d=Yo,y=dN(),Yo=!1,Bc(o,s),Yo&&(s.flags|=4);var j=s.memoizedProps,I=s.stateNode;o=Na(j,I),I=Na(l.memoizedProps,I);var J=Ca(j.default,j.update);J==="none"?o=!1:(j=l.memoizedState,l.memoizedState=null,l=s.child,fr=0,o=i0(s,l,o,I,J,j,!0),fr!==(j===null?0:j.length)&&(s.flags|=32)),(s.flags&4)!==0&&o?(Yc(s,s.memoizedProps.onUpdate),Fo=y):y!==null&&(y.push.apply(y,Fo),Fo=y),Yo=(s.flags&32)!==0?!0:d;break;default:Bc(o,s)}}function Ko(s,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)xN(s,o.alternate,o),o=o.sibling}function Si(s,o){for(s=s.child;s!==null;){var l=s,d=o;switch(l.tag){case 0:case 11:case 14:case 15:ji(4,l,l.return),Si(l,d);break;case 1:Ls(l,l.return);var y=l.stateNode;typeof y.componentWillUnmount=="function"&&aN(l,l.return,y),Si(l,d);break;case 27:(d&2)!==0&&NC(l.stateNode,l.type,l.memoizedProps);case 5:Ls(l,l.return),l.tag!==5&&l.tag!==27||yd(l),Si(l,d);break;case 6:yd(l);break;case 26:Ls(l,l.return),y=l.stateNode,l.memoizedState!==null||y===null||mn||y.parentNode.removeChild(y),Si(l,d);break;case 22:l.memoizedState===null&&Si(l,d);break;case 30:Ls(l,l.return),Si(l,d);break;case 7:Ls(l,l.return);default:Si(l,d)}s=s.sibling}}function To(s,o,l){for(l=(o.subtreeFlags&8772)!==0?l:l&-2,o=o.child;o!==null;){var d=o.alternate,y=s,j=o,I=j.flags,J=(l&1)!==0;switch(j.tag){case 0:case 11:case 15:To(y,j,l),vd(4,j);break;case 1:if(To(y,j,l),d=j,y=d.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(ze){vn(d,d.return,ze)}if(d=j,y=d.updateQueue,y!==null){var me=d.stateNode;try{var Ne=y.shared.hiddenCallbacks;if(Ne!==null)for(y.shared.hiddenCallbacks=null,y=0;y<Ne.length;y++)Yj(Ne[y],me)}catch(ze){vn(d,d.return,ze)}}J&&I&64&&oN(j),Ho(j,j.return);break;case 27:(l&2)!==0&&cN(j);case 5:j.tag!==5&&j.tag!==27||iN(j),To(y,j,l),J&&d===null&&I&4&&Jb(j),Ho(j,j.return);break;case 6:iN(j);break;case 26:me=j.stateNode,j.memoizedState!==null||me===null||Cs||X0(Ad(me.ownerDocument),j.type,me),To(y,j,l),J&&d===null&&I&4&&Jb(j),Ho(j,j.return);break;case 12:To(y,j,l);break;case 31:To(y,j,l),J&&I&4&&wN(y,j);break;case 13:To(y,j,l),J&&I&4&&jN(y,j);break;case 22:j.memoizedState===null&&To(y,j,l),Ho(j,j.return);break;case 30:To(y,j,l),Ho(j,j.return);break;case 7:Ho(j,j.return);default:To(y,j,l)}o=o.sibling}}function f0(s,o){var l=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(l=s.memoizedState.cachePool.pool),s=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(s=o.memoizedState.cachePool.pool),s!==l&&(s!=null&&s.refCount++,l!=null&&ad(l))}function h0(s,o){s=null,o.alternate!==null&&(s=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==s&&(o.refCount++,s!=null&&ad(s))}function ro(s,o,l,d){var y=(l&335544064)===l;if(o.subtreeFlags&(y?10262:10256))for(o=o.child;o!==null;)kN(s,o,l,d),o=o.sibling;else y&&mN(o)}function kN(s,o,l,d){var y=(l&335544064)===l;y&&o.alternate===null&&o.return!==null&&o.return.alternate!==null&&tm(o);var j=o.flags;switch(o.tag){case 0:case 11:case 15:ro(s,o,l,d),j&2048&&vd(9,o);break;case 1:ro(s,o,l,d);break;case 3:ro(s,o,l,d),y&&c0&&(s=s.containerInfo,s=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,s.style.viewTransitionName==="root"&&(s.style.viewTransitionName=""),s=s.ownerDocument.documentElement,s!==null&&s.style.viewTransitionName==="none"&&(s.style.viewTransitionName="")),j&2048&&(j=null,o.alternate!==null&&(j=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==j&&(o.refCount++,j!=null&&ad(j)));break;case 12:if(j&2048){ro(s,o,l,d),j=o.stateNode;try{var I=o.memoizedProps,J=I.id,me=I.onPostCommit;typeof me=="function"&&me(J,o.alternate===null?"mount":"update",j.passiveEffectDuration,-0)}catch(Ne){vn(o,o.return,Ne)}}else ro(s,o,l,d);break;case 31:ro(s,o,l,d);break;case 13:ro(s,o,l,d);break;case 23:break;case 22:I=o.stateNode,J=o.alternate,o.memoizedState!==null?(y&&J!==null&&J.memoizedState===null&&tm(J),I._visibility&2?ro(s,o,l,d):jd(s,o)):(y&&J!==null&&J.memoizedState!==null&&tm(o),I._visibility&2?ro(s,o,l,d):(I._visibility|=2,Vc(s,o,l,d,(o.subtreeFlags&10256)!==0||!1))),j&2048&&f0(J,o);break;case 24:ro(s,o,l,d),j&2048&&h0(o.alternate,o);break;case 30:y&&(j=o.alternate,j!==null&&(Go(j.child,!0),Go(o.child,!0))),ro(s,o,l,d);break;default:ro(s,o,l,d)}}function Vc(s,o,l,d,y){for(y=y&&((o.subtreeFlags&10256)!==0||!1),o=o.child;o!==null;){var j=s,I=o,J=l,me=d,Ne=I.flags;switch(I.tag){case 0:case 11:case 15:Vc(j,I,J,me,y),vd(8,I);break;case 23:break;case 22:var ze=I.stateNode;I.memoizedState!==null?ze._visibility&2?Vc(j,I,J,me,y):jd(j,I):(ze._visibility|=2,Vc(j,I,J,me,y)),y&&Ne&2048&&f0(I.alternate,I);break;case 24:Vc(j,I,J,me,y),y&&Ne&2048&&h0(I.alternate,I);break;default:Vc(j,I,J,me,y)}o=o.sibling}}function jd(s,o){if(o.subtreeFlags&10256)for(o=o.child;o!==null;){var l=s,d=o,y=d.flags;switch(d.tag){case 22:jd(l,d),y&2048&&f0(d.alternate,d);break;case 24:jd(l,d),y&2048&&h0(d.alternate,d);break;default:jd(l,d)}o=o.sibling}}var Ml=8192;function Ol(s,o,l){if(s.subtreeFlags&Ml)for(s=s.child;s!==null;)TN(s,o,l),s=s.sibling}function TN(s,o,l){switch(s.tag){case 26:Ol(s,o,l),s.flags&Ml&&(s.memoizedState!==null?gP(l,ko,s.memoizedState,s.memoizedProps):(s=s.stateNode,(o&335544128)===o&&zC(l,s)));break;case 5:Ol(s,o,l),s.flags&Ml&&(s=s.stateNode,(o&335544128)===o&&zC(l,s));break;case 3:case 4:var d=ko;ko=Ad(s.stateNode.containerInfo),Ol(s,o,l),ko=d;break;case 22:s.memoizedState===null&&(d=s.alternate,d!==null&&d.memoizedState!==null?(d=Ml,Ml=16777216,Ol(s,o,l),Ml=d):Ol(s,o,l));break;case 30:if((s.flags&Ml)!==0&&(d=s.memoizedProps.name,d!=null&&d!=="auto")){var y=s.stateNode;y.paired=null,Mr===null&&(Mr=new Map),Mr.set(d,y)}Ol(s,o,l);break;default:Ol(s,o,l)}}function EN(s){var o=s.alternate;if(o!==null&&(s=o.child,s!==null)){o.child=null;do o=s.sibling,s.sibling=null,s=o;while(s!==null)}}function Sd(s){var o=s.deletions;if((s.flags&16)!==0){if(o!==null)for(var l=0;l<o.length;l++){var d=o[l];ks=d,AN(d,s)}EN(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)RN(s),s=s.sibling}function RN(s){switch(s.tag){case 0:case 11:case 15:Sd(s),s.flags&2048&&ji(9,s,s.return);break;case 3:Sd(s);break;case 12:Sd(s);break;case 22:var o=s.stateNode;s.memoizedState!==null&&o._visibility&2&&(s.return===null||s.return.tag!==13)?(o._visibility&=-3,om(s)):Sd(s);break;default:Sd(s)}}function om(s){var o=s.deletions;if((s.flags&16)!==0){if(o!==null)for(var l=0;l<o.length;l++){var d=o[l];ks=d,AN(d,s)}EN(s)}for(s=s.child;s!==null;){switch(o=s,o.tag){case 0:case 11:case 15:ji(8,o,o.return),om(o);break;case 22:l=o.stateNode,l._visibility&2&&(l._visibility&=-3,om(o));break;default:om(o)}s=s.sibling}}function AN(s,o){for(;ks!==null;){var l=ks;switch(l.tag){case 0:case 11:case 15:ji(8,l,o);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var d=l.memoizedState.cachePool.pool;d!=null&&d.refCount++}break;case 24:ad(l.memoizedState.cache)}if(d=l.child,d!==null)d.return=l,ks=d;else e:for(l=s;ks!==null;){d=ks;var y=d.sibling,j=d.return;if(vN(d),d===l){ks=null;break e}if(y!==null){y.return=j,ks=y;break e}ks=j}}}var dI={getCacheForType:function(s){var o=Is(os),l=o.data.get(s);return l===void 0&&(l=s(),o.data.set(s,l)),l},cacheSignal:function(){return Is(os).controller.signal}},fI=typeof WeakMap=="function"?WeakMap:Map,dn=0,An=null,qt=null,Kt=0,bn=0,Or=null,Ni=!1,Uc=!1,m0=!1,za=0,Wn=0,Ci=0,Dl=0,am=0,Dr=0,Hc=0,Nd=null,mr=null,p0=!1,im=0,MN=0,lm=1/0,cm=null,ki=null,Fn=0,Eo=null,zl=null,Xo=0,g0=0,x0=null,ON=null,Fc=null,Gc=null,qc=null,Cd=0,um=null;function zr(){return(dn&2)!==0&&Kt!==0?Kt&-Kt:ae.T!==null?T0():ds()}function DN(){if(Dr===0)if((Kt&536870912)===0||Vt){var s=fn;fn<<=1,(fn&3932160)===0&&(fn=262144),Dr=s}else Dr=536870912;return s=Ps.current,s!==null&&(s.flags|=32),Dr}function Yc(s,o){if(o!=null){var l=s.stateNode,d=l.ref;d===null&&(d=l.ref=hC(Na(s.memoizedProps,l))),Gc===null&&(Gc=[]),Gc.push(o.bind(null,d))}}function pr(s,o,l){(s===An&&(bn===2||bn===9)||s.cancelPendingCommit!==null)&&(Kc(s,0),Ti(s,Kt,Dr,!1)),un(s,l),((dn&2)===0||s!==An)&&(s===An&&((dn&2)===0&&(Dl|=l),Wn===4&&Ti(s,Kt,Dr,!1)),Wo(s))}function zN(s,o,l){if((dn&6)!==0)throw Error(a(327));var d=!l&&(o&127)===0&&(o&s.expiredLanes)===0||tt(s,o),y=d?pI(s,o):v0(s,o,!0),j=d;do{if(y===0){Uc&&!d&&Ti(s,o,0,!1);break}else{if(l=s.current.alternate,j&&!hI(l)){y=v0(s,o,!1),j=!1;continue}if(y===2){if(j=o,s.errorRecoveryDisabledLanes&j)var I=0;else I=s.pendingLanes&-536870913,I=I!==0?I:I&536870912?536870912:0;if(I!==0){o=I;e:{var J=s;y=Nd;var me=J.current.memoizedState.isDehydrated;if(me&&(Kc(J,I).flags|=256),I=v0(J,I,!1),I!==2&&I!==6){if(m0&&!me){J.errorRecoveryDisabledLanes|=j,Dl|=j,y=4;break e}j=mr,mr=y,j!==null&&(mr===null?mr=j:mr.push.apply(mr,j))}y=I}if(j=!1,y!==2)continue}}if(y===1){Kc(s,0),Ti(s,o,0,!0);break}e:{switch(d=s,j=y,j){case 0:case 1:throw Error(a(345));case 4:if((o&4194048)!==o&&(o&62914560)!==o)break;case 6:Ti(d,o,Dr,!Ni);break e;case 2:mr=null;break;case 3:case 5:break;default:throw Error(a(329))}if((o&62914560)===o&&(y=im+300-be(),10<y)){if(Ti(d,o,Dr,!Ni),ce(d,0,!0)!==0)break e;Xo=o,d.timeoutHandle=L0(IN.bind(null,d,l,mr,cm,p0,o,Dr,Dl,Hc,Ni,j,"Throttled",-0,0),y);break e}IN(d,l,mr,cm,p0,o,Dr,Dl,Hc,Ni,j,null,-0,0)}}break}while(!0);Wo(s)}function IN(s,o,l,d,y,j,I,J,me,Ne,ze,$e,we,Me){s.timeoutHandle=-1;var ot=o.subtreeFlags,mt=(j&335544064)===j;if($e=null,(mt||ot&8192||(ot&16785408)===16785408)&&($e={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:er},Mr=null,TN(o,j,$e),mt&&(ot=$e,mt=s.containerInfo,mt=(mt.nodeType===9?mt:mt.ownerDocument).__reactViewTransition,mt!=null&&(ot.count++,ot.waitingForViewTransition=!0,ot=Dd.bind(ot),mt.finished.then(ot,ot))),ot=(j&62914560)===j?im-be():(j&4194048)===j?MN-be():0,ot=xP($e,ot),ot!==null)){Xo=j,s.cancelPendingCommit=ot(HN.bind(null,s,o,j,l,d,y,I,J,me,Ne,ze,$e,null,we,Me)),Ti(s,j,I,!Ne);return}HN(s,o,j,l,d,y,I,J,me,Ne,ze,$e)}function hI(s){for(var o=s;;){var l=o.tag;if((l===0||l===11||l===15)&&o.flags&16384&&(l=o.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var d=0;d<l.length;d++){var y=l[d],j=y.getSnapshot;y=y.value;try{if(!Rr(j(),y))return!1}catch{return!1}}if(l=o.child,o.subtreeFlags&16384&&l!==null)l.return=o,o=l;else{if(o===s)break;for(;o.sibling===null;){if(o.return===null||o.return===s)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function Ti(s,o,l,d){o=Et(s,o),o&=~am,o&=~Dl,s.suspendedLanes|=o,s.pingedLanes&=~o,d&&(s.warmLanes|=o),d=s.expirationTimes;for(var y=o;0<y;){var j=31-it(y),I=1<<j;d[j]=-1,y&=~I}l!==0&&Jn(s,l,o)}function dm(){return(dn&6)===0?(kd(0),!1):!0}function b0(){if(qt!==null){if(bn===0)var s=qt.return;else s=qt,Ea=wl=null,kb(s),zc=null,cd=0,s=qt;for(;s!==null;)rN(s.alternate,s),s=s.return;qt=null}}function Kc(s,o){var l=s.timeoutHandle;return l!==-1&&(s.timeoutHandle=-1,_I(l)),l=s.cancelPendingCommit,l!==null&&(s.cancelPendingCommit=null,l()),Xo=0,b0(),An=s,qt=l=ka(s.current,null),Kt=o,bn=0,Or=null,Ni=!1,Uc=tt(s,o),m0=!1,Hc=Dr=am=Dl=Ci=Wn=0,mr=Nd=null,p0=!1,za=Et(s,o),vh(),l}function PN(s,o){_t=null,ae.H=Fh,o===Dc||o===Ah?(o=Hj(),bn=3):o===hb?(o=Hj(),bn=4):bn=o===Vb?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,Or=o,qt===null&&(Wn=1,Gh(s,eo(o,s.current)))}function _N(){var s=Ps.current;return s===null?!0:(Kt&4194048)===Kt?qs===null:(Kt&62914560)===Kt||(Kt&536870912)!==0?s===qs:!1}function LN(){var s=ae.H;return ae.H=Fh,s===null?Fh:s}function $N(){var s=ae.A;return ae.A=dI,s}function fm(){Wn=4,Ni||(Kt&4194048)!==Kt&&Ps.current!==null||(Uc=!0),(Ci&134217727)===0&&(Dl&134217727)===0||An===null||Ti(An,Kt,Dr,!1)}function v0(s,o,l){var d=dn;dn|=2;var y=LN(),j=$N();(An!==s||Kt!==o)&&(cm=null,Kc(s,o)),o=!1;var I=Wn;e:do try{if(bn!==0&&qt!==null){var J=qt,me=Or;switch(bn){case 8:b0(),I=6;break e;case 3:case 2:case 9:case 6:Ps.current===null&&(o=!0);var Ne=bn;if(bn=0,Or=null,Xc(s,J,me,Ne),l&&Uc){I=0;break e}break;default:Ne=bn,bn=0,Or=null,Xc(s,J,me,Ne)}}mI(),I=Wn;break}catch(ze){PN(s,ze)}while(!0);return o&&s.shellSuspendCounter++,Ea=wl=null,dn=d,ae.H=y,ae.A=j,qt===null&&(An=null,Kt=0,vh()),I}function mI(){for(;qt!==null;)BN(qt)}function pI(s,o){var l=dn;dn|=2;var d=LN(),y=$N();An!==s||Kt!==o?(cm=null,lm=be()+500,Kc(s,o)):Uc=tt(s,o);e:do try{if(bn!==0&&qt!==null){o=qt;var j=Or;t:switch(bn){case 1:bn=0,Or=null,Xc(s,o,j,1);break;case 2:case 9:if(Vj(j)){bn=0,Or=null,VN(o);break}o=function(){bn!==2&&bn!==9||An!==s||(bn=7),Wo(s)},j.then(o,o);break e;case 3:bn=7;break e;case 4:bn=5;break e;case 7:Vj(j)?(bn=0,Or=null,VN(o)):(bn=0,Or=null,Xc(s,o,j,7));break;case 5:var I=null;switch(qt.tag){case 26:I=qt.memoizedState;case 5:case 27:var J=qt;if(I?OC(I):J.stateNode.complete){bn=0,Or=null;var me=J.sibling;if(me!==null)qt=me;else{var Ne=J.return;Ne!==null?(qt=Ne,hm(Ne)):qt=null}break t}}bn=0,Or=null,Xc(s,o,j,5);break;case 6:bn=0,Or=null,Xc(s,o,j,6);break;case 8:b0(),Wn=6;break e;default:throw Error(a(462))}}gI();break}catch(ze){PN(s,ze)}while(!0);return Ea=wl=null,ae.H=d,ae.A=y,dn=l,qt!==null?0:(An=null,Kt=0,vh(),Wn)}function gI(){for(;qt!==null&&!At();)BN(qt)}function BN(s){var o=nN(s.alternate,s,za);s.memoizedProps=s.pendingProps,o===null?hm(s):qt=o}function VN(s){var o=s,l=o.alternate;switch(o.tag){case 15:case 0:o=XS(l,o,o.pendingProps,o.type,void 0,Kt);break;case 11:o=XS(l,o,o.pendingProps,o.type.render,o.ref,Kt);break;case 5:kb(o);var d=o;d===Ns&&(Vt?(Ch(d),d.tag===5&&d.stateNode!=null&&(Mn=d.stateNode)):(Ch(d),Vt=!0));default:rN(l,o),o=qt=Aj(o,za),o=nN(l,o,za)}s.memoizedProps=s.pendingProps,o===null?hm(s):qt=o}function Xc(s,o,l,d){Ea=wl=null,kb(o),zc=null,cd=0;var y=o.return;try{if(sI(s,y,o,l,Kt)){Wn=1,Gh(s,eo(l,s.current)),qt=null;return}}catch(j){if(y!==null)throw qt=y,j;Wn=1,Gh(s,eo(l,s.current)),qt=null;return}o.flags&32768?(Vt||d===1?s=!0:Uc||(Kt&536870912)!==0?s=!1:(Ni=s=!0,(d===2||d===9||d===3||d===6)&&(d=Ps.current,d!==null&&d.tag===13&&(d.flags|=16384))),UN(o,s)):hm(o)}function hm(s){var o=s;do{if((o.flags&32768)!==0){UN(o,Ni);return}s=o.return;var l=iI(o.alternate,o,za);if(l!==null){qt=l;return}if(o=o.sibling,o!==null){qt=o;return}qt=o=s}while(o!==null);Wn===0&&(Wn=5)}function UN(s,o){do{var l=lI(s.alternate,s);if(l!==null){l.flags&=32767,qt=l;return}if(l=s.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!o&&(s=s.sibling,s!==null)){qt=s;return}qt=s=l}while(s!==null);Wn=6,qt=null}function HN(s,o,l,d,y,j,I,J,me,Ne,ze,$e){s.cancelPendingCommit=null;do mm();while(Fn!==0);if((dn&6)!==0)throw Error(a(327));if(o!==null){if(o===s.current)throw Error(a(177));s===An&&(qt=An=null,Kt=0),zl=o,Eo=s,Xo=l,x0=y,ON=d,xI(s,o,l,I,J,me,$e)}}function xI(s,o,l,d,y,j,I){var J=o.lanes|o.childLanes;if(g0=J,J|=eb,ns(s,l,J,d,y,j),Gc=null,(l&335544064)===l?(qc=Gz(s),d=10262):(qc=null,d=10256),(o.subtreeFlags&d)!==0||(o.flags&d)!==0?(s.callbackNode=null,s.callbackPriority=0,SI(Ke,function(){return S0(),null})):(s.callbackNode=null,s.callbackPriority=0),Jh=!1,d=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||d){d=ae.T,ae.T=null,y=le.p,le.p=2,j=dn,dn|=4;try{cI(s,o,l)}finally{dn=j,le.p=y,ae.T=d}}Fn=1,Jh?Fc=HI(I,s.containerInfo,qc,y0,w0,vI,j0,S0,bI):(y0(),w0(),j0())}function bI(s){if(Fn!==0){var o=Eo.onRecoverableError;o(s,{componentStack:null})}}function vI(){Fn===3&&(Fn=0,CN(zl,Eo),Fn=4)}function y0(){if(Fn===1){Fn=0;var s=Eo,o=zl,l=Xo,d=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||d){d=ae.T,ae.T=null;var y=le.p;le.p=2;var j=dn;dn|=4;try{wd=nm=!1,SN(o,s,l),l=I0;var I=yj(s.containerInfo),J=l.focusedElem,me=l.selectionRange;if(I!==J&&J&&J.ownerDocument&&vj(J.ownerDocument.documentElement,J)){if(me!==null&&Xx(J)){var Ne=me.start,ze=me.end;if(ze===void 0&&(ze=Ne),"selectionStart"in J)J.selectionStart=Ne,J.selectionEnd=Math.min(ze,J.value.length);else{var $e=J.ownerDocument||document,we=$e&&$e.defaultView||window;if(we.getSelection){var Me=we.getSelection(),ot=J.textContent.length,mt=Math.min(me.start,ot),Lt=me.end===void 0?mt:Math.min(me.end,ot);!Me.extend&&mt>Lt&&(I=Lt,Lt=mt,mt=I);var Se=bj(J,mt),xe=bj(J,Lt);if(Se&&xe&&(Me.rangeCount!==1||Me.anchorNode!==Se.node||Me.anchorOffset!==Se.offset||Me.focusNode!==xe.node||Me.focusOffset!==xe.offset)){var Ee=$e.createRange();Ee.setStart(Se.node,Se.offset),Me.removeAllRanges(),mt>Lt?(Me.addRange(Ee),Me.extend(xe.node,xe.offset)):(Ee.setEnd(xe.node,xe.offset),Me.addRange(Ee))}}}}for($e=[],Me=J;Me=Me.parentNode;)Me.nodeType===1&&$e.push({element:Me,left:Me.scrollLeft,top:Me.scrollTop});for(typeof J.focus=="function"&&J.focus(),J=0;J<$e.length;J++){var Le=$e[J];Le.element.scrollLeft=Le.left,Le.element.scrollTop=Le.top}}su=!!z0,I0=z0=null}finally{dn=j,le.p=y,ae.T=d}}s.current=o,Fn=2}}function w0(){if(Fn===2){Fn=0;var s=Eo,o=zl,l=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||l){l=ae.T,ae.T=null;var d=le.p;le.p=2;var y=dn;dn|=4;try{xN(s,o.alternate,o)}finally{dn=y,le.p=d,ae.T=l}}Fn=3}}function j0(){if(Fn===4||Fn===3){Fn=0;var s=Fc;Fc=null,rt();var o=Eo,l=zl,d=Xo,y=ON,j=(d&335544064)===d?10262:10256;if((l.subtreeFlags&j)!==0||(l.flags&j)!==0?Fn=5:(Fn=0,zl=Eo=null,FN(o,o.pendingLanes)),j=o.pendingLanes,j===0&&(ki=null),Fs(d),l=l.stateNode,Ye&&typeof Ye.onCommitFiberRoot=="function")try{Ye.onCommitFiberRoot(je,l,void 0,(l.current.flags&128)===128)}catch{}if(y!==null){l=ae.T,j=le.p,le.p=2,ae.T=null;try{for(var I=o.onRecoverableError,J=0;J<y.length;J++){var me=y[J];I(me.value,{componentStack:me.stack})}}finally{ae.T=l,le.p=j}}if(y=Gc,I=qc,qc=null,y!==null&&(Gc=null,I===null&&(I=[]),s!==null))for(me=0;me<y.length;me++)l=(0,y[me])(I),l!==void 0&&s.finished.finally(l);(Xo&3)!==0&&mm(),Wo(o),j=o.pendingLanes,(d&261930)!==0&&(j&42)!==0?o===um?Cd++:(Cd=0,um=o):(Cd=0,um=null),kd(0)}}function FN(s,o){(s.pooledCacheLanes&=o)===0&&(o=s.pooledCache,o!=null&&(s.pooledCache=null,ad(o)))}function mm(){return Fc!==null&&(Fc.skipTransition(),Fc=null),y0(),w0(),j0(),S0()}function S0(){if(Fn!==5)return!1;var s=Eo,o=g0;g0=0;var l=Fs(Xo),d=ae.T,y=le.p;try{le.p=32>l?32:l,ae.T=null,l=x0,x0=null;var j=Eo,I=Xo;if(Fn=0,zl=Eo=null,Xo=0,(dn&6)!==0)throw Error(a(331));var J=dn;if(dn|=4,RN(j.current),kN(j,j.current,I,l),dn=J,kd(0,!1),Ye&&typeof Ye.onPostCommitFiberRoot=="function")try{Ye.onPostCommitFiberRoot(je,j)}catch{}return!0}finally{le.p=y,ae.T=d,FN(s,o)}}function GN(s,o,l){o=eo(l,o),o=Bb(s.stateNode,o,2),s=bi(s,o,2),s!==null&&(un(s,2),Wo(s))}function vn(s,o,l){if(s.tag===3)GN(s,s,l);else for(;o!==null;){if(o.tag===3){GN(o,s,l);break}else if(o.tag===1){var d=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(ki===null||!ki.has(d))){s=eo(l,s),l=VS(2),d=bi(o,l,2),d!==null&&(US(l,d,o,s),un(d,2),Wo(d));break}}o=o.return}}function N0(s,o,l){var d=s.pingCache;if(d===null){d=s.pingCache=new fI;var y=new Set;d.set(o,y)}else y=d.get(o),y===void 0&&(y=new Set,d.set(o,y));y.has(l)||(m0=!0,y.add(l),s=yI.bind(null,s,o,l),o.then(s,s))}function yI(s,o,l){var d=s.pingCache;d!==null&&d.delete(o),s.pingedLanes|=s.suspendedLanes&l,s.warmLanes&=~l,An===s&&(Kt&l)===l&&((Wn===4||Wn===3&&(Kt&62914560)===Kt&&300>be()-im)&&(dn&2)===0?Kc(s,0):am|=l,Hc===Kt&&(Hc=0)),Wo(s)}function qN(s,o){o===0&&(o=xn()),s=bl(s,o),s!==null&&(un(s,o),Wo(s))}function wI(s){var o=s.memoizedState,l=0;o!==null&&(l=o.retryLane),qN(s,l)}function jI(s,o){var l=0;switch(s.tag){case 31:case 13:var d=s.stateNode,y=s.memoizedState;y!==null&&(l=y.retryLane);break;case 19:d=s.stateNode;break;case 22:d=s.stateNode._retryCache;break;default:throw Error(a(314))}d!==null&&d.delete(o),qN(s,l)}function SI(s,o){return Je(s,o)}var Wc=null,Qc=null,C0=!1,pm=!1,k0=!1,Ei=0;function Wo(s){s!==Qc&&s.next===null&&(Qc===null?Wc=Qc=s:Qc=Qc.next=s),pm=!0,C0||(C0=!0,CI())}function kd(s,o){if(!k0&&pm){k0=!0;do for(var l=!1,d=Wc;d!==null;){if(s!==0){var y=d.pendingLanes;if(y===0)var j=0;else{var I=d.suspendedLanes,J=d.pingedLanes;j=(1<<31-it(42|s)+1)-1,j&=y&~(I&~J),j=j&201326741?j&201326741|1:j?j|2:0}j!==0&&(l=!0,WN(d,j))}else j=Kt,j=ce(d,d===An?j:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),(j&3)===0||tt(d,j)||(l=!0,WN(d,j));d=d.next}while(l);k0=!1}}function NI(){YN()}function YN(){pm=C0=!1;var s=0;Ei!==0&&PI()&&(s=Ei);for(var o=be(),l=null,d=Wc;d!==null;){var y=d.next,j=KN(d,o);j===0?(d.next=null,l===null?Wc=y:l.next=y,y===null&&(Qc=l)):(l=d,(s!==0||(j&3)!==0)&&(pm=!0)),d=y}Fn!==0&&Fn!==5||kd(s),Ei!==0&&(Ei=0)}function KN(s,o){for(var l=s.suspendedLanes,d=s.pingedLanes,y=s.expirationTimes,j=s.pendingLanes&-62914561;0<j;){var I=31-it(j),J=1<<I,me=y[I];me===-1?((J&l)===0||(J&d)!==0)&&(y[I]=rn(J,o)):me<=o&&(s.expiredLanes|=J),j&=~J}if(o=An,l=Kt,l=ce(s,s===o?l:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),d=s.callbackNode,l===0||s===o&&(bn===2||bn===9)||s.cancelPendingCommit!==null)return d!==null&&d!==null&&ct(d),s.callbackNode=null,s.callbackPriority=0;if((l&3)===0||tt(s,l)){if(o=l&-l,o===s.callbackPriority)return o;switch(d!==null&&ct(d),Fs(l)){case 2:case 8:l=xt;break;case 32:l=Ke;break;case 268435456:l=jt;break;default:l=Ke}return d=XN.bind(null,s),l=Je(l,d),s.callbackPriority=o,s.callbackNode=l,o}return d!==null&&d!==null&&ct(d),s.callbackPriority=2,s.callbackNode=null,2}function XN(s,o){if(Fn!==0&&Fn!==5)return s.callbackNode=null,s.callbackPriority=0,null;var l=s.callbackNode;if(mm()&&s.callbackNode!==l)return null;var d=Kt;return d=ce(s,s===An?d:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),d===0?null:(zN(s,d,o),KN(s,be()),s.callbackNode!=null&&s.callbackNode===l?XN.bind(null,s):null)}function WN(s,o){if(mm())return null;zN(s,o,!0)}function CI(){LI(function(){(dn&6)!==0?Je(Qe,NI):YN()})}function T0(){if(Ei===0){var s=Nl;s===0&&(s=Gt,Gt<<=1,(Gt&261888)===0&&(Gt=256)),Ei=s}return Ei}function QN(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:Ds(s)}function kI(s,o,l,d,y){if(o==="submit"&&l&&l.stateNode===y){var j=QN((y[Os]||null).action),I=d.submitter;I&&(o=(o=I[Os]||null)?QN(o.formAction):I.getAttribute("formAction"),o!==null&&(j=o,I=null));var J=new ph("action","action",null,d,y);s.push({event:J,listeners:[{instance:null,listener:function(){if(d.defaultPrevented){if(Ei!==0){var me=new FormData(y,I);Ib(l,{pending:!0,data:me,method:y.method,action:j},null,me)}}else typeof j=="function"&&(J.preventDefault(),me=new FormData(y,I),Ib(l,{pending:!0,data:me,method:y.method,action:j},j,me))},currentTarget:y}]})}}for(var E0=0;E0<Jx.length;E0++){var R0=Jx[E0],TI=R0.toLowerCase(),EI=R0[0].toUpperCase()+R0.slice(1);No(TI,"on"+EI)}No(Sj,"onAnimationEnd"),No(Nj,"onAnimationIteration"),No(Cj,"onAnimationStart"),No("dblclick","onDoubleClick"),No("focusin","onFocus"),No("focusout","onBlur"),No(_z,"onTransitionRun"),No(Lz,"onTransitionStart"),No($z,"onTransitionCancel"),No(kj,"onTransitionEnd"),Nn("onMouseEnter",["mouseout","mouseover"]),Nn("onMouseLeave",["mouseout","mouseover"]),Nn("onPointerEnter",["pointerout","pointerover"]),Nn("onPointerLeave",["pointerout","pointerover"]),Bt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Bt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Bt("onBeforeInput",["compositionend","keypress","textInput","paste"]),Bt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Bt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Bt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Td="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(" "),RI=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Td));function ZN(s,o){o=(o&4)!==0;for(var l=0;l<s.length;l++){var d=s[l],y=d.event;d=d.listeners;e:{var j=void 0;if(o)for(var I=d.length-1;0<=I;I--){var J=d[I],me=J.instance,Ne=J.currentTarget;if(J=J.listener,me!==j&&y.isPropagationStopped())break e;j=J,y.currentTarget=Ne;try{j(y)}catch(ze){bh(ze)}y.currentTarget=null,j=me}else for(I=0;I<d.length;I++){if(J=d[I],me=J.instance,Ne=J.currentTarget,J=J.listener,me!==j&&y.isPropagationStopped())break e;j=J,y.currentTarget=Ne;try{j(y)}catch(ze){bh(ze)}y.currentTarget=null,j=me}}}}function Yt(s,o){var l=o[Gu];l===void 0&&(l=o[Gu]=new Set);var d=s+"__bubble";l.has(d)||(JN(o,s,2,!1),l.add(d))}function A0(s,o,l){var d=0;o&&(d|=4),JN(l,s,d,o)}var gm="_reactListening"+Math.random().toString(36).slice(2);function M0(s){if(!s[gm]){s[gm]=!0,zt.forEach(function(l){l!=="selectionchange"&&(RI.has(l)||A0(l,!1,s),A0(l,!0,s))});var o=s.nodeType===9?s:s.ownerDocument;o===null||o[gm]||(o[gm]=!0,A0("selectionchange",!1,o))}}function JN(s,o,l,d){switch(UC(o)){case 2:var y=wP;break;case 8:y=jP;break;default:y=Q0}l=y.bind(null,o,l,s),y=void 0,!pl||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(y=!0),d?y!==void 0?s.addEventListener(o,l,{capture:!0,passive:y}):s.addEventListener(o,l,!0):y!==void 0?s.addEventListener(o,l,{passive:y}):s.addEventListener(o,l,!1)}function O0(s,o,l,d,y){var j=d;if((o&1)===0&&(o&2)===0&&d!==null)e:for(;;){if(d===null)return;var I=d.tag;if(I===3||I===4){var J=d.stateNode.containerInfo;if(J===y)break;if(I===4)for(I=d.return;I!==null;){var me=I.tag;if((me===3||me===4)&&I.stateNode.containerInfo===y)return;I=I.return}for(;J!==null;){if(I=So(J),I===null)return;if(me=I.tag,me===5||me===6||me===26||me===27){d=j=I;continue e}J=J.parentNode}}d=d.return}ml(function(){var Ne=j,ze=hl(l),$e=[];e:{var we=Tj.get(s);if(we!==void 0){var Me=ph,ot=s;switch(s){case"keypress":if(hh(l)===0)break e;case"keydown":case"keyup":Me=hz;break;case"focusin":ot="focus",Me=Hx;break;case"focusout":ot="blur",Me=Hx;break;case"beforeblur":case"afterblur":Me=Hx;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Me=nj;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Me=tz;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Me=bz;break;case Sj:case Nj:case Cj:Me=rz;break;case kj:Me=yz;break;case"scroll":case"scrollend":Me=JD;break;case"wheel":Me=jz;break;case"copy":case"cut":case"paste":Me=az;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Me=rj;break;case"submit":Me=gz;break;case"toggle":case"beforetoggle":Me=Nz}var mt=(o&4)!==0,Lt=!mt&&(s==="scroll"||s==="scrollend"),Se=mt?we!==null?we+"Capture":null:we;mt=[];for(var xe=Ne,Ee;xe!==null;){var Le=xe;if(Ee=Le.stateNode,Le=Le.tag,Le!==5&&Le!==26&&Le!==27||Ee===null||Se===null||(Le=Sa(xe,Se),Le!=null&&mt.push(Ed(xe,Le,Ee))),Lt)break;xe=xe.return}0<mt.length&&(we=new Me(we,ot,null,l,ze),$e.push({event:we,listeners:mt}))}}if((o&7)===0){e:{if(Me=s==="mouseover"||s==="pointerover",we=s==="mouseout"||s==="pointerout",Me&&l!==fl&&(ot=l.relatedTarget||l.fromElement)&&(So(ot)||ot[Nr]))break e;(we||Me)&&(ot=ze.window===ze?ze:(Me=ze.ownerDocument)?Me.defaultView||Me.parentWindow:window,we?(Me=l.relatedTarget||l.toElement,we=Ne,Me=Me?So(Me):null,Me!==null&&(Lt=c(Me),mt=Me.tag,Me!==Lt||mt!==5&&mt!==27&&mt!==6)&&(Me=null)):(we=null,Me=Ne),we!==Me&&(mt=nj,Le="onMouseLeave",Se="onMouseEnter",xe="mouse",(s==="pointerout"||s==="pointerover")&&(mt=rj,Le="onPointerLeave",Se="onPointerEnter",xe="pointer"),Lt=we==null?ot:De(we),Ee=Me==null?ot:De(Me),ot=new mt(Le,xe+"leave",we,l,ze),ot.target=Lt,ot.relatedTarget=Ee,Le=null,So(ze)===Ne&&(mt=new mt(Se,xe+"enter",Me,l,ze),mt.target=Ee,mt.relatedTarget=Lt,Le=mt),Lt=Le,mt=we&&Me?A(we,Me,AI):null,we!==null&&eC($e,ot,we,mt,!1),Me!==null&&Lt!==null&&eC($e,Lt,Me,mt,!0)))}e:{if(we=Ne?De(Ne):window,Me=we.nodeName&&we.nodeName.toLowerCase(),Me==="select"||Me==="input"&&we.type==="file")var ut=fj;else if(uj(we))if(hj)ut=zz;else{ut=Oz;var Xt=Mz}else Me=we.nodeName,!Me||Me.toLowerCase()!=="input"||we.type!=="checkbox"&&we.type!=="radio"?Ne&&dl(Ne.elementType)&&(ut=fj):ut=Dz;if(ut&&(ut=ut(s,Ne))){dj($e,ut,l,ze);break e}Xt&&Xt(s,we,Ne)}switch(Xt=Ne?De(Ne):window,s){case"focusin":(uj(Xt)||Xt.contentEditable==="true")&&(Cc=Xt,Wx=Ne,sd=null);break;case"focusout":sd=Wx=Cc=null;break;case"mousedown":Qx=!0;break;case"contextmenu":case"mouseup":case"dragend":Qx=!1,wj($e,l,ze);break;case"selectionchange":if(Pz)break;case"keydown":case"keyup":wj($e,l,ze)}var vt;if(Gx)e:{switch(s){case"compositionstart":var Rt="onCompositionStart";break e;case"compositionend":Rt="onCompositionEnd";break e;case"compositionupdate":Rt="onCompositionUpdate";break e}Rt=void 0}else Nc?lj(s,l)&&(Rt="onCompositionEnd"):s==="keydown"&&l.keyCode===229&&(Rt="onCompositionStart");Rt&&(oj&&l.locale!=="ko"&&(Nc||Rt!=="onCompositionStart"?Rt==="onCompositionEnd"&&Nc&&(vt=ej()):(ci=ze,Bx="value"in ci?ci.value:ci.textContent,Nc=!0)),Xt=xm(Ne,Rt),0<Xt.length&&(Rt=new sj(Rt,s,null,l,ze),$e.push({event:Rt,listeners:Xt}),vt?Rt.data=vt:(vt=cj(l),vt!==null&&(Rt.data=vt)))),(vt=kz?Tz(s,l):Ez(s,l))&&(Rt=xm(Ne,"onBeforeInput"),0<Rt.length&&(Xt=new sj("onBeforeInput","beforeinput",null,l,ze),$e.push({event:Xt,listeners:Rt}),Xt.data=vt)),kI($e,s,Ne,l,ze)}ZN($e,o)})}function Ed(s,o,l){return{instance:s,listener:o,currentTarget:l}}function xm(s,o){for(var l=o+"Capture",d=[];s!==null;){var y=s,j=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||j===null||(y=Sa(s,l),y!=null&&d.unshift(Ed(s,y,j)),y=Sa(s,o),y!=null&&d.push(Ed(s,y,j))),s.tag===3)return d;s=s.return}return[]}function AI(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function eC(s,o,l,d,y){for(var j=o._reactName,I=[];l!==null&&l!==d;){var J=l,me=J.alternate,Ne=J.stateNode;if(J=J.tag,me!==null&&me===d)break;J!==5&&J!==26&&J!==27||Ne===null||(me=Ne,y?(Ne=Sa(l,j),Ne!=null&&I.unshift(Ed(l,Ne,me))):y||(Ne=Sa(l,j),Ne!=null&&I.push(Ed(l,Ne,me)))),l=l.return}I.length!==0&&s.push({event:o,listeners:I})}var MI=/\r\n?/g,OI=/\u0000|\uFFFD/g;function tC(s){return(typeof s=="string"?s:""+s).replace(MI,`
50
- `).replace(OI,"")}function nC(s,o){return o=tC(o),tC(s)===o}function yn(s,o,l,d,y,j){switch(l){case"children":if(typeof d=="string")o==="body"||o==="textarea"&&d===""||Js(s,d);else if(typeof d=="number"||typeof d=="bigint")o!=="body"&&Js(s,""+d);else return;break;case"className":Cr(s,"class",d);break;case"tabIndex":Cr(s,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":Cr(s,l,d);break;case"style":Tr(s,d,j);return;case"data":if(o!=="object"){Cr(s,"data",d);break}case"src":case"href":if(d===""&&(o!=="a"||l!=="href")){s.removeAttribute(l);break}if(d==null||typeof d=="function"||typeof d=="symbol"||typeof d=="boolean"){s.removeAttribute(l);break}d=Ds(d),s.setAttribute(l,d);break;case"action":case"formAction":if(typeof d=="function"){s.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof j=="function"&&(l==="formAction"?(o!=="input"&&yn(s,o,"name",y.name,y,null),yn(s,o,"formEncType",y.formEncType,y,null),yn(s,o,"formMethod",y.formMethod,y,null),yn(s,o,"formTarget",y.formTarget,y,null)):(yn(s,o,"encType",y.encType,y,null),yn(s,o,"method",y.method,y,null),yn(s,o,"target",y.target,y,null)));if(d==null||typeof d=="symbol"||typeof d=="boolean"){s.removeAttribute(l);break}d=Ds(d),s.setAttribute(l,d);break;case"onClick":d!=null&&(s.onclick=er);return;case"onScroll":d!=null&&Yt("scroll",s);return;case"onScrollEnd":d!=null&&Yt("scrollend",s);return;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(a(61));if(l=d.__html,l!=null){if(y.children!=null)throw Error(a(60));(j!=null?j.__html:void 0)!==l&&(s.innerHTML=l)}}break;case"multiple":s.multiple=d&&typeof d!="function"&&typeof d!="symbol";break;case"muted":s.muted=d&&typeof d!="function"&&typeof d!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(d==null||typeof d=="function"||typeof d=="boolean"||typeof d=="symbol"){s.removeAttribute("xlink:href");break}l=Ds(d),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":d!=null&&typeof d!="function"&&typeof d!="symbol"?s.setAttribute(l,d):s.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":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":d&&typeof d!="function"&&typeof d!="symbol"?s.setAttribute(l,""):s.removeAttribute(l);break;case"capture":case"download":d===!0?s.setAttribute(l,""):d!==!1&&d!=null&&typeof d!="function"&&typeof d!="symbol"?s.setAttribute(l,d):s.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":d!=null&&typeof d!="function"&&typeof d!="symbol"&&!isNaN(d)&&1<=d?s.setAttribute(l,d):s.removeAttribute(l);break;case"rowSpan":case"start":d==null||typeof d=="function"||typeof d=="symbol"||isNaN(d)?s.removeAttribute(l):s.setAttribute(l,d);break;case"popover":Yt("beforetoggle",s),Yt("toggle",s),Hn(s,"popover",d);break;case"xlinkActuate":ss(s,"http://www.w3.org/1999/xlink","xlink:actuate",d);break;case"xlinkArcrole":ss(s,"http://www.w3.org/1999/xlink","xlink:arcrole",d);break;case"xlinkRole":ss(s,"http://www.w3.org/1999/xlink","xlink:role",d);break;case"xlinkShow":ss(s,"http://www.w3.org/1999/xlink","xlink:show",d);break;case"xlinkTitle":ss(s,"http://www.w3.org/1999/xlink","xlink:title",d);break;case"xlinkType":ss(s,"http://www.w3.org/1999/xlink","xlink:type",d);break;case"xmlBase":ss(s,"http://www.w3.org/XML/1998/namespace","xml:base",d);break;case"xmlLang":ss(s,"http://www.w3.org/XML/1998/namespace","xml:lang",d);break;case"xmlSpace":ss(s,"http://www.w3.org/XML/1998/namespace","xml:space",d);break;case"is":Hn(s,"is",d);break;case"innerText":case"textContent":return;default:if(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")l=Ku.get(l)||l,Hn(s,l,d);else return}St=!0}function D0(s,o,l,d,y,j){switch(l){case"style":Tr(s,d,j);return;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(a(61));if(l=d.__html,l!=null){if(y.children!=null)throw Error(a(60));(j!=null?j.__html:void 0)!==l&&(s.innerHTML=l)}}break;case"children":if(typeof d=="string")Js(s,d);else if(typeof d=="number"||typeof d=="bigint")Js(s,""+d);else return;break;case"onScroll":d!=null&&Yt("scroll",s);return;case"onScrollEnd":d!=null&&Yt("scrollend",s);return;case"onClick":d!=null&&(s.onclick=er);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!Mt.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(y=l.endsWith("Capture"),j=l.slice(2,y?l.length-7:void 0),o=s[Os]||null,o=o!=null?o[l]:null,typeof o=="function"&&s.removeEventListener(j,o,y),typeof d=="function")){typeof o!="function"&&o!==null&&(l in s?s[l]=null:s.hasAttribute(l)&&s.removeAttribute(l)),s.addEventListener(j,d,y);break e}St=!0,l in s?s[l]=d:d===!0?s.setAttribute(l,""):Hn(s,l,d)}return}St=!0}function $s(s,o,l){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Yt("error",s),Yt("load",s);var d=!1,y=!1,j;for(j in l)if(l.hasOwnProperty(j)){var I=l[j];if(I!=null)switch(j){case"src":d=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,o));default:yn(s,o,j,I,l,null)}}y&&yn(s,o,"srcSet",l.srcSet,l,null),d&&yn(s,o,"src",l.src,l,null);return;case"input":Yt("invalid",s);var J=j=I=y=null,me=null,Ne=null;for(d in l)if(l.hasOwnProperty(d)){var ze=l[d];if(ze!=null)switch(d){case"name":y=ze;break;case"type":I=ze;break;case"checked":me=ze;break;case"defaultChecked":Ne=ze;break;case"value":j=ze;break;case"defaultValue":J=ze;break;case"children":case"dangerouslySetInnerHTML":if(ze!=null)throw Error(a(137,o));break;default:yn(s,o,d,ze,l,null)}}ii(s,j,J,me,Ne,I,y,!1);return;case"select":Yt("invalid",s),d=I=j=null;for(y in l)if(l.hasOwnProperty(y)&&(J=l[y],J!=null))switch(y){case"value":j=J;break;case"defaultValue":I=J;break;case"multiple":d=J;default:yn(s,o,y,J,l,null)}o=j,l=I,s.multiple=!!d,o!=null?ur(s,!!d,o,!1):l!=null&&ur(s,!!d,l,!0);return;case"textarea":Yt("invalid",s),j=y=d=null;for(I in l)if(l.hasOwnProperty(I)&&(J=l[I],J!=null))switch(I){case"value":d=J;break;case"defaultValue":y=J;break;case"children":j=J;break;case"dangerouslySetInnerHTML":if(J!=null)throw Error(a(91));break;default:yn(s,o,I,J,l,null)}kr(s,d,y,j);return;case"option":for(me in l)if(l.hasOwnProperty(me)&&(d=l[me],d!=null))switch(me){case"selected":s.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:yn(s,o,me,d,l,null)}return;case"dialog":Yt("beforetoggle",s),Yt("toggle",s),Yt("cancel",s),Yt("close",s);break;case"iframe":case"object":Yt("load",s);break;case"video":case"audio":for(d=0;d<Td.length;d++)Yt(Td[d],s);break;case"image":Yt("error",s),Yt("load",s);break;case"details":Yt("toggle",s);break;case"embed":case"source":case"link":Yt("error",s),Yt("load",s);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Ne in l)if(l.hasOwnProperty(Ne)&&(d=l[Ne],d!=null))switch(Ne){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,o));default:yn(s,o,Ne,d,l,null)}return;default:if(dl(o)){for(ze in l)l.hasOwnProperty(ze)&&(d=l[ze],d!==void 0&&D0(s,o,ze,d,l,void 0));return}}for(J in l)l.hasOwnProperty(J)&&(d=l[J],d!=null&&yn(s,o,J,d,l,null))}var DI={};function zI(s,o,l,d){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,j=null,I=null,J=null,me=null,Ne=null,ze=null;for(Me in l){var $e=l[Me];if(l.hasOwnProperty(Me)&&$e!=null)switch(Me){case"checked":break;case"value":break;case"defaultValue":me=$e;default:d.hasOwnProperty(Me)||yn(s,o,Me,null,d,$e)}}for(var we in d){var Me=d[we];if($e=l[we],d.hasOwnProperty(we)&&(Me!=null||$e!=null))switch(we){case"type":Me!==$e&&(St=!0),j=Me;break;case"name":Me!==$e&&(St=!0),y=Me;break;case"checked":Me!==$e&&(St=!0),Ne=Me;break;case"defaultChecked":Me!==$e&&(St=!0),ze=Me;break;case"value":Me!==$e&&(St=!0),I=Me;break;case"defaultValue":Me!==$e&&(St=!0),J=Me;break;case"children":case"dangerouslySetInnerHTML":if(Me!=null)throw Error(a(137,o));break;default:Me!==$e&&yn(s,o,we,Me,d,$e)}}Gs(s,I,J,me,Ne,ze,j,y);return;case"select":Me=I=J=we=null;for(j in l)if(me=l[j],l.hasOwnProperty(j)&&me!=null)switch(j){case"value":break;case"multiple":Me=me;default:d.hasOwnProperty(j)||yn(s,o,j,null,d,me)}for(y in d)if(j=d[y],me=l[y],d.hasOwnProperty(y)&&(j!=null||me!=null))switch(y){case"value":j!==me&&(St=!0),we=j;break;case"defaultValue":j!==me&&(St=!0),J=j;break;case"multiple":j!==me&&(St=!0),I=j;default:j!==me&&yn(s,o,y,j,d,me)}o=J,l=I,d=Me,we!=null?ur(s,!!l,we,!1):!!d!=!!l&&(o!=null?ur(s,!!l,o,!0):ur(s,!!l,l?[]:"",!1));return;case"textarea":Me=we=null;for(J in l)if(y=l[J],l.hasOwnProperty(J)&&y!=null&&!d.hasOwnProperty(J))switch(J){case"value":break;case"children":break;default:yn(s,o,J,null,d,y)}for(I in d)if(y=d[I],j=l[I],d.hasOwnProperty(I)&&(y!=null||j!=null))switch(I){case"value":y!==j&&(St=!0),we=y;break;case"defaultValue":y!==j&&(St=!0),Me=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(a(91));break;default:y!==j&&yn(s,o,I,y,d,j)}Sc(s,we,Me);return;case"option":for(var ot in l)if(we=l[ot],l.hasOwnProperty(ot)&&we!=null&&!d.hasOwnProperty(ot))switch(ot){case"selected":s.selected=!1;break;default:yn(s,o,ot,null,d,we)}for(me in d)if(we=d[me],Me=l[me],d.hasOwnProperty(me)&&we!==Me&&(we!=null||Me!=null))switch(me){case"selected":we!==Me&&(St=!0),s.selected=we&&typeof we!="function"&&typeof we!="symbol";break;default:yn(s,o,me,we,d,Me)}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 mt in l)we=l[mt],l.hasOwnProperty(mt)&&we!=null&&!d.hasOwnProperty(mt)&&yn(s,o,mt,null,d,we);for(Ne in d)if(we=d[Ne],Me=l[Ne],d.hasOwnProperty(Ne)&&we!==Me&&(we!=null||Me!=null))switch(Ne){case"children":case"dangerouslySetInnerHTML":if(we!=null)throw Error(a(137,o));break;default:yn(s,o,Ne,we,d,Me)}return;default:if(dl(o)){for(var Lt in l)we=l[Lt],l.hasOwnProperty(Lt)&&we!==void 0&&!d.hasOwnProperty(Lt)&&D0(s,o,Lt,void 0,d,we);for(ze in d)we=d[ze],Me=l[ze],!d.hasOwnProperty(ze)||we===Me||we===void 0&&Me===void 0||D0(s,o,ze,we,d,Me);return}}for(var Se in l)we=l[Se],l.hasOwnProperty(Se)&&we!=null&&!d.hasOwnProperty(Se)&&yn(s,o,Se,null,d,we);for($e in d)we=d[$e],Me=l[$e],!d.hasOwnProperty($e)||we===Me||we==null&&Me==null||yn(s,o,$e,we,d,Me)}function sC(s){switch(s){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function II(){if(typeof performance.getEntriesByType=="function"){for(var s=0,o=0,l=performance.getEntriesByType("resource"),d=0;d<l.length;d++){var y=l[d],j=y.transferSize,I=y.initiatorType,J=y.duration;if(j&&J&&sC(I)){for(I=0,J=y.responseEnd,d+=1;d<l.length;d++){var me=l[d],Ne=me.startTime;if(Ne>J)break;var ze=me.transferSize,$e=me.initiatorType;ze&&sC($e)&&(me=me.responseEnd,I+=ze*(me<J?1:(J-Ne)/(me-Ne)))}if(--d,o+=8*(j+I)/(y.duration/1e3),s++,10<s)break}}if(0<s)return o/s/1e6}return navigator.connection&&(s=navigator.connection.downlink,typeof s=="number")?s:5}var z0=null,I0=null;function Rd(s){return s.nodeType===9?s:s.ownerDocument}function rC(s){switch(s){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function oC(s,o){if(s===0)switch(o){case"svg":return 1;case"math":return 2;default:return 0}return s===1&&o==="foreignObject"?0:s}function aC(s,o,l,d){return l=Rd(l).createElement(s),l[Un]=d,l[Os]=o,$s(l,s,o),qe(l),l}function P0(s,o){return s==="textarea"||s==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.children=="bigint"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var _0=null;function PI(){var s=window.event;return s&&s.type==="popstate"?s===_0?!1:(_0=s,!0):(_0=null,!1)}var L0=typeof setTimeout=="function"?setTimeout:void 0,_I=typeof clearTimeout=="function"?clearTimeout:void 0,iC=typeof Promise=="function"?Promise:void 0,lC=typeof requestAnimationFrame=="function"?requestAnimationFrame:L0,LI=typeof queueMicrotask=="function"?queueMicrotask:typeof iC<"u"?function(s){return iC.resolve(null).then(s).catch($I)}:L0;function $I(s){setTimeout(function(){throw s})}function Ri(s){return s==="head"}function cC(s,o){var l=o,d=0;do{var y=l.nextSibling;if(s.removeChild(l),y&&y.nodeType===8)if(l=y.data,l==="/$"||l==="/&"){if(d===0){s.removeChild(y),ru(o);return}d--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")d++;else if(l==="html")q0(s.ownerDocument.documentElement);else if(l==="head"){l=s.ownerDocument.head,q0(l);for(var j=l.firstChild;j;){var I=j.nextSibling,J=j.nodeName;j[cl]||J==="SCRIPT"||J==="STYLE"||J==="LINK"&&j.rel.toLowerCase()==="stylesheet"||l.removeChild(j),j=I}}else l==="body"&&q0(s.ownerDocument.body);l=y}while(l);ru(o)}function uC(s,o){var l=s;s=0;do{var d=l.nextSibling;if(l.nodeType===1?o?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(o?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),d&&d.nodeType===8)if(l=d.data,l==="/$"){if(s===0)break;s--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||s++;l=d}while(l)}function dC(s,o,l){if(o=CSS.escape(o)!==o?"r-"+btoa(o).replace(/=/g,""):o,s.style.viewTransitionName=o,l!=null&&(s.style.viewTransitionClass=l),l=getComputedStyle(s),l.display==="inline"){if(o=s.getClientRects(),o.length===1)var d=1;else for(var y=d=0;y<o.length;y++){var j=o[y];0<j.width&&0<j.height&&d++}d===1&&(s=s.style,s.display=o.length===1?"inline-block":"block",s.marginTop="-"+l.paddingTop,s.marginBottom="-"+l.paddingBottom)}}function fC(s,o){s=s.style,o=o.style;var l=o!=null?o.hasOwnProperty("viewTransitionName")?o.viewTransitionName:o.hasOwnProperty("view-transition-name")?o["view-transition-name"]:null:null;s.viewTransitionName=l==null||typeof l=="boolean"?"":(""+l).trim(),l=o!=null?o.hasOwnProperty("viewTransitionClass")?o.viewTransitionClass:o.hasOwnProperty("view-transition-class")?o["view-transition-class"]:null:null,s.viewTransitionClass=l==null||typeof l=="boolean"?"":(""+l).trim(),s.display==="inline-block"&&(o==null?s.display=s.margin="":(l=o.display,s.display=l==null||typeof l=="boolean"?"":l,l=o.margin,l!=null?s.margin=l:(l=o.hasOwnProperty("marginTop")?o.marginTop:o["margin-top"],s.marginTop=l==null||typeof l=="boolean"?"":l,o=o.hasOwnProperty("marginBottom")?o.marginBottom:o["margin-bottom"],s.marginBottom=o==null||typeof o=="boolean"?"":o)))}function BI(s,o,l){return l=l.ownerDocument.defaultView,{rect:s,abs:o.position==="absolute"||o.position==="fixed",clip:o.clipPath!=="none"||o.overflow!=="visible"||o.filter!=="none"||o.mask!=="none"||o.mask!=="none"||o.borderRadius!=="0px",view:0<=s.bottom&&0<=s.right&&s.top<=l.innerHeight&&s.left<=l.innerWidth}}function $0(s){var o=s.getBoundingClientRect(),l=getComputedStyle(s);return BI(o,l,s)}function VI(s){return s.documentElement.clientHeight}function UI(s){this.addEventListener("load",s),this.addEventListener("error",s)}function HI(s,o,l,d,y,j,I,J,me){var Ne=o.nodeType===9?o:o.ownerDocument;try{var ze=Ne.startViewTransition({update:function(){var we=Ne.defaultView,Me=we.navigation&&we.navigation.transition,ot=Ne.fonts.status;d();var mt=[];if(ot==="loaded"&&(VI(Ne),Ne.fonts.status==="loading"&&mt.push(Ne.fonts.ready)),ot=mt.length,s!==null)for(var Lt=s.suspenseyImages,Se=0,xe=0;xe<Lt.length;xe++){var Ee=Lt[xe];if(!Ee.complete){var Le=Ee.getBoundingClientRect();if(0<Le.bottom&&0<Le.right&&Le.top<we.innerHeight&&Le.left<we.innerWidth){if(Se+=DC(Ee),Se>ym){mt.length=ot;break}Ee=new Promise(UI.bind(Ee)),mt.push(Ee)}}}if(0<mt.length)return we=Promise.race([Promise.all(mt),new Promise(function(ut){return setTimeout(ut,500)})]).then(y,y),(Me?Promise.allSettled([Me.finished,we]):we).then(j,j);if(y(),Me)return Me.finished.then(j,j);j()},types:l});Ne.__reactViewTransition=ze;var $e=[];return ze.ready.then(function(){for(var we=Ne.documentElement.getAnimations({subtree:!0}),Me=0;Me<we.length;Me++){var ot=we[Me],mt=ot.effect,Lt=mt.pseudoElement;if(Lt!=null&&Lt.startsWith("::view-transition")){$e.push(ot),ot=mt.getKeyframes();for(var Se=Lt=void 0,xe=!0,Ee=0;Ee<ot.length;Ee++){var Le=ot[Ee],ut=Le.width;if(Lt===void 0)Lt=ut;else if(Lt!==ut){xe=!1;break}if(ut=Le.height,Se===void 0)Se=ut;else if(Se!==ut){xe=!1;break}delete Le.width,delete Le.height,Le.transform==="none"&&delete Le.transform}xe&&Lt!==void 0&&Se!==void 0&&(mt.setKeyframes(ot),xe=getComputedStyle(mt.target,mt.pseudoElement),xe.width!==Lt||xe.height!==Se)&&(xe=ot[0],xe.width=Lt,xe.height=Se,xe=ot[ot.length-1],xe.width=Lt,xe.height=Se,mt.setKeyframes(ot))}}I()},function(we){Ne.__reactViewTransition===ze&&(Ne.__reactViewTransition=null);try{if(typeof we=="object"&&we!==null)switch(we.name){case"InvalidStateError":(we.message==="View transition was skipped because document visibility state is hidden."||we.message==="Skipping view transition because document visibility state has become hidden."||we.message==="Skipping view transition because viewport size changed."||we.message==="Transition was aborted because of invalid state")&&(we=null)}we!==null&&me(we)}finally{d(),y(),I()}}),ze.finished.finally(function(){for(var we=0;we<$e.length;we++)$e[we].cancel();Ne.__reactViewTransition===ze&&(Ne.__reactViewTransition=null),J()}),ze}catch{return d(),y(),I(),null}}function Il(s,o){this._scope=document.documentElement,this._selector="::view-transition-"+s+"("+o+")"}Il.prototype.animate=function(s,o){return o=typeof o=="number"?{duration:o}:k({},o),o.pseudoElement=this._selector,this._scope.animate(s,o)},Il.prototype.getAnimations=function(){for(var s=this._scope,o=this._selector,l=s.getAnimations({subtree:!0}),d=[],y=0;y<l.length;y++){var j=l[y].effect;j!==null&&j.target===s&&j.pseudoElement===o&&d.push(l[y])}return d},Il.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function hC(s){return{name:s,group:new Il("group",s),imagePair:new Il("image-pair",s),old:new Il("old",s),new:new Il("new",s)}}function Ir(s){this._fragmentFiber=s,this._observers=this._eventListeners=null}Ir.prototype.addEventListener=function(s,o,l){var d=null,y=null;if(!(l!=null&&typeof l!="boolean"&&(d=l.signal||null,d!==null&&d.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var j=this._eventListeners;if(pC(j,s,o,l)===-1){var I=this,J=o;l!=null&&typeof l!="boolean"&&l.once===!0&&(J=function(me){I.removeEventListener(s,o,l),typeof o=="function"?o.call(this,me):o.handleEvent(me)}),d!==null&&(y=I.removeEventListener.bind(I,s,o,l),d.addEventListener("abort",y,{once:!0}),y=d.removeEventListener.bind(d,"abort",y)),d=Zc(l),j.push({type:s,listener:o,optionsOrUseCapture:l,attachedListener:J,cleanup:y}),p(this._fragmentFiber.child,!1,FI,s,J,d)}this._eventListeners=j}};function FI(s,o,l,d){return S(s).addEventListener(o,l,d),!1}Ir.prototype.removeEventListener=function(s,o,l){var d=this._eventListeners;if(d!==null&&(o=pC(d,s,o,l),o!==-1)){var y=d[o];l=y.attachedListener;var j=y.cleanup;y=Zc(y.optionsOrUseCapture),p(this._fragmentFiber.child,!1,GI,s,l,y),d.splice(o,1),j!==null&&j()}};function GI(s,o,l,d){return S(s).removeEventListener(o,l,d),!1}function Zc(s){return s!=null&&typeof s!="boolean"&&(s.once===!0||s.signal instanceof AbortSignal)?{capture:s.capture,passive:s.passive}:s}function mC(s){return s==null?"c=0":typeof s=="boolean"?"c="+(s?"1":"0"):"c="+(s.capture?"1":"0")}function pC(s,o,l,d){if(s.length===0)return-1;d=mC(d);for(var y=0;y<s.length;y++){var j=s[y];if(j.type===o&&j.listener===l&&mC(j.optionsOrUseCapture)===d)return y}return-1}Ir.prototype.dispatchEvent=function(s){var o=b(this._fragmentFiber);if(o===null)return!0;o=S(o);var l=this._eventListeners;if(l!==null&&0<l.length||!s.bubbles){var d=o.nodeType===9?o.createComment(""):document.createTextNode("");if(l)for(var y=0;y<l.length;y++){var j=l[y];d.addEventListener(j.type,j.attachedListener,Zc(j.optionsOrUseCapture))}if(o.appendChild(d),s=d.dispatchEvent(s),l)for(y=0;y<l.length;y++)j=l[y],d.removeEventListener(j.type,j.attachedListener,Zc(j.optionsOrUseCapture));return o.removeChild(d),s}return o.dispatchEvent(s)},Ir.prototype.focus=function(s){p(this._fragmentFiber.child,!0,gC,s,void 0,void 0)};function gC(s,o){return s.tag===6?!1:(s=S(s),sP(s,o))}Ir.prototype.focusLast=function(s){var o=[];p(this._fragmentFiber.child,!0,B0,o,void 0,void 0);for(var l=o.length-1;0<=l&&!gC(o[l],s);l--);};function B0(s,o){return o.push(s),!1}Ir.prototype.blur=function(){var s=b(this._fragmentFiber);s!==null&&(s=S(s),s=Rd(s).activeElement,s!==null&&p(this._fragmentFiber.child,!1,qI,s,void 0,void 0))};function qI(s,o){return s.tag===6?!1:(s=S(s),s===o||s.contains(o)?(o.blur(),!0):!1)}Ir.prototype.observeUsing=function(s){this._observers===null&&(this._observers=new Set),this._observers.add(s),p(this._fragmentFiber.child,!1,YI,s,void 0,void 0)};function YI(s,o){return s.tag===6||(s=S(s),o.observe(s)),!1}Ir.prototype.unobserveUsing=function(s){var o=this._observers;if(o!==null&&o.has(s)){o.delete(s),p(this._fragmentFiber.child,!1,KI,s,void 0,void 0);for(var l=o=0;l<Ro.length;l++){var d=Ro[l];d.fragmentInstance===this&&d.observer===s?s.unobserve(d.instance):Ro[o++]=d}Ro.length=o}};function KI(s,o){return s.tag===6||(s=S(s),o.unobserve(s)),!1}var Ro=[],V0=!1;function XI(s,o,l){Ro.push({fragmentInstance:s,observer:o,instance:l}),V0||(V0=!0,rP(function(){V0=!1;var d=Ro;Ro=[];for(var y=0;y<d.length;y++){var j=d[y];j.observer.unobserve(j.instance)}}))}Ir.prototype.getClientRects=function(){var s=[];return p(this._fragmentFiber.child,!1,WI,s,void 0,void 0),s};function WI(s,o){if(s.tag===6){s=s.stateNode;var l=s.ownerDocument.createRange();l.selectNodeContents(s),o.push.apply(o,l.getClientRects())}else s=S(s),o.push.apply(o,s.getClientRects());return!1}Ir.prototype.getRootNode=function(s){var o=b(this._fragmentFiber);return o===null?this:S(o).getRootNode(s)},Ir.prototype.compareDocumentPosition=function(s){var o=b(this._fragmentFiber);if(o===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var l=[];p(this._fragmentFiber.child,!1,B0,l,void 0,void 0);var d=S(o);if(l.length===0){if(l=d,v(this._fragmentFiber)){e:{for(o=this._fragmentFiber.return;o!==null;){if(o.tag===4){o=o.stateNode.containerInfo;break e}if(o.tag===3||o.tag===5||o.tag===27)break;o=o.return}o=null}o!=null&&(l=o)}o=this._fragmentFiber;var y=d=l.compareDocumentPosition(s);return l===s?y=Node.DOCUMENT_POSITION_CONTAINS:d&Node.DOCUMENT_POSITION_CONTAINED_BY&&(l=w(o)[1],l===null?y=Node.DOCUMENT_POSITION_PRECEDING:(s=S(l).compareDocumentPosition(s),y=s===0||s&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),y|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}o=S(l[0]),y=S(l[l.length-1]);var j=v(this._fragmentFiber)?o.parentElement:d;if(j==null)return Node.DOCUMENT_POSITION_DISCONNECTED;d=j.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_CONTAINED_BY,j=j.compareDocumentPosition(y)&Node.DOCUMENT_POSITION_CONTAINED_BY;var I=o.compareDocumentPosition(s),J=y.compareDocumentPosition(s),me=I&Node.DOCUMENT_POSITION_CONTAINED_BY||J&Node.DOCUMENT_POSITION_CONTAINED_BY;return J=d&&j&&I&Node.DOCUMENT_POSITION_FOLLOWING&&J&Node.DOCUMENT_POSITION_PRECEDING,o=d&&o===s||j&&y===s||me||J?Node.DOCUMENT_POSITION_CONTAINED_BY:!d&&o===s||!j&&y===s?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:I,o&Node.DOCUMENT_POSITION_DISCONNECTED||o&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||QI(o,this._fragmentFiber,l[0],l[l.length-1],s)?o:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function QI(s,o,l,d,y){var j=So(y);if(s&Node.DOCUMENT_POSITION_CONTAINED_BY){if(l=!!j)e:{for(;j!==null;){if(j.tag===7&&(j===o||j.alternate===o)){l=!0;break e}j=j.return}l=!1}return l}if(s&Node.DOCUMENT_POSITION_CONTAINS){if(j===null)return j=y.ownerDocument,y===j||y===j.documentElement||y===j.body;e:{for(j=o,o=b(o);j!==null;){if(!(j.tag!==5&&j.tag!==3&&j.tag!==27||j!==o&&j.alternate!==o)){j=!0;break e}j=j.return}j=!1}return j}return s&Node.DOCUMENT_POSITION_PRECEDING?((o=!!j)&&!(o=j===l)&&(o=A(l,j,M),o===null?o=!1:(p(o,!0,T,j,l),j=N,N=null,o=j!==null)),o):s&Node.DOCUMENT_POSITION_FOLLOWING?((o=!!j)&&!(o=j===d)&&(o=A(d,j,M),o===null?o=!1:(p(o,!0,R,j,d),j=N,E=N=null,o=j!==null)),o):!1}function xC(s,o){var l=s.ownerDocument.createRange();l.selectNodeContents(s),s=l.getBoundingClientRect(),window.scrollTo(window.scrollX+s.left,o?window.scrollY+s.top:window.scrollY+s.bottom-window.innerHeight)}Ir.prototype.scrollIntoView=function(s){if(typeof s=="object")throw Error(a(566));var o=[];p(this._fragmentFiber.child,!1,B0,o,void 0,void 0);var l=s!==!1;if(o.length===0){var d=w(this._fragmentFiber);if(d=l?d[1]||d[0]||b(this._fragmentFiber):d[0]||d[1],d===null)return;if(d.tag===6){s=S(d),xC(s,l);return}if(d=S(d),d.nodeType!==9){if(d.nodeType===11){l="host"in d?d.host:null,l!==null&&l.scrollIntoView(s);return}d.scrollIntoView(s)}}for(d=l?o.length-1:0;d!==(l?-1:o.length);){var y=o[d];y.tag===6?(y=S(y),xC(y,l)):S(y).scrollIntoView(s),d+=l?-1:1}};function ZI(s,o){return s=S(s),bC(s,o),!1}function bC(s,o){s.reactFragments==null&&(s.reactFragments=new Set),s.reactFragments.add(o)}function vC(s,o){var l=o._eventListeners;if(l!==null)for(var d=0;d<l.length;d++){var y=l[d];s.addEventListener(y.type,y.attachedListener,Zc(y.optionsOrUseCapture))}s.nodeType!==3&&(l=o._observers,l!==null&&l.forEach(function(j){for(var I=0,J=0;J<Ro.length;J++){var me=Ro[J];(me.fragmentInstance!==o||me.observer!==j||me.instance!==s)&&(Ro[I++]=me)}Ro.length=I,j.observe(s)}),bC(s,o))}function JI(s,o){var l=o._eventListeners;if(l!==null)for(var d=0;d<l.length;d++){var y=l[d];s.removeEventListener(y.type,y.attachedListener,Zc(y.optionsOrUseCapture))}s.nodeType!==3&&(l=o._observers,l!==null&&l.forEach(function(j){typeof j.rootMargin=="string"?XI(o,j,s):j.unobserve(s)}),s.reactFragments!=null&&s.reactFragments.delete(o))}function U0(s){var o=s.firstChild;for(o&&o.nodeType===10&&(o=o.nextSibling);o;){var l=o;switch(o=o.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":U0(l),vc(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}s.removeChild(l)}}function eP(s,o,l,d){for(;s.nodeType===1;){var y=l;if(s.nodeName.toLowerCase()!==o.toLowerCase()){if(!d&&(s.nodeName!=="INPUT"||s.type!=="hidden"))break}else if(d){if(!s[cl])switch(o){case"meta":if(!s.hasAttribute("itemprop"))break;return s;case"link":if(j=s.getAttribute("rel"),j==="stylesheet"&&s.hasAttribute("data-precedence"))break;if(j!==y.rel||s.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||s.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||s.getAttribute("title")!==(y.title==null?null:y.title))break;return s;case"style":if(s.hasAttribute("data-precedence"))break;return s;case"script":if(j=s.getAttribute("src"),(j!==(y.src==null?null:y.src)||s.getAttribute("type")!==(y.type==null?null:y.type)||s.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&j&&s.hasAttribute("async")&&!s.hasAttribute("itemprop"))break;return s;default:return s}}else if(o==="input"&&s.type==="hidden"){var j=y.name==null?null:""+y.name;if(y.type==="hidden"&&s.getAttribute("name")===j)return s}else return s;if(s=oo(s.nextSibling),s===null)break}return null}function tP(s,o,l){if(o==="")return null;for(;s.nodeType!==3;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!l||(s=oo(s.nextSibling),s===null))return null;return s}function yC(s,o){for(;s.nodeType!==8;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!o||(s=oo(s.nextSibling),s===null))return null;return s}function H0(s){return s.data==="$?"||s.data==="$~"}function F0(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function nP(s,o){var l=s.ownerDocument;if(s.data==="$~")s._reactRetry=o;else if(s.data!=="$?"||l.readyState!=="loading")o();else{var d=function(){o(),l.removeEventListener("DOMContentLoaded",d)};l.addEventListener("DOMContentLoaded",d),s._reactRetry=d}}function oo(s){for(;s!=null;s=s.nextSibling){var o=s.nodeType;if(o===1||o===3)break;if(o===8){if(o=s.data,o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"||o==="F!"||o==="F")break;if(o==="/$"||o==="/&")return null}}return s}var G0=null;function wC(s){s=s.nextSibling;for(var o=0;s;){if(s.nodeType===8){var l=s.data;if(l==="/$"||l==="/&"){if(o===0)return oo(s.nextSibling);o--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||o++}s=s.nextSibling}return null}function jC(s){s=s.previousSibling;for(var o=0;s;){if(s.nodeType===8){var l=s.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(o===0)return s;o--}else l!=="/$"&&l!=="/&"||o++}s=s.previousSibling}return null}function sP(s,o){function l(){d=!0}if(s.ownerDocument.activeElement===s)return!0;var d=!1;try{s.ownerDocument.addEventListener("focus",l,!0),(s.focus||HTMLElement.prototype.focus).call(s,o)}finally{s.ownerDocument.removeEventListener("focus",l,!0)}return d}function rP(s){lC(function(){lC(function(o){return s(o)})})}function SC(s,o,l){switch(o=Rd(l),s){case"html":if(s=o.documentElement,!s)throw Error(a(452));return s;case"head":if(s=o.head,!s)throw Error(a(453));return s;case"body":if(s=o.body,!s)throw Error(a(454));return s;default:throw Error(a(451))}}function NC(s,o,l){for(var d in l){var y=l[d];l.hasOwnProperty(d)&&y!=null&&yn(s,o,d,null,DI,y)}l.dangerouslySetInnerHTML!=null&&(s.textContent=""),s.onclick===er&&(s.onclick=null),vc(s)}function q0(s){for(var o=s.attributes;o.length;)s.removeAttributeNode(o[0]);vc(s)}var ao=new Map,CC=new Set;function Ad(s){if(typeof s.getRootNode=="function"){var o=s.getRootNode();if(o.nodeType===9||o.nodeType===11)return o}return s.nodeType===9?s:s.ownerDocument}var Ia=le.d;le.d={f:oP,r:aP,D:iP,C:lP,L:cP,m:uP,X:fP,S:dP,M:hP};function oP(){var s=Ia.f(),o=dm();return s||o}function aP(s){var o=ul(s);o!==null&&o.tag===5&&o.type==="form"?TS(o):Ia.r(s)}var Jc=typeof document>"u"?null:document;function kC(s,o,l){var d=Jc;if(d&&typeof o=="string"&&o){var y=_n(o);y='link[rel="'+s+'"][href="'+y+'"]',typeof l=="string"&&(y+='[crossorigin="'+l+'"]'),CC.has(y)||(CC.add(y),s={rel:s,crossOrigin:l,href:o},d.querySelector(y)===null&&(o=d.createElement("link"),$s(o,"link",s),qe(o),d.head.appendChild(o)))}}function iP(s){Ia.D(s),kC("dns-prefetch",s,null)}function lP(s,o){Ia.C(s,o),kC("preconnect",s,o)}function cP(s,o,l){Ia.L(s,o,l);var d=Jc;if(d&&s&&o){var y='link[rel="preload"][as="'+_n(o)+'"]';o==="image"&&l&&l.imageSrcSet?(y+='[imagesrcset="'+_n(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(y+='[imagesizes="'+_n(l.imageSizes)+'"]')):y+='[href="'+_n(s)+'"]';var j=y;switch(o){case"style":j=eu(s);break;case"script":j=tu(s)}if(!(ao.has(j)||(s=k({rel:"preload",href:o==="image"&&l&&l.imageSrcSet?void 0:s,as:o},l),ao.set(j,s),d.querySelector(y)!==null||o==="style"&&d.querySelector(Md(j))||o==="script"&&d.querySelector(Od(j))))){var I=d.createElement("link");$s(I,"link",s),o==="style"&&(I[bc]=!0,I.onload=I.onerror=function(){bt(I)}),qe(I),d.head.appendChild(I)}}}function uP(s,o){Ia.m(s,o);var l=Jc;if(l&&s){var d=o&&typeof o.as=="string"?o.as:"script",y='link[rel="modulepreload"][as="'+_n(d)+'"][href="'+_n(s)+'"]',j=y;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":j=tu(s)}if(!ao.has(j)&&(s=k({rel:"modulepreload",href:s},o),ao.set(j,s),l.querySelector(y)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Od(j)))return}d=l.createElement("link"),$s(d,"link",s),qe(d),l.head.appendChild(d)}}}function dP(s,o,l){Ia.S(s,o,l);var d=Jc;if(d&&s){var y=Ge(d).hoistableStyles,j=eu(s);o=o||"default";var I=y.get(j);if(!I){var J={loading:0,preload:null};if(I=d.querySelector(Md(j)))J.loading=5;else{s=k({rel:"stylesheet",href:s,"data-precedence":o},l),(l=ao.get(j))&&Y0(s,l);var me=I=d.createElement("link");qe(me),$s(me,"link",s),me._p=new Promise(function(Ne,ze){me.onload=Ne,me.onerror=ze}),me.addEventListener("load",function(){J.loading|=1}),me.addEventListener("error",function(){J.loading|=2}),J.loading|=4,bm(I,o,d)}I={type:"stylesheet",instance:I,count:1,state:J},y.set(j,I)}}}function fP(s,o){Ia.X(s,o);var l=Jc;if(l&&s){var d=Ge(l).hoistableScripts,y=tu(s),j=d.get(y);j||(j=l.querySelector(Od(y)),j||(s=k({src:s,async:!0},o),(o=ao.get(y))&&K0(s,o),j=l.createElement("script"),qe(j),$s(j,"link",s),l.head.appendChild(j)),j={type:"script",instance:j,count:1,state:null},d.set(y,j))}}function hP(s,o){Ia.M(s,o);var l=Jc;if(l&&s){var d=Ge(l).hoistableScripts,y=tu(s),j=d.get(y);j||(j=l.querySelector(Od(y)),j||(s=k({src:s,async:!0,type:"module"},o),(o=ao.get(y))&&K0(s,o),j=l.createElement("script"),qe(j),$s(j,"link",s),l.head.appendChild(j)),j={type:"script",instance:j,count:1,state:null},d.set(y,j))}}function TC(s,o,l,d){var y=(y=de.current)?Ad(y):null;if(!y)throw Error(a(446));switch(s){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(l=eu(l.href),o=Ge(y).hoistableStyles,d=o.get(l),d||(d={type:"style",instance:null,count:0,state:null},o.set(l,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){s=eu(l.href);var j=Ge(y).hoistableStyles,I=j.get(s);if(I||(y=y.ownerDocument||y,I={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},j.set(s,I),(j=y.querySelector(Md(s)))?j._p||(I.instance=j,I.state.loading=5):(j=ao.get(s),j||(j={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},ao.set(s,j)),mP(y,s,j,I.state))),o&&d===null)throw Error(a(528,""));return I}if(o&&d!==null)throw Error(a(529,""));return null;case"script":return o=l.async,l=l.src,typeof l=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(l=tu(l),o=Ge(y).hoistableScripts,d=o.get(l),d||(d={type:"script",instance:null,count:0,state:null},o.set(l,d)),d):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,s))}}function eu(s){return'href="'+_n(s)+'"'}function Md(s){return'link[rel="stylesheet"]['+s+"]"}function EC(s){return k({},s,{"data-precedence":s.precedence,precedence:null})}function mP(s,o,l,d){if(o=s.querySelector('link[rel="preload"][as="style"]['+o+"]")){if(o[bc]!==!0){d.loading=1;return}}else o=s.createElement("link"),o[bc]=!0,o.onload=o.onerror=bt.bind(null,o),$s(o,"link",l),qe(o),s.head.appendChild(o);d.preload=o,o.addEventListener("load",function(){return d.loading|=1}),o.addEventListener("error",function(){return d.loading|=2})}function tu(s){return'[src="'+_n(s)+'"]'}function Od(s){return"script[async]"+s}function RC(s,o,l){if(o.count++,o.instance===null)switch(o.type){case"style":var d=s.querySelector('style[data-href~="'+_n(l.href)+'"]');if(d)return o.instance=d,qe(d),d;var y=k({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return d=(s.ownerDocument||s).createElement("style"),qe(d),$s(d,"style",y),bm(d,l.precedence,s),o.instance=d;case"stylesheet":y=eu(l.href);var j=s.querySelector(Md(y));if(j)return o.state.loading|=4,o.instance=j,qe(j),j;d=EC(l),(y=ao.get(y))&&Y0(d,y),j=(s.ownerDocument||s).createElement("link"),qe(j);var I=j;return I._p=new Promise(function(J,me){I.onload=J,I.onerror=me}),$s(j,"link",d),o.state.loading|=4,bm(j,l.precedence,s),o.instance=j;case"script":return j=tu(l.src),(y=s.querySelector(Od(j)))?(o.instance=y,qe(y),y):(d=l,(y=ao.get(j))&&(d=k({},l),K0(d,y)),s=s.ownerDocument||s,y=s.createElement("script"),qe(y),$s(y,"link",d),s.head.appendChild(y),o.instance=y);case"void":return null;default:throw Error(a(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(d=o.instance,o.state.loading|=4,bm(d,l.precedence,s));return o.instance}function bm(s,o,l){for(var d=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=d.length?d[d.length-1]:null,j=y,I=0;I<d.length;I++){var J=d[I];if(J.dataset.precedence===o)j=J;else if(j!==y)break}j?j.parentNode.insertBefore(s,j.nextSibling):(o=l.nodeType===9?l.head:l,o.insertBefore(s,o.firstChild))}function Y0(s,o){s.crossOrigin==null&&(s.crossOrigin=o.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=o.referrerPolicy),s.title==null&&(s.title=o.title)}function K0(s,o){s.crossOrigin==null&&(s.crossOrigin=o.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=o.referrerPolicy),s.integrity==null&&(s.integrity=o.integrity)}var vm=null;function AC(s,o,l){if(vm===null){var d=new Map,y=vm=new Map;y.set(l,d)}else y=vm,d=y.get(l),d||(d=new Map,y.set(l,d));if(d.has(s))return d;for(d.set(s,null),l=l.getElementsByTagName(s),y=0;y<l.length;y++){var j=l[y];if(!(j[cl]||j[Un]||s==="link"&&j.getAttribute("rel")==="stylesheet")&&j.namespaceURI!=="http://www.w3.org/2000/svg"){var I=j.getAttribute(o)||"";I=s+I;var J=d.get(I);J?J.push(j):d.set(I,[j])}}return d}function X0(s,o,l){s=s.ownerDocument||s,s.head.insertBefore(l,o==="title"?s.querySelector("head > title"):null)}function pP(s,o,l){if(l===1||o.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;switch(o.rel){case"stylesheet":return s=o.disabled,typeof o.precedence=="string"&&s==null;default:return!0}case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function MC(s,o){return s==="img"&&o.src!=null&&o.src!==""&&o.onLoad==null&&o.loading!=="lazy"}function OC(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function DC(s){return(s.width||100)*(s.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function zC(s,o){typeof o.decode=="function"&&(s.imgCount++,o.complete||(s.imgBytes+=DC(o),s.suspenseyImages.push(o)),s=bP.bind(s),o.decode().then(s,s))}function gP(s,o,l,d){if(l.type==="stylesheet"&&(typeof d.media!="string"||matchMedia(d.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var y=eu(d.href),j=o.querySelector(Md(y));if(j){o=j._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(s.count++,s=Dd.bind(s),o.then(s,s)),l.state.loading|=4,l.instance=j,qe(j);return}j=o.ownerDocument||o,d=EC(d),(y=ao.get(y))&&Y0(d,y),j=j.createElement("link"),qe(j);var I=j;I._p=new Promise(function(J,me){I.onload=J,I.onerror=me}),$s(j,"link",d),l.instance=j}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(l,o),(o=l.state.preload)&&(l.state.loading&3)===0&&(s.count++,l=Dd.bind(s),o.addEventListener("load",l),o.addEventListener("error",l))}}var ym=0;function xP(s,o){return s.stylesheets&&s.count===0&&jm(s,s.stylesheets),0<s.count||0<s.imgCount?function(l){var d=setTimeout(function(){if(s.stylesheets&&jm(s,s.stylesheets),s.unsuspend){var j=s.unsuspend;s.unsuspend=null,j()}},6e4+o);0<s.imgBytes&&ym===0&&(ym=62500*II());var y=setTimeout(function(){if(s.waitingForImages=!1,s.count===0&&(s.stylesheets&&jm(s,s.stylesheets),s.unsuspend)){var j=s.unsuspend;s.unsuspend=null,j()}},(s.imgBytes>ym?50:800)+o);return s.unsuspend=l,function(){s.unsuspend=null,clearTimeout(d),clearTimeout(y)}}:null}function IC(s){if(s.count===0&&(s.imgCount===0||!s.waitingForImages)){if(s.stylesheets)jm(s,s.stylesheets);else if(s.unsuspend){var o=s.unsuspend;s.unsuspend=null,o()}}}function Dd(){this.count--,IC(this)}function bP(){this.imgCount--,IC(this)}var wm=null;function jm(s,o){s.stylesheets=null,s.unsuspend!==null&&(s.count++,wm=new Map,o.forEach(vP,s),wm=null,Dd.call(s))}function vP(s,o){if(!(o.state.loading&4)){var l=wm.get(s);if(l)var d=l.get(null);else{l=new Map,wm.set(s,l);for(var y=s.querySelectorAll("link[data-precedence],style[data-precedence]"),j=0;j<y.length;j++){var I=y[j];(I.nodeName==="LINK"||I.getAttribute("media")!=="not all")&&(l.set(I.dataset.precedence,I),d=I)}d&&l.set(null,d)}y=o.instance,I=y.getAttribute("data-precedence"),j=l.get(I)||d,j===d&&l.set(null,y),l.set(I,y),this.count++,d=Dd.bind(this),y.addEventListener("load",d),y.addEventListener("error",d),j?j.parentNode.insertBefore(y,j.nextSibling):(s=s.nodeType===9?s.head:s,s.insertBefore(y,s.firstChild)),o.state.loading|=4}}var nu={$$typeof:V,Provider:null,Consumer:null,_currentValue:re,_currentValue2:re,_threadCount:0};function yP(s,o,l,d,y,j,I,J,me){this.tag=1,this.containerInfo=s,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=Wt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wt(0),this.hiddenUpdates=Wt(null),this.identifierPrefix=d,this.onUncaughtError=y,this.onCaughtError=j,this.onRecoverableError=I,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=me,this.transitionTypes=null,this.incompleteTransitions=new Map}function PC(s,o,l,d,y,j,I,J,me,Ne,ze,$e){return s=new yP(s,o,l,I,me,Ne,ze,$e,J),o=1,j===!0&&(o|=24),j=dr(3,null,null,o),s.current=j,j.stateNode=s,o=ub(),o.refCount++,s.pooledCache=o,o.refCount++,j.memoizedState={element:d,isDehydrated:l,cache:o},mb(j),s}function _C(s){return s?(s=Ec,s):Ec}function LC(s,o,l,d,y,j){y=_C(y),d.context===null?d.context=y:d.pendingContext=y,d=xi(o),d.payload={element:l},j=j===void 0?null:j,j!==null&&(d.callback=j),l=bi(s,d,o),l!==null&&(pr(l,s,o),ud(l,s,o))}function $C(s,o){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var l=s.retryLane;s.retryLane=l!==0&&l<o?l:o}}function W0(s,o){$C(s,o),(s=s.alternate)&&$C(s,o)}function BC(s){if(s.tag===13||s.tag===31){var o=bl(s,67108864);o!==null&&pr(o,s,67108864),W0(s,67108864)}}function VC(s){if(s.tag===13||s.tag===31){var o=zr();o=cr(o);var l=bl(s,o);l!==null&&pr(l,s,o),W0(s,o)}}var su=!0;function wP(s,o,l,d){var y=ae.T;ae.T=null;var j=le.p;try{le.p=2,Q0(s,o,l,d)}finally{le.p=j,ae.T=y}}function jP(s,o,l,d){var y=ae.T;ae.T=null;var j=le.p;try{le.p=8,Q0(s,o,l,d)}finally{le.p=j,ae.T=y}}function Q0(s,o,l,d){if(su){var y=Z0(d);if(y===null)O0(s,o,d,Sm,l),HC(s,d);else if(NP(y,s,o,l,d))d.stopPropagation();else if(HC(s,d),o&4&&-1<SP.indexOf(s)){for(;y!==null;){var j=ul(y);if(j!==null)switch(j.tag){case 3:if(j=j.stateNode,j.current.memoizedState.isDehydrated){var I=Kn(j.pendingLanes);if(I!==0){var J=j;for(J.pendingLanes|=2,J.entangledLanes|=2;I;){var me=1<<31-it(I);J.entanglements[1]|=me,I&=~me}Wo(j),(dn&6)===0&&(lm=be()+500,kd(0))}}break;case 31:case 13:J=bl(j,2),J!==null&&pr(J,j,2),dm(),W0(j,2)}if(j=Z0(d),j===null&&O0(s,o,d,Sm,l),j===y)break;y=j}y!==null&&d.stopPropagation()}else O0(s,o,d,null,l)}}function Z0(s){return s=hl(s),J0(s)}var Sm=null;function J0(s){if(Sm=null,s=So(s),s!==null){var o=c(s);if(o===null)s=null;else{var l=o.tag;if(l===13){if(s=u(o),s!==null)return s;s=null}else if(l===31){if(s=f(o),s!==null)return s;s=null}else if(l===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;s=null}else o!==s&&(s=null)}}return Sm=s,null}function UC(s){switch(s){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"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"fullscreenerror":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"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ue()){case Qe:return 2;case xt:return 8;case Ke:case Be:return 32;case jt:return 268435456;default:return 32}default:return 32}}var ev=!1,Ai=null,Mi=null,Oi=null,zd=new Map,Id=new Map,Di=[],SP="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function HC(s,o){switch(s){case"focusin":case"focusout":Ai=null;break;case"dragenter":case"dragleave":Mi=null;break;case"mouseover":case"mouseout":Oi=null;break;case"pointerover":case"pointerout":zd.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Id.delete(o.pointerId)}}function Pd(s,o,l,d,y,j){return s===null||s.nativeEvent!==j?(s={blockedOn:o,domEventName:l,eventSystemFlags:d,nativeEvent:j,targetContainers:[y]},o!==null&&(o=ul(o),o!==null&&BC(o)),s):(s.eventSystemFlags|=d,o=s.targetContainers,y!==null&&o.indexOf(y)===-1&&o.push(y),s)}function NP(s,o,l,d,y){switch(o){case"focusin":return Ai=Pd(Ai,s,o,l,d,y),!0;case"dragenter":return Mi=Pd(Mi,s,o,l,d,y),!0;case"mouseover":return Oi=Pd(Oi,s,o,l,d,y),!0;case"pointerover":var j=y.pointerId;return zd.set(j,Pd(zd.get(j)||null,s,o,l,d,y)),!0;case"gotpointercapture":return j=y.pointerId,Id.set(j,Pd(Id.get(j)||null,s,o,l,d,y)),!0}return!1}function FC(s){var o=So(s.target);if(o!==null){var l=c(o);if(l!==null){if(o=l.tag,o===13){if(o=u(l),o!==null){s.blockedOn=o,Ms(s.priority,function(){VC(l)});return}}else if(o===31){if(o=f(l),o!==null){s.blockedOn=o,Ms(s.priority,function(){VC(l)});return}}else if(o===3&&l.stateNode.current.memoizedState.isDehydrated){s.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}s.blockedOn=null}function Nm(s){if(s.blockedOn!==null)return!1;for(var o=s.targetContainers;0<o.length;){var l=Z0(s.nativeEvent);if(l===null){l=s.nativeEvent;var d=new l.constructor(l.type,l);fl=d,l.target.dispatchEvent(d),fl=null}else return o=ul(l),o!==null&&BC(o),s.blockedOn=l,!1;o.shift()}return!0}function GC(s,o,l){Nm(s)&&l.delete(o)}function CP(){ev=!1,Ai!==null&&Nm(Ai)&&(Ai=null),Mi!==null&&Nm(Mi)&&(Mi=null),Oi!==null&&Nm(Oi)&&(Oi=null),zd.forEach(GC),Id.forEach(GC)}function Cm(s,o){s.blockedOn===o&&(s.blockedOn=null,ev||(ev=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,CP)))}var km=null;function qC(s){km!==s&&(km=s,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){km===s&&(km=null);for(var o=0;o<s.length;o+=3){var l=s[o],d=s[o+1],y=s[o+2];if(typeof d!="function"){if(J0(d||l)===null)continue;break}var j=ul(l);j!==null&&(s.splice(o,3),o-=3,Ib(j,{pending:!0,data:y,method:l.method,action:d},d,y))}}))}function ru(s){function o(me){return Cm(me,s)}Ai!==null&&Cm(Ai,s),Mi!==null&&Cm(Mi,s),Oi!==null&&Cm(Oi,s),zd.forEach(o),Id.forEach(o);for(var l=0;l<Di.length;l++){var d=Di[l];d.blockedOn===s&&(d.blockedOn=null)}for(;0<Di.length&&(l=Di[0],l.blockedOn===null);)FC(l),l.blockedOn===null&&Di.shift();if(l=(s.ownerDocument||s).$$reactFormReplay,l!=null)for(d=0;d<l.length;d+=3){var y=l[d],j=l[d+1],I=y[Os]||null;if(typeof j=="function")I||qC(l);else if(I){var J=null;if(j&&j.hasAttribute("formAction")){if(y=j,I=j[Os]||null)J=I.formAction;else if(J0(y)!==null)continue}else J=I.action;typeof J=="function"?l[d+1]=J:(l.splice(d,3),d-=3),qC(l)}}}function YC(){function s(j){j.canIntercept&&j.info==="react-transition"&&j.intercept({handler:function(){return new Promise(function(I){return y=I})},focusReset:"manual",scroll:"manual"})}function o(){y!==null&&(y(),y=null),d||setTimeout(l,20)}function l(){if(!d&&!navigation.transition){var j=navigation.currentEntry;j&&j.url!=null&&navigation.navigate(j.url,{state:j.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var d=!1,y=null;return navigation.addEventListener("navigate",s),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(l,100),function(){d=!0,navigation.removeEventListener("navigate",s),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),y!==null&&(y(),y=null)}}}function tv(s){this._internalRoot=s}Tm.prototype.render=tv.prototype.render=function(s){var o=this._internalRoot;if(o===null)throw Error(a(409));var l=o.current,d=zr();LC(l,d,s,o,null,null)},Tm.prototype.unmount=tv.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var o=s.containerInfo;LC(s.current,2,null,s,null,null),dm(),o[Nr]=null}};function Tm(s){this._internalRoot=s}Tm.prototype.unstable_scheduleHydration=function(s){if(s){var o=ds();s={blockedOn:null,target:s,priority:o};for(var l=0;l<Di.length&&o!==0&&o<Di[l].priority;l++);Di.splice(l,0,s),l===0&&FC(s)}};var KC=t.version;if(KC!=="19.3.0")throw Error(a(527,KC,"19.3.0"));le.findDOMNode=function(s){var o=s._reactInternals;if(o===void 0)throw typeof s.render=="function"?Error(a(188)):(s=Object.keys(s).join(","),Error(a(268,s)));return s=h(o),s=s!==null?g(s):null,s=s===null?null:s.stateNode,s};var kP={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:ae,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Em=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Em.isDisabled&&Em.supportsFiber)try{je=Em.inject(kP),Ye=Em}catch{}}return Ld.createRoot=function(s,o){if(!i(s))throw Error(a(299));var l=!1,d="",y=_S,j=LS,I=$S;return o!=null&&(o.unstable_strictMode===!0&&(l=!0),o.identifierPrefix!==void 0&&(d=o.identifierPrefix),o.onUncaughtError!==void 0&&(y=o.onUncaughtError),o.onCaughtError!==void 0&&(j=o.onCaughtError),o.onRecoverableError!==void 0&&(I=o.onRecoverableError)),o=PC(s,1,!1,null,null,l,d,null,y,j,I,YC),s[Nr]=o.current,M0(s),new tv(o)},Ld.hydrateRoot=function(s,o,l){if(!i(s))throw Error(a(299));var d=!1,y="",j=_S,I=LS,J=$S,me=null;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(y=l.identifierPrefix),l.onUncaughtError!==void 0&&(j=l.onUncaughtError),l.onCaughtError!==void 0&&(I=l.onCaughtError),l.onRecoverableError!==void 0&&(J=l.onRecoverableError),l.formState!==void 0&&(me=l.formState)),o=PC(s,1,!0,o,l??null,d,y,me,j,I,J,YC),o.context=_C(null),l=o.current,d=zr(),d=cr(d),y=xi(d),y.callback=null,bi(l,y,d),l=d,o.current.lanes=l,un(o,l),Wo(o),s[Nr]=o.current,M0(s),new Tm(o)},Ld.version="19.3.0",Ld}var ok;function KP(){if(ok)return ov.exports;ok=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),ov.exports=YP(),ov.exports}var XP=KP();const WP="modulepreload",QP=function(e){return"/"+e},ak={},gy=function(t,r,a){let i=Promise.resolve();if(r&&r.length>0){let u=function(h){return Promise.all(h.map(g=>Promise.resolve(g).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),m=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));i=u(r.map(h=>{if(h=QP(h),h in ak)return;ak[h]=!0;const g=h.endsWith(".css"),p=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${p}`))return;const b=document.createElement("link");if(b.rel=g?"stylesheet":WP,g||(b.as="script"),b.crossOrigin="",b.href=h,m&&b.setAttribute("nonce",m),document.head.appendChild(b),g)return new Promise((v,w)=>{b.addEventListener("load",v),b.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${h}`)))})}))}function c(u){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=u,window.dispatchEvent(f),!f.defaultPrevented)throw u}return i.then(u=>{for(const f of u||[])f.status==="rejected"&&c(f.reason);return t().catch(c)})},ZP="openrod.compute-target";function JP(e,t){if(!["local","cloud"].includes(e))throw new Error("Unknown compute target");return`${e==="cloud"?"/api/remote/os":"/api/os"}${t}`}let GR="local";const qR=()=>GR;function YR(e){if(!["local","cloud"].includes(e))throw new Error("Unknown compute target");GR=e}function e6(e,t){const r=t??null;return{uid:r,revision:e.revision+(e.uid&&e.uid!==r?1:0)}}let KR=null;const XR=()=>KR;function ik(e){KR=typeof e=="string"&&/^[a-f0-9]{16}$/.test(e)?e:null}var lk={projectToken:"phc_t8z9eNB6eJABMR9iLkDbqAZH5wFh7wmjjDqEpAxnPPAU",host:"https://us.i.posthog.com",version:"0.2.0-rc.2",environment:"production",enabled:!0};const t6=/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$/i,ck="openrod.usage.v1",$d="openrod.usage-id.v1",cv="openrod.usage-session.v1",Rm="openrod.terminal-flows.v1",Ks=(...e)=>t=>e.includes(t)?t:void 0,cu=e=>typeof e=="string"&&t6.test(e)?e:void 0,Ui=e=>Number.isFinite(e)&&e>=0?Math.min(Math.round(e),864e5):void 0,uv=e=>typeof e=="boolean"?e:void 0,L1=Ks("sandboxes","activity","groups","egress","ingress","secrets","templates","setups","connections","terminal"),xy=Ks("gateway_connection","sandbox_creation","session_launch"),by=Ks("local","ssh","cloud","unknown"),uk=Ks("docker_missing","docker_unavailable","openshell_missing","gateway_unavailable","ssh_auth","host_key","runtime_missing","image_build","credentials_missing","setup_import","policy","file_seed","timeout","connection_lost","unknown"),dv={flow:xy,flow_id:cu,attempt:Ui,location_type:by,launch_target:Ks("browser","terminal","vscode","cursor")},n6=e=>typeof e=="string"?e.trim().slice(0,2e3):void 0,s6=e=>Array.isArray(e)?[...new Set(e.filter(t=>["claude","codex","cursor","pi","antigravity","opencode","aider","copilot","kiro","droid"].includes(t)))].slice(0,12):void 0,dk={creation_mode:Ks("quick","template"),file_source:Ks("empty","folder","repo"),agent_ids:s6,setup_count:Ui,provider_count:Ui,group_count:Ui},fk={console_opened:{gateway_state:Ks("available","setup_required","unavailable"),first_observed_visit:uv,connection_method:Ks("automatic","manual","existing","unknown")},view_opened:{previous_view:L1},flow_started:{...dv,...dk},flow_step_changed:{...dv,step:Ks("location","configuration","validation","host_selection","connecting","needs_docker","needs_runtime","preparing_tools","building_image","creating","requesting"),state:Ks("entered","blocked"),error_category:uk},flow_finished:{...dv,...dk,outcome:Ks("connected","created","live","handoff_requested","failed","cancelled"),duration_ms:Ui,start_observed:uv,error_category:uk},sandbox_ready:{flow_id:cu,duration_ms:Ui,location_type:by},feature_used:{feature:Ks("template","setup","network","group","activity","files","sandbox"),action:Ks("built","imported","activated","rule_saved","membership_saved","filter_applied","exported","uploaded","started","stopped","deleted"),count:Ui,location_type:by},feedback_submitted:{prompt:Ks("general"),category:Ks("general"),text:n6,feedback_only:uv}};function Am(e,t={}){if(!Object.hasOwn(fk,e))return null;const r={};for(const[a,i]of Object.entries({view:L1,...fk[e]})){const c=i(t[a]);c!==void 0&&(r[a]=c)}return r}const r6=[[/host key/i,"host_key"],[/permission denied|publickey|authentication failed/i,"ssh_auth"],[/docker (engine )?is missing|docker isn.t installed|install docker/i,"docker_missing"],[/docker isn.t running|docker daemon|reach docker|docker.*not available/i,"docker_unavailable"],[/openshell (cli )?is not installed|openshell isn.t installed/i,"openshell_missing"],[/runtime (image|package)|sandbox runtime/i,"runtime_missing"],[/timed out/i,"timeout"],[/gateway/i,"gateway_unavailable"]];function Cu(e){if((e==null?void 0:e.name)==="TimeoutError"||(e==null?void 0:e.status)===504)return"timeout";if((e==null?void 0:e.code)==="GATEWAY_DOCKER_MISMATCH")return"docker_unavailable";const t=typeof(e==null?void 0:e.message)=="string"?e.message:"";for(const[r,a]of r6)if(r.test(t))return a;return(e==null?void 0:e.name)==="TypeError"?"connection_lost":(e==null?void 0:e.status)===502||(e==null?void 0:e.status)===503?"gateway_unavailable":"unknown"}function o6({getStorage:e=()=>window.localStorage,getLocation:t=()=>window.location.href,randomUUID:r=()=>crypto.randomUUID(),now:a=()=>Date.now(),fetch:i=(...h)=>fetch(...h),setTimer:c=setTimeout,clearTimer:u=clearTimeout,replaceLocation:f=h=>window.history.replaceState(window.history.state,"",h),config:m=typeof lk>"u"?{}:lk}={}){let h=!1,g=!1,p=!1,b,v,w=!1,C;const S=m.host==="https://eu.i.posthog.com"?"EU":"US";let N=Object.freeze({available:!1,sharing:null,destination:S});const E=new Set,T=new Map,R=new Set,M=new Map,A=new Map;let k=[],O=0;const D=()=>e(),_=(Z,pe)=>{try{return Z()}catch{return pe}};function H(){O++;for(const[Z,pe]of T)Z.abort(),u(pe);T.clear(),R.clear(),M.clear(),A.clear(),k=[],w=!1,v=void 0,C=void 0}function G(){const Z=new URL(t());return!Z.searchParams.has("token")&&!Z.searchParams.has("handoff")&&!/^#local-(connect|return)=/.test(Z.hash)&&!(m.environment==="development"&&Z.searchParams.has("fleet"))}function B(){return _(()=>h&&g&&!p&&m.enabled===!0&&/^phc_[a-zA-Z0-9]+$/.test(m.projectToken??"")&&["https://us.i.posthog.com","https://eu.i.posthog.com"].includes(m.host)&&G(),!1)}function P(){_(()=>{let Z=null;try{const ue=D().getItem(ck);Z=ue==="yes"?!0:ue==="no"?!1:null}catch{p=!0,H()}Z!==!0&&N.sharing===!0&&H();const pe={available:B(),sharing:Z,destination:S};if(Object.keys(pe).some(ue=>pe[ue]!==N[ue])){N=Object.freeze(pe);for(const ue of E)_(ue)}})}function V({enabled:Z=!1,mode:pe="local"}={}){_(()=>{h=pe==="local",g=Z,(!h||!Z)&&H(),P()})}function Y(Z){_(()=>{try{if(D().setItem(ck,Z?"yes":"no"),!Z){for(const pe of[$d,cv,Rm])D().removeItem(pe);H()}}catch{p=!0,H()}P()})}function W(){const Z=D();let pe=cu(Z.getItem($d)),ue;C??(C=!pe),pe||(pe=r(),Z.setItem($d,pe));try{ue=JSON.parse(Z.getItem(cv))}catch{}return(!cu(ue==null?void 0:ue.id)||!Number.isFinite(ue==null?void 0:ue.at)||a()-ue.at>18e5)&&(ue={id:r()}),Z.setItem(cv,JSON.stringify({id:ue.id,at:a()})),{id:pe,session:ue.id,first:C}}function q(Z,pe={},{explicitFeedback:ue=!1}={}){return _(()=>{if(P(),!N.available||N.sharing!==!0&&!(ue&&Z==="feedback_submitted"))return!1;const ve=Am(Z,pe);if(!ve)return!1;const Ce=N.sharing===!0;let Ie;try{Ie=Ce?W():{id:r()}}catch{return p=!0,H(),P(),!1}if(k=k.filter(Re=>a()-Re<6e4),T.size>=6||k.length>=120)return!1;const de=new AbortController,Te=c(()=>{de.abort(),T.delete(de)},3e3);T.set(de,Te),k.push(a());const oe={api_key:m.projectToken,event:Z,distinct_id:Ie.id,timestamp:new Date(a()).toISOString(),properties:{schema_version:1,app_version:m.version,environment:m.environment,...Ce&&Ie.session?{$session_id:Ie.session}:{},...Ce&&b?{view:b}:{},...ve,$process_person_profile:!1,...Ce?{}:{$geoip_disable:!0},...Z==="console_opened"?{first_observed_visit:Ie.first}:{},...ue?{feedback_only:!Ce}:{}}},fe=()=>{u(Te),T.delete(de)};Z==="console_opened"&&(C=!1);try{Promise.resolve(i(`${m.host}/i/v0/e/`,{method:"POST",headers:{"content-type":"text/plain"},body:JSON.stringify(oe),signal:de.signal,credentials:"omit",referrerPolicy:"no-referrer",cache:"no-store",redirect:"error",keepalive:!0})).then(fe,fe)}catch{fe()}return!0},!1)}function ee(Z){_(()=>{w||!["live","setup-required","gateway-down"].includes(Z)||q("console_opened",{gateway_state:Z==="live"?"available":Z==="setup-required"?"setup_required":"unavailable",connection_method:"existing"})&&(w=!0)})}function z(Z){_(()=>{b=L1(Z),b&&b!==v&&q("view_opened",{previous_view:v})&&(v=b)})}function L(Z,pe={},ue=null){return _(()=>{if(P(),!N.available||N.sharing!==!0||!xy(Z))return null;const ve=W().id;((ue==null?void 0:ue.generation)!==O||(ue==null?void 0:ue.installationId)!==ve||(ue==null?void 0:ue.flow)!==Z)&&(ue=null),ue&&ue.outcome!=="failed"&&ue.started!==null&&(ue.outcome||F(ue,"cancelled"),ue=null);const Ce={generation:O,installationId:ve,id:(ue==null?void 0:ue.id)??r(),flow:Z,attempt:((ue==null?void 0:ue.attempt)??0)+1,started:a(),properties:Am("flow_started",pe)};return q("flow_started",{...Ce.properties,flow:Z,flow_id:Ce.id,attempt:Ce.attempt}),U(Ce,Z==="session_launch"?"requesting":Z==="gateway_connection"?"connecting":"preparing_tools"),Ce},null)}function X(Z,pe={}){return _(()=>(P(),!N.available||N.sharing!==!0||!xy(Z)?null:{generation:O,installationId:W().id,id:r(),flow:Z,attempt:0,started:null,properties:Am("flow_started",pe)}),null)}const te=Z=>Z&&Z.generation===O&&N.available&&N.sharing===!0&&cu(Z.installationId)&&Z.installationId===D().getItem($d),$=Z=>({...Z.properties,flow:Z.flow,flow_id:Z.id,attempt:Z.attempt});function U(Z,pe,ue="entered",ve){_(()=>{if(P(),!te(Z))return;const Ce=`${Z.id}:${Z.attempt}`,Ie=`${pe}:${ue}:${ve}`;M.get(Ce)!==Ie&&(M.size>=100&&M.delete(M.keys().next().value),M.set(Ce,Ie),q("flow_step_changed",{...$(Z),step:pe,state:ue,error_category:ve}))})}function F(Z,pe,ue){_(()=>{if(P(),!te(Z))return;const ve=`${Z.id}:${Z.attempt}`;R.has(ve)||(R.size>=200&&R.delete(R.values().next().value),R.add(ve),M.delete(ve),Z.outcome=pe,q("flow_finished",{...$(Z),outcome:pe,start_observed:Z.started!==null,duration_ms:Z.started===null?void 0:a()-Z.started,error_category:ue}))})}function K(Z){_(()=>{if(P(),!te(Z))return;const pe=`${Z.id}:ready`;R.has(pe)||(R.size>=200&&R.delete(R.values().next().value),R.add(pe),q("sandbox_ready",{flow_id:Z.id,duration_ms:a()-Z.started,location_type:Z.properties.location_type}))})}function se(Z){return q("feedback_submitted",Z,{explicitFeedback:!0})}function ne(Z,pe={}){_(()=>{const ue=L("session_launch",{...pe,launch_target:"browser"});if(P(),!te(ue))return;const ve=new URL(Z.currentTarget.href),[Ce,Ie=""]=ve.hash.split("?"),de=new URLSearchParams(Ie);de.set("analyticsFlow",ue.id),ve.hash=`${Ce}?${de}`;try{const Te=ae();Te.push(ue),D().setItem(Rm,JSON.stringify(Te.slice(-20))),Z.currentTarget.href=ve.href}catch{}})}function ye(Z,pe){try{D().setItem(Rm,JSON.stringify(Z.filter(ue=>ue.id!==pe)))}catch{}_(()=>{const ue=new URL(t()),[ve,Ce=""]=ue.hash.split("?"),Ie=new URLSearchParams(Ce);Ie.delete("analyticsFlow"),ue.hash=Ie.toString()?`${ve}?${Ie}`:ve,f(ue.href)})}function ae(){let Z=[];try{Z=JSON.parse(D().getItem(Rm)||"[]")}catch{}return Array.isArray(Z)?Z.filter(pe=>cu(pe.id)&&pe.flow==="session_launch"&&Number.isFinite(pe.started)&&a()-pe.started<18e5).slice(-20):[]}function le(Z,pe){return _(()=>{if(P(),!N.available||N.sharing!==!0)return null;if(pe)return L("session_launch",Z,pe);const ue=new URLSearchParams(new URL(t()).hash.split("?")[1]).get("analyticsFlow"),ve=W().id,Ce=ae(),Ie=Ce.find(de=>de.id===ue&&de.installationId===ve);return ue&&ye(Ce,ue),Ie?{generation:O,installationId:ve,id:Ie.id,flow:"session_launch",attempt:Ui(Ie.attempt)??1,started:Ie.started,properties:Am("flow_started",Ie.properties)}:L("session_launch",{...Z,launch_target:"browser"})},null)}function re(Z,pe){_(()=>{if(P(),!(!N.available||N.sharing!==!0)){if(Z.status==="ready"){q("feature_used",{feature:"template",action:"built",location_type:mf(pe)});return}Z.status==="building"&&(A.size>=100&&A.delete(A.keys().next().value),A.set(JSON.stringify([pe==null?void 0:pe.context,Z.name]),{installationId:W().id,startedAt:Z.startedAt,at:a(),location_type:mf(pe)}))}})}function Q(Z){_(()=>{var pe,ue;for(const ve of Z){const Ce=JSON.stringify([(pe=ve.location)==null?void 0:pe.context,ve.name]),Ie=A.get(Ce);if(Ie){if(Ie.installationId!==D().getItem($d)||a()-Ie.at>18e5){A.delete(Ce);continue}ve.startedAt&&ve.startedAt!==Ie.startedAt||((ue=ve.location)==null?void 0:ue.connected)===!1||(ve.status==="ready"?(A.delete(Ce),q("feature_used",{feature:"template",action:"built",location_type:Ie.location_type})):ve.status==="failed"&&A.delete(Ce))}}})}return{configure:V,setSharing:Y,refresh:P,capture:q,observeConsole:ee,observeView:z,startFlow:L,exploreFlow:X,step:U,finishFlow:F,ready:K,templateStarted:re,observeTemplates:Q,submitFeedback:se,terminalClick:ne,terminalFlow:le,subscribe:Z=>(E.add(Z),()=>E.delete(Z)),getSnapshot:()=>N,stop:()=>{h=!1,H(),P()}}}const ln=o6(),mf=e=>(e==null?void 0:e.target)==="cloud"?"cloud":e!=null&&e.remote?"ssh":"local";function a6(e,t){if(t==="GET"||t===void 0)return;const a=[[/^\/setups\/save$/,"setup","imported"],[/^\/setups\/[^/]+\/enable$/,"setup","activated"],[/^\/egress\/policies$/,"network","rule_saved"],[/^\/org\/members$/,"group","membership_saved"],[/^\/files\/[^/]+\/uploads\/[^/]+\/commit$/,"files","uploaded"],[/^\/sandboxes\/[^/]+\/start$/,"sandbox","started"],[/^\/sandboxes\/[^/]+\/stop$/,"sandbox","stopped"],[/^\/sandboxes\/[^/]+\/delete$/,"sandbox","deleted"]].find(([i])=>i.test(e));a&&ln.capture("feature_used",{feature:a[1],action:a[2]})}const $i="CONSOLE_TOKEN_REQUIRED";function lr(e,t,r=null,a=XR()){const i=()=>e??qR(),c=a;let u,f;const m=v=>JP(i(),v),h=v=>t&&v?AbortSignal.any([t,v]):t??v;async function g(){t==null||t.throwIfAborted();const v=await fetch(m("/context"),{signal:t,headers:{...i()==="cloud"&&c?{"x-openrod-local-owner":c}:{},...r?{"x-openshell-context":r,"x-openshell-location":"1"}:{}}}),w=await v.json();if(t==null||t.throwIfAborted(),w.code===$i?window.dispatchEvent(new Event($i)):(v.status===401||w.code==="CLOUD_OWNER_CHANGED")&&window.dispatchEvent(new Event("openrod-session-expired")),!v.ok)throw new Error(w.error??"Could not read gateway registrations.");return u??(u=JSON.stringify([w.gateway,w.workspace])),w}async function p(){return t==null||t.throwIfAborted(),r??(u||(f??(f=g().finally(()=>{f=null})),await f),u)}async function b(v,{method:w="GET",body:C,signal:S,scoped:N=!0,raw:E=!1}={}){const T=h(S);T==null||T.throwIfAborted();const R=N?await p():null;T==null||T.throwIfAborted();const M=await fetch(m(v),{method:w,signal:T,headers:{...i()==="cloud"&&c?{"x-openrod-local-owner":c}:{},...R?{"x-openshell-context":R}:{},...R&&r?{"x-openshell-location":"1"}:{},...w==="GET"?{}:{"content-type":E?"application/octet-stream":"application/json","x-openshell-console":"1"}},body:C===void 0?void 0:E?C:JSON.stringify(C)}),A=await M.json().catch(()=>({}));if(T==null||T.throwIfAborted(),A.code===$i?window.dispatchEvent(new Event($i)):(M.status===401||A.code==="CLOUD_OWNER_CHANGED")&&window.dispatchEvent(new Event("openrod-session-expired")),!M.ok)throw Object.assign(new Error(A.error??`Request failed (${M.status})`),{status:M.status,code:A.code,sandboxes:A.sandboxes,fix:A.fix});return a6(v,w),A}return{target:e,signal:t,path:m,owner:c,url:(v,w={})=>{const C=new URLSearchParams({...w,...i()==="cloud"&&c?{owner:c}:{}});return m(v)+(C.size?"?"+C:"")},forContext:v=>lr(e,t,v,c),inventory:v=>b("/inventory",{signal:v,scoped:!1}),context:g,contextKey:p,capabilities:()=>b("/capabilities",{scoped:!1}),importCapabilities:()=>b("/resource-imports/capabilities"),exportResources:v=>b("/resource-imports/export",{method:"POST",body:v}),planImport:v=>b("/resource-imports/plan",{method:"POST",body:v}),importJobs:()=>b("/resource-imports"),importJob:v=>b(`/resource-imports/${encodeURIComponent(v)}`),executeImport:v=>b(`/resource-imports/${encodeURIComponent(v)}/execute`,{method:"POST",body:{acknowledged:!0}}),retryImport:v=>b(`/resource-imports/${encodeURIComponent(v)}/retry`,{method:"POST",body:{acknowledged:!0}}),cancelImport:v=>b(`/resource-imports/${encodeURIComponent(v)}/cancel`,{method:"POST",body:{}}),connections:v=>b("/connections",{signal:v,scoped:!1}),connectionJob:(v,w)=>b(`/connections/jobs/${encodeURIComponent(v)}`,{signal:w,scoped:!1}),connect:v=>b("/connections/connect",{method:"POST",body:v,scoped:!1}),installConnectionDocker:v=>b(`/connections/jobs/${encodeURIComponent(v)}/docker`,{method:"POST",body:{approve:!0},scoped:!1}),installConnectionRuntime:v=>b(`/connections/jobs/${encodeURIComponent(v)}/install`,{method:"POST",body:{method:"download"},scoped:!1}),uploadConnectionPackage:(v,w)=>b(`/connections/jobs/${encodeURIComponent(v)}/package`,{method:"POST",body:w,raw:!0,scoped:!1}),scanSshHost:v=>b("/connections/hosts/scan",{method:"POST",body:v,scoped:!1}),addSshHost:v=>b("/connections/hosts",{method:"POST",body:{token:v},scoped:!1}),removeSshHost:v=>b("/connections/hosts/remove",{method:"POST",body:{alias:v},scoped:!1}),restoreSshHost:v=>b("/connections/hosts/restore",{method:"POST",body:{host:v},scoped:!1}),forgetRemote:()=>b("/connections/forget",{method:"POST",body:{},scoped:!1}),disconnectRemote:()=>b("/connections/disconnect",{method:"POST",body:{},scoped:!1}),syncLocalCatalog:()=>b("/local-catalog",{method:"POST",body:{}}),gatewayDocker:(v=!1)=>b(`/gateway-docker${v?"?fresh=1":""}`,{scoped:!1}),connectGatewayDocker:(v=[],w=!0)=>b("/gateway-docker/connect",{method:"POST",body:{confirm:w,seen:v},scoped:!1}),undoGatewayDocker:(v=[])=>b("/gateway-docker/undo",{method:"POST",body:{confirm:!0,seen:v},scoped:!1}),setups:()=>b("/setups"),discoverSetups:v=>b("/setups/scan",{method:"POST",body:{sources:v}}),reviewSetup:(v,w)=>b("/setups/review",{method:"POST",body:{token:v,ids:w}}),removeSetupReviewItem:(v,w)=>b("/setups/remove-review-item",{method:"POST",body:{token:v,item:w}}),prepareSetup:(v,w)=>b("/setups/prepare",{method:"POST",body:{token:v,items:w,approved:!0}}),prepareLaunchSetup:(v,w)=>b(`/setups/${v}/prepare-launch`,{method:"POST",body:{revision:w}}),prepareSavedSetup:v=>b(`/setups/${v}/prepare`,{method:"POST",body:{}}),setupPreparation:v=>b(`/setups/preparations/${v}`),cancelSetupPreparation:v=>b(`/setups/preparations/${v}/cancel`,{method:"POST",body:{}}),setupFile:(v,w,C)=>b("/setups/file",{method:"POST",body:{token:v,item:w,path:C}}),saveSetup:(v,w,C)=>b("/setups/save",{method:"POST",body:{token:v,name:w,acknowledged:C}}),deleteSetup:(v,w)=>b(`/setups/${v}/delete`,{method:"POST",body:{revision:w}}),deleteSetupItem:(v,w,C)=>b(`/setups/${v}/delete-item`,{method:"POST",body:{item:w,revision:C}}),previewSetup:(v,w,C)=>b(`/setups/${v}/preview`,{method:"POST",body:{sandbox:w,targets:C}}),enableSetup:(v,w,C,S=!1)=>b(`/setups/${v}/enable`,{method:"POST",body:{sandbox:w,token:C,approveAccess:S}}),removeSetup:(v,w,C)=>b(`/setups/${v}/remove`,{method:"POST",body:{sandbox:w,token:C}}),setupJobs:v=>b(`/setups/${v}/jobs`),cloudExport:v=>b(`/cloud-export?name=${encodeURIComponent(v)}`),importCloud:v=>b("/cloud-import",{method:"POST",body:v}),cloudTransfer:(v,w)=>b("/cloud-transfer",{method:"POST",body:{name:v,ticket:w}}),selectContext:v=>b("/context",{method:"POST",body:v}),previewActivityDeletion:v=>b("/activity/delete-preview",{method:"POST",body:v}),deleteActivity:v=>b("/activity/delete",{method:"POST",body:{token:v}}),activityDestinations:()=>b("/activity-destinations"),createActivityDestination:v=>b("/activity-destinations",{method:"POST",body:v}),activityDestinationAction:(v,w)=>b(`/activity-destinations/${encodeURIComponent(v)}/${w}`,{method:"POST",body:{}}),overview:()=>b("/overview"),sandbox:v=>b(`/sandboxes/${encodeURIComponent(v)}`),activity:(v={})=>b(`/activity?query=${encodeURIComponent(JSON.stringify(v))}`),create:v=>b("/sandboxes",{method:"POST",body:v}),sshConnection:v=>b(`/sandboxes/${encodeURIComponent(v)}/ssh`),openSshTerminal:(v,w)=>b(`/sandboxes/${encodeURIComponent(v)}/ssh-open`,{method:"POST",body:{mode:w}}),sshConfig:v=>b(`/sandboxes/${encodeURIComponent(v)}/ssh-config`,{method:"POST",body:{}}),terminalSession:(v,w)=>b(`/sandboxes/${encodeURIComponent(v)}/terminal-session`,{method:"POST",body:w}),lifecycle:(v,w)=>b(`/sandboxes/${encodeURIComponent(v)}/${w}`,{method:"POST",body:{}}),editors:()=>b("/editors"),openEditor:(v,w)=>b(`/sandboxes/${encodeURIComponent(v)}/editor`,{method:"POST",body:{editor:w}}),fleetPolicy:()=>b("/policy/fleet"),policy:v=>b(`/policy/${encodeURIComponent(v)}`),revision:(v,w)=>b(`/policy/${encodeURIComponent(v)}/revisions/${w}`),applyOps:(v,w)=>b(`/policy/${encodeURIComponent(v)}/ops`,{method:"POST",body:{ops:w}}),restore:(v,w)=>b(`/policy/${encodeURIComponent(v)}/restore`,{method:"POST",body:{version:w}}),globalPolicy:()=>b("/policy/global"),removeGlobal:()=>b("/policy/global/remove",{method:"POST",body:{}}),settings:v=>b(`/settings${v?`/${encodeURIComponent(v)}`:""}`),setSetting:v=>b("/settings",{method:"POST",body:v}),secrets:()=>b("/secrets"),createSecret:v=>b("/secrets",{method:"POST",body:v}),rotateSecret:(v,w)=>b(`/secrets/${encodeURIComponent(v)}/rotate`,{method:"POST",body:{credentials:w}}),secretExpiry:(v,w,C)=>b(`/secrets/${encodeURIComponent(v)}/expiry`,{method:"POST",body:{key:w,expiresAt:C}}),deleteSecret:v=>b(`/secrets/${encodeURIComponent(v)}/delete`,{method:"POST",body:{}}),attachSecret:(v,w,C)=>b(`/secrets/${encodeURIComponent(v)}/${C?"attach":"detach"}`,{method:"POST",body:{sandbox:w}}),importProfile:v=>b("/profiles/import",{method:"POST",body:{id:v}}),deleteTemplates:v=>b("/templates/delete",{method:"POST",body:{ids:v}}),templates:()=>b("/templates"),imageTemplates:()=>b("/image-templates"),localImages:()=>b("/image-templates/local-images"),buildImageTemplate:(v,w=!1)=>b("/image-templates",{method:"POST",body:{recipe:v,replace:w}}),cancelImageBuild:v=>b(`/image-templates/${encodeURIComponent(v)}/cancel`,{method:"POST",body:{}}),dismissImageBuild:v=>b(`/image-templates/${encodeURIComponent(v)}/dismiss`,{method:"POST",body:{}}),imageTemplateUsage:v=>b(`/image-templates/${encodeURIComponent(v)}/usage`),deleteImageTemplate:v=>b(`/image-templates/${encodeURIComponent(v)}/delete`,{method:"POST",body:{}}),org:()=>b("/org"),saveOrg:v=>b("/org",{method:"POST",body:v}),saveGroup:v=>b("/org/groups",{method:"POST",body:v}),deleteGroup:v=>b(`/org/groups/${encodeURIComponent(v)}/delete`,{method:"POST",body:{}}),setGroupMembers:(v,w,C="replace")=>b("/org/members",{method:"POST",body:{sandboxes:v,groups:w,mode:C}}),savePolicy:v=>b("/egress/policies",{method:"POST",body:v}),deletePolicy:v=>b(`/egress/policies/${encodeURIComponent(v)}/delete`,{method:"POST",body:{}}),saveTemplate:v=>b("/templates",{method:"POST",body:v}),deleteTemplate:v=>b(`/templates/${encodeURIComponent(v)}/delete`,{method:"POST",body:{}}),localFolder:v=>b("/local-folder",{method:"POST",body:{path:v}}),files:(v,w)=>b(`/files/${encodeURIComponent(v)}?path=${encodeURIComponent(w)}`),seed:v=>b(`/files/${encodeURIComponent(v)}/seed`),retrySeed:v=>b(`/files/${encodeURIComponent(v)}/seed/retry`,{method:"POST",body:{}}),prepareDownload:(v,w)=>b(`/files/${encodeURIComponent(v)}/download`,{method:"POST",body:{path:w}}),startUpload:v=>b(`/files/${encodeURIComponent(v)}/uploads`,{method:"POST",body:{}}),uploadFile:(v,w,C,S,N)=>b(`/files/${encodeURIComponent(v)}/uploads/${w}?path=${encodeURIComponent(C)}`,{method:"POST",body:S,raw:!0,signal:N}),commitUpload:(v,w,C)=>b(`/files/${encodeURIComponent(v)}/uploads/${w}/commit`,{method:"POST",body:{dir:C}}),cancelUpload:(v,w)=>b(`/files/${encodeURIComponent(v)}/uploads/${w}/cancel`,{method:"POST",body:{}}),ingress:()=>b("/ingress"),exposeService:v=>b("/ingress/expose",{method:"POST",body:v}),closeService:v=>b("/ingress/close",{method:"POST",body:{sandbox:v.sandbox,name:v.name}}),extendService:(v,w)=>b("/ingress/extend",{method:"POST",body:{sandbox:v.sandbox,name:v.name,closeAfterMinutes:w}})}}const cs=lr(),hk="https://console.openrod.io".trim(),ku=/^https:\/\/[a-z0-9.-]+(:\d+)?$/i.test(hk)?hk:"",mk="Cloud is coming soon. We're still working on it.";function Ag(){return typeof window<"u"}function Us(e){return $1(e)?(e.nodeName||"").toLowerCase():"#document"}function Rn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ei(e){var t;return(t=($1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $1(e){return Ag()?e instanceof Node||e instanceof Rn(e).Node:!1}function Ft(e){return Ag()?e instanceof Element||e instanceof Rn(e).Element:!1}function wn(e){return Ag()?e instanceof HTMLElement||e instanceof Rn(e).HTMLElement:!1}function Tu(e){return!Ag()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Rn(e).ShadowRoot}function zf(e){const{overflow:t,overflowX:r,overflowY:a,display:i}=Br(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+r)&&i!=="inline"&&i!=="contents"}function i6(e){return/^(table|td|th)$/.test(Us(e))}function Mg(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const l6=/transform|translate|scale|rotate|perspective|filter/,c6=/paint|layout|strict|content/,Pl=e=>!!e&&e!=="none";let fv;function B1(e){const t=Ft(e)?Br(e):e;return Pl(t.transform)||Pl(t.translate)||Pl(t.scale)||Pl(t.rotate)||Pl(t.perspective)||!V1()&&(Pl(t.backdropFilter)||Pl(t.filter))||l6.test(t.willChange||"")||c6.test(t.contain||"")}function u6(e){let t=Ya(e);for(;wn(t)&&!Ua(t);){if(B1(t))return t;if(Mg(t))return null;t=Ya(t)}return null}function V1(){return fv==null&&(fv=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),fv}function Ua(e){return/^(html|body|#document)$/.test(Us(e))}function Br(e){return Rn(e).getComputedStyle(e)}function Og(e){return Ft(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ya(e){if(Us(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Tu(e)&&e.host||ei(e);return Tu(t)?t.host:t}function WR(e){const t=Ya(e);return Ua(t)?(e.ownerDocument||e).body:wn(t)&&zf(t)?t:WR(t)}function pf(e,t,r){var a;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=WR(e),c=i===((a=e.ownerDocument)==null?void 0:a.body),u=Rn(i);if(c){const f=vy(u);return t.concat(u,u.visualViewport||[],zf(i)?i:[],f&&r?pf(f):[])}else return t.concat(i,pf(i,[],r))}function vy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const U1={...zP},pk={};function bs(e,t){const r=x.useRef(pk);return r.current===pk&&(r.current=e(t)),r}const hv=U1.useInsertionEffect,d6=hv&&hv!==U1.useLayoutEffect?hv:e=>e();function st(e){const t=bs(f6).current;return t.next=e,d6(t.effect),t.trampoline}function f6(){const e={next:void 0,callback:h6,trampoline:(...t)=>{var r;return(r=e.callback)==null?void 0:r.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function h6(){}const m6=()=>{},We=typeof document<"u"?x.useLayoutEffect:m6;function yy(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const H1={};function Qs(e,t,r,a,i){if(!r&&!a&&!i&&!e)return Fp(t);let c=Fp(e);return t&&(c=Kd(c,t)),r&&(c=Kd(c,r)),a&&(c=Kd(c,a)),i&&(c=Kd(c,i)),c}function p6(e){if(e.length===0)return H1;if(e.length===1)return Fp(e[0]);let t=Fp(e[0]);for(let r=1;r<e.length;r+=1)t=Kd(t,e[r]);return t}function Fp(e){return F1(e)?{...ZR(e,H1)}:g6(e)}function Kd(e,t){return F1(t)?ZR(t,e):x6(e,t)}function g6(e){const t={...e};for(const r in t){const a=t[r];QR(r,a)&&(t[r]=JR(a))}return t}function x6(e,t){if(!t)return e;for(const r in t){const a=t[r];switch(r){case"style":{e[r]=yy(e.style,a);break}case"className":{e[r]=eA(e.className,a);break}default:QR(r,a)?e[r]=b6(e[r],a):e[r]=a}}return e}function QR(e,t){const r=e.charCodeAt(0),a=e.charCodeAt(1),i=e.charCodeAt(2);return r===111&&a===110&&i>=65&&i<=90&&(typeof t=="function"||typeof t>"u")}function F1(e){return typeof e=="function"}function ZR(e,t){return F1(e)?e(t):e??H1}function b6(e,t){return t?e?(...r)=>{const a=r[0];if(tA(a)){const c=a;Gp(c);const u=t(...r);return c.baseUIHandlerPrevented||e==null||e(...r),u}const i=t(...r);return e==null||e(...r),i}:JR(t):e}function JR(e){return e&&((...t)=>{const r=t[0];return tA(r)&&Gp(r),e(...t)})}function Gp(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function eA(e,t){return t?e?t+" "+e:t:e}function tA(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function v6(e,t){return function(a,...i){const c=new URL(e);return c.searchParams.set("code",a.toString()),i.forEach(u=>c.searchParams.append("args[]",u)),`${t} error #${a}; visit ${c} for the full message.`}}const sn=v6("https://base-ui.com/production-error","Base UI"),nA=x.createContext(void 0);function Dg(e=!1){const t=x.useContext(nA);if(t===void 0&&!e)throw new Error(sn(16));return t}function y6(e){const{focusableWhenDisabled:t,disabled:r,composite:a=!1,tabIndex:i=0,isNativeButton:c}=e,u=a&&t!==!1,f=a&&t===!1;return{props:x.useMemo(()=>{const h={onKeyDown(g){r&&t&&g.key!=="Tab"&&g.preventDefault()}};return a||(h.tabIndex=i,!c&&r&&(h.tabIndex=t?i:-1)),(c&&(t||u)||!c&&r)&&(h["aria-disabled"]=r),c&&(!t||f)&&(h.disabled=r),h},[a,r,t,u,f,c,i])}}function Ht(e){return(e==null?void 0:e.ownerDocument)||document}function hu(e,t,{detail:r=0}={}){e.dispatchEvent(new(Rn(e)).PointerEvent("click",{bubbles:!0,cancelable:!0,composed:!0,detail:r,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function bo(e={}){const{disabled:t=!1,focusableWhenDisabled:r,tabIndex:a=0,native:i=!0,composite:c}=e,u=x.useRef(null),f=Dg(!0),m=c??f!==void 0,{props:h}=y6({focusableWhenDisabled:r,disabled:t,composite:m,tabIndex:a,isNativeButton:i}),g=x.useCallback(()=>{const v=u.current;mv(v)&&m&&t&&h.disabled===void 0&&v.disabled&&(v.disabled=!1)},[t,h.disabled,m]);We(g,[g]);const p=x.useCallback((v={})=>{const{onClick:w,onMouseDown:C,onKeyUp:S,onKeyDown:N,onPointerDown:E,...T}=v;return Qs({onClick(R){if(t){R.preventDefault();return}w==null||w(R)},onMouseDown(R){t||C==null||C(R)},onKeyDown(R){if(t||(Gp(R),N==null||N(R),R.baseUIHandlerPrevented))return;const M=R.target===R.currentTarget,A=R.currentTarget,k=mv(A),O=!i&&w6(A),D=M&&(i?k:!O),_=R.key==="Enter",H=R.key===" ",G=A.getAttribute("role"),B=(G==null?void 0:G.startsWith("menuitem"))||G==="option"||G==="gridcell";if(M&&m&&H){if(R.defaultPrevented&&B)return;R.preventDefault(),(!i||k)&&(R.preventBaseUIHandler(),hu(A,R));return}if(!D||i||!H&&!_){M&&O&&H&&R.preventDefault();return}R.defaultPrevented||(R.preventDefault(),_&&(R.preventBaseUIHandler(),hu(A,R)))},onKeyUp(R){if(!t){if(Gp(R),S==null||S(R),R.target===R.currentTarget&&i&&m&&mv(R.currentTarget)&&R.key===" "){R.preventDefault();return}R.baseUIHandlerPrevented||R.target===R.currentTarget&&!i&&!m&&!R.defaultPrevented&&R.key===" "&&(R.preventBaseUIHandler(),hu(R.currentTarget,R))}},onPointerDown(R){if(t){R.preventDefault();return}E==null||E(R)}},i?{type:"button"}:{role:"button"},h,T)},[t,h,m,i]),b=st(v=>{u.current=v,g()});return{getButtonProps:p,buttonRef:b}}function mv(e){return wn(e)&&e.tagName==="BUTTON"}function w6(e){return wn(e)&&e.tagName==="A"&&!!e.href}function mo(e,t,r,a){const i=bs(sA).current;return S6(i,e,t,r,a)&&rA(i,[e,t,r,a]),i.callback}function j6(e){const t=bs(sA).current;return N6(t,e)&&rA(t,e),t.callback}function sA(){return{callback:null,cleanup:null,refs:[]}}function S6(e,t,r,a,i){return e.refs[0]!==t||e.refs[1]!==r||e.refs[2]!==a||e.refs[3]!==i}function N6(e,t){return e.refs.length!==t.length||e.refs.some((r,a)=>r!==t[a])}function rA(e,t){if(e.refs=t,t.every(r=>r==null)){e.callback=null;return}e.callback=r=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),r!=null){const a=Array(t.length).fill(null);for(let i=0;i<t.length;i+=1){const c=t[i];if(c!=null)switch(typeof c){case"function":{const u=c(r);typeof u=="function"&&(a[i]=u);break}case"object":{c.current=r;break}}}e.cleanup=()=>{for(let i=0;i<t.length;i+=1){const c=t[i];if(c!=null)switch(typeof c){case"function":{const u=a[i];typeof u=="function"?u():c(null);break}case"object":{c.current=null;break}}}}}}}const C6=parseInt(x.version,10);function G1(e){return C6>=e}function gk(e){if(!x.isValidElement(e))return null;const t=e,r=t.props;return(G1(19)?r==null?void 0:r.ref:t.ref)??null}function Ln(){}const Vr=Object.freeze([]),En=Object.freeze({});function k6(e,t){const r={};for(const a in e){const i=e[a];if(t!=null&&t.hasOwnProperty(a)){const c=t[a](i);c!=null&&Object.assign(r,c);continue}i===!0?r[`data-${a.toLowerCase()}`]="":i&&(r[`data-${a.toLowerCase()}`]=i.toString())}return r}function T6(e,t){return typeof e=="function"?e(t):e}function oA(e,t){return typeof e=="function"?e(t):e}function Nt(e,t,r={}){let a=t.render;r.enabled!==!1&&(a=M6(a));const i=E6(t,r,a);if(r.enabled===!1)return null;const c=r.state??En;return O6(e,a,i,c)}function E6(e,t,r){const{className:a,style:i}=e,{state:c=En,ref:u,props:f,stateAttributesMapping:m,enabled:h=!0}=t,g=h?T6(a,c):void 0,p=h?oA(i,c):void 0,b=h?k6(c,m):En,v=h&&f?R6(f):void 0,w=h?yy(b,v)??{}:En;return typeof document<"u"&&(h?Array.isArray(u)?w.ref=j6([w.ref,gk(r),...u]):w.ref=mo(w.ref,gk(r),u):mo(null,null)),h?(g!==void 0&&(w.className=eA(w.className,g)),p!==void 0&&(w.style=yy(w.style,p)),w):En}function R6(e){return Array.isArray(e)?p6(e):Qs(void 0,e)}const A6=Symbol.for("react.lazy");function M6(e){if((e==null?void 0:e.$$typeof)!==A6)return e;const t=x.Children.toArray(e)[0];return x.isValidElement(t)?t:e}function O6(e,t,r,a){if(t){if(typeof t=="function")return t(r,a);const i=Qs(r,t.props);return i.ref=r.ref,x.cloneElement(t,i)}if(e&&typeof e=="string")return D6(e,r);throw new Error(sn(8))}function D6(e,t){return e==="button"?x.createElement("button",{type:"button",...t,key:t.key}):e==="img"?x.createElement("img",{alt:"",...t,key:t.key}):x.createElement(e,t)}const z6=x.forwardRef(function(t,r){const{render:a,className:i,disabled:c=!1,focusableWhenDisabled:u=!1,nativeButton:f=!0,style:m,...h}=t,{getButtonProps:g,buttonRef:p}=bo({disabled:c,focusableWhenDisabled:u,native:f});return Nt("button",t,{state:{disabled:c},ref:[r,p],props:[h,g]})});function aA(e){var t,r,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=aA(e[t]))&&(a&&(a+=" "),a+=r)}else for(r in e)e[r]&&(a&&(a+=" "),a+=r);return a}function iA(){for(var e,t,r=0,a="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=aA(e))&&(a&&(a+=" "),a+=t);return a}const xk=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,bk=iA,If=(e,t)=>r=>{var a;if((t==null?void 0:t.variants)==null)return bk(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:c}=t,u=Object.keys(i).map(h=>{const g=r==null?void 0:r[h],p=c==null?void 0:c[h];if(g===null)return null;const b=xk(g)||xk(p);return i[h][b]}),f=r&&Object.entries(r).reduce((h,g)=>{let[p,b]=g;return b===void 0||(h[p]=b),h},{}),m=t==null||(a=t.compoundVariants)===null||a===void 0?void 0:a.reduce((h,g)=>{let{class:p,className:b,...v}=g;return Object.entries(v).every(w=>{let[C,S]=w;return Array.isArray(S)?S.includes({...c,...f}[C]):{...c,...f}[C]===S})?[...h,p,b]:h},[]);return bk(e,u,m,r==null?void 0:r.class,r==null?void 0:r.className)},I6=(e,t)=>{const r=new Array(e.length+t.length);for(let a=0;a<e.length;a++)r[a]=e[a];for(let a=0;a<t.length;a++)r[e.length+a]=t[a];return r},P6=(e,t)=>({classGroupId:e,validator:t}),lA=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),qp="-",vk=[],_6="arbitrary..",L6=e=>{const t=B6(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return $6(u);const f=u.split(qp),m=f[0]===""&&f.length>1?1:0;return cA(f,m,t)},getConflictingClassGroupIds:(u,f)=>{if(f){const m=a[u],h=r[u];return m?h?I6(h,m):m:h||vk}return r[u]||vk}}},cA=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const i=e[t],c=r.nextPart.get(i);if(c){const h=cA(e,t+1,c);if(h)return h}const u=r.validators;if(u===null)return;const f=t===0?e.join(qp):e.slice(t).join(qp),m=u.length;for(let h=0;h<m;h++){const g=u[h];if(g.validator(f))return g.classGroupId}},$6=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),a=t.slice(0,r);return a?_6+a:void 0})(),B6=e=>{const{theme:t,classGroups:r}=e;return V6(r,t)},V6=(e,t)=>{const r=lA();for(const a in e){const i=e[a];q1(i,r,a,t)}return r},q1=(e,t,r,a)=>{const i=e.length;for(let c=0;c<i;c++){const u=e[c];U6(u,t,r,a)}},U6=(e,t,r,a)=>{if(typeof e=="string"){H6(e,t,r);return}if(typeof e=="function"){F6(e,t,r,a);return}G6(e,t,r,a)},H6=(e,t,r)=>{const a=e===""?t:uA(t,e);a.classGroupId=r},F6=(e,t,r,a)=>{if(q6(e)){q1(e(a),t,r,a);return}t.validators===null&&(t.validators=[]),t.validators.push(P6(r,e))},G6=(e,t,r,a)=>{const i=Object.entries(e),c=i.length;for(let u=0;u<c;u++){const[f,m]=i[u];q1(m,uA(t,f),r,a)}},uA=(e,t)=>{let r=e;const a=t.split(qp),i=a.length;for(let c=0;c<i;c++){const u=a[c];let f=r.nextPart.get(u);f||(f=lA(),r.nextPart.set(u,f)),r=f}return r},q6=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Y6=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),a=Object.create(null);const i=(c,u)=>{r[c]=u,t++,t>e&&(t=0,a=r,r=Object.create(null))};return{get(c){let u=r[c];if(u!==void 0)return u;if((u=a[c])!==void 0)return i(c,u),u},set(c,u){c in r?r[c]=u:i(c,u)}}},wy="!",yk=":",K6=[],wk=(e,t,r,a,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:a,isExternal:i}),X6=e=>{const{prefix:t,experimentalParseClassName:r}=e;let a=i=>{const c=[];let u=0,f=0,m=0,h;const g=i.length;for(let C=0;C<g;C++){const S=i[C];if(u===0&&f===0){if(S===yk){c.push(i.slice(m,C)),m=C+1;continue}if(S==="/"){h=C;continue}}S==="["?u++:S==="]"?u--:S==="("?f++:S===")"&&f--}const p=c.length===0?i:i.slice(m);let b=p,v=!1;p.endsWith(wy)?(b=p.slice(0,-1),v=!0):p.startsWith(wy)&&(b=p.slice(1),v=!0);const w=h&&h>m?h-m:void 0;return wk(c,v,b,w)};if(t){const i=t+yk,c=a;a=u=>u.startsWith(i)?c(u.slice(i.length)):wk(K6,!1,u,void 0,!0)}if(r){const i=a;a=c=>r({className:c,parseClassName:i})}return a},W6=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,a)=>{t.set(r,1e6+a)}),r=>{const a=[];let i=[];for(let c=0;c<r.length;c++){const u=r[c],f=u[0]==="[",m=t.has(u);f||m?(i.length>0&&(i.sort(),a.push(...i),i=[]),a.push(u)):i.push(u)}return i.length>0&&(i.sort(),a.push(...i)),a}},Q6=e=>({cache:Y6(e.cacheSize),parseClassName:X6(e),sortModifiers:W6(e),postfixLookupClassGroupIds:Z6(e),...L6(e)}),Z6=e=>{const t=Object.create(null),r=e.postfixLookupClassGroups;if(r)for(let a=0;a<r.length;a++)t[r[a]]=!0;return t},J6=/\s+/,e_=(e,t)=>{const{parseClassName:r,getClassGroupId:a,getConflictingClassGroupIds:i,sortModifiers:c,postfixLookupClassGroupIds:u}=t,f=[],m=e.trim().split(J6);let h="";for(let g=m.length-1;g>=0;g-=1){const p=m[g],{isExternal:b,modifiers:v,hasImportantModifier:w,baseClassName:C,maybePostfixModifierPosition:S}=r(p);if(b){h=p+(h.length>0?" "+h:h);continue}let N=!!S,E;if(N){const k=C.substring(0,S);E=a(k);const O=E&&u[E]?a(C):void 0;O&&O!==E&&(E=O,N=!1)}else E=a(C);if(!E){if(!N){h=p+(h.length>0?" "+h:h);continue}if(E=a(C),!E){h=p+(h.length>0?" "+h:h);continue}N=!1}const T=v.length===0?"":v.length===1?v[0]:c(v).join(":"),R=w?T+wy:T,M=R+E;if(f.indexOf(M)>-1)continue;f.push(M);const A=i(E,N);for(let k=0;k<A.length;++k){const O=A[k];f.push(R+O)}h=p+(h.length>0?" "+h:h)}return h},t_=(...e)=>{let t=0,r,a,i="";for(;t<e.length;)(r=e[t++])&&(a=dA(r))&&(i&&(i+=" "),i+=a);return i},dA=e=>{if(typeof e=="string")return e;let t,r="";for(let a=0;a<e.length;a++)e[a]&&(t=dA(e[a]))&&(r&&(r+=" "),r+=t);return r},n_=(e,...t)=>{let r,a,i,c;const u=m=>{const h=t.reduce((g,p)=>p(g),e());return r=Q6(h),a=r.cache.get,i=r.cache.set,c=f,f(m)},f=m=>{const h=a(m);if(h)return h;const g=e_(m,r);return i(m,g),g};return c=u,(...m)=>c(t_(...m))},s_=[],ms=e=>{const t=r=>r[e]||s_;return t.isThemeGetter=!0,t.themeKey=e,t},fA=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,hA=/^\((?:(\w[\w-]*):)?(.+)\)$/i,r_=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,o_=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,a_=/\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$/,i_=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,l_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,c_=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ii=e=>r_.test(e),Ut=e=>!!e&&!Number.isNaN(Number(e)),Qo=e=>!!e&&Number.isInteger(Number(e)),pv=e=>e.endsWith("%")&&Ut(e.slice(0,-1)),Pa=e=>o_.test(e),mA=()=>!0,u_=e=>a_.test(e)&&!i_.test(e),Y1=()=>!1,d_=e=>l_.test(e),f_=e=>c_.test(e),h_=e=>!dt(e)&&!ft(e),m_=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),p_=e=>sl(e,xA,Y1),dt=e=>fA.test(e),_l=e=>sl(e,bA,u_),jk=e=>sl(e,S_,Ut),g_=e=>sl(e,yA,mA),x_=e=>sl(e,vA,Y1),Sk=e=>sl(e,pA,Y1),b_=e=>sl(e,gA,f_),Mm=e=>sl(e,wA,d_),ft=e=>hA.test(e),Bd=e=>fc(e,bA),v_=e=>fc(e,vA),Nk=e=>fc(e,pA),y_=e=>fc(e,xA),w_=e=>fc(e,gA),Om=e=>fc(e,wA,!0),j_=e=>fc(e,yA,!0),sl=(e,t,r)=>{const a=fA.exec(e);return a?a[1]?t(a[1]):r(a[2]):!1},fc=(e,t,r=!1)=>{const a=hA.exec(e);return a?a[1]?t(a[1]):r:!1},pA=e=>e==="position"||e==="percentage",gA=e=>e==="image"||e==="url",xA=e=>e==="length"||e==="size"||e==="bg-size",bA=e=>e==="length",S_=e=>e==="number",vA=e=>e==="family-name",yA=e=>e==="number"||e==="weight",wA=e=>e==="shadow",N_=()=>{const e=ms("color"),t=ms("font"),r=ms("text"),a=ms("font-weight"),i=ms("tracking"),c=ms("leading"),u=ms("breakpoint"),f=ms("container"),m=ms("spacing"),h=ms("radius"),g=ms("shadow"),p=ms("inset-shadow"),b=ms("text-shadow"),v=ms("drop-shadow"),w=ms("blur"),C=ms("perspective"),S=ms("aspect"),N=ms("ease"),E=ms("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],M=()=>[...R(),ft,dt],A=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],O=()=>[ft,dt,m],D=()=>[Ii,"full","auto",...O()],_=()=>[Qo,"none","subgrid",ft,dt],H=()=>["auto",{span:["full",Qo,ft,dt]},Qo,ft,dt],G=()=>[Qo,"auto",ft,dt],B=()=>["auto","min","max","fr",ft,dt],P=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],Y=()=>["auto",...O()],W=()=>[Ii,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...O()],q=()=>[f,Ii,"screen","full","dvw","lvw","svw","min","max","fit",...O()],ee=()=>[Ii,"screen","full","lh","dvh","lvh","svh","min","max","fit",...O()],z=()=>[e,ft,dt],L=()=>[...R(),Nk,Sk,{position:[ft,dt]}],X=()=>["no-repeat",{repeat:["","x","y","space","round"]}],te=()=>["auto","cover","contain",y_,p_,{size:[ft,dt]}],$=()=>[pv,Bd,_l],U=()=>["","none","full",h,ft,dt],F=()=>["",Ut,Bd,_l],K=()=>["solid","dashed","dotted","double"],se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ne=()=>[Ut,pv,Nk,Sk],ye=()=>["","none",w,ft,dt],ae=()=>["none",Ut,ft,dt],le=()=>["none",Ut,ft,dt],re=()=>[Ut,ft,dt],Q=()=>[Ii,"full",...O()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Pa],breakpoint:[Pa],color:[mA],container:[Pa],"drop-shadow":[Pa],ease:["in","out","in-out"],font:[h_],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Pa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Pa],shadow:[Pa],spacing:["px",Ut],text:[Pa],"text-shadow":[Pa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ii,dt,ft,S]}],container:["container"],"container-type":[{"@container":["","normal","size",ft,dt]}],"container-named":[m_],columns:[{columns:[Ut,"auto",dt,ft,f]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"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:M()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{"inset-s":D(),start:D()}],end:[{"inset-e":D(),end:D()}],"inset-bs":[{"inset-bs":D()}],"inset-be":[{"inset-be":D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[Qo,"auto",ft,dt]}],basis:[{basis:[Ii,"full","auto",f,...O()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ut,Ii,"auto","initial","none",dt]}],grow:[{grow:["",Ut,ft,dt]}],shrink:[{shrink:["",Ut,ft,dt]}],order:[{order:[Qo,"first","last","none",ft,dt]}],"grid-cols":[{"grid-cols":_()}],"col-start-end":[{col:H()}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":_()}],"row-start-end":[{row:H()}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":B()}],"auto-rows":[{"auto-rows":B()}],gap:[{gap:O()}],"gap-x":[{"gap-x":O()}],"gap-y":[{"gap-y":O()}],"justify-content":[{justify:[...P(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...P()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":P()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:O()}],px:[{px:O()}],py:[{py:O()}],ps:[{ps:O()}],pe:[{pe:O()}],pbs:[{pbs:O()}],pbe:[{pbe:O()}],pt:[{pt:O()}],pr:[{pr:O()}],pb:[{pb:O()}],pl:[{pl:O()}],m:[{m:Y()}],mx:[{mx:Y()}],my:[{my:Y()}],ms:[{ms:Y()}],me:[{me:Y()}],mbs:[{mbs:Y()}],mbe:[{mbe:Y()}],mt:[{mt:Y()}],mr:[{mr:Y()}],mb:[{mb:Y()}],ml:[{ml:Y()}],"space-x":[{"space-x":O()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":O()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],"inline-size":[{inline:["auto",...q()]}],"min-inline-size":[{"min-inline":["auto",...q()]}],"max-inline-size":[{"max-inline":["none",...q()]}],"block-size":[{block:["auto",...ee()]}],"min-block-size":[{"min-block":["auto",...ee()]}],"max-block-size":[{"max-block":["none",...ee()]}],w:[{w:[f,"screen",...W()]}],"min-w":[{"min-w":[f,"screen","none",...W()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[u]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh","none",...W()]}],"font-size":[{text:["base",r,Bd,_l]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,j_,g_]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",pv,dt]}],"font-family":[{font:[v_,x_,t]}],"font-features":[{"font-features":[dt]}],"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:[i,ft,dt]}],"line-clamp":[{"line-clamp":[Ut,"none",ft,jk]}],leading:[{leading:["none",c,...O()]}],"list-image":[{"list-image":["none",ft,dt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ft,dt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:z()}],"text-color":[{text:z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ut,"from-font","auto",ft,_l]}],"text-decoration-color":[{decoration:z()}],"underline-offset":[{"underline-offset":[Ut,"auto",ft,dt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"tab-size":[{tab:[Qo,ft,dt]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ft,dt]}],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",ft,dt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:X()}],"bg-size":[{bg:te()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Qo,ft,dt],radial:["",ft,dt],conic:["",Qo,ft,dt]},w_,b_]}],"bg-color":[{bg:z()}],"gradient-from-pos":[{from:$()}],"gradient-via-pos":[{via:$()}],"gradient-to-pos":[{to:$()}],"gradient-from":[{from:z()}],"gradient-via":[{via:z()}],"gradient-to":[{to:z()}],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:F()}],"border-w-x":[{"border-x":F()}],"border-w-y":[{"border-y":F()}],"border-w-s":[{"border-s":F()}],"border-w-e":[{"border-e":F()}],"border-w-bs":[{"border-bs":F()}],"border-w-be":[{"border-be":F()}],"border-w-t":[{"border-t":F()}],"border-w-r":[{"border-r":F()}],"border-w-b":[{"border-b":F()}],"border-w-l":[{"border-l":F()}],"divide-x":[{"divide-x":F()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":F()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...K(),"hidden","none"]}],"divide-style":[{divide:[...K(),"hidden","none"]}],"border-color":[{border:z()}],"border-color-x":[{"border-x":z()}],"border-color-y":[{"border-y":z()}],"border-color-s":[{"border-s":z()}],"border-color-e":[{"border-e":z()}],"border-color-bs":[{"border-bs":z()}],"border-color-be":[{"border-be":z()}],"border-color-t":[{"border-t":z()}],"border-color-r":[{"border-r":z()}],"border-color-b":[{"border-b":z()}],"border-color-l":[{"border-l":z()}],"divide-color":[{divide:z()}],"outline-style":[{outline:[...K(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ut,ft,dt]}],"outline-w":[{outline:["",Ut,Bd,_l]}],"outline-color":[{outline:z()}],shadow:[{shadow:["","inner","none",g,Om,Mm]}],"shadow-color":[{shadow:z()}],"inset-shadow":[{"inset-shadow":["none",p,Om,Mm]}],"inset-shadow-color":[{"inset-shadow":z()}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:z()}],"ring-offset-w":[{"ring-offset":[Ut,_l]}],"ring-offset-color":[{"ring-offset":z()}],"inset-ring-w":[{"inset-ring":F()}],"inset-ring-color":[{"inset-ring":z()}],"text-shadow":[{"text-shadow":["none",b,Om,Mm]}],"text-shadow-color":[{"text-shadow":z()}],opacity:[{opacity:[Ut,ft,dt]}],"mix-blend":[{"mix-blend":[...se(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":se()}],"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":[Ut]}],"mask-image-linear-from-pos":[{"mask-linear-from":ne()}],"mask-image-linear-to-pos":[{"mask-linear-to":ne()}],"mask-image-linear-from-color":[{"mask-linear-from":z()}],"mask-image-linear-to-color":[{"mask-linear-to":z()}],"mask-image-t-from-pos":[{"mask-t-from":ne()}],"mask-image-t-to-pos":[{"mask-t-to":ne()}],"mask-image-t-from-color":[{"mask-t-from":z()}],"mask-image-t-to-color":[{"mask-t-to":z()}],"mask-image-r-from-pos":[{"mask-r-from":ne()}],"mask-image-r-to-pos":[{"mask-r-to":ne()}],"mask-image-r-from-color":[{"mask-r-from":z()}],"mask-image-r-to-color":[{"mask-r-to":z()}],"mask-image-b-from-pos":[{"mask-b-from":ne()}],"mask-image-b-to-pos":[{"mask-b-to":ne()}],"mask-image-b-from-color":[{"mask-b-from":z()}],"mask-image-b-to-color":[{"mask-b-to":z()}],"mask-image-l-from-pos":[{"mask-l-from":ne()}],"mask-image-l-to-pos":[{"mask-l-to":ne()}],"mask-image-l-from-color":[{"mask-l-from":z()}],"mask-image-l-to-color":[{"mask-l-to":z()}],"mask-image-x-from-pos":[{"mask-x-from":ne()}],"mask-image-x-to-pos":[{"mask-x-to":ne()}],"mask-image-x-from-color":[{"mask-x-from":z()}],"mask-image-x-to-color":[{"mask-x-to":z()}],"mask-image-y-from-pos":[{"mask-y-from":ne()}],"mask-image-y-to-pos":[{"mask-y-to":ne()}],"mask-image-y-from-color":[{"mask-y-from":z()}],"mask-image-y-to-color":[{"mask-y-to":z()}],"mask-image-radial":[{"mask-radial":[ft,dt]}],"mask-image-radial-from-pos":[{"mask-radial-from":ne()}],"mask-image-radial-to-pos":[{"mask-radial-to":ne()}],"mask-image-radial-from-color":[{"mask-radial-from":z()}],"mask-image-radial-to-color":[{"mask-radial-to":z()}],"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":R()}],"mask-image-conic-pos":[{"mask-conic":[Ut]}],"mask-image-conic-from-pos":[{"mask-conic-from":ne()}],"mask-image-conic-to-pos":[{"mask-conic-to":ne()}],"mask-image-conic-from-color":[{"mask-conic-from":z()}],"mask-image-conic-to-color":[{"mask-conic-to":z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:X()}],"mask-size":[{mask:te()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ft,dt]}],filter:[{filter:["","none",ft,dt]}],blur:[{blur:ye()}],brightness:[{brightness:[Ut,ft,dt]}],contrast:[{contrast:[Ut,ft,dt]}],"drop-shadow":[{"drop-shadow":["","none",v,Om,Mm]}],"drop-shadow-color":[{"drop-shadow":z()}],grayscale:[{grayscale:["",Ut,ft,dt]}],"hue-rotate":[{"hue-rotate":[Ut,ft,dt]}],invert:[{invert:["",Ut,ft,dt]}],saturate:[{saturate:[Ut,ft,dt]}],sepia:[{sepia:["",Ut,ft,dt]}],"backdrop-filter":[{"backdrop-filter":["","none",ft,dt]}],"backdrop-blur":[{"backdrop-blur":ye()}],"backdrop-brightness":[{"backdrop-brightness":[Ut,ft,dt]}],"backdrop-contrast":[{"backdrop-contrast":[Ut,ft,dt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ut,ft,dt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ut,ft,dt]}],"backdrop-invert":[{"backdrop-invert":["",Ut,ft,dt]}],"backdrop-opacity":[{"backdrop-opacity":[Ut,ft,dt]}],"backdrop-saturate":[{"backdrop-saturate":[Ut,ft,dt]}],"backdrop-sepia":[{"backdrop-sepia":["",Ut,ft,dt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":O()}],"border-spacing-x":[{"border-spacing-x":O()}],"border-spacing-y":[{"border-spacing-y":O()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ft,dt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ut,"initial",ft,dt]}],ease:[{ease:["linear","initial",N,ft,dt]}],delay:[{delay:[Ut,ft,dt]}],animate:[{animate:["none",E,ft,dt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,ft,dt]}],"perspective-origin":[{"perspective-origin":M()}],rotate:[{rotate:ae()}],"rotate-x":[{"rotate-x":ae()}],"rotate-y":[{"rotate-y":ae()}],"rotate-z":[{"rotate-z":ae()}],scale:[{scale:le()}],"scale-x":[{"scale-x":le()}],"scale-y":[{"scale-y":le()}],"scale-z":[{"scale-z":le()}],"scale-3d":["scale-3d"],skew:[{skew:re()}],"skew-x":[{"skew-x":re()}],"skew-y":[{"skew-y":re()}],transform:[{transform:[ft,dt,"","none","gpu","cpu"]}],"transform-origin":[{origin:M()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Q()}],"translate-x":[{"translate-x":Q()}],"translate-y":[{"translate-y":Q()}],"translate-z":[{"translate-z":Q()}],"translate-none":["translate-none"],zoom:[{zoom:[Qo,ft,dt]}],accent:[{accent:z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:z()}],"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",ft,dt]}],"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":z()}],"scrollbar-track-color":[{"scrollbar-track":z()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mbs":[{"scroll-mbs":O()}],"scroll-mbe":[{"scroll-mbe":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pbs":[{"scroll-pbs":O()}],"scroll-pbe":[{"scroll-pbe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"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",ft,dt]}],fill:[{fill:["none",...z()]}],"stroke-w":[{stroke:[Ut,Bd,_l,jk]}],stroke:[{stroke:["none",...z()]}],"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":["start","end","right","left"],"inset-y":["inset-bs","inset-be","top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["ps","pe","pr","pl"],py:["pbs","pbe","pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["ms","me","mr","ml"],my:["mbs","mbe","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-s","border-w-e","border-w-r","border-w-l"],"border-w-y":["border-w-bs","border-w-be","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-s","border-color-e","border-color-r","border-color-l"],"border-color-y":["border-color-bs","border-color-be","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-ms","scroll-me","scroll-mr","scroll-ml"],"scroll-my":["scroll-mbs","scroll-mbe","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-ps","scroll-pe","scroll-pr","scroll-pl"],"scroll-py":["scroll-pbs","scroll-pbe","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"]}},C_=n_(N_);function Ve(...e){return C_(iA(e))}const k_=If("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function ie({className:e,variant:t="default",size:r="default",...a}){return n.jsx(z6,{"data-slot":"button",className:Ve(k_({variant:t,size:r,className:e})),...a})}const jA=48,ya=(e,t=0)=>{const r=new Int32Array(e.length);for(let a=0;a<e.length;a++)r[a]=e.charCodeAt(a)-jA-t;return r},zg=e=>{const t=new Int32Array(e.length+1);for(let r=0;r<e.length;r++)t[r+1]=t[r]+e[r];return t},Qi=e=>{const t=new Int32Array(e.length);let r=0;for(let a=0;a<e.length;a++){const i=e.charCodeAt(a)-jA;r+=i>>>1^-(i&1),t[a]=r}return t},T_=384,E_=[],Hl=zg(ya("E0500002005282000000002000150000020021820000011200000003022202000300004200120000200420001200021200301200010400162000010000220021010:2192001200220012000220012000200200200400010200040000000000400200108200110100000022010313000162002000020020012020080213000228200000000082000000000120002000120020020040101020300130001001010")),R_=zg(ya(":11111111211111119311546544411119731869:671397415686432441111111111161114151214313433415:78311132233313187211117221449443411141111151152226611131111112212518142224214215421421542142424242516171151615616347111111111197911327451111111111111111111113134714133513411111311111111111111111111112444411111342312715245411117:3")),A_="@containerabcdefghinlmoprstunderlineviawzccentlignnimatespectuto-colsrowsaglorightnessckdrop-sisbcontrastfiltergrayscalehue-rotateinvertopacityslurrightnessaturateepia-coniclinearpositionradialsizeockurrderttom-belrstxyespacing-xyaretoursorlnt-umnsendspantartainentrasteividerop-shadowurationcorationlay-xyasendillexontromlter-featuresstretchapr-xyayscaleidow-colsrowsue-rotatedentlinesetvert-beringsxyeshadoweiadingftnest-clamp-imageabein-lrstxyskx--b-coniclpositionrsizet-x-y-fromto-fromto-inearfromto-fromto-adialfromto-fromtofromtofromtofromtoblockhinlinew-screenesblockhinlinewbjectpacityrutlinederigin-offsetbelrstxyesrspective-originaceholderioghtng-offsettateundedw-xyz-belrstlreseslr-endspantartaturatecepiahizekewpace-taleroll-xyz-barmpbelrstxyesbelrstxyes-thumbrackadowrink-xyxyartrokeabextora-shadowpckingnsformitionlate-xyz-offsetill-changeoom",M_=(()=>{const e=Hl.length-1,t=new Int32Array(e);for(let i=e-1;i>=0;i--){let c=1,u=i+1;for(let f=Hl[i];f<Hl[i+1];f++)c+=t[u],u+=t[u];t[i]=c}const r=new Int32Array(Hl[e]);let a=0;for(let i=0;i<e;i++){let c=i+1;for(let u=Hl[i];u<Hl[i+1];u++)r[a++]=c,c+=t[c]}return r})(),O_=ya("02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000…ŏ000ˆ0000ŏ0000000000—0000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000",1),D_=zg(ya("1233333593464636351265367151576")),z_=ya("93203242332583253248325D>E?F@03263243255B:032523853:0325B:8GA032542H<C=12727B:0324325853;D>E?3257D>03258432585:0325B:;0328B:032"),I_=ya("012123445661666666789111:5;;;;;;;;444;;;:62999<1161=62>>?61:21@ABCD4446996:64E:::;:?::64:F114GHHIHHHHIHH1HH1HH1HHHHHH::EJK4444::EJ4444441691;644444114244444:;L6666555555555555555999666664444444444444444444444226?6:66644M9N?D:111::::6DJ199"),P_=Qi("0202002020020020020020020020020200200200200200200200002020202001003040106000200200200200200200200200200200200200200200200200200200200200200200200200200200200020020020020020020002020200202002002002002002002002002002020002002020020200220200200200200200200200200200200020020020000200020002000200200200020020020002000200200200020020202002020202000200200020022000200200020020002002000200220002002000200W0Z00020020002002020002002000200g0j0002002000200200020020002002000200200020020002000200002000002002002002002000200020000200002002002002002002002020020020200200200200200200200200202020020020020020020020020002002002020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020002002002002002002000200200200200200200200200200020202020002000200020002002002002000020200200"),__=(()=>{const e=new Int32Array(319).fill(-1),t=Qi("02422242:222222242224222242442222222422222244442242226224222426222422442462222422622222222626222462242622422622422424242422222222422222222242422222222222222222622442224222222222222224424442262222222222222222222226224222424242422224422422422222"),r=Qi("02222222222222222222202222222222222222222222221422222222222222222222222222222222222Y\\222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221422222222222222222222222222222222222222Ŀł222222222222222222");for(let a=0;a<t.length;a++)e[t[a]]=r[a];return e})(),L_="container |break-after- all auto avoid avoid-page column left page right|break-before- all auto avoid avoid-page column left page right|break-inside-a uto void void-column void-page|box-decoration- clone slice|box- border content| contents flow-root hidden table table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group| not-sr-only sr-only|float- end left none right start|clear- both end left none right start|isolat e ion-auto|overflow- auto clip hidden scroll visible|overflow-x- auto clip hidden scroll visible|overflow-y- auto clip hidden scroll visible|overscroll- auto contain none|overscroll-x- auto contain none|overscroll-y- auto contain none| absolute fixed relative static sticky| collapse invisible visible|justify- around baseline between center center-safe end end-safe evenly normal start stretch|justify-items- center center-safe end end-safe normal start stretch|justify-self- auto center center-safe end end-safe start stretch|items- baseline baseline-last center center-safe end end-safe start stretch|self- auto baseline baseline-last center center-safe end end-safe start stretch|place-content- around baseline between center center-safe end end-safe evenly start stretch|place-items- baseline center center-safe end end-safe start stretch|place-self- auto center center-safe end end-safe start stretch| antialiased subpixel-antialiased| italic not-italic|normal-nums |ordinal |slashed-zero | lining-nums oldstyle-nums| proportional-nums tabular-nums| diagonal-fractions stacked-fractions| no-underline overline| capitalize lowercase normal-case uppercase|truncate |whitespace- break-spaces normal nowrap pre pre-line pre-wrap|break- all keep normal words|wrap- anywhere break-word normal|hyphens- auto manual none|mix-blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay plus-darker plus-lighter saturation screen soft-light|table- auto fixed|caption- bottom top|backface- hidden visible|appearance- auto none|scheme- dark light light-dark normal only-dark only-light|field-sizing- content fixed|pointer-events- auto none|resize -none -x -y|snap- align-none center end start|snap- always normal|snap- both none x y|snap- mandatory proximity|touch- auto manipulation none|touch-pan- left right x|touch-pan- down up y|touch-pinch-zoom |select- all auto none text|forced-color-adjust- auto none| normal size| baseline bottom middle sub super text-bottom text-top top|none | auto square video| auto fr max min px| auto full px| fixed local scroll|clip- border content padding text|origin- border content padding| bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| no-repeat repeat repeat-round repeat-space repeat-x repeat-y| auto contain cover| gradient-to-b gradient-to-bl gradient-to-br gradient-to-l gradient-to-r gradient-to-t gradient-to-tl gradient-to-tr none|blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay saturation screen soft-light|to- b bl br l r t tl tr| auto dvh fit full lh lvh max min px screen svh| dashed dotted double hidden none solid| collapse separate|px |auto |full | content none strict| inline-size size|layout |paint |style | around baseline between center center-safe end end-safe evenly normal start stretch| alias all-scroll auto cell col-resize context-menu copy crosshair default e-resize ew-resize grab grabbing help move n-resize ne-resize nesw-resize no-drop none not-allowed ns-resize nw-resize nwse-resize pointer progress row-resize s-resize se-resize sw-resize text vertical-text w-resize wait zoom-in zoom-out| dashed dotted double solid wavy| auto from-font|reverse |initial | in in-out initial linear out| col col-reverse row row-reverse| nowrap wrap wrap-reverse| auto initial none| black bold extrabold extralight light medium normal semibold thin| condensed expanded extra-condensed extra-expanded normal semi-condensed semi-expanded ultra-condensed ultra-expanded|flow- col col-dense dense row row-dense| none subgrid| auto dvh dvw fit full lh lvh lvw max min px screen svh svw| block flex grid table| auto dvw fit full lvw max min px screen svw| loose none normal px relaxed snug tight|through |item | inside outside| decimal disc none| auto px| clip-border clip-content clip-fill clip-padding clip-stroke clip-view no-clip| add exclude intersect subtract| alpha luminance match|origin- border content fill padding stroke view|type- alpha luminance| circle ellipse| closest-corner closest-side farthest-corner farthest-side|at- bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| dvh fit full lh lvh max min none px screen svh| auto dvh dvw fit full lh lvh lvw max min none px screen svh svw| dvw fit full lvw max min none px screen svw| auto dvh dvw fit full lvh lvw max min none prose px svh svw| auto dvh dvw fit full lvh lvw max min none px screen svh svw| contain cover fill none scale-down| first last none| distant dramatic midrange near none normal|inset | full none|3d | auto smooth|gutter- auto both stable| auto none thin| inner none| auto dvh dvw fit full lvh lvw max min px svh svw|base | center end justify left right start| clip ellipsis| balance nowrap pretty wrap| normal tight tighter wide wider widest| cpu gpu none| 3d flat| all colors none opacity shadow transform| discrete normal| full px| auto dvh dvw fit full lvh lvw max min px screen svh svw| auto contents scroll transform".split("|").map(e=>{const t=e.split(" "),r=t.shift();for(let a=0;a<t.length;a++)t[a]=r+t[a];return t}),Ck=Qi("0000000000000000000000000000000000000000000000000000000000000262242:6@200000006:240B428:4422400002046044222426220026642642462026224222824220022400000000\\00N222422242222222224062242222222422226264222422222222222222442804222422222222222222222222220<4<0204260002444020204224422"),$_=Qi("ɠ222222222222222222222222222222222222222222222222222222222222˕4222226>ʶ22ʷʺʷ2ʸʷ42ʴ2ʓ22>621422ɶ222ɹɼɷɺɷɺ22ɱ42222ɨ2ɧ26622ɘɓ244ƸƵ222]d24242ǖǓƚÄȫ2263ȨȥȨ2222222ǣ222222222222222222ǂƽ2ƾƵ2222222422222ƜƑ22222222222222222222144Ŧţ22Ţş222222222222222222222ĸ2ı68ĦģĦɡŰ4Ġ«®ĝ822ĔđĔ2ē2222622"),B_=Qi("02222222222222222222222222222222222222222222222222222222222222222203062222222222IL2200IL021042222]`222IL0gj2e50n2222U00X202[^2y0000560|{~ƒ†22‰Œ‹>22|22222222222G000q†OVI00000}š2›>40000ŒB00000I¨­000°00000000000000021Q²±00´“000000000000000000000–222›HGHa5¾222Ã6À2222ÍÐ000­°2±"),SA=new Int32Array(991),NA=new Int32Array(991),CA=new Int32Array(991);let jy="";const Sy=new Int32Array(1030);{const e=new Map;let t=0,r=0;for(let a=0;a<Ck.length;a++)for(const i of L_[B_[a]]){let c=e.get(i);c===void 0&&(c=t++,e.set(i,c),Sy[c*2]=jy.length,Sy[c*2+1]=i.length,jy+=i),SA[r]=Ck[a],NA[r]=$_[a],CA[r]=c,r++}}const V_=Qi("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"),U_=zg(ya("1::22222432:222:22:22>222222:22:2221322511111311111114")),H_=Qi("2Š4A;33N=C@H4A;33N=C@<2;363@QTQʰ222ˉºŴŽ2R2=18cƴÅҜÜÛŲǝȈ:ħ25=11D3A@216Er25;11B3?<438Cn9@7=<8192>2E121@9@EHE@9>2T25511<398216=V25511<398216=„ƧNž2Đå242L222290000f22500ɛ000ǘ222"),F_=ya("ij"),G_=ya("—"),q_=ya("1"),Y_="* ** after backdrop before details-content file first-letter first-line marker placeholder selection";var K_={GROUP_COUNT:T_,customValidatorNames:E_,edgeStart:Hl,labelStart:R_,labelText:A_,edgeTarget:M_,nodeGroup:O_,nodeVlist:__,vlistPat:D_,vlistOps:z_,vlistRef:I_,vlistGroup:P_,litAnchor:SA,litGroup:NA,litPool:CA,poolOffsets:Sy,poolText:jy,adjGid:V_,adjStart:U_,adjTgt:H_,patGid:F_,patTgt:G_,postfixLookupGroups:q_,orderSensitiveModifiers:Y_};const X_="line"in new Error,Zo=-1,Ll=-1,gv=(e,t,r)=>{let a=2166136261;for(let i=t;i<r;i++)a=Math.imul(a^e.charCodeAt(i),16777619);return a},xv=(e,t,r)=>{const a=r-t;let i=Math.imul(a,2654435761)^e.charCodeAt(t);if(a>3){const c=a>>2,u=a>>1;i=Math.imul(i^e.charCodeAt(t+1)<<8^e.charCodeAt(t+2)<<16^e.charCodeAt(t+c),2246822507),i=Math.imul(i^e.charCodeAt(t+u)<<8^e.charCodeAt(t+u+c)<<16^e.charCodeAt(r-3),3266489909),i^=e.charCodeAt(r-2)<<8^e.charCodeAt(r-1)<<16;for(let f=t+3,m=r-4;f<t+8&&f<m;f++,m--)i=Math.imul(i^e.charCodeAt(f)^e.charCodeAt(m)<<8,16777619)}return i^i>>>15|0},W_=(e,t,r={})=>{const{GROUP_COUNT:a,edgeStart:i,labelStart:c,labelText:u,edgeTarget:f,nodeGroup:m,nodeVlist:h,vlistPat:g,vlistOps:p,vlistRef:b,vlistGroup:v,litAnchor:w,litGroup:C,litPool:S,poolOffsets:N,poolText:E,adjGid:T,adjStart:R,adjTgt:M,patGid:A,patTgt:k,postfixLookupGroups:O,customValidatorNames:D,orderSensitiveModifiers:_}=e,H=new Int32Array(a).fill(-1);for(let De=0;De<T.length;De++)H[T[De]]=De;let G=0;for(let De=0;De+1<R.length;De++){const Ge=R[De+1]-R[De];Ge>G&&(G=Ge)}let B=32;for(;B<2*(1+G+A.length);)B<<=1;const P=new Int32Array(b.length+1);for(let De=0;De<b.length;De++)P[De+1]=P[De]+g[b[De]+1]-g[b[De]];const V=new Uint8Array(a);for(let De=0;De<O.length;De++)V[O[De]]=1;const Y=i.length-1,W=new Uint8Array(Y);let q=0,ee=!0;for(let De=0;De<w.length;De++){W[w[De]]=1;const Ge=N[S[De]*2+1];Ge>q&&(q=Ge);const qe=E.charCodeAt(N[S[De]*2]);(qe===91||qe===40)&&(ee=!1)}let z=1;for(;z<w.length*2;)z<<=1;const L=new Int32Array(z).fill(-1);for(let De=0;De<w.length;De++){const Ge=N[S[De]*2];let qe=(gv(E,Ge,Ge+N[S[De]*2+1])^Math.imul(w[De],2654435761)|0)&z-1;for(;L[qe]!==-1;)qe=qe+1&z-1;L[qe]=De}const X=(De,Ge,qe,bt)=>{let zt=(gv(Ge,qe,bt)^Math.imul(De,2654435761)|0)&z-1;const Mt=bt-qe;for(;;){const Bt=L[zt];if(Bt===-1)return-1;if(w[Bt]===De&&N[S[Bt]*2+1]===Mt){const Nn=N[S[Bt]*2];let hn=!0;for(let Ct=0;Ct<Mt;Ct++)if(E.charCodeAt(Nn+Ct)!==Ge.charCodeAt(qe+Ct)){hn=!1;break}if(hn)return C[Bt]}zt=zt+1&z-1}},te=r.cacheSize??8192,$=r.prefix??e.prefix??"",U=$===""?"":$+":",F=U.length,K=(D??[]).map(De=>{throw new Error("cn: missing validator "+De)}),se=/\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$/,ne=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ye=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ae=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;let le=0,re=-1,Q=-1,Z=-1,pe=-1;const ue=De=>De>=97&&De<=122||De>=65&&De<=90||De>=48&&De<=57||De===95,ve=De=>/\s/.test(String.fromCharCode(De)),Ce=(De,Ge,qe)=>{if(le=0,re=-1,qe-Ge<3)return;const bt=De.charCodeAt(Ge),zt=De.charCodeAt(qe-1);if(bt===91&&zt===93)le=1;else if(bt===40&&zt===41)le=2;else return;Z=Ge+1,pe=qe-1;let Mt=Ge+1;if(ue(De.charCodeAt(Mt))){for(Mt++;Mt<qe-1;){const Bt=De.charCodeAt(Mt);if(!ue(Bt)&&Bt!==45)break;Mt++}Mt<qe-2&&De.charCodeAt(Mt)===58&&(re=Ge+1,Q=Mt,Z=Mt+1)}},Ie=(De,Ge,qe,bt)=>{if(qe-Ge!==bt.length)return!1;for(let zt=0;zt<bt.length;zt++)if(De.charCodeAt(Ge+zt)!==bt.charCodeAt(zt))return!1;return!0},de=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Te=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,oe=De=>!!De&&!Number.isNaN(Number(De)),fe=(De,Ge,qe)=>{if(qe-Ge<11||!Ie(De,Ge,Ge+10,"@container"))return!1;if(De.charCodeAt(Ge+10)===47)return qe-Ge>=12;const bt=De.charCodeAt(Ge+11);return bt===115&&qe-Ge>=17&&Ie(De,Ge+10,Ge+16,"-size/")||bt===110&&qe-Ge>=19&&Ie(De,Ge+10,Ge+18,"-normal/")},Re=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],Oe="length|number|number weight|family-name|position percentage|length size bg-size|image url|shadow|length|family-name|position percentage|length size bg-size|image url|shadow|number weight".split("|").map(De=>De.split(" ")),ke=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],he=(De,Ge,qe,bt)=>{if(De>=10){if(De>=25)return K[De-25](Ge.slice(qe,bt));const zt=De-10;if(le!==Re[zt])return!1;if(re>=0){for(const Mt of Oe[zt])if(Ie(Ge,re,Q,Mt))return!0;return!1}switch(ke[zt]){case 0:return!1;case 1:return!0;case 2:{const Mt=Ge.slice(Z,pe);return se.test(Mt)&&!ne.test(Mt)}case 3:return oe(Ge.slice(Z,pe));case 4:return ae.test(Ge.slice(Z,pe));default:return ye.test(Ge.slice(Z,pe))}}switch(De){case 0:return!0;case 1:return le===0;case 2:return le===1;case 3:return le===2;case 4:return de.test(Ge.slice(qe,bt));case 5:return oe(Ge.slice(qe,bt));case 6:{const zt=Ge.slice(qe,bt);return!!zt&&Number.isInteger(Number(zt))}case 7:return bt>qe&&Ge.charCodeAt(bt-1)===37&&oe(Ge.slice(qe,bt-1));case 8:return Te.test(Ge.slice(qe,bt));default:return fe(Ge,qe,bt)}},Ae=new Set(typeof _=="string"?_.split(" "):_),ge=(De,Ge,qe,bt,zt,Mt)=>{const Bt=gv(Ge,qe,bt)^(zt?2654435769:0)|0;let Nn=De.get(Bt);if(Nn!==void 0)e:for(let It=0;It<Nn.length;It++){const on=Nn[It];if(!(on.imp!==zt||on.k.length!==bt-qe)){for(let St=0;St<on.k.length;St++)if(on.k.charCodeAt(St)!==Ge.charCodeAt(qe+St))continue e;return on.id}}else De.set(Bt,Nn=[]);const hn=Ge.slice(qe,bt),Ct=Mt(hn);return Nn.push({k:hn,imp:zt,id:Ct}),Ct};let Pe=new Map,Fe=new Map,_e=2;const Xe=4096,Je=(De,Ge)=>{const qe=[];let bt=0,zt=0,Mt=0;for(let Ct=0;Ct<De.length;Ct++){const It=De.charCodeAt(Ct);bt===0&&zt===0&&It===58?(qe.push(De.slice(Mt,Ct)),Mt=Ct+1):It===91?bt++:It===93?bt--:It===40?zt++:It===41&&zt--}qe.push(De.slice(Mt));let Bt=qe[0];if(qe.length>1){const Ct=[];let It=[];for(const on of qe)on.charCodeAt(0)===91||Ae.has(on)?(It.length&&(Ct.push(...It.sort()),It=[]),Ct.push(on)):It.push(on);It.length&&Ct.push(...It.sort()),Bt=Ct.join(":")}const Nn=Ge?Bt+" !":Bt;let hn=Fe.get(Nn);return hn===void 0&&Fe.set(Nn,hn=_e++),hn};let ct=new Map,At=a;const rt=a+4096,be=()=>At++,Ue=2097152,Qe=8192,xt=new Int32Array(Qe),Ke=new Array(Qe).fill(null),Be=new Int32Array(Qe),jt=new Int32Array(Qe),Ze=new Uint8Array(Qe);let Tt=0;const je=(De,Ge,qe,bt,zt,Mt,Bt,Nn)=>{let hn=De;if(Ke[De]!==null)if(Ke[De|1]===null)hn=De|1;else if((Tt++&3)===0)hn=De|Tt>>2&1;else return;Ke[hn]=Ge.slice(qe,bt),xt[hn]=zt,Be[hn]=Mt,jt[hn]=Bt,Ze[hn]=Nn},Ye=()=>Ke.fill(null);let et=256,it=[new Int32Array(et),new Int32Array(et),new Int32Array(et),new Int32Array(et)],[lt,wt,cn,Gt]=it,fn=new Uint8Array(et),Bn=new Uint8Array(et);const Kn=()=>{et*=2,it=it.map(Ge=>{const qe=new Int32Array(et);return qe.set(Ge),qe}),[lt,wt,cn,Gt]=it;const De=new Uint8Array(et);De.set(fn),fn=De,Bn=new Uint8Array(et)};let ce=64,tt=new Int32Array(ce),Et=new Int32Array(ce);const rn=new Int32Array(a);let xn=2048,Wt=21,un=new Float64Array(xn),ns=new Int32Array(xn),Jn=0;const wo=(De,Ge)=>{if(De===0&&Ge<a)return rn[Ge]===Jn?1:(rn[Ge]=Jn,0);const qe=De*2097152+Ge+1;let bt=Math.imul(qe,2654435761)>>>Wt;for(;ns[bt]===Jn;){if(un[bt]===qe)return 1;bt=bt+1&xn-1}return un[bt]=qe,ns[bt]=Jn,0},jo=(De,Ge,qe,bt,zt)=>{if(qe-Ge>=2&&De.charCodeAt(Ge)===91&&De.charCodeAt(qe-1)===93){let Mt=-1;for(let Bt=Ge+1;Bt<qe-1;Bt++)if(De.charCodeAt(Bt)===58){Mt=Bt;break}return Mt===-1||Mt===Ge+1?Zo:ge(ct,De,Ge+1,Mt,0,be)}if(bt>=0&&m[bt]>=0)return m[bt];for(let Mt=zt-1;Mt>=0;Mt--){const Bt=Et[Mt];if(Bt>qe)continue;const Nn=tt[Mt],hn=qe-Bt;if(W[Nn]===1&&hn>0&&hn<=q){const Hn=De.charCodeAt(Bt);if(ee===!1||Hn!==91&&Hn!==40){const Cr=X(Nn,De,Bt,qe);if(Cr>=0)return Cr}}const Ct=h[Nn];if(Ct<0)continue;const It=b[Ct],on=g[It],St=g[It+1];if(on===St)continue;Ce(De,Bt,qe);const fs=P[Ct]-on;for(let Hn=on;Hn<St;Hn++)if(he(p[Hn],De,Bt,qe))return v[fs+Hn]}return Zo},cr=De=>{const Ge=De.length;let qe=0,bt=0,zt=!1;(_e>Xe||Pe.size>Xe)&&(Pe=new Map,Fe=new Map,_e=2,Ye()),At>rt&&(ct=new Map,At=a,Ye());let Mt=0;for(;Mt<Ge;){let Ct=De.charCodeAt(Mt);if(Ct===32||Ct>=9&&Ct<=13||Ct>=160&&ve(Ct)){Ct!==32&&(zt=!0),Mt++;continue}const It=Mt;let on=0;for(;Mt<Ge;){if(Ct=De.charCodeAt(Mt),Ct<=32){if(Ct===32)break;if(Ct>=9&&Ct<=13){zt=!0;break}}else if(Ct>=160&&ve(Ct)){zt=!0;break}on=Math.imul(on^Ct,16777619),Mt++}const St=Mt,fs=St-It;qe===et&&Kn();const Hn=qe++;lt[Hn]=It,wt[Hn]=St,bt+=fs,on^=Math.imul(fs,2654435761);const Cr=on^on>>>15|0,ss=Cr&8190;{let Zt=-1;if(xt[ss]===Cr&&Ke[ss]!==null&&Ke[ss].length===fs?Zt=ss:xt[ss|1]===Cr&&Ke[ss|1]!==null&&Ke[ss|1].length===fs&&(Zt=ss|1),Zt>=0){const Ss=Ke[Zt];let Zr=!0;for(let Er=0;Er<fs;Er++)if(Ss.charCodeAt(Er)!==De.charCodeAt(It+Er)){Zr=!1;break}if(Zr){cn[Hn]=Be[Zt],Gt[Hn]=jt[Zt],fn[Hn]=Ze[Zt];continue}}}let rs=It;if(F!==0){if(St-It<=F||!De.startsWith(U,It)){cn[Hn]=Zo,je(ss,De,It,St,Cr,Zo,0,0);continue}rs=It+F}let yc=0,qu=0,ja=-1,wc=-1;for(let Zt=rs;Zt<St;Zt++){const Ss=De.charCodeAt(Zt);if(yc===0&&qu===0){if(Ss===58){ja=Zt;continue}if(Ss===47){wc=Zt;continue}}Ss===91?yc++:Ss===93?yc--:Ss===40?qu++:Ss===41&&qu--}const dh=ja>=rs?ja+1:rs;let _n=dh,Gs=St,ii=!1,jc=0;Gs>_n&&De.charCodeAt(Gs-1)===33?(ii=!0,Gs--):Gs>_n&&De.charCodeAt(_n)===33&&(ii=!0,_n++,jc=1);let ur=-1;wc>dh&&(ur=wc+jc,ur>=Gs&&(ur=-1));let Sc=_n;Gs-_n>1&&De.charCodeAt(_n)===45&&(Sc=_n+1);let kr=0,Js=0,li=0,Yu=-1,Tr=0;(h[0]>=0||W[0]===1)&&(tt[0]=0,Et[0]=Sc,Tr=1);let dl=Ll,Ku=0;for(let Zt=Sc;Zt<Gs;Zt++)if(Zt===ur&&(dl=Js<li?Ll:kr,Ku=Tr),kr!==Ll){const Ss=De.charCodeAt(Zt);let Zr=-1;if(Js<li)u.charCodeAt(Js)===Ss?(Js++,Js===li&&(Zr=kr=Yu)):kr=Ll;else{const Er=i[kr],ml=i[kr+1];let Sa=Ll;for(let zs=Er;zs<ml;zs++){const pl=c[zs];if(u.charCodeAt(pl)===Ss){c[zs+1]-pl===1?Zr=Sa=f[zs]:(Js=pl+1,li=c[zs+1],Yu=f[zs],Sa=kr);break}}kr=Sa}if(Zr>=0&&(h[Zr]>=0||W[Zr]===1)&&Zt+1<Gs&&De.charCodeAt(Zt+1)===45){if(Tr===ce){ce*=2;const Er=new Int32Array(ce);Er.set(tt),tt=Er;const ml=new Int32Array(ce);ml.set(Et),Et=ml}tt[Tr]=Zr,Et[Tr]=Zt+2,Tr++}}ur===Gs&&(dl=Js<li?Ll:kr,Ku=Tr);const Xu=Js<li?Ll:kr;let Ds,er=!1;if(ur>=0)if(er=!0,Ds=jo(De,_n,ur,dl,Ku),Ds!==Zo&&Ds<a&&V[Ds]){const Zt=jo(De,_n,Gs,Xu,Tr);Zt!==Zo&&Zt!==Ds&&(Ds=Zt,er=!1)}else Ds===Zo&&(Ds=jo(De,_n,Gs,Xu,Tr),er=!1);else Ds=jo(De,_n,Gs,Xu,Tr);let fl=0,hl=0;Ds===Zo?cn[Hn]=Zo:(hl=er?1:0,fl=rs>=ja?ii?1:0:ge(Pe,De,rs,ja,ii?1:0,Zt=>Je(Zt,ii)),cn[Hn]=Ds,fn[Hn]=hl,Gt[Hn]=fl),je(ss,De,It,St,Cr,Ds,fl,hl)}if(qe===0)return"";if(qe===1)return lt[0]===0&&wt[0]===Ge?De:De.slice(lt[0],wt[0]);if(qe*B>xn){for(;qe*B>xn;)xn<<=1,Wt--;un=new Float64Array(xn),ns=new Int32Array(xn)}if(_e>=Ue||At>=Ue)throw new Error("cn: too many distinct classes in one merge");Jn=Jn+1|0,Jn===0&&(rn.fill(0),ns.fill(0),Jn=1);let Bt=!1;for(let Ct=qe-1;Ct>=0;Ct--){const It=cn[Ct];if(It===Zo){Bn[Ct]=1;continue}const on=Gt[Ct];if(wo(on,It)===1){Bn[Ct]=0,Bt=!0;continue}if(Bn[Ct]=1,It<a){const St=H[It];if(St>=0)for(let fs=R[St];fs<R[St+1];fs++)wo(on,M[fs]);if(fn[Ct]&1)for(let fs=0;fs<A.length;fs++)A[fs]===It&&wo(on,k[fs])}}if(!Bt&&!zt&&Ge===bt+qe-1)return De;let Nn="",hn=0;for(;hn<qe;){if(!Bn[hn]){hn++;continue}const Ct=lt[hn];let It=wt[hn],on=hn+1;for(;on<qe&&Bn[on]&&lt[on]===It+1&&De.charCodeAt(It)===32;)It=wt[on],on++;Nn.length>0&&(Nn+=" "),Nn+=De.slice(Ct,It),hn=on}return Nn},Fs=16384,ds=new Int32Array(Fs*2);let Ms=0,Pn=1,Un=Object.create(null),Os=Object.create(null),Nr=new Map,Gu=new Map,gc=0,xc=0;const ai=()=>{Ms^=Fs,Pn=Pn+1|0,xc=0},cl=De=>{let Ge=Un[De];if(Ge!==void 0)return Ge;const qe=xv(De,0,De.length),bt=(qe&16383)+Ms,zt=ds[bt]===(qe^Pn)||ds[bt^Fs]===(qe^Pn-1);return zt&&(Ge=Os[De],Ge!==void 0)?(Un[De]=Ge,Ge):(Ge=cr(De),zt?(Un[De]=Ge,++gc>te&&(gc=0,Os=Un,Un=Object.create(null),ai())):(ds[bt]=qe^Pn,++xc>Fs&&ai()),Ge)},bc=De=>{let Ge=Nr.get(De);if(Ge!==void 0)return Ge;const qe=xv(De,0,De.length),bt=(qe&16383)+Ms,zt=ds[bt]===(qe^Pn)||ds[bt^Fs]===(qe^Pn-1);return zt&&(Ge=Gu.get(De),Ge!==void 0)?(Nr.set(De,Ge),Ge):(Ge=cr(De),zt?(Nr.set(De,Ge),++gc>te&&(gc=0,Gu=Nr,Nr=new Map,ai())):(ds[bt]=qe^Pn,++xc>Fs&&ai()),Ge)},vc=De=>{const Ge=xv(De,0,De.length),qe=(Ge&16383)+Ms;return ds[qe]===(Ge^Pn)||ds[qe^Fs]===(Ge^Pn-1)?!0:(ds[qe]=Ge^Pn,++xc>Fs&&ai(),!1)},So=te===0?cr:X_?De=>{const Ge=Nr.get(De);return Ge!==void 0?Ge:bc(De)}:cl;return{merge:function(){return arguments.length===1&&typeof arguments[0]=="string"?So(arguments[0]):So(Z_.apply(null,arguments))},mergeString:So,seenBefore:te===0?()=>!1:vc,mergeUncached:cr}},Yp=(e,t)=>{if(!e)return"";if(typeof e=="string")return e;let r="";if(typeof e.length=="number"&&(!t||Array.isArray(e))){const a=e;for(let i=0;i<a.length;i++){const c=a[i];if(!c)continue;const u=typeof c=="string"?c:Yp(c,t);u&&(r&&(r+=" "),r+=u)}return r}if(t){if(typeof e=="number")return""+e;if(typeof e=="object")for(const a in e)e[a]&&(r&&(r+=" "),r+=a)}return r},Q_=(e,t)=>{let r="";for(let a=0;a<e.length;a++){const i=e[a];if(!i)continue;const c=typeof i=="string"?i:Yp(i,t);c&&(r&&(r+=" "),r+=c)}return r},Z_=function(){return Q_(arguments,!1)},J_=(e,t)=>{const r=t===void 0?()=>!0:t.seenBefore,a=t===void 0?e:t.mergeUncached;let i=new Map,c=new Map,u=0,f=null;const m=(b,v,w,C)=>{let S=0;if(v){if(v!==b.a0)return!1;S=1}if(w){if(w!==(S===0?b.a0:b.a1))return!1;S++}if(C){if(C!==(S===0?b.a0:S===1?b.a1:b.a2))return!1;S++}return S===b.t},h=(b,v)=>{const w=b.a;let C=0;for(let S=0;S<v.length;S++){const N=v[S];if(N){if(N!==w[C])return!1;C++}}return C===b.t},g=(b,v)=>{const w=b.length,C=f===null?null:f.n;if(!v){if(C!==null&&h(C,b))return f=C,C.r;if(f!==null&&f!==C&&h(f,b))return f.r}let S="",N=-1,E=0,T=!1;for(let A=0;A<w;A++){let k=b[A];if(k){if(typeof k!="string"){if(k=b[A]=Yp(k,!0),!k)continue;T=!0}N<0&&(S=k,N=A),E++}}if(E===0)return"";if(E===1)return e(S);if(T){if(C!==null&&h(C,b))return f=C,C.r;if(f!==null&&f!==C&&h(f,b))return f.r}let R=i.get(S);R===void 0&&(R=c.get(S),R!==void 0&&i.set(S,R));let M=null;if(R!==void 0)e:for(let A=0;A<R.length;A++){const k=R[A];if(k.t!==E)continue;const O=k.a;let D=1;for(let _=N+1;_<w;_++){const H=b[_];if(H&&H!==O[D++])continue e}M=k;break}if(M===null){let A=S;const k=[S];for(let O=N+1;O<w;O++){const D=b[O];D&&(A+=" "+D,k.push(D))}if(!r(A))return a(A);M={r:e(A),t:k.length,a0:k[0],a1:k[1],a2:k[2]??"",a:k,n:null},R===void 0&&i.set(S,R=[]),R.length>=256&&R.shift(),R.push(M),++u>1e3&&(u=0,c=i,i=new Map)}return f!==null&&f!==M&&(f.n=M),f=M,M.r},p=b=>Array.isArray(b)?g(b.slice(),!1):e(Yp(b,!0));return function(b,v,w){const C=arguments.length;if((C|1)===3){const E=f;if(E!==null){const T=E.n;if(T!==null&&m(T,b,v,w))return f=T,T.r;if(E!==T&&m(E,b,v,w))return E.r}return g([b,v,w],!0)}if(C===1)return typeof b=="string"?e(b):p(b);const S=f;if(S!==null){const E=S.n;if(E!==null){const T=E.a;let R=0,M=!0;for(let A=0;A<C;A++){const k=arguments[A];if(k){if(k!==T[R]){M=!1;break}R++}}if(M&&R===E.t)return f=E,E.r}if(S!==E){const T=S.a;let R=0,M=!0;for(let A=0;A<C;A++){const k=arguments[A];if(k){if(k!==T[R]){M=!1;break}R++}}if(M&&R===S.t)return S.r}}const N=[];for(let E=0;E<C;E++)N.push(arguments[E]);return g(N,!0)}},kk=W_(K_),ws=J_(kk.mergeString,kk);/**
50
+ `).replace(OI,"")}function nC(s,o){return o=tC(o),tC(s)===o}function yn(s,o,l,d,y,j){switch(l){case"children":if(typeof d=="string")o==="body"||o==="textarea"&&d===""||Js(s,d);else if(typeof d=="number"||typeof d=="bigint")o!=="body"&&Js(s,""+d);else return;break;case"className":Cr(s,"class",d);break;case"tabIndex":Cr(s,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":Cr(s,l,d);break;case"style":Tr(s,d,j);return;case"data":if(o!=="object"){Cr(s,"data",d);break}case"src":case"href":if(d===""&&(o!=="a"||l!=="href")){s.removeAttribute(l);break}if(d==null||typeof d=="function"||typeof d=="symbol"||typeof d=="boolean"){s.removeAttribute(l);break}d=Ds(d),s.setAttribute(l,d);break;case"action":case"formAction":if(typeof d=="function"){s.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof j=="function"&&(l==="formAction"?(o!=="input"&&yn(s,o,"name",y.name,y,null),yn(s,o,"formEncType",y.formEncType,y,null),yn(s,o,"formMethod",y.formMethod,y,null),yn(s,o,"formTarget",y.formTarget,y,null)):(yn(s,o,"encType",y.encType,y,null),yn(s,o,"method",y.method,y,null),yn(s,o,"target",y.target,y,null)));if(d==null||typeof d=="symbol"||typeof d=="boolean"){s.removeAttribute(l);break}d=Ds(d),s.setAttribute(l,d);break;case"onClick":d!=null&&(s.onclick=er);return;case"onScroll":d!=null&&Yt("scroll",s);return;case"onScrollEnd":d!=null&&Yt("scrollend",s);return;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(a(61));if(l=d.__html,l!=null){if(y.children!=null)throw Error(a(60));(j!=null?j.__html:void 0)!==l&&(s.innerHTML=l)}}break;case"multiple":s.multiple=d&&typeof d!="function"&&typeof d!="symbol";break;case"muted":s.muted=d&&typeof d!="function"&&typeof d!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(d==null||typeof d=="function"||typeof d=="boolean"||typeof d=="symbol"){s.removeAttribute("xlink:href");break}l=Ds(d),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":d!=null&&typeof d!="function"&&typeof d!="symbol"?s.setAttribute(l,d):s.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":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":d&&typeof d!="function"&&typeof d!="symbol"?s.setAttribute(l,""):s.removeAttribute(l);break;case"capture":case"download":d===!0?s.setAttribute(l,""):d!==!1&&d!=null&&typeof d!="function"&&typeof d!="symbol"?s.setAttribute(l,d):s.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":d!=null&&typeof d!="function"&&typeof d!="symbol"&&!isNaN(d)&&1<=d?s.setAttribute(l,d):s.removeAttribute(l);break;case"rowSpan":case"start":d==null||typeof d=="function"||typeof d=="symbol"||isNaN(d)?s.removeAttribute(l):s.setAttribute(l,d);break;case"popover":Yt("beforetoggle",s),Yt("toggle",s),Hn(s,"popover",d);break;case"xlinkActuate":ss(s,"http://www.w3.org/1999/xlink","xlink:actuate",d);break;case"xlinkArcrole":ss(s,"http://www.w3.org/1999/xlink","xlink:arcrole",d);break;case"xlinkRole":ss(s,"http://www.w3.org/1999/xlink","xlink:role",d);break;case"xlinkShow":ss(s,"http://www.w3.org/1999/xlink","xlink:show",d);break;case"xlinkTitle":ss(s,"http://www.w3.org/1999/xlink","xlink:title",d);break;case"xlinkType":ss(s,"http://www.w3.org/1999/xlink","xlink:type",d);break;case"xmlBase":ss(s,"http://www.w3.org/XML/1998/namespace","xml:base",d);break;case"xmlLang":ss(s,"http://www.w3.org/XML/1998/namespace","xml:lang",d);break;case"xmlSpace":ss(s,"http://www.w3.org/XML/1998/namespace","xml:space",d);break;case"is":Hn(s,"is",d);break;case"innerText":case"textContent":return;default:if(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")l=Ku.get(l)||l,Hn(s,l,d);else return}St=!0}function D0(s,o,l,d,y,j){switch(l){case"style":Tr(s,d,j);return;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(a(61));if(l=d.__html,l!=null){if(y.children!=null)throw Error(a(60));(j!=null?j.__html:void 0)!==l&&(s.innerHTML=l)}}break;case"children":if(typeof d=="string")Js(s,d);else if(typeof d=="number"||typeof d=="bigint")Js(s,""+d);else return;break;case"onScroll":d!=null&&Yt("scroll",s);return;case"onScrollEnd":d!=null&&Yt("scrollend",s);return;case"onClick":d!=null&&(s.onclick=er);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!Mt.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(y=l.endsWith("Capture"),j=l.slice(2,y?l.length-7:void 0),o=s[Os]||null,o=o!=null?o[l]:null,typeof o=="function"&&s.removeEventListener(j,o,y),typeof d=="function")){typeof o!="function"&&o!==null&&(l in s?s[l]=null:s.hasAttribute(l)&&s.removeAttribute(l)),s.addEventListener(j,d,y);break e}St=!0,l in s?s[l]=d:d===!0?s.setAttribute(l,""):Hn(s,l,d)}return}St=!0}function $s(s,o,l){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Yt("error",s),Yt("load",s);var d=!1,y=!1,j;for(j in l)if(l.hasOwnProperty(j)){var I=l[j];if(I!=null)switch(j){case"src":d=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,o));default:yn(s,o,j,I,l,null)}}y&&yn(s,o,"srcSet",l.srcSet,l,null),d&&yn(s,o,"src",l.src,l,null);return;case"input":Yt("invalid",s);var J=j=I=y=null,me=null,Ne=null;for(d in l)if(l.hasOwnProperty(d)){var ze=l[d];if(ze!=null)switch(d){case"name":y=ze;break;case"type":I=ze;break;case"checked":me=ze;break;case"defaultChecked":Ne=ze;break;case"value":j=ze;break;case"defaultValue":J=ze;break;case"children":case"dangerouslySetInnerHTML":if(ze!=null)throw Error(a(137,o));break;default:yn(s,o,d,ze,l,null)}}ii(s,j,J,me,Ne,I,y,!1);return;case"select":Yt("invalid",s),d=I=j=null;for(y in l)if(l.hasOwnProperty(y)&&(J=l[y],J!=null))switch(y){case"value":j=J;break;case"defaultValue":I=J;break;case"multiple":d=J;default:yn(s,o,y,J,l,null)}o=j,l=I,s.multiple=!!d,o!=null?ur(s,!!d,o,!1):l!=null&&ur(s,!!d,l,!0);return;case"textarea":Yt("invalid",s),j=y=d=null;for(I in l)if(l.hasOwnProperty(I)&&(J=l[I],J!=null))switch(I){case"value":d=J;break;case"defaultValue":y=J;break;case"children":j=J;break;case"dangerouslySetInnerHTML":if(J!=null)throw Error(a(91));break;default:yn(s,o,I,J,l,null)}kr(s,d,y,j);return;case"option":for(me in l)if(l.hasOwnProperty(me)&&(d=l[me],d!=null))switch(me){case"selected":s.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:yn(s,o,me,d,l,null)}return;case"dialog":Yt("beforetoggle",s),Yt("toggle",s),Yt("cancel",s),Yt("close",s);break;case"iframe":case"object":Yt("load",s);break;case"video":case"audio":for(d=0;d<Td.length;d++)Yt(Td[d],s);break;case"image":Yt("error",s),Yt("load",s);break;case"details":Yt("toggle",s);break;case"embed":case"source":case"link":Yt("error",s),Yt("load",s);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Ne in l)if(l.hasOwnProperty(Ne)&&(d=l[Ne],d!=null))switch(Ne){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,o));default:yn(s,o,Ne,d,l,null)}return;default:if(dl(o)){for(ze in l)l.hasOwnProperty(ze)&&(d=l[ze],d!==void 0&&D0(s,o,ze,d,l,void 0));return}}for(J in l)l.hasOwnProperty(J)&&(d=l[J],d!=null&&yn(s,o,J,d,l,null))}var DI={};function zI(s,o,l,d){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,j=null,I=null,J=null,me=null,Ne=null,ze=null;for(Me in l){var $e=l[Me];if(l.hasOwnProperty(Me)&&$e!=null)switch(Me){case"checked":break;case"value":break;case"defaultValue":me=$e;default:d.hasOwnProperty(Me)||yn(s,o,Me,null,d,$e)}}for(var we in d){var Me=d[we];if($e=l[we],d.hasOwnProperty(we)&&(Me!=null||$e!=null))switch(we){case"type":Me!==$e&&(St=!0),j=Me;break;case"name":Me!==$e&&(St=!0),y=Me;break;case"checked":Me!==$e&&(St=!0),Ne=Me;break;case"defaultChecked":Me!==$e&&(St=!0),ze=Me;break;case"value":Me!==$e&&(St=!0),I=Me;break;case"defaultValue":Me!==$e&&(St=!0),J=Me;break;case"children":case"dangerouslySetInnerHTML":if(Me!=null)throw Error(a(137,o));break;default:Me!==$e&&yn(s,o,we,Me,d,$e)}}Gs(s,I,J,me,Ne,ze,j,y);return;case"select":Me=I=J=we=null;for(j in l)if(me=l[j],l.hasOwnProperty(j)&&me!=null)switch(j){case"value":break;case"multiple":Me=me;default:d.hasOwnProperty(j)||yn(s,o,j,null,d,me)}for(y in d)if(j=d[y],me=l[y],d.hasOwnProperty(y)&&(j!=null||me!=null))switch(y){case"value":j!==me&&(St=!0),we=j;break;case"defaultValue":j!==me&&(St=!0),J=j;break;case"multiple":j!==me&&(St=!0),I=j;default:j!==me&&yn(s,o,y,j,d,me)}o=J,l=I,d=Me,we!=null?ur(s,!!l,we,!1):!!d!=!!l&&(o!=null?ur(s,!!l,o,!0):ur(s,!!l,l?[]:"",!1));return;case"textarea":Me=we=null;for(J in l)if(y=l[J],l.hasOwnProperty(J)&&y!=null&&!d.hasOwnProperty(J))switch(J){case"value":break;case"children":break;default:yn(s,o,J,null,d,y)}for(I in d)if(y=d[I],j=l[I],d.hasOwnProperty(I)&&(y!=null||j!=null))switch(I){case"value":y!==j&&(St=!0),we=y;break;case"defaultValue":y!==j&&(St=!0),Me=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(a(91));break;default:y!==j&&yn(s,o,I,y,d,j)}Sc(s,we,Me);return;case"option":for(var ot in l)if(we=l[ot],l.hasOwnProperty(ot)&&we!=null&&!d.hasOwnProperty(ot))switch(ot){case"selected":s.selected=!1;break;default:yn(s,o,ot,null,d,we)}for(me in d)if(we=d[me],Me=l[me],d.hasOwnProperty(me)&&we!==Me&&(we!=null||Me!=null))switch(me){case"selected":we!==Me&&(St=!0),s.selected=we&&typeof we!="function"&&typeof we!="symbol";break;default:yn(s,o,me,we,d,Me)}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 mt in l)we=l[mt],l.hasOwnProperty(mt)&&we!=null&&!d.hasOwnProperty(mt)&&yn(s,o,mt,null,d,we);for(Ne in d)if(we=d[Ne],Me=l[Ne],d.hasOwnProperty(Ne)&&we!==Me&&(we!=null||Me!=null))switch(Ne){case"children":case"dangerouslySetInnerHTML":if(we!=null)throw Error(a(137,o));break;default:yn(s,o,Ne,we,d,Me)}return;default:if(dl(o)){for(var Lt in l)we=l[Lt],l.hasOwnProperty(Lt)&&we!==void 0&&!d.hasOwnProperty(Lt)&&D0(s,o,Lt,void 0,d,we);for(ze in d)we=d[ze],Me=l[ze],!d.hasOwnProperty(ze)||we===Me||we===void 0&&Me===void 0||D0(s,o,ze,we,d,Me);return}}for(var Se in l)we=l[Se],l.hasOwnProperty(Se)&&we!=null&&!d.hasOwnProperty(Se)&&yn(s,o,Se,null,d,we);for($e in d)we=d[$e],Me=l[$e],!d.hasOwnProperty($e)||we===Me||we==null&&Me==null||yn(s,o,$e,we,d,Me)}function sC(s){switch(s){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function II(){if(typeof performance.getEntriesByType=="function"){for(var s=0,o=0,l=performance.getEntriesByType("resource"),d=0;d<l.length;d++){var y=l[d],j=y.transferSize,I=y.initiatorType,J=y.duration;if(j&&J&&sC(I)){for(I=0,J=y.responseEnd,d+=1;d<l.length;d++){var me=l[d],Ne=me.startTime;if(Ne>J)break;var ze=me.transferSize,$e=me.initiatorType;ze&&sC($e)&&(me=me.responseEnd,I+=ze*(me<J?1:(J-Ne)/(me-Ne)))}if(--d,o+=8*(j+I)/(y.duration/1e3),s++,10<s)break}}if(0<s)return o/s/1e6}return navigator.connection&&(s=navigator.connection.downlink,typeof s=="number")?s:5}var z0=null,I0=null;function Rd(s){return s.nodeType===9?s:s.ownerDocument}function rC(s){switch(s){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function oC(s,o){if(s===0)switch(o){case"svg":return 1;case"math":return 2;default:return 0}return s===1&&o==="foreignObject"?0:s}function aC(s,o,l,d){return l=Rd(l).createElement(s),l[Un]=d,l[Os]=o,$s(l,s,o),qe(l),l}function P0(s,o){return s==="textarea"||s==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.children=="bigint"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var _0=null;function PI(){var s=window.event;return s&&s.type==="popstate"?s===_0?!1:(_0=s,!0):(_0=null,!1)}var L0=typeof setTimeout=="function"?setTimeout:void 0,_I=typeof clearTimeout=="function"?clearTimeout:void 0,iC=typeof Promise=="function"?Promise:void 0,lC=typeof requestAnimationFrame=="function"?requestAnimationFrame:L0,LI=typeof queueMicrotask=="function"?queueMicrotask:typeof iC<"u"?function(s){return iC.resolve(null).then(s).catch($I)}:L0;function $I(s){setTimeout(function(){throw s})}function Ri(s){return s==="head"}function cC(s,o){var l=o,d=0;do{var y=l.nextSibling;if(s.removeChild(l),y&&y.nodeType===8)if(l=y.data,l==="/$"||l==="/&"){if(d===0){s.removeChild(y),ru(o);return}d--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")d++;else if(l==="html")q0(s.ownerDocument.documentElement);else if(l==="head"){l=s.ownerDocument.head,q0(l);for(var j=l.firstChild;j;){var I=j.nextSibling,J=j.nodeName;j[cl]||J==="SCRIPT"||J==="STYLE"||J==="LINK"&&j.rel.toLowerCase()==="stylesheet"||l.removeChild(j),j=I}}else l==="body"&&q0(s.ownerDocument.body);l=y}while(l);ru(o)}function uC(s,o){var l=s;s=0;do{var d=l.nextSibling;if(l.nodeType===1?o?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(o?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),d&&d.nodeType===8)if(l=d.data,l==="/$"){if(s===0)break;s--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||s++;l=d}while(l)}function dC(s,o,l){if(o=CSS.escape(o)!==o?"r-"+btoa(o).replace(/=/g,""):o,s.style.viewTransitionName=o,l!=null&&(s.style.viewTransitionClass=l),l=getComputedStyle(s),l.display==="inline"){if(o=s.getClientRects(),o.length===1)var d=1;else for(var y=d=0;y<o.length;y++){var j=o[y];0<j.width&&0<j.height&&d++}d===1&&(s=s.style,s.display=o.length===1?"inline-block":"block",s.marginTop="-"+l.paddingTop,s.marginBottom="-"+l.paddingBottom)}}function fC(s,o){s=s.style,o=o.style;var l=o!=null?o.hasOwnProperty("viewTransitionName")?o.viewTransitionName:o.hasOwnProperty("view-transition-name")?o["view-transition-name"]:null:null;s.viewTransitionName=l==null||typeof l=="boolean"?"":(""+l).trim(),l=o!=null?o.hasOwnProperty("viewTransitionClass")?o.viewTransitionClass:o.hasOwnProperty("view-transition-class")?o["view-transition-class"]:null:null,s.viewTransitionClass=l==null||typeof l=="boolean"?"":(""+l).trim(),s.display==="inline-block"&&(o==null?s.display=s.margin="":(l=o.display,s.display=l==null||typeof l=="boolean"?"":l,l=o.margin,l!=null?s.margin=l:(l=o.hasOwnProperty("marginTop")?o.marginTop:o["margin-top"],s.marginTop=l==null||typeof l=="boolean"?"":l,o=o.hasOwnProperty("marginBottom")?o.marginBottom:o["margin-bottom"],s.marginBottom=o==null||typeof o=="boolean"?"":o)))}function BI(s,o,l){return l=l.ownerDocument.defaultView,{rect:s,abs:o.position==="absolute"||o.position==="fixed",clip:o.clipPath!=="none"||o.overflow!=="visible"||o.filter!=="none"||o.mask!=="none"||o.mask!=="none"||o.borderRadius!=="0px",view:0<=s.bottom&&0<=s.right&&s.top<=l.innerHeight&&s.left<=l.innerWidth}}function $0(s){var o=s.getBoundingClientRect(),l=getComputedStyle(s);return BI(o,l,s)}function VI(s){return s.documentElement.clientHeight}function UI(s){this.addEventListener("load",s),this.addEventListener("error",s)}function HI(s,o,l,d,y,j,I,J,me){var Ne=o.nodeType===9?o:o.ownerDocument;try{var ze=Ne.startViewTransition({update:function(){var we=Ne.defaultView,Me=we.navigation&&we.navigation.transition,ot=Ne.fonts.status;d();var mt=[];if(ot==="loaded"&&(VI(Ne),Ne.fonts.status==="loading"&&mt.push(Ne.fonts.ready)),ot=mt.length,s!==null)for(var Lt=s.suspenseyImages,Se=0,xe=0;xe<Lt.length;xe++){var Ee=Lt[xe];if(!Ee.complete){var Le=Ee.getBoundingClientRect();if(0<Le.bottom&&0<Le.right&&Le.top<we.innerHeight&&Le.left<we.innerWidth){if(Se+=DC(Ee),Se>ym){mt.length=ot;break}Ee=new Promise(UI.bind(Ee)),mt.push(Ee)}}}if(0<mt.length)return we=Promise.race([Promise.all(mt),new Promise(function(ut){return setTimeout(ut,500)})]).then(y,y),(Me?Promise.allSettled([Me.finished,we]):we).then(j,j);if(y(),Me)return Me.finished.then(j,j);j()},types:l});Ne.__reactViewTransition=ze;var $e=[];return ze.ready.then(function(){for(var we=Ne.documentElement.getAnimations({subtree:!0}),Me=0;Me<we.length;Me++){var ot=we[Me],mt=ot.effect,Lt=mt.pseudoElement;if(Lt!=null&&Lt.startsWith("::view-transition")){$e.push(ot),ot=mt.getKeyframes();for(var Se=Lt=void 0,xe=!0,Ee=0;Ee<ot.length;Ee++){var Le=ot[Ee],ut=Le.width;if(Lt===void 0)Lt=ut;else if(Lt!==ut){xe=!1;break}if(ut=Le.height,Se===void 0)Se=ut;else if(Se!==ut){xe=!1;break}delete Le.width,delete Le.height,Le.transform==="none"&&delete Le.transform}xe&&Lt!==void 0&&Se!==void 0&&(mt.setKeyframes(ot),xe=getComputedStyle(mt.target,mt.pseudoElement),xe.width!==Lt||xe.height!==Se)&&(xe=ot[0],xe.width=Lt,xe.height=Se,xe=ot[ot.length-1],xe.width=Lt,xe.height=Se,mt.setKeyframes(ot))}}I()},function(we){Ne.__reactViewTransition===ze&&(Ne.__reactViewTransition=null);try{if(typeof we=="object"&&we!==null)switch(we.name){case"InvalidStateError":(we.message==="View transition was skipped because document visibility state is hidden."||we.message==="Skipping view transition because document visibility state has become hidden."||we.message==="Skipping view transition because viewport size changed."||we.message==="Transition was aborted because of invalid state")&&(we=null)}we!==null&&me(we)}finally{d(),y(),I()}}),ze.finished.finally(function(){for(var we=0;we<$e.length;we++)$e[we].cancel();Ne.__reactViewTransition===ze&&(Ne.__reactViewTransition=null),J()}),ze}catch{return d(),y(),I(),null}}function Il(s,o){this._scope=document.documentElement,this._selector="::view-transition-"+s+"("+o+")"}Il.prototype.animate=function(s,o){return o=typeof o=="number"?{duration:o}:k({},o),o.pseudoElement=this._selector,this._scope.animate(s,o)},Il.prototype.getAnimations=function(){for(var s=this._scope,o=this._selector,l=s.getAnimations({subtree:!0}),d=[],y=0;y<l.length;y++){var j=l[y].effect;j!==null&&j.target===s&&j.pseudoElement===o&&d.push(l[y])}return d},Il.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function hC(s){return{name:s,group:new Il("group",s),imagePair:new Il("image-pair",s),old:new Il("old",s),new:new Il("new",s)}}function Ir(s){this._fragmentFiber=s,this._observers=this._eventListeners=null}Ir.prototype.addEventListener=function(s,o,l){var d=null,y=null;if(!(l!=null&&typeof l!="boolean"&&(d=l.signal||null,d!==null&&d.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var j=this._eventListeners;if(pC(j,s,o,l)===-1){var I=this,J=o;l!=null&&typeof l!="boolean"&&l.once===!0&&(J=function(me){I.removeEventListener(s,o,l),typeof o=="function"?o.call(this,me):o.handleEvent(me)}),d!==null&&(y=I.removeEventListener.bind(I,s,o,l),d.addEventListener("abort",y,{once:!0}),y=d.removeEventListener.bind(d,"abort",y)),d=Zc(l),j.push({type:s,listener:o,optionsOrUseCapture:l,attachedListener:J,cleanup:y}),p(this._fragmentFiber.child,!1,FI,s,J,d)}this._eventListeners=j}};function FI(s,o,l,d){return S(s).addEventListener(o,l,d),!1}Ir.prototype.removeEventListener=function(s,o,l){var d=this._eventListeners;if(d!==null&&(o=pC(d,s,o,l),o!==-1)){var y=d[o];l=y.attachedListener;var j=y.cleanup;y=Zc(y.optionsOrUseCapture),p(this._fragmentFiber.child,!1,GI,s,l,y),d.splice(o,1),j!==null&&j()}};function GI(s,o,l,d){return S(s).removeEventListener(o,l,d),!1}function Zc(s){return s!=null&&typeof s!="boolean"&&(s.once===!0||s.signal instanceof AbortSignal)?{capture:s.capture,passive:s.passive}:s}function mC(s){return s==null?"c=0":typeof s=="boolean"?"c="+(s?"1":"0"):"c="+(s.capture?"1":"0")}function pC(s,o,l,d){if(s.length===0)return-1;d=mC(d);for(var y=0;y<s.length;y++){var j=s[y];if(j.type===o&&j.listener===l&&mC(j.optionsOrUseCapture)===d)return y}return-1}Ir.prototype.dispatchEvent=function(s){var o=b(this._fragmentFiber);if(o===null)return!0;o=S(o);var l=this._eventListeners;if(l!==null&&0<l.length||!s.bubbles){var d=o.nodeType===9?o.createComment(""):document.createTextNode("");if(l)for(var y=0;y<l.length;y++){var j=l[y];d.addEventListener(j.type,j.attachedListener,Zc(j.optionsOrUseCapture))}if(o.appendChild(d),s=d.dispatchEvent(s),l)for(y=0;y<l.length;y++)j=l[y],d.removeEventListener(j.type,j.attachedListener,Zc(j.optionsOrUseCapture));return o.removeChild(d),s}return o.dispatchEvent(s)},Ir.prototype.focus=function(s){p(this._fragmentFiber.child,!0,gC,s,void 0,void 0)};function gC(s,o){return s.tag===6?!1:(s=S(s),sP(s,o))}Ir.prototype.focusLast=function(s){var o=[];p(this._fragmentFiber.child,!0,B0,o,void 0,void 0);for(var l=o.length-1;0<=l&&!gC(o[l],s);l--);};function B0(s,o){return o.push(s),!1}Ir.prototype.blur=function(){var s=b(this._fragmentFiber);s!==null&&(s=S(s),s=Rd(s).activeElement,s!==null&&p(this._fragmentFiber.child,!1,qI,s,void 0,void 0))};function qI(s,o){return s.tag===6?!1:(s=S(s),s===o||s.contains(o)?(o.blur(),!0):!1)}Ir.prototype.observeUsing=function(s){this._observers===null&&(this._observers=new Set),this._observers.add(s),p(this._fragmentFiber.child,!1,YI,s,void 0,void 0)};function YI(s,o){return s.tag===6||(s=S(s),o.observe(s)),!1}Ir.prototype.unobserveUsing=function(s){var o=this._observers;if(o!==null&&o.has(s)){o.delete(s),p(this._fragmentFiber.child,!1,KI,s,void 0,void 0);for(var l=o=0;l<Ro.length;l++){var d=Ro[l];d.fragmentInstance===this&&d.observer===s?s.unobserve(d.instance):Ro[o++]=d}Ro.length=o}};function KI(s,o){return s.tag===6||(s=S(s),o.unobserve(s)),!1}var Ro=[],V0=!1;function XI(s,o,l){Ro.push({fragmentInstance:s,observer:o,instance:l}),V0||(V0=!0,rP(function(){V0=!1;var d=Ro;Ro=[];for(var y=0;y<d.length;y++){var j=d[y];j.observer.unobserve(j.instance)}}))}Ir.prototype.getClientRects=function(){var s=[];return p(this._fragmentFiber.child,!1,WI,s,void 0,void 0),s};function WI(s,o){if(s.tag===6){s=s.stateNode;var l=s.ownerDocument.createRange();l.selectNodeContents(s),o.push.apply(o,l.getClientRects())}else s=S(s),o.push.apply(o,s.getClientRects());return!1}Ir.prototype.getRootNode=function(s){var o=b(this._fragmentFiber);return o===null?this:S(o).getRootNode(s)},Ir.prototype.compareDocumentPosition=function(s){var o=b(this._fragmentFiber);if(o===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var l=[];p(this._fragmentFiber.child,!1,B0,l,void 0,void 0);var d=S(o);if(l.length===0){if(l=d,v(this._fragmentFiber)){e:{for(o=this._fragmentFiber.return;o!==null;){if(o.tag===4){o=o.stateNode.containerInfo;break e}if(o.tag===3||o.tag===5||o.tag===27)break;o=o.return}o=null}o!=null&&(l=o)}o=this._fragmentFiber;var y=d=l.compareDocumentPosition(s);return l===s?y=Node.DOCUMENT_POSITION_CONTAINS:d&Node.DOCUMENT_POSITION_CONTAINED_BY&&(l=w(o)[1],l===null?y=Node.DOCUMENT_POSITION_PRECEDING:(s=S(l).compareDocumentPosition(s),y=s===0||s&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),y|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}o=S(l[0]),y=S(l[l.length-1]);var j=v(this._fragmentFiber)?o.parentElement:d;if(j==null)return Node.DOCUMENT_POSITION_DISCONNECTED;d=j.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_CONTAINED_BY,j=j.compareDocumentPosition(y)&Node.DOCUMENT_POSITION_CONTAINED_BY;var I=o.compareDocumentPosition(s),J=y.compareDocumentPosition(s),me=I&Node.DOCUMENT_POSITION_CONTAINED_BY||J&Node.DOCUMENT_POSITION_CONTAINED_BY;return J=d&&j&&I&Node.DOCUMENT_POSITION_FOLLOWING&&J&Node.DOCUMENT_POSITION_PRECEDING,o=d&&o===s||j&&y===s||me||J?Node.DOCUMENT_POSITION_CONTAINED_BY:!d&&o===s||!j&&y===s?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:I,o&Node.DOCUMENT_POSITION_DISCONNECTED||o&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||QI(o,this._fragmentFiber,l[0],l[l.length-1],s)?o:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function QI(s,o,l,d,y){var j=So(y);if(s&Node.DOCUMENT_POSITION_CONTAINED_BY){if(l=!!j)e:{for(;j!==null;){if(j.tag===7&&(j===o||j.alternate===o)){l=!0;break e}j=j.return}l=!1}return l}if(s&Node.DOCUMENT_POSITION_CONTAINS){if(j===null)return j=y.ownerDocument,y===j||y===j.documentElement||y===j.body;e:{for(j=o,o=b(o);j!==null;){if(!(j.tag!==5&&j.tag!==3&&j.tag!==27||j!==o&&j.alternate!==o)){j=!0;break e}j=j.return}j=!1}return j}return s&Node.DOCUMENT_POSITION_PRECEDING?((o=!!j)&&!(o=j===l)&&(o=A(l,j,M),o===null?o=!1:(p(o,!0,T,j,l),j=N,N=null,o=j!==null)),o):s&Node.DOCUMENT_POSITION_FOLLOWING?((o=!!j)&&!(o=j===d)&&(o=A(d,j,M),o===null?o=!1:(p(o,!0,R,j,d),j=N,E=N=null,o=j!==null)),o):!1}function xC(s,o){var l=s.ownerDocument.createRange();l.selectNodeContents(s),s=l.getBoundingClientRect(),window.scrollTo(window.scrollX+s.left,o?window.scrollY+s.top:window.scrollY+s.bottom-window.innerHeight)}Ir.prototype.scrollIntoView=function(s){if(typeof s=="object")throw Error(a(566));var o=[];p(this._fragmentFiber.child,!1,B0,o,void 0,void 0);var l=s!==!1;if(o.length===0){var d=w(this._fragmentFiber);if(d=l?d[1]||d[0]||b(this._fragmentFiber):d[0]||d[1],d===null)return;if(d.tag===6){s=S(d),xC(s,l);return}if(d=S(d),d.nodeType!==9){if(d.nodeType===11){l="host"in d?d.host:null,l!==null&&l.scrollIntoView(s);return}d.scrollIntoView(s)}}for(d=l?o.length-1:0;d!==(l?-1:o.length);){var y=o[d];y.tag===6?(y=S(y),xC(y,l)):S(y).scrollIntoView(s),d+=l?-1:1}};function ZI(s,o){return s=S(s),bC(s,o),!1}function bC(s,o){s.reactFragments==null&&(s.reactFragments=new Set),s.reactFragments.add(o)}function vC(s,o){var l=o._eventListeners;if(l!==null)for(var d=0;d<l.length;d++){var y=l[d];s.addEventListener(y.type,y.attachedListener,Zc(y.optionsOrUseCapture))}s.nodeType!==3&&(l=o._observers,l!==null&&l.forEach(function(j){for(var I=0,J=0;J<Ro.length;J++){var me=Ro[J];(me.fragmentInstance!==o||me.observer!==j||me.instance!==s)&&(Ro[I++]=me)}Ro.length=I,j.observe(s)}),bC(s,o))}function JI(s,o){var l=o._eventListeners;if(l!==null)for(var d=0;d<l.length;d++){var y=l[d];s.removeEventListener(y.type,y.attachedListener,Zc(y.optionsOrUseCapture))}s.nodeType!==3&&(l=o._observers,l!==null&&l.forEach(function(j){typeof j.rootMargin=="string"?XI(o,j,s):j.unobserve(s)}),s.reactFragments!=null&&s.reactFragments.delete(o))}function U0(s){var o=s.firstChild;for(o&&o.nodeType===10&&(o=o.nextSibling);o;){var l=o;switch(o=o.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":U0(l),vc(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}s.removeChild(l)}}function eP(s,o,l,d){for(;s.nodeType===1;){var y=l;if(s.nodeName.toLowerCase()!==o.toLowerCase()){if(!d&&(s.nodeName!=="INPUT"||s.type!=="hidden"))break}else if(d){if(!s[cl])switch(o){case"meta":if(!s.hasAttribute("itemprop"))break;return s;case"link":if(j=s.getAttribute("rel"),j==="stylesheet"&&s.hasAttribute("data-precedence"))break;if(j!==y.rel||s.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||s.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||s.getAttribute("title")!==(y.title==null?null:y.title))break;return s;case"style":if(s.hasAttribute("data-precedence"))break;return s;case"script":if(j=s.getAttribute("src"),(j!==(y.src==null?null:y.src)||s.getAttribute("type")!==(y.type==null?null:y.type)||s.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&j&&s.hasAttribute("async")&&!s.hasAttribute("itemprop"))break;return s;default:return s}}else if(o==="input"&&s.type==="hidden"){var j=y.name==null?null:""+y.name;if(y.type==="hidden"&&s.getAttribute("name")===j)return s}else return s;if(s=oo(s.nextSibling),s===null)break}return null}function tP(s,o,l){if(o==="")return null;for(;s.nodeType!==3;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!l||(s=oo(s.nextSibling),s===null))return null;return s}function yC(s,o){for(;s.nodeType!==8;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!o||(s=oo(s.nextSibling),s===null))return null;return s}function H0(s){return s.data==="$?"||s.data==="$~"}function F0(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function nP(s,o){var l=s.ownerDocument;if(s.data==="$~")s._reactRetry=o;else if(s.data!=="$?"||l.readyState!=="loading")o();else{var d=function(){o(),l.removeEventListener("DOMContentLoaded",d)};l.addEventListener("DOMContentLoaded",d),s._reactRetry=d}}function oo(s){for(;s!=null;s=s.nextSibling){var o=s.nodeType;if(o===1||o===3)break;if(o===8){if(o=s.data,o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"||o==="F!"||o==="F")break;if(o==="/$"||o==="/&")return null}}return s}var G0=null;function wC(s){s=s.nextSibling;for(var o=0;s;){if(s.nodeType===8){var l=s.data;if(l==="/$"||l==="/&"){if(o===0)return oo(s.nextSibling);o--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||o++}s=s.nextSibling}return null}function jC(s){s=s.previousSibling;for(var o=0;s;){if(s.nodeType===8){var l=s.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(o===0)return s;o--}else l!=="/$"&&l!=="/&"||o++}s=s.previousSibling}return null}function sP(s,o){function l(){d=!0}if(s.ownerDocument.activeElement===s)return!0;var d=!1;try{s.ownerDocument.addEventListener("focus",l,!0),(s.focus||HTMLElement.prototype.focus).call(s,o)}finally{s.ownerDocument.removeEventListener("focus",l,!0)}return d}function rP(s){lC(function(){lC(function(o){return s(o)})})}function SC(s,o,l){switch(o=Rd(l),s){case"html":if(s=o.documentElement,!s)throw Error(a(452));return s;case"head":if(s=o.head,!s)throw Error(a(453));return s;case"body":if(s=o.body,!s)throw Error(a(454));return s;default:throw Error(a(451))}}function NC(s,o,l){for(var d in l){var y=l[d];l.hasOwnProperty(d)&&y!=null&&yn(s,o,d,null,DI,y)}l.dangerouslySetInnerHTML!=null&&(s.textContent=""),s.onclick===er&&(s.onclick=null),vc(s)}function q0(s){for(var o=s.attributes;o.length;)s.removeAttributeNode(o[0]);vc(s)}var ao=new Map,CC=new Set;function Ad(s){if(typeof s.getRootNode=="function"){var o=s.getRootNode();if(o.nodeType===9||o.nodeType===11)return o}return s.nodeType===9?s:s.ownerDocument}var Ia=le.d;le.d={f:oP,r:aP,D:iP,C:lP,L:cP,m:uP,X:fP,S:dP,M:hP};function oP(){var s=Ia.f(),o=dm();return s||o}function aP(s){var o=ul(s);o!==null&&o.tag===5&&o.type==="form"?TS(o):Ia.r(s)}var Jc=typeof document>"u"?null:document;function kC(s,o,l){var d=Jc;if(d&&typeof o=="string"&&o){var y=_n(o);y='link[rel="'+s+'"][href="'+y+'"]',typeof l=="string"&&(y+='[crossorigin="'+l+'"]'),CC.has(y)||(CC.add(y),s={rel:s,crossOrigin:l,href:o},d.querySelector(y)===null&&(o=d.createElement("link"),$s(o,"link",s),qe(o),d.head.appendChild(o)))}}function iP(s){Ia.D(s),kC("dns-prefetch",s,null)}function lP(s,o){Ia.C(s,o),kC("preconnect",s,o)}function cP(s,o,l){Ia.L(s,o,l);var d=Jc;if(d&&s&&o){var y='link[rel="preload"][as="'+_n(o)+'"]';o==="image"&&l&&l.imageSrcSet?(y+='[imagesrcset="'+_n(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(y+='[imagesizes="'+_n(l.imageSizes)+'"]')):y+='[href="'+_n(s)+'"]';var j=y;switch(o){case"style":j=eu(s);break;case"script":j=tu(s)}if(!(ao.has(j)||(s=k({rel:"preload",href:o==="image"&&l&&l.imageSrcSet?void 0:s,as:o},l),ao.set(j,s),d.querySelector(y)!==null||o==="style"&&d.querySelector(Md(j))||o==="script"&&d.querySelector(Od(j))))){var I=d.createElement("link");$s(I,"link",s),o==="style"&&(I[bc]=!0,I.onload=I.onerror=function(){bt(I)}),qe(I),d.head.appendChild(I)}}}function uP(s,o){Ia.m(s,o);var l=Jc;if(l&&s){var d=o&&typeof o.as=="string"?o.as:"script",y='link[rel="modulepreload"][as="'+_n(d)+'"][href="'+_n(s)+'"]',j=y;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":j=tu(s)}if(!ao.has(j)&&(s=k({rel:"modulepreload",href:s},o),ao.set(j,s),l.querySelector(y)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Od(j)))return}d=l.createElement("link"),$s(d,"link",s),qe(d),l.head.appendChild(d)}}}function dP(s,o,l){Ia.S(s,o,l);var d=Jc;if(d&&s){var y=Ge(d).hoistableStyles,j=eu(s);o=o||"default";var I=y.get(j);if(!I){var J={loading:0,preload:null};if(I=d.querySelector(Md(j)))J.loading=5;else{s=k({rel:"stylesheet",href:s,"data-precedence":o},l),(l=ao.get(j))&&Y0(s,l);var me=I=d.createElement("link");qe(me),$s(me,"link",s),me._p=new Promise(function(Ne,ze){me.onload=Ne,me.onerror=ze}),me.addEventListener("load",function(){J.loading|=1}),me.addEventListener("error",function(){J.loading|=2}),J.loading|=4,bm(I,o,d)}I={type:"stylesheet",instance:I,count:1,state:J},y.set(j,I)}}}function fP(s,o){Ia.X(s,o);var l=Jc;if(l&&s){var d=Ge(l).hoistableScripts,y=tu(s),j=d.get(y);j||(j=l.querySelector(Od(y)),j||(s=k({src:s,async:!0},o),(o=ao.get(y))&&K0(s,o),j=l.createElement("script"),qe(j),$s(j,"link",s),l.head.appendChild(j)),j={type:"script",instance:j,count:1,state:null},d.set(y,j))}}function hP(s,o){Ia.M(s,o);var l=Jc;if(l&&s){var d=Ge(l).hoistableScripts,y=tu(s),j=d.get(y);j||(j=l.querySelector(Od(y)),j||(s=k({src:s,async:!0,type:"module"},o),(o=ao.get(y))&&K0(s,o),j=l.createElement("script"),qe(j),$s(j,"link",s),l.head.appendChild(j)),j={type:"script",instance:j,count:1,state:null},d.set(y,j))}}function TC(s,o,l,d){var y=(y=de.current)?Ad(y):null;if(!y)throw Error(a(446));switch(s){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(l=eu(l.href),o=Ge(y).hoistableStyles,d=o.get(l),d||(d={type:"style",instance:null,count:0,state:null},o.set(l,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){s=eu(l.href);var j=Ge(y).hoistableStyles,I=j.get(s);if(I||(y=y.ownerDocument||y,I={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},j.set(s,I),(j=y.querySelector(Md(s)))?j._p||(I.instance=j,I.state.loading=5):(j=ao.get(s),j||(j={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},ao.set(s,j)),mP(y,s,j,I.state))),o&&d===null)throw Error(a(528,""));return I}if(o&&d!==null)throw Error(a(529,""));return null;case"script":return o=l.async,l=l.src,typeof l=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(l=tu(l),o=Ge(y).hoistableScripts,d=o.get(l),d||(d={type:"script",instance:null,count:0,state:null},o.set(l,d)),d):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,s))}}function eu(s){return'href="'+_n(s)+'"'}function Md(s){return'link[rel="stylesheet"]['+s+"]"}function EC(s){return k({},s,{"data-precedence":s.precedence,precedence:null})}function mP(s,o,l,d){if(o=s.querySelector('link[rel="preload"][as="style"]['+o+"]")){if(o[bc]!==!0){d.loading=1;return}}else o=s.createElement("link"),o[bc]=!0,o.onload=o.onerror=bt.bind(null,o),$s(o,"link",l),qe(o),s.head.appendChild(o);d.preload=o,o.addEventListener("load",function(){return d.loading|=1}),o.addEventListener("error",function(){return d.loading|=2})}function tu(s){return'[src="'+_n(s)+'"]'}function Od(s){return"script[async]"+s}function RC(s,o,l){if(o.count++,o.instance===null)switch(o.type){case"style":var d=s.querySelector('style[data-href~="'+_n(l.href)+'"]');if(d)return o.instance=d,qe(d),d;var y=k({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return d=(s.ownerDocument||s).createElement("style"),qe(d),$s(d,"style",y),bm(d,l.precedence,s),o.instance=d;case"stylesheet":y=eu(l.href);var j=s.querySelector(Md(y));if(j)return o.state.loading|=4,o.instance=j,qe(j),j;d=EC(l),(y=ao.get(y))&&Y0(d,y),j=(s.ownerDocument||s).createElement("link"),qe(j);var I=j;return I._p=new Promise(function(J,me){I.onload=J,I.onerror=me}),$s(j,"link",d),o.state.loading|=4,bm(j,l.precedence,s),o.instance=j;case"script":return j=tu(l.src),(y=s.querySelector(Od(j)))?(o.instance=y,qe(y),y):(d=l,(y=ao.get(j))&&(d=k({},l),K0(d,y)),s=s.ownerDocument||s,y=s.createElement("script"),qe(y),$s(y,"link",d),s.head.appendChild(y),o.instance=y);case"void":return null;default:throw Error(a(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(d=o.instance,o.state.loading|=4,bm(d,l.precedence,s));return o.instance}function bm(s,o,l){for(var d=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=d.length?d[d.length-1]:null,j=y,I=0;I<d.length;I++){var J=d[I];if(J.dataset.precedence===o)j=J;else if(j!==y)break}j?j.parentNode.insertBefore(s,j.nextSibling):(o=l.nodeType===9?l.head:l,o.insertBefore(s,o.firstChild))}function Y0(s,o){s.crossOrigin==null&&(s.crossOrigin=o.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=o.referrerPolicy),s.title==null&&(s.title=o.title)}function K0(s,o){s.crossOrigin==null&&(s.crossOrigin=o.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=o.referrerPolicy),s.integrity==null&&(s.integrity=o.integrity)}var vm=null;function AC(s,o,l){if(vm===null){var d=new Map,y=vm=new Map;y.set(l,d)}else y=vm,d=y.get(l),d||(d=new Map,y.set(l,d));if(d.has(s))return d;for(d.set(s,null),l=l.getElementsByTagName(s),y=0;y<l.length;y++){var j=l[y];if(!(j[cl]||j[Un]||s==="link"&&j.getAttribute("rel")==="stylesheet")&&j.namespaceURI!=="http://www.w3.org/2000/svg"){var I=j.getAttribute(o)||"";I=s+I;var J=d.get(I);J?J.push(j):d.set(I,[j])}}return d}function X0(s,o,l){s=s.ownerDocument||s,s.head.insertBefore(l,o==="title"?s.querySelector("head > title"):null)}function pP(s,o,l){if(l===1||o.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;switch(o.rel){case"stylesheet":return s=o.disabled,typeof o.precedence=="string"&&s==null;default:return!0}case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function MC(s,o){return s==="img"&&o.src!=null&&o.src!==""&&o.onLoad==null&&o.loading!=="lazy"}function OC(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function DC(s){return(s.width||100)*(s.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function zC(s,o){typeof o.decode=="function"&&(s.imgCount++,o.complete||(s.imgBytes+=DC(o),s.suspenseyImages.push(o)),s=bP.bind(s),o.decode().then(s,s))}function gP(s,o,l,d){if(l.type==="stylesheet"&&(typeof d.media!="string"||matchMedia(d.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var y=eu(d.href),j=o.querySelector(Md(y));if(j){o=j._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(s.count++,s=Dd.bind(s),o.then(s,s)),l.state.loading|=4,l.instance=j,qe(j);return}j=o.ownerDocument||o,d=EC(d),(y=ao.get(y))&&Y0(d,y),j=j.createElement("link"),qe(j);var I=j;I._p=new Promise(function(J,me){I.onload=J,I.onerror=me}),$s(j,"link",d),l.instance=j}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(l,o),(o=l.state.preload)&&(l.state.loading&3)===0&&(s.count++,l=Dd.bind(s),o.addEventListener("load",l),o.addEventListener("error",l))}}var ym=0;function xP(s,o){return s.stylesheets&&s.count===0&&jm(s,s.stylesheets),0<s.count||0<s.imgCount?function(l){var d=setTimeout(function(){if(s.stylesheets&&jm(s,s.stylesheets),s.unsuspend){var j=s.unsuspend;s.unsuspend=null,j()}},6e4+o);0<s.imgBytes&&ym===0&&(ym=62500*II());var y=setTimeout(function(){if(s.waitingForImages=!1,s.count===0&&(s.stylesheets&&jm(s,s.stylesheets),s.unsuspend)){var j=s.unsuspend;s.unsuspend=null,j()}},(s.imgBytes>ym?50:800)+o);return s.unsuspend=l,function(){s.unsuspend=null,clearTimeout(d),clearTimeout(y)}}:null}function IC(s){if(s.count===0&&(s.imgCount===0||!s.waitingForImages)){if(s.stylesheets)jm(s,s.stylesheets);else if(s.unsuspend){var o=s.unsuspend;s.unsuspend=null,o()}}}function Dd(){this.count--,IC(this)}function bP(){this.imgCount--,IC(this)}var wm=null;function jm(s,o){s.stylesheets=null,s.unsuspend!==null&&(s.count++,wm=new Map,o.forEach(vP,s),wm=null,Dd.call(s))}function vP(s,o){if(!(o.state.loading&4)){var l=wm.get(s);if(l)var d=l.get(null);else{l=new Map,wm.set(s,l);for(var y=s.querySelectorAll("link[data-precedence],style[data-precedence]"),j=0;j<y.length;j++){var I=y[j];(I.nodeName==="LINK"||I.getAttribute("media")!=="not all")&&(l.set(I.dataset.precedence,I),d=I)}d&&l.set(null,d)}y=o.instance,I=y.getAttribute("data-precedence"),j=l.get(I)||d,j===d&&l.set(null,y),l.set(I,y),this.count++,d=Dd.bind(this),y.addEventListener("load",d),y.addEventListener("error",d),j?j.parentNode.insertBefore(y,j.nextSibling):(s=s.nodeType===9?s.head:s,s.insertBefore(y,s.firstChild)),o.state.loading|=4}}var nu={$$typeof:V,Provider:null,Consumer:null,_currentValue:re,_currentValue2:re,_threadCount:0};function yP(s,o,l,d,y,j,I,J,me){this.tag=1,this.containerInfo=s,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=Wt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wt(0),this.hiddenUpdates=Wt(null),this.identifierPrefix=d,this.onUncaughtError=y,this.onCaughtError=j,this.onRecoverableError=I,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=me,this.transitionTypes=null,this.incompleteTransitions=new Map}function PC(s,o,l,d,y,j,I,J,me,Ne,ze,$e){return s=new yP(s,o,l,I,me,Ne,ze,$e,J),o=1,j===!0&&(o|=24),j=dr(3,null,null,o),s.current=j,j.stateNode=s,o=ub(),o.refCount++,s.pooledCache=o,o.refCount++,j.memoizedState={element:d,isDehydrated:l,cache:o},mb(j),s}function _C(s){return s?(s=Ec,s):Ec}function LC(s,o,l,d,y,j){y=_C(y),d.context===null?d.context=y:d.pendingContext=y,d=xi(o),d.payload={element:l},j=j===void 0?null:j,j!==null&&(d.callback=j),l=bi(s,d,o),l!==null&&(pr(l,s,o),ud(l,s,o))}function $C(s,o){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var l=s.retryLane;s.retryLane=l!==0&&l<o?l:o}}function W0(s,o){$C(s,o),(s=s.alternate)&&$C(s,o)}function BC(s){if(s.tag===13||s.tag===31){var o=bl(s,67108864);o!==null&&pr(o,s,67108864),W0(s,67108864)}}function VC(s){if(s.tag===13||s.tag===31){var o=zr();o=cr(o);var l=bl(s,o);l!==null&&pr(l,s,o),W0(s,o)}}var su=!0;function wP(s,o,l,d){var y=ae.T;ae.T=null;var j=le.p;try{le.p=2,Q0(s,o,l,d)}finally{le.p=j,ae.T=y}}function jP(s,o,l,d){var y=ae.T;ae.T=null;var j=le.p;try{le.p=8,Q0(s,o,l,d)}finally{le.p=j,ae.T=y}}function Q0(s,o,l,d){if(su){var y=Z0(d);if(y===null)O0(s,o,d,Sm,l),HC(s,d);else if(NP(y,s,o,l,d))d.stopPropagation();else if(HC(s,d),o&4&&-1<SP.indexOf(s)){for(;y!==null;){var j=ul(y);if(j!==null)switch(j.tag){case 3:if(j=j.stateNode,j.current.memoizedState.isDehydrated){var I=Kn(j.pendingLanes);if(I!==0){var J=j;for(J.pendingLanes|=2,J.entangledLanes|=2;I;){var me=1<<31-it(I);J.entanglements[1]|=me,I&=~me}Wo(j),(dn&6)===0&&(lm=be()+500,kd(0))}}break;case 31:case 13:J=bl(j,2),J!==null&&pr(J,j,2),dm(),W0(j,2)}if(j=Z0(d),j===null&&O0(s,o,d,Sm,l),j===y)break;y=j}y!==null&&d.stopPropagation()}else O0(s,o,d,null,l)}}function Z0(s){return s=hl(s),J0(s)}var Sm=null;function J0(s){if(Sm=null,s=So(s),s!==null){var o=c(s);if(o===null)s=null;else{var l=o.tag;if(l===13){if(s=u(o),s!==null)return s;s=null}else if(l===31){if(s=f(o),s!==null)return s;s=null}else if(l===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;s=null}else o!==s&&(s=null)}}return Sm=s,null}function UC(s){switch(s){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"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"fullscreenerror":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"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ue()){case Qe:return 2;case xt:return 8;case Ke:case Be:return 32;case jt:return 268435456;default:return 32}default:return 32}}var ev=!1,Ai=null,Mi=null,Oi=null,zd=new Map,Id=new Map,Di=[],SP="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function HC(s,o){switch(s){case"focusin":case"focusout":Ai=null;break;case"dragenter":case"dragleave":Mi=null;break;case"mouseover":case"mouseout":Oi=null;break;case"pointerover":case"pointerout":zd.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Id.delete(o.pointerId)}}function Pd(s,o,l,d,y,j){return s===null||s.nativeEvent!==j?(s={blockedOn:o,domEventName:l,eventSystemFlags:d,nativeEvent:j,targetContainers:[y]},o!==null&&(o=ul(o),o!==null&&BC(o)),s):(s.eventSystemFlags|=d,o=s.targetContainers,y!==null&&o.indexOf(y)===-1&&o.push(y),s)}function NP(s,o,l,d,y){switch(o){case"focusin":return Ai=Pd(Ai,s,o,l,d,y),!0;case"dragenter":return Mi=Pd(Mi,s,o,l,d,y),!0;case"mouseover":return Oi=Pd(Oi,s,o,l,d,y),!0;case"pointerover":var j=y.pointerId;return zd.set(j,Pd(zd.get(j)||null,s,o,l,d,y)),!0;case"gotpointercapture":return j=y.pointerId,Id.set(j,Pd(Id.get(j)||null,s,o,l,d,y)),!0}return!1}function FC(s){var o=So(s.target);if(o!==null){var l=c(o);if(l!==null){if(o=l.tag,o===13){if(o=u(l),o!==null){s.blockedOn=o,Ms(s.priority,function(){VC(l)});return}}else if(o===31){if(o=f(l),o!==null){s.blockedOn=o,Ms(s.priority,function(){VC(l)});return}}else if(o===3&&l.stateNode.current.memoizedState.isDehydrated){s.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}s.blockedOn=null}function Nm(s){if(s.blockedOn!==null)return!1;for(var o=s.targetContainers;0<o.length;){var l=Z0(s.nativeEvent);if(l===null){l=s.nativeEvent;var d=new l.constructor(l.type,l);fl=d,l.target.dispatchEvent(d),fl=null}else return o=ul(l),o!==null&&BC(o),s.blockedOn=l,!1;o.shift()}return!0}function GC(s,o,l){Nm(s)&&l.delete(o)}function CP(){ev=!1,Ai!==null&&Nm(Ai)&&(Ai=null),Mi!==null&&Nm(Mi)&&(Mi=null),Oi!==null&&Nm(Oi)&&(Oi=null),zd.forEach(GC),Id.forEach(GC)}function Cm(s,o){s.blockedOn===o&&(s.blockedOn=null,ev||(ev=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,CP)))}var km=null;function qC(s){km!==s&&(km=s,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){km===s&&(km=null);for(var o=0;o<s.length;o+=3){var l=s[o],d=s[o+1],y=s[o+2];if(typeof d!="function"){if(J0(d||l)===null)continue;break}var j=ul(l);j!==null&&(s.splice(o,3),o-=3,Ib(j,{pending:!0,data:y,method:l.method,action:d},d,y))}}))}function ru(s){function o(me){return Cm(me,s)}Ai!==null&&Cm(Ai,s),Mi!==null&&Cm(Mi,s),Oi!==null&&Cm(Oi,s),zd.forEach(o),Id.forEach(o);for(var l=0;l<Di.length;l++){var d=Di[l];d.blockedOn===s&&(d.blockedOn=null)}for(;0<Di.length&&(l=Di[0],l.blockedOn===null);)FC(l),l.blockedOn===null&&Di.shift();if(l=(s.ownerDocument||s).$$reactFormReplay,l!=null)for(d=0;d<l.length;d+=3){var y=l[d],j=l[d+1],I=y[Os]||null;if(typeof j=="function")I||qC(l);else if(I){var J=null;if(j&&j.hasAttribute("formAction")){if(y=j,I=j[Os]||null)J=I.formAction;else if(J0(y)!==null)continue}else J=I.action;typeof J=="function"?l[d+1]=J:(l.splice(d,3),d-=3),qC(l)}}}function YC(){function s(j){j.canIntercept&&j.info==="react-transition"&&j.intercept({handler:function(){return new Promise(function(I){return y=I})},focusReset:"manual",scroll:"manual"})}function o(){y!==null&&(y(),y=null),d||setTimeout(l,20)}function l(){if(!d&&!navigation.transition){var j=navigation.currentEntry;j&&j.url!=null&&navigation.navigate(j.url,{state:j.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var d=!1,y=null;return navigation.addEventListener("navigate",s),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(l,100),function(){d=!0,navigation.removeEventListener("navigate",s),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),y!==null&&(y(),y=null)}}}function tv(s){this._internalRoot=s}Tm.prototype.render=tv.prototype.render=function(s){var o=this._internalRoot;if(o===null)throw Error(a(409));var l=o.current,d=zr();LC(l,d,s,o,null,null)},Tm.prototype.unmount=tv.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var o=s.containerInfo;LC(s.current,2,null,s,null,null),dm(),o[Nr]=null}};function Tm(s){this._internalRoot=s}Tm.prototype.unstable_scheduleHydration=function(s){if(s){var o=ds();s={blockedOn:null,target:s,priority:o};for(var l=0;l<Di.length&&o!==0&&o<Di[l].priority;l++);Di.splice(l,0,s),l===0&&FC(s)}};var KC=t.version;if(KC!=="19.3.0")throw Error(a(527,KC,"19.3.0"));le.findDOMNode=function(s){var o=s._reactInternals;if(o===void 0)throw typeof s.render=="function"?Error(a(188)):(s=Object.keys(s).join(","),Error(a(268,s)));return s=h(o),s=s!==null?g(s):null,s=s===null?null:s.stateNode,s};var kP={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:ae,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Em=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Em.isDisabled&&Em.supportsFiber)try{je=Em.inject(kP),Ye=Em}catch{}}return Ld.createRoot=function(s,o){if(!i(s))throw Error(a(299));var l=!1,d="",y=_S,j=LS,I=$S;return o!=null&&(o.unstable_strictMode===!0&&(l=!0),o.identifierPrefix!==void 0&&(d=o.identifierPrefix),o.onUncaughtError!==void 0&&(y=o.onUncaughtError),o.onCaughtError!==void 0&&(j=o.onCaughtError),o.onRecoverableError!==void 0&&(I=o.onRecoverableError)),o=PC(s,1,!1,null,null,l,d,null,y,j,I,YC),s[Nr]=o.current,M0(s),new tv(o)},Ld.hydrateRoot=function(s,o,l){if(!i(s))throw Error(a(299));var d=!1,y="",j=_S,I=LS,J=$S,me=null;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(y=l.identifierPrefix),l.onUncaughtError!==void 0&&(j=l.onUncaughtError),l.onCaughtError!==void 0&&(I=l.onCaughtError),l.onRecoverableError!==void 0&&(J=l.onRecoverableError),l.formState!==void 0&&(me=l.formState)),o=PC(s,1,!0,o,l??null,d,y,me,j,I,J,YC),o.context=_C(null),l=o.current,d=zr(),d=cr(d),y=xi(d),y.callback=null,bi(l,y,d),l=d,o.current.lanes=l,un(o,l),Wo(o),s[Nr]=o.current,M0(s),new Tm(o)},Ld.version="19.3.0",Ld}var ok;function KP(){if(ok)return ov.exports;ok=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),ov.exports=YP(),ov.exports}var XP=KP();const WP="modulepreload",QP=function(e){return"/"+e},ak={},gy=function(t,r,a){let i=Promise.resolve();if(r&&r.length>0){let u=function(h){return Promise.all(h.map(g=>Promise.resolve(g).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),m=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));i=u(r.map(h=>{if(h=QP(h),h in ak)return;ak[h]=!0;const g=h.endsWith(".css"),p=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${p}`))return;const b=document.createElement("link");if(b.rel=g?"stylesheet":WP,g||(b.as="script"),b.crossOrigin="",b.href=h,m&&b.setAttribute("nonce",m),document.head.appendChild(b),g)return new Promise((v,w)=>{b.addEventListener("load",v),b.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${h}`)))})}))}function c(u){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=u,window.dispatchEvent(f),!f.defaultPrevented)throw u}return i.then(u=>{for(const f of u||[])f.status==="rejected"&&c(f.reason);return t().catch(c)})},ZP="openrod.compute-target";function JP(e,t){if(!["local","cloud"].includes(e))throw new Error("Unknown compute target");return`${e==="cloud"?"/api/remote/os":"/api/os"}${t}`}let GR="local";const qR=()=>GR;function YR(e){if(!["local","cloud"].includes(e))throw new Error("Unknown compute target");GR=e}function e6(e,t){const r=t??null;return{uid:r,revision:e.revision+(e.uid&&e.uid!==r?1:0)}}let KR=null;const XR=()=>KR;function ik(e){KR=typeof e=="string"&&/^[a-f0-9]{16}$/.test(e)?e:null}var lk={projectToken:"phc_t8z9eNB6eJABMR9iLkDbqAZH5wFh7wmjjDqEpAxnPPAU",host:"https://us.i.posthog.com",version:"0.2.0-rc.3",environment:"production",enabled:!0};const t6=/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$/i,ck="openrod.usage.v1",$d="openrod.usage-id.v1",cv="openrod.usage-session.v1",Rm="openrod.terminal-flows.v1",Ks=(...e)=>t=>e.includes(t)?t:void 0,cu=e=>typeof e=="string"&&t6.test(e)?e:void 0,Ui=e=>Number.isFinite(e)&&e>=0?Math.min(Math.round(e),864e5):void 0,uv=e=>typeof e=="boolean"?e:void 0,L1=Ks("sandboxes","activity","groups","egress","ingress","secrets","templates","setups","connections","terminal"),xy=Ks("gateway_connection","sandbox_creation","session_launch"),by=Ks("local","ssh","cloud","unknown"),uk=Ks("docker_missing","docker_unavailable","openshell_missing","gateway_unavailable","ssh_auth","host_key","runtime_missing","image_build","credentials_missing","setup_import","policy","file_seed","timeout","connection_lost","unknown"),dv={flow:xy,flow_id:cu,attempt:Ui,location_type:by,launch_target:Ks("browser","terminal","vscode","cursor")},n6=e=>typeof e=="string"?e.trim().slice(0,2e3):void 0,s6=e=>Array.isArray(e)?[...new Set(e.filter(t=>["claude","codex","cursor","pi","antigravity","opencode","aider","copilot","kiro","droid"].includes(t)))].slice(0,12):void 0,dk={creation_mode:Ks("quick","template"),file_source:Ks("empty","folder","repo"),agent_ids:s6,setup_count:Ui,provider_count:Ui,group_count:Ui},fk={console_opened:{gateway_state:Ks("available","setup_required","unavailable"),first_observed_visit:uv,connection_method:Ks("automatic","manual","existing","unknown")},view_opened:{previous_view:L1},flow_started:{...dv,...dk},flow_step_changed:{...dv,step:Ks("location","configuration","validation","host_selection","connecting","needs_docker","needs_runtime","preparing_tools","building_image","creating","requesting"),state:Ks("entered","blocked"),error_category:uk},flow_finished:{...dv,...dk,outcome:Ks("connected","created","live","handoff_requested","failed","cancelled"),duration_ms:Ui,start_observed:uv,error_category:uk},sandbox_ready:{flow_id:cu,duration_ms:Ui,location_type:by},feature_used:{feature:Ks("template","setup","network","group","activity","files","sandbox"),action:Ks("built","imported","activated","rule_saved","membership_saved","filter_applied","exported","uploaded","started","stopped","deleted"),count:Ui,location_type:by},feedback_submitted:{prompt:Ks("general"),category:Ks("general"),text:n6,feedback_only:uv}};function Am(e,t={}){if(!Object.hasOwn(fk,e))return null;const r={};for(const[a,i]of Object.entries({view:L1,...fk[e]})){const c=i(t[a]);c!==void 0&&(r[a]=c)}return r}const r6=[[/host key/i,"host_key"],[/permission denied|publickey|authentication failed/i,"ssh_auth"],[/docker (engine )?is missing|docker isn.t installed|install docker/i,"docker_missing"],[/docker isn.t running|docker daemon|reach docker|docker.*not available/i,"docker_unavailable"],[/openshell (cli )?is not installed|openshell isn.t installed/i,"openshell_missing"],[/runtime (image|package)|sandbox runtime/i,"runtime_missing"],[/timed out/i,"timeout"],[/gateway/i,"gateway_unavailable"]];function Cu(e){if((e==null?void 0:e.name)==="TimeoutError"||(e==null?void 0:e.status)===504)return"timeout";if((e==null?void 0:e.code)==="GATEWAY_DOCKER_MISMATCH")return"docker_unavailable";const t=typeof(e==null?void 0:e.message)=="string"?e.message:"";for(const[r,a]of r6)if(r.test(t))return a;return(e==null?void 0:e.name)==="TypeError"?"connection_lost":(e==null?void 0:e.status)===502||(e==null?void 0:e.status)===503?"gateway_unavailable":"unknown"}function o6({getStorage:e=()=>window.localStorage,getLocation:t=()=>window.location.href,randomUUID:r=()=>crypto.randomUUID(),now:a=()=>Date.now(),fetch:i=(...h)=>fetch(...h),setTimer:c=setTimeout,clearTimer:u=clearTimeout,replaceLocation:f=h=>window.history.replaceState(window.history.state,"",h),config:m=typeof lk>"u"?{}:lk}={}){let h=!1,g=!1,p=!1,b,v,w=!1,C;const S=m.host==="https://eu.i.posthog.com"?"EU":"US";let N=Object.freeze({available:!1,sharing:null,destination:S});const E=new Set,T=new Map,R=new Set,M=new Map,A=new Map;let k=[],O=0;const D=()=>e(),_=(Z,pe)=>{try{return Z()}catch{return pe}};function H(){O++;for(const[Z,pe]of T)Z.abort(),u(pe);T.clear(),R.clear(),M.clear(),A.clear(),k=[],w=!1,v=void 0,C=void 0}function G(){const Z=new URL(t());return!Z.searchParams.has("token")&&!Z.searchParams.has("handoff")&&!/^#local-(connect|return)=/.test(Z.hash)&&!(m.environment==="development"&&Z.searchParams.has("fleet"))}function B(){return _(()=>h&&g&&!p&&m.enabled===!0&&/^phc_[a-zA-Z0-9]+$/.test(m.projectToken??"")&&["https://us.i.posthog.com","https://eu.i.posthog.com"].includes(m.host)&&G(),!1)}function P(){_(()=>{let Z=null;try{const ue=D().getItem(ck);Z=ue==="yes"?!0:ue==="no"?!1:null}catch{p=!0,H()}Z!==!0&&N.sharing===!0&&H();const pe={available:B(),sharing:Z,destination:S};if(Object.keys(pe).some(ue=>pe[ue]!==N[ue])){N=Object.freeze(pe);for(const ue of E)_(ue)}})}function V({enabled:Z=!1,mode:pe="local"}={}){_(()=>{h=pe==="local",g=Z,(!h||!Z)&&H(),P()})}function Y(Z){_(()=>{try{if(D().setItem(ck,Z?"yes":"no"),!Z){for(const pe of[$d,cv,Rm])D().removeItem(pe);H()}}catch{p=!0,H()}P()})}function W(){const Z=D();let pe=cu(Z.getItem($d)),ue;C??(C=!pe),pe||(pe=r(),Z.setItem($d,pe));try{ue=JSON.parse(Z.getItem(cv))}catch{}return(!cu(ue==null?void 0:ue.id)||!Number.isFinite(ue==null?void 0:ue.at)||a()-ue.at>18e5)&&(ue={id:r()}),Z.setItem(cv,JSON.stringify({id:ue.id,at:a()})),{id:pe,session:ue.id,first:C}}function q(Z,pe={},{explicitFeedback:ue=!1}={}){return _(()=>{if(P(),!N.available||N.sharing!==!0&&!(ue&&Z==="feedback_submitted"))return!1;const ve=Am(Z,pe);if(!ve)return!1;const Ce=N.sharing===!0;let Ie;try{Ie=Ce?W():{id:r()}}catch{return p=!0,H(),P(),!1}if(k=k.filter(Re=>a()-Re<6e4),T.size>=6||k.length>=120)return!1;const de=new AbortController,Te=c(()=>{de.abort(),T.delete(de)},3e3);T.set(de,Te),k.push(a());const oe={api_key:m.projectToken,event:Z,distinct_id:Ie.id,timestamp:new Date(a()).toISOString(),properties:{schema_version:1,app_version:m.version,environment:m.environment,...Ce&&Ie.session?{$session_id:Ie.session}:{},...Ce&&b?{view:b}:{},...ve,$process_person_profile:!1,...Ce?{}:{$geoip_disable:!0},...Z==="console_opened"?{first_observed_visit:Ie.first}:{},...ue?{feedback_only:!Ce}:{}}},fe=()=>{u(Te),T.delete(de)};Z==="console_opened"&&(C=!1);try{Promise.resolve(i(`${m.host}/i/v0/e/`,{method:"POST",headers:{"content-type":"text/plain"},body:JSON.stringify(oe),signal:de.signal,credentials:"omit",referrerPolicy:"no-referrer",cache:"no-store",redirect:"error",keepalive:!0})).then(fe,fe)}catch{fe()}return!0},!1)}function ee(Z){_(()=>{w||!["live","setup-required","gateway-down"].includes(Z)||q("console_opened",{gateway_state:Z==="live"?"available":Z==="setup-required"?"setup_required":"unavailable",connection_method:"existing"})&&(w=!0)})}function z(Z){_(()=>{b=L1(Z),b&&b!==v&&q("view_opened",{previous_view:v})&&(v=b)})}function L(Z,pe={},ue=null){return _(()=>{if(P(),!N.available||N.sharing!==!0||!xy(Z))return null;const ve=W().id;((ue==null?void 0:ue.generation)!==O||(ue==null?void 0:ue.installationId)!==ve||(ue==null?void 0:ue.flow)!==Z)&&(ue=null),ue&&ue.outcome!=="failed"&&ue.started!==null&&(ue.outcome||F(ue,"cancelled"),ue=null);const Ce={generation:O,installationId:ve,id:(ue==null?void 0:ue.id)??r(),flow:Z,attempt:((ue==null?void 0:ue.attempt)??0)+1,started:a(),properties:Am("flow_started",pe)};return q("flow_started",{...Ce.properties,flow:Z,flow_id:Ce.id,attempt:Ce.attempt}),U(Ce,Z==="session_launch"?"requesting":Z==="gateway_connection"?"connecting":"preparing_tools"),Ce},null)}function X(Z,pe={}){return _(()=>(P(),!N.available||N.sharing!==!0||!xy(Z)?null:{generation:O,installationId:W().id,id:r(),flow:Z,attempt:0,started:null,properties:Am("flow_started",pe)}),null)}const te=Z=>Z&&Z.generation===O&&N.available&&N.sharing===!0&&cu(Z.installationId)&&Z.installationId===D().getItem($d),$=Z=>({...Z.properties,flow:Z.flow,flow_id:Z.id,attempt:Z.attempt});function U(Z,pe,ue="entered",ve){_(()=>{if(P(),!te(Z))return;const Ce=`${Z.id}:${Z.attempt}`,Ie=`${pe}:${ue}:${ve}`;M.get(Ce)!==Ie&&(M.size>=100&&M.delete(M.keys().next().value),M.set(Ce,Ie),q("flow_step_changed",{...$(Z),step:pe,state:ue,error_category:ve}))})}function F(Z,pe,ue){_(()=>{if(P(),!te(Z))return;const ve=`${Z.id}:${Z.attempt}`;R.has(ve)||(R.size>=200&&R.delete(R.values().next().value),R.add(ve),M.delete(ve),Z.outcome=pe,q("flow_finished",{...$(Z),outcome:pe,start_observed:Z.started!==null,duration_ms:Z.started===null?void 0:a()-Z.started,error_category:ue}))})}function K(Z){_(()=>{if(P(),!te(Z))return;const pe=`${Z.id}:ready`;R.has(pe)||(R.size>=200&&R.delete(R.values().next().value),R.add(pe),q("sandbox_ready",{flow_id:Z.id,duration_ms:a()-Z.started,location_type:Z.properties.location_type}))})}function se(Z){return q("feedback_submitted",Z,{explicitFeedback:!0})}function ne(Z,pe={}){_(()=>{const ue=L("session_launch",{...pe,launch_target:"browser"});if(P(),!te(ue))return;const ve=new URL(Z.currentTarget.href),[Ce,Ie=""]=ve.hash.split("?"),de=new URLSearchParams(Ie);de.set("analyticsFlow",ue.id),ve.hash=`${Ce}?${de}`;try{const Te=ae();Te.push(ue),D().setItem(Rm,JSON.stringify(Te.slice(-20))),Z.currentTarget.href=ve.href}catch{}})}function ye(Z,pe){try{D().setItem(Rm,JSON.stringify(Z.filter(ue=>ue.id!==pe)))}catch{}_(()=>{const ue=new URL(t()),[ve,Ce=""]=ue.hash.split("?"),Ie=new URLSearchParams(Ce);Ie.delete("analyticsFlow"),ue.hash=Ie.toString()?`${ve}?${Ie}`:ve,f(ue.href)})}function ae(){let Z=[];try{Z=JSON.parse(D().getItem(Rm)||"[]")}catch{}return Array.isArray(Z)?Z.filter(pe=>cu(pe.id)&&pe.flow==="session_launch"&&Number.isFinite(pe.started)&&a()-pe.started<18e5).slice(-20):[]}function le(Z,pe){return _(()=>{if(P(),!N.available||N.sharing!==!0)return null;if(pe)return L("session_launch",Z,pe);const ue=new URLSearchParams(new URL(t()).hash.split("?")[1]).get("analyticsFlow"),ve=W().id,Ce=ae(),Ie=Ce.find(de=>de.id===ue&&de.installationId===ve);return ue&&ye(Ce,ue),Ie?{generation:O,installationId:ve,id:Ie.id,flow:"session_launch",attempt:Ui(Ie.attempt)??1,started:Ie.started,properties:Am("flow_started",Ie.properties)}:L("session_launch",{...Z,launch_target:"browser"})},null)}function re(Z,pe){_(()=>{if(P(),!(!N.available||N.sharing!==!0)){if(Z.status==="ready"){q("feature_used",{feature:"template",action:"built",location_type:mf(pe)});return}Z.status==="building"&&(A.size>=100&&A.delete(A.keys().next().value),A.set(JSON.stringify([pe==null?void 0:pe.context,Z.name]),{installationId:W().id,startedAt:Z.startedAt,at:a(),location_type:mf(pe)}))}})}function Q(Z){_(()=>{var pe,ue;for(const ve of Z){const Ce=JSON.stringify([(pe=ve.location)==null?void 0:pe.context,ve.name]),Ie=A.get(Ce);if(Ie){if(Ie.installationId!==D().getItem($d)||a()-Ie.at>18e5){A.delete(Ce);continue}ve.startedAt&&ve.startedAt!==Ie.startedAt||((ue=ve.location)==null?void 0:ue.connected)===!1||(ve.status==="ready"?(A.delete(Ce),q("feature_used",{feature:"template",action:"built",location_type:Ie.location_type})):ve.status==="failed"&&A.delete(Ce))}}})}return{configure:V,setSharing:Y,refresh:P,capture:q,observeConsole:ee,observeView:z,startFlow:L,exploreFlow:X,step:U,finishFlow:F,ready:K,templateStarted:re,observeTemplates:Q,submitFeedback:se,terminalClick:ne,terminalFlow:le,subscribe:Z=>(E.add(Z),()=>E.delete(Z)),getSnapshot:()=>N,stop:()=>{h=!1,H(),P()}}}const ln=o6(),mf=e=>(e==null?void 0:e.target)==="cloud"?"cloud":e!=null&&e.remote?"ssh":"local";function a6(e,t){if(t==="GET"||t===void 0)return;const a=[[/^\/setups\/save$/,"setup","imported"],[/^\/setups\/[^/]+\/enable$/,"setup","activated"],[/^\/egress\/policies$/,"network","rule_saved"],[/^\/org\/members$/,"group","membership_saved"],[/^\/files\/[^/]+\/uploads\/[^/]+\/commit$/,"files","uploaded"],[/^\/sandboxes\/[^/]+\/start$/,"sandbox","started"],[/^\/sandboxes\/[^/]+\/stop$/,"sandbox","stopped"],[/^\/sandboxes\/[^/]+\/delete$/,"sandbox","deleted"]].find(([i])=>i.test(e));a&&ln.capture("feature_used",{feature:a[1],action:a[2]})}const $i="CONSOLE_TOKEN_REQUIRED";function lr(e,t,r=null,a=XR()){const i=()=>e??qR(),c=a;let u,f;const m=v=>JP(i(),v),h=v=>t&&v?AbortSignal.any([t,v]):t??v;async function g(){t==null||t.throwIfAborted();const v=await fetch(m("/context"),{signal:t,headers:{...i()==="cloud"&&c?{"x-openrod-local-owner":c}:{},...r?{"x-openshell-context":r,"x-openshell-location":"1"}:{}}}),w=await v.json();if(t==null||t.throwIfAborted(),w.code===$i?window.dispatchEvent(new Event($i)):(v.status===401||w.code==="CLOUD_OWNER_CHANGED")&&window.dispatchEvent(new Event("openrod-session-expired")),!v.ok)throw new Error(w.error??"Could not read gateway registrations.");return u??(u=JSON.stringify([w.gateway,w.workspace])),w}async function p(){return t==null||t.throwIfAborted(),r??(u||(f??(f=g().finally(()=>{f=null})),await f),u)}async function b(v,{method:w="GET",body:C,signal:S,scoped:N=!0,raw:E=!1}={}){const T=h(S);T==null||T.throwIfAborted();const R=N?await p():null;T==null||T.throwIfAborted();const M=await fetch(m(v),{method:w,signal:T,headers:{...i()==="cloud"&&c?{"x-openrod-local-owner":c}:{},...R?{"x-openshell-context":R}:{},...R&&r?{"x-openshell-location":"1"}:{},...w==="GET"?{}:{"content-type":E?"application/octet-stream":"application/json","x-openshell-console":"1"}},body:C===void 0?void 0:E?C:JSON.stringify(C)}),A=await M.json().catch(()=>({}));if(T==null||T.throwIfAborted(),A.code===$i?window.dispatchEvent(new Event($i)):(M.status===401||A.code==="CLOUD_OWNER_CHANGED")&&window.dispatchEvent(new Event("openrod-session-expired")),!M.ok)throw Object.assign(new Error(A.error??`Request failed (${M.status})`),{status:M.status,code:A.code,sandboxes:A.sandboxes,fix:A.fix});return a6(v,w),A}return{target:e,signal:t,path:m,owner:c,url:(v,w={})=>{const C=new URLSearchParams({...w,...i()==="cloud"&&c?{owner:c}:{}});return m(v)+(C.size?"?"+C:"")},forContext:v=>lr(e,t,v,c),inventory:v=>b("/inventory",{signal:v,scoped:!1}),context:g,contextKey:p,capabilities:()=>b("/capabilities",{scoped:!1}),importCapabilities:()=>b("/resource-imports/capabilities"),exportResources:v=>b("/resource-imports/export",{method:"POST",body:v}),planImport:v=>b("/resource-imports/plan",{method:"POST",body:v}),importJobs:()=>b("/resource-imports"),importJob:v=>b(`/resource-imports/${encodeURIComponent(v)}`),executeImport:v=>b(`/resource-imports/${encodeURIComponent(v)}/execute`,{method:"POST",body:{acknowledged:!0}}),retryImport:v=>b(`/resource-imports/${encodeURIComponent(v)}/retry`,{method:"POST",body:{acknowledged:!0}}),cancelImport:v=>b(`/resource-imports/${encodeURIComponent(v)}/cancel`,{method:"POST",body:{}}),connections:v=>b("/connections",{signal:v,scoped:!1}),connectionJob:(v,w)=>b(`/connections/jobs/${encodeURIComponent(v)}`,{signal:w,scoped:!1}),connect:v=>b("/connections/connect",{method:"POST",body:v,scoped:!1}),installConnectionDocker:v=>b(`/connections/jobs/${encodeURIComponent(v)}/docker`,{method:"POST",body:{approve:!0},scoped:!1}),installConnectionRuntime:v=>b(`/connections/jobs/${encodeURIComponent(v)}/install`,{method:"POST",body:{method:"download"},scoped:!1}),uploadConnectionPackage:(v,w)=>b(`/connections/jobs/${encodeURIComponent(v)}/package`,{method:"POST",body:w,raw:!0,scoped:!1}),scanSshHost:v=>b("/connections/hosts/scan",{method:"POST",body:v,scoped:!1}),addSshHost:v=>b("/connections/hosts",{method:"POST",body:{token:v},scoped:!1}),removeSshHost:v=>b("/connections/hosts/remove",{method:"POST",body:{alias:v},scoped:!1}),restoreSshHost:v=>b("/connections/hosts/restore",{method:"POST",body:{host:v},scoped:!1}),forgetRemote:()=>b("/connections/forget",{method:"POST",body:{},scoped:!1}),disconnectRemote:()=>b("/connections/disconnect",{method:"POST",body:{},scoped:!1}),syncLocalCatalog:()=>b("/local-catalog",{method:"POST",body:{}}),gatewayDocker:(v=!1)=>b(`/gateway-docker${v?"?fresh=1":""}`,{scoped:!1}),connectGatewayDocker:(v=[],w=!0)=>b("/gateway-docker/connect",{method:"POST",body:{confirm:w,seen:v},scoped:!1}),undoGatewayDocker:(v=[])=>b("/gateway-docker/undo",{method:"POST",body:{confirm:!0,seen:v},scoped:!1}),setups:()=>b("/setups"),discoverSetups:v=>b("/setups/scan",{method:"POST",body:{sources:v}}),reviewSetup:(v,w)=>b("/setups/review",{method:"POST",body:{token:v,ids:w}}),removeSetupReviewItem:(v,w)=>b("/setups/remove-review-item",{method:"POST",body:{token:v,item:w}}),prepareSetup:(v,w)=>b("/setups/prepare",{method:"POST",body:{token:v,items:w,approved:!0}}),prepareLaunchSetup:(v,w)=>b(`/setups/${v}/prepare-launch`,{method:"POST",body:{revision:w}}),prepareSavedSetup:v=>b(`/setups/${v}/prepare`,{method:"POST",body:{}}),setupPreparation:v=>b(`/setups/preparations/${v}`),cancelSetupPreparation:v=>b(`/setups/preparations/${v}/cancel`,{method:"POST",body:{}}),setupFile:(v,w,C)=>b("/setups/file",{method:"POST",body:{token:v,item:w,path:C}}),saveSetup:(v,w,C)=>b("/setups/save",{method:"POST",body:{token:v,name:w,acknowledged:C}}),deleteSetup:(v,w)=>b(`/setups/${v}/delete`,{method:"POST",body:{revision:w}}),deleteSetupItem:(v,w,C)=>b(`/setups/${v}/delete-item`,{method:"POST",body:{item:w,revision:C}}),previewSetup:(v,w,C)=>b(`/setups/${v}/preview`,{method:"POST",body:{sandbox:w,targets:C}}),enableSetup:(v,w,C,S=!1)=>b(`/setups/${v}/enable`,{method:"POST",body:{sandbox:w,token:C,approveAccess:S}}),removeSetup:(v,w,C)=>b(`/setups/${v}/remove`,{method:"POST",body:{sandbox:w,token:C}}),setupJobs:v=>b(`/setups/${v}/jobs`),cloudExport:v=>b(`/cloud-export?name=${encodeURIComponent(v)}`),importCloud:v=>b("/cloud-import",{method:"POST",body:v}),cloudTransfer:(v,w)=>b("/cloud-transfer",{method:"POST",body:{name:v,ticket:w}}),selectContext:v=>b("/context",{method:"POST",body:v}),previewActivityDeletion:v=>b("/activity/delete-preview",{method:"POST",body:v}),deleteActivity:v=>b("/activity/delete",{method:"POST",body:{token:v}}),activityDestinations:()=>b("/activity-destinations"),createActivityDestination:v=>b("/activity-destinations",{method:"POST",body:v}),activityDestinationAction:(v,w)=>b(`/activity-destinations/${encodeURIComponent(v)}/${w}`,{method:"POST",body:{}}),overview:()=>b("/overview"),sandbox:v=>b(`/sandboxes/${encodeURIComponent(v)}`),activity:(v={})=>b(`/activity?query=${encodeURIComponent(JSON.stringify(v))}`),create:v=>b("/sandboxes",{method:"POST",body:v}),sshConnection:v=>b(`/sandboxes/${encodeURIComponent(v)}/ssh`),openSshTerminal:(v,w)=>b(`/sandboxes/${encodeURIComponent(v)}/ssh-open`,{method:"POST",body:{mode:w}}),sshConfig:v=>b(`/sandboxes/${encodeURIComponent(v)}/ssh-config`,{method:"POST",body:{}}),terminalSession:(v,w)=>b(`/sandboxes/${encodeURIComponent(v)}/terminal-session`,{method:"POST",body:w}),lifecycle:(v,w)=>b(`/sandboxes/${encodeURIComponent(v)}/${w}`,{method:"POST",body:{}}),editors:()=>b("/editors"),openEditor:(v,w)=>b(`/sandboxes/${encodeURIComponent(v)}/editor`,{method:"POST",body:{editor:w}}),fleetPolicy:()=>b("/policy/fleet"),policy:v=>b(`/policy/${encodeURIComponent(v)}`),revision:(v,w)=>b(`/policy/${encodeURIComponent(v)}/revisions/${w}`),applyOps:(v,w)=>b(`/policy/${encodeURIComponent(v)}/ops`,{method:"POST",body:{ops:w}}),restore:(v,w)=>b(`/policy/${encodeURIComponent(v)}/restore`,{method:"POST",body:{version:w}}),globalPolicy:()=>b("/policy/global"),removeGlobal:()=>b("/policy/global/remove",{method:"POST",body:{}}),settings:v=>b(`/settings${v?`/${encodeURIComponent(v)}`:""}`),setSetting:v=>b("/settings",{method:"POST",body:v}),secrets:()=>b("/secrets"),createSecret:v=>b("/secrets",{method:"POST",body:v}),rotateSecret:(v,w)=>b(`/secrets/${encodeURIComponent(v)}/rotate`,{method:"POST",body:{credentials:w}}),secretExpiry:(v,w,C)=>b(`/secrets/${encodeURIComponent(v)}/expiry`,{method:"POST",body:{key:w,expiresAt:C}}),deleteSecret:v=>b(`/secrets/${encodeURIComponent(v)}/delete`,{method:"POST",body:{}}),attachSecret:(v,w,C)=>b(`/secrets/${encodeURIComponent(v)}/${C?"attach":"detach"}`,{method:"POST",body:{sandbox:w}}),importProfile:v=>b("/profiles/import",{method:"POST",body:{id:v}}),deleteTemplates:v=>b("/templates/delete",{method:"POST",body:{ids:v}}),templates:()=>b("/templates"),imageTemplates:()=>b("/image-templates"),localImages:()=>b("/image-templates/local-images"),buildImageTemplate:(v,w=!1)=>b("/image-templates",{method:"POST",body:{recipe:v,replace:w}}),cancelImageBuild:v=>b(`/image-templates/${encodeURIComponent(v)}/cancel`,{method:"POST",body:{}}),dismissImageBuild:v=>b(`/image-templates/${encodeURIComponent(v)}/dismiss`,{method:"POST",body:{}}),imageTemplateUsage:v=>b(`/image-templates/${encodeURIComponent(v)}/usage`),deleteImageTemplate:v=>b(`/image-templates/${encodeURIComponent(v)}/delete`,{method:"POST",body:{}}),org:()=>b("/org"),saveOrg:v=>b("/org",{method:"POST",body:v}),saveGroup:v=>b("/org/groups",{method:"POST",body:v}),deleteGroup:v=>b(`/org/groups/${encodeURIComponent(v)}/delete`,{method:"POST",body:{}}),setGroupMembers:(v,w,C="replace")=>b("/org/members",{method:"POST",body:{sandboxes:v,groups:w,mode:C}}),savePolicy:v=>b("/egress/policies",{method:"POST",body:v}),deletePolicy:v=>b(`/egress/policies/${encodeURIComponent(v)}/delete`,{method:"POST",body:{}}),saveTemplate:v=>b("/templates",{method:"POST",body:v}),deleteTemplate:v=>b(`/templates/${encodeURIComponent(v)}/delete`,{method:"POST",body:{}}),localFolder:v=>b("/local-folder",{method:"POST",body:{path:v}}),files:(v,w)=>b(`/files/${encodeURIComponent(v)}?path=${encodeURIComponent(w)}`),seed:v=>b(`/files/${encodeURIComponent(v)}/seed`),retrySeed:v=>b(`/files/${encodeURIComponent(v)}/seed/retry`,{method:"POST",body:{}}),prepareDownload:(v,w)=>b(`/files/${encodeURIComponent(v)}/download`,{method:"POST",body:{path:w}}),startUpload:v=>b(`/files/${encodeURIComponent(v)}/uploads`,{method:"POST",body:{}}),uploadFile:(v,w,C,S,N)=>b(`/files/${encodeURIComponent(v)}/uploads/${w}?path=${encodeURIComponent(C)}`,{method:"POST",body:S,raw:!0,signal:N}),commitUpload:(v,w,C)=>b(`/files/${encodeURIComponent(v)}/uploads/${w}/commit`,{method:"POST",body:{dir:C}}),cancelUpload:(v,w)=>b(`/files/${encodeURIComponent(v)}/uploads/${w}/cancel`,{method:"POST",body:{}}),ingress:()=>b("/ingress"),exposeService:v=>b("/ingress/expose",{method:"POST",body:v}),closeService:v=>b("/ingress/close",{method:"POST",body:{sandbox:v.sandbox,name:v.name}}),extendService:(v,w)=>b("/ingress/extend",{method:"POST",body:{sandbox:v.sandbox,name:v.name,closeAfterMinutes:w}})}}const cs=lr(),hk="https://console.openrod.io".trim(),ku=/^https:\/\/[a-z0-9.-]+(:\d+)?$/i.test(hk)?hk:"",mk="Cloud is coming soon. We're still working on it.";function Ag(){return typeof window<"u"}function Us(e){return $1(e)?(e.nodeName||"").toLowerCase():"#document"}function Rn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ei(e){var t;return(t=($1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $1(e){return Ag()?e instanceof Node||e instanceof Rn(e).Node:!1}function Ft(e){return Ag()?e instanceof Element||e instanceof Rn(e).Element:!1}function wn(e){return Ag()?e instanceof HTMLElement||e instanceof Rn(e).HTMLElement:!1}function Tu(e){return!Ag()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Rn(e).ShadowRoot}function zf(e){const{overflow:t,overflowX:r,overflowY:a,display:i}=Br(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+r)&&i!=="inline"&&i!=="contents"}function i6(e){return/^(table|td|th)$/.test(Us(e))}function Mg(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const l6=/transform|translate|scale|rotate|perspective|filter/,c6=/paint|layout|strict|content/,Pl=e=>!!e&&e!=="none";let fv;function B1(e){const t=Ft(e)?Br(e):e;return Pl(t.transform)||Pl(t.translate)||Pl(t.scale)||Pl(t.rotate)||Pl(t.perspective)||!V1()&&(Pl(t.backdropFilter)||Pl(t.filter))||l6.test(t.willChange||"")||c6.test(t.contain||"")}function u6(e){let t=Ya(e);for(;wn(t)&&!Ua(t);){if(B1(t))return t;if(Mg(t))return null;t=Ya(t)}return null}function V1(){return fv==null&&(fv=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),fv}function Ua(e){return/^(html|body|#document)$/.test(Us(e))}function Br(e){return Rn(e).getComputedStyle(e)}function Og(e){return Ft(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ya(e){if(Us(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Tu(e)&&e.host||ei(e);return Tu(t)?t.host:t}function WR(e){const t=Ya(e);return Ua(t)?(e.ownerDocument||e).body:wn(t)&&zf(t)?t:WR(t)}function pf(e,t,r){var a;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=WR(e),c=i===((a=e.ownerDocument)==null?void 0:a.body),u=Rn(i);if(c){const f=vy(u);return t.concat(u,u.visualViewport||[],zf(i)?i:[],f&&r?pf(f):[])}else return t.concat(i,pf(i,[],r))}function vy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const U1={...zP},pk={};function bs(e,t){const r=x.useRef(pk);return r.current===pk&&(r.current=e(t)),r}const hv=U1.useInsertionEffect,d6=hv&&hv!==U1.useLayoutEffect?hv:e=>e();function st(e){const t=bs(f6).current;return t.next=e,d6(t.effect),t.trampoline}function f6(){const e={next:void 0,callback:h6,trampoline:(...t)=>{var r;return(r=e.callback)==null?void 0:r.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function h6(){}const m6=()=>{},We=typeof document<"u"?x.useLayoutEffect:m6;function yy(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const H1={};function Qs(e,t,r,a,i){if(!r&&!a&&!i&&!e)return Fp(t);let c=Fp(e);return t&&(c=Kd(c,t)),r&&(c=Kd(c,r)),a&&(c=Kd(c,a)),i&&(c=Kd(c,i)),c}function p6(e){if(e.length===0)return H1;if(e.length===1)return Fp(e[0]);let t=Fp(e[0]);for(let r=1;r<e.length;r+=1)t=Kd(t,e[r]);return t}function Fp(e){return F1(e)?{...ZR(e,H1)}:g6(e)}function Kd(e,t){return F1(t)?ZR(t,e):x6(e,t)}function g6(e){const t={...e};for(const r in t){const a=t[r];QR(r,a)&&(t[r]=JR(a))}return t}function x6(e,t){if(!t)return e;for(const r in t){const a=t[r];switch(r){case"style":{e[r]=yy(e.style,a);break}case"className":{e[r]=eA(e.className,a);break}default:QR(r,a)?e[r]=b6(e[r],a):e[r]=a}}return e}function QR(e,t){const r=e.charCodeAt(0),a=e.charCodeAt(1),i=e.charCodeAt(2);return r===111&&a===110&&i>=65&&i<=90&&(typeof t=="function"||typeof t>"u")}function F1(e){return typeof e=="function"}function ZR(e,t){return F1(e)?e(t):e??H1}function b6(e,t){return t?e?(...r)=>{const a=r[0];if(tA(a)){const c=a;Gp(c);const u=t(...r);return c.baseUIHandlerPrevented||e==null||e(...r),u}const i=t(...r);return e==null||e(...r),i}:JR(t):e}function JR(e){return e&&((...t)=>{const r=t[0];return tA(r)&&Gp(r),e(...t)})}function Gp(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function eA(e,t){return t?e?t+" "+e:t:e}function tA(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function v6(e,t){return function(a,...i){const c=new URL(e);return c.searchParams.set("code",a.toString()),i.forEach(u=>c.searchParams.append("args[]",u)),`${t} error #${a}; visit ${c} for the full message.`}}const sn=v6("https://base-ui.com/production-error","Base UI"),nA=x.createContext(void 0);function Dg(e=!1){const t=x.useContext(nA);if(t===void 0&&!e)throw new Error(sn(16));return t}function y6(e){const{focusableWhenDisabled:t,disabled:r,composite:a=!1,tabIndex:i=0,isNativeButton:c}=e,u=a&&t!==!1,f=a&&t===!1;return{props:x.useMemo(()=>{const h={onKeyDown(g){r&&t&&g.key!=="Tab"&&g.preventDefault()}};return a||(h.tabIndex=i,!c&&r&&(h.tabIndex=t?i:-1)),(c&&(t||u)||!c&&r)&&(h["aria-disabled"]=r),c&&(!t||f)&&(h.disabled=r),h},[a,r,t,u,f,c,i])}}function Ht(e){return(e==null?void 0:e.ownerDocument)||document}function hu(e,t,{detail:r=0}={}){e.dispatchEvent(new(Rn(e)).PointerEvent("click",{bubbles:!0,cancelable:!0,composed:!0,detail:r,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function bo(e={}){const{disabled:t=!1,focusableWhenDisabled:r,tabIndex:a=0,native:i=!0,composite:c}=e,u=x.useRef(null),f=Dg(!0),m=c??f!==void 0,{props:h}=y6({focusableWhenDisabled:r,disabled:t,composite:m,tabIndex:a,isNativeButton:i}),g=x.useCallback(()=>{const v=u.current;mv(v)&&m&&t&&h.disabled===void 0&&v.disabled&&(v.disabled=!1)},[t,h.disabled,m]);We(g,[g]);const p=x.useCallback((v={})=>{const{onClick:w,onMouseDown:C,onKeyUp:S,onKeyDown:N,onPointerDown:E,...T}=v;return Qs({onClick(R){if(t){R.preventDefault();return}w==null||w(R)},onMouseDown(R){t||C==null||C(R)},onKeyDown(R){if(t||(Gp(R),N==null||N(R),R.baseUIHandlerPrevented))return;const M=R.target===R.currentTarget,A=R.currentTarget,k=mv(A),O=!i&&w6(A),D=M&&(i?k:!O),_=R.key==="Enter",H=R.key===" ",G=A.getAttribute("role"),B=(G==null?void 0:G.startsWith("menuitem"))||G==="option"||G==="gridcell";if(M&&m&&H){if(R.defaultPrevented&&B)return;R.preventDefault(),(!i||k)&&(R.preventBaseUIHandler(),hu(A,R));return}if(!D||i||!H&&!_){M&&O&&H&&R.preventDefault();return}R.defaultPrevented||(R.preventDefault(),_&&(R.preventBaseUIHandler(),hu(A,R)))},onKeyUp(R){if(!t){if(Gp(R),S==null||S(R),R.target===R.currentTarget&&i&&m&&mv(R.currentTarget)&&R.key===" "){R.preventDefault();return}R.baseUIHandlerPrevented||R.target===R.currentTarget&&!i&&!m&&!R.defaultPrevented&&R.key===" "&&(R.preventBaseUIHandler(),hu(R.currentTarget,R))}},onPointerDown(R){if(t){R.preventDefault();return}E==null||E(R)}},i?{type:"button"}:{role:"button"},h,T)},[t,h,m,i]),b=st(v=>{u.current=v,g()});return{getButtonProps:p,buttonRef:b}}function mv(e){return wn(e)&&e.tagName==="BUTTON"}function w6(e){return wn(e)&&e.tagName==="A"&&!!e.href}function mo(e,t,r,a){const i=bs(sA).current;return S6(i,e,t,r,a)&&rA(i,[e,t,r,a]),i.callback}function j6(e){const t=bs(sA).current;return N6(t,e)&&rA(t,e),t.callback}function sA(){return{callback:null,cleanup:null,refs:[]}}function S6(e,t,r,a,i){return e.refs[0]!==t||e.refs[1]!==r||e.refs[2]!==a||e.refs[3]!==i}function N6(e,t){return e.refs.length!==t.length||e.refs.some((r,a)=>r!==t[a])}function rA(e,t){if(e.refs=t,t.every(r=>r==null)){e.callback=null;return}e.callback=r=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),r!=null){const a=Array(t.length).fill(null);for(let i=0;i<t.length;i+=1){const c=t[i];if(c!=null)switch(typeof c){case"function":{const u=c(r);typeof u=="function"&&(a[i]=u);break}case"object":{c.current=r;break}}}e.cleanup=()=>{for(let i=0;i<t.length;i+=1){const c=t[i];if(c!=null)switch(typeof c){case"function":{const u=a[i];typeof u=="function"?u():c(null);break}case"object":{c.current=null;break}}}}}}}const C6=parseInt(x.version,10);function G1(e){return C6>=e}function gk(e){if(!x.isValidElement(e))return null;const t=e,r=t.props;return(G1(19)?r==null?void 0:r.ref:t.ref)??null}function Ln(){}const Vr=Object.freeze([]),En=Object.freeze({});function k6(e,t){const r={};for(const a in e){const i=e[a];if(t!=null&&t.hasOwnProperty(a)){const c=t[a](i);c!=null&&Object.assign(r,c);continue}i===!0?r[`data-${a.toLowerCase()}`]="":i&&(r[`data-${a.toLowerCase()}`]=i.toString())}return r}function T6(e,t){return typeof e=="function"?e(t):e}function oA(e,t){return typeof e=="function"?e(t):e}function Nt(e,t,r={}){let a=t.render;r.enabled!==!1&&(a=M6(a));const i=E6(t,r,a);if(r.enabled===!1)return null;const c=r.state??En;return O6(e,a,i,c)}function E6(e,t,r){const{className:a,style:i}=e,{state:c=En,ref:u,props:f,stateAttributesMapping:m,enabled:h=!0}=t,g=h?T6(a,c):void 0,p=h?oA(i,c):void 0,b=h?k6(c,m):En,v=h&&f?R6(f):void 0,w=h?yy(b,v)??{}:En;return typeof document<"u"&&(h?Array.isArray(u)?w.ref=j6([w.ref,gk(r),...u]):w.ref=mo(w.ref,gk(r),u):mo(null,null)),h?(g!==void 0&&(w.className=eA(w.className,g)),p!==void 0&&(w.style=yy(w.style,p)),w):En}function R6(e){return Array.isArray(e)?p6(e):Qs(void 0,e)}const A6=Symbol.for("react.lazy");function M6(e){if((e==null?void 0:e.$$typeof)!==A6)return e;const t=x.Children.toArray(e)[0];return x.isValidElement(t)?t:e}function O6(e,t,r,a){if(t){if(typeof t=="function")return t(r,a);const i=Qs(r,t.props);return i.ref=r.ref,x.cloneElement(t,i)}if(e&&typeof e=="string")return D6(e,r);throw new Error(sn(8))}function D6(e,t){return e==="button"?x.createElement("button",{type:"button",...t,key:t.key}):e==="img"?x.createElement("img",{alt:"",...t,key:t.key}):x.createElement(e,t)}const z6=x.forwardRef(function(t,r){const{render:a,className:i,disabled:c=!1,focusableWhenDisabled:u=!1,nativeButton:f=!0,style:m,...h}=t,{getButtonProps:g,buttonRef:p}=bo({disabled:c,focusableWhenDisabled:u,native:f});return Nt("button",t,{state:{disabled:c},ref:[r,p],props:[h,g]})});function aA(e){var t,r,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=aA(e[t]))&&(a&&(a+=" "),a+=r)}else for(r in e)e[r]&&(a&&(a+=" "),a+=r);return a}function iA(){for(var e,t,r=0,a="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=aA(e))&&(a&&(a+=" "),a+=t);return a}const xk=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,bk=iA,If=(e,t)=>r=>{var a;if((t==null?void 0:t.variants)==null)return bk(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:c}=t,u=Object.keys(i).map(h=>{const g=r==null?void 0:r[h],p=c==null?void 0:c[h];if(g===null)return null;const b=xk(g)||xk(p);return i[h][b]}),f=r&&Object.entries(r).reduce((h,g)=>{let[p,b]=g;return b===void 0||(h[p]=b),h},{}),m=t==null||(a=t.compoundVariants)===null||a===void 0?void 0:a.reduce((h,g)=>{let{class:p,className:b,...v}=g;return Object.entries(v).every(w=>{let[C,S]=w;return Array.isArray(S)?S.includes({...c,...f}[C]):{...c,...f}[C]===S})?[...h,p,b]:h},[]);return bk(e,u,m,r==null?void 0:r.class,r==null?void 0:r.className)},I6=(e,t)=>{const r=new Array(e.length+t.length);for(let a=0;a<e.length;a++)r[a]=e[a];for(let a=0;a<t.length;a++)r[e.length+a]=t[a];return r},P6=(e,t)=>({classGroupId:e,validator:t}),lA=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),qp="-",vk=[],_6="arbitrary..",L6=e=>{const t=B6(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return $6(u);const f=u.split(qp),m=f[0]===""&&f.length>1?1:0;return cA(f,m,t)},getConflictingClassGroupIds:(u,f)=>{if(f){const m=a[u],h=r[u];return m?h?I6(h,m):m:h||vk}return r[u]||vk}}},cA=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const i=e[t],c=r.nextPart.get(i);if(c){const h=cA(e,t+1,c);if(h)return h}const u=r.validators;if(u===null)return;const f=t===0?e.join(qp):e.slice(t).join(qp),m=u.length;for(let h=0;h<m;h++){const g=u[h];if(g.validator(f))return g.classGroupId}},$6=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),a=t.slice(0,r);return a?_6+a:void 0})(),B6=e=>{const{theme:t,classGroups:r}=e;return V6(r,t)},V6=(e,t)=>{const r=lA();for(const a in e){const i=e[a];q1(i,r,a,t)}return r},q1=(e,t,r,a)=>{const i=e.length;for(let c=0;c<i;c++){const u=e[c];U6(u,t,r,a)}},U6=(e,t,r,a)=>{if(typeof e=="string"){H6(e,t,r);return}if(typeof e=="function"){F6(e,t,r,a);return}G6(e,t,r,a)},H6=(e,t,r)=>{const a=e===""?t:uA(t,e);a.classGroupId=r},F6=(e,t,r,a)=>{if(q6(e)){q1(e(a),t,r,a);return}t.validators===null&&(t.validators=[]),t.validators.push(P6(r,e))},G6=(e,t,r,a)=>{const i=Object.entries(e),c=i.length;for(let u=0;u<c;u++){const[f,m]=i[u];q1(m,uA(t,f),r,a)}},uA=(e,t)=>{let r=e;const a=t.split(qp),i=a.length;for(let c=0;c<i;c++){const u=a[c];let f=r.nextPart.get(u);f||(f=lA(),r.nextPart.set(u,f)),r=f}return r},q6=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Y6=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),a=Object.create(null);const i=(c,u)=>{r[c]=u,t++,t>e&&(t=0,a=r,r=Object.create(null))};return{get(c){let u=r[c];if(u!==void 0)return u;if((u=a[c])!==void 0)return i(c,u),u},set(c,u){c in r?r[c]=u:i(c,u)}}},wy="!",yk=":",K6=[],wk=(e,t,r,a,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:a,isExternal:i}),X6=e=>{const{prefix:t,experimentalParseClassName:r}=e;let a=i=>{const c=[];let u=0,f=0,m=0,h;const g=i.length;for(let C=0;C<g;C++){const S=i[C];if(u===0&&f===0){if(S===yk){c.push(i.slice(m,C)),m=C+1;continue}if(S==="/"){h=C;continue}}S==="["?u++:S==="]"?u--:S==="("?f++:S===")"&&f--}const p=c.length===0?i:i.slice(m);let b=p,v=!1;p.endsWith(wy)?(b=p.slice(0,-1),v=!0):p.startsWith(wy)&&(b=p.slice(1),v=!0);const w=h&&h>m?h-m:void 0;return wk(c,v,b,w)};if(t){const i=t+yk,c=a;a=u=>u.startsWith(i)?c(u.slice(i.length)):wk(K6,!1,u,void 0,!0)}if(r){const i=a;a=c=>r({className:c,parseClassName:i})}return a},W6=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,a)=>{t.set(r,1e6+a)}),r=>{const a=[];let i=[];for(let c=0;c<r.length;c++){const u=r[c],f=u[0]==="[",m=t.has(u);f||m?(i.length>0&&(i.sort(),a.push(...i),i=[]),a.push(u)):i.push(u)}return i.length>0&&(i.sort(),a.push(...i)),a}},Q6=e=>({cache:Y6(e.cacheSize),parseClassName:X6(e),sortModifiers:W6(e),postfixLookupClassGroupIds:Z6(e),...L6(e)}),Z6=e=>{const t=Object.create(null),r=e.postfixLookupClassGroups;if(r)for(let a=0;a<r.length;a++)t[r[a]]=!0;return t},J6=/\s+/,e_=(e,t)=>{const{parseClassName:r,getClassGroupId:a,getConflictingClassGroupIds:i,sortModifiers:c,postfixLookupClassGroupIds:u}=t,f=[],m=e.trim().split(J6);let h="";for(let g=m.length-1;g>=0;g-=1){const p=m[g],{isExternal:b,modifiers:v,hasImportantModifier:w,baseClassName:C,maybePostfixModifierPosition:S}=r(p);if(b){h=p+(h.length>0?" "+h:h);continue}let N=!!S,E;if(N){const k=C.substring(0,S);E=a(k);const O=E&&u[E]?a(C):void 0;O&&O!==E&&(E=O,N=!1)}else E=a(C);if(!E){if(!N){h=p+(h.length>0?" "+h:h);continue}if(E=a(C),!E){h=p+(h.length>0?" "+h:h);continue}N=!1}const T=v.length===0?"":v.length===1?v[0]:c(v).join(":"),R=w?T+wy:T,M=R+E;if(f.indexOf(M)>-1)continue;f.push(M);const A=i(E,N);for(let k=0;k<A.length;++k){const O=A[k];f.push(R+O)}h=p+(h.length>0?" "+h:h)}return h},t_=(...e)=>{let t=0,r,a,i="";for(;t<e.length;)(r=e[t++])&&(a=dA(r))&&(i&&(i+=" "),i+=a);return i},dA=e=>{if(typeof e=="string")return e;let t,r="";for(let a=0;a<e.length;a++)e[a]&&(t=dA(e[a]))&&(r&&(r+=" "),r+=t);return r},n_=(e,...t)=>{let r,a,i,c;const u=m=>{const h=t.reduce((g,p)=>p(g),e());return r=Q6(h),a=r.cache.get,i=r.cache.set,c=f,f(m)},f=m=>{const h=a(m);if(h)return h;const g=e_(m,r);return i(m,g),g};return c=u,(...m)=>c(t_(...m))},s_=[],ms=e=>{const t=r=>r[e]||s_;return t.isThemeGetter=!0,t.themeKey=e,t},fA=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,hA=/^\((?:(\w[\w-]*):)?(.+)\)$/i,r_=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,o_=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,a_=/\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$/,i_=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,l_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,c_=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ii=e=>r_.test(e),Ut=e=>!!e&&!Number.isNaN(Number(e)),Qo=e=>!!e&&Number.isInteger(Number(e)),pv=e=>e.endsWith("%")&&Ut(e.slice(0,-1)),Pa=e=>o_.test(e),mA=()=>!0,u_=e=>a_.test(e)&&!i_.test(e),Y1=()=>!1,d_=e=>l_.test(e),f_=e=>c_.test(e),h_=e=>!dt(e)&&!ft(e),m_=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),p_=e=>sl(e,xA,Y1),dt=e=>fA.test(e),_l=e=>sl(e,bA,u_),jk=e=>sl(e,S_,Ut),g_=e=>sl(e,yA,mA),x_=e=>sl(e,vA,Y1),Sk=e=>sl(e,pA,Y1),b_=e=>sl(e,gA,f_),Mm=e=>sl(e,wA,d_),ft=e=>hA.test(e),Bd=e=>fc(e,bA),v_=e=>fc(e,vA),Nk=e=>fc(e,pA),y_=e=>fc(e,xA),w_=e=>fc(e,gA),Om=e=>fc(e,wA,!0),j_=e=>fc(e,yA,!0),sl=(e,t,r)=>{const a=fA.exec(e);return a?a[1]?t(a[1]):r(a[2]):!1},fc=(e,t,r=!1)=>{const a=hA.exec(e);return a?a[1]?t(a[1]):r:!1},pA=e=>e==="position"||e==="percentage",gA=e=>e==="image"||e==="url",xA=e=>e==="length"||e==="size"||e==="bg-size",bA=e=>e==="length",S_=e=>e==="number",vA=e=>e==="family-name",yA=e=>e==="number"||e==="weight",wA=e=>e==="shadow",N_=()=>{const e=ms("color"),t=ms("font"),r=ms("text"),a=ms("font-weight"),i=ms("tracking"),c=ms("leading"),u=ms("breakpoint"),f=ms("container"),m=ms("spacing"),h=ms("radius"),g=ms("shadow"),p=ms("inset-shadow"),b=ms("text-shadow"),v=ms("drop-shadow"),w=ms("blur"),C=ms("perspective"),S=ms("aspect"),N=ms("ease"),E=ms("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],M=()=>[...R(),ft,dt],A=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],O=()=>[ft,dt,m],D=()=>[Ii,"full","auto",...O()],_=()=>[Qo,"none","subgrid",ft,dt],H=()=>["auto",{span:["full",Qo,ft,dt]},Qo,ft,dt],G=()=>[Qo,"auto",ft,dt],B=()=>["auto","min","max","fr",ft,dt],P=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],Y=()=>["auto",...O()],W=()=>[Ii,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...O()],q=()=>[f,Ii,"screen","full","dvw","lvw","svw","min","max","fit",...O()],ee=()=>[Ii,"screen","full","lh","dvh","lvh","svh","min","max","fit",...O()],z=()=>[e,ft,dt],L=()=>[...R(),Nk,Sk,{position:[ft,dt]}],X=()=>["no-repeat",{repeat:["","x","y","space","round"]}],te=()=>["auto","cover","contain",y_,p_,{size:[ft,dt]}],$=()=>[pv,Bd,_l],U=()=>["","none","full",h,ft,dt],F=()=>["",Ut,Bd,_l],K=()=>["solid","dashed","dotted","double"],se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ne=()=>[Ut,pv,Nk,Sk],ye=()=>["","none",w,ft,dt],ae=()=>["none",Ut,ft,dt],le=()=>["none",Ut,ft,dt],re=()=>[Ut,ft,dt],Q=()=>[Ii,"full",...O()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Pa],breakpoint:[Pa],color:[mA],container:[Pa],"drop-shadow":[Pa],ease:["in","out","in-out"],font:[h_],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Pa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Pa],shadow:[Pa],spacing:["px",Ut],text:[Pa],"text-shadow":[Pa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ii,dt,ft,S]}],container:["container"],"container-type":[{"@container":["","normal","size",ft,dt]}],"container-named":[m_],columns:[{columns:[Ut,"auto",dt,ft,f]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"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:M()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{"inset-s":D(),start:D()}],end:[{"inset-e":D(),end:D()}],"inset-bs":[{"inset-bs":D()}],"inset-be":[{"inset-be":D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[Qo,"auto",ft,dt]}],basis:[{basis:[Ii,"full","auto",f,...O()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ut,Ii,"auto","initial","none",dt]}],grow:[{grow:["",Ut,ft,dt]}],shrink:[{shrink:["",Ut,ft,dt]}],order:[{order:[Qo,"first","last","none",ft,dt]}],"grid-cols":[{"grid-cols":_()}],"col-start-end":[{col:H()}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":_()}],"row-start-end":[{row:H()}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":B()}],"auto-rows":[{"auto-rows":B()}],gap:[{gap:O()}],"gap-x":[{"gap-x":O()}],"gap-y":[{"gap-y":O()}],"justify-content":[{justify:[...P(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...P()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":P()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:O()}],px:[{px:O()}],py:[{py:O()}],ps:[{ps:O()}],pe:[{pe:O()}],pbs:[{pbs:O()}],pbe:[{pbe:O()}],pt:[{pt:O()}],pr:[{pr:O()}],pb:[{pb:O()}],pl:[{pl:O()}],m:[{m:Y()}],mx:[{mx:Y()}],my:[{my:Y()}],ms:[{ms:Y()}],me:[{me:Y()}],mbs:[{mbs:Y()}],mbe:[{mbe:Y()}],mt:[{mt:Y()}],mr:[{mr:Y()}],mb:[{mb:Y()}],ml:[{ml:Y()}],"space-x":[{"space-x":O()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":O()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],"inline-size":[{inline:["auto",...q()]}],"min-inline-size":[{"min-inline":["auto",...q()]}],"max-inline-size":[{"max-inline":["none",...q()]}],"block-size":[{block:["auto",...ee()]}],"min-block-size":[{"min-block":["auto",...ee()]}],"max-block-size":[{"max-block":["none",...ee()]}],w:[{w:[f,"screen",...W()]}],"min-w":[{"min-w":[f,"screen","none",...W()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[u]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh","none",...W()]}],"font-size":[{text:["base",r,Bd,_l]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,j_,g_]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",pv,dt]}],"font-family":[{font:[v_,x_,t]}],"font-features":[{"font-features":[dt]}],"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:[i,ft,dt]}],"line-clamp":[{"line-clamp":[Ut,"none",ft,jk]}],leading:[{leading:["none",c,...O()]}],"list-image":[{"list-image":["none",ft,dt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ft,dt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:z()}],"text-color":[{text:z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ut,"from-font","auto",ft,_l]}],"text-decoration-color":[{decoration:z()}],"underline-offset":[{"underline-offset":[Ut,"auto",ft,dt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"tab-size":[{tab:[Qo,ft,dt]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ft,dt]}],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",ft,dt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:X()}],"bg-size":[{bg:te()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Qo,ft,dt],radial:["",ft,dt],conic:["",Qo,ft,dt]},w_,b_]}],"bg-color":[{bg:z()}],"gradient-from-pos":[{from:$()}],"gradient-via-pos":[{via:$()}],"gradient-to-pos":[{to:$()}],"gradient-from":[{from:z()}],"gradient-via":[{via:z()}],"gradient-to":[{to:z()}],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:F()}],"border-w-x":[{"border-x":F()}],"border-w-y":[{"border-y":F()}],"border-w-s":[{"border-s":F()}],"border-w-e":[{"border-e":F()}],"border-w-bs":[{"border-bs":F()}],"border-w-be":[{"border-be":F()}],"border-w-t":[{"border-t":F()}],"border-w-r":[{"border-r":F()}],"border-w-b":[{"border-b":F()}],"border-w-l":[{"border-l":F()}],"divide-x":[{"divide-x":F()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":F()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...K(),"hidden","none"]}],"divide-style":[{divide:[...K(),"hidden","none"]}],"border-color":[{border:z()}],"border-color-x":[{"border-x":z()}],"border-color-y":[{"border-y":z()}],"border-color-s":[{"border-s":z()}],"border-color-e":[{"border-e":z()}],"border-color-bs":[{"border-bs":z()}],"border-color-be":[{"border-be":z()}],"border-color-t":[{"border-t":z()}],"border-color-r":[{"border-r":z()}],"border-color-b":[{"border-b":z()}],"border-color-l":[{"border-l":z()}],"divide-color":[{divide:z()}],"outline-style":[{outline:[...K(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ut,ft,dt]}],"outline-w":[{outline:["",Ut,Bd,_l]}],"outline-color":[{outline:z()}],shadow:[{shadow:["","inner","none",g,Om,Mm]}],"shadow-color":[{shadow:z()}],"inset-shadow":[{"inset-shadow":["none",p,Om,Mm]}],"inset-shadow-color":[{"inset-shadow":z()}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:z()}],"ring-offset-w":[{"ring-offset":[Ut,_l]}],"ring-offset-color":[{"ring-offset":z()}],"inset-ring-w":[{"inset-ring":F()}],"inset-ring-color":[{"inset-ring":z()}],"text-shadow":[{"text-shadow":["none",b,Om,Mm]}],"text-shadow-color":[{"text-shadow":z()}],opacity:[{opacity:[Ut,ft,dt]}],"mix-blend":[{"mix-blend":[...se(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":se()}],"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":[Ut]}],"mask-image-linear-from-pos":[{"mask-linear-from":ne()}],"mask-image-linear-to-pos":[{"mask-linear-to":ne()}],"mask-image-linear-from-color":[{"mask-linear-from":z()}],"mask-image-linear-to-color":[{"mask-linear-to":z()}],"mask-image-t-from-pos":[{"mask-t-from":ne()}],"mask-image-t-to-pos":[{"mask-t-to":ne()}],"mask-image-t-from-color":[{"mask-t-from":z()}],"mask-image-t-to-color":[{"mask-t-to":z()}],"mask-image-r-from-pos":[{"mask-r-from":ne()}],"mask-image-r-to-pos":[{"mask-r-to":ne()}],"mask-image-r-from-color":[{"mask-r-from":z()}],"mask-image-r-to-color":[{"mask-r-to":z()}],"mask-image-b-from-pos":[{"mask-b-from":ne()}],"mask-image-b-to-pos":[{"mask-b-to":ne()}],"mask-image-b-from-color":[{"mask-b-from":z()}],"mask-image-b-to-color":[{"mask-b-to":z()}],"mask-image-l-from-pos":[{"mask-l-from":ne()}],"mask-image-l-to-pos":[{"mask-l-to":ne()}],"mask-image-l-from-color":[{"mask-l-from":z()}],"mask-image-l-to-color":[{"mask-l-to":z()}],"mask-image-x-from-pos":[{"mask-x-from":ne()}],"mask-image-x-to-pos":[{"mask-x-to":ne()}],"mask-image-x-from-color":[{"mask-x-from":z()}],"mask-image-x-to-color":[{"mask-x-to":z()}],"mask-image-y-from-pos":[{"mask-y-from":ne()}],"mask-image-y-to-pos":[{"mask-y-to":ne()}],"mask-image-y-from-color":[{"mask-y-from":z()}],"mask-image-y-to-color":[{"mask-y-to":z()}],"mask-image-radial":[{"mask-radial":[ft,dt]}],"mask-image-radial-from-pos":[{"mask-radial-from":ne()}],"mask-image-radial-to-pos":[{"mask-radial-to":ne()}],"mask-image-radial-from-color":[{"mask-radial-from":z()}],"mask-image-radial-to-color":[{"mask-radial-to":z()}],"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":R()}],"mask-image-conic-pos":[{"mask-conic":[Ut]}],"mask-image-conic-from-pos":[{"mask-conic-from":ne()}],"mask-image-conic-to-pos":[{"mask-conic-to":ne()}],"mask-image-conic-from-color":[{"mask-conic-from":z()}],"mask-image-conic-to-color":[{"mask-conic-to":z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:X()}],"mask-size":[{mask:te()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ft,dt]}],filter:[{filter:["","none",ft,dt]}],blur:[{blur:ye()}],brightness:[{brightness:[Ut,ft,dt]}],contrast:[{contrast:[Ut,ft,dt]}],"drop-shadow":[{"drop-shadow":["","none",v,Om,Mm]}],"drop-shadow-color":[{"drop-shadow":z()}],grayscale:[{grayscale:["",Ut,ft,dt]}],"hue-rotate":[{"hue-rotate":[Ut,ft,dt]}],invert:[{invert:["",Ut,ft,dt]}],saturate:[{saturate:[Ut,ft,dt]}],sepia:[{sepia:["",Ut,ft,dt]}],"backdrop-filter":[{"backdrop-filter":["","none",ft,dt]}],"backdrop-blur":[{"backdrop-blur":ye()}],"backdrop-brightness":[{"backdrop-brightness":[Ut,ft,dt]}],"backdrop-contrast":[{"backdrop-contrast":[Ut,ft,dt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ut,ft,dt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ut,ft,dt]}],"backdrop-invert":[{"backdrop-invert":["",Ut,ft,dt]}],"backdrop-opacity":[{"backdrop-opacity":[Ut,ft,dt]}],"backdrop-saturate":[{"backdrop-saturate":[Ut,ft,dt]}],"backdrop-sepia":[{"backdrop-sepia":["",Ut,ft,dt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":O()}],"border-spacing-x":[{"border-spacing-x":O()}],"border-spacing-y":[{"border-spacing-y":O()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ft,dt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ut,"initial",ft,dt]}],ease:[{ease:["linear","initial",N,ft,dt]}],delay:[{delay:[Ut,ft,dt]}],animate:[{animate:["none",E,ft,dt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,ft,dt]}],"perspective-origin":[{"perspective-origin":M()}],rotate:[{rotate:ae()}],"rotate-x":[{"rotate-x":ae()}],"rotate-y":[{"rotate-y":ae()}],"rotate-z":[{"rotate-z":ae()}],scale:[{scale:le()}],"scale-x":[{"scale-x":le()}],"scale-y":[{"scale-y":le()}],"scale-z":[{"scale-z":le()}],"scale-3d":["scale-3d"],skew:[{skew:re()}],"skew-x":[{"skew-x":re()}],"skew-y":[{"skew-y":re()}],transform:[{transform:[ft,dt,"","none","gpu","cpu"]}],"transform-origin":[{origin:M()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Q()}],"translate-x":[{"translate-x":Q()}],"translate-y":[{"translate-y":Q()}],"translate-z":[{"translate-z":Q()}],"translate-none":["translate-none"],zoom:[{zoom:[Qo,ft,dt]}],accent:[{accent:z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:z()}],"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",ft,dt]}],"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":z()}],"scrollbar-track-color":[{"scrollbar-track":z()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mbs":[{"scroll-mbs":O()}],"scroll-mbe":[{"scroll-mbe":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pbs":[{"scroll-pbs":O()}],"scroll-pbe":[{"scroll-pbe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"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",ft,dt]}],fill:[{fill:["none",...z()]}],"stroke-w":[{stroke:[Ut,Bd,_l,jk]}],stroke:[{stroke:["none",...z()]}],"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":["start","end","right","left"],"inset-y":["inset-bs","inset-be","top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["ps","pe","pr","pl"],py:["pbs","pbe","pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["ms","me","mr","ml"],my:["mbs","mbe","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-s","border-w-e","border-w-r","border-w-l"],"border-w-y":["border-w-bs","border-w-be","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-s","border-color-e","border-color-r","border-color-l"],"border-color-y":["border-color-bs","border-color-be","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-ms","scroll-me","scroll-mr","scroll-ml"],"scroll-my":["scroll-mbs","scroll-mbe","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-ps","scroll-pe","scroll-pr","scroll-pl"],"scroll-py":["scroll-pbs","scroll-pbe","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"]}},C_=n_(N_);function Ve(...e){return C_(iA(e))}const k_=If("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function ie({className:e,variant:t="default",size:r="default",...a}){return n.jsx(z6,{"data-slot":"button",className:Ve(k_({variant:t,size:r,className:e})),...a})}const jA=48,ya=(e,t=0)=>{const r=new Int32Array(e.length);for(let a=0;a<e.length;a++)r[a]=e.charCodeAt(a)-jA-t;return r},zg=e=>{const t=new Int32Array(e.length+1);for(let r=0;r<e.length;r++)t[r+1]=t[r]+e[r];return t},Qi=e=>{const t=new Int32Array(e.length);let r=0;for(let a=0;a<e.length;a++){const i=e.charCodeAt(a)-jA;r+=i>>>1^-(i&1),t[a]=r}return t},T_=384,E_=[],Hl=zg(ya("E0500002005282000000002000150000020021820000011200000003022202000300004200120000200420001200021200301200010400162000010000220021010:2192001200220012000220012000200200200400010200040000000000400200108200110100000022010313000162002000020020012020080213000228200000000082000000000120002000120020020040101020300130001001010")),R_=zg(ya(":11111111211111119311546544411119731869:671397415686432441111111111161114151214313433415:78311132233313187211117221449443411141111151152226611131111112212518142224214215421421542142424242516171151615616347111111111197911327451111111111111111111113134714133513411111311111111111111111111112444411111342312715245411117:3")),A_="@containerabcdefghinlmoprstunderlineviawzccentlignnimatespectuto-colsrowsaglorightnessckdrop-sisbcontrastfiltergrayscalehue-rotateinvertopacityslurrightnessaturateepia-coniclinearpositionradialsizeockurrderttom-belrstxyespacing-xyaretoursorlnt-umnsendspantartainentrasteividerop-shadowurationcorationlay-xyasendillexontromlter-featuresstretchapr-xyayscaleidow-colsrowsue-rotatedentlinesetvert-beringsxyeshadoweiadingftnest-clamp-imageabein-lrstxyskx--b-coniclpositionrsizet-x-y-fromto-fromto-inearfromto-fromto-adialfromto-fromtofromtofromtofromtoblockhinlinew-screenesblockhinlinewbjectpacityrutlinederigin-offsetbelrstxyesrspective-originaceholderioghtng-offsettateundedw-xyz-belrstlreseslr-endspantartaturatecepiahizekewpace-taleroll-xyz-barmpbelrstxyesbelrstxyes-thumbrackadowrink-xyxyartrokeabextora-shadowpckingnsformitionlate-xyz-offsetill-changeoom",M_=(()=>{const e=Hl.length-1,t=new Int32Array(e);for(let i=e-1;i>=0;i--){let c=1,u=i+1;for(let f=Hl[i];f<Hl[i+1];f++)c+=t[u],u+=t[u];t[i]=c}const r=new Int32Array(Hl[e]);let a=0;for(let i=0;i<e;i++){let c=i+1;for(let u=Hl[i];u<Hl[i+1];u++)r[a++]=c,c+=t[c]}return r})(),O_=ya("02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000…ŏ000ˆ0000ŏ0000000000—0000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000",1),D_=zg(ya("1233333593464636351265367151576")),z_=ya("93203242332583253248325D>E?F@03263243255B:032523853:0325B:8GA032542H<C=12727B:0324325853;D>E?3257D>03258432585:0325B:;0328B:032"),I_=ya("012123445661666666789111:5;;;;;;;;444;;;:62999<1161=62>>?61:21@ABCD4446996:64E:::;:?::64:F114GHHIHHHHIHH1HH1HH1HHHHHH::EJK4444::EJ4444441691;644444114244444:;L6666555555555555555999666664444444444444444444444226?6:66644M9N?D:111::::6DJ199"),P_=Qi("0202002020020020020020020020020200200200200200200200002020202001003040106000200200200200200200200200200200200200200200200200200200200200200200200200200200200020020020020020020002020200202002002002002002002002002002020002002020020200220200200200200200200200200200200020020020000200020002000200200200020020020002000200200200020020202002020202000200200020022000200200020020002002000200220002002000200W0Z00020020002002020002002000200g0j0002002000200200020020002002000200200020020002000200002000002002002002002000200020000200002002002002002002002020020020200200200200200200200200202020020020020020020020020002002002020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020002002002002002002000200200200200200200200200200020202020002000200020002002002002000020200200"),__=(()=>{const e=new Int32Array(319).fill(-1),t=Qi("02422242:222222242224222242442222222422222244442242226224222426222422442462222422622222222626222462242622422622422424242422222222422222222242422222222222222222622442224222222222222224424442262222222222222222222226224222424242422224422422422222"),r=Qi("02222222222222222222202222222222222222222222221422222222222222222222222222222222222Y\\222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221422222222222222222222222222222222222222Ŀł222222222222222222");for(let a=0;a<t.length;a++)e[t[a]]=r[a];return e})(),L_="container |break-after- all auto avoid avoid-page column left page right|break-before- all auto avoid avoid-page column left page right|break-inside-a uto void void-column void-page|box-decoration- clone slice|box- border content| contents flow-root hidden table table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group| not-sr-only sr-only|float- end left none right start|clear- both end left none right start|isolat e ion-auto|overflow- auto clip hidden scroll visible|overflow-x- auto clip hidden scroll visible|overflow-y- auto clip hidden scroll visible|overscroll- auto contain none|overscroll-x- auto contain none|overscroll-y- auto contain none| absolute fixed relative static sticky| collapse invisible visible|justify- around baseline between center center-safe end end-safe evenly normal start stretch|justify-items- center center-safe end end-safe normal start stretch|justify-self- auto center center-safe end end-safe start stretch|items- baseline baseline-last center center-safe end end-safe start stretch|self- auto baseline baseline-last center center-safe end end-safe start stretch|place-content- around baseline between center center-safe end end-safe evenly start stretch|place-items- baseline center center-safe end end-safe start stretch|place-self- auto center center-safe end end-safe start stretch| antialiased subpixel-antialiased| italic not-italic|normal-nums |ordinal |slashed-zero | lining-nums oldstyle-nums| proportional-nums tabular-nums| diagonal-fractions stacked-fractions| no-underline overline| capitalize lowercase normal-case uppercase|truncate |whitespace- break-spaces normal nowrap pre pre-line pre-wrap|break- all keep normal words|wrap- anywhere break-word normal|hyphens- auto manual none|mix-blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay plus-darker plus-lighter saturation screen soft-light|table- auto fixed|caption- bottom top|backface- hidden visible|appearance- auto none|scheme- dark light light-dark normal only-dark only-light|field-sizing- content fixed|pointer-events- auto none|resize -none -x -y|snap- align-none center end start|snap- always normal|snap- both none x y|snap- mandatory proximity|touch- auto manipulation none|touch-pan- left right x|touch-pan- down up y|touch-pinch-zoom |select- all auto none text|forced-color-adjust- auto none| normal size| baseline bottom middle sub super text-bottom text-top top|none | auto square video| auto fr max min px| auto full px| fixed local scroll|clip- border content padding text|origin- border content padding| bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| no-repeat repeat repeat-round repeat-space repeat-x repeat-y| auto contain cover| gradient-to-b gradient-to-bl gradient-to-br gradient-to-l gradient-to-r gradient-to-t gradient-to-tl gradient-to-tr none|blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay saturation screen soft-light|to- b bl br l r t tl tr| auto dvh fit full lh lvh max min px screen svh| dashed dotted double hidden none solid| collapse separate|px |auto |full | content none strict| inline-size size|layout |paint |style | around baseline between center center-safe end end-safe evenly normal start stretch| alias all-scroll auto cell col-resize context-menu copy crosshair default e-resize ew-resize grab grabbing help move n-resize ne-resize nesw-resize no-drop none not-allowed ns-resize nw-resize nwse-resize pointer progress row-resize s-resize se-resize sw-resize text vertical-text w-resize wait zoom-in zoom-out| dashed dotted double solid wavy| auto from-font|reverse |initial | in in-out initial linear out| col col-reverse row row-reverse| nowrap wrap wrap-reverse| auto initial none| black bold extrabold extralight light medium normal semibold thin| condensed expanded extra-condensed extra-expanded normal semi-condensed semi-expanded ultra-condensed ultra-expanded|flow- col col-dense dense row row-dense| none subgrid| auto dvh dvw fit full lh lvh lvw max min px screen svh svw| block flex grid table| auto dvw fit full lvw max min px screen svw| loose none normal px relaxed snug tight|through |item | inside outside| decimal disc none| auto px| clip-border clip-content clip-fill clip-padding clip-stroke clip-view no-clip| add exclude intersect subtract| alpha luminance match|origin- border content fill padding stroke view|type- alpha luminance| circle ellipse| closest-corner closest-side farthest-corner farthest-side|at- bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| dvh fit full lh lvh max min none px screen svh| auto dvh dvw fit full lh lvh lvw max min none px screen svh svw| dvw fit full lvw max min none px screen svw| auto dvh dvw fit full lvh lvw max min none prose px svh svw| auto dvh dvw fit full lvh lvw max min none px screen svh svw| contain cover fill none scale-down| first last none| distant dramatic midrange near none normal|inset | full none|3d | auto smooth|gutter- auto both stable| auto none thin| inner none| auto dvh dvw fit full lvh lvw max min px svh svw|base | center end justify left right start| clip ellipsis| balance nowrap pretty wrap| normal tight tighter wide wider widest| cpu gpu none| 3d flat| all colors none opacity shadow transform| discrete normal| full px| auto dvh dvw fit full lvh lvw max min px screen svh svw| auto contents scroll transform".split("|").map(e=>{const t=e.split(" "),r=t.shift();for(let a=0;a<t.length;a++)t[a]=r+t[a];return t}),Ck=Qi("0000000000000000000000000000000000000000000000000000000000000262242:6@200000006:240B428:4422400002046044222426220026642642462026224222824220022400000000\\00N222422242222222224062242222222422226264222422222222222222442804222422222222222222222222220<4<0204260002444020204224422"),$_=Qi("ɠ222222222222222222222222222222222222222222222222222222222222˕4222226>ʶ22ʷʺʷ2ʸʷ42ʴ2ʓ22>621422ɶ222ɹɼɷɺɷɺ22ɱ42222ɨ2ɧ26622ɘɓ244ƸƵ222]d24242ǖǓƚÄȫ2263ȨȥȨ2222222ǣ222222222222222222ǂƽ2ƾƵ2222222422222ƜƑ22222222222222222222144Ŧţ22Ţş222222222222222222222ĸ2ı68ĦģĦɡŰ4Ġ«®ĝ822ĔđĔ2ē2222622"),B_=Qi("02222222222222222222222222222222222222222222222222222222222222222203062222222222IL2200IL021042222]`222IL0gj2e50n2222U00X202[^2y0000560|{~ƒ†22‰Œ‹>22|22222222222G000q†OVI00000}š2›>40000ŒB00000I¨­000°00000000000000021Q²±00´“000000000000000000000–222›HGHa5¾222Ã6À2222ÍÐ000­°2±"),SA=new Int32Array(991),NA=new Int32Array(991),CA=new Int32Array(991);let jy="";const Sy=new Int32Array(1030);{const e=new Map;let t=0,r=0;for(let a=0;a<Ck.length;a++)for(const i of L_[B_[a]]){let c=e.get(i);c===void 0&&(c=t++,e.set(i,c),Sy[c*2]=jy.length,Sy[c*2+1]=i.length,jy+=i),SA[r]=Ck[a],NA[r]=$_[a],CA[r]=c,r++}}const V_=Qi("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"),U_=zg(ya("1::22222432:222:22:22>222222:22:2221322511111311111114")),H_=Qi("2Š4A;33N=C@H4A;33N=C@<2;363@QTQʰ222ˉºŴŽ2R2=18cƴÅҜÜÛŲǝȈ:ħ25=11D3A@216Er25;11B3?<438Cn9@7=<8192>2E121@9@EHE@9>2T25511<398216=V25511<398216=„ƧNž2Đå242L222290000f22500ɛ000ǘ222"),F_=ya("ij"),G_=ya("—"),q_=ya("1"),Y_="* ** after backdrop before details-content file first-letter first-line marker placeholder selection";var K_={GROUP_COUNT:T_,customValidatorNames:E_,edgeStart:Hl,labelStart:R_,labelText:A_,edgeTarget:M_,nodeGroup:O_,nodeVlist:__,vlistPat:D_,vlistOps:z_,vlistRef:I_,vlistGroup:P_,litAnchor:SA,litGroup:NA,litPool:CA,poolOffsets:Sy,poolText:jy,adjGid:V_,adjStart:U_,adjTgt:H_,patGid:F_,patTgt:G_,postfixLookupGroups:q_,orderSensitiveModifiers:Y_};const X_="line"in new Error,Zo=-1,Ll=-1,gv=(e,t,r)=>{let a=2166136261;for(let i=t;i<r;i++)a=Math.imul(a^e.charCodeAt(i),16777619);return a},xv=(e,t,r)=>{const a=r-t;let i=Math.imul(a,2654435761)^e.charCodeAt(t);if(a>3){const c=a>>2,u=a>>1;i=Math.imul(i^e.charCodeAt(t+1)<<8^e.charCodeAt(t+2)<<16^e.charCodeAt(t+c),2246822507),i=Math.imul(i^e.charCodeAt(t+u)<<8^e.charCodeAt(t+u+c)<<16^e.charCodeAt(r-3),3266489909),i^=e.charCodeAt(r-2)<<8^e.charCodeAt(r-1)<<16;for(let f=t+3,m=r-4;f<t+8&&f<m;f++,m--)i=Math.imul(i^e.charCodeAt(f)^e.charCodeAt(m)<<8,16777619)}return i^i>>>15|0},W_=(e,t,r={})=>{const{GROUP_COUNT:a,edgeStart:i,labelStart:c,labelText:u,edgeTarget:f,nodeGroup:m,nodeVlist:h,vlistPat:g,vlistOps:p,vlistRef:b,vlistGroup:v,litAnchor:w,litGroup:C,litPool:S,poolOffsets:N,poolText:E,adjGid:T,adjStart:R,adjTgt:M,patGid:A,patTgt:k,postfixLookupGroups:O,customValidatorNames:D,orderSensitiveModifiers:_}=e,H=new Int32Array(a).fill(-1);for(let De=0;De<T.length;De++)H[T[De]]=De;let G=0;for(let De=0;De+1<R.length;De++){const Ge=R[De+1]-R[De];Ge>G&&(G=Ge)}let B=32;for(;B<2*(1+G+A.length);)B<<=1;const P=new Int32Array(b.length+1);for(let De=0;De<b.length;De++)P[De+1]=P[De]+g[b[De]+1]-g[b[De]];const V=new Uint8Array(a);for(let De=0;De<O.length;De++)V[O[De]]=1;const Y=i.length-1,W=new Uint8Array(Y);let q=0,ee=!0;for(let De=0;De<w.length;De++){W[w[De]]=1;const Ge=N[S[De]*2+1];Ge>q&&(q=Ge);const qe=E.charCodeAt(N[S[De]*2]);(qe===91||qe===40)&&(ee=!1)}let z=1;for(;z<w.length*2;)z<<=1;const L=new Int32Array(z).fill(-1);for(let De=0;De<w.length;De++){const Ge=N[S[De]*2];let qe=(gv(E,Ge,Ge+N[S[De]*2+1])^Math.imul(w[De],2654435761)|0)&z-1;for(;L[qe]!==-1;)qe=qe+1&z-1;L[qe]=De}const X=(De,Ge,qe,bt)=>{let zt=(gv(Ge,qe,bt)^Math.imul(De,2654435761)|0)&z-1;const Mt=bt-qe;for(;;){const Bt=L[zt];if(Bt===-1)return-1;if(w[Bt]===De&&N[S[Bt]*2+1]===Mt){const Nn=N[S[Bt]*2];let hn=!0;for(let Ct=0;Ct<Mt;Ct++)if(E.charCodeAt(Nn+Ct)!==Ge.charCodeAt(qe+Ct)){hn=!1;break}if(hn)return C[Bt]}zt=zt+1&z-1}},te=r.cacheSize??8192,$=r.prefix??e.prefix??"",U=$===""?"":$+":",F=U.length,K=(D??[]).map(De=>{throw new Error("cn: missing validator "+De)}),se=/\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$/,ne=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ye=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ae=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;let le=0,re=-1,Q=-1,Z=-1,pe=-1;const ue=De=>De>=97&&De<=122||De>=65&&De<=90||De>=48&&De<=57||De===95,ve=De=>/\s/.test(String.fromCharCode(De)),Ce=(De,Ge,qe)=>{if(le=0,re=-1,qe-Ge<3)return;const bt=De.charCodeAt(Ge),zt=De.charCodeAt(qe-1);if(bt===91&&zt===93)le=1;else if(bt===40&&zt===41)le=2;else return;Z=Ge+1,pe=qe-1;let Mt=Ge+1;if(ue(De.charCodeAt(Mt))){for(Mt++;Mt<qe-1;){const Bt=De.charCodeAt(Mt);if(!ue(Bt)&&Bt!==45)break;Mt++}Mt<qe-2&&De.charCodeAt(Mt)===58&&(re=Ge+1,Q=Mt,Z=Mt+1)}},Ie=(De,Ge,qe,bt)=>{if(qe-Ge!==bt.length)return!1;for(let zt=0;zt<bt.length;zt++)if(De.charCodeAt(Ge+zt)!==bt.charCodeAt(zt))return!1;return!0},de=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Te=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,oe=De=>!!De&&!Number.isNaN(Number(De)),fe=(De,Ge,qe)=>{if(qe-Ge<11||!Ie(De,Ge,Ge+10,"@container"))return!1;if(De.charCodeAt(Ge+10)===47)return qe-Ge>=12;const bt=De.charCodeAt(Ge+11);return bt===115&&qe-Ge>=17&&Ie(De,Ge+10,Ge+16,"-size/")||bt===110&&qe-Ge>=19&&Ie(De,Ge+10,Ge+18,"-normal/")},Re=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],Oe="length|number|number weight|family-name|position percentage|length size bg-size|image url|shadow|length|family-name|position percentage|length size bg-size|image url|shadow|number weight".split("|").map(De=>De.split(" ")),ke=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],he=(De,Ge,qe,bt)=>{if(De>=10){if(De>=25)return K[De-25](Ge.slice(qe,bt));const zt=De-10;if(le!==Re[zt])return!1;if(re>=0){for(const Mt of Oe[zt])if(Ie(Ge,re,Q,Mt))return!0;return!1}switch(ke[zt]){case 0:return!1;case 1:return!0;case 2:{const Mt=Ge.slice(Z,pe);return se.test(Mt)&&!ne.test(Mt)}case 3:return oe(Ge.slice(Z,pe));case 4:return ae.test(Ge.slice(Z,pe));default:return ye.test(Ge.slice(Z,pe))}}switch(De){case 0:return!0;case 1:return le===0;case 2:return le===1;case 3:return le===2;case 4:return de.test(Ge.slice(qe,bt));case 5:return oe(Ge.slice(qe,bt));case 6:{const zt=Ge.slice(qe,bt);return!!zt&&Number.isInteger(Number(zt))}case 7:return bt>qe&&Ge.charCodeAt(bt-1)===37&&oe(Ge.slice(qe,bt-1));case 8:return Te.test(Ge.slice(qe,bt));default:return fe(Ge,qe,bt)}},Ae=new Set(typeof _=="string"?_.split(" "):_),ge=(De,Ge,qe,bt,zt,Mt)=>{const Bt=gv(Ge,qe,bt)^(zt?2654435769:0)|0;let Nn=De.get(Bt);if(Nn!==void 0)e:for(let It=0;It<Nn.length;It++){const on=Nn[It];if(!(on.imp!==zt||on.k.length!==bt-qe)){for(let St=0;St<on.k.length;St++)if(on.k.charCodeAt(St)!==Ge.charCodeAt(qe+St))continue e;return on.id}}else De.set(Bt,Nn=[]);const hn=Ge.slice(qe,bt),Ct=Mt(hn);return Nn.push({k:hn,imp:zt,id:Ct}),Ct};let Pe=new Map,Fe=new Map,_e=2;const Xe=4096,Je=(De,Ge)=>{const qe=[];let bt=0,zt=0,Mt=0;for(let Ct=0;Ct<De.length;Ct++){const It=De.charCodeAt(Ct);bt===0&&zt===0&&It===58?(qe.push(De.slice(Mt,Ct)),Mt=Ct+1):It===91?bt++:It===93?bt--:It===40?zt++:It===41&&zt--}qe.push(De.slice(Mt));let Bt=qe[0];if(qe.length>1){const Ct=[];let It=[];for(const on of qe)on.charCodeAt(0)===91||Ae.has(on)?(It.length&&(Ct.push(...It.sort()),It=[]),Ct.push(on)):It.push(on);It.length&&Ct.push(...It.sort()),Bt=Ct.join(":")}const Nn=Ge?Bt+" !":Bt;let hn=Fe.get(Nn);return hn===void 0&&Fe.set(Nn,hn=_e++),hn};let ct=new Map,At=a;const rt=a+4096,be=()=>At++,Ue=2097152,Qe=8192,xt=new Int32Array(Qe),Ke=new Array(Qe).fill(null),Be=new Int32Array(Qe),jt=new Int32Array(Qe),Ze=new Uint8Array(Qe);let Tt=0;const je=(De,Ge,qe,bt,zt,Mt,Bt,Nn)=>{let hn=De;if(Ke[De]!==null)if(Ke[De|1]===null)hn=De|1;else if((Tt++&3)===0)hn=De|Tt>>2&1;else return;Ke[hn]=Ge.slice(qe,bt),xt[hn]=zt,Be[hn]=Mt,jt[hn]=Bt,Ze[hn]=Nn},Ye=()=>Ke.fill(null);let et=256,it=[new Int32Array(et),new Int32Array(et),new Int32Array(et),new Int32Array(et)],[lt,wt,cn,Gt]=it,fn=new Uint8Array(et),Bn=new Uint8Array(et);const Kn=()=>{et*=2,it=it.map(Ge=>{const qe=new Int32Array(et);return qe.set(Ge),qe}),[lt,wt,cn,Gt]=it;const De=new Uint8Array(et);De.set(fn),fn=De,Bn=new Uint8Array(et)};let ce=64,tt=new Int32Array(ce),Et=new Int32Array(ce);const rn=new Int32Array(a);let xn=2048,Wt=21,un=new Float64Array(xn),ns=new Int32Array(xn),Jn=0;const wo=(De,Ge)=>{if(De===0&&Ge<a)return rn[Ge]===Jn?1:(rn[Ge]=Jn,0);const qe=De*2097152+Ge+1;let bt=Math.imul(qe,2654435761)>>>Wt;for(;ns[bt]===Jn;){if(un[bt]===qe)return 1;bt=bt+1&xn-1}return un[bt]=qe,ns[bt]=Jn,0},jo=(De,Ge,qe,bt,zt)=>{if(qe-Ge>=2&&De.charCodeAt(Ge)===91&&De.charCodeAt(qe-1)===93){let Mt=-1;for(let Bt=Ge+1;Bt<qe-1;Bt++)if(De.charCodeAt(Bt)===58){Mt=Bt;break}return Mt===-1||Mt===Ge+1?Zo:ge(ct,De,Ge+1,Mt,0,be)}if(bt>=0&&m[bt]>=0)return m[bt];for(let Mt=zt-1;Mt>=0;Mt--){const Bt=Et[Mt];if(Bt>qe)continue;const Nn=tt[Mt],hn=qe-Bt;if(W[Nn]===1&&hn>0&&hn<=q){const Hn=De.charCodeAt(Bt);if(ee===!1||Hn!==91&&Hn!==40){const Cr=X(Nn,De,Bt,qe);if(Cr>=0)return Cr}}const Ct=h[Nn];if(Ct<0)continue;const It=b[Ct],on=g[It],St=g[It+1];if(on===St)continue;Ce(De,Bt,qe);const fs=P[Ct]-on;for(let Hn=on;Hn<St;Hn++)if(he(p[Hn],De,Bt,qe))return v[fs+Hn]}return Zo},cr=De=>{const Ge=De.length;let qe=0,bt=0,zt=!1;(_e>Xe||Pe.size>Xe)&&(Pe=new Map,Fe=new Map,_e=2,Ye()),At>rt&&(ct=new Map,At=a,Ye());let Mt=0;for(;Mt<Ge;){let Ct=De.charCodeAt(Mt);if(Ct===32||Ct>=9&&Ct<=13||Ct>=160&&ve(Ct)){Ct!==32&&(zt=!0),Mt++;continue}const It=Mt;let on=0;for(;Mt<Ge;){if(Ct=De.charCodeAt(Mt),Ct<=32){if(Ct===32)break;if(Ct>=9&&Ct<=13){zt=!0;break}}else if(Ct>=160&&ve(Ct)){zt=!0;break}on=Math.imul(on^Ct,16777619),Mt++}const St=Mt,fs=St-It;qe===et&&Kn();const Hn=qe++;lt[Hn]=It,wt[Hn]=St,bt+=fs,on^=Math.imul(fs,2654435761);const Cr=on^on>>>15|0,ss=Cr&8190;{let Zt=-1;if(xt[ss]===Cr&&Ke[ss]!==null&&Ke[ss].length===fs?Zt=ss:xt[ss|1]===Cr&&Ke[ss|1]!==null&&Ke[ss|1].length===fs&&(Zt=ss|1),Zt>=0){const Ss=Ke[Zt];let Zr=!0;for(let Er=0;Er<fs;Er++)if(Ss.charCodeAt(Er)!==De.charCodeAt(It+Er)){Zr=!1;break}if(Zr){cn[Hn]=Be[Zt],Gt[Hn]=jt[Zt],fn[Hn]=Ze[Zt];continue}}}let rs=It;if(F!==0){if(St-It<=F||!De.startsWith(U,It)){cn[Hn]=Zo,je(ss,De,It,St,Cr,Zo,0,0);continue}rs=It+F}let yc=0,qu=0,ja=-1,wc=-1;for(let Zt=rs;Zt<St;Zt++){const Ss=De.charCodeAt(Zt);if(yc===0&&qu===0){if(Ss===58){ja=Zt;continue}if(Ss===47){wc=Zt;continue}}Ss===91?yc++:Ss===93?yc--:Ss===40?qu++:Ss===41&&qu--}const dh=ja>=rs?ja+1:rs;let _n=dh,Gs=St,ii=!1,jc=0;Gs>_n&&De.charCodeAt(Gs-1)===33?(ii=!0,Gs--):Gs>_n&&De.charCodeAt(_n)===33&&(ii=!0,_n++,jc=1);let ur=-1;wc>dh&&(ur=wc+jc,ur>=Gs&&(ur=-1));let Sc=_n;Gs-_n>1&&De.charCodeAt(_n)===45&&(Sc=_n+1);let kr=0,Js=0,li=0,Yu=-1,Tr=0;(h[0]>=0||W[0]===1)&&(tt[0]=0,Et[0]=Sc,Tr=1);let dl=Ll,Ku=0;for(let Zt=Sc;Zt<Gs;Zt++)if(Zt===ur&&(dl=Js<li?Ll:kr,Ku=Tr),kr!==Ll){const Ss=De.charCodeAt(Zt);let Zr=-1;if(Js<li)u.charCodeAt(Js)===Ss?(Js++,Js===li&&(Zr=kr=Yu)):kr=Ll;else{const Er=i[kr],ml=i[kr+1];let Sa=Ll;for(let zs=Er;zs<ml;zs++){const pl=c[zs];if(u.charCodeAt(pl)===Ss){c[zs+1]-pl===1?Zr=Sa=f[zs]:(Js=pl+1,li=c[zs+1],Yu=f[zs],Sa=kr);break}}kr=Sa}if(Zr>=0&&(h[Zr]>=0||W[Zr]===1)&&Zt+1<Gs&&De.charCodeAt(Zt+1)===45){if(Tr===ce){ce*=2;const Er=new Int32Array(ce);Er.set(tt),tt=Er;const ml=new Int32Array(ce);ml.set(Et),Et=ml}tt[Tr]=Zr,Et[Tr]=Zt+2,Tr++}}ur===Gs&&(dl=Js<li?Ll:kr,Ku=Tr);const Xu=Js<li?Ll:kr;let Ds,er=!1;if(ur>=0)if(er=!0,Ds=jo(De,_n,ur,dl,Ku),Ds!==Zo&&Ds<a&&V[Ds]){const Zt=jo(De,_n,Gs,Xu,Tr);Zt!==Zo&&Zt!==Ds&&(Ds=Zt,er=!1)}else Ds===Zo&&(Ds=jo(De,_n,Gs,Xu,Tr),er=!1);else Ds=jo(De,_n,Gs,Xu,Tr);let fl=0,hl=0;Ds===Zo?cn[Hn]=Zo:(hl=er?1:0,fl=rs>=ja?ii?1:0:ge(Pe,De,rs,ja,ii?1:0,Zt=>Je(Zt,ii)),cn[Hn]=Ds,fn[Hn]=hl,Gt[Hn]=fl),je(ss,De,It,St,Cr,Ds,fl,hl)}if(qe===0)return"";if(qe===1)return lt[0]===0&&wt[0]===Ge?De:De.slice(lt[0],wt[0]);if(qe*B>xn){for(;qe*B>xn;)xn<<=1,Wt--;un=new Float64Array(xn),ns=new Int32Array(xn)}if(_e>=Ue||At>=Ue)throw new Error("cn: too many distinct classes in one merge");Jn=Jn+1|0,Jn===0&&(rn.fill(0),ns.fill(0),Jn=1);let Bt=!1;for(let Ct=qe-1;Ct>=0;Ct--){const It=cn[Ct];if(It===Zo){Bn[Ct]=1;continue}const on=Gt[Ct];if(wo(on,It)===1){Bn[Ct]=0,Bt=!0;continue}if(Bn[Ct]=1,It<a){const St=H[It];if(St>=0)for(let fs=R[St];fs<R[St+1];fs++)wo(on,M[fs]);if(fn[Ct]&1)for(let fs=0;fs<A.length;fs++)A[fs]===It&&wo(on,k[fs])}}if(!Bt&&!zt&&Ge===bt+qe-1)return De;let Nn="",hn=0;for(;hn<qe;){if(!Bn[hn]){hn++;continue}const Ct=lt[hn];let It=wt[hn],on=hn+1;for(;on<qe&&Bn[on]&&lt[on]===It+1&&De.charCodeAt(It)===32;)It=wt[on],on++;Nn.length>0&&(Nn+=" "),Nn+=De.slice(Ct,It),hn=on}return Nn},Fs=16384,ds=new Int32Array(Fs*2);let Ms=0,Pn=1,Un=Object.create(null),Os=Object.create(null),Nr=new Map,Gu=new Map,gc=0,xc=0;const ai=()=>{Ms^=Fs,Pn=Pn+1|0,xc=0},cl=De=>{let Ge=Un[De];if(Ge!==void 0)return Ge;const qe=xv(De,0,De.length),bt=(qe&16383)+Ms,zt=ds[bt]===(qe^Pn)||ds[bt^Fs]===(qe^Pn-1);return zt&&(Ge=Os[De],Ge!==void 0)?(Un[De]=Ge,Ge):(Ge=cr(De),zt?(Un[De]=Ge,++gc>te&&(gc=0,Os=Un,Un=Object.create(null),ai())):(ds[bt]=qe^Pn,++xc>Fs&&ai()),Ge)},bc=De=>{let Ge=Nr.get(De);if(Ge!==void 0)return Ge;const qe=xv(De,0,De.length),bt=(qe&16383)+Ms,zt=ds[bt]===(qe^Pn)||ds[bt^Fs]===(qe^Pn-1);return zt&&(Ge=Gu.get(De),Ge!==void 0)?(Nr.set(De,Ge),Ge):(Ge=cr(De),zt?(Nr.set(De,Ge),++gc>te&&(gc=0,Gu=Nr,Nr=new Map,ai())):(ds[bt]=qe^Pn,++xc>Fs&&ai()),Ge)},vc=De=>{const Ge=xv(De,0,De.length),qe=(Ge&16383)+Ms;return ds[qe]===(Ge^Pn)||ds[qe^Fs]===(Ge^Pn-1)?!0:(ds[qe]=Ge^Pn,++xc>Fs&&ai(),!1)},So=te===0?cr:X_?De=>{const Ge=Nr.get(De);return Ge!==void 0?Ge:bc(De)}:cl;return{merge:function(){return arguments.length===1&&typeof arguments[0]=="string"?So(arguments[0]):So(Z_.apply(null,arguments))},mergeString:So,seenBefore:te===0?()=>!1:vc,mergeUncached:cr}},Yp=(e,t)=>{if(!e)return"";if(typeof e=="string")return e;let r="";if(typeof e.length=="number"&&(!t||Array.isArray(e))){const a=e;for(let i=0;i<a.length;i++){const c=a[i];if(!c)continue;const u=typeof c=="string"?c:Yp(c,t);u&&(r&&(r+=" "),r+=u)}return r}if(t){if(typeof e=="number")return""+e;if(typeof e=="object")for(const a in e)e[a]&&(r&&(r+=" "),r+=a)}return r},Q_=(e,t)=>{let r="";for(let a=0;a<e.length;a++){const i=e[a];if(!i)continue;const c=typeof i=="string"?i:Yp(i,t);c&&(r&&(r+=" "),r+=c)}return r},Z_=function(){return Q_(arguments,!1)},J_=(e,t)=>{const r=t===void 0?()=>!0:t.seenBefore,a=t===void 0?e:t.mergeUncached;let i=new Map,c=new Map,u=0,f=null;const m=(b,v,w,C)=>{let S=0;if(v){if(v!==b.a0)return!1;S=1}if(w){if(w!==(S===0?b.a0:b.a1))return!1;S++}if(C){if(C!==(S===0?b.a0:S===1?b.a1:b.a2))return!1;S++}return S===b.t},h=(b,v)=>{const w=b.a;let C=0;for(let S=0;S<v.length;S++){const N=v[S];if(N){if(N!==w[C])return!1;C++}}return C===b.t},g=(b,v)=>{const w=b.length,C=f===null?null:f.n;if(!v){if(C!==null&&h(C,b))return f=C,C.r;if(f!==null&&f!==C&&h(f,b))return f.r}let S="",N=-1,E=0,T=!1;for(let A=0;A<w;A++){let k=b[A];if(k){if(typeof k!="string"){if(k=b[A]=Yp(k,!0),!k)continue;T=!0}N<0&&(S=k,N=A),E++}}if(E===0)return"";if(E===1)return e(S);if(T){if(C!==null&&h(C,b))return f=C,C.r;if(f!==null&&f!==C&&h(f,b))return f.r}let R=i.get(S);R===void 0&&(R=c.get(S),R!==void 0&&i.set(S,R));let M=null;if(R!==void 0)e:for(let A=0;A<R.length;A++){const k=R[A];if(k.t!==E)continue;const O=k.a;let D=1;for(let _=N+1;_<w;_++){const H=b[_];if(H&&H!==O[D++])continue e}M=k;break}if(M===null){let A=S;const k=[S];for(let O=N+1;O<w;O++){const D=b[O];D&&(A+=" "+D,k.push(D))}if(!r(A))return a(A);M={r:e(A),t:k.length,a0:k[0],a1:k[1],a2:k[2]??"",a:k,n:null},R===void 0&&i.set(S,R=[]),R.length>=256&&R.shift(),R.push(M),++u>1e3&&(u=0,c=i,i=new Map)}return f!==null&&f!==M&&(f.n=M),f=M,M.r},p=b=>Array.isArray(b)?g(b.slice(),!1):e(Yp(b,!0));return function(b,v,w){const C=arguments.length;if((C|1)===3){const E=f;if(E!==null){const T=E.n;if(T!==null&&m(T,b,v,w))return f=T,T.r;if(E!==T&&m(E,b,v,w))return E.r}return g([b,v,w],!0)}if(C===1)return typeof b=="string"?e(b):p(b);const S=f;if(S!==null){const E=S.n;if(E!==null){const T=E.a;let R=0,M=!0;for(let A=0;A<C;A++){const k=arguments[A];if(k){if(k!==T[R]){M=!1;break}R++}}if(M&&R===E.t)return f=E,E.r}if(S!==E){const T=S.a;let R=0,M=!0;for(let A=0;A<C;A++){const k=arguments[A];if(k){if(k!==T[R]){M=!1;break}R++}}if(M&&R===S.t)return S.r}}const N=[];for(let E=0;E<C;E++)N.push(arguments[E]);return g(N,!0)}},kk=W_(K_),ws=J_(kk.mergeString,kk);/**
51
51
  * @license lucide-react v0.577.0 - ISC
52
52
  *
53
53
  * This source code is licensed under the ISC license.
@@ -549,5 +549,5 @@ When you're done, reply with ONLY this, nothing else:
549
549
  - SSH port: <port, or 22>
550
550
  - Authentication: "SSH agent / default keys" if the key is ~/.ssh/id_ed25519 or ~/.ssh/id_rsa, or is loaded in ssh-agent. Otherwise "Key file: <full path to the PRIVATE key on my machine, e.g. ~/.ssh/openrod-vm — not the .pub>"
551
551
  - Host key fingerprint (ED25519): <output of \`ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub\` on the VM>
552
- `;async function Ree(e,t){try{return await navigator.clipboard.writeText(e),!0}catch{}const r=Object.assign(document.createElement("textarea"),{value:e,readOnly:!0});r.style.cssText="position:fixed;opacity:0;pointer-events:none",t.parentElement.append(r),r.select();try{return document.execCommand("copy")}catch{return!1}finally{r.remove(),t.focus()}}const Aee={initial:{opacity:0,scale:.6,filter:"blur(2px)"},animate:{opacity:1,scale:1,filter:"blur(0px)"},exit:{opacity:0,scale:.6,filter:"blur(2px)"}};function Mee({className:e}){const[t,r]=x.useState(!1),a=Zs();x.useEffect(()=>{if(!t)return;const u=setTimeout(()=>r(!1),2e3);return()=>clearTimeout(u)},[t]);const i=async u=>{await Ree(Eee,u.currentTarget)?r(!0):He.error("Couldn’t copy the prompt",{description:"Your browser blocked clipboard access."})},c=a?{}:{...Aee,transition:{duration:.18,ease:"easeOut"}};return n.jsx(Fu,{delay:300,children:n.jsxs(xa,{children:[n.jsxs(ba,{render:n.jsx(ie,{type:"button",variant:"outline",size:"sm",onClick:i,"aria-label":t?"Prompt copied":"Copy a VM setup prompt for your AI agent",className:Ve("h-8 gap-1.5 px-3 text-xs",e)}),children:[n.jsx("span",{className:"relative grid size-3.5 place-items-center","aria-hidden":"true",children:n.jsx(lc,{initial:!1,mode:"popLayout",children:n.jsx($n.span,{className:"grid place-items-center",...c,children:t?n.jsx(Yn,{className:"size-3.5 text-emerald-600 dark:text-emerald-400"}):n.jsx(Lf,{className:"size-3.5"})},t?"check":"copy")})}),n.jsx(lc,{initial:!1,mode:"wait",children:n.jsx($n.span,{...a?{}:{initial:{opacity:0,y:3},animate:{opacity:1,y:0},exit:{opacity:0,y:-3},transition:{duration:.15}},children:t?n.jsx("span",{className:"text-foreground",children:"Copied — paste into your agent"}):n.jsx(Tee,{className:"mx-0 text-inherit motion-reduce:animate-none dark:text-inherit",children:"Need a VM? Copy agent prompt"})},t?"copied":"idle")}),n.jsx("span",{role:"status",className:"sr-only",children:t?"VM setup prompt copied to clipboard":""})]}),n.jsx(va,{side:"top",className:"max-w-64",children:"Copies a prompt your AI agent can use to create a VM on any cloud provider or server, then tells you what to enter here."})]})})}const kR={name:"",hostname:"",port:"",auth:"default",identityFile:""},Oee=[["default","SSH agent / default keys"],["identity","Key file"]];function Dee({open:e,onOpenChange:t,onAdded:r}){const[a,i]=x.useState(kR),[c,u]=x.useState(null),[f,m]=x.useState(!1),[h,g]=x.useState(null),p=x.useId();x.useEffect(()=>{e&&(i(kR),u(null),g(null),m(!1))},[e]);const b=N=>E=>{i(T=>({...T,[N]:E.target.value})),g(null)},v=a.name.trim()&&a.hostname.trim()&&(a.auth==="default"||a.identityFile.trim());async function w(N){m(!0),g(null);try{await N()}catch(E){g(E.message)}finally{m(!1)}}const C=N=>{N.preventDefault(),v&&!f&&w(async()=>u(await cs.scanSshHost(a)))},S=()=>w(async()=>{const N=await cs.addSshHost(c.token);r(N)});return n.jsx(en,{open:e,onOpenChange:N=>{f||t(N)},children:n.jsxs(tn,{className:"sm:max-w-md","aria-describedby":void 0,children:[n.jsx(nn,{children:n.jsx(Qt,{children:c?"Trust this machine?":"Add SSH connection"})}),c?n.jsxs("div",{className:"grid gap-4 text-xs",children:[n.jsxs("p",{className:"text-muted-foreground",children:["OpenRod reached ",n.jsxs("span",{className:"font-mono text-foreground",children:[c.user?`${c.user}@`:"",c.host,c.port?`:${c.port}`:""]})," and it presented these host keys. Confirm they match the server before you trust it; a mismatch could mean someone is intercepting the connection."]}),n.jsx("ul",{className:"grid gap-2",children:c.fingerprints.map(N=>n.jsxs("li",{className:"rounded-lg border border-border bg-muted/20 px-3 py-2",children:[n.jsx("span",{className:"block text-[10px] text-muted-foreground",children:N.type}),n.jsx("span",{className:"block font-mono break-all text-foreground",children:N.fingerprint})]},N.type))}),n.jsxs("p",{className:"text-muted-foreground",children:["On the server, ",n.jsx("code",{className:"rounded bg-muted px-1 font-mono text-foreground",children:"ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub"})," prints the matching fingerprint."]}),h&&n.jsx("p",{role:"alert",className:"rounded-lg border border-destructive/30 bg-destructive/5 px-3 py-2 break-words whitespace-pre-wrap text-destructive",children:h}),n.jsxs(Hr,{children:[n.jsx(ie,{type:"button",variant:"ghost",disabled:f,onClick:()=>{u(null),g(null)},children:"Back"}),n.jsxs(ie,{type:"button",disabled:f,onClick:S,className:"bg-[var(--action)] text-[var(--action-foreground)] hover:bg-[var(--action)]/90",children:[f?n.jsx(kt,{"aria-hidden":"true"}):n.jsx(Iu,{"aria-hidden":"true",className:"size-4"}),"Trust and save"]})]})]}):n.jsxs("form",{autoComplete:"off",className:"grid gap-4 text-xs",onSubmit:C,children:[n.jsxs("div",{className:"grid gap-1.5",children:[n.jsx(zn,{htmlFor:`${p}-name`,className:"text-xs",children:"Display name"}),n.jsx(Ot,{id:`${p}-name`,value:a.name,onChange:b("name"),maxLength:60,placeholder:"Build server",autoFocus:!0})]}),n.jsxs("div",{className:"grid gap-1.5",children:[n.jsx(zn,{htmlFor:`${p}-host`,className:"text-xs",children:"Hostname"}),n.jsx(Ot,{id:`${p}-host`,value:a.hostname,onChange:b("hostname"),spellCheck:!1,autoCapitalize:"none",placeholder:"host.com or user@host.com",className:"font-mono"})]}),n.jsxs("div",{className:"grid gap-1.5",children:[n.jsxs(zn,{htmlFor:`${p}-port`,className:"text-xs",children:["SSH port ",n.jsx("span",{className:"font-normal text-muted-foreground",children:"(optional)"})]}),n.jsx(Ot,{id:`${p}-port`,value:a.port,onChange:b("port"),inputMode:"numeric",placeholder:"22",className:"font-mono"})]}),n.jsxs("div",{className:"grid gap-2",children:[n.jsx("div",{role:"radiogroup","aria-label":"Authentication",className:"inline-flex w-fit rounded-lg bg-muted p-0.5",children:Oee.map(([N,E])=>n.jsx("button",{type:"button",role:"radio","aria-checked":a.auth===N,onClick:()=>{i(T=>({...T,auth:N})),g(null)},className:`rounded-md px-3 py-1 transition-colors ${a.auth===N?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:E},N))}),a.auth==="identity"?n.jsx(Ot,{"aria-label":"Private key file",value:a.identityFile,onChange:b("identityFile"),spellCheck:!1,autoCapitalize:"none",placeholder:"~/.ssh/id_ed25519",className:"font-mono"}):n.jsx("p",{className:"text-muted-foreground",children:"Uses your SSH agent and the keys SSH tries by default. Password logins aren’t supported."})]}),h&&n.jsx("p",{role:"alert",className:"rounded-lg border border-destructive/30 bg-destructive/5 px-3 py-2 break-words whitespace-pre-wrap text-destructive",children:h}),n.jsxs(Hr,{children:[n.jsx(Mee,{className:"sm:mr-auto"}),n.jsx(ie,{type:"button",variant:"ghost",onClick:()=>t(!1),children:"Cancel"}),n.jsxs(ie,{type:"submit",disabled:!v||f,className:"bg-[var(--action)] text-[var(--action-foreground)] hover:bg-[var(--action)]/90",children:[f&&n.jsx(kt,{"aria-hidden":"true"}),f?"Checking…":"Continue"]})]})]})]})})}const WD={connected:{label:"Connected",dot:"bg-emerald-500"},connecting:{label:"Connecting…",dot:"bg-amber-400"},failed:{label:"Connection failed",dot:"bg-red-500"},off:{label:"Not connected",dot:"bg-stone-400 dark:bg-stone-500"}},TR=e=>WD[e]?e:"off",QD=(e,t,r)=>`${e} ${e===1?t:r}`;function zee({row:e,count:t}){const r=WD[e.state];return n.jsxs("span",{className:"flex shrink-0 items-center gap-1.5 text-xs text-muted-foreground",children:[n.jsx("span",{"aria-hidden":"true",className:Ve("size-1.5 shrink-0 rounded-full",r.dot,e.state==="connecting"&&"motion-safe:animate-pulse")}),n.jsx("span",{children:r.label}),e.state==="connected"&&n.jsxs("span",{className:"hidden sm:inline",children:["· ",QD(t,"sandbox","sandboxes")]})]})}function Iee({row:e,count:t,working:r,onToggle:a,onCreate:i,menu:c}){const u=e.state==="connected",f=e.label??e.name,m=e.address;return n.jsxs("li",{className:"px-4 py-2 sm:px-5",children:[n.jsxs("div",{className:"flex items-center gap-3.5",children:[n.jsx("span",{className:"flex h-[18px] w-8 shrink-0 items-center justify-center",children:r||e.state==="connecting"?n.jsx(kt,{"aria-label":"Working",className:"size-3.5"}):n.jsx(kee,{checked:u,"aria-label":`${u?"Disconnect from":"Connect to"} ${f}`,onCheckedChange:h=>a(e,h)})}),n.jsx("span",{"aria-hidden":"true",className:Ve("flex w-6 shrink-0 justify-center transition-opacity duration-300 [&_svg]:block [&_svg]:h-[22px]",!u&&"opacity-50"),children:n.jsx(v4,{live:u})}),n.jsxs("span",{className:"flex min-w-0 flex-1 items-baseline gap-2.5",children:[n.jsx("span",{className:"truncate text-[13px] font-medium",children:f}),m&&n.jsx("span",{className:"hidden min-w-0 truncate font-mono text-[11px] text-muted-foreground md:block",children:m})]}),n.jsx(zee,{row:e,count:t}),n.jsxs("span",{className:"flex w-[60px] shrink-0 items-center justify-end gap-0.5",children:[u&&i&&n.jsxs(xa,{children:[n.jsx(ba,{render:n.jsx(ie,{variant:"ghost",size:"icon-sm","aria-label":`New sandbox on ${f}`,onClick:i,className:"size-7 text-muted-foreground hover:text-foreground"}),children:n.jsx(B8,{className:"size-4"})}),n.jsx(va,{children:"New sandbox"})]}),c]})]}),e.state==="failed"&&e.error&&n.jsx("p",{className:"mt-1 truncate pl-[46px] font-mono text-[11px] text-destructive",title:e.error,children:e.error})]})}function Pee({onCreateSandbox:e}){var $,U,F;const t=vo(),r=js(),[a,i]=x.useState(!1),[c,u]=x.useState(""),[f,m]=x.useState(!1),h=x.useRef(null);x.useEffect(()=>()=>{var K;return(K=h.current)==null?void 0:K.abort()},[]);const g=t.locations.find(K=>K.cloud||K.target==="cloud"),p=!!(g!=null&&g.connected);async function b(){const K=new AbortController;h.current=K,i(!0),u("");try{await r.prepare({signal:K.signal}),K.signal.throwIfAborted(),m(!0),t.refresh()}catch(se){se.name!=="AbortError"&&u(se.message)}finally{i(!1),h.current=null}}const[v,w]=x.useState(null),[C,S]=x.useState(null),[N,E]=x.useState(null),[T,R]=x.useState(null),[M,A]=x.useState(!1),[k,O]=x.useState(null),D=x.useCallback(async K=>{try{w(await cs.connections(K)),S(null)}catch(se){se.name!=="AbortError"&&S(se.message)}},[]);x.useEffect(()=>{const K=new AbortController;return D(K.signal),()=>K.abort()},[D]);const _=(v==null?void 0:v.active)??null,H=TR(_==null?void 0:_.status),G=H==="connected",B=x.useMemo(()=>{if(!v)return[];const K=v.hosts.map(se=>({...se,state:(_==null?void 0:_.host)===se.name?TR(_.status):"off",error:(_==null?void 0:_.host)===se.name?_.error:null}));return _&&!K.some(se=>se.name===_.host)&&K.push({name:_.host,state:H,error:_.error}),K},[v,_,H]),P=B.filter(K=>K.managed||K.name===(_==null?void 0:_.host)).sort((K,se)=>(se.state==="connected")-(K.state==="connected")||(K.label??K.name).localeCompare(se.label??se.name)),V=B.filter(K=>!P.includes(K)),Y=K=>t.sandboxes.filter(se=>{var ne;return((ne=se.location)==null?void 0:ne.remote)&&se.location.host===K.name}).length;async function W(K,se,ne){E(K);try{await se(),await D(),t.refresh()}catch(ye){He.error(ne,{description:ye.message})}finally{E(null)}}const q=(K,se)=>{se?R({host:K.name,replacing:G?_.host:void 0}):W(K.name,async()=>{await cs.disconnectRemote(),He.success(`Disconnected from ${K.label??K.name}`)},"Couldn’t disconnect")};function ee(){const{kind:K,row:se}=k;O(null);const ne=se.label??se.name;K==="forget"?W(se.name,async()=>{await cs.forgetRemote(),He.success(`Forgot ${ne}`)},"Couldn’t forget it"):W(se.name,async()=>{(_==null?void 0:_.host)===se.name&&await cs.forgetRemote(),await cs.removeSshHost(se.name),He.success(`Deleted ${ne}`)},"Couldn’t delete it")}function z(K){const se=K.name===(_==null?void 0:_.host);return!K.managed&&!se?null:n.jsxs(Fi,{children:[n.jsx(Gi,{render:n.jsx(ie,{variant:"ghost",size:"icon-sm","aria-label":`More actions for ${K.label??K.name}`,className:"size-7 text-muted-foreground hover:text-foreground"}),children:n.jsx(Rk,{className:"size-4"})}),n.jsxs(qi,{align:"end",className:"min-w-44",children:[K.state==="connected"&&n.jsx(Rs,{onClick:()=>q(K,!1),children:"Disconnect"}),K.state!=="connected"&&K.state!=="connecting"&&n.jsx(Rs,{onClick:()=>q(K,!0),children:K.state==="failed"?"Try again":"Connect"}),se&&!K.managed&&n.jsx(Rs,{onClick:()=>O({kind:"forget",row:K}),children:"Forget"}),K.managed&&n.jsxs(n.Fragment,{children:[n.jsx(ju,{}),n.jsxs(Rs,{variant:"destructive",disabled:K.state==="connected"||K.state==="connecting",onClick:()=>O({kind:"delete",row:K}),children:["Delete",K.state==="connected"?" (disconnect first)":""]})]})]})]})}const L=(K,se)=>n.jsx(ho,{delay:.04*se,offset:4,blur:"3px",className:"contents",children:n.jsx(Iee,{row:K,count:Y(K),working:N===K.name,onToggle:q,onCreate:e,menu:z(K)})},K.name),X=(k==null?void 0:k.row.label)??(k==null?void 0:k.row.name),te="divide-y divide-border/60 overflow-hidden rounded-xl border border-border/80 bg-card";return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"h-[calc(100svh-3.5rem)] overflow-y-auto",children:n.jsxs("div",{className:"grid gap-8 px-4 py-5 sm:px-6",children:[n.jsxs("section",{"aria-label":"OpenRod Cloud",className:"grid gap-4",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-sm font-medium",children:"OpenRod Cloud"}),n.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:"Manage your cloud connection."})]}),n.jsx(ho,{duration:.2,offset:4,blur:"3px",children:n.jsxs("div",{className:te,children:[n.jsxs("div",{className:"flex flex-wrap items-center gap-3.5 px-4 py-3 sm:px-5",children:[n.jsx("span",{"aria-hidden":"true",className:"flex w-8 shrink-0 justify-center [&_svg]:h-7",children:n.jsx(y4,{})}),n.jsxs("div",{className:"min-w-0 flex-1",children:[n.jsx("p",{className:"text-[13px] font-medium",children:(($=r==null?void 0:r.user)==null?void 0:$.email)||"OpenRod Cloud"}),n.jsxs("p",{role:"status",className:"mt-0.5 flex items-center gap-1.5 text-xs text-muted-foreground",children:[p&&n.jsx("span",{"aria-hidden":"true",className:"size-1.5 rounded-full bg-emerald-500"}),r!=null&&r.checking?"Checking connection…":a?r!=null&&r.connecting?"Signing in…":"Starting cloud machine…":p?`Connected · ${QD(t.sandboxes.filter(K=>{var se;return(se=K.location)==null?void 0:se.cloud}).length,"sandbox","sandboxes")}`:r!=null&&r.connected?"Signed in · machine not ready":r!=null&&r.available?"Not connected":((U=r==null?void 0:r.status)==null?void 0:U.reason)||"Coming soon"]})]}),n.jsx("div",{className:"flex items-center gap-1.5",children:a?n.jsxs(ie,{variant:"ghost",size:"sm",onClick:()=>{var K;(K=h.current)==null||K.abort(),r.cancelConnect()},children:[n.jsx(kt,{}),"Cancel"]}):n.jsxs(n.Fragment,{children:[p&&!f?n.jsxs(ie,{variant:"outline",size:"sm",onClick:()=>window.dispatchEvent(new CustomEvent("openrod-import",{detail:{destination:g}})),children:[n.jsx(gf,{className:"size-3.5"}),"Import data"]}):!p&&n.jsxs(ie,{variant:"outline",size:"sm",disabled:!(r!=null&&r.available)||(r==null?void 0:r.checking),onClick:b,children:[n.jsx(Kp,{className:"size-3.5"}),r!=null&&r.connected?"Start cloud machine":"Connect"]}),(r==null?void 0:r.connected)&&n.jsxs(Fi,{children:[n.jsx(Gi,{render:n.jsx(ie,{variant:"ghost",size:"icon-sm","aria-label":"OpenRod Cloud actions"}),children:n.jsx(Rk,{className:"size-4"})}),n.jsxs(qi,{align:"end",children:[n.jsx(Rs,{onClick:()=>r.refresh().then(()=>t.refresh()).catch(K=>u(K.message)),children:"Refresh connection"}),n.jsx(ju,{}),n.jsx(Rs,{onClick:()=>r.disconnect().catch(K=>u(K.message)),children:"Disconnect account"})]})]})]})})]}),f&&p&&n.jsxs("div",{className:"flex flex-wrap items-center gap-3 border-t px-4 py-3 sm:px-5",children:[n.jsx("p",{className:"min-w-0 flex-1 text-xs text-muted-foreground",children:"Bring your local setup?"}),n.jsx(ie,{variant:"ghost",size:"sm",onClick:()=>m(!1),children:"Not now"}),n.jsxs(ie,{size:"sm",onClick:()=>{m(!1),window.dispatchEvent(new CustomEvent("openrod-import",{detail:{destination:g}}))},children:[n.jsx(gf,{className:"size-3.5"}),"Import data"]})]}),(c||(r==null?void 0:r.error))&&n.jsx("p",{role:"alert",className:"border-t px-4 py-2 text-xs text-destructive sm:px-5",children:c||r.error})]})})]}),C&&n.jsxs("div",{role:"alert",className:"flex items-center gap-3 text-xs text-red-600",children:[n.jsx("span",{children:C}),n.jsx(ie,{variant:"outline",size:"sm",onClick:()=>D(),children:"Retry"})]}),!v&&!C&&n.jsx("p",{role:"status",className:"py-20 text-center text-sm text-muted-foreground",children:"Reading connections…"}),v&&n.jsxs(n.Fragment,{children:[n.jsxs("section",{"aria-label":"SSH connections",className:"grid gap-4",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs("div",{className:"min-w-0 flex-1",children:[n.jsx("h2",{className:"text-sm font-medium",children:"SSH connections"}),n.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:"Added in OpenRod. One machine is connected at a time."})]}),n.jsx(ie,{variant:"ghost",size:"icon-sm","aria-label":"Refresh connections",onClick:()=>D(),className:"text-muted-foreground",children:n.jsx(rl,{})}),((F=v.forgottenHosts)==null?void 0:F.length)>0&&n.jsxs(Fi,{children:[n.jsx(Gi,{render:n.jsx(ie,{variant:"ghost",size:"sm"}),children:"Restore"}),n.jsx(qi,{align:"end",children:v.forgottenHosts.map(K=>n.jsxs(Rs,{onClick:()=>W(K,()=>cs.restoreSshHost(K),"Couldn’t restore it"),children:["Restore ",K]},K))})]}),n.jsxs(ie,{size:"sm",onClick:()=>A(!0),className:"bg-[var(--action)] text-[var(--action-foreground)] hover:bg-[var(--action)]/90",children:[n.jsx(vs,{className:"size-3.5"}),"Add"]})]}),P.length>0?n.jsx("ul",{className:te,children:P.map(L)}):n.jsxs("div",{className:"rounded-xl border border-border bg-card py-14 text-center",children:[n.jsx($f,{className:"mx-auto mb-3 size-6 text-muted-foreground",strokeWidth:1.5}),n.jsx("p",{className:"text-sm",children:"No saved connections"}),n.jsx("p",{className:"mx-auto mt-1 max-w-xs text-xs text-muted-foreground",children:"Add a server to run sandboxes on your own machine over SSH. You confirm its host key before anything is saved."}),n.jsx(ie,{variant:"outline",className:"mt-4",onClick:()=>A(!0),children:"Add connection"})]})]}),V.length>0&&n.jsxs("section",{"aria-label":"Hosts in your SSH config",className:"grid gap-4",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-sm font-medium",children:"From your SSH config"}),n.jsxs("p",{className:"mt-0.5 text-xs text-muted-foreground",children:["Found in ",n.jsx("span",{className:"font-mono",children:"~/.ssh/config"}),". OpenRod reads these and never edits them."]})]}),n.jsx("ul",{className:te,children:V.map(L)})]})]})]})}),n.jsx(Fr,{open:!!k,onOpenChange:K=>{K||O(null)},children:n.jsxs(Gr,{children:[n.jsxs(qr,{children:[n.jsxs(Kr,{children:[(k==null?void 0:k.kind)==="forget"?"Forget":"Delete"," ",X,"?"]}),n.jsx(Xr,{children:(k==null?void 0:k.kind)==="forget"?`${(k==null?void 0:k.row.state)==="connected"?"This disconnects from the machine and removes it from this page. ":"This removes it from this page. "}Sandboxes on the machine keep running, and the host stays in your SSH configuration, so you can connect again later.`:"This removes the saved connection and its trusted host keys from OpenRod. Sandboxes on the machine keep running. You can add it again later."})]}),n.jsxs(Yr,{children:[n.jsx(Qr,{children:"Cancel"}),n.jsx(Wr,{variant:"destructive",onClick:ee,children:(k==null?void 0:k.kind)==="forget"?"Forget":"Delete"})]})]})}),n.jsx(Dee,{open:M,onOpenChange:A,onAdded:K=>{A(!1),He.success(`Added ${K.name}`),D(),R({host:K.alias})}}),n.jsx(en,{open:!!T,onOpenChange:K=>{K||R(null)},children:n.jsxs(tn,{className:"sm:max-w-3xl","aria-describedby":void 0,children:[n.jsx(nn,{children:n.jsx(Qt,{children:T!=null&&T.replacing?"Switch host":"Connect a remote machine"})}),T&&n.jsx(zw,{initialHost:T.host,connectedHost:T.replacing??null,onUseConnected:()=>R(null),onConnected:K=>{R(null),He.success(`Connected to ${K.host}`),D(),t.refresh()},onBack:()=>R(null)},T.host)]})})]})}const ER=({...e})=>{const{resolvedTheme:t}=HR();return n.jsx(AK,{theme:t??"system",className:"toaster group",icons:{success:n.jsx(AL,{className:"size-4"}),info:n.jsx(Du,{className:"size-4"}),warning:n.jsx(ti,{className:"size-4"}),error:n.jsx(zA,{className:"size-4"}),loading:n.jsx(Ql,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},toastOptions:{classNames:{toast:"cn-toast"}},...e})},RR=["Claude Code","Codex","OpenCode","Pi","Cursor"];function ZD(){const[e,t]=x.useState(RR.slice(0,3));return x.useEffect(()=>{const r=window.matchMedia("(prefers-reduced-motion: reduce)");let a,i=-1;function c(){clearTimeout(a),!(r.matches||document.hidden)&&(a=setTimeout(()=>{const u=[0,1,2].filter(h=>h!==i),f=u[Math.floor(Math.random()*u.length)];i=f;const m=Math.random();t(h=>{const g=RR.filter(p=>!h.includes(p));return h.map((p,b)=>b===f?g[Math.floor(m*g.length)]:p)}),c()},1100+Math.random()*900))}return c(),r.addEventListener("change",c),document.addEventListener("visibilitychange",c),()=>{clearTimeout(a),r.removeEventListener("change",c),document.removeEventListener("visibilitychange",c)}},[]),n.jsxs("svg",{className:"cloud-agents",viewBox:"50 10 540 340",role:"img","aria-labelledby":"cloud-agents-title cloud-agents-desc",children:[n.jsx("title",{id:"cloud-agents-title",children:"Your agents in OpenRod Cloud"}),n.jsx("desc",{id:"cloud-agents-desc",children:"Claude Code, Codex, OpenCode, Pi, and Cursor on OpenRod Cloud."}),n.jsxs("g",{className:"cloud-spark",children:[n.jsx("path",{d:"M93 105h4v-8h4v8h8v4h-8v8h-4v-8h-8v-4z"}),n.jsx("path",{d:"M544 72h4v-7h4v7h7v4h-7v7h-4v-7h-7v-4z"}),n.jsx("path",{d:"M563 268h4v-6h4v6h6v4h-6v6h-4v-6h-6v-4z"})]}),n.jsx("path",{d:"M98 292h-28v-76h28v-35h55v-48h55v-35h80V74h72v24h48v35h48v48h53v35h30v76h-29v31H98z",fill:"#cadbd7",transform:"translate(0 13)"}),n.jsx("path",{d:"M98 292h-28v-76h28v-35h55v-48h55v-35h80V74h72v24h48v35h48v48h53v35h30v76h-29v31H98z",fill:"#f4f1e8",stroke:"#b3c8c2",strokeWidth:"2"}),n.jsx("path",{d:"M106 291h397",stroke:"#d8ded2",strokeWidth:"2",strokeDasharray:"3 7"}),n.jsxs("g",{className:"cloud-card-slot",transform:"translate(165 165)",children:[n.jsxs("g",{className:`cloud-card-face ${e[0]==="Claude Code"?"is-active":""}`,"data-agent":"Claude Code",children:[n.jsx("rect",{width:"82",height:"82",rx:"8",fill:"#f0dccb"}),n.jsx("image",{href:"/logos/agents/claudecode.svg",x:"18",y:"18",width:"46",height:"46"}),n.jsx("text",{x:"41",y:"102",textAnchor:"middle",fontSize:"10",fill:"#68746b",children:"Claude Code"})]}),n.jsxs("g",{className:`cloud-card-face ${e[0]==="Codex"?"is-active":""}`,"data-agent":"Codex",children:[n.jsx("rect",{width:"82",height:"82",rx:"8",fill:"#e3e3ec"}),n.jsx("svg",{x:"7",y:"1",width:"68",height:"81",viewBox:"335 265 625 735",children:n.jsx("image",{href:"/cloud-agents/codex-character.png",width:"1312",height:"1199"})}),n.jsx("text",{x:"41",y:"102",textAnchor:"middle",fontSize:"10",fill:"#68746b",children:"Codex"})]}),n.jsxs("g",{className:`cloud-card-face ${e[0]==="OpenCode"?"is-active":""}`,"data-agent":"OpenCode",children:[n.jsx("rect",{width:"82",height:"82",rx:"8",fill:"#e1e6d9"}),n.jsx("image",{href:"/logos/agents/opencode.svg",x:"18",y:"18",width:"46",height:"46"}),n.jsx("text",{x:"41",y:"102",textAnchor:"middle",fontSize:"10",fill:"#68746b",children:"OpenCode"})]}),n.jsxs("g",{className:`cloud-card-face ${e[0]==="Pi"?"is-active":""}`,"data-agent":"Pi",children:[n.jsx("rect",{width:"82",height:"82",rx:"8",fill:"#e6dfd0"}),n.jsx("image",{href:"/logos/agents/pi.svg",x:"18",y:"18",width:"46",height:"46"}),n.jsx("text",{x:"41",y:"102",textAnchor:"middle",fontSize:"10",fill:"#68746b",children:"Pi"})]}),n.jsxs("g",{className:`cloud-card-face ${e[0]==="Cursor"?"is-active":""}`,"data-agent":"Cursor",children:[n.jsx("rect",{width:"82",height:"82",rx:"8",fill:"#e2e5df"}),n.jsx("image",{href:"/logos/agents/cursor.svg",x:"18",y:"18",width:"46",height:"46"}),n.jsx("text",{x:"41",y:"102",textAnchor:"middle",fontSize:"10",fill:"#68746b",children:"Cursor"})]})]}),n.jsxs("g",{className:"cloud-card-slot",transform:"translate(267 146)",children:[n.jsxs("g",{className:`cloud-card-face ${e[1]==="Codex"?"is-active":""}`,"data-agent":"Codex",children:[n.jsx("rect",{width:"82",height:"82",rx:"8",fill:"#e3e3ec"}),n.jsx("svg",{x:"7",y:"1",width:"68",height:"81",viewBox:"335 265 625 735",children:n.jsx("image",{href:"/cloud-agents/codex-character.png",width:"1312",height:"1199"})}),n.jsx("text",{x:"41",y:"102",textAnchor:"middle",fontSize:"10",fill:"#68746b",children:"Codex"})]}),n.jsxs("g",{className:`cloud-card-face ${e[1]==="OpenCode"?"is-active":""}`,"data-agent":"OpenCode",children:[n.jsx("rect",{width:"82",height:"82",rx:"8",fill:"#e1e6d9"}),n.jsx("image",{href:"/logos/agents/opencode.svg",x:"18",y:"18",width:"46",height:"46"}),n.jsx("text",{x:"41",y:"102",textAnchor:"middle",fontSize:"10",fill:"#68746b",children:"OpenCode"})]}),n.jsxs("g",{className:`cloud-card-face ${e[1]==="Pi"?"is-active":""}`,"data-agent":"Pi",children:[n.jsx("rect",{width:"82",height:"82",rx:"8",fill:"#e6dfd0"}),n.jsx("image",{href:"/logos/agents/pi.svg",x:"18",y:"18",width:"46",height:"46"}),n.jsx("text",{x:"41",y:"102",textAnchor:"middle",fontSize:"10",fill:"#68746b",children:"Pi"})]}),n.jsxs("g",{className:`cloud-card-face ${e[1]==="Cursor"?"is-active":""}`,"data-agent":"Cursor",children:[n.jsx("rect",{width:"82",height:"82",rx:"8",fill:"#e2e5df"}),n.jsx("image",{href:"/logos/agents/cursor.svg",x:"18",y:"18",width:"46",height:"46"}),n.jsx("text",{x:"41",y:"102",textAnchor:"middle",fontSize:"10",fill:"#68746b",children:"Cursor"})]}),n.jsxs("g",{className:`cloud-card-face ${e[1]==="Claude Code"?"is-active":""}`,"data-agent":"Claude Code",children:[n.jsx("rect",{width:"82",height:"82",rx:"8",fill:"#f0dccb"}),n.jsx("image",{href:"/logos/agents/claudecode.svg",x:"18",y:"18",width:"46",height:"46"}),n.jsx("text",{x:"41",y:"102",textAnchor:"middle",fontSize:"10",fill:"#68746b",children:"Claude Code"})]})]}),n.jsxs("g",{className:"cloud-card-slot",transform:"translate(369 165)",children:[n.jsxs("g",{className:`cloud-card-face ${e[2]==="OpenCode"?"is-active":""}`,"data-agent":"OpenCode",children:[n.jsx("rect",{width:"82",height:"82",rx:"8",fill:"#e1e6d9"}),n.jsx("image",{href:"/logos/agents/opencode.svg",x:"18",y:"18",width:"46",height:"46"}),n.jsx("text",{x:"41",y:"102",textAnchor:"middle",fontSize:"10",fill:"#68746b",children:"OpenCode"})]}),n.jsxs("g",{className:`cloud-card-face ${e[2]==="Pi"?"is-active":""}`,"data-agent":"Pi",children:[n.jsx("rect",{width:"82",height:"82",rx:"8",fill:"#e6dfd0"}),n.jsx("image",{href:"/logos/agents/pi.svg",x:"18",y:"18",width:"46",height:"46"}),n.jsx("text",{x:"41",y:"102",textAnchor:"middle",fontSize:"10",fill:"#68746b",children:"Pi"})]}),n.jsxs("g",{className:`cloud-card-face ${e[2]==="Cursor"?"is-active":""}`,"data-agent":"Cursor",children:[n.jsx("rect",{width:"82",height:"82",rx:"8",fill:"#e2e5df"}),n.jsx("image",{href:"/logos/agents/cursor.svg",x:"18",y:"18",width:"46",height:"46"}),n.jsx("text",{x:"41",y:"102",textAnchor:"middle",fontSize:"10",fill:"#68746b",children:"Cursor"})]}),n.jsxs("g",{className:`cloud-card-face ${e[2]==="Claude Code"?"is-active":""}`,"data-agent":"Claude Code",children:[n.jsx("rect",{width:"82",height:"82",rx:"8",fill:"#f0dccb"}),n.jsx("image",{href:"/logos/agents/claudecode.svg",x:"18",y:"18",width:"46",height:"46"}),n.jsx("text",{x:"41",y:"102",textAnchor:"middle",fontSize:"10",fill:"#68746b",children:"Claude Code"})]}),n.jsxs("g",{className:`cloud-card-face ${e[2]==="Codex"?"is-active":""}`,"data-agent":"Codex",children:[n.jsx("rect",{width:"82",height:"82",rx:"8",fill:"#e3e3ec"}),n.jsx("svg",{x:"7",y:"1",width:"68",height:"81",viewBox:"335 265 625 735",children:n.jsx("image",{href:"/cloud-agents/codex-character.png",width:"1312",height:"1199"})}),n.jsx("text",{x:"41",y:"102",textAnchor:"middle",fontSize:"10",fill:"#68746b",children:"Codex"})]})]}),n.jsx("g",{role:"img","aria-label":"OpenRod Cloud",children:n.jsx("path",{fill:"#536f67",d:"M226.25 30h2.5v2.5h-2.5zM228.75 30h2.5v2.5h-2.5zM231.25 30h2.5v2.5h-2.5zM223.75 32.5h2.5v2.5h-2.5zM233.75 32.5h2.5v2.5h-2.5zM223.75 35h2.5v2.5h-2.5zM233.75 35h2.5v2.5h-2.5zM223.75 37.5h2.5v2.5h-2.5zM233.75 37.5h2.5v2.5h-2.5zM223.75 40h2.5v2.5h-2.5zM233.75 40h2.5v2.5h-2.5zM223.75 42.5h2.5v2.5h-2.5zM233.75 42.5h2.5v2.5h-2.5zM226.25 45h2.5v2.5h-2.5zM228.75 45h2.5v2.5h-2.5zM231.25 45h2.5v2.5h-2.5zM238.75 30h2.5v2.5h-2.5zM241.25 30h2.5v2.5h-2.5zM243.75 30h2.5v2.5h-2.5zM246.25 30h2.5v2.5h-2.5zM238.75 32.5h2.5v2.5h-2.5zM248.75 32.5h2.5v2.5h-2.5zM238.75 35h2.5v2.5h-2.5zM248.75 35h2.5v2.5h-2.5zM238.75 37.5h2.5v2.5h-2.5zM241.25 37.5h2.5v2.5h-2.5zM243.75 37.5h2.5v2.5h-2.5zM246.25 37.5h2.5v2.5h-2.5zM238.75 40h2.5v2.5h-2.5zM238.75 42.5h2.5v2.5h-2.5zM238.75 45h2.5v2.5h-2.5zM253.75 30h2.5v2.5h-2.5zM256.25 30h2.5v2.5h-2.5zM258.75 30h2.5v2.5h-2.5zM261.25 30h2.5v2.5h-2.5zM263.75 30h2.5v2.5h-2.5zM253.75 32.5h2.5v2.5h-2.5zM253.75 35h2.5v2.5h-2.5zM253.75 37.5h2.5v2.5h-2.5zM256.25 37.5h2.5v2.5h-2.5zM258.75 37.5h2.5v2.5h-2.5zM261.25 37.5h2.5v2.5h-2.5zM253.75 40h2.5v2.5h-2.5zM253.75 42.5h2.5v2.5h-2.5zM253.75 45h2.5v2.5h-2.5zM256.25 45h2.5v2.5h-2.5zM258.75 45h2.5v2.5h-2.5zM261.25 45h2.5v2.5h-2.5zM263.75 45h2.5v2.5h-2.5zM268.75 30h2.5v2.5h-2.5zM278.75 30h2.5v2.5h-2.5zM268.75 32.5h2.5v2.5h-2.5zM271.25 32.5h2.5v2.5h-2.5zM278.75 32.5h2.5v2.5h-2.5zM268.75 35h2.5v2.5h-2.5zM271.25 35h2.5v2.5h-2.5zM278.75 35h2.5v2.5h-2.5zM268.75 37.5h2.5v2.5h-2.5zM273.75 37.5h2.5v2.5h-2.5zM278.75 37.5h2.5v2.5h-2.5zM268.75 40h2.5v2.5h-2.5zM276.25 40h2.5v2.5h-2.5zM278.75 40h2.5v2.5h-2.5zM268.75 42.5h2.5v2.5h-2.5zM276.25 42.5h2.5v2.5h-2.5zM278.75 42.5h2.5v2.5h-2.5zM268.75 45h2.5v2.5h-2.5zM278.75 45h2.5v2.5h-2.5zM283.75 30h2.5v2.5h-2.5zM286.25 30h2.5v2.5h-2.5zM288.75 30h2.5v2.5h-2.5zM291.25 30h2.5v2.5h-2.5zM283.75 32.5h2.5v2.5h-2.5zM293.75 32.5h2.5v2.5h-2.5zM283.75 35h2.5v2.5h-2.5zM293.75 35h2.5v2.5h-2.5zM283.75 37.5h2.5v2.5h-2.5zM286.25 37.5h2.5v2.5h-2.5zM288.75 37.5h2.5v2.5h-2.5zM291.25 37.5h2.5v2.5h-2.5zM283.75 40h2.5v2.5h-2.5zM288.75 40h2.5v2.5h-2.5zM283.75 42.5h2.5v2.5h-2.5zM291.25 42.5h2.5v2.5h-2.5zM283.75 45h2.5v2.5h-2.5zM293.75 45h2.5v2.5h-2.5zM301.25 30h2.5v2.5h-2.5zM303.75 30h2.5v2.5h-2.5zM306.25 30h2.5v2.5h-2.5zM298.75 32.5h2.5v2.5h-2.5zM308.75 32.5h2.5v2.5h-2.5zM298.75 35h2.5v2.5h-2.5zM308.75 35h2.5v2.5h-2.5zM298.75 37.5h2.5v2.5h-2.5zM308.75 37.5h2.5v2.5h-2.5zM298.75 40h2.5v2.5h-2.5zM308.75 40h2.5v2.5h-2.5zM298.75 42.5h2.5v2.5h-2.5zM308.75 42.5h2.5v2.5h-2.5zM301.25 45h2.5v2.5h-2.5zM303.75 45h2.5v2.5h-2.5zM306.25 45h2.5v2.5h-2.5zM313.75 30h2.5v2.5h-2.5zM316.25 30h2.5v2.5h-2.5zM318.75 30h2.5v2.5h-2.5zM321.25 30h2.5v2.5h-2.5zM313.75 32.5h2.5v2.5h-2.5zM323.75 32.5h2.5v2.5h-2.5zM313.75 35h2.5v2.5h-2.5zM323.75 35h2.5v2.5h-2.5zM313.75 37.5h2.5v2.5h-2.5zM323.75 37.5h2.5v2.5h-2.5zM313.75 40h2.5v2.5h-2.5zM323.75 40h2.5v2.5h-2.5zM313.75 42.5h2.5v2.5h-2.5zM323.75 42.5h2.5v2.5h-2.5zM313.75 45h2.5v2.5h-2.5zM316.25 45h2.5v2.5h-2.5zM318.75 45h2.5v2.5h-2.5zM321.25 45h2.5v2.5h-2.5zM346.25 30h2.5v2.5h-2.5zM348.75 30h2.5v2.5h-2.5zM351.25 30h2.5v2.5h-2.5zM353.75 30h2.5v2.5h-2.5zM343.75 32.5h2.5v2.5h-2.5zM343.75 35h2.5v2.5h-2.5zM343.75 37.5h2.5v2.5h-2.5zM343.75 40h2.5v2.5h-2.5zM343.75 42.5h2.5v2.5h-2.5zM346.25 45h2.5v2.5h-2.5zM348.75 45h2.5v2.5h-2.5zM351.25 45h2.5v2.5h-2.5zM353.75 45h2.5v2.5h-2.5zM358.75 30h2.5v2.5h-2.5zM358.75 32.5h2.5v2.5h-2.5zM358.75 35h2.5v2.5h-2.5zM358.75 37.5h2.5v2.5h-2.5zM358.75 40h2.5v2.5h-2.5zM358.75 42.5h2.5v2.5h-2.5zM358.75 45h2.5v2.5h-2.5zM361.25 45h2.5v2.5h-2.5zM363.75 45h2.5v2.5h-2.5zM366.25 45h2.5v2.5h-2.5zM368.75 45h2.5v2.5h-2.5zM376.25 30h2.5v2.5h-2.5zM378.75 30h2.5v2.5h-2.5zM381.25 30h2.5v2.5h-2.5zM373.75 32.5h2.5v2.5h-2.5zM383.75 32.5h2.5v2.5h-2.5zM373.75 35h2.5v2.5h-2.5zM383.75 35h2.5v2.5h-2.5zM373.75 37.5h2.5v2.5h-2.5zM383.75 37.5h2.5v2.5h-2.5zM373.75 40h2.5v2.5h-2.5zM383.75 40h2.5v2.5h-2.5zM373.75 42.5h2.5v2.5h-2.5zM383.75 42.5h2.5v2.5h-2.5zM376.25 45h2.5v2.5h-2.5zM378.75 45h2.5v2.5h-2.5zM381.25 45h2.5v2.5h-2.5zM388.75 30h2.5v2.5h-2.5zM398.75 30h2.5v2.5h-2.5zM388.75 32.5h2.5v2.5h-2.5zM398.75 32.5h2.5v2.5h-2.5zM388.75 35h2.5v2.5h-2.5zM398.75 35h2.5v2.5h-2.5zM388.75 37.5h2.5v2.5h-2.5zM398.75 37.5h2.5v2.5h-2.5zM388.75 40h2.5v2.5h-2.5zM398.75 40h2.5v2.5h-2.5zM388.75 42.5h2.5v2.5h-2.5zM398.75 42.5h2.5v2.5h-2.5zM391.25 45h2.5v2.5h-2.5zM393.75 45h2.5v2.5h-2.5zM396.25 45h2.5v2.5h-2.5zM403.75 30h2.5v2.5h-2.5zM406.25 30h2.5v2.5h-2.5zM408.75 30h2.5v2.5h-2.5zM411.25 30h2.5v2.5h-2.5zM403.75 32.5h2.5v2.5h-2.5zM413.75 32.5h2.5v2.5h-2.5zM403.75 35h2.5v2.5h-2.5zM413.75 35h2.5v2.5h-2.5zM403.75 37.5h2.5v2.5h-2.5zM413.75 37.5h2.5v2.5h-2.5zM403.75 40h2.5v2.5h-2.5zM413.75 40h2.5v2.5h-2.5zM403.75 42.5h2.5v2.5h-2.5zM413.75 42.5h2.5v2.5h-2.5zM403.75 45h2.5v2.5h-2.5zM406.25 45h2.5v2.5h-2.5zM408.75 45h2.5v2.5h-2.5zM411.25 45h2.5v2.5h-2.5z"})})]})}function _ee({children:e,user:t,logout:r}){const[a]=x.useState(()=>window.location.hash.startsWith("#local-connect=")?r7(window.location.hash)??!1:null),[i,c]=x.useState(""),u=x.useRef(null),f=a&&window.opener&&!window.opener.closed;return x.useEffect(()=>{if(!f)return;let m=!0;u.current??(u.current=c7(a));const h=setTimeout(()=>{m&&c("Could not reach local OpenRod. Close this window and try again.")},3e4);return u.current.then(({code:g})=>{m&&window.opener.postMessage({type:"openrod-local-connected",nonce:a.nonce,code:g},a.origin)}).catch(g=>{clearTimeout(h),m&&c(g.message)}),()=>{m=!1,clearTimeout(h)}},[a,f]),a===null?e:n.jsx("main",{className:"grid min-h-screen place-items-center px-6",children:n.jsxs("section",{className:"max-w-sm text-center",children:[f&&!i&&n.jsx(ZD,{}),n.jsx("h1",{className:"text-2xl font-semibold",children:i||!f?"Sign-in interrupted":"Finishing sign-in…"}),n.jsx("p",{className:"mt-3 text-sm text-muted-foreground",children:f&&!i?`Signed in as ${t.email}. This window closes automatically.`:"Start again from local OpenRod."}),i&&n.jsx("p",{role:"alert",className:"mt-4 text-sm text-destructive",children:i}),(i||!f)&&n.jsx("button",{className:"mt-5 block w-full text-xs underline",onClick:r,children:"Sign out"})]})})}function Lee({children:e}){var S,N;const t=js(),r=((S=t==null?void 0:t.status)==null?void 0:S.origin)||ku,{chooseGroups:a,dialog:i,cancel:c}=Xw(),u=x.useRef(new AbortController),f=x.useMemo(()=>lr("local",u.current.signal),[]),m=x.useRef(0);x.useEffect(()=>{const E=++m.current;return()=>queueMicrotask(()=>{m.current===E&&u.current.abort()})},[]);const h=x.useRef((N=/^#cloud-return=([a-f0-9-]{36})$/.exec(window.location.hash))==null?void 0:N[1]),[g,p]=x.useState(h.current&&window.opener?"waiting":"normal"),[b,v]=x.useState(""),w=x.useRef(!1),C=x.useRef(!1);return x.useEffect(()=>{if(g!=="waiting"||!(t!=null&&t.available)||!r)return;const E=async T=>{var R;if(!(w.current||T.origin!==r||T.source!==window.opener||((R=T.data)==null?void 0:R.type)!=="openrod-local-bundle"||T.data.nonce!==h.current)){w.current=!0,p("importing");try{if(typeof T.data.error=="string")throw Error(T.data.error);const A=(await f.inventory()).locations.find(_=>!_.remote&&_.connected);if(!A)throw Error("Connect a local gateway before importing this workspace.");const k=f.forContext(A.context),O=await a(k,"local OpenRod",u.current.signal);if(C.current)return;const D=await k.importCloud({...T.data.bundle,...O?{destinationGroups:O}:{}});if(window.opener.postMessage({type:"openrod-local-result",nonce:h.current,name:D.name},r),C.current)return;v(T.data.warning??"Workspace copied locally. Reconnect agent credentials to continue."),window.location.href=vg(D.name,"shell",{...A,target:"local"}),p("done")}catch(M){if(C.current||u.current.signal.aborted)return;v(M.message),p("error"),window.opener.postMessage({type:"openrod-local-result",nonce:h.current,error:M.message},r)}}};return window.addEventListener("message",E),window.opener.postMessage({type:"openrod-local-ready",nonce:h.current},r),()=>window.removeEventListener("message",E)},[g,r,t==null?void 0:t.available]),x.useEffect(()=>{if(!["waiting","importing"].includes(g))return;const E=Date.now()+35*6e4,T=setInterval(()=>{var R;((R=window.opener)!=null&&R.closed||Date.now()>E)&&(u.current.abort(),c(),v("The cloud tab closed or the copy timed out. Open the workspace to check whether a copy was created."),p("error"))},1e3);return()=>clearInterval(T)},[g]),g==="normal"||g==="done"?n.jsxs(n.Fragment,{children:[b&&n.jsx(Qa,{id:"local-return",tone:g==="done"?"success":"warning",title:g==="done"?"Workspace continued locally":"Workspace copy didn’t finish",onDismiss:()=>v(""),children:b}),e]}):n.jsxs(n.Fragment,{children:[i,n.jsx("main",{className:"grid min-h-screen place-items-center px-6",children:n.jsxs("section",{className:"max-w-md text-center",children:[n.jsx("h1",{className:"text-2xl font-semibold",children:"Continuing your workspace locally…"}),n.jsx("p",{className:"mt-3 text-sm text-muted-foreground",children:"Keep the cloud tab open while your files are copied and your template is rebuilt for this computer."}),b&&n.jsx("p",{role:"alert",className:"mt-4 text-sm text-destructive",children:b}),n.jsx("button",{className:"mt-6 text-sm underline",onClick:()=>{u.current.abort(),c(),C.current=!0,w.current=!0,window.location.hash="",p("normal")},children:"Open local workspace"})]})})]})}function $ee(e){try{if(!e.startsWith("#handoff="))return null;const t=JSON.parse(atob(e.slice(9).replaceAll("-","+").replaceAll("_","/"))),r=new URL(t.origin);return r.origin!==t.origin||r.protocol!=="http:"||!["localhost","127.0.0.1","[::1]"].includes(r.hostname)||!/^\d{1,5}$/.test(r.port)||!/^[a-f0-9-]{36}$/.test(t.nonce)?null:{origin:r.origin,nonce:t.nonce}}catch{return null}}async function hy(e,t="GET"){const r=await fetch(`/api/cloud/${e}`,{method:t,headers:t==="POST"?{"x-openshell-console":"1","content-type":"application/json"}:void 0,body:t==="POST"?"{}":void 0}),a=await r.json();if(!r.ok)throw Error(a.error??"Cloud machine unavailable");return a}function Bee({children:e,logout:t}){const[r,a]=x.useState(null),[i,c]=x.useState(""),[u,f]=x.useState(null),[m,h]=x.useState(!1),[g,p]=x.useReducer(S=>S+1,0);async function b(){h(!0),c("");try{a(await hy("machine","POST")),p()}catch(S){c(S.message)}finally{h(!1)}}const v=x.useRef($ee(window.location.hash)),w=x.useRef(!1);if(x.useEffect(()=>{let S=!0,N;async function E(){try{const T=await hy("machine");S&&(a(T),c(T.error??""),["ready","none","error"].includes(T.status)||(N=setTimeout(E,5e3)))}catch(T){S&&(c(T.message),N=setTimeout(E,1e4))}}return E(),()=>{S=!1,clearTimeout(N)}},[g]),x.useEffect(()=>{const S=v.current;if((r==null?void 0:r.status)!=="ready"||!S||!window.opener||w.current)return;w.current=!0,f({status:"waiting"});const N=R=>{var M;if(v.current&&!(R.source!==window.opener||R.origin!==S.origin||((M=R.data)==null?void 0:M.type)!=="openrod-cloud-result"||R.data.nonce!==S.nonce)){if(R.data.error){f({status:"error",message:R.data.error});return}f({status:"done",message:R.data.warning??"Workspace copied. Reconnect your agent credentials to continue."}),/^[a-z0-9-]{1,63}$/.test(R.data.name??"")&&(window.location.hash=`terminal/${R.data.name}?session=shell`)}};window.addEventListener("message",N),hy("handoff","POST").then(({ticket:R})=>window.opener.postMessage({type:"openrod-cloud-ready",nonce:S.nonce,ticket:R},S.origin)).catch(R=>f({status:"error",message:R.message}));const E=Date.now()+35*6e4,T=setInterval(()=>{var R;v.current&&((R=window.opener)!=null&&R.closed||Date.now()>E)&&(f({status:"error",message:"The source tab closed or the copy timed out. Open your workspace to check whether a copy was created."}),clearInterval(T))},1e3);return()=>{window.removeEventListener("message",N),clearInterval(T)}},[r==null?void 0:r.status]),(r==null?void 0:r.status)==="ready"&&(!u||u.status==="done"))return n.jsxs(n.Fragment,{children:[(u==null?void 0:u.message)&&n.jsx(Qa,{id:"cloud-transfer",tone:"success",title:"Workspace continued in the cloud",onDismiss:()=>f(null),children:u.message}),e]});const C=!u&&!i&&(m||r&&!["none","ready","error"].includes(r.status));return n.jsx("main",{className:"grid min-h-screen place-items-center px-6",children:n.jsxs("section",{className:"max-w-md text-center",children:[C&&n.jsx(ZD,{}),n.jsx("h1",{className:"text-2xl font-semibold",children:u?"Continuing your workspace…":!C&&(r==null?void 0:r.status)==="none"?"Start OpenRod Cloud":"Setting up your cloud machine…"}),n.jsx("p",{className:"mt-3 text-sm text-muted-foreground",children:u?"Keep your local OpenRod tab open.":C?"High demand may slow this down.":"The first start takes a few minutes."}),C&&n.jsxs("div",{role:"status",className:"mt-5 flex items-center justify-center gap-2 rounded-lg bg-muted/50 p-4 text-sm",children:[n.jsx(kt,{"aria-hidden":"true"}),n.jsx("span",{children:"Opens automatically when ready"})]}),(i||(u==null?void 0:u.message))&&n.jsx("p",{role:"alert",className:"mt-4 text-sm text-destructive",children:(u==null?void 0:u.message)??i}),!u&&((r==null?void 0:r.status)==="none"||i)&&n.jsxs(ie,{disabled:m,className:"mt-5",onClick:b,children:[m&&n.jsx(kt,{}),i?"Try again":"Start cloud machine"]}),u&&n.jsx("button",{onClick:()=>{v.current=null,f(null),window.location.hash=""},className:"mt-4 text-sm underline",children:"Open cloud workspace"}),n.jsx("button",{onClick:t,className:"mt-6 block w-full text-xs underline",children:"Sign out"})]})})}function Vee({localConnect:e=!1,error:t,busy:r,available:a,onLogin:i}){return n.jsx("main",{className:"grid min-h-svh grid-cols-1 place-items-center bg-background px-4 py-6 sm:px-6 sm:py-10",children:n.jsxs("section",{"aria-labelledby":"cloud-sign-in-title",className:"min-w-0 w-full max-w-sm rounded-xl border border-border bg-card px-5 py-7 text-center shadow-sm sm:px-8 sm:py-9",children:[n.jsx("img",{src:"/openrod.png",alt:"",width:"96",height:"96",className:"mx-auto mb-6 size-24 object-contain"}),n.jsx("h1",{id:"cloud-sign-in-title",className:"text-2xl font-semibold tracking-tight",children:"OpenRod Cloud"}),e&&n.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Sign in to connect this computer."}),n.jsx("button",{type:"button",disabled:!a||r,"aria-busy":r||void 0,onClick:i,className:"mt-7 inline-flex h-10 w-full items-center justify-center rounded-md bg-primary px-4 text-sm font-medium text-primary-foreground outline-none transition-colors hover:bg-primary/90 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",children:r?"Signing in…":"Continue with Google"}),t&&n.jsx("p",{role:"alert",className:"mt-4 text-xs leading-relaxed text-destructive",children:t})]})})}const Uee={"auth/network-request-failed":"Couldn’t reach Google. Check your connection and try again.","auth/popup-closed-by-user":"Sign-in cancelled.","auth/cancelled-popup-request":"Sign-in cancelled.","auth/popup-blocked":"Allow popups, then try again.","auth/unauthorized-domain":"Sign-in isn’t configured for this address. Contact your administrator.","auth/user-disabled":"This account is disabled. Contact your administrator.","auth/too-many-requests":"Too many attempts. Try again shortly."};function Hee(e){return Uee[e==null?void 0:e.code]||"Couldn’t sign in. Try again."}const AR=()=>Promise.all([gy(()=>import("./index.esm-Cj6nXjOx.js"),__vite__mapDeps([0,1])),gy(()=>import("./index.esm-Z1y-oluO.js"),__vite__mapDeps([2,1]))]);async function my(e,t){const r=await fetch(`/api/auth/${e}`,{method:t===void 0?"GET":"POST",headers:t===void 0?void 0:{"content-type":"application/json","x-openshell-console":"1"},body:t===void 0?void 0:JSON.stringify(t)}),a=await r.json();if(a.code===$i&&window.dispatchEvent(new Event($i)),!r.ok)throw Object.assign(new Error(a.error??"Sign-in unavailable"),{code:a.code});return a}function Fee(){var t;const e=js();return e!=null&&e.localViewer?null:n.jsxs("div",{className:"ml-auto flex items-center gap-3 text-xs",children:[n.jsx("span",{className:"max-w-40 truncate text-muted-foreground",children:(t=e==null?void 0:e.user)==null?void 0:t.email}),n.jsx("button",{className:"underline underline-offset-4",onClick:e==null?void 0:e.logout,children:"Sign out"})]})}function Gee({children:e}){const[t,r]=x.useState(null),[a,i]=x.useState(null),[c,u]=x.useState(!0),[f,m]=x.useState(""),[h,g]=x.useState(!1),[p,b]=x.useState(!1);x.useEffect(()=>{let C=!0;async function S(){try{const T=await my("config");if(!["local","cloud"].includes(T.mode))throw Error("Invalid console configuration");if(!C)return;if(ln.configure({mode:T.mode,enabled:T.telemetryEnabled===!0}),r(T),T.mode==="cloud"){const R=await fetch("/api/auth/me");if(R.ok){const M=await R.json();C&&i(M.user)}else if(R.status!==401){const M=await R.json();throw Error(M.error??"Authentication unavailable")}}}catch(T){C&&m(T.message)}finally{C&&u(!1)}}S();const N=()=>{i(null),m("Your session expired. Sign in again.")},E=()=>{ln.stop(),g(!0)};return window.addEventListener("openrod-session-expired",N),window.addEventListener($i,E),()=>{C=!1,window.removeEventListener("openrod-session-expired",N),window.removeEventListener($i,E)}},[]),x.useEffect(()=>{t!=null&&t.firebase&&!a&&AR().catch(()=>{})},[t==null?void 0:t.firebase,a]);async function v(){if(p||!(t!=null&&t.firebase))return;b(!0),m("");let C,S;try{const[{initializeApp:N,getApps:E},T]=await AR();S=T;const R=E().find(O=>O.name==="openrod-cloud")??N(t.firebase,"openrod-cloud");C=S.getAuth(R),await S.setPersistence(C,S.inMemoryPersistence);const M=new S.GoogleAuthProvider;M.setCustomParameters({prompt:"select_account"});const A=await S.signInWithPopup(C,M),k=await my("session",{idToken:await A.user.getIdToken(!0)});i(k.user)}catch(N){m(Hee(N))}finally{C&&await S.signOut(C).catch(()=>{}),b(!1)}}async function w(){try{await my("logout",{})}catch(C){m(C.message)}finally{i(null)}}return h?n.jsx("main",{className:"grid min-h-screen place-items-center bg-background px-6",children:n.jsxs("section",{className:"w-full max-w-md rounded-xl border border-border bg-card p-8 text-center shadow-sm",children:[n.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:"Open the console link"}),n.jsxs("p",{className:"mt-3 text-sm text-muted-foreground",children:["Open the link printed by ",n.jsx("code",{className:"rounded bg-muted px-1 py-0.5 font-mono text-foreground",children:"openrod"})," in your terminal. It carries a secret that changes every time the console starts, so open the new link after a restart."]})]})}):c?n.jsx("div",{className:"grid min-h-screen place-items-center text-sm text-muted-foreground",children:"Loading OpenRod…"}):(t==null?void 0:t.mode)==="local"?n.jsx(m7,{children:n.jsx(Lee,{children:n.jsx(dZ,{children:e})})}):a?n.jsx(_ee,{user:a,logout:w,children:n.jsx(f7,{user:a,logout:w,children:n.jsx(Bee,{logout:w,children:e},a.uid)})}):n.jsx(Vee,{localConnect:window.location.hash.startsWith("#local-connect="),error:f,busy:p,available:!!(t!=null&&t.firebase),onLogin:v})}const MR=e=>e?JSON.stringify([e.target??"local",e.context]):null;function qee(e,t,r="local"){return e.find(a=>a.target===r&&!a.remote&&a.connected)??e.find(a=>a.target===r&&a.connected)??null}const $x=[{id:"groups",label:"Groups",description:"Definitions and policy relationships"},{id:"network",label:"Network",description:"Egress rules with destination targets"},{id:"setups",label:"MCPs & Skills",description:"Saved setups and skill files"},{id:"templates",label:"Templates",description:"Portable image recipes"},{id:"activity",label:"Activity history",description:"Historical events, in batches of up to 500",optional:!0}],Yee=$x.filter(e=>!e.optional).map(e=>e.id),Ul=e=>["running","cancelling"].includes(e==null?void 0:e.status),Kee=e=>e&&!["planned","running","cancelling"].includes(e.status);function Xee(e,t){var c;const r=new Map(e.map(u=>[u.key,u])),a=new Set;function i(u){if(a.has(u))return;const f=r.get(u);if(!f)throw new Error(`Missing import dependency: ${u}`);a.add(u);for(const m of f.dependencies??[])i(m)}t.forEach(i);for(let u=-1;u!==a.size;){u=a.size;for(const f of e)(c=f.requiredForGroups)!=null&&c.some(m=>a.has(`groups:${m}`))&&i(f.key)}return[...a]}const Ts=e=>(e==null?void 0:e.id)??JSON.stringify([e==null?void 0:e.target,e==null?void 0:e.context]);function OR({from:e="",to:t="",offset:r=0,snapshot:a}={}){const i={offset:r};for(const[c,u]of Object.entries({from:e,to:t})){if(!u)continue;const f=new Date(u);if(!Number.isFinite(f.getTime()))throw new Error("Choose a valid activity date range.");i[c]=f.toISOString()}if(i.from&&i.to&&i.from>i.to)throw new Error("Activity start must be before its end.");return a!=null&&(i.snapshot=a),i}function DR(e){var r;if(!((r=e==null?void 0:e.items)!=null&&r.length))return 0;const t=e.items.filter(a=>["created","completed","reused","skipped","blocked","failed","cancelled"].includes(a.status)).length;return Math.round(t/e.items.length*100)}function Wee(e){const t=[...$x,{id:"policyTemplates",label:"Base policies"}].map(a=>({...a,items:e.filter(i=>i.type===a.id)})),r=e.filter(a=>!t.some(i=>i.id===a.type));return r.length&&t.push({id:"other",label:"Other resources",items:r}),t.filter(a=>a.items.length).map(a=>{if(a.id!=="setups")return a;const i=u=>{var f;return new Set((((f=u.data)==null?void 0:f.items)??[]).map(m=>m.kind))},c=u=>{const f=i(u);return f.has("mcp")&&f.has("skill")?"mixed":f.has("mcp")?"mcps":f.has("skill")?"skills":"saved"};return{...a,groups:[{id:"mcps",label:"MCPs"},{id:"skills",label:"Skills"},{id:"mixed",label:"MCPs & Skills together"},{id:"saved",label:"Saved setups"}].map(u=>({...u,items:a.items.filter(f=>c(f)===u.id)})).filter(u=>u.items.length)}})}const Yd={...Object.fromEntries($x.map(e=>[e.id,e.label])),policyTemplates:"Base policy"},py=e=>({created:"Imported",completed:"Imported",reused:"Reused",failed:"Failed",blocked:"Dependency failed",pending:"Waiting",running:"Importing",cancelled:"Cancelled",skipped:"Skipped",planned:"Ready to import",partial:"Needs attention",interrupted:"Interrupted"})[e]??e;function Qee({request:e,onClose:t}){var ve,Ce,Ie,de,Te,oe,fe,Re,Oe,ke;const r=js(),a=Bf(),i=vo(),[c,u]=x.useState(""),[f,m]=x.useState(()=>e!=null&&e.destination?Ts(e.destination):r!=null&&r.localViewer?"cloud":""),[h,g]=x.useState((e==null?void 0:e.destination)??null),[p,b]=x.useState(()=>e!=null&&e.type&&Yd[e.type]?[e.type]:Yee),[v,w]=x.useState({from:"",to:""}),[C,S]=x.useState(null),[N,E]=x.useState({}),[T,R]=x.useState(null),[M,A]=x.useState([]),[k,O]=x.useState(null),[D,_]=x.useState([]),[H,G]=x.useState(""),[B,P]=x.useState(""),[V,Y]=x.useState(null),W=i.locations.filter(he=>he.connected),q=h&&(i.locations.find(he=>Ts(he)===Ts(h))??h),ee=q!=null&&q.connected&&!W.some(he=>Ts(he)===Ts(h))?[...W,q]:W,z=ee.find(he=>Ts(he)===c),L=ee.find(he=>Ts(he)===f),X=x.useRef(new AbortController),te=x.useRef(0);x.useEffect(()=>{const he=++te.current;return()=>queueMicrotask(()=>{te.current===he&&X.current.abort()})},[]);const $=x.useRef(((ve=r==null?void 0:r.status)==null?void 0:ve.owner)??null);!$.current&&((Ce=r==null?void 0:r.status)!=null&&Ce.owner)&&($.current=r.status.owner);const U=x.useMemo(()=>a.signal?AbortSignal.any([a.signal,X.current.signal]):X.current.signal,[a.signal]),F=x.useCallback(he=>lr(r!=null&&r.localViewer?he.target:a.target,U,he.context,$.current),[r==null?void 0:r.localViewer,a.target,U]);x.useEffect(()=>{!c&&W.length&&u(Ts(W.find(he=>!he.cloud&&!he.remote)??W[0]))},[c,W.map(Ts).join("|")]),x.useEffect(()=>{if(f!=="cloud")return;const he=ee.find(Ae=>(Ae.cloud||Ae.target==="cloud")&&Ae.connected);he&&m(Ts(he))},[f,ee.map(he=>`${Ts(he)}:${he.connected}`).join("|")]),x.useEffect(()=>{if(_([]),!(L!=null&&L.connected))return;const he=F(L);let Ae=!0;return he.importJobs().then(ge=>{Ae&&_(ge.jobs??[])}).catch(()=>{Ae&&_([])}),()=>{Ae=!1}},[f,L==null?void 0:L.context,L==null?void 0:L.connected,F,k==null?void 0:k.id,k==null?void 0:k.status]),x.useEffect(()=>{if(!k||!Ul(k)||!V)return;let he=!0,Ae;const ge=async()=>{try{const Pe=await V.importJob(k.id);if(!he)return;O(Pe),Ul(Pe)?Ae=setTimeout(ge,1e3):(i.refresh(),window.dispatchEvent(new Event("openrod-resources-changed")))}catch(Pe){he&&(P(Pe.message),Ae=setTimeout(ge,3e3))}};return ge(),()=>{he=!1,clearTimeout(Ae)}},[k==null?void 0:k.id,k==null?void 0:k.status,V]);async function K(he,Ae){G(he),P("");try{await Ae()}catch(ge){ge.name!=="AbortError"&&P(ge.message)}finally{U.aborted||G("")}}async function se(){var Fe;if(L!=null&&L.connected)return L;if(f!=="cloud")throw Error("Choose a connected destination.");if(!(r!=null&&r.localViewer))throw Error("Choose the cloud workspace from the list.");U.throwIfAborted(),G(r.connected?"Preparing cloud workspace…":"Connecting to OpenRod Cloud…");const he=await r.prepare({signal:U,onProgress:()=>{U.aborted||G("Preparing cloud workspace…")}});if($.current&&$.current!==he.owner)throw Error("Your cloud account changed. Start a new import.");$.current=he.owner,U.throwIfAborted();const ge=(Fe=(await Ha("inventory",void 0,{signal:U,owner:he.owner})).locations)==null?void 0:Fe.find(_e=>_e.connected);if(!ge)throw Error("The cloud gateway is still preparing. Try again shortly.");const Pe={...ge,cloud:!0,target:"cloud",label:"OpenRod Cloud",id:JSON.stringify(["cloud",ge.context])};return g(Pe),m(Pe.id),i.refresh(),Pe}async function ne(he=v){if(!z)throw Error("Choose a connected source.");const Ae=F(z),ge=p.includes("activity")?OR(he):void 0,Pe=await se();if(U.throwIfAborted(),G("Reading configuration…"),Ts(z)===Ts(Pe))throw Error("Choose a different destination.");const Fe=F(Pe),_e=await Fe.importCapabilities(),Xe=p.filter(ct=>{var At,rt;return!((rt=(At=_e.types)==null?void 0:At[ct])!=null&&rt.supported)});if(Xe.length)throw Error(`This destination cannot import ${Xe.map(ct=>Yd[ct]).join(", ")}.`);const Je=await Ae.exportResources({types:p,...ge?{activity:ge}:{}});S(_e),E({}),Y(Fe),R(Je),A(Je.resources.filter(ct=>p.includes(ct.type)).map(ct=>ct.key))}const ye=x.useMemo(()=>{try{const he=T?Xee(T.resources,M):[],Ae=[...new Set((T==null?void 0:T.resources.filter(ge=>{var Pe,Fe;return he.includes(ge.key)&&C&&!((Fe=(Pe=C.types)==null?void 0:Pe[ge.type])!=null&&Fe.supported)}).map(ge=>ge.type))??[])];return{included:he,error:Ae.length?`Required dependencies cannot be imported here: ${Ae.map(ge=>Yd[ge]??ge).join(", ")}.`:""}}catch(he){return{included:M,error:`${he.message}. Deselect the resource that requires it, or fix the source and read it again.`}}},[T,M,C]);async function ae(he,Ae){const ge={...N};Ae==="reuse"?ge[he.key]={action:Ae,targetId:he.sourceId}:delete ge[he.key];const Pe=await V.planImport({bundle:T,selection:M,conflicts:ge});E(ge),O(Pe)}const le=ye.included,re=k?"result":T?"select":"source",Q=!!H||Ul(k);function Z(){R(null),O(null),A([]),E({}),w(he=>({from:he.from,to:he.to})),P("")}const pe=he=>{var Ae;return n.jsxs("label",{className:"flex items-start gap-3 p-3",children:[n.jsx($o,{"aria-label":`Import ${he.name}`,checked:le.includes(he.key),disabled:Q||!M.includes(he.key)&&le.includes(he.key),onCheckedChange:ge=>A(Pe=>ge?[...Pe,he.key]:Pe.filter(Fe=>Fe!==he.key))}),n.jsxs("span",{className:"min-w-0 flex-1",children:[n.jsx("span",{className:"block truncate text-xs font-medium",children:he.name}),n.jsx("span",{className:"text-[11px] text-muted-foreground",children:le.includes(he.key)&&!M.includes(he.key)?"Required dependency":""}),he.type==="setups"&&["mcp","skill"].map(ge=>{var Fe;const Pe=(((Fe=he.data)==null?void 0:Fe.items)??[]).filter(_e=>_e.kind===ge);return Pe.length>0&&n.jsxs("span",{className:"mt-1 block text-[11px] leading-relaxed text-muted-foreground",children:[n.jsxs("span",{className:"font-medium",children:[ge==="mcp"?"MCPs":"Skills",":"]})," ",Pe.map(_e=>_e.name).join(", ")]},ge)}),(Ae=he.warnings)==null?void 0:Ae.map((ge,Pe)=>n.jsx("span",{className:"mt-1 block text-[11px] text-amber-700 dark:text-amber-400",children:ge},Pe))]})]},he.key)},ue=k?`${((Ie=k.counts)==null?void 0:Ie.completed)??0} of ${k.items.length} resources complete. Your source stays available.`:T?"Choose what to copy. Required dependencies are included in the review.":"Copy saved configuration between your computer, connected hosts, and OpenRod Cloud.";return n.jsx(en,{open:!0,onOpenChange:he=>{!he&&!H&&t()},children:n.jsxs(tn,{className:"gap-4 sm:max-w-xl",children:[n.jsxs(nn,{className:"pr-6",children:[n.jsx(Qt,{children:k?py(k.status):"Import data"}),n.jsx(Sn,{className:"text-xs leading-relaxed",children:ue})]}),n.jsx("div",{className:"flex items-center gap-2 text-[11px] text-muted-foreground","aria-label":"Import steps",children:["Locations","Selection","Review & import"].map((he,Ae)=>n.jsxs(x.Fragment,{children:[Ae>0&&n.jsx(mu,{className:"size-3"}),n.jsx("span",{className:Ae===(re==="source"?0:re==="select"?1:2)?"font-medium text-foreground":"",children:he})]},he))}),n.jsxs("div",{className:"max-h-[60svh] overflow-y-auto pr-1",children:[re==="source"&&n.jsxs(ho,{duration:.15,offset:3,className:"space-y-5",children:[n.jsxs("div",{className:"grid grid-cols-[1fr_auto_1fr] items-end gap-3",children:[n.jsxs("label",{className:"grid gap-2 text-xs font-medium",children:["From",n.jsxs(pn,{"aria-label":"Import source",value:c,onChange:he=>{u(he.target.value),w(Ae=>({from:Ae.from,to:Ae.to}))},disabled:Q,className:"w-full text-xs",children:[n.jsx("option",{value:"",children:"Choose source"}),W.map(he=>n.jsx("option",{value:Ts(he),children:Dn(he)},Ts(he)))]})]}),n.jsx(mu,{className:"mb-2 size-4 text-muted-foreground"}),n.jsxs("label",{className:"grid gap-2 text-xs font-medium",children:["To",n.jsxs(pn,{"aria-label":"Import destination",value:f,onChange:he=>{m(he.target.value),_([])},disabled:Q,className:"w-full text-xs",children:[n.jsx("option",{value:"",children:"Choose destination"}),(r==null?void 0:r.localViewer)&&(f==="cloud"||!ee.some(he=>he.cloud||he.target==="cloud"))&&n.jsxs("option",{value:"cloud",disabled:!(r!=null&&r.available),children:["OpenRod Cloud",r!=null&&r.available?"":" · Coming soon"]}),ee.map(he=>n.jsx("option",{value:Ts(he),disabled:Ts(he)===c,children:Dn(he)},Ts(he)))]})]})]}),n.jsxs("fieldset",{className:"space-y-1",children:[n.jsx("legend",{className:"mb-2 text-xs font-medium",children:"Include"}),$x.map(he=>n.jsxs("label",{className:"flex cursor-pointer items-center gap-3 rounded-md p-2 hover:bg-muted/50",children:[n.jsx($o,{checked:p.includes(he.id),disabled:Q,onCheckedChange:Ae=>b(ge=>Ae?[...ge,he.id]:ge.filter(Pe=>Pe!==he.id))}),n.jsxs("span",{children:[n.jsx("span",{className:"block text-xs font-medium",children:he.label}),n.jsx("span",{className:"text-[11px] text-muted-foreground",children:he.description})]})]},he.id))]}),p.includes("activity")&&n.jsxs("div",{className:"grid gap-2 rounded-lg border bg-muted/20 p-3",children:[n.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Up to 500 events per reviewed batch. Leave dates empty for the latest history. Dates use your current timezone."}),n.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[n.jsxs("label",{className:"grid gap-1.5 text-[11px]",children:["From",n.jsx(Ot,{type:"datetime-local",value:v.from,disabled:Q,onChange:he=>w(Ae=>({from:he.target.value,to:Ae.to})),className:"text-xs"})]}),n.jsxs("label",{className:"grid gap-1.5 text-[11px]",children:["To",n.jsx(Ot,{type:"datetime-local",value:v.to,disabled:Q,onChange:he=>w(Ae=>({from:Ae.from,to:he.target.value})),className:"text-xs"})]})]})]}),n.jsx("p",{className:"rounded-md border border-border bg-muted/20 p-3 text-[11px] leading-relaxed text-muted-foreground",children:"Credentials must be connected at the destination. Sandbox workspace copying is available from each sandbox. Activity history is copied only when selected; raw payloads and credential values are excluded."}),D.length>0&&n.jsxs("div",{className:"space-y-1 border-t pt-3",children:[n.jsx("p",{className:"mb-2 text-xs font-medium",children:"Recent imports at this destination"}),D.slice(0,5).map(he=>{var Ae,ge,Pe;return n.jsxs("button",{className:"flex w-full items-center justify-between rounded-md p-2 text-left text-xs hover:bg-muted",disabled:Q,onClick:()=>{Y(F(L)),O(he)},children:[n.jsxs("span",{children:[((Ae=he.source)==null?void 0:Ae.label)||"Configuration import"," ",n.jsxs("span",{className:"text-muted-foreground",children:["· ",((ge=he.items)==null?void 0:ge.length)??((Pe=he.counts)==null?void 0:Pe.total)??0," resources"]})]}),n.jsx("span",{className:"text-[11px] text-muted-foreground",children:py(he.status)})]},he.id)})]})]}),re==="select"&&n.jsxs("div",{className:"space-y-3",children:[n.jsxs("p",{className:"flex items-center gap-2 text-xs",children:[n.jsx("span",{children:Dn(z)}),n.jsx(mu,{className:"size-3 text-muted-foreground"}),n.jsx("span",{children:Dn(L)})]}),!T.resources.length&&n.jsx("p",{className:"py-8 text-center text-xs text-muted-foreground",children:"No saved resources were found for these categories. For MCPs and skills, use Bring my setup on the source first."}),n.jsxs("div",{className:"flex items-center justify-between text-[11px] text-muted-foreground",children:[n.jsxs("span",{children:[le.length," selected",le.length>M.length?` · ${le.length-M.length} required dependencies`:""]}),n.jsx(ie,{variant:"ghost",size:"sm",disabled:Q,onClick:()=>A(M.length?[]:T.resources.filter(he=>p.includes(he.type)).map(he=>he.key)),children:M.length?"Clear selection":"Select all"})]}),n.jsx("div",{className:"space-y-5",children:Wee(T.resources).map(he=>n.jsxs("section",{"aria-labelledby":`import-section-${he.id}`,className:"space-y-2",children:[n.jsxs("h3",{id:`import-section-${he.id}`,className:"flex items-center justify-between text-xs font-semibold",children:[n.jsx("span",{children:he.label}),n.jsxs("span",{className:"text-[11px] font-normal tabular-nums text-muted-foreground",children:[he.items.filter(Ae=>le.includes(Ae.key)).length," / ",he.items.length]})]}),he.groups?n.jsx("div",{className:"space-y-3",children:he.groups.map(Ae=>n.jsxs("section",{"aria-labelledby":`import-subsection-${Ae.id}`,className:"space-y-1.5",children:[n.jsx("h4",{id:`import-subsection-${Ae.id}`,className:"text-[11px] font-medium text-muted-foreground",children:Ae.label}),n.jsx("div",{className:"divide-y rounded-lg border",children:Ae.items.map(pe)})]},Ae.id))}):n.jsx("div",{className:"divide-y rounded-lg border",children:he.items.map(pe)})]},he.id))}),ye.error&&n.jsx("p",{role:"alert",className:"text-xs text-destructive",children:ye.error}),((de=T.pages)==null?void 0:de.activity)&&n.jsxs("p",{className:"text-[11px] text-muted-foreground",children:[T.pages.activity.exported," of ",T.pages.activity.total," matching activity events in this batch.",T.pages.activity.nextOffset!=null?" After importing, load the next batch to continue with older history.":""]}),((Te=T.excluded)==null?void 0:Te.length)>0&&n.jsxs("details",{className:"text-[11px] text-muted-foreground",children:[n.jsxs("summary",{className:"cursor-pointer",children:[T.excluded.length," excluded or needing attention"]}),n.jsx("ul",{className:"mt-2 space-y-1",children:T.excluded.map((he,Ae)=>n.jsxs("li",{children:[he.name??Yd[he.type]??he.type,": ",he.reason]},Ae))})]})]}),k&&n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"flex items-center justify-between text-xs",children:[n.jsxs("span",{children:[((oe=k.source)==null?void 0:oe.label)||"Source"," → ",L?Dn(L):"Destination"]}),n.jsxs("span",{className:"text-muted-foreground",children:[k.items.length," resources"]})]}),k.status!=="planned"&&n.jsx("div",{role:"progressbar","aria-label":"Import progress","aria-valuenow":DR(k),"aria-valuemin":0,"aria-valuemax":100,className:"h-1 overflow-hidden rounded-full bg-muted",children:n.jsx("div",{className:"h-full bg-primary transition-[width] motion-reduce:transition-none",style:{width:`${DR(k)}%`}})}),n.jsx("div",{className:"divide-y rounded-lg border",children:k.items.map(he=>{var Ae;return n.jsxs("div",{className:"flex items-start gap-3 p-3",children:[he.status==="running"?n.jsx(kt,{className:"mt-0.5 size-3.5"}):["created","completed","reused"].includes(he.status)?n.jsx(Yn,{className:"mt-0.5 size-3.5 text-emerald-600"}):he.status==="failed"?n.jsx(In,{className:"mt-0.5 size-3.5 text-destructive"}):n.jsx(gf,{className:"mt-0.5 size-3.5 text-muted-foreground"}),n.jsxs("span",{className:"min-w-0 flex-1",children:[n.jsx("span",{className:"block truncate text-xs font-medium",children:he.name}),n.jsxs("span",{className:"block text-[11px] text-muted-foreground",children:[Yd[he.type]," · ",k.status==="planned"?he.action==="reuse"?"Use existing":"Create a copy":py(he.status)]}),(Ae=he.warnings)==null?void 0:Ae.map((ge,Pe)=>n.jsx("span",{className:"mt-1 block text-[11px] text-amber-700 dark:text-amber-400",children:ge},Pe)),he.error&&n.jsx("span",{className:"mt-1 block text-[11px] text-destructive",children:typeof he.error=="string"?he.error:he.error.message}),k.status==="planned"&&T&&he.type!=="activity"&&n.jsxs(pn,{"aria-label":`Import action for ${he.name}`,value:he.action,disabled:Q,onChange:ge=>K("Updating review…",()=>ae(he,ge.target.value)),className:"mt-2 h-7 w-fit min-w-40 text-[11px]",children:[n.jsx("option",{value:"create",children:"Create a copy"}),n.jsx("option",{value:"reuse",children:"Use identical existing"})]})]})]},he.key)})}),k.status==="planned"&&T&&n.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Existing resources can be reused only when their ID and configuration match. Copies receive a new ID when needed."}),(fe=k.warnings)==null?void 0:fe.map((he,Ae)=>n.jsx("p",{className:"text-[11px] text-muted-foreground",children:he},Ae)),Ul(k)&&n.jsx("p",{className:"text-[11px] text-muted-foreground",children:"You can close this dialog. Reopen Import data at this destination to check progress."})]})]}),B&&n.jsx("p",{role:"alert",className:"text-xs text-destructive",children:B}),n.jsxs(Hr,{children:[H&&!Ul(k)&&n.jsx(ie,{size:"sm",variant:"ghost",onClick:()=>{X.current.abort(),t()},children:"Cancel"}),re!=="source"&&!Ul(k)&&n.jsx(ie,{size:"sm",variant:"ghost",disabled:!!H,onClick:Z,children:"Start another import"}),re==="source"&&n.jsxs(ie,{size:"sm",disabled:Q||!z||!f||!p.length||c===f||f==="cloud"&&!(r!=null&&r.available),onClick:()=>K("Reading configuration…",()=>ne()),children:[H?n.jsx(kt,{}):n.jsx(gf,{}),H||"Choose resources"]}),re==="select"&&n.jsxs(ie,{size:"sm",disabled:Q||!M.length||!!ye.error,onClick:()=>K("Preparing review…",async()=>O(await V.planImport({bundle:T,selection:M,conflicts:N}))),children:[H&&n.jsx(kt,{}),H||`Review ${le.length} resources`]}),(k==null?void 0:k.status)==="planned"&&n.jsxs(ie,{size:"sm",disabled:Q,onClick:()=>K("Starting import…",async()=>O(await V.executeImport(k.id))),children:[H&&n.jsx(kt,{}),H||"Import selected data"]}),Ul(k)&&n.jsx(ie,{size:"sm",variant:"outline",disabled:!!H||k.cancelRequested||k.status==="cancelling",onClick:()=>K("Cancelling…",async()=>O(await V.cancelImport(k.id))),children:k.cancelRequested?"Cancelling…":"Cancel import"}),Kee(k)&&(((Re=k.counts)==null?void 0:Re.failed)>0||k.items.some(he=>["failed","blocked","cancelled","pending"].includes(he.status)))&&n.jsxs(ie,{size:"sm",disabled:!!H,onClick:()=>K("Retrying…",async()=>O(await V.retryImport(k.id))),children:[n.jsx(PA,{}),"Retry unfinished"]}),(k==null?void 0:k.status)==="completed"&&k.items.some(he=>he.type==="activity")&&((ke=(Oe=T==null?void 0:T.pages)==null?void 0:Oe.activity)==null?void 0:ke.nextOffset)!=null&&n.jsx(ie,{size:"sm",variant:"outline",disabled:!!H||!z,onClick:()=>K("Reading older history…",async()=>{const he={...v,offset:T.pages.activity.nextOffset,snapshot:T.pages.activity.snapshot};w(he),b(["activity"]);const ge=await F(z).exportResources({types:["activity"],activity:OR(he)});R(ge),A(ge.resources.map(Pe=>Pe.key)),E({}),O(null)}),children:"Next history batch"}),k&&k.status!=="planned"&&n.jsx(ie,{size:"sm",variant:"outline",onClick:t,children:"Close"})]})]})})}var Jw={};(function e(t,r,a,i){var c=!!(t.Worker&&t.Blob&&t.Promise&&t.OffscreenCanvas&&t.OffscreenCanvasRenderingContext2D&&t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype.transferControlToOffscreen&&t.URL&&t.URL.createObjectURL),u=typeof Path2D=="function"&&typeof DOMMatrix=="function",f=(function(){if(!t.OffscreenCanvas)return!1;try{var z=new OffscreenCanvas(1,1),L=z.getContext("2d");L.fillRect(0,0,1,1);var X=z.transferToImageBitmap();L.createPattern(X,"no-repeat")}catch{return!1}return!0})();function m(){}function h(z){var L=r.exports.Promise,X=L!==void 0?L:t.Promise;return typeof X=="function"?new X(z):(z(m,m),null)}var g=(function(z,L){return{transform:function(X){if(z)return X;if(L.has(X))return L.get(X);var te=new OffscreenCanvas(X.width,X.height),$=te.getContext("2d");return $.drawImage(X,0,0),L.set(X,te),te},clear:function(){L.clear()}}})(f,new Map),p=(function(){var z=Math.floor(16.666666666666668),L,X,te={},$=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(L=function(U){var F=Math.random();return te[F]=requestAnimationFrame(function K(se){$===se||$+z-1<se?($=se,delete te[F],U()):te[F]=requestAnimationFrame(K)}),F},X=function(U){te[U]&&cancelAnimationFrame(te[U])}):(L=function(U){return setTimeout(U,z)},X=function(U){return clearTimeout(U)}),{frame:L,cancel:X}})(),b=(function(){var z,L,X={};function te($){function U(F,K){$.postMessage({options:F||{},callback:K})}$.init=function(K){var se=K.transferControlToOffscreen();$.postMessage({canvas:se},[se])},$.fire=function(K,se,ne){if(L)return U(K,null),L;var ye=Math.random().toString(36).slice(2);return L=h(function(ae){function le(re){re.data.callback===ye&&(delete X[ye],$.removeEventListener("message",le),L=null,g.clear(),ne(),ae())}$.addEventListener("message",le),U(K,ye),X[ye]=le.bind(null,{data:{callback:ye}})}),L},$.reset=function(){$.postMessage({reset:!0});for(var K in X)X[K](),delete X[K]}}return function(){if(z)return z;if(!a&&c){var $=["var CONFETTI, SIZE = {}, module = {};","("+e.toString()+")(this, module, true, SIZE);","onmessage = function(msg) {"," if (msg.data.options) {"," CONFETTI(msg.data.options).then(function () {"," if (msg.data.callback) {"," postMessage({ callback: msg.data.callback });"," }"," });"," } else if (msg.data.reset) {"," CONFETTI && CONFETTI.reset();"," } else if (msg.data.resize) {"," SIZE.width = msg.data.resize.width;"," SIZE.height = msg.data.resize.height;"," } else if (msg.data.canvas) {"," SIZE.width = msg.data.canvas.width;"," SIZE.height = msg.data.canvas.height;"," CONFETTI = module.exports.create(msg.data.canvas);"," }","}"].join(`
553
- `);try{z=new Worker(URL.createObjectURL(new Blob([$])))}catch(U){return typeof console<"u"&&typeof console.warn=="function"&&console.warn("🎊 Could not load worker",U),null}te(z)}return z}})(),v={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,x:.5,y:.5,shapes:["square","circle"],zIndex:100,colors:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],disableForReducedMotion:!1,scalar:1};function w(z,L){return L?L(z):z}function C(z){return z!=null}function S(z,L,X){return w(z&&C(z[L])?z[L]:v[L],X)}function N(z){return z<0?0:Math.floor(z)}function E(z,L){return Math.floor(Math.random()*(L-z))+z}function T(z){return parseInt(z,16)}function R(z){return z.map(M)}function M(z){var L=String(z).replace(/[^0-9a-f]/gi,"");return L.length<6&&(L=L[0]+L[0]+L[1]+L[1]+L[2]+L[2]),{r:T(L.substring(0,2)),g:T(L.substring(2,4)),b:T(L.substring(4,6))}}function A(z){var L=S(z,"origin",Object);return L.x=S(L,"x",Number),L.y=S(L,"y",Number),L}function k(z){z.width=document.documentElement.clientWidth,z.height=document.documentElement.clientHeight}function O(z){var L=z.getBoundingClientRect();z.width=L.width,z.height=L.height}function D(z){var L=document.createElement("canvas");return L.style.position="fixed",L.style.top="0px",L.style.left="0px",L.style.pointerEvents="none",L.style.zIndex=z,L}function _(z,L,X,te,$,U,F,K,se){z.save(),z.translate(L,X),z.rotate(U),z.scale(te,$),z.arc(0,0,1,F,K,se),z.restore()}function H(z){var L=z.angle*(Math.PI/180),X=z.spread*(Math.PI/180);return{x:z.x,y:z.y,wobble:Math.random()*10,wobbleSpeed:Math.min(.11,Math.random()*.1+.05),velocity:z.startVelocity*.5+Math.random()*z.startVelocity,angle2D:-L+(.5*X-Math.random()*X),tiltAngle:(Math.random()*(.75-.25)+.25)*Math.PI,color:z.color,shape:z.shape,tick:0,totalTicks:z.ticks,decay:z.decay,drift:z.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:z.gravity*3,ovalScalar:.6,scalar:z.scalar,flat:z.flat}}function G(z,L){L.x+=Math.cos(L.angle2D)*L.velocity+L.drift,L.y+=Math.sin(L.angle2D)*L.velocity+L.gravity,L.velocity*=L.decay,L.flat?(L.wobble=0,L.wobbleX=L.x+10*L.scalar,L.wobbleY=L.y+10*L.scalar,L.tiltSin=0,L.tiltCos=0,L.random=1):(L.wobble+=L.wobbleSpeed,L.wobbleX=L.x+10*L.scalar*Math.cos(L.wobble),L.wobbleY=L.y+10*L.scalar*Math.sin(L.wobble),L.tiltAngle+=.1,L.tiltSin=Math.sin(L.tiltAngle),L.tiltCos=Math.cos(L.tiltAngle),L.random=Math.random()+2);var X=L.tick++/L.totalTicks,te=L.x+L.random*L.tiltCos,$=L.y+L.random*L.tiltSin,U=L.wobbleX+L.random*L.tiltCos,F=L.wobbleY+L.random*L.tiltSin;if(z.fillStyle="rgba("+L.color.r+", "+L.color.g+", "+L.color.b+", "+(1-X)+")",z.beginPath(),u&&L.shape.type==="path"&&typeof L.shape.path=="string"&&Array.isArray(L.shape.matrix))z.fill(W(L.shape.path,L.shape.matrix,L.x,L.y,Math.abs(U-te)*.1,Math.abs(F-$)*.1,Math.PI/10*L.wobble));else if(L.shape.type==="bitmap"){var K=Math.PI/10*L.wobble,se=Math.abs(U-te)*.1,ne=Math.abs(F-$)*.1,ye=L.shape.bitmap.width*L.scalar,ae=L.shape.bitmap.height*L.scalar,le=new DOMMatrix([Math.cos(K)*se,Math.sin(K)*se,-Math.sin(K)*ne,Math.cos(K)*ne,L.x,L.y]);le.multiplySelf(new DOMMatrix(L.shape.matrix));var re=z.createPattern(g.transform(L.shape.bitmap),"no-repeat");re.setTransform(le),z.globalAlpha=1-X,z.fillStyle=re,z.fillRect(L.x-ye/2,L.y-ae/2,ye,ae),z.globalAlpha=1}else if(L.shape==="circle")z.ellipse?z.ellipse(L.x,L.y,Math.abs(U-te)*L.ovalScalar,Math.abs(F-$)*L.ovalScalar,Math.PI/10*L.wobble,0,2*Math.PI):_(z,L.x,L.y,Math.abs(U-te)*L.ovalScalar,Math.abs(F-$)*L.ovalScalar,Math.PI/10*L.wobble,0,2*Math.PI);else if(L.shape==="star")for(var Q=Math.PI/2*3,Z=4*L.scalar,pe=8*L.scalar,ue=L.x,ve=L.y,Ce=5,Ie=Math.PI/Ce;Ce--;)ue=L.x+Math.cos(Q)*pe,ve=L.y+Math.sin(Q)*pe,z.lineTo(ue,ve),Q+=Ie,ue=L.x+Math.cos(Q)*Z,ve=L.y+Math.sin(Q)*Z,z.lineTo(ue,ve),Q+=Ie;else z.moveTo(Math.floor(L.x),Math.floor(L.y)),z.lineTo(Math.floor(L.wobbleX),Math.floor($)),z.lineTo(Math.floor(U),Math.floor(F)),z.lineTo(Math.floor(te),Math.floor(L.wobbleY));return z.closePath(),z.fill(),L.tick<L.totalTicks}function B(z,L,X,te,$){var U=L.slice(),F=z.getContext("2d"),K,se,ne=h(function(ye){function ae(){K=se=null,F.clearRect(0,0,te.width,te.height),g.clear(),$(),ye()}function le(){a&&!(te.width===i.width&&te.height===i.height)&&(te.width=z.width=i.width,te.height=z.height=i.height),!te.width&&!te.height&&(X(z),te.width=z.width,te.height=z.height),F.clearRect(0,0,te.width,te.height),U=U.filter(function(re){return G(F,re)}),U.length?K=p.frame(le):ae()}K=p.frame(le),se=ae});return{addFettis:function(ye){return U=U.concat(ye),ne},canvas:z,promise:ne,reset:function(){K&&p.cancel(K),se&&se()}}}function P(z,L){var X=!z,te=!!S(L||{},"resize"),$=!1,U=S(L,"disableForReducedMotion",Boolean),F=c&&!!S(L||{},"useWorker"),K=F?b():null,se=X?k:O,ne=z&&K?!!z.__confetti_initialized:!1,ye=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion)").matches,ae;function le(Q,Z,pe){for(var ue=S(Q,"particleCount",N),ve=S(Q,"angle",Number),Ce=S(Q,"spread",Number),Ie=S(Q,"startVelocity",Number),de=S(Q,"decay",Number),Te=S(Q,"gravity",Number),oe=S(Q,"drift",Number),fe=S(Q,"colors",R),Re=S(Q,"ticks",Number),Oe=S(Q,"shapes"),ke=S(Q,"scalar"),he=!!S(Q,"flat"),Ae=A(Q),ge=ue,Pe=[],Fe=z.width*Ae.x,_e=z.height*Ae.y;ge--;)Pe.push(H({x:Fe,y:_e,angle:ve,spread:Ce,startVelocity:Ie,color:fe[ge%fe.length],shape:Oe[E(0,Oe.length)],ticks:Re,decay:de,gravity:Te,drift:oe,scalar:ke,flat:he}));return ae?ae.addFettis(Pe):(ae=B(z,Pe,se,Z,pe),ae.promise)}function re(Q){var Z=U||S(Q,"disableForReducedMotion",Boolean),pe=S(Q,"zIndex",Number);if(Z&&ye)return h(function(Ie){Ie()});X&&ae?z=ae.canvas:X&&!z&&(z=D(pe),document.body.appendChild(z)),te&&!ne&&se(z);var ue={width:z.width,height:z.height};K&&!ne&&K.init(z),ne=!0,K&&(z.__confetti_initialized=!0);function ve(){if(K){var Ie={getBoundingClientRect:function(){if(!X)return z.getBoundingClientRect()}};se(Ie),K.postMessage({resize:{width:Ie.width,height:Ie.height}});return}ue.width=ue.height=null}function Ce(){ae=null,te&&($=!1,t.removeEventListener("resize",ve)),X&&z&&(document.body.contains(z)&&document.body.removeChild(z),z=null,ne=!1)}return te&&!$&&($=!0,t.addEventListener("resize",ve,!1)),K?K.fire(Q,ue,Ce):le(Q,ue,Ce)}return re.reset=function(){K&&K.reset(),ae&&ae.reset()},re}var V;function Y(){return V||(V=P(null,{useWorker:!0,resize:!0})),V}function W(z,L,X,te,$,U,F){var K=new Path2D(z),se=new Path2D;se.addPath(K,new DOMMatrix(L));var ne=new Path2D;return ne.addPath(se,new DOMMatrix([Math.cos(F)*$,Math.sin(F)*$,-Math.sin(F)*U,Math.cos(F)*U,X,te])),ne}function q(z){if(!u)throw new Error("path confetti are not supported in this browser");var L,X;typeof z=="string"?L=z:(L=z.path,X=z.matrix);var te=new Path2D(L),$=document.createElement("canvas"),U=$.getContext("2d");if(!X){for(var F=1e3,K=F,se=F,ne=0,ye=0,ae,le,re=0;re<F;re+=2)for(var Q=0;Q<F;Q+=2)U.isPointInPath(te,re,Q,"nonzero")&&(K=Math.min(K,re),se=Math.min(se,Q),ne=Math.max(ne,re),ye=Math.max(ye,Q));ae=ne-K,le=ye-se;var Z=10,pe=Math.min(Z/ae,Z/le);X=[pe,0,0,pe,-Math.round(ae/2+K)*pe,-Math.round(le/2+se)*pe]}return{type:"path",path:L,matrix:X}}function ee(z){var L,X=1,te="#000000",$='"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';typeof z=="string"?L=z:(L=z.text,X="scalar"in z?z.scalar:X,$="fontFamily"in z?z.fontFamily:$,te="color"in z?z.color:te);var U=10*X,F=""+U+"px "+$,K=new OffscreenCanvas(U,U),se=K.getContext("2d");se.font=F;var ne=se.measureText(L),ye=Math.ceil(ne.actualBoundingBoxRight+ne.actualBoundingBoxLeft),ae=Math.ceil(ne.actualBoundingBoxAscent+ne.actualBoundingBoxDescent),le=2,re=ne.actualBoundingBoxLeft+le,Q=ne.actualBoundingBoxAscent+le;ye+=le+le,ae+=le+le,K=new OffscreenCanvas(ye,ae),se=K.getContext("2d"),se.font=F,se.fillStyle=te,se.fillText(L,re,Q);var Z=1/X;return{type:"bitmap",bitmap:K.transferToImageBitmap(),matrix:[Z,0,0,Z,-ye*Z/2,-ae*Z/2]}}r.exports=function(){return Y().apply(this,arguments)},r.exports.reset=function(){Y().reset()},r.exports.create=P,r.exports.shapeFromPath=q,r.exports.shapeFromText=ee})((function(){return typeof window<"u"?window:typeof self<"u"?self:this||{}})(),Jw,!1);const Zee=Jw.exports;Jw.exports.create;const zR="openrod:cloud-announcement:v1:dismissed";let IR,PR=!1;function Jee(){return IR??(IR=fetch("/api/os/announcements/cloud",{method:"POST",headers:{"content-type":"application/json","x-openshell-console":"1"},body:"{}"}).then(e=>e.ok?e.json():{show:!1}).catch(()=>({show:!1}))),IR}function ete(){const[e,t]=x.useState(!0),r=x.useRef(null);x.useEffect(()=>{let i=!0;return Jee().then(({show:c})=>{let u=PR;try{u||(u=localStorage.getItem(zR)==="true")}catch{}i&&t(!c||u)}),()=>{i=!1}},[]),x.useEffect(()=>{if(e||!r.current)return;const i=Zee.create(r.current,{resize:!0}),c={particleCount:35,spread:75,startVelocity:16,gravity:.45,ticks:160,scalar:.65,disableForReducedMotion:!0,colors:["#4c88df","#e6b75a","#95bde0","#c0a3e8"]};return i({...c,angle:65,origin:{x:.1,y:1}}),i({...c,angle:115,origin:{x:.9,y:1}}),()=>i.reset()},[e]);function a(){PR=!0,t(!0);try{localStorage.setItem(zR,"true")}catch{}}return e?null:n.jsxs("section",{"aria-label":"OpenRod Cloud announcement",className:"sticky top-0 z-20 flex min-h-12 shrink-0 items-center justify-center overflow-hidden border-b border-blue-900/10 bg-[#e4eeff] py-2 pl-4 pr-12 text-[#234c88] dark:border-blue-200/10 dark:bg-[#1c3050] dark:text-[#d5e5ff]",children:[n.jsx("canvas",{ref:r,"aria-hidden":"true",className:"pointer-events-none absolute inset-0 size-full"}),n.jsxs("div",{className:"relative flex items-center gap-2.5 text-[13px] leading-5",children:[n.jsx("img",{src:"/openrod.png",alt:"OpenRod",className:"size-7 shrink-0 object-contain"}),n.jsxs("p",{children:[n.jsx("span",{className:"opacity-75",children:"New in OpenRod:"})," ",n.jsx("strong",{className:"font-semibold",children:"Meet OpenRod Cloud!"})]})]}),n.jsx(ie,{variant:"ghost",size:"icon-sm",onClick:a,"aria-label":"Dismiss OpenRod Cloud announcement",className:"absolute right-2 top-1/2 -translate-y-1/2 text-current hover:bg-blue-950/10 hover:text-current dark:hover:bg-white/10 focus-visible:ring-blue-600",children:n.jsx(In,{"aria-hidden":"true",className:"size-3.5"})})]})}const tte=x.lazy(()=>gy(()=>import("./terminal-view-BjA2bW9M.js"),__vite__mapDeps([3,4])).then(e=>({default:e.TerminalView}))),P1={sandboxes:"Sandboxes",activity:"Activity",groups:"Groups",egress:"Network",ingress:"Network",secrets:"Secrets",templates:"Templates",setups:"MCPs & Skills",connections:"Connections"};class nte extends x.Component{constructor(){super(...arguments);an(this,"state",{error:null})}static getDerivedStateFromError(r){return{error:r}}componentDidUpdate(r){r.view!==this.props.view&&this.state.error&&this.setState({error:null})}render(){return this.state.error?n.jsxs("div",{role:"alert",className:"mx-auto mt-10 max-w-md rounded-lg border border-border p-5 text-center text-sm",children:[n.jsx("p",{children:"This page hit an error."}),n.jsx("p",{className:"mt-1 font-mono text-[11px] text-muted-foreground",children:this.state.error.message}),n.jsx("button",{className:"mt-3 text-xs underline underline-offset-2",onClick:()=>this.setState({error:null}),children:"Try again"})]}):this.props.children}}function _R(){const e=new URLSearchParams(window.location.hash.split("?")[1]??""),t=e.get("gateway"),r=e.get("workspace");if(!t||!r)return null;const a=e.get("remote")==="1",i=e.get("target")??new URLSearchParams(window.location.search).get("target")??void 0;return{id:JSON.stringify([i??"local",JSON.stringify([t,r])]),context:JSON.stringify([t,r]),gateway:t,workspace:r,connected:!0,remote:a,target:i,cloud:i==="cloud",label:e.get("label")||(a?`SSH · ${t}`:"Local")}}function LR(){const e=/^#terminal\/([a-z0-9-]{1,63})(?:\?(.*))?$/.exec(window.location.hash);if(!e)return null;const t=new URLSearchParams(e[2]??""),r=t.get("gateway"),a=t.get("workspace"),i=r&&a?{context:JSON.stringify([r,a]),gateway:r,workspace:a,connected:!0,remote:t.get("remote")==="1",target:new URLSearchParams(window.location.search).get("target")??void 0}:null;return{name:e[1],session:t.get("session")||void 0,setupLogin:t.get("setupLogin")||void 0,mcp:t.get("mcp")||void 0,location:i}}function $R(){const e=window.location.hash.slice(1).split("?")[0];return e==="policies"?(window.history.replaceState(null,"",`${window.location.pathname}${window.location.search}#egress`),"egress"):e==="guardrails"?(window.history.replaceState(null,"",`${window.location.pathname}${window.location.search}#activity`),"activity"):P1[e]?e:"sandboxes"}function ste(){const{connection:e}=oi(),t=Kw();return x.useEffect(()=>{ln.observeConsole(e)},[e,t.sharing]),null}function rte(){var E,T;const e=Bf(),t=js(),r=!(t!=null&&t.localViewer),[a,i]=x.useState($R),[c,u]=x.useState(LR),[f,m]=x.useState(0),[h,g]=x.useState(_R),p=Kw();x.useEffect(()=>{ln.observeView(c?"terminal":a)},[a,!!c,p.sharing]);const[b,v]=x.useState(null),w=vo(),C=x.useMemo(()=>qee(w.locations,null,e.target??"local"),[w.locations,e.target]),S=x.useCallback((R,M)=>{var O;const A=M??null;if((O=e.signal)!=null&&O.aborted||!P1[R])return;i(R),g(A);const k=A?`?${new URLSearchParams({gateway:A.gateway,workspace:A.workspace,label:A.label,remote:A.remote?"1":"0",...A.target?{target:A.target}:{}})}`:"";window.history.pushState(null,"",R==="sandboxes"&&!A?window.location.pathname:`#${R}${k}`)},[e.signal]),N=r?void 0:()=>{S("sandboxes"),m(R=>R+1)};return x.useEffect(()=>{const R=()=>{i($R()),u(LR()),g(_R())};window.addEventListener("popstate",R),window.addEventListener("hashchange",R);const M=A=>S(A.detail.view,A.detail.location);return window.addEventListener("openrod-navigate",M),()=>{window.removeEventListener("popstate",R),window.removeEventListener("hashchange",R),window.removeEventListener("openrod-navigate",M)}},[S]),x.useEffect(()=>{const R=M=>{var A,k,O;return v({...M.detail,type:((A=M.detail)==null?void 0:A.type)??((O=(k=M.detail)==null?void 0:k.types)==null?void 0:O[0]),key:Date.now()})};return window.addEventListener("openrod-import",R),()=>window.removeEventListener("openrod-import",R)},[]),c?((E=c.location)==null?void 0:E.target)==="cloud"&&(t!=null&&t.localViewer)&&(t.checking||!t.connected)?n.jsx("main",{className:"grid min-h-svh place-items-center p-6",children:n.jsxs("section",{className:"text-center text-sm",children:[n.jsx("p",{role:"status",children:t.checking?"Checking cloud connection…":"Connect to OpenRod Cloud to open this terminal."}),!t.checking&&n.jsx("a",{href:"#connections",className:"mt-4 inline-block underline underline-offset-4",children:"Open Connections"})]})}):n.jsxs(n.Fragment,{children:[n.jsx(x.Suspense,{fallback:null,children:n.jsx(Zn,{location:c.location,children:n.jsx(tte,{name:c.name,session:c.session,setupLogin:c.setupLogin,mcp:c.mcp},`${t==null?void 0:t.target} ${((T=c.location)==null?void 0:T.context)??""} ${c.name} ${c.session??""}`)})}),n.jsx(ER,{position:"bottom-right"})]}):n.jsx(Zn,{location:C,children:n.jsxs(Rf,{children:[n.jsx(ste,{}),n.jsxs(tZ,{children:[n.jsx(xZ,{view:a,onNavigate:S}),n.jsxs(rZ,{className:"min-w-0 bg-background",children:[n.jsx(ete,{}),n.jsxs("header",{className:"flex h-14 shrink-0 items-center border-b border-border bg-card px-4 sm:px-6",children:[n.jsx(sZ,{className:"mr-2 md:hidden"}),n.jsx("h1",{className:"text-[18px] font-semibold tracking-tight",children:P1[a]}),n.jsx(Fee,{})]}),n.jsx(sQ,{}),n.jsx(gQ,{}),!r&&n.jsx(yQ,{}),n.jsxs(nte,{view:a,children:[a==="sandboxes"&&n.jsx(fJ,{onNavigate:S,allowRemote:!r,createRequest:f,onCreateRequestHandled:()=>m(0)}),a==="activity"&&n.jsx(RJ,{combined:!0}),a==="groups"&&n.jsx(zJ,{combined:!0,onNavigate:S}),(a==="egress"||a==="ingress")&&n.jsx(YJ,{combined:!0,tab:a,onNavigate:S,requestedLocation:h}),a==="secrets"&&n.jsx(uee,{combined:!0}),a==="templates"&&n.jsx(yee,{}),a==="setups"&&n.jsx(aD,{combined:!0}),a==="connections"&&!r&&n.jsx(Pee,{onCreateSandbox:N})]},`${a}:${MR(C)??"unscoped"}`)]}),n.jsx(ER,{position:"bottom-right"}),b&&n.jsx(Qee,{request:b,onClose:()=>v(null)},b.key)]})]},MR(C)??"unscoped")})}XP.createRoot(document.getElementById("root")).render(n.jsx(nt.StrictMode,{children:n.jsx(LP,{attribute:"class",defaultTheme:"system",enableSystem:!0,storageKey:"openshell-theme",children:n.jsx(Gee,{children:n.jsx(rte,{})})})}));export{ie as B,ha as C,Fi as D,ga as L,E8 as R,n2 as T,gn as a,ln as b,mf as c,ZY as d,Cu as e,ite as f,Gi as g,qi as h,Rs as i,n as j,zp as p,x as r,a4 as s,vg as t,Pt as u};
552
+ `;async function Ree(e,t){try{return await navigator.clipboard.writeText(e),!0}catch{}const r=Object.assign(document.createElement("textarea"),{value:e,readOnly:!0});r.style.cssText="position:fixed;opacity:0;pointer-events:none",t.parentElement.append(r),r.select();try{return document.execCommand("copy")}catch{return!1}finally{r.remove(),t.focus()}}const Aee={initial:{opacity:0,scale:.6,filter:"blur(2px)"},animate:{opacity:1,scale:1,filter:"blur(0px)"},exit:{opacity:0,scale:.6,filter:"blur(2px)"}};function Mee({className:e}){const[t,r]=x.useState(!1),a=Zs();x.useEffect(()=>{if(!t)return;const u=setTimeout(()=>r(!1),2e3);return()=>clearTimeout(u)},[t]);const i=async u=>{await Ree(Eee,u.currentTarget)?r(!0):He.error("Couldn’t copy the prompt",{description:"Your browser blocked clipboard access."})},c=a?{}:{...Aee,transition:{duration:.18,ease:"easeOut"}};return n.jsx(Fu,{delay:300,children:n.jsxs(xa,{children:[n.jsxs(ba,{render:n.jsx(ie,{type:"button",variant:"outline",size:"sm",onClick:i,"aria-label":t?"Prompt copied":"Copy a VM setup prompt for your AI agent",className:Ve("h-8 gap-1.5 px-3 text-xs",e)}),children:[n.jsx("span",{className:"relative grid size-3.5 place-items-center","aria-hidden":"true",children:n.jsx(lc,{initial:!1,mode:"popLayout",children:n.jsx($n.span,{className:"grid place-items-center",...c,children:t?n.jsx(Yn,{className:"size-3.5 text-emerald-600 dark:text-emerald-400"}):n.jsx(Lf,{className:"size-3.5"})},t?"check":"copy")})}),n.jsx(lc,{initial:!1,mode:"wait",children:n.jsx($n.span,{...a?{}:{initial:{opacity:0,y:3},animate:{opacity:1,y:0},exit:{opacity:0,y:-3},transition:{duration:.15}},children:t?n.jsx("span",{className:"text-foreground",children:"Copied — paste into your agent"}):n.jsx(Tee,{className:"mx-0 text-inherit motion-reduce:animate-none dark:text-inherit",children:"Need a VM? Copy agent prompt"})},t?"copied":"idle")}),n.jsx("span",{role:"status",className:"sr-only",children:t?"VM setup prompt copied to clipboard":""})]}),n.jsx(va,{side:"top",className:"max-w-64",children:"Copies a prompt your AI agent can use to create a VM on any cloud provider or server, then tells you what to enter here."})]})})}const kR={name:"",hostname:"",port:"",auth:"default",identityFile:""},Oee=[["default","SSH agent / default keys"],["identity","Key file"]];function Dee({open:e,onOpenChange:t,onAdded:r}){const[a,i]=x.useState(kR),[c,u]=x.useState(null),[f,m]=x.useState(!1),[h,g]=x.useState(null),p=x.useId();x.useEffect(()=>{e&&(i(kR),u(null),g(null),m(!1))},[e]);const b=N=>E=>{i(T=>({...T,[N]:E.target.value})),g(null)},v=a.name.trim()&&a.hostname.trim()&&(a.auth==="default"||a.identityFile.trim());async function w(N){m(!0),g(null);try{await N()}catch(E){g(E.message)}finally{m(!1)}}const C=N=>{N.preventDefault(),v&&!f&&w(async()=>u(await cs.scanSshHost(a)))},S=()=>w(async()=>{const N=await cs.addSshHost(c.token);r(N)});return n.jsx(en,{open:e,onOpenChange:N=>{f||t(N)},children:n.jsxs(tn,{className:"sm:max-w-md","aria-describedby":void 0,children:[n.jsx(nn,{children:n.jsx(Qt,{children:c?"Trust this machine?":"Add SSH connection"})}),c?n.jsxs("div",{className:"grid gap-4 text-xs",children:[n.jsxs("p",{className:"text-muted-foreground",children:["OpenRod reached ",n.jsxs("span",{className:"font-mono text-foreground",children:[c.user?`${c.user}@`:"",c.host,c.port?`:${c.port}`:""]})," and it presented these host keys. Confirm they match the server before you trust it; a mismatch could mean someone is intercepting the connection."]}),n.jsx("ul",{className:"grid gap-2",children:c.fingerprints.map(N=>n.jsxs("li",{className:"rounded-lg border border-border bg-muted/20 px-3 py-2",children:[n.jsx("span",{className:"block text-[10px] text-muted-foreground",children:N.type}),n.jsx("span",{className:"block font-mono break-all text-foreground",children:N.fingerprint})]},N.type))}),n.jsxs("p",{className:"text-muted-foreground",children:["On the server, ",n.jsx("code",{className:"rounded bg-muted px-1 font-mono text-foreground",children:"ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub"})," prints the matching fingerprint."]}),h&&n.jsx("p",{role:"alert",className:"rounded-lg border border-destructive/30 bg-destructive/5 px-3 py-2 break-words whitespace-pre-wrap text-destructive",children:h}),n.jsxs(Hr,{children:[n.jsx(ie,{type:"button",variant:"ghost",disabled:f,onClick:()=>{u(null),g(null)},children:"Back"}),n.jsxs(ie,{type:"button",disabled:f,onClick:S,className:"bg-[var(--action)] text-[var(--action-foreground)] hover:bg-[var(--action)]/90",children:[f?n.jsx(kt,{"aria-hidden":"true"}):n.jsx(Iu,{"aria-hidden":"true",className:"size-4"}),"Trust and save"]})]})]}):n.jsxs("form",{autoComplete:"off",className:"grid gap-4 text-xs",onSubmit:C,children:[n.jsxs("div",{className:"grid gap-1.5",children:[n.jsx(zn,{htmlFor:`${p}-name`,className:"text-xs",children:"Display name"}),n.jsx(Ot,{id:`${p}-name`,value:a.name,onChange:b("name"),maxLength:60,placeholder:"Build server",autoFocus:!0})]}),n.jsxs("div",{className:"grid gap-1.5",children:[n.jsx(zn,{htmlFor:`${p}-host`,className:"text-xs",children:"Hostname"}),n.jsx(Ot,{id:`${p}-host`,value:a.hostname,onChange:b("hostname"),spellCheck:!1,autoCapitalize:"none",placeholder:"host.com or user@host.com",className:"font-mono"})]}),n.jsxs("div",{className:"grid gap-1.5",children:[n.jsxs(zn,{htmlFor:`${p}-port`,className:"text-xs",children:["SSH port ",n.jsx("span",{className:"font-normal text-muted-foreground",children:"(optional)"})]}),n.jsx(Ot,{id:`${p}-port`,value:a.port,onChange:b("port"),inputMode:"numeric",placeholder:"22",className:"font-mono"})]}),n.jsxs("div",{className:"grid gap-2",children:[n.jsx("div",{role:"radiogroup","aria-label":"Authentication",className:"inline-flex w-fit rounded-lg bg-muted p-0.5",children:Oee.map(([N,E])=>n.jsx("button",{type:"button",role:"radio","aria-checked":a.auth===N,onClick:()=>{i(T=>({...T,auth:N})),g(null)},className:`rounded-md px-3 py-1 transition-colors ${a.auth===N?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:E},N))}),a.auth==="identity"?n.jsx(Ot,{"aria-label":"Private key file",value:a.identityFile,onChange:b("identityFile"),spellCheck:!1,autoCapitalize:"none",placeholder:"~/.ssh/id_ed25519",className:"font-mono"}):n.jsx("p",{className:"text-muted-foreground",children:"Uses your SSH agent and the keys SSH tries by default. Password logins aren’t supported."})]}),h&&n.jsx("p",{role:"alert",className:"rounded-lg border border-destructive/30 bg-destructive/5 px-3 py-2 break-words whitespace-pre-wrap text-destructive",children:h}),n.jsxs(Hr,{children:[n.jsx(Mee,{className:"sm:mr-auto"}),n.jsx(ie,{type:"button",variant:"ghost",onClick:()=>t(!1),children:"Cancel"}),n.jsxs(ie,{type:"submit",disabled:!v||f,className:"bg-[var(--action)] text-[var(--action-foreground)] hover:bg-[var(--action)]/90",children:[f&&n.jsx(kt,{"aria-hidden":"true"}),f?"Checking…":"Continue"]})]})]})]})})}const WD={connected:{label:"Connected",dot:"bg-emerald-500"},connecting:{label:"Connecting…",dot:"bg-amber-400"},failed:{label:"Connection failed",dot:"bg-red-500"},off:{label:"Not connected",dot:"bg-stone-400 dark:bg-stone-500"}},TR=e=>WD[e]?e:"off",QD=(e,t,r)=>`${e} ${e===1?t:r}`;function zee({row:e,count:t}){const r=WD[e.state];return n.jsxs("span",{className:"flex shrink-0 items-center gap-1.5 text-xs text-muted-foreground",children:[n.jsx("span",{"aria-hidden":"true",className:Ve("size-1.5 shrink-0 rounded-full",r.dot,e.state==="connecting"&&"motion-safe:animate-pulse")}),n.jsx("span",{children:r.label}),e.state==="connected"&&n.jsxs("span",{className:"hidden sm:inline",children:["· ",QD(t,"sandbox","sandboxes")]})]})}function Iee({row:e,count:t,working:r,onToggle:a,onCreate:i,menu:c}){const u=e.state==="connected",f=e.label??e.name,m=e.address;return n.jsxs("li",{className:"px-4 py-2 sm:px-5",children:[n.jsxs("div",{className:"flex items-center gap-3.5",children:[n.jsx("span",{className:"flex h-[18px] w-8 shrink-0 items-center justify-center",children:r||e.state==="connecting"?n.jsx(kt,{"aria-label":"Working",className:"size-3.5"}):n.jsx(kee,{checked:u,"aria-label":`${u?"Disconnect from":"Connect to"} ${f}`,onCheckedChange:h=>a(e,h)})}),n.jsx("span",{"aria-hidden":"true",className:Ve("flex w-6 shrink-0 justify-center transition-opacity duration-300 [&_svg]:block [&_svg]:h-[22px]",!u&&"opacity-50"),children:n.jsx(v4,{live:u})}),n.jsxs("span",{className:"flex min-w-0 flex-1 items-baseline gap-2.5",children:[n.jsx("span",{className:"truncate text-[13px] font-medium",children:f}),m&&n.jsx("span",{className:"hidden min-w-0 truncate font-mono text-[11px] text-muted-foreground md:block",children:m})]}),n.jsx(zee,{row:e,count:t}),n.jsxs("span",{className:"flex w-[60px] shrink-0 items-center justify-end gap-0.5",children:[u&&i&&n.jsxs(xa,{children:[n.jsx(ba,{render:n.jsx(ie,{variant:"ghost",size:"icon-sm","aria-label":`New sandbox on ${f}`,onClick:i,className:"size-7 text-muted-foreground hover:text-foreground"}),children:n.jsx(B8,{className:"size-4"})}),n.jsx(va,{children:"New sandbox"})]}),c]})]}),e.state==="failed"&&e.error&&n.jsx("p",{className:"mt-1 truncate pl-[46px] font-mono text-[11px] text-destructive",title:e.error,children:e.error})]})}function Pee({onCreateSandbox:e}){var $,U,F;const t=vo(),r=js(),[a,i]=x.useState(!1),[c,u]=x.useState(""),[f,m]=x.useState(!1),h=x.useRef(null);x.useEffect(()=>()=>{var K;return(K=h.current)==null?void 0:K.abort()},[]);const g=t.locations.find(K=>K.cloud||K.target==="cloud"),p=!!(g!=null&&g.connected);async function b(){const K=new AbortController;h.current=K,i(!0),u("");try{await r.prepare({signal:K.signal}),K.signal.throwIfAborted(),m(!0),t.refresh()}catch(se){se.name!=="AbortError"&&u(se.message)}finally{i(!1),h.current=null}}const[v,w]=x.useState(null),[C,S]=x.useState(null),[N,E]=x.useState(null),[T,R]=x.useState(null),[M,A]=x.useState(!1),[k,O]=x.useState(null),D=x.useCallback(async K=>{try{w(await cs.connections(K)),S(null)}catch(se){se.name!=="AbortError"&&S(se.message)}},[]);x.useEffect(()=>{const K=new AbortController;return D(K.signal),()=>K.abort()},[D]);const _=(v==null?void 0:v.active)??null,H=TR(_==null?void 0:_.status),G=H==="connected",B=x.useMemo(()=>{if(!v)return[];const K=v.hosts.map(se=>({...se,state:(_==null?void 0:_.host)===se.name?TR(_.status):"off",error:(_==null?void 0:_.host)===se.name?_.error:null}));return _&&!K.some(se=>se.name===_.host)&&K.push({name:_.host,state:H,error:_.error}),K},[v,_,H]),P=B.filter(K=>K.managed||K.name===(_==null?void 0:_.host)).sort((K,se)=>(se.state==="connected")-(K.state==="connected")||(K.label??K.name).localeCompare(se.label??se.name)),V=B.filter(K=>!P.includes(K)),Y=K=>t.sandboxes.filter(se=>{var ne;return((ne=se.location)==null?void 0:ne.remote)&&se.location.host===K.name}).length;async function W(K,se,ne){E(K);try{await se(),await D(),t.refresh()}catch(ye){He.error(ne,{description:ye.message})}finally{E(null)}}const q=(K,se)=>{se?R({host:K.name,replacing:G?_.host:void 0}):W(K.name,async()=>{await cs.disconnectRemote(),He.success(`Disconnected from ${K.label??K.name}`)},"Couldn’t disconnect")};function ee(){const{kind:K,row:se}=k;O(null);const ne=se.label??se.name;K==="forget"?W(se.name,async()=>{await cs.forgetRemote(),He.success(`Forgot ${ne}`)},"Couldn’t forget it"):W(se.name,async()=>{(_==null?void 0:_.host)===se.name&&await cs.forgetRemote(),await cs.removeSshHost(se.name),He.success(`Deleted ${ne}`)},"Couldn’t delete it")}function z(K){const se=K.name===(_==null?void 0:_.host);return!K.managed&&!se?null:n.jsxs(Fi,{children:[n.jsx(Gi,{render:n.jsx(ie,{variant:"ghost",size:"icon-sm","aria-label":`More actions for ${K.label??K.name}`,className:"size-7 text-muted-foreground hover:text-foreground"}),children:n.jsx(Rk,{className:"size-4"})}),n.jsxs(qi,{align:"end",className:"min-w-44",children:[K.state==="connected"&&n.jsx(Rs,{onClick:()=>q(K,!1),children:"Disconnect"}),K.state!=="connected"&&K.state!=="connecting"&&n.jsx(Rs,{onClick:()=>q(K,!0),children:K.state==="failed"?"Try again":"Connect"}),se&&!K.managed&&n.jsx(Rs,{onClick:()=>O({kind:"forget",row:K}),children:"Forget"}),K.managed&&n.jsxs(n.Fragment,{children:[n.jsx(ju,{}),n.jsxs(Rs,{variant:"destructive",disabled:K.state==="connected"||K.state==="connecting",onClick:()=>O({kind:"delete",row:K}),children:["Delete",K.state==="connected"?" (disconnect first)":""]})]})]})]})}const L=(K,se)=>n.jsx(ho,{delay:.04*se,offset:4,blur:"3px",className:"contents",children:n.jsx(Iee,{row:K,count:Y(K),working:N===K.name,onToggle:q,onCreate:e,menu:z(K)})},K.name),X=(k==null?void 0:k.row.label)??(k==null?void 0:k.row.name),te="divide-y divide-border/60 overflow-hidden rounded-xl border border-border/80 bg-card";return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"h-[calc(100svh-3.5rem)] overflow-y-auto",children:n.jsxs("div",{className:"grid gap-8 px-4 py-5 sm:px-6",children:[n.jsxs("section",{"aria-label":"OpenRod Cloud",className:"grid gap-4",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-sm font-medium",children:"OpenRod Cloud"}),n.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:"Manage your cloud connection."})]}),n.jsx(ho,{duration:.2,offset:4,blur:"3px",children:n.jsxs("div",{className:te,children:[n.jsxs("div",{className:"flex flex-wrap items-center gap-3.5 px-4 py-3 sm:px-5",children:[n.jsx("span",{"aria-hidden":"true",className:"flex w-8 shrink-0 justify-center [&_svg]:h-7",children:n.jsx(y4,{})}),n.jsxs("div",{className:"min-w-0 flex-1",children:[n.jsx("p",{className:"text-[13px] font-medium",children:(($=r==null?void 0:r.user)==null?void 0:$.email)||"OpenRod Cloud"}),n.jsxs("p",{role:"status",className:"mt-0.5 flex items-center gap-1.5 text-xs text-muted-foreground",children:[p&&n.jsx("span",{"aria-hidden":"true",className:"size-1.5 rounded-full bg-emerald-500"}),r!=null&&r.checking?"Checking connection…":a?r!=null&&r.connecting?"Signing in…":"Starting cloud machine…":p?`Connected · ${QD(t.sandboxes.filter(K=>{var se;return(se=K.location)==null?void 0:se.cloud}).length,"sandbox","sandboxes")}`:r!=null&&r.connected?"Signed in · machine not ready":r!=null&&r.available?"Not connected":((U=r==null?void 0:r.status)==null?void 0:U.reason)||"Coming soon"]})]}),n.jsx("div",{className:"flex items-center gap-1.5",children:a?n.jsxs(ie,{variant:"ghost",size:"sm",onClick:()=>{var K;(K=h.current)==null||K.abort(),r.cancelConnect()},children:[n.jsx(kt,{}),"Cancel"]}):n.jsxs(n.Fragment,{children:[p&&!f?n.jsxs(ie,{variant:"outline",size:"sm",onClick:()=>window.dispatchEvent(new CustomEvent("openrod-import",{detail:{destination:g}})),children:[n.jsx(gf,{className:"size-3.5"}),"Import data"]}):!p&&n.jsxs(ie,{variant:"outline",size:"sm",disabled:!(r!=null&&r.available)||(r==null?void 0:r.checking),onClick:b,children:[n.jsx(Kp,{className:"size-3.5"}),r!=null&&r.connected?"Start cloud machine":"Connect"]}),(r==null?void 0:r.connected)&&n.jsxs(Fi,{children:[n.jsx(Gi,{render:n.jsx(ie,{variant:"ghost",size:"icon-sm","aria-label":"OpenRod Cloud actions"}),children:n.jsx(Rk,{className:"size-4"})}),n.jsxs(qi,{align:"end",children:[n.jsx(Rs,{onClick:()=>r.refresh().then(()=>t.refresh()).catch(K=>u(K.message)),children:"Refresh connection"}),n.jsx(ju,{}),n.jsx(Rs,{onClick:()=>r.disconnect().catch(K=>u(K.message)),children:"Disconnect account"})]})]})]})})]}),f&&p&&n.jsxs("div",{className:"flex flex-wrap items-center gap-3 border-t px-4 py-3 sm:px-5",children:[n.jsx("p",{className:"min-w-0 flex-1 text-xs text-muted-foreground",children:"Bring your local setup?"}),n.jsx(ie,{variant:"ghost",size:"sm",onClick:()=>m(!1),children:"Not now"}),n.jsxs(ie,{size:"sm",onClick:()=>{m(!1),window.dispatchEvent(new CustomEvent("openrod-import",{detail:{destination:g}}))},children:[n.jsx(gf,{className:"size-3.5"}),"Import data"]})]}),(c||(r==null?void 0:r.error))&&n.jsx("p",{role:"alert",className:"border-t px-4 py-2 text-xs text-destructive sm:px-5",children:c||r.error})]})})]}),C&&n.jsxs("div",{role:"alert",className:"flex items-center gap-3 text-xs text-red-600",children:[n.jsx("span",{children:C}),n.jsx(ie,{variant:"outline",size:"sm",onClick:()=>D(),children:"Retry"})]}),!v&&!C&&n.jsx("p",{role:"status",className:"py-20 text-center text-sm text-muted-foreground",children:"Reading connections…"}),v&&n.jsxs(n.Fragment,{children:[n.jsxs("section",{"aria-label":"SSH connections",className:"grid gap-4",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs("div",{className:"min-w-0 flex-1",children:[n.jsx("h2",{className:"text-sm font-medium",children:"SSH connections"}),n.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:"Added in OpenRod. One machine is connected at a time."})]}),n.jsx(ie,{variant:"ghost",size:"icon-sm","aria-label":"Refresh connections",onClick:()=>D(),className:"text-muted-foreground",children:n.jsx(rl,{})}),((F=v.forgottenHosts)==null?void 0:F.length)>0&&n.jsxs(Fi,{children:[n.jsx(Gi,{render:n.jsx(ie,{variant:"ghost",size:"sm"}),children:"Restore"}),n.jsx(qi,{align:"end",children:v.forgottenHosts.map(K=>n.jsxs(Rs,{onClick:()=>W(K,()=>cs.restoreSshHost(K),"Couldn’t restore it"),children:["Restore ",K]},K))})]}),n.jsxs(ie,{size:"sm",onClick:()=>A(!0),className:"bg-[var(--action)] text-[var(--action-foreground)] hover:bg-[var(--action)]/90",children:[n.jsx(vs,{className:"size-3.5"}),"Add"]})]}),P.length>0?n.jsx("ul",{className:te,children:P.map(L)}):n.jsxs("div",{className:"rounded-xl border border-border bg-card py-14 text-center",children:[n.jsx($f,{className:"mx-auto mb-3 size-6 text-muted-foreground",strokeWidth:1.5}),n.jsx("p",{className:"text-sm",children:"No saved connections"}),n.jsx("p",{className:"mx-auto mt-1 max-w-xs text-xs text-muted-foreground",children:"Add a server to run sandboxes on your own machine over SSH. You confirm its host key before anything is saved."}),n.jsx(ie,{variant:"outline",className:"mt-4",onClick:()=>A(!0),children:"Add connection"})]})]}),V.length>0&&n.jsxs("section",{"aria-label":"Hosts in your SSH config",className:"grid gap-4",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-sm font-medium",children:"From your SSH config"}),n.jsxs("p",{className:"mt-0.5 text-xs text-muted-foreground",children:["Found in ",n.jsx("span",{className:"font-mono",children:"~/.ssh/config"}),". OpenRod reads these and never edits them."]})]}),n.jsx("ul",{className:te,children:V.map(L)})]})]})]})}),n.jsx(Fr,{open:!!k,onOpenChange:K=>{K||O(null)},children:n.jsxs(Gr,{children:[n.jsxs(qr,{children:[n.jsxs(Kr,{children:[(k==null?void 0:k.kind)==="forget"?"Forget":"Delete"," ",X,"?"]}),n.jsx(Xr,{children:(k==null?void 0:k.kind)==="forget"?`${(k==null?void 0:k.row.state)==="connected"?"This disconnects from the machine and removes it from this page. ":"This removes it from this page. "}Sandboxes on the machine keep running, and the host stays in your SSH configuration, so you can connect again later.`:"This removes the saved connection and its trusted host keys from OpenRod. Sandboxes on the machine keep running. You can add it again later."})]}),n.jsxs(Yr,{children:[n.jsx(Qr,{children:"Cancel"}),n.jsx(Wr,{variant:"destructive",onClick:ee,children:(k==null?void 0:k.kind)==="forget"?"Forget":"Delete"})]})]})}),n.jsx(Dee,{open:M,onOpenChange:A,onAdded:K=>{A(!1),He.success(`Added ${K.name}`),D(),R({host:K.alias})}}),n.jsx(en,{open:!!T,onOpenChange:K=>{K||R(null)},children:n.jsxs(tn,{className:"sm:max-w-3xl","aria-describedby":void 0,children:[n.jsx(nn,{children:n.jsx(Qt,{children:T!=null&&T.replacing?"Switch host":"Connect a remote machine"})}),T&&n.jsx(zw,{initialHost:T.host,connectedHost:T.replacing??null,onUseConnected:()=>R(null),onConnected:K=>{R(null),He.success(`Connected to ${K.host}`),D(),t.refresh()},onBack:()=>R(null)},T.host)]})})]})}const ER=({...e})=>{const{resolvedTheme:t}=HR();return n.jsx(AK,{theme:t??"system",className:"toaster group",icons:{success:n.jsx(AL,{className:"size-4"}),info:n.jsx(Du,{className:"size-4"}),warning:n.jsx(ti,{className:"size-4"}),error:n.jsx(zA,{className:"size-4"}),loading:n.jsx(Ql,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},toastOptions:{classNames:{toast:"cn-toast"}},...e})},RR=["Claude Code","Codex","OpenCode","Pi","Cursor"];function ZD(){const[e,t]=x.useState(RR.slice(0,3));return x.useEffect(()=>{const r=window.matchMedia("(prefers-reduced-motion: reduce)");let a,i=-1;function c(){clearTimeout(a),!(r.matches||document.hidden)&&(a=setTimeout(()=>{const u=[0,1,2].filter(h=>h!==i),f=u[Math.floor(Math.random()*u.length)];i=f;const m=Math.random();t(h=>{const g=RR.filter(p=>!h.includes(p));return h.map((p,b)=>b===f?g[Math.floor(m*g.length)]:p)}),c()},1100+Math.random()*900))}return c(),r.addEventListener("change",c),document.addEventListener("visibilitychange",c),()=>{clearTimeout(a),r.removeEventListener("change",c),document.removeEventListener("visibilitychange",c)}},[]),n.jsxs("svg",{className:"cloud-agents",viewBox:"50 10 540 340",role:"img","aria-labelledby":"cloud-agents-title cloud-agents-desc",children:[n.jsx("title",{id:"cloud-agents-title",children:"Your agents in OpenRod Cloud"}),n.jsx("desc",{id:"cloud-agents-desc",children:"Claude Code, Codex, OpenCode, Pi, and Cursor on OpenRod Cloud."}),n.jsxs("g",{className:"cloud-spark",children:[n.jsx("path",{d:"M93 105h4v-8h4v8h8v4h-8v8h-4v-8h-8v-4z"}),n.jsx("path",{d:"M544 72h4v-7h4v7h7v4h-7v7h-4v-7h-7v-4z"}),n.jsx("path",{d:"M563 268h4v-6h4v6h6v4h-6v6h-4v-6h-6v-4z"})]}),n.jsx("path",{d:"M98 292h-28v-76h28v-35h55v-48h55v-35h80V74h72v24h48v35h48v48h53v35h30v76h-29v31H98z",fill:"#cadbd7",transform:"translate(0 13)"}),n.jsx("path",{d:"M98 292h-28v-76h28v-35h55v-48h55v-35h80V74h72v24h48v35h48v48h53v35h30v76h-29v31H98z",fill:"#f4f1e8",stroke:"#b3c8c2",strokeWidth:"2"}),n.jsx("path",{d:"M106 291h397",stroke:"#d8ded2",strokeWidth:"2",strokeDasharray:"3 7"}),n.jsxs("g",{className:"cloud-card-slot",transform:"translate(165 165)",children:[n.jsxs("g",{className:`cloud-card-face ${e[0]==="Claude Code"?"is-active":""}`,"data-agent":"Claude Code",children:[n.jsx("rect",{width:"82",height:"82",rx:"8",fill:"#f0dccb"}),n.jsx("image",{href:"/logos/agents/claudecode.svg",x:"18",y:"18",width:"46",height:"46"}),n.jsx("text",{x:"41",y:"102",textAnchor:"middle",fontSize:"10",fill:"#68746b",children:"Claude Code"})]}),n.jsxs("g",{className:`cloud-card-face ${e[0]==="Codex"?"is-active":""}`,"data-agent":"Codex",children:[n.jsx("rect",{width:"82",height:"82",rx:"8",fill:"#e3e3ec"}),n.jsx("svg",{x:"7",y:"1",width:"68",height:"81",viewBox:"335 265 625 735",children:n.jsx("image",{href:"/cloud-agents/codex-character.png",width:"1312",height:"1199"})}),n.jsx("text",{x:"41",y:"102",textAnchor:"middle",fontSize:"10",fill:"#68746b",children:"Codex"})]}),n.jsxs("g",{className:`cloud-card-face ${e[0]==="OpenCode"?"is-active":""}`,"data-agent":"OpenCode",children:[n.jsx("rect",{width:"82",height:"82",rx:"8",fill:"#e1e6d9"}),n.jsx("image",{href:"/logos/agents/opencode.svg",x:"18",y:"18",width:"46",height:"46"}),n.jsx("text",{x:"41",y:"102",textAnchor:"middle",fontSize:"10",fill:"#68746b",children:"OpenCode"})]}),n.jsxs("g",{className:`cloud-card-face ${e[0]==="Pi"?"is-active":""}`,"data-agent":"Pi",children:[n.jsx("rect",{width:"82",height:"82",rx:"8",fill:"#e6dfd0"}),n.jsx("image",{href:"/logos/agents/pi.svg",x:"18",y:"18",width:"46",height:"46"}),n.jsx("text",{x:"41",y:"102",textAnchor:"middle",fontSize:"10",fill:"#68746b",children:"Pi"})]}),n.jsxs("g",{className:`cloud-card-face ${e[0]==="Cursor"?"is-active":""}`,"data-agent":"Cursor",children:[n.jsx("rect",{width:"82",height:"82",rx:"8",fill:"#e2e5df"}),n.jsx("image",{href:"/logos/agents/cursor.svg",x:"18",y:"18",width:"46",height:"46"}),n.jsx("text",{x:"41",y:"102",textAnchor:"middle",fontSize:"10",fill:"#68746b",children:"Cursor"})]})]}),n.jsxs("g",{className:"cloud-card-slot",transform:"translate(267 146)",children:[n.jsxs("g",{className:`cloud-card-face ${e[1]==="Codex"?"is-active":""}`,"data-agent":"Codex",children:[n.jsx("rect",{width:"82",height:"82",rx:"8",fill:"#e3e3ec"}),n.jsx("svg",{x:"7",y:"1",width:"68",height:"81",viewBox:"335 265 625 735",children:n.jsx("image",{href:"/cloud-agents/codex-character.png",width:"1312",height:"1199"})}),n.jsx("text",{x:"41",y:"102",textAnchor:"middle",fontSize:"10",fill:"#68746b",children:"Codex"})]}),n.jsxs("g",{className:`cloud-card-face ${e[1]==="OpenCode"?"is-active":""}`,"data-agent":"OpenCode",children:[n.jsx("rect",{width:"82",height:"82",rx:"8",fill:"#e1e6d9"}),n.jsx("image",{href:"/logos/agents/opencode.svg",x:"18",y:"18",width:"46",height:"46"}),n.jsx("text",{x:"41",y:"102",textAnchor:"middle",fontSize:"10",fill:"#68746b",children:"OpenCode"})]}),n.jsxs("g",{className:`cloud-card-face ${e[1]==="Pi"?"is-active":""}`,"data-agent":"Pi",children:[n.jsx("rect",{width:"82",height:"82",rx:"8",fill:"#e6dfd0"}),n.jsx("image",{href:"/logos/agents/pi.svg",x:"18",y:"18",width:"46",height:"46"}),n.jsx("text",{x:"41",y:"102",textAnchor:"middle",fontSize:"10",fill:"#68746b",children:"Pi"})]}),n.jsxs("g",{className:`cloud-card-face ${e[1]==="Cursor"?"is-active":""}`,"data-agent":"Cursor",children:[n.jsx("rect",{width:"82",height:"82",rx:"8",fill:"#e2e5df"}),n.jsx("image",{href:"/logos/agents/cursor.svg",x:"18",y:"18",width:"46",height:"46"}),n.jsx("text",{x:"41",y:"102",textAnchor:"middle",fontSize:"10",fill:"#68746b",children:"Cursor"})]}),n.jsxs("g",{className:`cloud-card-face ${e[1]==="Claude Code"?"is-active":""}`,"data-agent":"Claude Code",children:[n.jsx("rect",{width:"82",height:"82",rx:"8",fill:"#f0dccb"}),n.jsx("image",{href:"/logos/agents/claudecode.svg",x:"18",y:"18",width:"46",height:"46"}),n.jsx("text",{x:"41",y:"102",textAnchor:"middle",fontSize:"10",fill:"#68746b",children:"Claude Code"})]})]}),n.jsxs("g",{className:"cloud-card-slot",transform:"translate(369 165)",children:[n.jsxs("g",{className:`cloud-card-face ${e[2]==="OpenCode"?"is-active":""}`,"data-agent":"OpenCode",children:[n.jsx("rect",{width:"82",height:"82",rx:"8",fill:"#e1e6d9"}),n.jsx("image",{href:"/logos/agents/opencode.svg",x:"18",y:"18",width:"46",height:"46"}),n.jsx("text",{x:"41",y:"102",textAnchor:"middle",fontSize:"10",fill:"#68746b",children:"OpenCode"})]}),n.jsxs("g",{className:`cloud-card-face ${e[2]==="Pi"?"is-active":""}`,"data-agent":"Pi",children:[n.jsx("rect",{width:"82",height:"82",rx:"8",fill:"#e6dfd0"}),n.jsx("image",{href:"/logos/agents/pi.svg",x:"18",y:"18",width:"46",height:"46"}),n.jsx("text",{x:"41",y:"102",textAnchor:"middle",fontSize:"10",fill:"#68746b",children:"Pi"})]}),n.jsxs("g",{className:`cloud-card-face ${e[2]==="Cursor"?"is-active":""}`,"data-agent":"Cursor",children:[n.jsx("rect",{width:"82",height:"82",rx:"8",fill:"#e2e5df"}),n.jsx("image",{href:"/logos/agents/cursor.svg",x:"18",y:"18",width:"46",height:"46"}),n.jsx("text",{x:"41",y:"102",textAnchor:"middle",fontSize:"10",fill:"#68746b",children:"Cursor"})]}),n.jsxs("g",{className:`cloud-card-face ${e[2]==="Claude Code"?"is-active":""}`,"data-agent":"Claude Code",children:[n.jsx("rect",{width:"82",height:"82",rx:"8",fill:"#f0dccb"}),n.jsx("image",{href:"/logos/agents/claudecode.svg",x:"18",y:"18",width:"46",height:"46"}),n.jsx("text",{x:"41",y:"102",textAnchor:"middle",fontSize:"10",fill:"#68746b",children:"Claude Code"})]}),n.jsxs("g",{className:`cloud-card-face ${e[2]==="Codex"?"is-active":""}`,"data-agent":"Codex",children:[n.jsx("rect",{width:"82",height:"82",rx:"8",fill:"#e3e3ec"}),n.jsx("svg",{x:"7",y:"1",width:"68",height:"81",viewBox:"335 265 625 735",children:n.jsx("image",{href:"/cloud-agents/codex-character.png",width:"1312",height:"1199"})}),n.jsx("text",{x:"41",y:"102",textAnchor:"middle",fontSize:"10",fill:"#68746b",children:"Codex"})]})]}),n.jsx("g",{role:"img","aria-label":"OpenRod Cloud",children:n.jsx("path",{fill:"#536f67",d:"M226.25 30h2.5v2.5h-2.5zM228.75 30h2.5v2.5h-2.5zM231.25 30h2.5v2.5h-2.5zM223.75 32.5h2.5v2.5h-2.5zM233.75 32.5h2.5v2.5h-2.5zM223.75 35h2.5v2.5h-2.5zM233.75 35h2.5v2.5h-2.5zM223.75 37.5h2.5v2.5h-2.5zM233.75 37.5h2.5v2.5h-2.5zM223.75 40h2.5v2.5h-2.5zM233.75 40h2.5v2.5h-2.5zM223.75 42.5h2.5v2.5h-2.5zM233.75 42.5h2.5v2.5h-2.5zM226.25 45h2.5v2.5h-2.5zM228.75 45h2.5v2.5h-2.5zM231.25 45h2.5v2.5h-2.5zM238.75 30h2.5v2.5h-2.5zM241.25 30h2.5v2.5h-2.5zM243.75 30h2.5v2.5h-2.5zM246.25 30h2.5v2.5h-2.5zM238.75 32.5h2.5v2.5h-2.5zM248.75 32.5h2.5v2.5h-2.5zM238.75 35h2.5v2.5h-2.5zM248.75 35h2.5v2.5h-2.5zM238.75 37.5h2.5v2.5h-2.5zM241.25 37.5h2.5v2.5h-2.5zM243.75 37.5h2.5v2.5h-2.5zM246.25 37.5h2.5v2.5h-2.5zM238.75 40h2.5v2.5h-2.5zM238.75 42.5h2.5v2.5h-2.5zM238.75 45h2.5v2.5h-2.5zM253.75 30h2.5v2.5h-2.5zM256.25 30h2.5v2.5h-2.5zM258.75 30h2.5v2.5h-2.5zM261.25 30h2.5v2.5h-2.5zM263.75 30h2.5v2.5h-2.5zM253.75 32.5h2.5v2.5h-2.5zM253.75 35h2.5v2.5h-2.5zM253.75 37.5h2.5v2.5h-2.5zM256.25 37.5h2.5v2.5h-2.5zM258.75 37.5h2.5v2.5h-2.5zM261.25 37.5h2.5v2.5h-2.5zM253.75 40h2.5v2.5h-2.5zM253.75 42.5h2.5v2.5h-2.5zM253.75 45h2.5v2.5h-2.5zM256.25 45h2.5v2.5h-2.5zM258.75 45h2.5v2.5h-2.5zM261.25 45h2.5v2.5h-2.5zM263.75 45h2.5v2.5h-2.5zM268.75 30h2.5v2.5h-2.5zM278.75 30h2.5v2.5h-2.5zM268.75 32.5h2.5v2.5h-2.5zM271.25 32.5h2.5v2.5h-2.5zM278.75 32.5h2.5v2.5h-2.5zM268.75 35h2.5v2.5h-2.5zM271.25 35h2.5v2.5h-2.5zM278.75 35h2.5v2.5h-2.5zM268.75 37.5h2.5v2.5h-2.5zM273.75 37.5h2.5v2.5h-2.5zM278.75 37.5h2.5v2.5h-2.5zM268.75 40h2.5v2.5h-2.5zM276.25 40h2.5v2.5h-2.5zM278.75 40h2.5v2.5h-2.5zM268.75 42.5h2.5v2.5h-2.5zM276.25 42.5h2.5v2.5h-2.5zM278.75 42.5h2.5v2.5h-2.5zM268.75 45h2.5v2.5h-2.5zM278.75 45h2.5v2.5h-2.5zM283.75 30h2.5v2.5h-2.5zM286.25 30h2.5v2.5h-2.5zM288.75 30h2.5v2.5h-2.5zM291.25 30h2.5v2.5h-2.5zM283.75 32.5h2.5v2.5h-2.5zM293.75 32.5h2.5v2.5h-2.5zM283.75 35h2.5v2.5h-2.5zM293.75 35h2.5v2.5h-2.5zM283.75 37.5h2.5v2.5h-2.5zM286.25 37.5h2.5v2.5h-2.5zM288.75 37.5h2.5v2.5h-2.5zM291.25 37.5h2.5v2.5h-2.5zM283.75 40h2.5v2.5h-2.5zM288.75 40h2.5v2.5h-2.5zM283.75 42.5h2.5v2.5h-2.5zM291.25 42.5h2.5v2.5h-2.5zM283.75 45h2.5v2.5h-2.5zM293.75 45h2.5v2.5h-2.5zM301.25 30h2.5v2.5h-2.5zM303.75 30h2.5v2.5h-2.5zM306.25 30h2.5v2.5h-2.5zM298.75 32.5h2.5v2.5h-2.5zM308.75 32.5h2.5v2.5h-2.5zM298.75 35h2.5v2.5h-2.5zM308.75 35h2.5v2.5h-2.5zM298.75 37.5h2.5v2.5h-2.5zM308.75 37.5h2.5v2.5h-2.5zM298.75 40h2.5v2.5h-2.5zM308.75 40h2.5v2.5h-2.5zM298.75 42.5h2.5v2.5h-2.5zM308.75 42.5h2.5v2.5h-2.5zM301.25 45h2.5v2.5h-2.5zM303.75 45h2.5v2.5h-2.5zM306.25 45h2.5v2.5h-2.5zM313.75 30h2.5v2.5h-2.5zM316.25 30h2.5v2.5h-2.5zM318.75 30h2.5v2.5h-2.5zM321.25 30h2.5v2.5h-2.5zM313.75 32.5h2.5v2.5h-2.5zM323.75 32.5h2.5v2.5h-2.5zM313.75 35h2.5v2.5h-2.5zM323.75 35h2.5v2.5h-2.5zM313.75 37.5h2.5v2.5h-2.5zM323.75 37.5h2.5v2.5h-2.5zM313.75 40h2.5v2.5h-2.5zM323.75 40h2.5v2.5h-2.5zM313.75 42.5h2.5v2.5h-2.5zM323.75 42.5h2.5v2.5h-2.5zM313.75 45h2.5v2.5h-2.5zM316.25 45h2.5v2.5h-2.5zM318.75 45h2.5v2.5h-2.5zM321.25 45h2.5v2.5h-2.5zM346.25 30h2.5v2.5h-2.5zM348.75 30h2.5v2.5h-2.5zM351.25 30h2.5v2.5h-2.5zM353.75 30h2.5v2.5h-2.5zM343.75 32.5h2.5v2.5h-2.5zM343.75 35h2.5v2.5h-2.5zM343.75 37.5h2.5v2.5h-2.5zM343.75 40h2.5v2.5h-2.5zM343.75 42.5h2.5v2.5h-2.5zM346.25 45h2.5v2.5h-2.5zM348.75 45h2.5v2.5h-2.5zM351.25 45h2.5v2.5h-2.5zM353.75 45h2.5v2.5h-2.5zM358.75 30h2.5v2.5h-2.5zM358.75 32.5h2.5v2.5h-2.5zM358.75 35h2.5v2.5h-2.5zM358.75 37.5h2.5v2.5h-2.5zM358.75 40h2.5v2.5h-2.5zM358.75 42.5h2.5v2.5h-2.5zM358.75 45h2.5v2.5h-2.5zM361.25 45h2.5v2.5h-2.5zM363.75 45h2.5v2.5h-2.5zM366.25 45h2.5v2.5h-2.5zM368.75 45h2.5v2.5h-2.5zM376.25 30h2.5v2.5h-2.5zM378.75 30h2.5v2.5h-2.5zM381.25 30h2.5v2.5h-2.5zM373.75 32.5h2.5v2.5h-2.5zM383.75 32.5h2.5v2.5h-2.5zM373.75 35h2.5v2.5h-2.5zM383.75 35h2.5v2.5h-2.5zM373.75 37.5h2.5v2.5h-2.5zM383.75 37.5h2.5v2.5h-2.5zM373.75 40h2.5v2.5h-2.5zM383.75 40h2.5v2.5h-2.5zM373.75 42.5h2.5v2.5h-2.5zM383.75 42.5h2.5v2.5h-2.5zM376.25 45h2.5v2.5h-2.5zM378.75 45h2.5v2.5h-2.5zM381.25 45h2.5v2.5h-2.5zM388.75 30h2.5v2.5h-2.5zM398.75 30h2.5v2.5h-2.5zM388.75 32.5h2.5v2.5h-2.5zM398.75 32.5h2.5v2.5h-2.5zM388.75 35h2.5v2.5h-2.5zM398.75 35h2.5v2.5h-2.5zM388.75 37.5h2.5v2.5h-2.5zM398.75 37.5h2.5v2.5h-2.5zM388.75 40h2.5v2.5h-2.5zM398.75 40h2.5v2.5h-2.5zM388.75 42.5h2.5v2.5h-2.5zM398.75 42.5h2.5v2.5h-2.5zM391.25 45h2.5v2.5h-2.5zM393.75 45h2.5v2.5h-2.5zM396.25 45h2.5v2.5h-2.5zM403.75 30h2.5v2.5h-2.5zM406.25 30h2.5v2.5h-2.5zM408.75 30h2.5v2.5h-2.5zM411.25 30h2.5v2.5h-2.5zM403.75 32.5h2.5v2.5h-2.5zM413.75 32.5h2.5v2.5h-2.5zM403.75 35h2.5v2.5h-2.5zM413.75 35h2.5v2.5h-2.5zM403.75 37.5h2.5v2.5h-2.5zM413.75 37.5h2.5v2.5h-2.5zM403.75 40h2.5v2.5h-2.5zM413.75 40h2.5v2.5h-2.5zM403.75 42.5h2.5v2.5h-2.5zM413.75 42.5h2.5v2.5h-2.5zM403.75 45h2.5v2.5h-2.5zM406.25 45h2.5v2.5h-2.5zM408.75 45h2.5v2.5h-2.5zM411.25 45h2.5v2.5h-2.5z"})})]})}function _ee({children:e,user:t,logout:r}){const[a]=x.useState(()=>window.location.hash.startsWith("#local-connect=")?r7(window.location.hash)??!1:null),[i,c]=x.useState(""),u=x.useRef(null),f=a&&window.opener&&!window.opener.closed;return x.useEffect(()=>{if(!f)return;let m=!0;u.current??(u.current=c7(a));const h=setTimeout(()=>{m&&c("Could not reach local OpenRod. Close this window and try again.")},3e4);return u.current.then(({code:g})=>{m&&window.opener.postMessage({type:"openrod-local-connected",nonce:a.nonce,code:g},a.origin)}).catch(g=>{clearTimeout(h),m&&c(g.message)}),()=>{m=!1,clearTimeout(h)}},[a,f]),a===null?e:n.jsx("main",{className:"grid min-h-screen place-items-center px-6",children:n.jsxs("section",{className:"max-w-sm text-center",children:[f&&!i&&n.jsx(ZD,{}),n.jsx("h1",{className:"text-2xl font-semibold",children:i||!f?"Sign-in interrupted":"Finishing sign-in…"}),n.jsx("p",{className:"mt-3 text-sm text-muted-foreground",children:f&&!i?n.jsxs(n.Fragment,{children:["Signed in as ",t.email,".",n.jsx("br",{}),"High demand may slow this down."]}):"Start again from local OpenRod."}),i&&n.jsx("p",{role:"alert",className:"mt-4 text-sm text-destructive",children:i}),(i||!f)&&n.jsx("button",{className:"mt-5 block w-full text-xs underline",onClick:r,children:"Sign out"})]})})}function Lee({children:e}){var S,N;const t=js(),r=((S=t==null?void 0:t.status)==null?void 0:S.origin)||ku,{chooseGroups:a,dialog:i,cancel:c}=Xw(),u=x.useRef(new AbortController),f=x.useMemo(()=>lr("local",u.current.signal),[]),m=x.useRef(0);x.useEffect(()=>{const E=++m.current;return()=>queueMicrotask(()=>{m.current===E&&u.current.abort()})},[]);const h=x.useRef((N=/^#cloud-return=([a-f0-9-]{36})$/.exec(window.location.hash))==null?void 0:N[1]),[g,p]=x.useState(h.current&&window.opener?"waiting":"normal"),[b,v]=x.useState(""),w=x.useRef(!1),C=x.useRef(!1);return x.useEffect(()=>{if(g!=="waiting"||!(t!=null&&t.available)||!r)return;const E=async T=>{var R;if(!(w.current||T.origin!==r||T.source!==window.opener||((R=T.data)==null?void 0:R.type)!=="openrod-local-bundle"||T.data.nonce!==h.current)){w.current=!0,p("importing");try{if(typeof T.data.error=="string")throw Error(T.data.error);const A=(await f.inventory()).locations.find(_=>!_.remote&&_.connected);if(!A)throw Error("Connect a local gateway before importing this workspace.");const k=f.forContext(A.context),O=await a(k,"local OpenRod",u.current.signal);if(C.current)return;const D=await k.importCloud({...T.data.bundle,...O?{destinationGroups:O}:{}});if(window.opener.postMessage({type:"openrod-local-result",nonce:h.current,name:D.name},r),C.current)return;v(T.data.warning??"Workspace copied locally. Reconnect agent credentials to continue."),window.location.href=vg(D.name,"shell",{...A,target:"local"}),p("done")}catch(M){if(C.current||u.current.signal.aborted)return;v(M.message),p("error"),window.opener.postMessage({type:"openrod-local-result",nonce:h.current,error:M.message},r)}}};return window.addEventListener("message",E),window.opener.postMessage({type:"openrod-local-ready",nonce:h.current},r),()=>window.removeEventListener("message",E)},[g,r,t==null?void 0:t.available]),x.useEffect(()=>{if(!["waiting","importing"].includes(g))return;const E=Date.now()+35*6e4,T=setInterval(()=>{var R;((R=window.opener)!=null&&R.closed||Date.now()>E)&&(u.current.abort(),c(),v("The cloud tab closed or the copy timed out. Open the workspace to check whether a copy was created."),p("error"))},1e3);return()=>clearInterval(T)},[g]),g==="normal"||g==="done"?n.jsxs(n.Fragment,{children:[b&&n.jsx(Qa,{id:"local-return",tone:g==="done"?"success":"warning",title:g==="done"?"Workspace continued locally":"Workspace copy didn’t finish",onDismiss:()=>v(""),children:b}),e]}):n.jsxs(n.Fragment,{children:[i,n.jsx("main",{className:"grid min-h-screen place-items-center px-6",children:n.jsxs("section",{className:"max-w-md text-center",children:[n.jsx("h1",{className:"text-2xl font-semibold",children:"Continuing your workspace locally…"}),n.jsx("p",{className:"mt-3 text-sm text-muted-foreground",children:"Keep the cloud tab open while your files are copied and your template is rebuilt for this computer."}),b&&n.jsx("p",{role:"alert",className:"mt-4 text-sm text-destructive",children:b}),n.jsx("button",{className:"mt-6 text-sm underline",onClick:()=>{u.current.abort(),c(),C.current=!0,w.current=!0,window.location.hash="",p("normal")},children:"Open local workspace"})]})})]})}function $ee(e){try{if(!e.startsWith("#handoff="))return null;const t=JSON.parse(atob(e.slice(9).replaceAll("-","+").replaceAll("_","/"))),r=new URL(t.origin);return r.origin!==t.origin||r.protocol!=="http:"||!["localhost","127.0.0.1","[::1]"].includes(r.hostname)||!/^\d{1,5}$/.test(r.port)||!/^[a-f0-9-]{36}$/.test(t.nonce)?null:{origin:r.origin,nonce:t.nonce}}catch{return null}}async function hy(e,t="GET"){const r=await fetch(`/api/cloud/${e}`,{method:t,headers:t==="POST"?{"x-openshell-console":"1","content-type":"application/json"}:void 0,body:t==="POST"?"{}":void 0}),a=await r.json();if(!r.ok)throw Error(a.error??"Cloud machine unavailable");return a}function Bee({children:e,logout:t}){const[r,a]=x.useState(null),[i,c]=x.useState(""),[u,f]=x.useState(null),[m,h]=x.useState(!1),[g,p]=x.useReducer(S=>S+1,0);async function b(){h(!0),c("");try{a(await hy("machine","POST")),p()}catch(S){c(S.message)}finally{h(!1)}}const v=x.useRef($ee(window.location.hash)),w=x.useRef(!1);if(x.useEffect(()=>{let S=!0,N;async function E(){try{const T=await hy("machine");S&&(a(T),c(T.error??""),["ready","none","error"].includes(T.status)||(N=setTimeout(E,5e3)))}catch(T){S&&(c(T.message),N=setTimeout(E,1e4))}}return E(),()=>{S=!1,clearTimeout(N)}},[g]),x.useEffect(()=>{const S=v.current;if((r==null?void 0:r.status)!=="ready"||!S||!window.opener||w.current)return;w.current=!0,f({status:"waiting"});const N=R=>{var M;if(v.current&&!(R.source!==window.opener||R.origin!==S.origin||((M=R.data)==null?void 0:M.type)!=="openrod-cloud-result"||R.data.nonce!==S.nonce)){if(R.data.error){f({status:"error",message:R.data.error});return}f({status:"done",message:R.data.warning??"Workspace copied. Reconnect your agent credentials to continue."}),/^[a-z0-9-]{1,63}$/.test(R.data.name??"")&&(window.location.hash=`terminal/${R.data.name}?session=shell`)}};window.addEventListener("message",N),hy("handoff","POST").then(({ticket:R})=>window.opener.postMessage({type:"openrod-cloud-ready",nonce:S.nonce,ticket:R},S.origin)).catch(R=>f({status:"error",message:R.message}));const E=Date.now()+35*6e4,T=setInterval(()=>{var R;v.current&&((R=window.opener)!=null&&R.closed||Date.now()>E)&&(f({status:"error",message:"The source tab closed or the copy timed out. Open your workspace to check whether a copy was created."}),clearInterval(T))},1e3);return()=>{window.removeEventListener("message",N),clearInterval(T)}},[r==null?void 0:r.status]),(r==null?void 0:r.status)==="ready"&&(!u||u.status==="done"))return n.jsxs(n.Fragment,{children:[(u==null?void 0:u.message)&&n.jsx(Qa,{id:"cloud-transfer",tone:"success",title:"Workspace continued in the cloud",onDismiss:()=>f(null),children:u.message}),e]});const C=!u&&!i&&(m||r&&!["none","ready","error"].includes(r.status));return n.jsx("main",{className:"grid min-h-screen place-items-center px-6",children:n.jsxs("section",{className:"max-w-md text-center",children:[C&&n.jsx(ZD,{}),n.jsx("h1",{className:"text-2xl font-semibold",children:u?"Continuing your workspace…":!C&&(r==null?void 0:r.status)==="none"?"Start OpenRod Cloud":"Setting up your cloud machine…"}),n.jsx("p",{className:"mt-3 text-sm text-muted-foreground",children:u?"Keep your local OpenRod tab open.":C?"High demand may slow this down.":"The first start takes a few minutes."}),C&&n.jsxs("div",{role:"status",className:"mt-5 flex items-center justify-center gap-2 rounded-lg bg-muted/50 p-4 text-sm",children:[n.jsx(kt,{"aria-hidden":"true"}),n.jsx("span",{children:"Opens automatically when ready"})]}),(i||(u==null?void 0:u.message))&&n.jsx("p",{role:"alert",className:"mt-4 text-sm text-destructive",children:(u==null?void 0:u.message)??i}),!u&&((r==null?void 0:r.status)==="none"||i)&&n.jsxs(ie,{disabled:m,className:"mt-5",onClick:b,children:[m&&n.jsx(kt,{}),i?"Try again":"Start cloud machine"]}),u&&n.jsx("button",{onClick:()=>{v.current=null,f(null),window.location.hash=""},className:"mt-4 text-sm underline",children:"Open cloud workspace"}),n.jsx("button",{onClick:t,className:"mt-6 block w-full text-xs underline",children:"Sign out"})]})})}function Vee({localConnect:e=!1,error:t,busy:r,available:a,onLogin:i}){return n.jsx("main",{className:"grid min-h-svh grid-cols-1 place-items-center bg-background px-4 py-6 sm:px-6 sm:py-10",children:n.jsxs("section",{"aria-labelledby":"cloud-sign-in-title",className:"min-w-0 w-full max-w-sm rounded-xl border border-border bg-card px-5 py-7 text-center shadow-sm sm:px-8 sm:py-9",children:[n.jsx("img",{src:"/openrod.png",alt:"",width:"96",height:"96",className:"mx-auto mb-6 size-24 object-contain"}),n.jsx("h1",{id:"cloud-sign-in-title",className:"text-2xl font-semibold tracking-tight",children:"OpenRod Cloud"}),e&&n.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Sign in to connect this computer."}),n.jsx("button",{type:"button",disabled:!a||r,"aria-busy":r||void 0,onClick:i,className:"mt-7 inline-flex h-10 w-full items-center justify-center rounded-md bg-primary px-4 text-sm font-medium text-primary-foreground outline-none transition-colors hover:bg-primary/90 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",children:r?"Signing in…":"Continue with Google"}),t&&n.jsx("p",{role:"alert",className:"mt-4 text-xs leading-relaxed text-destructive",children:t})]})})}const Uee={"auth/network-request-failed":"Couldn’t reach Google. Check your connection and try again.","auth/popup-closed-by-user":"Sign-in cancelled.","auth/cancelled-popup-request":"Sign-in cancelled.","auth/popup-blocked":"Allow popups, then try again.","auth/unauthorized-domain":"Sign-in isn’t configured for this address. Contact your administrator.","auth/user-disabled":"This account is disabled. Contact your administrator.","auth/too-many-requests":"Too many attempts. Try again shortly."};function Hee(e){return Uee[e==null?void 0:e.code]||"Couldn’t sign in. Try again."}const AR=()=>Promise.all([gy(()=>import("./index.esm-Cj6nXjOx.js"),__vite__mapDeps([0,1])),gy(()=>import("./index.esm-Z1y-oluO.js"),__vite__mapDeps([2,1]))]);async function my(e,t){const r=await fetch(`/api/auth/${e}`,{method:t===void 0?"GET":"POST",headers:t===void 0?void 0:{"content-type":"application/json","x-openshell-console":"1"},body:t===void 0?void 0:JSON.stringify(t)}),a=await r.json();if(a.code===$i&&window.dispatchEvent(new Event($i)),!r.ok)throw Object.assign(new Error(a.error??"Sign-in unavailable"),{code:a.code});return a}function Fee(){var t;const e=js();return e!=null&&e.localViewer?null:n.jsxs("div",{className:"ml-auto flex items-center gap-3 text-xs",children:[n.jsx("span",{className:"max-w-40 truncate text-muted-foreground",children:(t=e==null?void 0:e.user)==null?void 0:t.email}),n.jsx("button",{className:"underline underline-offset-4",onClick:e==null?void 0:e.logout,children:"Sign out"})]})}function Gee({children:e}){const[t,r]=x.useState(null),[a,i]=x.useState(null),[c,u]=x.useState(!0),[f,m]=x.useState(""),[h,g]=x.useState(!1),[p,b]=x.useState(!1);x.useEffect(()=>{let C=!0;async function S(){try{const T=await my("config");if(!["local","cloud"].includes(T.mode))throw Error("Invalid console configuration");if(!C)return;if(ln.configure({mode:T.mode,enabled:T.telemetryEnabled===!0}),r(T),T.mode==="cloud"){const R=await fetch("/api/auth/me");if(R.ok){const M=await R.json();C&&i(M.user)}else if(R.status!==401){const M=await R.json();throw Error(M.error??"Authentication unavailable")}}}catch(T){C&&m(T.message)}finally{C&&u(!1)}}S();const N=()=>{i(null),m("Your session expired. Sign in again.")},E=()=>{ln.stop(),g(!0)};return window.addEventListener("openrod-session-expired",N),window.addEventListener($i,E),()=>{C=!1,window.removeEventListener("openrod-session-expired",N),window.removeEventListener($i,E)}},[]),x.useEffect(()=>{t!=null&&t.firebase&&!a&&AR().catch(()=>{})},[t==null?void 0:t.firebase,a]);async function v(){if(p||!(t!=null&&t.firebase))return;b(!0),m("");let C,S;try{const[{initializeApp:N,getApps:E},T]=await AR();S=T;const R=E().find(O=>O.name==="openrod-cloud")??N(t.firebase,"openrod-cloud");C=S.getAuth(R),await S.setPersistence(C,S.inMemoryPersistence);const M=new S.GoogleAuthProvider;M.setCustomParameters({prompt:"select_account"});const A=await S.signInWithPopup(C,M),k=await my("session",{idToken:await A.user.getIdToken(!0)});i(k.user)}catch(N){m(Hee(N))}finally{C&&await S.signOut(C).catch(()=>{}),b(!1)}}async function w(){try{await my("logout",{})}catch(C){m(C.message)}finally{i(null)}}return h?n.jsx("main",{className:"grid min-h-screen place-items-center bg-background px-6",children:n.jsxs("section",{className:"w-full max-w-md rounded-xl border border-border bg-card p-8 text-center shadow-sm",children:[n.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:"Open the console link"}),n.jsxs("p",{className:"mt-3 text-sm text-muted-foreground",children:["Open the link printed by ",n.jsx("code",{className:"rounded bg-muted px-1 py-0.5 font-mono text-foreground",children:"openrod"})," in your terminal. It carries a secret that changes every time the console starts, so open the new link after a restart."]})]})}):c?n.jsx("div",{className:"grid min-h-screen place-items-center text-sm text-muted-foreground",children:"Loading OpenRod…"}):(t==null?void 0:t.mode)==="local"?n.jsx(m7,{children:n.jsx(Lee,{children:n.jsx(dZ,{children:e})})}):a?n.jsx(_ee,{user:a,logout:w,children:n.jsx(f7,{user:a,logout:w,children:n.jsx(Bee,{logout:w,children:e},a.uid)})}):n.jsx(Vee,{localConnect:window.location.hash.startsWith("#local-connect="),error:f,busy:p,available:!!(t!=null&&t.firebase),onLogin:v})}const MR=e=>e?JSON.stringify([e.target??"local",e.context]):null;function qee(e,t,r="local"){return e.find(a=>a.target===r&&!a.remote&&a.connected)??e.find(a=>a.target===r&&a.connected)??null}const $x=[{id:"groups",label:"Groups",description:"Definitions and policy relationships"},{id:"network",label:"Network",description:"Egress rules with destination targets"},{id:"setups",label:"MCPs & Skills",description:"Saved setups and skill files"},{id:"templates",label:"Templates",description:"Portable image recipes"},{id:"activity",label:"Activity history",description:"Historical events, in batches of up to 500",optional:!0}],Yee=$x.filter(e=>!e.optional).map(e=>e.id),Ul=e=>["running","cancelling"].includes(e==null?void 0:e.status),Kee=e=>e&&!["planned","running","cancelling"].includes(e.status);function Xee(e,t){var c;const r=new Map(e.map(u=>[u.key,u])),a=new Set;function i(u){if(a.has(u))return;const f=r.get(u);if(!f)throw new Error(`Missing import dependency: ${u}`);a.add(u);for(const m of f.dependencies??[])i(m)}t.forEach(i);for(let u=-1;u!==a.size;){u=a.size;for(const f of e)(c=f.requiredForGroups)!=null&&c.some(m=>a.has(`groups:${m}`))&&i(f.key)}return[...a]}const Ts=e=>(e==null?void 0:e.id)??JSON.stringify([e==null?void 0:e.target,e==null?void 0:e.context]);function OR({from:e="",to:t="",offset:r=0,snapshot:a}={}){const i={offset:r};for(const[c,u]of Object.entries({from:e,to:t})){if(!u)continue;const f=new Date(u);if(!Number.isFinite(f.getTime()))throw new Error("Choose a valid activity date range.");i[c]=f.toISOString()}if(i.from&&i.to&&i.from>i.to)throw new Error("Activity start must be before its end.");return a!=null&&(i.snapshot=a),i}function DR(e){var r;if(!((r=e==null?void 0:e.items)!=null&&r.length))return 0;const t=e.items.filter(a=>["created","completed","reused","skipped","blocked","failed","cancelled"].includes(a.status)).length;return Math.round(t/e.items.length*100)}function Wee(e){const t=[...$x,{id:"policyTemplates",label:"Base policies"}].map(a=>({...a,items:e.filter(i=>i.type===a.id)})),r=e.filter(a=>!t.some(i=>i.id===a.type));return r.length&&t.push({id:"other",label:"Other resources",items:r}),t.filter(a=>a.items.length).map(a=>{if(a.id!=="setups")return a;const i=u=>{var f;return new Set((((f=u.data)==null?void 0:f.items)??[]).map(m=>m.kind))},c=u=>{const f=i(u);return f.has("mcp")&&f.has("skill")?"mixed":f.has("mcp")?"mcps":f.has("skill")?"skills":"saved"};return{...a,groups:[{id:"mcps",label:"MCPs"},{id:"skills",label:"Skills"},{id:"mixed",label:"MCPs & Skills together"},{id:"saved",label:"Saved setups"}].map(u=>({...u,items:a.items.filter(f=>c(f)===u.id)})).filter(u=>u.items.length)}})}const Yd={...Object.fromEntries($x.map(e=>[e.id,e.label])),policyTemplates:"Base policy"},py=e=>({created:"Imported",completed:"Imported",reused:"Reused",failed:"Failed",blocked:"Dependency failed",pending:"Waiting",running:"Importing",cancelled:"Cancelled",skipped:"Skipped",planned:"Ready to import",partial:"Needs attention",interrupted:"Interrupted"})[e]??e;function Qee({request:e,onClose:t}){var ve,Ce,Ie,de,Te,oe,fe,Re,Oe,ke;const r=js(),a=Bf(),i=vo(),[c,u]=x.useState(""),[f,m]=x.useState(()=>e!=null&&e.destination?Ts(e.destination):r!=null&&r.localViewer?"cloud":""),[h,g]=x.useState((e==null?void 0:e.destination)??null),[p,b]=x.useState(()=>e!=null&&e.type&&Yd[e.type]?[e.type]:Yee),[v,w]=x.useState({from:"",to:""}),[C,S]=x.useState(null),[N,E]=x.useState({}),[T,R]=x.useState(null),[M,A]=x.useState([]),[k,O]=x.useState(null),[D,_]=x.useState([]),[H,G]=x.useState(""),[B,P]=x.useState(""),[V,Y]=x.useState(null),W=i.locations.filter(he=>he.connected),q=h&&(i.locations.find(he=>Ts(he)===Ts(h))??h),ee=q!=null&&q.connected&&!W.some(he=>Ts(he)===Ts(h))?[...W,q]:W,z=ee.find(he=>Ts(he)===c),L=ee.find(he=>Ts(he)===f),X=x.useRef(new AbortController),te=x.useRef(0);x.useEffect(()=>{const he=++te.current;return()=>queueMicrotask(()=>{te.current===he&&X.current.abort()})},[]);const $=x.useRef(((ve=r==null?void 0:r.status)==null?void 0:ve.owner)??null);!$.current&&((Ce=r==null?void 0:r.status)!=null&&Ce.owner)&&($.current=r.status.owner);const U=x.useMemo(()=>a.signal?AbortSignal.any([a.signal,X.current.signal]):X.current.signal,[a.signal]),F=x.useCallback(he=>lr(r!=null&&r.localViewer?he.target:a.target,U,he.context,$.current),[r==null?void 0:r.localViewer,a.target,U]);x.useEffect(()=>{!c&&W.length&&u(Ts(W.find(he=>!he.cloud&&!he.remote)??W[0]))},[c,W.map(Ts).join("|")]),x.useEffect(()=>{if(f!=="cloud")return;const he=ee.find(Ae=>(Ae.cloud||Ae.target==="cloud")&&Ae.connected);he&&m(Ts(he))},[f,ee.map(he=>`${Ts(he)}:${he.connected}`).join("|")]),x.useEffect(()=>{if(_([]),!(L!=null&&L.connected))return;const he=F(L);let Ae=!0;return he.importJobs().then(ge=>{Ae&&_(ge.jobs??[])}).catch(()=>{Ae&&_([])}),()=>{Ae=!1}},[f,L==null?void 0:L.context,L==null?void 0:L.connected,F,k==null?void 0:k.id,k==null?void 0:k.status]),x.useEffect(()=>{if(!k||!Ul(k)||!V)return;let he=!0,Ae;const ge=async()=>{try{const Pe=await V.importJob(k.id);if(!he)return;O(Pe),Ul(Pe)?Ae=setTimeout(ge,1e3):(i.refresh(),window.dispatchEvent(new Event("openrod-resources-changed")))}catch(Pe){he&&(P(Pe.message),Ae=setTimeout(ge,3e3))}};return ge(),()=>{he=!1,clearTimeout(Ae)}},[k==null?void 0:k.id,k==null?void 0:k.status,V]);async function K(he,Ae){G(he),P("");try{await Ae()}catch(ge){ge.name!=="AbortError"&&P(ge.message)}finally{U.aborted||G("")}}async function se(){var Fe;if(L!=null&&L.connected)return L;if(f!=="cloud")throw Error("Choose a connected destination.");if(!(r!=null&&r.localViewer))throw Error("Choose the cloud workspace from the list.");U.throwIfAborted(),G(r.connected?"Preparing cloud workspace…":"Connecting to OpenRod Cloud…");const he=await r.prepare({signal:U,onProgress:()=>{U.aborted||G("Preparing cloud workspace…")}});if($.current&&$.current!==he.owner)throw Error("Your cloud account changed. Start a new import.");$.current=he.owner,U.throwIfAborted();const ge=(Fe=(await Ha("inventory",void 0,{signal:U,owner:he.owner})).locations)==null?void 0:Fe.find(_e=>_e.connected);if(!ge)throw Error("The cloud gateway is still preparing. Try again shortly.");const Pe={...ge,cloud:!0,target:"cloud",label:"OpenRod Cloud",id:JSON.stringify(["cloud",ge.context])};return g(Pe),m(Pe.id),i.refresh(),Pe}async function ne(he=v){if(!z)throw Error("Choose a connected source.");const Ae=F(z),ge=p.includes("activity")?OR(he):void 0,Pe=await se();if(U.throwIfAborted(),G("Reading configuration…"),Ts(z)===Ts(Pe))throw Error("Choose a different destination.");const Fe=F(Pe),_e=await Fe.importCapabilities(),Xe=p.filter(ct=>{var At,rt;return!((rt=(At=_e.types)==null?void 0:At[ct])!=null&&rt.supported)});if(Xe.length)throw Error(`This destination cannot import ${Xe.map(ct=>Yd[ct]).join(", ")}.`);const Je=await Ae.exportResources({types:p,...ge?{activity:ge}:{}});S(_e),E({}),Y(Fe),R(Je),A(Je.resources.filter(ct=>p.includes(ct.type)).map(ct=>ct.key))}const ye=x.useMemo(()=>{try{const he=T?Xee(T.resources,M):[],Ae=[...new Set((T==null?void 0:T.resources.filter(ge=>{var Pe,Fe;return he.includes(ge.key)&&C&&!((Fe=(Pe=C.types)==null?void 0:Pe[ge.type])!=null&&Fe.supported)}).map(ge=>ge.type))??[])];return{included:he,error:Ae.length?`Required dependencies cannot be imported here: ${Ae.map(ge=>Yd[ge]??ge).join(", ")}.`:""}}catch(he){return{included:M,error:`${he.message}. Deselect the resource that requires it, or fix the source and read it again.`}}},[T,M,C]);async function ae(he,Ae){const ge={...N};Ae==="reuse"?ge[he.key]={action:Ae,targetId:he.sourceId}:delete ge[he.key];const Pe=await V.planImport({bundle:T,selection:M,conflicts:ge});E(ge),O(Pe)}const le=ye.included,re=k?"result":T?"select":"source",Q=!!H||Ul(k);function Z(){R(null),O(null),A([]),E({}),w(he=>({from:he.from,to:he.to})),P("")}const pe=he=>{var Ae;return n.jsxs("label",{className:"flex items-start gap-3 p-3",children:[n.jsx($o,{"aria-label":`Import ${he.name}`,checked:le.includes(he.key),disabled:Q||!M.includes(he.key)&&le.includes(he.key),onCheckedChange:ge=>A(Pe=>ge?[...Pe,he.key]:Pe.filter(Fe=>Fe!==he.key))}),n.jsxs("span",{className:"min-w-0 flex-1",children:[n.jsx("span",{className:"block truncate text-xs font-medium",children:he.name}),n.jsx("span",{className:"text-[11px] text-muted-foreground",children:le.includes(he.key)&&!M.includes(he.key)?"Required dependency":""}),he.type==="setups"&&["mcp","skill"].map(ge=>{var Fe;const Pe=(((Fe=he.data)==null?void 0:Fe.items)??[]).filter(_e=>_e.kind===ge);return Pe.length>0&&n.jsxs("span",{className:"mt-1 block text-[11px] leading-relaxed text-muted-foreground",children:[n.jsxs("span",{className:"font-medium",children:[ge==="mcp"?"MCPs":"Skills",":"]})," ",Pe.map(_e=>_e.name).join(", ")]},ge)}),(Ae=he.warnings)==null?void 0:Ae.map((ge,Pe)=>n.jsx("span",{className:"mt-1 block text-[11px] text-amber-700 dark:text-amber-400",children:ge},Pe))]})]},he.key)},ue=k?`${((Ie=k.counts)==null?void 0:Ie.completed)??0} of ${k.items.length} resources complete. Your source stays available.`:T?"Choose what to copy. Required dependencies are included in the review.":"Copy saved configuration between your computer, connected hosts, and OpenRod Cloud.";return n.jsx(en,{open:!0,onOpenChange:he=>{!he&&!H&&t()},children:n.jsxs(tn,{className:"gap-4 sm:max-w-xl",children:[n.jsxs(nn,{className:"pr-6",children:[n.jsx(Qt,{children:k?py(k.status):"Import data"}),n.jsx(Sn,{className:"text-xs leading-relaxed",children:ue})]}),n.jsx("div",{className:"flex items-center gap-2 text-[11px] text-muted-foreground","aria-label":"Import steps",children:["Locations","Selection","Review & import"].map((he,Ae)=>n.jsxs(x.Fragment,{children:[Ae>0&&n.jsx(mu,{className:"size-3"}),n.jsx("span",{className:Ae===(re==="source"?0:re==="select"?1:2)?"font-medium text-foreground":"",children:he})]},he))}),n.jsxs("div",{className:"max-h-[60svh] overflow-y-auto pr-1",children:[re==="source"&&n.jsxs(ho,{duration:.15,offset:3,className:"space-y-5",children:[n.jsxs("div",{className:"grid grid-cols-[1fr_auto_1fr] items-end gap-3",children:[n.jsxs("label",{className:"grid gap-2 text-xs font-medium",children:["From",n.jsxs(pn,{"aria-label":"Import source",value:c,onChange:he=>{u(he.target.value),w(Ae=>({from:Ae.from,to:Ae.to}))},disabled:Q,className:"w-full text-xs",children:[n.jsx("option",{value:"",children:"Choose source"}),W.map(he=>n.jsx("option",{value:Ts(he),children:Dn(he)},Ts(he)))]})]}),n.jsx(mu,{className:"mb-2 size-4 text-muted-foreground"}),n.jsxs("label",{className:"grid gap-2 text-xs font-medium",children:["To",n.jsxs(pn,{"aria-label":"Import destination",value:f,onChange:he=>{m(he.target.value),_([])},disabled:Q,className:"w-full text-xs",children:[n.jsx("option",{value:"",children:"Choose destination"}),(r==null?void 0:r.localViewer)&&(f==="cloud"||!ee.some(he=>he.cloud||he.target==="cloud"))&&n.jsxs("option",{value:"cloud",disabled:!(r!=null&&r.available),children:["OpenRod Cloud",r!=null&&r.available?"":" · Coming soon"]}),ee.map(he=>n.jsx("option",{value:Ts(he),disabled:Ts(he)===c,children:Dn(he)},Ts(he)))]})]})]}),n.jsxs("fieldset",{className:"space-y-1",children:[n.jsx("legend",{className:"mb-2 text-xs font-medium",children:"Include"}),$x.map(he=>n.jsxs("label",{className:"flex cursor-pointer items-center gap-3 rounded-md p-2 hover:bg-muted/50",children:[n.jsx($o,{checked:p.includes(he.id),disabled:Q,onCheckedChange:Ae=>b(ge=>Ae?[...ge,he.id]:ge.filter(Pe=>Pe!==he.id))}),n.jsxs("span",{children:[n.jsx("span",{className:"block text-xs font-medium",children:he.label}),n.jsx("span",{className:"text-[11px] text-muted-foreground",children:he.description})]})]},he.id))]}),p.includes("activity")&&n.jsxs("div",{className:"grid gap-2 rounded-lg border bg-muted/20 p-3",children:[n.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Up to 500 events per reviewed batch. Leave dates empty for the latest history. Dates use your current timezone."}),n.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[n.jsxs("label",{className:"grid gap-1.5 text-[11px]",children:["From",n.jsx(Ot,{type:"datetime-local",value:v.from,disabled:Q,onChange:he=>w(Ae=>({from:he.target.value,to:Ae.to})),className:"text-xs"})]}),n.jsxs("label",{className:"grid gap-1.5 text-[11px]",children:["To",n.jsx(Ot,{type:"datetime-local",value:v.to,disabled:Q,onChange:he=>w(Ae=>({from:Ae.from,to:he.target.value})),className:"text-xs"})]})]})]}),n.jsx("p",{className:"rounded-md border border-border bg-muted/20 p-3 text-[11px] leading-relaxed text-muted-foreground",children:"Credentials must be connected at the destination. Sandbox workspace copying is available from each sandbox. Activity history is copied only when selected; raw payloads and credential values are excluded."}),D.length>0&&n.jsxs("div",{className:"space-y-1 border-t pt-3",children:[n.jsx("p",{className:"mb-2 text-xs font-medium",children:"Recent imports at this destination"}),D.slice(0,5).map(he=>{var Ae,ge,Pe;return n.jsxs("button",{className:"flex w-full items-center justify-between rounded-md p-2 text-left text-xs hover:bg-muted",disabled:Q,onClick:()=>{Y(F(L)),O(he)},children:[n.jsxs("span",{children:[((Ae=he.source)==null?void 0:Ae.label)||"Configuration import"," ",n.jsxs("span",{className:"text-muted-foreground",children:["· ",((ge=he.items)==null?void 0:ge.length)??((Pe=he.counts)==null?void 0:Pe.total)??0," resources"]})]}),n.jsx("span",{className:"text-[11px] text-muted-foreground",children:py(he.status)})]},he.id)})]})]}),re==="select"&&n.jsxs("div",{className:"space-y-3",children:[n.jsxs("p",{className:"flex items-center gap-2 text-xs",children:[n.jsx("span",{children:Dn(z)}),n.jsx(mu,{className:"size-3 text-muted-foreground"}),n.jsx("span",{children:Dn(L)})]}),!T.resources.length&&n.jsx("p",{className:"py-8 text-center text-xs text-muted-foreground",children:"No saved resources were found for these categories. For MCPs and skills, use Bring my setup on the source first."}),n.jsxs("div",{className:"flex items-center justify-between text-[11px] text-muted-foreground",children:[n.jsxs("span",{children:[le.length," selected",le.length>M.length?` · ${le.length-M.length} required dependencies`:""]}),n.jsx(ie,{variant:"ghost",size:"sm",disabled:Q,onClick:()=>A(M.length?[]:T.resources.filter(he=>p.includes(he.type)).map(he=>he.key)),children:M.length?"Clear selection":"Select all"})]}),n.jsx("div",{className:"space-y-5",children:Wee(T.resources).map(he=>n.jsxs("section",{"aria-labelledby":`import-section-${he.id}`,className:"space-y-2",children:[n.jsxs("h3",{id:`import-section-${he.id}`,className:"flex items-center justify-between text-xs font-semibold",children:[n.jsx("span",{children:he.label}),n.jsxs("span",{className:"text-[11px] font-normal tabular-nums text-muted-foreground",children:[he.items.filter(Ae=>le.includes(Ae.key)).length," / ",he.items.length]})]}),he.groups?n.jsx("div",{className:"space-y-3",children:he.groups.map(Ae=>n.jsxs("section",{"aria-labelledby":`import-subsection-${Ae.id}`,className:"space-y-1.5",children:[n.jsx("h4",{id:`import-subsection-${Ae.id}`,className:"text-[11px] font-medium text-muted-foreground",children:Ae.label}),n.jsx("div",{className:"divide-y rounded-lg border",children:Ae.items.map(pe)})]},Ae.id))}):n.jsx("div",{className:"divide-y rounded-lg border",children:he.items.map(pe)})]},he.id))}),ye.error&&n.jsx("p",{role:"alert",className:"text-xs text-destructive",children:ye.error}),((de=T.pages)==null?void 0:de.activity)&&n.jsxs("p",{className:"text-[11px] text-muted-foreground",children:[T.pages.activity.exported," of ",T.pages.activity.total," matching activity events in this batch.",T.pages.activity.nextOffset!=null?" After importing, load the next batch to continue with older history.":""]}),((Te=T.excluded)==null?void 0:Te.length)>0&&n.jsxs("details",{className:"text-[11px] text-muted-foreground",children:[n.jsxs("summary",{className:"cursor-pointer",children:[T.excluded.length," excluded or needing attention"]}),n.jsx("ul",{className:"mt-2 space-y-1",children:T.excluded.map((he,Ae)=>n.jsxs("li",{children:[he.name??Yd[he.type]??he.type,": ",he.reason]},Ae))})]})]}),k&&n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"flex items-center justify-between text-xs",children:[n.jsxs("span",{children:[((oe=k.source)==null?void 0:oe.label)||"Source"," → ",L?Dn(L):"Destination"]}),n.jsxs("span",{className:"text-muted-foreground",children:[k.items.length," resources"]})]}),k.status!=="planned"&&n.jsx("div",{role:"progressbar","aria-label":"Import progress","aria-valuenow":DR(k),"aria-valuemin":0,"aria-valuemax":100,className:"h-1 overflow-hidden rounded-full bg-muted",children:n.jsx("div",{className:"h-full bg-primary transition-[width] motion-reduce:transition-none",style:{width:`${DR(k)}%`}})}),n.jsx("div",{className:"divide-y rounded-lg border",children:k.items.map(he=>{var Ae;return n.jsxs("div",{className:"flex items-start gap-3 p-3",children:[he.status==="running"?n.jsx(kt,{className:"mt-0.5 size-3.5"}):["created","completed","reused"].includes(he.status)?n.jsx(Yn,{className:"mt-0.5 size-3.5 text-emerald-600"}):he.status==="failed"?n.jsx(In,{className:"mt-0.5 size-3.5 text-destructive"}):n.jsx(gf,{className:"mt-0.5 size-3.5 text-muted-foreground"}),n.jsxs("span",{className:"min-w-0 flex-1",children:[n.jsx("span",{className:"block truncate text-xs font-medium",children:he.name}),n.jsxs("span",{className:"block text-[11px] text-muted-foreground",children:[Yd[he.type]," · ",k.status==="planned"?he.action==="reuse"?"Use existing":"Create a copy":py(he.status)]}),(Ae=he.warnings)==null?void 0:Ae.map((ge,Pe)=>n.jsx("span",{className:"mt-1 block text-[11px] text-amber-700 dark:text-amber-400",children:ge},Pe)),he.error&&n.jsx("span",{className:"mt-1 block text-[11px] text-destructive",children:typeof he.error=="string"?he.error:he.error.message}),k.status==="planned"&&T&&he.type!=="activity"&&n.jsxs(pn,{"aria-label":`Import action for ${he.name}`,value:he.action,disabled:Q,onChange:ge=>K("Updating review…",()=>ae(he,ge.target.value)),className:"mt-2 h-7 w-fit min-w-40 text-[11px]",children:[n.jsx("option",{value:"create",children:"Create a copy"}),n.jsx("option",{value:"reuse",children:"Use identical existing"})]})]})]},he.key)})}),k.status==="planned"&&T&&n.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Existing resources can be reused only when their ID and configuration match. Copies receive a new ID when needed."}),(fe=k.warnings)==null?void 0:fe.map((he,Ae)=>n.jsx("p",{className:"text-[11px] text-muted-foreground",children:he},Ae)),Ul(k)&&n.jsx("p",{className:"text-[11px] text-muted-foreground",children:"You can close this dialog. Reopen Import data at this destination to check progress."})]})]}),B&&n.jsx("p",{role:"alert",className:"text-xs text-destructive",children:B}),n.jsxs(Hr,{children:[H&&!Ul(k)&&n.jsx(ie,{size:"sm",variant:"ghost",onClick:()=>{X.current.abort(),t()},children:"Cancel"}),re!=="source"&&!Ul(k)&&n.jsx(ie,{size:"sm",variant:"ghost",disabled:!!H,onClick:Z,children:"Start another import"}),re==="source"&&n.jsxs(ie,{size:"sm",disabled:Q||!z||!f||!p.length||c===f||f==="cloud"&&!(r!=null&&r.available),onClick:()=>K("Reading configuration…",()=>ne()),children:[H?n.jsx(kt,{}):n.jsx(gf,{}),H||"Choose resources"]}),re==="select"&&n.jsxs(ie,{size:"sm",disabled:Q||!M.length||!!ye.error,onClick:()=>K("Preparing review…",async()=>O(await V.planImport({bundle:T,selection:M,conflicts:N}))),children:[H&&n.jsx(kt,{}),H||`Review ${le.length} resources`]}),(k==null?void 0:k.status)==="planned"&&n.jsxs(ie,{size:"sm",disabled:Q,onClick:()=>K("Starting import…",async()=>O(await V.executeImport(k.id))),children:[H&&n.jsx(kt,{}),H||"Import selected data"]}),Ul(k)&&n.jsx(ie,{size:"sm",variant:"outline",disabled:!!H||k.cancelRequested||k.status==="cancelling",onClick:()=>K("Cancelling…",async()=>O(await V.cancelImport(k.id))),children:k.cancelRequested?"Cancelling…":"Cancel import"}),Kee(k)&&(((Re=k.counts)==null?void 0:Re.failed)>0||k.items.some(he=>["failed","blocked","cancelled","pending"].includes(he.status)))&&n.jsxs(ie,{size:"sm",disabled:!!H,onClick:()=>K("Retrying…",async()=>O(await V.retryImport(k.id))),children:[n.jsx(PA,{}),"Retry unfinished"]}),(k==null?void 0:k.status)==="completed"&&k.items.some(he=>he.type==="activity")&&((ke=(Oe=T==null?void 0:T.pages)==null?void 0:Oe.activity)==null?void 0:ke.nextOffset)!=null&&n.jsx(ie,{size:"sm",variant:"outline",disabled:!!H||!z,onClick:()=>K("Reading older history…",async()=>{const he={...v,offset:T.pages.activity.nextOffset,snapshot:T.pages.activity.snapshot};w(he),b(["activity"]);const ge=await F(z).exportResources({types:["activity"],activity:OR(he)});R(ge),A(ge.resources.map(Pe=>Pe.key)),E({}),O(null)}),children:"Next history batch"}),k&&k.status!=="planned"&&n.jsx(ie,{size:"sm",variant:"outline",onClick:t,children:"Close"})]})]})})}var Jw={};(function e(t,r,a,i){var c=!!(t.Worker&&t.Blob&&t.Promise&&t.OffscreenCanvas&&t.OffscreenCanvasRenderingContext2D&&t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype.transferControlToOffscreen&&t.URL&&t.URL.createObjectURL),u=typeof Path2D=="function"&&typeof DOMMatrix=="function",f=(function(){if(!t.OffscreenCanvas)return!1;try{var z=new OffscreenCanvas(1,1),L=z.getContext("2d");L.fillRect(0,0,1,1);var X=z.transferToImageBitmap();L.createPattern(X,"no-repeat")}catch{return!1}return!0})();function m(){}function h(z){var L=r.exports.Promise,X=L!==void 0?L:t.Promise;return typeof X=="function"?new X(z):(z(m,m),null)}var g=(function(z,L){return{transform:function(X){if(z)return X;if(L.has(X))return L.get(X);var te=new OffscreenCanvas(X.width,X.height),$=te.getContext("2d");return $.drawImage(X,0,0),L.set(X,te),te},clear:function(){L.clear()}}})(f,new Map),p=(function(){var z=Math.floor(16.666666666666668),L,X,te={},$=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(L=function(U){var F=Math.random();return te[F]=requestAnimationFrame(function K(se){$===se||$+z-1<se?($=se,delete te[F],U()):te[F]=requestAnimationFrame(K)}),F},X=function(U){te[U]&&cancelAnimationFrame(te[U])}):(L=function(U){return setTimeout(U,z)},X=function(U){return clearTimeout(U)}),{frame:L,cancel:X}})(),b=(function(){var z,L,X={};function te($){function U(F,K){$.postMessage({options:F||{},callback:K})}$.init=function(K){var se=K.transferControlToOffscreen();$.postMessage({canvas:se},[se])},$.fire=function(K,se,ne){if(L)return U(K,null),L;var ye=Math.random().toString(36).slice(2);return L=h(function(ae){function le(re){re.data.callback===ye&&(delete X[ye],$.removeEventListener("message",le),L=null,g.clear(),ne(),ae())}$.addEventListener("message",le),U(K,ye),X[ye]=le.bind(null,{data:{callback:ye}})}),L},$.reset=function(){$.postMessage({reset:!0});for(var K in X)X[K](),delete X[K]}}return function(){if(z)return z;if(!a&&c){var $=["var CONFETTI, SIZE = {}, module = {};","("+e.toString()+")(this, module, true, SIZE);","onmessage = function(msg) {"," if (msg.data.options) {"," CONFETTI(msg.data.options).then(function () {"," if (msg.data.callback) {"," postMessage({ callback: msg.data.callback });"," }"," });"," } else if (msg.data.reset) {"," CONFETTI && CONFETTI.reset();"," } else if (msg.data.resize) {"," SIZE.width = msg.data.resize.width;"," SIZE.height = msg.data.resize.height;"," } else if (msg.data.canvas) {"," SIZE.width = msg.data.canvas.width;"," SIZE.height = msg.data.canvas.height;"," CONFETTI = module.exports.create(msg.data.canvas);"," }","}"].join(`
553
+ `);try{z=new Worker(URL.createObjectURL(new Blob([$])))}catch(U){return typeof console<"u"&&typeof console.warn=="function"&&console.warn("🎊 Could not load worker",U),null}te(z)}return z}})(),v={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,x:.5,y:.5,shapes:["square","circle"],zIndex:100,colors:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],disableForReducedMotion:!1,scalar:1};function w(z,L){return L?L(z):z}function C(z){return z!=null}function S(z,L,X){return w(z&&C(z[L])?z[L]:v[L],X)}function N(z){return z<0?0:Math.floor(z)}function E(z,L){return Math.floor(Math.random()*(L-z))+z}function T(z){return parseInt(z,16)}function R(z){return z.map(M)}function M(z){var L=String(z).replace(/[^0-9a-f]/gi,"");return L.length<6&&(L=L[0]+L[0]+L[1]+L[1]+L[2]+L[2]),{r:T(L.substring(0,2)),g:T(L.substring(2,4)),b:T(L.substring(4,6))}}function A(z){var L=S(z,"origin",Object);return L.x=S(L,"x",Number),L.y=S(L,"y",Number),L}function k(z){z.width=document.documentElement.clientWidth,z.height=document.documentElement.clientHeight}function O(z){var L=z.getBoundingClientRect();z.width=L.width,z.height=L.height}function D(z){var L=document.createElement("canvas");return L.style.position="fixed",L.style.top="0px",L.style.left="0px",L.style.pointerEvents="none",L.style.zIndex=z,L}function _(z,L,X,te,$,U,F,K,se){z.save(),z.translate(L,X),z.rotate(U),z.scale(te,$),z.arc(0,0,1,F,K,se),z.restore()}function H(z){var L=z.angle*(Math.PI/180),X=z.spread*(Math.PI/180);return{x:z.x,y:z.y,wobble:Math.random()*10,wobbleSpeed:Math.min(.11,Math.random()*.1+.05),velocity:z.startVelocity*.5+Math.random()*z.startVelocity,angle2D:-L+(.5*X-Math.random()*X),tiltAngle:(Math.random()*(.75-.25)+.25)*Math.PI,color:z.color,shape:z.shape,tick:0,totalTicks:z.ticks,decay:z.decay,drift:z.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:z.gravity*3,ovalScalar:.6,scalar:z.scalar,flat:z.flat}}function G(z,L){L.x+=Math.cos(L.angle2D)*L.velocity+L.drift,L.y+=Math.sin(L.angle2D)*L.velocity+L.gravity,L.velocity*=L.decay,L.flat?(L.wobble=0,L.wobbleX=L.x+10*L.scalar,L.wobbleY=L.y+10*L.scalar,L.tiltSin=0,L.tiltCos=0,L.random=1):(L.wobble+=L.wobbleSpeed,L.wobbleX=L.x+10*L.scalar*Math.cos(L.wobble),L.wobbleY=L.y+10*L.scalar*Math.sin(L.wobble),L.tiltAngle+=.1,L.tiltSin=Math.sin(L.tiltAngle),L.tiltCos=Math.cos(L.tiltAngle),L.random=Math.random()+2);var X=L.tick++/L.totalTicks,te=L.x+L.random*L.tiltCos,$=L.y+L.random*L.tiltSin,U=L.wobbleX+L.random*L.tiltCos,F=L.wobbleY+L.random*L.tiltSin;if(z.fillStyle="rgba("+L.color.r+", "+L.color.g+", "+L.color.b+", "+(1-X)+")",z.beginPath(),u&&L.shape.type==="path"&&typeof L.shape.path=="string"&&Array.isArray(L.shape.matrix))z.fill(W(L.shape.path,L.shape.matrix,L.x,L.y,Math.abs(U-te)*.1,Math.abs(F-$)*.1,Math.PI/10*L.wobble));else if(L.shape.type==="bitmap"){var K=Math.PI/10*L.wobble,se=Math.abs(U-te)*.1,ne=Math.abs(F-$)*.1,ye=L.shape.bitmap.width*L.scalar,ae=L.shape.bitmap.height*L.scalar,le=new DOMMatrix([Math.cos(K)*se,Math.sin(K)*se,-Math.sin(K)*ne,Math.cos(K)*ne,L.x,L.y]);le.multiplySelf(new DOMMatrix(L.shape.matrix));var re=z.createPattern(g.transform(L.shape.bitmap),"no-repeat");re.setTransform(le),z.globalAlpha=1-X,z.fillStyle=re,z.fillRect(L.x-ye/2,L.y-ae/2,ye,ae),z.globalAlpha=1}else if(L.shape==="circle")z.ellipse?z.ellipse(L.x,L.y,Math.abs(U-te)*L.ovalScalar,Math.abs(F-$)*L.ovalScalar,Math.PI/10*L.wobble,0,2*Math.PI):_(z,L.x,L.y,Math.abs(U-te)*L.ovalScalar,Math.abs(F-$)*L.ovalScalar,Math.PI/10*L.wobble,0,2*Math.PI);else if(L.shape==="star")for(var Q=Math.PI/2*3,Z=4*L.scalar,pe=8*L.scalar,ue=L.x,ve=L.y,Ce=5,Ie=Math.PI/Ce;Ce--;)ue=L.x+Math.cos(Q)*pe,ve=L.y+Math.sin(Q)*pe,z.lineTo(ue,ve),Q+=Ie,ue=L.x+Math.cos(Q)*Z,ve=L.y+Math.sin(Q)*Z,z.lineTo(ue,ve),Q+=Ie;else z.moveTo(Math.floor(L.x),Math.floor(L.y)),z.lineTo(Math.floor(L.wobbleX),Math.floor($)),z.lineTo(Math.floor(U),Math.floor(F)),z.lineTo(Math.floor(te),Math.floor(L.wobbleY));return z.closePath(),z.fill(),L.tick<L.totalTicks}function B(z,L,X,te,$){var U=L.slice(),F=z.getContext("2d"),K,se,ne=h(function(ye){function ae(){K=se=null,F.clearRect(0,0,te.width,te.height),g.clear(),$(),ye()}function le(){a&&!(te.width===i.width&&te.height===i.height)&&(te.width=z.width=i.width,te.height=z.height=i.height),!te.width&&!te.height&&(X(z),te.width=z.width,te.height=z.height),F.clearRect(0,0,te.width,te.height),U=U.filter(function(re){return G(F,re)}),U.length?K=p.frame(le):ae()}K=p.frame(le),se=ae});return{addFettis:function(ye){return U=U.concat(ye),ne},canvas:z,promise:ne,reset:function(){K&&p.cancel(K),se&&se()}}}function P(z,L){var X=!z,te=!!S(L||{},"resize"),$=!1,U=S(L,"disableForReducedMotion",Boolean),F=c&&!!S(L||{},"useWorker"),K=F?b():null,se=X?k:O,ne=z&&K?!!z.__confetti_initialized:!1,ye=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion)").matches,ae;function le(Q,Z,pe){for(var ue=S(Q,"particleCount",N),ve=S(Q,"angle",Number),Ce=S(Q,"spread",Number),Ie=S(Q,"startVelocity",Number),de=S(Q,"decay",Number),Te=S(Q,"gravity",Number),oe=S(Q,"drift",Number),fe=S(Q,"colors",R),Re=S(Q,"ticks",Number),Oe=S(Q,"shapes"),ke=S(Q,"scalar"),he=!!S(Q,"flat"),Ae=A(Q),ge=ue,Pe=[],Fe=z.width*Ae.x,_e=z.height*Ae.y;ge--;)Pe.push(H({x:Fe,y:_e,angle:ve,spread:Ce,startVelocity:Ie,color:fe[ge%fe.length],shape:Oe[E(0,Oe.length)],ticks:Re,decay:de,gravity:Te,drift:oe,scalar:ke,flat:he}));return ae?ae.addFettis(Pe):(ae=B(z,Pe,se,Z,pe),ae.promise)}function re(Q){var Z=U||S(Q,"disableForReducedMotion",Boolean),pe=S(Q,"zIndex",Number);if(Z&&ye)return h(function(Ie){Ie()});X&&ae?z=ae.canvas:X&&!z&&(z=D(pe),document.body.appendChild(z)),te&&!ne&&se(z);var ue={width:z.width,height:z.height};K&&!ne&&K.init(z),ne=!0,K&&(z.__confetti_initialized=!0);function ve(){if(K){var Ie={getBoundingClientRect:function(){if(!X)return z.getBoundingClientRect()}};se(Ie),K.postMessage({resize:{width:Ie.width,height:Ie.height}});return}ue.width=ue.height=null}function Ce(){ae=null,te&&($=!1,t.removeEventListener("resize",ve)),X&&z&&(document.body.contains(z)&&document.body.removeChild(z),z=null,ne=!1)}return te&&!$&&($=!0,t.addEventListener("resize",ve,!1)),K?K.fire(Q,ue,Ce):le(Q,ue,Ce)}return re.reset=function(){K&&K.reset(),ae&&ae.reset()},re}var V;function Y(){return V||(V=P(null,{useWorker:!0,resize:!0})),V}function W(z,L,X,te,$,U,F){var K=new Path2D(z),se=new Path2D;se.addPath(K,new DOMMatrix(L));var ne=new Path2D;return ne.addPath(se,new DOMMatrix([Math.cos(F)*$,Math.sin(F)*$,-Math.sin(F)*U,Math.cos(F)*U,X,te])),ne}function q(z){if(!u)throw new Error("path confetti are not supported in this browser");var L,X;typeof z=="string"?L=z:(L=z.path,X=z.matrix);var te=new Path2D(L),$=document.createElement("canvas"),U=$.getContext("2d");if(!X){for(var F=1e3,K=F,se=F,ne=0,ye=0,ae,le,re=0;re<F;re+=2)for(var Q=0;Q<F;Q+=2)U.isPointInPath(te,re,Q,"nonzero")&&(K=Math.min(K,re),se=Math.min(se,Q),ne=Math.max(ne,re),ye=Math.max(ye,Q));ae=ne-K,le=ye-se;var Z=10,pe=Math.min(Z/ae,Z/le);X=[pe,0,0,pe,-Math.round(ae/2+K)*pe,-Math.round(le/2+se)*pe]}return{type:"path",path:L,matrix:X}}function ee(z){var L,X=1,te="#000000",$='"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';typeof z=="string"?L=z:(L=z.text,X="scalar"in z?z.scalar:X,$="fontFamily"in z?z.fontFamily:$,te="color"in z?z.color:te);var U=10*X,F=""+U+"px "+$,K=new OffscreenCanvas(U,U),se=K.getContext("2d");se.font=F;var ne=se.measureText(L),ye=Math.ceil(ne.actualBoundingBoxRight+ne.actualBoundingBoxLeft),ae=Math.ceil(ne.actualBoundingBoxAscent+ne.actualBoundingBoxDescent),le=2,re=ne.actualBoundingBoxLeft+le,Q=ne.actualBoundingBoxAscent+le;ye+=le+le,ae+=le+le,K=new OffscreenCanvas(ye,ae),se=K.getContext("2d"),se.font=F,se.fillStyle=te,se.fillText(L,re,Q);var Z=1/X;return{type:"bitmap",bitmap:K.transferToImageBitmap(),matrix:[Z,0,0,Z,-ye*Z/2,-ae*Z/2]}}r.exports=function(){return Y().apply(this,arguments)},r.exports.reset=function(){Y().reset()},r.exports.create=P,r.exports.shapeFromPath=q,r.exports.shapeFromText=ee})((function(){return typeof window<"u"?window:typeof self<"u"?self:this||{}})(),Jw,!1);const Zee=Jw.exports;Jw.exports.create;const zR="openrod:cloud-announcement:v1:dismissed";let IR,PR=!1;function Jee(){return IR??(IR=fetch("/api/os/announcements/cloud",{method:"POST",headers:{"content-type":"application/json","x-openshell-console":"1"},body:"{}"}).then(e=>e.ok?e.json():{show:!1}).catch(()=>({show:!1}))),IR}function ete(){const[e,t]=x.useState(!0),r=x.useRef(null);x.useEffect(()=>{let i=!0;return Jee().then(({show:c})=>{let u=PR;try{u||(u=localStorage.getItem(zR)==="true")}catch{}i&&t(!c||u)}),()=>{i=!1}},[]),x.useEffect(()=>{if(e||!r.current)return;const i=Zee.create(r.current,{resize:!0}),c={particleCount:35,spread:75,startVelocity:16,gravity:.45,ticks:160,scalar:.65,disableForReducedMotion:!0,colors:["#4c88df","#e6b75a","#95bde0","#c0a3e8"]};return i({...c,angle:65,origin:{x:.1,y:1}}),i({...c,angle:115,origin:{x:.9,y:1}}),()=>i.reset()},[e]);function a(){PR=!0,t(!0);try{localStorage.setItem(zR,"true")}catch{}}return e?null:n.jsxs("section",{"aria-label":"OpenRod Cloud announcement",className:"sticky top-0 z-20 flex min-h-12 shrink-0 items-center justify-center overflow-hidden border-b border-blue-900/10 bg-[#e4eeff] py-2 pl-4 pr-12 text-[#234c88] dark:border-blue-200/10 dark:bg-[#1c3050] dark:text-[#d5e5ff]",children:[n.jsx("canvas",{ref:r,"aria-hidden":"true",className:"pointer-events-none absolute inset-0 size-full"}),n.jsxs("div",{className:"relative flex items-center gap-2.5 text-[13px] leading-5",children:[n.jsx("img",{src:"/openrod.png",alt:"OpenRod",className:"size-7 shrink-0 object-contain"}),n.jsxs("p",{children:[n.jsx("span",{className:"opacity-75",children:"New in OpenRod:"})," ",n.jsx("strong",{className:"font-semibold",children:"Meet OpenRod Cloud!"})]})]}),n.jsx(ie,{variant:"ghost",size:"icon-sm",onClick:a,"aria-label":"Dismiss OpenRod Cloud announcement",className:"absolute right-2 top-1/2 -translate-y-1/2 text-current hover:bg-blue-950/10 hover:text-current dark:hover:bg-white/10 focus-visible:ring-blue-600",children:n.jsx(In,{"aria-hidden":"true",className:"size-3.5"})})]})}const tte=x.lazy(()=>gy(()=>import("./terminal-view-S8Vmk00v.js"),__vite__mapDeps([3,4])).then(e=>({default:e.TerminalView}))),P1={sandboxes:"Sandboxes",activity:"Activity",groups:"Groups",egress:"Network",ingress:"Network",secrets:"Secrets",templates:"Templates",setups:"MCPs & Skills",connections:"Connections"};class nte extends x.Component{constructor(){super(...arguments);an(this,"state",{error:null})}static getDerivedStateFromError(r){return{error:r}}componentDidUpdate(r){r.view!==this.props.view&&this.state.error&&this.setState({error:null})}render(){return this.state.error?n.jsxs("div",{role:"alert",className:"mx-auto mt-10 max-w-md rounded-lg border border-border p-5 text-center text-sm",children:[n.jsx("p",{children:"This page hit an error."}),n.jsx("p",{className:"mt-1 font-mono text-[11px] text-muted-foreground",children:this.state.error.message}),n.jsx("button",{className:"mt-3 text-xs underline underline-offset-2",onClick:()=>this.setState({error:null}),children:"Try again"})]}):this.props.children}}function _R(){const e=new URLSearchParams(window.location.hash.split("?")[1]??""),t=e.get("gateway"),r=e.get("workspace");if(!t||!r)return null;const a=e.get("remote")==="1",i=e.get("target")??new URLSearchParams(window.location.search).get("target")??void 0;return{id:JSON.stringify([i??"local",JSON.stringify([t,r])]),context:JSON.stringify([t,r]),gateway:t,workspace:r,connected:!0,remote:a,target:i,cloud:i==="cloud",label:e.get("label")||(a?`SSH · ${t}`:"Local")}}function LR(){const e=/^#terminal\/([a-z0-9-]{1,63})(?:\?(.*))?$/.exec(window.location.hash);if(!e)return null;const t=new URLSearchParams(e[2]??""),r=t.get("gateway"),a=t.get("workspace"),i=r&&a?{context:JSON.stringify([r,a]),gateway:r,workspace:a,connected:!0,remote:t.get("remote")==="1",target:new URLSearchParams(window.location.search).get("target")??void 0}:null;return{name:e[1],session:t.get("session")||void 0,setupLogin:t.get("setupLogin")||void 0,mcp:t.get("mcp")||void 0,location:i}}function $R(){const e=window.location.hash.slice(1).split("?")[0];return e==="policies"?(window.history.replaceState(null,"",`${window.location.pathname}${window.location.search}#egress`),"egress"):e==="guardrails"?(window.history.replaceState(null,"",`${window.location.pathname}${window.location.search}#activity`),"activity"):P1[e]?e:"sandboxes"}function ste(){const{connection:e}=oi(),t=Kw();return x.useEffect(()=>{ln.observeConsole(e)},[e,t.sharing]),null}function rte(){var E,T;const e=Bf(),t=js(),r=!(t!=null&&t.localViewer),[a,i]=x.useState($R),[c,u]=x.useState(LR),[f,m]=x.useState(0),[h,g]=x.useState(_R),p=Kw();x.useEffect(()=>{ln.observeView(c?"terminal":a)},[a,!!c,p.sharing]);const[b,v]=x.useState(null),w=vo(),C=x.useMemo(()=>qee(w.locations,null,e.target??"local"),[w.locations,e.target]),S=x.useCallback((R,M)=>{var O;const A=M??null;if((O=e.signal)!=null&&O.aborted||!P1[R])return;i(R),g(A);const k=A?`?${new URLSearchParams({gateway:A.gateway,workspace:A.workspace,label:A.label,remote:A.remote?"1":"0",...A.target?{target:A.target}:{}})}`:"";window.history.pushState(null,"",R==="sandboxes"&&!A?window.location.pathname:`#${R}${k}`)},[e.signal]),N=r?void 0:()=>{S("sandboxes"),m(R=>R+1)};return x.useEffect(()=>{const R=()=>{i($R()),u(LR()),g(_R())};window.addEventListener("popstate",R),window.addEventListener("hashchange",R);const M=A=>S(A.detail.view,A.detail.location);return window.addEventListener("openrod-navigate",M),()=>{window.removeEventListener("popstate",R),window.removeEventListener("hashchange",R),window.removeEventListener("openrod-navigate",M)}},[S]),x.useEffect(()=>{const R=M=>{var A,k,O;return v({...M.detail,type:((A=M.detail)==null?void 0:A.type)??((O=(k=M.detail)==null?void 0:k.types)==null?void 0:O[0]),key:Date.now()})};return window.addEventListener("openrod-import",R),()=>window.removeEventListener("openrod-import",R)},[]),c?((E=c.location)==null?void 0:E.target)==="cloud"&&(t!=null&&t.localViewer)&&(t.checking||!t.connected)?n.jsx("main",{className:"grid min-h-svh place-items-center p-6",children:n.jsxs("section",{className:"text-center text-sm",children:[n.jsx("p",{role:"status",children:t.checking?"Checking cloud connection…":"Connect to OpenRod Cloud to open this terminal."}),!t.checking&&n.jsx("a",{href:"#connections",className:"mt-4 inline-block underline underline-offset-4",children:"Open Connections"})]})}):n.jsxs(n.Fragment,{children:[n.jsx(x.Suspense,{fallback:null,children:n.jsx(Zn,{location:c.location,children:n.jsx(tte,{name:c.name,session:c.session,setupLogin:c.setupLogin,mcp:c.mcp},`${t==null?void 0:t.target} ${((T=c.location)==null?void 0:T.context)??""} ${c.name} ${c.session??""}`)})}),n.jsx(ER,{position:"bottom-right"})]}):n.jsx(Zn,{location:C,children:n.jsxs(Rf,{children:[n.jsx(ste,{}),n.jsxs(tZ,{children:[n.jsx(xZ,{view:a,onNavigate:S}),n.jsxs(rZ,{className:"min-w-0 bg-background",children:[n.jsx(ete,{}),n.jsxs("header",{className:"flex h-14 shrink-0 items-center border-b border-border bg-card px-4 sm:px-6",children:[n.jsx(sZ,{className:"mr-2 md:hidden"}),n.jsx("h1",{className:"text-[18px] font-semibold tracking-tight",children:P1[a]}),n.jsx(Fee,{})]}),n.jsx(sQ,{}),n.jsx(gQ,{}),!r&&n.jsx(yQ,{}),n.jsxs(nte,{view:a,children:[a==="sandboxes"&&n.jsx(fJ,{onNavigate:S,allowRemote:!r,createRequest:f,onCreateRequestHandled:()=>m(0)}),a==="activity"&&n.jsx(RJ,{combined:!0}),a==="groups"&&n.jsx(zJ,{combined:!0,onNavigate:S}),(a==="egress"||a==="ingress")&&n.jsx(YJ,{combined:!0,tab:a,onNavigate:S,requestedLocation:h}),a==="secrets"&&n.jsx(uee,{combined:!0}),a==="templates"&&n.jsx(yee,{}),a==="setups"&&n.jsx(aD,{combined:!0}),a==="connections"&&!r&&n.jsx(Pee,{onCreateSandbox:N})]},`${a}:${MR(C)??"unscoped"}`)]}),n.jsx(ER,{position:"bottom-right"}),b&&n.jsx(Qee,{request:b,onClose:()=>v(null)},b.key)]})]},MR(C)??"unscoped")})}XP.createRoot(document.getElementById("root")).render(n.jsx(nt.StrictMode,{children:n.jsx(LP,{attribute:"class",defaultTheme:"system",enableSystem:!0,storageKey:"openshell-theme",children:n.jsx(Gee,{children:n.jsx(rte,{})})})}));export{ie as B,ha as C,Fi as D,ga as L,E8 as R,n2 as T,gn as a,ln as b,mf as c,ZY as d,Cu as e,ite as f,Gi as g,qi as h,Rs as i,n as j,zp as p,x as r,a4 as s,vg as t,Pt as u};