oh-my-pr 4.5.2 → 4.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
function sw(t,r){for(var o=0;o<r.length;o++){const i=r[o];if(typeof i!="string"&&!Array.isArray(i)){for(const u in i)if(u!=="default"&&!(u in t)){const d=Object.getOwnPropertyDescriptor(i,u);d&&Object.defineProperty(t,u,d.get?d:{enumerable:!0,get:()=>i[u]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))i(u);new MutationObserver(u=>{for(const d of u)if(d.type==="childList")for(const p of d.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&i(p)}).observe(document,{childList:!0,subtree:!0});function o(u){const d={};return u.integrity&&(d.integrity=u.integrity),u.referrerPolicy&&(d.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?d.credentials="include":u.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function i(u){if(u.ep)return;u.ep=!0;const d=o(u);fetch(u.href,d)}})();function Wh(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Kl={exports:{}},Oo={},Vl={exports:{}},we={};var Sp;function iw(){if(Sp)return we;Sp=1;var t=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),d=Symbol.for("react.provider"),p=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),w=Symbol.iterator;function b(P){return P===null||typeof P!="object"?null:(P=w&&P[w]||P["@@iterator"],typeof P=="function"?P:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,C={};function S(P,B,ue){this.props=P,this.context=B,this.refs=C,this.updater=ue||k}S.prototype.isReactComponent={},S.prototype.setState=function(P,B){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,B,"setState")},S.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function E(){}E.prototype=S.prototype;function _(P,B,ue){this.props=P,this.context=B,this.refs=C,this.updater=ue||k}var O=_.prototype=new E;O.constructor=_,j(O,S.prototype),O.isPureReactComponent=!0;var I=Array.isArray,D=Object.prototype.hasOwnProperty,A={current:null},$={key:!0,ref:!0,__self:!0,__source:!0};function K(P,B,ue){var me,z={},ae=null,ce=null;if(B!=null)for(me in B.ref!==void 0&&(ce=B.ref),B.key!==void 0&&(ae=""+B.key),B)D.call(B,me)&&!$.hasOwnProperty(me)&&(z[me]=B[me]);var be=arguments.length-2;if(be===1)z.children=ue;else if(1<be){for(var Ee=Array(be),tt=0;tt<be;tt++)Ee[tt]=arguments[tt+2];z.children=Ee}if(P&&P.defaultProps)for(me in be=P.defaultProps,be)z[me]===void 0&&(z[me]=be[me]);return{$$typeof:t,type:P,key:ae,ref:ce,props:z,_owner:A.current}}function Q(P,B){return{$$typeof:t,type:P.type,key:B,ref:P.ref,props:P.props,_owner:P._owner}}function ee(P){return typeof P=="object"&&P!==null&&P.$$typeof===t}function ne(P){var B={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(ue){return B[ue]})}var Z=/\/+/g;function de(P,B){return typeof P=="object"&&P!==null&&P.key!=null?ne(""+P.key):B.toString(36)}function X(P,B,ue,me,z){var ae=typeof P;(ae==="undefined"||ae==="boolean")&&(P=null);var ce=!1;if(P===null)ce=!0;else switch(ae){case"string":case"number":ce=!0;break;case"object":switch(P.$$typeof){case t:case r:ce=!0}}if(ce)return ce=P,z=z(ce),P=me===""?"."+de(ce,0):me,I(z)?(ue="",P!=null&&(ue=P.replace(Z,"$&/")+"/"),X(z,B,ue,"",function(tt){return tt})):z!=null&&(ee(z)&&(z=Q(z,ue+(!z.key||ce&&ce.key===z.key?"":(""+z.key).replace(Z,"$&/")+"/")+P)),B.push(z)),1;if(ce=0,me=me===""?".":me+":",I(P))for(var be=0;be<P.length;be++){ae=P[be];var Ee=me+de(ae,be);ce+=X(ae,B,ue,Ee,z)}else if(Ee=b(P),typeof Ee=="function")for(P=Ee.call(P),be=0;!(ae=P.next()).done;)ae=ae.value,Ee=me+de(ae,be++),ce+=X(ae,B,ue,Ee,z);else if(ae==="object")throw B=String(P),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.");return ce}function ve(P,B,ue){if(P==null)return P;var me=[],z=0;return X(P,me,"","",function(ae){return B.call(ue,ae,z++)}),me}function se(P){if(P._status===-1){var B=P._result;B=B(),B.then(function(ue){(P._status===0||P._status===-1)&&(P._status=1,P._result=ue)},function(ue){(P._status===0||P._status===-1)&&(P._status=2,P._result=ue)}),P._status===-1&&(P._status=0,P._result=B)}if(P._status===1)return P._result.default;throw P._result}var le={current:null},U={transition:null},H={ReactCurrentDispatcher:le,ReactCurrentBatchConfig:U,ReactCurrentOwner:A};function q(){throw Error("act(...) is not supported in production builds of React.")}return we.Children={map:ve,forEach:function(P,B,ue){ve(P,function(){B.apply(this,arguments)},ue)},count:function(P){var B=0;return ve(P,function(){B++}),B},toArray:function(P){return ve(P,function(B){return B})||[]},only:function(P){if(!ee(P))throw Error("React.Children.only expected to receive a single React element child.");return P}},we.Component=S,we.Fragment=o,we.Profiler=u,we.PureComponent=_,we.StrictMode=i,we.Suspense=g,we.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=H,we.act=q,we.cloneElement=function(P,B,ue){if(P==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+P+".");var me=j({},P.props),z=P.key,ae=P.ref,ce=P._owner;if(B!=null){if(B.ref!==void 0&&(ae=B.ref,ce=A.current),B.key!==void 0&&(z=""+B.key),P.type&&P.type.defaultProps)var be=P.type.defaultProps;for(Ee in B)D.call(B,Ee)&&!$.hasOwnProperty(Ee)&&(me[Ee]=B[Ee]===void 0&&be!==void 0?be[Ee]:B[Ee])}var Ee=arguments.length-2;if(Ee===1)me.children=ue;else if(1<Ee){be=Array(Ee);for(var tt=0;tt<Ee;tt++)be[tt]=arguments[tt+2];me.children=be}return{$$typeof:t,type:P.type,key:z,ref:ae,props:me,_owner:ce}},we.createContext=function(P){return P={$$typeof:p,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},P.Provider={$$typeof:d,_context:P},P.Consumer=P},we.createElement=K,we.createFactory=function(P){var B=K.bind(null,P);return B.type=P,B},we.createRef=function(){return{current:null}},we.forwardRef=function(P){return{$$typeof:h,render:P}},we.isValidElement=ee,we.lazy=function(P){return{$$typeof:x,_payload:{_status:-1,_result:P},_init:se}},we.memo=function(P,B){return{$$typeof:v,type:P,compare:B===void 0?null:B}},we.startTransition=function(P){var B=U.transition;U.transition={};try{P()}finally{U.transition=B}},we.unstable_act=q,we.useCallback=function(P,B){return le.current.useCallback(P,B)},we.useContext=function(P){return le.current.useContext(P)},we.useDebugValue=function(){},we.useDeferredValue=function(P){return le.current.useDeferredValue(P)},we.useEffect=function(P,B){return le.current.useEffect(P,B)},we.useId=function(){return le.current.useId()},we.useImperativeHandle=function(P,B,ue){return le.current.useImperativeHandle(P,B,ue)},we.useInsertionEffect=function(P,B){return le.current.useInsertionEffect(P,B)},we.useLayoutEffect=function(P,B){return le.current.useLayoutEffect(P,B)},we.useMemo=function(P,B){return le.current.useMemo(P,B)},we.useReducer=function(P,B,ue){return le.current.useReducer(P,B,ue)},we.useRef=function(P){return le.current.useRef(P)},we.useState=function(P){return le.current.useState(P)},we.useSyncExternalStore=function(P,B,ue){return le.current.useSyncExternalStore(P,B,ue)},we.useTransition=function(){return le.current.useTransition()},we.version="18.3.1",we}var Cp;function Mi(){return Cp||(Cp=1,Vl.exports=iw()),Vl.exports}var kp;function aw(){if(kp)return Oo;kp=1;var t=Mi(),r=Symbol.for("react.element"),o=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,u=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function p(h,g,v){var x,w={},b=null,k=null;v!==void 0&&(b=""+v),g.key!==void 0&&(b=""+g.key),g.ref!==void 0&&(k=g.ref);for(x in g)i.call(g,x)&&!d.hasOwnProperty(x)&&(w[x]=g[x]);if(h&&h.defaultProps)for(x in g=h.defaultProps,g)w[x]===void 0&&(w[x]=g[x]);return{$$typeof:r,type:h,key:b,ref:k,props:w,_owner:u.current}}return Oo.Fragment=o,Oo.jsx=p,Oo.jsxs=p,Oo}var Ep;function lw(){return Ep||(Ep=1,Kl.exports=aw()),Kl.exports}var l=lw(),ci={},Ql={exports:{}},dt={},Gl={exports:{}},ql={};var Np;function uw(){return Np||(Np=1,(function(t){function r(U,H){var q=U.length;U.push(H);e:for(;0<q;){var P=q-1>>>1,B=U[P];if(0<u(B,H))U[P]=H,U[q]=B,q=P;else break e}}function o(U){return U.length===0?null:U[0]}function i(U){if(U.length===0)return null;var H=U[0],q=U.pop();if(q!==H){U[0]=q;e:for(var P=0,B=U.length,ue=B>>>1;P<ue;){var me=2*(P+1)-1,z=U[me],ae=me+1,ce=U[ae];if(0>u(z,q))ae<B&&0>u(ce,z)?(U[P]=ce,U[ae]=q,P=ae):(U[P]=z,U[me]=q,P=me);else if(ae<B&&0>u(ce,q))U[P]=ce,U[ae]=q,P=ae;else break e}}return H}function u(U,H){var q=U.sortIndex-H.sortIndex;return q!==0?q:U.id-H.id}if(typeof performance=="object"&&typeof performance.now=="function"){var d=performance;t.unstable_now=function(){return d.now()}}else{var p=Date,h=p.now();t.unstable_now=function(){return p.now()-h}}var g=[],v=[],x=1,w=null,b=3,k=!1,j=!1,C=!1,S=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function O(U){for(var H=o(v);H!==null;){if(H.callback===null)i(v);else if(H.startTime<=U)i(v),H.sortIndex=H.expirationTime,r(g,H);else break;H=o(v)}}function I(U){if(C=!1,O(U),!j)if(o(g)!==null)j=!0,se(D);else{var H=o(v);H!==null&&le(I,H.startTime-U)}}function D(U,H){j=!1,C&&(C=!1,E(K),K=-1),k=!0;var q=b;try{for(O(H),w=o(g);w!==null&&(!(w.expirationTime>H)||U&&!ne());){var P=w.callback;if(typeof P=="function"){w.callback=null,b=w.priorityLevel;var B=P(w.expirationTime<=H);H=t.unstable_now(),typeof B=="function"?w.callback=B:w===o(g)&&i(g),O(H)}else i(g);w=o(g)}if(w!==null)var ue=!0;else{var me=o(v);me!==null&&le(I,me.startTime-H),ue=!1}return ue}finally{w=null,b=q,k=!1}}var A=!1,$=null,K=-1,Q=5,ee=-1;function ne(){return!(t.unstable_now()-ee<Q)}function Z(){if($!==null){var U=t.unstable_now();ee=U;var H=!0;try{H=$(!0,U)}finally{H?de():(A=!1,$=null)}}else A=!1}var de;if(typeof _=="function")de=function(){_(Z)};else if(typeof MessageChannel<"u"){var X=new MessageChannel,ve=X.port2;X.port1.onmessage=Z,de=function(){ve.postMessage(null)}}else de=function(){S(Z,0)};function se(U){$=U,A||(A=!0,de())}function le(U,H){K=S(function(){U(t.unstable_now())},H)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(U){U.callback=null},t.unstable_continueExecution=function(){j||k||(j=!0,se(D))},t.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Q=0<U?Math.floor(1e3/U):5},t.unstable_getCurrentPriorityLevel=function(){return b},t.unstable_getFirstCallbackNode=function(){return o(g)},t.unstable_next=function(U){switch(b){case 1:case 2:case 3:var H=3;break;default:H=b}var q=b;b=H;try{return U()}finally{b=q}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(U,H){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var q=b;b=U;try{return H()}finally{b=q}},t.unstable_scheduleCallback=function(U,H,q){var P=t.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?P+q:P):q=P,U){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=q+B,U={id:x++,callback:H,priorityLevel:U,startTime:q,expirationTime:B,sortIndex:-1},q>P?(U.sortIndex=q,r(v,U),o(g)===null&&U===o(v)&&(C?(E(K),K=-1):C=!0,le(I,q-P))):(U.sortIndex=B,r(g,U),j||k||(j=!0,se(D))),U},t.unstable_shouldYield=ne,t.unstable_wrapCallback=function(U){var H=b;return function(){var q=b;b=H;try{return U.apply(this,arguments)}finally{b=q}}}})(ql)),ql}var jp;function cw(){return jp||(jp=1,Gl.exports=uw()),Gl.exports}var Rp;function dw(){if(Rp)return dt;Rp=1;var t=Mi(),r=cw();function o(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,s=1;s<arguments.length;s++)n+="&args[]="+encodeURIComponent(arguments[s]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,u={};function d(e,n){p(e,n),p(e+"Capture",n)}function p(e,n){for(u[e]=n,e=0;e<n.length;e++)i.add(n[e])}var h=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),g=Object.prototype.hasOwnProperty,v=/^[: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]*$/,x={},w={};function b(e){return g.call(w,e)?!0:g.call(x,e)?!1:v.test(e)?w[e]=!0:(x[e]=!0,!1)}function k(e,n,s,a){if(s!==null&&s.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return a?!1:s!==null?!s.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function j(e,n,s,a){if(n===null||typeof n>"u"||k(e,n,s,a))return!0;if(a)return!1;if(s!==null)switch(s.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function C(e,n,s,a,c,f,y){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=a,this.attributeNamespace=c,this.mustUseProperty=s,this.propertyName=e,this.type=n,this.sanitizeURL=f,this.removeEmptyString=y}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){S[e]=new C(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];S[n]=new C(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){S[e]=new C(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){S[e]=new C(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){S[e]=new C(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){S[e]=new C(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){S[e]=new C(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){S[e]=new C(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){S[e]=new C(e,5,!1,e.toLowerCase(),null,!1,!1)});var E=/[\-:]([a-z])/g;function _(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(E,_);S[n]=new C(n,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(E,_);S[n]=new C(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(E,_);S[n]=new C(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){S[e]=new C(e,1,!1,e.toLowerCase(),null,!1,!1)}),S.xlinkHref=new C("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){S[e]=new C(e,1,!1,e.toLowerCase(),null,!0,!0)});function O(e,n,s,a){var c=S.hasOwnProperty(n)?S[n]:null;(c!==null?c.type!==0:a||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(j(n,s,c,a)&&(s=null),a||c===null?b(n)&&(s===null?e.removeAttribute(n):e.setAttribute(n,""+s)):c.mustUseProperty?e[c.propertyName]=s===null?c.type===3?!1:"":s:(n=c.attributeName,a=c.attributeNamespace,s===null?e.removeAttribute(n):(c=c.type,s=c===3||c===4&&s===!0?"":""+s,a?e.setAttributeNS(a,n,s):e.setAttribute(n,s))))}var I=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,D=Symbol.for("react.element"),A=Symbol.for("react.portal"),$=Symbol.for("react.fragment"),K=Symbol.for("react.strict_mode"),Q=Symbol.for("react.profiler"),ee=Symbol.for("react.provider"),ne=Symbol.for("react.context"),Z=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),ve=Symbol.for("react.memo"),se=Symbol.for("react.lazy"),le=Symbol.for("react.offscreen"),U=Symbol.iterator;function H(e){return e===null||typeof e!="object"?null:(e=U&&e[U]||e["@@iterator"],typeof e=="function"?e:null)}var q=Object.assign,P;function B(e){if(P===void 0)try{throw Error()}catch(s){var n=s.stack.trim().match(/\n( *(at )?)/);P=n&&n[1]||""}return`
|
|
2
|
+
`+P+e}var ue=!1;function me(e,n){if(!e||ue)return"";ue=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n)if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(n,[])}catch(F){var a=F}Reflect.construct(e,[],n)}else{try{n.call()}catch(F){a=F}e.call(n.prototype)}else{try{throw Error()}catch(F){a=F}e()}}catch(F){if(F&&a&&typeof F.stack=="string"){for(var c=F.stack.split(`
|
|
3
|
+
`),f=a.stack.split(`
|
|
4
|
+
`),y=c.length-1,N=f.length-1;1<=y&&0<=N&&c[y]!==f[N];)N--;for(;1<=y&&0<=N;y--,N--)if(c[y]!==f[N]){if(y!==1||N!==1)do if(y--,N--,0>N||c[y]!==f[N]){var R=`
|
|
5
|
+
`+c[y].replace(" at new "," at ");return e.displayName&&R.includes("<anonymous>")&&(R=R.replace("<anonymous>",e.displayName)),R}while(1<=y&&0<=N);break}}}finally{ue=!1,Error.prepareStackTrace=s}return(e=e?e.displayName||e.name:"")?B(e):""}function z(e){switch(e.tag){case 5:return B(e.type);case 16:return B("Lazy");case 13:return B("Suspense");case 19:return B("SuspenseList");case 0:case 2:case 15:return e=me(e.type,!1),e;case 11:return e=me(e.type.render,!1),e;case 1:return e=me(e.type,!0),e;default:return""}}function ae(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case $:return"Fragment";case A:return"Portal";case Q:return"Profiler";case K:return"StrictMode";case de:return"Suspense";case X:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ne:return(e.displayName||"Context")+".Consumer";case ee:return(e._context.displayName||"Context")+".Provider";case Z:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ve:return n=e.displayName||null,n!==null?n:ae(e.type)||"Memo";case se:n=e._payload,e=e._init;try{return ae(e(n))}catch{}}return null}function ce(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ae(n);case 8:return n===K?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function be(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ee(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function tt(e){var n=Ee(e)?"checked":"value",s=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),a=""+e[n];if(!e.hasOwnProperty(n)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var c=s.get,f=s.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return c.call(this)},set:function(y){a=""+y,f.call(this,y)}}),Object.defineProperty(e,n,{enumerable:s.enumerable}),{getValue:function(){return a},setValue:function(y){a=""+y},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function sr(e){e._valueTracker||(e._valueTracker=tt(e))}function ts(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var s=n.getValue(),a="";return e&&(a=Ee(e)?e.checked?"true":"false":e.value),e=a,e!==s?(n.setValue(e),!0):!1}function Yt(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Zi(e,n){var s=n.checked;return q({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s??e._wrapperState.initialChecked})}function Rc(e,n){var s=n.defaultValue==null?"":n.defaultValue,a=n.checked!=null?n.checked:n.defaultChecked;s=be(n.value!=null?n.value:s),e._wrapperState={initialChecked:a,initialValue:s,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function Pc(e,n){n=n.checked,n!=null&&O(e,"checked",n,!1)}function Ji(e,n){Pc(e,n);var s=be(n.value),a=n.type;if(s!=null)a==="number"?(s===0&&e.value===""||e.value!=s)&&(e.value=""+s):e.value!==""+s&&(e.value=""+s);else if(a==="submit"||a==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?ea(e,n.type,s):n.hasOwnProperty("defaultValue")&&ea(e,n.type,be(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function Tc(e,n,s){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var a=n.type;if(!(a!=="submit"&&a!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,s||n===e.value||(e.value=n),e.defaultValue=n}s=e.name,s!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,s!==""&&(e.name=s)}function ea(e,n,s){(n!=="number"||Yt(e.ownerDocument)!==e)&&(s==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+s&&(e.defaultValue=""+s))}var Vr=Array.isArray;function ir(e,n,s,a){if(e=e.options,n){n={};for(var c=0;c<s.length;c++)n["$"+s[c]]=!0;for(s=0;s<e.length;s++)c=n.hasOwnProperty("$"+e[s].value),e[s].selected!==c&&(e[s].selected=c),c&&a&&(e[s].defaultSelected=!0)}else{for(s=""+be(s),n=null,c=0;c<e.length;c++){if(e[c].value===s){e[c].selected=!0,a&&(e[c].defaultSelected=!0);return}n!==null||e[c].disabled||(n=e[c])}n!==null&&(n.selected=!0)}}function ta(e,n){if(n.dangerouslySetInnerHTML!=null)throw Error(o(91));return q({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function _c(e,n){var s=n.value;if(s==null){if(s=n.children,n=n.defaultValue,s!=null){if(n!=null)throw Error(o(92));if(Vr(s)){if(1<s.length)throw Error(o(93));s=s[0]}n=s}n==null&&(n=""),s=n}e._wrapperState={initialValue:be(s)}}function Oc(e,n){var s=be(n.value),a=be(n.defaultValue);s!=null&&(s=""+s,s!==e.value&&(e.value=s),n.defaultValue==null&&e.defaultValue!==s&&(e.defaultValue=s)),a!=null&&(e.defaultValue=""+a)}function Ac(e){var n=e.textContent;n===e._wrapperState.initialValue&&n!==""&&n!==null&&(e.value=n)}function Mc(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function na(e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?Mc(n):e==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ns,Ic=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,s,a,c){MSApp.execUnsafeLocalFunction(function(){return e(n,s,a,c)})}:e})(function(e,n){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=n;else{for(ns=ns||document.createElement("div"),ns.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=ns.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function Qr(e,n){if(n){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=n;return}}e.textContent=n}var Gr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ux=["Webkit","ms","Moz","O"];Object.keys(Gr).forEach(function(e){ux.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),Gr[n]=Gr[e]})});function Lc(e,n,s){return n==null||typeof n=="boolean"||n===""?"":s||typeof n!="number"||n===0||Gr.hasOwnProperty(e)&&Gr[e]?(""+n).trim():n+"px"}function Dc(e,n){e=e.style;for(var s in n)if(n.hasOwnProperty(s)){var a=s.indexOf("--")===0,c=Lc(s,n[s],a);s==="float"&&(s="cssFloat"),a?e.setProperty(s,c):e[s]=c}}var cx=q({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ra(e,n){if(n){if(cx[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(o(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(o(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(o(61))}if(n.style!=null&&typeof n.style!="object")throw Error(o(62))}}function oa(e,n){if(e.indexOf("-")===-1)return typeof n.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var sa=null;function ia(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var aa=null,ar=null,lr=null;function Fc(e){if(e=vo(e)){if(typeof aa!="function")throw Error(o(280));var n=e.stateNode;n&&(n=Es(n),aa(e.stateNode,e.type,n))}}function $c(e){ar?lr?lr.push(e):lr=[e]:ar=e}function zc(){if(ar){var e=ar,n=lr;if(lr=ar=null,Fc(e),n)for(e=0;e<n.length;e++)Fc(n[e])}}function Uc(e,n){return e(n)}function Hc(){}var la=!1;function Bc(e,n,s){if(la)return e(n,s);la=!0;try{return Uc(e,n,s)}finally{la=!1,(ar!==null||lr!==null)&&(Hc(),zc())}}function qr(e,n){var s=e.stateNode;if(s===null)return null;var a=Es(s);if(a===null)return null;s=a[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(o(231,n,typeof s));return s}var ua=!1;if(h)try{var Yr={};Object.defineProperty(Yr,"passive",{get:function(){ua=!0}}),window.addEventListener("test",Yr,Yr),window.removeEventListener("test",Yr,Yr)}catch{ua=!1}function dx(e,n,s,a,c,f,y,N,R){var F=Array.prototype.slice.call(arguments,3);try{n.apply(s,F)}catch(V){this.onError(V)}}var Xr=!1,rs=null,os=!1,ca=null,fx={onError:function(e){Xr=!0,rs=e}};function px(e,n,s,a,c,f,y,N,R){Xr=!1,rs=null,dx.apply(fx,arguments)}function hx(e,n,s,a,c,f,y,N,R){if(px.apply(this,arguments),Xr){if(Xr){var F=rs;Xr=!1,rs=null}else throw Error(o(198));os||(os=!0,ca=F)}}function $n(e){var n=e,s=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(s=n.return),e=n.return;while(e)}return n.tag===3?s:null}function Wc(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function Kc(e){if($n(e)!==e)throw Error(o(188))}function mx(e){var n=e.alternate;if(!n){if(n=$n(e),n===null)throw Error(o(188));return n!==e?null:e}for(var s=e,a=n;;){var c=s.return;if(c===null)break;var f=c.alternate;if(f===null){if(a=c.return,a!==null){s=a;continue}break}if(c.child===f.child){for(f=c.child;f;){if(f===s)return Kc(c),e;if(f===a)return Kc(c),n;f=f.sibling}throw Error(o(188))}if(s.return!==a.return)s=c,a=f;else{for(var y=!1,N=c.child;N;){if(N===s){y=!0,s=c,a=f;break}if(N===a){y=!0,a=c,s=f;break}N=N.sibling}if(!y){for(N=f.child;N;){if(N===s){y=!0,s=f,a=c;break}if(N===a){y=!0,a=f,s=c;break}N=N.sibling}if(!y)throw Error(o(189))}}if(s.alternate!==a)throw Error(o(190))}if(s.tag!==3)throw Error(o(188));return s.stateNode.current===s?e:n}function Vc(e){return e=mx(e),e!==null?Qc(e):null}function Qc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var n=Qc(e);if(n!==null)return n;e=e.sibling}return null}var Gc=r.unstable_scheduleCallback,qc=r.unstable_cancelCallback,gx=r.unstable_shouldYield,vx=r.unstable_requestPaint,Ie=r.unstable_now,xx=r.unstable_getCurrentPriorityLevel,da=r.unstable_ImmediatePriority,Yc=r.unstable_UserBlockingPriority,ss=r.unstable_NormalPriority,yx=r.unstable_LowPriority,Xc=r.unstable_IdlePriority,is=null,zt=null;function wx(e){if(zt&&typeof zt.onCommitFiberRoot=="function")try{zt.onCommitFiberRoot(is,e,void 0,(e.current.flags&128)===128)}catch{}}var Rt=Math.clz32?Math.clz32:Cx,bx=Math.log,Sx=Math.LN2;function Cx(e){return e>>>=0,e===0?32:31-(bx(e)/Sx|0)|0}var as=64,ls=4194304;function Zr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function us(e,n){var s=e.pendingLanes;if(s===0)return 0;var a=0,c=e.suspendedLanes,f=e.pingedLanes,y=s&268435455;if(y!==0){var N=y&~c;N!==0?a=Zr(N):(f&=y,f!==0&&(a=Zr(f)))}else y=s&~c,y!==0?a=Zr(y):f!==0&&(a=Zr(f));if(a===0)return 0;if(n!==0&&n!==a&&(n&c)===0&&(c=a&-a,f=n&-n,c>=f||c===16&&(f&4194240)!==0))return n;if((a&4)!==0&&(a|=s&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=a;0<n;)s=31-Rt(n),c=1<<s,a|=e[s],n&=~c;return a}function kx(e,n){switch(e){case 1:case 2:case 4:return n+250;case 8:case 16:case 32:case 64: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 n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ex(e,n){for(var s=e.suspendedLanes,a=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes;0<f;){var y=31-Rt(f),N=1<<y,R=c[y];R===-1?((N&s)===0||(N&a)!==0)&&(c[y]=kx(N,n)):R<=n&&(e.expiredLanes|=N),f&=~N}}function fa(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Zc(){var e=as;return as<<=1,(as&4194240)===0&&(as=64),e}function pa(e){for(var n=[],s=0;31>s;s++)n.push(e);return n}function Jr(e,n,s){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-Rt(n),e[n]=s}function Nx(e,n){var s=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var a=e.eventTimes;for(e=e.expirationTimes;0<s;){var c=31-Rt(s),f=1<<c;n[c]=0,a[c]=-1,e[c]=-1,s&=~f}}function ha(e,n){var s=e.entangledLanes|=n;for(e=e.entanglements;s;){var a=31-Rt(s),c=1<<a;c&n|e[a]&n&&(e[a]|=n),s&=~c}}var ke=0;function Jc(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var ed,ma,td,nd,rd,ga=!1,cs=[],cn=null,dn=null,fn=null,eo=new Map,to=new Map,pn=[],jx="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 submit".split(" ");function od(e,n){switch(e){case"focusin":case"focusout":cn=null;break;case"dragenter":case"dragleave":dn=null;break;case"mouseover":case"mouseout":fn=null;break;case"pointerover":case"pointerout":eo.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":to.delete(n.pointerId)}}function no(e,n,s,a,c,f){return e===null||e.nativeEvent!==f?(e={blockedOn:n,domEventName:s,eventSystemFlags:a,nativeEvent:f,targetContainers:[c]},n!==null&&(n=vo(n),n!==null&&ma(n)),e):(e.eventSystemFlags|=a,n=e.targetContainers,c!==null&&n.indexOf(c)===-1&&n.push(c),e)}function Rx(e,n,s,a,c){switch(n){case"focusin":return cn=no(cn,e,n,s,a,c),!0;case"dragenter":return dn=no(dn,e,n,s,a,c),!0;case"mouseover":return fn=no(fn,e,n,s,a,c),!0;case"pointerover":var f=c.pointerId;return eo.set(f,no(eo.get(f)||null,e,n,s,a,c)),!0;case"gotpointercapture":return f=c.pointerId,to.set(f,no(to.get(f)||null,e,n,s,a,c)),!0}return!1}function sd(e){var n=zn(e.target);if(n!==null){var s=$n(n);if(s!==null){if(n=s.tag,n===13){if(n=Wc(s),n!==null){e.blockedOn=n,rd(e.priority,function(){td(s)});return}}else if(n===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ds(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var s=xa(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(s===null){s=e.nativeEvent;var a=new s.constructor(s.type,s);sa=a,s.target.dispatchEvent(a),sa=null}else return n=vo(s),n!==null&&ma(n),e.blockedOn=s,!1;n.shift()}return!0}function id(e,n,s){ds(e)&&s.delete(n)}function Px(){ga=!1,cn!==null&&ds(cn)&&(cn=null),dn!==null&&ds(dn)&&(dn=null),fn!==null&&ds(fn)&&(fn=null),eo.forEach(id),to.forEach(id)}function ro(e,n){e.blockedOn===n&&(e.blockedOn=null,ga||(ga=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Px)))}function oo(e){function n(c){return ro(c,e)}if(0<cs.length){ro(cs[0],e);for(var s=1;s<cs.length;s++){var a=cs[s];a.blockedOn===e&&(a.blockedOn=null)}}for(cn!==null&&ro(cn,e),dn!==null&&ro(dn,e),fn!==null&&ro(fn,e),eo.forEach(n),to.forEach(n),s=0;s<pn.length;s++)a=pn[s],a.blockedOn===e&&(a.blockedOn=null);for(;0<pn.length&&(s=pn[0],s.blockedOn===null);)sd(s),s.blockedOn===null&&pn.shift()}var ur=I.ReactCurrentBatchConfig,fs=!0;function Tx(e,n,s,a){var c=ke,f=ur.transition;ur.transition=null;try{ke=1,va(e,n,s,a)}finally{ke=c,ur.transition=f}}function _x(e,n,s,a){var c=ke,f=ur.transition;ur.transition=null;try{ke=4,va(e,n,s,a)}finally{ke=c,ur.transition=f}}function va(e,n,s,a){if(fs){var c=xa(e,n,s,a);if(c===null)Ia(e,n,a,ps,s),od(e,a);else if(Rx(c,e,n,s,a))a.stopPropagation();else if(od(e,a),n&4&&-1<jx.indexOf(e)){for(;c!==null;){var f=vo(c);if(f!==null&&ed(f),f=xa(e,n,s,a),f===null&&Ia(e,n,a,ps,s),f===c)break;c=f}c!==null&&a.stopPropagation()}else Ia(e,n,a,null,s)}}var ps=null;function xa(e,n,s,a){if(ps=null,e=ia(a),e=zn(e),e!==null)if(n=$n(e),n===null)e=null;else if(s=n.tag,s===13){if(e=Wc(n),e!==null)return e;e=null}else if(s===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null);return ps=e,null}function ad(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(xx()){case da:return 1;case Yc:return 4;case ss:case yx:return 16;case Xc:return 536870912;default:return 16}default:return 16}}var hn=null,ya=null,hs=null;function ld(){if(hs)return hs;var e,n=ya,s=n.length,a,c="value"in hn?hn.value:hn.textContent,f=c.length;for(e=0;e<s&&n[e]===c[e];e++);var y=s-e;for(a=1;a<=y&&n[s-a]===c[f-a];a++);return hs=c.slice(e,1<a?1-a:void 0)}function ms(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function gs(){return!0}function ud(){return!1}function ft(e){function n(s,a,c,f,y){this._reactName=s,this._targetInst=c,this.type=a,this.nativeEvent=f,this.target=y,this.currentTarget=null;for(var N in e)e.hasOwnProperty(N)&&(s=e[N],this[N]=s?s(f):f[N]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?gs:ud,this.isPropagationStopped=ud,this}return q(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=gs)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=gs)},persist:function(){},isPersistent:gs}),n}var cr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wa=ft(cr),so=q({},cr,{view:0,detail:0}),Ox=ft(so),ba,Sa,io,vs=q({},so,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ka,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==io&&(io&&e.type==="mousemove"?(ba=e.screenX-io.screenX,Sa=e.screenY-io.screenY):Sa=ba=0,io=e),ba)},movementY:function(e){return"movementY"in e?e.movementY:Sa}}),cd=ft(vs),Ax=q({},vs,{dataTransfer:0}),Mx=ft(Ax),Ix=q({},so,{relatedTarget:0}),Ca=ft(Ix),Lx=q({},cr,{animationName:0,elapsedTime:0,pseudoElement:0}),Dx=ft(Lx),Fx=q({},cr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),$x=ft(Fx),zx=q({},cr,{data:0}),dd=ft(zx),Ux={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Hx={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"},Bx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Wx(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=Bx[e])?!!n[e]:!1}function ka(){return Wx}var Kx=q({},so,{key:function(e){if(e.key){var n=Ux[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=ms(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Hx[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ka,charCode:function(e){return e.type==="keypress"?ms(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ms(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Vx=ft(Kx),Qx=q({},vs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),fd=ft(Qx),Gx=q({},so,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ka}),qx=ft(Gx),Yx=q({},cr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Xx=ft(Yx),Zx=q({},vs,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Jx=ft(Zx),ey=[9,13,27,32],Ea=h&&"CompositionEvent"in window,ao=null;h&&"documentMode"in document&&(ao=document.documentMode);var ty=h&&"TextEvent"in window&&!ao,pd=h&&(!Ea||ao&&8<ao&&11>=ao),hd=" ",md=!1;function gd(e,n){switch(e){case"keyup":return ey.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var dr=!1;function ny(e,n){switch(e){case"compositionend":return vd(n);case"keypress":return n.which!==32?null:(md=!0,hd);case"textInput":return e=n.data,e===hd&&md?null:e;default:return null}}function ry(e,n){if(dr)return e==="compositionend"||!Ea&&gd(e,n)?(e=ld(),hs=ya=hn=null,dr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return pd&&n.locale!=="ko"?null:n.data;default:return null}}var oy={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 xd(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!oy[e.type]:n==="textarea"}function yd(e,n,s,a){$c(a),n=Ss(n,"onChange"),0<n.length&&(s=new wa("onChange","change",null,s,a),e.push({event:s,listeners:n}))}var lo=null,uo=null;function sy(e){Dd(e,0)}function xs(e){var n=gr(e);if(ts(n))return e}function iy(e,n){if(e==="change")return n}var wd=!1;if(h){var Na;if(h){var ja="oninput"in document;if(!ja){var bd=document.createElement("div");bd.setAttribute("oninput","return;"),ja=typeof bd.oninput=="function"}Na=ja}else Na=!1;wd=Na&&(!document.documentMode||9<document.documentMode)}function Sd(){lo&&(lo.detachEvent("onpropertychange",Cd),uo=lo=null)}function Cd(e){if(e.propertyName==="value"&&xs(uo)){var n=[];yd(n,uo,e,ia(e)),Bc(sy,n)}}function ay(e,n,s){e==="focusin"?(Sd(),lo=n,uo=s,lo.attachEvent("onpropertychange",Cd)):e==="focusout"&&Sd()}function ly(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return xs(uo)}function uy(e,n){if(e==="click")return xs(n)}function cy(e,n){if(e==="input"||e==="change")return xs(n)}function dy(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Pt=typeof Object.is=="function"?Object.is:dy;function co(e,n){if(Pt(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var s=Object.keys(e),a=Object.keys(n);if(s.length!==a.length)return!1;for(a=0;a<s.length;a++){var c=s[a];if(!g.call(n,c)||!Pt(e[c],n[c]))return!1}return!0}function kd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ed(e,n){var s=kd(e);e=0;for(var a;s;){if(s.nodeType===3){if(a=e+s.textContent.length,e<=n&&a>=n)return{node:s,offset:n-e};e=a}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=kd(s)}}function Nd(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Nd(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function jd(){for(var e=window,n=Yt();n instanceof e.HTMLIFrameElement;){try{var s=typeof n.contentWindow.location.href=="string"}catch{s=!1}if(s)e=n.contentWindow;else break;n=Yt(e.document)}return n}function Ra(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function fy(e){var n=jd(),s=e.focusedElem,a=e.selectionRange;if(n!==s&&s&&s.ownerDocument&&Nd(s.ownerDocument.documentElement,s)){if(a!==null&&Ra(s)){if(n=a.start,e=a.end,e===void 0&&(e=n),"selectionStart"in s)s.selectionStart=n,s.selectionEnd=Math.min(e,s.value.length);else if(e=(n=s.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var c=s.textContent.length,f=Math.min(a.start,c);a=a.end===void 0?f:Math.min(a.end,c),!e.extend&&f>a&&(c=a,a=f,f=c),c=Ed(s,f);var y=Ed(s,a);c&&y&&(e.rangeCount!==1||e.anchorNode!==c.node||e.anchorOffset!==c.offset||e.focusNode!==y.node||e.focusOffset!==y.offset)&&(n=n.createRange(),n.setStart(c.node,c.offset),e.removeAllRanges(),f>a?(e.addRange(n),e.extend(y.node,y.offset)):(n.setEnd(y.node,y.offset),e.addRange(n)))}}for(n=[],e=s;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<n.length;s++)e=n[s],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var py=h&&"documentMode"in document&&11>=document.documentMode,fr=null,Pa=null,fo=null,Ta=!1;function Rd(e,n,s){var a=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Ta||fr==null||fr!==Yt(a)||(a=fr,"selectionStart"in a&&Ra(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),fo&&co(fo,a)||(fo=a,a=Ss(Pa,"onSelect"),0<a.length&&(n=new wa("onSelect","select",null,n,s),e.push({event:n,listeners:a}),n.target=fr)))}function ys(e,n){var s={};return s[e.toLowerCase()]=n.toLowerCase(),s["Webkit"+e]="webkit"+n,s["Moz"+e]="moz"+n,s}var pr={animationend:ys("Animation","AnimationEnd"),animationiteration:ys("Animation","AnimationIteration"),animationstart:ys("Animation","AnimationStart"),transitionend:ys("Transition","TransitionEnd")},_a={},Pd={};h&&(Pd=document.createElement("div").style,"AnimationEvent"in window||(delete pr.animationend.animation,delete pr.animationiteration.animation,delete pr.animationstart.animation),"TransitionEvent"in window||delete pr.transitionend.transition);function ws(e){if(_a[e])return _a[e];if(!pr[e])return e;var n=pr[e],s;for(s in n)if(n.hasOwnProperty(s)&&s in Pd)return _a[e]=n[s];return e}var Td=ws("animationend"),_d=ws("animationiteration"),Od=ws("animationstart"),Ad=ws("transitionend"),Md=new Map,Id="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function mn(e,n){Md.set(e,n),d(n,[e])}for(var Oa=0;Oa<Id.length;Oa++){var Aa=Id[Oa],hy=Aa.toLowerCase(),my=Aa[0].toUpperCase()+Aa.slice(1);mn(hy,"on"+my)}mn(Td,"onAnimationEnd"),mn(_d,"onAnimationIteration"),mn(Od,"onAnimationStart"),mn("dblclick","onDoubleClick"),mn("focusin","onFocus"),mn("focusout","onBlur"),mn(Ad,"onTransitionEnd"),p("onMouseEnter",["mouseout","mouseover"]),p("onMouseLeave",["mouseout","mouseover"]),p("onPointerEnter",["pointerout","pointerover"]),p("onPointerLeave",["pointerout","pointerover"]),d("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),d("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),d("onBeforeInput",["compositionend","keypress","textInput","paste"]),d("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),d("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),d("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var po="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(" "),gy=new Set("cancel close invalid load scroll toggle".split(" ").concat(po));function Ld(e,n,s){var a=e.type||"unknown-event";e.currentTarget=s,hx(a,n,void 0,e),e.currentTarget=null}function Dd(e,n){n=(n&4)!==0;for(var s=0;s<e.length;s++){var a=e[s],c=a.event;a=a.listeners;e:{var f=void 0;if(n)for(var y=a.length-1;0<=y;y--){var N=a[y],R=N.instance,F=N.currentTarget;if(N=N.listener,R!==f&&c.isPropagationStopped())break e;Ld(c,N,F),f=R}else for(y=0;y<a.length;y++){if(N=a[y],R=N.instance,F=N.currentTarget,N=N.listener,R!==f&&c.isPropagationStopped())break e;Ld(c,N,F),f=R}}}if(os)throw e=ca,os=!1,ca=null,e}function Re(e,n){var s=n[Ua];s===void 0&&(s=n[Ua]=new Set);var a=e+"__bubble";s.has(a)||(Fd(n,e,2,!1),s.add(a))}function Ma(e,n,s){var a=0;n&&(a|=4),Fd(s,e,a,n)}var bs="_reactListening"+Math.random().toString(36).slice(2);function ho(e){if(!e[bs]){e[bs]=!0,i.forEach(function(s){s!=="selectionchange"&&(gy.has(s)||Ma(s,!1,e),Ma(s,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[bs]||(n[bs]=!0,Ma("selectionchange",!1,n))}}function Fd(e,n,s,a){switch(ad(n)){case 1:var c=Tx;break;case 4:c=_x;break;default:c=va}s=c.bind(null,n,s,e),c=void 0,!ua||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(c=!0),a?c!==void 0?e.addEventListener(n,s,{capture:!0,passive:c}):e.addEventListener(n,s,!0):c!==void 0?e.addEventListener(n,s,{passive:c}):e.addEventListener(n,s,!1)}function Ia(e,n,s,a,c){var f=a;if((n&1)===0&&(n&2)===0&&a!==null)e:for(;;){if(a===null)return;var y=a.tag;if(y===3||y===4){var N=a.stateNode.containerInfo;if(N===c||N.nodeType===8&&N.parentNode===c)break;if(y===4)for(y=a.return;y!==null;){var R=y.tag;if((R===3||R===4)&&(R=y.stateNode.containerInfo,R===c||R.nodeType===8&&R.parentNode===c))return;y=y.return}for(;N!==null;){if(y=zn(N),y===null)return;if(R=y.tag,R===5||R===6){a=f=y;continue e}N=N.parentNode}}a=a.return}Bc(function(){var F=f,V=ia(s),G=[];e:{var W=Md.get(e);if(W!==void 0){var J=wa,re=e;switch(e){case"keypress":if(ms(s)===0)break e;case"keydown":case"keyup":J=Vx;break;case"focusin":re="focus",J=Ca;break;case"focusout":re="blur",J=Ca;break;case"beforeblur":case"afterblur":J=Ca;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":J=cd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":J=Mx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":J=qx;break;case Td:case _d:case Od:J=Dx;break;case Ad:J=Xx;break;case"scroll":J=Ox;break;case"wheel":J=Jx;break;case"copy":case"cut":case"paste":J=$x;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":J=fd}var oe=(n&4)!==0,Le=!oe&&e==="scroll",M=oe?W!==null?W+"Capture":null:W;oe=[];for(var T=F,L;T!==null;){L=T;var Y=L.stateNode;if(L.tag===5&&Y!==null&&(L=Y,M!==null&&(Y=qr(T,M),Y!=null&&oe.push(mo(T,Y,L)))),Le)break;T=T.return}0<oe.length&&(W=new J(W,re,null,s,V),G.push({event:W,listeners:oe}))}}if((n&7)===0){e:{if(W=e==="mouseover"||e==="pointerover",J=e==="mouseout"||e==="pointerout",W&&s!==sa&&(re=s.relatedTarget||s.fromElement)&&(zn(re)||re[Xt]))break e;if((J||W)&&(W=V.window===V?V:(W=V.ownerDocument)?W.defaultView||W.parentWindow:window,J?(re=s.relatedTarget||s.toElement,J=F,re=re?zn(re):null,re!==null&&(Le=$n(re),re!==Le||re.tag!==5&&re.tag!==6)&&(re=null)):(J=null,re=F),J!==re)){if(oe=cd,Y="onMouseLeave",M="onMouseEnter",T="mouse",(e==="pointerout"||e==="pointerover")&&(oe=fd,Y="onPointerLeave",M="onPointerEnter",T="pointer"),Le=J==null?W:gr(J),L=re==null?W:gr(re),W=new oe(Y,T+"leave",J,s,V),W.target=Le,W.relatedTarget=L,Y=null,zn(V)===F&&(oe=new oe(M,T+"enter",re,s,V),oe.target=L,oe.relatedTarget=Le,Y=oe),Le=Y,J&&re)t:{for(oe=J,M=re,T=0,L=oe;L;L=hr(L))T++;for(L=0,Y=M;Y;Y=hr(Y))L++;for(;0<T-L;)oe=hr(oe),T--;for(;0<L-T;)M=hr(M),L--;for(;T--;){if(oe===M||M!==null&&oe===M.alternate)break t;oe=hr(oe),M=hr(M)}oe=null}else oe=null;J!==null&&$d(G,W,J,oe,!1),re!==null&&Le!==null&&$d(G,Le,re,oe,!0)}}e:{if(W=F?gr(F):window,J=W.nodeName&&W.nodeName.toLowerCase(),J==="select"||J==="input"&&W.type==="file")var ie=iy;else if(xd(W))if(wd)ie=cy;else{ie=ly;var fe=ay}else(J=W.nodeName)&&J.toLowerCase()==="input"&&(W.type==="checkbox"||W.type==="radio")&&(ie=uy);if(ie&&(ie=ie(e,F))){yd(G,ie,s,V);break e}fe&&fe(e,W,F),e==="focusout"&&(fe=W._wrapperState)&&fe.controlled&&W.type==="number"&&ea(W,"number",W.value)}switch(fe=F?gr(F):window,e){case"focusin":(xd(fe)||fe.contentEditable==="true")&&(fr=fe,Pa=F,fo=null);break;case"focusout":fo=Pa=fr=null;break;case"mousedown":Ta=!0;break;case"contextmenu":case"mouseup":case"dragend":Ta=!1,Rd(G,s,V);break;case"selectionchange":if(py)break;case"keydown":case"keyup":Rd(G,s,V)}var pe;if(Ea)e:{switch(e){case"compositionstart":var ge="onCompositionStart";break e;case"compositionend":ge="onCompositionEnd";break e;case"compositionupdate":ge="onCompositionUpdate";break e}ge=void 0}else dr?gd(e,s)&&(ge="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(ge="onCompositionStart");ge&&(pd&&s.locale!=="ko"&&(dr||ge!=="onCompositionStart"?ge==="onCompositionEnd"&&dr&&(pe=ld()):(hn=V,ya="value"in hn?hn.value:hn.textContent,dr=!0)),fe=Ss(F,ge),0<fe.length&&(ge=new dd(ge,e,null,s,V),G.push({event:ge,listeners:fe}),pe?ge.data=pe:(pe=vd(s),pe!==null&&(ge.data=pe)))),(pe=ty?ny(e,s):ry(e,s))&&(F=Ss(F,"onBeforeInput"),0<F.length&&(V=new dd("onBeforeInput","beforeinput",null,s,V),G.push({event:V,listeners:F}),V.data=pe))}Dd(G,n)})}function mo(e,n,s){return{instance:e,listener:n,currentTarget:s}}function Ss(e,n){for(var s=n+"Capture",a=[];e!==null;){var c=e,f=c.stateNode;c.tag===5&&f!==null&&(c=f,f=qr(e,s),f!=null&&a.unshift(mo(e,f,c)),f=qr(e,n),f!=null&&a.push(mo(e,f,c))),e=e.return}return a}function hr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function $d(e,n,s,a,c){for(var f=n._reactName,y=[];s!==null&&s!==a;){var N=s,R=N.alternate,F=N.stateNode;if(R!==null&&R===a)break;N.tag===5&&F!==null&&(N=F,c?(R=qr(s,f),R!=null&&y.unshift(mo(s,R,N))):c||(R=qr(s,f),R!=null&&y.push(mo(s,R,N)))),s=s.return}y.length!==0&&e.push({event:n,listeners:y})}var vy=/\r\n?/g,xy=/\u0000|\uFFFD/g;function zd(e){return(typeof e=="string"?e:""+e).replace(vy,`
|
|
6
|
+
`).replace(xy,"")}function Cs(e,n,s){if(n=zd(n),zd(e)!==n&&s)throw Error(o(425))}function ks(){}var La=null,Da=null;function Fa(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var $a=typeof setTimeout=="function"?setTimeout:void 0,yy=typeof clearTimeout=="function"?clearTimeout:void 0,Ud=typeof Promise=="function"?Promise:void 0,wy=typeof queueMicrotask=="function"?queueMicrotask:typeof Ud<"u"?function(e){return Ud.resolve(null).then(e).catch(by)}:$a;function by(e){setTimeout(function(){throw e})}function za(e,n){var s=n,a=0;do{var c=s.nextSibling;if(e.removeChild(s),c&&c.nodeType===8)if(s=c.data,s==="/$"){if(a===0){e.removeChild(c),oo(n);return}a--}else s!=="$"&&s!=="$?"&&s!=="$!"||a++;s=c}while(s);oo(n)}function gn(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?")break;if(n==="/$")return null}}return e}function Hd(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"){if(n===0)return e;n--}else s==="/$"&&n++}e=e.previousSibling}return null}var mr=Math.random().toString(36).slice(2),Ut="__reactFiber$"+mr,go="__reactProps$"+mr,Xt="__reactContainer$"+mr,Ua="__reactEvents$"+mr,Sy="__reactListeners$"+mr,Cy="__reactHandles$"+mr;function zn(e){var n=e[Ut];if(n)return n;for(var s=e.parentNode;s;){if(n=s[Xt]||s[Ut]){if(s=n.alternate,n.child!==null||s!==null&&s.child!==null)for(e=Hd(e);e!==null;){if(s=e[Ut])return s;e=Hd(e)}return n}e=s,s=e.parentNode}return null}function vo(e){return e=e[Ut]||e[Xt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function gr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(o(33))}function Es(e){return e[go]||null}var Ha=[],vr=-1;function vn(e){return{current:e}}function Pe(e){0>vr||(e.current=Ha[vr],Ha[vr]=null,vr--)}function Ne(e,n){vr++,Ha[vr]=e.current,e.current=n}var xn={},qe=vn(xn),it=vn(!1),Un=xn;function xr(e,n){var s=e.type.contextTypes;if(!s)return xn;var a=e.stateNode;if(a&&a.__reactInternalMemoizedUnmaskedChildContext===n)return a.__reactInternalMemoizedMaskedChildContext;var c={},f;for(f in s)c[f]=n[f];return a&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=c),c}function at(e){return e=e.childContextTypes,e!=null}function Ns(){Pe(it),Pe(qe)}function Bd(e,n,s){if(qe.current!==xn)throw Error(o(168));Ne(qe,n),Ne(it,s)}function Wd(e,n,s){var a=e.stateNode;if(n=n.childContextTypes,typeof a.getChildContext!="function")return s;a=a.getChildContext();for(var c in a)if(!(c in n))throw Error(o(108,ce(e)||"Unknown",c));return q({},s,a)}function js(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||xn,Un=qe.current,Ne(qe,e),Ne(it,it.current),!0}function Kd(e,n,s){var a=e.stateNode;if(!a)throw Error(o(169));s?(e=Wd(e,n,Un),a.__reactInternalMemoizedMergedChildContext=e,Pe(it),Pe(qe),Ne(qe,e)):Pe(it),Ne(it,s)}var Zt=null,Rs=!1,Ba=!1;function Vd(e){Zt===null?Zt=[e]:Zt.push(e)}function ky(e){Rs=!0,Vd(e)}function yn(){if(!Ba&&Zt!==null){Ba=!0;var e=0,n=ke;try{var s=Zt;for(ke=1;e<s.length;e++){var a=s[e];do a=a(!0);while(a!==null)}Zt=null,Rs=!1}catch(c){throw Zt!==null&&(Zt=Zt.slice(e+1)),Gc(da,yn),c}finally{ke=n,Ba=!1}}return null}var yr=[],wr=0,Ps=null,Ts=0,wt=[],bt=0,Hn=null,Jt=1,en="";function Bn(e,n){yr[wr++]=Ts,yr[wr++]=Ps,Ps=e,Ts=n}function Qd(e,n,s){wt[bt++]=Jt,wt[bt++]=en,wt[bt++]=Hn,Hn=e;var a=Jt;e=en;var c=32-Rt(a)-1;a&=~(1<<c),s+=1;var f=32-Rt(n)+c;if(30<f){var y=c-c%5;f=(a&(1<<y)-1).toString(32),a>>=y,c-=y,Jt=1<<32-Rt(n)+c|s<<c|a,en=f+e}else Jt=1<<f|s<<c|a,en=e}function Wa(e){e.return!==null&&(Bn(e,1),Qd(e,1,0))}function Ka(e){for(;e===Ps;)Ps=yr[--wr],yr[wr]=null,Ts=yr[--wr],yr[wr]=null;for(;e===Hn;)Hn=wt[--bt],wt[bt]=null,en=wt[--bt],wt[bt]=null,Jt=wt[--bt],wt[bt]=null}var pt=null,ht=null,_e=!1,Tt=null;function Gd(e,n){var s=Et(5,null,null,0);s.elementType="DELETED",s.stateNode=n,s.return=e,n=e.deletions,n===null?(e.deletions=[s],e.flags|=16):n.push(s)}function qd(e,n){switch(e.tag){case 5:var s=e.type;return n=n.nodeType!==1||s.toLowerCase()!==n.nodeName.toLowerCase()?null:n,n!==null?(e.stateNode=n,pt=e,ht=gn(n.firstChild),!0):!1;case 6:return n=e.pendingProps===""||n.nodeType!==3?null:n,n!==null?(e.stateNode=n,pt=e,ht=null,!0):!1;case 13:return n=n.nodeType!==8?null:n,n!==null?(s=Hn!==null?{id:Jt,overflow:en}:null,e.memoizedState={dehydrated:n,treeContext:s,retryLane:1073741824},s=Et(18,null,null,0),s.stateNode=n,s.return=e,e.child=s,pt=e,ht=null,!0):!1;default:return!1}}function Va(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Qa(e){if(_e){var n=ht;if(n){var s=n;if(!qd(e,n)){if(Va(e))throw Error(o(418));n=gn(s.nextSibling);var a=pt;n&&qd(e,n)?Gd(a,s):(e.flags=e.flags&-4097|2,_e=!1,pt=e)}}else{if(Va(e))throw Error(o(418));e.flags=e.flags&-4097|2,_e=!1,pt=e}}}function Yd(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;pt=e}function _s(e){if(e!==pt)return!1;if(!_e)return Yd(e),_e=!0,!1;var n;if((n=e.tag!==3)&&!(n=e.tag!==5)&&(n=e.type,n=n!=="head"&&n!=="body"&&!Fa(e.type,e.memoizedProps)),n&&(n=ht)){if(Va(e))throw Xd(),Error(o(418));for(;n;)Gd(e,n),n=gn(n.nextSibling)}if(Yd(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"){if(n===0){ht=gn(e.nextSibling);break e}n--}else s!=="$"&&s!=="$!"&&s!=="$?"||n++}e=e.nextSibling}ht=null}}else ht=pt?gn(e.stateNode.nextSibling):null;return!0}function Xd(){for(var e=ht;e;)e=gn(e.nextSibling)}function br(){ht=pt=null,_e=!1}function Ga(e){Tt===null?Tt=[e]:Tt.push(e)}var Ey=I.ReactCurrentBatchConfig;function xo(e,n,s){if(e=s.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(s._owner){if(s=s._owner,s){if(s.tag!==1)throw Error(o(309));var a=s.stateNode}if(!a)throw Error(o(147,e));var c=a,f=""+e;return n!==null&&n.ref!==null&&typeof n.ref=="function"&&n.ref._stringRef===f?n.ref:(n=function(y){var N=c.refs;y===null?delete N[f]:N[f]=y},n._stringRef=f,n)}if(typeof e!="string")throw Error(o(284));if(!s._owner)throw Error(o(290,e))}return e}function Os(e,n){throw e=Object.prototype.toString.call(n),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e))}function Zd(e){var n=e._init;return n(e._payload)}function Jd(e){function n(M,T){if(e){var L=M.deletions;L===null?(M.deletions=[T],M.flags|=16):L.push(T)}}function s(M,T){if(!e)return null;for(;T!==null;)n(M,T),T=T.sibling;return null}function a(M,T){for(M=new Map;T!==null;)T.key!==null?M.set(T.key,T):M.set(T.index,T),T=T.sibling;return M}function c(M,T){return M=jn(M,T),M.index=0,M.sibling=null,M}function f(M,T,L){return M.index=L,e?(L=M.alternate,L!==null?(L=L.index,L<T?(M.flags|=2,T):L):(M.flags|=2,T)):(M.flags|=1048576,T)}function y(M){return e&&M.alternate===null&&(M.flags|=2),M}function N(M,T,L,Y){return T===null||T.tag!==6?(T=$l(L,M.mode,Y),T.return=M,T):(T=c(T,L),T.return=M,T)}function R(M,T,L,Y){var ie=L.type;return ie===$?V(M,T,L.props.children,Y,L.key):T!==null&&(T.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===se&&Zd(ie)===T.type)?(Y=c(T,L.props),Y.ref=xo(M,T,L),Y.return=M,Y):(Y=ni(L.type,L.key,L.props,null,M.mode,Y),Y.ref=xo(M,T,L),Y.return=M,Y)}function F(M,T,L,Y){return T===null||T.tag!==4||T.stateNode.containerInfo!==L.containerInfo||T.stateNode.implementation!==L.implementation?(T=zl(L,M.mode,Y),T.return=M,T):(T=c(T,L.children||[]),T.return=M,T)}function V(M,T,L,Y,ie){return T===null||T.tag!==7?(T=Xn(L,M.mode,Y,ie),T.return=M,T):(T=c(T,L),T.return=M,T)}function G(M,T,L){if(typeof T=="string"&&T!==""||typeof T=="number")return T=$l(""+T,M.mode,L),T.return=M,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case D:return L=ni(T.type,T.key,T.props,null,M.mode,L),L.ref=xo(M,null,T),L.return=M,L;case A:return T=zl(T,M.mode,L),T.return=M,T;case se:var Y=T._init;return G(M,Y(T._payload),L)}if(Vr(T)||H(T))return T=Xn(T,M.mode,L,null),T.return=M,T;Os(M,T)}return null}function W(M,T,L,Y){var ie=T!==null?T.key:null;if(typeof L=="string"&&L!==""||typeof L=="number")return ie!==null?null:N(M,T,""+L,Y);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case D:return L.key===ie?R(M,T,L,Y):null;case A:return L.key===ie?F(M,T,L,Y):null;case se:return ie=L._init,W(M,T,ie(L._payload),Y)}if(Vr(L)||H(L))return ie!==null?null:V(M,T,L,Y,null);Os(M,L)}return null}function J(M,T,L,Y,ie){if(typeof Y=="string"&&Y!==""||typeof Y=="number")return M=M.get(L)||null,N(T,M,""+Y,ie);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case D:return M=M.get(Y.key===null?L:Y.key)||null,R(T,M,Y,ie);case A:return M=M.get(Y.key===null?L:Y.key)||null,F(T,M,Y,ie);case se:var fe=Y._init;return J(M,T,L,fe(Y._payload),ie)}if(Vr(Y)||H(Y))return M=M.get(L)||null,V(T,M,Y,ie,null);Os(T,Y)}return null}function re(M,T,L,Y){for(var ie=null,fe=null,pe=T,ge=T=0,Ke=null;pe!==null&&ge<L.length;ge++){pe.index>ge?(Ke=pe,pe=null):Ke=pe.sibling;var Ce=W(M,pe,L[ge],Y);if(Ce===null){pe===null&&(pe=Ke);break}e&&pe&&Ce.alternate===null&&n(M,pe),T=f(Ce,T,ge),fe===null?ie=Ce:fe.sibling=Ce,fe=Ce,pe=Ke}if(ge===L.length)return s(M,pe),_e&&Bn(M,ge),ie;if(pe===null){for(;ge<L.length;ge++)pe=G(M,L[ge],Y),pe!==null&&(T=f(pe,T,ge),fe===null?ie=pe:fe.sibling=pe,fe=pe);return _e&&Bn(M,ge),ie}for(pe=a(M,pe);ge<L.length;ge++)Ke=J(pe,M,ge,L[ge],Y),Ke!==null&&(e&&Ke.alternate!==null&&pe.delete(Ke.key===null?ge:Ke.key),T=f(Ke,T,ge),fe===null?ie=Ke:fe.sibling=Ke,fe=Ke);return e&&pe.forEach(function(Rn){return n(M,Rn)}),_e&&Bn(M,ge),ie}function oe(M,T,L,Y){var ie=H(L);if(typeof ie!="function")throw Error(o(150));if(L=ie.call(L),L==null)throw Error(o(151));for(var fe=ie=null,pe=T,ge=T=0,Ke=null,Ce=L.next();pe!==null&&!Ce.done;ge++,Ce=L.next()){pe.index>ge?(Ke=pe,pe=null):Ke=pe.sibling;var Rn=W(M,pe,Ce.value,Y);if(Rn===null){pe===null&&(pe=Ke);break}e&&pe&&Rn.alternate===null&&n(M,pe),T=f(Rn,T,ge),fe===null?ie=Rn:fe.sibling=Rn,fe=Rn,pe=Ke}if(Ce.done)return s(M,pe),_e&&Bn(M,ge),ie;if(pe===null){for(;!Ce.done;ge++,Ce=L.next())Ce=G(M,Ce.value,Y),Ce!==null&&(T=f(Ce,T,ge),fe===null?ie=Ce:fe.sibling=Ce,fe=Ce);return _e&&Bn(M,ge),ie}for(pe=a(M,pe);!Ce.done;ge++,Ce=L.next())Ce=J(pe,M,ge,Ce.value,Y),Ce!==null&&(e&&Ce.alternate!==null&&pe.delete(Ce.key===null?ge:Ce.key),T=f(Ce,T,ge),fe===null?ie=Ce:fe.sibling=Ce,fe=Ce);return e&&pe.forEach(function(ow){return n(M,ow)}),_e&&Bn(M,ge),ie}function Le(M,T,L,Y){if(typeof L=="object"&&L!==null&&L.type===$&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case D:e:{for(var ie=L.key,fe=T;fe!==null;){if(fe.key===ie){if(ie=L.type,ie===$){if(fe.tag===7){s(M,fe.sibling),T=c(fe,L.props.children),T.return=M,M=T;break e}}else if(fe.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===se&&Zd(ie)===fe.type){s(M,fe.sibling),T=c(fe,L.props),T.ref=xo(M,fe,L),T.return=M,M=T;break e}s(M,fe);break}else n(M,fe);fe=fe.sibling}L.type===$?(T=Xn(L.props.children,M.mode,Y,L.key),T.return=M,M=T):(Y=ni(L.type,L.key,L.props,null,M.mode,Y),Y.ref=xo(M,T,L),Y.return=M,M=Y)}return y(M);case A:e:{for(fe=L.key;T!==null;){if(T.key===fe)if(T.tag===4&&T.stateNode.containerInfo===L.containerInfo&&T.stateNode.implementation===L.implementation){s(M,T.sibling),T=c(T,L.children||[]),T.return=M,M=T;break e}else{s(M,T);break}else n(M,T);T=T.sibling}T=zl(L,M.mode,Y),T.return=M,M=T}return y(M);case se:return fe=L._init,Le(M,T,fe(L._payload),Y)}if(Vr(L))return re(M,T,L,Y);if(H(L))return oe(M,T,L,Y);Os(M,L)}return typeof L=="string"&&L!==""||typeof L=="number"?(L=""+L,T!==null&&T.tag===6?(s(M,T.sibling),T=c(T,L),T.return=M,M=T):(s(M,T),T=$l(L,M.mode,Y),T.return=M,M=T),y(M)):s(M,T)}return Le}var Sr=Jd(!0),ef=Jd(!1),As=vn(null),Ms=null,Cr=null,qa=null;function Ya(){qa=Cr=Ms=null}function Xa(e){var n=As.current;Pe(As),e._currentValue=n}function Za(e,n,s){for(;e!==null;){var a=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,a!==null&&(a.childLanes|=n)):a!==null&&(a.childLanes&n)!==n&&(a.childLanes|=n),e===s)break;e=e.return}}function kr(e,n){Ms=e,qa=Cr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&n)!==0&&(lt=!0),e.firstContext=null)}function St(e){var n=e._currentValue;if(qa!==e)if(e={context:e,memoizedValue:n,next:null},Cr===null){if(Ms===null)throw Error(o(308));Cr=e,Ms.dependencies={lanes:0,firstContext:e}}else Cr=Cr.next=e;return n}var Wn=null;function Ja(e){Wn===null?Wn=[e]:Wn.push(e)}function tf(e,n,s,a){var c=n.interleaved;return c===null?(s.next=s,Ja(n)):(s.next=c.next,c.next=s),n.interleaved=s,tn(e,a)}function tn(e,n){e.lanes|=n;var s=e.alternate;for(s!==null&&(s.lanes|=n),s=e,e=e.return;e!==null;)e.childLanes|=n,s=e.alternate,s!==null&&(s.childLanes|=n),s=e,e=e.return;return s.tag===3?s.stateNode:null}var wn=!1;function el(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function nf(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function nn(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function bn(e,n,s){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Se&2)!==0){var c=a.pending;return c===null?n.next=n:(n.next=c.next,c.next=n),a.pending=n,tn(e,s)}return c=a.interleaved,c===null?(n.next=n,Ja(a)):(n.next=c.next,c.next=n),a.interleaved=n,tn(e,s)}function Is(e,n,s){if(n=n.updateQueue,n!==null&&(n=n.shared,(s&4194240)!==0)){var a=n.lanes;a&=e.pendingLanes,s|=a,n.lanes=s,ha(e,s)}}function rf(e,n){var s=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,s===a)){var c=null,f=null;if(s=s.firstBaseUpdate,s!==null){do{var y={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};f===null?c=f=y:f=f.next=y,s=s.next}while(s!==null);f===null?c=f=n:f=f.next=n}else c=f=n;s={baseState:a.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:a.shared,effects:a.effects},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=n:e.next=n,s.lastBaseUpdate=n}function Ls(e,n,s,a){var c=e.updateQueue;wn=!1;var f=c.firstBaseUpdate,y=c.lastBaseUpdate,N=c.shared.pending;if(N!==null){c.shared.pending=null;var R=N,F=R.next;R.next=null,y===null?f=F:y.next=F,y=R;var V=e.alternate;V!==null&&(V=V.updateQueue,N=V.lastBaseUpdate,N!==y&&(N===null?V.firstBaseUpdate=F:N.next=F,V.lastBaseUpdate=R))}if(f!==null){var G=c.baseState;y=0,V=F=R=null,N=f;do{var W=N.lane,J=N.eventTime;if((a&W)===W){V!==null&&(V=V.next={eventTime:J,lane:0,tag:N.tag,payload:N.payload,callback:N.callback,next:null});e:{var re=e,oe=N;switch(W=n,J=s,oe.tag){case 1:if(re=oe.payload,typeof re=="function"){G=re.call(J,G,W);break e}G=re;break e;case 3:re.flags=re.flags&-65537|128;case 0:if(re=oe.payload,W=typeof re=="function"?re.call(J,G,W):re,W==null)break e;G=q({},G,W);break e;case 2:wn=!0}}N.callback!==null&&N.lane!==0&&(e.flags|=64,W=c.effects,W===null?c.effects=[N]:W.push(N))}else J={eventTime:J,lane:W,tag:N.tag,payload:N.payload,callback:N.callback,next:null},V===null?(F=V=J,R=G):V=V.next=J,y|=W;if(N=N.next,N===null){if(N=c.shared.pending,N===null)break;W=N,N=W.next,W.next=null,c.lastBaseUpdate=W,c.shared.pending=null}}while(!0);if(V===null&&(R=G),c.baseState=R,c.firstBaseUpdate=F,c.lastBaseUpdate=V,n=c.shared.interleaved,n!==null){c=n;do y|=c.lane,c=c.next;while(c!==n)}else f===null&&(c.shared.lanes=0);Qn|=y,e.lanes=y,e.memoizedState=G}}function of(e,n,s){if(e=n.effects,n.effects=null,e!==null)for(n=0;n<e.length;n++){var a=e[n],c=a.callback;if(c!==null){if(a.callback=null,a=s,typeof c!="function")throw Error(o(191,c));c.call(a)}}}var yo={},Ht=vn(yo),wo=vn(yo),bo=vn(yo);function Kn(e){if(e===yo)throw Error(o(174));return e}function tl(e,n){switch(Ne(bo,n),Ne(wo,e),Ne(Ht,yo),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:na(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=na(n,e)}Pe(Ht),Ne(Ht,n)}function Er(){Pe(Ht),Pe(wo),Pe(bo)}function sf(e){Kn(bo.current);var n=Kn(Ht.current),s=na(n,e.type);n!==s&&(Ne(wo,e),Ne(Ht,s))}function nl(e){wo.current===e&&(Pe(Ht),Pe(wo))}var Oe=vn(0);function Ds(e){for(var n=e;n!==null;){if(n.tag===13){var s=n.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data==="$?"||s.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var rl=[];function ol(){for(var e=0;e<rl.length;e++)rl[e]._workInProgressVersionPrimary=null;rl.length=0}var Fs=I.ReactCurrentDispatcher,sl=I.ReactCurrentBatchConfig,Vn=0,Ae=null,$e=null,Be=null,$s=!1,So=!1,Co=0,Ny=0;function Ye(){throw Error(o(321))}function il(e,n){if(n===null)return!1;for(var s=0;s<n.length&&s<e.length;s++)if(!Pt(e[s],n[s]))return!1;return!0}function al(e,n,s,a,c,f){if(Vn=f,Ae=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,Fs.current=e===null||e.memoizedState===null?Ty:_y,e=s(a,c),So){f=0;do{if(So=!1,Co=0,25<=f)throw Error(o(301));f+=1,Be=$e=null,n.updateQueue=null,Fs.current=Oy,e=s(a,c)}while(So)}if(Fs.current=Hs,n=$e!==null&&$e.next!==null,Vn=0,Be=$e=Ae=null,$s=!1,n)throw Error(o(300));return e}function ll(){var e=Co!==0;return Co=0,e}function Bt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Be===null?Ae.memoizedState=Be=e:Be=Be.next=e,Be}function Ct(){if($e===null){var e=Ae.alternate;e=e!==null?e.memoizedState:null}else e=$e.next;var n=Be===null?Ae.memoizedState:Be.next;if(n!==null)Be=n,$e=e;else{if(e===null)throw Error(o(310));$e=e,e={memoizedState:$e.memoizedState,baseState:$e.baseState,baseQueue:$e.baseQueue,queue:$e.queue,next:null},Be===null?Ae.memoizedState=Be=e:Be=Be.next=e}return Be}function ko(e,n){return typeof n=="function"?n(e):n}function ul(e){var n=Ct(),s=n.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=e;var a=$e,c=a.baseQueue,f=s.pending;if(f!==null){if(c!==null){var y=c.next;c.next=f.next,f.next=y}a.baseQueue=c=f,s.pending=null}if(c!==null){f=c.next,a=a.baseState;var N=y=null,R=null,F=f;do{var V=F.lane;if((Vn&V)===V)R!==null&&(R=R.next={lane:0,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null}),a=F.hasEagerState?F.eagerState:e(a,F.action);else{var G={lane:V,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null};R===null?(N=R=G,y=a):R=R.next=G,Ae.lanes|=V,Qn|=V}F=F.next}while(F!==null&&F!==f);R===null?y=a:R.next=N,Pt(a,n.memoizedState)||(lt=!0),n.memoizedState=a,n.baseState=y,n.baseQueue=R,s.lastRenderedState=a}if(e=s.interleaved,e!==null){c=e;do f=c.lane,Ae.lanes|=f,Qn|=f,c=c.next;while(c!==e)}else c===null&&(s.lanes=0);return[n.memoizedState,s.dispatch]}function cl(e){var n=Ct(),s=n.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=e;var a=s.dispatch,c=s.pending,f=n.memoizedState;if(c!==null){s.pending=null;var y=c=c.next;do f=e(f,y.action),y=y.next;while(y!==c);Pt(f,n.memoizedState)||(lt=!0),n.memoizedState=f,n.baseQueue===null&&(n.baseState=f),s.lastRenderedState=f}return[f,a]}function af(){}function lf(e,n){var s=Ae,a=Ct(),c=n(),f=!Pt(a.memoizedState,c);if(f&&(a.memoizedState=c,lt=!0),a=a.queue,dl(df.bind(null,s,a,e),[e]),a.getSnapshot!==n||f||Be!==null&&Be.memoizedState.tag&1){if(s.flags|=2048,Eo(9,cf.bind(null,s,a,c,n),void 0,null),We===null)throw Error(o(349));(Vn&30)!==0||uf(s,n,c)}return c}function uf(e,n,s){e.flags|=16384,e={getSnapshot:n,value:s},n=Ae.updateQueue,n===null?(n={lastEffect:null,stores:null},Ae.updateQueue=n,n.stores=[e]):(s=n.stores,s===null?n.stores=[e]:s.push(e))}function cf(e,n,s,a){n.value=s,n.getSnapshot=a,ff(n)&&pf(e)}function df(e,n,s){return s(function(){ff(n)&&pf(e)})}function ff(e){var n=e.getSnapshot;e=e.value;try{var s=n();return!Pt(e,s)}catch{return!0}}function pf(e){var n=tn(e,1);n!==null&&Mt(n,e,1,-1)}function hf(e){var n=Bt();return typeof e=="function"&&(e=e()),n.memoizedState=n.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ko,lastRenderedState:e},n.queue=e,e=e.dispatch=Py.bind(null,Ae,e),[n.memoizedState,e]}function Eo(e,n,s,a){return e={tag:e,create:n,destroy:s,deps:a,next:null},n=Ae.updateQueue,n===null?(n={lastEffect:null,stores:null},Ae.updateQueue=n,n.lastEffect=e.next=e):(s=n.lastEffect,s===null?n.lastEffect=e.next=e:(a=s.next,s.next=e,e.next=a,n.lastEffect=e)),e}function mf(){return Ct().memoizedState}function zs(e,n,s,a){var c=Bt();Ae.flags|=e,c.memoizedState=Eo(1|n,s,void 0,a===void 0?null:a)}function Us(e,n,s,a){var c=Ct();a=a===void 0?null:a;var f=void 0;if($e!==null){var y=$e.memoizedState;if(f=y.destroy,a!==null&&il(a,y.deps)){c.memoizedState=Eo(n,s,f,a);return}}Ae.flags|=e,c.memoizedState=Eo(1|n,s,f,a)}function gf(e,n){return zs(8390656,8,e,n)}function dl(e,n){return Us(2048,8,e,n)}function vf(e,n){return Us(4,2,e,n)}function xf(e,n){return Us(4,4,e,n)}function yf(e,n){if(typeof n=="function")return e=e(),n(e),function(){n(null)};if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function wf(e,n,s){return s=s!=null?s.concat([e]):null,Us(4,4,yf.bind(null,n,e),s)}function fl(){}function bf(e,n){var s=Ct();n=n===void 0?null:n;var a=s.memoizedState;return a!==null&&n!==null&&il(n,a[1])?a[0]:(s.memoizedState=[e,n],e)}function Sf(e,n){var s=Ct();n=n===void 0?null:n;var a=s.memoizedState;return a!==null&&n!==null&&il(n,a[1])?a[0]:(e=e(),s.memoizedState=[e,n],e)}function Cf(e,n,s){return(Vn&21)===0?(e.baseState&&(e.baseState=!1,lt=!0),e.memoizedState=s):(Pt(s,n)||(s=Zc(),Ae.lanes|=s,Qn|=s,e.baseState=!0),n)}function jy(e,n){var s=ke;ke=s!==0&&4>s?s:4,e(!0);var a=sl.transition;sl.transition={};try{e(!1),n()}finally{ke=s,sl.transition=a}}function kf(){return Ct().memoizedState}function Ry(e,n,s){var a=En(e);if(s={lane:a,action:s,hasEagerState:!1,eagerState:null,next:null},Ef(e))Nf(n,s);else if(s=tf(e,n,s,a),s!==null){var c=rt();Mt(s,e,a,c),jf(s,n,a)}}function Py(e,n,s){var a=En(e),c={lane:a,action:s,hasEagerState:!1,eagerState:null,next:null};if(Ef(e))Nf(n,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=n.lastRenderedReducer,f!==null))try{var y=n.lastRenderedState,N=f(y,s);if(c.hasEagerState=!0,c.eagerState=N,Pt(N,y)){var R=n.interleaved;R===null?(c.next=c,Ja(n)):(c.next=R.next,R.next=c),n.interleaved=c;return}}catch{}s=tf(e,n,c,a),s!==null&&(c=rt(),Mt(s,e,a,c),jf(s,n,a))}}function Ef(e){var n=e.alternate;return e===Ae||n!==null&&n===Ae}function Nf(e,n){So=$s=!0;var s=e.pending;s===null?n.next=n:(n.next=s.next,s.next=n),e.pending=n}function jf(e,n,s){if((s&4194240)!==0){var a=n.lanes;a&=e.pendingLanes,s|=a,n.lanes=s,ha(e,s)}}var Hs={readContext:St,useCallback:Ye,useContext:Ye,useEffect:Ye,useImperativeHandle:Ye,useInsertionEffect:Ye,useLayoutEffect:Ye,useMemo:Ye,useReducer:Ye,useRef:Ye,useState:Ye,useDebugValue:Ye,useDeferredValue:Ye,useTransition:Ye,useMutableSource:Ye,useSyncExternalStore:Ye,useId:Ye,unstable_isNewReconciler:!1},Ty={readContext:St,useCallback:function(e,n){return Bt().memoizedState=[e,n===void 0?null:n],e},useContext:St,useEffect:gf,useImperativeHandle:function(e,n,s){return s=s!=null?s.concat([e]):null,zs(4194308,4,yf.bind(null,n,e),s)},useLayoutEffect:function(e,n){return zs(4194308,4,e,n)},useInsertionEffect:function(e,n){return zs(4,2,e,n)},useMemo:function(e,n){var s=Bt();return n=n===void 0?null:n,e=e(),s.memoizedState=[e,n],e},useReducer:function(e,n,s){var a=Bt();return n=s!==void 0?s(n):n,a.memoizedState=a.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},a.queue=e,e=e.dispatch=Ry.bind(null,Ae,e),[a.memoizedState,e]},useRef:function(e){var n=Bt();return e={current:e},n.memoizedState=e},useState:hf,useDebugValue:fl,useDeferredValue:function(e){return Bt().memoizedState=e},useTransition:function(){var e=hf(!1),n=e[0];return e=jy.bind(null,e[1]),Bt().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,s){var a=Ae,c=Bt();if(_e){if(s===void 0)throw Error(o(407));s=s()}else{if(s=n(),We===null)throw Error(o(349));(Vn&30)!==0||uf(a,n,s)}c.memoizedState=s;var f={value:s,getSnapshot:n};return c.queue=f,gf(df.bind(null,a,f,e),[e]),a.flags|=2048,Eo(9,cf.bind(null,a,f,s,n),void 0,null),s},useId:function(){var e=Bt(),n=We.identifierPrefix;if(_e){var s=en,a=Jt;s=(a&~(1<<32-Rt(a)-1)).toString(32)+s,n=":"+n+"R"+s,s=Co++,0<s&&(n+="H"+s.toString(32)),n+=":"}else s=Ny++,n=":"+n+"r"+s.toString(32)+":";return e.memoizedState=n},unstable_isNewReconciler:!1},_y={readContext:St,useCallback:bf,useContext:St,useEffect:dl,useImperativeHandle:wf,useInsertionEffect:vf,useLayoutEffect:xf,useMemo:Sf,useReducer:ul,useRef:mf,useState:function(){return ul(ko)},useDebugValue:fl,useDeferredValue:function(e){var n=Ct();return Cf(n,$e.memoizedState,e)},useTransition:function(){var e=ul(ko)[0],n=Ct().memoizedState;return[e,n]},useMutableSource:af,useSyncExternalStore:lf,useId:kf,unstable_isNewReconciler:!1},Oy={readContext:St,useCallback:bf,useContext:St,useEffect:dl,useImperativeHandle:wf,useInsertionEffect:vf,useLayoutEffect:xf,useMemo:Sf,useReducer:cl,useRef:mf,useState:function(){return cl(ko)},useDebugValue:fl,useDeferredValue:function(e){var n=Ct();return $e===null?n.memoizedState=e:Cf(n,$e.memoizedState,e)},useTransition:function(){var e=cl(ko)[0],n=Ct().memoizedState;return[e,n]},useMutableSource:af,useSyncExternalStore:lf,useId:kf,unstable_isNewReconciler:!1};function _t(e,n){if(e&&e.defaultProps){n=q({},n),e=e.defaultProps;for(var s in e)n[s]===void 0&&(n[s]=e[s]);return n}return n}function pl(e,n,s,a){n=e.memoizedState,s=s(a,n),s=s==null?n:q({},n,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var Bs={isMounted:function(e){return(e=e._reactInternals)?$n(e)===e:!1},enqueueSetState:function(e,n,s){e=e._reactInternals;var a=rt(),c=En(e),f=nn(a,c);f.payload=n,s!=null&&(f.callback=s),n=bn(e,f,c),n!==null&&(Mt(n,e,c,a),Is(n,e,c))},enqueueReplaceState:function(e,n,s){e=e._reactInternals;var a=rt(),c=En(e),f=nn(a,c);f.tag=1,f.payload=n,s!=null&&(f.callback=s),n=bn(e,f,c),n!==null&&(Mt(n,e,c,a),Is(n,e,c))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var s=rt(),a=En(e),c=nn(s,a);c.tag=2,n!=null&&(c.callback=n),n=bn(e,c,a),n!==null&&(Mt(n,e,a,s),Is(n,e,a))}};function Rf(e,n,s,a,c,f,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,f,y):n.prototype&&n.prototype.isPureReactComponent?!co(s,a)||!co(c,f):!0}function Pf(e,n,s){var a=!1,c=xn,f=n.contextType;return typeof f=="object"&&f!==null?f=St(f):(c=at(n)?Un:qe.current,a=n.contextTypes,f=(a=a!=null)?xr(e,c):xn),n=new n(s,f),e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=Bs,e.stateNode=n,n._reactInternals=e,a&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=c,e.__reactInternalMemoizedMaskedChildContext=f),n}function Tf(e,n,s,a){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(s,a),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(s,a),n.state!==e&&Bs.enqueueReplaceState(n,n.state,null)}function hl(e,n,s,a){var c=e.stateNode;c.props=s,c.state=e.memoizedState,c.refs={},el(e);var f=n.contextType;typeof f=="object"&&f!==null?c.context=St(f):(f=at(n)?Un:qe.current,c.context=xr(e,f)),c.state=e.memoizedState,f=n.getDerivedStateFromProps,typeof f=="function"&&(pl(e,n,f,s),c.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(n=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),n!==c.state&&Bs.enqueueReplaceState(c,c.state,null),Ls(e,s,c,a),c.state=e.memoizedState),typeof c.componentDidMount=="function"&&(e.flags|=4194308)}function Nr(e,n){try{var s="",a=n;do s+=z(a),a=a.return;while(a);var c=s}catch(f){c=`
|
|
7
|
+
Error generating stack: `+f.message+`
|
|
8
|
+
`+f.stack}return{value:e,source:n,stack:c,digest:null}}function ml(e,n,s){return{value:e,source:null,stack:s??null,digest:n??null}}function gl(e,n){try{console.error(n.value)}catch(s){setTimeout(function(){throw s})}}var Ay=typeof WeakMap=="function"?WeakMap:Map;function _f(e,n,s){s=nn(-1,s),s.tag=3,s.payload={element:null};var a=n.value;return s.callback=function(){Ys||(Ys=!0,_l=a),gl(e,n)},s}function Of(e,n,s){s=nn(-1,s),s.tag=3;var a=e.type.getDerivedStateFromError;if(typeof a=="function"){var c=n.value;s.payload=function(){return a(c)},s.callback=function(){gl(e,n)}}var f=e.stateNode;return f!==null&&typeof f.componentDidCatch=="function"&&(s.callback=function(){gl(e,n),typeof a!="function"&&(Cn===null?Cn=new Set([this]):Cn.add(this));var y=n.stack;this.componentDidCatch(n.value,{componentStack:y!==null?y:""})}),s}function Af(e,n,s){var a=e.pingCache;if(a===null){a=e.pingCache=new Ay;var c=new Set;a.set(n,c)}else c=a.get(n),c===void 0&&(c=new Set,a.set(n,c));c.has(s)||(c.add(s),e=Qy.bind(null,e,n,s),n.then(e,e))}function Mf(e){do{var n;if((n=e.tag===13)&&(n=e.memoizedState,n=n!==null?n.dehydrated!==null:!0),n)return e;e=e.return}while(e!==null);return null}function If(e,n,s,a,c){return(e.mode&1)===0?(e===n?e.flags|=65536:(e.flags|=128,s.flags|=131072,s.flags&=-52805,s.tag===1&&(s.alternate===null?s.tag=17:(n=nn(-1,1),n.tag=2,bn(s,n,1))),s.lanes|=1),e):(e.flags|=65536,e.lanes=c,e)}var My=I.ReactCurrentOwner,lt=!1;function nt(e,n,s,a){n.child=e===null?ef(n,null,s,a):Sr(n,e.child,s,a)}function Lf(e,n,s,a,c){s=s.render;var f=n.ref;return kr(n,c),a=al(e,n,s,a,f,c),s=ll(),e!==null&&!lt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~c,rn(e,n,c)):(_e&&s&&Wa(n),n.flags|=1,nt(e,n,a,c),n.child)}function Df(e,n,s,a,c){if(e===null){var f=s.type;return typeof f=="function"&&!Fl(f)&&f.defaultProps===void 0&&s.compare===null&&s.defaultProps===void 0?(n.tag=15,n.type=f,Ff(e,n,f,a,c)):(e=ni(s.type,null,a,n,n.mode,c),e.ref=n.ref,e.return=n,n.child=e)}if(f=e.child,(e.lanes&c)===0){var y=f.memoizedProps;if(s=s.compare,s=s!==null?s:co,s(y,a)&&e.ref===n.ref)return rn(e,n,c)}return n.flags|=1,e=jn(f,a),e.ref=n.ref,e.return=n,n.child=e}function Ff(e,n,s,a,c){if(e!==null){var f=e.memoizedProps;if(co(f,a)&&e.ref===n.ref)if(lt=!1,n.pendingProps=a=f,(e.lanes&c)!==0)(e.flags&131072)!==0&&(lt=!0);else return n.lanes=e.lanes,rn(e,n,c)}return vl(e,n,s,a,c)}function $f(e,n,s){var a=n.pendingProps,c=a.children,f=e!==null?e.memoizedState:null;if(a.mode==="hidden")if((n.mode&1)===0)n.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ne(Rr,mt),mt|=s;else{if((s&1073741824)===0)return e=f!==null?f.baseLanes|s:s,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,Ne(Rr,mt),mt|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},a=f!==null?f.baseLanes:s,Ne(Rr,mt),mt|=a}else f!==null?(a=f.baseLanes|s,n.memoizedState=null):a=s,Ne(Rr,mt),mt|=a;return nt(e,n,c,s),n.child}function zf(e,n){var s=n.ref;(e===null&&s!==null||e!==null&&e.ref!==s)&&(n.flags|=512,n.flags|=2097152)}function vl(e,n,s,a,c){var f=at(s)?Un:qe.current;return f=xr(n,f),kr(n,c),s=al(e,n,s,a,f,c),a=ll(),e!==null&&!lt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~c,rn(e,n,c)):(_e&&a&&Wa(n),n.flags|=1,nt(e,n,s,c),n.child)}function Uf(e,n,s,a,c){if(at(s)){var f=!0;js(n)}else f=!1;if(kr(n,c),n.stateNode===null)Ks(e,n),Pf(n,s,a),hl(n,s,a,c),a=!0;else if(e===null){var y=n.stateNode,N=n.memoizedProps;y.props=N;var R=y.context,F=s.contextType;typeof F=="object"&&F!==null?F=St(F):(F=at(s)?Un:qe.current,F=xr(n,F));var V=s.getDerivedStateFromProps,G=typeof V=="function"||typeof y.getSnapshotBeforeUpdate=="function";G||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(N!==a||R!==F)&&Tf(n,y,a,F),wn=!1;var W=n.memoizedState;y.state=W,Ls(n,a,y,c),R=n.memoizedState,N!==a||W!==R||it.current||wn?(typeof V=="function"&&(pl(n,s,V,a),R=n.memoizedState),(N=wn||Rf(n,s,N,a,W,R,F))?(G||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(n.flags|=4194308)):(typeof y.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=a,n.memoizedState=R),y.props=a,y.state=R,y.context=F,a=N):(typeof y.componentDidMount=="function"&&(n.flags|=4194308),a=!1)}else{y=n.stateNode,nf(e,n),N=n.memoizedProps,F=n.type===n.elementType?N:_t(n.type,N),y.props=F,G=n.pendingProps,W=y.context,R=s.contextType,typeof R=="object"&&R!==null?R=St(R):(R=at(s)?Un:qe.current,R=xr(n,R));var J=s.getDerivedStateFromProps;(V=typeof J=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(N!==G||W!==R)&&Tf(n,y,a,R),wn=!1,W=n.memoizedState,y.state=W,Ls(n,a,y,c);var re=n.memoizedState;N!==G||W!==re||it.current||wn?(typeof J=="function"&&(pl(n,s,J,a),re=n.memoizedState),(F=wn||Rf(n,s,F,a,W,re,R)||!1)?(V||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(a,re,R),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(a,re,R)),typeof y.componentDidUpdate=="function"&&(n.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof y.componentDidUpdate!="function"||N===e.memoizedProps&&W===e.memoizedState||(n.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||N===e.memoizedProps&&W===e.memoizedState||(n.flags|=1024),n.memoizedProps=a,n.memoizedState=re),y.props=a,y.state=re,y.context=R,a=F):(typeof y.componentDidUpdate!="function"||N===e.memoizedProps&&W===e.memoizedState||(n.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||N===e.memoizedProps&&W===e.memoizedState||(n.flags|=1024),a=!1)}return xl(e,n,s,a,f,c)}function xl(e,n,s,a,c,f){zf(e,n);var y=(n.flags&128)!==0;if(!a&&!y)return c&&Kd(n,s,!1),rn(e,n,f);a=n.stateNode,My.current=n;var N=y&&typeof s.getDerivedStateFromError!="function"?null:a.render();return n.flags|=1,e!==null&&y?(n.child=Sr(n,e.child,null,f),n.child=Sr(n,null,N,f)):nt(e,n,N,f),n.memoizedState=a.state,c&&Kd(n,s,!0),n.child}function Hf(e){var n=e.stateNode;n.pendingContext?Bd(e,n.pendingContext,n.pendingContext!==n.context):n.context&&Bd(e,n.context,!1),tl(e,n.containerInfo)}function Bf(e,n,s,a,c){return br(),Ga(c),n.flags|=256,nt(e,n,s,a),n.child}var yl={dehydrated:null,treeContext:null,retryLane:0};function wl(e){return{baseLanes:e,cachePool:null,transitions:null}}function Wf(e,n,s){var a=n.pendingProps,c=Oe.current,f=!1,y=(n.flags&128)!==0,N;if((N=y)||(N=e!==null&&e.memoizedState===null?!1:(c&2)!==0),N?(f=!0,n.flags&=-129):(e===null||e.memoizedState!==null)&&(c|=1),Ne(Oe,c&1),e===null)return Qa(n),e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((n.mode&1)===0?n.lanes=1:e.data==="$!"?n.lanes=8:n.lanes=1073741824,null):(y=a.children,e=a.fallback,f?(a=n.mode,f=n.child,y={mode:"hidden",children:y},(a&1)===0&&f!==null?(f.childLanes=0,f.pendingProps=y):f=ri(y,a,0,null),e=Xn(e,a,s,null),f.return=n,e.return=n,f.sibling=e,n.child=f,n.child.memoizedState=wl(s),n.memoizedState=yl,e):bl(n,y));if(c=e.memoizedState,c!==null&&(N=c.dehydrated,N!==null))return Iy(e,n,y,a,N,c,s);if(f){f=a.fallback,y=n.mode,c=e.child,N=c.sibling;var R={mode:"hidden",children:a.children};return(y&1)===0&&n.child!==c?(a=n.child,a.childLanes=0,a.pendingProps=R,n.deletions=null):(a=jn(c,R),a.subtreeFlags=c.subtreeFlags&14680064),N!==null?f=jn(N,f):(f=Xn(f,y,s,null),f.flags|=2),f.return=n,a.return=n,a.sibling=f,n.child=a,a=f,f=n.child,y=e.child.memoizedState,y=y===null?wl(s):{baseLanes:y.baseLanes|s,cachePool:null,transitions:y.transitions},f.memoizedState=y,f.childLanes=e.childLanes&~s,n.memoizedState=yl,a}return f=e.child,e=f.sibling,a=jn(f,{mode:"visible",children:a.children}),(n.mode&1)===0&&(a.lanes=s),a.return=n,a.sibling=null,e!==null&&(s=n.deletions,s===null?(n.deletions=[e],n.flags|=16):s.push(e)),n.child=a,n.memoizedState=null,a}function bl(e,n){return n=ri({mode:"visible",children:n},e.mode,0,null),n.return=e,e.child=n}function Ws(e,n,s,a){return a!==null&&Ga(a),Sr(n,e.child,null,s),e=bl(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Iy(e,n,s,a,c,f,y){if(s)return n.flags&256?(n.flags&=-257,a=ml(Error(o(422))),Ws(e,n,y,a)):n.memoizedState!==null?(n.child=e.child,n.flags|=128,null):(f=a.fallback,c=n.mode,a=ri({mode:"visible",children:a.children},c,0,null),f=Xn(f,c,y,null),f.flags|=2,a.return=n,f.return=n,a.sibling=f,n.child=a,(n.mode&1)!==0&&Sr(n,e.child,null,y),n.child.memoizedState=wl(y),n.memoizedState=yl,f);if((n.mode&1)===0)return Ws(e,n,y,null);if(c.data==="$!"){if(a=c.nextSibling&&c.nextSibling.dataset,a)var N=a.dgst;return a=N,f=Error(o(419)),a=ml(f,a,void 0),Ws(e,n,y,a)}if(N=(y&e.childLanes)!==0,lt||N){if(a=We,a!==null){switch(y&-y){case 4:c=2;break;case 16:c=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:c=32;break;case 536870912:c=268435456;break;default:c=0}c=(c&(a.suspendedLanes|y))!==0?0:c,c!==0&&c!==f.retryLane&&(f.retryLane=c,tn(e,c),Mt(a,e,c,-1))}return Dl(),a=ml(Error(o(421))),Ws(e,n,y,a)}return c.data==="$?"?(n.flags|=128,n.child=e.child,n=Gy.bind(null,e),c._reactRetry=n,null):(e=f.treeContext,ht=gn(c.nextSibling),pt=n,_e=!0,Tt=null,e!==null&&(wt[bt++]=Jt,wt[bt++]=en,wt[bt++]=Hn,Jt=e.id,en=e.overflow,Hn=n),n=bl(n,a.children),n.flags|=4096,n)}function Kf(e,n,s){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n),Za(e.return,n,s)}function Sl(e,n,s,a,c){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:a,tail:s,tailMode:c}:(f.isBackwards=n,f.rendering=null,f.renderingStartTime=0,f.last=a,f.tail=s,f.tailMode=c)}function Vf(e,n,s){var a=n.pendingProps,c=a.revealOrder,f=a.tail;if(nt(e,n,a.children,s),a=Oe.current,(a&2)!==0)a=a&1|2,n.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Kf(e,s,n);else if(e.tag===19)Kf(e,s,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}a&=1}if(Ne(Oe,a),(n.mode&1)===0)n.memoizedState=null;else switch(c){case"forwards":for(s=n.child,c=null;s!==null;)e=s.alternate,e!==null&&Ds(e)===null&&(c=s),s=s.sibling;s=c,s===null?(c=n.child,n.child=null):(c=s.sibling,s.sibling=null),Sl(n,!1,c,s,f);break;case"backwards":for(s=null,c=n.child,n.child=null;c!==null;){if(e=c.alternate,e!==null&&Ds(e)===null){n.child=c;break}e=c.sibling,c.sibling=s,s=c,c=e}Sl(n,!0,s,null,f);break;case"together":Sl(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function Ks(e,n){(n.mode&1)===0&&e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2)}function rn(e,n,s){if(e!==null&&(n.dependencies=e.dependencies),Qn|=n.lanes,(s&n.childLanes)===0)return null;if(e!==null&&n.child!==e.child)throw Error(o(153));if(n.child!==null){for(e=n.child,s=jn(e,e.pendingProps),n.child=s,s.return=n;e.sibling!==null;)e=e.sibling,s=s.sibling=jn(e,e.pendingProps),s.return=n;s.sibling=null}return n.child}function Ly(e,n,s){switch(n.tag){case 3:Hf(n),br();break;case 5:sf(n);break;case 1:at(n.type)&&js(n);break;case 4:tl(n,n.stateNode.containerInfo);break;case 10:var a=n.type._context,c=n.memoizedProps.value;Ne(As,a._currentValue),a._currentValue=c;break;case 13:if(a=n.memoizedState,a!==null)return a.dehydrated!==null?(Ne(Oe,Oe.current&1),n.flags|=128,null):(s&n.child.childLanes)!==0?Wf(e,n,s):(Ne(Oe,Oe.current&1),e=rn(e,n,s),e!==null?e.sibling:null);Ne(Oe,Oe.current&1);break;case 19:if(a=(s&n.childLanes)!==0,(e.flags&128)!==0){if(a)return Vf(e,n,s);n.flags|=128}if(c=n.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),Ne(Oe,Oe.current),a)break;return null;case 22:case 23:return n.lanes=0,$f(e,n,s)}return rn(e,n,s)}var Qf,Cl,Gf,qf;Qf=function(e,n){for(var s=n.child;s!==null;){if(s.tag===5||s.tag===6)e.appendChild(s.stateNode);else if(s.tag!==4&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return;s=s.return}s.sibling.return=s.return,s=s.sibling}},Cl=function(){},Gf=function(e,n,s,a){var c=e.memoizedProps;if(c!==a){e=n.stateNode,Kn(Ht.current);var f=null;switch(s){case"input":c=Zi(e,c),a=Zi(e,a),f=[];break;case"select":c=q({},c,{value:void 0}),a=q({},a,{value:void 0}),f=[];break;case"textarea":c=ta(e,c),a=ta(e,a),f=[];break;default:typeof c.onClick!="function"&&typeof a.onClick=="function"&&(e.onclick=ks)}ra(s,a);var y;s=null;for(F in c)if(!a.hasOwnProperty(F)&&c.hasOwnProperty(F)&&c[F]!=null)if(F==="style"){var N=c[F];for(y in N)N.hasOwnProperty(y)&&(s||(s={}),s[y]="")}else F!=="dangerouslySetInnerHTML"&&F!=="children"&&F!=="suppressContentEditableWarning"&&F!=="suppressHydrationWarning"&&F!=="autoFocus"&&(u.hasOwnProperty(F)?f||(f=[]):(f=f||[]).push(F,null));for(F in a){var R=a[F];if(N=c?.[F],a.hasOwnProperty(F)&&R!==N&&(R!=null||N!=null))if(F==="style")if(N){for(y in N)!N.hasOwnProperty(y)||R&&R.hasOwnProperty(y)||(s||(s={}),s[y]="");for(y in R)R.hasOwnProperty(y)&&N[y]!==R[y]&&(s||(s={}),s[y]=R[y])}else s||(f||(f=[]),f.push(F,s)),s=R;else F==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,N=N?N.__html:void 0,R!=null&&N!==R&&(f=f||[]).push(F,R)):F==="children"?typeof R!="string"&&typeof R!="number"||(f=f||[]).push(F,""+R):F!=="suppressContentEditableWarning"&&F!=="suppressHydrationWarning"&&(u.hasOwnProperty(F)?(R!=null&&F==="onScroll"&&Re("scroll",e),f||N===R||(f=[])):(f=f||[]).push(F,R))}s&&(f=f||[]).push("style",s);var F=f;(n.updateQueue=F)&&(n.flags|=4)}},qf=function(e,n,s,a){s!==a&&(n.flags|=4)};function No(e,n){if(!_e)switch(e.tailMode){case"hidden":n=e.tail;for(var s=null;n!==null;)n.alternate!==null&&(s=n),n=n.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var a=null;s!==null;)s.alternate!==null&&(a=s),s=s.sibling;a===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Xe(e){var n=e.alternate!==null&&e.alternate.child===e.child,s=0,a=0;if(n)for(var c=e.child;c!==null;)s|=c.lanes|c.childLanes,a|=c.subtreeFlags&14680064,a|=c.flags&14680064,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)s|=c.lanes|c.childLanes,a|=c.subtreeFlags,a|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=a,e.childLanes=s,n}function Dy(e,n,s){var a=n.pendingProps;switch(Ka(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xe(n),null;case 1:return at(n.type)&&Ns(),Xe(n),null;case 3:return a=n.stateNode,Er(),Pe(it),Pe(qe),ol(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(_s(n)?n.flags|=4:e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Tt!==null&&(Ml(Tt),Tt=null))),Cl(e,n),Xe(n),null;case 5:nl(n);var c=Kn(bo.current);if(s=n.type,e!==null&&n.stateNode!=null)Gf(e,n,s,a,c),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!a){if(n.stateNode===null)throw Error(o(166));return Xe(n),null}if(e=Kn(Ht.current),_s(n)){a=n.stateNode,s=n.type;var f=n.memoizedProps;switch(a[Ut]=n,a[go]=f,e=(n.mode&1)!==0,s){case"dialog":Re("cancel",a),Re("close",a);break;case"iframe":case"object":case"embed":Re("load",a);break;case"video":case"audio":for(c=0;c<po.length;c++)Re(po[c],a);break;case"source":Re("error",a);break;case"img":case"image":case"link":Re("error",a),Re("load",a);break;case"details":Re("toggle",a);break;case"input":Rc(a,f),Re("invalid",a);break;case"select":a._wrapperState={wasMultiple:!!f.multiple},Re("invalid",a);break;case"textarea":_c(a,f),Re("invalid",a)}ra(s,f),c=null;for(var y in f)if(f.hasOwnProperty(y)){var N=f[y];y==="children"?typeof N=="string"?a.textContent!==N&&(f.suppressHydrationWarning!==!0&&Cs(a.textContent,N,e),c=["children",N]):typeof N=="number"&&a.textContent!==""+N&&(f.suppressHydrationWarning!==!0&&Cs(a.textContent,N,e),c=["children",""+N]):u.hasOwnProperty(y)&&N!=null&&y==="onScroll"&&Re("scroll",a)}switch(s){case"input":sr(a),Tc(a,f,!0);break;case"textarea":sr(a),Ac(a);break;case"select":case"option":break;default:typeof f.onClick=="function"&&(a.onclick=ks)}a=c,n.updateQueue=a,a!==null&&(n.flags|=4)}else{y=c.nodeType===9?c:c.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Mc(s)),e==="http://www.w3.org/1999/xhtml"?s==="script"?(e=y.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof a.is=="string"?e=y.createElement(s,{is:a.is}):(e=y.createElement(s),s==="select"&&(y=e,a.multiple?y.multiple=!0:a.size&&(y.size=a.size))):e=y.createElementNS(e,s),e[Ut]=n,e[go]=a,Qf(e,n,!1,!1),n.stateNode=e;e:{switch(y=oa(s,a),s){case"dialog":Re("cancel",e),Re("close",e),c=a;break;case"iframe":case"object":case"embed":Re("load",e),c=a;break;case"video":case"audio":for(c=0;c<po.length;c++)Re(po[c],e);c=a;break;case"source":Re("error",e),c=a;break;case"img":case"image":case"link":Re("error",e),Re("load",e),c=a;break;case"details":Re("toggle",e),c=a;break;case"input":Rc(e,a),c=Zi(e,a),Re("invalid",e);break;case"option":c=a;break;case"select":e._wrapperState={wasMultiple:!!a.multiple},c=q({},a,{value:void 0}),Re("invalid",e);break;case"textarea":_c(e,a),c=ta(e,a),Re("invalid",e);break;default:c=a}ra(s,c),N=c;for(f in N)if(N.hasOwnProperty(f)){var R=N[f];f==="style"?Dc(e,R):f==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,R!=null&&Ic(e,R)):f==="children"?typeof R=="string"?(s!=="textarea"||R!=="")&&Qr(e,R):typeof R=="number"&&Qr(e,""+R):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(u.hasOwnProperty(f)?R!=null&&f==="onScroll"&&Re("scroll",e):R!=null&&O(e,f,R,y))}switch(s){case"input":sr(e),Tc(e,a,!1);break;case"textarea":sr(e),Ac(e);break;case"option":a.value!=null&&e.setAttribute("value",""+be(a.value));break;case"select":e.multiple=!!a.multiple,f=a.value,f!=null?ir(e,!!a.multiple,f,!1):a.defaultValue!=null&&ir(e,!!a.multiple,a.defaultValue,!0);break;default:typeof c.onClick=="function"&&(e.onclick=ks)}switch(s){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}}a&&(n.flags|=4)}n.ref!==null&&(n.flags|=512,n.flags|=2097152)}return Xe(n),null;case 6:if(e&&n.stateNode!=null)qf(e,n,e.memoizedProps,a);else{if(typeof a!="string"&&n.stateNode===null)throw Error(o(166));if(s=Kn(bo.current),Kn(Ht.current),_s(n)){if(a=n.stateNode,s=n.memoizedProps,a[Ut]=n,(f=a.nodeValue!==s)&&(e=pt,e!==null))switch(e.tag){case 3:Cs(a.nodeValue,s,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Cs(a.nodeValue,s,(e.mode&1)!==0)}f&&(n.flags|=4)}else a=(s.nodeType===9?s:s.ownerDocument).createTextNode(a),a[Ut]=n,n.stateNode=a}return Xe(n),null;case 13:if(Pe(Oe),a=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(_e&&ht!==null&&(n.mode&1)!==0&&(n.flags&128)===0)Xd(),br(),n.flags|=98560,f=!1;else if(f=_s(n),a!==null&&a.dehydrated!==null){if(e===null){if(!f)throw Error(o(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(o(317));f[Ut]=n}else br(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Xe(n),f=!1}else Tt!==null&&(Ml(Tt),Tt=null),f=!0;if(!f)return n.flags&65536?n:null}return(n.flags&128)!==0?(n.lanes=s,n):(a=a!==null,a!==(e!==null&&e.memoizedState!==null)&&a&&(n.child.flags|=8192,(n.mode&1)!==0&&(e===null||(Oe.current&1)!==0?ze===0&&(ze=3):Dl())),n.updateQueue!==null&&(n.flags|=4),Xe(n),null);case 4:return Er(),Cl(e,n),e===null&&ho(n.stateNode.containerInfo),Xe(n),null;case 10:return Xa(n.type._context),Xe(n),null;case 17:return at(n.type)&&Ns(),Xe(n),null;case 19:if(Pe(Oe),f=n.memoizedState,f===null)return Xe(n),null;if(a=(n.flags&128)!==0,y=f.rendering,y===null)if(a)No(f,!1);else{if(ze!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(y=Ds(e),y!==null){for(n.flags|=128,No(f,!1),a=y.updateQueue,a!==null&&(n.updateQueue=a,n.flags|=4),n.subtreeFlags=0,a=s,s=n.child;s!==null;)f=s,e=a,f.flags&=14680066,y=f.alternate,y===null?(f.childLanes=0,f.lanes=e,f.child=null,f.subtreeFlags=0,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null):(f.childLanes=y.childLanes,f.lanes=y.lanes,f.child=y.child,f.subtreeFlags=0,f.deletions=null,f.memoizedProps=y.memoizedProps,f.memoizedState=y.memoizedState,f.updateQueue=y.updateQueue,f.type=y.type,e=y.dependencies,f.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),s=s.sibling;return Ne(Oe,Oe.current&1|2),n.child}e=e.sibling}f.tail!==null&&Ie()>Pr&&(n.flags|=128,a=!0,No(f,!1),n.lanes=4194304)}else{if(!a)if(e=Ds(y),e!==null){if(n.flags|=128,a=!0,s=e.updateQueue,s!==null&&(n.updateQueue=s,n.flags|=4),No(f,!0),f.tail===null&&f.tailMode==="hidden"&&!y.alternate&&!_e)return Xe(n),null}else 2*Ie()-f.renderingStartTime>Pr&&s!==1073741824&&(n.flags|=128,a=!0,No(f,!1),n.lanes=4194304);f.isBackwards?(y.sibling=n.child,n.child=y):(s=f.last,s!==null?s.sibling=y:n.child=y,f.last=y)}return f.tail!==null?(n=f.tail,f.rendering=n,f.tail=n.sibling,f.renderingStartTime=Ie(),n.sibling=null,s=Oe.current,Ne(Oe,a?s&1|2:s&1),n):(Xe(n),null);case 22:case 23:return Ll(),a=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==a&&(n.flags|=8192),a&&(n.mode&1)!==0?(mt&1073741824)!==0&&(Xe(n),n.subtreeFlags&6&&(n.flags|=8192)):Xe(n),null;case 24:return null;case 25:return null}throw Error(o(156,n.tag))}function Fy(e,n){switch(Ka(n),n.tag){case 1:return at(n.type)&&Ns(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Er(),Pe(it),Pe(qe),ol(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 5:return nl(n),null;case 13:if(Pe(Oe),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(o(340));br()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return Pe(Oe),null;case 4:return Er(),null;case 10:return Xa(n.type._context),null;case 22:case 23:return Ll(),null;case 24:return null;default:return null}}var Vs=!1,Ze=!1,$y=typeof WeakSet=="function"?WeakSet:Set,te=null;function jr(e,n){var s=e.ref;if(s!==null)if(typeof s=="function")try{s(null)}catch(a){Me(e,n,a)}else s.current=null}function kl(e,n,s){try{s()}catch(a){Me(e,n,a)}}var Yf=!1;function zy(e,n){if(La=fs,e=jd(),Ra(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var a=s.getSelection&&s.getSelection();if(a&&a.rangeCount!==0){s=a.anchorNode;var c=a.anchorOffset,f=a.focusNode;a=a.focusOffset;try{s.nodeType,f.nodeType}catch{s=null;break e}var y=0,N=-1,R=-1,F=0,V=0,G=e,W=null;t:for(;;){for(var J;G!==s||c!==0&&G.nodeType!==3||(N=y+c),G!==f||a!==0&&G.nodeType!==3||(R=y+a),G.nodeType===3&&(y+=G.nodeValue.length),(J=G.firstChild)!==null;)W=G,G=J;for(;;){if(G===e)break t;if(W===s&&++F===c&&(N=y),W===f&&++V===a&&(R=y),(J=G.nextSibling)!==null)break;G=W,W=G.parentNode}G=J}s=N===-1||R===-1?null:{start:N,end:R}}else s=null}s=s||{start:0,end:0}}else s=null;for(Da={focusedElem:e,selectionRange:s},fs=!1,te=n;te!==null;)if(n=te,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,te=e;else for(;te!==null;){n=te;try{var re=n.alternate;if((n.flags&1024)!==0)switch(n.tag){case 0:case 11:case 15:break;case 1:if(re!==null){var oe=re.memoizedProps,Le=re.memoizedState,M=n.stateNode,T=M.getSnapshotBeforeUpdate(n.elementType===n.type?oe:_t(n.type,oe),Le);M.__reactInternalSnapshotBeforeUpdate=T}break;case 3:var L=n.stateNode.containerInfo;L.nodeType===1?L.textContent="":L.nodeType===9&&L.documentElement&&L.removeChild(L.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(Y){Me(n,n.return,Y)}if(e=n.sibling,e!==null){e.return=n.return,te=e;break}te=n.return}return re=Yf,Yf=!1,re}function jo(e,n,s){var a=n.updateQueue;if(a=a!==null?a.lastEffect:null,a!==null){var c=a=a.next;do{if((c.tag&e)===e){var f=c.destroy;c.destroy=void 0,f!==void 0&&kl(n,s,f)}c=c.next}while(c!==a)}}function Qs(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&e)===e){var a=s.create;s.destroy=a()}s=s.next}while(s!==n)}}function El(e){var n=e.ref;if(n!==null){var s=e.stateNode;e.tag,e=s,typeof n=="function"?n(e):n.current=e}}function Xf(e){var n=e.alternate;n!==null&&(e.alternate=null,Xf(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[Ut],delete n[go],delete n[Ua],delete n[Sy],delete n[Cy])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Zf(e){return e.tag===5||e.tag===3||e.tag===4}function Jf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Zf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Nl(e,n,s){var a=e.tag;if(a===5||a===6)e=e.stateNode,n?s.nodeType===8?s.parentNode.insertBefore(e,n):s.insertBefore(e,n):(s.nodeType===8?(n=s.parentNode,n.insertBefore(e,s)):(n=s,n.appendChild(e)),s=s._reactRootContainer,s!=null||n.onclick!==null||(n.onclick=ks));else if(a!==4&&(e=e.child,e!==null))for(Nl(e,n,s),e=e.sibling;e!==null;)Nl(e,n,s),e=e.sibling}function jl(e,n,s){var a=e.tag;if(a===5||a===6)e=e.stateNode,n?s.insertBefore(e,n):s.appendChild(e);else if(a!==4&&(e=e.child,e!==null))for(jl(e,n,s),e=e.sibling;e!==null;)jl(e,n,s),e=e.sibling}var Ve=null,Ot=!1;function Sn(e,n,s){for(s=s.child;s!==null;)ep(e,n,s),s=s.sibling}function ep(e,n,s){if(zt&&typeof zt.onCommitFiberUnmount=="function")try{zt.onCommitFiberUnmount(is,s)}catch{}switch(s.tag){case 5:Ze||jr(s,n);case 6:var a=Ve,c=Ot;Ve=null,Sn(e,n,s),Ve=a,Ot=c,Ve!==null&&(Ot?(e=Ve,s=s.stateNode,e.nodeType===8?e.parentNode.removeChild(s):e.removeChild(s)):Ve.removeChild(s.stateNode));break;case 18:Ve!==null&&(Ot?(e=Ve,s=s.stateNode,e.nodeType===8?za(e.parentNode,s):e.nodeType===1&&za(e,s),oo(e)):za(Ve,s.stateNode));break;case 4:a=Ve,c=Ot,Ve=s.stateNode.containerInfo,Ot=!0,Sn(e,n,s),Ve=a,Ot=c;break;case 0:case 11:case 14:case 15:if(!Ze&&(a=s.updateQueue,a!==null&&(a=a.lastEffect,a!==null))){c=a=a.next;do{var f=c,y=f.destroy;f=f.tag,y!==void 0&&((f&2)!==0||(f&4)!==0)&&kl(s,n,y),c=c.next}while(c!==a)}Sn(e,n,s);break;case 1:if(!Ze&&(jr(s,n),a=s.stateNode,typeof a.componentWillUnmount=="function"))try{a.props=s.memoizedProps,a.state=s.memoizedState,a.componentWillUnmount()}catch(N){Me(s,n,N)}Sn(e,n,s);break;case 21:Sn(e,n,s);break;case 22:s.mode&1?(Ze=(a=Ze)||s.memoizedState!==null,Sn(e,n,s),Ze=a):Sn(e,n,s);break;default:Sn(e,n,s)}}function tp(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var s=e.stateNode;s===null&&(s=e.stateNode=new $y),n.forEach(function(a){var c=qy.bind(null,e,a);s.has(a)||(s.add(a),a.then(c,c))})}}function At(e,n){var s=n.deletions;if(s!==null)for(var a=0;a<s.length;a++){var c=s[a];try{var f=e,y=n,N=y;e:for(;N!==null;){switch(N.tag){case 5:Ve=N.stateNode,Ot=!1;break e;case 3:Ve=N.stateNode.containerInfo,Ot=!0;break e;case 4:Ve=N.stateNode.containerInfo,Ot=!0;break e}N=N.return}if(Ve===null)throw Error(o(160));ep(f,y,c),Ve=null,Ot=!1;var R=c.alternate;R!==null&&(R.return=null),c.return=null}catch(F){Me(c,n,F)}}if(n.subtreeFlags&12854)for(n=n.child;n!==null;)np(n,e),n=n.sibling}function np(e,n){var s=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(At(n,e),Wt(e),a&4){try{jo(3,e,e.return),Qs(3,e)}catch(oe){Me(e,e.return,oe)}try{jo(5,e,e.return)}catch(oe){Me(e,e.return,oe)}}break;case 1:At(n,e),Wt(e),a&512&&s!==null&&jr(s,s.return);break;case 5:if(At(n,e),Wt(e),a&512&&s!==null&&jr(s,s.return),e.flags&32){var c=e.stateNode;try{Qr(c,"")}catch(oe){Me(e,e.return,oe)}}if(a&4&&(c=e.stateNode,c!=null)){var f=e.memoizedProps,y=s!==null?s.memoizedProps:f,N=e.type,R=e.updateQueue;if(e.updateQueue=null,R!==null)try{N==="input"&&f.type==="radio"&&f.name!=null&&Pc(c,f),oa(N,y);var F=oa(N,f);for(y=0;y<R.length;y+=2){var V=R[y],G=R[y+1];V==="style"?Dc(c,G):V==="dangerouslySetInnerHTML"?Ic(c,G):V==="children"?Qr(c,G):O(c,V,G,F)}switch(N){case"input":Ji(c,f);break;case"textarea":Oc(c,f);break;case"select":var W=c._wrapperState.wasMultiple;c._wrapperState.wasMultiple=!!f.multiple;var J=f.value;J!=null?ir(c,!!f.multiple,J,!1):W!==!!f.multiple&&(f.defaultValue!=null?ir(c,!!f.multiple,f.defaultValue,!0):ir(c,!!f.multiple,f.multiple?[]:"",!1))}c[go]=f}catch(oe){Me(e,e.return,oe)}}break;case 6:if(At(n,e),Wt(e),a&4){if(e.stateNode===null)throw Error(o(162));c=e.stateNode,f=e.memoizedProps;try{c.nodeValue=f}catch(oe){Me(e,e.return,oe)}}break;case 3:if(At(n,e),Wt(e),a&4&&s!==null&&s.memoizedState.isDehydrated)try{oo(n.containerInfo)}catch(oe){Me(e,e.return,oe)}break;case 4:At(n,e),Wt(e);break;case 13:At(n,e),Wt(e),c=e.child,c.flags&8192&&(f=c.memoizedState!==null,c.stateNode.isHidden=f,!f||c.alternate!==null&&c.alternate.memoizedState!==null||(Tl=Ie())),a&4&&tp(e);break;case 22:if(V=s!==null&&s.memoizedState!==null,e.mode&1?(Ze=(F=Ze)||V,At(n,e),Ze=F):At(n,e),Wt(e),a&8192){if(F=e.memoizedState!==null,(e.stateNode.isHidden=F)&&!V&&(e.mode&1)!==0)for(te=e,V=e.child;V!==null;){for(G=te=V;te!==null;){switch(W=te,J=W.child,W.tag){case 0:case 11:case 14:case 15:jo(4,W,W.return);break;case 1:jr(W,W.return);var re=W.stateNode;if(typeof re.componentWillUnmount=="function"){a=W,s=W.return;try{n=a,re.props=n.memoizedProps,re.state=n.memoizedState,re.componentWillUnmount()}catch(oe){Me(a,s,oe)}}break;case 5:jr(W,W.return);break;case 22:if(W.memoizedState!==null){sp(G);continue}}J!==null?(J.return=W,te=J):sp(G)}V=V.sibling}e:for(V=null,G=e;;){if(G.tag===5){if(V===null){V=G;try{c=G.stateNode,F?(f=c.style,typeof f.setProperty=="function"?f.setProperty("display","none","important"):f.display="none"):(N=G.stateNode,R=G.memoizedProps.style,y=R!=null&&R.hasOwnProperty("display")?R.display:null,N.style.display=Lc("display",y))}catch(oe){Me(e,e.return,oe)}}}else if(G.tag===6){if(V===null)try{G.stateNode.nodeValue=F?"":G.memoizedProps}catch(oe){Me(e,e.return,oe)}}else if((G.tag!==22&&G.tag!==23||G.memoizedState===null||G===e)&&G.child!==null){G.child.return=G,G=G.child;continue}if(G===e)break e;for(;G.sibling===null;){if(G.return===null||G.return===e)break e;V===G&&(V=null),G=G.return}V===G&&(V=null),G.sibling.return=G.return,G=G.sibling}}break;case 19:At(n,e),Wt(e),a&4&&tp(e);break;case 21:break;default:At(n,e),Wt(e)}}function Wt(e){var n=e.flags;if(n&2){try{e:{for(var s=e.return;s!==null;){if(Zf(s)){var a=s;break e}s=s.return}throw Error(o(160))}switch(a.tag){case 5:var c=a.stateNode;a.flags&32&&(Qr(c,""),a.flags&=-33);var f=Jf(e);jl(e,f,c);break;case 3:case 4:var y=a.stateNode.containerInfo,N=Jf(e);Nl(e,N,y);break;default:throw Error(o(161))}}catch(R){Me(e,e.return,R)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function Uy(e,n,s){te=e,rp(e)}function rp(e,n,s){for(var a=(e.mode&1)!==0;te!==null;){var c=te,f=c.child;if(c.tag===22&&a){var y=c.memoizedState!==null||Vs;if(!y){var N=c.alternate,R=N!==null&&N.memoizedState!==null||Ze;N=Vs;var F=Ze;if(Vs=y,(Ze=R)&&!F)for(te=c;te!==null;)y=te,R=y.child,y.tag===22&&y.memoizedState!==null?ip(c):R!==null?(R.return=y,te=R):ip(c);for(;f!==null;)te=f,rp(f),f=f.sibling;te=c,Vs=N,Ze=F}op(e)}else(c.subtreeFlags&8772)!==0&&f!==null?(f.return=c,te=f):op(e)}}function op(e){for(;te!==null;){var n=te;if((n.flags&8772)!==0){var s=n.alternate;try{if((n.flags&8772)!==0)switch(n.tag){case 0:case 11:case 15:Ze||Qs(5,n);break;case 1:var a=n.stateNode;if(n.flags&4&&!Ze)if(s===null)a.componentDidMount();else{var c=n.elementType===n.type?s.memoizedProps:_t(n.type,s.memoizedProps);a.componentDidUpdate(c,s.memoizedState,a.__reactInternalSnapshotBeforeUpdate)}var f=n.updateQueue;f!==null&&of(n,f,a);break;case 3:var y=n.updateQueue;if(y!==null){if(s=null,n.child!==null)switch(n.child.tag){case 5:s=n.child.stateNode;break;case 1:s=n.child.stateNode}of(n,y,s)}break;case 5:var N=n.stateNode;if(s===null&&n.flags&4){s=N;var R=n.memoizedProps;switch(n.type){case"button":case"input":case"select":case"textarea":R.autoFocus&&s.focus();break;case"img":R.src&&(s.src=R.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(n.memoizedState===null){var F=n.alternate;if(F!==null){var V=F.memoizedState;if(V!==null){var G=V.dehydrated;G!==null&&oo(G)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(o(163))}Ze||n.flags&512&&El(n)}catch(W){Me(n,n.return,W)}}if(n===e){te=null;break}if(s=n.sibling,s!==null){s.return=n.return,te=s;break}te=n.return}}function sp(e){for(;te!==null;){var n=te;if(n===e){te=null;break}var s=n.sibling;if(s!==null){s.return=n.return,te=s;break}te=n.return}}function ip(e){for(;te!==null;){var n=te;try{switch(n.tag){case 0:case 11:case 15:var s=n.return;try{Qs(4,n)}catch(R){Me(n,s,R)}break;case 1:var a=n.stateNode;if(typeof a.componentDidMount=="function"){var c=n.return;try{a.componentDidMount()}catch(R){Me(n,c,R)}}var f=n.return;try{El(n)}catch(R){Me(n,f,R)}break;case 5:var y=n.return;try{El(n)}catch(R){Me(n,y,R)}}}catch(R){Me(n,n.return,R)}if(n===e){te=null;break}var N=n.sibling;if(N!==null){N.return=n.return,te=N;break}te=n.return}}var Hy=Math.ceil,Gs=I.ReactCurrentDispatcher,Rl=I.ReactCurrentOwner,kt=I.ReactCurrentBatchConfig,Se=0,We=null,Fe=null,Qe=0,mt=0,Rr=vn(0),ze=0,Ro=null,Qn=0,qs=0,Pl=0,Po=null,ut=null,Tl=0,Pr=1/0,on=null,Ys=!1,_l=null,Cn=null,Xs=!1,kn=null,Zs=0,To=0,Ol=null,Js=-1,ei=0;function rt(){return(Se&6)!==0?Ie():Js!==-1?Js:Js=Ie()}function En(e){return(e.mode&1)===0?1:(Se&2)!==0&&Qe!==0?Qe&-Qe:Ey.transition!==null?(ei===0&&(ei=Zc()),ei):(e=ke,e!==0||(e=window.event,e=e===void 0?16:ad(e.type)),e)}function Mt(e,n,s,a){if(50<To)throw To=0,Ol=null,Error(o(185));Jr(e,s,a),((Se&2)===0||e!==We)&&(e===We&&((Se&2)===0&&(qs|=s),ze===4&&Nn(e,Qe)),ct(e,a),s===1&&Se===0&&(n.mode&1)===0&&(Pr=Ie()+500,Rs&&yn()))}function ct(e,n){var s=e.callbackNode;Ex(e,n);var a=us(e,e===We?Qe:0);if(a===0)s!==null&&qc(s),e.callbackNode=null,e.callbackPriority=0;else if(n=a&-a,e.callbackPriority!==n){if(s!=null&&qc(s),n===1)e.tag===0?ky(lp.bind(null,e)):Vd(lp.bind(null,e)),wy(function(){(Se&6)===0&&yn()}),s=null;else{switch(Jc(a)){case 1:s=da;break;case 4:s=Yc;break;case 16:s=ss;break;case 536870912:s=Xc;break;default:s=ss}s=gp(s,ap.bind(null,e))}e.callbackPriority=n,e.callbackNode=s}}function ap(e,n){if(Js=-1,ei=0,(Se&6)!==0)throw Error(o(327));var s=e.callbackNode;if(Tr()&&e.callbackNode!==s)return null;var a=us(e,e===We?Qe:0);if(a===0)return null;if((a&30)!==0||(a&e.expiredLanes)!==0||n)n=ti(e,a);else{n=a;var c=Se;Se|=2;var f=cp();(We!==e||Qe!==n)&&(on=null,Pr=Ie()+500,qn(e,n));do try{Ky();break}catch(N){up(e,N)}while(!0);Ya(),Gs.current=f,Se=c,Fe!==null?n=0:(We=null,Qe=0,n=ze)}if(n!==0){if(n===2&&(c=fa(e),c!==0&&(a=c,n=Al(e,c))),n===1)throw s=Ro,qn(e,0),Nn(e,a),ct(e,Ie()),s;if(n===6)Nn(e,a);else{if(c=e.current.alternate,(a&30)===0&&!By(c)&&(n=ti(e,a),n===2&&(f=fa(e),f!==0&&(a=f,n=Al(e,f))),n===1))throw s=Ro,qn(e,0),Nn(e,a),ct(e,Ie()),s;switch(e.finishedWork=c,e.finishedLanes=a,n){case 0:case 1:throw Error(o(345));case 2:Yn(e,ut,on);break;case 3:if(Nn(e,a),(a&130023424)===a&&(n=Tl+500-Ie(),10<n)){if(us(e,0)!==0)break;if(c=e.suspendedLanes,(c&a)!==a){rt(),e.pingedLanes|=e.suspendedLanes&c;break}e.timeoutHandle=$a(Yn.bind(null,e,ut,on),n);break}Yn(e,ut,on);break;case 4:if(Nn(e,a),(a&4194240)===a)break;for(n=e.eventTimes,c=-1;0<a;){var y=31-Rt(a);f=1<<y,y=n[y],y>c&&(c=y),a&=~f}if(a=c,a=Ie()-a,a=(120>a?120:480>a?480:1080>a?1080:1920>a?1920:3e3>a?3e3:4320>a?4320:1960*Hy(a/1960))-a,10<a){e.timeoutHandle=$a(Yn.bind(null,e,ut,on),a);break}Yn(e,ut,on);break;case 5:Yn(e,ut,on);break;default:throw Error(o(329))}}}return ct(e,Ie()),e.callbackNode===s?ap.bind(null,e):null}function Al(e,n){var s=Po;return e.current.memoizedState.isDehydrated&&(qn(e,n).flags|=256),e=ti(e,n),e!==2&&(n=ut,ut=s,n!==null&&Ml(n)),e}function Ml(e){ut===null?ut=e:ut.push.apply(ut,e)}function By(e){for(var n=e;;){if(n.flags&16384){var s=n.updateQueue;if(s!==null&&(s=s.stores,s!==null))for(var a=0;a<s.length;a++){var c=s[a],f=c.getSnapshot;c=c.value;try{if(!Pt(f(),c))return!1}catch{return!1}}}if(s=n.child,n.subtreeFlags&16384&&s!==null)s.return=n,n=s;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Nn(e,n){for(n&=~Pl,n&=~qs,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var s=31-Rt(n),a=1<<s;e[s]=-1,n&=~a}}function lp(e){if((Se&6)!==0)throw Error(o(327));Tr();var n=us(e,0);if((n&1)===0)return ct(e,Ie()),null;var s=ti(e,n);if(e.tag!==0&&s===2){var a=fa(e);a!==0&&(n=a,s=Al(e,a))}if(s===1)throw s=Ro,qn(e,0),Nn(e,n),ct(e,Ie()),s;if(s===6)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=n,Yn(e,ut,on),ct(e,Ie()),null}function Il(e,n){var s=Se;Se|=1;try{return e(n)}finally{Se=s,Se===0&&(Pr=Ie()+500,Rs&&yn())}}function Gn(e){kn!==null&&kn.tag===0&&(Se&6)===0&&Tr();var n=Se;Se|=1;var s=kt.transition,a=ke;try{if(kt.transition=null,ke=1,e)return e()}finally{ke=a,kt.transition=s,Se=n,(Se&6)===0&&yn()}}function Ll(){mt=Rr.current,Pe(Rr)}function qn(e,n){e.finishedWork=null,e.finishedLanes=0;var s=e.timeoutHandle;if(s!==-1&&(e.timeoutHandle=-1,yy(s)),Fe!==null)for(s=Fe.return;s!==null;){var a=s;switch(Ka(a),a.tag){case 1:a=a.type.childContextTypes,a!=null&&Ns();break;case 3:Er(),Pe(it),Pe(qe),ol();break;case 5:nl(a);break;case 4:Er();break;case 13:Pe(Oe);break;case 19:Pe(Oe);break;case 10:Xa(a.type._context);break;case 22:case 23:Ll()}s=s.return}if(We=e,Fe=e=jn(e.current,null),Qe=mt=n,ze=0,Ro=null,Pl=qs=Qn=0,ut=Po=null,Wn!==null){for(n=0;n<Wn.length;n++)if(s=Wn[n],a=s.interleaved,a!==null){s.interleaved=null;var c=a.next,f=s.pending;if(f!==null){var y=f.next;f.next=c,a.next=y}s.pending=a}Wn=null}return e}function up(e,n){do{var s=Fe;try{if(Ya(),Fs.current=Hs,$s){for(var a=Ae.memoizedState;a!==null;){var c=a.queue;c!==null&&(c.pending=null),a=a.next}$s=!1}if(Vn=0,Be=$e=Ae=null,So=!1,Co=0,Rl.current=null,s===null||s.return===null){ze=1,Ro=n,Fe=null;break}e:{var f=e,y=s.return,N=s,R=n;if(n=Qe,N.flags|=32768,R!==null&&typeof R=="object"&&typeof R.then=="function"){var F=R,V=N,G=V.tag;if((V.mode&1)===0&&(G===0||G===11||G===15)){var W=V.alternate;W?(V.updateQueue=W.updateQueue,V.memoizedState=W.memoizedState,V.lanes=W.lanes):(V.updateQueue=null,V.memoizedState=null)}var J=Mf(y);if(J!==null){J.flags&=-257,If(J,y,N,f,n),J.mode&1&&Af(f,F,n),n=J,R=F;var re=n.updateQueue;if(re===null){var oe=new Set;oe.add(R),n.updateQueue=oe}else re.add(R);break e}else{if((n&1)===0){Af(f,F,n),Dl();break e}R=Error(o(426))}}else if(_e&&N.mode&1){var Le=Mf(y);if(Le!==null){(Le.flags&65536)===0&&(Le.flags|=256),If(Le,y,N,f,n),Ga(Nr(R,N));break e}}f=R=Nr(R,N),ze!==4&&(ze=2),Po===null?Po=[f]:Po.push(f),f=y;do{switch(f.tag){case 3:f.flags|=65536,n&=-n,f.lanes|=n;var M=_f(f,R,n);rf(f,M);break e;case 1:N=R;var T=f.type,L=f.stateNode;if((f.flags&128)===0&&(typeof T.getDerivedStateFromError=="function"||L!==null&&typeof L.componentDidCatch=="function"&&(Cn===null||!Cn.has(L)))){f.flags|=65536,n&=-n,f.lanes|=n;var Y=Of(f,N,n);rf(f,Y);break e}}f=f.return}while(f!==null)}fp(s)}catch(ie){n=ie,Fe===s&&s!==null&&(Fe=s=s.return);continue}break}while(!0)}function cp(){var e=Gs.current;return Gs.current=Hs,e===null?Hs:e}function Dl(){(ze===0||ze===3||ze===2)&&(ze=4),We===null||(Qn&268435455)===0&&(qs&268435455)===0||Nn(We,Qe)}function ti(e,n){var s=Se;Se|=2;var a=cp();(We!==e||Qe!==n)&&(on=null,qn(e,n));do try{Wy();break}catch(c){up(e,c)}while(!0);if(Ya(),Se=s,Gs.current=a,Fe!==null)throw Error(o(261));return We=null,Qe=0,ze}function Wy(){for(;Fe!==null;)dp(Fe)}function Ky(){for(;Fe!==null&&!gx();)dp(Fe)}function dp(e){var n=mp(e.alternate,e,mt);e.memoizedProps=e.pendingProps,n===null?fp(e):Fe=n,Rl.current=null}function fp(e){var n=e;do{var s=n.alternate;if(e=n.return,(n.flags&32768)===0){if(s=Dy(s,n,mt),s!==null){Fe=s;return}}else{if(s=Fy(s,n),s!==null){s.flags&=32767,Fe=s;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ze=6,Fe=null;return}}if(n=n.sibling,n!==null){Fe=n;return}Fe=n=e}while(n!==null);ze===0&&(ze=5)}function Yn(e,n,s){var a=ke,c=kt.transition;try{kt.transition=null,ke=1,Vy(e,n,s,a)}finally{kt.transition=c,ke=a}return null}function Vy(e,n,s,a){do Tr();while(kn!==null);if((Se&6)!==0)throw Error(o(327));s=e.finishedWork;var c=e.finishedLanes;if(s===null)return null;if(e.finishedWork=null,e.finishedLanes=0,s===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0;var f=s.lanes|s.childLanes;if(Nx(e,f),e===We&&(Fe=We=null,Qe=0),(s.subtreeFlags&2064)===0&&(s.flags&2064)===0||Xs||(Xs=!0,gp(ss,function(){return Tr(),null})),f=(s.flags&15990)!==0,(s.subtreeFlags&15990)!==0||f){f=kt.transition,kt.transition=null;var y=ke;ke=1;var N=Se;Se|=4,Rl.current=null,zy(e,s),np(s,e),fy(Da),fs=!!La,Da=La=null,e.current=s,Uy(s),vx(),Se=N,ke=y,kt.transition=f}else e.current=s;if(Xs&&(Xs=!1,kn=e,Zs=c),f=e.pendingLanes,f===0&&(Cn=null),wx(s.stateNode),ct(e,Ie()),n!==null)for(a=e.onRecoverableError,s=0;s<n.length;s++)c=n[s],a(c.value,{componentStack:c.stack,digest:c.digest});if(Ys)throw Ys=!1,e=_l,_l=null,e;return(Zs&1)!==0&&e.tag!==0&&Tr(),f=e.pendingLanes,(f&1)!==0?e===Ol?To++:(To=0,Ol=e):To=0,yn(),null}function Tr(){if(kn!==null){var e=Jc(Zs),n=kt.transition,s=ke;try{if(kt.transition=null,ke=16>e?16:e,kn===null)var a=!1;else{if(e=kn,kn=null,Zs=0,(Se&6)!==0)throw Error(o(331));var c=Se;for(Se|=4,te=e.current;te!==null;){var f=te,y=f.child;if((te.flags&16)!==0){var N=f.deletions;if(N!==null){for(var R=0;R<N.length;R++){var F=N[R];for(te=F;te!==null;){var V=te;switch(V.tag){case 0:case 11:case 15:jo(8,V,f)}var G=V.child;if(G!==null)G.return=V,te=G;else for(;te!==null;){V=te;var W=V.sibling,J=V.return;if(Xf(V),V===F){te=null;break}if(W!==null){W.return=J,te=W;break}te=J}}}var re=f.alternate;if(re!==null){var oe=re.child;if(oe!==null){re.child=null;do{var Le=oe.sibling;oe.sibling=null,oe=Le}while(oe!==null)}}te=f}}if((f.subtreeFlags&2064)!==0&&y!==null)y.return=f,te=y;else e:for(;te!==null;){if(f=te,(f.flags&2048)!==0)switch(f.tag){case 0:case 11:case 15:jo(9,f,f.return)}var M=f.sibling;if(M!==null){M.return=f.return,te=M;break e}te=f.return}}var T=e.current;for(te=T;te!==null;){y=te;var L=y.child;if((y.subtreeFlags&2064)!==0&&L!==null)L.return=y,te=L;else e:for(y=T;te!==null;){if(N=te,(N.flags&2048)!==0)try{switch(N.tag){case 0:case 11:case 15:Qs(9,N)}}catch(ie){Me(N,N.return,ie)}if(N===y){te=null;break e}var Y=N.sibling;if(Y!==null){Y.return=N.return,te=Y;break e}te=N.return}}if(Se=c,yn(),zt&&typeof zt.onPostCommitFiberRoot=="function")try{zt.onPostCommitFiberRoot(is,e)}catch{}a=!0}return a}finally{ke=s,kt.transition=n}}return!1}function pp(e,n,s){n=Nr(s,n),n=_f(e,n,1),e=bn(e,n,1),n=rt(),e!==null&&(Jr(e,1,n),ct(e,n))}function Me(e,n,s){if(e.tag===3)pp(e,e,s);else for(;n!==null;){if(n.tag===3){pp(n,e,s);break}else if(n.tag===1){var a=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Cn===null||!Cn.has(a))){e=Nr(s,e),e=Of(n,e,1),n=bn(n,e,1),e=rt(),n!==null&&(Jr(n,1,e),ct(n,e));break}}n=n.return}}function Qy(e,n,s){var a=e.pingCache;a!==null&&a.delete(n),n=rt(),e.pingedLanes|=e.suspendedLanes&s,We===e&&(Qe&s)===s&&(ze===4||ze===3&&(Qe&130023424)===Qe&&500>Ie()-Tl?qn(e,0):Pl|=s),ct(e,n)}function hp(e,n){n===0&&((e.mode&1)===0?n=1:(n=ls,ls<<=1,(ls&130023424)===0&&(ls=4194304)));var s=rt();e=tn(e,n),e!==null&&(Jr(e,n,s),ct(e,s))}function Gy(e){var n=e.memoizedState,s=0;n!==null&&(s=n.retryLane),hp(e,s)}function qy(e,n){var s=0;switch(e.tag){case 13:var a=e.stateNode,c=e.memoizedState;c!==null&&(s=c.retryLane);break;case 19:a=e.stateNode;break;default:throw Error(o(314))}a!==null&&a.delete(n),hp(e,s)}var mp;mp=function(e,n,s){if(e!==null)if(e.memoizedProps!==n.pendingProps||it.current)lt=!0;else{if((e.lanes&s)===0&&(n.flags&128)===0)return lt=!1,Ly(e,n,s);lt=(e.flags&131072)!==0}else lt=!1,_e&&(n.flags&1048576)!==0&&Qd(n,Ts,n.index);switch(n.lanes=0,n.tag){case 2:var a=n.type;Ks(e,n),e=n.pendingProps;var c=xr(n,qe.current);kr(n,s),c=al(null,n,a,e,c,s);var f=ll();return n.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,at(a)?(f=!0,js(n)):f=!1,n.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,el(n),c.updater=Bs,n.stateNode=c,c._reactInternals=n,hl(n,a,e,s),n=xl(null,n,a,!0,f,s)):(n.tag=0,_e&&f&&Wa(n),nt(null,n,c,s),n=n.child),n;case 16:a=n.elementType;e:{switch(Ks(e,n),e=n.pendingProps,c=a._init,a=c(a._payload),n.type=a,c=n.tag=Xy(a),e=_t(a,e),c){case 0:n=vl(null,n,a,e,s);break e;case 1:n=Uf(null,n,a,e,s);break e;case 11:n=Lf(null,n,a,e,s);break e;case 14:n=Df(null,n,a,_t(a.type,e),s);break e}throw Error(o(306,a,""))}return n;case 0:return a=n.type,c=n.pendingProps,c=n.elementType===a?c:_t(a,c),vl(e,n,a,c,s);case 1:return a=n.type,c=n.pendingProps,c=n.elementType===a?c:_t(a,c),Uf(e,n,a,c,s);case 3:e:{if(Hf(n),e===null)throw Error(o(387));a=n.pendingProps,f=n.memoizedState,c=f.element,nf(e,n),Ls(n,a,null,s);var y=n.memoizedState;if(a=y.element,f.isDehydrated)if(f={element:a,isDehydrated:!1,cache:y.cache,pendingSuspenseBoundaries:y.pendingSuspenseBoundaries,transitions:y.transitions},n.updateQueue.baseState=f,n.memoizedState=f,n.flags&256){c=Nr(Error(o(423)),n),n=Bf(e,n,a,s,c);break e}else if(a!==c){c=Nr(Error(o(424)),n),n=Bf(e,n,a,s,c);break e}else for(ht=gn(n.stateNode.containerInfo.firstChild),pt=n,_e=!0,Tt=null,s=ef(n,null,a,s),n.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(br(),a===c){n=rn(e,n,s);break e}nt(e,n,a,s)}n=n.child}return n;case 5:return sf(n),e===null&&Qa(n),a=n.type,c=n.pendingProps,f=e!==null?e.memoizedProps:null,y=c.children,Fa(a,c)?y=null:f!==null&&Fa(a,f)&&(n.flags|=32),zf(e,n),nt(e,n,y,s),n.child;case 6:return e===null&&Qa(n),null;case 13:return Wf(e,n,s);case 4:return tl(n,n.stateNode.containerInfo),a=n.pendingProps,e===null?n.child=Sr(n,null,a,s):nt(e,n,a,s),n.child;case 11:return a=n.type,c=n.pendingProps,c=n.elementType===a?c:_t(a,c),Lf(e,n,a,c,s);case 7:return nt(e,n,n.pendingProps,s),n.child;case 8:return nt(e,n,n.pendingProps.children,s),n.child;case 12:return nt(e,n,n.pendingProps.children,s),n.child;case 10:e:{if(a=n.type._context,c=n.pendingProps,f=n.memoizedProps,y=c.value,Ne(As,a._currentValue),a._currentValue=y,f!==null)if(Pt(f.value,y)){if(f.children===c.children&&!it.current){n=rn(e,n,s);break e}}else for(f=n.child,f!==null&&(f.return=n);f!==null;){var N=f.dependencies;if(N!==null){y=f.child;for(var R=N.firstContext;R!==null;){if(R.context===a){if(f.tag===1){R=nn(-1,s&-s),R.tag=2;var F=f.updateQueue;if(F!==null){F=F.shared;var V=F.pending;V===null?R.next=R:(R.next=V.next,V.next=R),F.pending=R}}f.lanes|=s,R=f.alternate,R!==null&&(R.lanes|=s),Za(f.return,s,n),N.lanes|=s;break}R=R.next}}else if(f.tag===10)y=f.type===n.type?null:f.child;else if(f.tag===18){if(y=f.return,y===null)throw Error(o(341));y.lanes|=s,N=y.alternate,N!==null&&(N.lanes|=s),Za(y,s,n),y=f.sibling}else y=f.child;if(y!==null)y.return=f;else for(y=f;y!==null;){if(y===n){y=null;break}if(f=y.sibling,f!==null){f.return=y.return,y=f;break}y=y.return}f=y}nt(e,n,c.children,s),n=n.child}return n;case 9:return c=n.type,a=n.pendingProps.children,kr(n,s),c=St(c),a=a(c),n.flags|=1,nt(e,n,a,s),n.child;case 14:return a=n.type,c=_t(a,n.pendingProps),c=_t(a.type,c),Df(e,n,a,c,s);case 15:return Ff(e,n,n.type,n.pendingProps,s);case 17:return a=n.type,c=n.pendingProps,c=n.elementType===a?c:_t(a,c),Ks(e,n),n.tag=1,at(a)?(e=!0,js(n)):e=!1,kr(n,s),Pf(n,a,c),hl(n,a,c,s),xl(null,n,a,!0,e,s);case 19:return Vf(e,n,s);case 22:return $f(e,n,s)}throw Error(o(156,n.tag))};function gp(e,n){return Gc(e,n)}function Yy(e,n,s,a){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Et(e,n,s,a){return new Yy(e,n,s,a)}function Fl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Xy(e){if(typeof e=="function")return Fl(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Z)return 11;if(e===ve)return 14}return 2}function jn(e,n){var s=e.alternate;return s===null?(s=Et(e.tag,n,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=n,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&14680064,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,n=e.dependencies,s.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s}function ni(e,n,s,a,c,f){var y=2;if(a=e,typeof e=="function")Fl(e)&&(y=1);else if(typeof e=="string")y=5;else e:switch(e){case $:return Xn(s.children,c,f,n);case K:y=8,c|=8;break;case Q:return e=Et(12,s,n,c|2),e.elementType=Q,e.lanes=f,e;case de:return e=Et(13,s,n,c),e.elementType=de,e.lanes=f,e;case X:return e=Et(19,s,n,c),e.elementType=X,e.lanes=f,e;case le:return ri(s,c,f,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ee:y=10;break e;case ne:y=9;break e;case Z:y=11;break e;case ve:y=14;break e;case se:y=16,a=null;break e}throw Error(o(130,e==null?e:typeof e,""))}return n=Et(y,s,n,c),n.elementType=e,n.type=a,n.lanes=f,n}function Xn(e,n,s,a){return e=Et(7,e,a,n),e.lanes=s,e}function ri(e,n,s,a){return e=Et(22,e,a,n),e.elementType=le,e.lanes=s,e.stateNode={isHidden:!1},e}function $l(e,n,s){return e=Et(6,e,null,n),e.lanes=s,e}function zl(e,n,s){return n=Et(4,e.children!==null?e.children:[],e.key,n),n.lanes=s,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function Zy(e,n,s,a,c){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=pa(0),this.expirationTimes=pa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pa(0),this.identifierPrefix=a,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function Ul(e,n,s,a,c,f,y,N,R){return e=new Zy(e,n,s,N,R),n===1?(n=1,f===!0&&(n|=8)):n=0,f=Et(3,null,null,n),e.current=f,f.stateNode=e,f.memoizedState={element:a,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},el(f),e}function Jy(e,n,s){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:A,key:a==null?null:""+a,children:e,containerInfo:n,implementation:s}}function vp(e){if(!e)return xn;e=e._reactInternals;e:{if($n(e)!==e||e.tag!==1)throw Error(o(170));var n=e;do{switch(n.tag){case 3:n=n.stateNode.context;break e;case 1:if(at(n.type)){n=n.stateNode.__reactInternalMemoizedMergedChildContext;break e}}n=n.return}while(n!==null);throw Error(o(171))}if(e.tag===1){var s=e.type;if(at(s))return Wd(e,s,n)}return n}function xp(e,n,s,a,c,f,y,N,R){return e=Ul(s,a,!0,e,c,f,y,N,R),e.context=vp(null),s=e.current,a=rt(),c=En(s),f=nn(a,c),f.callback=n??null,bn(s,f,c),e.current.lanes=c,Jr(e,c,a),ct(e,a),e}function oi(e,n,s,a){var c=n.current,f=rt(),y=En(c);return s=vp(s),n.context===null?n.context=s:n.pendingContext=s,n=nn(f,y),n.payload={element:e},a=a===void 0?null:a,a!==null&&(n.callback=a),e=bn(c,n,y),e!==null&&(Mt(e,c,y,f),Is(e,c,y)),y}function si(e){return e=e.current,e.child?(e.child.tag===5,e.child.stateNode):null}function yp(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<n?s:n}}function Hl(e,n){yp(e,n),(e=e.alternate)&&yp(e,n)}function ew(){return null}var wp=typeof reportError=="function"?reportError:function(e){console.error(e)};function Bl(e){this._internalRoot=e}ii.prototype.render=Bl.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(o(409));oi(e,n,null,null)},ii.prototype.unmount=Bl.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Gn(function(){oi(null,e,null,null)}),n[Xt]=null}};function ii(e){this._internalRoot=e}ii.prototype.unstable_scheduleHydration=function(e){if(e){var n=nd();e={blockedOn:null,target:e,priority:n};for(var s=0;s<pn.length&&n!==0&&n<pn[s].priority;s++);pn.splice(s,0,e),s===0&&sd(e)}};function Wl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ai(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function bp(){}function tw(e,n,s,a,c){if(c){if(typeof a=="function"){var f=a;a=function(){var F=si(y);f.call(F)}}var y=xp(n,a,e,0,null,!1,!1,"",bp);return e._reactRootContainer=y,e[Xt]=y.current,ho(e.nodeType===8?e.parentNode:e),Gn(),y}for(;c=e.lastChild;)e.removeChild(c);if(typeof a=="function"){var N=a;a=function(){var F=si(R);N.call(F)}}var R=Ul(e,0,!1,null,null,!1,!1,"",bp);return e._reactRootContainer=R,e[Xt]=R.current,ho(e.nodeType===8?e.parentNode:e),Gn(function(){oi(n,R,s,a)}),R}function li(e,n,s,a,c){var f=s._reactRootContainer;if(f){var y=f;if(typeof c=="function"){var N=c;c=function(){var R=si(y);N.call(R)}}oi(n,y,e,c)}else y=tw(s,n,e,c,a);return si(y)}ed=function(e){switch(e.tag){case 3:var n=e.stateNode;if(n.current.memoizedState.isDehydrated){var s=Zr(n.pendingLanes);s!==0&&(ha(n,s|1),ct(n,Ie()),(Se&6)===0&&(Pr=Ie()+500,yn()))}break;case 13:Gn(function(){var a=tn(e,1);if(a!==null){var c=rt();Mt(a,e,1,c)}}),Hl(e,1)}},ma=function(e){if(e.tag===13){var n=tn(e,134217728);if(n!==null){var s=rt();Mt(n,e,134217728,s)}Hl(e,134217728)}},td=function(e){if(e.tag===13){var n=En(e),s=tn(e,n);if(s!==null){var a=rt();Mt(s,e,n,a)}Hl(e,n)}},nd=function(){return ke},rd=function(e,n){var s=ke;try{return ke=e,n()}finally{ke=s}},aa=function(e,n,s){switch(n){case"input":if(Ji(e,s),n=s.name,s.type==="radio"&&n!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),n=0;n<s.length;n++){var a=s[n];if(a!==e&&a.form===e.form){var c=Es(a);if(!c)throw Error(o(90));ts(a),Ji(a,c)}}}break;case"textarea":Oc(e,s);break;case"select":n=s.value,n!=null&&ir(e,!!s.multiple,n,!1)}},Uc=Il,Hc=Gn;var nw={usingClientEntryPoint:!1,Events:[vo,gr,Es,$c,zc,Il]},_o={findFiberByHostInstance:zn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},rw={bundleType:_o.bundleType,version:_o.version,rendererPackageName:_o.rendererPackageName,rendererConfig:_o.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:I.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Vc(e),e===null?null:e.stateNode},findFiberByHostInstance:_o.findFiberByHostInstance||ew,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ui=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ui.isDisabled&&ui.supportsFiber)try{is=ui.inject(rw),zt=ui}catch{}}return dt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=nw,dt.createPortal=function(e,n){var s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Wl(n))throw Error(o(200));return Jy(e,n,null,s)},dt.createRoot=function(e,n){if(!Wl(e))throw Error(o(299));var s=!1,a="",c=wp;return n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onRecoverableError!==void 0&&(c=n.onRecoverableError)),n=Ul(e,1,!1,null,null,s,!1,a,c),e[Xt]=n.current,ho(e.nodeType===8?e.parentNode:e),new Bl(n)},dt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=Vc(n),e=e===null?null:e.stateNode,e},dt.flushSync=function(e){return Gn(e)},dt.hydrate=function(e,n,s){if(!ai(n))throw Error(o(200));return li(null,e,n,!0,s)},dt.hydrateRoot=function(e,n,s){if(!Wl(e))throw Error(o(405));var a=s!=null&&s.hydratedSources||null,c=!1,f="",y=wp;if(s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onRecoverableError!==void 0&&(y=s.onRecoverableError)),n=xp(n,null,e,1,s??null,c,!1,f,y),e[Xt]=n.current,ho(e),a)for(e=0;e<a.length;e++)s=a[e],c=s._getVersion,c=c(s._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[s,c]:n.mutableSourceEagerHydrationData.push(s,c);return new ii(n)},dt.render=function(e,n,s){if(!ai(n))throw Error(o(200));return li(null,e,n,!1,s)},dt.unmountComponentAtNode=function(e){if(!ai(e))throw Error(o(40));return e._reactRootContainer?(Gn(function(){li(null,null,e,!1,function(){e._reactRootContainer=null,e[Xt]=null})}),!0):!1},dt.unstable_batchedUpdates=Il,dt.unstable_renderSubtreeIntoContainer=function(e,n,s,a){if(!ai(s))throw Error(o(200));if(e==null||e._reactInternals===void 0)throw Error(o(38));return li(e,n,s,!1,a)},dt.version="18.3.1-next-f1338f8080-20240426",dt}var Pp;function Kh(){if(Pp)return Ql.exports;Pp=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(r){console.error(r)}}return t(),Ql.exports=dw(),Ql.exports}var Tp;function fw(){if(Tp)return ci;Tp=1;var t=Kh();return ci.createRoot=t.createRoot,ci.hydrateRoot=t.hydrateRoot,ci}var pw=fw();function hw(t,r){if(t instanceof RegExp)return{keys:!1,pattern:t};var o,i,u,d,p=[],h="",g=t.split("/");for(g[0]||g.shift();u=g.shift();)o=u[0],o==="*"?(p.push(o),h+=u[1]==="?"?"(?:/(.*))?":"/(.*)"):o===":"?(i=u.indexOf("?",1),d=u.indexOf(".",1),p.push(u.substring(1,~i?i:~d?d:u.length)),h+=~i&&!~d?"(?:/([^/]+?))?":"/([^/]+?)",~d&&(h+=(~i?"?":"")+"\\"+u.substring(d))):h+="/"+u;return{keys:p,pattern:new RegExp("^"+h+(r?"(?=$|/)":"/?$"),"i")}}var m=Mi();const On=Wh(m),Ku=sw({__proto__:null,default:On},[m]);var Yl={exports:{}},Xl={};var _p;function mw(){if(_p)return Xl;_p=1;var t=Mi();function r(w,b){return w===b&&(w!==0||1/w===1/b)||w!==w&&b!==b}var o=typeof Object.is=="function"?Object.is:r,i=t.useState,u=t.useEffect,d=t.useLayoutEffect,p=t.useDebugValue;function h(w,b){var k=b(),j=i({inst:{value:k,getSnapshot:b}}),C=j[0].inst,S=j[1];return d(function(){C.value=k,C.getSnapshot=b,g(C)&&S({inst:C})},[w,k,b]),u(function(){return g(C)&&S({inst:C}),w(function(){g(C)&&S({inst:C})})},[w]),p(k),k}function g(w){var b=w.getSnapshot;w=w.value;try{var k=b();return!o(w,k)}catch{return!0}}function v(w,b){return b()}var x=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?v:h;return Xl.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:x,Xl}var Op;function gw(){return Op||(Op=1,Yl.exports=mw()),Yl.exports}var Vh=gw();const vw=Ku.useInsertionEffect,xw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",yw=xw?m.useLayoutEffect:m.useEffect,ww=vw||yw,Qh=t=>{const r=m.useRef([t,(...o)=>r[0](...o)]).current;return ww(()=>{r[0]=t}),r[1]},bw="popstate",Vu="pushState",Qu="replaceState",Sw="hashchange",Ap=[bw,Vu,Qu,Sw],Cw=t=>{for(const r of Ap)addEventListener(r,t);return()=>{for(const r of Ap)removeEventListener(r,t)}},Gh=(t,r)=>Vh.useSyncExternalStore(Cw,t,r),Mp=()=>location.search,kw=({ssrSearch:t}={})=>Gh(Mp,t!=null?()=>t:Mp),Ip=()=>location.pathname,Ew=({ssrPath:t}={})=>Gh(Ip,t!=null?()=>t:Ip),Nw=(t,{replace:r=!1,state:o=null}={})=>history[r?Qu:Vu](o,"",t),jw=(t={})=>[Ew(t),Nw],Lp=Symbol.for("wouter_v3");if(typeof history<"u"&&typeof window[Lp]>"u"){for(const t of[Vu,Qu]){const r=history[t];history[t]=function(){const o=r.apply(this,arguments),i=new Event(t);return i.arguments=arguments,dispatchEvent(i),o}}Object.defineProperty(window,Lp,{value:!0})}const Rw=(t,r)=>r.toLowerCase().indexOf(t.toLowerCase())?"~"+r:r.slice(t.length)||"/",qh=(t="")=>t==="/"?"":t,Pw=(t,r)=>t[0]==="~"?t.slice(1):qh(r)+t,Tw=(t="",r)=>Rw(bu(qh(t)),bu(r)),_w=t=>t[0]==="?"?t.slice(1):t,bu=t=>{try{return decodeURI(t)}catch{return t}},Ow=t=>bu(_w(t)),Yh={hook:jw,searchHook:kw,parser:hw,base:"",ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:t=>t,aroundNav:(t,r,o)=>t(r,o)},Xh=m.createContext(Yh),Qo=()=>m.useContext(Xh),Zh={},Jh=m.createContext(Zh),Aw=()=>m.useContext(Jh),Gu=t=>{const[r,o]=t.hook(t);return[Tw(t.base,r),Qh((i,u)=>t.aroundNav(o,Pw(i,t.base),u))]},Mw=()=>{const t=Qo();return Ow(t.searchHook(t))},em=(t,r,o,i)=>{const{pattern:u,keys:d}=r instanceof RegExp?{keys:!1,pattern:r}:t(r||"*",i),p=u.exec(o)||[],[h,...g]=p;return h!==void 0?[!0,(()=>{const v=d!==!1?Object.fromEntries(d.map((w,b)=>[w,g[b]])):p.groups;let x={...g};return v&&Object.assign(x,v),x})(),...i?[h]:[]]:[!1,null]},tm=({children:t,...r})=>{const o=Qo(),i=r.hook?Yh:o;let u=i;const[d,p=r.ssrSearch??""]=r.ssrPath?.split("?")??[];d&&(r.ssrSearch=p,r.ssrPath=d),r.hrefs=r.hrefs??r.hook?.hrefs,r.searchHook=r.searchHook??r.hook?.searchHook;let h=m.useRef({}),g=h.current,v=g;for(let x in i){const w=x==="base"?i[x]+(r[x]??""):r[x]??i[x];g===v&&w!==v[x]&&(h.current=v={...v}),v[x]=w,(w!==i[x]||w!==u[x])&&(u=v)}return m.createElement(Xh.Provider,{value:u,children:t})},Dp=({children:t,component:r},o)=>r?m.createElement(r,{params:o}):typeof t=="function"?t(o):t,Iw=t=>{let r=m.useRef(Zh);const o=r.current;return r.current=Object.keys(t).length!==Object.keys(o).length||Object.entries(t).some(([i,u])=>u!==o[i])?t:o},_r=({path:t,nest:r,match:o,...i})=>{const u=Qo(),[d]=Gu(u),[p,h,g]=o??em(u.parser,t,d,r),v=Iw({...Aw(),...h});if(!p)return null;const x=g?m.createElement(tm,{base:g},Dp(i,v)):Dp(i,v);return m.createElement(Jh.Provider,{value:v,children:x})},Dt=m.forwardRef((t,r)=>{const o=Qo(),[i,u]=Gu(o),{to:d="",href:p=d,onClick:h,asChild:g,children:v,className:x,replace:w,state:b,transition:k,...j}=t,C=Qh(E=>{E.ctrlKey||E.metaKey||E.altKey||E.shiftKey||E.button!==0||(h?.(E),E.defaultPrevented||(E.preventDefault(),u(p,t)))}),S=o.hrefs(p[0]==="~"?p.slice(1):o.base+p,o);return g&&m.isValidElement(v)?m.cloneElement(v,{onClick:C,href:S}):m.createElement("a",{...j,onClick:C,href:S,className:x?.call?x(i===p):x,children:v,ref:r})}),nm=t=>Array.isArray(t)?t.flatMap(r=>nm(r&&r.type===m.Fragment?r.props.children:r)):[t],Lw=({children:t,location:r})=>{const o=Qo(),[i]=Gu(o);for(const u of nm(t)){let d=0;if(m.isValidElement(u)&&(d=em(o.parser,u.props.path,r||i,u.props.nest))[0])return m.cloneElement(u,{match:d})}return null},Lo={v:[]},Fp=()=>Lo.v.forEach(t=>t()),Dw=t=>(Lo.v.push(t)===1&&addEventListener("hashchange",Fp),()=>{Lo.v=Lo.v.filter(r=>r!==t),Lo.v.length||removeEventListener("hashchange",Fp)}),Fw=()=>"/"+location.hash.replace(/^#?\/?/,""),$w=(t,{state:r=null,replace:o=!1}={})=>{const i=location.href,[u,d]=t.replace(/^#?\/?/,"").split("?"),p=new URL(location.href);p.hash=`/${u}`,d&&(p.search=d);const h=p.href;o?history.replaceState(r,"",h):history.pushState(r,"",h);const g=typeof HashChangeEvent<"u"?new HashChangeEvent("hashchange",{oldURL:i,newURL:h}):new Event("hashchange",{detail:{oldURL:i,newURL:h}});dispatchEvent(g)},rm=({ssrPath:t="/"}={})=>[Vh.useSyncExternalStore(Dw,Fw,()=>t),$w];rm.hrefs=t=>"#"+t;var zr=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},zw={setTimeout:(t,r)=>setTimeout(t,r),clearTimeout:t=>clearTimeout(t),setInterval:(t,r)=>setInterval(t,r),clearInterval:t=>clearInterval(t)},Uw=class{#e=zw;#t=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,r){return this.#e.setTimeout(t,r)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,r){return this.#e.setInterval(t,r)}clearInterval(t){this.#e.clearInterval(t)}},Jn=new Uw;function Hw(t){setTimeout(t,0)}var er=typeof window>"u"||"Deno"in globalThis;function ot(){}function Bw(t,r){return typeof t=="function"?t(r):t}function Su(t){return typeof t=="number"&&t>=0&&t!==1/0}function om(t,r){return Math.max(t+(r||0)-Date.now(),0)}function Mn(t,r){return typeof t=="function"?t(r):t}function Nt(t,r){return typeof t=="function"?t(r):t}function $p(t,r){const{type:o="all",exact:i,fetchStatus:u,predicate:d,queryKey:p,stale:h}=t;if(p){if(i){if(r.queryHash!==qu(p,r.options))return!1}else if(!$o(r.queryKey,p))return!1}if(o!=="all"){const g=r.isActive();if(o==="active"&&!g||o==="inactive"&&g)return!1}return!(typeof h=="boolean"&&r.isStale()!==h||u&&u!==r.state.fetchStatus||d&&!d(r))}function zp(t,r){const{exact:o,status:i,predicate:u,mutationKey:d}=t;if(d){if(!r.options.mutationKey)return!1;if(o){if(tr(r.options.mutationKey)!==tr(d))return!1}else if(!$o(r.options.mutationKey,d))return!1}return!(i&&r.state.status!==i||u&&!u(r))}function qu(t,r){return(r?.queryKeyHashFn||tr)(t)}function tr(t){return JSON.stringify(t,(r,o)=>Cu(o)?Object.keys(o).sort().reduce((i,u)=>(i[u]=o[u],i),{}):o)}function $o(t,r){return t===r?!0:typeof t!=typeof r?!1:t&&r&&typeof t=="object"&&typeof r=="object"?Object.keys(r).every(o=>$o(t[o],r[o])):!1}var Ww=Object.prototype.hasOwnProperty;function sm(t,r,o=0){if(t===r)return t;if(o>500)return r;const i=Up(t)&&Up(r);if(!i&&!(Cu(t)&&Cu(r)))return r;const d=(i?t:Object.keys(t)).length,p=i?r:Object.keys(r),h=p.length,g=i?new Array(h):{};let v=0;for(let x=0;x<h;x++){const w=i?x:p[x],b=t[w],k=r[w];if(b===k){g[w]=b,(i?x<d:Ww.call(t,w))&&v++;continue}if(b===null||k===null||typeof b!="object"||typeof k!="object"){g[w]=k;continue}const j=sm(b,k,o+1);g[w]=j,j===b&&v++}return d===h&&v===d?t:g}function Ei(t,r){if(!r||Object.keys(t).length!==Object.keys(r).length)return!1;for(const o in t)if(t[o]!==r[o])return!1;return!0}function Up(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Cu(t){if(!Hp(t))return!1;const r=t.constructor;if(r===void 0)return!0;const o=r.prototype;return!(!Hp(o)||!o.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Hp(t){return Object.prototype.toString.call(t)==="[object Object]"}function Kw(t){return new Promise(r=>{Jn.setTimeout(r,t)})}function ku(t,r,o){return typeof o.structuralSharing=="function"?o.structuralSharing(t,r):o.structuralSharing!==!1?sm(t,r):r}function Vw(t,r,o=0){const i=[...t,r];return o&&i.length>o?i.slice(1):i}function Qw(t,r,o=0){const i=[r,...t];return o&&i.length>o?i.slice(0,-1):i}var Yu=Symbol();function im(t,r){return!t.queryFn&&r?.initialPromise?()=>r.initialPromise:!t.queryFn||t.queryFn===Yu?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function Xu(t,r){return typeof t=="function"?t(...r):!!t}function Gw(t,r,o){let i=!1,u;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(u??=r(),i||(i=!0,u.aborted?o():u.addEventListener("abort",o,{once:!0})),u)}),t}var qw=class extends zr{#e;#t;#n;constructor(){super(),this.#n=t=>{if(!er&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Zu=new qw;function Eu(){let t,r;const o=new Promise((u,d)=>{t=u,r=d});o.status="pending",o.catch(()=>{});function i(u){Object.assign(o,u),delete o.resolve,delete o.reject}return o.resolve=u=>{i({status:"fulfilled",value:u}),t(u)},o.reject=u=>{i({status:"rejected",reason:u}),r(u)},o}var Yw=Hw;function Xw(){let t=[],r=0,o=h=>{h()},i=h=>{h()},u=Yw;const d=h=>{r?t.push(h):u(()=>{o(h)})},p=()=>{const h=t;t=[],h.length&&u(()=>{i(()=>{h.forEach(g=>{o(g)})})})};return{batch:h=>{let g;r++;try{g=h()}finally{r--,r||p()}return g},batchCalls:h=>(...g)=>{d(()=>{h(...g)})},schedule:d,setNotifyFunction:h=>{o=h},setBatchNotifyFunction:h=>{i=h},setScheduler:h=>{u=h}}}var Ue=Xw(),Zw=class extends zr{#e=!0;#t;#n;constructor(){super(),this.#n=t=>{if(!er&&window.addEventListener){const r=()=>t(!0),o=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",o,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",o)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(o=>{o(t)}))}isOnline(){return this.#e}},Ni=new Zw;function Jw(t){return Math.min(1e3*2**t,3e4)}function am(t){return(t??"online")==="online"?Ni.isOnline():!0}var Nu=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function lm(t){let r=!1,o=0,i;const u=Eu(),d=()=>u.status!=="pending",p=C=>{if(!d()){const S=new Nu(C);b(S),t.onCancel?.(S)}},h=()=>{r=!0},g=()=>{r=!1},v=()=>Zu.isFocused()&&(t.networkMode==="always"||Ni.isOnline())&&t.canRun(),x=()=>am(t.networkMode)&&t.canRun(),w=C=>{d()||(i?.(),u.resolve(C))},b=C=>{d()||(i?.(),u.reject(C))},k=()=>new Promise(C=>{i=S=>{(d()||v())&&C(S)},t.onPause?.()}).then(()=>{i=void 0,d()||t.onContinue?.()}),j=()=>{if(d())return;let C;const S=o===0?t.initialPromise:void 0;try{C=S??t.fn()}catch(E){C=Promise.reject(E)}Promise.resolve(C).then(w).catch(E=>{if(d())return;const _=t.retry??(er?0:3),O=t.retryDelay??Jw,I=typeof O=="function"?O(o,E):O,D=_===!0||typeof _=="number"&&o<_||typeof _=="function"&&_(o,E);if(r||!D){b(E);return}o++,t.onFail?.(o,E),Kw(I).then(()=>v()?void 0:k()).then(()=>{r?b(E):j()})})};return{promise:u,status:()=>u.status,cancel:p,continue:()=>(i?.(),u),cancelRetry:h,continueRetry:g,canStart:x,start:()=>(x()?j():k().then(j),u)}}var um=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Su(this.gcTime)&&(this.#e=Jn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(er?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Jn.clearTimeout(this.#e),this.#e=void 0)}},eb=class extends um{#e;#t;#n;#o;#r;#i;#a;constructor(t){super(),this.#a=!1,this.#i=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#o=t.client,this.#n=this.#o.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#e=Wp(this.options),this.state=t.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(t){if(this.options={...this.#i,...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=Wp(this.options);r.data!==void 0&&(this.setState(Bp(r.data,r.dataUpdatedAt)),this.#e=r)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(t,r){const o=ku(this.state.data,t,this.options);return this.#s({data:o,type:"success",dataUpdatedAt:r?.updatedAt,manual:r?.manual}),o}setState(t,r){this.#s({type:"setState",state:t,setStateOptions:r})}cancel(t){const r=this.#r?.promise;return this.#r?.cancel(t),r?r.then(ot).catch(ot):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(t=>Nt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Yu||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Mn(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!om(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(r=>r.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(r=>r.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(this.#r&&(this.#a?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(t,r){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&r?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(g=>g.options.queryFn);h&&this.setOptions(h.options)}const o=new AbortController,i=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(this.#a=!0,o.signal)})},u=()=>{const h=im(this.options,r),v=(()=>{const x={client:this.#o,queryKey:this.queryKey,meta:this.meta};return i(x),x})();return this.#a=!1,this.options.persister?this.options.persister(h,v,this):h(v)},p=(()=>{const h={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:this.#o,state:this.state,fetchFn:u};return i(h),h})();this.options.behavior?.onFetch(p,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==p.fetchOptions?.meta)&&this.#s({type:"fetch",meta:p.fetchOptions?.meta}),this.#r=lm({initialPromise:r?.initialPromise,fn:p.fetchFn,onCancel:h=>{h instanceof Nu&&h.revert&&this.setState({...this.#t,fetchStatus:"idle"}),o.abort()},onFail:(h,g)=>{this.#s({type:"failed",failureCount:h,error:g})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:p.options.retry,retryDelay:p.options.retryDelay,networkMode:p.options.networkMode,canRun:()=>!0});try{const h=await this.#r.start();if(h===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(h),this.#n.config.onSuccess?.(h,this),this.#n.config.onSettled?.(h,this.state.error,this),h}catch(h){if(h instanceof Nu){if(h.silent)return this.#r.promise;if(h.revert){if(this.state.data===void 0)throw h;return this.state.data}}throw this.#s({type:"error",error:h}),this.#n.config.onError?.(h,this),this.#n.config.onSettled?.(this.state.data,h,this),h}finally{this.scheduleGc()}}#s(t){const r=o=>{switch(t.type){case"failed":return{...o,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...o,fetchStatus:"paused"};case"continue":return{...o,fetchStatus:"fetching"};case"fetch":return{...o,...cm(o.data,this.options),fetchMeta:t.meta??null};case"success":const i={...o,...Bp(t.data,t.dataUpdatedAt),dataUpdateCount:o.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=t.manual?i:void 0,i;case"error":const u=t.error;return{...o,error:u,errorUpdateCount:o.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:o.fetchFailureCount+1,fetchFailureReason:u,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...o,isInvalidated:!0};case"setState":return{...o,...t.state}}};this.state=r(this.state),Ue.batch(()=>{this.observers.forEach(o=>{o.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:t})})}};function cm(t,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:am(r.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function Bp(t,r){return{data:t,dataUpdatedAt:r??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Wp(t){const r=typeof t.initialData=="function"?t.initialData():t.initialData,o=r!==void 0,i=o?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:r,dataUpdateCount:0,dataUpdatedAt:o?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:o?"success":"pending",fetchStatus:"idle"}}var tb=class extends zr{constructor(t,r){super(),this.options=r,this.#e=t,this.#s=null,this.#a=Eu(),this.bindMethods(),this.setOptions(r)}#e;#t=void 0;#n=void 0;#o=void 0;#r;#i;#a;#s;#m;#f;#p;#u;#c;#l;#h=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Kp(this.#t,this.options)?this.#d():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ju(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ju(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#w(),this.#b(),this.#t.removeObserver(this)}setOptions(t){const r=this.options,o=this.#t;if(this.options=this.#e.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Nt(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),r._defaulted&&!Ei(this.options,r)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&Vp(this.#t,o,this.options,r)&&this.#d(),this.updateResult(),i&&(this.#t!==o||Nt(this.options.enabled,this.#t)!==Nt(r.enabled,this.#t)||Mn(this.options.staleTime,this.#t)!==Mn(r.staleTime,this.#t))&&this.#g();const u=this.#v();i&&(this.#t!==o||Nt(this.options.enabled,this.#t)!==Nt(r.enabled,this.#t)||u!==this.#l)&&this.#x(u)}getOptimisticResult(t){const r=this.#e.getQueryCache().build(this.#e,t),o=this.createResult(r,t);return rb(this,o)&&(this.#o=o,this.#i=this.options,this.#r=this.#t.state),o}getCurrentResult(){return this.#o}trackResult(t,r){return new Proxy(t,{get:(o,i)=>(this.trackProp(i),r?.(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(o,i))})}trackProp(t){this.#h.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=this.#e.defaultQueryOptions(t),o=this.#e.getQueryCache().build(this.#e,r);return o.fetch().then(()=>this.createResult(o,r))}fetch(t){return this.#d({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#o))}#d(t){this.#S();let r=this.#t.fetch(this.options,t);return t?.throwOnError||(r=r.catch(ot)),r}#g(){this.#w();const t=Mn(this.options.staleTime,this.#t);if(er||this.#o.isStale||!Su(t))return;const o=om(this.#o.dataUpdatedAt,t)+1;this.#u=Jn.setTimeout(()=>{this.#o.isStale||this.updateResult()},o)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#x(t){this.#b(),this.#l=t,!(er||Nt(this.options.enabled,this.#t)===!1||!Su(this.#l)||this.#l===0)&&(this.#c=Jn.setInterval(()=>{(this.options.refetchIntervalInBackground||Zu.isFocused())&&this.#d()},this.#l))}#y(){this.#g(),this.#x(this.#v())}#w(){this.#u&&(Jn.clearTimeout(this.#u),this.#u=void 0)}#b(){this.#c&&(Jn.clearInterval(this.#c),this.#c=void 0)}createResult(t,r){const o=this.#t,i=this.options,u=this.#o,d=this.#r,p=this.#i,g=t!==o?t.state:this.#n,{state:v}=t;let x={...v},w=!1,b;if(r._optimisticResults){const K=this.hasListeners(),Q=!K&&Kp(t,r),ee=K&&Vp(t,o,r,i);(Q||ee)&&(x={...x,...cm(v.data,t.options)}),r._optimisticResults==="isRestoring"&&(x.fetchStatus="idle")}let{error:k,errorUpdatedAt:j,status:C}=x;b=x.data;let S=!1;if(r.placeholderData!==void 0&&b===void 0&&C==="pending"){let K;u?.isPlaceholderData&&r.placeholderData===p?.placeholderData?(K=u.data,S=!0):K=typeof r.placeholderData=="function"?r.placeholderData(this.#p?.state.data,this.#p):r.placeholderData,K!==void 0&&(C="success",b=ku(u?.data,K,r),w=!0)}if(r.select&&b!==void 0&&!S)if(u&&b===d?.data&&r.select===this.#m)b=this.#f;else try{this.#m=r.select,b=r.select(b),b=ku(u?.data,b,r),this.#f=b,this.#s=null}catch(K){this.#s=K}this.#s&&(k=this.#s,b=this.#f,j=Date.now(),C="error");const E=x.fetchStatus==="fetching",_=C==="pending",O=C==="error",I=_&&E,D=b!==void 0,$={status:C,fetchStatus:x.fetchStatus,isPending:_,isSuccess:C==="success",isError:O,isInitialLoading:I,isLoading:I,data:b,dataUpdatedAt:x.dataUpdatedAt,error:k,errorUpdatedAt:j,failureCount:x.fetchFailureCount,failureReason:x.fetchFailureReason,errorUpdateCount:x.errorUpdateCount,isFetched:x.dataUpdateCount>0||x.errorUpdateCount>0,isFetchedAfterMount:x.dataUpdateCount>g.dataUpdateCount||x.errorUpdateCount>g.errorUpdateCount,isFetching:E,isRefetching:E&&!_,isLoadingError:O&&!D,isPaused:x.fetchStatus==="paused",isPlaceholderData:w,isRefetchError:O&&D,isStale:Ju(t,r),refetch:this.refetch,promise:this.#a,isEnabled:Nt(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const K=$.data!==void 0,Q=$.status==="error"&&!K,ee=de=>{Q?de.reject($.error):K&&de.resolve($.data)},ne=()=>{const de=this.#a=$.promise=Eu();ee(de)},Z=this.#a;switch(Z.status){case"pending":t.queryHash===o.queryHash&&ee(Z);break;case"fulfilled":(Q||$.data!==Z.value)&&ne();break;case"rejected":(!Q||$.error!==Z.reason)&&ne();break}}return $}updateResult(){const t=this.#o,r=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#i=this.options,this.#r.data!==void 0&&(this.#p=this.#t),Ei(r,t))return;this.#o=r;const o=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,u=typeof i=="function"?i():i;if(u==="all"||!u&&!this.#h.size)return!0;const d=new Set(u??this.#h);return this.options.throwOnError&&d.add("error"),Object.keys(this.#o).some(p=>{const h=p;return this.#o[h]!==t[h]&&d.has(h)})};this.#C({listeners:o()})}#S(){const t=this.#e.getQueryCache().build(this.#e,this.options);if(t===this.#t)return;const r=this.#t;this.#t=t,this.#n=t.state,this.hasListeners()&&(r?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(t){Ue.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(this.#o)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function nb(t,r){return Nt(r.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&r.retryOnMount===!1)}function Kp(t,r){return nb(t,r)||t.state.data!==void 0&&ju(t,r,r.refetchOnMount)}function ju(t,r,o){if(Nt(r.enabled,t)!==!1&&Mn(r.staleTime,t)!=="static"){const i=typeof o=="function"?o(t):o;return i==="always"||i!==!1&&Ju(t,r)}return!1}function Vp(t,r,o,i){return(t!==r||Nt(i.enabled,t)===!1)&&(!o.suspense||t.state.status!=="error")&&Ju(t,o)}function Ju(t,r){return Nt(r.enabled,t)!==!1&&t.isStaleByTime(Mn(r.staleTime,t))}function rb(t,r){return!Ei(t.getCurrentResult(),r)}function Qp(t){return{onFetch:(r,o)=>{const i=r.options,u=r.fetchOptions?.meta?.fetchMore?.direction,d=r.state.data?.pages||[],p=r.state.data?.pageParams||[];let h={pages:[],pageParams:[]},g=0;const v=async()=>{let x=!1;const w=j=>{Gw(j,()=>r.signal,()=>x=!0)},b=im(r.options,r.fetchOptions),k=async(j,C,S)=>{if(x)return Promise.reject();if(C==null&&j.pages.length)return Promise.resolve(j);const _=(()=>{const A={client:r.client,queryKey:r.queryKey,pageParam:C,direction:S?"backward":"forward",meta:r.options.meta};return w(A),A})(),O=await b(_),{maxPages:I}=r.options,D=S?Qw:Vw;return{pages:D(j.pages,O,I),pageParams:D(j.pageParams,C,I)}};if(u&&d.length){const j=u==="backward",C=j?ob:Gp,S={pages:d,pageParams:p},E=C(i,S);h=await k(S,E,j)}else{const j=t??d.length;do{const C=g===0?p[0]??i.initialPageParam:Gp(i,h);if(g>0&&C==null)break;h=await k(h,C),g++}while(g<j)}return h};r.options.persister?r.fetchFn=()=>r.options.persister?.(v,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},o):r.fetchFn=v}}}function Gp(t,{pages:r,pageParams:o}){const i=r.length-1;return r.length>0?t.getNextPageParam(r[i],r,o[i],o):void 0}function ob(t,{pages:r,pageParams:o}){return r.length>0?t.getPreviousPageParam?.(r[0],r,o[0],o):void 0}var sb=class extends um{#e;#t;#n;#o;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#n=t.mutationCache,this.#t=[],this.state=t.state||dm(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#t.includes(t)||(this.#t.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#t=this.#t.filter(r=>r!==t),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#o?.continue()??this.execute(this.state.variables)}async execute(t){const r=()=>{this.#r({type:"continue"})},o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#o=lm({fn:()=>this.options.mutationFn?this.options.mutationFn(t,o):Promise.reject(new Error("No mutationFn found")),onFail:(d,p)=>{this.#r({type:"failed",failureCount:d,error:p})},onPause:()=>{this.#r({type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const i=this.state.status==="pending",u=!this.#o.canStart();try{if(i)r();else{this.#r({type:"pending",variables:t,isPaused:u}),this.#n.config.onMutate&&await this.#n.config.onMutate(t,this,o);const p=await this.options.onMutate?.(t,o);p!==this.state.context&&this.#r({type:"pending",context:p,variables:t,isPaused:u})}const d=await this.#o.start();return await this.#n.config.onSuccess?.(d,t,this.state.context,this,o),await this.options.onSuccess?.(d,t,this.state.context,o),await this.#n.config.onSettled?.(d,null,this.state.variables,this.state.context,this,o),await this.options.onSettled?.(d,null,t,this.state.context,o),this.#r({type:"success",data:d}),d}catch(d){try{await this.#n.config.onError?.(d,t,this.state.context,this,o)}catch(p){Promise.reject(p)}try{await this.options.onError?.(d,t,this.state.context,o)}catch(p){Promise.reject(p)}try{await this.#n.config.onSettled?.(void 0,d,this.state.variables,this.state.context,this,o)}catch(p){Promise.reject(p)}try{await this.options.onSettled?.(void 0,d,t,this.state.context,o)}catch(p){Promise.reject(p)}throw this.#r({type:"error",error:d}),d}finally{this.#n.runNext(this)}}#r(t){const r=o=>{switch(t.type){case"failed":return{...o,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...o,isPaused:!0};case"continue":return{...o,isPaused:!1};case"pending":return{...o,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...o,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...o,data:void 0,error:t.error,failureCount:o.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Ue.batch(()=>{this.#t.forEach(o=>{o.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function dm(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ib=class extends zr{constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(t,r,o){const i=new sb({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(r),state:o});return this.add(i),i}add(t){this.#e.add(t);const r=di(t);if(typeof r=="string"){const o=this.#t.get(r);o?o.push(t):this.#t.set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const r=di(t);if(typeof r=="string"){const o=this.#t.get(r);if(o)if(o.length>1){const i=o.indexOf(t);i!==-1&&o.splice(i,1)}else o[0]===t&&this.#t.delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=di(t);if(typeof r=="string"){const i=this.#t.get(r)?.find(u=>u.state.status==="pending");return!i||i===t}else return!0}runNext(t){const r=di(t);return typeof r=="string"?this.#t.get(r)?.find(i=>i!==t&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Ue.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(t){const r={exact:!0,...t};return this.getAll().find(o=>zp(r,o))}findAll(t={}){return this.getAll().filter(r=>zp(t,r))}notify(t){Ue.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Ue.batch(()=>Promise.all(t.map(r=>r.continue().catch(ot))))}};function di(t){return t.options.scope?.id}var ab=class extends zr{#e;#t=void 0;#n;#o;constructor(r,o){super(),this.#e=r,this.setOptions(o),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){const o=this.options;this.options=this.#e.defaultMutationOptions(r),Ei(this.options,o)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),o?.mutationKey&&this.options.mutationKey&&tr(o.mutationKey)!==tr(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(r){this.#r(),this.#i(r)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#i()}mutate(r,o){return this.#o=o,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(r)}#r(){const r=this.#n?.state??dm();this.#t={...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset}}#i(r){Ue.batch(()=>{if(this.#o&&this.hasListeners()){const o=this.#t.variables,i=this.#t.context,u={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(r?.type==="success"){try{this.#o.onSuccess?.(r.data,o,i,u)}catch(d){Promise.reject(d)}try{this.#o.onSettled?.(r.data,null,o,i,u)}catch(d){Promise.reject(d)}}else if(r?.type==="error"){try{this.#o.onError?.(r.error,o,i,u)}catch(d){Promise.reject(d)}try{this.#o.onSettled?.(void 0,r.error,o,i,u)}catch(d){Promise.reject(d)}}}this.listeners.forEach(o=>{o(this.#t)})})}},lb=class extends zr{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,r,o){const i=r.queryKey,u=r.queryHash??qu(i,r);let d=this.get(u);return d||(d=new eb({client:t,queryKey:i,queryHash:u,options:t.defaultQueryOptions(r),state:o,defaultOptions:t.getQueryDefaults(i)}),this.add(d)),d}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=this.#e.get(t.queryHash);r&&(t.destroy(),r===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ue.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const r={exact:!0,...t};return this.getAll().find(o=>$p(r,o))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(o=>$p(t,o)):r}notify(t){Ue.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Ue.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ue.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},ub=class{#e;#t;#n;#o;#r;#i;#a;#s;constructor(t={}){this.#e=t.queryCache||new lb,this.#t=t.mutationCache||new ib,this.#n=t.defaultOptions||{},this.#o=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#a=Zu.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Ni.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#a?.(),this.#a=void 0,this.#s?.(),this.#s=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){const r=this.defaultQueryOptions({queryKey:t});return this.#e.get(r.queryHash)?.state.data}ensureQueryData(t){const r=this.defaultQueryOptions(t),o=this.#e.build(this,r),i=o.state.data;return i===void 0?this.fetchQuery(t):(t.revalidateIfStale&&o.isStaleByTime(Mn(r.staleTime,o))&&this.prefetchQuery(r),Promise.resolve(i))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:r,state:o})=>{const i=o.data;return[r,i]})}setQueryData(t,r,o){const i=this.defaultQueryOptions({queryKey:t}),d=this.#e.get(i.queryHash)?.state.data,p=Bw(r,d);if(p!==void 0)return this.#e.build(this,i).setData(p,{...o,manual:!0})}setQueriesData(t,r,o){return Ue.batch(()=>this.#e.findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,r,o)]))}getQueryState(t){const r=this.defaultQueryOptions({queryKey:t});return this.#e.get(r.queryHash)?.state}removeQueries(t){const r=this.#e;Ue.batch(()=>{r.findAll(t).forEach(o=>{r.remove(o)})})}resetQueries(t,r){const o=this.#e;return Ue.batch(()=>(o.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...t},r)))}cancelQueries(t,r={}){const o={revert:!0,...r},i=Ue.batch(()=>this.#e.findAll(t).map(u=>u.cancel(o)));return Promise.all(i).then(ot).catch(ot)}invalidateQueries(t,r={}){return Ue.batch(()=>(this.#e.findAll(t).forEach(o=>{o.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},r)))}refetchQueries(t,r={}){const o={...r,cancelRefetch:r.cancelRefetch??!0},i=Ue.batch(()=>this.#e.findAll(t).filter(u=>!u.isDisabled()&&!u.isStatic()).map(u=>{let d=u.fetch(void 0,o);return o.throwOnError||(d=d.catch(ot)),u.state.fetchStatus==="paused"?Promise.resolve():d}));return Promise.all(i).then(ot)}fetchQuery(t){const r=this.defaultQueryOptions(t);r.retry===void 0&&(r.retry=!1);const o=this.#e.build(this,r);return o.isStaleByTime(Mn(r.staleTime,o))?o.fetch(r):Promise.resolve(o.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(ot).catch(ot)}fetchInfiniteQuery(t){return t.behavior=Qp(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(ot).catch(ot)}ensureInfiniteQueryData(t){return t.behavior=Qp(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Ni.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(t){this.#n=t}setQueryDefaults(t,r){this.#o.set(tr(t),{queryKey:t,defaultOptions:r})}getQueryDefaults(t){const r=[...this.#o.values()],o={};return r.forEach(i=>{$o(t,i.queryKey)&&Object.assign(o,i.defaultOptions)}),o}setMutationDefaults(t,r){this.#r.set(tr(t),{mutationKey:t,defaultOptions:r})}getMutationDefaults(t){const r=[...this.#r.values()],o={};return r.forEach(i=>{$o(t,i.mutationKey)&&Object.assign(o,i.defaultOptions)}),o}defaultQueryOptions(t){if(t._defaulted)return t;const r={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return r.queryHash||(r.queryHash=qu(r.queryKey,r)),r.refetchOnReconnect===void 0&&(r.refetchOnReconnect=r.networkMode!=="always"),r.throwOnError===void 0&&(r.throwOnError=!!r.suspense),!r.networkMode&&r.persister&&(r.networkMode="offlineFirst"),r.queryFn===Yu&&(r.enabled=!1),r}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},fm=m.createContext(void 0),pm=t=>{const r=m.useContext(fm);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},cb=({client:t,children:r})=>(m.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),l.jsx(fm.Provider,{value:t,children:r})),hm=m.createContext(!1),db=()=>m.useContext(hm);hm.Provider;function fb(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var pb=m.createContext(fb()),hb=()=>m.useContext(pb),mb=(t,r,o)=>{const i=o?.state.error&&typeof t.throwOnError=="function"?Xu(t.throwOnError,[o.state.error,o]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||i)&&(r.isReset()||(t.retryOnMount=!1))},gb=t=>{m.useEffect(()=>{t.clearReset()},[t])},vb=({result:t,errorResetBoundary:r,throwOnError:o,query:i,suspense:u})=>t.isError&&!r.isReset()&&!t.isFetching&&i&&(u&&t.data===void 0||Xu(o,[t.error,i])),xb=t=>{if(t.suspense){const o=u=>u==="static"?u:Math.max(u??1e3,1e3),i=t.staleTime;t.staleTime=typeof i=="function"?(...u)=>o(i(...u)):o(i),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},yb=(t,r)=>t.isLoading&&t.isFetching&&!r,wb=(t,r)=>t?.suspense&&r.isPending,qp=(t,r,o)=>r.fetchOptimistic(t).catch(()=>{o.clearReset()});function bb(t,r,o){const i=db(),u=hb(),d=pm(),p=d.defaultQueryOptions(t);d.getDefaultOptions().queries?._experimental_beforeQuery?.(p);const h=d.getQueryCache().get(p.queryHash);p._optimisticResults=i?"isRestoring":"optimistic",xb(p),mb(p,u,h),gb(u);const g=!d.getQueryCache().get(p.queryHash),[v]=m.useState(()=>new r(d,p)),x=v.getOptimisticResult(p),w=!i&&t.subscribed!==!1;if(m.useSyncExternalStore(m.useCallback(b=>{const k=w?v.subscribe(Ue.batchCalls(b)):ot;return v.updateResult(),k},[v,w]),()=>v.getCurrentResult(),()=>v.getCurrentResult()),m.useEffect(()=>{v.setOptions(p)},[p,v]),wb(p,x))throw qp(p,v,u);if(vb({result:x,errorResetBoundary:u,throwOnError:p.throwOnError,query:h,suspense:p.suspense}))throw x.error;return d.getDefaultOptions().queries?._experimental_afterQuery?.(p,x),p.experimental_prefetchInRender&&!er&&yb(x,i)&&(g?qp(p,v,u):h?.promise)?.catch(ot).finally(()=>{v.updateResult()}),p.notifyOnChangeProps?x:v.trackResult(x)}function et(t,r){return bb(t,tb)}function Je(t,r){const o=pm(),[i]=m.useState(()=>new ab(o,t));m.useEffect(()=>{i.setOptions(t)},[i,t]);const u=m.useSyncExternalStore(m.useCallback(p=>i.subscribe(Ue.batchCalls(p)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),d=m.useCallback((p,h)=>{i.mutate(p,h).catch(ot)},[i]);if(u.error&&Xu(i.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:d,mutateAsync:u.mutate}}const ec="__PORT_5000__".startsWith("__")?"":"__PORT_5000__";async function tc(t){if(!t.ok){const r=await t.text()||t.statusText;throw new Error(`${t.status}: ${r}`)}}async function mm(t,r){const o=await fetch(`${ec}${t}`,r);return await tc(o),await o.json()}async function Ge(t,r,o){const i=await fetch(`${ec}${r}`,{method:t,headers:o?{"Content-Type":"application/json"}:{},body:o?JSON.stringify(o):void 0});return await tc(i),i}const Sb=({on401:t})=>async({queryKey:r})=>{const o=await fetch(`${ec}${r.join("/")}`);return await tc(o),await o.json()},ye=new ub({defaultOptions:{queries:{queryFn:Sb({on401:"throw"}),refetchInterval:!1,refetchOnWindowFocus:!1,staleTime:1/0,retry:!1},mutations:{retry:!1}}});var Cb=(t,r,o,i,u,d,p,h)=>{let g=document.documentElement,v=["light","dark"];function x(k){(Array.isArray(t)?t:[t]).forEach(j=>{let C=j==="class",S=C&&d?u.map(E=>d[E]||E):u;C?(g.classList.remove(...S),g.classList.add(d&&d[k]?d[k]:k)):g.setAttribute(j,k)}),w(k)}function w(k){h&&v.includes(k)&&(g.style.colorScheme=k)}function b(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(i)x(i);else try{let k=localStorage.getItem(r)||o,j=p&&k==="system"?b():k;x(j)}catch{}},Yp=["light","dark"],gm="(prefers-color-scheme: dark)",kb=typeof window>"u",vm=m.createContext(void 0),Eb=t=>m.useContext(vm)?m.createElement(m.Fragment,null,t.children):m.createElement(jb,{...t}),Nb=["light","dark"],jb=({forcedTheme:t,disableTransitionOnChange:r=!1,enableSystem:o=!0,enableColorScheme:i=!0,storageKey:u="theme",themes:d=Nb,defaultTheme:p=o?"system":"light",attribute:h="data-theme",value:g,children:v,nonce:x,scriptProps:w})=>{let[b,k]=m.useState(()=>Pb(u,p)),[j,C]=m.useState(()=>b==="system"?Zl():b),S=g?Object.values(g):d,E=m.useCallback(D=>{let A=D;if(!A)return;D==="system"&&o&&(A=Zl());let $=g?g[A]:A,K=r?Tb(x):null,Q=document.documentElement,ee=ne=>{ne==="class"?(Q.classList.remove(...S),$&&Q.classList.add($)):ne.startsWith("data-")&&($?Q.setAttribute(ne,$):Q.removeAttribute(ne))};if(Array.isArray(h)?h.forEach(ee):ee(h),i){let ne=Yp.includes(p)?p:null,Z=Yp.includes(A)?A:ne;Q.style.colorScheme=Z}K?.()},[x]),_=m.useCallback(D=>{let A=typeof D=="function"?D(b):D;k(A);try{localStorage.setItem(u,A)}catch{}},[b]),O=m.useCallback(D=>{let A=Zl(D);C(A),b==="system"&&o&&!t&&E("system")},[b,t]);m.useEffect(()=>{let D=window.matchMedia(gm);return D.addListener(O),O(D),()=>D.removeListener(O)},[O]),m.useEffect(()=>{let D=A=>{A.key===u&&(A.newValue?k(A.newValue):_(p))};return window.addEventListener("storage",D),()=>window.removeEventListener("storage",D)},[_]),m.useEffect(()=>{E(t??b)},[t,b]);let I=m.useMemo(()=>({theme:b,setTheme:_,forcedTheme:t,resolvedTheme:b==="system"?j:b,themes:o?[...d,"system"]:d,systemTheme:o?j:void 0}),[b,_,t,j,o,d]);return m.createElement(vm.Provider,{value:I},m.createElement(Rb,{forcedTheme:t,storageKey:u,attribute:h,enableSystem:o,enableColorScheme:i,defaultTheme:p,value:g,themes:d,nonce:x,scriptProps:w}),v)},Rb=m.memo(({forcedTheme:t,storageKey:r,attribute:o,enableSystem:i,enableColorScheme:u,defaultTheme:d,value:p,themes:h,nonce:g,scriptProps:v})=>{let x=JSON.stringify([o,r,d,t,h,p,i,u]).slice(1,-1);return m.createElement("script",{...v,suppressHydrationWarning:!0,nonce:typeof window>"u"?g:"",dangerouslySetInnerHTML:{__html:`(${Cb.toString()})(${x})`}})}),Pb=(t,r)=>{if(kb)return;let o;try{o=localStorage.getItem(t)||void 0}catch{}return o||r},Tb=t=>{let r=document.createElement("style");return t&&r.setAttribute("nonce",t),r.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(r)},1)}},Zl=t=>(t||(t=window.matchMedia(gm)),t.matches?"dark":"light");const _b=1,Ob=1e6;let Jl=0;function Ab(){return Jl=(Jl+1)%Number.MAX_SAFE_INTEGER,Jl.toString()}const eu=new Map,Xp=t=>{if(eu.has(t))return;const r=setTimeout(()=>{eu.delete(t),Fo({type:"REMOVE_TOAST",toastId:t})},Ob);eu.set(t,r)},Mb=(t,r)=>{switch(r.type){case"ADD_TOAST":return{...t,toasts:[r.toast,...t.toasts].slice(0,_b)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(o=>o.id===r.toast.id?{...o,...r.toast}:o)};case"DISMISS_TOAST":{const{toastId:o}=r;return o?Xp(o):t.toasts.forEach(i=>{Xp(i.id)}),{...t,toasts:t.toasts.map(i=>i.id===o||o===void 0?{...i,open:!1}:i)}}case"REMOVE_TOAST":return r.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(o=>o.id!==r.toastId)}}},wi=[];let bi={toasts:[]};function Fo(t){bi=Mb(bi,t),wi.forEach(r=>{r(bi)})}function vt({...t}){const r=Ab(),o=u=>Fo({type:"UPDATE_TOAST",toast:{...u,id:r}}),i=()=>Fo({type:"DISMISS_TOAST",toastId:r});return Fo({type:"ADD_TOAST",toast:{...t,id:r,open:!0,onOpenChange:u=>{u||i()}}}),{id:r,dismiss:i,update:o}}function Ib(){const[t,r]=m.useState(bi);return m.useEffect(()=>(wi.push(r),()=>{const o=wi.indexOf(r);o>-1&&wi.splice(o,1)}),[t]),{...t,toast:vt,dismiss:o=>Fo({type:"DISMISS_TOAST",toastId:o})}}var Ii=Kh();const Lb=Wh(Ii);function he(t,r,{checkForDefaultPrevented:o=!0}={}){return function(u){if(t?.(u),o===!1||!u.defaultPrevented)return r?.(u)}}function Zp(t,r){if(typeof t=="function")return t(r);t!=null&&(t.current=r)}function Ur(...t){return r=>{let o=!1;const i=t.map(u=>{const d=Zp(u,r);return!o&&typeof d=="function"&&(o=!0),d});if(o)return()=>{for(let u=0;u<i.length;u++){const d=i[u];typeof d=="function"?d():Zp(t[u],null)}}}}function He(...t){return m.useCallback(Ur(...t),t)}function Dn(t,r=[]){let o=[];function i(d,p){const h=m.createContext(p),g=o.length;o=[...o,p];const v=w=>{const{scope:b,children:k,...j}=w,C=b?.[t]?.[g]||h,S=m.useMemo(()=>j,Object.values(j));return l.jsx(C.Provider,{value:S,children:k})};v.displayName=d+"Provider";function x(w,b){const k=b?.[t]?.[g]||h,j=m.useContext(k);if(j)return j;if(p!==void 0)return p;throw new Error(`\`${w}\` must be used within \`${d}\``)}return[v,x]}const u=()=>{const d=o.map(p=>m.createContext(p));return function(h){const g=h?.[t]||d;return m.useMemo(()=>({[`__scope${t}`]:{...h,[t]:g}}),[h,g])}};return u.scopeName=t,[i,Db(u,...r)]}function Db(...t){const r=t[0];if(t.length===1)return r;const o=()=>{const i=t.map(u=>({useScope:u(),scopeName:u.scopeName}));return function(d){const p=i.reduce((h,{useScope:g,scopeName:v})=>{const w=g(d)[`__scope${v}`];return{...h,...w}},{});return m.useMemo(()=>({[`__scope${r.scopeName}`]:p}),[p])}};return o.scopeName=r.scopeName,o}function Jp(t){const r=Fb(t),o=m.forwardRef((i,u)=>{const{children:d,...p}=i,h=m.Children.toArray(d),g=h.find(zb);if(g){const v=g.props.children,x=h.map(w=>w===g?m.Children.count(v)>1?m.Children.only(null):m.isValidElement(v)?v.props.children:null:w);return l.jsx(r,{...p,ref:u,children:m.isValidElement(v)?m.cloneElement(v,void 0,x):null})}return l.jsx(r,{...p,ref:u,children:d})});return o.displayName=`${t}.Slot`,o}function Fb(t){const r=m.forwardRef((o,i)=>{const{children:u,...d}=o;if(m.isValidElement(u)){const p=Hb(u),h=Ub(d,u.props);return u.type!==m.Fragment&&(h.ref=i?Ur(i,p):p),m.cloneElement(u,h)}return m.Children.count(u)>1?m.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var $b=Symbol("radix.slottable");function zb(t){return m.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===$b}function Ub(t,r){const o={...r};for(const i in r){const u=t[i],d=r[i];/^on[A-Z]/.test(i)?u&&d?o[i]=(...h)=>{const g=d(...h);return u(...h),g}:u&&(o[i]=u):i==="style"?o[i]={...u,...d}:i==="className"&&(o[i]=[u,d].filter(Boolean).join(" "))}return{...t,...o}}function Hb(t){let r=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?t.ref:(r=Object.getOwnPropertyDescriptor(t,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?t.props.ref:t.props.ref||t.ref)}function nc(t){const r=t+"CollectionProvider",[o,i]=Dn(r),[u,d]=o(r,{collectionRef:{current:null},itemMap:new Map}),p=C=>{const{scope:S,children:E}=C,_=On.useRef(null),O=On.useRef(new Map).current;return l.jsx(u,{scope:S,itemMap:O,collectionRef:_,children:E})};p.displayName=r;const h=t+"CollectionSlot",g=Jp(h),v=On.forwardRef((C,S)=>{const{scope:E,children:_}=C,O=d(h,E),I=He(S,O.collectionRef);return l.jsx(g,{ref:I,children:_})});v.displayName=h;const x=t+"CollectionItemSlot",w="data-radix-collection-item",b=Jp(x),k=On.forwardRef((C,S)=>{const{scope:E,children:_,...O}=C,I=On.useRef(null),D=He(S,I),A=d(x,E);return On.useEffect(()=>(A.itemMap.set(I,{ref:I,...O}),()=>{A.itemMap.delete(I)})),l.jsx(b,{[w]:"",ref:D,children:_})});k.displayName=x;function j(C){const S=d(t+"CollectionConsumer",C);return On.useCallback(()=>{const _=S.collectionRef.current;if(!_)return[];const O=Array.from(_.querySelectorAll(`[${w}]`));return Array.from(S.itemMap.values()).sort((A,$)=>O.indexOf(A.ref.current)-O.indexOf($.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:p,Slot:v,ItemSlot:k},j,i]}function Bb(t){const r=Wb(t),o=m.forwardRef((i,u)=>{const{children:d,...p}=i,h=m.Children.toArray(d),g=h.find(Vb);if(g){const v=g.props.children,x=h.map(w=>w===g?m.Children.count(v)>1?m.Children.only(null):m.isValidElement(v)?v.props.children:null:w);return l.jsx(r,{...p,ref:u,children:m.isValidElement(v)?m.cloneElement(v,void 0,x):null})}return l.jsx(r,{...p,ref:u,children:d})});return o.displayName=`${t}.Slot`,o}function Wb(t){const r=m.forwardRef((o,i)=>{const{children:u,...d}=o;if(m.isValidElement(u)){const p=Gb(u),h=Qb(d,u.props);return u.type!==m.Fragment&&(h.ref=i?Ur(i,p):p),m.cloneElement(u,h)}return m.Children.count(u)>1?m.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var Kb=Symbol("radix.slottable");function Vb(t){return m.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Kb}function Qb(t,r){const o={...r};for(const i in r){const u=t[i],d=r[i];/^on[A-Z]/.test(i)?u&&d?o[i]=(...h)=>{const g=d(...h);return u(...h),g}:u&&(o[i]=u):i==="style"?o[i]={...u,...d}:i==="className"&&(o[i]=[u,d].filter(Boolean).join(" "))}return{...t,...o}}function Gb(t){let r=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?t.ref:(r=Object.getOwnPropertyDescriptor(t,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?t.props.ref:t.props.ref||t.ref)}var qb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],je=qb.reduce((t,r)=>{const o=Bb(`Primitive.${r}`),i=m.forwardRef((u,d)=>{const{asChild:p,...h}=u,g=p?o:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(g,{...h,ref:d})});return i.displayName=`Primitive.${r}`,{...t,[r]:i}},{});function rc(t,r){t&&Ii.flushSync(()=>t.dispatchEvent(r))}function yt(t){const r=m.useRef(t);return m.useEffect(()=>{r.current=t}),m.useMemo(()=>(...o)=>r.current?.(...o),[])}function Yb(t,r=globalThis?.document){const o=yt(t);m.useEffect(()=>{const i=u=>{u.key==="Escape"&&o(u)};return r.addEventListener("keydown",i,{capture:!0}),()=>r.removeEventListener("keydown",i,{capture:!0})},[o,r])}var Xb="DismissableLayer",Ru="dismissableLayer.update",Zb="dismissableLayer.pointerDownOutside",Jb="dismissableLayer.focusOutside",eh,xm=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Li=m.forwardRef((t,r)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:p,onDismiss:h,...g}=t,v=m.useContext(xm),[x,w]=m.useState(null),b=x?.ownerDocument??globalThis?.document,[,k]=m.useState({}),j=He(r,$=>w($)),C=Array.from(v.layers),[S]=[...v.layersWithOutsidePointerEventsDisabled].slice(-1),E=C.indexOf(S),_=x?C.indexOf(x):-1,O=v.layersWithOutsidePointerEventsDisabled.size>0,I=_>=E,D=t0($=>{const K=$.target,Q=[...v.branches].some(ee=>ee.contains(K));!I||Q||(u?.($),p?.($),$.defaultPrevented||h?.())},b),A=n0($=>{const K=$.target;[...v.branches].some(ee=>ee.contains(K))||(d?.($),p?.($),$.defaultPrevented||h?.())},b);return Yb($=>{_===v.layers.size-1&&(i?.($),!$.defaultPrevented&&h&&($.preventDefault(),h()))},b),m.useEffect(()=>{if(x)return o&&(v.layersWithOutsidePointerEventsDisabled.size===0&&(eh=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),v.layersWithOutsidePointerEventsDisabled.add(x)),v.layers.add(x),th(),()=>{o&&v.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=eh)}},[x,b,o,v]),m.useEffect(()=>()=>{x&&(v.layers.delete(x),v.layersWithOutsidePointerEventsDisabled.delete(x),th())},[x,v]),m.useEffect(()=>{const $=()=>k({});return document.addEventListener(Ru,$),()=>document.removeEventListener(Ru,$)},[]),l.jsx(je.div,{...g,ref:j,style:{pointerEvents:O?I?"auto":"none":void 0,...t.style},onFocusCapture:he(t.onFocusCapture,A.onFocusCapture),onBlurCapture:he(t.onBlurCapture,A.onBlurCapture),onPointerDownCapture:he(t.onPointerDownCapture,D.onPointerDownCapture)})});Li.displayName=Xb;var e0="DismissableLayerBranch",ym=m.forwardRef((t,r)=>{const o=m.useContext(xm),i=m.useRef(null),u=He(r,i);return m.useEffect(()=>{const d=i.current;if(d)return o.branches.add(d),()=>{o.branches.delete(d)}},[o.branches]),l.jsx(je.div,{...t,ref:u})});ym.displayName=e0;function t0(t,r=globalThis?.document){const o=yt(t),i=m.useRef(!1),u=m.useRef(()=>{});return m.useEffect(()=>{const d=h=>{if(h.target&&!i.current){let g=function(){wm(Zb,o,v,{discrete:!0})};const v={originalEvent:h};h.pointerType==="touch"?(r.removeEventListener("click",u.current),u.current=g,r.addEventListener("click",u.current,{once:!0})):g()}else r.removeEventListener("click",u.current);i.current=!1},p=window.setTimeout(()=>{r.addEventListener("pointerdown",d)},0);return()=>{window.clearTimeout(p),r.removeEventListener("pointerdown",d),r.removeEventListener("click",u.current)}},[r,o]),{onPointerDownCapture:()=>i.current=!0}}function n0(t,r=globalThis?.document){const o=yt(t),i=m.useRef(!1);return m.useEffect(()=>{const u=d=>{d.target&&!i.current&&wm(Jb,o,{originalEvent:d},{discrete:!1})};return r.addEventListener("focusin",u),()=>r.removeEventListener("focusin",u)},[r,o]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function th(){const t=new CustomEvent(Ru);document.dispatchEvent(t)}function wm(t,r,o,{discrete:i}){const u=o.originalEvent.target,d=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:o});r&&u.addEventListener(t,r,{once:!0}),i?rc(u,d):u.dispatchEvent(d)}var r0=Li,o0=ym,Gt=globalThis?.document?m.useLayoutEffect:()=>{},s0="Portal",oc=m.forwardRef((t,r)=>{const{container:o,...i}=t,[u,d]=m.useState(!1);Gt(()=>d(!0),[]);const p=o||u&&globalThis?.document?.body;return p?Lb.createPortal(l.jsx(je.div,{...i,ref:r}),p):null});oc.displayName=s0;function i0(t,r){return m.useReducer((o,i)=>r[o][i]??o,t)}var Fn=t=>{const{present:r,children:o}=t,i=a0(r),u=typeof o=="function"?o({present:i.isPresent}):m.Children.only(o),d=He(i.ref,l0(u));return typeof o=="function"||i.isPresent?m.cloneElement(u,{ref:d}):null};Fn.displayName="Presence";function a0(t){const[r,o]=m.useState(),i=m.useRef(null),u=m.useRef(t),d=m.useRef("none"),p=t?"mounted":"unmounted",[h,g]=i0(p,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const v=fi(i.current);d.current=h==="mounted"?v:"none"},[h]),Gt(()=>{const v=i.current,x=u.current;if(x!==t){const b=d.current,k=fi(v);t?g("MOUNT"):k==="none"||v?.display==="none"?g("UNMOUNT"):g(x&&b!==k?"ANIMATION_OUT":"UNMOUNT"),u.current=t}},[t,g]),Gt(()=>{if(r){let v;const x=r.ownerDocument.defaultView??window,w=k=>{const C=fi(i.current).includes(CSS.escape(k.animationName));if(k.target===r&&C&&(g("ANIMATION_END"),!u.current)){const S=r.style.animationFillMode;r.style.animationFillMode="forwards",v=x.setTimeout(()=>{r.style.animationFillMode==="forwards"&&(r.style.animationFillMode=S)})}},b=k=>{k.target===r&&(d.current=fi(i.current))};return r.addEventListener("animationstart",b),r.addEventListener("animationcancel",w),r.addEventListener("animationend",w),()=>{x.clearTimeout(v),r.removeEventListener("animationstart",b),r.removeEventListener("animationcancel",w),r.removeEventListener("animationend",w)}}else g("ANIMATION_END")},[r,g]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:m.useCallback(v=>{i.current=v?getComputedStyle(v):null,o(v)},[])}}function fi(t){return t?.animationName||"none"}function l0(t){let r=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?t.ref:(r=Object.getOwnPropertyDescriptor(t,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?t.props.ref:t.props.ref||t.ref)}var u0=Ku[" useInsertionEffect ".trim().toString()]||Gt;function Go({prop:t,defaultProp:r,onChange:o=()=>{},caller:i}){const[u,d,p]=c0({defaultProp:r,onChange:o}),h=t!==void 0,g=h?t:u;{const x=m.useRef(t!==void 0);m.useEffect(()=>{const w=x.current;w!==h&&console.warn(`${i} is changing from ${w?"controlled":"uncontrolled"} to ${h?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),x.current=h},[h,i])}const v=m.useCallback(x=>{if(h){const w=d0(x)?x(t):x;w!==t&&p.current?.(w)}else d(x)},[h,t,d,p]);return[g,v]}function c0({defaultProp:t,onChange:r}){const[o,i]=m.useState(t),u=m.useRef(o),d=m.useRef(r);return u0(()=>{d.current=r},[r]),m.useEffect(()=>{u.current!==o&&(d.current?.(o),u.current=o)},[o,u]),[o,i,d]}function d0(t){return typeof t=="function"}var f0=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),p0="VisuallyHidden",Di=m.forwardRef((t,r)=>l.jsx(je.span,{...t,ref:r,style:{...f0,...t.style}}));Di.displayName=p0;var h0=Di,sc="ToastProvider",[ic,m0,g0]=nc("Toast"),[bm]=Dn("Toast",[g0]),[v0,Fi]=bm(sc),Sm=t=>{const{__scopeToast:r,label:o="Notification",duration:i=5e3,swipeDirection:u="right",swipeThreshold:d=50,children:p}=t,[h,g]=m.useState(null),[v,x]=m.useState(0),w=m.useRef(!1),b=m.useRef(!1);return o.trim()||console.error(`Invalid prop \`label\` supplied to \`${sc}\`. Expected non-empty \`string\`.`),l.jsx(ic.Provider,{scope:r,children:l.jsx(v0,{scope:r,label:o,duration:i,swipeDirection:u,swipeThreshold:d,toastCount:v,viewport:h,onViewportChange:g,onToastAdd:m.useCallback(()=>x(k=>k+1),[]),onToastRemove:m.useCallback(()=>x(k=>k-1),[]),isFocusedToastEscapeKeyDownRef:w,isClosePausedRef:b,children:p})})};Sm.displayName=sc;var Cm="ToastViewport",x0=["F8"],Pu="toast.viewportPause",Tu="toast.viewportResume",km=m.forwardRef((t,r)=>{const{__scopeToast:o,hotkey:i=x0,label:u="Notifications ({hotkey})",...d}=t,p=Fi(Cm,o),h=m0(o),g=m.useRef(null),v=m.useRef(null),x=m.useRef(null),w=m.useRef(null),b=He(r,w,p.onViewportChange),k=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),j=p.toastCount>0;m.useEffect(()=>{const S=E=>{i.length!==0&&i.every(O=>E[O]||E.code===O)&&w.current?.focus()};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[i]),m.useEffect(()=>{const S=g.current,E=w.current;if(j&&S&&E){const _=()=>{if(!p.isClosePausedRef.current){const A=new CustomEvent(Pu);E.dispatchEvent(A),p.isClosePausedRef.current=!0}},O=()=>{if(p.isClosePausedRef.current){const A=new CustomEvent(Tu);E.dispatchEvent(A),p.isClosePausedRef.current=!1}},I=A=>{!S.contains(A.relatedTarget)&&O()},D=()=>{S.contains(document.activeElement)||O()};return S.addEventListener("focusin",_),S.addEventListener("focusout",I),S.addEventListener("pointermove",_),S.addEventListener("pointerleave",D),window.addEventListener("blur",_),window.addEventListener("focus",O),()=>{S.removeEventListener("focusin",_),S.removeEventListener("focusout",I),S.removeEventListener("pointermove",_),S.removeEventListener("pointerleave",D),window.removeEventListener("blur",_),window.removeEventListener("focus",O)}}},[j,p.isClosePausedRef]);const C=m.useCallback(({tabbingDirection:S})=>{const _=h().map(O=>{const I=O.ref.current,D=[I,..._0(I)];return S==="forwards"?D:D.reverse()});return(S==="forwards"?_.reverse():_).flat()},[h]);return m.useEffect(()=>{const S=w.current;if(S){const E=_=>{const O=_.altKey||_.ctrlKey||_.metaKey;if(_.key==="Tab"&&!O){const D=document.activeElement,A=_.shiftKey;if(_.target===S&&A){v.current?.focus();return}const Q=C({tabbingDirection:A?"backwards":"forwards"}),ee=Q.findIndex(ne=>ne===D);tu(Q.slice(ee+1))?_.preventDefault():A?v.current?.focus():x.current?.focus()}};return S.addEventListener("keydown",E),()=>S.removeEventListener("keydown",E)}},[h,C]),l.jsxs(o0,{ref:g,role:"region","aria-label":u.replace("{hotkey}",k),tabIndex:-1,style:{pointerEvents:j?void 0:"none"},children:[j&&l.jsx(_u,{ref:v,onFocusFromOutsideViewport:()=>{const S=C({tabbingDirection:"forwards"});tu(S)}}),l.jsx(ic.Slot,{scope:o,children:l.jsx(je.ol,{tabIndex:-1,...d,ref:b})}),j&&l.jsx(_u,{ref:x,onFocusFromOutsideViewport:()=>{const S=C({tabbingDirection:"backwards"});tu(S)}})]})});km.displayName=Cm;var Em="ToastFocusProxy",_u=m.forwardRef((t,r)=>{const{__scopeToast:o,onFocusFromOutsideViewport:i,...u}=t,d=Fi(Em,o);return l.jsx(Di,{tabIndex:0,...u,ref:r,style:{position:"fixed"},onFocus:p=>{const h=p.relatedTarget;!d.viewport?.contains(h)&&i()}})});_u.displayName=Em;var qo="Toast",y0="toast.swipeStart",w0="toast.swipeMove",b0="toast.swipeCancel",S0="toast.swipeEnd",Nm=m.forwardRef((t,r)=>{const{forceMount:o,open:i,defaultOpen:u,onOpenChange:d,...p}=t,[h,g]=Go({prop:i,defaultProp:u??!0,onChange:d,caller:qo});return l.jsx(Fn,{present:o||h,children:l.jsx(E0,{open:h,...p,ref:r,onClose:()=>g(!1),onPause:yt(t.onPause),onResume:yt(t.onResume),onSwipeStart:he(t.onSwipeStart,v=>{v.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:he(t.onSwipeMove,v=>{const{x,y:w}=v.detail.delta;v.currentTarget.setAttribute("data-swipe","move"),v.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${x}px`),v.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${w}px`)}),onSwipeCancel:he(t.onSwipeCancel,v=>{v.currentTarget.setAttribute("data-swipe","cancel"),v.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),v.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),v.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),v.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:he(t.onSwipeEnd,v=>{const{x,y:w}=v.detail.delta;v.currentTarget.setAttribute("data-swipe","end"),v.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),v.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),v.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${x}px`),v.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${w}px`),g(!1)})})})});Nm.displayName=qo;var[C0,k0]=bm(qo,{onClose(){}}),E0=m.forwardRef((t,r)=>{const{__scopeToast:o,type:i="foreground",duration:u,open:d,onClose:p,onEscapeKeyDown:h,onPause:g,onResume:v,onSwipeStart:x,onSwipeMove:w,onSwipeCancel:b,onSwipeEnd:k,...j}=t,C=Fi(qo,o),[S,E]=m.useState(null),_=He(r,X=>E(X)),O=m.useRef(null),I=m.useRef(null),D=u||C.duration,A=m.useRef(0),$=m.useRef(D),K=m.useRef(0),{onToastAdd:Q,onToastRemove:ee}=C,ne=yt(()=>{S?.contains(document.activeElement)&&C.viewport?.focus(),p()}),Z=m.useCallback(X=>{!X||X===1/0||(window.clearTimeout(K.current),A.current=new Date().getTime(),K.current=window.setTimeout(ne,X))},[ne]);m.useEffect(()=>{const X=C.viewport;if(X){const ve=()=>{Z($.current),v?.()},se=()=>{const le=new Date().getTime()-A.current;$.current=$.current-le,window.clearTimeout(K.current),g?.()};return X.addEventListener(Pu,se),X.addEventListener(Tu,ve),()=>{X.removeEventListener(Pu,se),X.removeEventListener(Tu,ve)}}},[C.viewport,D,g,v,Z]),m.useEffect(()=>{d&&!C.isClosePausedRef.current&&Z(D)},[d,D,C.isClosePausedRef,Z]),m.useEffect(()=>(Q(),()=>ee()),[Q,ee]);const de=m.useMemo(()=>S?Am(S):null,[S]);return C.viewport?l.jsxs(l.Fragment,{children:[de&&l.jsx(N0,{__scopeToast:o,role:"status","aria-live":i==="foreground"?"assertive":"polite",children:de}),l.jsx(C0,{scope:o,onClose:ne,children:Ii.createPortal(l.jsx(ic.ItemSlot,{scope:o,children:l.jsx(r0,{asChild:!0,onEscapeKeyDown:he(h,()=>{C.isFocusedToastEscapeKeyDownRef.current||ne(),C.isFocusedToastEscapeKeyDownRef.current=!1}),children:l.jsx(je.li,{tabIndex:0,"data-state":d?"open":"closed","data-swipe-direction":C.swipeDirection,...j,ref:_,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:he(t.onKeyDown,X=>{X.key==="Escape"&&(h?.(X.nativeEvent),X.nativeEvent.defaultPrevented||(C.isFocusedToastEscapeKeyDownRef.current=!0,ne()))}),onPointerDown:he(t.onPointerDown,X=>{X.button===0&&(O.current={x:X.clientX,y:X.clientY})}),onPointerMove:he(t.onPointerMove,X=>{if(!O.current)return;const ve=X.clientX-O.current.x,se=X.clientY-O.current.y,le=!!I.current,U=["left","right"].includes(C.swipeDirection),H=["left","up"].includes(C.swipeDirection)?Math.min:Math.max,q=U?H(0,ve):0,P=U?0:H(0,se),B=X.pointerType==="touch"?10:2,ue={x:q,y:P},me={originalEvent:X,delta:ue};le?(I.current=ue,pi(w0,w,me,{discrete:!1})):nh(ue,C.swipeDirection,B)?(I.current=ue,pi(y0,x,me,{discrete:!1}),X.target.setPointerCapture(X.pointerId)):(Math.abs(ve)>B||Math.abs(se)>B)&&(O.current=null)}),onPointerUp:he(t.onPointerUp,X=>{const ve=I.current,se=X.target;if(se.hasPointerCapture(X.pointerId)&&se.releasePointerCapture(X.pointerId),I.current=null,O.current=null,ve){const le=X.currentTarget,U={originalEvent:X,delta:ve};nh(ve,C.swipeDirection,C.swipeThreshold)?pi(S0,k,U,{discrete:!0}):pi(b0,b,U,{discrete:!0}),le.addEventListener("click",H=>H.preventDefault(),{once:!0})}})})})}),C.viewport)})]}):null}),N0=t=>{const{__scopeToast:r,children:o,...i}=t,u=Fi(qo,r),[d,p]=m.useState(!1),[h,g]=m.useState(!1);return P0(()=>p(!0)),m.useEffect(()=>{const v=window.setTimeout(()=>g(!0),1e3);return()=>window.clearTimeout(v)},[]),h?null:l.jsx(oc,{asChild:!0,children:l.jsx(Di,{...i,children:d&&l.jsxs(l.Fragment,{children:[u.label," ",o]})})})},j0="ToastTitle",jm=m.forwardRef((t,r)=>{const{__scopeToast:o,...i}=t;return l.jsx(je.div,{...i,ref:r})});jm.displayName=j0;var R0="ToastDescription",Rm=m.forwardRef((t,r)=>{const{__scopeToast:o,...i}=t;return l.jsx(je.div,{...i,ref:r})});Rm.displayName=R0;var Pm="ToastAction",Tm=m.forwardRef((t,r)=>{const{altText:o,...i}=t;return o.trim()?l.jsx(Om,{altText:o,asChild:!0,children:l.jsx(ac,{...i,ref:r})}):(console.error(`Invalid prop \`altText\` supplied to \`${Pm}\`. Expected non-empty \`string\`.`),null)});Tm.displayName=Pm;var _m="ToastClose",ac=m.forwardRef((t,r)=>{const{__scopeToast:o,...i}=t,u=k0(_m,o);return l.jsx(Om,{asChild:!0,children:l.jsx(je.button,{type:"button",...i,ref:r,onClick:he(t.onClick,u.onClose)})})});ac.displayName=_m;var Om=m.forwardRef((t,r)=>{const{__scopeToast:o,altText:i,...u}=t;return l.jsx(je.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":i||void 0,...u,ref:r})});function Am(t){const r=[];return Array.from(t.childNodes).forEach(i=>{if(i.nodeType===i.TEXT_NODE&&i.textContent&&r.push(i.textContent),T0(i)){const u=i.ariaHidden||i.hidden||i.style.display==="none",d=i.dataset.radixToastAnnounceExclude==="";if(!u)if(d){const p=i.dataset.radixToastAnnounceAlt;p&&r.push(p)}else r.push(...Am(i))}}),r}function pi(t,r,o,{discrete:i}){const u=o.originalEvent.currentTarget,d=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:o});r&&u.addEventListener(t,r,{once:!0}),i?rc(u,d):u.dispatchEvent(d)}var nh=(t,r,o=0)=>{const i=Math.abs(t.x),u=Math.abs(t.y),d=i>u;return r==="left"||r==="right"?d&&i>o:!d&&u>o};function P0(t=()=>{}){const r=yt(t);Gt(()=>{let o=0,i=0;return o=window.requestAnimationFrame(()=>i=window.requestAnimationFrame(r)),()=>{window.cancelAnimationFrame(o),window.cancelAnimationFrame(i)}},[r])}function T0(t){return t.nodeType===t.ELEMENT_NODE}function _0(t){const r=[],o=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const u=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||u?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)r.push(o.currentNode);return r}function tu(t){const r=document.activeElement;return t.some(o=>o===r?!0:(o.focus(),document.activeElement!==r))}var O0=Sm,Mm=km,Im=Nm,Lm=jm,Dm=Rm,Fm=Tm,$m=ac;function zm(t){var r,o,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var u=t.length;for(r=0;r<u;r++)t[r]&&(o=zm(t[r]))&&(i&&(i+=" "),i+=o)}else for(o in t)t[o]&&(i&&(i+=" "),i+=o);return i}function Um(){for(var t,r,o=0,i="",u=arguments.length;o<u;o++)(t=arguments[o])&&(r=zm(t))&&(i&&(i+=" "),i+=r);return i}const rh=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,oh=Um,A0=(t,r)=>o=>{var i;if(r?.variants==null)return oh(t,o?.class,o?.className);const{variants:u,defaultVariants:d}=r,p=Object.keys(u).map(v=>{const x=o?.[v],w=d?.[v];if(x===null)return null;const b=rh(x)||rh(w);return u[v][b]}),h=o&&Object.entries(o).reduce((v,x)=>{let[w,b]=x;return b===void 0||(v[w]=b),v},{}),g=r==null||(i=r.compoundVariants)===null||i===void 0?void 0:i.reduce((v,x)=>{let{class:w,className:b,...k}=x;return Object.entries(k).every(j=>{let[C,S]=j;return Array.isArray(S)?S.includes({...d,...h}[C]):{...d,...h}[C]===S})?[...v,w,b]:v},[]);return oh(t,p,g,o?.class,o?.className)};const M0=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Hm=(...t)=>t.filter((r,o,i)=>!!r&&i.indexOf(r)===o).join(" ");var I0={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const L0=m.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:o=2,absoluteStrokeWidth:i,className:u="",children:d,iconNode:p,...h},g)=>m.createElement("svg",{ref:g,...I0,width:r,height:r,stroke:t,strokeWidth:i?Number(o)*24/Number(r):o,className:Hm("lucide",u),...h},[...p.map(([v,x])=>m.createElement(v,x)),...Array.isArray(d)?d:[d]]));const Hr=(t,r)=>{const o=m.forwardRef(({className:i,...u},d)=>m.createElement(L0,{ref:d,iconNode:r,className:Hm(`lucide-${M0(t)}`,i),...u}));return o.displayName=`${t}`,o};const D0=Hr("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);const F0=Hr("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const $0=Hr("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const z0=Hr("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const U0=Hr("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const H0=Hr("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),lc="-",B0=t=>{const r=K0(t),{conflictingClassGroups:o,conflictingClassGroupModifiers:i}=t;return{getClassGroupId:p=>{const h=p.split(lc);return h[0]===""&&h.length!==1&&h.shift(),Bm(h,r)||W0(p)},getConflictingClassGroupIds:(p,h)=>{const g=o[p]||[];return h&&i[p]?[...g,...i[p]]:g}}},Bm=(t,r)=>{if(t.length===0)return r.classGroupId;const o=t[0],i=r.nextPart.get(o),u=i?Bm(t.slice(1),i):void 0;if(u)return u;if(r.validators.length===0)return;const d=t.join(lc);return r.validators.find(({validator:p})=>p(d))?.classGroupId},sh=/^\[(.+)\]$/,W0=t=>{if(sh.test(t)){const r=sh.exec(t)[1],o=r?.substring(0,r.indexOf(":"));if(o)return"arbitrary.."+o}},K0=t=>{const{theme:r,prefix:o}=t,i={nextPart:new Map,validators:[]};return Q0(Object.entries(t.classGroups),o).forEach(([d,p])=>{Ou(p,i,d,r)}),i},Ou=(t,r,o,i)=>{t.forEach(u=>{if(typeof u=="string"){const d=u===""?r:ih(r,u);d.classGroupId=o;return}if(typeof u=="function"){if(V0(u)){Ou(u(i),r,o,i);return}r.validators.push({validator:u,classGroupId:o});return}Object.entries(u).forEach(([d,p])=>{Ou(p,ih(r,d),o,i)})})},ih=(t,r)=>{let o=t;return r.split(lc).forEach(i=>{o.nextPart.has(i)||o.nextPart.set(i,{nextPart:new Map,validators:[]}),o=o.nextPart.get(i)}),o},V0=t=>t.isThemeGetter,Q0=(t,r)=>r?t.map(([o,i])=>{const u=i.map(d=>typeof d=="string"?r+d:typeof d=="object"?Object.fromEntries(Object.entries(d).map(([p,h])=>[r+p,h])):d);return[o,u]}):t,G0=t=>{if(t<1)return{get:()=>{},set:()=>{}};let r=0,o=new Map,i=new Map;const u=(d,p)=>{o.set(d,p),r++,r>t&&(r=0,i=o,o=new Map)};return{get(d){let p=o.get(d);if(p!==void 0)return p;if((p=i.get(d))!==void 0)return u(d,p),p},set(d,p){o.has(d)?o.set(d,p):u(d,p)}}},Wm="!",q0=t=>{const{separator:r,experimentalParseClassName:o}=t,i=r.length===1,u=r[0],d=r.length,p=h=>{const g=[];let v=0,x=0,w;for(let S=0;S<h.length;S++){let E=h[S];if(v===0){if(E===u&&(i||h.slice(S,S+d)===r)){g.push(h.slice(x,S)),x=S+d;continue}if(E==="/"){w=S;continue}}E==="["?v++:E==="]"&&v--}const b=g.length===0?h:h.substring(x),k=b.startsWith(Wm),j=k?b.substring(1):b,C=w&&w>x?w-x:void 0;return{modifiers:g,hasImportantModifier:k,baseClassName:j,maybePostfixModifierPosition:C}};return o?h=>o({className:h,parseClassName:p}):p},Y0=t=>{if(t.length<=1)return t;const r=[];let o=[];return t.forEach(i=>{i[0]==="["?(r.push(...o.sort(),i),o=[]):o.push(i)}),r.push(...o.sort()),r},X0=t=>({cache:G0(t.cacheSize),parseClassName:q0(t),...B0(t)}),Z0=/\s+/,J0=(t,r)=>{const{parseClassName:o,getClassGroupId:i,getConflictingClassGroupIds:u}=r,d=[],p=t.trim().split(Z0);let h="";for(let g=p.length-1;g>=0;g-=1){const v=p[g],{modifiers:x,hasImportantModifier:w,baseClassName:b,maybePostfixModifierPosition:k}=o(v);let j=!!k,C=i(j?b.substring(0,k):b);if(!C){if(!j){h=v+(h.length>0?" "+h:h);continue}if(C=i(b),!C){h=v+(h.length>0?" "+h:h);continue}j=!1}const S=Y0(x).join(":"),E=w?S+Wm:S,_=E+C;if(d.includes(_))continue;d.push(_);const O=u(C,j);for(let I=0;I<O.length;++I){const D=O[I];d.push(E+D)}h=v+(h.length>0?" "+h:h)}return h};function e1(){let t=0,r,o,i="";for(;t<arguments.length;)(r=arguments[t++])&&(o=Km(r))&&(i&&(i+=" "),i+=o);return i}const Km=t=>{if(typeof t=="string")return t;let r,o="";for(let i=0;i<t.length;i++)t[i]&&(r=Km(t[i]))&&(o&&(o+=" "),o+=r);return o};function t1(t,...r){let o,i,u,d=p;function p(g){const v=r.reduce((x,w)=>w(x),t());return o=X0(v),i=o.cache.get,u=o.cache.set,d=h,h(g)}function h(g){const v=i(g);if(v)return v;const x=J0(g,o);return u(g,x),x}return function(){return d(e1.apply(null,arguments))}}const Te=t=>{const r=o=>o[t]||[];return r.isThemeGetter=!0,r},Vm=/^\[(?:([a-z-]+):)?(.+)\]$/i,n1=/^\d+\/\d+$/,r1=new Set(["px","full","screen"]),o1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,s1=/\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$/,i1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,a1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,l1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,sn=t=>Ir(t)||r1.has(t)||n1.test(t),Pn=t=>Br(t,"length",g1),Ir=t=>!!t&&!Number.isNaN(Number(t)),nu=t=>Br(t,"number",Ir),Ao=t=>!!t&&Number.isInteger(Number(t)),u1=t=>t.endsWith("%")&&Ir(t.slice(0,-1)),xe=t=>Vm.test(t),Tn=t=>o1.test(t),c1=new Set(["length","size","percentage"]),d1=t=>Br(t,c1,Qm),f1=t=>Br(t,"position",Qm),p1=new Set(["image","url"]),h1=t=>Br(t,p1,x1),m1=t=>Br(t,"",v1),Mo=()=>!0,Br=(t,r,o)=>{const i=Vm.exec(t);return i?i[1]?typeof r=="string"?i[1]===r:r.has(i[1]):o(i[2]):!1},g1=t=>s1.test(t)&&!i1.test(t),Qm=()=>!1,v1=t=>a1.test(t),x1=t=>l1.test(t),y1=()=>{const t=Te("colors"),r=Te("spacing"),o=Te("blur"),i=Te("brightness"),u=Te("borderColor"),d=Te("borderRadius"),p=Te("borderSpacing"),h=Te("borderWidth"),g=Te("contrast"),v=Te("grayscale"),x=Te("hueRotate"),w=Te("invert"),b=Te("gap"),k=Te("gradientColorStops"),j=Te("gradientColorStopPositions"),C=Te("inset"),S=Te("margin"),E=Te("opacity"),_=Te("padding"),O=Te("saturate"),I=Te("scale"),D=Te("sepia"),A=Te("skew"),$=Te("space"),K=Te("translate"),Q=()=>["auto","contain","none"],ee=()=>["auto","hidden","clip","visible","scroll"],ne=()=>["auto",xe,r],Z=()=>[xe,r],de=()=>["",sn,Pn],X=()=>["auto",Ir,xe],ve=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],se=()=>["solid","dashed","dotted","double","none"],le=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>["start","end","center","between","around","evenly","stretch"],H=()=>["","0",xe],q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>[Ir,xe];return{cacheSize:500,separator:":",theme:{colors:[Mo],spacing:[sn,Pn],blur:["none","",Tn,xe],brightness:P(),borderColor:[t],borderRadius:["none","","full",Tn,xe],borderSpacing:Z(),borderWidth:de(),contrast:P(),grayscale:H(),hueRotate:P(),invert:H(),gap:Z(),gradientColorStops:[t],gradientColorStopPositions:[u1,Pn],inset:ne(),margin:ne(),opacity:P(),padding:Z(),saturate:P(),scale:P(),sepia:H(),skew:P(),space:Z(),translate:Z()},classGroups:{aspect:[{aspect:["auto","square","video",xe]}],container:["container"],columns:[{columns:[Tn]}],"break-after":[{"break-after":q()}],"break-before":[{"break-before":q()}],"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"],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:[...ve(),xe]}],overflow:[{overflow:ee()}],"overflow-x":[{"overflow-x":ee()}],"overflow-y":[{"overflow-y":ee()}],overscroll:[{overscroll:Q()}],"overscroll-x":[{"overscroll-x":Q()}],"overscroll-y":[{"overscroll-y":Q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[C]}],"inset-x":[{"inset-x":[C]}],"inset-y":[{"inset-y":[C]}],start:[{start:[C]}],end:[{end:[C]}],top:[{top:[C]}],right:[{right:[C]}],bottom:[{bottom:[C]}],left:[{left:[C]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ao,xe]}],basis:[{basis:ne()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",xe]}],grow:[{grow:H()}],shrink:[{shrink:H()}],order:[{order:["first","last","none",Ao,xe]}],"grid-cols":[{"grid-cols":[Mo]}],"col-start-end":[{col:["auto",{span:["full",Ao,xe]},xe]}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":[Mo]}],"row-start-end":[{row:["auto",{span:[Ao,xe]},xe]}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",xe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",xe]}],gap:[{gap:[b]}],"gap-x":[{"gap-x":[b]}],"gap-y":[{"gap-y":[b]}],"justify-content":[{justify:["normal",...U()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...U(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...U(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[_]}],px:[{px:[_]}],py:[{py:[_]}],ps:[{ps:[_]}],pe:[{pe:[_]}],pt:[{pt:[_]}],pr:[{pr:[_]}],pb:[{pb:[_]}],pl:[{pl:[_]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[$]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[$]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",xe,r]}],"min-w":[{"min-w":[xe,r,"min","max","fit"]}],"max-w":[{"max-w":[xe,r,"none","full","min","max","fit","prose",{screen:[Tn]},Tn]}],h:[{h:[xe,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[xe,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[xe,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[xe,r,"auto","min","max","fit"]}],"font-size":[{text:["base",Tn,Pn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",nu]}],"font-family":[{font:[Mo]}],"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:["tighter","tight","normal","wide","wider","widest",xe]}],"line-clamp":[{"line-clamp":["none",Ir,nu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",sn,xe]}],"list-image":[{"list-image":["none",xe]}],"list-style-type":[{list:["none","disc","decimal",xe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[E]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[E]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",sn,Pn]}],"underline-offset":[{"underline-offset":["auto",sn,xe]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",xe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",xe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[E]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ve(),f1]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",d1]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},h1]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[j]}],"gradient-via-pos":[{via:[j]}],"gradient-to-pos":[{to:[j]}],"gradient-from":[{from:[k]}],"gradient-via":[{via:[k]}],"gradient-to":[{to:[k]}],rounded:[{rounded:[d]}],"rounded-s":[{"rounded-s":[d]}],"rounded-e":[{"rounded-e":[d]}],"rounded-t":[{"rounded-t":[d]}],"rounded-r":[{"rounded-r":[d]}],"rounded-b":[{"rounded-b":[d]}],"rounded-l":[{"rounded-l":[d]}],"rounded-ss":[{"rounded-ss":[d]}],"rounded-se":[{"rounded-se":[d]}],"rounded-ee":[{"rounded-ee":[d]}],"rounded-es":[{"rounded-es":[d]}],"rounded-tl":[{"rounded-tl":[d]}],"rounded-tr":[{"rounded-tr":[d]}],"rounded-br":[{"rounded-br":[d]}],"rounded-bl":[{"rounded-bl":[d]}],"border-w":[{border:[h]}],"border-w-x":[{"border-x":[h]}],"border-w-y":[{"border-y":[h]}],"border-w-s":[{"border-s":[h]}],"border-w-e":[{"border-e":[h]}],"border-w-t":[{"border-t":[h]}],"border-w-r":[{"border-r":[h]}],"border-w-b":[{"border-b":[h]}],"border-w-l":[{"border-l":[h]}],"border-opacity":[{"border-opacity":[E]}],"border-style":[{border:[...se(),"hidden"]}],"divide-x":[{"divide-x":[h]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[h]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[E]}],"divide-style":[{divide:se()}],"border-color":[{border:[u]}],"border-color-x":[{"border-x":[u]}],"border-color-y":[{"border-y":[u]}],"border-color-s":[{"border-s":[u]}],"border-color-e":[{"border-e":[u]}],"border-color-t":[{"border-t":[u]}],"border-color-r":[{"border-r":[u]}],"border-color-b":[{"border-b":[u]}],"border-color-l":[{"border-l":[u]}],"divide-color":[{divide:[u]}],"outline-style":[{outline:["",...se()]}],"outline-offset":[{"outline-offset":[sn,xe]}],"outline-w":[{outline:[sn,Pn]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[E]}],"ring-offset-w":[{"ring-offset":[sn,Pn]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Tn,m1]}],"shadow-color":[{shadow:[Mo]}],opacity:[{opacity:[E]}],"mix-blend":[{"mix-blend":[...le(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":le()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[i]}],contrast:[{contrast:[g]}],"drop-shadow":[{"drop-shadow":["","none",Tn,xe]}],grayscale:[{grayscale:[v]}],"hue-rotate":[{"hue-rotate":[x]}],invert:[{invert:[w]}],saturate:[{saturate:[O]}],sepia:[{sepia:[D]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[g]}],"backdrop-grayscale":[{"backdrop-grayscale":[v]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[x]}],"backdrop-invert":[{"backdrop-invert":[w]}],"backdrop-opacity":[{"backdrop-opacity":[E]}],"backdrop-saturate":[{"backdrop-saturate":[O]}],"backdrop-sepia":[{"backdrop-sepia":[D]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[p]}],"border-spacing-x":[{"border-spacing-x":[p]}],"border-spacing-y":[{"border-spacing-y":[p]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",xe]}],duration:[{duration:P()}],ease:[{ease:["linear","in","out","in-out",xe]}],delay:[{delay:P()}],animate:[{animate:["none","spin","ping","pulse","bounce",xe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[I]}],"scale-x":[{"scale-x":[I]}],"scale-y":[{"scale-y":[I]}],rotate:[{rotate:[Ao,xe]}],"translate-x":[{"translate-x":[K]}],"translate-y":[{"translate-y":[K]}],"skew-x":[{"skew-x":[A]}],"skew-y":[{"skew-y":[A]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",xe]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],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",xe]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Z()}],"scroll-mx":[{"scroll-mx":Z()}],"scroll-my":[{"scroll-my":Z()}],"scroll-ms":[{"scroll-ms":Z()}],"scroll-me":[{"scroll-me":Z()}],"scroll-mt":[{"scroll-mt":Z()}],"scroll-mr":[{"scroll-mr":Z()}],"scroll-mb":[{"scroll-mb":Z()}],"scroll-ml":[{"scroll-ml":Z()}],"scroll-p":[{"scroll-p":Z()}],"scroll-px":[{"scroll-px":Z()}],"scroll-py":[{"scroll-py":Z()}],"scroll-ps":[{"scroll-ps":Z()}],"scroll-pe":[{"scroll-pe":Z()}],"scroll-pt":[{"scroll-pt":Z()}],"scroll-pr":[{"scroll-pr":Z()}],"scroll-pb":[{"scroll-pb":Z()}],"scroll-pl":[{"scroll-pl":Z()}],"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",xe]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[sn,Pn,nu]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},w1=t1(y1);function De(...t){return w1(Um(t))}const b1=O0,Gm=m.forwardRef(({className:t,...r},o)=>l.jsx(Mm,{ref:o,className:De("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t),...r}));Gm.displayName=Mm.displayName;const S1=A0("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-transform data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),qm=m.forwardRef(({className:t,variant:r,...o},i)=>l.jsx(Im,{ref:i,className:De(S1({variant:r}),t),...o}));qm.displayName=Im.displayName;const C1=m.forwardRef(({className:t,...r},o)=>l.jsx(Fm,{ref:o,className:De("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",t),...r}));C1.displayName=Fm.displayName;const Ym=m.forwardRef(({className:t,...r},o)=>l.jsx($m,{ref:o,className:De("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...r,children:l.jsx(H0,{className:"h-4 w-4"})}));Ym.displayName=$m.displayName;const Xm=m.forwardRef(({className:t,...r},o)=>l.jsx(Lm,{ref:o,className:De("text-sm font-semibold",t),...r}));Xm.displayName=Lm.displayName;const Zm=m.forwardRef(({className:t,...r},o)=>l.jsx(Dm,{ref:o,className:De("text-sm opacity-90",t),...r}));Zm.displayName=Dm.displayName;function k1(){const{toasts:t}=Ib();return l.jsxs(b1,{children:[t.map(function({id:r,title:o,description:i,action:u,...d}){return l.jsxs(qm,{...d,children:[l.jsxs("div",{className:"grid gap-1",children:[o&&l.jsx(Xm,{children:o}),i&&l.jsx(Zm,{children:i})]}),u,l.jsx(Ym,{})]},r)}),l.jsx(Gm,{})]})}var E1=Ku[" useId ".trim().toString()]||(()=>{}),N1=0;function zo(t){const[r,o]=m.useState(E1());return Gt(()=>{o(i=>i??String(N1++))},[t]),r?`radix-${r}`:""}const j1=["top","right","bottom","left"],In=Math.min,gt=Math.max,ji=Math.round,hi=Math.floor,Qt=t=>({x:t,y:t}),R1={left:"right",right:"left",bottom:"top",top:"bottom"};function Au(t,r,o){return gt(t,In(r,o))}function an(t,r){return typeof t=="function"?t(r):t}function ln(t){return t.split("-")[0]}function Wr(t){return t.split("-")[1]}function uc(t){return t==="x"?"y":"x"}function cc(t){return t==="y"?"height":"width"}function Vt(t){const r=t[0];return r==="t"||r==="b"?"y":"x"}function dc(t){return uc(Vt(t))}function P1(t,r,o){o===void 0&&(o=!1);const i=Wr(t),u=dc(t),d=cc(u);let p=u==="x"?i===(o?"end":"start")?"right":"left":i==="start"?"bottom":"top";return r.reference[d]>r.floating[d]&&(p=Ri(p)),[p,Ri(p)]}function T1(t){const r=Ri(t);return[Mu(t),r,Mu(r)]}function Mu(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const ah=["left","right"],lh=["right","left"],_1=["top","bottom"],O1=["bottom","top"];function A1(t,r,o){switch(t){case"top":case"bottom":return o?r?lh:ah:r?ah:lh;case"left":case"right":return r?_1:O1;default:return[]}}function M1(t,r,o,i){const u=Wr(t);let d=A1(ln(t),o==="start",i);return u&&(d=d.map(p=>p+"-"+u),r&&(d=d.concat(d.map(Mu)))),d}function Ri(t){const r=ln(t);return R1[r]+t.slice(r.length)}function I1(t){return{top:0,right:0,bottom:0,left:0,...t}}function Jm(t){return typeof t!="number"?I1(t):{top:t,right:t,bottom:t,left:t}}function Pi(t){const{x:r,y:o,width:i,height:u}=t;return{width:i,height:u,top:o,left:r,right:r+i,bottom:o+u,x:r,y:o}}function uh(t,r,o){let{reference:i,floating:u}=t;const d=Vt(r),p=dc(r),h=cc(p),g=ln(r),v=d==="y",x=i.x+i.width/2-u.width/2,w=i.y+i.height/2-u.height/2,b=i[h]/2-u[h]/2;let k;switch(g){case"top":k={x,y:i.y-u.height};break;case"bottom":k={x,y:i.y+i.height};break;case"right":k={x:i.x+i.width,y:w};break;case"left":k={x:i.x-u.width,y:w};break;default:k={x:i.x,y:i.y}}switch(Wr(r)){case"start":k[p]-=b*(o&&v?-1:1);break;case"end":k[p]+=b*(o&&v?-1:1);break}return k}async function L1(t,r){var o;r===void 0&&(r={});const{x:i,y:u,platform:d,rects:p,elements:h,strategy:g}=t,{boundary:v="clippingAncestors",rootBoundary:x="viewport",elementContext:w="floating",altBoundary:b=!1,padding:k=0}=an(r,t),j=Jm(k),S=h[b?w==="floating"?"reference":"floating":w],E=Pi(await d.getClippingRect({element:(o=await(d.isElement==null?void 0:d.isElement(S)))==null||o?S:S.contextElement||await(d.getDocumentElement==null?void 0:d.getDocumentElement(h.floating)),boundary:v,rootBoundary:x,strategy:g})),_=w==="floating"?{x:i,y:u,width:p.floating.width,height:p.floating.height}:p.reference,O=await(d.getOffsetParent==null?void 0:d.getOffsetParent(h.floating)),I=await(d.isElement==null?void 0:d.isElement(O))?await(d.getScale==null?void 0:d.getScale(O))||{x:1,y:1}:{x:1,y:1},D=Pi(d.convertOffsetParentRelativeRectToViewportRelativeRect?await d.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:_,offsetParent:O,strategy:g}):_);return{top:(E.top-D.top+j.top)/I.y,bottom:(D.bottom-E.bottom+j.bottom)/I.y,left:(E.left-D.left+j.left)/I.x,right:(D.right-E.right+j.right)/I.x}}const D1=50,F1=async(t,r,o)=>{const{placement:i="bottom",strategy:u="absolute",middleware:d=[],platform:p}=o,h=p.detectOverflow?p:{...p,detectOverflow:L1},g=await(p.isRTL==null?void 0:p.isRTL(r));let v=await p.getElementRects({reference:t,floating:r,strategy:u}),{x,y:w}=uh(v,i,g),b=i,k=0;const j={};for(let C=0;C<d.length;C++){const S=d[C];if(!S)continue;const{name:E,fn:_}=S,{x:O,y:I,data:D,reset:A}=await _({x,y:w,initialPlacement:i,placement:b,strategy:u,middlewareData:j,rects:v,platform:h,elements:{reference:t,floating:r}});x=O??x,w=I??w,j[E]={...j[E],...D},A&&k<D1&&(k++,typeof A=="object"&&(A.placement&&(b=A.placement),A.rects&&(v=A.rects===!0?await p.getElementRects({reference:t,floating:r,strategy:u}):A.rects),{x,y:w}=uh(v,b,g)),C=-1)}return{x,y:w,placement:b,strategy:u,middlewareData:j}},$1=t=>({name:"arrow",options:t,async fn(r){const{x:o,y:i,placement:u,rects:d,platform:p,elements:h,middlewareData:g}=r,{element:v,padding:x=0}=an(t,r)||{};if(v==null)return{};const w=Jm(x),b={x:o,y:i},k=dc(u),j=cc(k),C=await p.getDimensions(v),S=k==="y",E=S?"top":"left",_=S?"bottom":"right",O=S?"clientHeight":"clientWidth",I=d.reference[j]+d.reference[k]-b[k]-d.floating[j],D=b[k]-d.reference[k],A=await(p.getOffsetParent==null?void 0:p.getOffsetParent(v));let $=A?A[O]:0;(!$||!await(p.isElement==null?void 0:p.isElement(A)))&&($=h.floating[O]||d.floating[j]);const K=I/2-D/2,Q=$/2-C[j]/2-1,ee=In(w[E],Q),ne=In(w[_],Q),Z=ee,de=$-C[j]-ne,X=$/2-C[j]/2+K,ve=Au(Z,X,de),se=!g.arrow&&Wr(u)!=null&&X!==ve&&d.reference[j]/2-(X<Z?ee:ne)-C[j]/2<0,le=se?X<Z?X-Z:X-de:0;return{[k]:b[k]+le,data:{[k]:ve,centerOffset:X-ve-le,...se&&{alignmentOffset:le}},reset:se}}}),z1=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(r){var o,i;const{placement:u,middlewareData:d,rects:p,initialPlacement:h,platform:g,elements:v}=r,{mainAxis:x=!0,crossAxis:w=!0,fallbackPlacements:b,fallbackStrategy:k="bestFit",fallbackAxisSideDirection:j="none",flipAlignment:C=!0,...S}=an(t,r);if((o=d.arrow)!=null&&o.alignmentOffset)return{};const E=ln(u),_=Vt(h),O=ln(h)===h,I=await(g.isRTL==null?void 0:g.isRTL(v.floating)),D=b||(O||!C?[Ri(h)]:T1(h)),A=j!=="none";!b&&A&&D.push(...M1(h,C,j,I));const $=[h,...D],K=await g.detectOverflow(r,S),Q=[];let ee=((i=d.flip)==null?void 0:i.overflows)||[];if(x&&Q.push(K[E]),w){const X=P1(u,p,I);Q.push(K[X[0]],K[X[1]])}if(ee=[...ee,{placement:u,overflows:Q}],!Q.every(X=>X<=0)){var ne,Z;const X=(((ne=d.flip)==null?void 0:ne.index)||0)+1,ve=$[X];if(ve&&(!(w==="alignment"?_!==Vt(ve):!1)||ee.every(U=>Vt(U.placement)===_?U.overflows[0]>0:!0)))return{data:{index:X,overflows:ee},reset:{placement:ve}};let se=(Z=ee.filter(le=>le.overflows[0]<=0).sort((le,U)=>le.overflows[1]-U.overflows[1])[0])==null?void 0:Z.placement;if(!se)switch(k){case"bestFit":{var de;const le=(de=ee.filter(U=>{if(A){const H=Vt(U.placement);return H===_||H==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(H=>H>0).reduce((H,q)=>H+q,0)]).sort((U,H)=>U[1]-H[1])[0])==null?void 0:de[0];le&&(se=le);break}case"initialPlacement":se=h;break}if(u!==se)return{reset:{placement:se}}}return{}}}};function ch(t,r){return{top:t.top-r.height,right:t.right-r.width,bottom:t.bottom-r.height,left:t.left-r.width}}function dh(t){return j1.some(r=>t[r]>=0)}const U1=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(r){const{rects:o,platform:i}=r,{strategy:u="referenceHidden",...d}=an(t,r);switch(u){case"referenceHidden":{const p=await i.detectOverflow(r,{...d,elementContext:"reference"}),h=ch(p,o.reference);return{data:{referenceHiddenOffsets:h,referenceHidden:dh(h)}}}case"escaped":{const p=await i.detectOverflow(r,{...d,altBoundary:!0}),h=ch(p,o.floating);return{data:{escapedOffsets:h,escaped:dh(h)}}}default:return{}}}}},eg=new Set(["left","top"]);async function H1(t,r){const{placement:o,platform:i,elements:u}=t,d=await(i.isRTL==null?void 0:i.isRTL(u.floating)),p=ln(o),h=Wr(o),g=Vt(o)==="y",v=eg.has(p)?-1:1,x=d&&g?-1:1,w=an(r,t);let{mainAxis:b,crossAxis:k,alignmentAxis:j}=typeof w=="number"?{mainAxis:w,crossAxis:0,alignmentAxis:null}:{mainAxis:w.mainAxis||0,crossAxis:w.crossAxis||0,alignmentAxis:w.alignmentAxis};return h&&typeof j=="number"&&(k=h==="end"?j*-1:j),g?{x:k*x,y:b*v}:{x:b*v,y:k*x}}const B1=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(r){var o,i;const{x:u,y:d,placement:p,middlewareData:h}=r,g=await H1(r,t);return p===((o=h.offset)==null?void 0:o.placement)&&(i=h.arrow)!=null&&i.alignmentOffset?{}:{x:u+g.x,y:d+g.y,data:{...g,placement:p}}}}},W1=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(r){const{x:o,y:i,placement:u,platform:d}=r,{mainAxis:p=!0,crossAxis:h=!1,limiter:g={fn:E=>{let{x:_,y:O}=E;return{x:_,y:O}}},...v}=an(t,r),x={x:o,y:i},w=await d.detectOverflow(r,v),b=Vt(ln(u)),k=uc(b);let j=x[k],C=x[b];if(p){const E=k==="y"?"top":"left",_=k==="y"?"bottom":"right",O=j+w[E],I=j-w[_];j=Au(O,j,I)}if(h){const E=b==="y"?"top":"left",_=b==="y"?"bottom":"right",O=C+w[E],I=C-w[_];C=Au(O,C,I)}const S=g.fn({...r,[k]:j,[b]:C});return{...S,data:{x:S.x-o,y:S.y-i,enabled:{[k]:p,[b]:h}}}}}},K1=function(t){return t===void 0&&(t={}),{options:t,fn(r){const{x:o,y:i,placement:u,rects:d,middlewareData:p}=r,{offset:h=0,mainAxis:g=!0,crossAxis:v=!0}=an(t,r),x={x:o,y:i},w=Vt(u),b=uc(w);let k=x[b],j=x[w];const C=an(h,r),S=typeof C=="number"?{mainAxis:C,crossAxis:0}:{mainAxis:0,crossAxis:0,...C};if(g){const O=b==="y"?"height":"width",I=d.reference[b]-d.floating[O]+S.mainAxis,D=d.reference[b]+d.reference[O]-S.mainAxis;k<I?k=I:k>D&&(k=D)}if(v){var E,_;const O=b==="y"?"width":"height",I=eg.has(ln(u)),D=d.reference[w]-d.floating[O]+(I&&((E=p.offset)==null?void 0:E[w])||0)+(I?0:S.crossAxis),A=d.reference[w]+d.reference[O]+(I?0:((_=p.offset)==null?void 0:_[w])||0)-(I?S.crossAxis:0);j<D?j=D:j>A&&(j=A)}return{[b]:k,[w]:j}}}},V1=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(r){var o,i;const{placement:u,rects:d,platform:p,elements:h}=r,{apply:g=()=>{},...v}=an(t,r),x=await p.detectOverflow(r,v),w=ln(u),b=Wr(u),k=Vt(u)==="y",{width:j,height:C}=d.floating;let S,E;w==="top"||w==="bottom"?(S=w,E=b===(await(p.isRTL==null?void 0:p.isRTL(h.floating))?"start":"end")?"left":"right"):(E=w,S=b==="end"?"top":"bottom");const _=C-x.top-x.bottom,O=j-x.left-x.right,I=In(C-x[S],_),D=In(j-x[E],O),A=!r.middlewareData.shift;let $=I,K=D;if((o=r.middlewareData.shift)!=null&&o.enabled.x&&(K=O),(i=r.middlewareData.shift)!=null&&i.enabled.y&&($=_),A&&!b){const ee=gt(x.left,0),ne=gt(x.right,0),Z=gt(x.top,0),de=gt(x.bottom,0);k?K=j-2*(ee!==0||ne!==0?ee+ne:gt(x.left,x.right)):$=C-2*(Z!==0||de!==0?Z+de:gt(x.top,x.bottom))}await g({...r,availableWidth:K,availableHeight:$});const Q=await p.getDimensions(h.floating);return j!==Q.width||C!==Q.height?{reset:{rects:!0}}:{}}}};function $i(){return typeof window<"u"}function Kr(t){return tg(t)?(t.nodeName||"").toLowerCase():"#document"}function xt(t){var r;return(t==null||(r=t.ownerDocument)==null?void 0:r.defaultView)||window}function qt(t){var r;return(r=(tg(t)?t.ownerDocument:t.document)||window.document)==null?void 0:r.documentElement}function tg(t){return $i()?t instanceof Node||t instanceof xt(t).Node:!1}function Ft(t){return $i()?t instanceof Element||t instanceof xt(t).Element:!1}function un(t){return $i()?t instanceof HTMLElement||t instanceof xt(t).HTMLElement:!1}function fh(t){return!$i()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof xt(t).ShadowRoot}function Yo(t){const{overflow:r,overflowX:o,overflowY:i,display:u}=$t(t);return/auto|scroll|overlay|hidden|clip/.test(r+i+o)&&u!=="inline"&&u!=="contents"}function Q1(t){return/^(table|td|th)$/.test(Kr(t))}function zi(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const G1=/transform|translate|scale|rotate|perspective|filter/,q1=/paint|layout|strict|content/,Zn=t=>!!t&&t!=="none";let ru;function fc(t){const r=Ft(t)?$t(t):t;return Zn(r.transform)||Zn(r.translate)||Zn(r.scale)||Zn(r.rotate)||Zn(r.perspective)||!pc()&&(Zn(r.backdropFilter)||Zn(r.filter))||G1.test(r.willChange||"")||q1.test(r.contain||"")}function Y1(t){let r=Ln(t);for(;un(r)&&!Fr(r);){if(fc(r))return r;if(zi(r))return null;r=Ln(r)}return null}function pc(){return ru==null&&(ru=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ru}function Fr(t){return/^(html|body|#document)$/.test(Kr(t))}function $t(t){return xt(t).getComputedStyle(t)}function Ui(t){return Ft(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ln(t){if(Kr(t)==="html")return t;const r=t.assignedSlot||t.parentNode||fh(t)&&t.host||qt(t);return fh(r)?r.host:r}function ng(t){const r=Ln(t);return Fr(r)?t.ownerDocument?t.ownerDocument.body:t.body:un(r)&&Yo(r)?r:ng(r)}function Uo(t,r,o){var i;r===void 0&&(r=[]),o===void 0&&(o=!0);const u=ng(t),d=u===((i=t.ownerDocument)==null?void 0:i.body),p=xt(u);if(d){const h=Iu(p);return r.concat(p,p.visualViewport||[],Yo(u)?u:[],h&&o?Uo(h):[])}else return r.concat(u,Uo(u,[],o))}function Iu(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function rg(t){const r=$t(t);let o=parseFloat(r.width)||0,i=parseFloat(r.height)||0;const u=un(t),d=u?t.offsetWidth:o,p=u?t.offsetHeight:i,h=ji(o)!==d||ji(i)!==p;return h&&(o=d,i=p),{width:o,height:i,$:h}}function hc(t){return Ft(t)?t:t.contextElement}function Lr(t){const r=hc(t);if(!un(r))return Qt(1);const o=r.getBoundingClientRect(),{width:i,height:u,$:d}=rg(r);let p=(d?ji(o.width):o.width)/i,h=(d?ji(o.height):o.height)/u;return(!p||!Number.isFinite(p))&&(p=1),(!h||!Number.isFinite(h))&&(h=1),{x:p,y:h}}const X1=Qt(0);function og(t){const r=xt(t);return!pc()||!r.visualViewport?X1:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function Z1(t,r,o){return r===void 0&&(r=!1),!o||r&&o!==xt(t)?!1:r}function nr(t,r,o,i){r===void 0&&(r=!1),o===void 0&&(o=!1);const u=t.getBoundingClientRect(),d=hc(t);let p=Qt(1);r&&(i?Ft(i)&&(p=Lr(i)):p=Lr(t));const h=Z1(d,o,i)?og(d):Qt(0);let g=(u.left+h.x)/p.x,v=(u.top+h.y)/p.y,x=u.width/p.x,w=u.height/p.y;if(d){const b=xt(d),k=i&&Ft(i)?xt(i):i;let j=b,C=Iu(j);for(;C&&i&&k!==j;){const S=Lr(C),E=C.getBoundingClientRect(),_=$t(C),O=E.left+(C.clientLeft+parseFloat(_.paddingLeft))*S.x,I=E.top+(C.clientTop+parseFloat(_.paddingTop))*S.y;g*=S.x,v*=S.y,x*=S.x,w*=S.y,g+=O,v+=I,j=xt(C),C=Iu(j)}}return Pi({width:x,height:w,x:g,y:v})}function Hi(t,r){const o=Ui(t).scrollLeft;return r?r.left+o:nr(qt(t)).left+o}function sg(t,r){const o=t.getBoundingClientRect(),i=o.left+r.scrollLeft-Hi(t,o),u=o.top+r.scrollTop;return{x:i,y:u}}function J1(t){let{elements:r,rect:o,offsetParent:i,strategy:u}=t;const d=u==="fixed",p=qt(i),h=r?zi(r.floating):!1;if(i===p||h&&d)return o;let g={scrollLeft:0,scrollTop:0},v=Qt(1);const x=Qt(0),w=un(i);if((w||!w&&!d)&&((Kr(i)!=="body"||Yo(p))&&(g=Ui(i)),w)){const k=nr(i);v=Lr(i),x.x=k.x+i.clientLeft,x.y=k.y+i.clientTop}const b=p&&!w&&!d?sg(p,g):Qt(0);return{width:o.width*v.x,height:o.height*v.y,x:o.x*v.x-g.scrollLeft*v.x+x.x+b.x,y:o.y*v.y-g.scrollTop*v.y+x.y+b.y}}function eS(t){return Array.from(t.getClientRects())}function tS(t){const r=qt(t),o=Ui(t),i=t.ownerDocument.body,u=gt(r.scrollWidth,r.clientWidth,i.scrollWidth,i.clientWidth),d=gt(r.scrollHeight,r.clientHeight,i.scrollHeight,i.clientHeight);let p=-o.scrollLeft+Hi(t);const h=-o.scrollTop;return $t(i).direction==="rtl"&&(p+=gt(r.clientWidth,i.clientWidth)-u),{width:u,height:d,x:p,y:h}}const ph=25;function nS(t,r){const o=xt(t),i=qt(t),u=o.visualViewport;let d=i.clientWidth,p=i.clientHeight,h=0,g=0;if(u){d=u.width,p=u.height;const x=pc();(!x||x&&r==="fixed")&&(h=u.offsetLeft,g=u.offsetTop)}const v=Hi(i);if(v<=0){const x=i.ownerDocument,w=x.body,b=getComputedStyle(w),k=x.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,j=Math.abs(i.clientWidth-w.clientWidth-k);j<=ph&&(d-=j)}else v<=ph&&(d+=v);return{width:d,height:p,x:h,y:g}}function rS(t,r){const o=nr(t,!0,r==="fixed"),i=o.top+t.clientTop,u=o.left+t.clientLeft,d=un(t)?Lr(t):Qt(1),p=t.clientWidth*d.x,h=t.clientHeight*d.y,g=u*d.x,v=i*d.y;return{width:p,height:h,x:g,y:v}}function hh(t,r,o){let i;if(r==="viewport")i=nS(t,o);else if(r==="document")i=tS(qt(t));else if(Ft(r))i=rS(r,o);else{const u=og(t);i={x:r.x-u.x,y:r.y-u.y,width:r.width,height:r.height}}return Pi(i)}function ig(t,r){const o=Ln(t);return o===r||!Ft(o)||Fr(o)?!1:$t(o).position==="fixed"||ig(o,r)}function oS(t,r){const o=r.get(t);if(o)return o;let i=Uo(t,[],!1).filter(h=>Ft(h)&&Kr(h)!=="body"),u=null;const d=$t(t).position==="fixed";let p=d?Ln(t):t;for(;Ft(p)&&!Fr(p);){const h=$t(p),g=fc(p);!g&&h.position==="fixed"&&(u=null),(d?!g&&!u:!g&&h.position==="static"&&!!u&&(u.position==="absolute"||u.position==="fixed")||Yo(p)&&!g&&ig(t,p))?i=i.filter(x=>x!==p):u=h,p=Ln(p)}return r.set(t,i),i}function sS(t){let{element:r,boundary:o,rootBoundary:i,strategy:u}=t;const p=[...o==="clippingAncestors"?zi(r)?[]:oS(r,this._c):[].concat(o),i],h=hh(r,p[0],u);let g=h.top,v=h.right,x=h.bottom,w=h.left;for(let b=1;b<p.length;b++){const k=hh(r,p[b],u);g=gt(k.top,g),v=In(k.right,v),x=In(k.bottom,x),w=gt(k.left,w)}return{width:v-w,height:x-g,x:w,y:g}}function iS(t){const{width:r,height:o}=rg(t);return{width:r,height:o}}function aS(t,r,o){const i=un(r),u=qt(r),d=o==="fixed",p=nr(t,!0,d,r);let h={scrollLeft:0,scrollTop:0};const g=Qt(0);function v(){g.x=Hi(u)}if(i||!i&&!d)if((Kr(r)!=="body"||Yo(u))&&(h=Ui(r)),i){const k=nr(r,!0,d,r);g.x=k.x+r.clientLeft,g.y=k.y+r.clientTop}else u&&v();d&&!i&&u&&v();const x=u&&!i&&!d?sg(u,h):Qt(0),w=p.left+h.scrollLeft-g.x-x.x,b=p.top+h.scrollTop-g.y-x.y;return{x:w,y:b,width:p.width,height:p.height}}function ou(t){return $t(t).position==="static"}function mh(t,r){if(!un(t)||$t(t).position==="fixed")return null;if(r)return r(t);let o=t.offsetParent;return qt(t)===o&&(o=o.ownerDocument.body),o}function ag(t,r){const o=xt(t);if(zi(t))return o;if(!un(t)){let u=Ln(t);for(;u&&!Fr(u);){if(Ft(u)&&!ou(u))return u;u=Ln(u)}return o}let i=mh(t,r);for(;i&&Q1(i)&&ou(i);)i=mh(i,r);return i&&Fr(i)&&ou(i)&&!fc(i)?o:i||Y1(t)||o}const lS=async function(t){const r=this.getOffsetParent||ag,o=this.getDimensions,i=await o(t.floating);return{reference:aS(t.reference,await r(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function uS(t){return $t(t).direction==="rtl"}const cS={convertOffsetParentRelativeRectToViewportRelativeRect:J1,getDocumentElement:qt,getClippingRect:sS,getOffsetParent:ag,getElementRects:lS,getClientRects:eS,getDimensions:iS,getScale:Lr,isElement:Ft,isRTL:uS};function lg(t,r){return t.x===r.x&&t.y===r.y&&t.width===r.width&&t.height===r.height}function dS(t,r){let o=null,i;const u=qt(t);function d(){var h;clearTimeout(i),(h=o)==null||h.disconnect(),o=null}function p(h,g){h===void 0&&(h=!1),g===void 0&&(g=1),d();const v=t.getBoundingClientRect(),{left:x,top:w,width:b,height:k}=v;if(h||r(),!b||!k)return;const j=hi(w),C=hi(u.clientWidth-(x+b)),S=hi(u.clientHeight-(w+k)),E=hi(x),O={rootMargin:-j+"px "+-C+"px "+-S+"px "+-E+"px",threshold:gt(0,In(1,g))||1};let I=!0;function D(A){const $=A[0].intersectionRatio;if($!==g){if(!I)return p();$?p(!1,$):i=setTimeout(()=>{p(!1,1e-7)},1e3)}$===1&&!lg(v,t.getBoundingClientRect())&&p(),I=!1}try{o=new IntersectionObserver(D,{...O,root:u.ownerDocument})}catch{o=new IntersectionObserver(D,O)}o.observe(t)}return p(!0),d}function fS(t,r,o,i){i===void 0&&(i={});const{ancestorScroll:u=!0,ancestorResize:d=!0,elementResize:p=typeof ResizeObserver=="function",layoutShift:h=typeof IntersectionObserver=="function",animationFrame:g=!1}=i,v=hc(t),x=u||d?[...v?Uo(v):[],...r?Uo(r):[]]:[];x.forEach(E=>{u&&E.addEventListener("scroll",o,{passive:!0}),d&&E.addEventListener("resize",o)});const w=v&&h?dS(v,o):null;let b=-1,k=null;p&&(k=new ResizeObserver(E=>{let[_]=E;_&&_.target===v&&k&&r&&(k.unobserve(r),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var O;(O=k)==null||O.observe(r)})),o()}),v&&!g&&k.observe(v),r&&k.observe(r));let j,C=g?nr(t):null;g&&S();function S(){const E=nr(t);C&&!lg(C,E)&&o(),C=E,j=requestAnimationFrame(S)}return o(),()=>{var E;x.forEach(_=>{u&&_.removeEventListener("scroll",o),d&&_.removeEventListener("resize",o)}),w?.(),(E=k)==null||E.disconnect(),k=null,g&&cancelAnimationFrame(j)}}const pS=B1,hS=W1,mS=z1,gS=V1,vS=U1,gh=$1,xS=K1,yS=(t,r,o)=>{const i=new Map,u={platform:cS,...o},d={...u.platform,_c:i};return F1(t,r,{...u,platform:d})};var wS=typeof document<"u",bS=function(){},Si=wS?m.useLayoutEffect:bS;function Ti(t,r){if(t===r)return!0;if(typeof t!=typeof r)return!1;if(typeof t=="function"&&t.toString()===r.toString())return!0;let o,i,u;if(t&&r&&typeof t=="object"){if(Array.isArray(t)){if(o=t.length,o!==r.length)return!1;for(i=o;i--!==0;)if(!Ti(t[i],r[i]))return!1;return!0}if(u=Object.keys(t),o=u.length,o!==Object.keys(r).length)return!1;for(i=o;i--!==0;)if(!{}.hasOwnProperty.call(r,u[i]))return!1;for(i=o;i--!==0;){const d=u[i];if(!(d==="_owner"&&t.$$typeof)&&!Ti(t[d],r[d]))return!1}return!0}return t!==t&&r!==r}function ug(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function vh(t,r){const o=ug(t);return Math.round(r*o)/o}function su(t){const r=m.useRef(t);return Si(()=>{r.current=t}),r}function SS(t){t===void 0&&(t={});const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:u,elements:{reference:d,floating:p}={},transform:h=!0,whileElementsMounted:g,open:v}=t,[x,w]=m.useState({x:0,y:0,strategy:o,placement:r,middlewareData:{},isPositioned:!1}),[b,k]=m.useState(i);Ti(b,i)||k(i);const[j,C]=m.useState(null),[S,E]=m.useState(null),_=m.useCallback(U=>{U!==A.current&&(A.current=U,C(U))},[]),O=m.useCallback(U=>{U!==$.current&&($.current=U,E(U))},[]),I=d||j,D=p||S,A=m.useRef(null),$=m.useRef(null),K=m.useRef(x),Q=g!=null,ee=su(g),ne=su(u),Z=su(v),de=m.useCallback(()=>{if(!A.current||!$.current)return;const U={placement:r,strategy:o,middleware:b};ne.current&&(U.platform=ne.current),yS(A.current,$.current,U).then(H=>{const q={...H,isPositioned:Z.current!==!1};X.current&&!Ti(K.current,q)&&(K.current=q,Ii.flushSync(()=>{w(q)}))})},[b,r,o,ne,Z]);Si(()=>{v===!1&&K.current.isPositioned&&(K.current.isPositioned=!1,w(U=>({...U,isPositioned:!1})))},[v]);const X=m.useRef(!1);Si(()=>(X.current=!0,()=>{X.current=!1}),[]),Si(()=>{if(I&&(A.current=I),D&&($.current=D),I&&D){if(ee.current)return ee.current(I,D,de);de()}},[I,D,de,ee,Q]);const ve=m.useMemo(()=>({reference:A,floating:$,setReference:_,setFloating:O}),[_,O]),se=m.useMemo(()=>({reference:I,floating:D}),[I,D]),le=m.useMemo(()=>{const U={position:o,left:0,top:0};if(!se.floating)return U;const H=vh(se.floating,x.x),q=vh(se.floating,x.y);return h?{...U,transform:"translate("+H+"px, "+q+"px)",...ug(se.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:H,top:q}},[o,h,se.floating,x.x,x.y]);return m.useMemo(()=>({...x,update:de,refs:ve,elements:se,floatingStyles:le}),[x,de,ve,se,le])}const CS=t=>{function r(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:t,fn(o){const{element:i,padding:u}=typeof t=="function"?t(o):t;return i&&r(i)?i.current!=null?gh({element:i.current,padding:u}).fn(o):{}:i?gh({element:i,padding:u}).fn(o):{}}}},kS=(t,r)=>{const o=pS(t);return{name:o.name,fn:o.fn,options:[t,r]}},ES=(t,r)=>{const o=hS(t);return{name:o.name,fn:o.fn,options:[t,r]}},NS=(t,r)=>({fn:xS(t).fn,options:[t,r]}),jS=(t,r)=>{const o=mS(t);return{name:o.name,fn:o.fn,options:[t,r]}},RS=(t,r)=>{const o=gS(t);return{name:o.name,fn:o.fn,options:[t,r]}},PS=(t,r)=>{const o=vS(t);return{name:o.name,fn:o.fn,options:[t,r]}},TS=(t,r)=>{const o=CS(t);return{name:o.name,fn:o.fn,options:[t,r]}};var _S="Arrow",cg=m.forwardRef((t,r)=>{const{children:o,width:i=10,height:u=5,...d}=t;return l.jsx(je.svg,{...d,ref:r,width:i,height:u,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?o:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});cg.displayName=_S;var OS=cg;function AS(t){const[r,o]=m.useState(void 0);return Gt(()=>{if(t){o({width:t.offsetWidth,height:t.offsetHeight});const i=new ResizeObserver(u=>{if(!Array.isArray(u)||!u.length)return;const d=u[0];let p,h;if("borderBoxSize"in d){const g=d.borderBoxSize,v=Array.isArray(g)?g[0]:g;p=v.inlineSize,h=v.blockSize}else p=t.offsetWidth,h=t.offsetHeight;o({width:p,height:h})});return i.observe(t,{box:"border-box"}),()=>i.unobserve(t)}else o(void 0)},[t]),r}var mc="Popper",[dg,Bi]=Dn(mc),[MS,fg]=dg(mc),pg=t=>{const{__scopePopper:r,children:o}=t,[i,u]=m.useState(null);return l.jsx(MS,{scope:r,anchor:i,onAnchorChange:u,children:o})};pg.displayName=mc;var hg="PopperAnchor",mg=m.forwardRef((t,r)=>{const{__scopePopper:o,virtualRef:i,...u}=t,d=fg(hg,o),p=m.useRef(null),h=He(r,p),g=m.useRef(null);return m.useEffect(()=>{const v=g.current;g.current=i?.current||p.current,v!==g.current&&d.onAnchorChange(g.current)}),i?null:l.jsx(je.div,{...u,ref:h})});mg.displayName=hg;var gc="PopperContent",[IS,LS]=dg(gc),gg=m.forwardRef((t,r)=>{const{__scopePopper:o,side:i="bottom",sideOffset:u=0,align:d="center",alignOffset:p=0,arrowPadding:h=0,avoidCollisions:g=!0,collisionBoundary:v=[],collisionPadding:x=0,sticky:w="partial",hideWhenDetached:b=!1,updatePositionStrategy:k="optimized",onPlaced:j,...C}=t,S=fg(gc,o),[E,_]=m.useState(null),O=He(r,ce=>_(ce)),[I,D]=m.useState(null),A=AS(I),$=A?.width??0,K=A?.height??0,Q=i+(d!=="center"?"-"+d:""),ee=typeof x=="number"?x:{top:0,right:0,bottom:0,left:0,...x},ne=Array.isArray(v)?v:[v],Z=ne.length>0,de={padding:ee,boundary:ne.filter(FS),altBoundary:Z},{refs:X,floatingStyles:ve,placement:se,isPositioned:le,middlewareData:U}=SS({strategy:"fixed",placement:Q,whileElementsMounted:(...ce)=>fS(...ce,{animationFrame:k==="always"}),elements:{reference:S.anchor},middleware:[kS({mainAxis:u+K,alignmentAxis:p}),g&&ES({mainAxis:!0,crossAxis:!1,limiter:w==="partial"?NS():void 0,...de}),g&&jS({...de}),RS({...de,apply:({elements:ce,rects:be,availableWidth:Ee,availableHeight:tt})=>{const{width:sr,height:ts}=be.reference,Yt=ce.floating.style;Yt.setProperty("--radix-popper-available-width",`${Ee}px`),Yt.setProperty("--radix-popper-available-height",`${tt}px`),Yt.setProperty("--radix-popper-anchor-width",`${sr}px`),Yt.setProperty("--radix-popper-anchor-height",`${ts}px`)}}),I&&TS({element:I,padding:h}),$S({arrowWidth:$,arrowHeight:K}),b&&PS({strategy:"referenceHidden",...de})]}),[H,q]=yg(se),P=yt(j);Gt(()=>{le&&P?.()},[le,P]);const B=U.arrow?.x,ue=U.arrow?.y,me=U.arrow?.centerOffset!==0,[z,ae]=m.useState();return Gt(()=>{E&&ae(window.getComputedStyle(E).zIndex)},[E]),l.jsx("div",{ref:X.setFloating,"data-radix-popper-content-wrapper":"",style:{...ve,transform:le?ve.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:z,"--radix-popper-transform-origin":[U.transformOrigin?.x,U.transformOrigin?.y].join(" "),...U.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:l.jsx(IS,{scope:o,placedSide:H,onArrowChange:D,arrowX:B,arrowY:ue,shouldHideArrow:me,children:l.jsx(je.div,{"data-side":H,"data-align":q,...C,ref:O,style:{...C.style,animation:le?void 0:"none"}})})})});gg.displayName=gc;var vg="PopperArrow",DS={top:"bottom",right:"left",bottom:"top",left:"right"},xg=m.forwardRef(function(r,o){const{__scopePopper:i,...u}=r,d=LS(vg,i),p=DS[d.placedSide];return l.jsx("span",{ref:d.onArrowChange,style:{position:"absolute",left:d.arrowX,top:d.arrowY,[p]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[d.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[d.placedSide],visibility:d.shouldHideArrow?"hidden":void 0},children:l.jsx(OS,{...u,ref:o,style:{...u.style,display:"block"}})})});xg.displayName=vg;function FS(t){return t!==null}var $S=t=>({name:"transformOrigin",options:t,fn(r){const{placement:o,rects:i,middlewareData:u}=r,p=u.arrow?.centerOffset!==0,h=p?0:t.arrowWidth,g=p?0:t.arrowHeight,[v,x]=yg(o),w={start:"0%",center:"50%",end:"100%"}[x],b=(u.arrow?.x??0)+h/2,k=(u.arrow?.y??0)+g/2;let j="",C="";return v==="bottom"?(j=p?w:`${b}px`,C=`${-g}px`):v==="top"?(j=p?w:`${b}px`,C=`${i.floating.height+g}px`):v==="right"?(j=`${-g}px`,C=p?w:`${k}px`):v==="left"&&(j=`${i.floating.width+g}px`,C=p?w:`${k}px`),{data:{x:j,y:C}}}});function yg(t){const[r,o="center"]=t.split("-");return[r,o]}var wg=pg,bg=mg,Sg=gg,Cg=xg,zS=Symbol("radix.slottable");function US(t){const r=({children:o})=>l.jsx(l.Fragment,{children:o});return r.displayName=`${t}.Slottable`,r.__radixId=zS,r}var[Wi]=Dn("Tooltip",[Bi]),Ki=Bi(),kg="TooltipProvider",HS=700,Lu="tooltip.open",[BS,vc]=Wi(kg),Eg=t=>{const{__scopeTooltip:r,delayDuration:o=HS,skipDelayDuration:i=300,disableHoverableContent:u=!1,children:d}=t,p=m.useRef(!0),h=m.useRef(!1),g=m.useRef(0);return m.useEffect(()=>{const v=g.current;return()=>window.clearTimeout(v)},[]),l.jsx(BS,{scope:r,isOpenDelayedRef:p,delayDuration:o,onOpen:m.useCallback(()=>{window.clearTimeout(g.current),p.current=!1},[]),onClose:m.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>p.current=!0,i)},[i]),isPointerInTransitRef:h,onPointerInTransitChange:m.useCallback(v=>{h.current=v},[]),disableHoverableContent:u,children:d})};Eg.displayName=kg;var Ho="Tooltip",[WS,Vi]=Wi(Ho),Ng=t=>{const{__scopeTooltip:r,children:o,open:i,defaultOpen:u,onOpenChange:d,disableHoverableContent:p,delayDuration:h}=t,g=vc(Ho,t.__scopeTooltip),v=Ki(r),[x,w]=m.useState(null),b=zo(),k=m.useRef(0),j=p??g.disableHoverableContent,C=h??g.delayDuration,S=m.useRef(!1),[E,_]=Go({prop:i,defaultProp:u??!1,onChange:$=>{$?(g.onOpen(),document.dispatchEvent(new CustomEvent(Lu))):g.onClose(),d?.($)},caller:Ho}),O=m.useMemo(()=>E?S.current?"delayed-open":"instant-open":"closed",[E]),I=m.useCallback(()=>{window.clearTimeout(k.current),k.current=0,S.current=!1,_(!0)},[_]),D=m.useCallback(()=>{window.clearTimeout(k.current),k.current=0,_(!1)},[_]),A=m.useCallback(()=>{window.clearTimeout(k.current),k.current=window.setTimeout(()=>{S.current=!0,_(!0),k.current=0},C)},[C,_]);return m.useEffect(()=>()=>{k.current&&(window.clearTimeout(k.current),k.current=0)},[]),l.jsx(wg,{...v,children:l.jsx(WS,{scope:r,contentId:b,open:E,stateAttribute:O,trigger:x,onTriggerChange:w,onTriggerEnter:m.useCallback(()=>{g.isOpenDelayedRef.current?A():I()},[g.isOpenDelayedRef,A,I]),onTriggerLeave:m.useCallback(()=>{j?D():(window.clearTimeout(k.current),k.current=0)},[D,j]),onOpen:I,onClose:D,disableHoverableContent:j,children:o})})};Ng.displayName=Ho;var Du="TooltipTrigger",jg=m.forwardRef((t,r)=>{const{__scopeTooltip:o,...i}=t,u=Vi(Du,o),d=vc(Du,o),p=Ki(o),h=m.useRef(null),g=He(r,h,u.onTriggerChange),v=m.useRef(!1),x=m.useRef(!1),w=m.useCallback(()=>v.current=!1,[]);return m.useEffect(()=>()=>document.removeEventListener("pointerup",w),[w]),l.jsx(bg,{asChild:!0,...p,children:l.jsx(je.button,{"aria-describedby":u.open?u.contentId:void 0,"data-state":u.stateAttribute,...i,ref:g,onPointerMove:he(t.onPointerMove,b=>{b.pointerType!=="touch"&&!x.current&&!d.isPointerInTransitRef.current&&(u.onTriggerEnter(),x.current=!0)}),onPointerLeave:he(t.onPointerLeave,()=>{u.onTriggerLeave(),x.current=!1}),onPointerDown:he(t.onPointerDown,()=>{u.open&&u.onClose(),v.current=!0,document.addEventListener("pointerup",w,{once:!0})}),onFocus:he(t.onFocus,()=>{v.current||u.onOpen()}),onBlur:he(t.onBlur,u.onClose),onClick:he(t.onClick,u.onClose)})})});jg.displayName=Du;var KS="TooltipPortal",[Sj,VS]=Wi(KS,{forceMount:void 0}),$r="TooltipContent",Rg=m.forwardRef((t,r)=>{const o=VS($r,t.__scopeTooltip),{forceMount:i=o.forceMount,side:u="top",...d}=t,p=Vi($r,t.__scopeTooltip);return l.jsx(Fn,{present:i||p.open,children:p.disableHoverableContent?l.jsx(Pg,{side:u,...d,ref:r}):l.jsx(QS,{side:u,...d,ref:r})})}),QS=m.forwardRef((t,r)=>{const o=Vi($r,t.__scopeTooltip),i=vc($r,t.__scopeTooltip),u=m.useRef(null),d=He(r,u),[p,h]=m.useState(null),{trigger:g,onClose:v}=o,x=u.current,{onPointerInTransitChange:w}=i,b=m.useCallback(()=>{h(null),w(!1)},[w]),k=m.useCallback((j,C)=>{const S=j.currentTarget,E={x:j.clientX,y:j.clientY},_=ZS(E,S.getBoundingClientRect()),O=JS(E,_),I=eC(C.getBoundingClientRect()),D=nC([...O,...I]);h(D),w(!0)},[w]);return m.useEffect(()=>()=>b(),[b]),m.useEffect(()=>{if(g&&x){const j=S=>k(S,x),C=S=>k(S,g);return g.addEventListener("pointerleave",j),x.addEventListener("pointerleave",C),()=>{g.removeEventListener("pointerleave",j),x.removeEventListener("pointerleave",C)}}},[g,x,k,b]),m.useEffect(()=>{if(p){const j=C=>{const S=C.target,E={x:C.clientX,y:C.clientY},_=g?.contains(S)||x?.contains(S),O=!tC(E,p);_?b():O&&(b(),v())};return document.addEventListener("pointermove",j),()=>document.removeEventListener("pointermove",j)}},[g,x,p,v,b]),l.jsx(Pg,{...t,ref:d})}),[GS,qS]=Wi(Ho,{isInside:!1}),YS=US("TooltipContent"),Pg=m.forwardRef((t,r)=>{const{__scopeTooltip:o,children:i,"aria-label":u,onEscapeKeyDown:d,onPointerDownOutside:p,...h}=t,g=Vi($r,o),v=Ki(o),{onClose:x}=g;return m.useEffect(()=>(document.addEventListener(Lu,x),()=>document.removeEventListener(Lu,x)),[x]),m.useEffect(()=>{if(g.trigger){const w=b=>{b.target?.contains(g.trigger)&&x()};return window.addEventListener("scroll",w,{capture:!0}),()=>window.removeEventListener("scroll",w,{capture:!0})}},[g.trigger,x]),l.jsx(Li,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:w=>w.preventDefault(),onDismiss:x,children:l.jsxs(Sg,{"data-state":g.stateAttribute,...v,...h,ref:r,style:{...h.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(YS,{children:i}),l.jsx(GS,{scope:o,isInside:!0,children:l.jsx(h0,{id:g.contentId,role:"tooltip",children:u||i})})]})})});Rg.displayName=$r;var Tg="TooltipArrow",XS=m.forwardRef((t,r)=>{const{__scopeTooltip:o,...i}=t,u=Ki(o);return qS(Tg,o).isInside?null:l.jsx(Cg,{...u,...i,ref:r})});XS.displayName=Tg;function ZS(t,r){const o=Math.abs(r.top-t.y),i=Math.abs(r.bottom-t.y),u=Math.abs(r.right-t.x),d=Math.abs(r.left-t.x);switch(Math.min(o,i,u,d)){case d:return"left";case u:return"right";case o:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function JS(t,r,o=5){const i=[];switch(r){case"top":i.push({x:t.x-o,y:t.y+o},{x:t.x+o,y:t.y+o});break;case"bottom":i.push({x:t.x-o,y:t.y-o},{x:t.x+o,y:t.y-o});break;case"left":i.push({x:t.x+o,y:t.y-o},{x:t.x+o,y:t.y+o});break;case"right":i.push({x:t.x-o,y:t.y-o},{x:t.x-o,y:t.y+o});break}return i}function eC(t){const{top:r,right:o,bottom:i,left:u}=t;return[{x:u,y:r},{x:o,y:r},{x:o,y:i},{x:u,y:i}]}function tC(t,r){const{x:o,y:i}=t;let u=!1;for(let d=0,p=r.length-1;d<r.length;p=d++){const h=r[d],g=r[p],v=h.x,x=h.y,w=g.x,b=g.y;x>i!=b>i&&o<(w-v)*(i-x)/(b-x)+v&&(u=!u)}return u}function nC(t){const r=t.slice();return r.sort((o,i)=>o.x<i.x?-1:o.x>i.x?1:o.y<i.y?-1:o.y>i.y?1:0),rC(r)}function rC(t){if(t.length<=1)return t.slice();const r=[];for(let i=0;i<t.length;i++){const u=t[i];for(;r.length>=2;){const d=r[r.length-1],p=r[r.length-2];if((d.x-p.x)*(u.y-p.y)>=(d.y-p.y)*(u.x-p.x))r.pop();else break}r.push(u)}r.pop();const o=[];for(let i=t.length-1;i>=0;i--){const u=t[i];for(;o.length>=2;){const d=o[o.length-1],p=o[o.length-2];if((d.x-p.x)*(u.y-p.y)>=(d.y-p.y)*(u.x-p.x))o.pop();else break}o.push(u)}return o.pop(),r.length===1&&o.length===1&&r[0].x===o[0].x&&r[0].y===o[0].y?r:r.concat(o)}var oC=Eg,sC=Ng,iC=jg,_g=Rg;const aC=oC,lC=sC,uC=iC,Og=m.forwardRef(({className:t,sideOffset:r=4,...o},i)=>l.jsx(_g,{ref:i,sideOffset:r,className:De("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",t),...o}));Og.displayName=_g.displayName;var Qi="Collapsible",[cC]=Dn(Qi),[dC,xc]=cC(Qi),Ag=m.forwardRef((t,r)=>{const{__scopeCollapsible:o,open:i,defaultOpen:u,disabled:d,onOpenChange:p,...h}=t,[g,v]=Go({prop:i,defaultProp:u??!1,onChange:p,caller:Qi});return l.jsx(dC,{scope:o,disabled:d,contentId:zo(),open:g,onOpenToggle:m.useCallback(()=>v(x=>!x),[v]),children:l.jsx(je.div,{"data-state":wc(g),"data-disabled":d?"":void 0,...h,ref:r})})});Ag.displayName=Qi;var Mg="CollapsibleTrigger",Ig=m.forwardRef((t,r)=>{const{__scopeCollapsible:o,...i}=t,u=xc(Mg,o);return l.jsx(je.button,{type:"button","aria-controls":u.contentId,"aria-expanded":u.open||!1,"data-state":wc(u.open),"data-disabled":u.disabled?"":void 0,disabled:u.disabled,...i,ref:r,onClick:he(t.onClick,u.onOpenToggle)})});Ig.displayName=Mg;var yc="CollapsibleContent",Lg=m.forwardRef((t,r)=>{const{forceMount:o,...i}=t,u=xc(yc,t.__scopeCollapsible);return l.jsx(Fn,{present:o||u.open,children:({present:d})=>l.jsx(fC,{...i,ref:r,present:d})})});Lg.displayName=yc;var fC=m.forwardRef((t,r)=>{const{__scopeCollapsible:o,present:i,children:u,...d}=t,p=xc(yc,o),[h,g]=m.useState(i),v=m.useRef(null),x=He(r,v),w=m.useRef(0),b=w.current,k=m.useRef(0),j=k.current,C=p.open||h,S=m.useRef(C),E=m.useRef(void 0);return m.useEffect(()=>{const _=requestAnimationFrame(()=>S.current=!1);return()=>cancelAnimationFrame(_)},[]),Gt(()=>{const _=v.current;if(_){E.current=E.current||{transitionDuration:_.style.transitionDuration,animationName:_.style.animationName},_.style.transitionDuration="0s",_.style.animationName="none";const O=_.getBoundingClientRect();w.current=O.height,k.current=O.width,S.current||(_.style.transitionDuration=E.current.transitionDuration,_.style.animationName=E.current.animationName),g(i)}},[p.open,i]),l.jsx(je.div,{"data-state":wc(p.open),"data-disabled":p.disabled?"":void 0,id:p.contentId,hidden:!C,...d,ref:x,style:{"--radix-collapsible-content-height":b?`${b}px`:void 0,"--radix-collapsible-content-width":j?`${j}px`:void 0,...t.style},children:C&&u})});function wc(t){return t?"open":"closed"}var Fu=Ag,$u=Ig,zu=Lg;function pC(t){const r=t.split("/");if(r.length!==2||!r[0]||!r[1])return`https://github.com/${t}`;const[o,i]=r;return`https://github.com/${encodeURIComponent(o)}/${encodeURIComponent(i)}`}function hC(t,r){return t!==null?t:r===0}const xh="onboarding-panel-dismissed-v2",iu={claude:"Claude",codex:"Codex",gemini:"Gemini"},yh=[{label:"Gemini Code Assist",href:"https://github.com/apps/gemini-code-assist"},{label:"OpenAI Codex",href:"https://developers.openai.com/codex/integrations/github"},{label:"Claude Code",href:"https://support.claude.com/en/articles/14233555-set-up-code-review-for-claude-code"},{label:"Cursor",href:"https://cursor.com/docs/integrations/github"}];function wh(t){return t.claude||t.codex||t.gemini}function mC(t){return Object.entries(t).filter(([,r])=>r).map(([r])=>r)}function gC(t){const r=t.repos.filter(w=>w.accessible),o=t.repos.filter(w=>!w.accessible),i=r.filter(w=>wh(w.codeReviews)),u=r.filter(w=>!wh(w.codeReviews)),d=[{id:"github",title:"Connect GitHub",description:t.githubConnected?`Connected${t.githubUser?` as @${t.githubUser}`:""}.`:"Connect GitHub so the app can read repositories, sync feedback, and install review workflows.",complete:t.githubConnected},{id:"repo",title:"Track your first repository or PR",description:r.length>0?`Watching ${r.length} accessible repo${r.length===1?"":"s"}. Choose per repo whether to track only your PRs or your whole team.`:"Use the Add PR or Watch form below. Adding a PR also adds its repository to the watch list, and watched repos let you choose whether to track only your PRs or the whole team.",complete:r.length>0},{id:"workflow",title:"Enable first-pass AI review",description:i.length>0?`Detected an AI review workflow in ${i.length} repo${i.length===1?"":"s"}.`:r.length>0?"Install a Claude or Codex review workflow on any tracked repository to seed actionable review comments automatically.":"Track an accessible repository first, then install a review workflow.",complete:i.length>0}],p=d.filter(w=>w.complete).length,h=d.filter(w=>!w.complete),g=[...h.map(w=>w.id.toLowerCase()),...o.map(w=>"access:"+w.repo.toLowerCase()+":"+(w.error?.slice(0,100)??"").toLowerCase())].sort().join("|")||"complete",v=h.length>0||o.length>0,x=h.length>0?`${p} of ${d.length} complete`:`${o.length} access issue${o.length===1?"":"s"}`;return{accessibleRepos:r,hasIssues:v,inaccessibleRepos:o,reposMissingReview:u,reposWithReview:i,steps:d,pendingSteps:h,completedCount:p,dismissalKey:g,summary:x}}function au({children:t}){return l.jsx("code",{className:"rounded border border-border bg-muted/30 px-1 py-0.5 text-[11px] font-mono",children:t})}function bh({number:t,children:r}){return l.jsxs("div",{className:"flex gap-2.5",children:[l.jsx("span",{className:"mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center border border-border text-[10px] text-muted-foreground",children:t}),l.jsx("div",{className:"flex-1 text-[12px] leading-relaxed",children:r})]})}function vC({step:t,index:r,children:o}){return l.jsx("div",{className:`border px-3 py-3 ${t.complete?"border-border bg-background/60":"border-warning-border bg-warning-muted"}`,children:l.jsxs("div",{className:"flex gap-3",children:[l.jsx("span",{className:`mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center border text-[10px] ${t.complete?"border-border text-foreground":"border-warning-border text-warning-foreground"}`,children:t.complete?"✓":r}),l.jsxs("div",{className:"min-w-0 flex-1 space-y-1.5",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx("span",{className:"text-[11px] font-medium uppercase tracking-wider",children:t.title}),l.jsx("span",{className:`border px-1.5 py-0 text-[10px] uppercase tracking-wider ${t.complete?"border-border text-muted-foreground":"border-warning-border text-warning-foreground"}`,children:t.complete?"done":"next"})]}),l.jsx("p",{className:"text-[12px] text-muted-foreground",children:t.description}),o]})]})})}function xC(){const[t,r]=m.useState(()=>typeof window>"u"?null:window.localStorage.getItem(xh)),[o,i]=m.useState(!0),{data:u,isLoading:d}=et({queryKey:["/api/onboarding/status"],refetchInterval:3e4}),{data:p}=et({queryKey:["/api/config"]}),h=Je({mutationFn:async({repo:O,tool:I})=>(await Ge("POST","/api/onboarding/install-review",{repo:O,tool:I})).json(),onSuccess:(O,I)=>{ye.invalidateQueries({queryKey:["/api/onboarding/status"]}),vt({description:`${iu[I.tool]} review workflow installed for ${I.repo}.`})},onError:O=>{vt({variant:"destructive",description:`Could not install review workflow: ${O.message}`})}});if(d||!u)return null;const{accessibleRepos:g,completedCount:v,dismissalKey:x,hasIssues:w,inaccessibleRepos:b,reposMissingReview:k,reposWithReview:j,steps:C,summary:S}=gC(u),_=(p?.codingAgent??"claude")==="codex"?["codex","claude"]:["claude","codex"];return!w||t===x?null:l.jsxs("div",{className:"shrink-0 border-b border-border bg-muted/35",children:[l.jsxs("div",{className:"flex items-center justify-between px-4 py-2",children:[l.jsxs("button",{onClick:()=>i(!o),className:"flex items-center gap-2 text-left",children:[l.jsx("span",{className:"h-1.5 w-1.5 shrink-0 rounded-full bg-foreground"}),l.jsx("span",{className:"text-[11px] font-medium uppercase tracking-wider",children:"Getting started"}),l.jsx("span",{className:"text-[11px] text-muted-foreground",children:S}),l.jsx("span",{className:"text-[10px] text-muted-foreground",children:o?"▲":"▼"})]}),l.jsx("button",{onClick:()=>{typeof window<"u"&&window.localStorage.setItem(xh,x),r(x)},className:"text-[10px] uppercase tracking-wider text-muted-foreground transition-colors hover:text-foreground",children:"dismiss"})]}),o&&l.jsxs("div",{className:"border-t border-border px-4 py-4 space-y-4",children:[l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[l.jsx("div",{className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:"Setup checklist"}),l.jsxs("div",{className:"text-[11px] text-muted-foreground",children:[v," of ",C.length," complete"]})]}),l.jsx("div",{className:"space-y-3",children:C.map((O,I)=>l.jsxs(vC,{step:O,index:I+1,children:[O.id==="github"&&!O.complete&&l.jsxs("div",{className:"space-y-2 pt-1",children:[u.githubError&&l.jsx("p",{className:"text-[12px] text-destructive",children:u.githubError}),l.jsxs("div",{className:"space-y-1.5 text-[12px] text-muted-foreground",children:[l.jsxs(bh,{number:1,children:["Run ",l.jsx(au,{children:"gh auth login"})," on this machine, or set ",l.jsx(au,{children:"GITHUB_TOKEN"})," before starting the app."]}),l.jsxs(bh,{number:2,children:["Prefer the built-in token list if you want the app to remember it. Open ",l.jsx(Dt,{href:"/settings",className:"underline underline-offset-2",children:"settings"})," to paste a Personal Access Token."]})]})]}),O.id==="repo"&&!O.complete&&l.jsxs("div",{className:"pt-1 text-[12px] text-muted-foreground",children:["The left sidebar is the real entry point. Use ",l.jsx("span",{className:"text-foreground",children:"Add"})," for a PR URL or ",l.jsx("span",{className:"text-foreground",children:"Watch"})," for an ",l.jsx(au,{children:"owner/repo"})," slug, then choose whether that watched repo should track only your PRs or your whole team."]}),O.id==="workflow"&&!O.complete&&g.length>0&&l.jsxs("div",{className:"space-y-2 pt-1",children:[l.jsxs("div",{className:"space-y-2 border border-border bg-muted/40 px-3 py-2",children:[l.jsx("p",{className:"text-[12px] text-muted-foreground",children:"Oh-my-PR is best used along with a chain of AI code review tools. Different models have different strengths and weaknesses. Below are instructions on how to install code reviews with different providers."}),l.jsx("div",{className:"flex flex-wrap gap-x-3 gap-y-1 text-[11px]",children:yh.map(D=>l.jsx("a",{href:D.href,target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2 text-foreground/80 hover:text-foreground",children:D.label},D.href))})]}),k.map(D=>l.jsxs("div",{className:"flex flex-col gap-2 border border-border bg-background/50 px-3 py-2 md:flex-row md:items-center md:justify-between",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("a",{href:`https://github.com/${D.repo}`,target:"_blank",rel:"noopener noreferrer",className:"block truncate text-[11px] font-medium underline underline-offset-2",children:D.repo}),l.jsx("p",{className:"text-[11px] text-muted-foreground",children:"No AI review workflow detected yet."})]}),l.jsx("div",{className:"flex flex-wrap gap-2",children:_.map(A=>{const $=h.isPending&&h.variables?.repo===D.repo&&h.variables?.tool===A;return l.jsx("button",{type:"button",onClick:()=>h.mutate({repo:D.repo,tool:A}),disabled:h.isPending,className:"border border-border px-2 py-1 text-[10px] uppercase tracking-wider transition-colors hover:bg-foreground hover:text-background disabled:opacity-40",children:$?"Installing…":`Install ${iu[A]}`},`${D.repo}-${A}`)})})]},D.repo))]}),O.id==="workflow"&&O.complete&&j.length>0&&l.jsxs("div",{className:"space-y-2 pt-1",children:[l.jsxs("div",{className:"space-y-2 border border-border bg-muted/40 px-3 py-2",children:[l.jsx("p",{className:"text-[12px] text-muted-foreground",children:"Oh-my-PR is best used along with a chain of AI code review tools. Different models have different strengths and weaknesses. Below are instructions on how to install code reviews with different providers."}),l.jsx("div",{className:"flex flex-wrap gap-x-3 gap-y-1 text-[11px]",children:yh.map(D=>l.jsx("a",{href:D.href,target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2 text-foreground/80 hover:text-foreground",children:D.label},D.href))})]}),l.jsx("div",{className:"flex flex-wrap gap-2",children:j.map(D=>{const A=mC(D.codeReviews).map($=>iu[$]).join(" + ");return l.jsxs("span",{className:"border border-border px-2 py-0.5 text-[10px] uppercase tracking-wider text-muted-foreground",children:[D.repo," · ",A]},D.repo)})})]})]},O.id))}),b.length>0&&l.jsxs("div",{className:"space-y-3 border border-destructive/30 bg-destructive/5 px-3 py-3",children:[l.jsx("div",{className:"text-[11px] font-medium uppercase tracking-wider text-destructive",children:"Repository access issues"}),l.jsx("div",{className:"space-y-2",children:b.map(O=>l.jsxs("div",{className:"space-y-1",children:[l.jsx("div",{className:"text-[11px] font-medium",children:l.jsx("a",{href:`https://github.com/${O.repo}`,target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2",children:O.repo})}),l.jsxs("p",{className:"text-[12px] text-destructive",children:["Cannot access this repository: ",O.error??"unknown error"]})]},O.repo))})]})]})]})}const Sh="app-update-dismissed",yC="npm install -g oh-my-pr@latest";function wC(){return[{text:"Stop the running oh-my-pr process."},{text:"Run",command:yC},{text:"Start oh-my-pr again."}]}function Ch(t){return t.startsWith("v")?t:`v${t}`}function Dg(t){return t.latestVersion?`app-update:${t.latestVersion}`:null}function bC(t,r){if(!t?.updateAvailable)return!1;const o=Dg(t);return o!==null&&o!==r}function Xo(){const[t,r]=m.useState(()=>typeof window>"u"?null:window.sessionStorage.getItem(Sh)),{data:o}=et({queryKey:["/api/app-update"]});if(!o||!bC(o,t))return null;const i=Dg(o);if(!i||!o.latestVersion)return null;const u=wC();return l.jsx("div",{className:"shrink-0 border-b border-warning-border bg-warning-muted",children:l.jsxs("div",{className:"grid gap-2 px-4 py-2 lg:grid-cols-[minmax(0,1fr)_auto] lg:items-start",children:[l.jsxs("div",{className:"min-w-0 space-y-1.5",children:[l.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-3 text-[12px]",children:[l.jsx("span",{className:"inline-block h-1.5 w-1.5 shrink-0 rounded-full bg-warning"}),l.jsx("span",{className:"font-medium uppercase tracking-wider text-warning-foreground",children:"Update available"}),l.jsx("span",{className:"text-foreground/75",children:`oh-my-pr ${Ch(o.latestVersion)} is available. You're on ${Ch(o.currentVersion)}.`})]}),l.jsx("ol",{className:"list-decimal space-y-1 pl-5 text-[11px] text-foreground/70",children:u.map(d=>l.jsx("li",{className:"pl-0.5",children:d.command?l.jsxs(l.Fragment,{children:[d.text," ",l.jsx("code",{className:"font-mono text-foreground",children:d.command}),"."]}):d.text},`${d.text}:${d.command??""}`))})]}),l.jsxs("div",{className:"flex items-center gap-3 text-[11px]",children:[l.jsx("a",{href:o.latestReleaseUrl,target:"_blank",rel:"noreferrer",className:"font-medium uppercase tracking-wider text-warning-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"Update oh-my-pr"}),l.jsx("button",{onClick:()=>{typeof window<"u"&&window.sessionStorage.setItem(Sh,i),r(i)},className:"uppercase tracking-wider text-foreground/70 transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"dismiss for now"})]})]})})}var SC=m.createContext(void 0);function Fg(t){const r=m.useContext(SC);return t||r||"ltr"}var lu=0;function CC(){m.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??kh()),document.body.insertAdjacentElement("beforeend",t[1]??kh()),lu++,()=>{lu===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),lu--}},[])}function kh(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var uu="focusScope.autoFocusOnMount",cu="focusScope.autoFocusOnUnmount",Eh={bubbles:!1,cancelable:!0},kC="FocusScope",$g=m.forwardRef((t,r)=>{const{loop:o=!1,trapped:i=!1,onMountAutoFocus:u,onUnmountAutoFocus:d,...p}=t,[h,g]=m.useState(null),v=yt(u),x=yt(d),w=m.useRef(null),b=He(r,C=>g(C)),k=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(i){let C=function(O){if(k.paused||!h)return;const I=O.target;h.contains(I)?w.current=I:An(w.current,{select:!0})},S=function(O){if(k.paused||!h)return;const I=O.relatedTarget;I!==null&&(h.contains(I)||An(w.current,{select:!0}))},E=function(O){if(document.activeElement===document.body)for(const D of O)D.removedNodes.length>0&&An(h)};document.addEventListener("focusin",C),document.addEventListener("focusout",S);const _=new MutationObserver(E);return h&&_.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",S),_.disconnect()}}},[i,h,k.paused]),m.useEffect(()=>{if(h){jh.add(k);const C=document.activeElement;if(!h.contains(C)){const E=new CustomEvent(uu,Eh);h.addEventListener(uu,v),h.dispatchEvent(E),E.defaultPrevented||(EC(TC(zg(h)),{select:!0}),document.activeElement===C&&An(h))}return()=>{h.removeEventListener(uu,v),setTimeout(()=>{const E=new CustomEvent(cu,Eh);h.addEventListener(cu,x),h.dispatchEvent(E),E.defaultPrevented||An(C??document.body,{select:!0}),h.removeEventListener(cu,x),jh.remove(k)},0)}}},[h,v,x,k]);const j=m.useCallback(C=>{if(!o&&!i||k.paused)return;const S=C.key==="Tab"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,E=document.activeElement;if(S&&E){const _=C.currentTarget,[O,I]=NC(_);O&&I?!C.shiftKey&&E===I?(C.preventDefault(),o&&An(O,{select:!0})):C.shiftKey&&E===O&&(C.preventDefault(),o&&An(I,{select:!0})):E===_&&C.preventDefault()}},[o,i,k.paused]);return l.jsx(je.div,{tabIndex:-1,...p,ref:b,onKeyDown:j})});$g.displayName=kC;function EC(t,{select:r=!1}={}){const o=document.activeElement;for(const i of t)if(An(i,{select:r}),document.activeElement!==o)return}function NC(t){const r=zg(t),o=Nh(r,t),i=Nh(r.reverse(),t);return[o,i]}function zg(t){const r=[],o=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const u=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||u?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)r.push(o.currentNode);return r}function Nh(t,r){for(const o of t)if(!jC(o,{upTo:r}))return o}function jC(t,{upTo:r}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(r!==void 0&&t===r)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function RC(t){return t instanceof HTMLInputElement&&"select"in t}function An(t,{select:r=!1}={}){if(t&&t.focus){const o=document.activeElement;t.focus({preventScroll:!0}),t!==o&&RC(t)&&r&&t.select()}}var jh=PC();function PC(){let t=[];return{add(r){const o=t[0];r!==o&&o?.pause(),t=Rh(t,r),t.unshift(r)},remove(r){t=Rh(t,r),t[0]?.resume()}}}function Rh(t,r){const o=[...t],i=o.indexOf(r);return i!==-1&&o.splice(i,1),o}function TC(t){return t.filter(r=>r.tagName!=="A")}var du="rovingFocusGroup.onEntryFocus",_C={bubbles:!1,cancelable:!0},Zo="RovingFocusGroup",[Uu,Ug,OC]=nc(Zo),[AC,Hg]=Dn(Zo,[OC]),[MC,IC]=AC(Zo),Bg=m.forwardRef((t,r)=>l.jsx(Uu.Provider,{scope:t.__scopeRovingFocusGroup,children:l.jsx(Uu.Slot,{scope:t.__scopeRovingFocusGroup,children:l.jsx(LC,{...t,ref:r})})}));Bg.displayName=Zo;var LC=m.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:o,orientation:i,loop:u=!1,dir:d,currentTabStopId:p,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:g,onEntryFocus:v,preventScrollOnEntryFocus:x=!1,...w}=t,b=m.useRef(null),k=He(r,b),j=Fg(d),[C,S]=Go({prop:p,defaultProp:h??null,onChange:g,caller:Zo}),[E,_]=m.useState(!1),O=yt(v),I=Ug(o),D=m.useRef(!1),[A,$]=m.useState(0);return m.useEffect(()=>{const K=b.current;if(K)return K.addEventListener(du,O),()=>K.removeEventListener(du,O)},[O]),l.jsx(MC,{scope:o,orientation:i,dir:j,loop:u,currentTabStopId:C,onItemFocus:m.useCallback(K=>S(K),[S]),onItemShiftTab:m.useCallback(()=>_(!0),[]),onFocusableItemAdd:m.useCallback(()=>$(K=>K+1),[]),onFocusableItemRemove:m.useCallback(()=>$(K=>K-1),[]),children:l.jsx(je.div,{tabIndex:E||A===0?-1:0,"data-orientation":i,...w,ref:k,style:{outline:"none",...t.style},onMouseDown:he(t.onMouseDown,()=>{D.current=!0}),onFocus:he(t.onFocus,K=>{const Q=!D.current;if(K.target===K.currentTarget&&Q&&!E){const ee=new CustomEvent(du,_C);if(K.currentTarget.dispatchEvent(ee),!ee.defaultPrevented){const ne=I().filter(se=>se.focusable),Z=ne.find(se=>se.active),de=ne.find(se=>se.id===C),ve=[Z,de,...ne].filter(Boolean).map(se=>se.ref.current);Vg(ve,x)}}D.current=!1}),onBlur:he(t.onBlur,()=>_(!1))})})}),Wg="RovingFocusGroupItem",Kg=m.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:o,focusable:i=!0,active:u=!1,tabStopId:d,children:p,...h}=t,g=zo(),v=d||g,x=IC(Wg,o),w=x.currentTabStopId===v,b=Ug(o),{onFocusableItemAdd:k,onFocusableItemRemove:j,currentTabStopId:C}=x;return m.useEffect(()=>{if(i)return k(),()=>j()},[i,k,j]),l.jsx(Uu.ItemSlot,{scope:o,id:v,focusable:i,active:u,children:l.jsx(je.span,{tabIndex:w?0:-1,"data-orientation":x.orientation,...h,ref:r,onMouseDown:he(t.onMouseDown,S=>{i?x.onItemFocus(v):S.preventDefault()}),onFocus:he(t.onFocus,()=>x.onItemFocus(v)),onKeyDown:he(t.onKeyDown,S=>{if(S.key==="Tab"&&S.shiftKey){x.onItemShiftTab();return}if(S.target!==S.currentTarget)return;const E=$C(S,x.orientation,x.dir);if(E!==void 0){if(S.metaKey||S.ctrlKey||S.altKey||S.shiftKey)return;S.preventDefault();let O=b().filter(I=>I.focusable).map(I=>I.ref.current);if(E==="last")O.reverse();else if(E==="prev"||E==="next"){E==="prev"&&O.reverse();const I=O.indexOf(S.currentTarget);O=x.loop?zC(O,I+1):O.slice(I+1)}setTimeout(()=>Vg(O))}}),children:typeof p=="function"?p({isCurrentTabStop:w,hasTabStop:C!=null}):p})})});Kg.displayName=Wg;var DC={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function FC(t,r){return r!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function $C(t,r,o){const i=FC(t.key,o);if(!(r==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(r==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return DC[i]}function Vg(t,r=!1){const o=document.activeElement;for(const i of t)if(i===o||(i.focus({preventScroll:r}),document.activeElement!==o))return}function zC(t,r){return t.map((o,i)=>t[(r+i)%t.length])}var UC=Bg,HC=Kg;function BC(t){const r=WC(t),o=m.forwardRef((i,u)=>{const{children:d,...p}=i,h=m.Children.toArray(d),g=h.find(VC);if(g){const v=g.props.children,x=h.map(w=>w===g?m.Children.count(v)>1?m.Children.only(null):m.isValidElement(v)?v.props.children:null:w);return l.jsx(r,{...p,ref:u,children:m.isValidElement(v)?m.cloneElement(v,void 0,x):null})}return l.jsx(r,{...p,ref:u,children:d})});return o.displayName=`${t}.Slot`,o}function WC(t){const r=m.forwardRef((o,i)=>{const{children:u,...d}=o;if(m.isValidElement(u)){const p=GC(u),h=QC(d,u.props);return u.type!==m.Fragment&&(h.ref=i?Ur(i,p):p),m.cloneElement(u,h)}return m.Children.count(u)>1?m.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var KC=Symbol("radix.slottable");function VC(t){return m.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===KC}function QC(t,r){const o={...r};for(const i in r){const u=t[i],d=r[i];/^on[A-Z]/.test(i)?u&&d?o[i]=(...h)=>{const g=d(...h);return u(...h),g}:u&&(o[i]=u):i==="style"?o[i]={...u,...d}:i==="className"&&(o[i]=[u,d].filter(Boolean).join(" "))}return{...t,...o}}function GC(t){let r=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?t.ref:(r=Object.getOwnPropertyDescriptor(t,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?t.props.ref:t.props.ref||t.ref)}var qC=function(t){if(typeof document>"u")return null;var r=Array.isArray(t)?t[0]:t;return r.ownerDocument.body},Or=new WeakMap,mi=new WeakMap,gi={},fu=0,Qg=function(t){return t&&(t.host||Qg(t.parentNode))},YC=function(t,r){return r.map(function(o){if(t.contains(o))return o;var i=Qg(o);return i&&t.contains(i)?i:(console.error("aria-hidden",o,"in not contained inside",t,". Doing nothing"),null)}).filter(function(o){return!!o})},XC=function(t,r,o,i){var u=YC(r,Array.isArray(t)?t:[t]);gi[o]||(gi[o]=new WeakMap);var d=gi[o],p=[],h=new Set,g=new Set(u),v=function(w){!w||h.has(w)||(h.add(w),v(w.parentNode))};u.forEach(v);var x=function(w){!w||g.has(w)||Array.prototype.forEach.call(w.children,function(b){if(h.has(b))x(b);else try{var k=b.getAttribute(i),j=k!==null&&k!=="false",C=(Or.get(b)||0)+1,S=(d.get(b)||0)+1;Or.set(b,C),d.set(b,S),p.push(b),C===1&&j&&mi.set(b,!0),S===1&&b.setAttribute(o,"true"),j||b.setAttribute(i,"true")}catch(E){console.error("aria-hidden: cannot operate on ",b,E)}})};return x(r),h.clear(),fu++,function(){p.forEach(function(w){var b=Or.get(w)-1,k=d.get(w)-1;Or.set(w,b),d.set(w,k),b||(mi.has(w)||w.removeAttribute(i),mi.delete(w)),k||w.removeAttribute(o)}),fu--,fu||(Or=new WeakMap,Or=new WeakMap,mi=new WeakMap,gi={})}},ZC=function(t,r,o){o===void 0&&(o="data-aria-hidden");var i=Array.from(Array.isArray(t)?t:[t]),u=qC(t);return u?(i.push.apply(i,Array.from(u.querySelectorAll("[aria-live], script"))),XC(i,u,o,"aria-hidden")):function(){return null}},Kt=function(){return Kt=Object.assign||function(r){for(var o,i=1,u=arguments.length;i<u;i++){o=arguments[i];for(var d in o)Object.prototype.hasOwnProperty.call(o,d)&&(r[d]=o[d])}return r},Kt.apply(this,arguments)};function Gg(t,r){var o={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&r.indexOf(i)<0&&(o[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var u=0,i=Object.getOwnPropertySymbols(t);u<i.length;u++)r.indexOf(i[u])<0&&Object.prototype.propertyIsEnumerable.call(t,i[u])&&(o[i[u]]=t[i[u]]);return o}function JC(t,r,o){if(o||arguments.length===2)for(var i=0,u=r.length,d;i<u;i++)(d||!(i in r))&&(d||(d=Array.prototype.slice.call(r,0,i)),d[i]=r[i]);return t.concat(d||Array.prototype.slice.call(r))}var Ci="right-scroll-bar-position",ki="width-before-scroll-bar",ek="with-scroll-bars-hidden",tk="--removed-body-scroll-bar-size";function pu(t,r){return typeof t=="function"?t(r):t&&(t.current=r),t}function nk(t,r){var o=m.useState(function(){return{value:t,callback:r,facade:{get current(){return o.value},set current(i){var u=o.value;u!==i&&(o.value=i,o.callback(i,u))}}}})[0];return o.callback=r,o.facade}var rk=typeof window<"u"?m.useLayoutEffect:m.useEffect,Ph=new WeakMap;function ok(t,r){var o=nk(null,function(i){return t.forEach(function(u){return pu(u,i)})});return rk(function(){var i=Ph.get(o);if(i){var u=new Set(i),d=new Set(t),p=o.current;u.forEach(function(h){d.has(h)||pu(h,null)}),d.forEach(function(h){u.has(h)||pu(h,p)})}Ph.set(o,t)},[t]),o}function sk(t){return t}function ik(t,r){r===void 0&&(r=sk);var o=[],i=!1,u={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:t},useMedium:function(d){var p=r(d,i);return o.push(p),function(){o=o.filter(function(h){return h!==p})}},assignSyncMedium:function(d){for(i=!0;o.length;){var p=o;o=[],p.forEach(d)}o={push:function(h){return d(h)},filter:function(){return o}}},assignMedium:function(d){i=!0;var p=[];if(o.length){var h=o;o=[],h.forEach(d),p=o}var g=function(){var x=p;p=[],x.forEach(d)},v=function(){return Promise.resolve().then(g)};v(),o={push:function(x){p.push(x),v()},filter:function(x){return p=p.filter(x),o}}}};return u}function ak(t){t===void 0&&(t={});var r=ik(null);return r.options=Kt({async:!0,ssr:!1},t),r}var qg=function(t){var r=t.sideCar,o=Gg(t,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=r.read();if(!i)throw new Error("Sidecar medium not found");return m.createElement(i,Kt({},o))};qg.isSideCarExport=!0;function lk(t,r){return t.useMedium(r),qg}var Yg=ak(),hu=function(){},Gi=m.forwardRef(function(t,r){var o=m.useRef(null),i=m.useState({onScrollCapture:hu,onWheelCapture:hu,onTouchMoveCapture:hu}),u=i[0],d=i[1],p=t.forwardProps,h=t.children,g=t.className,v=t.removeScrollBar,x=t.enabled,w=t.shards,b=t.sideCar,k=t.noRelative,j=t.noIsolation,C=t.inert,S=t.allowPinchZoom,E=t.as,_=E===void 0?"div":E,O=t.gapMode,I=Gg(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),D=b,A=ok([o,r]),$=Kt(Kt({},I),u);return m.createElement(m.Fragment,null,x&&m.createElement(D,{sideCar:Yg,removeScrollBar:v,shards:w,noRelative:k,noIsolation:j,inert:C,setCallbacks:d,allowPinchZoom:!!S,lockRef:o,gapMode:O}),p?m.cloneElement(m.Children.only(h),Kt(Kt({},$),{ref:A})):m.createElement(_,Kt({},$,{className:g,ref:A}),h))});Gi.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Gi.classNames={fullWidth:ki,zeroRight:Ci};var uk=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ck(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var r=uk();return r&&t.setAttribute("nonce",r),t}function dk(t,r){t.styleSheet?t.styleSheet.cssText=r:t.appendChild(document.createTextNode(r))}function fk(t){var r=document.head||document.getElementsByTagName("head")[0];r.appendChild(t)}var pk=function(){var t=0,r=null;return{add:function(o){t==0&&(r=ck())&&(dk(r,o),fk(r)),t++},remove:function(){t--,!t&&r&&(r.parentNode&&r.parentNode.removeChild(r),r=null)}}},hk=function(){var t=pk();return function(r,o){m.useEffect(function(){return t.add(r),function(){t.remove()}},[r&&o])}},Xg=function(){var t=hk(),r=function(o){var i=o.styles,u=o.dynamic;return t(i,u),null};return r},mk={left:0,top:0,right:0,gap:0},mu=function(t){return parseInt(t||"",10)||0},gk=function(t){var r=window.getComputedStyle(document.body),o=r[t==="padding"?"paddingLeft":"marginLeft"],i=r[t==="padding"?"paddingTop":"marginTop"],u=r[t==="padding"?"paddingRight":"marginRight"];return[mu(o),mu(i),mu(u)]},vk=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return mk;var r=gk(t),o=document.documentElement.clientWidth,i=window.innerWidth;return{left:r[0],top:r[1],right:r[2],gap:Math.max(0,i-o+r[2]-r[0])}},xk=Xg(),Dr="data-scroll-locked",yk=function(t,r,o,i){var u=t.left,d=t.top,p=t.right,h=t.gap;return o===void 0&&(o="margin"),`
|
|
9
|
+
.`.concat(ek,` {
|
|
10
|
+
overflow: hidden `).concat(i,`;
|
|
11
|
+
padding-right: `).concat(h,"px ").concat(i,`;
|
|
12
|
+
}
|
|
13
|
+
body[`).concat(Dr,`] {
|
|
14
|
+
overflow: hidden `).concat(i,`;
|
|
15
|
+
overscroll-behavior: contain;
|
|
16
|
+
`).concat([r&&"position: relative ".concat(i,";"),o==="margin"&&`
|
|
17
|
+
padding-left: `.concat(u,`px;
|
|
18
|
+
padding-top: `).concat(d,`px;
|
|
19
|
+
padding-right: `).concat(p,`px;
|
|
20
|
+
margin-left:0;
|
|
21
|
+
margin-top:0;
|
|
22
|
+
margin-right: `).concat(h,"px ").concat(i,`;
|
|
23
|
+
`),o==="padding"&&"padding-right: ".concat(h,"px ").concat(i,";")].filter(Boolean).join(""),`
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.`).concat(Ci,` {
|
|
27
|
+
right: `).concat(h,"px ").concat(i,`;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.`).concat(ki,` {
|
|
31
|
+
margin-right: `).concat(h,"px ").concat(i,`;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.`).concat(Ci," .").concat(Ci,` {
|
|
35
|
+
right: 0 `).concat(i,`;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.`).concat(ki," .").concat(ki,` {
|
|
39
|
+
margin-right: 0 `).concat(i,`;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
body[`).concat(Dr,`] {
|
|
43
|
+
`).concat(tk,": ").concat(h,`px;
|
|
44
|
+
}
|
|
45
|
+
`)},Th=function(){var t=parseInt(document.body.getAttribute(Dr)||"0",10);return isFinite(t)?t:0},wk=function(){m.useEffect(function(){return document.body.setAttribute(Dr,(Th()+1).toString()),function(){var t=Th()-1;t<=0?document.body.removeAttribute(Dr):document.body.setAttribute(Dr,t.toString())}},[])},bk=function(t){var r=t.noRelative,o=t.noImportant,i=t.gapMode,u=i===void 0?"margin":i;wk();var d=m.useMemo(function(){return vk(u)},[u]);return m.createElement(xk,{styles:yk(d,!r,u,o?"":"!important")})},Hu=!1;if(typeof window<"u")try{var vi=Object.defineProperty({},"passive",{get:function(){return Hu=!0,!0}});window.addEventListener("test",vi,vi),window.removeEventListener("test",vi,vi)}catch{Hu=!1}var Ar=Hu?{passive:!1}:!1,Sk=function(t){return t.tagName==="TEXTAREA"},Zg=function(t,r){if(!(t instanceof Element))return!1;var o=window.getComputedStyle(t);return o[r]!=="hidden"&&!(o.overflowY===o.overflowX&&!Sk(t)&&o[r]==="visible")},Ck=function(t){return Zg(t,"overflowY")},kk=function(t){return Zg(t,"overflowX")},_h=function(t,r){var o=r.ownerDocument,i=r;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var u=Jg(t,i);if(u){var d=ev(t,i),p=d[1],h=d[2];if(p>h)return!0}i=i.parentNode}while(i&&i!==o.body);return!1},Ek=function(t){var r=t.scrollTop,o=t.scrollHeight,i=t.clientHeight;return[r,o,i]},Nk=function(t){var r=t.scrollLeft,o=t.scrollWidth,i=t.clientWidth;return[r,o,i]},Jg=function(t,r){return t==="v"?Ck(r):kk(r)},ev=function(t,r){return t==="v"?Ek(r):Nk(r)},jk=function(t,r){return t==="h"&&r==="rtl"?-1:1},Rk=function(t,r,o,i,u){var d=jk(t,window.getComputedStyle(r).direction),p=d*i,h=o.target,g=r.contains(h),v=!1,x=p>0,w=0,b=0;do{if(!h)break;var k=ev(t,h),j=k[0],C=k[1],S=k[2],E=C-S-d*j;(j||E)&&Jg(t,h)&&(w+=E,b+=j);var _=h.parentNode;h=_&&_.nodeType===Node.DOCUMENT_FRAGMENT_NODE?_.host:_}while(!g&&h!==document.body||g&&(r.contains(h)||r===h));return(x&&Math.abs(w)<1||!x&&Math.abs(b)<1)&&(v=!0),v},xi=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Oh=function(t){return[t.deltaX,t.deltaY]},Ah=function(t){return t&&"current"in t?t.current:t},Pk=function(t,r){return t[0]===r[0]&&t[1]===r[1]},Tk=function(t){return`
|
|
46
|
+
.block-interactivity-`.concat(t,` {pointer-events: none;}
|
|
47
|
+
.allow-interactivity-`).concat(t,` {pointer-events: all;}
|
|
48
|
+
`)},_k=0,Mr=[];function Ok(t){var r=m.useRef([]),o=m.useRef([0,0]),i=m.useRef(),u=m.useState(_k++)[0],d=m.useState(Xg)[0],p=m.useRef(t);m.useEffect(function(){p.current=t},[t]),m.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(u));var C=JC([t.lockRef.current],(t.shards||[]).map(Ah),!0).filter(Boolean);return C.forEach(function(S){return S.classList.add("allow-interactivity-".concat(u))}),function(){document.body.classList.remove("block-interactivity-".concat(u)),C.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(u))})}}},[t.inert,t.lockRef.current,t.shards]);var h=m.useCallback(function(C,S){if("touches"in C&&C.touches.length===2||C.type==="wheel"&&C.ctrlKey)return!p.current.allowPinchZoom;var E=xi(C),_=o.current,O="deltaX"in C?C.deltaX:_[0]-E[0],I="deltaY"in C?C.deltaY:_[1]-E[1],D,A=C.target,$=Math.abs(O)>Math.abs(I)?"h":"v";if("touches"in C&&$==="h"&&A.type==="range")return!1;var K=window.getSelection(),Q=K&&K.anchorNode,ee=Q?Q===A||Q.contains(A):!1;if(ee)return!1;var ne=_h($,A);if(!ne)return!0;if(ne?D=$:(D=$==="v"?"h":"v",ne=_h($,A)),!ne)return!1;if(!i.current&&"changedTouches"in C&&(O||I)&&(i.current=D),!D)return!0;var Z=i.current||D;return Rk(Z,S,C,Z==="h"?O:I)},[]),g=m.useCallback(function(C){var S=C;if(!(!Mr.length||Mr[Mr.length-1]!==d)){var E="deltaY"in S?Oh(S):xi(S),_=r.current.filter(function(D){return D.name===S.type&&(D.target===S.target||S.target===D.shadowParent)&&Pk(D.delta,E)})[0];if(_&&_.should){S.cancelable&&S.preventDefault();return}if(!_){var O=(p.current.shards||[]).map(Ah).filter(Boolean).filter(function(D){return D.contains(S.target)}),I=O.length>0?h(S,O[0]):!p.current.noIsolation;I&&S.cancelable&&S.preventDefault()}}},[]),v=m.useCallback(function(C,S,E,_){var O={name:C,delta:S,target:E,should:_,shadowParent:Ak(E)};r.current.push(O),setTimeout(function(){r.current=r.current.filter(function(I){return I!==O})},1)},[]),x=m.useCallback(function(C){o.current=xi(C),i.current=void 0},[]),w=m.useCallback(function(C){v(C.type,Oh(C),C.target,h(C,t.lockRef.current))},[]),b=m.useCallback(function(C){v(C.type,xi(C),C.target,h(C,t.lockRef.current))},[]);m.useEffect(function(){return Mr.push(d),t.setCallbacks({onScrollCapture:w,onWheelCapture:w,onTouchMoveCapture:b}),document.addEventListener("wheel",g,Ar),document.addEventListener("touchmove",g,Ar),document.addEventListener("touchstart",x,Ar),function(){Mr=Mr.filter(function(C){return C!==d}),document.removeEventListener("wheel",g,Ar),document.removeEventListener("touchmove",g,Ar),document.removeEventListener("touchstart",x,Ar)}},[]);var k=t.removeScrollBar,j=t.inert;return m.createElement(m.Fragment,null,j?m.createElement(d,{styles:Tk(u)}):null,k?m.createElement(bk,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function Ak(t){for(var r=null;t!==null;)t instanceof ShadowRoot&&(r=t.host,t=t.host),t=t.parentNode;return r}const Mk=lk(Yg,Ok);var tv=m.forwardRef(function(t,r){return m.createElement(Gi,Kt({},t,{ref:r,sideCar:Mk}))});tv.classNames=Gi.classNames;var Bu=["Enter"," "],Ik=["ArrowDown","PageUp","Home"],nv=["ArrowUp","PageDown","End"],Lk=[...Ik,...nv],Dk={ltr:[...Bu,"ArrowRight"],rtl:[...Bu,"ArrowLeft"]},Fk={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Jo="Menu",[Bo,$k,zk]=nc(Jo),[rr,rv]=Dn(Jo,[zk,Bi,Hg]),qi=Bi(),ov=Hg(),[Uk,or]=rr(Jo),[Hk,es]=rr(Jo),sv=t=>{const{__scopeMenu:r,open:o=!1,children:i,dir:u,onOpenChange:d,modal:p=!0}=t,h=qi(r),[g,v]=m.useState(null),x=m.useRef(!1),w=yt(d),b=Fg(u);return m.useEffect(()=>{const k=()=>{x.current=!0,document.addEventListener("pointerdown",j,{capture:!0,once:!0}),document.addEventListener("pointermove",j,{capture:!0,once:!0})},j=()=>x.current=!1;return document.addEventListener("keydown",k,{capture:!0}),()=>{document.removeEventListener("keydown",k,{capture:!0}),document.removeEventListener("pointerdown",j,{capture:!0}),document.removeEventListener("pointermove",j,{capture:!0})}},[]),l.jsx(wg,{...h,children:l.jsx(Uk,{scope:r,open:o,onOpenChange:w,content:g,onContentChange:v,children:l.jsx(Hk,{scope:r,onClose:m.useCallback(()=>w(!1),[w]),isUsingKeyboardRef:x,dir:b,modal:p,children:i})})})};sv.displayName=Jo;var Bk="MenuAnchor",bc=m.forwardRef((t,r)=>{const{__scopeMenu:o,...i}=t,u=qi(o);return l.jsx(bg,{...u,...i,ref:r})});bc.displayName=Bk;var Sc="MenuPortal",[Wk,iv]=rr(Sc,{forceMount:void 0}),av=t=>{const{__scopeMenu:r,forceMount:o,children:i,container:u}=t,d=or(Sc,r);return l.jsx(Wk,{scope:r,forceMount:o,children:l.jsx(Fn,{present:o||d.open,children:l.jsx(oc,{asChild:!0,container:u,children:i})})})};av.displayName=Sc;var jt="MenuContent",[Kk,Cc]=rr(jt),lv=m.forwardRef((t,r)=>{const o=iv(jt,t.__scopeMenu),{forceMount:i=o.forceMount,...u}=t,d=or(jt,t.__scopeMenu),p=es(jt,t.__scopeMenu);return l.jsx(Bo.Provider,{scope:t.__scopeMenu,children:l.jsx(Fn,{present:i||d.open,children:l.jsx(Bo.Slot,{scope:t.__scopeMenu,children:p.modal?l.jsx(Vk,{...u,ref:r}):l.jsx(Qk,{...u,ref:r})})})})}),Vk=m.forwardRef((t,r)=>{const o=or(jt,t.__scopeMenu),i=m.useRef(null),u=He(r,i);return m.useEffect(()=>{const d=i.current;if(d)return ZC(d)},[]),l.jsx(kc,{...t,ref:u,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:he(t.onFocusOutside,d=>d.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})}),Qk=m.forwardRef((t,r)=>{const o=or(jt,t.__scopeMenu);return l.jsx(kc,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>o.onOpenChange(!1)})}),Gk=BC("MenuContent.ScrollLock"),kc=m.forwardRef((t,r)=>{const{__scopeMenu:o,loop:i=!1,trapFocus:u,onOpenAutoFocus:d,onCloseAutoFocus:p,disableOutsidePointerEvents:h,onEntryFocus:g,onEscapeKeyDown:v,onPointerDownOutside:x,onFocusOutside:w,onInteractOutside:b,onDismiss:k,disableOutsideScroll:j,...C}=t,S=or(jt,o),E=es(jt,o),_=qi(o),O=ov(o),I=$k(o),[D,A]=m.useState(null),$=m.useRef(null),K=He(r,$,S.onContentChange),Q=m.useRef(0),ee=m.useRef(""),ne=m.useRef(0),Z=m.useRef(null),de=m.useRef("right"),X=m.useRef(0),ve=j?tv:m.Fragment,se=j?{as:Gk,allowPinchZoom:!0}:void 0,le=H=>{const q=ee.current+H,P=I().filter(ce=>!ce.disabled),B=document.activeElement,ue=P.find(ce=>ce.ref.current===B)?.textValue,me=P.map(ce=>ce.textValue),z=iE(me,q,ue),ae=P.find(ce=>ce.textValue===z)?.ref.current;(function ce(be){ee.current=be,window.clearTimeout(Q.current),be!==""&&(Q.current=window.setTimeout(()=>ce(""),1e3))})(q),ae&&setTimeout(()=>ae.focus())};m.useEffect(()=>()=>window.clearTimeout(Q.current),[]),CC();const U=m.useCallback(H=>de.current===Z.current?.side&&lE(H,Z.current?.area),[]);return l.jsx(Kk,{scope:o,searchRef:ee,onItemEnter:m.useCallback(H=>{U(H)&&H.preventDefault()},[U]),onItemLeave:m.useCallback(H=>{U(H)||($.current?.focus(),A(null))},[U]),onTriggerLeave:m.useCallback(H=>{U(H)&&H.preventDefault()},[U]),pointerGraceTimerRef:ne,onPointerGraceIntentChange:m.useCallback(H=>{Z.current=H},[]),children:l.jsx(ve,{...se,children:l.jsx($g,{asChild:!0,trapped:u,onMountAutoFocus:he(d,H=>{H.preventDefault(),$.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:p,children:l.jsx(Li,{asChild:!0,disableOutsidePointerEvents:h,onEscapeKeyDown:v,onPointerDownOutside:x,onFocusOutside:w,onInteractOutside:b,onDismiss:k,children:l.jsx(UC,{asChild:!0,...O,dir:E.dir,orientation:"vertical",loop:i,currentTabStopId:D,onCurrentTabStopIdChange:A,onEntryFocus:he(g,H=>{E.isUsingKeyboardRef.current||H.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(Sg,{role:"menu","aria-orientation":"vertical","data-state":kv(S.open),"data-radix-menu-content":"",dir:E.dir,..._,...C,ref:K,style:{outline:"none",...C.style},onKeyDown:he(C.onKeyDown,H=>{const P=H.target.closest("[data-radix-menu-content]")===H.currentTarget,B=H.ctrlKey||H.altKey||H.metaKey,ue=H.key.length===1;P&&(H.key==="Tab"&&H.preventDefault(),!B&&ue&&le(H.key));const me=$.current;if(H.target!==me||!Lk.includes(H.key))return;H.preventDefault();const ae=I().filter(ce=>!ce.disabled).map(ce=>ce.ref.current);nv.includes(H.key)&&ae.reverse(),oE(ae)}),onBlur:he(t.onBlur,H=>{H.currentTarget.contains(H.target)||(window.clearTimeout(Q.current),ee.current="")}),onPointerMove:he(t.onPointerMove,Wo(H=>{const q=H.target,P=X.current!==H.clientX;if(H.currentTarget.contains(q)&&P){const B=H.clientX>X.current?"right":"left";de.current=B,X.current=H.clientX}}))})})})})})})});lv.displayName=jt;var qk="MenuGroup",Ec=m.forwardRef((t,r)=>{const{__scopeMenu:o,...i}=t;return l.jsx(je.div,{role:"group",...i,ref:r})});Ec.displayName=qk;var Yk="MenuLabel",uv=m.forwardRef((t,r)=>{const{__scopeMenu:o,...i}=t;return l.jsx(je.div,{...i,ref:r})});uv.displayName=Yk;var _i="MenuItem",Mh="menu.itemSelect",Yi=m.forwardRef((t,r)=>{const{disabled:o=!1,onSelect:i,...u}=t,d=m.useRef(null),p=es(_i,t.__scopeMenu),h=Cc(_i,t.__scopeMenu),g=He(r,d),v=m.useRef(!1),x=()=>{const w=d.current;if(!o&&w){const b=new CustomEvent(Mh,{bubbles:!0,cancelable:!0});w.addEventListener(Mh,k=>i?.(k),{once:!0}),rc(w,b),b.defaultPrevented?v.current=!1:p.onClose()}};return l.jsx(cv,{...u,ref:g,disabled:o,onClick:he(t.onClick,x),onPointerDown:w=>{t.onPointerDown?.(w),v.current=!0},onPointerUp:he(t.onPointerUp,w=>{v.current||w.currentTarget?.click()}),onKeyDown:he(t.onKeyDown,w=>{const b=h.searchRef.current!=="";o||b&&w.key===" "||Bu.includes(w.key)&&(w.currentTarget.click(),w.preventDefault())})})});Yi.displayName=_i;var cv=m.forwardRef((t,r)=>{const{__scopeMenu:o,disabled:i=!1,textValue:u,...d}=t,p=Cc(_i,o),h=ov(o),g=m.useRef(null),v=He(r,g),[x,w]=m.useState(!1),[b,k]=m.useState("");return m.useEffect(()=>{const j=g.current;j&&k((j.textContent??"").trim())},[d.children]),l.jsx(Bo.ItemSlot,{scope:o,disabled:i,textValue:u??b,children:l.jsx(HC,{asChild:!0,...h,focusable:!i,children:l.jsx(je.div,{role:"menuitem","data-highlighted":x?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...d,ref:v,onPointerMove:he(t.onPointerMove,Wo(j=>{i?p.onItemLeave(j):(p.onItemEnter(j),j.defaultPrevented||j.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:he(t.onPointerLeave,Wo(j=>p.onItemLeave(j))),onFocus:he(t.onFocus,()=>w(!0)),onBlur:he(t.onBlur,()=>w(!1))})})})}),Xk="MenuCheckboxItem",dv=m.forwardRef((t,r)=>{const{checked:o=!1,onCheckedChange:i,...u}=t;return l.jsx(gv,{scope:t.__scopeMenu,checked:o,children:l.jsx(Yi,{role:"menuitemcheckbox","aria-checked":Oi(o)?"mixed":o,...u,ref:r,"data-state":jc(o),onSelect:he(u.onSelect,()=>i?.(Oi(o)?!0:!o),{checkForDefaultPrevented:!1})})})});dv.displayName=Xk;var fv="MenuRadioGroup",[Zk,Jk]=rr(fv,{value:void 0,onValueChange:()=>{}}),pv=m.forwardRef((t,r)=>{const{value:o,onValueChange:i,...u}=t,d=yt(i);return l.jsx(Zk,{scope:t.__scopeMenu,value:o,onValueChange:d,children:l.jsx(Ec,{...u,ref:r})})});pv.displayName=fv;var hv="MenuRadioItem",mv=m.forwardRef((t,r)=>{const{value:o,...i}=t,u=Jk(hv,t.__scopeMenu),d=o===u.value;return l.jsx(gv,{scope:t.__scopeMenu,checked:d,children:l.jsx(Yi,{role:"menuitemradio","aria-checked":d,...i,ref:r,"data-state":jc(d),onSelect:he(i.onSelect,()=>u.onValueChange?.(o),{checkForDefaultPrevented:!1})})})});mv.displayName=hv;var Nc="MenuItemIndicator",[gv,eE]=rr(Nc,{checked:!1}),vv=m.forwardRef((t,r)=>{const{__scopeMenu:o,forceMount:i,...u}=t,d=eE(Nc,o);return l.jsx(Fn,{present:i||Oi(d.checked)||d.checked===!0,children:l.jsx(je.span,{...u,ref:r,"data-state":jc(d.checked)})})});vv.displayName=Nc;var tE="MenuSeparator",xv=m.forwardRef((t,r)=>{const{__scopeMenu:o,...i}=t;return l.jsx(je.div,{role:"separator","aria-orientation":"horizontal",...i,ref:r})});xv.displayName=tE;var nE="MenuArrow",yv=m.forwardRef((t,r)=>{const{__scopeMenu:o,...i}=t,u=qi(o);return l.jsx(Cg,{...u,...i,ref:r})});yv.displayName=nE;var rE="MenuSub",[Cj,wv]=rr(rE),Do="MenuSubTrigger",bv=m.forwardRef((t,r)=>{const o=or(Do,t.__scopeMenu),i=es(Do,t.__scopeMenu),u=wv(Do,t.__scopeMenu),d=Cc(Do,t.__scopeMenu),p=m.useRef(null),{pointerGraceTimerRef:h,onPointerGraceIntentChange:g}=d,v={__scopeMenu:t.__scopeMenu},x=m.useCallback(()=>{p.current&&window.clearTimeout(p.current),p.current=null},[]);return m.useEffect(()=>x,[x]),m.useEffect(()=>{const w=h.current;return()=>{window.clearTimeout(w),g(null)}},[h,g]),l.jsx(bc,{asChild:!0,...v,children:l.jsx(cv,{id:u.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":u.contentId,"data-state":kv(o.open),...t,ref:Ur(r,u.onTriggerChange),onClick:w=>{t.onClick?.(w),!(t.disabled||w.defaultPrevented)&&(w.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:he(t.onPointerMove,Wo(w=>{d.onItemEnter(w),!w.defaultPrevented&&!t.disabled&&!o.open&&!p.current&&(d.onPointerGraceIntentChange(null),p.current=window.setTimeout(()=>{o.onOpenChange(!0),x()},100))})),onPointerLeave:he(t.onPointerLeave,Wo(w=>{x();const b=o.content?.getBoundingClientRect();if(b){const k=o.content?.dataset.side,j=k==="right",C=j?-5:5,S=b[j?"left":"right"],E=b[j?"right":"left"];d.onPointerGraceIntentChange({area:[{x:w.clientX+C,y:w.clientY},{x:S,y:b.top},{x:E,y:b.top},{x:E,y:b.bottom},{x:S,y:b.bottom}],side:k}),window.clearTimeout(h.current),h.current=window.setTimeout(()=>d.onPointerGraceIntentChange(null),300)}else{if(d.onTriggerLeave(w),w.defaultPrevented)return;d.onPointerGraceIntentChange(null)}})),onKeyDown:he(t.onKeyDown,w=>{const b=d.searchRef.current!=="";t.disabled||b&&w.key===" "||Dk[i.dir].includes(w.key)&&(o.onOpenChange(!0),o.content?.focus(),w.preventDefault())})})})});bv.displayName=Do;var Sv="MenuSubContent",Cv=m.forwardRef((t,r)=>{const o=iv(jt,t.__scopeMenu),{forceMount:i=o.forceMount,...u}=t,d=or(jt,t.__scopeMenu),p=es(jt,t.__scopeMenu),h=wv(Sv,t.__scopeMenu),g=m.useRef(null),v=He(r,g);return l.jsx(Bo.Provider,{scope:t.__scopeMenu,children:l.jsx(Fn,{present:i||d.open,children:l.jsx(Bo.Slot,{scope:t.__scopeMenu,children:l.jsx(kc,{id:h.contentId,"aria-labelledby":h.triggerId,...u,ref:v,align:"start",side:p.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:x=>{p.isUsingKeyboardRef.current&&g.current?.focus(),x.preventDefault()},onCloseAutoFocus:x=>x.preventDefault(),onFocusOutside:he(t.onFocusOutside,x=>{x.target!==h.trigger&&d.onOpenChange(!1)}),onEscapeKeyDown:he(t.onEscapeKeyDown,x=>{p.onClose(),x.preventDefault()}),onKeyDown:he(t.onKeyDown,x=>{const w=x.currentTarget.contains(x.target),b=Fk[p.dir].includes(x.key);w&&b&&(d.onOpenChange(!1),h.trigger?.focus(),x.preventDefault())})})})})})});Cv.displayName=Sv;function kv(t){return t?"open":"closed"}function Oi(t){return t==="indeterminate"}function jc(t){return Oi(t)?"indeterminate":t?"checked":"unchecked"}function oE(t){const r=document.activeElement;for(const o of t)if(o===r||(o.focus(),document.activeElement!==r))return}function sE(t,r){return t.map((o,i)=>t[(r+i)%t.length])}function iE(t,r,o){const u=r.length>1&&Array.from(r).every(v=>v===r[0])?r[0]:r,d=o?t.indexOf(o):-1;let p=sE(t,Math.max(d,0));u.length===1&&(p=p.filter(v=>v!==o));const g=p.find(v=>v.toLowerCase().startsWith(u.toLowerCase()));return g!==o?g:void 0}function aE(t,r){const{x:o,y:i}=t;let u=!1;for(let d=0,p=r.length-1;d<r.length;p=d++){const h=r[d],g=r[p],v=h.x,x=h.y,w=g.x,b=g.y;x>i!=b>i&&o<(w-v)*(i-x)/(b-x)+v&&(u=!u)}return u}function lE(t,r){if(!r)return!1;const o={x:t.clientX,y:t.clientY};return aE(o,r)}function Wo(t){return r=>r.pointerType==="mouse"?t(r):void 0}var uE=sv,cE=bc,dE=av,fE=lv,pE=Ec,hE=uv,mE=Yi,gE=dv,vE=pv,xE=mv,yE=vv,wE=xv,bE=yv,SE=bv,CE=Cv,Xi="DropdownMenu",[kE]=Dn(Xi,[rv]),st=rv(),[EE,Ev]=kE(Xi),Nv=t=>{const{__scopeDropdownMenu:r,children:o,dir:i,open:u,defaultOpen:d,onOpenChange:p,modal:h=!0}=t,g=st(r),v=m.useRef(null),[x,w]=Go({prop:u,defaultProp:d??!1,onChange:p,caller:Xi});return l.jsx(EE,{scope:r,triggerId:zo(),triggerRef:v,contentId:zo(),open:x,onOpenChange:w,onOpenToggle:m.useCallback(()=>w(b=>!b),[w]),modal:h,children:l.jsx(uE,{...g,open:x,onOpenChange:w,dir:i,modal:h,children:o})})};Nv.displayName=Xi;var jv="DropdownMenuTrigger",Rv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:o,disabled:i=!1,...u}=t,d=Ev(jv,o),p=st(o);return l.jsx(cE,{asChild:!0,...p,children:l.jsx(je.button,{type:"button",id:d.triggerId,"aria-haspopup":"menu","aria-expanded":d.open,"aria-controls":d.open?d.contentId:void 0,"data-state":d.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...u,ref:Ur(r,d.triggerRef),onPointerDown:he(t.onPointerDown,h=>{!i&&h.button===0&&h.ctrlKey===!1&&(d.onOpenToggle(),d.open||h.preventDefault())}),onKeyDown:he(t.onKeyDown,h=>{i||(["Enter"," "].includes(h.key)&&d.onOpenToggle(),h.key==="ArrowDown"&&d.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(h.key)&&h.preventDefault())})})})});Rv.displayName=jv;var NE="DropdownMenuPortal",Pv=t=>{const{__scopeDropdownMenu:r,...o}=t,i=st(r);return l.jsx(dE,{...i,...o})};Pv.displayName=NE;var Tv="DropdownMenuContent",_v=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:o,...i}=t,u=Ev(Tv,o),d=st(o),p=m.useRef(!1);return l.jsx(fE,{id:u.contentId,"aria-labelledby":u.triggerId,...d,...i,ref:r,onCloseAutoFocus:he(t.onCloseAutoFocus,h=>{p.current||u.triggerRef.current?.focus(),p.current=!1,h.preventDefault()}),onInteractOutside:he(t.onInteractOutside,h=>{const g=h.detail.originalEvent,v=g.button===0&&g.ctrlKey===!0,x=g.button===2||v;(!u.modal||x)&&(p.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});_v.displayName=Tv;var jE="DropdownMenuGroup",RE=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:o,...i}=t,u=st(o);return l.jsx(pE,{...u,...i,ref:r})});RE.displayName=jE;var PE="DropdownMenuLabel",Ov=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:o,...i}=t,u=st(o);return l.jsx(hE,{...u,...i,ref:r})});Ov.displayName=PE;var TE="DropdownMenuItem",Av=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:o,...i}=t,u=st(o);return l.jsx(mE,{...u,...i,ref:r})});Av.displayName=TE;var _E="DropdownMenuCheckboxItem",Mv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:o,...i}=t,u=st(o);return l.jsx(gE,{...u,...i,ref:r})});Mv.displayName=_E;var OE="DropdownMenuRadioGroup",AE=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:o,...i}=t,u=st(o);return l.jsx(vE,{...u,...i,ref:r})});AE.displayName=OE;var ME="DropdownMenuRadioItem",Iv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:o,...i}=t,u=st(o);return l.jsx(xE,{...u,...i,ref:r})});Iv.displayName=ME;var IE="DropdownMenuItemIndicator",Lv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:o,...i}=t,u=st(o);return l.jsx(yE,{...u,...i,ref:r})});Lv.displayName=IE;var LE="DropdownMenuSeparator",Dv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:o,...i}=t,u=st(o);return l.jsx(wE,{...u,...i,ref:r})});Dv.displayName=LE;var DE="DropdownMenuArrow",FE=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:o,...i}=t,u=st(o);return l.jsx(bE,{...u,...i,ref:r})});FE.displayName=DE;var $E="DropdownMenuSubTrigger",Fv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:o,...i}=t,u=st(o);return l.jsx(SE,{...u,...i,ref:r})});Fv.displayName=$E;var zE="DropdownMenuSubContent",$v=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:o,...i}=t,u=st(o);return l.jsx(CE,{...u,...i,ref:r,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});$v.displayName=zE;var UE=Nv,HE=Rv,BE=Pv,zv=_v,Uv=Ov,Hv=Av,Bv=Mv,Wv=Iv,Kv=Lv,Vv=Dv,Qv=Fv,Gv=$v;const WE=UE,KE=HE,VE=m.forwardRef(({className:t,inset:r,children:o,...i},u)=>l.jsxs(Qv,{ref:u,className:De("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",r&&"pl-8",t),...i,children:[o,l.jsx($0,{className:"ml-auto"})]}));VE.displayName=Qv.displayName;const QE=m.forwardRef(({className:t,...r},o)=>l.jsx(Gv,{ref:o,className:De("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",t),...r}));QE.displayName=Gv.displayName;const qv=m.forwardRef(({className:t,sideOffset:r=4,...o},i)=>l.jsx(BE,{children:l.jsx(zv,{ref:i,sideOffset:r,className:De("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",t),...o})}));qv.displayName=zv.displayName;const GE=m.forwardRef(({className:t,inset:r,...o},i)=>l.jsx(Hv,{ref:i,className:De("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",r&&"pl-8",t),...o}));GE.displayName=Hv.displayName;const qE=m.forwardRef(({className:t,children:r,checked:o,...i},u)=>l.jsxs(Bv,{ref:u,className:De("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:o,...i,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(Kv,{children:l.jsx(F0,{className:"h-4 w-4"})})}),r]}));qE.displayName=Bv.displayName;const YE=m.forwardRef(({className:t,children:r,...o},i)=>l.jsxs(Wv,{ref:i,className:De("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...o,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(Kv,{children:l.jsx(U0,{className:"h-2 w-2 fill-current"})})}),r]}));YE.displayName=Wv.displayName;const XE=m.forwardRef(({className:t,inset:r,...o},i)=>l.jsx(Uv,{ref:i,className:De("px-2 py-1.5 text-sm font-semibold",r&&"pl-8",t),...o}));XE.displayName=Uv.displayName;const ZE=m.forwardRef(({className:t,...r},o)=>l.jsx(Vv,{ref:o,className:De("-mx-1 my-1 h-px bg-muted",t),...r}));ZE.displayName=Vv.displayName;function JE(t){return t.replace("_"," ").toUpperCase()}function eN(t){return t==="in_progress"?"border-foreground text-foreground animate-pulse":t==="failed"?"border-destructive text-destructive":t==="warning"?"border-warning-border bg-warning-muted text-warning-foreground":t==="resolved"?"border-foreground/20 text-muted-foreground":t==="rejected"?"border-foreground/20 text-muted-foreground line-through":t==="flagged"?"border-foreground/40 text-foreground/60":t==="queued"?"border-foreground text-foreground":"border-foreground/30 text-foreground/60"}function Yv(t){return t==="resolved"||t==="rejected"}function tN(t){return Yv(t)||t==="warning"}function Xv(t){return t.length===0?!1:t.every(r=>Yv(r.status))}function Ko(t){return t.reduce((r,o)=>(o.status==="queued"?r.queued+=1:o.status==="in_progress"?r.inProgress+=1:o.status==="failed"?r.failed+=1:o.status==="warning"&&(r.warning+=1),r),{queued:0,inProgress:0,failed:0,warning:0})}const nN={idle:"IDLE",triaging:"TRIAGING",awaiting_repair_slot:"REPAIR QUEUED",repairing:"REPAIRING",awaiting_ci:"WAITING FOR CI",verifying:"VERIFYING",healed:"HEALED",cooldown:"COOLDOWN",blocked:"BLOCKED",escalated:"ESCALATED",superseded:"SUPERSEDED"},rN={idle:[],triaging:["cancel"],awaiting_repair_slot:["pause","cancel"],repairing:["pause","cancel"],awaiting_ci:["pause","cancel"],verifying:["cancel"],healed:[],cooldown:["resume","cancel"],blocked:["retry"],escalated:["retry"],superseded:[]},oN={idle:"neutral",triaging:"info",awaiting_repair_slot:"warning",repairing:"info",awaiting_ci:"info",verifying:"info",healed:"success",cooldown:"warning",blocked:"danger",escalated:"danger",superseded:"neutral"},sN={idle:"Waiting for a new failing check on the current PR head.",triaging:"Classifying the current failure set before deciding whether it is safe to repair.",awaiting_repair_slot:"Ready for the next bounded repair attempt as soon as a slot is free.",repairing:"A repair agent is actively working in an isolated worktree.",awaiting_ci:"A repair was pushed and the new head SHA is waiting for CI to settle.",verifying:"Comparing the latest check results against the previous failure fingerprint.",healed:"The latest repair cycle converged to green and the session is complete.",cooldown:"Cooling down before another retry is allowed.",blocked:"Stopped because the failure looks external or unsafe to repair in-branch.",escalated:"Stopped because retries were exhausted or the failure did not improve.",superseded:"Replaced after the PR head moved to a newer commit."};function iN(t){return nN[t]}function aN(t){return rN[t]}function Ih(t){return t==="pause"?"Pause":t==="resume"?"Resume":t==="retry"?"Retry":"Cancel"}function lN(t){return oN[t]}function uN(t){return sN[t]}function cN(t){const r=t.attemptCount,o=r===1?"":"s";return r===0?t.state==="triaging"?"Preparing attempt 1":t.state==="awaiting_repair_slot"?"Queued for attempt 1":t.state==="healed"?"Healed without a repair attempt":"No repair attempts yet":t.state==="repairing"?`Attempt ${r} running`:t.state==="awaiting_ci"?`Attempt ${r} pushed, waiting on CI`:t.state==="verifying"?`Attempt ${r} verifying`:t.state==="healed"?`Healed after ${r} attempt${o}`:t.state==="blocked"?`${r} attempt${o} before blocking`:t.state==="escalated"?`${r} attempt${o} before escalation`:t.state==="cooldown"?`${r} attempt${o}, cooling down`:t.state==="superseded"?`${r} attempt${o}, superseded`:`${r} attempt${o} recorded`}function dN(t){return t?t.blockedReason??t.escalationReason??t.latestFingerprint??null:null}function fN(t,r){const o=t.filter(i=>i.prId===r);return o.length===0?null:o.reduce((i,u)=>u.updatedAt>i.updatedAt?u:i)}function pN(t,r){return fN(t,r)}function hN(t,r){return{stateLabel:iN(t.state),tone:lN(t.state),attemptSummary:cN(t),reasonSummary:dN(t),statusHint:uN(t.state),actions:aN(t.state).map(o=>({label:Ih(o),available:!0,hint:`${Ih(o)} controls are planned but not wired to the backend yet.`}))}}function Lt(t){return t?new Date(t).toLocaleTimeString("en-US",{hour12:!1}):null}function Zv(t){return t.watchEnabled}function Jv(t){return t==="processing"?"autonomous run active":t==="done"?"completed":t==="error"?"attention needed":t==="archived"?"archived":"watching"}function mN(t){return`${Math.max(1,Math.round((t??12e4)/1e3))}s`}function Lh(t,r){return t.reduce((o,i)=>i.targetId!==r?o:!o||Date.parse(i.updatedAt)>Date.parse(o.updatedAt)?i:o,void 0)}function Dh(t){return t.feedbackItems.find(o=>(o.status==="failed"||o.status==="warning")&&!!o.statusReason)?.statusReason??null}const gN=[{value:"mine",label:"My PRs only"},{value:"team",label:"My PRs + teammates"}],vN={failed:[],inProgress:[],queued:[],warnings:[],generatedAt:""},gu=200,Fh="oh-my-pr:tracked-repos-open",Ai="Paused",Vo="Paused by drain mode",xN="Manual runs are blocked while global automation is paused.",yN="Background and manual runs are paused by drain mode.",wN="Ask Agent is paused by drain mode.",bN="Queued automation is paused until drain mode is disabled.";function SN(t){return t===!1?"team":"mine"}const $h={neutral:"border-border text-muted-foreground",info:"border-foreground text-foreground",warning:"border-warning-border bg-warning-muted text-warning-foreground",success:"border-success-border bg-success-muted text-success-foreground",danger:"border-destructive text-destructive"};function ex({status:t}){const r=t==="watching"?"bg-foreground/30":t==="processing"?"bg-foreground animate-pulse":t==="done"?"bg-foreground":t==="archived"?"bg-foreground/15":"bg-destructive";return l.jsx("span",{className:`inline-block h-1.5 w-1.5 shrink-0 ${r}`})}function CN({status:t}){const r=eN(t);return l.jsx("span",{className:`inline-block border px-1.5 py-0 text-[11px] uppercase tracking-wide ${r}`,children:JE(t)})}function Wu(){return l.jsx("span",{className:"border border-border px-1.5 py-0 text-[10px] uppercase tracking-wider text-muted-foreground",children:"watch paused"})}function zh({value:t,onChange:r,disabled:o,name:i,testIdPrefix:u,compact:d=!1}){return l.jsx("div",{role:"radiogroup","aria-label":"Automatic PR tracking scope",className:`flex flex-wrap gap-1 ${d?"":"mt-1"}`,children:gN.map(p=>{const h=t===p.value;return l.jsxs("label",{"data-testid":`${u}-${p.value}`,className:`cursor-pointer border px-2 text-[10px] transition-colors focus-within:ring-1 focus-within:ring-ring focus-within:ring-offset-1 focus-within:ring-offset-background ${d?"py-0.5":"py-1"} ${h?"border-foreground bg-muted text-foreground":"border-border text-muted-foreground hover:text-foreground"} ${o?"cursor-not-allowed opacity-50":""} whitespace-nowrap`,children:[l.jsx("input",{type:"radio",name:i,value:p.value,checked:h,onChange:()=>r(p.value),disabled:o,className:"sr-only"}),p.label]},p.value)})})}function kN({activity:t}){const r=t.status==="failed"?Lt(t.updatedAt):t.status==="in_progress"?Lt(t.startedAt)??Lt(t.updatedAt):Lt(t.availableAt)??Lt(t.queuedAt),o=l.jsxs("div",{className:"flex min-w-0 items-start gap-2 px-2 py-1.5 text-left",children:[l.jsx("span",{className:`mt-1.5 h-1.5 w-1.5 shrink-0 ${t.status==="failed"?"bg-destructive":t.status==="in_progress"?"animate-pulse bg-foreground":"bg-muted-foreground"}`}),l.jsxs("span",{className:"min-w-0 flex-1",children:[l.jsx("span",{className:"block truncate text-[12px] leading-4 text-foreground",children:t.label}),t.detail&&l.jsx("span",{className:"block truncate text-[11px] leading-4 text-muted-foreground",children:t.detail}),t.status==="failed"&&t.lastError&&l.jsx("span",{className:"block whitespace-pre-wrap break-words text-[11px] leading-4 text-destructive",title:t.lastError,children:t.lastError})]}),r&&l.jsx("span",{className:"shrink-0 text-[10px] leading-4 text-muted-foreground",children:r})]});return t.targetUrl?l.jsx("a",{href:t.targetUrl,target:"_blank",rel:"noopener noreferrer",className:"block outline-none hover:bg-muted focus:bg-muted focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:o}):l.jsx("div",{children:o})}function vu({title:t,items:r,emptyLabel:o}){return l.jsxs("div",{className:"py-1",children:[l.jsx("div",{className:"px-2 py-1 text-[10px] uppercase tracking-wider text-muted-foreground",children:t}),r.length>0?l.jsx("div",{className:"max-h-52 overflow-y-auto",children:r.map(i=>l.jsx(kN,{activity:i},i.id))}):l.jsx("div",{className:"px-2 pb-2 text-[11px] text-muted-foreground",children:o})]})}function EN({activities:t,onClearFailed:r,isClearingFailed:o,globalDrainMode:i}){const u=t.failed.length,d=t.inProgress.length,p=t.queued.length,h=u+d+p;return l.jsxs(WE,{children:[l.jsxs(KE,{className:"inline-flex items-center gap-1 border border-border px-2 py-0.5 text-[11px] text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background","aria-label":"Open activity menu","data-testid":"activity-menu-trigger",children:[l.jsx(D0,{className:"h-3 w-3","aria-hidden":"true"}),l.jsx("span",{children:"activity"}),l.jsx("span",{className:"text-foreground",children:h})]}),l.jsxs(qv,{align:"end",className:"w-80 p-0",children:[l.jsxs("div",{className:"border-b border-border px-2 py-2",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsx("div",{className:"text-[12px] font-medium",children:"Activities"}),u>0&&l.jsx("button",{type:"button",onClick:r,disabled:o,className:"border border-border px-1.5 py-0.5 text-[10px] uppercase tracking-wider text-muted-foreground hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring","data-testid":"clear-failed-activities",children:o?"clearing":"clear failed"})]}),l.jsxs("div",{className:"text-[11px] text-muted-foreground",children:[u," failed / ",d," in progress / ",p," queued"]})]}),l.jsx(vu,{title:"Failed",items:t.failed,emptyLabel:"No failed activities."}),l.jsx("div",{className:"border-t border-border"}),l.jsx(vu,{title:"In progress",items:t.inProgress,emptyLabel:"No activities running right now."}),l.jsx("div",{className:"border-t border-border"}),l.jsx(vu,{title:"Queued",items:t.queued,emptyLabel:"Queue is empty."}),i&&p>0&&l.jsx("div",{className:"border-t border-border px-2 py-2 text-[11px] text-muted-foreground","data-testid":"activity-drain-note",children:bN})]})]})}function NN({runtimeState:t}){return t?.drainMode?l.jsx("div",{className:"shrink-0 border-b border-destructive/40 bg-destructive/10 px-4 py-2 text-[12px]","data-testid":"dashboard-drain-banner",children:l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"text-[10px] font-medium uppercase tracking-wider text-destructive",children:Vo}),t.drainReason?l.jsx("div",{className:"mt-1 break-words text-foreground/80","data-testid":"dashboard-drain-reason",children:t.drainReason}):null,l.jsx("div",{className:"mt-1 text-[11px] text-muted-foreground",children:xN})]}),l.jsx(Dt,{href:"/settings",className:"shrink-0 border border-destructive/50 px-2 py-0.5 text-[10px] uppercase tracking-wider text-destructive transition-colors hover:bg-destructive hover:text-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"Settings"})]})}):null}function jN({warnings:t}){return t.length===0?null:l.jsx("div",{className:"shrink-0 border-b border-yellow-600/50 bg-yellow-500/10 px-4 py-3","data-testid":"operator-warnings-banner",children:l.jsx("div",{className:"space-y-3",children:t.map(r=>l.jsxs("div",{"data-testid":`operator-warning-${r.id}`,children:[l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[l.jsx("div",{className:"text-[12px] font-medium uppercase tracking-wider text-yellow-600",children:r.title}),r.targetUrl&&l.jsx("a",{href:r.targetUrl,target:"_blank",rel:"noopener noreferrer",className:"border border-yellow-600/60 px-2 py-0.5 text-[10px] uppercase tracking-wider text-yellow-600 transition-colors hover:bg-yellow-600 hover:text-background",children:"Open PR"})]}),l.jsx("div",{className:"mt-1 text-[12px] text-foreground/80",children:r.message}),l.jsx("ol",{className:"mt-2 list-decimal space-y-1 pl-4 text-[11px] text-muted-foreground",children:r.fixSteps.map(o=>l.jsx("li",{children:o},o))})]},r.id))})})}function tx({href:t,testId:r,label:o,hint:i,className:u,dotClassName:d,hintClassName:p,onClick:h}){return l.jsxs("a",{href:t,target:"_blank",rel:"noopener noreferrer",onClick:h,"data-testid":r,className:`inline-flex items-center border border-success-border bg-success-muted font-medium uppercase text-success-foreground transition-colors hover:bg-success-muted/80 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background ${u}`,children:[l.jsx("span",{className:`inline-block rounded-full bg-success ${d}`}),o,i&&l.jsx("span",{className:p,children:i})]})}function nx({pr:t}){const r=Ko(t.feedbackItems).inProgress;if(!(t.status==="processing")&&r===0)return null;const i=r>0?`${r} agent${r!==1?"s":""} running on this PR`:"Agent run active on this PR";return l.jsxs(lC,{children:[l.jsx(uC,{asChild:!0,children:l.jsxs("span",{className:"inline-flex shrink-0 cursor-default items-center gap-0.5 text-[12px]","data-testid":`agent-indicator-${t.id}`,children:[l.jsx("span",{className:"animate-pulse",children:"🤖"}),r>0&&l.jsx("span",{className:"text-[10px] text-muted-foreground",children:r})]})}),l.jsx(Og,{side:"top",children:l.jsx("p",{className:"text-xs",children:i})})]})}const RN=m.memo(function({pr:r,isSelected:o,onSelect:i,failureMessage:u}){const d=Lt(r.lastChecked),p=Zv(r),g=!(r.status==="processing"||Ko(r.feedbackItems).inProgress>0)&&Xv(r.feedbackItems);return l.jsx("div",{onClick:()=>i(r.id),onKeyDown:v=>{v.target===v.currentTarget&&(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),i(r.id))},role:"button",tabIndex:0,"data-testid":`pr-row-${r.id}`,className:`w-full border-b border-border px-4 py-3 text-left transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring ${o?"bg-muted":""}`,children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx(ex,{status:r.status}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("span",{className:"w-12 shrink-0 text-muted-foreground",children:["#",r.number]}),l.jsx("span",{className:"truncate",children:r.title}),l.jsx(nx,{pr:r})]}),g&&l.jsx(tx,{href:r.url,testId:`ready-to-merge-${r.id}`,label:"Ready to merge",hint:"— click to open PR",onClick:v=>v.stopPropagation(),className:"mt-1.5 ml-[3.75rem] gap-1.5 px-2 py-0.5 text-[11px] tracking-wider",dotClassName:"h-1.5 w-1.5",hintClassName:"text-[10px] normal-case tracking-normal text-success-foreground/75"}),r.status==="error"&&u&&l.jsxs("div",{className:"mt-2 ml-[3.75rem] border border-destructive/40 bg-destructive/10 px-2 py-1 text-[11px] leading-4 text-destructive",children:[l.jsx("span",{className:"font-medium uppercase tracking-wider",children:"Error:"})," ",l.jsx("span",{className:"break-words",children:u})]}),l.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 pl-[3.75rem] text-[11px] text-muted-foreground",children:[l.jsx("a",{href:r.url,target:"_blank",rel:"noopener noreferrer",onClick:v=>v.stopPropagation(),className:"underline decoration-border underline-offset-2 transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:r.repo}),l.jsx("span",{children:Jv(r.status)}),!p&&l.jsx(Wu,{}),r.feedbackItems.length>0&&(()=>{const v=Ko(r.feedbackItems),x=[];return v.queued>0&&x.push(`${v.queued}q`),v.inProgress>0&&x.push(`${v.inProgress} active`),v.failed>0&&x.push(`${v.failed} failed`),v.warning>0&&x.push(`${v.warning} warn`),x.length===0?l.jsxs("span",{children:[r.feedbackItems.length," items"]}):l.jsx("span",{children:x.join(" · ")})})(),d&&l.jsxs("span",{children:["checked ",d]})]})]})]})})});function PN({item:t,prId:r,readOnly:o,globalDrainMode:i=!1}){const u=Je({mutationFn:async v=>(await Ge("PATCH",`/api/prs/${r}/feedback/${t.id}`,{decision:v})).json(),onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/prs"]}),ye.invalidateQueries({queryKey:["/api/prs",r]})}}),d=Je({mutationFn:async()=>(await Ge("POST",`/api/prs/${r}/feedback/${t.id}/retry`)).json(),onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/prs"]}),ye.invalidateQueries({queryKey:["/api/prs",r]}),ye.invalidateQueries({queryKey:["/api/activities"]}),ye.invalidateQueries({queryKey:["/api/logs"]})},onError:v=>{It("Could not retry feedback item",v)}}),p=Lt(t.createdAt),h=tN(t.status),g=(t.status==="failed"||t.status==="warning")&&t.statusReason?t.statusReason:null;return l.jsxs(Fu,{defaultOpen:!h,className:"border-b border-border",children:[l.jsx("div",{className:"px-4 py-3",children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("div",{className:"shrink-0 pt-0.5",children:l.jsx(CN,{status:t.status})}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:"mb-1 flex flex-wrap items-center gap-2",children:[l.jsx("span",{className:"font-medium",children:t.author}),t.file&&l.jsxs("span",{className:"text-[11px] text-muted-foreground",children:[t.file,t.line?`:${t.line}`:""]}),l.jsx("span",{className:"text-[11px] text-muted-foreground",children:t.type.replace("_"," ")}),p&&l.jsx("span",{className:"text-[11px] text-muted-foreground",children:p})]}),g&&l.jsxs("div",{className:"mt-1 whitespace-pre-wrap break-words border border-destructive/30 bg-destructive/10 px-2 py-1 text-[11px] leading-4 text-destructive",children:[l.jsx("span",{className:"font-medium uppercase tracking-wider",children:"Failure reason:"})," ",g]})]}),l.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[!o&&(t.status==="failed"||t.status==="warning")&&l.jsx("button",{type:"button",onClick:()=>d.mutate(),disabled:d.isPending||i,"data-testid":`retry-${t.id}`,"aria-label":`Retry feedback from ${t.author}`,title:i?Vo:"Retry feedback item",className:"border border-border px-2 py-0.5 text-[10px] uppercase tracking-wider text-muted-foreground transition-colors hover:bg-foreground hover:text-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-30",children:i?Ai:"Retry"}),l.jsx($u,{asChild:!0,children:l.jsx("button",{type:"button","data-testid":`toggle-${t.id}`,"aria-label":`${h?"Show":"Hide"} feedback details from ${t.author}`,title:"Toggle feedback details",className:"border border-border px-2 py-0.5 text-[10px] uppercase tracking-wider text-muted-foreground transition-colors hover:bg-foreground hover:text-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"Details"})}),!o&&["accept","reject","flag"].map(v=>l.jsx("button",{type:"button",onClick:()=>u.mutate(v),"data-testid":`override-${v}-${t.id}`,"aria-label":`${v} feedback from ${t.author}`,className:`px-2 py-0.5 text-[10px] uppercase tracking-wider transition-colors hover:bg-foreground hover:text-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background ${t.decision===v?"bg-foreground text-background":"border border-border text-muted-foreground"}`,children:v},v))]})]})}),l.jsx(zu,{children:l.jsxs("div",{className:"px-4 pb-3",children:[t.bodyHtml?l.jsx("div",{className:"feedback-markdown text-[12px] leading-relaxed",dangerouslySetInnerHTML:{__html:t.bodyHtml}}):l.jsx("p",{className:"whitespace-pre-wrap text-[12px] leading-relaxed text-foreground/80",children:t.body}),t.statusReason&&!g&&l.jsxs("p",{className:"mt-2 whitespace-pre-wrap break-words text-[11px] text-muted-foreground",children:[l.jsx("span",{className:"font-medium uppercase tracking-wider text-foreground/70",children:"Status reason:"})," ",t.statusReason]}),t.decisionReason&&l.jsxs("p",{className:"mt-2 whitespace-pre-wrap break-words text-[11px] text-muted-foreground",children:[l.jsx("span",{className:"font-medium uppercase tracking-wider text-foreground/70",children:"Decision reason:"})," ",t.decisionReason]})]})})]})}function TN({prId:t}){const r=m.useRef(null),{data:o=[]}=et({queryKey:["/api/logs",t??"all"],queryFn:async()=>{const d=t?`/api/logs?prId=${encodeURIComponent(t)}`:"/api/logs";return(await Ge("GET",d)).json()},refetchInterval:1500}),i=m.useMemo(()=>o.length>gu?o.slice(-gu):o,[o]),u=o.length-i.length;return m.useEffect(()=>{const d=r.current;d&&(d.scrollTop=d.scrollHeight)},[o.length,t]),l.jsx("div",{className:"flex h-full flex-col",children:l.jsx("div",{ref:r,className:"flex-1 overflow-y-auto p-4 font-mono text-[11px] leading-relaxed",children:o.length===0?l.jsx("span",{className:"text-muted-foreground",children:"No log entries."}):l.jsxs(l.Fragment,{children:[u>0&&l.jsxs("div",{className:"border-b border-border/60 pb-2 text-[10px] uppercase tracking-wider text-muted-foreground",children:["Showing latest ",gu," of ",o.length," entries."]}),i.map(d=>{const p=d.metadata&&Object.keys(d.metadata).length>0?JSON.stringify(d.metadata,null,2):null;return l.jsxs("div",{className:"border-b border-border/60 py-2 last:border-b-0","data-testid":`log-${d.id}`,children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-[10px] uppercase tracking-wider text-muted-foreground",children:[l.jsx("span",{children:Lt(d.timestamp)}),l.jsx("span",{className:d.level==="error"?"text-destructive":d.level==="warn"?"text-foreground/80":"text-foreground/55",children:d.level}),d.phase&&l.jsx("span",{className:"border border-border px-1 py-0",children:d.phase}),d.runId&&l.jsxs("span",{className:"normal-case text-foreground/45",children:["run ",d.runId.slice(0,8)]})]}),l.jsx("div",{className:`mt-1 break-words ${d.level==="error"?"text-destructive":"text-foreground/75"}`,children:d.message}),p&&l.jsx("pre",{className:"mt-1 whitespace-pre-wrap break-all text-[10px] text-muted-foreground",children:p})]},d.id)})]})})})}function _N({pr:t,config:r,healingSessions:o}){const i=pN(o,t.id),u=i?hN(i):null,d=u?$h[u.tone]:$h.neutral;return l.jsxs("div",{className:"shrink-0 border-b border-border px-4 py-3","data-testid":"panel-ci-healing",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:"CI healing"}),l.jsx("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:u?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:`inline-flex border px-1.5 py-0.5 text-[11px] uppercase tracking-wider ${d}`,children:u.stateLabel}),l.jsx("span",{className:"text-[11px] text-muted-foreground",children:u.attemptSummary})]}):l.jsx("span",{className:"text-[11px] text-muted-foreground",children:r?.autoHealCI===!1?"Automatic CI healing is disabled in settings.":"No healing session yet for this PR."})})]}),i&&l.jsxs("span",{className:"shrink-0 text-[10px] text-muted-foreground",children:["head ",i.currentHeadSha.slice(0,7)]})]}),u?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"mt-2 grid gap-1 text-[11px] text-muted-foreground",children:[u.reasonSummary&&l.jsxs("div",{children:["Reason: ",u.reasonSummary]}),l.jsx("div",{children:u.statusHint}),l.jsxs("div",{children:["Attempts: ",u.attemptSummary,i?.latestFingerprint?` · fingerprint ${i.latestFingerprint}`:""]})]}),u.actions.length>0&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:u.actions.map(p=>l.jsx("button",{type:"button",disabled:!0,title:p.hint,className:`border px-2 py-0.5 text-[10px] uppercase tracking-wider transition-colors ${p.available?"border-border text-foreground/70 hover:bg-muted":"border-border text-muted-foreground/60"} disabled:opacity-100`,children:p.label},p.label))}),l.jsx("div",{className:"mt-1 text-[10px] text-muted-foreground",children:"Operator controls are read-only until healing action endpoints are added."})]})]}):r?.autoHealCI!==!1&&l.jsx("div",{className:"mt-2 text-[11px] text-muted-foreground",children:"The watcher will create a healing session when a failing check is classified as healable."})]})}function ON({prId:t,prStatus:r,globalDrainMode:o}){const[i,u]=m.useState("ask");return m.useEffect(()=>{r==="error"&&u("activity")},[t,r]),l.jsxs("div",{className:"flex min-h-[24rem] w-full shrink-0 flex-col border-t border-border lg:min-h-0 lg:w-80 lg:border-l lg:border-t-0",children:[l.jsxs("div",{className:"flex border-b border-border",children:[l.jsx("button",{type:"button",onClick:()=>u("ask"),"data-testid":"tab-ask",className:`flex-1 px-3 py-2 text-[11px] uppercase tracking-wider transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-inset ${i==="ask"?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:"Ask Agent"}),l.jsx("button",{type:"button",onClick:()=>u("activity"),"data-testid":"tab-activity",className:`flex-1 px-3 py-2 text-[11px] uppercase tracking-wider transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-inset ${i==="activity"?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:"Activity"})]}),l.jsx("div",{className:"flex-1 overflow-hidden",children:i==="activity"?l.jsx(TN,{prId:t}):t?l.jsx(AN,{prId:t,globalDrainMode:o}):l.jsx("div",{className:"flex h-full items-center justify-center text-[12px] text-muted-foreground",children:"Select a PR to ask questions."})})]})}function AN({prId:t,globalDrainMode:r}){const[o,i]=m.useState(""),u=m.useRef(null),{data:d=[]}=et({queryKey:["/api/prs",t,"questions"],refetchInterval:2e3}),p=Je({mutationFn:g=>Ge("POST",`/api/prs/${t}/questions`,{question:g}).then(v=>v.json()),onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/prs",t,"questions"]}),ye.invalidateQueries({queryKey:["/api/activities"]}),i("")}});m.useEffect(()=>{const g=u.current;g&&(g.scrollTop=g.scrollHeight)},[d.length,d[d.length-1]?.status]);const h=p.isPending||!o.trim()||r;return l.jsxs("div",{className:"flex h-full flex-col",children:[l.jsx("div",{className:"border-b border-border px-4 py-2 text-[11px] uppercase tracking-wider text-muted-foreground",children:"Ask Agent"}),l.jsx("div",{ref:u,className:"flex-1 overflow-y-auto p-4 space-y-3",children:d.length===0?l.jsx("span",{className:"text-[12px] text-muted-foreground",children:r?wN:"Ask questions about this PR — the agent will read activity logs, feedback, and status to answer."}):d.map(g=>l.jsxs("div",{className:"space-y-1.5","data-testid":`question-${g.id}`,children:[l.jsxs("div",{className:"text-[12px]",children:[l.jsx("span",{className:"font-medium text-foreground/90",children:"Q: "}),l.jsx("span",{className:"text-foreground/80",children:g.question})]}),g.status==="pending"||g.status==="answering"?l.jsx("div",{className:"text-[11px] text-muted-foreground animate-pulse",children:"Agent is thinking..."}):g.status==="error"?l.jsxs("div",{className:"text-[11px] text-destructive",children:["Error: ",g.error||"Unknown error"]}):l.jsx("div",{className:"text-[12px] leading-relaxed text-foreground/75 whitespace-pre-wrap border-l-2 border-border pl-3",children:g.answer}),l.jsxs("div",{className:"text-[10px] text-muted-foreground",children:[Lt(g.createdAt),g.answeredAt&&` — answered ${Lt(g.answeredAt)}`]})]},g.id))}),l.jsxs("form",{onSubmit:g=>{g.preventDefault(),h||p.mutate(o.trim())},className:"border-t border-border p-3",children:[l.jsxs("div",{className:"flex gap-2",children:[l.jsx("input",{type:"text",value:o,onChange:g=>i(g.target.value),placeholder:r?"Drain mode is enabled.":"Was the review done? Why did this fail?","aria-label":"Question for selected pull request",disabled:r,"data-testid":"input-question",className:"flex-1 border border-border bg-transparent px-2 py-1 text-[12px] placeholder:text-muted-foreground/50 focus:border-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"}),l.jsx("button",{type:"submit",disabled:h,title:r?Vo:"Ask agent","data-testid":"button-ask",className:"border border-border px-2 py-1 text-[11px] uppercase tracking-wider transition-colors hover:bg-foreground hover:text-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-30",children:r?Ai:p.isPending?"...":"Ask"})]}),p.isError&&l.jsx("div",{className:"mt-1 text-[11px] text-destructive",children:rx(p.error)})]})]})}function rx(t){if(!(t instanceof Error))return String(t);const r=t.message.replace(/^\d+:\s*/,"").trim();if(!r)return"Request failed";try{const o=JSON.parse(r);if(typeof o.error=="string")return o.error;if(typeof o.message=="string")return o.message}catch{}return r}function It(t,r){vt({variant:"destructive",title:t,description:rx(r)})}function MN(){const[t,r]=m.useState(null),[o,i]=m.useState(""),[u,d]=m.useState(""),[p,h]=m.useState(null),[g,v]=m.useState(()=>{if(typeof window>"u")return!0;try{const z=window.localStorage.getItem(Fh);return z===null?!0:z==="true"}catch{return!0}}),[x,w]=m.useState("mine"),[b,k]=m.useState("active");m.useEffect(()=>{if(!(typeof window>"u"))try{window.localStorage.setItem(Fh,String(g))}catch{}},[g]);const{data:j=[],isLoading:C}=et({queryKey:["/api/prs"],refetchInterval:3e3}),{data:S=[],isLoading:E}=et({queryKey:["/api/prs/archived"],refetchInterval:1e4}),{data:_}=et({queryKey:["/api/config"],refetchInterval:5e3}),{data:O=[]}=et({queryKey:["/api/healing-sessions"],queryFn:async()=>mm("/api/healing-sessions"),refetchInterval:5e3}),{data:I=vN}=et({queryKey:["/api/activities"],refetchInterval:3e3}),{data:D}=et({queryKey:["/api/runtime"],refetchInterval:3e3}),{data:A=[]}=et({queryKey:["/api/repos/settings"],refetchInterval:5e3}),$=b==="active"?j:S,K=b==="archived";m.useEffect(()=>{if($.length===0){t!==null&&r(null);return}(!t||!$.some(z=>z.id===t))&&r($[0].id)},[$,t]);const Q=$.find(z=>z.id===t)??null,ee=Q?Zv(Q):!0,ne=Q?Lh(I.failed,Q.id):void 0,Z=Q?.status==="error"?ne?.lastError??Dh(Q)??"Automation stopped on this PR. Check the activity log for the full failure context.":null,de=hC(p,A.length),X=D?.drainMode===!0,ve=Je({mutationFn:async z=>(await Ge("POST","/api/prs",{url:z})).json(),onSuccess:z=>{ye.invalidateQueries({queryKey:["/api/prs"]}),ye.invalidateQueries({queryKey:["/api/activities"]}),ye.invalidateQueries({queryKey:["/api/repos/settings"]}),ye.invalidateQueries({queryKey:["/api/onboarding/status"]}),i(""),r(z.id)},onError:z=>{It("Could not add PR",z)}}),se=Je({mutationFn:async z=>(await Ge("POST",`/api/prs/${z}/apply`)).json(),onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/prs"]}),ye.invalidateQueries({queryKey:["/api/activities"]}),ye.invalidateQueries({queryKey:["/api/logs"]})},onError:z=>{It("Could not run babysitter",z)}}),le=Je({mutationFn:async({id:z,enabled:ae})=>(await Ge("PATCH",`/api/prs/${z}/watch`,{enabled:ae})).json(),onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/prs"]}),ye.invalidateQueries({queryKey:["/api/prs/archived"]}),ye.invalidateQueries({queryKey:["/api/logs"]})},onError:z=>{It("Could not update PR watch state",z)}}),U=Je({mutationFn:async z=>(await Ge("PATCH","/api/config",z)).json(),onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/config"]}),ye.invalidateQueries({queryKey:["/api/onboarding/status"]})},onError:z=>{It("Could not update settings",z)}}),H=Je({mutationFn:async()=>(await Ge("POST","/api/repos/sync")).json(),onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/prs"]}),ye.invalidateQueries({queryKey:["/api/activities"]}),ye.invalidateQueries({queryKey:["/api/repos/settings"]}),ye.invalidateQueries({queryKey:["/api/onboarding/status"]})},onError:z=>{It("Could not sync repositories",z)}}),q=Je({mutationFn:async()=>(await Ge("DELETE","/api/activities/failed")).json(),onSuccess:({cleared:z})=>{ye.invalidateQueries({queryKey:["/api/activities"]}),vt({description:z===1?"Cleared 1 failed activity.":`Cleared ${z} failed activities.`})},onError:z=>{It("Could not clear failed activities",z)}}),P=Je({mutationFn:async z=>(await Ge("POST","/api/repos/release",{repo:z})).json(),onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/releases"]}),ye.invalidateQueries({queryKey:["/api/activities"]}),vt({description:"Release queued."})},onError:z=>{It("Could not create release",z)}}),B=async z=>(await Ge("PATCH","/api/repos/settings",z)).json(),ue=Je({mutationFn:B,onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/repos/settings"]}),ye.invalidateQueries({queryKey:["/api/onboarding/status"]})},onError:z=>{It("Could not update repository settings",z)}}),me=Je({mutationFn:async({repo:z})=>(await Ge("POST","/api/repos",{repo:z})).json(),onSuccess:async(z,ae)=>{if(ye.invalidateQueries({queryKey:["/api/repos/settings"]}),ye.invalidateQueries({queryKey:["/api/prs"]}),ye.invalidateQueries({queryKey:["/api/onboarding/status"]}),d(""),w("mine"),ae.watchScope==="team")try{await B({repo:z.repo,ownPrsOnly:!1}),ye.invalidateQueries({queryKey:["/api/repos/settings"]})}catch(ce){It("Repository added, but could not update tracking scope",ce)}},onError:z=>{It("Could not watch repository",z)}});return l.jsxs("div",{className:"flex min-h-screen flex-col lg:h-screen lg:overflow-hidden",children:[l.jsx(Xo,{}),l.jsxs("header",{className:"flex shrink-0 flex-col gap-2 border-b border-border px-4 py-2.5 lg:flex-row lg:items-center lg:justify-between",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[l.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-label":"oh-my-pr",children:[l.jsx("rect",{x:"1",y:"1",width:"14",height:"14",stroke:"currentColor",strokeWidth:"1.5"}),l.jsx("path",{d:"M4 5h8M4 8h5M4 11h6",stroke:"currentColor",strokeWidth:"1"})]}),l.jsx("span",{className:"text-sm font-medium tracking-tight",children:"oh-my-pr"}),l.jsx("span",{className:"border border-border px-1.5 py-0 text-[10px] uppercase tracking-wider text-muted-foreground",children:"autonomous"}),l.jsxs("span",{className:"text-[11px] text-muted-foreground",children:["poll ",mN(_?.pollIntervalMs)]}),l.jsx(Dt,{href:"/changelogs",className:"text-[11px] text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"changelogs"}),l.jsx(Dt,{href:"/releases",className:"text-[11px] text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"releases"}),l.jsx(Dt,{href:"/logs",className:"text-[11px] text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"logs"})]}),l.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[l.jsxs("span",{className:"text-[11px] text-muted-foreground",children:[j.length," PR",j.length!==1?"s":""," in ",A.length," repo",A.length!==1?"s":""]}),l.jsx("label",{htmlFor:"dashboard-coding-agent",className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:"Agent"}),l.jsxs("select",{id:"dashboard-coding-agent",value:_?.codingAgent??"codex",onChange:z=>{const ae=z.target.value;U.mutate({codingAgent:ae})},disabled:U.isPending,"data-testid":"select-coding-agent",className:"border border-border bg-transparent px-2 py-0.5 text-[11px] focus:border-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-50",children:[l.jsx("option",{value:"codex",children:"codex"}),l.jsx("option",{value:"claude",children:"claude"})]}),l.jsx(Dt,{href:"/settings",className:"border border-border px-2 py-0.5 text-[11px] text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"settings"}),l.jsx(EN,{activities:I,onClearFailed:()=>q.mutate(),isClearingFailed:q.isPending,globalDrainMode:X})]})]}),l.jsx(xC,{}),l.jsx(jN,{warnings:I.warnings}),l.jsx(NN,{runtimeState:D}),l.jsxs("div",{className:"flex flex-1 flex-col overflow-y-auto lg:flex-row lg:overflow-hidden",children:[l.jsxs("div",{className:"flex max-h-[42vh] w-full shrink-0 flex-col overflow-y-auto border-b border-border lg:max-h-none lg:min-h-0 lg:w-80 lg:border-b-0 lg:border-r",children:[l.jsxs("div",{className:"sticky top-0 z-10 flex shrink-0 border-b border-border bg-background",children:[l.jsxs("button",{type:"button",onClick:()=>k("active"),"data-testid":"tab-active",className:`flex-1 px-3 py-2 text-[11px] uppercase tracking-wider transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-inset ${b==="active"?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:["Active (",j.length,")"]}),l.jsxs("button",{type:"button",onClick:()=>k("archived"),"data-testid":"tab-archived",className:`flex-1 px-3 py-2 text-[11px] uppercase tracking-wider transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-inset ${b==="archived"?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:["Archived (",S.length,")"]})]}),!K&&l.jsxs(l.Fragment,{children:[l.jsxs(Fu,{open:de,onOpenChange:h,className:"border-b border-border",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2 px-3 py-2 text-[11px] text-muted-foreground",children:[l.jsx("span",{children:A.length>0?"Add a PR or watch another repo.":"Add a PR or watch a repo. Sync and babysit start automatically."}),l.jsx($u,{asChild:!0,children:l.jsx("button",{type:"button","data-testid":"button-toggle-add-controls",className:"shrink-0 border border-border px-1.5 py-0.5 text-[10px] uppercase tracking-wider text-muted-foreground transition-colors hover:bg-foreground hover:text-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:de?"Hide":"Add"})})]}),l.jsxs(zu,{children:[l.jsx("form",{onSubmit:z=>{z.preventDefault(),o.trim()&&ve.mutate(o.trim())},className:"border-t border-border p-3",children:l.jsxs("div",{className:"flex gap-2",children:[l.jsx("input",{type:"text",value:o,onChange:z=>i(z.target.value),placeholder:"github.com/owner/repo/pull/123","aria-label":"GitHub pull request URL","data-testid":"input-add-pr",className:"flex-1 border border-border bg-transparent px-2 py-1 text-[12px] placeholder:text-muted-foreground/50 focus:border-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"}),l.jsx("button",{type:"submit",disabled:ve.isPending||!o.trim(),"data-testid":"button-add-pr",className:"border border-border px-2 py-1 text-[11px] uppercase tracking-wider transition-colors hover:bg-foreground hover:text-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-30",children:"Add"})]})}),l.jsxs("form",{onSubmit:z=>{z.preventDefault();const ae=u.trim();ae&&me.mutate({repo:ae,watchScope:x})},className:"border-t border-border p-3",children:[l.jsxs("div",{className:"flex gap-2",children:[l.jsx("input",{type:"text",value:u,onChange:z=>d(z.target.value),placeholder:"owner/repo","aria-label":"Repository owner and name","data-testid":"input-add-repo",className:"flex-1 border border-border bg-transparent px-2 py-1 text-[12px] placeholder:text-muted-foreground/50 focus:border-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"}),l.jsx("button",{type:"submit",disabled:me.isPending||!u.trim(),"data-testid":"button-add-repo",className:"border border-border px-2 py-1 text-[11px] uppercase tracking-wider transition-colors hover:bg-foreground hover:text-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-30",children:"Watch"})]}),l.jsxs("div",{className:"mt-3",children:[l.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:"Track automatically"}),l.jsx(zh,{value:x,onChange:w,disabled:me.isPending,name:"watch-scope",testIdPrefix:"watch-scope"})]})]})]})]}),l.jsxs(Fu,{open:g,onOpenChange:v,className:"border-b border-border",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2 p-3",children:[l.jsx($u,{asChild:!0,children:l.jsxs("button",{type:"button","data-testid":"button-toggle-tracked-repos","aria-label":g?"Collapse tracked repositories":"Expand tracked repositories",className:"flex min-w-0 items-center gap-1.5 text-[10px] uppercase tracking-wider text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:[l.jsx("span",{"aria-hidden":"true",children:g?"▾":"▸"}),l.jsx("span",{children:"Tracked repositories"}),!g&&A.length>0&&l.jsxs("span",{className:"text-muted-foreground/70",children:["(",A.length,")"]})]})}),l.jsx("button",{type:"button",onClick:()=>H.mutate(),disabled:H.isPending,"data-testid":"button-sync-repos",className:"border border-border px-1.5 py-0.5 text-[10px] uppercase tracking-wider text-muted-foreground transition-colors hover:bg-foreground hover:text-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-30",children:H.isPending?"Fetching...":"Fetch"})]}),l.jsx(zu,{className:"px-3 pb-3",children:A.length===0?l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"No repositories being watched yet."}):l.jsx("div",{className:"space-y-1 text-[12px]",children:A.map(z=>{const ae=P.isPending&&P.variables===z.repo;return l.jsxs("div",{className:"space-y-2 border border-border/60 px-2 py-2",children:[l.jsx("a",{href:pC(z.repo),target:"_blank",rel:"noopener noreferrer","data-testid":`tracked-repo-${z.repo.replace("/","-")}`,className:"min-w-0 break-all text-foreground/75 underline decoration-border underline-offset-2 transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:z.repo}),l.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-2",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:"Track automatically"}),l.jsx(zh,{value:SN(z.ownPrsOnly),onChange:ce=>ue.mutate({repo:z.repo,ownPrsOnly:ce==="mine"}),disabled:ue.isPending,name:`tracked-repo-scope-${z.repo}`,testIdPrefix:`tracked-repo-scope-${z.repo.replace("/","-")}`,compact:!0})]}),l.jsxs("div",{className:"flex shrink-0 flex-wrap items-center justify-end gap-2 self-end",children:[l.jsxs("label",{className:"flex items-center gap-1.5 text-[10px] uppercase tracking-wider text-muted-foreground",children:[l.jsx("input",{type:"checkbox",checked:z.autoCreateReleases,onChange:ce=>ue.mutate({repo:z.repo,autoCreateReleases:ce.target.checked}),disabled:ue.isPending,"data-testid":`tracked-repo-auto-release-${z.repo.replace("/","-")}`,className:"accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"}),"Auto-release"]}),l.jsx("button",{type:"button",onClick:()=>P.mutate(z.repo),disabled:P.isPending||X,title:X?Vo:"Queue manual release","data-testid":`tracked-repo-manual-release-${z.repo.replace("/","-")}`,className:"border border-border px-1.5 py-0.5 text-[10px] uppercase tracking-wider text-muted-foreground transition-colors hover:bg-foreground hover:text-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-30",children:X?Ai:ae?"Releasing...":"Release"})]})]})]},z.repo)})})})]})]}),l.jsx("div",{className:"flex-1",children:(K?E:C)?l.jsx("div",{className:"p-4 text-[12px] text-muted-foreground",children:"Loading..."}):$.length===0?l.jsx("div",{className:"p-4 text-[12px] text-muted-foreground",children:K?"No archived PRs. Closed PRs are archived automatically.":"No PRs tracked yet. Add a repository to watch or add a PR URL."}):$.map(z=>l.jsx(RN,{pr:z,isSelected:z.id===t,onSelect:r,failureMessage:z.status==="error"?Lh(I.failed,z.id)?.lastError??Dh(z):null},z.id))})]}),l.jsx("div",{className:"flex min-h-[32rem] flex-1 flex-col overflow-hidden lg:min-h-0",children:Q?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"shrink-0 border-b border-border px-4 py-3",children:[l.jsxs("div",{className:"mb-1 flex items-start justify-between gap-4",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx(ex,{status:Q.status}),l.jsx("span",{className:"truncate font-medium",children:Q.title}),l.jsx(nx,{pr:Q}),!ee&&l.jsx(Wu,{}),l.jsxs("a",{href:Q.url,target:"_blank",rel:"noopener noreferrer",className:"shrink-0 text-[11px] text-muted-foreground underline decoration-border underline-offset-2 transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:[Q.repo,"#",Q.number]})]}),l.jsxs("div",{className:"mt-1 flex flex-wrap gap-x-4 gap-y-1 text-[11px] text-muted-foreground",children:[l.jsxs("span",{children:["status: ",Jv(Q.status)]}),!ee&&l.jsx(Wu,{}),l.jsxs("span",{children:[Q.feedbackItems.length," items"]}),Q.feedbackItems.length>0&&(()=>{const z=Ko(Q.feedbackItems);return l.jsxs(l.Fragment,{children:[z.queued>0&&l.jsxs("span",{children:[z.queued," queued"]}),z.inProgress>0&&l.jsxs("span",{children:[z.inProgress," in progress"]}),z.failed>0&&l.jsxs("span",{children:[z.failed," failed"]}),z.warning>0&&l.jsxs("span",{children:[z.warning," warnings"]})]})})(),Q.testsPassed!==null&&l.jsxs("span",{children:["tests: ",Q.testsPassed?"pass":"fail"]}),Q.lintPassed!==null&&l.jsxs("span",{children:["lint: ",Q.lintPassed?"pass":"fail"]}),Q.lastChecked&&l.jsxs("span",{children:["checked ",Lt(Q.lastChecked)]})]})]}),!K&&l.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[l.jsx("button",{type:"button",onClick:()=>se.mutate(Q.id),disabled:se.isPending||Q.status==="processing"||X,title:X?Vo:"Run babysitter now","data-testid":"button-apply",className:"border border-border px-2 py-0.5 text-[10px] uppercase tracking-wider transition-colors hover:bg-foreground hover:text-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-30",children:X?Ai:Q.status==="processing"?"Running":"Run now"}),l.jsx("button",{type:"button",onClick:()=>le.mutate({id:Q.id,enabled:!ee}),disabled:le.isPending,"data-testid":"button-toggle-watch",className:"border border-border px-2 py-0.5 text-[10px] uppercase tracking-wider text-muted-foreground transition-colors hover:bg-foreground hover:text-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-30",children:ee?"Pause watch":"Resume watch"})]})]}),Xv(Q.feedbackItems)&&Q.status!=="processing"&&Ko(Q.feedbackItems).inProgress===0&&l.jsx(tx,{href:Q.url,testId:"detail-ready-to-merge",label:"All comments resolved — ready to merge",hint:"Open PR on GitHub →",className:"mt-2 gap-2 px-3 py-1.5 text-[12px] tracking-wider",dotClassName:"h-2 w-2",hintClassName:"text-[11px] normal-case tracking-normal text-success-foreground/75"}),Z&&l.jsxs("div",{className:"mt-2 border border-destructive/40 bg-destructive/10 px-3 py-2 text-[12px] leading-5 text-destructive","data-testid":"selected-pr-error",children:[l.jsx("div",{className:"text-[10px] font-medium uppercase tracking-wider",children:"Automation error"}),l.jsx("div",{className:"mt-1 whitespace-pre-wrap break-words",children:Z})]}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:X?yN:ee?"Background watcher syncs GitHub feedback and pushes approved fixes automatically.":"Background watch is paused for this PR; manual runs still work."})]}),l.jsx(_N,{pr:Q,config:_,healingSessions:O}),l.jsx("div",{className:"flex-1 overflow-y-auto",children:Q.feedbackItems.length===0?l.jsx("div",{className:"p-4 text-[12px] text-muted-foreground",children:ee?"No feedback yet. The watcher will sync GitHub comments automatically.":"No feedback yet. Background watch is paused for this PR."}):Q.feedbackItems.map(z=>l.jsx(PN,{item:z,prId:Q.id,readOnly:K,globalDrainMode:X},z.id))})]}):l.jsx("div",{className:"flex flex-1 items-center justify-center text-[12px] text-muted-foreground",children:"Select a PR from the left panel."})}),l.jsx(ON,{prId:t,prStatus:Q?.status??null,globalDrainMode:X})]})]})}function IN(t,r){return t?.drainMode?{label:"paused",className:"text-destructive"}:t?{label:"active",className:"text-muted-foreground"}:r?{label:"unavailable",className:"text-destructive"}:{label:"loading...",className:"text-muted-foreground"}}function LN(t){return t?.drainMode?"Resume":"Pause"}function DN(){const{data:t}=et({queryKey:["/api/config"]}),[r,o]=m.useState(""),[i,u]=m.useState(!1),[d,p]=m.useState("oh-my-pr"),h=t?.githubTokens??(t?.githubToken?[t.githubToken]:[]),g=t?.githubCommentAppName??"oh-my-pr";m.useEffect(()=>{p(g)},[g]);const v=E=>{S.mutate({githubTokens:E})},x=(E,_)=>{const O=[...h],[I]=O.splice(E,1);I&&(O.splice(_,0,I),v(O))},w=E=>{v(h.filter((_,O)=>O!==E))},{data:b,isError:k}=et({queryKey:["/api/runtime"],refetchInterval:5e3}),j=IN(b,k),C=Je({mutationFn:async E=>(await Ge("POST","/api/runtime/drain",E)).json(),onSuccess:(E,_)=>{ye.invalidateQueries({queryKey:["/api/runtime"]}),vt({description:_.enabled?"Automation paused. New runs are blocked; in-flight runs will finish.":"Automation resumed."})},onError:E=>{vt({variant:"destructive",description:`Failed to update drain mode: ${E.message}`})}}),S=Je({mutationFn:async E=>(await Ge("PATCH","/api/config",E)).json(),onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/config"]}),ye.invalidateQueries({queryKey:["/api/onboarding/status"]}),vt({description:"Settings saved."})},onError:E=>{vt({variant:"destructive",description:`Failed to save: ${E.message}`})}});return l.jsxs("div",{className:"flex min-h-screen flex-col",children:[l.jsx(Xo,{}),l.jsx("header",{className:"flex shrink-0 items-center justify-between border-b border-border px-4 py-2.5",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(Dt,{href:"/",className:"text-[11px] text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"← back"}),l.jsx("span",{className:"text-sm font-medium tracking-tight",children:"settings"})]})}),l.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:l.jsxs("div",{className:"mx-auto flex max-w-2xl flex-col gap-8",children:[l.jsxs("section",{children:[l.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Agent"}),l.jsxs("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("label",{htmlFor:"settings-coding-agent",className:"text-sm",children:"Coding Agent"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"CLI agent used to apply fixes"})]}),l.jsxs("select",{id:"settings-coding-agent",value:t?.codingAgent??"codex",onChange:E=>{const _=E.target.value;S.mutate({codingAgent:_})},disabled:S.isPending,className:"border border-border bg-transparent px-2 py-1 text-sm focus:border-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-50",children:[l.jsx("option",{value:"codex",children:"codex"}),l.jsx("option",{value:"claude",children:"claude"})]})]}),l.jsxs("label",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm",children:"Fallback to next coding agent"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"If the configured agent cannot start or authenticate, retry the babysitter run with the other local agent."})]}),l.jsx("input",{type:"checkbox",checked:t?.fallbackToNextCodingAgent??!1,onChange:E=>S.mutate({fallbackToNextCodingAgent:E.target.checked}),disabled:S.isPending,className:"mt-1 h-4 w-4 accent-foreground","data-testid":"checkbox-fallback-to-next-coding-agent"})]})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Automation"}),l.jsxs("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:[l.jsxs("label",{className:"flex items-center justify-between gap-3 cursor-pointer",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm",children:"Auto-resolve conflicts"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Ask the agent to resolve merge conflicts when tracked PRs are not mergeable."})]}),l.jsx("input",{type:"checkbox",checked:t?.autoResolveMergeConflicts??!0,onChange:E=>S.mutate({autoResolveMergeConflicts:E.target.checked}),disabled:S.isPending,"data-testid":"checkbox-auto-resolve-conflicts",className:"h-4 w-4 accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"})]}),l.jsxs("label",{className:"flex items-center justify-between gap-3 cursor-pointer",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm",children:"Auto-update docs"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Automatically assess whether tracked PRs need documentation updates."})]}),l.jsx("input",{type:"checkbox",checked:t?.autoUpdateDocs??!0,onChange:E=>S.mutate({autoUpdateDocs:E.target.checked}),disabled:S.isPending,"data-testid":"checkbox-auto-update-docs",className:"h-4 w-4 accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"})]})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Tuning"}),l.jsxs("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:[l.jsx(_n,{label:"Max turns",description:"Maximum agent turns per feedback item",value:t?.maxTurns??15,onChange:E=>S.mutate({maxTurns:E}),disabled:S.isPending}),l.jsx(_n,{label:"Poll interval (ms)",description:"How often to check for new feedback",value:t?.pollIntervalMs??12e4,onChange:E=>S.mutate({pollIntervalMs:E}),disabled:S.isPending}),l.jsx(_n,{label:"Batch window (ms)",description:"Time to batch feedback before processing",value:t?.batchWindowMs??3e5,onChange:E=>S.mutate({batchWindowMs:E}),disabled:S.isPending}),l.jsx(_n,{label:"Max changes per run",description:"Limit on concurrent changes",value:t?.maxChangesPerRun??20,onChange:E=>S.mutate({maxChangesPerRun:E}),disabled:S.isPending})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"CI Healing"}),l.jsxs("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:[l.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm",children:"Automatic CI healing"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Classify healable CI failures and run bounded repair attempts in isolated worktrees."})]}),l.jsx("input",{type:"checkbox","aria-label":"Automatic CI healing",checked:t?.autoHealCI??!1,onChange:E=>S.mutate({autoHealCI:E.target.checked}),disabled:S.isPending,className:"h-4 w-4 accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"})]}),l.jsx(_n,{label:"Max healing attempts per session",description:"Upper bound on repair attempts for a single healing session",value:t?.maxHealingAttemptsPerSession??3,onChange:E=>S.mutate({maxHealingAttemptsPerSession:E}),disabled:S.isPending}),l.jsx(_n,{label:"Max healing attempts per fingerprint",description:"Cap retries for the same failure fingerprint",value:t?.maxHealingAttemptsPerFingerprint??2,onChange:E=>S.mutate({maxHealingAttemptsPerFingerprint:E}),disabled:S.isPending}),l.jsx(_n,{label:"Max concurrent healing runs",description:"How many healing runs can execute at once",value:t?.maxConcurrentHealingRuns??1,onChange:E=>S.mutate({maxConcurrentHealingRuns:E}),disabled:S.isPending}),l.jsx(_n,{label:"Healing cooldown (ms)",description:"Backoff before a cooldowned session can retry",value:t?.healingCooldownMs??3e5,onChange:E=>S.mutate({healingCooldownMs:E}),disabled:S.isPending})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Releases"}),l.jsx("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:l.jsxs("label",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm",children:"Automatic release creation"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Evaluate merged PRs and publish GitHub releases automatically when the agent decides they are release-worthy."})]}),l.jsx("input",{type:"checkbox",checked:t?.autoCreateReleases??!1,onChange:E=>S.mutate({autoCreateReleases:E.target.checked}),disabled:S.isPending,className:"mt-1 accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background","data-testid":"checkbox-auto-create-releases"})]})})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Runtime"}),l.jsxs("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"text-sm",children:"Automation"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Drain mode blocks new agent runs. In-flight runs continue until they finish."}),l.jsx("div",{className:"mt-2 text-[11px]","aria-live":"polite","data-testid":"text-drain-status",children:l.jsx("span",{className:j.className,children:j.label})})]}),l.jsx("button",{type:"button",onClick:()=>C.mutate(b?.drainMode?{enabled:!1}:{enabled:!0,reason:"Manually paused via web settings"}),disabled:!b||C.isPending,"data-testid":"button-toggle-drain",className:"shrink-0 border border-border px-2 py-1 text-xs hover:bg-muted focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-50",children:LN(b)})]}),b?.drainMode&&(b.drainReason||b.drainRequestedAt)?l.jsxs("div",{className:"border-l-2 border-destructive bg-muted/30 px-3 py-2 text-[11px]",children:[b.drainReason?l.jsx("div",{className:"text-foreground",children:b.drainReason}):null,b.drainRequestedAt?l.jsxs("div",{className:"mt-1 text-muted-foreground",children:["since ",new Date(b.drainRequestedAt).toLocaleString()]}):null]}):null]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"GitHub"}),l.jsxs("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:[l.jsxs("div",{className:"flex flex-col gap-3",children:[l.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm",children:"Tokens"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Tried in order before GITHUB_TOKEN and gh auth."})]}),!i&&l.jsx("button",{type:"button",onClick:()=>u(!0),className:"border border-border px-2 py-1 text-xs hover:bg-muted focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"add"})]}),h.length?l.jsx("div",{className:"flex flex-col gap-2",children:h.map((E,_)=>l.jsxs("div",{className:"flex items-center justify-between gap-3 border border-border px-2 py-1.5",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"truncate font-mono text-xs",children:E}),l.jsxs("div",{className:"text-[10px] text-muted-foreground",children:["priority ",_+1]})]}),l.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[l.jsx("button",{type:"button",onClick:()=>x(_,_-1),disabled:_===0||S.isPending,className:"border border-border px-2 py-1 text-xs hover:bg-muted focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-50",children:"up"}),l.jsx("button",{type:"button",onClick:()=>x(_,_+1),disabled:_===h.length-1||S.isPending,className:"border border-border px-2 py-1 text-xs hover:bg-muted focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-50",children:"down"}),l.jsx("button",{type:"button",onClick:()=>w(_),disabled:S.isPending,className:"border border-border px-2 py-1 text-xs hover:bg-muted focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-50",children:"remove"})]})]},_))}):l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"none configured"}),i?l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("input",{type:"password",value:r,onChange:E=>o(E.target.value),placeholder:"ghp_...","aria-label":"GitHub token",className:"min-w-0 flex-1 border border-border bg-transparent px-2 py-1 text-sm focus:border-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"}),l.jsx("button",{type:"button",onClick:()=>{const E=r.trim();E&&(v([...h,E]),o(""),u(!1))},disabled:!r.trim()||S.isPending,className:"border border-border px-2 py-1 text-xs hover:bg-muted focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-50",children:"add"}),l.jsx("button",{type:"button",onClick:()=>{u(!1),o("")},className:"px-2 py-1 text-xs text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"cancel"})]}):null]}),l.jsxs("div",{className:"flex flex-col gap-2",children:[l.jsx("label",{htmlFor:"settings-github-comment-app-name",className:"text-sm",children:"GitHub reply signature"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Replace the app name shown in public GitHub replies. Leave blank to remove it."}),l.jsx("input",{id:"settings-github-comment-app-name",type:"text",value:d,placeholder:"leave blank to remove",onChange:E=>p(E.target.value),onBlur:E=>{const _=E.target.value;_!==(t?.githubCommentAppName??"oh-my-pr")&&S.mutate({githubCommentAppName:_})},onKeyDown:E=>{E.key==="Enter"&&E.currentTarget.blur()},disabled:S.isPending,className:"w-full border border-border bg-transparent px-2 py-1 text-sm focus:border-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-50"})]}),l.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm",children:"Repository links in PR comments"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Link the reply signature back to the project repository in agent-authored GitHub PR comments and footers."})]}),l.jsx("input",{type:"checkbox","aria-label":"Repository links in PR comments",checked:t?.includeRepositoryLinksInGitHubComments??!0,onChange:E=>S.mutate({includeRepositoryLinksInGitHubComments:E.target.checked}),disabled:S.isPending,className:"h-4 w-4 accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"})]}),l.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm",children:"GitHub progress replies"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Post public Accepted/running/completed status replies while the babysitter works on review comments."})]}),l.jsx("input",{type:"checkbox","aria-label":"GitHub progress replies",checked:t?.postGitHubProgressReplies??!1,onChange:E=>S.mutate({postGitHubProgressReplies:E.target.checked}),disabled:S.isPending,className:"h-4 w-4 accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"})]}),l.jsxs("div",{children:[l.jsx("div",{className:"text-sm",children:"Trusted reviewers"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:t?.trustedReviewers?.length?t.trustedReviewers.join(", "):"none configured"})]}),l.jsx(FN,{label:"Ignored bots",description:"Bot logins whose comments and reviews are ignored.",placeholder:"dependabot[bot]",values:t?.ignoredBots??[],onChange:E=>S.mutate({ignoredBots:E}),disabled:!t||S.isPending})]})]})]})})]})}function FN({label:t,description:r,placeholder:o,values:i,onChange:u,disabled:d}){const[p,h]=m.useState(""),g=`setting-${t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}`,v=`${g}-description`,x=()=>{const b=p.trim(),k=b.toLowerCase();if(!b||i.some(j=>j.toLowerCase()===k)){h("");return}u([...i,b]),h("")},w=b=>{u(i.filter((k,j)=>j!==b))};return l.jsxs("div",{className:"flex flex-col gap-2",children:[l.jsxs("div",{className:"flex items-end gap-2",children:[l.jsxs("label",{htmlFor:g,className:"min-w-0 flex-1 cursor-pointer",children:[l.jsx("span",{className:"block text-sm",children:t}),l.jsx("span",{id:v,className:"block text-[11px] text-muted-foreground",children:r}),l.jsx("input",{id:g,type:"text",value:p,onChange:b=>h(b.target.value),onKeyDown:b=>{b.key==="Enter"&&(b.preventDefault(),x())},placeholder:o,disabled:d,"aria-describedby":v,className:"mt-2 w-full min-w-0 border border-border bg-transparent px-2 py-1 text-sm focus:border-foreground focus:outline-none disabled:opacity-50"})]}),l.jsx("button",{type:"button",onClick:x,disabled:!p.trim()||d,className:"border border-border px-2 py-1 text-xs hover:bg-muted disabled:opacity-50",children:"add"})]}),i.length?l.jsx("div",{className:"flex flex-wrap gap-1.5",children:i.map((b,k)=>l.jsxs("span",{className:"inline-flex items-center gap-1.5 border border-border px-2 py-0.5 font-mono text-xs",children:[b,l.jsx("button",{type:"button",onClick:()=>w(k),disabled:d,"aria-label":`Remove ${b}`,className:"text-muted-foreground hover:text-foreground disabled:opacity-50",children:"×"})]},b))}):l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"none configured"})]})}function _n({label:t,description:r,value:o,onChange:i,disabled:u}){const d=`setting-${t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}`,p=`${d}-description`;return l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("label",{htmlFor:d,className:"text-sm",children:t}),l.jsx("div",{id:p,className:"text-[11px] text-muted-foreground",children:r})]}),l.jsx("input",{id:d,type:"number",value:o,onChange:h=>{const g=parseInt(h.target.value,10);isNaN(g)||i(g)},disabled:u,"aria-describedby":p,className:"w-28 border border-border bg-transparent px-2 py-1 text-right text-sm focus:border-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-50"})]})}function $N(t){return new Date(t).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function zN(t){const r=t.match(/##\s*Twitter\/X\s*(?:Thread)?\n([\s\S]*?)(?=\n##\s|\s*$)/i),o=t.match(/##\s*LinkedIn\s*(?:\/\s*General)?\n([\s\S]*?)(?=\n##\s|\s*$)/i);return{twitter:r?r[1].trim():null,linkedin:o?o[1].trim():null}}function UN({text:t}){const[r,o]=m.useState(!1),i=async()=>{try{await navigator.clipboard.writeText(t),o(!0),setTimeout(()=>o(!1),2e3)}catch{}};return l.jsx("button",{type:"button",onClick:i,className:"border border-border px-2 py-0.5 text-[11px] uppercase tracking-wider text-muted-foreground hover:border-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:r?"copied":"copy"})}function xu({title:t,content:r}){return l.jsxs("div",{className:"mt-4",children:[l.jsxs("div",{className:"mb-1.5 flex items-center justify-between",children:[l.jsx("span",{className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:t}),l.jsx(UN,{text:r})]}),l.jsx("pre",{className:"whitespace-pre-wrap border border-border bg-background p-3 text-[12px] leading-relaxed font-mono",children:r})]})}function HN({status:t}){const r=t==="done"?"border-foreground/40 text-foreground":t==="generating"?"border-border text-muted-foreground animate-pulse":"border-destructive/40 text-destructive";return l.jsx("span",{className:`border px-1.5 py-0 text-[10px] uppercase tracking-wider ${r}`,children:t})}function BN({changelog:t}){const[r,o]=m.useState(!1),i=t.content?zN(t.content):null,u=`changelog-${t.id}-content`;return l.jsxs("div",{className:"border border-border",children:[l.jsxs("button",{type:"button",className:"flex w-full items-center justify-between px-4 py-3 text-left hover:bg-muted/30 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-inset disabled:cursor-default disabled:hover:bg-transparent",onClick:()=>t.status==="done"&&o(d=>!d),disabled:t.status!=="done","aria-expanded":t.status==="done"?r:void 0,"aria-controls":t.status==="done"?u:void 0,children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(HN,{status:t.status}),l.jsx("span",{className:"text-sm font-medium",children:$N(t.createdAt)}),l.jsxs("span",{className:"text-[11px] text-muted-foreground",children:[t.triggerCount," PR",t.triggerCount!==1?"s":""," merged"]}),l.jsx("span",{className:"text-[11px] text-muted-foreground",children:t.prSummaries.map(d=>`#${d.number}`).join(" · ")})]}),t.status==="done"&&l.jsx("span",{className:"text-[11px] text-muted-foreground",children:r?"Hide":"Show"})]}),r&&t.status==="done"&&l.jsxs("div",{id:u,className:"border-t border-border px-4 pb-4 pt-3",children:[t.error&&l.jsx("p",{className:"mb-3 text-[12px] text-destructive",children:t.error}),i?.twitter&&l.jsx(xu,{title:"Twitter / X Thread",content:i.twitter}),i?.linkedin&&l.jsx(xu,{title:"LinkedIn / General",content:i.linkedin}),!i?.twitter&&!i?.linkedin&&t.content&&l.jsx(xu,{title:"Full output",content:t.content})]}),t.status==="error"&&t.error&&l.jsx("div",{className:"border-t border-border px-4 py-3",children:l.jsx("p",{className:"text-[12px] text-destructive",children:t.error})}),t.status==="generating"&&l.jsx("div",{className:"border-t border-border px-4 py-2.5",children:l.jsx("span",{className:"text-[11px] text-muted-foreground",children:"Generation was removed before this row completed."})})]})}function WN(){const{data:t=[],isLoading:r}=et({queryKey:["/api/changelogs"],refetchInterval:o=>o.state.data?.some(u=>u.status==="generating")?5e3:!1});return l.jsxs("div",{className:"flex min-h-screen flex-col",children:[l.jsx(Xo,{}),l.jsxs("header",{className:"flex shrink-0 items-center justify-between border-b border-border px-4 py-2.5",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-label":"oh-my-pr",children:[l.jsx("rect",{x:"1",y:"1",width:"14",height:"14",stroke:"currentColor",strokeWidth:"1.5"}),l.jsx("path",{d:"M4 5h8M4 8h5M4 11h6",stroke:"currentColor",strokeWidth:"1"})]}),l.jsx("span",{className:"text-sm font-medium tracking-tight",children:"oh-my-pr"}),l.jsx("span",{className:"border border-border px-1.5 py-0 text-[10px] uppercase tracking-wider text-muted-foreground",children:"changelogs"})]}),l.jsx(Dt,{href:"/",className:"text-[11px] text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"← back to dashboard"})]}),l.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:l.jsxs("div",{className:"mx-auto max-w-3xl",children:[l.jsxs("div",{className:"mb-5",children:[l.jsx("h1",{className:"text-base font-medium",children:"Social Media Changelogs"}),l.jsx("p",{className:"mt-1 text-[12px] text-muted-foreground",children:"Historical generated posts from earlier versions."})]}),!r&&t.length===0&&l.jsxs("div",{className:"border border-border px-4 py-8 text-center",children:[l.jsx("p",{className:"text-sm text-muted-foreground",children:"No changelogs yet."}),l.jsx("p",{className:"mt-1 text-[12px] text-muted-foreground",children:"Social media changelog generation has been removed."})]}),r&&l.jsx("div",{className:"border border-border px-4 py-6 text-center",children:l.jsx("p",{className:"text-[12px] text-muted-foreground",children:"Loading…"})}),l.jsx("div",{className:"flex flex-col gap-2",children:t.map(o=>l.jsx(BN,{changelog:o},o.id))})]})})]})}const KN=new Set(["detected","evaluating","proposed","publishing"]);function ox(t){return KN.has(t)}function VN(t){return t==="published"||t==="skipped"||t==="error"}function QN(t){return typeof t=="object"&&t!==null&&"status"in t&&typeof t.status=="string"}function yu(t){if(!t)return"n/a";const r=new Date(t);return Number.isNaN(r.getTime())?"n/a":r.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function GN(t){return t?t.slice(0,7):"n/a"}function qN({status:t}){const r=t==="published"?"border-foreground/40 text-foreground":t==="skipped"?"border-border text-muted-foreground":t==="error"?"border-destructive/40 text-destructive":ox(t)?"border-border text-muted-foreground animate-pulse":"border-border text-muted-foreground";return l.jsx("span",{className:`border px-1.5 py-0 text-[10px] uppercase tracking-wider ${r}`,children:t})}function YN({text:t}){const[r,o]=m.useState(!1),i=async()=>{try{await navigator.clipboard.writeText(t),o(!0),setTimeout(()=>o(!1),1500)}catch(u){const d=u instanceof Error?u.message:"Clipboard write failed";vt({variant:"destructive",description:`Failed to copy: ${d}`})}};return l.jsx("button",{type:"button",onClick:i,className:"border border-border px-2 py-0.5 text-[11px] uppercase tracking-wider text-muted-foreground hover:border-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:r?"copied":"copy"})}function XN({run:t,onRetry:r,retryPending:o}){const[i,u]=m.useState(!1),p=!(!!t.decisionReason||!!t.releaseTitle||!!t.releaseNotes||!!t.error||!!t.githubReleaseUrl||t.includedPrs.length>0)&&VN(t.status),h=`release-run-${t.id}-details`;return l.jsxs("div",{className:"border border-border",children:[l.jsxs("button",{type:"button",className:"flex w-full items-center justify-between px-4 py-3 text-left hover:bg-muted/30 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-inset",onClick:()=>u(g=>!g),"aria-expanded":i,"aria-controls":h,children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[l.jsx(qN,{status:t.status}),l.jsx("span",{className:"truncate text-sm font-medium",children:t.repo}),l.jsxs("span",{className:"text-[11px] text-muted-foreground",children:["#",t.triggerPrNumber]}),t.proposedVersion&&l.jsx("span",{className:"border border-border px-1.5 py-0 text-[10px] uppercase tracking-wider text-muted-foreground",children:t.proposedVersion}),!t.proposedVersion&&t.recommendedBump&&l.jsxs("span",{className:"text-[11px] text-muted-foreground",children:["bump ",t.recommendedBump]})]}),l.jsxs("div",{className:"flex items-center gap-3 text-[11px] text-muted-foreground",children:[l.jsx("span",{children:yu(t.createdAt)}),l.jsx("span",{children:i?"Hide":"Show"})]})]}),i&&l.jsxs("div",{id:h,className:"border-t border-border px-4 pb-4 pt-3",children:[l.jsxs("div",{className:"mb-3 text-[12px] text-muted-foreground",children:["Trigger PR:"," ",l.jsxs("a",{href:t.triggerPrUrl,target:"_blank",rel:"noreferrer noopener",className:"underline underline-offset-2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:["#",t.triggerPrNumber," ",t.triggerPrTitle]})]}),t.decisionReason&&l.jsx("p",{className:"mb-3 text-[12px] leading-relaxed",children:t.decisionReason}),t.releaseTitle&&l.jsxs("p",{className:"mb-3 text-[12px]",children:[l.jsx("span",{className:"text-muted-foreground",children:"Release title:"})," ",l.jsx("span",{children:t.releaseTitle})]}),l.jsxs("div",{className:"mb-3 grid grid-cols-1 gap-2 text-[12px] text-muted-foreground md:grid-cols-2",children:[l.jsxs("div",{children:["Base branch: ",t.baseBranch||"n/a"]}),l.jsxs("div",{children:["Trigger SHA: ",GN(t.triggerMergeSha)]}),l.jsxs("div",{children:["Merged at: ",yu(t.triggerMergedAt)]}),l.jsxs("div",{children:["Updated: ",yu(t.updatedAt)]})]}),t.includedPrs.length>0&&l.jsxs("div",{className:"mb-3",children:[l.jsxs("div",{className:"mb-1.5 text-[11px] uppercase tracking-wider text-muted-foreground",children:["Included PRs (",t.includedPrs.length,")"]}),l.jsx("div",{className:"space-y-1 border border-border p-3 text-[12px]",children:t.includedPrs.map(g=>l.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l.jsxs("span",{className:"truncate",children:["#",g.number," ",g.title]}),l.jsx("a",{href:g.url,target:"_blank",rel:"noreferrer noopener",className:"text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"open"})]},`${g.mergeSha}-${g.number}`))})]}),t.releaseNotes&&l.jsxs("div",{className:"mb-3",children:[l.jsxs("div",{className:"mb-1.5 flex items-center justify-between",children:[l.jsx("span",{className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:"Release Notes"}),l.jsx(YN,{text:t.releaseNotes})]}),l.jsx("pre",{className:"whitespace-pre-wrap border border-border bg-background p-3 text-[12px] leading-relaxed font-mono",children:t.releaseNotes})]}),t.error&&l.jsx("div",{className:"mb-3 border border-destructive/40 bg-destructive/5 p-3 text-[12px] text-destructive",children:t.error}),l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.githubReleaseUrl&&l.jsx("a",{href:t.githubReleaseUrl,target:"_blank",rel:"noreferrer noopener",className:"border border-border px-2 py-1 text-[11px] uppercase tracking-wider text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"open release"}),t.status==="error"&&l.jsx("button",{type:"button",onClick:()=>r(t.id),disabled:o,className:"border border-border px-2 py-1 text-[11px] uppercase tracking-wider text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-50",children:"retry"})]}),p&&l.jsx("p",{className:"mt-2 text-[12px] text-muted-foreground",children:"No details available yet."})]})]})}function ZN(){const{data:t=[],isLoading:r}=et({queryKey:["/api/releases"],refetchInterval:i=>{const u=i.state.data;return Array.isArray(u)&&u.some(d=>QN(d)&&ox(d.status))?5e3:!1}}),o=Je({mutationFn:async i=>(await Ge("POST",`/api/releases/${i}/retry`)).json(),onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/releases"]}),vt({description:"Retry queued."})},onError:i=>{vt({variant:"destructive",description:`Retry failed: ${i.message}`})}});return l.jsxs("div",{className:"flex min-h-screen flex-col",children:[l.jsx(Xo,{}),l.jsxs("header",{className:"flex shrink-0 items-center justify-between border-b border-border px-4 py-2.5",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-label":"Release Management",children:[l.jsx("rect",{x:"1",y:"1",width:"14",height:"14",stroke:"currentColor",strokeWidth:"1.5"}),l.jsx("path",{d:"M4 6h8M4 9h8M4 12h5",stroke:"currentColor",strokeWidth:"1"})]}),l.jsx("span",{className:"text-sm font-medium tracking-tight",children:"oh-my-pr"}),l.jsx("span",{className:"border border-border px-1.5 py-0 text-[10px] uppercase tracking-wider text-muted-foreground",children:"releases"})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(Dt,{href:"/settings",className:"text-[11px] text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"settings"}),l.jsx(Dt,{href:"/",className:"text-[11px] text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"← back to dashboard"})]})]}),l.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:l.jsxs("div",{className:"mx-auto max-w-4xl",children:[l.jsxs("div",{className:"mb-5",children:[l.jsx("h1",{className:"text-base font-medium",children:"Release Management"}),l.jsx("p",{className:"mt-1 text-[12px] text-muted-foreground",children:"Every merged PR can trigger agent evaluation. This page shows release decisions, version bumps, notes, and publishing outcomes."})]}),r&&l.jsx("div",{className:"border border-border px-4 py-6 text-center",children:l.jsx("p",{className:"text-[12px] text-muted-foreground",children:"Loading…"})}),!r&&t.length===0&&l.jsxs("div",{className:"border border-border px-4 py-8 text-center",children:[l.jsx("p",{className:"text-sm text-muted-foreground",children:"No release runs yet."}),l.jsx("p",{className:"mt-1 text-[12px] text-muted-foreground",children:"Runs appear after merged PRs are evaluated for release-worthiness."})]}),l.jsx("div",{className:"flex flex-col gap-2",children:t.map(i=>l.jsx(XN,{run:i,onRetry:u=>o.mutate(u),retryPending:o.isPending},i.id))})]})})]})}const sx=["trace","debug","info","warn","error","fatal"],Uh={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},JN={trace:"text-muted-foreground",debug:"text-muted-foreground",info:"text-foreground",warn:"text-yellow-500",error:"text-red-500",fatal:"text-red-600 font-medium"};function ej(t){const r=new URLSearchParams(t),o=r.get("level")??"";return{level:sx.includes(o)?o:"",source:r.get("source")??"",search:r.get("q")??"",follow:r.get("follow")==="1"}}function ix(t){return new Date(t).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}function tj(t){const r=Object.keys(t.fields).length>0?" "+JSON.stringify(t.fields):"",o=t.source?` [${t.source}]`:"";return`${ix(t.time)} ${t.level.toUpperCase().padEnd(5)}${o} ${t.msg}${r}`}function Hh(t){return t.map(tj).join(`
|
|
49
|
+
`)}function yi(t){const r=new URLSearchParams(window.location.search);for(const[u,d]of Object.entries(t))d===""||d===!1||d===void 0?r.delete(u):d===!0?r.set(u,"1"):r.set(u,String(d));const o=r.toString(),i=new URL(window.location.href);i.search=o?`?${o}`:"",history.replaceState(history.state,"",i.href)}function nj(){const t=Mw(),r=m.useMemo(()=>ej(t),[t]),[o,i]=m.useState(r.level),[u,d]=m.useState(r.source),[p,h]=m.useState(r.search),[g,v]=m.useState(r.follow),[x,w]=m.useState([]),[b,k]=m.useState([]),[j,C]=m.useState(null),S=m.useRef([]);S.current=x;const E=m.useRef(null),_=m.useRef(g);_.current=g,m.useEffect(()=>{let A=!1;C(null);const $=new URLSearchParams;return o&&$.set("level",o),u&&$.set("source",u),p&&$.set("search",p),$.set("limit","1000"),mm(`/api/server-logs?${$.toString()}`).then(K=>{A||(w(K.records),k(K.sources))}).catch(K=>{A||C(K.message)}),()=>{A=!0}},[o,u,p]),m.useEffect(()=>{if(!g)return;const $=`/api/server-logs/stream?since=${S.current[S.current.length-1]?.seq??0}`,K=new EventSource($);return K.onmessage=Q=>{try{const ee=JSON.parse(Q.data);w(ne=>{if(ne.length>0&&ne[ne.length-1].seq>=ee.seq)return ne;const Z=[...ne,ee];return Z.length>5e3?Z.slice(Z.length-5e3):Z})}catch{}},K.onerror=()=>{C("Lost log stream connection — disable Follow tail and re-enable to retry")},()=>{K.close()}},[g]),m.useEffect(()=>{if(!g)return;const A=E.current;A&&(A.scrollTop=A.scrollHeight)},[x,g]),m.useEffect(()=>{yi({level:o})},[o]),m.useEffect(()=>{yi({source:u})},[u]),m.useEffect(()=>{yi({q:p})},[p]),m.useEffect(()=>{yi({follow:g})},[g]);const O=m.useMemo(()=>{let A=x;if(o){const $=Uh[o];A=A.filter(K=>Uh[K.level]>=$)}if(u&&(A=A.filter($=>$.source===u)),p){const $=p.toLowerCase();A=A.filter(K=>K.msg.toLowerCase().includes($)||JSON.stringify(K.fields).toLowerCase().includes($))}return A},[x,o,u,p]),I=async()=>{try{await navigator.clipboard.writeText(Hh(O))}catch{}},D=()=>{const A=new Blob([Hh(O)],{type:"text/plain"}),$=URL.createObjectURL(A),K=document.createElement("a");K.href=$,K.download=`oh-my-pr-logs-${new Date().toISOString().replace(/[:.]/g,"-")}.txt`,K.click(),URL.revokeObjectURL($)};return l.jsxs("div",{className:"flex h-screen flex-col",children:[l.jsx(Xo,{}),l.jsxs("header",{className:"flex shrink-0 items-center justify-between border-b border-border px-4 py-2.5",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-label":"oh-my-pr",children:[l.jsx("rect",{x:"1",y:"1",width:"14",height:"14",stroke:"currentColor",strokeWidth:"1.5"}),l.jsx("path",{d:"M4 5h8M4 8h5M4 11h6",stroke:"currentColor",strokeWidth:"1"})]}),l.jsx("span",{className:"text-sm font-medium tracking-tight",children:"oh-my-pr"}),l.jsx("span",{className:"border border-border px-1.5 py-0 text-[10px] uppercase tracking-wider text-muted-foreground",children:"logs"})]}),l.jsx(Dt,{href:"/",className:"text-[11px] text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"← back to dashboard"})]}),l.jsxs("div",{className:"flex shrink-0 flex-wrap items-center gap-3 border-b border-border px-4 py-2 text-[11px]",children:[l.jsx("label",{htmlFor:"logs-level",className:"uppercase tracking-wider text-muted-foreground",children:"level"}),l.jsxs("select",{id:"logs-level",value:o,onChange:A=>i(A.target.value),className:"border border-border bg-transparent px-2 py-0.5 focus:border-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:[l.jsx("option",{value:"",children:"all"}),sx.map(A=>l.jsx("option",{value:A,children:A},A))]}),l.jsx("label",{htmlFor:"logs-source",className:"uppercase tracking-wider text-muted-foreground",children:"source"}),l.jsxs("select",{id:"logs-source",value:u,onChange:A=>d(A.target.value),className:"border border-border bg-transparent px-2 py-0.5 focus:border-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:[l.jsx("option",{value:"",children:"all"}),b.map(A=>l.jsx("option",{value:A,children:A},A))]}),l.jsx("input",{type:"search",value:p,onChange:A=>h(A.target.value),placeholder:"search…",className:"min-w-[180px] flex-1 border border-border bg-transparent px-2 py-0.5 focus:border-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring"}),l.jsxs("label",{className:"flex cursor-pointer items-center gap-1.5 uppercase tracking-wider text-muted-foreground",children:[l.jsx("input",{type:"checkbox",checked:g,onChange:A=>v(A.target.checked),className:"cursor-pointer"}),"follow tail"]}),l.jsxs("span",{className:"ml-auto text-muted-foreground",children:[O.length," of ",x.length]}),l.jsx("button",{type:"button",onClick:I,className:"border border-border px-2 py-0.5 uppercase tracking-wider text-muted-foreground hover:border-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:"copy"}),l.jsx("button",{type:"button",onClick:D,className:"border border-border px-2 py-0.5 uppercase tracking-wider text-muted-foreground hover:border-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:"download"})]}),j&&l.jsx("div",{className:"shrink-0 border-b border-red-500/40 bg-red-500/10 px-4 py-1 text-[11px] text-red-500",children:j}),l.jsx("div",{ref:E,className:"flex-1 overflow-y-auto p-3 font-mono text-[11px] leading-relaxed",children:O.length===0?l.jsx("div",{className:"text-center text-muted-foreground",children:"No log records match the current filter."}):O.map(A=>l.jsxs("div",{className:"flex gap-2 whitespace-pre-wrap break-all",children:[l.jsx("span",{className:"shrink-0 text-muted-foreground",children:ix(A.time)}),l.jsx("span",{className:`shrink-0 w-12 ${JN[A.level]}`,children:A.level}),A.source&&l.jsxs("span",{className:"shrink-0 text-muted-foreground",children:["[",A.source,"]"]}),l.jsxs("span",{className:`grow ${A.level==="error"||A.level==="fatal"?"text-destructive":""}`,children:[A.msg,Object.keys(A.fields).length>0&&l.jsxs("span",{className:"text-muted-foreground",children:[" ",JSON.stringify(A.fields)]})]})]},A.seq))})]})}const ax=m.forwardRef(({className:t,...r},o)=>l.jsx("div",{ref:o,className:De("shadcn-card rounded-xl border bg-card border-card-border text-card-foreground shadow-sm",t),...r}));ax.displayName="Card";const rj=m.forwardRef(({className:t,...r},o)=>l.jsx("div",{ref:o,className:De("flex flex-col space-y-1.5 p-6",t),...r}));rj.displayName="CardHeader";const oj=m.forwardRef(({className:t,...r},o)=>l.jsx("div",{ref:o,className:De("text-2xl font-semibold leading-none tracking-tight",t),...r}));oj.displayName="CardTitle";const sj=m.forwardRef(({className:t,...r},o)=>l.jsx("div",{ref:o,className:De("text-sm text-muted-foreground",t),...r}));sj.displayName="CardDescription";const lx=m.forwardRef(({className:t,...r},o)=>l.jsx("div",{ref:o,className:De("p-6 pt-0",t),...r}));lx.displayName="CardContent";const ij=m.forwardRef(({className:t,...r},o)=>l.jsx("div",{ref:o,className:De("flex items-center p-6 pt-0",t),...r}));ij.displayName="CardFooter";function aj(){return l.jsx("div",{className:"min-h-screen w-full flex items-center justify-center bg-gray-50",children:l.jsx(ax,{className:"w-full max-w-md mx-4",children:l.jsxs(lx,{className:"pt-6",children:[l.jsxs("div",{className:"flex mb-4 gap-2",children:[l.jsx(z0,{className:"h-8 w-8 text-red-500"}),l.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"404 Page Not Found"})]}),l.jsx("p",{className:"mt-4 text-sm text-gray-600",children:"Did you forget to add the page to the router?"})]})})})}function wu(t,r){try{const o=JSON.parse(t);if(typeof o.message=="string")return o.message;if(typeof o.error=="string")return o.error}catch{return t||r}return t||r}function lj({children:t}){const[r,o]=m.useState(null),[i,u]=m.useState(""),[d,p]=m.useState(""),[h,g]=m.useState(null),[v,x]=m.useState(!1);m.useEffect(()=>{let b=!1;return fetch("/api/auth/status").then(async k=>{if(!k.ok)throw new Error(await k.text());return await k.json()}).then(k=>{b||o(k)}).catch(k=>{if(!b){const j=k instanceof Error?k.message:"";g(wu(j,"Could not check login state."))}}),()=>{b=!0}},[]);async function w(b){b.preventDefault(),x(!0),g(null);try{const k=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:i,password:d})}),j=await k.text();if(!k.ok){g(wu(j,"Login failed."));return}p("");try{o(JSON.parse(j))}catch{g(wu(j,"Login failed."))}}finally{x(!1)}}return r?!r.requiresLogin||r.authenticated?l.jsx(l.Fragment,{children:t}):l.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4 text-foreground",children:l.jsxs("form",{className:"w-full max-w-sm border border-border bg-card p-5",onSubmit:w,children:[l.jsxs("div",{className:"mb-5 space-y-1",children:[l.jsx("p",{className:"text-[10px] uppercase text-muted-foreground",children:"Remote access"}),l.jsx("h1",{className:"text-base font-semibold",children:"Sign in to oh-my-pr"})]}),r.loginConfigured?l.jsxs(l.Fragment,{children:[l.jsxs("label",{className:"mb-3 block text-xs",children:[l.jsx("span",{className:"mb-1 block text-muted-foreground",children:"Username"}),l.jsx("input",{className:"w-full border border-input bg-background px-3 py-2 text-sm text-foreground outline-none focus:border-ring",autoComplete:"username",value:i,onChange:b=>u(b.target.value)})]}),l.jsxs("label",{className:"mb-4 block text-xs",children:[l.jsx("span",{className:"mb-1 block text-muted-foreground",children:"Password"}),l.jsx("input",{className:"w-full border border-input bg-background px-3 py-2 text-sm text-foreground outline-none focus:border-ring",autoComplete:"current-password",type:"password",value:d,onChange:b=>p(b.target.value)})]}),h&&l.jsx("div",{className:"mb-4 border border-destructive bg-background p-3 text-xs text-destructive",children:h}),l.jsx("button",{className:"w-full border border-primary bg-primary px-3 py-2 text-sm font-medium text-primary-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:v,type:"submit",children:v?"Signing in":"Sign in"})]}):l.jsx("div",{className:"border border-warning-border bg-warning-muted p-3 text-xs text-warning-foreground",children:"Remote login is not configured on this server."})]})}):l.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4 text-foreground",children:l.jsx("div",{className:"border border-border px-4 py-3 text-xs uppercase text-muted-foreground",children:h??"Loading oh-my-pr"})})}function uj(){return l.jsxs(Lw,{children:[l.jsx(_r,{path:"/",component:MN}),l.jsx(_r,{path:"/settings",component:DN}),l.jsx(_r,{path:"/changelogs",component:WN}),l.jsx(_r,{path:"/releases",component:ZN}),l.jsx(_r,{path:"/logs",component:nj}),l.jsx(_r,{component:aj})]})}function cj(){return l.jsx(Eb,{attribute:"class",defaultTheme:"system",enableSystem:!0,children:l.jsx(cb,{client:ye,children:l.jsxs(aC,{children:[l.jsx(k1,{}),l.jsx(lj,{children:l.jsx(tm,{hook:rm,children:l.jsx(uj,{})})})]})})})}function dj(t){const r=new URL(t),o=r.hash,i=o.indexOf("?");if(i===-1)return null;const u=new URLSearchParams(r.search);return new URLSearchParams(o.slice(i)).forEach((p,h)=>{u.set(h.toLowerCase(),p)}),r.hash=o.slice(0,i),r.search=u.toString(),r.href}const fj="modulepreload",pj=function(t,r){return new URL(t,r).href},Bh={},hj=function(r,o,i){let u=Promise.resolve();if(o&&o.length>0){let v=function(x){return Promise.all(x.map(w=>Promise.resolve(w).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};const p=document.getElementsByTagName("link"),h=document.querySelector("meta[property=csp-nonce]"),g=h?.nonce||h?.getAttribute("nonce");u=v(o.map(x=>{if(x=pj(x,i),x in Bh)return;Bh[x]=!0;const w=x.endsWith(".css"),b=w?'[rel="stylesheet"]':"";if(i)for(let j=p.length-1;j>=0;j--){const C=p[j];if(C.href===x&&(!w||C.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${x}"]${b}`))return;const k=document.createElement("link");if(k.rel=w?"stylesheet":fj,w||(k.as="script"),k.crossOrigin="",k.href=x,g&&k.setAttribute("nonce",g),document.head.appendChild(k),w)return new Promise((j,C)=>{k.addEventListener("load",j),k.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${x}`)))})}))}function d(p){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=p,window.dispatchEvent(h),!h.defaultPrevented)throw p}return u.then(p=>{for(const h of p||[])h.status==="rejected"&&d(h.reason);return r().catch(d)})};function mj(){return typeof window<"u"&&"__TAURI_INTERNALS__"in window}let Io=null;function gj(t,r){try{const o=new URL(t,r);return o.protocol==="mailto:"||o.protocol==="tel:"?o.href:o.protocol!=="http:"&&o.protocol!=="https:"||o.origin===new URL(r).origin?null:o.href}catch{return null}}function vj(t){return t instanceof Element?t.closest("a[href]"):null}async function xj(t){const{invoke:r}=await hj(async()=>{const{invoke:o}=await import("./core-DV6XEvTN.js");return{invoke:o}},[],import.meta.url);await r("plugin:shell|open",{path:t})}function yj(t,r,o={}){if(t.defaultPrevented||t.button!==0)return!1;const i=(o.findAnchor??vj)(t.target);if(!i||i.hasAttribute("download"))return!1;const u=o.currentHref??window.location.href,d=gj(i.href,u);return d?(t.preventDefault(),Promise.resolve(r(d)).catch(p=>{console.warn("Failed to open external link in Tauri",p)}),!0):!1}function wj(){if(!mj()||typeof document>"u")return()=>{};if(Io)return Io;const t=r=>{yj(r,xj)};return document.addEventListener("click",t,!0),Io=()=>{document.removeEventListener("click",t,!0),Io=null},Io}wj();{const t=dj(window.location.href);t&&history.replaceState(history.state,"",t)}window.location.hash||(window.location.hash="#/");pw.createRoot(document.getElementById("root")).render(l.jsx(cj,{}));
|