oh-my-pr 2.2.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +72 -288
- package/bin/codefactory.cjs +30 -0
- package/dist/index.cjs +162 -66
- package/dist/public/assets/index-Bf60GYFI.js +8 -0
- package/dist/public/assets/index-CGoNFbJJ.css +1 -0
- package/dist/public/index.html +2 -2
- package/package.json +1 -1
- package/dist/public/assets/index-B5nWJt5i.js +0 -58
- package/dist/public/assets/index-BS64Pene.css +0 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
function sv(n,o){for(var s=0;s<o.length;s++){const l=o[s];if(typeof l!="string"&&!Array.isArray(l)){for(const u in l)if(u!=="default"&&!(u in n)){const f=Object.getOwnPropertyDescriptor(l,u);f&&Object.defineProperty(n,u,f.get?f:{enumerable:!0,get:()=>l[u]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))l(u);new MutationObserver(u=>{for(const f of u)if(f.type==="childList")for(const p of f.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&l(p)}).observe(document,{childList:!0,subtree:!0});function s(u){const f={};return u.integrity&&(f.integrity=u.integrity),u.referrerPolicy&&(f.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?f.credentials="include":u.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function l(u){if(u.ep)return;u.ep=!0;const f=s(u);fetch(u.href,f)}})();function sp(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var aa={exports:{}},yo={},ua={exports:{}},he={};var uf;function iv(){if(uf)return he;uf=1;var n=Symbol.for("react.element"),o=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),f=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"),S=Symbol.iterator;function k(P){return P===null||typeof P!="object"?null:(P=S&&P[S]||P["@@iterator"],typeof P=="function"?P:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,E={};function b(P,z,ue){this.props=P,this.context=z,this.refs=E,this.updater=ue||R}b.prototype.isReactComponent={},b.prototype.setState=function(P,z){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,z,"setState")},b.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function A(){}A.prototype=b.prototype;function M(P,z,ue){this.props=P,this.context=z,this.refs=E,this.updater=ue||R}var D=M.prototype=new A;D.constructor=M,j(D,b.prototype),D.isPureReactComponent=!0;var F=Array.isArray,W=Object.prototype.hasOwnProperty,Q={current:null},V={key:!0,ref:!0,__self:!0,__source:!0};function L(P,z,ue){var de,ge={},ve=null,xe=null;if(z!=null)for(de in z.ref!==void 0&&(xe=z.ref),z.key!==void 0&&(ve=""+z.key),z)W.call(z,de)&&!V.hasOwnProperty(de)&&(ge[de]=z[de]);var we=arguments.length-2;if(we===1)ge.children=ue;else if(1<we){for(var Ce=Array(we),Xe=0;Xe<we;Xe++)Ce[Xe]=arguments[Xe+2];ge.children=Ce}if(P&&P.defaultProps)for(de in we=P.defaultProps,we)ge[de]===void 0&&(ge[de]=we[de]);return{$$typeof:n,type:P,key:ve,ref:xe,props:ge,_owner:Q.current}}function se(P,z){return{$$typeof:n,type:P.type,key:z,ref:P.ref,props:P.props,_owner:P._owner}}function le(P){return typeof P=="object"&&P!==null&&P.$$typeof===n}function pe(P){var z={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(ue){return z[ue]})}var ee=/\/+/g;function ce(P,z){return typeof P=="object"&&P!==null&&P.key!=null?pe(""+P.key):z.toString(36)}function G(P,z,ue,de,ge){var ve=typeof P;(ve==="undefined"||ve==="boolean")&&(P=null);var xe=!1;if(P===null)xe=!0;else switch(ve){case"string":case"number":xe=!0;break;case"object":switch(P.$$typeof){case n:case o:xe=!0}}if(xe)return xe=P,ge=ge(xe),P=de===""?"."+ce(xe,0):de,F(ge)?(ue="",P!=null&&(ue=P.replace(ee,"$&/")+"/"),G(ge,z,ue,"",function(Xe){return Xe})):ge!=null&&(le(ge)&&(ge=se(ge,ue+(!ge.key||xe&&xe.key===ge.key?"":(""+ge.key).replace(ee,"$&/")+"/")+P)),z.push(ge)),1;if(xe=0,de=de===""?".":de+":",F(P))for(var we=0;we<P.length;we++){ve=P[we];var Ce=de+ce(ve,we);xe+=G(ve,z,ue,Ce,ge)}else if(Ce=k(P),typeof Ce=="function")for(P=Ce.call(P),we=0;!(ve=P.next()).done;)ve=ve.value,Ce=de+ce(ve,we++),xe+=G(ve,z,ue,Ce,ge);else if(ve==="object")throw z=String(P),Error("Objects are not valid as a React child (found: "+(z==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":z)+"). If you meant to render a collection of children, use an array instead.");return xe}function me(P,z,ue){if(P==null)return P;var de=[],ge=0;return G(P,de,"","",function(ve){return z.call(ue,ve,ge++)}),de}function ie(P){if(P._status===-1){var z=P._result;z=z(),z.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=z)}if(P._status===1)return P._result.default;throw P._result}var oe={current:null},I={transition:null},q={ReactCurrentDispatcher:oe,ReactCurrentBatchConfig:I,ReactCurrentOwner:Q};function K(){throw Error("act(...) is not supported in production builds of React.")}return he.Children={map:me,forEach:function(P,z,ue){me(P,function(){z.apply(this,arguments)},ue)},count:function(P){var z=0;return me(P,function(){z++}),z},toArray:function(P){return me(P,function(z){return z})||[]},only:function(P){if(!le(P))throw Error("React.Children.only expected to receive a single React element child.");return P}},he.Component=b,he.Fragment=s,he.Profiler=u,he.PureComponent=M,he.StrictMode=l,he.Suspense=g,he.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=q,he.act=K,he.cloneElement=function(P,z,ue){if(P==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+P+".");var de=j({},P.props),ge=P.key,ve=P.ref,xe=P._owner;if(z!=null){if(z.ref!==void 0&&(ve=z.ref,xe=Q.current),z.key!==void 0&&(ge=""+z.key),P.type&&P.type.defaultProps)var we=P.type.defaultProps;for(Ce in z)W.call(z,Ce)&&!V.hasOwnProperty(Ce)&&(de[Ce]=z[Ce]===void 0&&we!==void 0?we[Ce]:z[Ce])}var Ce=arguments.length-2;if(Ce===1)de.children=ue;else if(1<Ce){we=Array(Ce);for(var Xe=0;Xe<Ce;Xe++)we[Xe]=arguments[Xe+2];de.children=we}return{$$typeof:n,type:P.type,key:ge,ref:ve,props:de,_owner:xe}},he.createContext=function(P){return P={$$typeof:p,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},P.Provider={$$typeof:f,_context:P},P.Consumer=P},he.createElement=L,he.createFactory=function(P){var z=L.bind(null,P);return z.type=P,z},he.createRef=function(){return{current:null}},he.forwardRef=function(P){return{$$typeof:h,render:P}},he.isValidElement=le,he.lazy=function(P){return{$$typeof:x,_payload:{_status:-1,_result:P},_init:ie}},he.memo=function(P,z){return{$$typeof:v,type:P,compare:z===void 0?null:z}},he.startTransition=function(P){var z=I.transition;I.transition={};try{P()}finally{I.transition=z}},he.unstable_act=K,he.useCallback=function(P,z){return oe.current.useCallback(P,z)},he.useContext=function(P){return oe.current.useContext(P)},he.useDebugValue=function(){},he.useDeferredValue=function(P){return oe.current.useDeferredValue(P)},he.useEffect=function(P,z){return oe.current.useEffect(P,z)},he.useId=function(){return oe.current.useId()},he.useImperativeHandle=function(P,z,ue){return oe.current.useImperativeHandle(P,z,ue)},he.useInsertionEffect=function(P,z){return oe.current.useInsertionEffect(P,z)},he.useLayoutEffect=function(P,z){return oe.current.useLayoutEffect(P,z)},he.useMemo=function(P,z){return oe.current.useMemo(P,z)},he.useReducer=function(P,z,ue){return oe.current.useReducer(P,z,ue)},he.useRef=function(P){return oe.current.useRef(P)},he.useState=function(P){return oe.current.useState(P)},he.useSyncExternalStore=function(P,z,ue){return oe.current.useSyncExternalStore(P,z,ue)},he.useTransition=function(){return oe.current.useTransition()},he.version="18.3.1",he}var cf;function ti(){return cf||(cf=1,ua.exports=iv()),ua.exports}var df;function lv(){if(df)return yo;df=1;var n=ti(),o=Symbol.for("react.element"),s=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,u=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,f={key:!0,ref:!0,__self:!0,__source:!0};function p(h,g,v){var x,S={},k=null,R=null;v!==void 0&&(k=""+v),g.key!==void 0&&(k=""+g.key),g.ref!==void 0&&(R=g.ref);for(x in g)l.call(g,x)&&!f.hasOwnProperty(x)&&(S[x]=g[x]);if(h&&h.defaultProps)for(x in g=h.defaultProps,g)S[x]===void 0&&(S[x]=g[x]);return{$$typeof:o,type:h,key:k,ref:R,props:S,_owner:u.current}}return yo.Fragment=s,yo.jsx=p,yo.jsxs=p,yo}var ff;function av(){return ff||(ff=1,aa.exports=lv()),aa.exports}var d=av(),Us={},ca={exports:{}},st={},da={exports:{}},fa={};var pf;function uv(){return pf||(pf=1,(function(n){function o(I,q){var K=I.length;I.push(q);e:for(;0<K;){var P=K-1>>>1,z=I[P];if(0<u(z,q))I[P]=q,I[K]=z,K=P;else break e}}function s(I){return I.length===0?null:I[0]}function l(I){if(I.length===0)return null;var q=I[0],K=I.pop();if(K!==q){I[0]=K;e:for(var P=0,z=I.length,ue=z>>>1;P<ue;){var de=2*(P+1)-1,ge=I[de],ve=de+1,xe=I[ve];if(0>u(ge,K))ve<z&&0>u(xe,ge)?(I[P]=xe,I[ve]=K,P=ve):(I[P]=ge,I[de]=K,P=de);else if(ve<z&&0>u(xe,K))I[P]=xe,I[ve]=K,P=ve;else break e}}return q}function u(I,q){var K=I.sortIndex-q.sortIndex;return K!==0?K:I.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var p=Date,h=p.now();n.unstable_now=function(){return p.now()-h}}var g=[],v=[],x=1,S=null,k=3,R=!1,j=!1,E=!1,b=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function D(I){for(var q=s(v);q!==null;){if(q.callback===null)l(v);else if(q.startTime<=I)l(v),q.sortIndex=q.expirationTime,o(g,q);else break;q=s(v)}}function F(I){if(E=!1,D(I),!j)if(s(g)!==null)j=!0,ie(W);else{var q=s(v);q!==null&&oe(F,q.startTime-I)}}function W(I,q){j=!1,E&&(E=!1,A(L),L=-1),R=!0;var K=k;try{for(D(q),S=s(g);S!==null&&(!(S.expirationTime>q)||I&&!pe());){var P=S.callback;if(typeof P=="function"){S.callback=null,k=S.priorityLevel;var z=P(S.expirationTime<=q);q=n.unstable_now(),typeof z=="function"?S.callback=z:S===s(g)&&l(g),D(q)}else l(g);S=s(g)}if(S!==null)var ue=!0;else{var de=s(v);de!==null&&oe(F,de.startTime-q),ue=!1}return ue}finally{S=null,k=K,R=!1}}var Q=!1,V=null,L=-1,se=5,le=-1;function pe(){return!(n.unstable_now()-le<se)}function ee(){if(V!==null){var I=n.unstable_now();le=I;var q=!0;try{q=V(!0,I)}finally{q?ce():(Q=!1,V=null)}}else Q=!1}var ce;if(typeof M=="function")ce=function(){M(ee)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,me=G.port2;G.port1.onmessage=ee,ce=function(){me.postMessage(null)}}else ce=function(){b(ee,0)};function ie(I){V=I,Q||(Q=!0,ce())}function oe(I,q){L=b(function(){I(n.unstable_now())},q)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(I){I.callback=null},n.unstable_continueExecution=function(){j||R||(j=!0,ie(W))},n.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):se=0<I?Math.floor(1e3/I):5},n.unstable_getCurrentPriorityLevel=function(){return k},n.unstable_getFirstCallbackNode=function(){return s(g)},n.unstable_next=function(I){switch(k){case 1:case 2:case 3:var q=3;break;default:q=k}var K=k;k=q;try{return I()}finally{k=K}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(I,q){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var K=k;k=I;try{return q()}finally{k=K}},n.unstable_scheduleCallback=function(I,q,K){var P=n.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?P+K:P):K=P,I){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=K+z,I={id:x++,callback:q,priorityLevel:I,startTime:K,expirationTime:z,sortIndex:-1},K>P?(I.sortIndex=K,o(v,I),s(g)===null&&I===s(v)&&(E?(A(L),L=-1):E=!0,oe(F,K-P))):(I.sortIndex=z,o(g,I),j||R||(j=!0,ie(W))),I},n.unstable_shouldYield=pe,n.unstable_wrapCallback=function(I){var q=k;return function(){var K=k;k=q;try{return I.apply(this,arguments)}finally{k=K}}}})(fa)),fa}var hf;function cv(){return hf||(hf=1,da.exports=uv()),da.exports}var mf;function dv(){if(mf)return st;mf=1;var n=ti(),o=cv();function s(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var l=new Set,u={};function f(e,t){p(e,t),p(e+"Capture",t)}function p(e,t){for(u[e]=t,e=0;e<t.length;e++)l.add(t[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={},S={};function k(e){return g.call(S,e)?!0:g.call(x,e)?!1:v.test(e)?S[e]=!0:(x[e]=!0,!1)}function R(e,t,r,i){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return i?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function j(e,t,r,i){if(t===null||typeof t>"u"||R(e,t,r,i))return!0;if(i)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function E(e,t,r,i,a,c,m){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=i,this.attributeNamespace=a,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=c,this.removeEmptyString=m}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){b[e]=new E(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];b[t]=new E(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){b[e]=new E(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){b[e]=new E(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){b[e]=new E(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){b[e]=new E(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){b[e]=new E(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){b[e]=new E(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){b[e]=new E(e,5,!1,e.toLowerCase(),null,!1,!1)});var A=/[\-:]([a-z])/g;function M(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 t=e.replace(A,M);b[t]=new E(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(A,M);b[t]=new E(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(A,M);b[t]=new E(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){b[e]=new E(e,1,!1,e.toLowerCase(),null,!1,!1)}),b.xlinkHref=new E("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){b[e]=new E(e,1,!1,e.toLowerCase(),null,!0,!0)});function D(e,t,r,i){var a=b.hasOwnProperty(t)?b[t]:null;(a!==null?a.type!==0:i||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(j(t,r,a,i)&&(r=null),i||a===null?k(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):a.mustUseProperty?e[a.propertyName]=r===null?a.type===3?!1:"":r:(t=a.attributeName,i=a.attributeNamespace,r===null?e.removeAttribute(t):(a=a.type,r=a===3||a===4&&r===!0?"":""+r,i?e.setAttributeNS(i,t,r):e.setAttribute(t,r))))}var F=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,W=Symbol.for("react.element"),Q=Symbol.for("react.portal"),V=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),se=Symbol.for("react.profiler"),le=Symbol.for("react.provider"),pe=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),ce=Symbol.for("react.suspense"),G=Symbol.for("react.suspense_list"),me=Symbol.for("react.memo"),ie=Symbol.for("react.lazy"),oe=Symbol.for("react.offscreen"),I=Symbol.iterator;function q(e){return e===null||typeof e!="object"?null:(e=I&&e[I]||e["@@iterator"],typeof e=="function"?e:null)}var K=Object.assign,P;function z(e){if(P===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);P=t&&t[1]||""}return`
|
|
2
|
+
`+P+e}var ue=!1;function de(e,t){if(!e||ue)return"";ue=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(_){var i=_}Reflect.construct(e,[],t)}else{try{t.call()}catch(_){i=_}e.call(t.prototype)}else{try{throw Error()}catch(_){i=_}e()}}catch(_){if(_&&i&&typeof _.stack=="string"){for(var a=_.stack.split(`
|
|
3
|
+
`),c=i.stack.split(`
|
|
4
|
+
`),m=a.length-1,w=c.length-1;1<=m&&0<=w&&a[m]!==c[w];)w--;for(;1<=m&&0<=w;m--,w--)if(a[m]!==c[w]){if(m!==1||w!==1)do if(m--,w--,0>w||a[m]!==c[w]){var C=`
|
|
5
|
+
`+a[m].replace(" at new "," at ");return e.displayName&&C.includes("<anonymous>")&&(C=C.replace("<anonymous>",e.displayName)),C}while(1<=m&&0<=w);break}}}finally{ue=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?z(e):""}function ge(e){switch(e.tag){case 5:return z(e.type);case 16:return z("Lazy");case 13:return z("Suspense");case 19:return z("SuspenseList");case 0:case 2:case 15:return e=de(e.type,!1),e;case 11:return e=de(e.type.render,!1),e;case 1:return e=de(e.type,!0),e;default:return""}}function ve(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 V:return"Fragment";case Q:return"Portal";case se:return"Profiler";case L:return"StrictMode";case ce:return"Suspense";case G:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case pe:return(e.displayName||"Context")+".Consumer";case le:return(e._context.displayName||"Context")+".Provider";case ee:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case me:return t=e.displayName||null,t!==null?t:ve(e.type)||"Memo";case ie:t=e._payload,e=e._init;try{return ve(e(t))}catch{}}return null}function xe(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ve(t);case 8:return t===L?"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 t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function we(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ce(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Xe(e){var t=Ce(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var a=r.get,c=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(m){i=""+m,c.call(this,m)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return i},setValue:function(m){i=""+m},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Yn(e){e._valueTracker||(e._valueTracker=Xe(e))}function Oo(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),i="";return e&&(i=Ce(e)?e.checked?"true":"false":e.value),e=i,e!==r?(t.setValue(e),!0):!1}function Ht(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 mi(e,t){var r=t.checked;return K({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function mu(e,t){var r=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;r=we(t.value!=null?t.value:r),e._wrapperState={initialChecked:i,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function gu(e,t){t=t.checked,t!=null&&D(e,"checked",t,!1)}function gi(e,t){gu(e,t);var r=we(t.value),i=t.type;if(r!=null)i==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?vi(e,t.type,r):t.hasOwnProperty("defaultValue")&&vi(e,t.type,we(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function vu(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!(i!=="submit"&&i!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function vi(e,t,r){(t!=="number"||Ht(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var _r=Array.isArray;function Zn(e,t,r,i){if(e=e.options,t){t={};for(var a=0;a<r.length;a++)t["$"+r[a]]=!0;for(r=0;r<e.length;r++)a=t.hasOwnProperty("$"+e[r].value),e[r].selected!==a&&(e[r].selected=a),a&&i&&(e[r].defaultSelected=!0)}else{for(r=""+we(r),t=null,a=0;a<e.length;a++){if(e[a].value===r){e[a].selected=!0,i&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function yi(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(s(91));return K({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function yu(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(s(92));if(_r(r)){if(1<r.length)throw Error(s(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:we(r)}}function xu(e,t){var r=we(t.value),i=we(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),i!=null&&(e.defaultValue=""+i)}function wu(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Su(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 xi(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Su(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var _o,bu=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,i,a){MSApp.execUnsafeLocalFunction(function(){return e(t,r,i,a)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(_o=_o||document.createElement("div"),_o.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=_o.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ar(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Mr={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},um=["Webkit","ms","Moz","O"];Object.keys(Mr).forEach(function(e){um.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Mr[t]=Mr[e]})});function Cu(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Mr.hasOwnProperty(e)&&Mr[e]?(""+t).trim():t+"px"}function ku(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var i=r.indexOf("--")===0,a=Cu(r,t[r],i);r==="float"&&(r="cssFloat"),i?e.setProperty(r,a):e[r]=a}}var cm=K({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 wi(e,t){if(t){if(cm[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(s(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(s(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(s(61))}if(t.style!=null&&typeof t.style!="object")throw Error(s(62))}}function Si(e,t){if(e.indexOf("-")===-1)return typeof t.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 bi=null;function Ci(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ki=null,Jn=null,er=null;function Eu(e){if(e=no(e)){if(typeof ki!="function")throw Error(s(280));var t=e.stateNode;t&&(t=ts(t),ki(e.stateNode,e.type,t))}}function Nu(e){Jn?er?er.push(e):er=[e]:Jn=e}function Pu(){if(Jn){var e=Jn,t=er;if(er=Jn=null,Eu(e),t)for(e=0;e<t.length;e++)Eu(t[e])}}function Ru(e,t){return e(t)}function ju(){}var Ei=!1;function Tu(e,t,r){if(Ei)return e(t,r);Ei=!0;try{return Ru(e,t,r)}finally{Ei=!1,(Jn!==null||er!==null)&&(ju(),Pu())}}function Lr(e,t){var r=e.stateNode;if(r===null)return null;var i=ts(r);if(i===null)return null;r=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(s(231,t,typeof r));return r}var Ni=!1;if(h)try{var Ir={};Object.defineProperty(Ir,"passive",{get:function(){Ni=!0}}),window.addEventListener("test",Ir,Ir),window.removeEventListener("test",Ir,Ir)}catch{Ni=!1}function dm(e,t,r,i,a,c,m,w,C){var _=Array.prototype.slice.call(arguments,3);try{t.apply(r,_)}catch($){this.onError($)}}var Dr=!1,Ao=null,Mo=!1,Pi=null,fm={onError:function(e){Dr=!0,Ao=e}};function pm(e,t,r,i,a,c,m,w,C){Dr=!1,Ao=null,dm.apply(fm,arguments)}function hm(e,t,r,i,a,c,m,w,C){if(pm.apply(this,arguments),Dr){if(Dr){var _=Ao;Dr=!1,Ao=null}else throw Error(s(198));Mo||(Mo=!0,Pi=_)}}function jn(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function Ou(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function _u(e){if(jn(e)!==e)throw Error(s(188))}function mm(e){var t=e.alternate;if(!t){if(t=jn(e),t===null)throw Error(s(188));return t!==e?null:e}for(var r=e,i=t;;){var a=r.return;if(a===null)break;var c=a.alternate;if(c===null){if(i=a.return,i!==null){r=i;continue}break}if(a.child===c.child){for(c=a.child;c;){if(c===r)return _u(a),e;if(c===i)return _u(a),t;c=c.sibling}throw Error(s(188))}if(r.return!==i.return)r=a,i=c;else{for(var m=!1,w=a.child;w;){if(w===r){m=!0,r=a,i=c;break}if(w===i){m=!0,i=a,r=c;break}w=w.sibling}if(!m){for(w=c.child;w;){if(w===r){m=!0,r=c,i=a;break}if(w===i){m=!0,i=c,r=a;break}w=w.sibling}if(!m)throw Error(s(189))}}if(r.alternate!==i)throw Error(s(190))}if(r.tag!==3)throw Error(s(188));return r.stateNode.current===r?e:t}function Au(e){return e=mm(e),e!==null?Mu(e):null}function Mu(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Mu(e);if(t!==null)return t;e=e.sibling}return null}var Lu=o.unstable_scheduleCallback,Iu=o.unstable_cancelCallback,gm=o.unstable_shouldYield,vm=o.unstable_requestPaint,_e=o.unstable_now,ym=o.unstable_getCurrentPriorityLevel,Ri=o.unstable_ImmediatePriority,Du=o.unstable_UserBlockingPriority,Lo=o.unstable_NormalPriority,xm=o.unstable_LowPriority,Fu=o.unstable_IdlePriority,Io=null,_t=null;function wm(e){if(_t&&typeof _t.onCommitFiberRoot=="function")try{_t.onCommitFiberRoot(Io,e,void 0,(e.current.flags&128)===128)}catch{}}var bt=Math.clz32?Math.clz32:Cm,Sm=Math.log,bm=Math.LN2;function Cm(e){return e>>>=0,e===0?32:31-(Sm(e)/bm|0)|0}var Do=64,Fo=4194304;function Fr(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 zo(e,t){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,c=e.pingedLanes,m=r&268435455;if(m!==0){var w=m&~a;w!==0?i=Fr(w):(c&=m,c!==0&&(i=Fr(c)))}else m=r&~a,m!==0?i=Fr(m):c!==0&&(i=Fr(c));if(i===0)return 0;if(t!==0&&t!==i&&(t&a)===0&&(a=i&-i,c=t&-t,a>=c||a===16&&(c&4194240)!==0))return t;if((i&4)!==0&&(i|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=i;0<t;)r=31-bt(t),a=1<<r,i|=e[r],t&=~a;return i}function km(e,t){switch(e){case 1:case 2:case 4:return t+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 t+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 Em(e,t){for(var r=e.suspendedLanes,i=e.pingedLanes,a=e.expirationTimes,c=e.pendingLanes;0<c;){var m=31-bt(c),w=1<<m,C=a[m];C===-1?((w&r)===0||(w&i)!==0)&&(a[m]=km(w,t)):C<=t&&(e.expiredLanes|=w),c&=~w}}function ji(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function zu(){var e=Do;return Do<<=1,(Do&4194240)===0&&(Do=64),e}function Ti(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function zr(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-bt(t),e[t]=r}function Nm(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var i=e.eventTimes;for(e=e.expirationTimes;0<r;){var a=31-bt(r),c=1<<a;t[a]=0,i[a]=-1,e[a]=-1,r&=~c}}function Oi(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var i=31-bt(r),a=1<<i;a&t|e[i]&t&&(e[i]|=t),r&=~a}}var be=0;function Uu(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var $u,_i,Hu,Bu,Wu,Ai=!1,Uo=[],tn=null,nn=null,rn=null,Ur=new Map,$r=new Map,on=[],Pm="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 Vu(e,t){switch(e){case"focusin":case"focusout":tn=null;break;case"dragenter":case"dragleave":nn=null;break;case"mouseover":case"mouseout":rn=null;break;case"pointerover":case"pointerout":Ur.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":$r.delete(t.pointerId)}}function Hr(e,t,r,i,a,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:r,eventSystemFlags:i,nativeEvent:c,targetContainers:[a]},t!==null&&(t=no(t),t!==null&&_i(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function Rm(e,t,r,i,a){switch(t){case"focusin":return tn=Hr(tn,e,t,r,i,a),!0;case"dragenter":return nn=Hr(nn,e,t,r,i,a),!0;case"mouseover":return rn=Hr(rn,e,t,r,i,a),!0;case"pointerover":var c=a.pointerId;return Ur.set(c,Hr(Ur.get(c)||null,e,t,r,i,a)),!0;case"gotpointercapture":return c=a.pointerId,$r.set(c,Hr($r.get(c)||null,e,t,r,i,a)),!0}return!1}function Qu(e){var t=Tn(e.target);if(t!==null){var r=jn(t);if(r!==null){if(t=r.tag,t===13){if(t=Ou(r),t!==null){e.blockedOn=t,Wu(e.priority,function(){Hu(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function $o(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Li(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var i=new r.constructor(r.type,r);bi=i,r.target.dispatchEvent(i),bi=null}else return t=no(r),t!==null&&_i(t),e.blockedOn=r,!1;t.shift()}return!0}function Ku(e,t,r){$o(e)&&r.delete(t)}function jm(){Ai=!1,tn!==null&&$o(tn)&&(tn=null),nn!==null&&$o(nn)&&(nn=null),rn!==null&&$o(rn)&&(rn=null),Ur.forEach(Ku),$r.forEach(Ku)}function Br(e,t){e.blockedOn===t&&(e.blockedOn=null,Ai||(Ai=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,jm)))}function Wr(e){function t(a){return Br(a,e)}if(0<Uo.length){Br(Uo[0],e);for(var r=1;r<Uo.length;r++){var i=Uo[r];i.blockedOn===e&&(i.blockedOn=null)}}for(tn!==null&&Br(tn,e),nn!==null&&Br(nn,e),rn!==null&&Br(rn,e),Ur.forEach(t),$r.forEach(t),r=0;r<on.length;r++)i=on[r],i.blockedOn===e&&(i.blockedOn=null);for(;0<on.length&&(r=on[0],r.blockedOn===null);)Qu(r),r.blockedOn===null&&on.shift()}var tr=F.ReactCurrentBatchConfig,Ho=!0;function Tm(e,t,r,i){var a=be,c=tr.transition;tr.transition=null;try{be=1,Mi(e,t,r,i)}finally{be=a,tr.transition=c}}function Om(e,t,r,i){var a=be,c=tr.transition;tr.transition=null;try{be=4,Mi(e,t,r,i)}finally{be=a,tr.transition=c}}function Mi(e,t,r,i){if(Ho){var a=Li(e,t,r,i);if(a===null)Zi(e,t,i,Bo,r),Vu(e,i);else if(Rm(a,e,t,r,i))i.stopPropagation();else if(Vu(e,i),t&4&&-1<Pm.indexOf(e)){for(;a!==null;){var c=no(a);if(c!==null&&$u(c),c=Li(e,t,r,i),c===null&&Zi(e,t,i,Bo,r),c===a)break;a=c}a!==null&&i.stopPropagation()}else Zi(e,t,i,null,r)}}var Bo=null;function Li(e,t,r,i){if(Bo=null,e=Ci(i),e=Tn(e),e!==null)if(t=jn(e),t===null)e=null;else if(r=t.tag,r===13){if(e=Ou(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Bo=e,null}function qu(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(ym()){case Ri:return 1;case Du:return 4;case Lo:case xm:return 16;case Fu:return 536870912;default:return 16}default:return 16}}var sn=null,Ii=null,Wo=null;function Gu(){if(Wo)return Wo;var e,t=Ii,r=t.length,i,a="value"in sn?sn.value:sn.textContent,c=a.length;for(e=0;e<r&&t[e]===a[e];e++);var m=r-e;for(i=1;i<=m&&t[r-i]===a[c-i];i++);return Wo=a.slice(e,1<i?1-i:void 0)}function Vo(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Qo(){return!0}function Xu(){return!1}function it(e){function t(r,i,a,c,m){this._reactName=r,this._targetInst=a,this.type=i,this.nativeEvent=c,this.target=m,this.currentTarget=null;for(var w in e)e.hasOwnProperty(w)&&(r=e[w],this[w]=r?r(c):c[w]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?Qo:Xu,this.isPropagationStopped=Xu,this}return K(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Qo)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Qo)},persist:function(){},isPersistent:Qo}),t}var nr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Di=it(nr),Vr=K({},nr,{view:0,detail:0}),_m=it(Vr),Fi,zi,Qr,Ko=K({},Vr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:$i,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!==Qr&&(Qr&&e.type==="mousemove"?(Fi=e.screenX-Qr.screenX,zi=e.screenY-Qr.screenY):zi=Fi=0,Qr=e),Fi)},movementY:function(e){return"movementY"in e?e.movementY:zi}}),Yu=it(Ko),Am=K({},Ko,{dataTransfer:0}),Mm=it(Am),Lm=K({},Vr,{relatedTarget:0}),Ui=it(Lm),Im=K({},nr,{animationName:0,elapsedTime:0,pseudoElement:0}),Dm=it(Im),Fm=K({},nr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),zm=it(Fm),Um=K({},nr,{data:0}),Zu=it(Um),$m={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Hm={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"},Bm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Wm(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Bm[e])?!!t[e]:!1}function $i(){return Wm}var Vm=K({},Vr,{key:function(e){if(e.key){var t=$m[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Vo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Hm[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:$i,charCode:function(e){return e.type==="keypress"?Vo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Vo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Qm=it(Vm),Km=K({},Ko,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ju=it(Km),qm=K({},Vr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:$i}),Gm=it(qm),Xm=K({},nr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ym=it(Xm),Zm=K({},Ko,{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}),Jm=it(Zm),eg=[9,13,27,32],Hi=h&&"CompositionEvent"in window,Kr=null;h&&"documentMode"in document&&(Kr=document.documentMode);var tg=h&&"TextEvent"in window&&!Kr,ec=h&&(!Hi||Kr&&8<Kr&&11>=Kr),tc=" ",nc=!1;function rc(e,t){switch(e){case"keyup":return eg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function oc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var rr=!1;function ng(e,t){switch(e){case"compositionend":return oc(t);case"keypress":return t.which!==32?null:(nc=!0,tc);case"textInput":return e=t.data,e===tc&&nc?null:e;default:return null}}function rg(e,t){if(rr)return e==="compositionend"||!Hi&&rc(e,t)?(e=Gu(),Wo=Ii=sn=null,rr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return ec&&t.locale!=="ko"?null:t.data;default:return null}}var og={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 sc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!og[e.type]:t==="textarea"}function ic(e,t,r,i){Nu(i),t=Zo(t,"onChange"),0<t.length&&(r=new Di("onChange","change",null,r,i),e.push({event:r,listeners:t}))}var qr=null,Gr=null;function sg(e){kc(e,0)}function qo(e){var t=ar(e);if(Oo(t))return e}function ig(e,t){if(e==="change")return t}var lc=!1;if(h){var Bi;if(h){var Wi="oninput"in document;if(!Wi){var ac=document.createElement("div");ac.setAttribute("oninput","return;"),Wi=typeof ac.oninput=="function"}Bi=Wi}else Bi=!1;lc=Bi&&(!document.documentMode||9<document.documentMode)}function uc(){qr&&(qr.detachEvent("onpropertychange",cc),Gr=qr=null)}function cc(e){if(e.propertyName==="value"&&qo(Gr)){var t=[];ic(t,Gr,e,Ci(e)),Tu(sg,t)}}function lg(e,t,r){e==="focusin"?(uc(),qr=t,Gr=r,qr.attachEvent("onpropertychange",cc)):e==="focusout"&&uc()}function ag(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return qo(Gr)}function ug(e,t){if(e==="click")return qo(t)}function cg(e,t){if(e==="input"||e==="change")return qo(t)}function dg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ct=typeof Object.is=="function"?Object.is:dg;function Xr(e,t){if(Ct(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(i=0;i<r.length;i++){var a=r[i];if(!g.call(t,a)||!Ct(e[a],t[a]))return!1}return!0}function dc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fc(e,t){var r=dc(e);e=0;for(var i;r;){if(r.nodeType===3){if(i=e+r.textContent.length,e<=t&&i>=t)return{node:r,offset:t-e};e=i}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=dc(r)}}function pc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?pc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function hc(){for(var e=window,t=Ht();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Ht(e.document)}return t}function Vi(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function fg(e){var t=hc(),r=e.focusedElem,i=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&pc(r.ownerDocument.documentElement,r)){if(i!==null&&Vi(r)){if(t=i.start,e=i.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var a=r.textContent.length,c=Math.min(i.start,a);i=i.end===void 0?c:Math.min(i.end,a),!e.extend&&c>i&&(a=i,i=c,c=a),a=fc(r,c);var m=fc(r,i);a&&m&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==m.node||e.focusOffset!==m.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),c>i?(e.addRange(t),e.extend(m.node,m.offset)):(t.setEnd(m.node,m.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var pg=h&&"documentMode"in document&&11>=document.documentMode,or=null,Qi=null,Yr=null,Ki=!1;function mc(e,t,r){var i=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Ki||or==null||or!==Ht(i)||(i=or,"selectionStart"in i&&Vi(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),Yr&&Xr(Yr,i)||(Yr=i,i=Zo(Qi,"onSelect"),0<i.length&&(t=new Di("onSelect","select",null,t,r),e.push({event:t,listeners:i}),t.target=or)))}function Go(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var sr={animationend:Go("Animation","AnimationEnd"),animationiteration:Go("Animation","AnimationIteration"),animationstart:Go("Animation","AnimationStart"),transitionend:Go("Transition","TransitionEnd")},qi={},gc={};h&&(gc=document.createElement("div").style,"AnimationEvent"in window||(delete sr.animationend.animation,delete sr.animationiteration.animation,delete sr.animationstart.animation),"TransitionEvent"in window||delete sr.transitionend.transition);function Xo(e){if(qi[e])return qi[e];if(!sr[e])return e;var t=sr[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in gc)return qi[e]=t[r];return e}var vc=Xo("animationend"),yc=Xo("animationiteration"),xc=Xo("animationstart"),wc=Xo("transitionend"),Sc=new Map,bc="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 ln(e,t){Sc.set(e,t),f(t,[e])}for(var Gi=0;Gi<bc.length;Gi++){var Xi=bc[Gi],hg=Xi.toLowerCase(),mg=Xi[0].toUpperCase()+Xi.slice(1);ln(hg,"on"+mg)}ln(vc,"onAnimationEnd"),ln(yc,"onAnimationIteration"),ln(xc,"onAnimationStart"),ln("dblclick","onDoubleClick"),ln("focusin","onFocus"),ln("focusout","onBlur"),ln(wc,"onTransitionEnd"),p("onMouseEnter",["mouseout","mouseover"]),p("onMouseLeave",["mouseout","mouseover"]),p("onPointerEnter",["pointerout","pointerover"]),p("onPointerLeave",["pointerout","pointerover"]),f("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),f("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),f("onBeforeInput",["compositionend","keypress","textInput","paste"]),f("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),f("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),f("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Zr="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(" "),gg=new Set("cancel close invalid load scroll toggle".split(" ").concat(Zr));function Cc(e,t,r){var i=e.type||"unknown-event";e.currentTarget=r,hm(i,t,void 0,e),e.currentTarget=null}function kc(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var i=e[r],a=i.event;i=i.listeners;e:{var c=void 0;if(t)for(var m=i.length-1;0<=m;m--){var w=i[m],C=w.instance,_=w.currentTarget;if(w=w.listener,C!==c&&a.isPropagationStopped())break e;Cc(a,w,_),c=C}else for(m=0;m<i.length;m++){if(w=i[m],C=w.instance,_=w.currentTarget,w=w.listener,C!==c&&a.isPropagationStopped())break e;Cc(a,w,_),c=C}}}if(Mo)throw e=Pi,Mo=!1,Pi=null,e}function Ee(e,t){var r=t[ol];r===void 0&&(r=t[ol]=new Set);var i=e+"__bubble";r.has(i)||(Ec(t,e,2,!1),r.add(i))}function Yi(e,t,r){var i=0;t&&(i|=4),Ec(r,e,i,t)}var Yo="_reactListening"+Math.random().toString(36).slice(2);function Jr(e){if(!e[Yo]){e[Yo]=!0,l.forEach(function(r){r!=="selectionchange"&&(gg.has(r)||Yi(r,!1,e),Yi(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Yo]||(t[Yo]=!0,Yi("selectionchange",!1,t))}}function Ec(e,t,r,i){switch(qu(t)){case 1:var a=Tm;break;case 4:a=Om;break;default:a=Mi}r=a.bind(null,t,r,e),a=void 0,!Ni||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),i?a!==void 0?e.addEventListener(t,r,{capture:!0,passive:a}):e.addEventListener(t,r,!0):a!==void 0?e.addEventListener(t,r,{passive:a}):e.addEventListener(t,r,!1)}function Zi(e,t,r,i,a){var c=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var m=i.tag;if(m===3||m===4){var w=i.stateNode.containerInfo;if(w===a||w.nodeType===8&&w.parentNode===a)break;if(m===4)for(m=i.return;m!==null;){var C=m.tag;if((C===3||C===4)&&(C=m.stateNode.containerInfo,C===a||C.nodeType===8&&C.parentNode===a))return;m=m.return}for(;w!==null;){if(m=Tn(w),m===null)return;if(C=m.tag,C===5||C===6){i=c=m;continue e}w=w.parentNode}}i=i.return}Tu(function(){var _=c,$=Ci(r),H=[];e:{var U=Sc.get(e);if(U!==void 0){var X=Di,Z=e;switch(e){case"keypress":if(Vo(r)===0)break e;case"keydown":case"keyup":X=Qm;break;case"focusin":Z="focus",X=Ui;break;case"focusout":Z="blur",X=Ui;break;case"beforeblur":case"afterblur":X=Ui;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":X=Yu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":X=Mm;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":X=Gm;break;case vc:case yc:case xc:X=Dm;break;case wc:X=Ym;break;case"scroll":X=_m;break;case"wheel":X=Jm;break;case"copy":case"cut":case"paste":X=zm;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":X=Ju}var J=(t&4)!==0,Ae=!J&&e==="scroll",T=J?U!==null?U+"Capture":null:U;J=[];for(var N=_,O;N!==null;){O=N;var B=O.stateNode;if(O.tag===5&&B!==null&&(O=B,T!==null&&(B=Lr(N,T),B!=null&&J.push(eo(N,B,O)))),Ae)break;N=N.return}0<J.length&&(U=new X(U,Z,null,r,$),H.push({event:U,listeners:J}))}}if((t&7)===0){e:{if(U=e==="mouseover"||e==="pointerover",X=e==="mouseout"||e==="pointerout",U&&r!==bi&&(Z=r.relatedTarget||r.fromElement)&&(Tn(Z)||Z[Bt]))break e;if((X||U)&&(U=$.window===$?$:(U=$.ownerDocument)?U.defaultView||U.parentWindow:window,X?(Z=r.relatedTarget||r.toElement,X=_,Z=Z?Tn(Z):null,Z!==null&&(Ae=jn(Z),Z!==Ae||Z.tag!==5&&Z.tag!==6)&&(Z=null)):(X=null,Z=_),X!==Z)){if(J=Yu,B="onMouseLeave",T="onMouseEnter",N="mouse",(e==="pointerout"||e==="pointerover")&&(J=Ju,B="onPointerLeave",T="onPointerEnter",N="pointer"),Ae=X==null?U:ar(X),O=Z==null?U:ar(Z),U=new J(B,N+"leave",X,r,$),U.target=Ae,U.relatedTarget=O,B=null,Tn($)===_&&(J=new J(T,N+"enter",Z,r,$),J.target=O,J.relatedTarget=Ae,B=J),Ae=B,X&&Z)t:{for(J=X,T=Z,N=0,O=J;O;O=ir(O))N++;for(O=0,B=T;B;B=ir(B))O++;for(;0<N-O;)J=ir(J),N--;for(;0<O-N;)T=ir(T),O--;for(;N--;){if(J===T||T!==null&&J===T.alternate)break t;J=ir(J),T=ir(T)}J=null}else J=null;X!==null&&Nc(H,U,X,J,!1),Z!==null&&Ae!==null&&Nc(H,Ae,Z,J,!0)}}e:{if(U=_?ar(_):window,X=U.nodeName&&U.nodeName.toLowerCase(),X==="select"||X==="input"&&U.type==="file")var te=ig;else if(sc(U))if(lc)te=cg;else{te=ag;var ne=lg}else(X=U.nodeName)&&X.toLowerCase()==="input"&&(U.type==="checkbox"||U.type==="radio")&&(te=ug);if(te&&(te=te(e,_))){ic(H,te,r,$);break e}ne&&ne(e,U,_),e==="focusout"&&(ne=U._wrapperState)&&ne.controlled&&U.type==="number"&&vi(U,"number",U.value)}switch(ne=_?ar(_):window,e){case"focusin":(sc(ne)||ne.contentEditable==="true")&&(or=ne,Qi=_,Yr=null);break;case"focusout":Yr=Qi=or=null;break;case"mousedown":Ki=!0;break;case"contextmenu":case"mouseup":case"dragend":Ki=!1,mc(H,r,$);break;case"selectionchange":if(pg)break;case"keydown":case"keyup":mc(H,r,$)}var re;if(Hi)e:{switch(e){case"compositionstart":var ae="onCompositionStart";break e;case"compositionend":ae="onCompositionEnd";break e;case"compositionupdate":ae="onCompositionUpdate";break e}ae=void 0}else rr?rc(e,r)&&(ae="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(ae="onCompositionStart");ae&&(ec&&r.locale!=="ko"&&(rr||ae!=="onCompositionStart"?ae==="onCompositionEnd"&&rr&&(re=Gu()):(sn=$,Ii="value"in sn?sn.value:sn.textContent,rr=!0)),ne=Zo(_,ae),0<ne.length&&(ae=new Zu(ae,e,null,r,$),H.push({event:ae,listeners:ne}),re?ae.data=re:(re=oc(r),re!==null&&(ae.data=re)))),(re=tg?ng(e,r):rg(e,r))&&(_=Zo(_,"onBeforeInput"),0<_.length&&($=new Zu("onBeforeInput","beforeinput",null,r,$),H.push({event:$,listeners:_}),$.data=re))}kc(H,t)})}function eo(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Zo(e,t){for(var r=t+"Capture",i=[];e!==null;){var a=e,c=a.stateNode;a.tag===5&&c!==null&&(a=c,c=Lr(e,r),c!=null&&i.unshift(eo(e,c,a)),c=Lr(e,t),c!=null&&i.push(eo(e,c,a))),e=e.return}return i}function ir(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Nc(e,t,r,i,a){for(var c=t._reactName,m=[];r!==null&&r!==i;){var w=r,C=w.alternate,_=w.stateNode;if(C!==null&&C===i)break;w.tag===5&&_!==null&&(w=_,a?(C=Lr(r,c),C!=null&&m.unshift(eo(r,C,w))):a||(C=Lr(r,c),C!=null&&m.push(eo(r,C,w)))),r=r.return}m.length!==0&&e.push({event:t,listeners:m})}var vg=/\r\n?/g,yg=/\u0000|\uFFFD/g;function Pc(e){return(typeof e=="string"?e:""+e).replace(vg,`
|
|
6
|
+
`).replace(yg,"")}function Jo(e,t,r){if(t=Pc(t),Pc(e)!==t&&r)throw Error(s(425))}function es(){}var Ji=null,el=null;function tl(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var nl=typeof setTimeout=="function"?setTimeout:void 0,xg=typeof clearTimeout=="function"?clearTimeout:void 0,Rc=typeof Promise=="function"?Promise:void 0,wg=typeof queueMicrotask=="function"?queueMicrotask:typeof Rc<"u"?function(e){return Rc.resolve(null).then(e).catch(Sg)}:nl;function Sg(e){setTimeout(function(){throw e})}function rl(e,t){var r=t,i=0;do{var a=r.nextSibling;if(e.removeChild(r),a&&a.nodeType===8)if(r=a.data,r==="/$"){if(i===0){e.removeChild(a),Wr(t);return}i--}else r!=="$"&&r!=="$?"&&r!=="$!"||i++;r=a}while(r);Wr(t)}function an(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function jc(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var lr=Math.random().toString(36).slice(2),At="__reactFiber$"+lr,to="__reactProps$"+lr,Bt="__reactContainer$"+lr,ol="__reactEvents$"+lr,bg="__reactListeners$"+lr,Cg="__reactHandles$"+lr;function Tn(e){var t=e[At];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Bt]||r[At]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=jc(e);e!==null;){if(r=e[At])return r;e=jc(e)}return t}e=r,r=e.parentNode}return null}function no(e){return e=e[At]||e[Bt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ar(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(s(33))}function ts(e){return e[to]||null}var sl=[],ur=-1;function un(e){return{current:e}}function Ne(e){0>ur||(e.current=sl[ur],sl[ur]=null,ur--)}function ke(e,t){ur++,sl[ur]=e.current,e.current=t}var cn={},Qe=un(cn),et=un(!1),On=cn;function cr(e,t){var r=e.type.contextTypes;if(!r)return cn;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var a={},c;for(c in r)a[c]=t[c];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function tt(e){return e=e.childContextTypes,e!=null}function ns(){Ne(et),Ne(Qe)}function Tc(e,t,r){if(Qe.current!==cn)throw Error(s(168));ke(Qe,t),ke(et,r)}function Oc(e,t,r){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return r;i=i.getChildContext();for(var a in i)if(!(a in t))throw Error(s(108,xe(e)||"Unknown",a));return K({},r,i)}function rs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||cn,On=Qe.current,ke(Qe,e),ke(et,et.current),!0}function _c(e,t,r){var i=e.stateNode;if(!i)throw Error(s(169));r?(e=Oc(e,t,On),i.__reactInternalMemoizedMergedChildContext=e,Ne(et),Ne(Qe),ke(Qe,e)):Ne(et),ke(et,r)}var Wt=null,os=!1,il=!1;function Ac(e){Wt===null?Wt=[e]:Wt.push(e)}function kg(e){os=!0,Ac(e)}function dn(){if(!il&&Wt!==null){il=!0;var e=0,t=be;try{var r=Wt;for(be=1;e<r.length;e++){var i=r[e];do i=i(!0);while(i!==null)}Wt=null,os=!1}catch(a){throw Wt!==null&&(Wt=Wt.slice(e+1)),Lu(Ri,dn),a}finally{be=t,il=!1}}return null}var dr=[],fr=0,ss=null,is=0,pt=[],ht=0,_n=null,Vt=1,Qt="";function An(e,t){dr[fr++]=is,dr[fr++]=ss,ss=e,is=t}function Mc(e,t,r){pt[ht++]=Vt,pt[ht++]=Qt,pt[ht++]=_n,_n=e;var i=Vt;e=Qt;var a=32-bt(i)-1;i&=~(1<<a),r+=1;var c=32-bt(t)+a;if(30<c){var m=a-a%5;c=(i&(1<<m)-1).toString(32),i>>=m,a-=m,Vt=1<<32-bt(t)+a|r<<a|i,Qt=c+e}else Vt=1<<c|r<<a|i,Qt=e}function ll(e){e.return!==null&&(An(e,1),Mc(e,1,0))}function al(e){for(;e===ss;)ss=dr[--fr],dr[fr]=null,is=dr[--fr],dr[fr]=null;for(;e===_n;)_n=pt[--ht],pt[ht]=null,Qt=pt[--ht],pt[ht]=null,Vt=pt[--ht],pt[ht]=null}var lt=null,at=null,Re=!1,kt=null;function Lc(e,t){var r=yt(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function Ic(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,lt=e,at=an(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,lt=e,at=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=_n!==null?{id:Vt,overflow:Qt}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=yt(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,lt=e,at=null,!0):!1;default:return!1}}function ul(e){return(e.mode&1)!==0&&(e.flags&128)===0}function cl(e){if(Re){var t=at;if(t){var r=t;if(!Ic(e,t)){if(ul(e))throw Error(s(418));t=an(r.nextSibling);var i=lt;t&&Ic(e,t)?Lc(i,r):(e.flags=e.flags&-4097|2,Re=!1,lt=e)}}else{if(ul(e))throw Error(s(418));e.flags=e.flags&-4097|2,Re=!1,lt=e}}}function Dc(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;lt=e}function ls(e){if(e!==lt)return!1;if(!Re)return Dc(e),Re=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!tl(e.type,e.memoizedProps)),t&&(t=at)){if(ul(e))throw Fc(),Error(s(418));for(;t;)Lc(e,t),t=an(t.nextSibling)}if(Dc(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){at=an(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}at=null}}else at=lt?an(e.stateNode.nextSibling):null;return!0}function Fc(){for(var e=at;e;)e=an(e.nextSibling)}function pr(){at=lt=null,Re=!1}function dl(e){kt===null?kt=[e]:kt.push(e)}var Eg=F.ReactCurrentBatchConfig;function ro(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(s(309));var i=r.stateNode}if(!i)throw Error(s(147,e));var a=i,c=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===c?t.ref:(t=function(m){var w=a.refs;m===null?delete w[c]:w[c]=m},t._stringRef=c,t)}if(typeof e!="string")throw Error(s(284));if(!r._owner)throw Error(s(290,e))}return e}function as(e,t){throw e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function zc(e){var t=e._init;return t(e._payload)}function Uc(e){function t(T,N){if(e){var O=T.deletions;O===null?(T.deletions=[N],T.flags|=16):O.push(N)}}function r(T,N){if(!e)return null;for(;N!==null;)t(T,N),N=N.sibling;return null}function i(T,N){for(T=new Map;N!==null;)N.key!==null?T.set(N.key,N):T.set(N.index,N),N=N.sibling;return T}function a(T,N){return T=xn(T,N),T.index=0,T.sibling=null,T}function c(T,N,O){return T.index=O,e?(O=T.alternate,O!==null?(O=O.index,O<N?(T.flags|=2,N):O):(T.flags|=2,N)):(T.flags|=1048576,N)}function m(T){return e&&T.alternate===null&&(T.flags|=2),T}function w(T,N,O,B){return N===null||N.tag!==6?(N=na(O,T.mode,B),N.return=T,N):(N=a(N,O),N.return=T,N)}function C(T,N,O,B){var te=O.type;return te===V?$(T,N,O.props.children,B,O.key):N!==null&&(N.elementType===te||typeof te=="object"&&te!==null&&te.$$typeof===ie&&zc(te)===N.type)?(B=a(N,O.props),B.ref=ro(T,N,O),B.return=T,B):(B=_s(O.type,O.key,O.props,null,T.mode,B),B.ref=ro(T,N,O),B.return=T,B)}function _(T,N,O,B){return N===null||N.tag!==4||N.stateNode.containerInfo!==O.containerInfo||N.stateNode.implementation!==O.implementation?(N=ra(O,T.mode,B),N.return=T,N):(N=a(N,O.children||[]),N.return=T,N)}function $(T,N,O,B,te){return N===null||N.tag!==7?(N=$n(O,T.mode,B,te),N.return=T,N):(N=a(N,O),N.return=T,N)}function H(T,N,O){if(typeof N=="string"&&N!==""||typeof N=="number")return N=na(""+N,T.mode,O),N.return=T,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case W:return O=_s(N.type,N.key,N.props,null,T.mode,O),O.ref=ro(T,null,N),O.return=T,O;case Q:return N=ra(N,T.mode,O),N.return=T,N;case ie:var B=N._init;return H(T,B(N._payload),O)}if(_r(N)||q(N))return N=$n(N,T.mode,O,null),N.return=T,N;as(T,N)}return null}function U(T,N,O,B){var te=N!==null?N.key:null;if(typeof O=="string"&&O!==""||typeof O=="number")return te!==null?null:w(T,N,""+O,B);if(typeof O=="object"&&O!==null){switch(O.$$typeof){case W:return O.key===te?C(T,N,O,B):null;case Q:return O.key===te?_(T,N,O,B):null;case ie:return te=O._init,U(T,N,te(O._payload),B)}if(_r(O)||q(O))return te!==null?null:$(T,N,O,B,null);as(T,O)}return null}function X(T,N,O,B,te){if(typeof B=="string"&&B!==""||typeof B=="number")return T=T.get(O)||null,w(N,T,""+B,te);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case W:return T=T.get(B.key===null?O:B.key)||null,C(N,T,B,te);case Q:return T=T.get(B.key===null?O:B.key)||null,_(N,T,B,te);case ie:var ne=B._init;return X(T,N,O,ne(B._payload),te)}if(_r(B)||q(B))return T=T.get(O)||null,$(N,T,B,te,null);as(N,B)}return null}function Z(T,N,O,B){for(var te=null,ne=null,re=N,ae=N=0,He=null;re!==null&&ae<O.length;ae++){re.index>ae?(He=re,re=null):He=re.sibling;var Se=U(T,re,O[ae],B);if(Se===null){re===null&&(re=He);break}e&&re&&Se.alternate===null&&t(T,re),N=c(Se,N,ae),ne===null?te=Se:ne.sibling=Se,ne=Se,re=He}if(ae===O.length)return r(T,re),Re&&An(T,ae),te;if(re===null){for(;ae<O.length;ae++)re=H(T,O[ae],B),re!==null&&(N=c(re,N,ae),ne===null?te=re:ne.sibling=re,ne=re);return Re&&An(T,ae),te}for(re=i(T,re);ae<O.length;ae++)He=X(re,T,ae,O[ae],B),He!==null&&(e&&He.alternate!==null&&re.delete(He.key===null?ae:He.key),N=c(He,N,ae),ne===null?te=He:ne.sibling=He,ne=He);return e&&re.forEach(function(wn){return t(T,wn)}),Re&&An(T,ae),te}function J(T,N,O,B){var te=q(O);if(typeof te!="function")throw Error(s(150));if(O=te.call(O),O==null)throw Error(s(151));for(var ne=te=null,re=N,ae=N=0,He=null,Se=O.next();re!==null&&!Se.done;ae++,Se=O.next()){re.index>ae?(He=re,re=null):He=re.sibling;var wn=U(T,re,Se.value,B);if(wn===null){re===null&&(re=He);break}e&&re&&wn.alternate===null&&t(T,re),N=c(wn,N,ae),ne===null?te=wn:ne.sibling=wn,ne=wn,re=He}if(Se.done)return r(T,re),Re&&An(T,ae),te;if(re===null){for(;!Se.done;ae++,Se=O.next())Se=H(T,Se.value,B),Se!==null&&(N=c(Se,N,ae),ne===null?te=Se:ne.sibling=Se,ne=Se);return Re&&An(T,ae),te}for(re=i(T,re);!Se.done;ae++,Se=O.next())Se=X(re,T,ae,Se.value,B),Se!==null&&(e&&Se.alternate!==null&&re.delete(Se.key===null?ae:Se.key),N=c(Se,N,ae),ne===null?te=Se:ne.sibling=Se,ne=Se);return e&&re.forEach(function(ov){return t(T,ov)}),Re&&An(T,ae),te}function Ae(T,N,O,B){if(typeof O=="object"&&O!==null&&O.type===V&&O.key===null&&(O=O.props.children),typeof O=="object"&&O!==null){switch(O.$$typeof){case W:e:{for(var te=O.key,ne=N;ne!==null;){if(ne.key===te){if(te=O.type,te===V){if(ne.tag===7){r(T,ne.sibling),N=a(ne,O.props.children),N.return=T,T=N;break e}}else if(ne.elementType===te||typeof te=="object"&&te!==null&&te.$$typeof===ie&&zc(te)===ne.type){r(T,ne.sibling),N=a(ne,O.props),N.ref=ro(T,ne,O),N.return=T,T=N;break e}r(T,ne);break}else t(T,ne);ne=ne.sibling}O.type===V?(N=$n(O.props.children,T.mode,B,O.key),N.return=T,T=N):(B=_s(O.type,O.key,O.props,null,T.mode,B),B.ref=ro(T,N,O),B.return=T,T=B)}return m(T);case Q:e:{for(ne=O.key;N!==null;){if(N.key===ne)if(N.tag===4&&N.stateNode.containerInfo===O.containerInfo&&N.stateNode.implementation===O.implementation){r(T,N.sibling),N=a(N,O.children||[]),N.return=T,T=N;break e}else{r(T,N);break}else t(T,N);N=N.sibling}N=ra(O,T.mode,B),N.return=T,T=N}return m(T);case ie:return ne=O._init,Ae(T,N,ne(O._payload),B)}if(_r(O))return Z(T,N,O,B);if(q(O))return J(T,N,O,B);as(T,O)}return typeof O=="string"&&O!==""||typeof O=="number"?(O=""+O,N!==null&&N.tag===6?(r(T,N.sibling),N=a(N,O),N.return=T,T=N):(r(T,N),N=na(O,T.mode,B),N.return=T,T=N),m(T)):r(T,N)}return Ae}var hr=Uc(!0),$c=Uc(!1),us=un(null),cs=null,mr=null,fl=null;function pl(){fl=mr=cs=null}function hl(e){var t=us.current;Ne(us),e._currentValue=t}function ml(e,t,r){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===r)break;e=e.return}}function gr(e,t){cs=e,fl=mr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(nt=!0),e.firstContext=null)}function mt(e){var t=e._currentValue;if(fl!==e)if(e={context:e,memoizedValue:t,next:null},mr===null){if(cs===null)throw Error(s(308));mr=e,cs.dependencies={lanes:0,firstContext:e}}else mr=mr.next=e;return t}var Mn=null;function gl(e){Mn===null?Mn=[e]:Mn.push(e)}function Hc(e,t,r,i){var a=t.interleaved;return a===null?(r.next=r,gl(t)):(r.next=a.next,a.next=r),t.interleaved=r,Kt(e,i)}function Kt(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var fn=!1;function vl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Bc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function qt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function pn(e,t,r){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(ye&2)!==0){var a=i.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),i.pending=t,Kt(e,r)}return a=i.interleaved,a===null?(t.next=t,gl(i)):(t.next=a.next,a.next=t),i.interleaved=t,Kt(e,r)}function ds(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,Oi(e,r)}}function Wc(e,t){var r=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,r===i)){var a=null,c=null;if(r=r.firstBaseUpdate,r!==null){do{var m={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};c===null?a=c=m:c=c.next=m,r=r.next}while(r!==null);c===null?a=c=t:c=c.next=t}else a=c=t;r={baseState:i.baseState,firstBaseUpdate:a,lastBaseUpdate:c,shared:i.shared,effects:i.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function fs(e,t,r,i){var a=e.updateQueue;fn=!1;var c=a.firstBaseUpdate,m=a.lastBaseUpdate,w=a.shared.pending;if(w!==null){a.shared.pending=null;var C=w,_=C.next;C.next=null,m===null?c=_:m.next=_,m=C;var $=e.alternate;$!==null&&($=$.updateQueue,w=$.lastBaseUpdate,w!==m&&(w===null?$.firstBaseUpdate=_:w.next=_,$.lastBaseUpdate=C))}if(c!==null){var H=a.baseState;m=0,$=_=C=null,w=c;do{var U=w.lane,X=w.eventTime;if((i&U)===U){$!==null&&($=$.next={eventTime:X,lane:0,tag:w.tag,payload:w.payload,callback:w.callback,next:null});e:{var Z=e,J=w;switch(U=t,X=r,J.tag){case 1:if(Z=J.payload,typeof Z=="function"){H=Z.call(X,H,U);break e}H=Z;break e;case 3:Z.flags=Z.flags&-65537|128;case 0:if(Z=J.payload,U=typeof Z=="function"?Z.call(X,H,U):Z,U==null)break e;H=K({},H,U);break e;case 2:fn=!0}}w.callback!==null&&w.lane!==0&&(e.flags|=64,U=a.effects,U===null?a.effects=[w]:U.push(w))}else X={eventTime:X,lane:U,tag:w.tag,payload:w.payload,callback:w.callback,next:null},$===null?(_=$=X,C=H):$=$.next=X,m|=U;if(w=w.next,w===null){if(w=a.shared.pending,w===null)break;U=w,w=U.next,U.next=null,a.lastBaseUpdate=U,a.shared.pending=null}}while(!0);if($===null&&(C=H),a.baseState=C,a.firstBaseUpdate=_,a.lastBaseUpdate=$,t=a.shared.interleaved,t!==null){a=t;do m|=a.lane,a=a.next;while(a!==t)}else c===null&&(a.shared.lanes=0);Dn|=m,e.lanes=m,e.memoizedState=H}}function Vc(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],a=i.callback;if(a!==null){if(i.callback=null,i=r,typeof a!="function")throw Error(s(191,a));a.call(i)}}}var oo={},Mt=un(oo),so=un(oo),io=un(oo);function Ln(e){if(e===oo)throw Error(s(174));return e}function yl(e,t){switch(ke(io,t),ke(so,e),ke(Mt,oo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:xi(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=xi(t,e)}Ne(Mt),ke(Mt,t)}function vr(){Ne(Mt),Ne(so),Ne(io)}function Qc(e){Ln(io.current);var t=Ln(Mt.current),r=xi(t,e.type);t!==r&&(ke(so,e),ke(Mt,r))}function xl(e){so.current===e&&(Ne(Mt),Ne(so))}var je=un(0);function ps(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var wl=[];function Sl(){for(var e=0;e<wl.length;e++)wl[e]._workInProgressVersionPrimary=null;wl.length=0}var hs=F.ReactCurrentDispatcher,bl=F.ReactCurrentBatchConfig,In=0,Te=null,De=null,Ue=null,ms=!1,lo=!1,ao=0,Ng=0;function Ke(){throw Error(s(321))}function Cl(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Ct(e[r],t[r]))return!1;return!0}function kl(e,t,r,i,a,c){if(In=c,Te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,hs.current=e===null||e.memoizedState===null?Tg:Og,e=r(i,a),lo){c=0;do{if(lo=!1,ao=0,25<=c)throw Error(s(301));c+=1,Ue=De=null,t.updateQueue=null,hs.current=_g,e=r(i,a)}while(lo)}if(hs.current=ys,t=De!==null&&De.next!==null,In=0,Ue=De=Te=null,ms=!1,t)throw Error(s(300));return e}function El(){var e=ao!==0;return ao=0,e}function Lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ue===null?Te.memoizedState=Ue=e:Ue=Ue.next=e,Ue}function gt(){if(De===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=De.next;var t=Ue===null?Te.memoizedState:Ue.next;if(t!==null)Ue=t,De=e;else{if(e===null)throw Error(s(310));De=e,e={memoizedState:De.memoizedState,baseState:De.baseState,baseQueue:De.baseQueue,queue:De.queue,next:null},Ue===null?Te.memoizedState=Ue=e:Ue=Ue.next=e}return Ue}function uo(e,t){return typeof t=="function"?t(e):t}function Nl(e){var t=gt(),r=t.queue;if(r===null)throw Error(s(311));r.lastRenderedReducer=e;var i=De,a=i.baseQueue,c=r.pending;if(c!==null){if(a!==null){var m=a.next;a.next=c.next,c.next=m}i.baseQueue=a=c,r.pending=null}if(a!==null){c=a.next,i=i.baseState;var w=m=null,C=null,_=c;do{var $=_.lane;if((In&$)===$)C!==null&&(C=C.next={lane:0,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null}),i=_.hasEagerState?_.eagerState:e(i,_.action);else{var H={lane:$,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null};C===null?(w=C=H,m=i):C=C.next=H,Te.lanes|=$,Dn|=$}_=_.next}while(_!==null&&_!==c);C===null?m=i:C.next=w,Ct(i,t.memoizedState)||(nt=!0),t.memoizedState=i,t.baseState=m,t.baseQueue=C,r.lastRenderedState=i}if(e=r.interleaved,e!==null){a=e;do c=a.lane,Te.lanes|=c,Dn|=c,a=a.next;while(a!==e)}else a===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Pl(e){var t=gt(),r=t.queue;if(r===null)throw Error(s(311));r.lastRenderedReducer=e;var i=r.dispatch,a=r.pending,c=t.memoizedState;if(a!==null){r.pending=null;var m=a=a.next;do c=e(c,m.action),m=m.next;while(m!==a);Ct(c,t.memoizedState)||(nt=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),r.lastRenderedState=c}return[c,i]}function Kc(){}function qc(e,t){var r=Te,i=gt(),a=t(),c=!Ct(i.memoizedState,a);if(c&&(i.memoizedState=a,nt=!0),i=i.queue,Rl(Yc.bind(null,r,i,e),[e]),i.getSnapshot!==t||c||Ue!==null&&Ue.memoizedState.tag&1){if(r.flags|=2048,co(9,Xc.bind(null,r,i,a,t),void 0,null),$e===null)throw Error(s(349));(In&30)!==0||Gc(r,t,a)}return a}function Gc(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Te.updateQueue,t===null?(t={lastEffect:null,stores:null},Te.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Xc(e,t,r,i){t.value=r,t.getSnapshot=i,Zc(t)&&Jc(e)}function Yc(e,t,r){return r(function(){Zc(t)&&Jc(e)})}function Zc(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Ct(e,r)}catch{return!0}}function Jc(e){var t=Kt(e,1);t!==null&&Rt(t,e,1,-1)}function ed(e){var t=Lt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:uo,lastRenderedState:e},t.queue=e,e=e.dispatch=jg.bind(null,Te,e),[t.memoizedState,e]}function co(e,t,r,i){return e={tag:e,create:t,destroy:r,deps:i,next:null},t=Te.updateQueue,t===null?(t={lastEffect:null,stores:null},Te.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(i=r.next,r.next=e,e.next=i,t.lastEffect=e)),e}function td(){return gt().memoizedState}function gs(e,t,r,i){var a=Lt();Te.flags|=e,a.memoizedState=co(1|t,r,void 0,i===void 0?null:i)}function vs(e,t,r,i){var a=gt();i=i===void 0?null:i;var c=void 0;if(De!==null){var m=De.memoizedState;if(c=m.destroy,i!==null&&Cl(i,m.deps)){a.memoizedState=co(t,r,c,i);return}}Te.flags|=e,a.memoizedState=co(1|t,r,c,i)}function nd(e,t){return gs(8390656,8,e,t)}function Rl(e,t){return vs(2048,8,e,t)}function rd(e,t){return vs(4,2,e,t)}function od(e,t){return vs(4,4,e,t)}function sd(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function id(e,t,r){return r=r!=null?r.concat([e]):null,vs(4,4,sd.bind(null,t,e),r)}function jl(){}function ld(e,t){var r=gt();t=t===void 0?null:t;var i=r.memoizedState;return i!==null&&t!==null&&Cl(t,i[1])?i[0]:(r.memoizedState=[e,t],e)}function ad(e,t){var r=gt();t=t===void 0?null:t;var i=r.memoizedState;return i!==null&&t!==null&&Cl(t,i[1])?i[0]:(e=e(),r.memoizedState=[e,t],e)}function ud(e,t,r){return(In&21)===0?(e.baseState&&(e.baseState=!1,nt=!0),e.memoizedState=r):(Ct(r,t)||(r=zu(),Te.lanes|=r,Dn|=r,e.baseState=!0),t)}function Pg(e,t){var r=be;be=r!==0&&4>r?r:4,e(!0);var i=bl.transition;bl.transition={};try{e(!1),t()}finally{be=r,bl.transition=i}}function cd(){return gt().memoizedState}function Rg(e,t,r){var i=vn(e);if(r={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null},dd(e))fd(t,r);else if(r=Hc(e,t,r,i),r!==null){var a=Ze();Rt(r,e,i,a),pd(r,t,i)}}function jg(e,t,r){var i=vn(e),a={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null};if(dd(e))fd(t,a);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var m=t.lastRenderedState,w=c(m,r);if(a.hasEagerState=!0,a.eagerState=w,Ct(w,m)){var C=t.interleaved;C===null?(a.next=a,gl(t)):(a.next=C.next,C.next=a),t.interleaved=a;return}}catch{}r=Hc(e,t,a,i),r!==null&&(a=Ze(),Rt(r,e,i,a),pd(r,t,i))}}function dd(e){var t=e.alternate;return e===Te||t!==null&&t===Te}function fd(e,t){lo=ms=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function pd(e,t,r){if((r&4194240)!==0){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,Oi(e,r)}}var ys={readContext:mt,useCallback:Ke,useContext:Ke,useEffect:Ke,useImperativeHandle:Ke,useInsertionEffect:Ke,useLayoutEffect:Ke,useMemo:Ke,useReducer:Ke,useRef:Ke,useState:Ke,useDebugValue:Ke,useDeferredValue:Ke,useTransition:Ke,useMutableSource:Ke,useSyncExternalStore:Ke,useId:Ke,unstable_isNewReconciler:!1},Tg={readContext:mt,useCallback:function(e,t){return Lt().memoizedState=[e,t===void 0?null:t],e},useContext:mt,useEffect:nd,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,gs(4194308,4,sd.bind(null,t,e),r)},useLayoutEffect:function(e,t){return gs(4194308,4,e,t)},useInsertionEffect:function(e,t){return gs(4,2,e,t)},useMemo:function(e,t){var r=Lt();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var i=Lt();return t=r!==void 0?r(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=Rg.bind(null,Te,e),[i.memoizedState,e]},useRef:function(e){var t=Lt();return e={current:e},t.memoizedState=e},useState:ed,useDebugValue:jl,useDeferredValue:function(e){return Lt().memoizedState=e},useTransition:function(){var e=ed(!1),t=e[0];return e=Pg.bind(null,e[1]),Lt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var i=Te,a=Lt();if(Re){if(r===void 0)throw Error(s(407));r=r()}else{if(r=t(),$e===null)throw Error(s(349));(In&30)!==0||Gc(i,t,r)}a.memoizedState=r;var c={value:r,getSnapshot:t};return a.queue=c,nd(Yc.bind(null,i,c,e),[e]),i.flags|=2048,co(9,Xc.bind(null,i,c,r,t),void 0,null),r},useId:function(){var e=Lt(),t=$e.identifierPrefix;if(Re){var r=Qt,i=Vt;r=(i&~(1<<32-bt(i)-1)).toString(32)+r,t=":"+t+"R"+r,r=ao++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=Ng++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Og={readContext:mt,useCallback:ld,useContext:mt,useEffect:Rl,useImperativeHandle:id,useInsertionEffect:rd,useLayoutEffect:od,useMemo:ad,useReducer:Nl,useRef:td,useState:function(){return Nl(uo)},useDebugValue:jl,useDeferredValue:function(e){var t=gt();return ud(t,De.memoizedState,e)},useTransition:function(){var e=Nl(uo)[0],t=gt().memoizedState;return[e,t]},useMutableSource:Kc,useSyncExternalStore:qc,useId:cd,unstable_isNewReconciler:!1},_g={readContext:mt,useCallback:ld,useContext:mt,useEffect:Rl,useImperativeHandle:id,useInsertionEffect:rd,useLayoutEffect:od,useMemo:ad,useReducer:Pl,useRef:td,useState:function(){return Pl(uo)},useDebugValue:jl,useDeferredValue:function(e){var t=gt();return De===null?t.memoizedState=e:ud(t,De.memoizedState,e)},useTransition:function(){var e=Pl(uo)[0],t=gt().memoizedState;return[e,t]},useMutableSource:Kc,useSyncExternalStore:qc,useId:cd,unstable_isNewReconciler:!1};function Et(e,t){if(e&&e.defaultProps){t=K({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Tl(e,t,r,i){t=e.memoizedState,r=r(i,t),r=r==null?t:K({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var xs={isMounted:function(e){return(e=e._reactInternals)?jn(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var i=Ze(),a=vn(e),c=qt(i,a);c.payload=t,r!=null&&(c.callback=r),t=pn(e,c,a),t!==null&&(Rt(t,e,a,i),ds(t,e,a))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var i=Ze(),a=vn(e),c=qt(i,a);c.tag=1,c.payload=t,r!=null&&(c.callback=r),t=pn(e,c,a),t!==null&&(Rt(t,e,a,i),ds(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Ze(),i=vn(e),a=qt(r,i);a.tag=2,t!=null&&(a.callback=t),t=pn(e,a,i),t!==null&&(Rt(t,e,i,r),ds(t,e,i))}};function hd(e,t,r,i,a,c,m){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,c,m):t.prototype&&t.prototype.isPureReactComponent?!Xr(r,i)||!Xr(a,c):!0}function md(e,t,r){var i=!1,a=cn,c=t.contextType;return typeof c=="object"&&c!==null?c=mt(c):(a=tt(t)?On:Qe.current,i=t.contextTypes,c=(i=i!=null)?cr(e,a):cn),t=new t(r,c),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=xs,e.stateNode=t,t._reactInternals=e,i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=c),t}function gd(e,t,r,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,i),t.state!==e&&xs.enqueueReplaceState(t,t.state,null)}function Ol(e,t,r,i){var a=e.stateNode;a.props=r,a.state=e.memoizedState,a.refs={},vl(e);var c=t.contextType;typeof c=="object"&&c!==null?a.context=mt(c):(c=tt(t)?On:Qe.current,a.context=cr(e,c)),a.state=e.memoizedState,c=t.getDerivedStateFromProps,typeof c=="function"&&(Tl(e,t,c,r),a.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(t=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),t!==a.state&&xs.enqueueReplaceState(a,a.state,null),fs(e,r,a,i),a.state=e.memoizedState),typeof a.componentDidMount=="function"&&(e.flags|=4194308)}function yr(e,t){try{var r="",i=t;do r+=ge(i),i=i.return;while(i);var a=r}catch(c){a=`
|
|
7
|
+
Error generating stack: `+c.message+`
|
|
8
|
+
`+c.stack}return{value:e,source:t,stack:a,digest:null}}function _l(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Al(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Ag=typeof WeakMap=="function"?WeakMap:Map;function vd(e,t,r){r=qt(-1,r),r.tag=3,r.payload={element:null};var i=t.value;return r.callback=function(){Ns||(Ns=!0,ql=i),Al(e,t)},r}function yd(e,t,r){r=qt(-1,r),r.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var a=t.value;r.payload=function(){return i(a)},r.callback=function(){Al(e,t)}}var c=e.stateNode;return c!==null&&typeof c.componentDidCatch=="function"&&(r.callback=function(){Al(e,t),typeof i!="function"&&(mn===null?mn=new Set([this]):mn.add(this));var m=t.stack;this.componentDidCatch(t.value,{componentStack:m!==null?m:""})}),r}function xd(e,t,r){var i=e.pingCache;if(i===null){i=e.pingCache=new Ag;var a=new Set;i.set(t,a)}else a=i.get(t),a===void 0&&(a=new Set,i.set(t,a));a.has(r)||(a.add(r),e=Kg.bind(null,e,t,r),t.then(e,e))}function wd(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Sd(e,t,r,i,a){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=qt(-1,1),t.tag=2,pn(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=a,e)}var Mg=F.ReactCurrentOwner,nt=!1;function Ye(e,t,r,i){t.child=e===null?$c(t,null,r,i):hr(t,e.child,r,i)}function bd(e,t,r,i,a){r=r.render;var c=t.ref;return gr(t,a),i=kl(e,t,r,i,c,a),r=El(),e!==null&&!nt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,Gt(e,t,a)):(Re&&r&&ll(t),t.flags|=1,Ye(e,t,i,a),t.child)}function Cd(e,t,r,i,a){if(e===null){var c=r.type;return typeof c=="function"&&!ta(c)&&c.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=c,kd(e,t,c,i,a)):(e=_s(r.type,null,i,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,(e.lanes&a)===0){var m=c.memoizedProps;if(r=r.compare,r=r!==null?r:Xr,r(m,i)&&e.ref===t.ref)return Gt(e,t,a)}return t.flags|=1,e=xn(c,i),e.ref=t.ref,e.return=t,t.child=e}function kd(e,t,r,i,a){if(e!==null){var c=e.memoizedProps;if(Xr(c,i)&&e.ref===t.ref)if(nt=!1,t.pendingProps=i=c,(e.lanes&a)!==0)(e.flags&131072)!==0&&(nt=!0);else return t.lanes=e.lanes,Gt(e,t,a)}return Ml(e,t,r,i,a)}function Ed(e,t,r){var i=t.pendingProps,a=i.children,c=e!==null?e.memoizedState:null;if(i.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ke(wr,ut),ut|=r;else{if((r&1073741824)===0)return e=c!==null?c.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ke(wr,ut),ut|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=c!==null?c.baseLanes:r,ke(wr,ut),ut|=i}else c!==null?(i=c.baseLanes|r,t.memoizedState=null):i=r,ke(wr,ut),ut|=i;return Ye(e,t,a,r),t.child}function Nd(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Ml(e,t,r,i,a){var c=tt(r)?On:Qe.current;return c=cr(t,c),gr(t,a),r=kl(e,t,r,i,c,a),i=El(),e!==null&&!nt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,Gt(e,t,a)):(Re&&i&&ll(t),t.flags|=1,Ye(e,t,r,a),t.child)}function Pd(e,t,r,i,a){if(tt(r)){var c=!0;rs(t)}else c=!1;if(gr(t,a),t.stateNode===null)Ss(e,t),md(t,r,i),Ol(t,r,i,a),i=!0;else if(e===null){var m=t.stateNode,w=t.memoizedProps;m.props=w;var C=m.context,_=r.contextType;typeof _=="object"&&_!==null?_=mt(_):(_=tt(r)?On:Qe.current,_=cr(t,_));var $=r.getDerivedStateFromProps,H=typeof $=="function"||typeof m.getSnapshotBeforeUpdate=="function";H||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(w!==i||C!==_)&&gd(t,m,i,_),fn=!1;var U=t.memoizedState;m.state=U,fs(t,i,m,a),C=t.memoizedState,w!==i||U!==C||et.current||fn?(typeof $=="function"&&(Tl(t,r,$,i),C=t.memoizedState),(w=fn||hd(t,r,w,i,U,C,_))?(H||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(t.flags|=4194308)):(typeof m.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=C),m.props=i,m.state=C,m.context=_,i=w):(typeof m.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{m=t.stateNode,Bc(e,t),w=t.memoizedProps,_=t.type===t.elementType?w:Et(t.type,w),m.props=_,H=t.pendingProps,U=m.context,C=r.contextType,typeof C=="object"&&C!==null?C=mt(C):(C=tt(r)?On:Qe.current,C=cr(t,C));var X=r.getDerivedStateFromProps;($=typeof X=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(w!==H||U!==C)&&gd(t,m,i,C),fn=!1,U=t.memoizedState,m.state=U,fs(t,i,m,a);var Z=t.memoizedState;w!==H||U!==Z||et.current||fn?(typeof X=="function"&&(Tl(t,r,X,i),Z=t.memoizedState),(_=fn||hd(t,r,_,i,U,Z,C)||!1)?($||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(i,Z,C),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(i,Z,C)),typeof m.componentDidUpdate=="function"&&(t.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof m.componentDidUpdate!="function"||w===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||w===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=Z),m.props=i,m.state=Z,m.context=C,i=_):(typeof m.componentDidUpdate!="function"||w===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||w===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),i=!1)}return Ll(e,t,r,i,c,a)}function Ll(e,t,r,i,a,c){Nd(e,t);var m=(t.flags&128)!==0;if(!i&&!m)return a&&_c(t,r,!1),Gt(e,t,c);i=t.stateNode,Mg.current=t;var w=m&&typeof r.getDerivedStateFromError!="function"?null:i.render();return t.flags|=1,e!==null&&m?(t.child=hr(t,e.child,null,c),t.child=hr(t,null,w,c)):Ye(e,t,w,c),t.memoizedState=i.state,a&&_c(t,r,!0),t.child}function Rd(e){var t=e.stateNode;t.pendingContext?Tc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Tc(e,t.context,!1),yl(e,t.containerInfo)}function jd(e,t,r,i,a){return pr(),dl(a),t.flags|=256,Ye(e,t,r,i),t.child}var Il={dehydrated:null,treeContext:null,retryLane:0};function Dl(e){return{baseLanes:e,cachePool:null,transitions:null}}function Td(e,t,r){var i=t.pendingProps,a=je.current,c=!1,m=(t.flags&128)!==0,w;if((w=m)||(w=e!==null&&e.memoizedState===null?!1:(a&2)!==0),w?(c=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(a|=1),ke(je,a&1),e===null)return cl(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(m=i.children,e=i.fallback,c?(i=t.mode,c=t.child,m={mode:"hidden",children:m},(i&1)===0&&c!==null?(c.childLanes=0,c.pendingProps=m):c=As(m,i,0,null),e=$n(e,i,r,null),c.return=t,e.return=t,c.sibling=e,t.child=c,t.child.memoizedState=Dl(r),t.memoizedState=Il,e):Fl(t,m));if(a=e.memoizedState,a!==null&&(w=a.dehydrated,w!==null))return Lg(e,t,m,i,w,a,r);if(c){c=i.fallback,m=t.mode,a=e.child,w=a.sibling;var C={mode:"hidden",children:i.children};return(m&1)===0&&t.child!==a?(i=t.child,i.childLanes=0,i.pendingProps=C,t.deletions=null):(i=xn(a,C),i.subtreeFlags=a.subtreeFlags&14680064),w!==null?c=xn(w,c):(c=$n(c,m,r,null),c.flags|=2),c.return=t,i.return=t,i.sibling=c,t.child=i,i=c,c=t.child,m=e.child.memoizedState,m=m===null?Dl(r):{baseLanes:m.baseLanes|r,cachePool:null,transitions:m.transitions},c.memoizedState=m,c.childLanes=e.childLanes&~r,t.memoizedState=Il,i}return c=e.child,e=c.sibling,i=xn(c,{mode:"visible",children:i.children}),(t.mode&1)===0&&(i.lanes=r),i.return=t,i.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=i,t.memoizedState=null,i}function Fl(e,t){return t=As({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ws(e,t,r,i){return i!==null&&dl(i),hr(t,e.child,null,r),e=Fl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Lg(e,t,r,i,a,c,m){if(r)return t.flags&256?(t.flags&=-257,i=_l(Error(s(422))),ws(e,t,m,i)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(c=i.fallback,a=t.mode,i=As({mode:"visible",children:i.children},a,0,null),c=$n(c,a,m,null),c.flags|=2,i.return=t,c.return=t,i.sibling=c,t.child=i,(t.mode&1)!==0&&hr(t,e.child,null,m),t.child.memoizedState=Dl(m),t.memoizedState=Il,c);if((t.mode&1)===0)return ws(e,t,m,null);if(a.data==="$!"){if(i=a.nextSibling&&a.nextSibling.dataset,i)var w=i.dgst;return i=w,c=Error(s(419)),i=_l(c,i,void 0),ws(e,t,m,i)}if(w=(m&e.childLanes)!==0,nt||w){if(i=$e,i!==null){switch(m&-m){case 4:a=2;break;case 16:a=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:a=32;break;case 536870912:a=268435456;break;default:a=0}a=(a&(i.suspendedLanes|m))!==0?0:a,a!==0&&a!==c.retryLane&&(c.retryLane=a,Kt(e,a),Rt(i,e,a,-1))}return ea(),i=_l(Error(s(421))),ws(e,t,m,i)}return a.data==="$?"?(t.flags|=128,t.child=e.child,t=qg.bind(null,e),a._reactRetry=t,null):(e=c.treeContext,at=an(a.nextSibling),lt=t,Re=!0,kt=null,e!==null&&(pt[ht++]=Vt,pt[ht++]=Qt,pt[ht++]=_n,Vt=e.id,Qt=e.overflow,_n=t),t=Fl(t,i.children),t.flags|=4096,t)}function Od(e,t,r){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),ml(e.return,t,r)}function zl(e,t,r,i,a){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:r,tailMode:a}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=i,c.tail=r,c.tailMode=a)}function _d(e,t,r){var i=t.pendingProps,a=i.revealOrder,c=i.tail;if(Ye(e,t,i.children,r),i=je.current,(i&2)!==0)i=i&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Od(e,r,t);else if(e.tag===19)Od(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}i&=1}if(ke(je,i),(t.mode&1)===0)t.memoizedState=null;else switch(a){case"forwards":for(r=t.child,a=null;r!==null;)e=r.alternate,e!==null&&ps(e)===null&&(a=r),r=r.sibling;r=a,r===null?(a=t.child,t.child=null):(a=r.sibling,r.sibling=null),zl(t,!1,a,r,c);break;case"backwards":for(r=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&ps(e)===null){t.child=a;break}e=a.sibling,a.sibling=r,r=a,a=e}zl(t,!0,r,null,c);break;case"together":zl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ss(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Gt(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Dn|=t.lanes,(r&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,r=xn(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=xn(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Ig(e,t,r){switch(t.tag){case 3:Rd(t),pr();break;case 5:Qc(t);break;case 1:tt(t.type)&&rs(t);break;case 4:yl(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,a=t.memoizedProps.value;ke(us,i._currentValue),i._currentValue=a;break;case 13:if(i=t.memoizedState,i!==null)return i.dehydrated!==null?(ke(je,je.current&1),t.flags|=128,null):(r&t.child.childLanes)!==0?Td(e,t,r):(ke(je,je.current&1),e=Gt(e,t,r),e!==null?e.sibling:null);ke(je,je.current&1);break;case 19:if(i=(r&t.childLanes)!==0,(e.flags&128)!==0){if(i)return _d(e,t,r);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),ke(je,je.current),i)break;return null;case 22:case 23:return t.lanes=0,Ed(e,t,r)}return Gt(e,t,r)}var Ad,Ul,Md,Ld;Ad=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}},Ul=function(){},Md=function(e,t,r,i){var a=e.memoizedProps;if(a!==i){e=t.stateNode,Ln(Mt.current);var c=null;switch(r){case"input":a=mi(e,a),i=mi(e,i),c=[];break;case"select":a=K({},a,{value:void 0}),i=K({},i,{value:void 0}),c=[];break;case"textarea":a=yi(e,a),i=yi(e,i),c=[];break;default:typeof a.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=es)}wi(r,i);var m;r=null;for(_ in a)if(!i.hasOwnProperty(_)&&a.hasOwnProperty(_)&&a[_]!=null)if(_==="style"){var w=a[_];for(m in w)w.hasOwnProperty(m)&&(r||(r={}),r[m]="")}else _!=="dangerouslySetInnerHTML"&&_!=="children"&&_!=="suppressContentEditableWarning"&&_!=="suppressHydrationWarning"&&_!=="autoFocus"&&(u.hasOwnProperty(_)?c||(c=[]):(c=c||[]).push(_,null));for(_ in i){var C=i[_];if(w=a?.[_],i.hasOwnProperty(_)&&C!==w&&(C!=null||w!=null))if(_==="style")if(w){for(m in w)!w.hasOwnProperty(m)||C&&C.hasOwnProperty(m)||(r||(r={}),r[m]="");for(m in C)C.hasOwnProperty(m)&&w[m]!==C[m]&&(r||(r={}),r[m]=C[m])}else r||(c||(c=[]),c.push(_,r)),r=C;else _==="dangerouslySetInnerHTML"?(C=C?C.__html:void 0,w=w?w.__html:void 0,C!=null&&w!==C&&(c=c||[]).push(_,C)):_==="children"?typeof C!="string"&&typeof C!="number"||(c=c||[]).push(_,""+C):_!=="suppressContentEditableWarning"&&_!=="suppressHydrationWarning"&&(u.hasOwnProperty(_)?(C!=null&&_==="onScroll"&&Ee("scroll",e),c||w===C||(c=[])):(c=c||[]).push(_,C))}r&&(c=c||[]).push("style",r);var _=c;(t.updateQueue=_)&&(t.flags|=4)}},Ld=function(e,t,r,i){r!==i&&(t.flags|=4)};function fo(e,t){if(!Re)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function qe(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,i=0;if(t)for(var a=e.child;a!==null;)r|=a.lanes|a.childLanes,i|=a.subtreeFlags&14680064,i|=a.flags&14680064,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)r|=a.lanes|a.childLanes,i|=a.subtreeFlags,i|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=i,e.childLanes=r,t}function Dg(e,t,r){var i=t.pendingProps;switch(al(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qe(t),null;case 1:return tt(t.type)&&ns(),qe(t),null;case 3:return i=t.stateNode,vr(),Ne(et),Ne(Qe),Sl(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(ls(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,kt!==null&&(Yl(kt),kt=null))),Ul(e,t),qe(t),null;case 5:xl(t);var a=Ln(io.current);if(r=t.type,e!==null&&t.stateNode!=null)Md(e,t,r,i,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(s(166));return qe(t),null}if(e=Ln(Mt.current),ls(t)){i=t.stateNode,r=t.type;var c=t.memoizedProps;switch(i[At]=t,i[to]=c,e=(t.mode&1)!==0,r){case"dialog":Ee("cancel",i),Ee("close",i);break;case"iframe":case"object":case"embed":Ee("load",i);break;case"video":case"audio":for(a=0;a<Zr.length;a++)Ee(Zr[a],i);break;case"source":Ee("error",i);break;case"img":case"image":case"link":Ee("error",i),Ee("load",i);break;case"details":Ee("toggle",i);break;case"input":mu(i,c),Ee("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!c.multiple},Ee("invalid",i);break;case"textarea":yu(i,c),Ee("invalid",i)}wi(r,c),a=null;for(var m in c)if(c.hasOwnProperty(m)){var w=c[m];m==="children"?typeof w=="string"?i.textContent!==w&&(c.suppressHydrationWarning!==!0&&Jo(i.textContent,w,e),a=["children",w]):typeof w=="number"&&i.textContent!==""+w&&(c.suppressHydrationWarning!==!0&&Jo(i.textContent,w,e),a=["children",""+w]):u.hasOwnProperty(m)&&w!=null&&m==="onScroll"&&Ee("scroll",i)}switch(r){case"input":Yn(i),vu(i,c,!0);break;case"textarea":Yn(i),wu(i);break;case"select":case"option":break;default:typeof c.onClick=="function"&&(i.onclick=es)}i=a,t.updateQueue=i,i!==null&&(t.flags|=4)}else{m=a.nodeType===9?a:a.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Su(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=m.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=m.createElement(r,{is:i.is}):(e=m.createElement(r),r==="select"&&(m=e,i.multiple?m.multiple=!0:i.size&&(m.size=i.size))):e=m.createElementNS(e,r),e[At]=t,e[to]=i,Ad(e,t,!1,!1),t.stateNode=e;e:{switch(m=Si(r,i),r){case"dialog":Ee("cancel",e),Ee("close",e),a=i;break;case"iframe":case"object":case"embed":Ee("load",e),a=i;break;case"video":case"audio":for(a=0;a<Zr.length;a++)Ee(Zr[a],e);a=i;break;case"source":Ee("error",e),a=i;break;case"img":case"image":case"link":Ee("error",e),Ee("load",e),a=i;break;case"details":Ee("toggle",e),a=i;break;case"input":mu(e,i),a=mi(e,i),Ee("invalid",e);break;case"option":a=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},a=K({},i,{value:void 0}),Ee("invalid",e);break;case"textarea":yu(e,i),a=yi(e,i),Ee("invalid",e);break;default:a=i}wi(r,a),w=a;for(c in w)if(w.hasOwnProperty(c)){var C=w[c];c==="style"?ku(e,C):c==="dangerouslySetInnerHTML"?(C=C?C.__html:void 0,C!=null&&bu(e,C)):c==="children"?typeof C=="string"?(r!=="textarea"||C!=="")&&Ar(e,C):typeof C=="number"&&Ar(e,""+C):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(u.hasOwnProperty(c)?C!=null&&c==="onScroll"&&Ee("scroll",e):C!=null&&D(e,c,C,m))}switch(r){case"input":Yn(e),vu(e,i,!1);break;case"textarea":Yn(e),wu(e);break;case"option":i.value!=null&&e.setAttribute("value",""+we(i.value));break;case"select":e.multiple=!!i.multiple,c=i.value,c!=null?Zn(e,!!i.multiple,c,!1):i.defaultValue!=null&&Zn(e,!!i.multiple,i.defaultValue,!0);break;default:typeof a.onClick=="function"&&(e.onclick=es)}switch(r){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return qe(t),null;case 6:if(e&&t.stateNode!=null)Ld(e,t,e.memoizedProps,i);else{if(typeof i!="string"&&t.stateNode===null)throw Error(s(166));if(r=Ln(io.current),Ln(Mt.current),ls(t)){if(i=t.stateNode,r=t.memoizedProps,i[At]=t,(c=i.nodeValue!==r)&&(e=lt,e!==null))switch(e.tag){case 3:Jo(i.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Jo(i.nodeValue,r,(e.mode&1)!==0)}c&&(t.flags|=4)}else i=(r.nodeType===9?r:r.ownerDocument).createTextNode(i),i[At]=t,t.stateNode=i}return qe(t),null;case 13:if(Ne(je),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Re&&at!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Fc(),pr(),t.flags|=98560,c=!1;else if(c=ls(t),i!==null&&i.dehydrated!==null){if(e===null){if(!c)throw Error(s(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(s(317));c[At]=t}else pr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;qe(t),c=!1}else kt!==null&&(Yl(kt),kt=null),c=!0;if(!c)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=r,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(je.current&1)!==0?Fe===0&&(Fe=3):ea())),t.updateQueue!==null&&(t.flags|=4),qe(t),null);case 4:return vr(),Ul(e,t),e===null&&Jr(t.stateNode.containerInfo),qe(t),null;case 10:return hl(t.type._context),qe(t),null;case 17:return tt(t.type)&&ns(),qe(t),null;case 19:if(Ne(je),c=t.memoizedState,c===null)return qe(t),null;if(i=(t.flags&128)!==0,m=c.rendering,m===null)if(i)fo(c,!1);else{if(Fe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(m=ps(e),m!==null){for(t.flags|=128,fo(c,!1),i=m.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=r,r=t.child;r!==null;)c=r,e=i,c.flags&=14680066,m=c.alternate,m===null?(c.childLanes=0,c.lanes=e,c.child=null,c.subtreeFlags=0,c.memoizedProps=null,c.memoizedState=null,c.updateQueue=null,c.dependencies=null,c.stateNode=null):(c.childLanes=m.childLanes,c.lanes=m.lanes,c.child=m.child,c.subtreeFlags=0,c.deletions=null,c.memoizedProps=m.memoizedProps,c.memoizedState=m.memoizedState,c.updateQueue=m.updateQueue,c.type=m.type,e=m.dependencies,c.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return ke(je,je.current&1|2),t.child}e=e.sibling}c.tail!==null&&_e()>Sr&&(t.flags|=128,i=!0,fo(c,!1),t.lanes=4194304)}else{if(!i)if(e=ps(m),e!==null){if(t.flags|=128,i=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),fo(c,!0),c.tail===null&&c.tailMode==="hidden"&&!m.alternate&&!Re)return qe(t),null}else 2*_e()-c.renderingStartTime>Sr&&r!==1073741824&&(t.flags|=128,i=!0,fo(c,!1),t.lanes=4194304);c.isBackwards?(m.sibling=t.child,t.child=m):(r=c.last,r!==null?r.sibling=m:t.child=m,c.last=m)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=_e(),t.sibling=null,r=je.current,ke(je,i?r&1|2:r&1),t):(qe(t),null);case 22:case 23:return Jl(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&(t.mode&1)!==0?(ut&1073741824)!==0&&(qe(t),t.subtreeFlags&6&&(t.flags|=8192)):qe(t),null;case 24:return null;case 25:return null}throw Error(s(156,t.tag))}function Fg(e,t){switch(al(t),t.tag){case 1:return tt(t.type)&&ns(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return vr(),Ne(et),Ne(Qe),Sl(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return xl(t),null;case 13:if(Ne(je),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));pr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ne(je),null;case 4:return vr(),null;case 10:return hl(t.type._context),null;case 22:case 23:return Jl(),null;case 24:return null;default:return null}}var bs=!1,Ge=!1,zg=typeof WeakSet=="function"?WeakSet:Set,Y=null;function xr(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(i){Oe(e,t,i)}else r.current=null}function $l(e,t,r){try{r()}catch(i){Oe(e,t,i)}}var Id=!1;function Ug(e,t){if(Ji=Ho,e=hc(),Vi(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,c=i.focusNode;i=i.focusOffset;try{r.nodeType,c.nodeType}catch{r=null;break e}var m=0,w=-1,C=-1,_=0,$=0,H=e,U=null;t:for(;;){for(var X;H!==r||a!==0&&H.nodeType!==3||(w=m+a),H!==c||i!==0&&H.nodeType!==3||(C=m+i),H.nodeType===3&&(m+=H.nodeValue.length),(X=H.firstChild)!==null;)U=H,H=X;for(;;){if(H===e)break t;if(U===r&&++_===a&&(w=m),U===c&&++$===i&&(C=m),(X=H.nextSibling)!==null)break;H=U,U=H.parentNode}H=X}r=w===-1||C===-1?null:{start:w,end:C}}else r=null}r=r||{start:0,end:0}}else r=null;for(el={focusedElem:e,selectionRange:r},Ho=!1,Y=t;Y!==null;)if(t=Y,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Y=e;else for(;Y!==null;){t=Y;try{var Z=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(Z!==null){var J=Z.memoizedProps,Ae=Z.memoizedState,T=t.stateNode,N=T.getSnapshotBeforeUpdate(t.elementType===t.type?J:Et(t.type,J),Ae);T.__reactInternalSnapshotBeforeUpdate=N}break;case 3:var O=t.stateNode.containerInfo;O.nodeType===1?O.textContent="":O.nodeType===9&&O.documentElement&&O.removeChild(O.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(B){Oe(t,t.return,B)}if(e=t.sibling,e!==null){e.return=t.return,Y=e;break}Y=t.return}return Z=Id,Id=!1,Z}function po(e,t,r){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var a=i=i.next;do{if((a.tag&e)===e){var c=a.destroy;a.destroy=void 0,c!==void 0&&$l(t,r,c)}a=a.next}while(a!==i)}}function Cs(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var i=r.create;r.destroy=i()}r=r.next}while(r!==t)}}function Hl(e){var t=e.ref;if(t!==null){var r=e.stateNode;e.tag,e=r,typeof t=="function"?t(e):t.current=e}}function Dd(e){var t=e.alternate;t!==null&&(e.alternate=null,Dd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[At],delete t[to],delete t[ol],delete t[bg],delete t[Cg])),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 Fd(e){return e.tag===5||e.tag===3||e.tag===4}function zd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Fd(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 Bl(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=es));else if(i!==4&&(e=e.child,e!==null))for(Bl(e,t,r),e=e.sibling;e!==null;)Bl(e,t,r),e=e.sibling}function Wl(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(Wl(e,t,r),e=e.sibling;e!==null;)Wl(e,t,r),e=e.sibling}var Be=null,Nt=!1;function hn(e,t,r){for(r=r.child;r!==null;)Ud(e,t,r),r=r.sibling}function Ud(e,t,r){if(_t&&typeof _t.onCommitFiberUnmount=="function")try{_t.onCommitFiberUnmount(Io,r)}catch{}switch(r.tag){case 5:Ge||xr(r,t);case 6:var i=Be,a=Nt;Be=null,hn(e,t,r),Be=i,Nt=a,Be!==null&&(Nt?(e=Be,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Be.removeChild(r.stateNode));break;case 18:Be!==null&&(Nt?(e=Be,r=r.stateNode,e.nodeType===8?rl(e.parentNode,r):e.nodeType===1&&rl(e,r),Wr(e)):rl(Be,r.stateNode));break;case 4:i=Be,a=Nt,Be=r.stateNode.containerInfo,Nt=!0,hn(e,t,r),Be=i,Nt=a;break;case 0:case 11:case 14:case 15:if(!Ge&&(i=r.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){a=i=i.next;do{var c=a,m=c.destroy;c=c.tag,m!==void 0&&((c&2)!==0||(c&4)!==0)&&$l(r,t,m),a=a.next}while(a!==i)}hn(e,t,r);break;case 1:if(!Ge&&(xr(r,t),i=r.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=r.memoizedProps,i.state=r.memoizedState,i.componentWillUnmount()}catch(w){Oe(r,t,w)}hn(e,t,r);break;case 21:hn(e,t,r);break;case 22:r.mode&1?(Ge=(i=Ge)||r.memoizedState!==null,hn(e,t,r),Ge=i):hn(e,t,r);break;default:hn(e,t,r)}}function $d(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new zg),t.forEach(function(i){var a=Gg.bind(null,e,i);r.has(i)||(r.add(i),i.then(a,a))})}}function Pt(e,t){var r=t.deletions;if(r!==null)for(var i=0;i<r.length;i++){var a=r[i];try{var c=e,m=t,w=m;e:for(;w!==null;){switch(w.tag){case 5:Be=w.stateNode,Nt=!1;break e;case 3:Be=w.stateNode.containerInfo,Nt=!0;break e;case 4:Be=w.stateNode.containerInfo,Nt=!0;break e}w=w.return}if(Be===null)throw Error(s(160));Ud(c,m,a),Be=null,Nt=!1;var C=a.alternate;C!==null&&(C.return=null),a.return=null}catch(_){Oe(a,t,_)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Hd(t,e),t=t.sibling}function Hd(e,t){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Pt(t,e),It(e),i&4){try{po(3,e,e.return),Cs(3,e)}catch(J){Oe(e,e.return,J)}try{po(5,e,e.return)}catch(J){Oe(e,e.return,J)}}break;case 1:Pt(t,e),It(e),i&512&&r!==null&&xr(r,r.return);break;case 5:if(Pt(t,e),It(e),i&512&&r!==null&&xr(r,r.return),e.flags&32){var a=e.stateNode;try{Ar(a,"")}catch(J){Oe(e,e.return,J)}}if(i&4&&(a=e.stateNode,a!=null)){var c=e.memoizedProps,m=r!==null?r.memoizedProps:c,w=e.type,C=e.updateQueue;if(e.updateQueue=null,C!==null)try{w==="input"&&c.type==="radio"&&c.name!=null&&gu(a,c),Si(w,m);var _=Si(w,c);for(m=0;m<C.length;m+=2){var $=C[m],H=C[m+1];$==="style"?ku(a,H):$==="dangerouslySetInnerHTML"?bu(a,H):$==="children"?Ar(a,H):D(a,$,H,_)}switch(w){case"input":gi(a,c);break;case"textarea":xu(a,c);break;case"select":var U=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!c.multiple;var X=c.value;X!=null?Zn(a,!!c.multiple,X,!1):U!==!!c.multiple&&(c.defaultValue!=null?Zn(a,!!c.multiple,c.defaultValue,!0):Zn(a,!!c.multiple,c.multiple?[]:"",!1))}a[to]=c}catch(J){Oe(e,e.return,J)}}break;case 6:if(Pt(t,e),It(e),i&4){if(e.stateNode===null)throw Error(s(162));a=e.stateNode,c=e.memoizedProps;try{a.nodeValue=c}catch(J){Oe(e,e.return,J)}}break;case 3:if(Pt(t,e),It(e),i&4&&r!==null&&r.memoizedState.isDehydrated)try{Wr(t.containerInfo)}catch(J){Oe(e,e.return,J)}break;case 4:Pt(t,e),It(e);break;case 13:Pt(t,e),It(e),a=e.child,a.flags&8192&&(c=a.memoizedState!==null,a.stateNode.isHidden=c,!c||a.alternate!==null&&a.alternate.memoizedState!==null||(Kl=_e())),i&4&&$d(e);break;case 22:if($=r!==null&&r.memoizedState!==null,e.mode&1?(Ge=(_=Ge)||$,Pt(t,e),Ge=_):Pt(t,e),It(e),i&8192){if(_=e.memoizedState!==null,(e.stateNode.isHidden=_)&&!$&&(e.mode&1)!==0)for(Y=e,$=e.child;$!==null;){for(H=Y=$;Y!==null;){switch(U=Y,X=U.child,U.tag){case 0:case 11:case 14:case 15:po(4,U,U.return);break;case 1:xr(U,U.return);var Z=U.stateNode;if(typeof Z.componentWillUnmount=="function"){i=U,r=U.return;try{t=i,Z.props=t.memoizedProps,Z.state=t.memoizedState,Z.componentWillUnmount()}catch(J){Oe(i,r,J)}}break;case 5:xr(U,U.return);break;case 22:if(U.memoizedState!==null){Vd(H);continue}}X!==null?(X.return=U,Y=X):Vd(H)}$=$.sibling}e:for($=null,H=e;;){if(H.tag===5){if($===null){$=H;try{a=H.stateNode,_?(c=a.style,typeof c.setProperty=="function"?c.setProperty("display","none","important"):c.display="none"):(w=H.stateNode,C=H.memoizedProps.style,m=C!=null&&C.hasOwnProperty("display")?C.display:null,w.style.display=Cu("display",m))}catch(J){Oe(e,e.return,J)}}}else if(H.tag===6){if($===null)try{H.stateNode.nodeValue=_?"":H.memoizedProps}catch(J){Oe(e,e.return,J)}}else if((H.tag!==22&&H.tag!==23||H.memoizedState===null||H===e)&&H.child!==null){H.child.return=H,H=H.child;continue}if(H===e)break e;for(;H.sibling===null;){if(H.return===null||H.return===e)break e;$===H&&($=null),H=H.return}$===H&&($=null),H.sibling.return=H.return,H=H.sibling}}break;case 19:Pt(t,e),It(e),i&4&&$d(e);break;case 21:break;default:Pt(t,e),It(e)}}function It(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(Fd(r)){var i=r;break e}r=r.return}throw Error(s(160))}switch(i.tag){case 5:var a=i.stateNode;i.flags&32&&(Ar(a,""),i.flags&=-33);var c=zd(e);Wl(e,c,a);break;case 3:case 4:var m=i.stateNode.containerInfo,w=zd(e);Bl(e,w,m);break;default:throw Error(s(161))}}catch(C){Oe(e,e.return,C)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function $g(e,t,r){Y=e,Bd(e)}function Bd(e,t,r){for(var i=(e.mode&1)!==0;Y!==null;){var a=Y,c=a.child;if(a.tag===22&&i){var m=a.memoizedState!==null||bs;if(!m){var w=a.alternate,C=w!==null&&w.memoizedState!==null||Ge;w=bs;var _=Ge;if(bs=m,(Ge=C)&&!_)for(Y=a;Y!==null;)m=Y,C=m.child,m.tag===22&&m.memoizedState!==null?Qd(a):C!==null?(C.return=m,Y=C):Qd(a);for(;c!==null;)Y=c,Bd(c),c=c.sibling;Y=a,bs=w,Ge=_}Wd(e)}else(a.subtreeFlags&8772)!==0&&c!==null?(c.return=a,Y=c):Wd(e)}}function Wd(e){for(;Y!==null;){var t=Y;if((t.flags&8772)!==0){var r=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:Ge||Cs(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!Ge)if(r===null)i.componentDidMount();else{var a=t.elementType===t.type?r.memoizedProps:Et(t.type,r.memoizedProps);i.componentDidUpdate(a,r.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var c=t.updateQueue;c!==null&&Vc(t,c,i);break;case 3:var m=t.updateQueue;if(m!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}Vc(t,m,r)}break;case 5:var w=t.stateNode;if(r===null&&t.flags&4){r=w;var C=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":C.autoFocus&&r.focus();break;case"img":C.src&&(r.src=C.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var _=t.alternate;if(_!==null){var $=_.memoizedState;if($!==null){var H=$.dehydrated;H!==null&&Wr(H)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(s(163))}Ge||t.flags&512&&Hl(t)}catch(U){Oe(t,t.return,U)}}if(t===e){Y=null;break}if(r=t.sibling,r!==null){r.return=t.return,Y=r;break}Y=t.return}}function Vd(e){for(;Y!==null;){var t=Y;if(t===e){Y=null;break}var r=t.sibling;if(r!==null){r.return=t.return,Y=r;break}Y=t.return}}function Qd(e){for(;Y!==null;){var t=Y;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Cs(4,t)}catch(C){Oe(t,r,C)}break;case 1:var i=t.stateNode;if(typeof i.componentDidMount=="function"){var a=t.return;try{i.componentDidMount()}catch(C){Oe(t,a,C)}}var c=t.return;try{Hl(t)}catch(C){Oe(t,c,C)}break;case 5:var m=t.return;try{Hl(t)}catch(C){Oe(t,m,C)}}}catch(C){Oe(t,t.return,C)}if(t===e){Y=null;break}var w=t.sibling;if(w!==null){w.return=t.return,Y=w;break}Y=t.return}}var Hg=Math.ceil,ks=F.ReactCurrentDispatcher,Vl=F.ReactCurrentOwner,vt=F.ReactCurrentBatchConfig,ye=0,$e=null,Me=null,We=0,ut=0,wr=un(0),Fe=0,ho=null,Dn=0,Es=0,Ql=0,mo=null,rt=null,Kl=0,Sr=1/0,Xt=null,Ns=!1,ql=null,mn=null,Ps=!1,gn=null,Rs=0,go=0,Gl=null,js=-1,Ts=0;function Ze(){return(ye&6)!==0?_e():js!==-1?js:js=_e()}function vn(e){return(e.mode&1)===0?1:(ye&2)!==0&&We!==0?We&-We:Eg.transition!==null?(Ts===0&&(Ts=zu()),Ts):(e=be,e!==0||(e=window.event,e=e===void 0?16:qu(e.type)),e)}function Rt(e,t,r,i){if(50<go)throw go=0,Gl=null,Error(s(185));zr(e,r,i),((ye&2)===0||e!==$e)&&(e===$e&&((ye&2)===0&&(Es|=r),Fe===4&&yn(e,We)),ot(e,i),r===1&&ye===0&&(t.mode&1)===0&&(Sr=_e()+500,os&&dn()))}function ot(e,t){var r=e.callbackNode;Em(e,t);var i=zo(e,e===$e?We:0);if(i===0)r!==null&&Iu(r),e.callbackNode=null,e.callbackPriority=0;else if(t=i&-i,e.callbackPriority!==t){if(r!=null&&Iu(r),t===1)e.tag===0?kg(qd.bind(null,e)):Ac(qd.bind(null,e)),wg(function(){(ye&6)===0&&dn()}),r=null;else{switch(Uu(i)){case 1:r=Ri;break;case 4:r=Du;break;case 16:r=Lo;break;case 536870912:r=Fu;break;default:r=Lo}r=nf(r,Kd.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function Kd(e,t){if(js=-1,Ts=0,(ye&6)!==0)throw Error(s(327));var r=e.callbackNode;if(br()&&e.callbackNode!==r)return null;var i=zo(e,e===$e?We:0);if(i===0)return null;if((i&30)!==0||(i&e.expiredLanes)!==0||t)t=Os(e,i);else{t=i;var a=ye;ye|=2;var c=Xd();($e!==e||We!==t)&&(Xt=null,Sr=_e()+500,zn(e,t));do try{Vg();break}catch(w){Gd(e,w)}while(!0);pl(),ks.current=c,ye=a,Me!==null?t=0:($e=null,We=0,t=Fe)}if(t!==0){if(t===2&&(a=ji(e),a!==0&&(i=a,t=Xl(e,a))),t===1)throw r=ho,zn(e,0),yn(e,i),ot(e,_e()),r;if(t===6)yn(e,i);else{if(a=e.current.alternate,(i&30)===0&&!Bg(a)&&(t=Os(e,i),t===2&&(c=ji(e),c!==0&&(i=c,t=Xl(e,c))),t===1))throw r=ho,zn(e,0),yn(e,i),ot(e,_e()),r;switch(e.finishedWork=a,e.finishedLanes=i,t){case 0:case 1:throw Error(s(345));case 2:Un(e,rt,Xt);break;case 3:if(yn(e,i),(i&130023424)===i&&(t=Kl+500-_e(),10<t)){if(zo(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){Ze(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=nl(Un.bind(null,e,rt,Xt),t);break}Un(e,rt,Xt);break;case 4:if(yn(e,i),(i&4194240)===i)break;for(t=e.eventTimes,a=-1;0<i;){var m=31-bt(i);c=1<<m,m=t[m],m>a&&(a=m),i&=~c}if(i=a,i=_e()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Hg(i/1960))-i,10<i){e.timeoutHandle=nl(Un.bind(null,e,rt,Xt),i);break}Un(e,rt,Xt);break;case 5:Un(e,rt,Xt);break;default:throw Error(s(329))}}}return ot(e,_e()),e.callbackNode===r?Kd.bind(null,e):null}function Xl(e,t){var r=mo;return e.current.memoizedState.isDehydrated&&(zn(e,t).flags|=256),e=Os(e,t),e!==2&&(t=rt,rt=r,t!==null&&Yl(t)),e}function Yl(e){rt===null?rt=e:rt.push.apply(rt,e)}function Bg(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var i=0;i<r.length;i++){var a=r[i],c=a.getSnapshot;a=a.value;try{if(!Ct(c(),a))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function yn(e,t){for(t&=~Ql,t&=~Es,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-bt(t),i=1<<r;e[r]=-1,t&=~i}}function qd(e){if((ye&6)!==0)throw Error(s(327));br();var t=zo(e,0);if((t&1)===0)return ot(e,_e()),null;var r=Os(e,t);if(e.tag!==0&&r===2){var i=ji(e);i!==0&&(t=i,r=Xl(e,i))}if(r===1)throw r=ho,zn(e,0),yn(e,t),ot(e,_e()),r;if(r===6)throw Error(s(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Un(e,rt,Xt),ot(e,_e()),null}function Zl(e,t){var r=ye;ye|=1;try{return e(t)}finally{ye=r,ye===0&&(Sr=_e()+500,os&&dn())}}function Fn(e){gn!==null&&gn.tag===0&&(ye&6)===0&&br();var t=ye;ye|=1;var r=vt.transition,i=be;try{if(vt.transition=null,be=1,e)return e()}finally{be=i,vt.transition=r,ye=t,(ye&6)===0&&dn()}}function Jl(){ut=wr.current,Ne(wr)}function zn(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,xg(r)),Me!==null)for(r=Me.return;r!==null;){var i=r;switch(al(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&ns();break;case 3:vr(),Ne(et),Ne(Qe),Sl();break;case 5:xl(i);break;case 4:vr();break;case 13:Ne(je);break;case 19:Ne(je);break;case 10:hl(i.type._context);break;case 22:case 23:Jl()}r=r.return}if($e=e,Me=e=xn(e.current,null),We=ut=t,Fe=0,ho=null,Ql=Es=Dn=0,rt=mo=null,Mn!==null){for(t=0;t<Mn.length;t++)if(r=Mn[t],i=r.interleaved,i!==null){r.interleaved=null;var a=i.next,c=r.pending;if(c!==null){var m=c.next;c.next=a,i.next=m}r.pending=i}Mn=null}return e}function Gd(e,t){do{var r=Me;try{if(pl(),hs.current=ys,ms){for(var i=Te.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}ms=!1}if(In=0,Ue=De=Te=null,lo=!1,ao=0,Vl.current=null,r===null||r.return===null){Fe=1,ho=t,Me=null;break}e:{var c=e,m=r.return,w=r,C=t;if(t=We,w.flags|=32768,C!==null&&typeof C=="object"&&typeof C.then=="function"){var _=C,$=w,H=$.tag;if(($.mode&1)===0&&(H===0||H===11||H===15)){var U=$.alternate;U?($.updateQueue=U.updateQueue,$.memoizedState=U.memoizedState,$.lanes=U.lanes):($.updateQueue=null,$.memoizedState=null)}var X=wd(m);if(X!==null){X.flags&=-257,Sd(X,m,w,c,t),X.mode&1&&xd(c,_,t),t=X,C=_;var Z=t.updateQueue;if(Z===null){var J=new Set;J.add(C),t.updateQueue=J}else Z.add(C);break e}else{if((t&1)===0){xd(c,_,t),ea();break e}C=Error(s(426))}}else if(Re&&w.mode&1){var Ae=wd(m);if(Ae!==null){(Ae.flags&65536)===0&&(Ae.flags|=256),Sd(Ae,m,w,c,t),dl(yr(C,w));break e}}c=C=yr(C,w),Fe!==4&&(Fe=2),mo===null?mo=[c]:mo.push(c),c=m;do{switch(c.tag){case 3:c.flags|=65536,t&=-t,c.lanes|=t;var T=vd(c,C,t);Wc(c,T);break e;case 1:w=C;var N=c.type,O=c.stateNode;if((c.flags&128)===0&&(typeof N.getDerivedStateFromError=="function"||O!==null&&typeof O.componentDidCatch=="function"&&(mn===null||!mn.has(O)))){c.flags|=65536,t&=-t,c.lanes|=t;var B=yd(c,w,t);Wc(c,B);break e}}c=c.return}while(c!==null)}Zd(r)}catch(te){t=te,Me===r&&r!==null&&(Me=r=r.return);continue}break}while(!0)}function Xd(){var e=ks.current;return ks.current=ys,e===null?ys:e}function ea(){(Fe===0||Fe===3||Fe===2)&&(Fe=4),$e===null||(Dn&268435455)===0&&(Es&268435455)===0||yn($e,We)}function Os(e,t){var r=ye;ye|=2;var i=Xd();($e!==e||We!==t)&&(Xt=null,zn(e,t));do try{Wg();break}catch(a){Gd(e,a)}while(!0);if(pl(),ye=r,ks.current=i,Me!==null)throw Error(s(261));return $e=null,We=0,Fe}function Wg(){for(;Me!==null;)Yd(Me)}function Vg(){for(;Me!==null&&!gm();)Yd(Me)}function Yd(e){var t=tf(e.alternate,e,ut);e.memoizedProps=e.pendingProps,t===null?Zd(e):Me=t,Vl.current=null}function Zd(e){var t=e;do{var r=t.alternate;if(e=t.return,(t.flags&32768)===0){if(r=Dg(r,t,ut),r!==null){Me=r;return}}else{if(r=Fg(r,t),r!==null){r.flags&=32767,Me=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Fe=6,Me=null;return}}if(t=t.sibling,t!==null){Me=t;return}Me=t=e}while(t!==null);Fe===0&&(Fe=5)}function Un(e,t,r){var i=be,a=vt.transition;try{vt.transition=null,be=1,Qg(e,t,r,i)}finally{vt.transition=a,be=i}return null}function Qg(e,t,r,i){do br();while(gn!==null);if((ye&6)!==0)throw Error(s(327));r=e.finishedWork;var a=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(s(177));e.callbackNode=null,e.callbackPriority=0;var c=r.lanes|r.childLanes;if(Nm(e,c),e===$e&&(Me=$e=null,We=0),(r.subtreeFlags&2064)===0&&(r.flags&2064)===0||Ps||(Ps=!0,nf(Lo,function(){return br(),null})),c=(r.flags&15990)!==0,(r.subtreeFlags&15990)!==0||c){c=vt.transition,vt.transition=null;var m=be;be=1;var w=ye;ye|=4,Vl.current=null,Ug(e,r),Hd(r,e),fg(el),Ho=!!Ji,el=Ji=null,e.current=r,$g(r),vm(),ye=w,be=m,vt.transition=c}else e.current=r;if(Ps&&(Ps=!1,gn=e,Rs=a),c=e.pendingLanes,c===0&&(mn=null),wm(r.stateNode),ot(e,_e()),t!==null)for(i=e.onRecoverableError,r=0;r<t.length;r++)a=t[r],i(a.value,{componentStack:a.stack,digest:a.digest});if(Ns)throw Ns=!1,e=ql,ql=null,e;return(Rs&1)!==0&&e.tag!==0&&br(),c=e.pendingLanes,(c&1)!==0?e===Gl?go++:(go=0,Gl=e):go=0,dn(),null}function br(){if(gn!==null){var e=Uu(Rs),t=vt.transition,r=be;try{if(vt.transition=null,be=16>e?16:e,gn===null)var i=!1;else{if(e=gn,gn=null,Rs=0,(ye&6)!==0)throw Error(s(331));var a=ye;for(ye|=4,Y=e.current;Y!==null;){var c=Y,m=c.child;if((Y.flags&16)!==0){var w=c.deletions;if(w!==null){for(var C=0;C<w.length;C++){var _=w[C];for(Y=_;Y!==null;){var $=Y;switch($.tag){case 0:case 11:case 15:po(8,$,c)}var H=$.child;if(H!==null)H.return=$,Y=H;else for(;Y!==null;){$=Y;var U=$.sibling,X=$.return;if(Dd($),$===_){Y=null;break}if(U!==null){U.return=X,Y=U;break}Y=X}}}var Z=c.alternate;if(Z!==null){var J=Z.child;if(J!==null){Z.child=null;do{var Ae=J.sibling;J.sibling=null,J=Ae}while(J!==null)}}Y=c}}if((c.subtreeFlags&2064)!==0&&m!==null)m.return=c,Y=m;else e:for(;Y!==null;){if(c=Y,(c.flags&2048)!==0)switch(c.tag){case 0:case 11:case 15:po(9,c,c.return)}var T=c.sibling;if(T!==null){T.return=c.return,Y=T;break e}Y=c.return}}var N=e.current;for(Y=N;Y!==null;){m=Y;var O=m.child;if((m.subtreeFlags&2064)!==0&&O!==null)O.return=m,Y=O;else e:for(m=N;Y!==null;){if(w=Y,(w.flags&2048)!==0)try{switch(w.tag){case 0:case 11:case 15:Cs(9,w)}}catch(te){Oe(w,w.return,te)}if(w===m){Y=null;break e}var B=w.sibling;if(B!==null){B.return=w.return,Y=B;break e}Y=w.return}}if(ye=a,dn(),_t&&typeof _t.onPostCommitFiberRoot=="function")try{_t.onPostCommitFiberRoot(Io,e)}catch{}i=!0}return i}finally{be=r,vt.transition=t}}return!1}function Jd(e,t,r){t=yr(r,t),t=vd(e,t,1),e=pn(e,t,1),t=Ze(),e!==null&&(zr(e,1,t),ot(e,t))}function Oe(e,t,r){if(e.tag===3)Jd(e,e,r);else for(;t!==null;){if(t.tag===3){Jd(t,e,r);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(mn===null||!mn.has(i))){e=yr(r,e),e=yd(t,e,1),t=pn(t,e,1),e=Ze(),t!==null&&(zr(t,1,e),ot(t,e));break}}t=t.return}}function Kg(e,t,r){var i=e.pingCache;i!==null&&i.delete(t),t=Ze(),e.pingedLanes|=e.suspendedLanes&r,$e===e&&(We&r)===r&&(Fe===4||Fe===3&&(We&130023424)===We&&500>_e()-Kl?zn(e,0):Ql|=r),ot(e,t)}function ef(e,t){t===0&&((e.mode&1)===0?t=1:(t=Fo,Fo<<=1,(Fo&130023424)===0&&(Fo=4194304)));var r=Ze();e=Kt(e,t),e!==null&&(zr(e,t,r),ot(e,r))}function qg(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),ef(e,r)}function Gg(e,t){var r=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(r=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(s(314))}i!==null&&i.delete(t),ef(e,r)}var tf;tf=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||et.current)nt=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return nt=!1,Ig(e,t,r);nt=(e.flags&131072)!==0}else nt=!1,Re&&(t.flags&1048576)!==0&&Mc(t,is,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Ss(e,t),e=t.pendingProps;var a=cr(t,Qe.current);gr(t,r),a=kl(null,t,i,e,a,r);var c=El();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,tt(i)?(c=!0,rs(t)):c=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,vl(t),a.updater=xs,t.stateNode=a,a._reactInternals=t,Ol(t,i,e,r),t=Ll(null,t,i,!0,c,r)):(t.tag=0,Re&&c&&ll(t),Ye(null,t,a,r),t=t.child),t;case 16:i=t.elementType;e:{switch(Ss(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=Yg(i),e=Et(i,e),a){case 0:t=Ml(null,t,i,e,r);break e;case 1:t=Pd(null,t,i,e,r);break e;case 11:t=bd(null,t,i,e,r);break e;case 14:t=Cd(null,t,i,Et(i.type,e),r);break e}throw Error(s(306,i,""))}return t;case 0:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Et(i,a),Ml(e,t,i,a,r);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Et(i,a),Pd(e,t,i,a,r);case 3:e:{if(Rd(t),e===null)throw Error(s(387));i=t.pendingProps,c=t.memoizedState,a=c.element,Bc(e,t),fs(t,i,null,r);var m=t.memoizedState;if(i=m.element,c.isDehydrated)if(c={element:i,isDehydrated:!1,cache:m.cache,pendingSuspenseBoundaries:m.pendingSuspenseBoundaries,transitions:m.transitions},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){a=yr(Error(s(423)),t),t=jd(e,t,i,r,a);break e}else if(i!==a){a=yr(Error(s(424)),t),t=jd(e,t,i,r,a);break e}else for(at=an(t.stateNode.containerInfo.firstChild),lt=t,Re=!0,kt=null,r=$c(t,null,i,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(pr(),i===a){t=Gt(e,t,r);break e}Ye(e,t,i,r)}t=t.child}return t;case 5:return Qc(t),e===null&&cl(t),i=t.type,a=t.pendingProps,c=e!==null?e.memoizedProps:null,m=a.children,tl(i,a)?m=null:c!==null&&tl(i,c)&&(t.flags|=32),Nd(e,t),Ye(e,t,m,r),t.child;case 6:return e===null&&cl(t),null;case 13:return Td(e,t,r);case 4:return yl(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=hr(t,null,i,r):Ye(e,t,i,r),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Et(i,a),bd(e,t,i,a,r);case 7:return Ye(e,t,t.pendingProps,r),t.child;case 8:return Ye(e,t,t.pendingProps.children,r),t.child;case 12:return Ye(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(i=t.type._context,a=t.pendingProps,c=t.memoizedProps,m=a.value,ke(us,i._currentValue),i._currentValue=m,c!==null)if(Ct(c.value,m)){if(c.children===a.children&&!et.current){t=Gt(e,t,r);break e}}else for(c=t.child,c!==null&&(c.return=t);c!==null;){var w=c.dependencies;if(w!==null){m=c.child;for(var C=w.firstContext;C!==null;){if(C.context===i){if(c.tag===1){C=qt(-1,r&-r),C.tag=2;var _=c.updateQueue;if(_!==null){_=_.shared;var $=_.pending;$===null?C.next=C:(C.next=$.next,$.next=C),_.pending=C}}c.lanes|=r,C=c.alternate,C!==null&&(C.lanes|=r),ml(c.return,r,t),w.lanes|=r;break}C=C.next}}else if(c.tag===10)m=c.type===t.type?null:c.child;else if(c.tag===18){if(m=c.return,m===null)throw Error(s(341));m.lanes|=r,w=m.alternate,w!==null&&(w.lanes|=r),ml(m,r,t),m=c.sibling}else m=c.child;if(m!==null)m.return=c;else for(m=c;m!==null;){if(m===t){m=null;break}if(c=m.sibling,c!==null){c.return=m.return,m=c;break}m=m.return}c=m}Ye(e,t,a.children,r),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,gr(t,r),a=mt(a),i=i(a),t.flags|=1,Ye(e,t,i,r),t.child;case 14:return i=t.type,a=Et(i,t.pendingProps),a=Et(i.type,a),Cd(e,t,i,a,r);case 15:return kd(e,t,t.type,t.pendingProps,r);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Et(i,a),Ss(e,t),t.tag=1,tt(i)?(e=!0,rs(t)):e=!1,gr(t,r),md(t,i,a),Ol(t,i,a,r),Ll(null,t,i,!0,e,r);case 19:return _d(e,t,r);case 22:return Ed(e,t,r)}throw Error(s(156,t.tag))};function nf(e,t){return Lu(e,t)}function Xg(e,t,r,i){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yt(e,t,r,i){return new Xg(e,t,r,i)}function ta(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Yg(e){if(typeof e=="function")return ta(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ee)return 11;if(e===me)return 14}return 2}function xn(e,t){var r=e.alternate;return r===null?(r=yt(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function _s(e,t,r,i,a,c){var m=2;if(i=e,typeof e=="function")ta(e)&&(m=1);else if(typeof e=="string")m=5;else e:switch(e){case V:return $n(r.children,a,c,t);case L:m=8,a|=8;break;case se:return e=yt(12,r,t,a|2),e.elementType=se,e.lanes=c,e;case ce:return e=yt(13,r,t,a),e.elementType=ce,e.lanes=c,e;case G:return e=yt(19,r,t,a),e.elementType=G,e.lanes=c,e;case oe:return As(r,a,c,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case le:m=10;break e;case pe:m=9;break e;case ee:m=11;break e;case me:m=14;break e;case ie:m=16,i=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return t=yt(m,r,t,a),t.elementType=e,t.type=i,t.lanes=c,t}function $n(e,t,r,i){return e=yt(7,e,i,t),e.lanes=r,e}function As(e,t,r,i){return e=yt(22,e,i,t),e.elementType=oe,e.lanes=r,e.stateNode={isHidden:!1},e}function na(e,t,r){return e=yt(6,e,null,t),e.lanes=r,e}function ra(e,t,r){return t=yt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Zg(e,t,r,i,a){this.tag=t,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=Ti(0),this.expirationTimes=Ti(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ti(0),this.identifierPrefix=i,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function oa(e,t,r,i,a,c,m,w,C){return e=new Zg(e,t,r,w,C),t===1?(t=1,c===!0&&(t|=8)):t=0,c=yt(3,null,null,t),e.current=c,c.stateNode=e,c.memoizedState={element:i,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},vl(c),e}function Jg(e,t,r){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Q,key:i==null?null:""+i,children:e,containerInfo:t,implementation:r}}function rf(e){if(!e)return cn;e=e._reactInternals;e:{if(jn(e)!==e||e.tag!==1)throw Error(s(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(tt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(s(171))}if(e.tag===1){var r=e.type;if(tt(r))return Oc(e,r,t)}return t}function of(e,t,r,i,a,c,m,w,C){return e=oa(r,i,!0,e,a,c,m,w,C),e.context=rf(null),r=e.current,i=Ze(),a=vn(r),c=qt(i,a),c.callback=t??null,pn(r,c,a),e.current.lanes=a,zr(e,a,i),ot(e,i),e}function Ms(e,t,r,i){var a=t.current,c=Ze(),m=vn(a);return r=rf(r),t.context===null?t.context=r:t.pendingContext=r,t=qt(c,m),t.payload={element:e},i=i===void 0?null:i,i!==null&&(t.callback=i),e=pn(a,t,m),e!==null&&(Rt(e,a,m,c),ds(e,a,m)),m}function Ls(e){return e=e.current,e.child?(e.child.tag===5,e.child.stateNode):null}function sf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function sa(e,t){sf(e,t),(e=e.alternate)&&sf(e,t)}function ev(){return null}var lf=typeof reportError=="function"?reportError:function(e){console.error(e)};function ia(e){this._internalRoot=e}Is.prototype.render=ia.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));Ms(e,t,null,null)},Is.prototype.unmount=ia.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Fn(function(){Ms(null,e,null,null)}),t[Bt]=null}};function Is(e){this._internalRoot=e}Is.prototype.unstable_scheduleHydration=function(e){if(e){var t=Bu();e={blockedOn:null,target:e,priority:t};for(var r=0;r<on.length&&t!==0&&t<on[r].priority;r++);on.splice(r,0,e),r===0&&Qu(e)}};function la(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ds(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function af(){}function tv(e,t,r,i,a){if(a){if(typeof i=="function"){var c=i;i=function(){var _=Ls(m);c.call(_)}}var m=of(t,i,e,0,null,!1,!1,"",af);return e._reactRootContainer=m,e[Bt]=m.current,Jr(e.nodeType===8?e.parentNode:e),Fn(),m}for(;a=e.lastChild;)e.removeChild(a);if(typeof i=="function"){var w=i;i=function(){var _=Ls(C);w.call(_)}}var C=oa(e,0,!1,null,null,!1,!1,"",af);return e._reactRootContainer=C,e[Bt]=C.current,Jr(e.nodeType===8?e.parentNode:e),Fn(function(){Ms(t,C,r,i)}),C}function Fs(e,t,r,i,a){var c=r._reactRootContainer;if(c){var m=c;if(typeof a=="function"){var w=a;a=function(){var C=Ls(m);w.call(C)}}Ms(t,m,e,a)}else m=tv(r,t,e,a,i);return Ls(m)}$u=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Fr(t.pendingLanes);r!==0&&(Oi(t,r|1),ot(t,_e()),(ye&6)===0&&(Sr=_e()+500,dn()))}break;case 13:Fn(function(){var i=Kt(e,1);if(i!==null){var a=Ze();Rt(i,e,1,a)}}),sa(e,1)}},_i=function(e){if(e.tag===13){var t=Kt(e,134217728);if(t!==null){var r=Ze();Rt(t,e,134217728,r)}sa(e,134217728)}},Hu=function(e){if(e.tag===13){var t=vn(e),r=Kt(e,t);if(r!==null){var i=Ze();Rt(r,e,t,i)}sa(e,t)}},Bu=function(){return be},Wu=function(e,t){var r=be;try{return be=e,t()}finally{be=r}},ki=function(e,t,r){switch(t){case"input":if(gi(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var i=r[t];if(i!==e&&i.form===e.form){var a=ts(i);if(!a)throw Error(s(90));Oo(i),gi(i,a)}}}break;case"textarea":xu(e,r);break;case"select":t=r.value,t!=null&&Zn(e,!!r.multiple,t,!1)}},Ru=Zl,ju=Fn;var nv={usingClientEntryPoint:!1,Events:[no,ar,ts,Nu,Pu,Zl]},vo={findFiberByHostInstance:Tn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},rv={bundleType:vo.bundleType,version:vo.version,rendererPackageName:vo.rendererPackageName,rendererConfig:vo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:F.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Au(e),e===null?null:e.stateNode},findFiberByHostInstance:vo.findFiberByHostInstance||ev,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 zs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zs.isDisabled&&zs.supportsFiber)try{Io=zs.inject(rv),_t=zs}catch{}}return st.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=nv,st.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!la(t))throw Error(s(200));return Jg(e,t,null,r)},st.createRoot=function(e,t){if(!la(e))throw Error(s(299));var r=!1,i="",a=lf;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=oa(e,1,!1,null,null,r,!1,i,a),e[Bt]=t.current,Jr(e.nodeType===8?e.parentNode:e),new ia(t)},st.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=Au(t),e=e===null?null:e.stateNode,e},st.flushSync=function(e){return Fn(e)},st.hydrate=function(e,t,r){if(!Ds(t))throw Error(s(200));return Fs(null,e,t,!0,r)},st.hydrateRoot=function(e,t,r){if(!la(e))throw Error(s(405));var i=r!=null&&r.hydratedSources||null,a=!1,c="",m=lf;if(r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(c=r.identifierPrefix),r.onRecoverableError!==void 0&&(m=r.onRecoverableError)),t=of(t,null,e,1,r??null,a,!1,c,m),e[Bt]=t.current,Jr(e),i)for(e=0;e<i.length;e++)r=i[e],a=r._getVersion,a=a(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,a]:t.mutableSourceEagerHydrationData.push(r,a);return new Is(t)},st.render=function(e,t,r){if(!Ds(t))throw Error(s(200));return Fs(null,e,t,!1,r)},st.unmountComponentAtNode=function(e){if(!Ds(e))throw Error(s(40));return e._reactRootContainer?(Fn(function(){Fs(null,null,e,!1,function(){e._reactRootContainer=null,e[Bt]=null})}),!0):!1},st.unstable_batchedUpdates=Zl,st.unstable_renderSubtreeIntoContainer=function(e,t,r,i){if(!Ds(r))throw Error(s(200));if(e==null||e._reactInternals===void 0)throw Error(s(38));return Fs(e,t,r,!1,i)},st.version="18.3.1-next-f1338f8080-20240426",st}var gf;function ip(){if(gf)return ca.exports;gf=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(o){console.error(o)}}return n(),ca.exports=dv(),ca.exports}var vf;function fv(){if(vf)return Us;vf=1;var n=ip();return Us.createRoot=n.createRoot,Us.hydrateRoot=n.hydrateRoot,Us}var pv=fv();function hv(n,o){if(n instanceof RegExp)return{keys:!1,pattern:n};var s,l,u,f,p=[],h="",g=n.split("/");for(g[0]||g.shift();u=g.shift();)s=u[0],s==="*"?(p.push(s),h+=u[1]==="?"?"(?:/(.*))?":"/(.*)"):s===":"?(l=u.indexOf("?",1),f=u.indexOf(".",1),p.push(u.substring(1,~l?l:~f?f:u.length)),h+=~l&&!~f?"(?:/([^/]+?))?":"/([^/]+?)",~f&&(h+=(~l?"?":"")+"\\"+u.substring(f))):h+="/"+u;return{keys:p,pattern:new RegExp("^"+h+(o?"(?=$|/)":"/?$"),"i")}}var y=ti();const kn=sp(y),$a=sv({__proto__:null,default:kn},[y]);var pa={exports:{}},ha={};var yf;function mv(){if(yf)return ha;yf=1;var n=ti();function o(S,k){return S===k&&(S!==0||1/S===1/k)||S!==S&&k!==k}var s=typeof Object.is=="function"?Object.is:o,l=n.useState,u=n.useEffect,f=n.useLayoutEffect,p=n.useDebugValue;function h(S,k){var R=k(),j=l({inst:{value:R,getSnapshot:k}}),E=j[0].inst,b=j[1];return f(function(){E.value=R,E.getSnapshot=k,g(E)&&b({inst:E})},[S,R,k]),u(function(){return g(E)&&b({inst:E}),S(function(){g(E)&&b({inst:E})})},[S]),p(R),R}function g(S){var k=S.getSnapshot;S=S.value;try{var R=k();return!s(S,R)}catch{return!0}}function v(S,k){return k()}var x=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?v:h;return ha.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:x,ha}var xf;function gv(){return xf||(xf=1,pa.exports=mv()),pa.exports}var lp=gv();const vv=$a.useInsertionEffect,yv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",xv=yv?y.useLayoutEffect:y.useEffect,wv=vv||xv,ap=n=>{const o=y.useRef([n,(...s)=>o[0](...s)]).current;return wv(()=>{o[0]=n}),o[1]},Sv="popstate",Ha="pushState",Ba="replaceState",bv="hashchange",wf=[Sv,Ha,Ba,bv],Cv=n=>{for(const o of wf)addEventListener(o,n);return()=>{for(const o of wf)removeEventListener(o,n)}},up=(n,o)=>lp.useSyncExternalStore(Cv,n,o),Sf=()=>location.search,kv=({ssrSearch:n}={})=>up(Sf,n!=null?()=>n:Sf),bf=()=>location.pathname,Ev=({ssrPath:n}={})=>up(bf,n!=null?()=>n:bf),Nv=(n,{replace:o=!1,state:s=null}={})=>history[o?Ba:Ha](s,"",n),Pv=(n={})=>[Ev(n),Nv],Cf=Symbol.for("wouter_v3");if(typeof history<"u"&&typeof window[Cf]>"u"){for(const n of[Ha,Ba]){const o=history[n];history[n]=function(){const s=o.apply(this,arguments),l=new Event(n);return l.arguments=arguments,dispatchEvent(l),s}}Object.defineProperty(window,Cf,{value:!0})}const Rv=(n,o)=>o.toLowerCase().indexOf(n.toLowerCase())?"~"+o:o.slice(n.length)||"/",cp=(n="")=>n==="/"?"":n,jv=(n,o)=>n[0]==="~"?n.slice(1):cp(o)+n,Tv=(n="",o)=>Rv(kf(cp(n)),kf(o)),kf=n=>{try{return decodeURI(n)}catch{return n}},dp={hook:Pv,searchHook:kv,parser:hv,base:"",ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:n=>n,aroundNav:(n,o,s)=>n(o,s)},fp=y.createContext(dp),ni=()=>y.useContext(fp),pp={},hp=y.createContext(pp),Ov=()=>y.useContext(hp),Wa=n=>{const[o,s]=n.hook(n);return[Tv(n.base,o),ap((l,u)=>n.aroundNav(s,jv(l,n.base),u))]},mp=(n,o,s,l)=>{const{pattern:u,keys:f}=o instanceof RegExp?{keys:!1,pattern:o}:n(o||"*",l),p=u.exec(s)||[],[h,...g]=p;return h!==void 0?[!0,(()=>{const v=f!==!1?Object.fromEntries(f.map((S,k)=>[S,g[k]])):p.groups;let x={...g};return v&&Object.assign(x,v),x})(),...l?[h]:[]]:[!1,null]},gp=({children:n,...o})=>{const s=ni(),l=o.hook?dp:s;let u=l;const[f,p=o.ssrSearch??""]=o.ssrPath?.split("?")??[];f&&(o.ssrSearch=p,o.ssrPath=f),o.hrefs=o.hrefs??o.hook?.hrefs,o.searchHook=o.searchHook??o.hook?.searchHook;let h=y.useRef({}),g=h.current,v=g;for(let x in l){const S=x==="base"?l[x]+(o[x]??""):o[x]??l[x];g===v&&S!==v[x]&&(h.current=v={...v}),v[x]=S,(S!==l[x]||S!==u[x])&&(u=v)}return y.createElement(fp.Provider,{value:u,children:n})},Ef=({children:n,component:o},s)=>o?y.createElement(o,{params:s}):typeof n=="function"?n(s):n,_v=n=>{let o=y.useRef(pp);const s=o.current;return o.current=Object.keys(n).length!==Object.keys(s).length||Object.entries(n).some(([l,u])=>u!==s[l])?n:s},xo=({path:n,nest:o,match:s,...l})=>{const u=ni(),[f]=Wa(u),[p,h,g]=s??mp(u.parser,n,f,o),v=_v({...Ov(),...h});if(!p)return null;const x=g?y.createElement(gp,{base:g},Ef(l,v)):Ef(l,v);return y.createElement(hp.Provider,{value:v,children:x})},Qn=y.forwardRef((n,o)=>{const s=ni(),[l,u]=Wa(s),{to:f="",href:p=f,onClick:h,asChild:g,children:v,className:x,replace:S,state:k,transition:R,...j}=n,E=ap(A=>{A.ctrlKey||A.metaKey||A.altKey||A.shiftKey||A.button!==0||(h?.(A),A.defaultPrevented||(A.preventDefault(),u(p,n)))}),b=s.hrefs(p[0]==="~"?p.slice(1):s.base+p,s);return g&&y.isValidElement(v)?y.cloneElement(v,{onClick:E,href:b}):y.createElement("a",{...j,onClick:E,href:b,className:x?.call?x(l===p):x,children:v,ref:o})}),vp=n=>Array.isArray(n)?n.flatMap(o=>vp(o&&o.type===y.Fragment?o.props.children:o)):[n],Av=({children:n,location:o})=>{const s=ni(),[l]=Wa(s);for(const u of vp(n)){let f=0;if(y.isValidElement(u)&&(f=mp(s.parser,u.props.path,o||l,u.props.nest))[0])return y.cloneElement(u,{match:f})}return null},bo={v:[]},Nf=()=>bo.v.forEach(n=>n()),Mv=n=>(bo.v.push(n)===1&&addEventListener("hashchange",Nf),()=>{bo.v=bo.v.filter(o=>o!==n),bo.v.length||removeEventListener("hashchange",Nf)}),Lv=()=>"/"+location.hash.replace(/^#?\/?/,""),Iv=(n,{state:o=null,replace:s=!1}={})=>{const l=location.href,[u,f]=n.replace(/^#?\/?/,"").split("?"),p=new URL(location.href);p.hash=`/${u}`,f&&(p.search=f);const h=p.href;s?history.replaceState(o,"",h):history.pushState(o,"",h);const g=typeof HashChangeEvent<"u"?new HashChangeEvent("hashchange",{oldURL:l,newURL:h}):new Event("hashchange",{detail:{oldURL:l,newURL:h}});dispatchEvent(g)},yp=({ssrPath:n="/"}={})=>[lp.useSyncExternalStore(Mv,Lv,()=>n),Iv];yp.hrefs=n=>"#"+n;var Rr=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Dv={setTimeout:(n,o)=>setTimeout(n,o),clearTimeout:n=>clearTimeout(n),setInterval:(n,o)=>setInterval(n,o),clearInterval:n=>clearInterval(n)},Fv=class{#e=Dv;#t=!1;setTimeoutProvider(n){this.#e=n}setTimeout(n,o){return this.#e.setTimeout(n,o)}clearTimeout(n){this.#e.clearTimeout(n)}setInterval(n,o){return this.#e.setInterval(n,o)}clearInterval(n){this.#e.clearInterval(n)}},Vn=new Fv;function zv(n){setTimeout(n,0)}var Kn=typeof window>"u"||"Deno"in globalThis;function Je(){}function Uv(n,o){return typeof n=="function"?n(o):n}function ka(n){return typeof n=="number"&&n>=0&&n!==1/0}function xp(n,o){return Math.max(n+(o||0)-Date.now(),0)}function En(n,o){return typeof n=="function"?n(o):n}function xt(n,o){return typeof n=="function"?n(o):n}function Pf(n,o){const{type:s="all",exact:l,fetchStatus:u,predicate:f,queryKey:p,stale:h}=n;if(p){if(l){if(o.queryHash!==Va(p,o.options))return!1}else if(!ko(o.queryKey,p))return!1}if(s!=="all"){const g=o.isActive();if(s==="active"&&!g||s==="inactive"&&g)return!1}return!(typeof h=="boolean"&&o.isStale()!==h||u&&u!==o.state.fetchStatus||f&&!f(o))}function Rf(n,o){const{exact:s,status:l,predicate:u,mutationKey:f}=n;if(f){if(!o.options.mutationKey)return!1;if(s){if(qn(o.options.mutationKey)!==qn(f))return!1}else if(!ko(o.options.mutationKey,f))return!1}return!(l&&o.state.status!==l||u&&!u(o))}function Va(n,o){return(o?.queryKeyHashFn||qn)(n)}function qn(n){return JSON.stringify(n,(o,s)=>Ea(s)?Object.keys(s).sort().reduce((l,u)=>(l[u]=s[u],l),{}):s)}function ko(n,o){return n===o?!0:typeof n!=typeof o?!1:n&&o&&typeof n=="object"&&typeof o=="object"?Object.keys(o).every(s=>ko(n[s],o[s])):!1}var $v=Object.prototype.hasOwnProperty;function wp(n,o,s=0){if(n===o)return n;if(s>500)return o;const l=jf(n)&&jf(o);if(!l&&!(Ea(n)&&Ea(o)))return o;const f=(l?n:Object.keys(n)).length,p=l?o:Object.keys(o),h=p.length,g=l?new Array(h):{};let v=0;for(let x=0;x<h;x++){const S=l?x:p[x],k=n[S],R=o[S];if(k===R){g[S]=k,(l?x<f:$v.call(n,S))&&v++;continue}if(k===null||R===null||typeof k!="object"||typeof R!="object"){g[S]=R;continue}const j=wp(k,R,s+1);g[S]=j,j===k&&v++}return f===h&&v===f?n:g}function Gs(n,o){if(!o||Object.keys(n).length!==Object.keys(o).length)return!1;for(const s in n)if(n[s]!==o[s])return!1;return!0}function jf(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function Ea(n){if(!Tf(n))return!1;const o=n.constructor;if(o===void 0)return!0;const s=o.prototype;return!(!Tf(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function Tf(n){return Object.prototype.toString.call(n)==="[object Object]"}function Hv(n){return new Promise(o=>{Vn.setTimeout(o,n)})}function Na(n,o,s){return typeof s.structuralSharing=="function"?s.structuralSharing(n,o):s.structuralSharing!==!1?wp(n,o):o}function Bv(n,o,s=0){const l=[...n,o];return s&&l.length>s?l.slice(1):l}function Wv(n,o,s=0){const l=[o,...n];return s&&l.length>s?l.slice(0,-1):l}var Qa=Symbol();function Sp(n,o){return!n.queryFn&&o?.initialPromise?()=>o.initialPromise:!n.queryFn||n.queryFn===Qa?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function Ka(n,o){return typeof n=="function"?n(...o):!!n}function Vv(n,o,s){let l=!1,u;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(u??=o(),l||(l=!0,u.aborted?s():u.addEventListener("abort",s,{once:!0})),u)}),n}var Qv=class extends Rr{#e;#t;#n;constructor(){super(),this.#n=n=>{if(!Kn&&window.addEventListener){const o=()=>n();return window.addEventListener("visibilitychange",o,!1),()=>{window.removeEventListener("visibilitychange",o)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(n){this.#n=n,this.#t?.(),this.#t=n(o=>{typeof o=="boolean"?this.setFocused(o):this.onFocus()})}setFocused(n){this.#e!==n&&(this.#e=n,this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(o=>{o(n)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},qa=new Qv;function Pa(){let n,o;const s=new Promise((u,f)=>{n=u,o=f});s.status="pending",s.catch(()=>{});function l(u){Object.assign(s,u),delete s.resolve,delete s.reject}return s.resolve=u=>{l({status:"fulfilled",value:u}),n(u)},s.reject=u=>{l({status:"rejected",reason:u}),o(u)},s}var Kv=zv;function qv(){let n=[],o=0,s=h=>{h()},l=h=>{h()},u=Kv;const f=h=>{o?n.push(h):u(()=>{s(h)})},p=()=>{const h=n;n=[],h.length&&u(()=>{l(()=>{h.forEach(g=>{s(g)})})})};return{batch:h=>{let g;o++;try{g=h()}finally{o--,o||p()}return g},batchCalls:h=>(...g)=>{f(()=>{h(...g)})},schedule:f,setNotifyFunction:h=>{s=h},setBatchNotifyFunction:h=>{l=h},setScheduler:h=>{u=h}}}var ze=qv(),Gv=class extends Rr{#e=!0;#t;#n;constructor(){super(),this.#n=n=>{if(!Kn&&window.addEventListener){const o=()=>n(!0),s=()=>n(!1);return window.addEventListener("online",o,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",o),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(n){this.#n=n,this.#t?.(),this.#t=n(this.setOnline.bind(this))}setOnline(n){this.#e!==n&&(this.#e=n,this.listeners.forEach(s=>{s(n)}))}isOnline(){return this.#e}},Xs=new Gv;function Xv(n){return Math.min(1e3*2**n,3e4)}function bp(n){return(n??"online")==="online"?Xs.isOnline():!0}var Ra=class extends Error{constructor(n){super("CancelledError"),this.revert=n?.revert,this.silent=n?.silent}};function Cp(n){let o=!1,s=0,l;const u=Pa(),f=()=>u.status!=="pending",p=E=>{if(!f()){const b=new Ra(E);k(b),n.onCancel?.(b)}},h=()=>{o=!0},g=()=>{o=!1},v=()=>qa.isFocused()&&(n.networkMode==="always"||Xs.isOnline())&&n.canRun(),x=()=>bp(n.networkMode)&&n.canRun(),S=E=>{f()||(l?.(),u.resolve(E))},k=E=>{f()||(l?.(),u.reject(E))},R=()=>new Promise(E=>{l=b=>{(f()||v())&&E(b)},n.onPause?.()}).then(()=>{l=void 0,f()||n.onContinue?.()}),j=()=>{if(f())return;let E;const b=s===0?n.initialPromise:void 0;try{E=b??n.fn()}catch(A){E=Promise.reject(A)}Promise.resolve(E).then(S).catch(A=>{if(f())return;const M=n.retry??(Kn?0:3),D=n.retryDelay??Xv,F=typeof D=="function"?D(s,A):D,W=M===!0||typeof M=="number"&&s<M||typeof M=="function"&&M(s,A);if(o||!W){k(A);return}s++,n.onFail?.(s,A),Hv(F).then(()=>v()?void 0:R()).then(()=>{o?k(A):j()})})};return{promise:u,status:()=>u.status,cancel:p,continue:()=>(l?.(),u),cancelRetry:h,continueRetry:g,canStart:x,start:()=>(x()?j():R().then(j),u)}}var kp=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ka(this.gcTime)&&(this.#e=Vn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Kn?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Vn.clearTimeout(this.#e),this.#e=void 0)}},Yv=class extends kp{#e;#t;#n;#o;#r;#i;#l;constructor(n){super(),this.#l=!1,this.#i=n.defaultOptions,this.setOptions(n.options),this.observers=[],this.#o=n.client,this.#n=this.#o.getQueryCache(),this.queryKey=n.queryKey,this.queryHash=n.queryHash,this.#e=_f(this.options),this.state=n.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(n){if(this.options={...this.#i,...n},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const o=_f(this.options);o.data!==void 0&&(this.setState(Of(o.data,o.dataUpdatedAt)),this.#e=o)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(n,o){const s=Na(this.state.data,n,this.options);return this.#s({data:s,type:"success",dataUpdatedAt:o?.updatedAt,manual:o?.manual}),s}setState(n,o){this.#s({type:"setState",state:n,setStateOptions:o})}cancel(n){const o=this.#r?.promise;return this.#r?.cancel(n),o?o.then(Je).catch(Je):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(n=>xt(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Qa||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>En(n.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(n=>n.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(n=0){return this.state.data===void 0?!0:n==="static"?!1:this.state.isInvalidated?!0:!xp(this.state.dataUpdatedAt,n)}onFocus(){this.observers.find(o=>o.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(o=>o.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){this.observers.includes(n)&&(this.observers=this.observers.filter(o=>o!==n),this.observers.length||(this.#r&&(this.#l?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(n,o){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&o?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(n&&this.setOptions(n),!this.options.queryFn){const h=this.observers.find(g=>g.options.queryFn);h&&this.setOptions(h.options)}const s=new AbortController,l=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(this.#l=!0,s.signal)})},u=()=>{const h=Sp(this.options,o),v=(()=>{const x={client:this.#o,queryKey:this.queryKey,meta:this.meta};return l(x),x})();return this.#l=!1,this.options.persister?this.options.persister(h,v,this):h(v)},p=(()=>{const h={fetchOptions:o,options:this.options,queryKey:this.queryKey,client:this.#o,state:this.state,fetchFn:u};return l(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=Cp({initialPromise:o?.initialPromise,fn:p.fetchFn,onCancel:h=>{h instanceof Ra&&h.revert&&this.setState({...this.#t,fetchStatus:"idle"}),s.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 Ra){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(n){const o=s=>{switch(n.type){case"failed":return{...s,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...Ep(s.data,this.options),fetchMeta:n.meta??null};case"success":const l={...s,...Of(n.data,n.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=n.manual?l:void 0,l;case"error":const u=n.error;return{...s,error:u,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:u,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...n.state}}};this.state=o(this.state),ze.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:n})})}};function Ep(n,o){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:bp(o.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function Of(n,o){return{data:n,dataUpdatedAt:o??Date.now(),error:null,isInvalidated:!1,status:"success"}}function _f(n){const o=typeof n.initialData=="function"?n.initialData():n.initialData,s=o!==void 0,l=s?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:o,dataUpdateCount:0,dataUpdatedAt:s?l??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var Zv=class extends Rr{constructor(n,o){super(),this.options=o,this.#e=n,this.#s=null,this.#l=Pa(),this.bindMethods(),this.setOptions(o)}#e;#t=void 0;#n=void 0;#o=void 0;#r;#i;#l;#s;#m;#f;#p;#u;#c;#a;#h=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Af(this.#t,this.options)?this.#d():this.updateResult(),this.#x())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ja(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ja(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#w(),this.#S(),this.#t.removeObserver(this)}setOptions(n){const o=this.options,s=this.#t;if(this.options=this.#e.defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof xt(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#b(),this.#t.setOptions(this.options),o._defaulted&&!Gs(this.options,o)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const l=this.hasListeners();l&&Mf(this.#t,s,this.options,o)&&this.#d(),this.updateResult(),l&&(this.#t!==s||xt(this.options.enabled,this.#t)!==xt(o.enabled,this.#t)||En(this.options.staleTime,this.#t)!==En(o.staleTime,this.#t))&&this.#g();const u=this.#v();l&&(this.#t!==s||xt(this.options.enabled,this.#t)!==xt(o.enabled,this.#t)||u!==this.#a)&&this.#y(u)}getOptimisticResult(n){const o=this.#e.getQueryCache().build(this.#e,n),s=this.createResult(o,n);return ey(this,s)&&(this.#o=s,this.#i=this.options,this.#r=this.#t.state),s}getCurrentResult(){return this.#o}trackResult(n,o){return new Proxy(n,{get:(s,l)=>(this.trackProp(l),o?.(l),l==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#l.status==="pending"&&this.#l.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,l))})}trackProp(n){this.#h.add(n)}getCurrentQuery(){return this.#t}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const o=this.#e.defaultQueryOptions(n),s=this.#e.getQueryCache().build(this.#e,o);return s.fetch().then(()=>this.createResult(s,o))}fetch(n){return this.#d({...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#o))}#d(n){this.#b();let o=this.#t.fetch(this.options,n);return n?.throwOnError||(o=o.catch(Je)),o}#g(){this.#w();const n=En(this.options.staleTime,this.#t);if(Kn||this.#o.isStale||!ka(n))return;const s=xp(this.#o.dataUpdatedAt,n)+1;this.#u=Vn.setTimeout(()=>{this.#o.isStale||this.updateResult()},s)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(n){this.#S(),this.#a=n,!(Kn||xt(this.options.enabled,this.#t)===!1||!ka(this.#a)||this.#a===0)&&(this.#c=Vn.setInterval(()=>{(this.options.refetchIntervalInBackground||qa.isFocused())&&this.#d()},this.#a))}#x(){this.#g(),this.#y(this.#v())}#w(){this.#u&&(Vn.clearTimeout(this.#u),this.#u=void 0)}#S(){this.#c&&(Vn.clearInterval(this.#c),this.#c=void 0)}createResult(n,o){const s=this.#t,l=this.options,u=this.#o,f=this.#r,p=this.#i,g=n!==s?n.state:this.#n,{state:v}=n;let x={...v},S=!1,k;if(o._optimisticResults){const L=this.hasListeners(),se=!L&&Af(n,o),le=L&&Mf(n,s,o,l);(se||le)&&(x={...x,...Ep(v.data,n.options)}),o._optimisticResults==="isRestoring"&&(x.fetchStatus="idle")}let{error:R,errorUpdatedAt:j,status:E}=x;k=x.data;let b=!1;if(o.placeholderData!==void 0&&k===void 0&&E==="pending"){let L;u?.isPlaceholderData&&o.placeholderData===p?.placeholderData?(L=u.data,b=!0):L=typeof o.placeholderData=="function"?o.placeholderData(this.#p?.state.data,this.#p):o.placeholderData,L!==void 0&&(E="success",k=Na(u?.data,L,o),S=!0)}if(o.select&&k!==void 0&&!b)if(u&&k===f?.data&&o.select===this.#m)k=this.#f;else try{this.#m=o.select,k=o.select(k),k=Na(u?.data,k,o),this.#f=k,this.#s=null}catch(L){this.#s=L}this.#s&&(R=this.#s,k=this.#f,j=Date.now(),E="error");const A=x.fetchStatus==="fetching",M=E==="pending",D=E==="error",F=M&&A,W=k!==void 0,V={status:E,fetchStatus:x.fetchStatus,isPending:M,isSuccess:E==="success",isError:D,isInitialLoading:F,isLoading:F,data:k,dataUpdatedAt:x.dataUpdatedAt,error:R,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:A,isRefetching:A&&!M,isLoadingError:D&&!W,isPaused:x.fetchStatus==="paused",isPlaceholderData:S,isRefetchError:D&&W,isStale:Ga(n,o),refetch:this.refetch,promise:this.#l,isEnabled:xt(o.enabled,n)!==!1};if(this.options.experimental_prefetchInRender){const L=V.data!==void 0,se=V.status==="error"&&!L,le=ce=>{se?ce.reject(V.error):L&&ce.resolve(V.data)},pe=()=>{const ce=this.#l=V.promise=Pa();le(ce)},ee=this.#l;switch(ee.status){case"pending":n.queryHash===s.queryHash&&le(ee);break;case"fulfilled":(se||V.data!==ee.value)&&pe();break;case"rejected":(!se||V.error!==ee.reason)&&pe();break}}return V}updateResult(){const n=this.#o,o=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),Gs(o,n))return;this.#o=o;const s=()=>{if(!n)return!0;const{notifyOnChangeProps:l}=this.options,u=typeof l=="function"?l():l;if(u==="all"||!u&&!this.#h.size)return!0;const f=new Set(u??this.#h);return this.options.throwOnError&&f.add("error"),Object.keys(this.#o).some(p=>{const h=p;return this.#o[h]!==n[h]&&f.has(h)})};this.#C({listeners:s()})}#b(){const n=this.#e.getQueryCache().build(this.#e,this.options);if(n===this.#t)return;const o=this.#t;this.#t=n,this.#n=n.state,this.hasListeners()&&(o?.removeObserver(this),n.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#x()}#C(n){ze.batch(()=>{n.listeners&&this.listeners.forEach(o=>{o(this.#o)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function Jv(n,o){return xt(o.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&o.retryOnMount===!1)}function Af(n,o){return Jv(n,o)||n.state.data!==void 0&&ja(n,o,o.refetchOnMount)}function ja(n,o,s){if(xt(o.enabled,n)!==!1&&En(o.staleTime,n)!=="static"){const l=typeof s=="function"?s(n):s;return l==="always"||l!==!1&&Ga(n,o)}return!1}function Mf(n,o,s,l){return(n!==o||xt(l.enabled,n)===!1)&&(!s.suspense||n.state.status!=="error")&&Ga(n,s)}function Ga(n,o){return xt(o.enabled,n)!==!1&&n.isStaleByTime(En(o.staleTime,n))}function ey(n,o){return!Gs(n.getCurrentResult(),o)}function Lf(n){return{onFetch:(o,s)=>{const l=o.options,u=o.fetchOptions?.meta?.fetchMore?.direction,f=o.state.data?.pages||[],p=o.state.data?.pageParams||[];let h={pages:[],pageParams:[]},g=0;const v=async()=>{let x=!1;const S=j=>{Vv(j,()=>o.signal,()=>x=!0)},k=Sp(o.options,o.fetchOptions),R=async(j,E,b)=>{if(x)return Promise.reject();if(E==null&&j.pages.length)return Promise.resolve(j);const M=(()=>{const Q={client:o.client,queryKey:o.queryKey,pageParam:E,direction:b?"backward":"forward",meta:o.options.meta};return S(Q),Q})(),D=await k(M),{maxPages:F}=o.options,W=b?Wv:Bv;return{pages:W(j.pages,D,F),pageParams:W(j.pageParams,E,F)}};if(u&&f.length){const j=u==="backward",E=j?ty:If,b={pages:f,pageParams:p},A=E(l,b);h=await R(b,A,j)}else{const j=n??f.length;do{const E=g===0?p[0]??l.initialPageParam:If(l,h);if(g>0&&E==null)break;h=await R(h,E),g++}while(g<j)}return h};o.options.persister?o.fetchFn=()=>o.options.persister?.(v,{client:o.client,queryKey:o.queryKey,meta:o.options.meta,signal:o.signal},s):o.fetchFn=v}}}function If(n,{pages:o,pageParams:s}){const l=o.length-1;return o.length>0?n.getNextPageParam(o[l],o,s[l],s):void 0}function ty(n,{pages:o,pageParams:s}){return o.length>0?n.getPreviousPageParam?.(o[0],o,s[0],s):void 0}var ny=class extends kp{#e;#t;#n;#o;constructor(n){super(),this.#e=n.client,this.mutationId=n.mutationId,this.#n=n.mutationCache,this.#t=[],this.state=n.state||Np(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){this.#t.includes(n)||(this.#t.push(n),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){this.#t=this.#t.filter(o=>o!==n),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:n})}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(n){const o=()=>{this.#r({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#o=Cp({fn:()=>this.options.mutationFn?this.options.mutationFn(n,s):Promise.reject(new Error("No mutationFn found")),onFail:(f,p)=>{this.#r({type:"failed",failureCount:f,error:p})},onPause:()=>{this.#r({type:"pause"})},onContinue:o,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const l=this.state.status==="pending",u=!this.#o.canStart();try{if(l)o();else{this.#r({type:"pending",variables:n,isPaused:u}),this.#n.config.onMutate&&await this.#n.config.onMutate(n,this,s);const p=await this.options.onMutate?.(n,s);p!==this.state.context&&this.#r({type:"pending",context:p,variables:n,isPaused:u})}const f=await this.#o.start();return await this.#n.config.onSuccess?.(f,n,this.state.context,this,s),await this.options.onSuccess?.(f,n,this.state.context,s),await this.#n.config.onSettled?.(f,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(f,null,n,this.state.context,s),this.#r({type:"success",data:f}),f}catch(f){try{await this.#n.config.onError?.(f,n,this.state.context,this,s)}catch(p){Promise.reject(p)}try{await this.options.onError?.(f,n,this.state.context,s)}catch(p){Promise.reject(p)}try{await this.#n.config.onSettled?.(void 0,f,this.state.variables,this.state.context,this,s)}catch(p){Promise.reject(p)}try{await this.options.onSettled?.(void 0,f,n,this.state.context,s)}catch(p){Promise.reject(p)}throw this.#r({type:"error",error:f}),f}finally{this.#n.runNext(this)}}#r(n){const o=s=>{switch(n.type){case"failed":return{...s,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...s,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:n.error,failureCount:s.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=o(this.state),ze.batch(()=>{this.#t.forEach(s=>{s.onMutationUpdate(n)}),this.#n.notify({mutation:this,type:"updated",action:n})})}};function Np(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ry=class extends Rr{constructor(n={}){super(),this.config=n,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(n,o,s){const l=new ny({client:n,mutationCache:this,mutationId:++this.#n,options:n.defaultMutationOptions(o),state:s});return this.add(l),l}add(n){this.#e.add(n);const o=$s(n);if(typeof o=="string"){const s=this.#t.get(o);s?s.push(n):this.#t.set(o,[n])}this.notify({type:"added",mutation:n})}remove(n){if(this.#e.delete(n)){const o=$s(n);if(typeof o=="string"){const s=this.#t.get(o);if(s)if(s.length>1){const l=s.indexOf(n);l!==-1&&s.splice(l,1)}else s[0]===n&&this.#t.delete(o)}}this.notify({type:"removed",mutation:n})}canRun(n){const o=$s(n);if(typeof o=="string"){const l=this.#t.get(o)?.find(u=>u.state.status==="pending");return!l||l===n}else return!0}runNext(n){const o=$s(n);return typeof o=="string"?this.#t.get(o)?.find(l=>l!==n&&l.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){ze.batch(()=>{this.#e.forEach(n=>{this.notify({type:"removed",mutation:n})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(n){const o={exact:!0,...n};return this.getAll().find(s=>Rf(o,s))}findAll(n={}){return this.getAll().filter(o=>Rf(n,o))}notify(n){ze.batch(()=>{this.listeners.forEach(o=>{o(n)})})}resumePausedMutations(){const n=this.getAll().filter(o=>o.state.isPaused);return ze.batch(()=>Promise.all(n.map(o=>o.continue().catch(Je))))}};function $s(n){return n.options.scope?.id}var oy=class extends Rr{#e;#t=void 0;#n;#o;constructor(o,s){super(),this.#e=o,this.setOptions(s),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(o){const s=this.options;this.options=this.#e.defaultMutationOptions(o),Gs(this.options,s)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),s?.mutationKey&&this.options.mutationKey&&qn(s.mutationKey)!==qn(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(o){this.#r(),this.#i(o)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#i()}mutate(o,s){return this.#o=s,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(o)}#r(){const o=this.#n?.state??Np();this.#t={...o,isPending:o.status==="pending",isSuccess:o.status==="success",isError:o.status==="error",isIdle:o.status==="idle",mutate:this.mutate,reset:this.reset}}#i(o){ze.batch(()=>{if(this.#o&&this.hasListeners()){const s=this.#t.variables,l=this.#t.context,u={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(o?.type==="success"){try{this.#o.onSuccess?.(o.data,s,l,u)}catch(f){Promise.reject(f)}try{this.#o.onSettled?.(o.data,null,s,l,u)}catch(f){Promise.reject(f)}}else if(o?.type==="error"){try{this.#o.onError?.(o.error,s,l,u)}catch(f){Promise.reject(f)}try{this.#o.onSettled?.(void 0,o.error,s,l,u)}catch(f){Promise.reject(f)}}}this.listeners.forEach(s=>{s(this.#t)})})}},sy=class extends Rr{constructor(n={}){super(),this.config=n,this.#e=new Map}#e;build(n,o,s){const l=o.queryKey,u=o.queryHash??Va(l,o);let f=this.get(u);return f||(f=new Yv({client:n,queryKey:l,queryHash:u,options:n.defaultQueryOptions(o),state:s,defaultOptions:n.getQueryDefaults(l)}),this.add(f)),f}add(n){this.#e.has(n.queryHash)||(this.#e.set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const o=this.#e.get(n.queryHash);o&&(n.destroy(),o===n&&this.#e.delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){ze.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return this.#e.get(n)}getAll(){return[...this.#e.values()]}find(n){const o={exact:!0,...n};return this.getAll().find(s=>Pf(o,s))}findAll(n={}){const o=this.getAll();return Object.keys(n).length>0?o.filter(s=>Pf(n,s)):o}notify(n){ze.batch(()=>{this.listeners.forEach(o=>{o(n)})})}onFocus(){ze.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){ze.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},iy=class{#e;#t;#n;#o;#r;#i;#l;#s;constructor(n={}){this.#e=n.queryCache||new sy,this.#t=n.mutationCache||new ry,this.#n=n.defaultOptions||{},this.#o=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#l=qa.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Xs.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#l?.(),this.#l=void 0,this.#s?.(),this.#s=void 0)}isFetching(n){return this.#e.findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return this.#t.findAll({...n,status:"pending"}).length}getQueryData(n){const o=this.defaultQueryOptions({queryKey:n});return this.#e.get(o.queryHash)?.state.data}ensureQueryData(n){const o=this.defaultQueryOptions(n),s=this.#e.build(this,o),l=s.state.data;return l===void 0?this.fetchQuery(n):(n.revalidateIfStale&&s.isStaleByTime(En(o.staleTime,s))&&this.prefetchQuery(o),Promise.resolve(l))}getQueriesData(n){return this.#e.findAll(n).map(({queryKey:o,state:s})=>{const l=s.data;return[o,l]})}setQueryData(n,o,s){const l=this.defaultQueryOptions({queryKey:n}),f=this.#e.get(l.queryHash)?.state.data,p=Uv(o,f);if(p!==void 0)return this.#e.build(this,l).setData(p,{...s,manual:!0})}setQueriesData(n,o,s){return ze.batch(()=>this.#e.findAll(n).map(({queryKey:l})=>[l,this.setQueryData(l,o,s)]))}getQueryState(n){const o=this.defaultQueryOptions({queryKey:n});return this.#e.get(o.queryHash)?.state}removeQueries(n){const o=this.#e;ze.batch(()=>{o.findAll(n).forEach(s=>{o.remove(s)})})}resetQueries(n,o){const s=this.#e;return ze.batch(()=>(s.findAll(n).forEach(l=>{l.reset()}),this.refetchQueries({type:"active",...n},o)))}cancelQueries(n,o={}){const s={revert:!0,...o},l=ze.batch(()=>this.#e.findAll(n).map(u=>u.cancel(s)));return Promise.all(l).then(Je).catch(Je)}invalidateQueries(n,o={}){return ze.batch(()=>(this.#e.findAll(n).forEach(s=>{s.invalidate()}),n?.refetchType==="none"?Promise.resolve():this.refetchQueries({...n,type:n?.refetchType??n?.type??"active"},o)))}refetchQueries(n,o={}){const s={...o,cancelRefetch:o.cancelRefetch??!0},l=ze.batch(()=>this.#e.findAll(n).filter(u=>!u.isDisabled()&&!u.isStatic()).map(u=>{let f=u.fetch(void 0,s);return s.throwOnError||(f=f.catch(Je)),u.state.fetchStatus==="paused"?Promise.resolve():f}));return Promise.all(l).then(Je)}fetchQuery(n){const o=this.defaultQueryOptions(n);o.retry===void 0&&(o.retry=!1);const s=this.#e.build(this,o);return s.isStaleByTime(En(o.staleTime,s))?s.fetch(o):Promise.resolve(s.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Je).catch(Je)}fetchInfiniteQuery(n){return n.behavior=Lf(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Je).catch(Je)}ensureInfiniteQueryData(n){return n.behavior=Lf(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return Xs.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(n){this.#n=n}setQueryDefaults(n,o){this.#o.set(qn(n),{queryKey:n,defaultOptions:o})}getQueryDefaults(n){const o=[...this.#o.values()],s={};return o.forEach(l=>{ko(n,l.queryKey)&&Object.assign(s,l.defaultOptions)}),s}setMutationDefaults(n,o){this.#r.set(qn(n),{mutationKey:n,defaultOptions:o})}getMutationDefaults(n){const o=[...this.#r.values()],s={};return o.forEach(l=>{ko(n,l.mutationKey)&&Object.assign(s,l.defaultOptions)}),s}defaultQueryOptions(n){if(n._defaulted)return n;const o={...this.#n.queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return o.queryHash||(o.queryHash=Va(o.queryKey,o)),o.refetchOnReconnect===void 0&&(o.refetchOnReconnect=o.networkMode!=="always"),o.throwOnError===void 0&&(o.throwOnError=!!o.suspense),!o.networkMode&&o.persister&&(o.networkMode="offlineFirst"),o.queryFn===Qa&&(o.enabled=!1),o}defaultMutationOptions(n){return n?._defaulted?n:{...this.#n.mutations,...n?.mutationKey&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Pp=y.createContext(void 0),Rp=n=>{const o=y.useContext(Pp);if(!o)throw new Error("No QueryClient set, use QueryClientProvider to set one");return o},ly=({client:n,children:o})=>(y.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),d.jsx(Pp.Provider,{value:n,children:o})),jp=y.createContext(!1),ay=()=>y.useContext(jp);jp.Provider;function uy(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var cy=y.createContext(uy()),dy=()=>y.useContext(cy),fy=(n,o,s)=>{const l=s?.state.error&&typeof n.throwOnError=="function"?Ka(n.throwOnError,[s.state.error,s]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||l)&&(o.isReset()||(n.retryOnMount=!1))},py=n=>{y.useEffect(()=>{n.clearReset()},[n])},hy=({result:n,errorResetBoundary:o,throwOnError:s,query:l,suspense:u})=>n.isError&&!o.isReset()&&!n.isFetching&&l&&(u&&n.data===void 0||Ka(s,[n.error,l])),my=n=>{if(n.suspense){const s=u=>u==="static"?u:Math.max(u??1e3,1e3),l=n.staleTime;n.staleTime=typeof l=="function"?(...u)=>s(l(...u)):s(l),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},gy=(n,o)=>n.isLoading&&n.isFetching&&!o,vy=(n,o)=>n?.suspense&&o.isPending,Df=(n,o,s)=>o.fetchOptimistic(n).catch(()=>{s.clearReset()});function yy(n,o,s){const l=ay(),u=dy(),f=Rp(),p=f.defaultQueryOptions(n);f.getDefaultOptions().queries?._experimental_beforeQuery?.(p);const h=f.getQueryCache().get(p.queryHash);p._optimisticResults=l?"isRestoring":"optimistic",my(p),fy(p,u,h),py(u);const g=!f.getQueryCache().get(p.queryHash),[v]=y.useState(()=>new o(f,p)),x=v.getOptimisticResult(p),S=!l&&n.subscribed!==!1;if(y.useSyncExternalStore(y.useCallback(k=>{const R=S?v.subscribe(ze.batchCalls(k)):Je;return v.updateResult(),R},[v,S]),()=>v.getCurrentResult(),()=>v.getCurrentResult()),y.useEffect(()=>{v.setOptions(p)},[p,v]),vy(p,x))throw Df(p,v,u);if(hy({result:x,errorResetBoundary:u,throwOnError:p.throwOnError,query:h,suspense:p.suspense}))throw x.error;return f.getDefaultOptions().queries?._experimental_afterQuery?.(p,x),p.experimental_prefetchInRender&&!Kn&&gy(x,l)&&(g?Df(p,v,u):h?.promise)?.catch(Je).finally(()=>{v.updateResult()}),p.notifyOnChangeProps?x:v.trackResult(x)}function Dt(n,o){return yy(n,Zv)}function jt(n,o){const s=Rp(),[l]=y.useState(()=>new oy(s,n));y.useEffect(()=>{l.setOptions(n)},[l,n]);const u=y.useSyncExternalStore(y.useCallback(p=>l.subscribe(ze.batchCalls(p)),[l]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),f=y.useCallback((p,h)=>{l.mutate(p,h).catch(Je)},[l]);if(u.error&&Ka(l.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:f,mutateAsync:u.mutate}}const Tp="__PORT_5000__".startsWith("__")?"":"__PORT_5000__";async function Op(n){if(!n.ok){const o=await n.text()||n.statusText;throw new Error(`${n.status}: ${o}`)}}async function wt(n,o,s){const l=await fetch(`${Tp}${o}`,{method:n,headers:s?{"Content-Type":"application/json"}:{},body:s?JSON.stringify(s):void 0});return await Op(l),l}const xy=({on401:n})=>async({queryKey:o})=>{const s=await fetch(`${Tp}${o.join("/")}`);return await Op(s),await s.json()},Le=new iy({defaultOptions:{queries:{queryFn:xy({on401:"throw"}),refetchInterval:!1,refetchOnWindowFocus:!1,staleTime:1/0,retry:!1},mutations:{retry:!1}}}),wy=1,Sy=1e6;let ma=0;function by(){return ma=(ma+1)%Number.MAX_SAFE_INTEGER,ma.toString()}const ga=new Map,Ff=n=>{if(ga.has(n))return;const o=setTimeout(()=>{ga.delete(n),Co({type:"REMOVE_TOAST",toastId:n})},Sy);ga.set(n,o)},Cy=(n,o)=>{switch(o.type){case"ADD_TOAST":return{...n,toasts:[o.toast,...n.toasts].slice(0,wy)};case"UPDATE_TOAST":return{...n,toasts:n.toasts.map(s=>s.id===o.toast.id?{...s,...o.toast}:s)};case"DISMISS_TOAST":{const{toastId:s}=o;return s?Ff(s):n.toasts.forEach(l=>{Ff(l.id)}),{...n,toasts:n.toasts.map(l=>l.id===s||s===void 0?{...l,open:!1}:l)}}case"REMOVE_TOAST":return o.toastId===void 0?{...n,toasts:[]}:{...n,toasts:n.toasts.filter(s=>s.id!==o.toastId)}}},Qs=[];let Ks={toasts:[]};function Co(n){Ks=Cy(Ks,n),Qs.forEach(o=>{o(Ks)})}function Gn({...n}){const o=by(),s=u=>Co({type:"UPDATE_TOAST",toast:{...u,id:o}}),l=()=>Co({type:"DISMISS_TOAST",toastId:o});return Co({type:"ADD_TOAST",toast:{...n,id:o,open:!0,onOpenChange:u=>{u||l()}}}),{id:o,dismiss:l,update:s}}function ky(){const[n,o]=y.useState(Ks);return y.useEffect(()=>(Qs.push(o),()=>{const s=Qs.indexOf(o);s>-1&&Qs.splice(s,1)}),[n]),{...n,toast:Gn,dismiss:s=>Co({type:"DISMISS_TOAST",toastId:s})}}var ri=ip();const Ey=sp(ri);function Ie(n,o,{checkForDefaultPrevented:s=!0}={}){return function(u){if(n?.(u),s===!1||!u.defaultPrevented)return o?.(u)}}function zf(n,o){if(typeof n=="function")return n(o);n!=null&&(n.current=o)}function Xa(...n){return o=>{let s=!1;const l=n.map(u=>{const f=zf(u,o);return!s&&typeof f=="function"&&(s=!0),f});if(s)return()=>{for(let u=0;u<l.length;u++){const f=l[u];typeof f=="function"?f():zf(n[u],null)}}}}function St(...n){return y.useCallback(Xa(...n),n)}function Ro(n,o=[]){let s=[];function l(f,p){const h=y.createContext(p),g=s.length;s=[...s,p];const v=S=>{const{scope:k,children:R,...j}=S,E=k?.[n]?.[g]||h,b=y.useMemo(()=>j,Object.values(j));return d.jsx(E.Provider,{value:b,children:R})};v.displayName=f+"Provider";function x(S,k){const R=k?.[n]?.[g]||h,j=y.useContext(R);if(j)return j;if(p!==void 0)return p;throw new Error(`\`${S}\` must be used within \`${f}\``)}return[v,x]}const u=()=>{const f=s.map(p=>y.createContext(p));return function(h){const g=h?.[n]||f;return y.useMemo(()=>({[`__scope${n}`]:{...h,[n]:g}}),[h,g])}};return u.scopeName=n,[l,Ny(u,...o)]}function Ny(...n){const o=n[0];if(n.length===1)return o;const s=()=>{const l=n.map(u=>({useScope:u(),scopeName:u.scopeName}));return function(f){const p=l.reduce((h,{useScope:g,scopeName:v})=>{const S=g(f)[`__scope${v}`];return{...h,...S}},{});return y.useMemo(()=>({[`__scope${o.scopeName}`]:p}),[p])}};return s.scopeName=o.scopeName,s}function Uf(n){const o=Py(n),s=y.forwardRef((l,u)=>{const{children:f,...p}=l,h=y.Children.toArray(f),g=h.find(jy);if(g){const v=g.props.children,x=h.map(S=>S===g?y.Children.count(v)>1?y.Children.only(null):y.isValidElement(v)?v.props.children:null:S);return d.jsx(o,{...p,ref:u,children:y.isValidElement(v)?y.cloneElement(v,void 0,x):null})}return d.jsx(o,{...p,ref:u,children:f})});return s.displayName=`${n}.Slot`,s}function Py(n){const o=y.forwardRef((s,l)=>{const{children:u,...f}=s;if(y.isValidElement(u)){const p=Oy(u),h=Ty(f,u.props);return u.type!==y.Fragment&&(h.ref=l?Xa(l,p):p),y.cloneElement(u,h)}return y.Children.count(u)>1?y.Children.only(null):null});return o.displayName=`${n}.SlotClone`,o}var Ry=Symbol("radix.slottable");function jy(n){return y.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===Ry}function Ty(n,o){const s={...o};for(const l in o){const u=n[l],f=o[l];/^on[A-Z]/.test(l)?u&&f?s[l]=(...h)=>{const g=f(...h);return u(...h),g}:u&&(s[l]=u):l==="style"?s[l]={...u,...f}:l==="className"&&(s[l]=[u,f].filter(Boolean).join(" "))}return{...n,...s}}function Oy(n){let o=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,s=o&&"isReactWarning"in o&&o.isReactWarning;return s?n.ref:(o=Object.getOwnPropertyDescriptor(n,"ref")?.get,s=o&&"isReactWarning"in o&&o.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}function _y(n){const o=n+"CollectionProvider",[s,l]=Ro(o),[u,f]=s(o,{collectionRef:{current:null},itemMap:new Map}),p=E=>{const{scope:b,children:A}=E,M=kn.useRef(null),D=kn.useRef(new Map).current;return d.jsx(u,{scope:b,itemMap:D,collectionRef:M,children:A})};p.displayName=o;const h=n+"CollectionSlot",g=Uf(h),v=kn.forwardRef((E,b)=>{const{scope:A,children:M}=E,D=f(h,A),F=St(b,D.collectionRef);return d.jsx(g,{ref:F,children:M})});v.displayName=h;const x=n+"CollectionItemSlot",S="data-radix-collection-item",k=Uf(x),R=kn.forwardRef((E,b)=>{const{scope:A,children:M,...D}=E,F=kn.useRef(null),W=St(b,F),Q=f(x,A);return kn.useEffect(()=>(Q.itemMap.set(F,{ref:F,...D}),()=>{Q.itemMap.delete(F)})),d.jsx(k,{[S]:"",ref:W,children:M})});R.displayName=x;function j(E){const b=f(n+"CollectionConsumer",E);return kn.useCallback(()=>{const M=b.collectionRef.current;if(!M)return[];const D=Array.from(M.querySelectorAll(`[${S}]`));return Array.from(b.itemMap.values()).sort((Q,V)=>D.indexOf(Q.ref.current)-D.indexOf(V.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:p,Slot:v,ItemSlot:R},j,l]}function Ay(n){const o=My(n),s=y.forwardRef((l,u)=>{const{children:f,...p}=l,h=y.Children.toArray(f),g=h.find(Iy);if(g){const v=g.props.children,x=h.map(S=>S===g?y.Children.count(v)>1?y.Children.only(null):y.isValidElement(v)?v.props.children:null:S);return d.jsx(o,{...p,ref:u,children:y.isValidElement(v)?y.cloneElement(v,void 0,x):null})}return d.jsx(o,{...p,ref:u,children:f})});return s.displayName=`${n}.Slot`,s}function My(n){const o=y.forwardRef((s,l)=>{const{children:u,...f}=s;if(y.isValidElement(u)){const p=Fy(u),h=Dy(f,u.props);return u.type!==y.Fragment&&(h.ref=l?Xa(l,p):p),y.cloneElement(u,h)}return y.Children.count(u)>1?y.Children.only(null):null});return o.displayName=`${n}.SlotClone`,o}var Ly=Symbol("radix.slottable");function Iy(n){return y.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===Ly}function Dy(n,o){const s={...o};for(const l in o){const u=n[l],f=o[l];/^on[A-Z]/.test(l)?u&&f?s[l]=(...h)=>{const g=f(...h);return u(...h),g}:u&&(s[l]=u):l==="style"?s[l]={...u,...f}:l==="className"&&(s[l]=[u,f].filter(Boolean).join(" "))}return{...n,...s}}function Fy(n){let o=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,s=o&&"isReactWarning"in o&&o.isReactWarning;return s?n.ref:(o=Object.getOwnPropertyDescriptor(n,"ref")?.get,s=o&&"isReactWarning"in o&&o.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}var zy=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ve=zy.reduce((n,o)=>{const s=Ay(`Primitive.${o}`),l=y.forwardRef((u,f)=>{const{asChild:p,...h}=u,g=p?s:o;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(g,{...h,ref:f})});return l.displayName=`Primitive.${o}`,{...n,[o]:l}},{});function _p(n,o){n&&ri.flushSync(()=>n.dispatchEvent(o))}function Nn(n){const o=y.useRef(n);return y.useEffect(()=>{o.current=n}),y.useMemo(()=>(...s)=>o.current?.(...s),[])}function Uy(n,o=globalThis?.document){const s=Nn(n);y.useEffect(()=>{const l=u=>{u.key==="Escape"&&s(u)};return o.addEventListener("keydown",l,{capture:!0}),()=>o.removeEventListener("keydown",l,{capture:!0})},[s,o])}var $y="DismissableLayer",Ta="dismissableLayer.update",Hy="dismissableLayer.pointerDownOutside",By="dismissableLayer.focusOutside",$f,Ap=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ya=y.forwardRef((n,o)=>{const{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:p,onDismiss:h,...g}=n,v=y.useContext(Ap),[x,S]=y.useState(null),k=x?.ownerDocument??globalThis?.document,[,R]=y.useState({}),j=St(o,V=>S(V)),E=Array.from(v.layers),[b]=[...v.layersWithOutsidePointerEventsDisabled].slice(-1),A=E.indexOf(b),M=x?E.indexOf(x):-1,D=v.layersWithOutsidePointerEventsDisabled.size>0,F=M>=A,W=Vy(V=>{const L=V.target,se=[...v.branches].some(le=>le.contains(L));!F||se||(u?.(V),p?.(V),V.defaultPrevented||h?.())},k),Q=Qy(V=>{const L=V.target;[...v.branches].some(le=>le.contains(L))||(f?.(V),p?.(V),V.defaultPrevented||h?.())},k);return Uy(V=>{M===v.layers.size-1&&(l?.(V),!V.defaultPrevented&&h&&(V.preventDefault(),h()))},k),y.useEffect(()=>{if(x)return s&&(v.layersWithOutsidePointerEventsDisabled.size===0&&($f=k.body.style.pointerEvents,k.body.style.pointerEvents="none"),v.layersWithOutsidePointerEventsDisabled.add(x)),v.layers.add(x),Hf(),()=>{s&&v.layersWithOutsidePointerEventsDisabled.size===1&&(k.body.style.pointerEvents=$f)}},[x,k,s,v]),y.useEffect(()=>()=>{x&&(v.layers.delete(x),v.layersWithOutsidePointerEventsDisabled.delete(x),Hf())},[x,v]),y.useEffect(()=>{const V=()=>R({});return document.addEventListener(Ta,V),()=>document.removeEventListener(Ta,V)},[]),d.jsx(Ve.div,{...g,ref:j,style:{pointerEvents:D?F?"auto":"none":void 0,...n.style},onFocusCapture:Ie(n.onFocusCapture,Q.onFocusCapture),onBlurCapture:Ie(n.onBlurCapture,Q.onBlurCapture),onPointerDownCapture:Ie(n.onPointerDownCapture,W.onPointerDownCapture)})});Ya.displayName=$y;var Wy="DismissableLayerBranch",Mp=y.forwardRef((n,o)=>{const s=y.useContext(Ap),l=y.useRef(null),u=St(o,l);return y.useEffect(()=>{const f=l.current;if(f)return s.branches.add(f),()=>{s.branches.delete(f)}},[s.branches]),d.jsx(Ve.div,{...n,ref:u})});Mp.displayName=Wy;function Vy(n,o=globalThis?.document){const s=Nn(n),l=y.useRef(!1),u=y.useRef(()=>{});return y.useEffect(()=>{const f=h=>{if(h.target&&!l.current){let g=function(){Lp(Hy,s,v,{discrete:!0})};const v={originalEvent:h};h.pointerType==="touch"?(o.removeEventListener("click",u.current),u.current=g,o.addEventListener("click",u.current,{once:!0})):g()}else o.removeEventListener("click",u.current);l.current=!1},p=window.setTimeout(()=>{o.addEventListener("pointerdown",f)},0);return()=>{window.clearTimeout(p),o.removeEventListener("pointerdown",f),o.removeEventListener("click",u.current)}},[o,s]),{onPointerDownCapture:()=>l.current=!0}}function Qy(n,o=globalThis?.document){const s=Nn(n),l=y.useRef(!1);return y.useEffect(()=>{const u=f=>{f.target&&!l.current&&Lp(By,s,{originalEvent:f},{discrete:!1})};return o.addEventListener("focusin",u),()=>o.removeEventListener("focusin",u)},[o,s]),{onFocusCapture:()=>l.current=!0,onBlurCapture:()=>l.current=!1}}function Hf(){const n=new CustomEvent(Ta);document.dispatchEvent(n)}function Lp(n,o,s,{discrete:l}){const u=s.originalEvent.target,f=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:s});o&&u.addEventListener(n,o,{once:!0}),l?_p(u,f):u.dispatchEvent(f)}var Ky=Ya,qy=Mp,Ut=globalThis?.document?y.useLayoutEffect:()=>{},Gy="Portal",Ip=y.forwardRef((n,o)=>{const{container:s,...l}=n,[u,f]=y.useState(!1);Ut(()=>f(!0),[]);const p=s||u&&globalThis?.document?.body;return p?Ey.createPortal(d.jsx(Ve.div,{...l,ref:o}),p):null});Ip.displayName=Gy;function Xy(n,o){return y.useReducer((s,l)=>o[s][l]??s,n)}var oi=n=>{const{present:o,children:s}=n,l=Yy(o),u=typeof s=="function"?s({present:l.isPresent}):y.Children.only(s),f=St(l.ref,Zy(u));return typeof s=="function"||l.isPresent?y.cloneElement(u,{ref:f}):null};oi.displayName="Presence";function Yy(n){const[o,s]=y.useState(),l=y.useRef(null),u=y.useRef(n),f=y.useRef("none"),p=n?"mounted":"unmounted",[h,g]=Xy(p,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const v=Hs(l.current);f.current=h==="mounted"?v:"none"},[h]),Ut(()=>{const v=l.current,x=u.current;if(x!==n){const k=f.current,R=Hs(v);n?g("MOUNT"):R==="none"||v?.display==="none"?g("UNMOUNT"):g(x&&k!==R?"ANIMATION_OUT":"UNMOUNT"),u.current=n}},[n,g]),Ut(()=>{if(o){let v;const x=o.ownerDocument.defaultView??window,S=R=>{const E=Hs(l.current).includes(CSS.escape(R.animationName));if(R.target===o&&E&&(g("ANIMATION_END"),!u.current)){const b=o.style.animationFillMode;o.style.animationFillMode="forwards",v=x.setTimeout(()=>{o.style.animationFillMode==="forwards"&&(o.style.animationFillMode=b)})}},k=R=>{R.target===o&&(f.current=Hs(l.current))};return o.addEventListener("animationstart",k),o.addEventListener("animationcancel",S),o.addEventListener("animationend",S),()=>{x.clearTimeout(v),o.removeEventListener("animationstart",k),o.removeEventListener("animationcancel",S),o.removeEventListener("animationend",S)}}else g("ANIMATION_END")},[o,g]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:y.useCallback(v=>{l.current=v?getComputedStyle(v):null,s(v)},[])}}function Hs(n){return n?.animationName||"none"}function Zy(n){let o=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,s=o&&"isReactWarning"in o&&o.isReactWarning;return s?n.ref:(o=Object.getOwnPropertyDescriptor(n,"ref")?.get,s=o&&"isReactWarning"in o&&o.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}var Jy=$a[" useInsertionEffect ".trim().toString()]||Ut;function Za({prop:n,defaultProp:o,onChange:s=()=>{},caller:l}){const[u,f,p]=ex({defaultProp:o,onChange:s}),h=n!==void 0,g=h?n:u;{const x=y.useRef(n!==void 0);y.useEffect(()=>{const S=x.current;S!==h&&console.warn(`${l} is changing from ${S?"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,l])}const v=y.useCallback(x=>{if(h){const S=tx(x)?x(n):x;S!==n&&p.current?.(S)}else f(x)},[h,n,f,p]);return[g,v]}function ex({defaultProp:n,onChange:o}){const[s,l]=y.useState(n),u=y.useRef(s),f=y.useRef(o);return Jy(()=>{f.current=o},[o]),y.useEffect(()=>{u.current!==s&&(f.current?.(s),u.current=s)},[s,u]),[s,l,f]}function tx(n){return typeof n=="function"}var nx=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"}),rx="VisuallyHidden",si=y.forwardRef((n,o)=>d.jsx(Ve.span,{...n,ref:o,style:{...nx,...n.style}}));si.displayName=rx;var ox=si,Ja="ToastProvider",[eu,sx,ix]=_y("Toast"),[Dp]=Ro("Toast",[ix]),[lx,ii]=Dp(Ja),Fp=n=>{const{__scopeToast:o,label:s="Notification",duration:l=5e3,swipeDirection:u="right",swipeThreshold:f=50,children:p}=n,[h,g]=y.useState(null),[v,x]=y.useState(0),S=y.useRef(!1),k=y.useRef(!1);return s.trim()||console.error(`Invalid prop \`label\` supplied to \`${Ja}\`. Expected non-empty \`string\`.`),d.jsx(eu.Provider,{scope:o,children:d.jsx(lx,{scope:o,label:s,duration:l,swipeDirection:u,swipeThreshold:f,toastCount:v,viewport:h,onViewportChange:g,onToastAdd:y.useCallback(()=>x(R=>R+1),[]),onToastRemove:y.useCallback(()=>x(R=>R-1),[]),isFocusedToastEscapeKeyDownRef:S,isClosePausedRef:k,children:p})})};Fp.displayName=Ja;var zp="ToastViewport",ax=["F8"],Oa="toast.viewportPause",_a="toast.viewportResume",Up=y.forwardRef((n,o)=>{const{__scopeToast:s,hotkey:l=ax,label:u="Notifications ({hotkey})",...f}=n,p=ii(zp,s),h=sx(s),g=y.useRef(null),v=y.useRef(null),x=y.useRef(null),S=y.useRef(null),k=St(o,S,p.onViewportChange),R=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),j=p.toastCount>0;y.useEffect(()=>{const b=A=>{l.length!==0&&l.every(D=>A[D]||A.code===D)&&S.current?.focus()};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[l]),y.useEffect(()=>{const b=g.current,A=S.current;if(j&&b&&A){const M=()=>{if(!p.isClosePausedRef.current){const Q=new CustomEvent(Oa);A.dispatchEvent(Q),p.isClosePausedRef.current=!0}},D=()=>{if(p.isClosePausedRef.current){const Q=new CustomEvent(_a);A.dispatchEvent(Q),p.isClosePausedRef.current=!1}},F=Q=>{!b.contains(Q.relatedTarget)&&D()},W=()=>{b.contains(document.activeElement)||D()};return b.addEventListener("focusin",M),b.addEventListener("focusout",F),b.addEventListener("pointermove",M),b.addEventListener("pointerleave",W),window.addEventListener("blur",M),window.addEventListener("focus",D),()=>{b.removeEventListener("focusin",M),b.removeEventListener("focusout",F),b.removeEventListener("pointermove",M),b.removeEventListener("pointerleave",W),window.removeEventListener("blur",M),window.removeEventListener("focus",D)}}},[j,p.isClosePausedRef]);const E=y.useCallback(({tabbingDirection:b})=>{const M=h().map(D=>{const F=D.ref.current,W=[F,...Sx(F)];return b==="forwards"?W:W.reverse()});return(b==="forwards"?M.reverse():M).flat()},[h]);return y.useEffect(()=>{const b=S.current;if(b){const A=M=>{const D=M.altKey||M.ctrlKey||M.metaKey;if(M.key==="Tab"&&!D){const W=document.activeElement,Q=M.shiftKey;if(M.target===b&&Q){v.current?.focus();return}const se=E({tabbingDirection:Q?"backwards":"forwards"}),le=se.findIndex(pe=>pe===W);va(se.slice(le+1))?M.preventDefault():Q?v.current?.focus():x.current?.focus()}};return b.addEventListener("keydown",A),()=>b.removeEventListener("keydown",A)}},[h,E]),d.jsxs(qy,{ref:g,role:"region","aria-label":u.replace("{hotkey}",R),tabIndex:-1,style:{pointerEvents:j?void 0:"none"},children:[j&&d.jsx(Aa,{ref:v,onFocusFromOutsideViewport:()=>{const b=E({tabbingDirection:"forwards"});va(b)}}),d.jsx(eu.Slot,{scope:s,children:d.jsx(Ve.ol,{tabIndex:-1,...f,ref:k})}),j&&d.jsx(Aa,{ref:x,onFocusFromOutsideViewport:()=>{const b=E({tabbingDirection:"backwards"});va(b)}})]})});Up.displayName=zp;var $p="ToastFocusProxy",Aa=y.forwardRef((n,o)=>{const{__scopeToast:s,onFocusFromOutsideViewport:l,...u}=n,f=ii($p,s);return d.jsx(si,{tabIndex:0,...u,ref:o,style:{position:"fixed"},onFocus:p=>{const h=p.relatedTarget;!f.viewport?.contains(h)&&l()}})});Aa.displayName=$p;var jo="Toast",ux="toast.swipeStart",cx="toast.swipeMove",dx="toast.swipeCancel",fx="toast.swipeEnd",Hp=y.forwardRef((n,o)=>{const{forceMount:s,open:l,defaultOpen:u,onOpenChange:f,...p}=n,[h,g]=Za({prop:l,defaultProp:u??!0,onChange:f,caller:jo});return d.jsx(oi,{present:s||h,children:d.jsx(mx,{open:h,...p,ref:o,onClose:()=>g(!1),onPause:Nn(n.onPause),onResume:Nn(n.onResume),onSwipeStart:Ie(n.onSwipeStart,v=>{v.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Ie(n.onSwipeMove,v=>{const{x,y:S}=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",`${S}px`)}),onSwipeCancel:Ie(n.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:Ie(n.onSwipeEnd,v=>{const{x,y:S}=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",`${S}px`),g(!1)})})})});Hp.displayName=jo;var[px,hx]=Dp(jo,{onClose(){}}),mx=y.forwardRef((n,o)=>{const{__scopeToast:s,type:l="foreground",duration:u,open:f,onClose:p,onEscapeKeyDown:h,onPause:g,onResume:v,onSwipeStart:x,onSwipeMove:S,onSwipeCancel:k,onSwipeEnd:R,...j}=n,E=ii(jo,s),[b,A]=y.useState(null),M=St(o,G=>A(G)),D=y.useRef(null),F=y.useRef(null),W=u||E.duration,Q=y.useRef(0),V=y.useRef(W),L=y.useRef(0),{onToastAdd:se,onToastRemove:le}=E,pe=Nn(()=>{b?.contains(document.activeElement)&&E.viewport?.focus(),p()}),ee=y.useCallback(G=>{!G||G===1/0||(window.clearTimeout(L.current),Q.current=new Date().getTime(),L.current=window.setTimeout(pe,G))},[pe]);y.useEffect(()=>{const G=E.viewport;if(G){const me=()=>{ee(V.current),v?.()},ie=()=>{const oe=new Date().getTime()-Q.current;V.current=V.current-oe,window.clearTimeout(L.current),g?.()};return G.addEventListener(Oa,ie),G.addEventListener(_a,me),()=>{G.removeEventListener(Oa,ie),G.removeEventListener(_a,me)}}},[E.viewport,W,g,v,ee]),y.useEffect(()=>{f&&!E.isClosePausedRef.current&&ee(W)},[f,W,E.isClosePausedRef,ee]),y.useEffect(()=>(se(),()=>le()),[se,le]);const ce=y.useMemo(()=>b?Gp(b):null,[b]);return E.viewport?d.jsxs(d.Fragment,{children:[ce&&d.jsx(gx,{__scopeToast:s,role:"status","aria-live":l==="foreground"?"assertive":"polite",children:ce}),d.jsx(px,{scope:s,onClose:pe,children:ri.createPortal(d.jsx(eu.ItemSlot,{scope:s,children:d.jsx(Ky,{asChild:!0,onEscapeKeyDown:Ie(h,()=>{E.isFocusedToastEscapeKeyDownRef.current||pe(),E.isFocusedToastEscapeKeyDownRef.current=!1}),children:d.jsx(Ve.li,{tabIndex:0,"data-state":f?"open":"closed","data-swipe-direction":E.swipeDirection,...j,ref:M,style:{userSelect:"none",touchAction:"none",...n.style},onKeyDown:Ie(n.onKeyDown,G=>{G.key==="Escape"&&(h?.(G.nativeEvent),G.nativeEvent.defaultPrevented||(E.isFocusedToastEscapeKeyDownRef.current=!0,pe()))}),onPointerDown:Ie(n.onPointerDown,G=>{G.button===0&&(D.current={x:G.clientX,y:G.clientY})}),onPointerMove:Ie(n.onPointerMove,G=>{if(!D.current)return;const me=G.clientX-D.current.x,ie=G.clientY-D.current.y,oe=!!F.current,I=["left","right"].includes(E.swipeDirection),q=["left","up"].includes(E.swipeDirection)?Math.min:Math.max,K=I?q(0,me):0,P=I?0:q(0,ie),z=G.pointerType==="touch"?10:2,ue={x:K,y:P},de={originalEvent:G,delta:ue};oe?(F.current=ue,Bs(cx,S,de,{discrete:!1})):Bf(ue,E.swipeDirection,z)?(F.current=ue,Bs(ux,x,de,{discrete:!1}),G.target.setPointerCapture(G.pointerId)):(Math.abs(me)>z||Math.abs(ie)>z)&&(D.current=null)}),onPointerUp:Ie(n.onPointerUp,G=>{const me=F.current,ie=G.target;if(ie.hasPointerCapture(G.pointerId)&&ie.releasePointerCapture(G.pointerId),F.current=null,D.current=null,me){const oe=G.currentTarget,I={originalEvent:G,delta:me};Bf(me,E.swipeDirection,E.swipeThreshold)?Bs(fx,R,I,{discrete:!0}):Bs(dx,k,I,{discrete:!0}),oe.addEventListener("click",q=>q.preventDefault(),{once:!0})}})})})}),E.viewport)})]}):null}),gx=n=>{const{__scopeToast:o,children:s,...l}=n,u=ii(jo,o),[f,p]=y.useState(!1),[h,g]=y.useState(!1);return xx(()=>p(!0)),y.useEffect(()=>{const v=window.setTimeout(()=>g(!0),1e3);return()=>window.clearTimeout(v)},[]),h?null:d.jsx(Ip,{asChild:!0,children:d.jsx(si,{...l,children:f&&d.jsxs(d.Fragment,{children:[u.label," ",s]})})})},vx="ToastTitle",Bp=y.forwardRef((n,o)=>{const{__scopeToast:s,...l}=n;return d.jsx(Ve.div,{...l,ref:o})});Bp.displayName=vx;var yx="ToastDescription",Wp=y.forwardRef((n,o)=>{const{__scopeToast:s,...l}=n;return d.jsx(Ve.div,{...l,ref:o})});Wp.displayName=yx;var Vp="ToastAction",Qp=y.forwardRef((n,o)=>{const{altText:s,...l}=n;return s.trim()?d.jsx(qp,{altText:s,asChild:!0,children:d.jsx(tu,{...l,ref:o})}):(console.error(`Invalid prop \`altText\` supplied to \`${Vp}\`. Expected non-empty \`string\`.`),null)});Qp.displayName=Vp;var Kp="ToastClose",tu=y.forwardRef((n,o)=>{const{__scopeToast:s,...l}=n,u=hx(Kp,s);return d.jsx(qp,{asChild:!0,children:d.jsx(Ve.button,{type:"button",...l,ref:o,onClick:Ie(n.onClick,u.onClose)})})});tu.displayName=Kp;var qp=y.forwardRef((n,o)=>{const{__scopeToast:s,altText:l,...u}=n;return d.jsx(Ve.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":l||void 0,...u,ref:o})});function Gp(n){const o=[];return Array.from(n.childNodes).forEach(l=>{if(l.nodeType===l.TEXT_NODE&&l.textContent&&o.push(l.textContent),wx(l)){const u=l.ariaHidden||l.hidden||l.style.display==="none",f=l.dataset.radixToastAnnounceExclude==="";if(!u)if(f){const p=l.dataset.radixToastAnnounceAlt;p&&o.push(p)}else o.push(...Gp(l))}}),o}function Bs(n,o,s,{discrete:l}){const u=s.originalEvent.currentTarget,f=new CustomEvent(n,{bubbles:!0,cancelable:!0,detail:s});o&&u.addEventListener(n,o,{once:!0}),l?_p(u,f):u.dispatchEvent(f)}var Bf=(n,o,s=0)=>{const l=Math.abs(n.x),u=Math.abs(n.y),f=l>u;return o==="left"||o==="right"?f&&l>s:!f&&u>s};function xx(n=()=>{}){const o=Nn(n);Ut(()=>{let s=0,l=0;return s=window.requestAnimationFrame(()=>l=window.requestAnimationFrame(o)),()=>{window.cancelAnimationFrame(s),window.cancelAnimationFrame(l)}},[o])}function wx(n){return n.nodeType===n.ELEMENT_NODE}function Sx(n){const o=[],s=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:l=>{const u=l.tagName==="INPUT"&&l.type==="hidden";return l.disabled||l.hidden||u?NodeFilter.FILTER_SKIP:l.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)o.push(s.currentNode);return o}function va(n){const o=document.activeElement;return n.some(s=>s===o?!0:(s.focus(),document.activeElement!==o))}var bx=Fp,Xp=Up,Yp=Hp,Zp=Bp,Jp=Wp,eh=Qp,th=tu;function nh(n){var o,s,l="";if(typeof n=="string"||typeof n=="number")l+=n;else if(typeof n=="object")if(Array.isArray(n)){var u=n.length;for(o=0;o<u;o++)n[o]&&(s=nh(n[o]))&&(l&&(l+=" "),l+=s)}else for(s in n)n[s]&&(l&&(l+=" "),l+=s);return l}function rh(){for(var n,o,s=0,l="",u=arguments.length;s<u;s++)(n=arguments[s])&&(o=nh(n))&&(l&&(l+=" "),l+=o);return l}const Wf=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,Vf=rh,Cx=(n,o)=>s=>{var l;if(o?.variants==null)return Vf(n,s?.class,s?.className);const{variants:u,defaultVariants:f}=o,p=Object.keys(u).map(v=>{const x=s?.[v],S=f?.[v];if(x===null)return null;const k=Wf(x)||Wf(S);return u[v][k]}),h=s&&Object.entries(s).reduce((v,x)=>{let[S,k]=x;return k===void 0||(v[S]=k),v},{}),g=o==null||(l=o.compoundVariants)===null||l===void 0?void 0:l.reduce((v,x)=>{let{class:S,className:k,...R}=x;return Object.entries(R).every(j=>{let[E,b]=j;return Array.isArray(b)?b.includes({...f,...h}[E]):{...f,...h}[E]===b})?[...v,S,k]:v},[]);return Vf(n,p,g,s?.class,s?.className)};const kx=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),oh=(...n)=>n.filter((o,s,l)=>!!o&&l.indexOf(o)===s).join(" ");var Ex={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 Nx=y.forwardRef(({color:n="currentColor",size:o=24,strokeWidth:s=2,absoluteStrokeWidth:l,className:u="",children:f,iconNode:p,...h},g)=>y.createElement("svg",{ref:g,...Ex,width:o,height:o,stroke:n,strokeWidth:l?Number(s)*24/Number(o):s,className:oh("lucide",u),...h},[...p.map(([v,x])=>y.createElement(v,x)),...Array.isArray(f)?f:[f]]));const sh=(n,o)=>{const s=y.forwardRef(({className:l,...u},f)=>y.createElement(Nx,{ref:f,iconNode:o,className:oh(`lucide-${kx(n)}`,l),...u}));return s.displayName=`${n}`,s};const Px=sh("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 Rx=sh("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),nu="-",jx=n=>{const o=Ox(n),{conflictingClassGroups:s,conflictingClassGroupModifiers:l}=n;return{getClassGroupId:p=>{const h=p.split(nu);return h[0]===""&&h.length!==1&&h.shift(),ih(h,o)||Tx(p)},getConflictingClassGroupIds:(p,h)=>{const g=s[p]||[];return h&&l[p]?[...g,...l[p]]:g}}},ih=(n,o)=>{if(n.length===0)return o.classGroupId;const s=n[0],l=o.nextPart.get(s),u=l?ih(n.slice(1),l):void 0;if(u)return u;if(o.validators.length===0)return;const f=n.join(nu);return o.validators.find(({validator:p})=>p(f))?.classGroupId},Qf=/^\[(.+)\]$/,Tx=n=>{if(Qf.test(n)){const o=Qf.exec(n)[1],s=o?.substring(0,o.indexOf(":"));if(s)return"arbitrary.."+s}},Ox=n=>{const{theme:o,prefix:s}=n,l={nextPart:new Map,validators:[]};return Ax(Object.entries(n.classGroups),s).forEach(([f,p])=>{Ma(p,l,f,o)}),l},Ma=(n,o,s,l)=>{n.forEach(u=>{if(typeof u=="string"){const f=u===""?o:Kf(o,u);f.classGroupId=s;return}if(typeof u=="function"){if(_x(u)){Ma(u(l),o,s,l);return}o.validators.push({validator:u,classGroupId:s});return}Object.entries(u).forEach(([f,p])=>{Ma(p,Kf(o,f),s,l)})})},Kf=(n,o)=>{let s=n;return o.split(nu).forEach(l=>{s.nextPart.has(l)||s.nextPart.set(l,{nextPart:new Map,validators:[]}),s=s.nextPart.get(l)}),s},_x=n=>n.isThemeGetter,Ax=(n,o)=>o?n.map(([s,l])=>{const u=l.map(f=>typeof f=="string"?o+f:typeof f=="object"?Object.fromEntries(Object.entries(f).map(([p,h])=>[o+p,h])):f);return[s,u]}):n,Mx=n=>{if(n<1)return{get:()=>{},set:()=>{}};let o=0,s=new Map,l=new Map;const u=(f,p)=>{s.set(f,p),o++,o>n&&(o=0,l=s,s=new Map)};return{get(f){let p=s.get(f);if(p!==void 0)return p;if((p=l.get(f))!==void 0)return u(f,p),p},set(f,p){s.has(f)?s.set(f,p):u(f,p)}}},lh="!",Lx=n=>{const{separator:o,experimentalParseClassName:s}=n,l=o.length===1,u=o[0],f=o.length,p=h=>{const g=[];let v=0,x=0,S;for(let b=0;b<h.length;b++){let A=h[b];if(v===0){if(A===u&&(l||h.slice(b,b+f)===o)){g.push(h.slice(x,b)),x=b+f;continue}if(A==="/"){S=b;continue}}A==="["?v++:A==="]"&&v--}const k=g.length===0?h:h.substring(x),R=k.startsWith(lh),j=R?k.substring(1):k,E=S&&S>x?S-x:void 0;return{modifiers:g,hasImportantModifier:R,baseClassName:j,maybePostfixModifierPosition:E}};return s?h=>s({className:h,parseClassName:p}):p},Ix=n=>{if(n.length<=1)return n;const o=[];let s=[];return n.forEach(l=>{l[0]==="["?(o.push(...s.sort(),l),s=[]):s.push(l)}),o.push(...s.sort()),o},Dx=n=>({cache:Mx(n.cacheSize),parseClassName:Lx(n),...jx(n)}),Fx=/\s+/,zx=(n,o)=>{const{parseClassName:s,getClassGroupId:l,getConflictingClassGroupIds:u}=o,f=[],p=n.trim().split(Fx);let h="";for(let g=p.length-1;g>=0;g-=1){const v=p[g],{modifiers:x,hasImportantModifier:S,baseClassName:k,maybePostfixModifierPosition:R}=s(v);let j=!!R,E=l(j?k.substring(0,R):k);if(!E){if(!j){h=v+(h.length>0?" "+h:h);continue}if(E=l(k),!E){h=v+(h.length>0?" "+h:h);continue}j=!1}const b=Ix(x).join(":"),A=S?b+lh:b,M=A+E;if(f.includes(M))continue;f.push(M);const D=u(E,j);for(let F=0;F<D.length;++F){const W=D[F];f.push(A+W)}h=v+(h.length>0?" "+h:h)}return h};function Ux(){let n=0,o,s,l="";for(;n<arguments.length;)(o=arguments[n++])&&(s=ah(o))&&(l&&(l+=" "),l+=s);return l}const ah=n=>{if(typeof n=="string")return n;let o,s="";for(let l=0;l<n.length;l++)n[l]&&(o=ah(n[l]))&&(s&&(s+=" "),s+=o);return s};function $x(n,...o){let s,l,u,f=p;function p(g){const v=o.reduce((x,S)=>S(x),n());return s=Dx(v),l=s.cache.get,u=s.cache.set,f=h,h(g)}function h(g){const v=l(g);if(v)return v;const x=zx(g,s);return u(g,x),x}return function(){return f(Ux.apply(null,arguments))}}const Pe=n=>{const o=s=>s[n]||[];return o.isThemeGetter=!0,o},uh=/^\[(?:([a-z-]+):)?(.+)\]$/i,Hx=/^\d+\/\d+$/,Bx=new Set(["px","full","screen"]),Wx=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Vx=/\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$/,Qx=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Kx=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,qx=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Yt=n=>Cr(n)||Bx.has(n)||Hx.test(n),Sn=n=>jr(n,"length",nw),Cr=n=>!!n&&!Number.isNaN(Number(n)),ya=n=>jr(n,"number",Cr),wo=n=>!!n&&Number.isInteger(Number(n)),Gx=n=>n.endsWith("%")&&Cr(n.slice(0,-1)),fe=n=>uh.test(n),bn=n=>Wx.test(n),Xx=new Set(["length","size","percentage"]),Yx=n=>jr(n,Xx,ch),Zx=n=>jr(n,"position",ch),Jx=new Set(["image","url"]),ew=n=>jr(n,Jx,ow),tw=n=>jr(n,"",rw),So=()=>!0,jr=(n,o,s)=>{const l=uh.exec(n);return l?l[1]?typeof o=="string"?l[1]===o:o.has(l[1]):s(l[2]):!1},nw=n=>Vx.test(n)&&!Qx.test(n),ch=()=>!1,rw=n=>Kx.test(n),ow=n=>qx.test(n),sw=()=>{const n=Pe("colors"),o=Pe("spacing"),s=Pe("blur"),l=Pe("brightness"),u=Pe("borderColor"),f=Pe("borderRadius"),p=Pe("borderSpacing"),h=Pe("borderWidth"),g=Pe("contrast"),v=Pe("grayscale"),x=Pe("hueRotate"),S=Pe("invert"),k=Pe("gap"),R=Pe("gradientColorStops"),j=Pe("gradientColorStopPositions"),E=Pe("inset"),b=Pe("margin"),A=Pe("opacity"),M=Pe("padding"),D=Pe("saturate"),F=Pe("scale"),W=Pe("sepia"),Q=Pe("skew"),V=Pe("space"),L=Pe("translate"),se=()=>["auto","contain","none"],le=()=>["auto","hidden","clip","visible","scroll"],pe=()=>["auto",fe,o],ee=()=>[fe,o],ce=()=>["",Yt,Sn],G=()=>["auto",Cr,fe],me=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ie=()=>["solid","dashed","dotted","double","none"],oe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>["start","end","center","between","around","evenly","stretch"],q=()=>["","0",fe],K=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>[Cr,fe];return{cacheSize:500,separator:":",theme:{colors:[So],spacing:[Yt,Sn],blur:["none","",bn,fe],brightness:P(),borderColor:[n],borderRadius:["none","","full",bn,fe],borderSpacing:ee(),borderWidth:ce(),contrast:P(),grayscale:q(),hueRotate:P(),invert:q(),gap:ee(),gradientColorStops:[n],gradientColorStopPositions:[Gx,Sn],inset:pe(),margin:pe(),opacity:P(),padding:ee(),saturate:P(),scale:P(),sepia:q(),skew:P(),space:ee(),translate:ee()},classGroups:{aspect:[{aspect:["auto","square","video",fe]}],container:["container"],columns:[{columns:[bn]}],"break-after":[{"break-after":K()}],"break-before":[{"break-before":K()}],"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:[...me(),fe]}],overflow:[{overflow:le()}],"overflow-x":[{"overflow-x":le()}],"overflow-y":[{"overflow-y":le()}],overscroll:[{overscroll:se()}],"overscroll-x":[{"overscroll-x":se()}],"overscroll-y":[{"overscroll-y":se()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[E]}],"inset-x":[{"inset-x":[E]}],"inset-y":[{"inset-y":[E]}],start:[{start:[E]}],end:[{end:[E]}],top:[{top:[E]}],right:[{right:[E]}],bottom:[{bottom:[E]}],left:[{left:[E]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",wo,fe]}],basis:[{basis:pe()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",fe]}],grow:[{grow:q()}],shrink:[{shrink:q()}],order:[{order:["first","last","none",wo,fe]}],"grid-cols":[{"grid-cols":[So]}],"col-start-end":[{col:["auto",{span:["full",wo,fe]},fe]}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":[So]}],"row-start-end":[{row:["auto",{span:[wo,fe]},fe]}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",fe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",fe]}],gap:[{gap:[k]}],"gap-x":[{"gap-x":[k]}],"gap-y":[{"gap-y":[k]}],"justify-content":[{justify:["normal",...I()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...I(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...I(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[M]}],px:[{px:[M]}],py:[{py:[M]}],ps:[{ps:[M]}],pe:[{pe:[M]}],pt:[{pt:[M]}],pr:[{pr:[M]}],pb:[{pb:[M]}],pl:[{pl:[M]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[V]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[V]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",fe,o]}],"min-w":[{"min-w":[fe,o,"min","max","fit"]}],"max-w":[{"max-w":[fe,o,"none","full","min","max","fit","prose",{screen:[bn]},bn]}],h:[{h:[fe,o,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[fe,o,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[fe,o,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[fe,o,"auto","min","max","fit"]}],"font-size":[{text:["base",bn,Sn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ya]}],"font-family":[{font:[So]}],"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",fe]}],"line-clamp":[{"line-clamp":["none",Cr,ya]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Yt,fe]}],"list-image":[{"list-image":["none",fe]}],"list-style-type":[{list:["none","disc","decimal",fe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[n]}],"placeholder-opacity":[{"placeholder-opacity":[A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[n]}],"text-opacity":[{"text-opacity":[A]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Yt,Sn]}],"underline-offset":[{"underline-offset":["auto",Yt,fe]}],"text-decoration-color":[{decoration:[n]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:ee()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",fe]}],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",fe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[A]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...me(),Zx]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Yx]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ew]}],"bg-color":[{bg:[n]}],"gradient-from-pos":[{from:[j]}],"gradient-via-pos":[{via:[j]}],"gradient-to-pos":[{to:[j]}],"gradient-from":[{from:[R]}],"gradient-via":[{via:[R]}],"gradient-to":[{to:[R]}],rounded:[{rounded:[f]}],"rounded-s":[{"rounded-s":[f]}],"rounded-e":[{"rounded-e":[f]}],"rounded-t":[{"rounded-t":[f]}],"rounded-r":[{"rounded-r":[f]}],"rounded-b":[{"rounded-b":[f]}],"rounded-l":[{"rounded-l":[f]}],"rounded-ss":[{"rounded-ss":[f]}],"rounded-se":[{"rounded-se":[f]}],"rounded-ee":[{"rounded-ee":[f]}],"rounded-es":[{"rounded-es":[f]}],"rounded-tl":[{"rounded-tl":[f]}],"rounded-tr":[{"rounded-tr":[f]}],"rounded-br":[{"rounded-br":[f]}],"rounded-bl":[{"rounded-bl":[f]}],"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":[A]}],"border-style":[{border:[...ie(),"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":[A]}],"divide-style":[{divide:ie()}],"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:["",...ie()]}],"outline-offset":[{"outline-offset":[Yt,fe]}],"outline-w":[{outline:[Yt,Sn]}],"outline-color":[{outline:[n]}],"ring-w":[{ring:ce()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[n]}],"ring-opacity":[{"ring-opacity":[A]}],"ring-offset-w":[{"ring-offset":[Yt,Sn]}],"ring-offset-color":[{"ring-offset":[n]}],shadow:[{shadow:["","inner","none",bn,tw]}],"shadow-color":[{shadow:[So]}],opacity:[{opacity:[A]}],"mix-blend":[{"mix-blend":[...oe(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":oe()}],filter:[{filter:["","none"]}],blur:[{blur:[s]}],brightness:[{brightness:[l]}],contrast:[{contrast:[g]}],"drop-shadow":[{"drop-shadow":["","none",bn,fe]}],grayscale:[{grayscale:[v]}],"hue-rotate":[{"hue-rotate":[x]}],invert:[{invert:[S]}],saturate:[{saturate:[D]}],sepia:[{sepia:[W]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[s]}],"backdrop-brightness":[{"backdrop-brightness":[l]}],"backdrop-contrast":[{"backdrop-contrast":[g]}],"backdrop-grayscale":[{"backdrop-grayscale":[v]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[x]}],"backdrop-invert":[{"backdrop-invert":[S]}],"backdrop-opacity":[{"backdrop-opacity":[A]}],"backdrop-saturate":[{"backdrop-saturate":[D]}],"backdrop-sepia":[{"backdrop-sepia":[W]}],"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",fe]}],duration:[{duration:P()}],ease:[{ease:["linear","in","out","in-out",fe]}],delay:[{delay:P()}],animate:[{animate:["none","spin","ping","pulse","bounce",fe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[F]}],"scale-x":[{"scale-x":[F]}],"scale-y":[{"scale-y":[F]}],rotate:[{rotate:[wo,fe]}],"translate-x":[{"translate-x":[L]}],"translate-y":[{"translate-y":[L]}],"skew-x":[{"skew-x":[Q]}],"skew-y":[{"skew-y":[Q]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",fe]}],accent:[{accent:["auto",n]}],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",fe]}],"caret-color":[{caret:[n]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":ee()}],"scroll-mx":[{"scroll-mx":ee()}],"scroll-my":[{"scroll-my":ee()}],"scroll-ms":[{"scroll-ms":ee()}],"scroll-me":[{"scroll-me":ee()}],"scroll-mt":[{"scroll-mt":ee()}],"scroll-mr":[{"scroll-mr":ee()}],"scroll-mb":[{"scroll-mb":ee()}],"scroll-ml":[{"scroll-ml":ee()}],"scroll-p":[{"scroll-p":ee()}],"scroll-px":[{"scroll-px":ee()}],"scroll-py":[{"scroll-py":ee()}],"scroll-ps":[{"scroll-ps":ee()}],"scroll-pe":[{"scroll-pe":ee()}],"scroll-pt":[{"scroll-pt":ee()}],"scroll-pr":[{"scroll-pr":ee()}],"scroll-pb":[{"scroll-pb":ee()}],"scroll-pl":[{"scroll-pl":ee()}],"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",fe]}],fill:[{fill:[n,"none"]}],"stroke-w":[{stroke:[Yt,Sn,ya]}],stroke:[{stroke:[n,"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"]}}},iw=$x(sw);function ft(...n){return iw(rh(n))}const lw=bx,dh=y.forwardRef(({className:n,...o},s)=>d.jsx(Xp,{ref:s,className:ft("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]",n),...o}));dh.displayName=Xp.displayName;const aw=Cx("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-all 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"}}),fh=y.forwardRef(({className:n,variant:o,...s},l)=>d.jsx(Yp,{ref:l,className:ft(aw({variant:o}),n),...s}));fh.displayName=Yp.displayName;const uw=y.forwardRef(({className:n,...o},s)=>d.jsx(eh,{ref:s,className:ft("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",n),...o}));uw.displayName=eh.displayName;const ph=y.forwardRef(({className:n,...o},s)=>d.jsx(th,{ref:s,className:ft("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",n),"toast-close":"",...o,children:d.jsx(Rx,{className:"h-4 w-4"})}));ph.displayName=th.displayName;const hh=y.forwardRef(({className:n,...o},s)=>d.jsx(Zp,{ref:s,className:ft("text-sm font-semibold",n),...o}));hh.displayName=Zp.displayName;const mh=y.forwardRef(({className:n,...o},s)=>d.jsx(Jp,{ref:s,className:ft("text-sm opacity-90",n),...o}));mh.displayName=Jp.displayName;function cw(){const{toasts:n}=ky();return d.jsxs(lw,{children:[n.map(function({id:o,title:s,description:l,action:u,...f}){return d.jsxs(fh,{...f,children:[d.jsxs("div",{className:"grid gap-1",children:[s&&d.jsx(hh,{children:s}),l&&d.jsx(mh,{children:l})]}),u,d.jsx(ph,{})]},o)}),d.jsx(dh,{})]})}var dw=$a[" useId ".trim().toString()]||(()=>{}),fw=0;function gh(n){const[o,s]=y.useState(dw());return Ut(()=>{s(l=>l??String(fw++))},[n]),o?`radix-${o}`:""}const pw=["top","right","bottom","left"],Pn=Math.min,ct=Math.max,Ys=Math.round,Ws=Math.floor,zt=n=>({x:n,y:n}),hw={left:"right",right:"left",bottom:"top",top:"bottom"};function La(n,o,s){return ct(n,Pn(o,s))}function Zt(n,o){return typeof n=="function"?n(o):n}function Jt(n){return n.split("-")[0]}function Tr(n){return n.split("-")[1]}function ru(n){return n==="x"?"y":"x"}function ou(n){return n==="y"?"height":"width"}function Ft(n){const o=n[0];return o==="t"||o==="b"?"y":"x"}function su(n){return ru(Ft(n))}function mw(n,o,s){s===void 0&&(s=!1);const l=Tr(n),u=su(n),f=ou(u);let p=u==="x"?l===(s?"end":"start")?"right":"left":l==="start"?"bottom":"top";return o.reference[f]>o.floating[f]&&(p=Zs(p)),[p,Zs(p)]}function gw(n){const o=Zs(n);return[Ia(n),o,Ia(o)]}function Ia(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const qf=["left","right"],Gf=["right","left"],vw=["top","bottom"],yw=["bottom","top"];function xw(n,o,s){switch(n){case"top":case"bottom":return s?o?Gf:qf:o?qf:Gf;case"left":case"right":return o?vw:yw;default:return[]}}function ww(n,o,s,l){const u=Tr(n);let f=xw(Jt(n),s==="start",l);return u&&(f=f.map(p=>p+"-"+u),o&&(f=f.concat(f.map(Ia)))),f}function Zs(n){const o=Jt(n);return hw[o]+n.slice(o.length)}function Sw(n){return{top:0,right:0,bottom:0,left:0,...n}}function vh(n){return typeof n!="number"?Sw(n):{top:n,right:n,bottom:n,left:n}}function Js(n){const{x:o,y:s,width:l,height:u}=n;return{width:l,height:u,top:s,left:o,right:o+l,bottom:s+u,x:o,y:s}}function Xf(n,o,s){let{reference:l,floating:u}=n;const f=Ft(o),p=su(o),h=ou(p),g=Jt(o),v=f==="y",x=l.x+l.width/2-u.width/2,S=l.y+l.height/2-u.height/2,k=l[h]/2-u[h]/2;let R;switch(g){case"top":R={x,y:l.y-u.height};break;case"bottom":R={x,y:l.y+l.height};break;case"right":R={x:l.x+l.width,y:S};break;case"left":R={x:l.x-u.width,y:S};break;default:R={x:l.x,y:l.y}}switch(Tr(o)){case"start":R[p]-=k*(s&&v?-1:1);break;case"end":R[p]+=k*(s&&v?-1:1);break}return R}async function bw(n,o){var s;o===void 0&&(o={});const{x:l,y:u,platform:f,rects:p,elements:h,strategy:g}=n,{boundary:v="clippingAncestors",rootBoundary:x="viewport",elementContext:S="floating",altBoundary:k=!1,padding:R=0}=Zt(o,n),j=vh(R),b=h[k?S==="floating"?"reference":"floating":S],A=Js(await f.getClippingRect({element:(s=await(f.isElement==null?void 0:f.isElement(b)))==null||s?b:b.contextElement||await(f.getDocumentElement==null?void 0:f.getDocumentElement(h.floating)),boundary:v,rootBoundary:x,strategy:g})),M=S==="floating"?{x:l,y:u,width:p.floating.width,height:p.floating.height}:p.reference,D=await(f.getOffsetParent==null?void 0:f.getOffsetParent(h.floating)),F=await(f.isElement==null?void 0:f.isElement(D))?await(f.getScale==null?void 0:f.getScale(D))||{x:1,y:1}:{x:1,y:1},W=Js(f.convertOffsetParentRelativeRectToViewportRelativeRect?await f.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:M,offsetParent:D,strategy:g}):M);return{top:(A.top-W.top+j.top)/F.y,bottom:(W.bottom-A.bottom+j.bottom)/F.y,left:(A.left-W.left+j.left)/F.x,right:(W.right-A.right+j.right)/F.x}}const Cw=50,kw=async(n,o,s)=>{const{placement:l="bottom",strategy:u="absolute",middleware:f=[],platform:p}=s,h=p.detectOverflow?p:{...p,detectOverflow:bw},g=await(p.isRTL==null?void 0:p.isRTL(o));let v=await p.getElementRects({reference:n,floating:o,strategy:u}),{x,y:S}=Xf(v,l,g),k=l,R=0;const j={};for(let E=0;E<f.length;E++){const b=f[E];if(!b)continue;const{name:A,fn:M}=b,{x:D,y:F,data:W,reset:Q}=await M({x,y:S,initialPlacement:l,placement:k,strategy:u,middlewareData:j,rects:v,platform:h,elements:{reference:n,floating:o}});x=D??x,S=F??S,j[A]={...j[A],...W},Q&&R<Cw&&(R++,typeof Q=="object"&&(Q.placement&&(k=Q.placement),Q.rects&&(v=Q.rects===!0?await p.getElementRects({reference:n,floating:o,strategy:u}):Q.rects),{x,y:S}=Xf(v,k,g)),E=-1)}return{x,y:S,placement:k,strategy:u,middlewareData:j}},Ew=n=>({name:"arrow",options:n,async fn(o){const{x:s,y:l,placement:u,rects:f,platform:p,elements:h,middlewareData:g}=o,{element:v,padding:x=0}=Zt(n,o)||{};if(v==null)return{};const S=vh(x),k={x:s,y:l},R=su(u),j=ou(R),E=await p.getDimensions(v),b=R==="y",A=b?"top":"left",M=b?"bottom":"right",D=b?"clientHeight":"clientWidth",F=f.reference[j]+f.reference[R]-k[R]-f.floating[j],W=k[R]-f.reference[R],Q=await(p.getOffsetParent==null?void 0:p.getOffsetParent(v));let V=Q?Q[D]:0;(!V||!await(p.isElement==null?void 0:p.isElement(Q)))&&(V=h.floating[D]||f.floating[j]);const L=F/2-W/2,se=V/2-E[j]/2-1,le=Pn(S[A],se),pe=Pn(S[M],se),ee=le,ce=V-E[j]-pe,G=V/2-E[j]/2+L,me=La(ee,G,ce),ie=!g.arrow&&Tr(u)!=null&&G!==me&&f.reference[j]/2-(G<ee?le:pe)-E[j]/2<0,oe=ie?G<ee?G-ee:G-ce:0;return{[R]:k[R]+oe,data:{[R]:me,centerOffset:G-me-oe,...ie&&{alignmentOffset:oe}},reset:ie}}}),Nw=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(o){var s,l;const{placement:u,middlewareData:f,rects:p,initialPlacement:h,platform:g,elements:v}=o,{mainAxis:x=!0,crossAxis:S=!0,fallbackPlacements:k,fallbackStrategy:R="bestFit",fallbackAxisSideDirection:j="none",flipAlignment:E=!0,...b}=Zt(n,o);if((s=f.arrow)!=null&&s.alignmentOffset)return{};const A=Jt(u),M=Ft(h),D=Jt(h)===h,F=await(g.isRTL==null?void 0:g.isRTL(v.floating)),W=k||(D||!E?[Zs(h)]:gw(h)),Q=j!=="none";!k&&Q&&W.push(...ww(h,E,j,F));const V=[h,...W],L=await g.detectOverflow(o,b),se=[];let le=((l=f.flip)==null?void 0:l.overflows)||[];if(x&&se.push(L[A]),S){const G=mw(u,p,F);se.push(L[G[0]],L[G[1]])}if(le=[...le,{placement:u,overflows:se}],!se.every(G=>G<=0)){var pe,ee;const G=(((pe=f.flip)==null?void 0:pe.index)||0)+1,me=V[G];if(me&&(!(S==="alignment"?M!==Ft(me):!1)||le.every(I=>Ft(I.placement)===M?I.overflows[0]>0:!0)))return{data:{index:G,overflows:le},reset:{placement:me}};let ie=(ee=le.filter(oe=>oe.overflows[0]<=0).sort((oe,I)=>oe.overflows[1]-I.overflows[1])[0])==null?void 0:ee.placement;if(!ie)switch(R){case"bestFit":{var ce;const oe=(ce=le.filter(I=>{if(Q){const q=Ft(I.placement);return q===M||q==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(q=>q>0).reduce((q,K)=>q+K,0)]).sort((I,q)=>I[1]-q[1])[0])==null?void 0:ce[0];oe&&(ie=oe);break}case"initialPlacement":ie=h;break}if(u!==ie)return{reset:{placement:ie}}}return{}}}};function Yf(n,o){return{top:n.top-o.height,right:n.right-o.width,bottom:n.bottom-o.height,left:n.left-o.width}}function Zf(n){return pw.some(o=>n[o]>=0)}const Pw=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(o){const{rects:s,platform:l}=o,{strategy:u="referenceHidden",...f}=Zt(n,o);switch(u){case"referenceHidden":{const p=await l.detectOverflow(o,{...f,elementContext:"reference"}),h=Yf(p,s.reference);return{data:{referenceHiddenOffsets:h,referenceHidden:Zf(h)}}}case"escaped":{const p=await l.detectOverflow(o,{...f,altBoundary:!0}),h=Yf(p,s.floating);return{data:{escapedOffsets:h,escaped:Zf(h)}}}default:return{}}}}},yh=new Set(["left","top"]);async function Rw(n,o){const{placement:s,platform:l,elements:u}=n,f=await(l.isRTL==null?void 0:l.isRTL(u.floating)),p=Jt(s),h=Tr(s),g=Ft(s)==="y",v=yh.has(p)?-1:1,x=f&&g?-1:1,S=Zt(o,n);let{mainAxis:k,crossAxis:R,alignmentAxis:j}=typeof S=="number"?{mainAxis:S,crossAxis:0,alignmentAxis:null}:{mainAxis:S.mainAxis||0,crossAxis:S.crossAxis||0,alignmentAxis:S.alignmentAxis};return h&&typeof j=="number"&&(R=h==="end"?j*-1:j),g?{x:R*x,y:k*v}:{x:k*v,y:R*x}}const jw=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(o){var s,l;const{x:u,y:f,placement:p,middlewareData:h}=o,g=await Rw(o,n);return p===((s=h.offset)==null?void 0:s.placement)&&(l=h.arrow)!=null&&l.alignmentOffset?{}:{x:u+g.x,y:f+g.y,data:{...g,placement:p}}}}},Tw=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(o){const{x:s,y:l,placement:u,platform:f}=o,{mainAxis:p=!0,crossAxis:h=!1,limiter:g={fn:A=>{let{x:M,y:D}=A;return{x:M,y:D}}},...v}=Zt(n,o),x={x:s,y:l},S=await f.detectOverflow(o,v),k=Ft(Jt(u)),R=ru(k);let j=x[R],E=x[k];if(p){const A=R==="y"?"top":"left",M=R==="y"?"bottom":"right",D=j+S[A],F=j-S[M];j=La(D,j,F)}if(h){const A=k==="y"?"top":"left",M=k==="y"?"bottom":"right",D=E+S[A],F=E-S[M];E=La(D,E,F)}const b=g.fn({...o,[R]:j,[k]:E});return{...b,data:{x:b.x-s,y:b.y-l,enabled:{[R]:p,[k]:h}}}}}},Ow=function(n){return n===void 0&&(n={}),{options:n,fn(o){const{x:s,y:l,placement:u,rects:f,middlewareData:p}=o,{offset:h=0,mainAxis:g=!0,crossAxis:v=!0}=Zt(n,o),x={x:s,y:l},S=Ft(u),k=ru(S);let R=x[k],j=x[S];const E=Zt(h,o),b=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:0,crossAxis:0,...E};if(g){const D=k==="y"?"height":"width",F=f.reference[k]-f.floating[D]+b.mainAxis,W=f.reference[k]+f.reference[D]-b.mainAxis;R<F?R=F:R>W&&(R=W)}if(v){var A,M;const D=k==="y"?"width":"height",F=yh.has(Jt(u)),W=f.reference[S]-f.floating[D]+(F&&((A=p.offset)==null?void 0:A[S])||0)+(F?0:b.crossAxis),Q=f.reference[S]+f.reference[D]+(F?0:((M=p.offset)==null?void 0:M[S])||0)-(F?b.crossAxis:0);j<W?j=W:j>Q&&(j=Q)}return{[k]:R,[S]:j}}}},_w=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(o){var s,l;const{placement:u,rects:f,platform:p,elements:h}=o,{apply:g=()=>{},...v}=Zt(n,o),x=await p.detectOverflow(o,v),S=Jt(u),k=Tr(u),R=Ft(u)==="y",{width:j,height:E}=f.floating;let b,A;S==="top"||S==="bottom"?(b=S,A=k===(await(p.isRTL==null?void 0:p.isRTL(h.floating))?"start":"end")?"left":"right"):(A=S,b=k==="end"?"top":"bottom");const M=E-x.top-x.bottom,D=j-x.left-x.right,F=Pn(E-x[b],M),W=Pn(j-x[A],D),Q=!o.middlewareData.shift;let V=F,L=W;if((s=o.middlewareData.shift)!=null&&s.enabled.x&&(L=D),(l=o.middlewareData.shift)!=null&&l.enabled.y&&(V=M),Q&&!k){const le=ct(x.left,0),pe=ct(x.right,0),ee=ct(x.top,0),ce=ct(x.bottom,0);R?L=j-2*(le!==0||pe!==0?le+pe:ct(x.left,x.right)):V=E-2*(ee!==0||ce!==0?ee+ce:ct(x.top,x.bottom))}await g({...o,availableWidth:L,availableHeight:V});const se=await p.getDimensions(h.floating);return j!==se.width||E!==se.height?{reset:{rects:!0}}:{}}}};function li(){return typeof window<"u"}function Or(n){return xh(n)?(n.nodeName||"").toLowerCase():"#document"}function dt(n){var o;return(n==null||(o=n.ownerDocument)==null?void 0:o.defaultView)||window}function $t(n){var o;return(o=(xh(n)?n.ownerDocument:n.document)||window.document)==null?void 0:o.documentElement}function xh(n){return li()?n instanceof Node||n instanceof dt(n).Node:!1}function Tt(n){return li()?n instanceof Element||n instanceof dt(n).Element:!1}function en(n){return li()?n instanceof HTMLElement||n instanceof dt(n).HTMLElement:!1}function Jf(n){return!li()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof dt(n).ShadowRoot}function To(n){const{overflow:o,overflowX:s,overflowY:l,display:u}=Ot(n);return/auto|scroll|overlay|hidden|clip/.test(o+l+s)&&u!=="inline"&&u!=="contents"}function Aw(n){return/^(table|td|th)$/.test(Or(n))}function ai(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const Mw=/transform|translate|scale|rotate|perspective|filter/,Lw=/paint|layout|strict|content/,Hn=n=>!!n&&n!=="none";let xa;function iu(n){const o=Tt(n)?Ot(n):n;return Hn(o.transform)||Hn(o.translate)||Hn(o.scale)||Hn(o.rotate)||Hn(o.perspective)||!lu()&&(Hn(o.backdropFilter)||Hn(o.filter))||Mw.test(o.willChange||"")||Lw.test(o.contain||"")}function Iw(n){let o=Rn(n);for(;en(o)&&!Er(o);){if(iu(o))return o;if(ai(o))return null;o=Rn(o)}return null}function lu(){return xa==null&&(xa=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),xa}function Er(n){return/^(html|body|#document)$/.test(Or(n))}function Ot(n){return dt(n).getComputedStyle(n)}function ui(n){return Tt(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function Rn(n){if(Or(n)==="html")return n;const o=n.assignedSlot||n.parentNode||Jf(n)&&n.host||$t(n);return Jf(o)?o.host:o}function wh(n){const o=Rn(n);return Er(o)?n.ownerDocument?n.ownerDocument.body:n.body:en(o)&&To(o)?o:wh(o)}function Eo(n,o,s){var l;o===void 0&&(o=[]),s===void 0&&(s=!0);const u=wh(n),f=u===((l=n.ownerDocument)==null?void 0:l.body),p=dt(u);if(f){const h=Da(p);return o.concat(p,p.visualViewport||[],To(u)?u:[],h&&s?Eo(h):[])}else return o.concat(u,Eo(u,[],s))}function Da(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function Sh(n){const o=Ot(n);let s=parseFloat(o.width)||0,l=parseFloat(o.height)||0;const u=en(n),f=u?n.offsetWidth:s,p=u?n.offsetHeight:l,h=Ys(s)!==f||Ys(l)!==p;return h&&(s=f,l=p),{width:s,height:l,$:h}}function au(n){return Tt(n)?n:n.contextElement}function kr(n){const o=au(n);if(!en(o))return zt(1);const s=o.getBoundingClientRect(),{width:l,height:u,$:f}=Sh(o);let p=(f?Ys(s.width):s.width)/l,h=(f?Ys(s.height):s.height)/u;return(!p||!Number.isFinite(p))&&(p=1),(!h||!Number.isFinite(h))&&(h=1),{x:p,y:h}}const Dw=zt(0);function bh(n){const o=dt(n);return!lu()||!o.visualViewport?Dw:{x:o.visualViewport.offsetLeft,y:o.visualViewport.offsetTop}}function Fw(n,o,s){return o===void 0&&(o=!1),!s||o&&s!==dt(n)?!1:o}function Xn(n,o,s,l){o===void 0&&(o=!1),s===void 0&&(s=!1);const u=n.getBoundingClientRect(),f=au(n);let p=zt(1);o&&(l?Tt(l)&&(p=kr(l)):p=kr(n));const h=Fw(f,s,l)?bh(f):zt(0);let g=(u.left+h.x)/p.x,v=(u.top+h.y)/p.y,x=u.width/p.x,S=u.height/p.y;if(f){const k=dt(f),R=l&&Tt(l)?dt(l):l;let j=k,E=Da(j);for(;E&&l&&R!==j;){const b=kr(E),A=E.getBoundingClientRect(),M=Ot(E),D=A.left+(E.clientLeft+parseFloat(M.paddingLeft))*b.x,F=A.top+(E.clientTop+parseFloat(M.paddingTop))*b.y;g*=b.x,v*=b.y,x*=b.x,S*=b.y,g+=D,v+=F,j=dt(E),E=Da(j)}}return Js({width:x,height:S,x:g,y:v})}function ci(n,o){const s=ui(n).scrollLeft;return o?o.left+s:Xn($t(n)).left+s}function Ch(n,o){const s=n.getBoundingClientRect(),l=s.left+o.scrollLeft-ci(n,s),u=s.top+o.scrollTop;return{x:l,y:u}}function zw(n){let{elements:o,rect:s,offsetParent:l,strategy:u}=n;const f=u==="fixed",p=$t(l),h=o?ai(o.floating):!1;if(l===p||h&&f)return s;let g={scrollLeft:0,scrollTop:0},v=zt(1);const x=zt(0),S=en(l);if((S||!S&&!f)&&((Or(l)!=="body"||To(p))&&(g=ui(l)),S)){const R=Xn(l);v=kr(l),x.x=R.x+l.clientLeft,x.y=R.y+l.clientTop}const k=p&&!S&&!f?Ch(p,g):zt(0);return{width:s.width*v.x,height:s.height*v.y,x:s.x*v.x-g.scrollLeft*v.x+x.x+k.x,y:s.y*v.y-g.scrollTop*v.y+x.y+k.y}}function Uw(n){return Array.from(n.getClientRects())}function $w(n){const o=$t(n),s=ui(n),l=n.ownerDocument.body,u=ct(o.scrollWidth,o.clientWidth,l.scrollWidth,l.clientWidth),f=ct(o.scrollHeight,o.clientHeight,l.scrollHeight,l.clientHeight);let p=-s.scrollLeft+ci(n);const h=-s.scrollTop;return Ot(l).direction==="rtl"&&(p+=ct(o.clientWidth,l.clientWidth)-u),{width:u,height:f,x:p,y:h}}const ep=25;function Hw(n,o){const s=dt(n),l=$t(n),u=s.visualViewport;let f=l.clientWidth,p=l.clientHeight,h=0,g=0;if(u){f=u.width,p=u.height;const x=lu();(!x||x&&o==="fixed")&&(h=u.offsetLeft,g=u.offsetTop)}const v=ci(l);if(v<=0){const x=l.ownerDocument,S=x.body,k=getComputedStyle(S),R=x.compatMode==="CSS1Compat"&&parseFloat(k.marginLeft)+parseFloat(k.marginRight)||0,j=Math.abs(l.clientWidth-S.clientWidth-R);j<=ep&&(f-=j)}else v<=ep&&(f+=v);return{width:f,height:p,x:h,y:g}}function Bw(n,o){const s=Xn(n,!0,o==="fixed"),l=s.top+n.clientTop,u=s.left+n.clientLeft,f=en(n)?kr(n):zt(1),p=n.clientWidth*f.x,h=n.clientHeight*f.y,g=u*f.x,v=l*f.y;return{width:p,height:h,x:g,y:v}}function tp(n,o,s){let l;if(o==="viewport")l=Hw(n,s);else if(o==="document")l=$w($t(n));else if(Tt(o))l=Bw(o,s);else{const u=bh(n);l={x:o.x-u.x,y:o.y-u.y,width:o.width,height:o.height}}return Js(l)}function kh(n,o){const s=Rn(n);return s===o||!Tt(s)||Er(s)?!1:Ot(s).position==="fixed"||kh(s,o)}function Ww(n,o){const s=o.get(n);if(s)return s;let l=Eo(n,[],!1).filter(h=>Tt(h)&&Or(h)!=="body"),u=null;const f=Ot(n).position==="fixed";let p=f?Rn(n):n;for(;Tt(p)&&!Er(p);){const h=Ot(p),g=iu(p);!g&&h.position==="fixed"&&(u=null),(f?!g&&!u:!g&&h.position==="static"&&!!u&&(u.position==="absolute"||u.position==="fixed")||To(p)&&!g&&kh(n,p))?l=l.filter(x=>x!==p):u=h,p=Rn(p)}return o.set(n,l),l}function Vw(n){let{element:o,boundary:s,rootBoundary:l,strategy:u}=n;const p=[...s==="clippingAncestors"?ai(o)?[]:Ww(o,this._c):[].concat(s),l],h=tp(o,p[0],u);let g=h.top,v=h.right,x=h.bottom,S=h.left;for(let k=1;k<p.length;k++){const R=tp(o,p[k],u);g=ct(R.top,g),v=Pn(R.right,v),x=Pn(R.bottom,x),S=ct(R.left,S)}return{width:v-S,height:x-g,x:S,y:g}}function Qw(n){const{width:o,height:s}=Sh(n);return{width:o,height:s}}function Kw(n,o,s){const l=en(o),u=$t(o),f=s==="fixed",p=Xn(n,!0,f,o);let h={scrollLeft:0,scrollTop:0};const g=zt(0);function v(){g.x=ci(u)}if(l||!l&&!f)if((Or(o)!=="body"||To(u))&&(h=ui(o)),l){const R=Xn(o,!0,f,o);g.x=R.x+o.clientLeft,g.y=R.y+o.clientTop}else u&&v();f&&!l&&u&&v();const x=u&&!l&&!f?Ch(u,h):zt(0),S=p.left+h.scrollLeft-g.x-x.x,k=p.top+h.scrollTop-g.y-x.y;return{x:S,y:k,width:p.width,height:p.height}}function wa(n){return Ot(n).position==="static"}function np(n,o){if(!en(n)||Ot(n).position==="fixed")return null;if(o)return o(n);let s=n.offsetParent;return $t(n)===s&&(s=s.ownerDocument.body),s}function Eh(n,o){const s=dt(n);if(ai(n))return s;if(!en(n)){let u=Rn(n);for(;u&&!Er(u);){if(Tt(u)&&!wa(u))return u;u=Rn(u)}return s}let l=np(n,o);for(;l&&Aw(l)&&wa(l);)l=np(l,o);return l&&Er(l)&&wa(l)&&!iu(l)?s:l||Iw(n)||s}const qw=async function(n){const o=this.getOffsetParent||Eh,s=this.getDimensions,l=await s(n.floating);return{reference:Kw(n.reference,await o(n.floating),n.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}};function Gw(n){return Ot(n).direction==="rtl"}const Xw={convertOffsetParentRelativeRectToViewportRelativeRect:zw,getDocumentElement:$t,getClippingRect:Vw,getOffsetParent:Eh,getElementRects:qw,getClientRects:Uw,getDimensions:Qw,getScale:kr,isElement:Tt,isRTL:Gw};function Nh(n,o){return n.x===o.x&&n.y===o.y&&n.width===o.width&&n.height===o.height}function Yw(n,o){let s=null,l;const u=$t(n);function f(){var h;clearTimeout(l),(h=s)==null||h.disconnect(),s=null}function p(h,g){h===void 0&&(h=!1),g===void 0&&(g=1),f();const v=n.getBoundingClientRect(),{left:x,top:S,width:k,height:R}=v;if(h||o(),!k||!R)return;const j=Ws(S),E=Ws(u.clientWidth-(x+k)),b=Ws(u.clientHeight-(S+R)),A=Ws(x),D={rootMargin:-j+"px "+-E+"px "+-b+"px "+-A+"px",threshold:ct(0,Pn(1,g))||1};let F=!0;function W(Q){const V=Q[0].intersectionRatio;if(V!==g){if(!F)return p();V?p(!1,V):l=setTimeout(()=>{p(!1,1e-7)},1e3)}V===1&&!Nh(v,n.getBoundingClientRect())&&p(),F=!1}try{s=new IntersectionObserver(W,{...D,root:u.ownerDocument})}catch{s=new IntersectionObserver(W,D)}s.observe(n)}return p(!0),f}function Zw(n,o,s,l){l===void 0&&(l={});const{ancestorScroll:u=!0,ancestorResize:f=!0,elementResize:p=typeof ResizeObserver=="function",layoutShift:h=typeof IntersectionObserver=="function",animationFrame:g=!1}=l,v=au(n),x=u||f?[...v?Eo(v):[],...o?Eo(o):[]]:[];x.forEach(A=>{u&&A.addEventListener("scroll",s,{passive:!0}),f&&A.addEventListener("resize",s)});const S=v&&h?Yw(v,s):null;let k=-1,R=null;p&&(R=new ResizeObserver(A=>{let[M]=A;M&&M.target===v&&R&&o&&(R.unobserve(o),cancelAnimationFrame(k),k=requestAnimationFrame(()=>{var D;(D=R)==null||D.observe(o)})),s()}),v&&!g&&R.observe(v),o&&R.observe(o));let j,E=g?Xn(n):null;g&&b();function b(){const A=Xn(n);E&&!Nh(E,A)&&s(),E=A,j=requestAnimationFrame(b)}return s(),()=>{var A;x.forEach(M=>{u&&M.removeEventListener("scroll",s),f&&M.removeEventListener("resize",s)}),S?.(),(A=R)==null||A.disconnect(),R=null,g&&cancelAnimationFrame(j)}}const Jw=jw,e0=Tw,t0=Nw,n0=_w,r0=Pw,rp=Ew,o0=Ow,s0=(n,o,s)=>{const l=new Map,u={platform:Xw,...s},f={...u.platform,_c:l};return kw(n,o,{...u,platform:f})};var i0=typeof document<"u",l0=function(){},qs=i0?y.useLayoutEffect:l0;function ei(n,o){if(n===o)return!0;if(typeof n!=typeof o)return!1;if(typeof n=="function"&&n.toString()===o.toString())return!0;let s,l,u;if(n&&o&&typeof n=="object"){if(Array.isArray(n)){if(s=n.length,s!==o.length)return!1;for(l=s;l--!==0;)if(!ei(n[l],o[l]))return!1;return!0}if(u=Object.keys(n),s=u.length,s!==Object.keys(o).length)return!1;for(l=s;l--!==0;)if(!{}.hasOwnProperty.call(o,u[l]))return!1;for(l=s;l--!==0;){const f=u[l];if(!(f==="_owner"&&n.$$typeof)&&!ei(n[f],o[f]))return!1}return!0}return n!==n&&o!==o}function Ph(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function op(n,o){const s=Ph(n);return Math.round(o*s)/s}function Sa(n){const o=y.useRef(n);return qs(()=>{o.current=n}),o}function a0(n){n===void 0&&(n={});const{placement:o="bottom",strategy:s="absolute",middleware:l=[],platform:u,elements:{reference:f,floating:p}={},transform:h=!0,whileElementsMounted:g,open:v}=n,[x,S]=y.useState({x:0,y:0,strategy:s,placement:o,middlewareData:{},isPositioned:!1}),[k,R]=y.useState(l);ei(k,l)||R(l);const[j,E]=y.useState(null),[b,A]=y.useState(null),M=y.useCallback(I=>{I!==Q.current&&(Q.current=I,E(I))},[]),D=y.useCallback(I=>{I!==V.current&&(V.current=I,A(I))},[]),F=f||j,W=p||b,Q=y.useRef(null),V=y.useRef(null),L=y.useRef(x),se=g!=null,le=Sa(g),pe=Sa(u),ee=Sa(v),ce=y.useCallback(()=>{if(!Q.current||!V.current)return;const I={placement:o,strategy:s,middleware:k};pe.current&&(I.platform=pe.current),s0(Q.current,V.current,I).then(q=>{const K={...q,isPositioned:ee.current!==!1};G.current&&!ei(L.current,K)&&(L.current=K,ri.flushSync(()=>{S(K)}))})},[k,o,s,pe,ee]);qs(()=>{v===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,S(I=>({...I,isPositioned:!1})))},[v]);const G=y.useRef(!1);qs(()=>(G.current=!0,()=>{G.current=!1}),[]),qs(()=>{if(F&&(Q.current=F),W&&(V.current=W),F&&W){if(le.current)return le.current(F,W,ce);ce()}},[F,W,ce,le,se]);const me=y.useMemo(()=>({reference:Q,floating:V,setReference:M,setFloating:D}),[M,D]),ie=y.useMemo(()=>({reference:F,floating:W}),[F,W]),oe=y.useMemo(()=>{const I={position:s,left:0,top:0};if(!ie.floating)return I;const q=op(ie.floating,x.x),K=op(ie.floating,x.y);return h?{...I,transform:"translate("+q+"px, "+K+"px)",...Ph(ie.floating)>=1.5&&{willChange:"transform"}}:{position:s,left:q,top:K}},[s,h,ie.floating,x.x,x.y]);return y.useMemo(()=>({...x,update:ce,refs:me,elements:ie,floatingStyles:oe}),[x,ce,me,ie,oe])}const u0=n=>{function o(s){return{}.hasOwnProperty.call(s,"current")}return{name:"arrow",options:n,fn(s){const{element:l,padding:u}=typeof n=="function"?n(s):n;return l&&o(l)?l.current!=null?rp({element:l.current,padding:u}).fn(s):{}:l?rp({element:l,padding:u}).fn(s):{}}}},c0=(n,o)=>{const s=Jw(n);return{name:s.name,fn:s.fn,options:[n,o]}},d0=(n,o)=>{const s=e0(n);return{name:s.name,fn:s.fn,options:[n,o]}},f0=(n,o)=>({fn:o0(n).fn,options:[n,o]}),p0=(n,o)=>{const s=t0(n);return{name:s.name,fn:s.fn,options:[n,o]}},h0=(n,o)=>{const s=n0(n);return{name:s.name,fn:s.fn,options:[n,o]}},m0=(n,o)=>{const s=r0(n);return{name:s.name,fn:s.fn,options:[n,o]}},g0=(n,o)=>{const s=u0(n);return{name:s.name,fn:s.fn,options:[n,o]}};var v0="Arrow",Rh=y.forwardRef((n,o)=>{const{children:s,width:l=10,height:u=5,...f}=n;return d.jsx(Ve.svg,{...f,ref:o,width:l,height:u,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?s:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});Rh.displayName=v0;var y0=Rh;function x0(n){const[o,s]=y.useState(void 0);return Ut(()=>{if(n){s({width:n.offsetWidth,height:n.offsetHeight});const l=new ResizeObserver(u=>{if(!Array.isArray(u)||!u.length)return;const f=u[0];let p,h;if("borderBoxSize"in f){const g=f.borderBoxSize,v=Array.isArray(g)?g[0]:g;p=v.inlineSize,h=v.blockSize}else p=n.offsetWidth,h=n.offsetHeight;s({width:p,height:h})});return l.observe(n,{box:"border-box"}),()=>l.unobserve(n)}else s(void 0)},[n]),o}var uu="Popper",[jh,Th]=Ro(uu),[w0,Oh]=jh(uu),_h=n=>{const{__scopePopper:o,children:s}=n,[l,u]=y.useState(null);return d.jsx(w0,{scope:o,anchor:l,onAnchorChange:u,children:s})};_h.displayName=uu;var Ah="PopperAnchor",Mh=y.forwardRef((n,o)=>{const{__scopePopper:s,virtualRef:l,...u}=n,f=Oh(Ah,s),p=y.useRef(null),h=St(o,p),g=y.useRef(null);return y.useEffect(()=>{const v=g.current;g.current=l?.current||p.current,v!==g.current&&f.onAnchorChange(g.current)}),l?null:d.jsx(Ve.div,{...u,ref:h})});Mh.displayName=Ah;var cu="PopperContent",[S0,b0]=jh(cu),Lh=y.forwardRef((n,o)=>{const{__scopePopper:s,side:l="bottom",sideOffset:u=0,align:f="center",alignOffset:p=0,arrowPadding:h=0,avoidCollisions:g=!0,collisionBoundary:v=[],collisionPadding:x=0,sticky:S="partial",hideWhenDetached:k=!1,updatePositionStrategy:R="optimized",onPlaced:j,...E}=n,b=Oh(cu,s),[A,M]=y.useState(null),D=St(o,xe=>M(xe)),[F,W]=y.useState(null),Q=x0(F),V=Q?.width??0,L=Q?.height??0,se=l+(f!=="center"?"-"+f:""),le=typeof x=="number"?x:{top:0,right:0,bottom:0,left:0,...x},pe=Array.isArray(v)?v:[v],ee=pe.length>0,ce={padding:le,boundary:pe.filter(k0),altBoundary:ee},{refs:G,floatingStyles:me,placement:ie,isPositioned:oe,middlewareData:I}=a0({strategy:"fixed",placement:se,whileElementsMounted:(...xe)=>Zw(...xe,{animationFrame:R==="always"}),elements:{reference:b.anchor},middleware:[c0({mainAxis:u+L,alignmentAxis:p}),g&&d0({mainAxis:!0,crossAxis:!1,limiter:S==="partial"?f0():void 0,...ce}),g&&p0({...ce}),h0({...ce,apply:({elements:xe,rects:we,availableWidth:Ce,availableHeight:Xe})=>{const{width:Yn,height:Oo}=we.reference,Ht=xe.floating.style;Ht.setProperty("--radix-popper-available-width",`${Ce}px`),Ht.setProperty("--radix-popper-available-height",`${Xe}px`),Ht.setProperty("--radix-popper-anchor-width",`${Yn}px`),Ht.setProperty("--radix-popper-anchor-height",`${Oo}px`)}}),F&&g0({element:F,padding:h}),E0({arrowWidth:V,arrowHeight:L}),k&&m0({strategy:"referenceHidden",...ce})]}),[q,K]=Fh(ie),P=Nn(j);Ut(()=>{oe&&P?.()},[oe,P]);const z=I.arrow?.x,ue=I.arrow?.y,de=I.arrow?.centerOffset!==0,[ge,ve]=y.useState();return Ut(()=>{A&&ve(window.getComputedStyle(A).zIndex)},[A]),d.jsx("div",{ref:G.setFloating,"data-radix-popper-content-wrapper":"",style:{...me,transform:oe?me.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ge,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(" "),...I.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:d.jsx(S0,{scope:s,placedSide:q,onArrowChange:W,arrowX:z,arrowY:ue,shouldHideArrow:de,children:d.jsx(Ve.div,{"data-side":q,"data-align":K,...E,ref:D,style:{...E.style,animation:oe?void 0:"none"}})})})});Lh.displayName=cu;var Ih="PopperArrow",C0={top:"bottom",right:"left",bottom:"top",left:"right"},Dh=y.forwardRef(function(o,s){const{__scopePopper:l,...u}=o,f=b0(Ih,l),p=C0[f.placedSide];return d.jsx("span",{ref:f.onArrowChange,style:{position:"absolute",left:f.arrowX,top:f.arrowY,[p]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[f.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[f.placedSide],visibility:f.shouldHideArrow?"hidden":void 0},children:d.jsx(y0,{...u,ref:s,style:{...u.style,display:"block"}})})});Dh.displayName=Ih;function k0(n){return n!==null}var E0=n=>({name:"transformOrigin",options:n,fn(o){const{placement:s,rects:l,middlewareData:u}=o,p=u.arrow?.centerOffset!==0,h=p?0:n.arrowWidth,g=p?0:n.arrowHeight,[v,x]=Fh(s),S={start:"0%",center:"50%",end:"100%"}[x],k=(u.arrow?.x??0)+h/2,R=(u.arrow?.y??0)+g/2;let j="",E="";return v==="bottom"?(j=p?S:`${k}px`,E=`${-g}px`):v==="top"?(j=p?S:`${k}px`,E=`${l.floating.height+g}px`):v==="right"?(j=`${-g}px`,E=p?S:`${R}px`):v==="left"&&(j=`${l.floating.width+g}px`,E=p?S:`${R}px`),{data:{x:j,y:E}}}});function Fh(n){const[o,s="center"]=n.split("-");return[o,s]}var N0=_h,P0=Mh,R0=Lh,j0=Dh,T0=Symbol("radix.slottable");function O0(n){const o=({children:s})=>d.jsx(d.Fragment,{children:s});return o.displayName=`${n}.Slottable`,o.__radixId=T0,o}var[di]=Ro("Tooltip",[Th]),fi=Th(),zh="TooltipProvider",_0=700,Fa="tooltip.open",[A0,du]=di(zh),Uh=n=>{const{__scopeTooltip:o,delayDuration:s=_0,skipDelayDuration:l=300,disableHoverableContent:u=!1,children:f}=n,p=y.useRef(!0),h=y.useRef(!1),g=y.useRef(0);return y.useEffect(()=>{const v=g.current;return()=>window.clearTimeout(v)},[]),d.jsx(A0,{scope:o,isOpenDelayedRef:p,delayDuration:s,onOpen:y.useCallback(()=>{window.clearTimeout(g.current),p.current=!1},[]),onClose:y.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>p.current=!0,l)},[l]),isPointerInTransitRef:h,onPointerInTransitChange:y.useCallback(v=>{h.current=v},[]),disableHoverableContent:u,children:f})};Uh.displayName=zh;var No="Tooltip",[M0,pi]=di(No),$h=n=>{const{__scopeTooltip:o,children:s,open:l,defaultOpen:u,onOpenChange:f,disableHoverableContent:p,delayDuration:h}=n,g=du(No,n.__scopeTooltip),v=fi(o),[x,S]=y.useState(null),k=gh(),R=y.useRef(0),j=p??g.disableHoverableContent,E=h??g.delayDuration,b=y.useRef(!1),[A,M]=Za({prop:l,defaultProp:u??!1,onChange:V=>{V?(g.onOpen(),document.dispatchEvent(new CustomEvent(Fa))):g.onClose(),f?.(V)},caller:No}),D=y.useMemo(()=>A?b.current?"delayed-open":"instant-open":"closed",[A]),F=y.useCallback(()=>{window.clearTimeout(R.current),R.current=0,b.current=!1,M(!0)},[M]),W=y.useCallback(()=>{window.clearTimeout(R.current),R.current=0,M(!1)},[M]),Q=y.useCallback(()=>{window.clearTimeout(R.current),R.current=window.setTimeout(()=>{b.current=!0,M(!0),R.current=0},E)},[E,M]);return y.useEffect(()=>()=>{R.current&&(window.clearTimeout(R.current),R.current=0)},[]),d.jsx(N0,{...v,children:d.jsx(M0,{scope:o,contentId:k,open:A,stateAttribute:D,trigger:x,onTriggerChange:S,onTriggerEnter:y.useCallback(()=>{g.isOpenDelayedRef.current?Q():F()},[g.isOpenDelayedRef,Q,F]),onTriggerLeave:y.useCallback(()=>{j?W():(window.clearTimeout(R.current),R.current=0)},[W,j]),onOpen:F,onClose:W,disableHoverableContent:j,children:s})})};$h.displayName=No;var za="TooltipTrigger",Hh=y.forwardRef((n,o)=>{const{__scopeTooltip:s,...l}=n,u=pi(za,s),f=du(za,s),p=fi(s),h=y.useRef(null),g=St(o,h,u.onTriggerChange),v=y.useRef(!1),x=y.useRef(!1),S=y.useCallback(()=>v.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",S),[S]),d.jsx(P0,{asChild:!0,...p,children:d.jsx(Ve.button,{"aria-describedby":u.open?u.contentId:void 0,"data-state":u.stateAttribute,...l,ref:g,onPointerMove:Ie(n.onPointerMove,k=>{k.pointerType!=="touch"&&!x.current&&!f.isPointerInTransitRef.current&&(u.onTriggerEnter(),x.current=!0)}),onPointerLeave:Ie(n.onPointerLeave,()=>{u.onTriggerLeave(),x.current=!1}),onPointerDown:Ie(n.onPointerDown,()=>{u.open&&u.onClose(),v.current=!0,document.addEventListener("pointerup",S,{once:!0})}),onFocus:Ie(n.onFocus,()=>{v.current||u.onOpen()}),onBlur:Ie(n.onBlur,u.onClose),onClick:Ie(n.onClick,u.onClose)})})});Hh.displayName=za;var L0="TooltipPortal",[W1,I0]=di(L0,{forceMount:void 0}),Nr="TooltipContent",Bh=y.forwardRef((n,o)=>{const s=I0(Nr,n.__scopeTooltip),{forceMount:l=s.forceMount,side:u="top",...f}=n,p=pi(Nr,n.__scopeTooltip);return d.jsx(oi,{present:l||p.open,children:p.disableHoverableContent?d.jsx(Wh,{side:u,...f,ref:o}):d.jsx(D0,{side:u,...f,ref:o})})}),D0=y.forwardRef((n,o)=>{const s=pi(Nr,n.__scopeTooltip),l=du(Nr,n.__scopeTooltip),u=y.useRef(null),f=St(o,u),[p,h]=y.useState(null),{trigger:g,onClose:v}=s,x=u.current,{onPointerInTransitChange:S}=l,k=y.useCallback(()=>{h(null),S(!1)},[S]),R=y.useCallback((j,E)=>{const b=j.currentTarget,A={x:j.clientX,y:j.clientY},M=H0(A,b.getBoundingClientRect()),D=B0(A,M),F=W0(E.getBoundingClientRect()),W=Q0([...D,...F]);h(W),S(!0)},[S]);return y.useEffect(()=>()=>k(),[k]),y.useEffect(()=>{if(g&&x){const j=b=>R(b,x),E=b=>R(b,g);return g.addEventListener("pointerleave",j),x.addEventListener("pointerleave",E),()=>{g.removeEventListener("pointerleave",j),x.removeEventListener("pointerleave",E)}}},[g,x,R,k]),y.useEffect(()=>{if(p){const j=E=>{const b=E.target,A={x:E.clientX,y:E.clientY},M=g?.contains(b)||x?.contains(b),D=!V0(A,p);M?k():D&&(k(),v())};return document.addEventListener("pointermove",j),()=>document.removeEventListener("pointermove",j)}},[g,x,p,v,k]),d.jsx(Wh,{...n,ref:f})}),[F0,z0]=di(No,{isInside:!1}),U0=O0("TooltipContent"),Wh=y.forwardRef((n,o)=>{const{__scopeTooltip:s,children:l,"aria-label":u,onEscapeKeyDown:f,onPointerDownOutside:p,...h}=n,g=pi(Nr,s),v=fi(s),{onClose:x}=g;return y.useEffect(()=>(document.addEventListener(Fa,x),()=>document.removeEventListener(Fa,x)),[x]),y.useEffect(()=>{if(g.trigger){const S=k=>{k.target?.contains(g.trigger)&&x()};return window.addEventListener("scroll",S,{capture:!0}),()=>window.removeEventListener("scroll",S,{capture:!0})}},[g.trigger,x]),d.jsx(Ya,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:S=>S.preventDefault(),onDismiss:x,children:d.jsxs(R0,{"data-state":g.stateAttribute,...v,...h,ref:o,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:[d.jsx(U0,{children:l}),d.jsx(F0,{scope:s,isInside:!0,children:d.jsx(ox,{id:g.contentId,role:"tooltip",children:u||l})})]})})});Bh.displayName=Nr;var Vh="TooltipArrow",$0=y.forwardRef((n,o)=>{const{__scopeTooltip:s,...l}=n,u=fi(s);return z0(Vh,s).isInside?null:d.jsx(j0,{...u,...l,ref:o})});$0.displayName=Vh;function H0(n,o){const s=Math.abs(o.top-n.y),l=Math.abs(o.bottom-n.y),u=Math.abs(o.right-n.x),f=Math.abs(o.left-n.x);switch(Math.min(s,l,u,f)){case f:return"left";case u:return"right";case s:return"top";case l:return"bottom";default:throw new Error("unreachable")}}function B0(n,o,s=5){const l=[];switch(o){case"top":l.push({x:n.x-s,y:n.y+s},{x:n.x+s,y:n.y+s});break;case"bottom":l.push({x:n.x-s,y:n.y-s},{x:n.x+s,y:n.y-s});break;case"left":l.push({x:n.x+s,y:n.y-s},{x:n.x+s,y:n.y+s});break;case"right":l.push({x:n.x-s,y:n.y-s},{x:n.x-s,y:n.y+s});break}return l}function W0(n){const{top:o,right:s,bottom:l,left:u}=n;return[{x:u,y:o},{x:s,y:o},{x:s,y:l},{x:u,y:l}]}function V0(n,o){const{x:s,y:l}=n;let u=!1;for(let f=0,p=o.length-1;f<o.length;p=f++){const h=o[f],g=o[p],v=h.x,x=h.y,S=g.x,k=g.y;x>l!=k>l&&s<(S-v)*(l-x)/(k-x)+v&&(u=!u)}return u}function Q0(n){const o=n.slice();return o.sort((s,l)=>s.x<l.x?-1:s.x>l.x?1:s.y<l.y?-1:s.y>l.y?1:0),K0(o)}function K0(n){if(n.length<=1)return n.slice();const o=[];for(let l=0;l<n.length;l++){const u=n[l];for(;o.length>=2;){const f=o[o.length-1],p=o[o.length-2];if((f.x-p.x)*(u.y-p.y)>=(f.y-p.y)*(u.x-p.x))o.pop();else break}o.push(u)}o.pop();const s=[];for(let l=n.length-1;l>=0;l--){const u=n[l];for(;s.length>=2;){const f=s[s.length-1],p=s[s.length-2];if((f.x-p.x)*(u.y-p.y)>=(f.y-p.y)*(u.x-p.x))s.pop();else break}s.push(u)}return s.pop(),o.length===1&&s.length===1&&o[0].x===s[0].x&&o[0].y===s[0].y?o:o.concat(s)}var q0=Uh,G0=$h,X0=Hh,Qh=Bh;const Y0=q0,Z0=G0,J0=X0,Kh=y.forwardRef(({className:n,sideOffset:o=4,...s},l)=>d.jsx(Qh,{ref:l,sideOffset:o,className:ft("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]",n),...s}));Kh.displayName=Qh.displayName;var hi="Collapsible",[e1]=Ro(hi),[t1,fu]=e1(hi),qh=y.forwardRef((n,o)=>{const{__scopeCollapsible:s,open:l,defaultOpen:u,disabled:f,onOpenChange:p,...h}=n,[g,v]=Za({prop:l,defaultProp:u??!1,onChange:p,caller:hi});return d.jsx(t1,{scope:s,disabled:f,contentId:gh(),open:g,onOpenToggle:y.useCallback(()=>v(x=>!x),[v]),children:d.jsx(Ve.div,{"data-state":hu(g),"data-disabled":f?"":void 0,...h,ref:o})})});qh.displayName=hi;var Gh="CollapsibleTrigger",Xh=y.forwardRef((n,o)=>{const{__scopeCollapsible:s,...l}=n,u=fu(Gh,s);return d.jsx(Ve.button,{type:"button","aria-controls":u.contentId,"aria-expanded":u.open||!1,"data-state":hu(u.open),"data-disabled":u.disabled?"":void 0,disabled:u.disabled,...l,ref:o,onClick:Ie(n.onClick,u.onOpenToggle)})});Xh.displayName=Gh;var pu="CollapsibleContent",Yh=y.forwardRef((n,o)=>{const{forceMount:s,...l}=n,u=fu(pu,n.__scopeCollapsible);return d.jsx(oi,{present:s||u.open,children:({present:f})=>d.jsx(n1,{...l,ref:o,present:f})})});Yh.displayName=pu;var n1=y.forwardRef((n,o)=>{const{__scopeCollapsible:s,present:l,children:u,...f}=n,p=fu(pu,s),[h,g]=y.useState(l),v=y.useRef(null),x=St(o,v),S=y.useRef(0),k=S.current,R=y.useRef(0),j=R.current,E=p.open||h,b=y.useRef(E),A=y.useRef(void 0);return y.useEffect(()=>{const M=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(M)},[]),Ut(()=>{const M=v.current;if(M){A.current=A.current||{transitionDuration:M.style.transitionDuration,animationName:M.style.animationName},M.style.transitionDuration="0s",M.style.animationName="none";const D=M.getBoundingClientRect();S.current=D.height,R.current=D.width,b.current||(M.style.transitionDuration=A.current.transitionDuration,M.style.animationName=A.current.animationName),g(l)}},[p.open,l]),d.jsx(Ve.div,{"data-state":hu(p.open),"data-disabled":p.disabled?"":void 0,id:p.contentId,hidden:!E,...f,ref:x,style:{"--radix-collapsible-content-height":k?`${k}px`:void 0,"--radix-collapsible-content-width":j?`${j}px`:void 0,...n.style},children:E&&u})});function hu(n){return n?"open":"closed"}var r1=qh,o1=Xh,s1=Yh;function i1(n){const o=n.split("/");if(o.length!==2||!o[0]||!o[1])return`https://github.com/${n}`;const[s,l]=o;return`https://github.com/${encodeURIComponent(s)}/${encodeURIComponent(l)}`}function l1(n){const o=n.githubConnected?n.repos.filter(u=>!u.accessible):[],s=!n.githubConnected||o.length>0,l=n.githubConnected?`${o.length} inaccessible repo${o.length===1?"":"s"}`:"GitHub not connected";return{hasIssues:s,inaccessibleRepos:o,summary:l}}function Cn({children:n}){return d.jsx("code",{className:"rounded border border-border bg-muted/30 px-1 py-0.5 text-[11px] font-mono",children:n})}function Bn({number:n,children:o}){return d.jsxs("div",{className:"flex gap-2.5",children:[d.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:n}),d.jsx("div",{className:"flex-1 text-[12px] leading-relaxed",children:o})]})}function a1(){const[n,o]=y.useState(!1);return d.jsxs("div",{className:"space-y-3",children:[d.jsx("p",{className:"text-[12px] text-muted-foreground",children:"Code Factory needs a GitHub token to read repositories and sync PR feedback. Choose one of these options:"}),d.jsxs("div",{className:"space-y-2",children:[d.jsxs("div",{className:"border border-border p-3 space-y-2",children:[d.jsx("div",{className:"text-[11px] font-medium uppercase tracking-wider",children:"Option A — GitHub CLI (recommended)"}),d.jsxs(Bn,{number:1,children:["Install the GitHub CLI from"," ",d.jsx("a",{href:"https://cli.github.com",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2",children:"cli.github.com"})]}),d.jsxs(Bn,{number:2,children:["Run ",d.jsx(Cn,{children:"gh auth login"})," and follow the prompts to authenticate."]}),d.jsxs(Bn,{number:3,children:["Restart Code Factory — it will automatically detect your token via ",d.jsx(Cn,{children:"gh auth token"}),"."]})]}),d.jsxs("div",{className:"border border-border p-3 space-y-2",children:[d.jsx("div",{className:"text-[11px] font-medium uppercase tracking-wider",children:"Option B — Environment variable"}),d.jsxs(Bn,{number:1,children:["Create a Personal Access Token at"," ",d.jsx("a",{href:"https://github.com/settings/tokens",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2",children:"github.com/settings/tokens"})," ","with ",d.jsx(Cn,{children:"repo"})," and ",d.jsx(Cn,{children:"read:user"})," scopes."]}),d.jsxs(Bn,{number:2,children:["Set it before starting the app: ",d.jsx(Cn,{children:"export GITHUB_TOKEN=ghp_your_token"})]})]}),d.jsxs("div",{className:"border border-border p-3 space-y-2",children:[d.jsxs("button",{onClick:()=>o(!n),className:"flex w-full items-center justify-between text-[11px] font-medium uppercase tracking-wider",children:[d.jsx("span",{children:"Option C — Enter token in settings"}),d.jsx("span",{className:"text-muted-foreground",children:n?"▲":"▼"})]}),n&&d.jsxs("div",{className:"space-y-2 pt-1",children:[d.jsxs(Bn,{number:1,children:["Create a"," ",d.jsx("a",{href:"https://github.com/settings/tokens",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2",children:"Personal Access Token"})," ","with ",d.jsx(Cn,{children:"repo"})," and ",d.jsx(Cn,{children:"read:user"})," scopes."]}),d.jsxs(Bn,{number:2,children:["Paste it via the API: ",d.jsx(Cn,{children:`curl -X PATCH http://localhost:5001/api/config -H 'Content-Type: application/json' -d '{"githubToken":"ghp_your_token"}'`})]})]})]})]})]})}function u1(){const[n,o]=y.useState(!1),[s,l]=y.useState(!0),{data:u,isLoading:f}=Dt({queryKey:["/api/onboarding/status"],refetchInterval:3e4});if(f||!u)return null;const{hasIssues:p,inaccessibleRepos:h,summary:g}=l1(u);return!p||n?null:d.jsxs("div",{className:"shrink-0 border-b border-amber-500/30 bg-amber-500/5",children:[d.jsxs("div",{className:"flex items-center justify-between px-4 py-2",children:[d.jsxs("button",{onClick:()=>l(!s),className:"flex items-center gap-2 text-left",children:[d.jsx("span",{className:"h-1.5 w-1.5 shrink-0 rounded-full bg-amber-400"}),d.jsx("span",{className:"text-[11px] font-medium uppercase tracking-wider text-amber-400",children:"Setup needed"}),d.jsx("span",{className:"text-[11px] text-muted-foreground",children:g}),d.jsx("span",{className:"text-[10px] text-muted-foreground",children:s?"▲":"▼"})]}),d.jsx("button",{onClick:()=>o(!0),className:"text-[10px] uppercase tracking-wider text-muted-foreground transition-colors hover:text-foreground",children:"dismiss"})]}),s&&d.jsxs("div",{className:"border-t border-amber-500/20 px-4 py-4 space-y-6",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-[11px] font-medium uppercase tracking-wider text-destructive",children:"GitHub not connected"}),u.githubError&&d.jsxs("span",{className:"text-[11px] text-muted-foreground",children:["— ",u.githubError]})]}),d.jsx(a1,{})]}),u.githubConnected&&h.length>0&&d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"text-[11px] font-medium uppercase tracking-wider",children:"Repository access issues"}),d.jsx("div",{className:"space-y-3",children:h.map(v=>d.jsxs("div",{className:"space-y-1",children:[d.jsx("div",{className:"text-[11px] font-medium",children:d.jsx("a",{href:`https://github.com/${v.repo}`,target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2",children:v.repo})}),d.jsxs("p",{className:"text-[12px] text-destructive",children:["Cannot access this repository: ",v.error??"unknown error"]})]},v.repo))})]})]})]})}function c1(n){return n.replace("_"," ").toUpperCase()}function d1(n){return n==="in_progress"?"border-foreground text-foreground animate-pulse":n==="failed"?"border-destructive text-destructive":n==="warning"?"border-yellow-500 text-yellow-500":n==="resolved"?"border-foreground/20 text-muted-foreground":n==="rejected"?"border-foreground/20 text-muted-foreground line-through":n==="flagged"?"border-foreground/40 text-foreground/60":n==="queued"?"border-foreground text-foreground":"border-foreground/30 text-foreground/60"}function Zh(n){return n==="resolved"||n==="rejected"}function f1(n){return Zh(n)||n==="warning"}function Jh(n){return n.length===0?!1:n.every(o=>Zh(o.status))}function Po(n){return n.reduce((o,s)=>(s.status==="queued"?o.queued+=1:s.status==="in_progress"?o.inProgress+=1:s.status==="failed"?o.failed+=1:s.status==="warning"&&(o.warning+=1),o),{queued:0,inProgress:0,failed:0,warning:0})}function Pr(n){return n?new Date(n).toLocaleTimeString("en-US",{hour12:!1}):null}function em(n){return n.watchEnabled}function tm(n){return n==="processing"?"autonomous run active":n==="done"?"completed":n==="error"?"attention needed":n==="archived"?"archived":"watching"}function p1(n){return`${Math.max(1,Math.round((n??12e4)/1e3))}s`}function nm({status:n}){const o=n==="watching"?"bg-foreground/30":n==="processing"?"bg-foreground animate-pulse":n==="done"?"bg-foreground":n==="archived"?"bg-foreground/15":"bg-destructive";return d.jsx("span",{className:`inline-block h-1.5 w-1.5 shrink-0 ${o}`})}function h1({status:n}){const o=d1(n);return d.jsx("span",{className:`inline-block border px-1.5 py-0 text-[11px] uppercase tracking-wide ${o}`,children:c1(n)})}function Ua(){return d.jsx("span",{className:"border border-border px-1.5 py-0 text-[10px] uppercase tracking-wider text-muted-foreground",children:"watch paused"})}function rm({href:n,testId:o,label:s,hint:l,className:u,dotClassName:f,hintClassName:p,onClick:h}){return d.jsxs("a",{href:n,target:"_blank",rel:"noopener noreferrer",onClick:h,"data-testid":o,className:`inline-flex items-center border border-green-600 bg-green-600/10 font-medium uppercase text-green-500 transition-colors hover:bg-green-600/20 ${u}`,children:[d.jsx("span",{className:`inline-block rounded-full bg-green-500 ${f}`}),s,l&&d.jsx("span",{className:p,children:l})]})}function om({pr:n}){const o=Po(n.feedbackItems).inProgress;if(!(n.status==="processing")&&o===0)return null;const l=o>0?`${o} agent${o!==1?"s":""} running on this PR`:"Agent run active on this PR";return d.jsxs(Z0,{children:[d.jsx(J0,{asChild:!0,children:d.jsxs("span",{className:"inline-flex shrink-0 cursor-default items-center gap-0.5 text-[12px]","data-testid":`agent-indicator-${n.id}`,children:[d.jsx("span",{className:"animate-pulse",children:"🤖"}),o>0&&d.jsx("span",{className:"text-[10px] text-muted-foreground",children:o})]})}),d.jsx(Kh,{side:"top",children:d.jsx("p",{className:"text-xs",children:l})})]})}function m1({pr:n,isSelected:o,onSelect:s}){const l=Pr(n.lastChecked),u=em(n),p=!(n.status==="processing"||Po(n.feedbackItems).inProgress>0)&&Jh(n.feedbackItems);return d.jsx("div",{onClick:s,onKeyDown:h=>{h.target===h.currentTarget&&(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),s())},role:"button",tabIndex:0,"data-testid":`pr-row-${n.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:d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx(nm,{status:n.status}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsxs("span",{className:"w-12 shrink-0 text-muted-foreground",children:["#",n.number]}),d.jsx("span",{className:"truncate",children:n.title}),d.jsx(om,{pr:n})]}),p&&d.jsx(rm,{href:n.url,testId:`ready-to-merge-${n.id}`,label:"Ready to merge",hint:"— click to open PR",onClick:h=>h.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-green-500/70"}),d.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:[d.jsx("a",{href:n.url,target:"_blank",rel:"noopener noreferrer",onClick:h=>h.stopPropagation(),className:"underline decoration-border underline-offset-2 transition-colors hover:text-foreground",children:n.repo}),d.jsx("span",{children:tm(n.status)}),!u&&d.jsx(Ua,{}),n.feedbackItems.length>0&&(()=>{const h=Po(n.feedbackItems),g=[];return h.queued>0&&g.push(`${h.queued}q`),h.inProgress>0&&g.push(`${h.inProgress} active`),h.failed>0&&g.push(`${h.failed} failed`),h.warning>0&&g.push(`${h.warning} warn`),g.length===0?d.jsxs("span",{children:[n.feedbackItems.length," items"]}):d.jsx("span",{children:g.join(" · ")})})(),l&&d.jsxs("span",{children:["checked ",l]})]})]})]})})}function g1({item:n,prId:o,readOnly:s}){const l=jt({mutationFn:async h=>(await wt("PATCH",`/api/prs/${o}/feedback/${n.id}`,{decision:h})).json(),onSuccess:()=>{Le.invalidateQueries({queryKey:["/api/prs"]}),Le.invalidateQueries({queryKey:["/api/prs",o]})}}),u=jt({mutationFn:async()=>(await wt("POST",`/api/prs/${o}/feedback/${n.id}/retry`)).json(),onSuccess:()=>{Le.invalidateQueries({queryKey:["/api/prs"]}),Le.invalidateQueries({queryKey:["/api/prs",o]}),Le.invalidateQueries({queryKey:["/api/logs"]})},onError:h=>{Wn("Could not retry feedback item",h)}}),f=Pr(n.createdAt),p=f1(n.status);return d.jsxs(r1,{defaultOpen:!p,className:"border-b border-border",children:[d.jsx("div",{className:"px-4 py-3",children:d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx("div",{className:"shrink-0 pt-0.5",children:d.jsx(h1,{status:n.status})}),d.jsx("div",{className:"min-w-0 flex-1",children:d.jsxs("div",{className:"mb-1 flex flex-wrap items-center gap-2",children:[d.jsx("span",{className:"font-medium",children:n.author}),n.file&&d.jsxs("span",{className:"text-[11px] text-muted-foreground",children:[n.file,n.line?`:${n.line}`:""]}),d.jsx("span",{className:"text-[11px] text-muted-foreground",children:n.type.replace("_"," ")}),f&&d.jsx("span",{className:"text-[11px] text-muted-foreground",children:f})]})}),d.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[!s&&(n.status==="failed"||n.status==="warning")&&d.jsx("button",{onClick:()=>u.mutate(),disabled:u.isPending,"data-testid":`retry-${n.id}`,className:"px-1.5 py-0.5 text-[10px] uppercase tracking-wider transition-colors hover:bg-foreground hover:text-background border border-border text-muted-foreground disabled:opacity-30",children:"R"}),d.jsx(o1,{asChild:!0,children:d.jsx("button",{"data-testid":`toggle-${n.id}`,className:"px-1.5 py-0.5 text-[10px] uppercase tracking-wider text-muted-foreground transition-colors hover:bg-foreground hover:text-background border border-border",children:"↕"})}),!s&&["accept","reject","flag"].map(h=>d.jsx("button",{onClick:()=>l.mutate(h),"data-testid":`override-${h}-${n.id}`,className:`px-1.5 py-0.5 text-[10px] uppercase tracking-wider transition-colors hover:bg-foreground hover:text-background ${n.decision===h?"bg-foreground text-background":"border border-border text-muted-foreground"}`,children:h.charAt(0)},h))]})]})}),d.jsx(s1,{children:d.jsxs("div",{className:"px-4 pb-3",children:[n.bodyHtml?d.jsx("div",{className:"feedback-markdown text-[12px] leading-relaxed",dangerouslySetInnerHTML:{__html:n.bodyHtml}}):d.jsx("p",{className:"whitespace-pre-wrap text-[12px] leading-relaxed text-foreground/80",children:n.body}),(n.statusReason||n.decisionReason)&&d.jsx("p",{className:"mt-2 text-[11px] text-muted-foreground",children:n.statusReason||n.decisionReason})]})})]})}function v1({prId:n}){const o=y.useRef(null),{data:s=[]}=Dt({queryKey:["/api/logs",n??"all"],queryFn:async()=>{const l=n?`/api/logs?prId=${encodeURIComponent(n)}`:"/api/logs";return(await wt("GET",l)).json()},refetchInterval:1500});return y.useEffect(()=>{const l=o.current;l&&(l.scrollTop=l.scrollHeight)},[s.length,n]),d.jsx("div",{className:"flex h-full flex-col",children:d.jsx("div",{ref:o,className:"flex-1 overflow-y-auto p-4 font-mono text-[11px] leading-relaxed",children:s.length===0?d.jsx("span",{className:"text-muted-foreground",children:"No log entries."}):s.map(l=>d.jsxs("div",{className:"border-b border-border/60 py-2 last:border-b-0","data-testid":`log-${l.id}`,children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-[10px] uppercase tracking-wider text-muted-foreground",children:[d.jsx("span",{children:Pr(l.timestamp)}),d.jsx("span",{className:l.level==="error"?"text-destructive":l.level==="warn"?"text-foreground/80":"text-foreground/55",children:l.level}),l.phase&&d.jsx("span",{className:"border border-border px-1 py-0",children:l.phase}),l.runId&&d.jsxs("span",{className:"normal-case text-foreground/45",children:["run ",l.runId.slice(0,8)]})]}),d.jsx("div",{className:"mt-1 break-words text-foreground/75",children:l.message}),l.metadata&&Object.keys(l.metadata).length>0&&d.jsx("pre",{className:"mt-1 whitespace-pre-wrap break-all text-[10px] text-muted-foreground",children:JSON.stringify(l.metadata,null,2)})]},l.id))})})}function y1({prId:n}){const[o,s]=y.useState("ask");return d.jsxs("div",{className:"w-80 shrink-0 border-l border-border flex flex-col",children:[d.jsxs("div",{className:"flex border-b border-border",children:[d.jsx("button",{onClick:()=>s("ask"),"data-testid":"tab-ask",className:`flex-1 px-3 py-2 text-[11px] uppercase tracking-wider transition-colors ${o==="ask"?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:"Ask Agent"}),d.jsx("button",{onClick:()=>s("activity"),"data-testid":"tab-activity",className:`flex-1 px-3 py-2 text-[11px] uppercase tracking-wider transition-colors ${o==="activity"?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:"Activity"})]}),d.jsx("div",{className:"flex-1 overflow-hidden",children:o==="activity"?d.jsx(v1,{prId:n}):n?d.jsx(x1,{prId:n}):d.jsx("div",{className:"flex h-full items-center justify-center text-[12px] text-muted-foreground",children:"Select a PR to ask questions."})})]})}function x1({prId:n}){const[o,s]=y.useState(""),l=y.useRef(null),{data:u=[]}=Dt({queryKey:["/api/prs",n,"questions"],refetchInterval:2e3}),f=jt({mutationFn:p=>wt("POST",`/api/prs/${n}/questions`,{question:p}).then(h=>h.json()),onSuccess:()=>{Le.invalidateQueries({queryKey:["/api/prs",n,"questions"]}),s("")}});return y.useEffect(()=>{const p=l.current;p&&(p.scrollTop=p.scrollHeight)},[u.length,u[u.length-1]?.status]),d.jsxs("div",{className:"flex h-full flex-col",children:[d.jsx("div",{className:"border-b border-border px-4 py-2 text-[11px] uppercase tracking-wider text-muted-foreground",children:"Ask Agent"}),d.jsx("div",{ref:l,className:"flex-1 overflow-y-auto p-4 space-y-3",children:u.length===0?d.jsx("span",{className:"text-[12px] text-muted-foreground",children:"Ask questions about this PR — the agent will read activity logs, feedback, and status to answer."}):u.map(p=>d.jsxs("div",{className:"space-y-1.5","data-testid":`question-${p.id}`,children:[d.jsxs("div",{className:"text-[12px]",children:[d.jsx("span",{className:"font-medium text-foreground/90",children:"Q: "}),d.jsx("span",{className:"text-foreground/80",children:p.question})]}),p.status==="pending"||p.status==="answering"?d.jsx("div",{className:"text-[11px] text-muted-foreground animate-pulse",children:"Agent is thinking..."}):p.status==="error"?d.jsxs("div",{className:"text-[11px] text-destructive",children:["Error: ",p.error||"Unknown error"]}):d.jsx("div",{className:"text-[12px] leading-relaxed text-foreground/75 whitespace-pre-wrap border-l-2 border-border pl-3",children:p.answer}),d.jsxs("div",{className:"text-[10px] text-muted-foreground",children:[Pr(p.createdAt),p.answeredAt&&` — answered ${Pr(p.answeredAt)}`]})]},p.id))}),d.jsxs("form",{onSubmit:p=>{p.preventDefault(),o.trim()&&!f.isPending&&f.mutate(o.trim())},className:"border-t border-border p-3",children:[d.jsxs("div",{className:"flex gap-2",children:[d.jsx("input",{type:"text",value:o,onChange:p=>s(p.target.value),placeholder:"Was the review done? Why did this fail?","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"}),d.jsx("button",{type:"submit",disabled:f.isPending||!o.trim(),"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 disabled:opacity-30",children:f.isPending?"...":"Ask"})]}),f.isError&&d.jsx("div",{className:"mt-1 text-[11px] text-destructive",children:sm(f.error)})]})]})}function sm(n){if(!(n instanceof Error))return String(n);const o=n.message.replace(/^\d+:\s*/,"").trim();if(!o)return"Request failed";try{const s=JSON.parse(o);if(typeof s.error=="string")return s.error;if(typeof s.message=="string")return s.message}catch{}return o}function Wn(n,o){Gn({variant:"destructive",title:n,description:sm(o)})}function w1(){const[n,o]=y.useState(null),[s,l]=y.useState(""),[u,f]=y.useState(""),[p,h]=y.useState("active"),{data:g=[],isLoading:v}=Dt({queryKey:["/api/prs"],refetchInterval:3e3}),{data:x=[],isLoading:S}=Dt({queryKey:["/api/prs/archived"],refetchInterval:1e4}),{data:k}=Dt({queryKey:["/api/config"],refetchInterval:5e3}),{data:R=[]}=Dt({queryKey:["/api/repos"],refetchInterval:5e3}),j=p==="active"?g:x,E=p==="archived";y.useEffect(()=>{if(j.length===0){n!==null&&o(null);return}(!n||!j.some(L=>L.id===n))&&o(j[0].id)},[j,n]);const b=j.find(L=>L.id===n)??null,A=b?em(b):!0,M=jt({mutationFn:async L=>(await wt("POST","/api/prs",{url:L})).json(),onSuccess:L=>{Le.invalidateQueries({queryKey:["/api/prs"]}),l(""),o(L.id)},onError:L=>{Wn("Could not add PR",L)}}),D=jt({mutationFn:async L=>(await wt("POST",`/api/prs/${L}/apply`)).json(),onSuccess:()=>{Le.invalidateQueries({queryKey:["/api/prs"]}),Le.invalidateQueries({queryKey:["/api/logs"]})},onError:L=>{Wn("Could not run babysitter",L)}}),F=jt({mutationFn:async({id:L,enabled:se})=>(await wt("PATCH",`/api/prs/${L}/watch`,{enabled:se})).json(),onSuccess:()=>{Le.invalidateQueries({queryKey:["/api/prs"]}),Le.invalidateQueries({queryKey:["/api/prs/archived"]}),Le.invalidateQueries({queryKey:["/api/logs"]})},onError:L=>{Wn("Could not update PR watch state",L)}}),W=jt({mutationFn:async L=>(await wt("PATCH","/api/config",L)).json(),onSuccess:()=>{Le.invalidateQueries({queryKey:["/api/config"]})},onError:L=>{Wn("Could not update settings",L)}}),Q=jt({mutationFn:async()=>(await wt("POST","/api/repos/sync")).json(),onSuccess:()=>{Le.invalidateQueries({queryKey:["/api/prs"]}),Le.invalidateQueries({queryKey:["/api/repos"]})},onError:L=>{Wn("Could not sync repositories",L)}}),V=jt({mutationFn:async L=>(await wt("POST","/api/repos",{repo:L})).json(),onSuccess:()=>{Le.invalidateQueries({queryKey:["/api/repos"]}),Le.invalidateQueries({queryKey:["/api/prs"]}),f("")},onError:L=>{Wn("Could not watch repository",L)}});return d.jsxs("div",{className:"flex h-screen flex-col overflow-hidden",children:[d.jsxs("header",{className:"flex shrink-0 items-center justify-between border-b border-border px-4 py-2.5",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-label":"PR Feedback Agent",children:[d.jsx("rect",{x:"1",y:"1",width:"14",height:"14",stroke:"currentColor",strokeWidth:"1.5"}),d.jsx("path",{d:"M4 5h8M4 8h5M4 11h6",stroke:"currentColor",strokeWidth:"1"})]}),d.jsx("span",{className:"text-sm font-medium tracking-tight",children:"code factory"}),d.jsx("span",{className:"border border-border px-1.5 py-0 text-[10px] uppercase tracking-wider text-muted-foreground",children:"autonomous"}),d.jsxs("span",{className:"text-[11px] text-muted-foreground",children:["poll ",p1(k?.pollIntervalMs)]}),d.jsx(Qn,{href:"/changelogs",className:"text-[11px] text-muted-foreground hover:text-foreground focus:outline-none",children:"changelogs"}),d.jsx(Qn,{href:"/releases",className:"text-[11px] text-muted-foreground hover:text-foreground focus:outline-none",children:"releases"})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsxs("span",{className:"text-[11px] text-muted-foreground",children:[g.length," PR",g.length!==1?"s":""," in ",R.length," repo",R.length!==1?"s":""]}),d.jsx("label",{className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:"Agent"}),d.jsxs("select",{value:k?.codingAgent??"codex",onChange:L=>{const se=L.target.value;W.mutate({codingAgent:se})},disabled:W.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 disabled:opacity-50",children:[d.jsx("option",{value:"codex",children:"codex"}),d.jsx("option",{value:"claude",children:"claude"})]}),d.jsxs("label",{className:"flex items-center gap-1 text-[11px] text-muted-foreground",children:[d.jsx("input",{type:"checkbox",checked:k?.autoResolveMergeConflicts??!0,onChange:L=>W.mutate({autoResolveMergeConflicts:L.target.checked}),disabled:W.isPending,"data-testid":"checkbox-auto-resolve-conflicts",className:"accent-foreground"}),"Auto-resolve conflicts"]}),d.jsxs("label",{className:"flex items-center gap-1 text-[11px] text-muted-foreground",children:[d.jsx("input",{type:"checkbox",checked:k?.autoUpdateDocs??!0,onChange:L=>W.mutate({autoUpdateDocs:L.target.checked}),disabled:W.isPending,"data-testid":"checkbox-auto-update-docs",className:"accent-foreground"}),"Auto-update docs"]}),d.jsx(Qn,{href:"/settings",className:"border border-border px-2 py-0.5 text-[11px] text-muted-foreground hover:text-foreground",children:"settings"})]})]}),d.jsx(u1,{}),d.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[d.jsxs("div",{className:"flex w-80 shrink-0 flex-col border-r border-border",children:[d.jsxs("div",{className:"flex border-b border-border",children:[d.jsxs("button",{onClick:()=>h("active"),"data-testid":"tab-active",className:`flex-1 px-3 py-2 text-[11px] uppercase tracking-wider transition-colors ${p==="active"?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:["Active (",g.length,")"]}),d.jsxs("button",{onClick:()=>h("archived"),"data-testid":"tab-archived",className:`flex-1 px-3 py-2 text-[11px] uppercase tracking-wider transition-colors ${p==="archived"?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:["Archived (",x.length,")"]})]}),!E&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"border-b border-border px-3 py-2 text-[11px] text-muted-foreground",children:"Add a PR or watch a repo. Sync and babysit start automatically."}),d.jsx("form",{onSubmit:L=>{L.preventDefault(),s.trim()&&M.mutate(s.trim())},className:"border-b border-border p-3",children:d.jsxs("div",{className:"flex gap-2",children:[d.jsx("input",{type:"text",value:s,onChange:L=>l(L.target.value),placeholder:"github.com/owner/repo/pull/123","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"}),d.jsx("button",{type:"submit",disabled:M.isPending||!s.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 disabled:opacity-30",children:"Add"})]})}),d.jsxs("form",{onSubmit:L=>{L.preventDefault(),u.trim()&&V.mutate(u.trim())},className:"border-b border-border p-3",children:[d.jsxs("div",{className:"flex gap-2",children:[d.jsx("input",{type:"text",value:u,onChange:L=>f(L.target.value),placeholder:"owner/repo","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"}),d.jsx("button",{type:"submit",disabled:V.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 disabled:opacity-30",children:"Watch"})]}),d.jsxs("div",{className:"mt-3",children:[d.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[d.jsx("span",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:"Tracked repositories"}),d.jsx("button",{type:"button",onClick:()=>Q.mutate(),disabled:Q.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 disabled:opacity-30",children:Q.isPending?"Fetching…":"Fetch"})]}),R.length===0?d.jsx("div",{className:"text-[11px] text-muted-foreground",children:"No repositories being watched yet."}):d.jsx("div",{className:"space-y-1 text-[12px]",children:R.map(L=>d.jsx("a",{href:i1(L),target:"_blank",rel:"noopener noreferrer","data-testid":`tracked-repo-${L.replace("/","-")}`,className:"block break-all text-foreground/75 underline decoration-border underline-offset-2 transition-colors hover:text-foreground",children:L},L))})]})]})]}),d.jsx("div",{className:"flex-1 overflow-y-auto",children:(E?S:v)?d.jsx("div",{className:"p-4 text-[12px] text-muted-foreground",children:"Loading..."}):j.length===0?d.jsx("div",{className:"p-4 text-[12px] text-muted-foreground",children:E?"No archived PRs. Closed PRs are archived automatically.":"No PRs tracked yet. Add a repository to watch or add a PR URL."}):j.map(L=>d.jsx(m1,{pr:L,isSelected:L.id===n,onSelect:()=>o(L.id)},L.id))})]}),d.jsx("div",{className:"flex flex-1 flex-col overflow-hidden",children:b?d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"shrink-0 border-b border-border px-4 py-3",children:[d.jsxs("div",{className:"mb-1 flex items-start justify-between gap-4",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(nm,{status:b.status}),d.jsx("span",{className:"truncate font-medium",children:b.title}),d.jsx(om,{pr:b}),!A&&d.jsx(Ua,{}),d.jsxs("a",{href:b.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",children:[b.repo,"#",b.number]})]}),d.jsxs("div",{className:"mt-1 flex flex-wrap gap-x-4 gap-y-1 text-[11px] text-muted-foreground",children:[d.jsxs("span",{children:["status: ",tm(b.status)]}),!A&&d.jsx(Ua,{}),d.jsxs("span",{children:[b.feedbackItems.length," items"]}),b.feedbackItems.length>0&&(()=>{const L=Po(b.feedbackItems);return d.jsxs(d.Fragment,{children:[L.queued>0&&d.jsxs("span",{children:[L.queued," queued"]}),L.inProgress>0&&d.jsxs("span",{children:[L.inProgress," in progress"]}),L.failed>0&&d.jsxs("span",{children:[L.failed," failed"]}),L.warning>0&&d.jsxs("span",{children:[L.warning," warnings"]})]})})(),b.testsPassed!==null&&d.jsxs("span",{children:["tests: ",b.testsPassed?"pass":"fail"]}),b.lintPassed!==null&&d.jsxs("span",{children:["lint: ",b.lintPassed?"pass":"fail"]}),b.lastChecked&&d.jsxs("span",{children:["checked ",Pr(b.lastChecked)]})]})]}),!E&&d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("button",{onClick:()=>D.mutate(b.id),disabled:D.isPending||b.status==="processing","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 disabled:opacity-30",children:b.status==="processing"?"Running":"Run now"}),d.jsx("button",{onClick:()=>F.mutate({id:b.id,enabled:!A}),disabled:F.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 disabled:opacity-30",children:A?"Pause watch":"Resume watch"})]})]}),Jh(b.feedbackItems)&&b.status!=="processing"&&Po(b.feedbackItems).inProgress===0&&d.jsx(rm,{href:b.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-green-500/70"}),d.jsx("div",{className:"text-[11px] text-muted-foreground",children:A?"Background watcher syncs GitHub feedback and pushes approved fixes automatically.":"Background watch is paused for this PR; manual runs still work."})]}),d.jsx("div",{className:"flex-1 overflow-y-auto",children:b.feedbackItems.length===0?d.jsx("div",{className:"p-4 text-[12px] text-muted-foreground",children:A?"No feedback yet. The watcher will sync GitHub comments automatically.":"No feedback yet. Background watch is paused for this PR."}):b.feedbackItems.map(L=>d.jsx(g1,{item:L,prId:b.id,readOnly:E},L.id))})]}):d.jsx("div",{className:"flex flex-1 items-center justify-center text-[12px] text-muted-foreground",children:"Select a PR from the left panel."})}),d.jsx(y1,{prId:n})]})]})}function S1(){const{data:n}=Dt({queryKey:["/api/config"]}),[o,s]=y.useState(""),[l,u]=y.useState(!1),f=jt({mutationFn:async p=>(await wt("PATCH","/api/config",p)).json(),onSuccess:()=>{Le.invalidateQueries({queryKey:["/api/config"]}),Gn({description:"Settings saved."})},onError:p=>{Gn({variant:"destructive",description:`Failed to save: ${p.message}`})}});return d.jsxs("div",{className:"flex h-screen flex-col overflow-hidden",children:[d.jsx("header",{className:"flex shrink-0 items-center justify-between border-b border-border px-4 py-2.5",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(Qn,{href:"/",className:"text-[11px] text-muted-foreground hover:text-foreground",children:"← back"}),d.jsx("span",{className:"text-sm font-medium tracking-tight",children:"settings"})]})}),d.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:d.jsxs("div",{className:"mx-auto flex max-w-2xl flex-col gap-8",children:[d.jsxs("section",{children:[d.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Agent"}),d.jsx("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-sm",children:"Coding Agent"}),d.jsx("div",{className:"text-[11px] text-muted-foreground",children:"CLI agent used to apply fixes"})]}),d.jsxs("select",{value:n?.codingAgent??"codex",onChange:p=>{const h=p.target.value;f.mutate({codingAgent:h})},disabled:f.isPending,className:"border border-border bg-transparent px-2 py-1 text-sm focus:border-foreground focus:outline-none disabled:opacity-50",children:[d.jsx("option",{value:"codex",children:"codex"}),d.jsx("option",{value:"claude",children:"claude"})]})]})})]}),d.jsxs("section",{children:[d.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Tuning"}),d.jsxs("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:[d.jsx(Vs,{label:"Max turns",description:"Maximum agent turns per feedback item",value:n?.maxTurns??15,onChange:p=>f.mutate({maxTurns:p}),disabled:f.isPending}),d.jsx(Vs,{label:"Poll interval (ms)",description:"How often to check for new feedback",value:n?.pollIntervalMs??12e4,onChange:p=>f.mutate({pollIntervalMs:p}),disabled:f.isPending}),d.jsx(Vs,{label:"Batch window (ms)",description:"Time to batch feedback before processing",value:n?.batchWindowMs??3e5,onChange:p=>f.mutate({batchWindowMs:p}),disabled:f.isPending}),d.jsx(Vs,{label:"Max changes per run",description:"Limit on concurrent changes",value:n?.maxChangesPerRun??20,onChange:p=>f.mutate({maxChangesPerRun:p}),disabled:f.isPending}),d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-sm",children:"Auto-update docs"}),d.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Automatically assess whether tracked PRs need documentation updates."})]}),d.jsx("input",{type:"checkbox",checked:n?.autoUpdateDocs??!0,onChange:p=>f.mutate({autoUpdateDocs:p.target.checked}),disabled:f.isPending,className:"h-4 w-4 accent-foreground"})]})]})]}),d.jsxs("section",{children:[d.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Releases"}),d.jsx("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:d.jsxs("label",{className:"flex items-start justify-between gap-3",children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-sm",children:"Automatic release creation"}),d.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."})]}),d.jsx("input",{type:"checkbox",checked:n?.autoCreateReleases??!0,onChange:p=>f.mutate({autoCreateReleases:p.target.checked}),disabled:f.isPending,className:"mt-1 accent-foreground","data-testid":"checkbox-auto-create-releases"})]})})]}),d.jsxs("section",{children:[d.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"GitHub"}),d.jsxs("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-sm",children:"Token"}),d.jsx("div",{className:"text-[11px] text-muted-foreground",children:n?.githubToken||"not set"})]}),l?d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("input",{type:"password",value:o,onChange:p=>s(p.target.value),placeholder:"ghp_...",className:"border border-border bg-transparent px-2 py-1 text-sm focus:border-foreground focus:outline-none"}),d.jsx("button",{onClick:()=>{o&&(f.mutate({githubToken:o}),s(""),u(!1))},disabled:!o||f.isPending,className:"border border-border px-2 py-1 text-xs hover:bg-muted disabled:opacity-50",children:"save"}),d.jsx("button",{onClick:()=>{u(!1),s("")},className:"px-2 py-1 text-xs text-muted-foreground hover:text-foreground",children:"cancel"})]}):d.jsx("button",{onClick:()=>u(!0),className:"border border-border px-2 py-1 text-xs hover:bg-muted",children:"update"})]}),d.jsxs("div",{children:[d.jsx("div",{className:"text-sm",children:"Trusted reviewers"}),d.jsx("div",{className:"text-[11px] text-muted-foreground",children:n?.trustedReviewers?.length?n.trustedReviewers.join(", "):"none configured"})]}),d.jsxs("div",{children:[d.jsx("div",{className:"text-sm",children:"Ignored bots"}),d.jsx("div",{className:"text-[11px] text-muted-foreground",children:n?.ignoredBots?.length?n.ignoredBots.join(", "):"none configured"})]})]})]})]})})]})}function Vs({label:n,description:o,value:s,onChange:l,disabled:u}){return d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-sm",children:n}),d.jsx("div",{className:"text-[11px] text-muted-foreground",children:o})]}),d.jsx("input",{type:"number",value:s,onChange:f=>{const p=parseInt(f.target.value,10);isNaN(p)||l(p)},disabled:u,className:"w-28 border border-border bg-transparent px-2 py-1 text-right text-sm focus:border-foreground focus:outline-none disabled:opacity-50"})]})}function b1(n){return new Date(n).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function C1(n){const o=n.match(/##\s*Twitter\/X\s*(?:Thread)?\n([\s\S]*?)(?=\n##\s|\s*$)/i),s=n.match(/##\s*LinkedIn\s*(?:\/\s*General)?\n([\s\S]*?)(?=\n##\s|\s*$)/i);return{twitter:o?o[1].trim():null,linkedin:s?s[1].trim():null}}function k1({text:n}){const[o,s]=y.useState(!1),l=async()=>{try{await navigator.clipboard.writeText(n),s(!0),setTimeout(()=>s(!1),2e3)}catch{}};return d.jsx("button",{onClick:l,className:"border border-border px-2 py-0.5 text-[11px] uppercase tracking-wider text-muted-foreground hover:border-foreground hover:text-foreground focus:outline-none",children:o?"copied":"copy"})}function ba({title:n,content:o}){return d.jsxs("div",{className:"mt-4",children:[d.jsxs("div",{className:"mb-1.5 flex items-center justify-between",children:[d.jsx("span",{className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:n}),d.jsx(k1,{text:o})]}),d.jsx("pre",{className:"whitespace-pre-wrap border border-border bg-background p-3 text-[12px] leading-relaxed font-mono",children:o})]})}function E1({status:n}){const o=n==="done"?"border-foreground/40 text-foreground":n==="generating"?"border-border text-muted-foreground animate-pulse":"border-destructive/40 text-destructive";return d.jsx("span",{className:`border px-1.5 py-0 text-[10px] uppercase tracking-wider ${o}`,children:n})}function N1({changelog:n}){const[o,s]=y.useState(!1),l=n.content?C1(n.content):null;return d.jsxs("div",{className:"border border-border",children:[d.jsxs("div",{className:"flex cursor-pointer items-center justify-between px-4 py-3 hover:bg-muted/30",onClick:()=>n.status==="done"&&s(u=>!u),children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(E1,{status:n.status}),d.jsx("span",{className:"text-sm font-medium",children:b1(n.createdAt)}),d.jsxs("span",{className:"text-[11px] text-muted-foreground",children:[n.triggerCount," PR",n.triggerCount!==1?"s":""," merged"]}),d.jsx("span",{className:"text-[11px] text-muted-foreground",children:n.prSummaries.map(u=>`#${u.number}`).join(" · ")})]}),n.status==="done"&&d.jsx("span",{className:"text-[11px] text-muted-foreground",children:o?"▲":"▼"})]}),o&&n.status==="done"&&d.jsxs("div",{className:"border-t border-border px-4 pb-4 pt-3",children:[n.error&&d.jsx("p",{className:"mb-3 text-[12px] text-destructive",children:n.error}),l?.twitter&&d.jsx(ba,{title:"Twitter / X Thread",content:l.twitter}),l?.linkedin&&d.jsx(ba,{title:"LinkedIn / General",content:l.linkedin}),!l?.twitter&&!l?.linkedin&&n.content&&d.jsx(ba,{title:"Full output",content:n.content})]}),n.status==="error"&&n.error&&d.jsx("div",{className:"border-t border-border px-4 py-3",children:d.jsx("p",{className:"text-[12px] text-destructive",children:n.error})}),n.status==="generating"&&d.jsx("div",{className:"border-t border-border px-4 py-2.5",children:d.jsx("span",{className:"text-[11px] text-muted-foreground",children:"Generating social media post with AI agent…"})})]})}function P1(){const{data:n=[],isLoading:o}=Dt({queryKey:["/api/changelogs"],refetchInterval:s=>s.state.data?.some(u=>u.status==="generating")?5e3:!1});return d.jsxs("div",{className:"flex h-screen flex-col overflow-hidden",children:[d.jsxs("header",{className:"flex shrink-0 items-center justify-between border-b border-border px-4 py-2.5",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-label":"PR Feedback Agent",children:[d.jsx("rect",{x:"1",y:"1",width:"14",height:"14",stroke:"currentColor",strokeWidth:"1.5"}),d.jsx("path",{d:"M4 5h8M4 8h5M4 11h6",stroke:"currentColor",strokeWidth:"1"})]}),d.jsx("span",{className:"text-sm font-medium tracking-tight",children:"code factory"}),d.jsx("span",{className:"border border-border px-1.5 py-0 text-[10px] uppercase tracking-wider text-muted-foreground",children:"changelogs"})]}),d.jsx(Qn,{href:"/",className:"text-[11px] text-muted-foreground hover:text-foreground focus:outline-none",children:"← back to dashboard"})]}),d.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:d.jsxs("div",{className:"mx-auto max-w-3xl",children:[d.jsxs("div",{className:"mb-5",children:[d.jsx("h1",{className:"text-base font-medium",children:"Social Media Changelogs"}),d.jsx("p",{className:"mt-1 text-[12px] text-muted-foreground",children:"Generated automatically every 5 PRs merged to main. Copy and paste into Twitter/X or LinkedIn."})]}),!o&&n.length===0&&d.jsxs("div",{className:"border border-border px-4 py-8 text-center",children:[d.jsx("p",{className:"text-sm text-muted-foreground",children:"No changelogs yet."}),d.jsx("p",{className:"mt-1 text-[12px] text-muted-foreground",children:"A post will be generated automatically after every 5 PRs are merged to main."})]}),o&&d.jsx("div",{className:"border border-border px-4 py-6 text-center",children:d.jsx("p",{className:"text-[12px] text-muted-foreground",children:"Loading…"})}),d.jsx("div",{className:"flex flex-col gap-2",children:n.map(s=>d.jsx(N1,{changelog:s},s.id))})]})})]})}const R1=new Set(["detected","evaluating","proposed","publishing"]);function im(n){return R1.has(n)}function j1(n){return n==="published"||n==="skipped"||n==="error"}function T1(n){return typeof n=="object"&&n!==null&&"status"in n&&typeof n.status=="string"}function Ca(n){if(!n)return"n/a";const o=new Date(n);return Number.isNaN(o.getTime())?"n/a":o.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function O1(n){return n?n.slice(0,7):"n/a"}function _1({status:n}){const o=n==="published"?"border-foreground/40 text-foreground":n==="skipped"?"border-border text-muted-foreground":n==="error"?"border-destructive/40 text-destructive":im(n)?"border-border text-muted-foreground animate-pulse":"border-border text-muted-foreground";return d.jsx("span",{className:`border px-1.5 py-0 text-[10px] uppercase tracking-wider ${o}`,children:n})}function A1({text:n}){const[o,s]=y.useState(!1),l=async()=>{try{await navigator.clipboard.writeText(n),s(!0),setTimeout(()=>s(!1),1500)}catch(u){const f=u instanceof Error?u.message:"Clipboard write failed";Gn({variant:"destructive",description:`Failed to copy: ${f}`})}};return d.jsx("button",{onClick:l,className:"border border-border px-2 py-0.5 text-[11px] uppercase tracking-wider text-muted-foreground hover:border-foreground hover:text-foreground",children:o?"copied":"copy"})}function M1({run:n,onRetry:o,retryPending:s}){const[l,u]=y.useState(!1),p=!(!!n.decisionReason||!!n.releaseTitle||!!n.releaseNotes||!!n.error||!!n.githubReleaseUrl||n.includedPrs.length>0)&&j1(n.status);return d.jsxs("div",{className:"border border-border",children:[d.jsxs("button",{className:"flex w-full items-center justify-between px-4 py-3 text-left hover:bg-muted/30",onClick:()=>u(h=>!h),children:[d.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[d.jsx(_1,{status:n.status}),d.jsx("span",{className:"truncate text-sm font-medium",children:n.repo}),d.jsxs("span",{className:"text-[11px] text-muted-foreground",children:["#",n.triggerPrNumber]}),n.proposedVersion&&d.jsx("span",{className:"border border-border px-1.5 py-0 text-[10px] uppercase tracking-wider text-muted-foreground",children:n.proposedVersion}),!n.proposedVersion&&n.recommendedBump&&d.jsxs("span",{className:"text-[11px] text-muted-foreground",children:["bump ",n.recommendedBump]})]}),d.jsxs("div",{className:"flex items-center gap-3 text-[11px] text-muted-foreground",children:[d.jsx("span",{children:Ca(n.createdAt)}),d.jsx("span",{children:l?"▲":"▼"})]})]}),l&&d.jsxs("div",{className:"border-t border-border px-4 pb-4 pt-3",children:[d.jsxs("div",{className:"mb-3 text-[12px] text-muted-foreground",children:["Trigger PR:"," ",d.jsxs("a",{href:n.triggerPrUrl,target:"_blank",rel:"noreferrer noopener",className:"underline underline-offset-2",children:["#",n.triggerPrNumber," ",n.triggerPrTitle]})]}),n.decisionReason&&d.jsx("p",{className:"mb-3 text-[12px] leading-relaxed",children:n.decisionReason}),n.releaseTitle&&d.jsxs("p",{className:"mb-3 text-[12px]",children:[d.jsx("span",{className:"text-muted-foreground",children:"Release title:"})," ",d.jsx("span",{children:n.releaseTitle})]}),d.jsxs("div",{className:"mb-3 grid grid-cols-1 gap-2 text-[12px] text-muted-foreground md:grid-cols-2",children:[d.jsxs("div",{children:["Base branch: ",n.baseBranch||"n/a"]}),d.jsxs("div",{children:["Trigger SHA: ",O1(n.triggerMergeSha)]}),d.jsxs("div",{children:["Merged at: ",Ca(n.triggerMergedAt)]}),d.jsxs("div",{children:["Updated: ",Ca(n.updatedAt)]})]}),n.includedPrs.length>0&&d.jsxs("div",{className:"mb-3",children:[d.jsxs("div",{className:"mb-1.5 text-[11px] uppercase tracking-wider text-muted-foreground",children:["Included PRs (",n.includedPrs.length,")"]}),d.jsx("div",{className:"space-y-1 border border-border p-3 text-[12px]",children:n.includedPrs.map(h=>d.jsxs("div",{className:"flex items-center justify-between gap-3",children:[d.jsxs("span",{className:"truncate",children:["#",h.number," ",h.title]}),d.jsx("a",{href:h.url,target:"_blank",rel:"noreferrer noopener",className:"text-muted-foreground hover:text-foreground",children:"open"})]},`${h.mergeSha}-${h.number}`))})]}),n.releaseNotes&&d.jsxs("div",{className:"mb-3",children:[d.jsxs("div",{className:"mb-1.5 flex items-center justify-between",children:[d.jsx("span",{className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:"Release Notes"}),d.jsx(A1,{text:n.releaseNotes})]}),d.jsx("pre",{className:"whitespace-pre-wrap border border-border bg-background p-3 text-[12px] leading-relaxed font-mono",children:n.releaseNotes})]}),n.error&&d.jsx("div",{className:"mb-3 border border-destructive/40 bg-destructive/5 p-3 text-[12px] text-destructive",children:n.error}),d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.githubReleaseUrl&&d.jsx("a",{href:n.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",children:"open release"}),n.status==="error"&&d.jsx("button",{onClick:()=>o(n.id),disabled:s,className:"border border-border px-2 py-1 text-[11px] uppercase tracking-wider text-muted-foreground hover:text-foreground disabled:opacity-50",children:"retry"})]}),p&&d.jsx("p",{className:"mt-2 text-[12px] text-muted-foreground",children:"No details available yet."})]})]})}function L1(){const{data:n=[],isLoading:o}=Dt({queryKey:["/api/releases"],refetchInterval:l=>{const u=l.state.data;return Array.isArray(u)&&u.some(f=>T1(f)&&im(f.status))?5e3:!1}}),s=jt({mutationFn:async l=>(await wt("POST",`/api/releases/${l}/retry`)).json(),onSuccess:()=>{Le.invalidateQueries({queryKey:["/api/releases"]}),Gn({description:"Retry queued."})},onError:l=>{Gn({variant:"destructive",description:`Retry failed: ${l.message}`})}});return d.jsxs("div",{className:"flex h-screen flex-col overflow-hidden",children:[d.jsxs("header",{className:"flex shrink-0 items-center justify-between border-b border-border px-4 py-2.5",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-label":"Release Management",children:[d.jsx("rect",{x:"1",y:"1",width:"14",height:"14",stroke:"currentColor",strokeWidth:"1.5"}),d.jsx("path",{d:"M4 6h8M4 9h8M4 12h5",stroke:"currentColor",strokeWidth:"1"})]}),d.jsx("span",{className:"text-sm font-medium tracking-tight",children:"code factory"}),d.jsx("span",{className:"border border-border px-1.5 py-0 text-[10px] uppercase tracking-wider text-muted-foreground",children:"releases"})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(Qn,{href:"/settings",className:"text-[11px] text-muted-foreground hover:text-foreground focus:outline-none",children:"settings"}),d.jsx(Qn,{href:"/",className:"text-[11px] text-muted-foreground hover:text-foreground focus:outline-none",children:"← back to dashboard"})]})]}),d.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:d.jsxs("div",{className:"mx-auto max-w-4xl",children:[d.jsxs("div",{className:"mb-5",children:[d.jsx("h1",{className:"text-base font-medium",children:"Release Management"}),d.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."})]}),o&&d.jsx("div",{className:"border border-border px-4 py-6 text-center",children:d.jsx("p",{className:"text-[12px] text-muted-foreground",children:"Loading…"})}),!o&&n.length===0&&d.jsxs("div",{className:"border border-border px-4 py-8 text-center",children:[d.jsx("p",{className:"text-sm text-muted-foreground",children:"No release runs yet."}),d.jsx("p",{className:"mt-1 text-[12px] text-muted-foreground",children:"Runs appear after merged PRs are evaluated for release-worthiness."})]}),d.jsx("div",{className:"flex flex-col gap-2",children:n.map(l=>d.jsx(M1,{run:l,onRetry:u=>s.mutate(u),retryPending:s.isPending},l.id))})]})})]})}const lm=y.forwardRef(({className:n,...o},s)=>d.jsx("div",{ref:s,className:ft("shadcn-card rounded-xl border bg-card border-card-border text-card-foreground shadow-sm",n),...o}));lm.displayName="Card";const I1=y.forwardRef(({className:n,...o},s)=>d.jsx("div",{ref:s,className:ft("flex flex-col space-y-1.5 p-6",n),...o}));I1.displayName="CardHeader";const D1=y.forwardRef(({className:n,...o},s)=>d.jsx("div",{ref:s,className:ft("text-2xl font-semibold leading-none tracking-tight",n),...o}));D1.displayName="CardTitle";const F1=y.forwardRef(({className:n,...o},s)=>d.jsx("div",{ref:s,className:ft("text-sm text-muted-foreground",n),...o}));F1.displayName="CardDescription";const am=y.forwardRef(({className:n,...o},s)=>d.jsx("div",{ref:s,className:ft("p-6 pt-0",n),...o}));am.displayName="CardContent";const z1=y.forwardRef(({className:n,...o},s)=>d.jsx("div",{ref:s,className:ft("flex items-center p-6 pt-0",n),...o}));z1.displayName="CardFooter";function U1(){return d.jsx("div",{className:"min-h-screen w-full flex items-center justify-center bg-gray-50",children:d.jsx(lm,{className:"w-full max-w-md mx-4",children:d.jsxs(am,{className:"pt-6",children:[d.jsxs("div",{className:"flex mb-4 gap-2",children:[d.jsx(Px,{className:"h-8 w-8 text-red-500"}),d.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"404 Page Not Found"})]}),d.jsx("p",{className:"mt-4 text-sm text-gray-600",children:"Did you forget to add the page to the router?"})]})})})}function $1(){return d.jsxs(Av,{children:[d.jsx(xo,{path:"/",component:w1}),d.jsx(xo,{path:"/settings",component:S1}),d.jsx(xo,{path:"/changelogs",component:P1}),d.jsx(xo,{path:"/releases",component:L1}),d.jsx(xo,{component:U1})]})}function H1(){return d.jsx(ly,{client:Le,children:d.jsxs(Y0,{children:[d.jsx(cw,{}),d.jsx(gp,{hook:yp,children:d.jsx($1,{})})]})})}window.location.hash||(window.location.hash="#/");pv.createRoot(document.getElementById("root")).render(d.jsx(H1,{}));
|